pax_global_header00006660000000000000000000000064136213343640014517gustar00rootroot0000000000000052 comment=c98f4718908b56ef04b95b1cc35f840da55729aa azure-uamqp-python-1.2.6/000077500000000000000000000000001362133436400153135ustar00rootroot00000000000000azure-uamqp-python-1.2.6/.azure-pipelines/000077500000000000000000000000001362133436400205055ustar00rootroot00000000000000azure-uamqp-python-1.2.6/.azure-pipelines/.prettierrc.yml000066400000000000000000000000221362133436400234630ustar00rootroot00000000000000singleQuote: true azure-uamqp-python-1.2.6/.azure-pipelines/client.openssl.yml000066400000000000000000000022571362133436400241760ustar00rootroot00000000000000trigger: none pr: none variables: OpenSSLVersion: '1.0.2t' jobs: - job: 'OpenSSL' pool: vmImage: 'macOS-10.14' strategy: matrix: MacOS 10.6: MacOSXDeploymentTarget: '10.6' MacOS 10.9: MacOSXDeploymentTarget: '10.9' steps: - script: sudo xcode-select --switch /Applications/Xcode_9.4.1.app displayName: 'Select Xcode 9.4.1' - script: sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / displayName: 'Install MacOS headers' - script: source ./build_openssl_osx.sh displayName: 'Build OpenSSL' env: CFLAGS: -mmacosx-version-min=$(MacOSXDeploymentTarget) DEST: $(Build.ArtifactStagingDirectory) LDFLAGS: -mmacosx-version-min=$(MacOSXDeploymentTarget) MACOSX_DEPLOYMENT_TARGET: $(MacOSXDeploymentTarget) OPENSSL_VERSION: $(OpenSSLVersion) - task: PublishPipelineArtifact@0 displayName: 'Publish OpenSSL artifact' inputs: artifactName: openssl-macosx$(MacOSXDeploymentTarget) targetPath: $(Build.ArtifactStagingDirectory)/openssl azure-uamqp-python-1.2.6/.azure-pipelines/client.test.live.yml000066400000000000000000000266471362133436400244410ustar00rootroot00000000000000trigger: - master variables: PythonVersion27: '2.7' PythonVersion35: '3.5' PythonVersion36: '3.6' PythonVersion37: '3.7' PythonVersion38: '3.8' jobs: - job: 'Windows' pool: vmImage: 'vs2017-win2016' timeoutInMinutes: 120 strategy: maxParallel: 1 matrix: x64 Python 2.7: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion27)' x64 Python 3.5: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion35)' x64 Python 3.6: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion36)' x64 Python 3.7: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion37)' x64 Python 3.8: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion38)' x86 Python 2.7: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion27)' x86 Python 3.5: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion35)' x86 Python 3.6: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion36)' x86 Python 3.7: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion37)' x86 Python 3.8: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion38)' steps: - task: UsePythonVersion@0 displayName: 'Use Python Version' inputs: architecture: '$(PythonArchitecture)' versionSpec: '$(PythonVersion)' - powershell: | Invoke-WebRequest -UseBasicParsing -Uri https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi -OutFile VCForPython27.msi Start-Process -Wait -NoNewWindow msiexec.exe -ArgumentList "/i VCForPython27.msi /quiet /qn /norestart /log VCForPython27.log ALLUSERS=1" Get-Content VCForPython27.log displayName: 'Install Microsoft Visual C++ Compiler for Python 2.7' condition: eq(variables['PythonVersion'], variables['PythonVersion27']) - powershell: | python --version Invoke-WebRequest -UseBasicParsing -Uri https://bootstrap.pypa.io/get-pip.py | Select-Object -ExpandProperty Content | python python -m pip install -r dev_requirements.txt displayName: 'Install dependencies' env: PYTHONWARNINGS: ignore:DEPRECATION - script: python setup.py bdist_wheel displayName: 'Build uAMQP Wheel' env: UAMQP_REBUILD_PYX: 'True' - script: dir dist displayName: 'Check output' - powershell: | $whlfile = Get-ChildItem -Filter *.whl dist | Select-Object -First 1 -ExpandProperty Name python -m pip install --ignore-installed ./dist/$whlfile pytest tests --doctest-modules --junitxml=junit/test-results-c.xml pytest samples --doctest-modules --junitxml=junit/test-results-live.xml displayName: 'Run tests' env: EVENT_HUB_HOSTNAME: $(python-eh-livetest-event-hub-hostname) EVENT_HUB_NAME: $(python-eh-livetest-event-hub-name) EVENT_HUB_SAS_POLICY: $(python-eh-livetest-event-hub-sas-policy) EVENT_HUB_SAS_KEY: $(python-eh-livetest-event-hub-sas-key) IOTHUB_HOSTNAME: $(python-iothub-livetest-host-name) IOTHUB_HUB_NAME: $(python-iothub-livetest-hub-name) IOTHUB_DEVICE: $(python-eh-livetest-event-hub-iothub-device) IOTHUB_ENDPOINT: $(python-iothub-livetest-endpoint) IOTHUB_SAS_POLICY: $(python-iothub-livetest-sas-policy) IOTHUB_SAS_KEY: $(python-iothub-livetest-sas-key) - task: PublishTestResults@2 displayName: 'Publish test results' condition: succeededOrFailed() inputs: testResultsFiles: '**/test-results-*.xml' testResultsFormat: 'JUnit' testRunTitle: 'Windows $(PythonArchitecture) Python $(PythonVersion)' - task: PublishBuildArtifacts@1 displayName: 'Publish wheel artifact' inputs: artifactName: uamqp-win$(PythonArchitecture)-$(PythonVersion)-whl pathToPublish: 'dist' - job: 'MacOS' dependsOn: 'Windows' timeoutInMinutes: 120 pool: vmImage: 'macOS-10.14' strategy: maxParallel: 1 matrix: Python 2.7: MacOSXDeploymentTarget: '10.6' PythonBin: 'python2' PythonVersion: '$(PythonVersion27)' Python 3.5: MacOSXDeploymentTarget: '10.6' PythonBin: 'python3' PythonVersion: '$(PythonVersion35)' Python 3.6: MacOSXDeploymentTarget: '10.6' PythonBin: 'python3' PythonVersion: '$(PythonVersion36)' Python 3.7: MacOSXDeploymentTarget: '10.6' PythonBin: 'python3' PythonVersion: '$(PythonVersion37)' Python 3.8: MacOSXDeploymentTarget: '10.9' PythonBin: 'python3' PythonVersion: '$(PythonVersion38)' variables: OpenSSLDir: $(Agent.BuildDirectory)/openssl-macosx$(MacOSXDeploymentTarget) PythonVersion27: '2.7.17' PythonVersion35: '3.5.4' PythonVersion36: '3.6.8' PythonVersion37: '3.7.5' PythonVersion38: '3.8.0' steps: - task: DownloadPipelineArtifact@1 displayName: 'Download OpenSSL artifact' inputs: artifactName: openssl-macosx$(MacOSXDeploymentTarget) buildType: specific buildVersionToDownload: latest downloadPath: $(Agent.BuildDirectory) pipeline: 119 # azure-uamqp-python - openssl project: '29ec6040-b234-4e31-b139-33dc4287b756' # public - script: sudo xcode-select --switch /Applications/Xcode_9.4.1.app displayName: 'Select Xcode 9.4.1' - script: sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / displayName: 'Install MacOS headers' - script: source ./install_python_osx.sh displayName: 'Install Official Python' - script: | echo "Prepending PATH environment variable with directory: /usr/local/bin" echo "##vso[task.prependpath]/usr/local/bin" export PYTHON_SHORT_VER=`echo $(PythonVersion) | cut -d . -f 1,2` echo "Prepending PATH environment variable with directory: $HOME/Library/Python/$PYTHON_SHORT_VER/bin" echo "##vso[task.prependpath]$HOME/Library/Python/$PYTHON_SHORT_VER/bin" displayName: 'Prepare PATH' - script: | $(PythonBin) --version curl -sS https://bootstrap.pypa.io/get-pip.py | $(PythonBin) - --user $(PythonBin) -m pip install --user -r dev_requirements.txt displayName: 'Install dependencies' - script: $(PythonBin) setup.py bdist_wheel displayName: 'Build uAMQP Wheel' env: CFLAGS: -mmacosx-version-min=$(MacOSXDeploymentTarget) -I$(OpenSSLDir)/include CMAKE_OSX_ARCHITECTURES: 'i386;x86_64' CMAKE_OSX_DEPLOYMENT_TARGET: $(MacOSXDeploymentTarget) LDFLAGS: -mmacosx-version-min=$(MacOSXDeploymentTarget) -L$(OpenSSLDir)/lib MACOSX_DEPLOYMENT_TARGET: $(MacOSXDeploymentTarget) OPENSSL_INCLUDE_DIR: $(OpenSSLDir)/include OPENSSL_ROOT_DIR: $(OpenSSLDir) UAMQP_REBUILD_PYX: 'True' UAMQP_USE_OPENSSL: 'True' - script: ls ./dist displayName: 'Check output' - script: | $(PythonBin) -m pip install --user --ignore-installed ./dist/*.whl pytest tests --doctest-modules --junitxml=junit/test-results-c.xml pytest samples --doctest-modules --junitxml=junit/test-results-live.xml displayName: 'Run tests' env: EVENT_HUB_HOSTNAME: $(python-eh-livetest-event-hub-hostname) EVENT_HUB_NAME: $(python-eh-livetest-event-hub-name) EVENT_HUB_SAS_POLICY: $(python-eh-livetest-event-hub-sas-policy) EVENT_HUB_SAS_KEY: $(python-eh-livetest-event-hub-sas-key) IOTHUB_HOSTNAME: $(python-iothub-livetest-host-name) IOTHUB_HUB_NAME: $(python-iothub-livetest-hub-name) IOTHUB_DEVICE: $(python-eh-livetest-event-hub-iothub-device) IOTHUB_ENDPOINT: $(python-iothub-livetest-endpoint) IOTHUB_SAS_POLICY: $(python-iothub-livetest-sas-policy) IOTHUB_SAS_KEY: $(python-iothub-livetest-sas-key) - task: PublishTestResults@2 displayName: 'Publish test results' condition: succeededOrFailed() inputs: testResultsFiles: '**/test-results-*.xml' testResultsFormat: 'JUnit' testRunTitle: 'MacOS Python $(PythonVersion)' - task: PublishBuildArtifacts@1 displayName: 'Publish wheel artifact' inputs: artifactName: uamqp-macosx$(MacOSXDeploymentTarget)-$(PythonVersion)-whl pathToPublish: 'dist' - job: 'Linux' timeoutInMinutes: 120 dependsOn: 'MacOS' pool: vmImage: 'ubuntu-18.04' strategy: maxParallel: 1 matrix: Python 2.7: PythonVersion: '$(PythonVersion27)' Python 3.5: PythonVersion: '$(PythonVersion35)' Python 3.6: PythonVersion: '$(PythonVersion36)' Python 3.7: PythonVersion: '$(PythonVersion37)' Python 3.8: PythonVersion: '$(PythonVersion38)' steps: - task: UsePythonVersion@0 displayName: 'Use Python Version' inputs: versionSpec: '$(PythonVersion)' - script: | echo "Prepending PATH environment variable with directory: $HOME/.local/bin" echo "##vso[task.prependpath]$HOME/.local/bin" displayName: 'Prepare PATH' - script: | python --version curl -sS https://bootstrap.pypa.io/get-pip.py | python - --user python -m pip install --user -r dev_requirements.txt displayName: 'Install dependencies' - script: python setup.py bdist_wheel displayName: 'Build uAMQP Wheel' env: UAMQP_REBUILD_PYX: 'True' - script: ls ./dist displayName: 'Check output' - script: | python -m pip install --user --ignore-installed ./dist/*.whl pytest tests --doctest-modules --junitxml=junit/test-results-c.xml pytest samples --doctest-modules --junitxml=junit/test-results-live.xml displayName: 'Run tests' env: EVENT_HUB_HOSTNAME: $(python-eh-livetest-event-hub-hostname) EVENT_HUB_NAME: $(python-eh-livetest-event-hub-name) EVENT_HUB_SAS_POLICY: $(python-eh-livetest-event-hub-sas-policy) EVENT_HUB_SAS_KEY: $(python-eh-livetest-event-hub-sas-key) IOTHUB_HOSTNAME: $(python-iothub-livetest-host-name) IOTHUB_HUB_NAME: $(python-iothub-livetest-hub-name) IOTHUB_DEVICE: $(python-eh-livetest-event-hub-iothub-device) IOTHUB_ENDPOINT: $(python-iothub-livetest-endpoint) IOTHUB_SAS_POLICY: $(python-iothub-livetest-sas-policy) IOTHUB_SAS_KEY: $(python-iothub-livetest-sas-key) - task: PublishTestResults@2 displayName: 'Publish test results' condition: succeededOrFailed() inputs: testResultsFiles: '**/test-results-*.xml' testResultsFormat: 'JUnit' testRunTitle: 'Linux Python $(PythonVersion)' - task: PublishBuildArtifacts@1 displayName: 'Publish wheel artifact' inputs: artifactName: uamqp-linux-$(PythonVersion)-whl pathToPublish: 'dist' azure-uamqp-python-1.2.6/.azure-pipelines/client.yml000066400000000000000000000261121362133436400225100ustar00rootroot00000000000000trigger: - master variables: PythonVersion27: '2.7' PythonVersion35: '3.5' PythonVersion36: '3.6' PythonVersion37: '3.7' PythonVersion38: '3.8' jobs: - job: 'sdist' displayName: 'Source Distribution' pool: vmImage: 'ubuntu-18.04' steps: - task: UsePythonVersion@0 displayName: 'Use Python Version' inputs: versionSpec: '$(PythonVersion37)' - script: | echo "Prepending PATH environment variable with directory: $HOME/.local/bin" echo "##vso[task.prependpath]$HOME/.local/bin" displayName: 'Prepare PATH' - script: | python --version curl -sS https://bootstrap.pypa.io/get-pip.py | python - --user python -m pip install --user -r dev_requirements.txt displayName: 'Install dependencies' - script: python setup.py sdist displayName: 'Build uAMQP sdist' - script: ls ./dist displayName: 'Check output' - task: PublishBuildArtifacts@1 displayName: 'Publish sdist artifact' inputs: artifactName: uamqp-sdist pathToPublish: 'dist' - job: 'MacOS' pool: vmImage: 'macOS-10.14' strategy: matrix: Python 2.7: MacOSXDeploymentTarget: '10.6' PythonBin: 'python2' PythonVersion: '$(PythonVersion27)' Python 3.5: MacOSXDeploymentTarget: '10.6' PythonBin: 'python3' PythonVersion: '$(PythonVersion35)' Python 3.6: MacOSXDeploymentTarget: '10.6' PythonBin: 'python3' PythonVersion: '$(PythonVersion36)' Python 3.7: MacOSXDeploymentTarget: '10.6' PythonBin: 'python3' PythonVersion: '$(PythonVersion37)' Python 3.8: MacOSXDeploymentTarget: '10.9' PythonBin: 'python3' PythonVersion: '$(PythonVersion38)' variables: OpenSSLDir: $(Agent.BuildDirectory)/openssl-macosx$(MacOSXDeploymentTarget) PythonVersion27: '2.7.17' PythonVersion35: '3.5.4' PythonVersion36: '3.6.8' PythonVersion37: '3.7.5' PythonVersion38: '3.8.0' steps: - task: DownloadPipelineArtifact@1 displayName: 'Download OpenSSL artifact' inputs: artifactName: openssl-macosx$(MacOSXDeploymentTarget) buildType: specific buildVersionToDownload: latest downloadPath: $(Agent.BuildDirectory) pipeline: 119 # azure-uamqp-python - openssl project: '29ec6040-b234-4e31-b139-33dc4287b756' # public - script: sudo xcode-select --switch /Applications/Xcode_9.4.1.app displayName: 'Select Xcode 9.4.1' - script: sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / displayName: 'Install MacOS headers' - script: source ./install_python_osx.sh displayName: 'Install Official Python' - script: | echo "Prepending PATH environment variable with directory: /usr/local/bin" echo "##vso[task.prependpath]/usr/local/bin" export PYTHON_SHORT_VER=`echo $(PythonVersion) | cut -d . -f 1,2` echo "Prepending PATH environment variable with directory: $HOME/Library/Python/$PYTHON_SHORT_VER/bin" echo "##vso[task.prependpath]$HOME/Library/Python/$PYTHON_SHORT_VER/bin" displayName: 'Prepare PATH' - script: | $(PythonBin) --version curl -sS https://bootstrap.pypa.io/get-pip.py | $(PythonBin) - --user $(PythonBin) -m pip install --user -r dev_requirements.txt displayName: 'Install dependencies' - script: $(PythonBin) setup.py bdist_wheel displayName: 'Build uAMQP Wheel' env: CFLAGS: -mmacosx-version-min=$(MacOSXDeploymentTarget) -I$(OpenSSLDir)/include CMAKE_OSX_ARCHITECTURES: 'i386;x86_64' CMAKE_OSX_DEPLOYMENT_TARGET: $(MacOSXDeploymentTarget) LDFLAGS: -mmacosx-version-min=$(MacOSXDeploymentTarget) -L$(OpenSSLDir)/lib MACOSX_DEPLOYMENT_TARGET: $(MacOSXDeploymentTarget) OPENSSL_INCLUDE_DIR: $(OpenSSLDir)/include OPENSSL_ROOT_DIR: $(OpenSSLDir) UAMQP_REBUILD_PYX: 'True' UAMQP_USE_OPENSSL: 'True' - script: ls ./dist displayName: 'Check output' - script: | $(PythonBin) -m pip install --user --ignore-installed ./dist/*.whl pytest tests --doctest-modules --junitxml=junit/test-results-c.xml pytest samples --doctest-modules --junitxml=junit/test-results-live.xml displayName: 'Run tests' - task: PublishTestResults@2 displayName: 'Publish test results' condition: succeededOrFailed() inputs: testResultsFiles: '**/test-results-*.xml' testResultsFormat: 'JUnit' testRunTitle: 'MacOS Python $(PythonVersion)' - task: PublishBuildArtifacts@1 displayName: 'Publish wheel artifact' inputs: artifactName: uamqp-macosx$(MacOSXDeploymentTarget)-$(PythonVersion)-whl pathToPublish: 'dist' - job: 'Windows' pool: vmImage: 'vs2017-win2016' strategy: matrix: x64 Python 2.7: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion27)' x64 Python 3.5: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion35)' x64 Python 3.6: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion36)' x64 Python 3.7: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion37)' x64 Python 3.8: PythonArchitecture: 'x64' PythonVersion: '$(PythonVersion38)' x86 Python 2.7: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion27)' x86 Python 3.5: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion35)' x86 Python 3.6: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion36)' x86 Python 3.7: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion37)' x86 Python 3.8: PythonArchitecture: 'x86' PythonVersion: '$(PythonVersion38)' steps: - task: UsePythonVersion@0 displayName: 'Use Python Version' inputs: architecture: '$(PythonArchitecture)' versionSpec: '$(PythonVersion)' - powershell: | Invoke-WebRequest -UseBasicParsing -Uri https://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi -OutFile VCForPython27.msi Start-Process -Wait -NoNewWindow msiexec.exe -ArgumentList "/i VCForPython27.msi /quiet /qn /norestart /log VCForPython27.log ALLUSERS=1" Get-Content VCForPython27.log displayName: 'Install Microsoft Visual C++ Compiler for Python 2.7' condition: eq(variables['PythonVersion'], variables['PythonVersion27']) - powershell: | python --version Invoke-WebRequest -UseBasicParsing -Uri https://bootstrap.pypa.io/get-pip.py | Select-Object -ExpandProperty Content | python python -m pip install -r dev_requirements.txt displayName: 'Install dependencies' env: PYTHONWARNINGS: ignore:DEPRECATION - script: python setup.py bdist_wheel displayName: 'Build uAMQP Wheel' env: UAMQP_REBUILD_PYX: 'True' - script: dir dist displayName: 'Check output' - powershell: | $whlfile = Get-ChildItem -Filter *.whl dist | Select-Object -First 1 -ExpandProperty Name python -m pip install --ignore-installed ./dist/$whlfile pytest tests --doctest-modules --junitxml=junit/test-results-c.xml pytest samples --doctest-modules --junitxml=junit/test-results-live.xml displayName: 'Run tests' - task: PublishTestResults@2 displayName: 'Publish test results' condition: succeededOrFailed() inputs: testResultsFiles: '**/test-results-*.xml' testResultsFormat: 'JUnit' testRunTitle: 'Windows $(PythonArchitecture) Python $(PythonVersion)' - task: PublishBuildArtifacts@1 displayName: 'Publish wheel artifact' inputs: artifactName: uamqp-win$(PythonArchitecture)-$(PythonVersion)-whl pathToPublish: 'dist' - job: 'Linux' pool: vmImage: 'ubuntu-18.04' strategy: matrix: Python 2.7: PythonVersion: '$(PythonVersion27)' Python 3.5: PythonVersion: '$(PythonVersion35)' Python 3.6: PythonVersion: '$(PythonVersion36)' Python 3.7: PythonVersion: '$(PythonVersion37)' Python 3.8: PythonVersion: '$(PythonVersion38)' steps: - task: UsePythonVersion@0 displayName: 'Use Python Version' inputs: versionSpec: '$(PythonVersion)' - script: | echo "Prepending PATH environment variable with directory: $HOME/.local/bin" echo "##vso[task.prependpath]$HOME/.local/bin" displayName: 'Prepare PATH' - script: | python --version curl -sS https://bootstrap.pypa.io/get-pip.py | python - --user python -m pip install --user -r dev_requirements.txt displayName: 'Install dependencies' - script: python setup.py bdist_wheel displayName: 'Build uAMQP Wheel' env: UAMQP_REBUILD_PYX: 'True' - script: ls ./dist displayName: 'Check output' - script: | python -m pip install --user --ignore-installed ./dist/*.whl pytest tests --doctest-modules --junitxml=junit/test-results-c.xml pytest samples --doctest-modules --junitxml=junit/test-results-live.xml displayName: 'Run tests' - task: PublishTestResults@2 displayName: 'Publish test results' condition: succeededOrFailed() inputs: testResultsFiles: '**/test-results-*.xml' testResultsFormat: 'JUnit' testRunTitle: 'Linux Python $(PythonVersion)' - task: PublishBuildArtifacts@1 displayName: 'Publish wheel artifact' inputs: artifactName: uamqp-linux-$(PythonVersion)-whl pathToPublish: 'dist' - job: 'ManyLinux1' condition: ne(variables['System.TeamProject'], 'public') pool: vmImage: 'ubuntu-18.04' steps: - task: Docker@1 displayName: 'Build and test with Docker' inputs: azureContainerRegistry: azuresdkimages.azurecr.io azureSubscriptionEndpoint: 'Azure SDK Images' command: 'Run an image' containerCommand: '/data/build_many_linux.sh' envVars: 'UAMQP_REBUILD_PYX=True' imageName: 'manylinux_crypto_x64' qualifyImageName: true runInBackground: false volumes: '$(System.DefaultWorkingDirectory):/data' - script: ls ./wheelhouse displayName: 'Check output' - task: PublishBuildArtifacts@1 displayName: 'Publish wheel artifacts' inputs: artifactName: uamqp-manylinux1-x64-whl pathToPublish: 'wheelhouse' azure-uamqp-python-1.2.6/.gitattributes000066400000000000000000000000211362133436400201770ustar00rootroot00000000000000*.sh text eol=lfazure-uamqp-python-1.2.6/.github/000077500000000000000000000000001362133436400166535ustar00rootroot00000000000000azure-uamqp-python-1.2.6/.github/ISSUE_TEMPLATE/000077500000000000000000000000001362133436400210365ustar00rootroot00000000000000azure-uamqp-python-1.2.6/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000010411362133436400235240ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve title: '' labels: '' assignees: '' --- - **UAMQP Package Version**: - **Operating System**: - **Python Version**: **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. azure-uamqp-python-1.2.6/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000011231362133436400245600ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. azure-uamqp-python-1.2.6/.gitignore000066400000000000000000000026601362133436400173070ustar00rootroot00000000000000# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python env/ env*/ build/ wheelhouse/ cython_debug/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover .hypothesis/ .pytest_cache/ recordings/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder target/ # Jupyter Notebook .ipynb_checkpoints # pyenv .python-version # celery beat schedule file celerybeat-schedule # SageMath parsed files *.sage.py # dotenv .env # virtualenv .venv venv/ ENV/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ # uamqp uamqp/c_uamqp.c uamqp/c_uamqp.pyx src/vendor/azure-uamqp-c/deps/umock-c/ src/vendor/azure-uamqp-c/deps/azure-ctest/ src/vendor/azure-uamqp-c/deps/azure-c-testrunnerswitcher/ tests/test_dont_merge.py .vscode/settings.json .DS_Store azure-uamqp-python-1.2.6/.travis.yml000066400000000000000000000023531362133436400174270ustar00rootroot00000000000000language: python cache: pip dist: xenial matrix: include: - os: linux python: "2.7" dist: trusty env: UAMQP_ENV=LINUX27 script: - pytest - python ./setup.py check -r -s - pylint --extension-pkg-whitelist=uamqp.c_uamqp --ignore=async_ops,cbs_auth_async.py uamqp - os: linux python: "3.5" env: UAMQP_ENV=LINUX35 script: - pytest - python ./setup.py check -r -s - pylint --extension-pkg-whitelist=uamqp.c_uamqp uamqp - os: linux python: "3.6" env: UAMQP_ENV=LINUX36 script: - pytest - python ./setup.py check -r -s - pylint --extension-pkg-whitelist=uamqp.c_uamqp uamqp - os: linux python: "3.7" env: UAMQP_ENV=LINUX37 script: - pytest - python ./setup.py check -r -s - pylint --extension-pkg-whitelist=uamqp.c_uamqp uamqp - os: linux python: "3.8" env: UAMQP_ENV=LINUX38 script: - pytest - python ./setup.py check -r -s - pylint --extension-pkg-whitelist=uamqp.c_uamqp uamqp sudo: required services: - docker install: - pip install -r dev_requirements.txt - python ./setup.py build_ext --inplace - pip install -e . azure-uamqp-python-1.2.6/HISTORY.rst000066400000000000000000000437001362133436400172120ustar00rootroot00000000000000.. :changelog: Release History =============== 1.2.6 (2020-02-13) ++++++++++++++++++ - Fixed seg fault in tearing down a failed link with unsent pending messages. 1.2.5 (2019-12-10) ++++++++++++++++++ - Fixed garbage collection of C objects to prevent crashing on uncontrolled shutdown. - Fixed missing event loop references passed into asyncio functions. - Fixed bug in noneffective flow control when large messages are received. - Demote link redirect logging from warning to info. 1.2.4 (2019-12-02) ++++++++++++++++++ - Fixed bug in calculating send timeout. - Removed `ThreadPoolExecutor` in `ConnectionAsync`. - Added support for Python 3.8 1.2.3 (2019-10-07) ++++++++++++++++++ - Fixed bug in dropping received messages at the moment when the connection just started working. - Fixed bug where underlying io type wasn't set to WebSocket when http_proxy was applied (PR#92, Thanks to skoop22). - Fixed bug in noneffective timeout when sending messages. - Added desired-capabilities for `ReceiveClient(Async)` and `MessageReceiver(Async)` as part of the AMQP protocol. - Added delivery-tag to `Message` (azure-sdk-for-python issue #7336). - Added method `work` to `MessageReceiver` and `work_async` to `MessageReceiverAsync` responsible for updating link status. 1.2.2 (2019-07-02) ++++++++++++++++++ - Made bug fix in asyncio.get_event_loop backwards-compatible for now by just printing a warning rather than raising an error. In the next major version bump we can disable entirely. 1.2.1 (2019-06-20) ++++++++++++++++++ - Updated the implementation of `update_token()` in `JWTTokenAuth` and `JWTTokenAsync` (issue #80). 1.2.0 (2019-04-16) ++++++++++++++++++ - Fixed bug in batched messages missing application_properties (azure-event-hubs-python issue #97). - Fixed bug in datetime object parsing (issue #63). - Fixed bug in unexposed send/receive settle modes. - Fixed bug where retried messages were not added back to the send queue. - Fixed bug in using asyncio.get_event_loop. - Added type objects for AMQP Byte and uBytes types. - Added async locking around pending messages queue (PR#54, Thanks to zach-b) - Added WebSocket(AMQP over WebSocket) support (azure-sdk-for-python issue #5318). - Added new token class `JWTTokenAuth` and `JWTTokenAsync` to support OAuth. 1.1.0 (2018-11-12) ++++++++++++++++++ - Support for Python 2.7 \(>_<)/ - Where ever a `TimeoutError` is raised in Python 3.x, this will be replaced with a new ~uamqp.errors.ClientTimeout exception in Python 2.7. - A Python 2 `str` object will be treated as `bytes` in Python 3 and a Python 2 `unicode` object will be treated like a Python 3 `str`. - Added uamqp.compat module for handling Py 2 vs 3 imports and types (PR#46, Thanks to maxkrivich). - AMQP encoding of an integer type will now automatically failover into a Long type or a double type if the value is too large. - Improved support for promptly detecting invalid ATTACH handles and raising the appropriate error. - Added types for AMQPDescribed, AMQPInt and AMQPuInt for explicit handling of int and unsigned int encoding. - Added new error `errors.AMQPClientShutdown` as a wrapper for `KeyboardInterrupt` to better handle interrupt handling. - Added better handling of keyboard interrupts during C callbacks to better facilitate clean client shutdown. - Added additional handling of keyboard interrupt at the C level to clean up annoying warnings. - Added classmethod `Message.decode_from_bytes` to create a message from AMQP wire-encoded data. - Added `Message.encode_message` method to retrieve the AMQP wire-encoded byte representation of the current message. - Fixed behaviour of `Message.get_message_encoded_size()` to return accurate size. - Added new optional `callback` argument to `client.mgmt_request` to allow for custom handling of different status codes. - Added new client methods `auth_complete()` and `client_ready()` to allow for more fine-tuned monitoring or the client opening stages. - Client message handler is now a public attribute `client.message_handler` (`SendClient._message_sender` and `ReceiveClient._message_receiver` are now deprecated). - Added automatic encoding of `datetime.datetime` objects into AMQP timestamp. - Better support for Source filters with optional `descriptor` argument in `Source.set_filter()` and new `Source.get_filter()` method. - Fixed Session settings not being passed to CBS session. - Added support for a callback on receipt on a Link ATTACH frame. Can be supplied to a client through the `on_attach` keyword argument. - Removed unsued message.SequenceBody class. - Exposed BatchMessage.size_offset property for batch size customization. 1.0.3 (2018-09-14) ++++++++++++++++++ - Reduced CPU load during idle receive. - Updated Azure uAMQP C and Azure C Shared Utility dependencies. 1.0.2 (2018-09-05) ++++++++++++++++++ - Fixed additional bugs in setting MessageProperties as string or bytes. - Removed auth locking to prevent locking issues on keyboard interrupt. 1.0.1 (2018-08-29) ++++++++++++++++++ - Added some more checks in place to prevent lock hanging on a keybaord interrupt. - Fixed bug in setting MessageProperties.subject as string or bytes. - `uamqp.send_message` now returns a list of `uamqp.constants.MessageState` to indicate the success of each message sent. 1.0.0 (2018-08-20) ++++++++++++++++++ - API settled. - **Behaviour change** When a SendClient or SendClientAsync is shutdown, any remaining pending messages (that is messages in the states `WaitingToBeSent` and `WaitingForSendAck`) will no longer be cleared, but can be retrieved from a new attribute `SendClient.pending_messages` in order to be re-processed as needed. - **Behaviour change** The function `SendClient.queue_message` now allows for queueing multiple messages at once by simply passing in additional message instances: - `send_client.queue_message(my_message)` - `send_client.queue_message(message_1, message_2, message_3)` - `send_client.queue_message(*my_message_list)` - An authentication object will now raise a `ValueError` if one attempts to use it for more than one connection. - Renamed internal `_async` module to non-private `async_ops` to allow for docs generation. - Reformatted logging for better performance. - Added additional logging. 0.2.1 (2018-08-06) ++++++++++++++++++ - Fixed potential crashing in bindings for amqpvalue. - Fixed bindings fault in cbs PUT token complete callback. - Updated uAMQP-C. - Added additional auth and connection locking for thread/async safety. - Increased INFO level logging. - Removed platform deinitialization until it can be improved. - Added handling for a connection reaching a client-caused error state. 0.2.0 (2018-07-25) ++++++++++++++++++ - **Breaking change** `MessageSender.send_async` has been renamed to `MessageSender.send`, and `MessageSenderAsync.send_async` is now a coroutine. - **Breaking change** Removed `detach_received` callback argument from MessageSender, MessageReceiver, MessageSenderAsync, and MessageReceiverAsync in favour of new `error_policy` argument. - Added ErrorPolicy class to determine how the client should respond to both generic AMQP errors and custom or vendor-specific errors. A default policy will be used, but a custom policy can be added to any client by using a new `error_policy` argument. Value must be either an instance or subclass of ErrorPolicy. - The `error_policy` argument has also been added to MessageSender, MessageReceiver, Connection, and their async counterparts to allow for handling of link DETACH and connection CLOSE events. - The error policy passed to a SendClient determines the number of message send retry attempts. This replaces the previous `constants.MESSAGE_SEND_RETRIES` value which is now deprecated. - Added new ErrorAction object to determine how a client should respond to an error. It has three properties: `retry` (a boolean to determine whether the error is retryable), `backoff` (an integer to determine how long the client should wait before retrying, default is 0) and `increment_retries` (a boolean to determine whether the error should count against the maximum retry attempts, default is `True`). Currently `backoff` and `increment_retries` are only considered for message send failures. - Added `VendorConnectionClose` and `VendorLinkDetach` exceptions for non-standard (unrecognized) connection/link errors. - Added support for HTTP proxy configuration. - Added support for running async clients synchronously. - Added keep-alive support for connection - this is a background thread for a synchronous client, and a background async function for an async client. The keep-alive feature is disabled by default, to enable, set the `keep_alive_interval` argument on the client to an integer representing the number of seconds between connection pings. - Added support for catching a Connection CLOSE event. - Added support for `Connection.sleep` and `ConnectionAsync.sleep_async` to pause the connection. - Added support for surfacing message disposition delivery-state (with error information). - Added `constants.ErrorCodes` enum to map standard AMQP error conditions. This replaces the previous `constants.ERROR_CONNECTION_REDIRECT` and `constants.ERROR_LINK_REDIRECT` which are now both deprecated. - Added new super error `AMQPError` from which all exceptions inherit. - Added new `MessageHandlerError` exception, a subclass of `AMQPConnectionError`, for Senders/Receivers that enter an indeterminate error state. - `MessageException` is now a subclass of `MessageResponse`. - Added `ClientMessageError` exception, a subclass of `MessageException` for send errors raised client-side. - Catching Link DETACH event will now work regardless of whether service returns delivery-state. - Fixed bug where received messages attempting to settle on a detached link crashed the client. - Fixed bug in amqp C DescribedValue. - Fixed bug where client crashed on deallocating failed management operation. 0.1.1 (2018-07-14) ++++++++++++++++++ - Removed circular dependency in Python 3.4 with types.py/utils.py - When a header properties is not set, returns `None` rather than raising ValueError. - Fixed bug in receiving messages with application properties. 0.1.0 (2018-07-05) ++++++++++++++++++ - Fixed bug in error handling for CBS auth to invalid hostname. - Changed C error logging to debug level. - Bumped uAMQP C version to 1.2.7 - Fixed memory leaks and deallocation bugs with Properties and Annotations. 0.1.0rc2 (2018-07-02) +++++++++++++++++++++ - **Breaking change** Submodule `async` has been renamed to the internal `_async`. All asynchronous classes in the submodule can now be accessed from uamqp or uamqp.authentication directly. - **Breaking change** Anything returned by a callback supplied to receive messages will now be ignored. - **Breaking change** Changed message state enum values: - `Complete -> SendComplete` - `Failed -> SendFailed` - `WaitingForAck -> WaitingForSendAck` - Added new message state enum values: - `ReceivedUnsettled` - `ReceivedSettled` - **Breaking change** Changes to message settlement exceptions: - Combined the `AbandonMessage` and `DeferMessage` exceptions as `MessageModified` to be in keeping with the AMQP specification. - Renamed `AcceptMessage` to `MessageAccepted`. - Renamed `RejectMessage` to `MessageRejected` which now takes `condition` and `description` arguments rather than `message`. - Added `errors.LinkDetach` exception as new subclass of `AMQPConnectionError` as a wrapped for data in a Link DETACH dispostition. - Added `errors.LinkRedirect` as a specific subclass of `LinkDetach` to decode the specific redirect fields of a Link Redirect response. - Added `errors.MessageAlreadySettled` exception for operations performed on a received message that has already returned a receipt dispostition. - Added `errors.MessageReleased` exception. - Added `errors.ErrorResponse` exception. - A received Message can now be explicitly settled through a set of new functions on the message: - `Message.accept()` - `Message.reject(condition:str, description:str)` - `Message.release()` - `Message.modify(failed:bool, deliverable:bool, annotations:dict)` - Added explicit `auto_complete` argument to `ReceiveClient` and `ReceiveClientAsync`. If `auto_complete` is set to `False` then all messages must be explicitly "accepted" or "rejected" by the user otherwise they will timeout and be released. The default is `True`, which is the exiting behaviour for each receive mechanism: - Received messages processed by callback (`ReceiveClient.receive_messages()`) will be automatically "accepted" if no explicit response has been set on completion of the callback. - Received messages processed by batch (`ReceiveClient.receive_message_batch()`) will by automatically "accepted" before being returned to the user. - Received messages processed by iterator (`ReceiveClient.receive_message_iter()`) will by automatically "accepted" if no explicit response has been set once the generator is incremented. - Added new methods to clients and connections to allow to redirect to an alternative endpoint when a LinkRedirect exception is raised. The client redirect helper cannot be used for clients that use a shared connection - the clients must be closed before the connection can be redirected. New credentials must be supplied for the new endpoint. The new methods are: - `uamqp.Connection.redirect(redirect_info, auth)` - `uamqp.async.ConnectionAsync.redirect_async(redirect_info, auth)` - `uamqp.SendClient.redirect(redirect_info, auth)` - `uamqp.ReceiveClient.redirect(redirect_info, auth)` - `uamqp.async.SendClientAsync.redirect_async(redirect_info, auth)` - `uamqp.async.ReceiveClientAsync.redirect_async(redirect_info, auth)` - Added `on_detach_received` argument to `Sender` and `Receiver` classes to pass in callback to run on Link DETACH. - Removed automatic char encoding for strings of length 1, and added `types.AMQPChar` for explicit encoding. - Bumped uAMQP C version to 1.2.5 - Bumped Azure C Shared Utility to 1.1.5 - Fixed memory leaks in MessageProperties, MessageHeader and message annotations. 0.1.0rc1 (2018-05-29) +++++++++++++++++++++ - Fixed import error in async receiver. - Exposed sender/receiver destroy function. - Moved receiver.open on_message_received argument to constructor. - Removed sasl module and moved internal classes into authentication module. - Added encoding parameter everywhere where strings are encoded. - Started documentation. - Updated uAMQP-C to 1.2.4 and C Shared Utility to 1.1.4 (includes fix for issue #12). - Fixed return type of MgmtOperation.execute - now returns ~uamqp.message.Message. - Made AMQP connection/session/sender/receiver types in a client overridable. - Added debug trace to management operations. - Fixed error in management callback on failed operation. - Default AMQP encoding of bytes is now a String type and a bytearray is a Binary type. - Added AMQP Array type and fixed Long type range validation. - Added `header` argument to Message and BatchMessage for setting a MessageHeader. - Fixed MessageHeader attribute setters. 0.1.0b5 (2018-04-27) ++++++++++++++++++++ - Added Certifi as a depedency to make OpenSSL certs dynamic. - Added `verify` option to authentication classes to allow setting custom certificate path (for Linux and OSX). 0.1.0b4 (2018-04-19) ++++++++++++++++++++ - Fixed memory leak in async receive. - Removed close_on_done argument from client receive functions. - Added receive iterator to synchronous client. - Made async iter receive compatible with Python 3.5. 0.1.0b3 (2018-04-14) ++++++++++++++++++++ - Fixed SSL errors in manylinux wheels. - Fixed message annoations attribute. - Fixed bugs in batched messages and sending batched messages. - Fixed conflicting receiver link ID. - Fixed hanging receiver by removing queue max size in sync clients. - Added support for sending messages with None and empty bodies. 0.1.0b2 (2018-04-06) ++++++++++++++++++++ - Added message send retry. - Added timeouts and better error handling for management requests. - Improved connection and auth error handling and error messages. - Fixed message annotations type. - SendClient.send_all_messages() now returns a list of message send statuses. - Fixed OpenSSL platform being initialized multiple times. - Fixed auto-refresh of SAS tokens. - Altered `receive_batch` behaviour to return messages as soon as they're available. - Parameter `batch_size` in `receive_batch` renamed to `max_batch_size`. - Fixed message `application_properties` decode error. - Removed MacOS dependency on OpenSSL and libuuid. 0.1.0b1 (2018-03-24) ++++++++++++++++++++ - Added management request support. - Fixed message-less C operation ValueError. - Store message metadata in Python rather than C. - Refactored Send and Receive clients to create a generic parent AMQPClient. - Fixed None receive timestamp bug. - Removed async iterator queue due to instabilities - all callbacks are now synchronous. 0.1.0a3 (2018-03-19) ++++++++++++++++++++ - Added support for asynchronous message receive by iterator or batch. - Removed synchronous receive iterator, and replaced with synchronous batch receive. - Added sync and async context managers for Send and Receive Clients. - Fixed token instability and added put token retry policy. - Exposed Link ATTACH properties. - A connection now has a single $cbs session that can be reused between clients. - Added C debug trace logging to the Python logger ('uamqp.c_uamqp') 0.1.0a2 (2018-03-12) ++++++++++++++++++++ - Exposed OPEN performative properties for connection telemetry. - Exposed setters for message.message_annotations and message.application_properties. - Made adjustments to connection open and close to facilitate sharing a connection object between send/receive clients. - Support for username/password embedded in connection URI. - Clients can now optionally leave connection/session/link open for re-use. - Updated build process and installation instructions. - Various bug fixes to increase stability. 0.1.0a1 (2018-03-04) ++++++++++++++++++++ - Initial release azure-uamqp-python-1.2.6/LICENSE000066400000000000000000000022121362133436400163150ustar00rootroot00000000000000 MIT License Copyright (c) Microsoft Corporation. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE azure-uamqp-python-1.2.6/MANIFEST.in000066400000000000000000000000461362133436400170510ustar00rootroot00000000000000include *.rst recursive-include src * azure-uamqp-python-1.2.6/README.rst000066400000000000000000000072021362133436400170030ustar00rootroot00000000000000uAMQP for Python ================ .. image:: https://img.shields.io/pypi/v/uamqp.svg :target: https://pypi.python.org/pypi/uamqp/ .. image:: https://img.shields.io/pypi/pyversions/uamqp.svg :target: https://pypi.python.org/pypi/uamqp/ .. image:: https://dev.azure.com/azure-sdk/public/_apis/build/status/python/azure-uamqp-python%20-%20client?branchName=master :target: https://dev.azure.com/azure-sdk/public/_build?definitionId=89 An AMQP 1.0 client library for Python. Installation ============ Wheels are provided for most major operating systems, so you can install directly with pip: .. code:: shell $ pip install uamqp If you are running a Linux distro that does not support `ManyLinux1 `__, you can install from source: .. code:: shell $ apt-get update $ apt-get install -y build-essential libssl-dev uuid-dev cmake libcurl4-openssl-dev pkg-config python3-dev python3-pip $ pip3 install uamqp --no-binary Documentation +++++++++++++ Reference documentation can be found here: `docs.microsoft.com/python/api/uamqp/uamqp `__. Developer Setup =============== In order to run the code directly, the Cython extension will need to be build first. Pre-requisites ++++++++++++++ - Windows: Setup a `build environment `__. - Linux: Install dependencies as descriped above in the installation instructions. - MacOS: Install cmake using Homebrew: .. code:: shell $ brew install cmake Building the extension ++++++++++++++++++++++ This project has two C library dependencies. They are vendored in this repository in these versions: - `Azure uAMQP for C `__ @ `1.2.7 `__ - `Azure C Shared Utility `__ @ `1.1.5 `__ To build, start by creating a virtual environment and installing the required Python packages: .. code:: shell $ python -m venv env $ env/Scripts/activate (env)$ pip install -r dev_requirements.txt Next, run the build command: .. code:: shell $ python setup.py build_ext --inplace Tests +++++ The tests can be run from within the virtual environment. The extension must be built first using the instructions above. .. code:: shell (env)$ pytest Provide Feedback ================ If you encounter any bugs or have suggestions, please file an issue in the `Issues `__ section of the project. Contributing ============ This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit `https://cla.microsoft.com `__. When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. This project has adopted the `Microsoft Open Source Code of Conduct `__. For more information see the `Code of Conduct FAQ `__ or contact `opencode@microsoft.com `__ with any additional questions or comments. azure-uamqp-python-1.2.6/build_armv7l.sh000066400000000000000000000016141362133436400202400ustar00rootroot00000000000000#!/bin/bash set -e # To execute this script: # docker run --rm -v $PWD:/data local/armv7l /data/build_armv7l.sh # docker run --rm -v $PWD:/data local/armv7l_wheezy /data/build_armv7l.sh export UAMQP_VERSION="1.0.2" export CPATH="/opt/uamqp/openssl/include" export LIBRARY_PATH="/opt/uamqp/openssl/lib" export OPENSSL_ROOT_DIR="/opt/uamqp/openssl" export OPENSSL_INCLUDE_DIR="/opt/uamqp/openssl/include" export UAMQP_SUPPRESS_LINK_FLAGS=True export LDFLAGS="-L/opt/uamqp/openssl/lib/libssl.a -L/opt/uamqp/openssl/lib/libcrypto.a" export CFLAGS="-I/opt/uamqp/openssl/include" # Build the wheels pushd /data #/usr/local/bin/python3.4 setup.py bdist_wheel /usr/local/bin/python3.5 setup.py bdist_wheel auditwheel repair -w /data/wheelhouse dist/uamqp-${UAMQP_VERSION}-cp35-cp35m-linux_armv7l.whl #/usr/local/bin/python3.6 setup.py bdist_wheel --plat linux_armv7l #/usr/local/bin/python3.7 setup.py bdist_wheelazure-uamqp-python-1.2.6/build_linux_sdist.sh000066400000000000000000000005431362133436400213750ustar00rootroot00000000000000#!/bin/bash set -e # To execute this script: # docker run --rm -v %cd%:/data --entrypoint="/bin/bash" -e "UAMQP_REBUILD_PYX=True" fnndsc/ubuntu-python3 /data/build_linux_sdist.sh apt-get update apt-get install -y build-essential libssl-dev uuid-dev cmake libcurl4-openssl-dev pkg-config cd /data pip3 install cython==0.28.5 wheel python3 setup.py sdistazure-uamqp-python-1.2.6/build_many_linux.sh000077500000000000000000000031531362133436400212160ustar00rootroot00000000000000#!/bin/bash set -e # Inspired by https://github.com/pypa/python-manylinux-demo/blob/a615d78e5042c01a03e1bbb1ca78603c90dbce1f/travis/build-wheels.sh # To build 64bit wheels, run: # docker run --rm -v $PWD:/data -e "UAMQP_REBUILD_PYX=True" local/manylinux_crypto64 /data/build_many_linux.sh export CPATH="/opt/pyca/cryptography/openssl/include" export LIBRARY_PATH="/opt/pyca/cryptography/openssl/lib" export OPENSSL_ROOT_DIR="/opt/pyca/cryptography/openssl" # Build the wheels pushd /data; for PYBIN in /opt/python/*/bin; do if [[ "$PYBIN" =~ "cp34" ]]; then continue; fi; # Skip Python 3.4 $PYBIN/pip install cython==0.28.5 wheel; $PYBIN/python setup.py bdist_wheel -d /wheelhouse; rm -rf build/ done; popd; # Repair the wheels for WHL in /wheelhouse/*; do auditwheel repair $WHL -w /data/wheelhouse/; done; # Set up env vars to run live tests - otherwise they will be skipped. export EVENT_HUB_HOSTNAME="" export EVENT_HUB_NAME="" export EVENT_HUB_SAS_POLICY="" export EVENT_HUB_SAS_KEY="" export IOTHUB_HOSTNAME="" export IOTHUB_HUB_NAME="" export IOTHUB_DEVICE="" export IOTHUB_ENDPOINT="" export IOTHUB_SAS_POLICY="" export IOTHUB_SAS_KEY="" # Test the wheels for PYBIN in /opt/python/*/bin; do if [[ "$PYBIN" =~ "cp34" ]]; then continue; fi; # Skip Python 3.4 $PYBIN/pip install "certifi>=2017.4.17" "six~=1.0" "enum34>=1.0.4" "pytest" "pylint"; $PYBIN/pip install uamqp --no-index -f /data/wheelhouse; $PYBIN/python -c 'import uamqp;print("*****Importing uamqp from wheel successful*****")'; pushd /data; $PYBIN/pytest -v; popd; done azure-uamqp-python-1.2.6/build_openssl_armv7l.sh000066400000000000000000000005241362133436400220020ustar00rootroot00000000000000#!/bin/bash export OPENSSL_VERSION="1.0.2o" curl -O https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz tar -xvzf openssl-$OPENSSL_VERSION.tar.gz mv openssl-$OPENSSL_VERSION openssl_armv7l_src cd openssl_armv7l_src ./Configure linux-armv4 shared --prefix=/opt/uamqp/openssl make make install rm openssl-$OPENSSL_VERSION.tar.gzazure-uamqp-python-1.2.6/build_openssl_osx.sh000066400000000000000000000022101362133436400213750ustar00rootroot00000000000000#!/bin/bash # Modified from https://gist.github.com/tmiz/1441111 # Acquire sources curl -sSO https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz tar -xzf openssl-$OPENSSL_VERSION.tar.gz rm -f openssl-$OPENSSL_VERSION.tar.gz # Set up two build environments cp -R openssl-$OPENSSL_VERSION openssl_i386_src mv openssl-$OPENSSL_VERSION openssl_x86_64_src # Compile i386 cd openssl_i386_src ./Configure darwin-i386-cc no-ssl2 no-ssl3 no-zlib no-shared no-comp --prefix=$DEST/openssl --openssldir=$DEST/openssl make depend make make install_sw mv $DEST/openssl $DEST/openssl_i386 # Compile x86_64 cd ../openssl_x86_64_src ./Configure darwin64-x86_64-cc enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-zlib no-shared no-comp --prefix=$DEST/openssl --openssldir=$DEST/openssl make depend make make install_sw mv $DEST/openssl $DEST/openssl_x86_64 # Move files into place and generate universal binaries cd $DEST cp -a ./openssl_x86_64/. ./openssl/ lipo -create openssl_i386/lib/libcrypto.a openssl_x86_64/lib/libcrypto.a -output openssl/lib/libazcrypto.a lipo -create openssl_i386/lib/libssl.a openssl_x86_64/lib/libssl.a -output openssl/lib/libazssl.a azure-uamqp-python-1.2.6/build_osx.sh000066400000000000000000000012021362133436400176320ustar00rootroot00000000000000#!/bin/bash set -e export MACOSX_DEPLOYMENT_TARGET=10.6 export CMAKE_OSX_DEPLOYMENT_TARGET=10.6 export CMAKE_OSX_ARCHITECTURES="i386;x86_64" export UAMQP_USE_OPENSSL=True export UAMQP_REBUILD_PYX=True export UAMQP_SUPPRESS_LINK_FLAGS=True export OPENSSL_ROOT_DIR="/tmp/openssl" export OPENSSL_INCLUDE_DIR="/tmp/openssl/include" export LDFLAGS="-mmacosx-version-min=10.6 -L/tmp/openssl/lib" export CFLAGS="-mmacosx-version-min=10.6 -I/tmp/openssl/include" python2.7 setup.py bdist_wheel python3.4 setup.py bdist_wheel python3.5 setup.py bdist_wheel python3.6 setup.py bdist_wheel python3.7 setup.py bdist_wheel python3.8 setup.py bdist_wheel azure-uamqp-python-1.2.6/dev_requirements.txt000066400000000000000000000003301362133436400214310ustar00rootroot00000000000000cython==0.28.5 setuptools>=27.1.2 wheel>=0.32.0 pytest>=3.4.1 pytest-asyncio>=0.8.0; python_version > '3.4' docutils>=0.14 pygments>=2.2.0 pylint==2.3.1; python_version >= '3.4' pylint==1.8.4; python_version < '3.4' azure-uamqp-python-1.2.6/install_python_osx.sh000066400000000000000000000010261362133436400216060ustar00rootroot00000000000000#!/bin/bash # Python 3.8+ are only build for OSX 10.9+ PACKAGE_TYPE="macosx10.6" if [[ "$PYTHONVERSION" =~ ^3.8 ]]; then PACKAGE_TYPE="macosx10.9" fi # Handle prerelease versions PACKAGE_DIR="$PYTHONVERSION" if [[ "$PYTHONVERSION" =~ ^([0-9.]+)[A-Za-z] ]]; then PACKAGE_DIR="${BASH_REMATCH[1]}" fi curl -sSO https://www.python.org/ftp/python/$PACKAGE_DIR/python-$PYTHONVERSION-$PACKAGE_TYPE.pkg sudo installer -allowUntrusted -pkg python-$PYTHONVERSION-$PACKAGE_TYPE.pkg -target / rm -f python-$PYTHONVERSION-$PACKAGE_TYPE.pkg azure-uamqp-python-1.2.6/pylintrc000066400000000000000000000032151362133436400171030ustar00rootroot00000000000000[MASTER] ignore-patterns=test_* reports=no [MESSAGES CONTROL] # For all codes, run 'pylint --list-msgs' or go to 'https://pylint.readthedocs.io/en/latest/reference_guide/features.html' # locally-disabled: Warning locally suppressed using disable-msg # cyclic-import: because of https://github.com/PyCQA/pylint/issues/850 disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,logging-format-interpolation,too-many-instance-attributes,too-few-public-methods,raising-bad-type [FORMAT] max-line-length=120 [VARIABLES] # Tells whether we should check for unused import in __init__ files. init-import=no [DESIGN] # Maximum number of locals for function / method body max-locals=25 # Maximum number of branch for function / method body max-branches=20 [SIMILARITIES] min-similarity-lines=10 [BASIC] # Naming hints based on PEP 8 (https://www.python.org/dev/peps/pep-0008/#naming-conventions). # Consider these guidelines and not hard rules. Read PEP 8 for more details. # The invalid-name checker must be **enabled** for these hints to be used. include-naming-hint=yes module-name-hint=lowercase (keep short; underscores are discouraged) const-name-hint=UPPER_CASE_WITH_UNDERSCORES class-name-hint=CapitalizedWords class-attribute-name-hint=lower_case_with_underscores attr-name-hint=lower_case_with_underscores method-name-hint=lower_case_with_underscores function-name-hint=lower_case_with_underscores argument-name-hint=lower_case_with_underscores variable-name-hint=lower_case_with_underscores inlinevar-name-hint=lower_case_with_underscores (short is OK) extension-pkg-whitelist=c_uamqp azure-uamqp-python-1.2.6/pytest.ini000066400000000000000000000000511362133436400173400ustar00rootroot00000000000000[pytest] norecursedirs = .git build env* azure-uamqp-python-1.2.6/samples/000077500000000000000000000000001362133436400167575ustar00rootroot00000000000000azure-uamqp-python-1.2.6/samples/asynctests/000077500000000000000000000000001362133436400211575ustar00rootroot00000000000000azure-uamqp-python-1.2.6/samples/asynctests/test_azure_event_hubs_mgmt_op_async.py000066400000000000000000000032621362133436400310620ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import asyncio import pytest import sys import uamqp from uamqp import authentication def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) @pytest.mark.asyncio async def test_event_hubs_mgmt_op_async(live_eventhub_config): plain_auth = authentication.SASLPlain(live_eventhub_config['hostname'], live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) async with uamqp.AMQPClientAsync(target, auth=plain_auth, debug=False) as send_client: mgmt_msg = uamqp.Message(application_properties={'name': live_eventhub_config['event_hub']}) response = await send_client.mgmt_request_async( mgmt_msg, b'READ', op_type=b'com.microsoft:eventhub', status_code_field=b'status-code', description_fields=b'status-description', timeout=3000) output = response.get_data() assert output[b'partition_ids'] == [b"0", b"1"]azure-uamqp-python-1.2.6/samples/asynctests/test_azure_event_hubs_receive_async.py000066400000000000000000000272031362133436400310430ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import logging import os import pytest import asyncio import sys import uamqp from uamqp import address, types, utils, authentication def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def on_message_received(message): annotations = message.annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) return message @pytest.mark.asyncio async def test_event_hubs_callback_async_receive(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) receive_client = uamqp.ReceiveClientAsync(source, auth=sas_auth, timeout=1000, prefetch=10) log.info("Created client, receiving...") await receive_client.receive_messages_async(on_message_received) log.info("Finished receiving") @pytest.mark.asyncio async def test_event_hubs_filter_receive_async(live_eventhub_config): plain_auth = authentication.SASLPlain( live_eventhub_config['hostname'], live_eventhub_config['key_name'], live_eventhub_config['access_key']) source_url = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) source = address.Source(source_url) source.set_filter(b"amqp.annotation.x-opt-enqueuedtimeutc > 1518731960545") receive_client = uamqp.ReceiveClientAsync(source, auth=plain_auth, timeout=5000) await receive_client.receive_messages_async(on_message_received) @pytest.mark.asyncio async def test_event_hubs_iter_receive_async(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) receive_client = uamqp.ReceiveClientAsync(source, debug=False, auth=sas_auth, timeout=3000, prefetch=10) count = 0 message_generator = receive_client.receive_messages_iter_async() async for message in message_generator: log.info("No. {} : {}".format(message.annotations.get(b'x-opt-sequence-number'), message)) count += 1 if count >= 10: log.info("Got {} messages. Breaking.".format(count)) message.accept() break count = 0 async for message in message_generator: count += 1 if count >= 10: log.info("Got {} more messages. Shutting down.".format(count)) message.accept() break await receive_client.close_async() @pytest.mark.asyncio async def test_event_hubs_batch_receive_async(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) async with uamqp.ReceiveClientAsync(source, debug=False, auth=sas_auth, timeout=3000, prefetch=10) as receive_client: message_batch = await receive_client.receive_message_batch_async(10) log.info("got batch: {}".format(len(message_batch))) for message in message_batch: annotations = message.annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) next_batch = await receive_client.receive_message_batch_async(10) log.info("got another batch: {}".format(len(next_batch))) for message in next_batch: annotations = message.annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) next_batch = await receive_client.receive_message_batch_async(10) log.info("got another batch: {}".format(len(next_batch))) for message in next_batch: annotations = message.annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) @pytest.mark.asyncio async def test_event_hubs_client_web_socket_async(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key'], transport_type=uamqp.TransportType.AmqpOverWebsocket) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) async with uamqp.ReceiveClientAsync(source, auth=sas_auth, debug=False, timeout=5000, prefetch=50) as receive_client: receive_client.receive_message_batch(max_batch_size=10) @pytest.mark.asyncio async def test_event_hubs_receive_with_runtime_metric_async(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) receiver_runtime_metric_symbol = b'com.microsoft:enable-receiver-runtime-metric' symbol_array = [types.AMQPSymbol(receiver_runtime_metric_symbol)] desired_capabilities = utils.data_factory(types.AMQPArray(symbol_array)) async with uamqp.ReceiveClientAsync(source, debug=False, auth=sas_auth, timeout=1000, prefetch=10, desired_capabilities=desired_capabilities) as receive_client: message_batch = await receive_client.receive_message_batch_async(10) log.info("got batch: {}".format(len(message_batch))) for message in message_batch: annotations = message.annotations delivery_annotations = message.delivery_annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) assert b'last_enqueued_sequence_number' in delivery_annotations assert b'last_enqueued_offset' in delivery_annotations assert b'last_enqueued_time_utc' in delivery_annotations assert b'runtime_info_retrieval_time_utc' in delivery_annotations @pytest.mark.asyncio async def test_event_hubs_shared_connection_async(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group']) async with uamqp.ConnectionAsync(live_eventhub_config['hostname'], sas_auth, debug=False) as conn: partition_0 = uamqp.ReceiveClientAsync(source + "0", debug=False, auth=sas_auth, timeout=3000, prefetch=10) partition_1 = uamqp.ReceiveClientAsync(source + "1", debug=False, auth=sas_auth, timeout=3000, prefetch=10) await partition_0.open_async(connection=conn) await partition_1.open_async(connection=conn) tasks = [ partition_0.receive_message_batch_async(1), partition_1.receive_message_batch_async(1) ] try: messages = await asyncio.gather(*tasks) assert len(messages[0]) == 1 and len(messages[1]) == 1 except: raise finally: await partition_0.close_async() await partition_1.close_async() async def receive_ten(partition, receiver): messages = [] count = 0 while count < 10: print("Receiving {} on partition {}".format(count, partition)) batch = await receiver.receive_message_batch_async(1) print("Received {} messages on partition {}".format(len(batch), partition)) messages.extend(batch) count += 1 print("Finished receiving on partition {}".format(partition)) return messages @pytest.mark.asyncio async def test_event_hubs_multiple_receiver_async(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth_a = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) sas_auth_b = authentication.SASTokenAsync.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group']) partition_0 = uamqp.ReceiveClientAsync(source + "0", debug=False, auth=sas_auth_a, timeout=3000, prefetch=10) partition_1 = uamqp.ReceiveClientAsync(source + "1", debug=False, auth=sas_auth_b, timeout=3000, prefetch=10) try: await partition_0.open_async() await partition_1.open_async() tasks = [ receive_ten("0", partition_0), receive_ten("1", partition_1) ] messages = await asyncio.gather(*tasks) assert len(messages) == 2 assert len(messages[0]) >= 10 assert len(messages[1]) >= 10 print(messages) finally: await partition_0.close_async() await partition_1.close_async() if __name__ == '__main__': config = {} config['hostname'] = os.environ['EVENT_HUB_HOSTNAME'] config['event_hub'] = os.environ['EVENT_HUB_NAME'] config['key_name'] = os.environ['EVENT_HUB_SAS_POLICY'] config['access_key'] = os.environ['EVENT_HUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" loop = asyncio.get_event_loop() loop.run_until_complete(test_event_hubs_iter_receive_async(config)) azure-uamqp-python-1.2.6/samples/asynctests/test_azure_event_hubs_send_async.py000066400000000000000000000133321362133436400303500ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import asyncio import pytest import sys import uamqp from uamqp import authentication def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) @pytest.mark.asyncio async def test_event_hubs_client_send_async(live_eventhub_config): properties = {b"SendData": b"Property_String_Value_1"} msg_content = b"hello world" message = uamqp.Message(msg_content, application_properties=properties) plain_auth = authentication.SASLPlain(live_eventhub_config['hostname'], live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClientAsync(target, auth=plain_auth, debug=False) send_client.queue_message(message) results = await send_client.send_all_messages_async() assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] @pytest.mark.asyncio async def test_event_hubs_single_send_async(live_eventhub_config): annotations={b"x-opt-partition-key": b"PartitionKeyInfo"} msg_content = b"hello world" message = uamqp.Message(msg_content, annotations=annotations) uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key(uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClientAsync(target, auth=sas_auth, debug=False) for _ in range(10): message = uamqp.Message(msg_content, application_properties=annotations, annotations=annotations) await send_client.send_message_async(message) await send_client.close_async() @pytest.mark.asyncio async def test_event_hubs_async_sender_sync(live_eventhub_config): annotations={b"x-opt-partition-key": b"PartitionKeyInfo"} msg_content = b"hello world" message = uamqp.Message(msg_content, annotations=annotations) uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key(uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClientAsync(target, auth=sas_auth, debug=False) for _ in range(10): message = uamqp.Message(msg_content, application_properties=annotations, annotations=annotations) send_client.send_message(message) send_client.close() @pytest.mark.asyncio async def test_event_hubs_client_send_multiple_async(live_eventhub_config): properties = {b"SendData": b"Property_String_Value_1"} msg_content = b"hello world" plain_auth = authentication.SASLPlain(live_eventhub_config['hostname'], live_eventhub_config['key_name'], live_eventhub_config['access_key']) assert not plain_auth.consumed target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClientAsync(target, auth=plain_auth, debug=False) messages = [] for i in range(10): messages.append(uamqp.Message(msg_content, application_properties=properties)) send_client.queue_message(*messages) assert len(send_client.pending_messages) == 10 results = await send_client.send_all_messages_async() assert len(results) == 10 assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] assert plain_auth.consumed assert send_client.pending_messages == [] @pytest.mark.asyncio async def test_event_hubs_batch_send_async(live_eventhub_config): for _ in range(10): def data_generator(): for i in range(50): msg_content = "Hello world {}".format(i).encode('utf-8') yield msg_content message_batch = uamqp.message.BatchMessage(data_generator()) uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAsync.from_shared_access_key(uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}/Partitions/0".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClientAsync(target, auth=sas_auth, debug=False) send_client.queue_message(message_batch) results = await send_client.send_all_messages_async() assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] if __name__ == '__main__': config = {} config['hostname'] = os.environ['EVENT_HUB_HOSTNAME'] config['event_hub'] = os.environ['EVENT_HUB_NAME'] config['key_name'] = os.environ['EVENT_HUB_SAS_POLICY'] config['access_key'] = os.environ['EVENT_HUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" loop = asyncio.get_event_loop() loop.run_until_complete(test_event_hubs_single_send_async(config)) azure-uamqp-python-1.2.6/samples/asynctests/test_azure_iothub_cli_extension.py000066400000000000000000000344101362133436400302150ustar00rootroot00000000000000# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- import asyncio import json import sys import os import logging import pytest from base64 import b64encode, b64decode from hashlib import sha256 from hmac import HMAC from time import time from datetime import datetime from uuid import uuid4 import concurrent import uamqp def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger DEBUG = True logger = get_logger(logging.INFO) def _generate_sas_token(uri, policy, key, expiry=None): if not expiry: expiry = time() + 3600 # Default to 1 hour. encoded_uri = quote_plus(uri) ttl = int(expiry) sign_key = '%s\n%d' % (encoded_uri, ttl) signature = b64encode(HMAC(b64decode(key), sign_key.encode('utf-8'), sha256).digest()) result = { 'sr': uri, 'sig': signature, 'se': str(ttl)} if policy: result['skn'] = policy return 'SharedAccessSignature ' + urlencode(result) def _build_iothub_amqp_endpoint_from_target(target): hub_name = target['entity'].split('.')[0] username = "{}@sas.root.{}".format(target['policy'], hub_name) sas_token = _generate_sas_token(target['entity'], target['policy'], target['primarykey'], time() + 360) return username, sas_token def _unicode_binary_map(target): # Assumes no iteritems() result = {} for k in target: key = k if isinstance(k, bytes): key = str(k, 'utf8') if isinstance(target[k], bytes): result[key] = str(target[k], 'utf8') else: result[key] = target[k] return result def _parse_entity(entity, filter_none=False): result = {} attributes = [attr for attr in dir(entity) if not attr.startswith('_')] for attribute in attributes: value = getattr(entity, attribute, None) if filter_none and not value: continue value_behavior = dir(value) if '__call__' not in value_behavior: result[attribute] = value return result def executor(target, consumer_group, enqueued_time, device_id=None, properties=None, timeout=0): coroutines = [] coroutines.append(initiate_event_monitor(target, consumer_group, enqueued_time, device_id, properties, timeout)) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) future = asyncio.gather(*coroutines, loop=loop, return_exceptions=True) result = None try: device_filter_txt = None if device_id: device_filter_txt = ' filtering on device: {},'.format(device_id) def stop_and_suppress_eloop(): try: loop.stop() except Exception: # pylint: disable=broad-except pass print('Starting event monitor,{} use ctrl-c to stop...'.format(device_filter_txt if device_filter_txt else '')) result = loop.run_until_complete(future) except KeyboardInterrupt: print('Stopping event monitor...') remaining_tasks = [t for t in asyncio.Task.all_tasks() if not t.done()] remaining_future = asyncio.gather(*remaining_tasks, loop=loop, return_exceptions=True) try: loop.run_until_complete(asyncio.wait_for(remaining_future, 5)) except concurrent.futures.TimeoutError: print("Timed out before tasks could finish. Shutting down anyway.") print("Finished event monitor shutdown.") finally: if result: error = next(res for res in result if result) if error: logger.error(error) raise RuntimeError(error) async def initiate_event_monitor(target, consumer_group, enqueued_time, device_id=None, properties=None, timeout=0): def _get_conn_props(): properties = {} properties["product"] = "az.cli.iot.extension" properties["framework"] = "Python {}.{}.{}".format(*sys.version_info[0:3]) properties["platform"] = sys.platform return properties if not target.get('events'): endpoint = _build_iothub_amqp_endpoint_from_target(target) _, update = await evaluate_redirect(endpoint) target['events'] = update['events'] auth = _build_auth_container(target) meta_data = await query_meta_data(target['events']['address'], target['events']['path'], auth) partition_count = meta_data[b'partition_count'] partition_ids = [] for i in range(int(partition_count)): partition_ids.append(str(i)) target['events']['partition_ids'] = partition_ids partitions = target['events']['partition_ids'] if not partitions: logger.debug('No Event Hub partitions found to listen on.') return coroutines = [] auth = _build_auth_container(target) async with uamqp.ConnectionAsync(target['events']['endpoint'], sasl=auth, debug=DEBUG, container_id=str(uuid4()), properties=_get_conn_props()) as conn: for p in partitions: coroutines.append(monitor_events(endpoint=target['events']['endpoint'], connection=conn, path=target['events']['path'], auth=auth, partition=p, consumer_group=consumer_group, enqueuedtimeutc=enqueued_time, properties=properties, device_id=device_id, timeout=timeout)) results = await asyncio.gather(*coroutines, return_exceptions=True) logger.warning("Finished all event monitors") logger.warning("Finished initiate_event_monitor") async def monitor_events(endpoint, connection, path, auth, partition, consumer_group, enqueuedtimeutc, properties, device_id=None, timeout=0): source = uamqp.address.Source('amqps://{}/{}/ConsumerGroups/{}/Partitions/{}'.format(endpoint, path, consumer_group, partition)) source.set_filter( bytes('amqp.annotation.x-opt-enqueuedtimeutc > ' + str(enqueuedtimeutc), 'utf8')) def _output_msg_kpi(msg): # TODO: Determine if amqp filters can support boolean operators for multiple conditions origin = str(msg.annotations.get(b'iothub-connection-device-id'), 'utf8') if device_id and origin != device_id: return event_source = {'event': {}} event_source['event']['origin'] = origin event_source['event']['payload'] = str(next(msg.get_data()), 'utf8') if 'anno' in properties or 'all' in properties: event_source['event']['annotations'] = _unicode_binary_map(msg.annotations) if 'sys' in properties or 'all' in properties: if not event_source['event'].get('properties'): event_source['event']['properties'] = {} event_source['event']['properties']['system'] = _unicode_binary_map(_parse_entity(msg.properties, True)) if 'app' in properties or 'all' in properties: if not event_source['event'].get('properties'): event_source['event']['properties'] = {} app_prop = msg.application_properties if msg.application_properties else None if app_prop: event_source['event']['properties']['application'] = _unicode_binary_map(app_prop) exp_cancelled = False receive_client = uamqp.ReceiveClientAsync(source, auth=auth, timeout=timeout, prefetch=0, debug=DEBUG) try: await receive_client.open_async(connection=connection) msg_iter = receive_client.receive_messages_iter_async() async for msg in msg_iter: _output_msg_kpi(msg) except asyncio.CancelledError: exp_cancelled = True await receive_client.close_async() except KeyboardInterrupt: logger.warning("Keyboard interrupt, closing monitor {}.".format(partition)) exp_cancelled = True await receive_client.close_async() raise except uamqp.errors.LinkDetach as ld: if isinstance(ld.description, bytes): ld.description = str(ld.description, 'utf8') raise RuntimeError(ld.description) finally: if not exp_cancelled: await receive_client.close_async() logger.warning("Finished MonitorEvents for partition {}".format(partition)) def _build_auth_container(target): sas_uri = 'sb://{}/{}'.format(target['events']['endpoint'], target['events']['path']) return uamqp.authentication.SASTokenAsync.from_shared_access_key(sas_uri, target['policy'], target['primarykey']) async def evaluate_redirect(endpoint): source = uamqp.address.Source('amqps://{}/messages/events/$management'.format(endpoint)) receive_client = uamqp.ReceiveClientAsync(source, timeout=30000, prefetch=1, debug=DEBUG) try: await receive_client.open_async() await receive_client.receive_message_batch_async(max_batch_size=1) except uamqp.errors.LinkRedirect as redirect: redirect = _unicode_binary_map(_parse_entity(redirect)) result = {} result['events'] = {} result['events']['endpoint'] = redirect['hostname'] result['events']['path'] = redirect['address'].replace('amqps://', '').split('/')[1] result['events']['address'] = redirect['address'] return redirect, result finally: await receive_client.close_async() async def query_meta_data(endpoint, path, auth): source = uamqp.address.Source(endpoint) receive_client = uamqp.ReceiveClientAsync(source, auth=auth, timeout=30000, debug=DEBUG) try: await receive_client.open_async() message = uamqp.Message(application_properties={'name': path}) response = await receive_client.mgmt_request_async( message, b'READ', op_type=b'com.microsoft:eventhub', status_code_field=b'status-code', description_fields=b'status-description', timeout=30000 ) test = response.get_data() return test finally: await receive_client.close_async() def monitor_feedback(target, device_id, wait_on_id=None, token_duration=3600): def handle_msg(msg): payload = next(msg.get_data()) if isinstance(payload, bytes): payload = str(payload, 'utf8') # assume json [] based on spec payload = json.loads(payload) for p in payload: if device_id and p.get('deviceId') and p['deviceId'].lower() != device_id.lower(): return None if wait_on_id: msg_id = p['originalMessageId'] if msg_id == wait_on_id: return msg_id return None operation = '/messages/servicebound/feedback' endpoint = _build_iothub_amqp_endpoint_from_target(target, duration=token_duration) endpoint = endpoint + operation device_filter_txt = None if device_id: device_filter_txt = ' filtering on device: {},'.format(device_id) print('Starting C2D feedback monitor,{} use ctrl-c to stop...'.format(device_filter_txt if device_filter_txt else '')) try: client = uamqp.ReceiveClient('amqps://' + endpoint, debug=DEBUG) message_generator = client.receive_messages_iter() for msg in message_generator: match = handle_msg(msg) if match: logger.info('requested msg id has been matched...') msg.accept() return match except uamqp.errors.AMQPConnectionError: logger.debug('amqp connection has expired...') finally: client.close() def get_target(config): target = {} target['cs'] = 'HostName={};SharedAccessKeyName={};SharedAccessKey={}'.format( config['hostname'], config['key_name'], config['access_key']) target['entity'] = config['hostname'] target['policy'] = config['key_name'] target['primarykey'] = config['access_key'] events = {} events['endpoint'] = config['endpoint'] events['partition_count'] = config.get('partition_count', 4) events['path'] = config['hub_name'] events['partition_ids'] = config.get('partition_ids', ["0", "1", "2"])#, "3", "4", "5", "6", "7", "8", "9", "10"]) target['events'] = events return target def test_iothub_monitor_events(live_iothub_config): properties = [] timeout = 30000 now = datetime.utcnow() epoch = datetime.utcfromtimestamp(0) enqueued_time = int(1000 * (now - epoch).total_seconds()) target = get_target(live_iothub_config) executor(target, consumer_group=live_iothub_config['consumer_group'], enqueued_time=enqueued_time, properties=properties, timeout=timeout, device_id=live_iothub_config['device']) def test_iothub_monitor_feedback(live_iothub_config): pytest.skip("Not yet implemented") def test_iothub_c2d_message_send(live_iothub_config): pytest.skip("Not yet implemented") if __name__ == '__main__': try: config = {} config['hostname'] = os.environ['IOTHUB_HOSTNAME'] config['hub_name'] = os.environ['IOTHUB_HUB_NAME'] config['device'] = os.environ['IOTHUB_DEVICE'] config['endpoint'] = os.environ['IOTHUB_ENDPOINT'] config['key_name'] = os.environ['IOTHUB_SAS_POLICY'] config['access_key'] = os.environ['IOTHUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" except KeyError: pytest.skip("Live IoTHub configuration not found.") else: test_iothub_monitor_events(config)azure-uamqp-python-1.2.6/samples/asynctests/test_azure_iothub_receive_async.py000066400000000000000000000076541362133436400302030ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import asyncio import pytest import sys from base64 import b64encode, b64decode from hashlib import sha256 from hmac import HMAC from time import time from uuid import uuid4 try: from urllib import quote, quote_plus, urlencode #Py2 except Exception: from urllib.parse import quote, quote_plus, urlencode import uamqp from uamqp import authentication, errors, address def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def _generate_sas_token(uri, policy, key, expiry=None): if not expiry: expiry = time() + 3600 # Default to 1 hour. encoded_uri = quote_plus(uri) ttl = int(expiry) sign_key = '%s\n%d' % (encoded_uri, ttl) signature = b64encode(HMAC(b64decode(key), sign_key.encode('utf-8'), sha256).digest()) result = { 'sr': uri, 'sig': signature, 'se': str(ttl)} if policy: result['skn'] = policy return 'SharedAccessSignature ' + urlencode(result) def _build_iothub_amqp_endpoint_from_target(target): hub_name = target['hostname'].split('.')[0] username = "{}@sas.root.{}".format(target['key_name'], hub_name) sas_token = _generate_sas_token(target['hostname'], target['key_name'], target['access_key'], time() + 360) return username, sas_token async def _receive_mesages(conn, source, auth): receive_client = uamqp.ReceiveClientAsync(source, auth=auth, debug=False, timeout=1000, prefetch=1) try: await receive_client.open_async(connection=conn) batch = await receive_client.receive_message_batch_async(max_batch_size=1) except errors.LinkRedirect as redirect: return redirect else: return batch finally: await receive_client.close_async() @pytest.mark.asyncio async def test_iothub_client_receive_async(live_iothub_config): operation = '/messages/events/ConsumerGroups/{}/Partitions/'.format(live_iothub_config['consumer_group']) auth = authentication.SASLPlain( live_iothub_config['hostname'], *_build_iothub_amqp_endpoint_from_target(live_iothub_config)) source = 'amqps://' + live_iothub_config['hostname'] + operation log.info("Source: {}".format(source)) async with uamqp.ConnectionAsync(live_iothub_config['hostname'], auth, debug=False) as conn: tasks = [ _receive_mesages(conn, source + '0', auth), _receive_mesages(conn, source + '1', auth) ] results = await asyncio.gather(*tasks) redirect = results[0] new_auth = authentication.SASLPlain( redirect.hostname, live_iothub_config['key_name'], live_iothub_config['access_key']) await conn.redirect_async(redirect, new_auth) tasks = [] for t in results: tasks.append(_receive_mesages(conn, t.address, auth)) messages = await asyncio.gather(*tasks) if __name__ == '__main__': config = {} config['hostname'] = os.environ['IOTHUB_HOSTNAME'] config['device'] = os.environ['IOTHUB_DEVICE'] config['key_name'] = os.environ['IOTHUB_SAS_POLICY'] config['access_key'] = os.environ['IOTHUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" loop = asyncio.get_event_loop() loop.run_until_complete(test_iothub_client_receive_async(config)) azure-uamqp-python-1.2.6/samples/asynctests/test_azure_iothub_send_async.py000066400000000000000000000061701362133436400275020ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import asyncio import pytest import sys from base64 import b64encode, b64decode from hashlib import sha256 from hmac import HMAC from time import time from uuid import uuid4 try: from urllib import quote, quote_plus, urlencode #Py2 except Exception: from urllib.parse import quote, quote_plus, urlencode import uamqp def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def _generate_sas_token(uri, policy, key, expiry=None): if not expiry: expiry = time() + 3600 # Default to 1 hour. encoded_uri = quote_plus(uri) ttl = int(expiry) sign_key = '%s\n%d' % (encoded_uri, ttl) signature = b64encode(HMAC(b64decode(key), sign_key.encode('utf-8'), sha256).digest()) result = { 'sr': uri, 'sig': signature, 'se': str(ttl)} if policy: result['skn'] = policy return 'SharedAccessSignature ' + urlencode(result) def _build_iothub_amqp_endpoint_from_target(target): hub_name = target['hostname'].split('.')[0] endpoint = "{}@sas.root.{}".format(target['key_name'], hub_name) endpoint = quote_plus(endpoint) sas_token = _generate_sas_token(target['hostname'], target['key_name'], target['access_key'], time() + 360) endpoint = endpoint + ":{}@{}".format(quote_plus(sas_token), target['hostname']) return endpoint @pytest.mark.asyncio async def test_iot_hub_send_async(live_iothub_config): msg_content = b"hello world" msg_props = uamqp.message.MessageProperties() msg_props.to = '/devices/{}/messages/devicebound'.format(live_iothub_config['device']) msg_props.message_id = str(uuid4()) message = uamqp.Message(msg_content, properties=msg_props) operation = '/messages/devicebound' endpoint = _build_iothub_amqp_endpoint_from_target(live_iothub_config) target = 'amqps://' + endpoint + operation log.info("Target: {}".format(target)) send_client = uamqp.SendClientAsync(target, debug=False) send_client.queue_message(message) results = await send_client.send_all_messages_async() assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] if __name__ == '__main__': config = {} config['hostname'] = os.environ['IOTHUB_HOSTNAME'] config['device'] = os.environ['IOTHUB_DEVICE'] config['key_name'] = os.environ['IOTHUB_SAS_POLICY'] config['access_key'] = os.environ['IOTHUB_SAS_KEY'] loop = asyncio.get_event_loop() loop.run_until_complete(test_iot_hub_send_async(config))azure-uamqp-python-1.2.6/samples/conftest.py000066400000000000000000000041021362133436400211530ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import pytest import sys # Ignore async tests for Python < 3.5 collect_ignore = [] if sys.version_info < (3, 5): collect_ignore.append("asynctests") @pytest.fixture() def live_eventhub_config(): try: config = {} config['hostname'] = os.environ['EVENT_HUB_HOSTNAME'] config['event_hub'] = os.environ['EVENT_HUB_NAME'] config['key_name'] = os.environ['EVENT_HUB_SAS_POLICY'] config['access_key'] = os.environ['EVENT_HUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" except KeyError: pytest.skip("Live EventHub configuration not found.") else: if not all(config.values()): pytest.skip("Live EventHub configuration empty.") return config @pytest.fixture() def live_iothub_config(): try: config = {} config['hostname'] = os.environ['IOTHUB_HOSTNAME'] config['hub_name'] = os.environ['IOTHUB_HUB_NAME'] config['device'] = os.environ['IOTHUB_DEVICE'] config['endpoint'] = os.environ['IOTHUB_ENDPOINT'] config['key_name'] = os.environ['IOTHUB_SAS_POLICY'] config['access_key'] = os.environ['IOTHUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" except KeyError: pytest.skip("Live IoTHub configuration not found.") else: if not all(config.values()): pytest.skip("Live IoTHub configuration empty.") return config @pytest.fixture() def rabbit_mq_config(): try: config = {} config['hostname'] = os.environ['RABBITMQ_HOSTNAME'] config['path'] = os.environ['RABBITMQ_PATH'] except KeyError: pytest.skip("Live RabbitMQ configuration not found.") else: return config azure-uamqp-python-1.2.6/samples/sample_uamqp_receive_simple.py000066400000000000000000000016221362133436400250710ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import uamqp from uamqp import authentication uri = os.environ.get("AMQP_SERVICE_URI") key_name = os.environ.get("AMQP_SERVICE_KEY_NAME") access_key = os.environ.get("AMQP_SERVICE_ACCESS_KEY") def uamqp_receive_simple(): parsed_uri = urlparse(uri) plain_auth = authentication.SASLPlain(parsed_uri.hostname, key_name, access_key) message = uamqp.receive_message(uri, auth=plain_auth) print("Received: {}".format(message)) if __name__ == "__main__": uamqp_receive_simple() azure-uamqp-python-1.2.6/samples/sample_uamqp_send_simple.py000066400000000000000000000016361362133436400244050ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os try: from urlparse import urlparse except ImportError: from urllib.parse import urlparse import uamqp from uamqp import authentication uri = os.environ.get("AMQP_SERVICE_URI") key_name = os.environ.get("AMQP_SERVICE_KEY_NAME") access_key = os.environ.get("AMQP_SERVICE_ACCESS_KEY") def uamqp_send_simple(): msg_content = b"Hello world" parsed_uri = urlparse(uri) plain_auth = authentication.SASLPlain(parsed_uri.hostname, key_name, access_key) uamqp.send_message(uri, msg_content, auth=plain_auth) print("Message sent!") if __name__ == "__main__": uamqp_send_simple() azure-uamqp-python-1.2.6/samples/test_azure_event_hubs_mgmt_op.py000066400000000000000000000024331362133436400254640ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import sys import uamqp from uamqp import authentication def test_event_hubs_mgmt_op(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) with uamqp.AMQPClient(target, auth=sas_auth, debug=False) as send_client: mgmt_msg = uamqp.Message(application_properties={'name': live_eventhub_config['event_hub']}) response = send_client.mgmt_request( mgmt_msg, b'READ', op_type=b'com.microsoft:eventhub', status_code_field=b'status-code', description_fields=b'status-description') output = response.get_data() assert output[b'partition_ids'] == [b"0", b"1"] azure-uamqp-python-1.2.6/samples/test_azure_event_hubs_receive.py000066400000000000000000000334161362133436400254510ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import logging import os import pytest import sys try: from urllib import quote_plus #Py2 except Exception: from urllib.parse import quote_plus import uamqp from uamqp import address, types, utils, authentication def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def get_plain_auth(config): return authentication.SASLPlain( config['hostname'], config['key_name'], config['access_key']) def send_single_message(live_eventhub_config, partition, msg_content): target = "amqps://{}/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], partition ) uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) uamqp.send_message(target, msg_content, auth=sas_auth, debug=False) def test_event_hubs_simple_receive(live_eventhub_config): source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) msg_content = b"Hello world" target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) result = uamqp.send_message(target, msg_content, auth=get_plain_auth(live_eventhub_config)) message = uamqp.receive_message(source, auth=get_plain_auth(live_eventhub_config), timeout=10000) assert message log.info("Received: {}".format(message.get_data())) def test_event_hubs_simple_batch_receive(live_eventhub_config): source = "amqps://{}:{}@{}/{}/ConsumerGroups/{}/Partitions/{}".format( quote_plus(live_eventhub_config['key_name']), quote_plus(live_eventhub_config['access_key']), live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) messages = uamqp.receive_messages(source, max_batch_size=10) assert len(messages) <= 10 message = uamqp.receive_messages(source, max_batch_size=1) assert len(message) == 1 def test_event_hubs_single_batch_receive(live_eventhub_config): plain_auth = authentication.SASLPlain( live_eventhub_config['hostname'], live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) message = uamqp.receive_messages(source, auth=plain_auth, timeout=5000) assert len(message) <= 300 def test_event_hubs_client_web_socket(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key'], transport_type=uamqp.TransportType.AmqpOverWebsocket) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) with uamqp.ReceiveClient(source, auth=sas_auth, debug=False, timeout=5000, prefetch=50) as receive_client: receive_client.receive_message_batch(max_batch_size=10) def test_event_hubs_client_proxy_settings(live_eventhub_config): pytest.skip("skipping the test in CI due to no proxy server") proxy_settings={'proxy_hostname': '127.0.0.1', 'proxy_port': 12345} uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key'], http_proxy=proxy_settings) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) with uamqp.ReceiveClient(source, auth=sas_auth, debug=False, timeout=5000, prefetch=50) as receive_client: receive_client.receive_message_batch(max_batch_size=10) def test_event_hubs_client_receive_sync(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) with uamqp.ReceiveClient(source, auth=sas_auth, debug=False, timeout=5000, prefetch=50) as receive_client: log.info("Created client, receiving...") with pytest.raises(ValueError): batch = receive_client.receive_message_batch(max_batch_size=100) batch = receive_client.receive_message_batch(max_batch_size=10) while batch: log.info("Got batch: {}".format(len(batch))) assert len(batch) <= 10 for message in batch: annotations = message.annotations log.info("Sequence Number: {}, Delivery tag: {}".format( annotations.get(b'x-opt-sequence-number'), message.delivery_tag)) batch = receive_client.receive_message_batch(max_batch_size=10) log.info("Finished receiving") def test_event_hubs_client_receive_with_runtime_metric_sync(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) receiver_runtime_metric_symbol = b'com.microsoft:enable-receiver-runtime-metric' symbol_array = [types.AMQPSymbol(receiver_runtime_metric_symbol)] desired_capabilities = utils.data_factory(types.AMQPArray(symbol_array)) with uamqp.ReceiveClient(source, auth=sas_auth, debug=False, timeout=50, prefetch=50, desired_capabilities=desired_capabilities) as receive_client: log.info("Created client, receiving...") with pytest.raises(ValueError): batch = receive_client.receive_message_batch(max_batch_size=100) batch = receive_client.receive_message_batch(max_batch_size=10) log.info("Got batch: {}".format(len(batch))) assert len(batch) <= 10 for message in batch: annotations = message.annotations delivery_annotations = message.delivery_annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) assert b'last_enqueued_sequence_number' in delivery_annotations assert b'last_enqueued_offset' in delivery_annotations assert b'last_enqueued_time_utc' in delivery_annotations assert b'runtime_info_retrieval_time_utc' in delivery_annotations log.info("Finished receiving") def test_event_hubs_callback_receive_sync(live_eventhub_config): def on_message_received(message): annotations = message.annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) log.info(str(message)) message.accept() uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) receive_client = uamqp.ReceiveClient(source, auth=sas_auth, timeout=1000, debug=False) log.info("Created client, receiving...") receive_client.receive_messages(on_message_received) log.info("Finished receiving") def test_event_hubs_iter_receive_sync(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) receive_client = uamqp.ReceiveClient(source, auth=sas_auth, timeout=1000, debug=False, prefetch=10) count = 0 gen = receive_client.receive_messages_iter() for message in gen: log.info(message.annotations.get(b'x-opt-sequence-number')) log.info(str(message)) count += 1 if count >= 10: log.info("Got {} messages. Breaking.".format(count)) message.accept() break count = 0 for message in gen: count += 1 if count >= 10: log.info("Got {} more messages. Shutting down.".format(count)) message.accept() break receive_client.close() def test_event_hubs_shared_connection(live_eventhub_config): uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) source = "amqps://{}/{}/ConsumerGroups/{}/Partitions/".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group']) send_single_message(live_eventhub_config, "0", "Message") send_single_message(live_eventhub_config, "1", "Message") with uamqp.Connection(live_eventhub_config['hostname'], sas_auth, debug=False) as conn: partition_0 = uamqp.ReceiveClient(source + "0", debug=False, auth=sas_auth, timeout=3000, prefetch=10) partition_1 = uamqp.ReceiveClient(source + "1", debug=False, auth=sas_auth, timeout=3000, prefetch=10) partition_0.open(connection=conn) partition_1.open(connection=conn) try: messages_0 = partition_0.receive_message_batch(1) messages_1 = partition_1.receive_message_batch(1) assert len(messages_0) == 1 and len(messages_1) == 1 except: raise finally: partition_0.close() partition_1.close() def test_event_hubs_filter_receive(live_eventhub_config): plain_auth = authentication.SASLPlain( live_eventhub_config['hostname'], live_eventhub_config['key_name'], live_eventhub_config['access_key']) source_url = "amqps://{}/{}/ConsumerGroups/{}/Partitions/{}".format( live_eventhub_config['hostname'], live_eventhub_config['event_hub'], live_eventhub_config['consumer_group'], live_eventhub_config['partition']) source = address.Source(source_url) source.set_filter(b"amqp.annotation.x-opt-sequence-number > 1500") with uamqp.ReceiveClient(source, auth=plain_auth, timeout=5000, prefetch=50) as receive_client: log.info("Created client, receiving...") batch = receive_client.receive_message_batch(max_batch_size=10) while batch: for message in batch: annotations = message.annotations log.info("Partition Key: {}".format(annotations.get(b'x-opt-partition-key'))) log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) log.info("Offset: {}".format(annotations.get(b'x-opt-offset'))) log.info("Enqueued Time: {}".format(annotations.get(b'x-opt-enqueued-time'))) log.info("Message format: {}".format(message._message.message_format)) log.info("{}".format(list(message.get_data()))) batch = receive_client.receive_message_batch(max_batch_size=10) log.info("Finished receiving") if __name__ == '__main__': config = {} config['hostname'] = os.environ['EVENT_HUB_HOSTNAME'] config['event_hub'] = os.environ['EVENT_HUB_NAME'] config['key_name'] = os.environ['EVENT_HUB_SAS_POLICY'] config['access_key'] = os.environ['EVENT_HUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" test_event_hubs_client_receive_sync(config) azure-uamqp-python-1.2.6/samples/test_azure_event_hubs_send.py000066400000000000000000000160501362133436400247530ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import sys import uamqp from uamqp import authentication def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def test_event_hubs_simple_send(live_eventhub_config): msg_content = b"Hello world" uri = "sb://{}/{}".format(live_eventhub_config['hostname'],live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) result = uamqp.send_message(target, msg_content, auth=sas_auth, debug=False) assert result == [uamqp.constants.MessageState.SendComplete] def test_event_hubs_client_send_sync(live_eventhub_config): annotations={b"x-opt-partition-key": b"PartitionKeyInfo"} uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClient(target, auth=sas_auth, debug=False) for _ in range(10): header = uamqp.message.MessageHeader() header.durable = True assert header.get_header_obj() props = uamqp.message.MessageProperties(message_id=b"message id", subject="test_subject") assert props.get_properties_obj() msg_content = b"hello world" message = uamqp.Message( msg_content, properties=props, header=header, application_properties=annotations, annotations=annotations) assert message.get_message_encoded_size() == 147 assert message.encode_message() == b'\x00Sp\xc0\x02\x01A\x00Sr\xc1(\x02\xa1\x13x-opt-partition-key\xa1\x10PartitionKeyInfo\x00Ss\xc0\x1d\x04\xa1\nmessage id@@\xa1\x0ctest_subject\x00St\xc1(\x02\xa1\x13x-opt-partition-key\xa1\x10PartitionKeyInfo\x00Su\xa0\x0bhello world' send_client.queue_message(message) results = send_client.send_all_messages(close_on_done=False) assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] send_client.close() def test_event_hubs_client_send_multiple_sync(live_eventhub_config): annotations={b"x-opt-partition-key": b"PartitionKeyInfo"} uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) assert not sas_auth.consumed target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClient(target, auth=sas_auth, debug=False) messages = [] for _ in range(10): header = uamqp.message.MessageHeader() header.durable = True header.delivery_count = 5 header.time_to_live = 500000 header.first_acquirer = True header.priority = 3 assert header.get_header_obj() props = uamqp.message.MessageProperties( message_id=b"message id", user_id="user_id", to="to", subject="test", reply_to="reply_to", correlation_id="correlation_id", content_type="content_type", content_encoding="content_encoding", creation_time=12345, absolute_expiry_time=12345, group_id="group_id", group_sequence=1234, reply_to_group_id="reply_to_group_id") assert props.get_properties_obj() msg_content = b"hello world" message = uamqp.Message( msg_content, properties=props, header=header, application_properties=annotations, annotations=annotations) messages.append(message) send_client.queue_message(*messages) assert len(send_client.pending_messages) == 10 results = send_client.send_all_messages() assert len(results) == 10 assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] assert sas_auth.consumed assert send_client.pending_messages == [] def test_event_hubs_single_send_sync(live_eventhub_config): annotations={b"x-opt-partition-key": b"PartitionKeyInfo"} msg_content = b"hello world" uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClient(target, auth=sas_auth, debug=False) for _ in range(10): message = uamqp.Message(msg_content, application_properties=annotations, annotations=annotations) send_client.send_message(message) send_client.close() def test_event_hubs_batch_send_sync(live_eventhub_config): def data_generator(): for i in range(50): msg_content = "Hello world {}".format(i).encode('utf-8') yield msg_content uri = "sb://{}/{}".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) sas_auth = authentication.SASTokenAuth.from_shared_access_key( uri, live_eventhub_config['key_name'], live_eventhub_config['access_key']) target = "amqps://{}/{}/Partitions/0".format(live_eventhub_config['hostname'], live_eventhub_config['event_hub']) send_client = uamqp.SendClient(target, auth=sas_auth, debug=False) for _ in range(10): message_batch = uamqp.message.BatchMessage(data_generator()) send_client.queue_message(message_batch) results = send_client.send_all_messages(close_on_done=False) assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] send_client.close() if __name__ == '__main__': config = {} config['hostname'] = os.environ['EVENT_HUB_HOSTNAME'] config['event_hub'] = os.environ['EVENT_HUB_NAME'] config['key_name'] = os.environ['EVENT_HUB_SAS_POLICY'] config['access_key'] = os.environ['EVENT_HUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" test_event_hubs_client_send_multiple_sync(config) azure-uamqp-python-1.2.6/samples/test_azure_iothub_receive.py000066400000000000000000000117111362133436400245730ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import sys from base64 import b64encode, b64decode from hashlib import sha256 from hmac import HMAC from time import time try: from urllib import quote, quote_plus, urlencode #Py2 except Exception: from urllib.parse import quote, quote_plus, urlencode import uamqp from uamqp import utils, errors from uamqp import authentication ### IotHub CLI Extension SAS token implementation class SasTokenAuthentication(): """ Shared Access Signature authorization for Azure IoT Hub. Args: uri (str): Uri of target resource. shared_access_policy_name (str): Name of shared access policy. shared_access_key (str): Shared access key. expiry (int): Expiry of the token to be generated. Input should be seconds since the epoch, in UTC. Default is an hour later from now. """ def __init__(self, uri, shared_access_policy_name, shared_access_key, expiry=None): self.uri = uri self.policy = shared_access_policy_name self.key = shared_access_key if expiry is None: self.expiry = time() + 3600 # Default expiry is an hour later else: self.expiry = expiry def generate_sas_token(self): """ Create a shared access signiture token as a string literal. Returns: result (str): SAS token as string literal. """ encoded_uri = quote_plus(self.uri) ttl = int(self.expiry) sign_key = '%s\n%d' % (encoded_uri, ttl) signature = b64encode(HMAC(b64decode(self.key), sign_key.encode('utf-8'), sha256).digest()) result = { 'sr': self.uri, 'sig': signature, 'se': str(ttl) } if self.policy: result['skn'] = self.policy return 'SharedAccessSignature ' + urlencode(result) def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def _build_iothub_amqp_endpoint_from_target(target): hub_name = target['hostname'].split('.')[0] endpoint = "{}@sas.root.{}".format(target['key_name'], hub_name) endpoint = quote_plus(endpoint) sas_token = SasTokenAuthentication(target['hostname'], target['key_name'], target['access_key'], time() + 360).generate_sas_token() endpoint = endpoint + ":{}@{}".format(quote_plus(sas_token), target['hostname']) return endpoint def _receive_message(receive_client, target): try: batch = receive_client.receive_message_batch(max_batch_size=10) except errors.LinkRedirect as redirect: new_auth = authentication.SASLPlain(redirect.hostname, target['key_name'], target['access_key']) #new_auth = authentication.SASTokenAuth.from_shared_access_key(redirect.address.decode('utf-8'), target['key_name'], target['access_key']) receive_client.redirect(redirect, new_auth) batch = receive_client.receive_message_batch(max_batch_size=10) while batch: log.info("Got batch: {}".format(len(batch))) assert len(batch) <= 10 for message in batch: annotations = message.annotations log.info("Sequence Number: {}".format(annotations.get(b'x-opt-sequence-number'))) batch = receive_client.receive_message_batch(max_batch_size=10) def test_iothub_client_receive_sync(live_iothub_config): operation = '/messages/events/ConsumerGroups/{}/Partitions/{}'.format( live_iothub_config['consumer_group'], live_iothub_config['partition']) endpoint = _build_iothub_amqp_endpoint_from_target(live_iothub_config) source = 'amqps://' + endpoint + operation log.info("Source: {}".format(source)) receive_client = uamqp.ReceiveClient(source, debug=False, timeout=5000, prefetch=50) try: log.info("Created client, receiving...") _receive_message(receive_client, live_iothub_config) except Exception as e: print(e) raise finally: receive_client.close() log.info("Finished receiving") if __name__ == '__main__': config = {} config['hostname'] = os.environ['IOTHUB_HOSTNAME'] config['device'] = os.environ['IOTHUB_DEVICE'] config['key_name'] = os.environ['IOTHUB_SAS_POLICY'] config['access_key'] = os.environ['IOTHUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" test_iothub_client_receive_sync(config) azure-uamqp-python-1.2.6/samples/test_azure_iothub_receive2.py000066400000000000000000000070771362133436400246670ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import sys from base64 import b64encode, b64decode from hashlib import sha256 from hmac import HMAC from time import time try: from urllib import quote, quote_plus, urlencode #Py2 except Exception: from urllib.parse import quote, quote_plus, urlencode import uamqp from uamqp import utils, errors from uamqp import authentication def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def _generate_sas_token(uri, policy, key, expiry=None): if not expiry: expiry = time() + 3600 # Default to 1 hour. encoded_uri = quote_plus(uri) ttl = int(expiry) sign_key = '%s\n%d' % (encoded_uri, ttl) signature = b64encode(HMAC(b64decode(key), sign_key.encode('utf-8'), sha256).digest()) result = { 'sr': uri, 'sig': signature, 'se': str(ttl)} if policy: result['skn'] = policy return 'SharedAccessSignature ' + urlencode(result) def _build_iothub_amqp_endpoint_from_target(target): hub_name = target['hostname'].split('.')[0] username = "{}@sas.root.{}".format(target['key_name'], hub_name) sas_token = _generate_sas_token(target['hostname'], target['key_name'], target['access_key'], time() + 360) return username, sas_token def _receive_message(conn, source, auth): batch = [] receive_client = uamqp.ReceiveClient(source, auth=auth, debug=False, timeout=5000, prefetch=50) try: receive_client.open(connection=conn) batch = receive_client.receive_message_batch(max_batch_size=10) except errors.LinkRedirect as redirect: return redirect finally: receive_client.close() return batch def test_iothub_client_receive_sync(live_iothub_config): operation = '/messages/events/ConsumerGroups/{}/Partitions/{}'.format( live_iothub_config['consumer_group'], live_iothub_config['partition']) auth = authentication.SASLPlain( live_iothub_config['hostname'], *_build_iothub_amqp_endpoint_from_target(live_iothub_config)) source = 'amqps://' + live_iothub_config['hostname'] + operation log.info("Source: {}".format(source)) with uamqp.Connection(live_iothub_config['hostname'], auth, debug=False) as conn: result = _receive_message(conn, source, auth) new_auth = authentication.SASLPlain( result.hostname, live_iothub_config['key_name'], live_iothub_config['access_key']) conn.redirect(result, new_auth) result = _receive_message(conn, result.address, new_auth) log.info("Finished receiving") if __name__ == '__main__': config = {} config['hostname'] = os.environ['IOTHUB_HOSTNAME'] config['device'] = os.environ['IOTHUB_DEVICE'] config['key_name'] = os.environ['IOTHUB_SAS_POLICY'] config['access_key'] = os.environ['IOTHUB_SAS_KEY'] config['consumer_group'] = "$Default" config['partition'] = "0" test_iothub_client_receive_sync(config) azure-uamqp-python-1.2.6/samples/test_azure_iothub_send.py000066400000000000000000000062171362133436400241070ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import sys from base64 import b64encode, b64decode from hashlib import sha256 from hmac import HMAC from time import time from uuid import uuid4 try: from urllib import quote, quote_plus, urlencode #Py2 except Exception: from urllib.parse import quote, quote_plus, urlencode import uamqp from uamqp import utils, errors def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def _generate_sas_token(uri, policy, key, expiry=None): if not expiry: expiry = time() + 3600 # Default to 1 hour. encoded_uri = quote_plus(uri) ttl = int(expiry) sign_key = '%s\n%d' % (encoded_uri, ttl) signature = b64encode(HMAC(b64decode(key), sign_key.encode('utf-8'), sha256).digest()) result = { 'sr': uri, 'sig': signature, 'se': str(ttl)} if policy: result['skn'] = policy return 'SharedAccessSignature ' + urlencode(result) def _build_iothub_amqp_endpoint_from_target(target): hub_name = target['hostname'].split('.')[0] endpoint = "{}@sas.root.{}".format(target['key_name'], hub_name) endpoint = quote_plus(endpoint) sas_token = _generate_sas_token(target['hostname'], target['key_name'], target['access_key'], time() + 360) endpoint = endpoint + ":{}@{}".format(quote_plus(sas_token), target['hostname']) return endpoint def test_iot_hub_send(live_iothub_config): msg_content = b"hello world" app_properties = {"test_prop_1": "value", "test_prop_2": "X"} msg_props = uamqp.message.MessageProperties() msg_props.to = '/devices/{}/messages/devicebound'.format(live_iothub_config['device']) msg_props.message_id = str(uuid4()) message = uamqp.Message(msg_content, properties=msg_props, application_properties=app_properties) operation = '/messages/devicebound' endpoint = _build_iothub_amqp_endpoint_from_target(live_iothub_config) target = 'amqps://' + endpoint + operation log.info("Target: {}".format(target)) send_client = uamqp.SendClient(target, debug=False) send_client.queue_message(message) results = send_client.send_all_messages() assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] log.info("Message sent.") if __name__ == '__main__': config = {} config['hostname'] = os.environ['IOTHUB_HOSTNAME'] config['device'] = os.environ['IOTHUB_DEVICE'] config['key_name'] = os.environ['IOTHUB_SAS_POLICY'] config['access_key'] = os.environ['IOTHUB_SAS_KEY'] test_iot_hub_send(config) azure-uamqp-python-1.2.6/samples/test_rabbitmq_send.py000066400000000000000000000032031362133436400232000ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import logging import sys import datetime import uuid import pytest import uamqp from uamqp import authentication def get_logger(level): uamqp_logger = logging.getLogger("uamqp") if not uamqp_logger.handlers: handler = logging.StreamHandler(stream=sys.stdout) handler.setFormatter(logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')) uamqp_logger.addHandler(handler) uamqp_logger.setLevel(level) return uamqp_logger log = get_logger(logging.INFO) def test_rabbitmq_client_send_sync(rabbit_mq_config): pytest.skip("Not working yet") uri = "amqp://{}/{}/".format(rabbit_mq_config['hostname'], rabbit_mq_config['path']) sas_auth = uamqp.authentication.SASLAnonymous(hostname=rabbit_mq_config['hostname'], port=5672) send_client = uamqp.SendClient(uri, auth=sas_auth, debug=False) try: message = uamqp.Message("content") send_client.queue_message(message) results = send_client.send_all_messages(close_on_done=False) assert not [m for m in results if m == uamqp.constants.MessageState.SendFailed] finally: send_client.close() if __name__ == '__main__': config = {} config['hostname'] = os.environ['RABBITMQ_HOSTNAME'] config['path'] = os.environ['RABBITMQ_PATH'] test_rabbitmq_client_send_sync(config) azure-uamqp-python-1.2.6/setup.py000066400000000000000000000316511362133436400170330ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import os import sys import re import distutils import subprocess import platform from setuptools import find_packages, monkey, setup, Extension from setuptools.command.build_ext import build_ext as build_ext_orig from distutils.extension import Extension from distutils.version import LooseVersion from distutils import log as logger try: from Cython.Build import cythonize USE_CYTHON = True except ImportError: USE_CYTHON = False # If the C file doesn't exist and no Cython is available, die if not os.path.exists("uamqp/c_uamqp.c") and not USE_CYTHON: raise ValueError("You need to install cython==0.27.3 in order to execute this setup.py if 'uamqp/c_uamqp.c' does not exists") is_27 = sys.version_info < (3,) is_x64 = platform.architecture()[0] == '64bit' is_win = sys.platform.startswith('win') is_mac = sys.platform.startswith('darwin') rebuild_pyx = os.environ.get('UAMQP_REBUILD_PYX', False) use_openssl = not (is_win or is_mac) # use_openssl = os.environ.get('UAMQP_USE_OPENSSL', not (is_win or is_mac)) supress_link_flags = os.environ.get("UAMQP_SUPPRESS_LINK_FLAGS", False) # Version extraction inspired from 'requests' with open(os.path.join('uamqp', '__init__.py'), 'r') as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) cwd = os.path.abspath('.') # Headers pxd_inc_dir = os.path.join(cwd, "src", "vendor", "inc") sys.path.insert(0, pxd_inc_dir) include_dirs = [ pxd_inc_dir, # azure-c-shared-utility inc "./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/inc", "./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc", # azure-uamqp-c inc "./src/vendor/azure-uamqp-c/inc", ] if is_win: include_dirs.append("./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/windows") if is_27: include_dirs.append("./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility/windowsce") else: include_dirs.append("./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/linux") # Build unique source pyx def create_cython_file(): content_includes = "" for f in os.listdir("./src"): if f.endswith(".pyx"): print("Adding {}".format(f)) content_includes += "include \"src/" + f + "\"\n" c_uamqp_src = os.path.join("uamqp", "c_uamqp.pyx") with open(c_uamqp_src, 'w') as lib_file: lib_file.write(content_includes) return c_uamqp_src def get_build_env(): build_env = os.environ.copy() return {k.upper(): v for k, v in build_env.items()} def is_msvc_9_for_python_compiler(): return is_win and is_27 and os.path.exists("C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for Python\\9.0") def get_generator_flags(): flags = ["-G"] if is_msvc_9_for_python_compiler(): flags.append("\"NMake Makefiles\"") elif is_win: flags.append("\"Visual Studio 9 2008\"" if is_27 else "\"Visual Studio 15 2017\"") flags.append("-A") flags.append("x64" if is_x64 else "Win32") else: flags.append("\"Unix Makefiles\"") return " ".join(flags) def get_latest_windows_sdk(): """The Windows SDK that ships with VC++ 9.0 is not new enough to include schannel support. So we need to check the OS to see if a newer Windows SDK is available to link to. This is only run on Windows if using Python 2.7. """ from _winreg import ConnectRegistry, OpenKey, EnumKey, QueryValueEx, HKEY_LOCAL_MACHINE installed_sdks = {} key_path = "SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows" if is_x64 else \ "SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows" try: with ConnectRegistry(None, HKEY_LOCAL_MACHINE) as hklm: with OpenKey(hklm, key_path) as handler: for i in range(1024): try: asubkey_name=EnumKey(handler, i) with OpenKey(handler, asubkey_name) as asubkey: location = QueryValueEx(asubkey, "InstallationFolder") if not location or not os.path.isdir(location[0]): continue version = QueryValueEx(asubkey, "ProductVersion") if not version: continue installed_sdks[version[0].lstrip('v')] = location[0] logger.info("Found Windows SDK %s at %s" % (version[0], location[0])) except EnvironmentError: break except EnvironmentError: print("Warning - build may fail: No Windows SDK found.") return [] installed_versions = sorted([LooseVersion(k) for k in installed_sdks.keys()]) if installed_versions[-1] < LooseVersion("8.1"): print("Warning - build may fail: Cannot find Windows SDK 8.1 or greater.") return [] latest_sdk_version = installed_versions[-1].vstring logger.info("Selecting Windows SDK v%s" % latest_sdk_version) lib_path = os.path.join(installed_sdks[latest_sdk_version], "lib") libs_dirs = [d for d in os.listdir(lib_path) if os.path.isdir(os.path.join(lib_path, d, "um"))] if not libs_dirs: print("Warning - build may fail: No Windows SDK libraries found.") return [] logger.info("Found SDK libraries %s in Windows SDK v%s" % (", ".join(libs_dirs), latest_sdk_version)) latest_libs_dir = max([LooseVersion(d) for d in libs_dirs]).vstring logger.info("Selecting SDK libraries %s" % latest_libs_dir) platform_libs_path = os.path.join(lib_path, latest_libs_dir, "um", 'x64' if is_x64 else 'x86') if not os.path.isdir(platform_libs_path): print("Warning - build may fail: Windows SDK v{} libraries {} not found at path {}.".format( latest_sdk_version, latest_libs_dir, platform_libs_path)) else: print("Adding Windows SDK v{} libraries {} to search path, installed at {}".format( latest_sdk_version, latest_libs_dir, platform_libs_path)) return [platform_libs_path] def get_msvc_env(vc_ver): arch = "amd64" if is_x64 else "x86" msvc_env = distutils.msvc9compiler.query_vcvarsall(vc_ver, arch) return {str(k.upper()): str(v) for k, v in msvc_env.items()} # Compile uamqp # Inspired by https://stackoverflow.com/a/48015772/4074838 class UAMQPExtension(Extension): def __init__(self, name): # don't invoke the original build_ext for this special extension Extension.__init__(self, name, sources=[]) def create_folder_no_exception(foldername): try: os.makedirs(foldername) except Exception: # Assume it's already there, and not impossible to create pass class build_ext(build_ext_orig): def run(self): monkey.patch_all() cmake_build_dir = None for ext in self.extensions: if isinstance(ext, UAMQPExtension): self.build_cmake(ext) # Now I have built in ext.cmake_build_dir cmake_build_dir = self.cmake_build_dir else: ext.library_dirs += [ cmake_build_dir, cmake_build_dir + "/deps/azure-c-shared-utility/", cmake_build_dir + "/Debug/", cmake_build_dir + "/Release/", cmake_build_dir + "/deps/azure-c-shared-utility/Debug/", cmake_build_dir + "/deps/azure-c-shared-utility/Release/" ] if is_win and is_27: ext.library_dirs.extend([lib for lib in get_msvc_env(9.0)['LIB'].split(';') if lib]) ext.library_dirs.extend(get_latest_windows_sdk()) build_ext_orig.run(self) def build_cmake(self, ext): cwd = os.getcwd() # these dirs will be created in build_py, so if you don't have # any python sources to bundle, the dirs will be missing self.cmake_build_dir = self.build_temp + "/cmake" create_folder_no_exception(self.cmake_build_dir) extdir = self.get_ext_fullpath(ext.name) create_folder_no_exception(extdir) logger.info("will build uamqp in %s", self.cmake_build_dir) os.chdir(cwd + "/" + self.cmake_build_dir) generator_flags = get_generator_flags() logger.info("Building with generator flags: {}".format(generator_flags)) build_env = get_build_env() if is_msvc_9_for_python_compiler(): logger.info("Configuring environment for Microsoft Visual C++ Compiler for Python 2.7") build_env.update(get_msvc_env(9.0)) # Configure configure_command = [ "cmake", cwd + "/src/vendor/azure-uamqp-c/", generator_flags, "-Duse_openssl:bool={}".format("ON" if use_openssl else "OFF"), "-Duse_default_uuid:bool=ON ", # Should we use libuuid in the system or light one? "-Duse_builtin_httpapi:bool=ON ", # Should we use libcurl in the system or light one? "-Dskip_samples:bool=ON", # Don't compile uAMQP samples binaries "-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE", # ask for -fPIC "-DCMAKE_BUILD_TYPE=Release" ] joined_cmd = " ".join(configure_command) logger.info("calling %s", joined_cmd) subprocess.check_call(joined_cmd, shell=True, universal_newlines=True, env=build_env) compile_command = ["cmake", "--build", ".", "--config", "Release"] joined_cmd = " ".join(compile_command) logger.info("calling %s", joined_cmd) subprocess.check_call(joined_cmd, shell=True, universal_newlines=True, env=build_env) os.chdir(cwd) if USE_CYTHON: create_cython_file() # Libraries and extra compile args kwargs = {} if is_win: kwargs['libraries'] = [ 'uamqp', 'aziotsharedutil', 'AdvAPI32', 'Crypt32', 'ncrypt', 'Secur32', 'schannel', 'RpcRT4', 'WSock32', 'WS2_32'] elif is_mac: kwargs['extra_compile_args'] = ['-g', '-O0', "-std=gnu99", "-fPIC"] kwargs['libraries'] = ['uamqp', 'aziotsharedutil'] if use_openssl and not supress_link_flags: kwargs['libraries'].extend(['azssl', 'azcrypto']) elif not use_openssl: kwargs['extra_link_args'] = [ '-framework', 'CoreFoundation', '-framework', 'CFNetwork', '-framework', 'Security'] else: kwargs['extra_compile_args'] = ['-g', '-O0', "-std=gnu99", "-fPIC"] # SSL before crypto matters: https://bugreports.qt.io/browse/QTBUG-62692 kwargs['libraries'] = ['uamqp', 'aziotsharedutil'] if sys.version_info < (3, 5): kwargs['libraries'].append('rt') if not supress_link_flags: kwargs['libraries'].extend(['ssl', 'crypto']) # If the C file doesn't exist, build the "c_uamqp.c" file # That's not perfect, since we build it on a "--help", but should be if cloned from source only. c_uamqp_src = "uamqp/c_uamqp.c" if not os.path.exists(c_uamqp_src) or rebuild_pyx: c_uamqp_src = create_cython_file() sources = [ c_uamqp_src ] # Configure the extension extensions = [ UAMQPExtension("cmake_uamqp"), Extension( "uamqp.c_uamqp", sources=sources, include_dirs=include_dirs, **kwargs ) ] with open('README.rst') as f: # , encoding='utf-8' readme = f.read() with open('HISTORY.rst') as f: # , encoding='utf-8' history = f.read() if USE_CYTHON: extensions = cythonize(extensions) setup( name='uamqp', version=version, description='AMQP 1.0 Client Library for Python', long_description=readme + '\n\n' + history, license='MIT License', author='Microsoft Corporation', author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-uamqp-python', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Programming Language :: Cython', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License' ], zip_safe=False, include_package_data=True, packages=find_packages(exclude=["tests"]), ext_modules=extensions, install_requires=[ "certifi>=2017.4.17", "six~=1.0" ], extras_require={ ":python_version<'3.4'": ['enum34>=1.0.4'] }, cmdclass={ 'build_ext': build_ext, }, python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*", ) azure-uamqp-python-1.2.6/src/000077500000000000000000000000001362133436400161025ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/amqp_definitions.pyx000066400000000000000000000022431362133436400221760ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports from libc cimport stdint cimport c_amqpvalue cimport c_amqp_definitions cimport c_utils _logger = logging.getLogger(__name__) cpdef create_data(char* binary_data): cdef c_amqpvalue.AMQP_VALUE body_data cdef c_amqpvalue.amqp_binary _binary length = len(binary_data) _binary.length = length _binary.bytes = binary_data body_data = c_amqp_definitions.amqpvalue_create_data(_binary) if body_data == NULL: raise ValueError("Unable to create payload data") return value_factory(body_data) cpdef create_sequence(AMQPValue sequence_data): body_data = c_amqp_definitions.amqpvalue_create_amqp_sequence(sequence_data._c_value) if body_data == NULL: raise ValueError("Unable to create payload data") return value_factory(body_data) azure-uamqp-python-1.2.6/src/amqp_management.pyx000066400000000000000000000120461362133436400220010ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports cimport c_amqp_management cimport c_message _logger = logging.getLogger(__name__) cpdef create_management_operation(cSession session, const char* management_node): mgr_op = cManagementOperation() mgr_op.create(session, management_node) return mgr_op cdef class cManagementOperation(StructBase): cdef c_amqp_management.AMQP_MANAGEMENT_HANDLE _c_value cdef _session def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating cManagementOperation") self.destroy() cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cManagementOperation") c_amqp_management.amqp_management_destroy(self._c_value) self._c_value = NULL self._session = None cdef wrap(self, cManagementOperation value): self.destroy() self._session = value._session self._c_value = value._c_value self._validate() cdef create(self, cSession session, const char* management_node): self.destroy() self._session = session self._c_value = c_amqp_management.amqp_management_create(session._c_value, management_node) self._validate() cpdef set_trace(self, bint value): c_amqp_management.amqp_management_set_trace(self._c_value, value) cpdef set_response_field_names(self, const char* status_code, const char* status_description): if c_amqp_management.amqp_management_set_override_status_code_key_name(self._c_value, status_code) != 0: self._value_error("Failed to set status code field name.") if c_amqp_management.amqp_management_set_override_status_description_key_name(self._c_value, status_description) != 0: self._value_error("Failed to set status description field name.") cpdef open(self, callback_context): cdef void *context if callback_context is None: context = NULL else: context = callback_context if c_amqp_management.amqp_management_open_async(self._c_value, on_amqp_management_open_complete, context, on_amqp_management_error, context) != 0: self._value_error("Unable to open management link.") cpdef close(self): if c_amqp_management.amqp_management_close(self._c_value) != 0: self._value_error("Unable to close management link.") cpdef execute(self, const char* operation, const char* type, locales, cMessage message, callback_context): cdef const char* c_locales cdef void *context if locales is None: c_locales = NULL else: c_locales = locales if callback_context is None: context = NULL else: context = callback_context if c_amqp_management.amqp_management_execute_operation_async(self._c_value, operation, type, c_locales, message._c_value, on_execute_operation_complete, context) != 0: self._value_error("Unable to execute management operation.") #### Management Link Callbacks cdef void on_amqp_management_open_complete(void* context, c_amqp_management.AMQP_MANAGEMENT_OPEN_RESULT_TAG open_result): _logger.debug("Management link open: %r", open_result) if context != NULL: context_obj = context context_obj._management_open_complete(open_result) cdef void on_amqp_management_error(void* context): _logger.debug("Management link error") if context != NULL: context_obj = context context_obj._management_operation_error() cdef void on_execute_operation_complete(void* context, c_amqp_management.AMQP_MANAGEMENT_EXECUTE_OPERATION_RESULT_TAG execute_operation_result, unsigned int status_code, const char* status_description, c_message.MESSAGE_HANDLE message): cdef c_message.MESSAGE_HANDLE cloned description = "None" if status_description == NULL else status_description _logger.debug("Management op complete: %r, status code: %r, description: %r", execute_operation_result, status_code, description) if context != NULL: context_obj = context if status_code == 0: context_obj(execute_operation_result, status_code, description, None) else: if message != NULL: cloned = c_message.message_clone(message) wrapped_message = message_factory(cloned) else: wrapped_message = None context_obj(execute_operation_result, status_code, description, wrapped_message) azure-uamqp-python-1.2.6/src/amqp_string.pyx000066400000000000000000000064151362133436400211760ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging import six # C imports cimport c_strings _logger = logging.getLogger(__name__) cpdef create_empty_string(): new_string = AMQPString() return new_string cpdef create_string_from_value(value, encoding='UTF-8'): if isinstance(value, six.text_type): value = value.encode(encoding) new_string = AMQPString() new_string.construct(value) return new_string cdef class AMQPString(StructBase): cdef c_strings.STRING_HANDLE _c_value def __cinit__(self): self._c_value = c_strings.STRING_new() self._validate() def __dealloc__(self): _logger.debug("Deallocating AMQPString") self.destroy() def __bytes__(self): return c_strings.STRING_c_str(self._c_value) def __str__(self): as_bytes = c_strings.STRING_c_str(self._c_value) if six.PY3: try: return as_bytes.decode('UTF-8') except UnicodeDecodeError: pass return str(as_bytes) def __unicode__(self): as_bytes = c_strings.STRING_c_str(self._c_value) try: return six.text_type(as_bytes.decode('UTF-8')) except UnicodeDecodeError: return six.text_type(as_bytes) def __eq__(self, AMQPString other): if c_strings.STRING_compare(self._c_value, other._c_value) == 0: return True return False def __ne__(self, AMQPString other): if c_strings.STRING_compare(self._c_value, other._c_value) == 0: return False return True cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): try: if self._c_value is not NULL: _logger.debug("Destroying AMQPString") c_strings.STRING_delete(self._c_value) except KeyboardInterrupt: pass finally: self._c_value = NULL cdef wrap(self, c_strings.STRING_HANDLE value): self.destroy() self._c_value = value self._validate() cdef construct(self, const char* value): self.destroy() self._c_value = c_strings.STRING_construct(value) self._validate() cpdef append(self, other): if isinstance(other, AMQPString): if c_strings.STRING_concat_with_STRING(self._c_value, other._c_value) != 0: self._value_error("Failed to append AMQPString value.") else: if c_strings.STRING_concat(self._c_value, other) != 0: self._value_error("Failed to append string.") cpdef clone(self): cdef c_strings.STRING_HANDLE value value = c_strings.STRING_clone(self._c_value) if value == NULL: self._null_error("Failed to clone AMQPString value.") cloned_value = AMQPString() cloned_value.wrap(value) return cloned_value azure-uamqp-python-1.2.6/src/amqpvalue.pyx000066400000000000000000000644001362133436400206430ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports from enum import Enum import logging import uuid import copy import six # C improts from libc cimport stdint from libc.stdlib cimport malloc, realloc, free from libc.string cimport memcpy cimport cython cimport c_amqpvalue cimport c_amqp_definitions _logger = logging.getLogger(__name__) cdef int encode_bytes_callback(void* context, const unsigned char* encoded_bytes, size_t length): context_obj = context context_obj.append(encoded_bytes[:length]) return 0 cdef get_amqp_value_type(c_amqpvalue.AMQP_VALUE value): type_val = c_amqpvalue.amqpvalue_get_type(value) try: return AMQPType(type_val) except ValueError: _logger.info("Received unrecognized type value: %r", type_val) return AMQPType.ErrorType cpdef enocde_batch_value(AMQPValue value, message_body): if c_amqpvalue.amqpvalue_encode(value._c_value, encode_bytes_callback, message_body) != 0: raise ValueError("Failed to encode batched message data.") class AMQPType(Enum): NullValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_NULL BoolValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_BOOL UByteValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_UBYTE UShortValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_USHORT UIntValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_UINT ULongValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_ULONG ByteValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_BYTE ShortValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_SHORT IntValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_INT LongValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_LONG FloatValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_FLOAT DoubleValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_DOUBLE CharValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_CHAR TimestampValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_TIMESTAMP UUIDValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_UUID BinaryValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_BINARY StringValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_STRING SymbolValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_SYMBOL ListValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_LIST DictValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_MAP ArrayValue = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_ARRAY DescribedType = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_DESCRIBED CompositeType = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_COMPOSITE UnknownType = c_amqpvalue.AMQP_TYPE_TAG.AMQP_TYPE_UNKNOWN ErrorType = 999 cdef value_factory(c_amqpvalue.AMQP_VALUE value): type_val = get_amqp_value_type(value) _logger.debug("Wrapping value type: %r", type_val) if type_val == AMQPType.NullValue: new_obj = AMQPValue() elif type_val == AMQPType.BoolValue: new_obj = BoolValue() elif type_val == AMQPType.UByteValue: new_obj = UByteValue() elif type_val == AMQPType.UShortValue: new_obj = UShortValue() elif type_val == AMQPType.UIntValue: new_obj = UIntValue() elif type_val == AMQPType.ULongValue: new_obj = ULongValue() elif type_val == AMQPType.ByteValue: new_obj = ByteValue() elif type_val == AMQPType.ShortValue: new_obj = ShortValue() elif type_val == AMQPType.IntValue: new_obj = IntValue() elif type_val == AMQPType.LongValue: new_obj = LongValue() elif type_val == AMQPType.FloatValue: new_obj = FloatValue() elif type_val == AMQPType.DoubleValue: new_obj = DoubleValue() elif type_val == AMQPType.CharValue: new_obj = CharValue() elif type_val == AMQPType.TimestampValue: new_obj = TimestampValue() elif type_val == AMQPType.UUIDValue: new_obj = UUIDValue() elif type_val == AMQPType.BinaryValue: new_obj = BinaryValue() elif type_val == AMQPType.StringValue: new_obj = StringValue() elif type_val == AMQPType.SymbolValue: new_obj = SymbolValue() elif type_val == AMQPType.ListValue: new_obj = ListValue() elif type_val == AMQPType.DictValue: new_obj = DictValue() elif type_val == AMQPType.ArrayValue: # Do checking new_obj = ArrayValue() elif type_val == AMQPType.CompositeType: new_obj = CompositeValue() elif type_val == AMQPType.DescribedType: new_obj = DescribedValue() else: error = "Unrecognized AMQPType: {}".format(type_val) _logger.info(error) raise TypeError(error) new_obj.wrap(value) return new_obj cpdef null_value(): new_obj = AMQPValue() new_obj.create() return new_obj cpdef bool_value(bint value): value = 1 if value else 0 new_obj = BoolValue() new_obj.create(value) return new_obj cpdef ubyte_value(unsigned char value): new_obj = UByteValue() new_obj.create(value) return new_obj cpdef ushort_value(stdint.uint16_t value): new_obj = UShortValue() new_obj.create(value) return new_obj cpdef uint_value(stdint.uint32_t value): new_obj = UIntValue() new_obj.create(value) return new_obj cpdef ulong_value(stdint.uint64_t value): new_obj = ULongValue() new_obj.create(value) return new_obj cpdef byte_value(char value): new_obj = ByteValue() new_obj.create(value) return new_obj cpdef short_value(stdint.int16_t value): new_obj = ShortValue() new_obj.create(value) return new_obj cpdef int_value(stdint.int32_t value): new_obj = IntValue() new_obj.create(value) return new_obj cpdef long_value(stdint.int64_t value): new_obj = LongValue() new_obj.create(value) return new_obj cpdef float_value(float value): new_obj = FloatValue() new_obj.create(value) return new_obj cpdef double_value(double value): new_obj = DoubleValue() new_obj.create(value) return new_obj cpdef char_value(stdint.uint32_t value): new_obj = CharValue() new_obj.create(value) return new_obj cpdef timestamp_value(stdint.int64_t value): new_obj = TimestampValue() new_obj.create(value) return new_obj cpdef uuid_value(value): if not isinstance(value, uuid.UUID): raise TypeError("Input value must be type UUID.") new_obj = UUIDValue() new_obj.create(value.bytes) return new_obj cpdef binary_value(value): bytes_value = six.binary_type(value) new_obj = BinaryValue() new_obj.create(bytes_value) return new_obj cpdef string_value(char* value): new_obj = StringValue() new_obj.create(value) return new_obj cpdef symbol_value(char* value): new_obj = SymbolValue() new_obj.create(value) return new_obj cpdef list_value(): new_obj = ListValue() new_obj.create() return new_obj cpdef dict_value(): new_obj = DictValue() new_obj.create() return new_obj cpdef array_value(): new_obj = ArrayValue() new_obj.create() return new_obj cpdef described_value(AMQPValue descriptor, AMQPValue value): new_obj = DescribedValue() new_obj.create(descriptor, value) return new_obj cdef class AMQPValue(StructBase): _type = AMQPType.NullValue cdef c_amqpvalue.AMQP_VALUE _c_value def __cinit__(self): pass def __dealloc__(self): if _logger: _logger.debug("Deallocating %r", self.__class__.__name__) self.destroy() def __eq__(self, AMQPValue other): return c_amqpvalue.amqpvalue_are_equal(self._c_value, other._c_value) def __ne__(self, AMQPValue other): return not c_amqpvalue.amqpvalue_are_equal(self._c_value, other._c_value) def __bytes__(self): return self._as_string() def __str__(self): as_bytes = self._as_string() if six.PY3: try: return as_bytes.decode('UTF-8') except UnicodeDecodeError: pass return str(as_bytes) def __unicode__(self): as_bytes = self._as_string() try: return six.text_type(as_bytes.decode('UTF-8')) except UnicodeDecodeError: return six.text_type(as_bytes) cpdef _as_string(self): cdef c_amqpvalue.AMQP_VALUE value cdef const char* as_string value = c_amqpvalue.amqpvalue_clone(self._c_value) if value == NULL: self._value_error() as_string = c_amqpvalue.amqpvalue_to_string(value) py_string = copy.deepcopy(as_string) c_amqpvalue.amqpvalue_destroy(self._c_value) return py_string cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): try: if self._c_value is not NULL: if _logger: _logger.debug("Destroying %r", self.__class__.__name__) c_amqpvalue.amqpvalue_destroy(self._c_value) except KeyboardInterrupt: pass finally: self._c_value = NULL cdef wrap(self, c_amqpvalue.AMQP_VALUE value): self.destroy() self._c_value = value self._validate() def create(self): new_value = c_amqpvalue.amqpvalue_create_null() self.wrap(new_value) @property def type(self): if self._c_value is NULL: self._null_error() obj_type = get_amqp_value_type(self._c_value) return obj_type @property def value(self): return None cpdef get_encoded_size(self): cdef size_t length if c_amqpvalue.amqpvalue_get_encoded_size(self._c_value, &length) != 0: self._value_error("Failed to get encoded size.") return length cpdef clone(self): cdef c_amqpvalue.AMQP_VALUE value value = c_amqpvalue.amqpvalue_clone(self._c_value) if value == NULL: self._value_error() return value_factory(value) cdef class BoolValue(AMQPValue): _type = AMQPType.BoolValue cpdef _bool_value(self): cdef bint _value if c_amqpvalue.amqpvalue_get_boolean(self._c_value, &_value) == 0: return _value else: self._value_error() def create(self, bint value): new_value = c_amqpvalue.amqpvalue_create_boolean(value) self.wrap(new_value) @property def value(self): assert self.type str_value = str(self) if str_value in ["false"]: return False elif str_value in ["true"]: return True else: self._value_error() cdef class UByteValue(AMQPValue): _type = AMQPType.UByteValue def create(self, unsigned char value): new_value = c_amqpvalue.amqpvalue_create_ubyte(value) self.wrap(new_value) @property def value(self): assert self.type cdef unsigned char _value if c_amqpvalue.amqpvalue_get_ubyte(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class UShortValue(AMQPValue): _type = AMQPType.UShortValue def create(self, stdint.uint16_t value): new_value = c_amqpvalue.amqpvalue_create_ushort(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.uint16_t _value if c_amqpvalue.amqpvalue_get_ushort(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class UIntValue(AMQPValue): _type = AMQPType.UIntValue def create(self, stdint.uint32_t value): new_value = c_amqpvalue.amqpvalue_create_uint(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.uint32_t _value if c_amqpvalue.amqpvalue_get_uint(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class ULongValue(AMQPValue): _type = AMQPType.ULongValue def create(self, stdint.uint64_t value): new_value = c_amqpvalue.amqpvalue_create_ulong(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.uint64_t _value if c_amqpvalue.amqpvalue_get_ulong(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class ByteValue(AMQPValue): _type = AMQPType.ByteValue def create(self, char value): new_value = c_amqpvalue.amqpvalue_create_byte(value) self.wrap(new_value) @property def value(self): assert self.type cdef char _value if c_amqpvalue.amqpvalue_get_byte(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class ShortValue(AMQPValue): _type = AMQPType.ShortValue def create(self, stdint.int16_t value): new_value = c_amqpvalue.amqpvalue_create_short(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.int16_t _value if c_amqpvalue.amqpvalue_get_short(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class IntValue(AMQPValue): _type = AMQPType.IntValue def create(self, stdint.int32_t value): new_value = c_amqpvalue.amqpvalue_create_int(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.int32_t _value if c_amqpvalue.amqpvalue_get_int(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class LongValue(AMQPValue): _type = AMQPType.LongValue def create(self, stdint.int64_t value): new_value = c_amqpvalue.amqpvalue_create_long(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.int64_t _value if c_amqpvalue.amqpvalue_get_long(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class FloatValue(AMQPValue): _type = AMQPType.FloatValue def create(self, float value): new_value = c_amqpvalue.amqpvalue_create_float(value) self.wrap(new_value) @property def value(self): assert self.type cdef float _value if c_amqpvalue.amqpvalue_get_float(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class DoubleValue(AMQPValue): _type = AMQPType.DoubleValue def create(self, double value): new_value = c_amqpvalue.amqpvalue_create_double(value) self.wrap(new_value) @property def value(self): assert self.type cdef double _value if c_amqpvalue.amqpvalue_get_double(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class CharValue(AMQPValue): _type = AMQPType.CharValue def create(self, stdint.uint32_t value): new_value = c_amqpvalue.amqpvalue_create_char(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.uint32_t _value if c_amqpvalue.amqpvalue_get_char(self._c_value, &_value) == 0: return chr(_value) else: self._value_error() cdef class TimestampValue(AMQPValue): _type = AMQPType.TimestampValue def create(self, stdint.int64_t value): new_value = c_amqpvalue.amqpvalue_create_timestamp(value) self.wrap(new_value) @property def value(self): assert self.type cdef stdint.int64_t _value if c_amqpvalue.amqpvalue_get_timestamp(self._c_value, &_value) == 0: return _value else: self._value_error() cdef class UUIDValue(AMQPValue): _type = AMQPType.UUIDValue def create(self, bytes value): new_value = c_amqpvalue.amqpvalue_create_uuid(value) self.wrap(new_value) @property def value(self): assert self.type str_val = str(self) return uuid.UUID(str_val) # TODO: Get proper value cdef class BinaryValue(AMQPValue): _type = AMQPType.BinaryValue def create(self, bytes value): cdef c_amqpvalue.amqp_binary _binary length = len(list(value)) _binary.length = length _binary.bytes = value new_value = c_amqpvalue.amqpvalue_create_binary(_binary) self.wrap(new_value) def __len__(self): assert self.type cdef c_amqpvalue.amqp_binary _value if c_amqpvalue.amqpvalue_get_binary(self._c_value, &_value) == 0: return _value.length else: self._value_error() @property def value(self): assert self.type cdef c_amqpvalue.amqp_binary _value cdef char* bytes_value if c_amqpvalue.amqpvalue_get_binary(self._c_value, &_value) == 0: bytes_value = _value.bytes return bytes_value[:_value.length] else: self._value_error() cdef class StringValue(AMQPValue): _type = AMQPType.StringValue def create(self, char* value): new_value = c_amqpvalue.amqpvalue_create_string(value) self.wrap(new_value) @property def value(self): assert self.type cdef const char* _value if c_amqpvalue.amqpvalue_get_string(self._c_value, &_value) == 0: return copy.deepcopy(_value) else: self._value_error() cdef class SymbolValue(AMQPValue): _type = AMQPType.SymbolValue def create(self, char* value): new_value = c_amqpvalue.amqpvalue_create_symbol(value) self.wrap(new_value) @property def value(self): assert self.type cdef const char* _value if c_amqpvalue.amqpvalue_get_symbol(self._c_value, &_value) == 0: return copy.deepcopy(_value) else: self._value_error() cdef class ListValue(AMQPValue): _type = AMQPType.ListValue def create(self): new_value = c_amqpvalue.amqpvalue_create_list() self.wrap(new_value) def __len__(self): return self.size def __getitem__(self, size_t index): if index >= self.size: raise IndexError("Index is out of range.") cdef c_amqpvalue.AMQP_VALUE value value = c_amqpvalue.amqpvalue_get_list_item(self._c_value, index) if value == NULL: self._value_error() try: return value_factory(value) except TypeError: return None def __setitem__(self, stdint.uint32_t index, AMQPValue value): assert value.type if index >= self.size: raise IndexError("Index is out of range.") if c_amqpvalue.amqpvalue_set_list_item(self._c_value, index, value._c_value) != 0: self._value_error() @property def size(self): assert self.type cdef stdint.uint32_t _value if c_amqpvalue.amqpvalue_get_list_item_count(self._c_value, &_value) == 0: return _value else: self._value_error() @size.setter def size(self, stdint.uint32_t length): assert self.type if c_amqpvalue.amqpvalue_set_list_item_count(self._c_value, length) != 0: self._value_error() @property def value(self): assert self.type value = [] for i in range(self.size): value.append(copy.deepcopy(self[i].value)) return value cdef class DictValue(AMQPValue): _type = AMQPType.DictValue def create(self): new_value = c_amqpvalue.amqpvalue_create_map() self.wrap(new_value) def __len__(self): return self.size def __getitem__(self, AMQPValue key): cdef c_amqpvalue.AMQP_VALUE value value = c_amqpvalue.amqpvalue_get_map_value(self._c_value, key._c_value) if value == NULL: raise KeyError("No value found for key: {}".format(key.value)) try: return value_factory(value) except TypeError: return None def __setitem__(self, AMQPValue key, AMQPValue value): if c_amqpvalue.amqpvalue_set_map_value(self._c_value, key._c_value, value._c_value) != 0: self._value_error() def get(self, stdint.uint32_t index): if index >= self.size: raise IndexError("Index is out of range.") cdef c_amqpvalue.AMQP_VALUE key cdef c_amqpvalue.AMQP_VALUE value if c_amqpvalue.amqpvalue_get_map_key_value_pair(self._c_value, index, &key, &value) != 0: self._value_error() return (value_factory(key), value_factory(value)) @property def size(self): assert self.type cdef stdint.uint32_t _value if c_amqpvalue.amqpvalue_get_map_pair_count(self._c_value, &_value) == 0: return _value else: self._value_error() @property def value(self): assert self.type value = {} for i in range(self.size): key, item = self.get(i) value[copy.deepcopy(key.value)] = copy.deepcopy(item.value) return value cdef class ArrayValue(AMQPValue): _type = AMQPType.ArrayValue def create(self): self._c_value = c_amqpvalue.amqpvalue_create_array() self._validate() def __len__(self): return self.size def __getitem__(self, stdint.uint32_t index): if index >= self.size: raise IndexError("Index is out of range.") cdef c_amqpvalue.AMQP_VALUE value value = c_amqpvalue.amqpvalue_get_array_item(self._c_value, index) if value == NULL: self._value_error() return value_factory(value) @property def size(self): assert self.type cdef stdint.uint32_t _value if c_amqpvalue.amqpvalue_get_array_item_count(self._c_value, &_value) == 0: return _value else: self._value_error() cpdef append(self, AMQPValue value): assert self.type cdef c_amqpvalue.AMQP_VALUE _value _value = value._c_value if c_amqpvalue.amqpvalue_add_array_item(self._c_value, value._c_value) != 0: self._value_error() @property def value(self): assert self.type value = [] for i in range(self.size): value.append(copy.deepcopy(self[i].value)) return value cdef class CompositeValue(AMQPValue): _type = AMQPType.CompositeType def create(self, AMQPValue descriptor, stdint.uint32_t list_size): new_value = c_amqpvalue.amqpvalue_create_composite(descriptor._c_value, list_size) self.wrap(new_value) def create_from_long(self, stdint.uint64_t descriptor): new_value = c_amqpvalue.amqpvalue_create_composite_with_ulong_descriptor(descriptor) self.wrap(new_value) def __len__(self): return self.size def __getitem__(self, stdint.uint32_t index): if index >= self.size: raise IndexError("Index is out of range.") cdef c_amqpvalue.AMQP_VALUE value value = c_amqpvalue.amqpvalue_get_composite_item(self._c_value, index) if value == NULL: self._value_error() try: return value_factory(value) except TypeError: raise IndexError("No item found at index {}".format(index)) def __setitem__(self, stdint.uint32_t index, AMQPValue value): assert value.type if index >= self.size: raise IndexError("Index is out of range.") if c_amqpvalue.amqpvalue_set_composite_item(self._c_value, index, value._c_value) != 0: self._value_error() @property def size(self): assert self.type cdef stdint.uint32_t _value if c_amqpvalue.amqpvalue_get_composite_item_count(self._c_value, &_value) == 0: return _value else: self._value_error() def pop(self, stdint.uint32_t index): if index >= self.size: raise IndexError("Index is out of range.") cdef c_amqpvalue.AMQP_VALUE value value = c_amqpvalue.amqpvalue_get_composite_item_in_place(self._c_value, index) if value == NULL: self._value_error() try: return value_factory(value) except TypeError: raise IndexError("No item found at index {}".format(index)) cdef class DescribedValue(AMQPValue): _type = AMQPType.DescribedType def create(self, AMQPValue descriptor, AMQPValue value): cdef c_amqpvalue.AMQP_VALUE cloned_descriptor cdef c_amqpvalue.AMQP_VALUE cloned_value cloned_descriptor = c_amqpvalue.amqpvalue_clone(descriptor._c_value) if cloned_descriptor == NULL: self._value_error() cloned_value = c_amqpvalue.amqpvalue_clone(value._c_value) if cloned_value == NULL: self._value_error() new_value = c_amqpvalue.amqpvalue_create_described(cloned_descriptor, cloned_value) self.wrap(new_value) @property def description(self): cdef c_amqpvalue.AMQP_VALUE value cdef c_amqpvalue.AMQP_VALUE cloned value = c_amqpvalue.amqpvalue_get_inplace_descriptor(self._c_value) if value == NULL: self._value_error() cloned = c_amqpvalue.amqpvalue_clone(value) if cloned == NULL: self._value_error() return value_factory(cloned) @property def data(self): cdef c_amqpvalue.AMQP_VALUE value cdef c_amqpvalue.AMQP_VALUE cloned value = c_amqpvalue.amqpvalue_get_inplace_described_value(self._c_value) if value == NULL: self._value_error() cloned = c_amqpvalue.amqpvalue_clone(value) if cloned == NULL: self._value_error() return value_factory(cloned) @property def value(self): assert self.type #descriptor = self.description described = self.data return copy.deepcopy(described.value) azure-uamqp-python-1.2.6/src/annotations.pyx000066400000000000000000000143371362133436400212110ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging import copy # C imports from libc cimport stdint cimport c_amqpvalue cimport c_amqp_definitions cimport c_utils _logger = logging.getLogger(__name__) cdef annotations_factory(c_amqpvalue.AMQP_VALUE value): try: wrapped = value_factory(value) except TypeError: return None if c_amqp_definitions.is_delivery_annotations_type_by_descriptor(value): new_obj = create_delivery_annotations(wrapped) elif c_amqp_definitions.is_message_annotations_type_by_descriptor(value): new_obj = create_message_annotations(wrapped) elif c_amqp_definitions.is_footer_type_by_descriptor(value): new_obj = create_footer(wrapped) else: new_obj = create_annotations(wrapped) return new_obj cpdef create_annotations(AMQPValue value): annotations = cAnnotations() annotations.create(value) return annotations cpdef create_application_properties(AMQPValue value): annotations = cApplicationProperties() annotations.create(value) return annotations cpdef create_delivery_annotations(AMQPValue value): annotations = cDeliveryAnnotations() annotations.create(value) return annotations cpdef create_message_annotations(AMQPValue value): annotations = cMessageAnnotations() annotations.create(value) return annotations cpdef create_fields(AMQPValue value): annotations = cFields() annotations.create(value) return annotations cpdef create_footer(AMQPValue value): annotations = cFooter() annotations.create(value) return annotations cdef class cAnnotations(StructBase): cdef c_amqpvalue.AMQP_VALUE _c_value def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating %r", self.__class__.__name__) self.destroy() cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): try: if self._c_value is not NULL: _logger.debug("Destroying %r", self.__class__.__name__) c_amqpvalue.amqpvalue_destroy(self._c_value) except KeyboardInterrupt: pass finally: self._c_value = NULL cpdef clone(self): cdef c_amqp_definitions.annotations value value = c_amqpvalue.amqpvalue_clone(self._c_value) if value == NULL: self._value_error() amqp_value = value_factory(value) return cAnnotations(amqp_value) cpdef get_encoded_size(self): cdef size_t length if c_amqpvalue.amqpvalue_get_encoded_size(self._c_value, &length) != 0: self._value_error("Failed to get encoded size.") return length cpdef create(self, AMQPValue value): self.destroy() self._c_value = c_amqp_definitions.amqpvalue_create_annotations(value._c_value) self._validate() cdef wrap(self, c_amqp_definitions.annotations value): self.destroy() self._c_value = value self._validate() @property def value(self): try: return value_factory(self._c_value) except TypeError: return None @property def map(self): cdef c_amqpvalue.AMQP_VALUE unmapped cdef c_amqpvalue.AMQP_VALUE mapped unmapped = c_amqpvalue.amqpvalue_clone(self._c_value) if c_amqpvalue.amqpvalue_get_map(unmapped, &mapped) == 0: if mapped == NULL: return None return copy.deepcopy(value_factory(mapped).value) else: return None cdef class cApplicationProperties(cAnnotations): cpdef create(self, AMQPValue value): self.destroy() self._c_value = c_amqp_definitions.amqpvalue_create_application_properties( value._c_value) self._validate() @property def map(self): cdef c_amqpvalue.AMQP_VALUE unmapped cdef c_amqpvalue.AMQP_VALUE mapped cdef c_amqpvalue.AMQP_VALUE unextracted cdef c_amqpvalue.AMQP_VALUE extracted unextracted = c_amqpvalue.amqpvalue_clone(self._c_value) extracted = c_amqpvalue.amqpvalue_get_inplace_described_value(unextracted) unmapped = c_amqpvalue.amqpvalue_clone(extracted) if unmapped == NULL: result = None elif c_amqpvalue.amqpvalue_get_map(unmapped, &mapped) == 0: if mapped == NULL: result = None else: result = copy.deepcopy(value_factory(mapped).value) else: result = None c_amqpvalue.amqpvalue_destroy(unextracted) return result cdef class cDeliveryAnnotations(cAnnotations): cpdef create(self, AMQPValue value): self.destroy() self._c_value = c_amqp_definitions.amqpvalue_create_delivery_annotations( value._c_value) self._validate() cdef class cMessageAnnotations(cAnnotations): cpdef create(self, AMQPValue value): self.destroy() self._c_value = c_amqp_definitions.amqpvalue_create_message_annotations( value._c_value) self._validate() cdef class cFields(cAnnotations): cpdef create(self, AMQPValue value): self.destroy() self._c_value = c_amqp_definitions.amqpvalue_create_fields(value._c_value) self._validate() cdef class cFooter(cAnnotations): cpdef create(self, AMQPValue value): self.destroy() self._c_value = c_amqp_definitions.amqpvalue_create_footer(value._c_value) self._validate() azure-uamqp-python-1.2.6/src/async_operation.pyx000066400000000000000000000022651362133436400220460ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports cimport c_async_operation _logger = logging.getLogger(__name__) cdef class AsyncOperation(StructBase): cdef c_async_operation.ASYNC_OPERATION_HANDLE _c_value def __cinit__(self): pass cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying AsyncOperation") c_async_operation.async_operation_destroy(self._c_value) self._c_value = NULL cdef wrap(self, c_async_operation.ASYNC_OPERATION_HANDLE value): self.destroy() self._c_value = value self._create() cpdef cancel(self): if c_async_operation.async_operation_cancel(self._c_value) != 0: self._value_error() azure-uamqp-python-1.2.6/src/base.pyx000066400000000000000000000036521362133436400175640ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports cimport c_tlsio cimport c_utils _logger = logging.getLogger(__name__) cdef class StructBase(object): """Base class for wrapped C structs.""" def _memory_error(self): message = "Failed to allocate memory to create {}" raise MemoryError(message.format(self.__class__.__name__)) def _value_error(self, error_message=None, error_code=None): message = "Operation failed." if error_message: message += "\nError: {}".format(error_message) if error_code: message += "\nErrorCode: {}".format(error_code) raise ValueError(message) def _null_error(self, error_message=None): message = "NULL error occurred in {}.".format(self.__class__.__name__) if error_message: message += "\nError: {}".format(error_message) raise ValueError(message) cdef class TickCounter(object): cdef c_utils.TICK_COUNTER_HANDLE _c_value def __cinit__(self): self._c_value = c_utils.tickcounter_create() if self._c_value == NULL: raise MemoryError("Failed to create tick counter.") def __dealloc__(self): self.destroy() cpdef destroy(self): if self._c_value != NULL: c_utils.tickcounter_destroy(self._c_value) self._c_value = NULL cpdef get_current_ms(self): cdef c_utils.tickcounter_ms_t current_ms if c_utils.tickcounter_get_current_ms(self._c_value, ¤t_ms) != 0: raise ValueError("Failed to get current ms time.") return current_ms azure-uamqp-python-1.2.6/src/cbs.pyx000066400000000000000000000216661362133436400174260ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports from enum import Enum import time import logging # C imports from libc cimport stdint from libc.stdlib cimport malloc, free from libc.string cimport memset cimport c_cbs cimport c_utils cimport c_strings cimport c_session _logger = logging.getLogger(__name__) cpdef create_sas_token(const char* key, const char* scope, const char* keyname, size_t expiry): cdef c_strings.STRING_HANDLE str_value #cdef const char* c_string str_value = c_utils.SASToken_CreateString(key, scope, keyname, expiry) if str_value == NULL: raise ValueError("Failed to create SAS token.") if c_utils.SASToken_Validate(str_value) != True: raise ValueError("Generated invalid SAS token") return c_strings.STRING_c_str(str_value) #c_strings.STRING_delete(str_value) #return c_string cdef class CBSTokenAuth(object): cdef const char* audience cdef const char* token_type cdef const char* token cdef stdint.uint64_t expires_at cdef stdint.uint64_t _refresh_window cdef c_cbs.CBS_HANDLE _cbs_handle cdef c_cbs.AUTH_STATUS state cdef stdint.uint64_t auth_timeout cdef stdint.uint64_t _token_put_time cdef unsigned int token_status_code cdef const char* token_status_description cdef const char* connection_id cdef cSession _session def __cinit__(self, const char* audience, const char* token_type, const char* token, stdint.uint64_t expires_at, cSession session, stdint.uint64_t timeout, const char* connection_id): self.state = AUTH_STATUS_IDLE self.audience = audience self.token_type = token_type self.token = token self.expires_at = expires_at self.auth_timeout = timeout self.connection_id = connection_id self._token_put_time = 0 current_time = int(time.time()) remaining_time = expires_at - current_time self._refresh_window = int(float(remaining_time) * 0.1) self._cbs_handle = c_cbs.cbs_create(session._c_value) self._session = session if self._cbs_handle == NULL: raise MemoryError("Unable to create CBS Handle.") if c_cbs.cbs_open_async(self._cbs_handle, on_cbs_open_complete, self, on_cbs_error, self) != 0: raise ValueError("Unable to open CBS link.") def __dealloc__(self): _logger.debug("Deallocating CBSTokenAuth") self.destroy() cpdef destroy(self): if self._cbs_handle is not NULL: _logger.debug("Destroying CBSTokenAuth for connection %r", self.connection_id) c_cbs.cbs_destroy(self._cbs_handle) self._cbs_handle = NULL self._session = None cpdef close(self): if c_cbs.cbs_close(self._cbs_handle) != 0: self._value_error("Unable to close CBS link.") cpdef set_trace(self, bint trace_on): if c_cbs.cbs_set_trace(self._cbs_handle, trace_on) != 0: raise ValueError("Unable to set debug trace.") cpdef authenticate(self): if self.state == AUTH_STATUS_IN_PROGRESS: return current_time = int(time.time()) if current_time >= self.expires_at: raise ValueError("Token has expired") self._token_put_time = current_time if c_cbs.cbs_put_token_async( self._cbs_handle, self.token_type, self.audience, self.token, on_cbs_put_token_complete, self) != 0: raise ValueError("Put-Token request failed.") else: self.state = AUTH_STATUS_IN_PROGRESS cpdef get_status(self): self._update_status() return self.state cpdef get_failure_info(self): return self.token_status_code, self.token_status_description cpdef refresh(self, const char* refresh_token, stdint.uint64_t expires_at): self._update_status() if self.state == AUTH_STATUS_REFRESH_REQUIRED: self.token = refresh_token self.authenticate() self.expires_at = expires_at cpdef _update_status(self): error_code = 0 is_refresh_required = False if self.state == AUTH_STATUS_OK or self.state == AUTH_STATUS_REFRESH_REQUIRED: is_expired, is_refresh_required = self._check_expiration_and_refresh_status() if is_expired: self.state = AUTH_STATUS_EXPIRED elif is_refresh_required: self.state = AUTH_STATUS_REFRESH_REQUIRED elif self.state == AUTH_STATUS_IN_PROGRESS: put_timeout = self._check_put_timeout_status() if put_timeout: self.state = AUTH_STATUS_TIMEOUT cpdef _check_put_timeout_status(self): seconds_since_epoc = int(time.time()) if self.auth_timeout > 0: return (seconds_since_epoc - self._token_put_time) >= self.auth_timeout else: return False cpdef _check_expiration_and_refresh_status(self): seconds_since_epoc = int(time.time()) is_expired = seconds_since_epoc >= self.expires_at is_refresh_required = (self.expires_at - seconds_since_epoc) <= self._refresh_window return is_expired, is_refresh_required cpdef _cbs_open_complete(self, result): self.on_cbs_open_complete(result) cpdef on_cbs_open_complete(self, result): _logger.info("CBS for connection %r completed opening with status: %r", self.connection_id, result) if result == c_cbs.CBS_OPEN_COMPLETE_RESULT_TAG.CBS_OPEN_ERROR: self.state = AUTH_STATUS_FAILURE cpdef _cbs_error(self): self.on_cbs_error() cpdef on_cbs_error(self): _logger.info("CBS error occured on connection %r.", self.connection_id) cpdef _cbs_put_token_compelete(self, c_cbs.CBS_OPERATION_RESULT_TAG result, unsigned int status_code, const char* status_description): if result == CBS_OPERATION_RESULT_OK: self.state = AUTH_STATUS_OK else: self.state = AUTH_STATUS_ERROR self.token_status_code = status_code self.token_status_description = status_description self.on_cbs_put_token_complete(result, status_code, status_description) cpdef on_cbs_put_token_complete(self, c_cbs.CBS_OPERATION_RESULT_TAG result, unsigned int status_code, const char* status_description): _logger.info("Token put complete with result: %r, status: %r, description: %r, connection: %r", result, status_code, status_description, self.connection_id) #### Callbacks cdef void on_cbs_open_complete(void *context, c_cbs.CBS_OPEN_COMPLETE_RESULT_TAG open_complete_result): if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call on_cbs_open_complete during garbage collection.") return context_obj = context context_obj._cbs_open_complete(open_complete_result) cdef void on_cbs_error(void* context): if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call on_cbs_error during garbage collection.") return context_obj = context context_obj._cbs_error() cdef void on_cbs_put_token_complete(void* context, c_cbs.CBS_OPERATION_RESULT_TAG complete_result, unsigned int status_code, const char* status_description): cdef unsigned int verified_status_code cdef const char* verified_description if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call on_cbs_put_token_complete during garbage collection.") return context_obj = context try: if status_code != NULL: verified_status_code = status_code else: verified_status_code = 0 if status_description != NULL: verified_description = status_description else: verified_description = b"CBS Session closed." context_obj._cbs_put_token_compelete(complete_result, verified_status_code, verified_description) except KeyboardInterrupt: context_obj._cbs_put_token_compelete( CBS_OPERATION_RESULT_INSTANCE_CLOSED, 1, b"Client shutdown with keyboard interrupt.") azure-uamqp-python-1.2.6/src/connection.pyx000066400000000000000000000201121362133436400207770ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging from enum import Enum # C imports from libc cimport stdint cimport c_amqp_definitions cimport c_connection cimport c_xio _logger = logging.getLogger(__name__) cpdef create_connection(XIO sasl_client, const char* hostname, const char* container_id, callback_context): conn = Connection() conn.create(sasl_client, hostname, container_id, on_connection_state_changed, on_io_error, callback_context) return conn class ConnectionState(Enum): START = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_START HDR_RCVD = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_HDR_RCVD HDR_SENT = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_HDR_SENT HDR_EXCH = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_HDR_EXCH OPEN_PIPE = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_OPEN_PIPE OC_PIPE = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_OC_PIPE OPEN_RCVD = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_OPEN_RCVD OPEN_SENT = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_OPEN_SENT CLOSE_PIPE = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_CLOSE_PIPE OPENED = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_OPENED CLOSE_RCVD = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_CLOSE_RCVD CLOSE_SENT = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_CLOSE_SENT DISCARDING = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_DISCARDING END = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_END ERROR = c_connection.CONNECTION_STATE_TAG.CONNECTION_STATE_ERROR UNKNOWN = 999 cdef class Connection(StructBase): cdef c_connection.CONNECTION_HANDLE _c_value cdef c_connection.ON_CONNECTION_CLOSED_EVENT_SUBSCRIPTION_HANDLE _close_event cdef XIO _sasl_client def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating Connection") self.destroy() def __enter__(self): return self def __exit__(self, *args): self.destroy() cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying Connection") c_connection.connection_destroy(self._c_value) self._c_value = NULL self._sasl_client = None cdef wrap(self, Connection value): self.destroy() self._sasl_client = value._sasl_client self._c_value = value._c_value self._create() cdef create(self, XIO sasl_client, const char* hostname, const char* container_id, c_connection.ON_CONNECTION_STATE_CHANGED on_connection_state_changed, c_xio.ON_IO_ERROR on_io_error, void* callback_context): self.destroy() self._sasl_client = sasl_client self._c_value = c_connection.connection_create2(sasl_client._c_value, hostname, container_id, NULL, NULL, on_connection_state_changed, callback_context, on_io_error, callback_context) self._create() cpdef open(self): if c_connection.connection_open(self._c_value) != 0: self._value_error() cpdef close(self, const char* condition_value, const char* description): if c_connection.connection_close(self._c_value, condition_value, description, NULL) != 0: self._value_error() cpdef set_trace(self, bint value): c_connection.connection_set_trace(self._c_value, value) cpdef do_work(self): c_connection.connection_dowork(self._c_value) cpdef subscribe_to_close_event(self, on_close_received): self._close_event = c_connection.connection_subscribe_on_connection_close_received( self._c_value, on_connection_close_received, on_close_received) if self._close_event == NULL: self._value_error("Unable to register CLOSE event handler.") cpdef unsubscribe_to_close_event(self): c_connection.connection_unsubscribe_on_connection_close_received(self._close_event) @property def max_frame_size(self): cdef stdint.uint32_t _value if c_connection.connection_get_max_frame_size(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: self._value_error() @max_frame_size.setter def max_frame_size(self, stdint.uint32_t value): if c_connection.connection_set_max_frame_size(self._c_value, value) != 0: self._value_error() @property def channel_max(self): cdef stdint.uint16_t _value if c_connection.connection_get_channel_max(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: self._value_error() @channel_max.setter def channel_max(self, stdint.uint16_t value): if c_connection.connection_set_channel_max(self._c_value, value) != 0: self._value_error() @property def idle_timeout(self): cdef c_amqp_definitions.milliseconds _value if c_connection.connection_get_idle_timeout(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: self._value_error() @idle_timeout.setter def idle_timeout(self, c_amqp_definitions.milliseconds value): if c_connection.connection_set_idle_timeout(self._c_value, value) != 0: self._value_error() @property def properties(self): cdef c_amqp_definitions.fields _value if c_connection.connection_get_properties(self._c_value, &_value) == 0: if _value == NULL: return None return value_factory(_value) else: self._value_error() @properties.setter def properties(self, AMQPValue value): if c_connection.connection_set_properties(self._c_value, value._c_value) != 0: self._value_error() @property def remote_max_frame_size(self): cdef stdint.uint32_t _value if c_connection.connection_get_remote_max_frame_size(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: self._value_error() #### Callback cdef void on_connection_state_changed(void* context, c_connection.CONNECTION_STATE_TAG new_connection_state, c_connection.CONNECTION_STATE_TAG previous_connection_state): if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call on_connection_state_changed during garbage collection") return context_obj = context try: context_obj._state_changed(previous_connection_state, new_connection_state) except AttributeError: _logger.info("Unknown connection state changed: %r to %r", previous_connection_state, new_connection_state) cdef void on_io_error(void* context): if context != NULL: context_obj = context if hasattr(context_obj, '_io_error'): context_obj._io_error() cdef void on_connection_close_received(void* context, c_amqp_definitions.ERROR_HANDLE error): cdef c_amqp_definitions.ERROR_HANDLE cloned context_obj = context if error != NULL: cloned = c_amqp_definitions.error_clone(error) wrapped_error = error_factory(cloned) else: wrapped_error = None if hasattr(context_obj, '_close_received'): context_obj._close_received(wrapped_error) azure-uamqp-python-1.2.6/src/constants.pyx000066400000000000000000000144741362133436400206720ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports from enum import Enum import logging # C imports cimport c_amqp_definitions cimport c_message_receiver cimport c_cbs cimport c_xio cimport c_amqp_management APACHE = "apache.org" AMQP_BATCH_MESSAGE_FORMAT = 0x80013700 AMQPS_PORT = 5671 AMQP_WSS_PORT = 443 AUTH_EXPIRATION_SECS = 60 * 60 AUTH_REFRESH_SECS = 48 * 60 # 80% of expiration period MAX_PARTITION_KEY_LENGTH = 128 MAX_MESSAGE_LENGTH_BYTES = 1024 * 1024 MAX_FRAME_SIZE_BYTES = 64 * 1024 ROLE_SENDER = c_amqp_definitions.role_sender ROLE_RECEIVER = c_amqp_definitions.role_receiver SENDER_SETTLE_MODE_UNSETTLED = c_amqp_definitions.sender_settle_mode_unsettled SENDER_SETTLE_MODE_SETTLED = c_amqp_definitions.sender_settle_mode_settled SENDER_SETTLE_MODE_MIXED = c_amqp_definitions.sender_settle_mode_mixed RECEIVER_SETTLE_MODE_RECEIVEANDDELETE = c_amqp_definitions.receiver_settle_mode_first RECEIVER_SETTLE_MODE_PEEKLOCK = c_amqp_definitions.receiver_settle_mode_second CBS_OPERATION_RESULT_OK = c_cbs.CBS_OPERATION_RESULT_TAG.CBS_OPERATION_RESULT_OK CBS_OPERATION_RESULT_CBS_ERROR = c_cbs.CBS_OPERATION_RESULT_TAG.CBS_OPERATION_RESULT_CBS_ERROR CBS_OPERATION_RESULT_OPERATION_FAILED = c_cbs.CBS_OPERATION_RESULT_TAG.CBS_OPERATION_RESULT_OPERATION_FAILED CBS_OPERATION_RESULT_INSTANCE_CLOSED = c_cbs.CBS_OPERATION_RESULT_TAG.CBS_OPERATION_RESULT_INSTANCE_CLOSED CBS_OPEN_COMPLETE_OK = c_cbs.CBS_OPEN_COMPLETE_RESULT_TAG.CBS_OPEN_OK CBS_OPEN_COMPLETE_ERROR = c_cbs.CBS_OPEN_COMPLETE_RESULT_TAG.CBS_OPEN_ERROR CBS_OPEN_COMPLETE_CANCELLED = c_cbs.CBS_OPEN_COMPLETE_RESULT_TAG.CBS_OPEN_CANCELLED MESSAGE_RECEIVER_STATE_IDLE = c_message_receiver.MESSAGE_RECEIVER_STATE_TAG.MESSAGE_RECEIVER_STATE_IDLE MESSAGE_RECEIVER_STATE_OPENING = c_message_receiver.MESSAGE_RECEIVER_STATE_TAG.MESSAGE_RECEIVER_STATE_OPENING MESSAGE_RECEIVER_STATE_OPEN = c_message_receiver.MESSAGE_RECEIVER_STATE_TAG.MESSAGE_RECEIVER_STATE_OPEN MESSAGE_RECEIVER_STATE_CLOSING = c_message_receiver.MESSAGE_RECEIVER_STATE_TAG.MESSAGE_RECEIVER_STATE_CLOSING MESSAGE_RECEIVER_STATE_ERROR = c_message_receiver.MESSAGE_RECEIVER_STATE_TAG.MESSAGE_RECEIVER_STATE_ERROR MESSAGE_SEND_OK = c_message_sender.MESSAGE_SEND_RESULT_TAG.MESSAGE_SEND_OK MESSAGE_SEND_ERROR = c_message_sender.MESSAGE_SEND_RESULT_TAG.MESSAGE_SEND_ERROR MESSAGE_SEND_TIMEOUT = c_message_sender.MESSAGE_SEND_RESULT_TAG.MESSAGE_SEND_TIMEOUT MESSAGE_SEND_CANCELLED = c_message_sender.MESSAGE_SEND_RESULT_TAG.MESSAGE_SEND_CANCELLED MESSAGE_SENDER_STATE_IDLE = c_message_sender.MESSAGE_SENDER_STATE_TAG.MESSAGE_SENDER_STATE_IDLE MESSAGE_SENDER_STATE_OPENING = c_message_sender.MESSAGE_SENDER_STATE_TAG.MESSAGE_SENDER_STATE_OPENING MESSAGE_SENDER_STATE_OPEN = c_message_sender.MESSAGE_SENDER_STATE_TAG.MESSAGE_SENDER_STATE_OPEN MESSAGE_SENDER_STATE_CLOSING = c_message_sender.MESSAGE_SENDER_STATE_TAG.MESSAGE_SENDER_STATE_CLOSING MESSAGE_SENDER_STATE_ERROR = c_message_sender.MESSAGE_SENDER_STATE_TAG.MESSAGE_SENDER_STATE_ERROR IO_SEND_RESULT_OK = c_xio.IO_SEND_RESULT_TAG.IO_SEND_OK IO_SEND_RESULT_ERROR = c_xio.IO_SEND_RESULT_TAG.IO_SEND_ERROR IO_SEND_RESULT_CANCELLED = c_xio.IO_SEND_RESULT_TAG.IO_SEND_CANCELLED IO_OPEN_RESULT_OK = c_xio.IO_OPEN_RESULT_TAG.IO_OPEN_OK IO_OPEN_RESULT_ERROR = c_xio.IO_OPEN_RESULT_TAG.IO_OPEN_ERROR IO_OPEN_RESULT_CANCELLED = c_xio.IO_OPEN_RESULT_TAG.IO_OPEN_CANCELLED AMQP_MANAGEMENT_EXECUTE_OPERATION_OK = c_amqp_management.AMQP_MANAGEMENT_EXECUTE_OPERATION_RESULT_TAG.AMQP_MANAGEMENT_EXECUTE_OPERATION_OK AMQP_MANAGEMENT_EXECUTE_OPERATION_ERROR = c_amqp_management.AMQP_MANAGEMENT_EXECUTE_OPERATION_RESULT_TAG.AMQP_MANAGEMENT_EXECUTE_OPERATION_ERROR AMQP_MANAGEMENT_EXECUTE_OPERATION_FAILED_BAD_STATUS = c_amqp_management.AMQP_MANAGEMENT_EXECUTE_OPERATION_RESULT_TAG.AMQP_MANAGEMENT_EXECUTE_OPERATION_FAILED_BAD_STATUS AMQP_MANAGEMENT_EXECUTE_OPERATION_INSTANCE_CLOSED = c_amqp_management.AMQP_MANAGEMENT_EXECUTE_OPERATION_RESULT_TAG.AMQP_MANAGEMENT_EXECUTE_OPERATION_INSTANCE_CLOSED AMQP_MANAGEMENT_OPEN_OK = c_amqp_management.AMQP_MANAGEMENT_OPEN_RESULT_TAG.AMQP_MANAGEMENT_OPEN_OK AMQP_MANAGEMENT_OPEN_ERROR = c_amqp_management.AMQP_MANAGEMENT_OPEN_RESULT_TAG.AMQP_MANAGEMENT_OPEN_ERROR AMQP_MANAGEMENT_OPEN_CANCELLED = c_amqp_management.AMQP_MANAGEMENT_OPEN_RESULT_TAG.AMQP_MANAGEMENT_OPEN_CANCELLED AUTH_STATUS_OK = c_cbs.AUTH_STATUS.AUTH_STATUS_OK AUTH_STATUS_IDLE = c_cbs.AUTH_STATUS.AUTH_STATUS_IDLE AUTH_STATUS_IN_PROGRESS = c_cbs.AUTH_STATUS.AUTH_STATUS_IN_PROGRESS AUTH_STATUS_TIMEOUT = c_cbs.AUTH_STATUS.AUTH_STATUS_TIMEOUT AUTH_STATUS_REFRESH_REQUIRED = c_cbs.AUTH_STATUS.AUTH_STATUS_REFRESH_REQUIRED AUTH_STATUS_EXPIRED = c_cbs.AUTH_STATUS.AUTH_STATUS_EXPIRED AUTH_STATUS_ERROR = c_cbs.AUTH_STATUS.AUTH_STATUS_ERROR AUTH_STATUS_FAILURE = c_cbs.AUTH_STATUS.AUTH_STATUS_FAILURE #### Errors SESSION_ERROR_WINDOW_VIOLATION = "amqp:session:window-violation" SESSION_ERROR_ERRANT_LINK = "amqp:session:errant-link" SESSION_ERROR_HANDLE_IN_USE = "amqp:session:handle-in-use" SESSION_ERROR_UNATTACHED_HANDLE = "amqp:session:unattached-handle" LINK_ERROR_DETACH_FORCED = "amqp:link:detach-forced" LINK_ERROR_TRANSFER_LIMIT_EXCEEDED = "amqp:link:transfer-limit-exceeded" LINK_ERROR_MESSAGE_SIZE_EXCEEDED = "amqp:link:message-size-exceeded" LINK_ERROR_REDIRECT = "amqp:link:redirect" LINK_ERROR_STOLEN = "amqp:link:stolen" CONNECTION_ERROR_CONNECTION_FORCED = "amqp:connection:forced" CONNECTION_ERROR_FRAMING_ERROR = "amqp:connection:framing-error" CONNECTION_ERROR_REDIRECT = "amqp:connection:redirect" AMQP_ERROR_INTERNAL_ERROR = "amqp:internal-error" AMQP_ERROR_NOT_FOUND = "amqp:not-found" AMQP_ERROR_UNAUTHORIZED_ACCESS = "amqp:unauthorized-access" AMQP_ERROR_DECODE_ERROR = "amqp:decode-error" AMQP_ERROR_RESOURCE_LIMIT_EXCEEDED = "amqp:resource-limit-exceeded" AMQP_ERROR_NOT_ALLOWED = "amqp:not-allowed" AMQP_ERROR_INVALID_FIELD = "amqp:invalid-field" AMQP_ERROR_NOT_IMPLEMENTED = "amqp:not-implemented" AMQP_ERROR_RESOURCE_LOCKED = "amqp:resource-locked" AMQP_ERROR_PRECONDITION_FAILED = "amqp:precondition-failed" AMQP_ERROR_RESOURCE_DELETED = "amqp:resource-deleted" AMQP_ERROR_ILLEGAL_STATE = "amqp:illegal-state" AMQP_ERROR_FRAME_SIZE_TOO_SMALL = "amqp:frame-size-too-small" azure-uamqp-python-1.2.6/src/error.pyx000066400000000000000000000056771362133436400200140ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging import copy # C imports cimport c_amqp_definitions cimport c_amqpvalue _logger = logging.getLogger(__name__) cpdef create_error(const char* condition_value): new_error = cError() new_error.create(condition_value) return new_error cdef error_factory(c_amqp_definitions.ERROR_HANDLE error): wrapper = cError() wrapper.wrap(error) return wrapper cdef class cError(StructBase): cdef c_amqp_definitions.ERROR_HANDLE _c_value def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating cError") #self.destroy() cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cError") c_amqp_definitions.error_destroy(self._c_value) self._c_value = NULL cdef wrap(self, c_amqp_definitions.ERROR_HANDLE value): self.destroy() self._c_value = value self._create() cdef create(self, const char* condition_value): self.destroy() self._c_value = c_amqp_definitions.error_create(condition_value) self._create() @property def condition(self): cdef const char* condition_value if c_amqp_definitions.error_get_condition(self._c_value, &condition_value) != 0: self._value_error() return condition_value @condition.setter def condition(self, const char* condition_value): if c_amqp_definitions.error_set_condition(self._c_value, condition_value) != 0: self._value_error() @property def description(self): cdef const char* description_value if c_amqp_definitions.error_get_description(self._c_value, &description_value) != 0: return None return description_value @description.setter def description(self, const char* description_value): if c_amqp_definitions.error_set_description(self._c_value, description_value) != 0: self._value_error() @property def info(self): cdef c_amqp_definitions.fields info_value if c_amqp_definitions.error_get_info(self._c_value, &info_value) != 0: return None try: info = value_factory(info_value) return copy.deepcopy(info.value) except TypeError: return None @info.setter def info(self, AMQPValue info_value): if c_amqp_definitions.error_set_info(self._c_value, info_value._c_value) != 0: self._value_error()azure-uamqp-python-1.2.6/src/header.pyx000066400000000000000000000103021362133436400200700ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports from libc cimport stdint cimport c_amqpvalue cimport c_amqp_definitions _logger = logging.getLogger(__name__) cpdef create_header(): new_header = cHeader() return new_header cdef class cHeader(StructBase): cdef c_amqp_definitions.HEADER_HANDLE _c_value def __cinit__(self): self._c_value = c_amqp_definitions.header_create() self._validate() def __dealloc__(self): _logger.debug("Deallocating cHeader") self.destroy() cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): try: if self._c_value is not NULL: _logger.debug("Destroying cHeader") c_amqp_definitions.header_destroy(self._c_value) except KeyboardInterrupt: pass finally: self._c_value = NULL cdef wrap(self, c_amqp_definitions.HEADER_HANDLE value): self.destroy() self._c_value = value self._validate() cpdef clone(self): cdef c_amqp_definitions.HEADER_HANDLE value value = c_amqp_definitions.header_clone(self._c_value) if value == NULL: self._value_error() new_obj = cHeader() new_obj.wrap(value) return new_obj @property def delivery_count(self): cdef stdint.uint32_t _value if c_amqp_definitions.header_get_delivery_count(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @delivery_count.setter def delivery_count(self, stdint.uint32_t value): if c_amqp_definitions.header_set_delivery_count( self._c_value, value) != 0: self._value_error("Couldn't set 'delivery_count'.") @property def time_to_live(self): cdef c_amqp_definitions.milliseconds _value if c_amqp_definitions.header_get_ttl(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @time_to_live.setter def time_to_live(self, c_amqp_definitions.milliseconds value): if c_amqp_definitions.header_set_ttl( self._c_value, value) != 0: self._value_error("Couldn't set 'time_to_live'.") @property def durable(self): cdef bint _value if c_amqp_definitions.header_get_durable(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @durable.setter def durable(self, bint value): if c_amqp_definitions.header_set_durable( self._c_value, value) != 0: self._value_error("Couldn't set 'durable'.") @property def first_acquirer(self): cdef bint _value if c_amqp_definitions.header_get_first_acquirer(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @first_acquirer.setter def first_acquirer(self, bint value): if c_amqp_definitions.header_set_first_acquirer( self._c_value, value) != 0: self._value_error("Couldn't set 'first_acquirer'.") @property def priority(self): cdef stdint.uint8_t _value if c_amqp_definitions.header_get_priority(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @priority.setter def priority(self, stdint.uint8_t value): if c_amqp_definitions.header_set_priority( self._c_value, value) != 0: self._value_error("Couldn't set 'priority'.")azure-uamqp-python-1.2.6/src/link.pyx000066400000000000000000000142551362133436400176100ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports from libc cimport stdint cimport c_link cimport c_session cimport c_amqp_definitions cimport c_amqpvalue _logger = logging.getLogger(__name__) cpdef create_link(cSession session, const char* name, bint role, AMQPValue source, AMQPValue target): new_link = cLink() new_link.create(session, name, role, source._c_value, target._c_value) return new_link cdef class cLink(StructBase): cdef c_link.LINK_HANDLE _c_value cdef c_link.ON_LINK_DETACH_EVENT_SUBSCRIPTION_HANDLE _detach_event cdef cSession _session def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating cLink") self.destroy() def __enter__(self): return self def __exit__(self, *args): self.destroy() cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cLink") c_link.link_destroy(self._c_value) self._c_value = NULL self._session = None cdef wrap(self, cLink value): self.destroy() self._session = value._session self._c_value = value._c_value self._create() cdef create(self, cSession session, const char* name, c_amqp_definitions.role role, c_amqpvalue.AMQP_VALUE source, c_amqpvalue.AMQP_VALUE target): self.destroy() self._session = session self._c_value = c_link.link_create(session._c_value, name, role, source, target) self._create() cpdef subscribe_to_detach_event(self, on_detch_received): self._detach_event = c_link.link_subscribe_on_link_detach_received( self._c_value, on_link_detach_received, on_detch_received) if self._detach_event == NULL: self._value_error("Unable to register DETACH event handler.") cpdef unsubscribe_to_detach_event(self): c_link.link_unsubscribe_on_link_detach_received(self._detach_event) @property def send_settle_mode(self): cdef c_amqp_definitions.sender_settle_mode snd_settle_mode if c_link.link_get_snd_settle_mode(self._c_value, &snd_settle_mode) != 0: self._value_error() return snd_settle_mode @send_settle_mode.setter def send_settle_mode(self, stdint.uint8_t value): if c_link.link_set_snd_settle_mode(self._c_value, value) != 0: self._value_error() @property def receive_settle_mode(self): cdef c_amqp_definitions.receiver_settle_mode rcv_settle_mode if c_link.link_get_rcv_settle_mode(self._c_value, &rcv_settle_mode) != 0: self._value_error() return rcv_settle_mode @receive_settle_mode.setter def receive_settle_mode(self, stdint.uint8_t value): if c_link.link_set_rcv_settle_mode(self._c_value, value) != 0: self._value_error() @property def max_message_size(self): cdef stdint.uint64_t value if c_link.link_get_max_message_size(self._c_value, &value) != 0: self._value_error() return value @max_message_size.setter def max_message_size(self, stdint.uint64_t value): if c_link.link_set_max_message_size(self._c_value, value) != 0: self._value_error() @property def initial_delivery_count(self): cdef c_amqp_definitions.sequence_no value if c_link.link_get_initial_delivery_count(self._c_value, &value) != 0: self._value_error() return value @initial_delivery_count.setter def initial_delivery_count(self, c_amqp_definitions.sequence_no value): if c_link.link_set_initial_delivery_count(self._c_value, value) != 0: self._value_error() @property def peer_max_message_size(self): cdef stdint.uint64_t value if c_link.link_get_peer_max_message_size(self._c_value, &value) != 0: self._value_error() return value @property def name(self): cdef const char* value if c_link.link_get_name(self._c_value, &value) != 0: self._value_error() return value @property def desired_capabilities(self): cdef c_amqpvalue.AMQP_VALUE value if c_link.link_get_desired_capabilities(self._c_value, &value) != 0: self._value_error() return value_factory(value) cpdef do_work(self): c_link.link_dowork(self._c_value) cpdef set_prefetch_count(self, stdint.uint32_t prefetch): if c_link.link_set_max_link_credit(self._c_value, prefetch) != 0: self._value_error("Unable to set link credit.") cpdef set_attach_properties(self, AMQPValue properties): if c_link.link_set_attach_properties(self._c_value, properties._c_value) != 0: self._value_error("Unable to set link attach properties.") cpdef set_desired_capabilities(self, AMQPValue desired_capabilities): if c_link.link_set_desired_capabilities(self._c_value, desired_capabilities._c_value) != 0: self._value_error("Unable to set link desired capabilities.") #### Callback cdef void on_link_detach_received(void* context, c_amqp_definitions.ERROR_HANDLE error): cdef c_amqp_definitions.ERROR_HANDLE cloned context_obj = context if error != NULL: cloned = c_amqp_definitions.error_clone(error) wrapped_error = error_factory(cloned) else: wrapped_error = None if hasattr(context_obj, '_detach_received'): context_obj._detach_received(wrapped_error) azure-uamqp-python-1.2.6/src/message.pyx000066400000000000000000001106351362133436400202760ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports from enum import Enum import logging # C imports from libc cimport stdint cimport c_message cimport c_amqp_definitions cimport c_amqpvalue _logger = logging.getLogger(__name__) class MessageBodyType(Enum): NoneType = c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_NONE DataType = c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_DATA SequenceType = c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_SEQUENCE ValueType = c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_VALUE cdef message_factory(c_message.MESSAGE_HANDLE value): new_message = cMessage() new_message.wrap(value) return new_message cpdef create_message(): new_message = cMessage() new_message.create() return new_message cdef class cMessage(StructBase): cdef c_message.MESSAGE_HANDLE _c_value def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating cMessage") self.destroy() cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): try: if self._c_value is not NULL: _logger.debug("Destroying cMessage") c_message.message_destroy(self._c_value) except KeyboardInterrupt: pass finally: self._c_value = NULL cdef wrap(self, c_message.MESSAGE_HANDLE value): self.destroy() self._c_value = value self._create() cdef create(self): self.destroy() self._c_value = c_message.message_create() self._create() cpdef clone(self): cdef c_message.MESSAGE_HANDLE value value = c_message.message_clone(self._c_value) if value == NULL: self._value_error() return message_factory(value) @property def header(self): cdef c_amqp_definitions.HEADER_HANDLE value if c_message.message_get_header(self._c_value, &value) == 0: if value == NULL: return None new_obj = cHeader() new_obj.wrap(value) return new_obj else: self._value_error() @header.setter def header(self, cHeader value): if value is None: if c_message.message_set_header( self._c_value, NULL) != 0: self._value_error() elif c_message.message_set_header( self._c_value, value._c_value) != 0: self._value_error() @property def delivery_annotations(self): cdef c_amqp_definitions.delivery_annotations value if c_message.message_get_delivery_annotations(self._c_value, &value) == 0: if value == NULL: return None new_obj = cDeliveryAnnotations() new_obj.wrap(value) return new_obj else: self._value_error() @delivery_annotations.setter def delivery_annotations(self, cDeliveryAnnotations value): if value is None: if c_message.message_set_delivery_annotations( self._c_value, NULL) != 0: self._value_error() elif c_message.message_set_delivery_annotations( self._c_value, value._c_value) != 0: self._value_error() @property def message_annotations(self): cdef c_amqp_definitions.message_annotations value if c_message.message_get_message_annotations(self._c_value, &value) == 0: if value == NULL: return None new_obj = cMessageAnnotations() new_obj.wrap(value) return new_obj else: self._value_error() @message_annotations.setter def message_annotations(self, cMessageAnnotations value): if value is None: if c_message.message_set_message_annotations( self._c_value, NULL) != 0: self._value_error() elif c_message.message_set_message_annotations( self._c_value, value._c_value) != 0: self._value_error() @property def properties(self): cdef c_amqp_definitions.PROPERTIES_HANDLE value if c_message.message_get_properties(self._c_value, &value) == 0: if value == NULL: return None new_obj = cProperties() new_obj.wrap(value) return new_obj else: self._value_error() @properties.setter def properties(self, cProperties value): if value is None: if c_message.message_set_properties( self._c_value, NULL) != 0: self._value_error() elif c_message.message_set_properties( self._c_value, value._c_value) != 0: self._value_error() @property def application_properties(self): cdef c_amqpvalue.AMQP_VALUE value if c_message.message_get_application_properties(self._c_value, &value) == 0: if value == NULL: return None new_obj = cApplicationProperties() new_obj.wrap(value) return new_obj else: self._value_error() @application_properties.setter def application_properties(self, AMQPValue value): if value is None: if c_message.message_set_application_properties( self._c_value, NULL) != 0: self._value_error() elif c_message.message_set_application_properties( self._c_value, value._c_value) != 0: self._value_error() @property def footer(self): cdef c_amqp_definitions.annotations value if c_message.message_get_footer(self._c_value, &value) == 0: if value == NULL: return None new_obj = cFooter() new_obj.wrap(value) return new_obj else: self._value_error() @footer.setter def footer(self, cFooter value): if value is None: if c_message.message_set_footer( self._c_value, NULL) != 0: self._value_error() elif c_message.message_set_footer( self._c_value, value._c_value) != 0: self._value_error() @property def body_type(self): cdef c_message.MESSAGE_BODY_TYPE_TAG value if c_message.message_get_body_type(self._c_value, &value) == 0: return MessageBodyType(value) else: self._value_error() @property def message_format(self): cdef stdint.uint32_t value if c_message.message_get_message_format(self._c_value, &value) == 0: return value else: self._value_error() @message_format.setter def message_format(self, stdint.uint32_t value): if c_message.message_set_message_format(self._c_value, value) != 0: self._value_error() @property def delivery_tag(self): cdef c_amqpvalue.AMQP_VALUE value if c_message.message_get_delivery_tag(self._c_value, &value) == 0: if value == NULL: return None return value_factory(value) else: self._value_error() cpdef add_body_data(self, bytes value): cdef c_message.BINARY_DATA _binary length = len(value) bytes = value[:length] _binary.length = length _binary.bytes = bytes if c_message.message_add_body_amqp_data(self._c_value, _binary) != 0: self._value_error() cpdef get_body_data(self, size_t index): cdef c_message.BINARY_DATA _value if c_message.message_get_body_amqp_data_in_place(self._c_value, index, &_value) == 0: return _value.bytes[:_value.length] else: self._value_error() cpdef count_body_data(self): cdef size_t body_count if c_message.message_get_body_amqp_data_count(self._c_value, &body_count) == 0: return body_count else: self._value_error() cpdef set_body_value(self, AMQPValue value): if c_message.message_set_body_amqp_value(self._c_value, value._c_value) != 0: self._value_error() cpdef get_body_value(self): cdef c_amqpvalue.AMQP_VALUE _value cdef c_amqpvalue.AMQP_VALUE cloned if c_message.message_get_body_amqp_value_in_place(self._c_value, &_value) != 0: self._value_error() cloned = c_amqpvalue.amqpvalue_clone(_value) if cloned == NULL: self._value_error() return value_factory(cloned) cpdef add_body_sequence(self, AMQPValue sequence): if c_message.message_add_body_amqp_sequence(self._c_value, sequence._c_value) != 0: self._value_error() cpdef get_body_sequence(self, size_t index): cdef c_amqpvalue.AMQP_VALUE _value if c_message.message_get_body_amqp_sequence_in_place(self._c_value, index, &_value) == 0: return value_factory(_value) else: self._value_error() cpdef count_body_sequence(self): cdef size_t body_count if c_message.message_get_body_amqp_sequence_count(self._c_value, &body_count) == 0: return body_count else: self._value_error() cdef class Messaging(object): @staticmethod def create_source(const char* address): cdef c_amqpvalue.AMQP_VALUE _value _value = c_message.messaging_create_source(address) if _value == NULL: raise MemoryError("Failed to allocate memory for messaging source.") return value_factory(_value) @staticmethod def create_target(const char* address): cdef c_amqpvalue.AMQP_VALUE _value _value = c_message.messaging_create_target(address) if _value == NULL: raise MemoryError("Failed to allocate memory for messaging target.") return value_factory(_value) @staticmethod def delivery_received(stdint.uint32_t section_number, stdint.uint64_t section_offset): cdef c_amqpvalue.AMQP_VALUE _value _value = c_message.messaging_delivery_received(section_number, section_offset) if _value == NULL: raise MemoryError("Failed to allocate memory for received delivery.") return value_factory(_value) @staticmethod def delivery_accepted(): cdef c_amqpvalue.AMQP_VALUE _value _value = c_message.messaging_delivery_accepted() if _value == NULL: raise MemoryError("Failed to allocate memory for accepted delivery.") return value_factory(_value) @staticmethod def delivery_rejected(const char* error_condition, const char* error_description): cdef c_amqpvalue.AMQP_VALUE _value _value = c_message.messaging_delivery_rejected(error_condition, error_description) if _value == NULL: raise MemoryError("Failed to allocate memory for rejected delivery.") return value_factory(_value) @staticmethod def delivery_released(): cdef c_amqpvalue.AMQP_VALUE _value _value = c_message.messaging_delivery_released() if _value == NULL: raise MemoryError("Failed to allocate memory for released delivery.") return value_factory(_value) @staticmethod def delivery_modified(bint delivery_failed, bint undeliverable_here, cFields message_annotations): _logger.debug("delivery modified: %r %r", delivery_failed, undeliverable_here) cdef c_amqpvalue.AMQP_VALUE _value _value = c_message.messaging_delivery_modified(delivery_failed, undeliverable_here, message_annotations._c_value) if _value == NULL: raise MemoryError("Failed to allocate memory for modified delivery.") return value_factory(_value) cdef void destroy_amqp_objects_in_get_encoded_message_size(c_amqp_definitions.HEADER_HANDLE header, c_amqpvalue.AMQP_VALUE header_amqp_value, c_amqpvalue.AMQP_VALUE msg_annotations, c_amqp_definitions.PROPERTIES_HANDLE properties, c_amqpvalue.AMQP_VALUE properties_amqp_value, c_amqpvalue.AMQP_VALUE application_properties, c_amqpvalue.AMQP_VALUE application_properties_value, c_amqpvalue.AMQP_VALUE body_amqp_value): if header != NULL: c_amqp_definitions.header_destroy(header) if header_amqp_value != NULL: c_amqpvalue.amqpvalue_destroy(header_amqp_value) if msg_annotations != NULL: c_amqpvalue.amqpvalue_destroy(msg_annotations) if properties != NULL: c_amqp_definitions.properties_destroy(properties) if properties_amqp_value != NULL: c_amqpvalue.amqpvalue_destroy(properties_amqp_value) if application_properties != NULL: c_amqpvalue.amqpvalue_destroy(application_properties) if application_properties_value != NULL: c_amqpvalue.amqpvalue_destroy(application_properties_value) if body_amqp_value != NULL: c_amqpvalue.amqpvalue_destroy(body_amqp_value) cpdef size_t get_encoded_message_size(cMessage message, encoded_data): cdef c_message.MESSAGE_HANDLE c_msg c_msg = message._c_value cdef c_message.MESSAGE_BODY_TYPE_TAG message_body_type cdef c_amqp_definitions.message_format message_format cdef c_amqp_definitions.HEADER_HANDLE header = NULL cdef c_amqpvalue.AMQP_VALUE header_amqp_value = NULL cdef c_amqp_definitions.PROPERTIES_HANDLE properties = NULL cdef c_amqpvalue.AMQP_VALUE properties_amqp_value = NULL cdef c_amqpvalue.AMQP_VALUE application_properties = NULL cdef c_amqpvalue.AMQP_VALUE application_properties_value = NULL cdef c_amqpvalue.AMQP_VALUE body_amqp_value = NULL cdef c_amqpvalue.AMQP_VALUE msg_annotations = NULL cdef c_amqpvalue.AMQP_VALUE message_body_amqp_value cdef c_message.BINARY_DATA binary_data cdef c_amqpvalue.AMQP_VALUE body_amqp_data cdef c_amqpvalue.amqp_binary binary_value cdef size_t encoded_size cdef size_t total_encoded_size = 0 cdef size_t body_data_count = 0 # message format if (c_message.message_get_body_type(c_msg, &message_body_type) != 0) or (c_message.message_get_message_format(c_msg, &message_format) != 0): raise ValueError("Failure getting message body type and/or message format") # message header if c_message.message_get_header(c_msg, &header) == 0 and header != NULL: header_amqp_value = c_amqp_definitions.amqpvalue_create_header(header) if header_amqp_value == NULL: _logger.debug("Cannot create header AMQP value") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise MemoryError("Cannot get cMessage header.") else: if c_amqpvalue.amqpvalue_get_encoded_size(header_amqp_value, &encoded_size) != 0: _logger.debug("Cannot obtain header encoded size") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot obtain header encoded size") else: total_encoded_size += encoded_size # message annotations if c_message.message_get_message_annotations(c_msg, &msg_annotations) == 0 and msg_annotations != NULL: if c_amqpvalue.amqpvalue_get_encoded_size(msg_annotations, &encoded_size) != 0: _logger.debug("Cannot obtain message annotations encoded size") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot obtain message annotations encoded size") else: total_encoded_size += encoded_size # properties if c_message.message_get_properties(c_msg, &properties) == 0 and properties != NULL: properties_amqp_value = c_amqp_definitions.amqpvalue_create_properties(properties) if properties_amqp_value == NULL: _logger.debug("Cannot create properties AMQP value") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise MemoryError("Cannot get cMessage properties.") else: if c_amqpvalue.amqpvalue_get_encoded_size(properties_amqp_value, &encoded_size) != 0: _logger.debug("Cannot obtain message properties encoded size") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot obtain message properties encoded size") else: total_encoded_size += encoded_size # application properties if c_message.message_get_application_properties(c_msg, &application_properties) == 0 and application_properties != NULL: application_properties_value = c_amqp_definitions.amqpvalue_create_application_properties(application_properties) if application_properties_value == NULL: _logger.debug("Cannot create application properties AMQP value") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise MemoryError("Cannot get cMessage application properties.") else: if c_amqpvalue.amqpvalue_get_encoded_size(application_properties_value, &encoded_size) != 0: _logger.debug("Cannot obtain application properties encoded size") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot obtain application properties encoded size") else: total_encoded_size += encoded_size # value body if message_body_type == c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_VALUE: if c_message.message_get_body_amqp_value_in_place(c_msg, &message_body_amqp_value) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot obtain AMQP value from body") body_amqp_value = c_amqp_definitions.amqpvalue_create_amqp_value(message_body_amqp_value) if body_amqp_value == NULL: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise MemoryError("Cannot create body AMQP value") else: if c_amqpvalue.amqpvalue_get_encoded_size(body_amqp_value, &encoded_size) != 0: _logger.debug("Cannot get body AMQP value encoded size") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot get body AMQP value encoded size") else: total_encoded_size += encoded_size # data body if message_body_type == c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_DATA: if c_message.message_get_body_amqp_data_count(c_msg, &body_data_count) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot get body AMQP data count") if body_data_count == 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Body data count is zero") for i in range(body_data_count): if c_message.message_get_body_amqp_data_in_place(c_msg, i, &binary_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot get body AMQP data {}".format(i)) binary_value.bytes = binary_data.bytes binary_value.length = binary_data.length body_amqp_data = c_amqp_definitions.amqpvalue_create_data(binary_value) if body_amqp_data == NULL: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise MemoryError("Cannot create body AMQP data") else: if c_amqpvalue.amqpvalue_get_encoded_size(body_amqp_data, &encoded_size) != 0: _logger.debug("Cannot get body AMQP data encoded size") destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) c_amqpvalue.amqpvalue_destroy(body_amqp_data) raise ValueError("Cannot get body AMQP data encoded size") else: total_encoded_size += encoded_size c_amqpvalue.amqpvalue_destroy(body_amqp_data) # encode if header != NULL: if c_amqpvalue.amqpvalue_encode( header_amqp_value, encode_bytes_callback, encoded_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot encode header value") if msg_annotations != NULL: if c_amqpvalue.amqpvalue_encode( msg_annotations, encode_bytes_callback, encoded_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot encode message annotations value") if properties != NULL: if c_amqpvalue.amqpvalue_encode( properties_amqp_value, encode_bytes_callback, encoded_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot encode message properties value") if application_properties != NULL: if c_amqpvalue.amqpvalue_encode( application_properties_value, encode_bytes_callback, encoded_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot encode application properties value") if message_body_type == c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_VALUE: if c_amqpvalue.amqpvalue_encode( body_amqp_value, encode_bytes_callback, encoded_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot encode body AMQP value") if message_body_type == c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_DATA: for i in range(body_data_count): if c_message.message_get_body_amqp_data_in_place(c_msg, i, &binary_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise ValueError("Cannot get body AMQP data {}".format(i)) binary_value.bytes = binary_data.bytes binary_value.length = binary_data.length body_amqp_data = c_amqp_definitions.amqpvalue_create_data(binary_value) if body_amqp_data == NULL: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) raise MemoryError("Cannot create body AMQP data") else: if c_amqpvalue.amqpvalue_encode( body_amqp_data, encode_bytes_callback, encoded_data) != 0: destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) c_amqpvalue.amqpvalue_destroy(body_amqp_data) raise ValueError("Cannot encode body AMQP value") c_amqpvalue.amqpvalue_destroy(body_amqp_data) destroy_amqp_objects_in_get_encoded_message_size(header, header_amqp_value, msg_annotations, properties, properties_amqp_value, application_properties, application_properties_value, body_amqp_value) return total_encoded_size cdef class cMessageDecoder(object): cdef c_message.MESSAGE_HANDLE decoded_message cdef const char* decode_error def __cinit__(self): self.decoded_message = c_message.message_create() if self.decoded_message == NULL: raise MemoryError("Failed to create message decoder.") self.decode_error = NULL def __dealloc__(self): _logger.debug("Deallocating cMessageDecoder") cpdef cMessage decode_message(stdint.uint32_t payload_size, const unsigned char* payload_bytes): cdef c_amqpvalue.AMQPVALUE_DECODER_HANDLE amqpvalue_decoder cdef c_message.MESSAGE_HANDLE result message_decoder = cMessageDecoder() amqpvalue_decoder = c_amqpvalue.amqpvalue_decoder_create(decode_message_data, message_decoder); if amqpvalue_decoder == NULL: raise MemoryError("Cannot create AMQP value decoder") else: if c_amqpvalue.amqpvalue_decode_bytes(amqpvalue_decoder, payload_bytes, payload_size) != 0: raise ValueError("Cannot decode bytes") else: if message_decoder.decode_error != NULL: raise ValueError(message_decoder.decode_error.decode('UTF-8')) else: result = message_decoder.decoded_message c_amqpvalue.amqpvalue_decoder_destroy(amqpvalue_decoder) return message_factory(result) cdef void decode_message_data(void* context, c_amqpvalue.AMQP_VALUE decoded_value): message_decoder = context cdef c_message.MESSAGE_HANDLE decoded_message cdef c_amqpvalue.AMQP_VALUE descriptor cdef c_amqp_definitions.PROPERTIES_HANDLE properties cdef c_amqp_definitions.annotations delivery_annotations cdef c_amqp_definitions.annotations message_annotations cdef c_amqp_definitions.HEADER_HANDLE header cdef c_amqp_definitions.annotations footer cdef c_message.MESSAGE_BODY_TYPE_TAG body_type cdef c_amqpvalue.AMQP_VALUE body_amqp_value cdef c_amqpvalue.AMQP_VALUE body_data_value cdef c_amqp_definitions.data data_value cdef c_message.BINARY_DATA binary_data decoded_message = message_decoder.decoded_message descriptor = c_amqpvalue.amqpvalue_get_inplace_descriptor(decoded_value) if c_amqp_definitions.is_application_properties_type_by_descriptor(descriptor): if c_message.message_set_application_properties(decoded_message, decoded_value) != 0: message_decoder.decode_error = b"Error setting application properties on received message" elif c_amqp_definitions.is_properties_type_by_descriptor(descriptor): if c_amqp_definitions.amqpvalue_get_properties(decoded_value, &properties) != 0: message_decoder.decode_error = b"Error getting message properties" else: if c_message.message_set_properties(decoded_message, properties) != 0: message_decoder.decode_error = b"Error setting message properties on received message" c_amqp_definitions.properties_destroy(properties) elif c_amqp_definitions.is_delivery_annotations_type_by_descriptor(descriptor): delivery_annotations = c_amqpvalue.amqpvalue_get_inplace_described_value(decoded_value) if delivery_annotations == NULL: message_decoder.decode_error = b"Error getting delivery annotations" else: if c_message.message_set_delivery_annotations(decoded_message, delivery_annotations) != 0: message_decoder.decode_error = b"Error setting delivery annotations on received message" elif c_amqp_definitions.is_message_annotations_type_by_descriptor(descriptor): message_annotations = c_amqpvalue.amqpvalue_get_inplace_described_value(decoded_value) if message_annotations == NULL: message_decoder.decode_error = b"Error getting message annotations" else: if c_message.message_set_message_annotations(decoded_message, message_annotations) != 0: message_decoder.decode_error = b"Error setting message annotations on received message" elif c_amqp_definitions.is_header_type_by_descriptor(descriptor): if c_amqp_definitions.amqpvalue_get_header(decoded_value, &header) != 0: message_decoder.decode_error = b"Error getting message header" else: if c_message.message_set_header(decoded_message, header) != 0: message_decoder.decode_error = b"Error setting message header on received message" c_amqp_definitions.header_destroy(header) elif c_amqp_definitions.is_footer_type_by_descriptor(descriptor): footer = c_amqpvalue.amqpvalue_get_inplace_described_value(decoded_value); if footer == NULL: message_decoder.decode_error = b"Error getting message footer" else: if c_message.message_set_footer(decoded_message, footer) != 0: message_decoder.decode_error = b"Error setting message footer on received message" elif c_amqp_definitions.is_amqp_value_type_by_descriptor(descriptor): if c_message.message_get_body_type(decoded_message, &body_type) != 0: message_decoder.decode_error = b"Error getting message body type" else: if body_type != c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_NONE: message_decoder.decode_error = b"Body already set on received message" else: body_amqp_value = c_amqpvalue.amqpvalue_get_inplace_described_value(decoded_value) if body_amqp_value == NULL: message_decoder.decode_error = b"Error getting body AMQP value" else: if c_message.message_set_body_amqp_value(decoded_message, body_amqp_value) != 0: message_decoder.decode_error = b"Error setting body AMQP value on received message" elif c_amqp_definitions.is_data_type_by_descriptor(descriptor): if c_message.message_get_body_type(decoded_message, &body_type) != 0: message_decoder.decode_error = b"Error getting message body type" else: if (body_type != c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_NONE) and (body_type != c_message.MESSAGE_BODY_TYPE_TAG.MESSAGE_BODY_TYPE_DATA): message_decoder.decode_error = b"Message body type already set to something different than AMQP DATA" else: body_data_value = c_amqpvalue.amqpvalue_get_inplace_described_value(decoded_value) if body_data_value == NULL: message_decoder.decode_error = b"Error getting body DATA value" else: if c_amqpvalue.amqpvalue_get_binary(body_data_value, &data_value) != 0: message_decoder.decode_error = b"Error getting body DATA AMQP value" else: binary_data.bytes = data_value.bytes binary_data.length = data_value.length if c_message.message_add_body_amqp_data(decoded_message, binary_data) != 0: message_decoder.decode_error = b"Error adding body DATA to received message" azure-uamqp-python-1.2.6/src/message_receiver.pyx000066400000000000000000000155411362133436400221620ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports cimport c_message_receiver cimport c_message cimport c_link cimport c_amqpvalue _logger = logging.getLogger(__name__) cpdef create_message_receiver(cLink link, callback_context): receiver = cMessageReceiver() receiver.create(link, on_message_receiver_state_changed, callback_context) return receiver cdef class cMessageReceiver(StructBase): cdef c_message_receiver.MESSAGE_RECEIVER_HANDLE _c_value cdef const char* _link_name cdef cLink _link def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating cMessageReceiver") self.destroy() cdef _validate(self): if self._c_value is NULL: self._memory_error() cdef create(self, cLink link, c_message_receiver.ON_MESSAGE_RECEIVER_STATE_CHANGED on_message_sender_state_changed, void* context): self.destroy() self._link = link self._c_value = c_message_receiver.messagereceiver_create(link._c_value, on_message_sender_state_changed, context) self._validate() if c_message_receiver.messagereceiver_get_link_name(self._c_value, &self._link_name)!= 0: self._value_error("Unable to retrieve message receiver link name.") cpdef open(self, callback_context): if c_message_receiver.messagereceiver_open(self._c_value, on_message_received, callback_context) != 0: self._value_error() cpdef close(self): if c_message_receiver.messagereceiver_close(self._c_value) != 0: self._value_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cMessageReceiver") c_message_receiver.messagereceiver_destroy(self._c_value) self._c_value = NULL self._link = None cpdef last_received_message_number(self): cdef c_amqp_definitions.delivery_number message_number if c_message_receiver.messagereceiver_get_received_message_id(self._c_value, &message_number) != 0: self._value_error("Unable to retrieve last received message number.") return message_number cpdef settle_accepted_message(self, c_amqp_definitions.delivery_number message_number): cdef c_amqpvalue.AMQP_VALUE delivery_state delivery_state = c_message.messaging_delivery_accepted() if c_message_receiver.messagereceiver_send_message_disposition(self._c_value, self._link_name, message_number, delivery_state) != 0: raise RuntimeError("Unable to send message dispostition 'accepted' for message number {}".format(message_number)) c_amqpvalue.amqpvalue_destroy(delivery_state) cpdef settle_released_message(self, c_amqp_definitions.delivery_number message_number): cdef c_amqpvalue.AMQP_VALUE delivery_state delivery_state = c_message.messaging_delivery_released() if c_message_receiver.messagereceiver_send_message_disposition(self._c_value, self._link_name, message_number, delivery_state) != 0: raise RuntimeError("Unable to send message dispostition 'released' for message number {}".format(message_number)) c_amqpvalue.amqpvalue_destroy(delivery_state) cpdef settle_rejected_message(self, c_amqp_definitions.delivery_number message_number, const char* error_condition, const char* error_description): cdef c_amqpvalue.AMQP_VALUE delivery_state delivery_state = c_message.messaging_delivery_rejected(error_condition, error_description) if c_message_receiver.messagereceiver_send_message_disposition(self._c_value, self._link_name, message_number, delivery_state) != 0: raise RuntimeError("Unable to send message dispostition 'rejected' for message number {}".format(message_number)) c_amqpvalue.amqpvalue_destroy(delivery_state) cpdef settle_modified_message(self, c_amqp_definitions.delivery_number message_number, bint delivery_failed, bint undeliverable_here, AMQPValue annotations): cdef c_amqpvalue.AMQP_VALUE delivery_state cdef c_amqp_definitions.fields delivery_fields if annotations is not None: delivery_fields = annotations._c_value else: delivery_fields = NULL delivery_state = c_message.messaging_delivery_modified(delivery_failed, undeliverable_here, delivery_fields) if c_message_receiver.messagereceiver_send_message_disposition(self._c_value, self._link_name, message_number, delivery_state) != 0: raise RuntimeError("Unable to send message dispostition 'delivery-modified' for message number {}".format(message_number)) c_amqpvalue.amqpvalue_destroy(delivery_state) cdef wrap(self, cMessageReceiver value): self.destroy() self._link = value._link self._c_value = value._c_value self._validate() cpdef set_trace(self, bint value): c_message_receiver.messagereceiver_set_trace(self._c_value, value) #### Callbacks (context is a MessageReceiver instance) cdef void on_message_receiver_state_changed(void* context, c_message_receiver.MESSAGE_RECEIVER_STATE_TAG new_state, c_message_receiver.MESSAGE_RECEIVER_STATE_TAG previous_state): if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call on_state_changed during garbage collection, please be sure to close or use a context manager") return context_obj = context try: context_obj._state_changed(previous_state, new_state) except AttributeError: _logger.info("Unknown MessageReceiver state changed: %r to %r", previous_state, new_state) cdef c_amqpvalue.AMQP_VALUE on_message_received(void* context, c_message.MESSAGE_HANDLE message): cdef c_message.MESSAGE_HANDLE cloned cloned = c_message.message_clone(message) wrapped_message = message_factory(cloned) if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call _message_received during garbage collection") return NULL context_obj = context if hasattr(context_obj, '_message_received'): context_obj._message_received(wrapped_message) return NULL azure-uamqp-python-1.2.6/src/message_sender.pyx000066400000000000000000000111071362133436400216300ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging import copy # C imports from libc cimport stdint from cpython.ref cimport PyObject cimport c_message_sender cimport c_link cimport c_async_operation cimport c_amqpvalue _logger = logging.getLogger(__name__) cpdef create_message_sender(cLink link, callback_context): sender = cMessageSender() sender.create(link, on_message_sender_state_changed, callback_context) return sender cdef create_message_sender_with_callback(cLink link,c_message_sender.ON_MESSAGE_SENDER_STATE_CHANGED callback, void* callback_context): sender = cMessageSender() sender.create(link, callback, callback_context) return sender cdef class cMessageSender(StructBase): cdef c_message_sender.MESSAGE_SENDER_HANDLE _c_value cdef cLink _link def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating cMessageSender") self.destroy() def __enter__(self): self.open() return self def __exit__(self, *args): self.destroy() cpdef open(self): if c_message_sender.messagesender_open(self._c_value) != 0: self._value_error() cpdef close(self): if c_message_sender.messagesender_close(self._c_value) != 0: self._value_error() cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cMessageSender") c_message_sender.messagesender_destroy(self._c_value) self._c_value = NULL self._link = None cdef wrap(self, cMessageSender value): self.destroy() self._link = value._link self._c_value = value._c_value self._create() cdef create(self, cLink link, c_message_sender.ON_MESSAGE_SENDER_STATE_CHANGED on_message_sender_state_changed, void* context): self.destroy() self._link = link self._c_value = c_message_sender.messagesender_create(link._c_value, on_message_sender_state_changed, context) self._create() cpdef send(self, cMessage message, c_amqp_definitions.tickcounter_ms_t timeout, callback_context): operation = c_message_sender.messagesender_send_async(self._c_value, message._c_value, on_message_send_complete, callback_context, timeout) if operation is NULL: _logger.info("Send operation result is NULL") return False return True cpdef set_trace(self, bint value): c_message_sender.messagesender_set_trace(self._c_value, value) #### Callbacks (context is a MessageSender instance) cdef void on_message_send_complete(void* context, c_message_sender.MESSAGE_SEND_RESULT_TAG send_result, c_amqpvalue.AMQP_VALUE delivery_state): cdef c_amqpvalue.AMQP_VALUE send_data if delivery_state == NULL: wrapped = None else: send_data = c_amqpvalue.amqpvalue_clone(delivery_state) wrapped = copy.deepcopy(value_factory(send_data).value) if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call _on_message_sent during garbage collection") return context_obj = context if hasattr(context_obj, "_on_message_sent"): context_obj._on_message_sent(context_obj, send_result, delivery_state=wrapped) cdef void on_message_sender_state_changed(void* context, c_message_sender.MESSAGE_SENDER_STATE_TAG new_state, c_message_sender.MESSAGE_SENDER_STATE_TAG previous_state): if context != NULL: context_pyobj = context if context_pyobj.ob_refcnt == 0: # context is being garbage collected, skip the callback _logger.warning("Can't call on_state_changed during garbage collection, please be sure to close or use a context manager") return context_obj = context try: context_obj._state_changed(previous_state, new_state) except AttributeError: _logger.info("Unknown MessageSender state changed: %r to %r", previous_state, new_state) azure-uamqp-python-1.2.6/src/platform.pyx000066400000000000000000000022531362133436400204720ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports cimport c_strings cimport c_platform cimport c_xio cimport c_tlsio _logger = logging.getLogger(__name__) cpdef platform_init(): if c_platform.platform_init() != 0: raise ValueError("Failed to initialize platform.") cpdef platform_deinit(): _logger.debug("Deinitializing platform") c_platform.platform_deinit() cpdef get_info(): cdef c_strings.STRING_HANDLE str_info str_info = c_platform.platform_get_platform_info() info = AMQPString() info.wrap(str_info) return info cpdef get_default_tlsio(): cdef const c_xio.IO_INTERFACE_DESCRIPTION* io_desc io_desc = c_platform.platform_get_default_tlsio() if io_desc == NULL: raise ValueError("Failed to create tlsio description.") interface = IOInterfaceDescription() interface.wrap(io_desc) return interface azure-uamqp-python-1.2.6/src/properties.pyx000066400000000000000000000236701362133436400210500ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports from libc cimport stdint cimport c_amqpvalue cimport c_amqp_definitions cimport c_utils _logger = logging.getLogger(__name__) cpdef create_properties(): new_props = cProperties() return new_props cpdef load_properties(AMQPValue value): new_props = cProperties() new_props.load_from_value(value) return new_props cdef class cProperties(StructBase): cdef c_amqp_definitions.PROPERTIES_HANDLE _c_value def __cinit__(self): self._c_value = c_amqp_definitions.properties_create() self._validate() def __dealloc__(self): _logger.debug("Deallocating cProperties") self.destroy() cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): try: if self._c_value is not NULL: _logger.debug("Destroying cProperties") c_amqp_definitions.properties_destroy(self._c_value) except KeyboardInterrupt: pass finally: self._c_value = NULL cdef wrap(self, c_amqp_definitions.PROPERTIES_HANDLE value): self.destroy() self._c_value = value self._validate() cdef load_from_value(self, AMQPValue value): self.destroy() if c_amqp_definitions.amqpvalue_get_properties(value._c_value, &self._c_value) != 0: self._value_error() self._validate() cdef get_properties(self): cdef c_amqpvalue.AMQP_VALUE _value _value = c_amqp_definitions.amqpvalue_create_properties(self._c_value) if _value is NULL: return None return value_factory(_value) cpdef clone(self): cdef c_amqp_definitions.PROPERTIES_HANDLE value value = c_amqp_definitions.properties_clone(self._c_value) if value == NULL: self._value_error() new_obj = cProperties() new_obj.wrap(value) return new_obj @property def message_id(self): cdef c_amqpvalue.AMQP_VALUE _value cdef c_amqpvalue.AMQP_VALUE cloned if c_amqp_definitions.properties_get_message_id(self._c_value, &_value) == 0: if _value == NULL: return None cloned = c_amqpvalue.amqpvalue_clone(_value) if cloned == NULL: self._value_error() return value_factory(cloned) else: return None @message_id.setter def message_id(self, AMQPValue value): if c_amqp_definitions.properties_set_message_id( self._c_value, value._c_value) != 0: self._value_error("Could not set 'message_id'.") @property def user_id(self): cdef c_amqpvalue.amqp_binary _binary if c_amqp_definitions.properties_get_user_id(self._c_value, &_binary) == 0: return _binary.bytes else: return None @user_id.setter def user_id(self, char* value): cdef c_amqpvalue.amqp_binary _binary length = sizeof(value) _binary.length = length _binary.bytes = value if c_amqp_definitions.properties_set_user_id(self._c_value, _binary) != 0: self._value_error("Could not set 'user_id'.") @property def to(self): cdef c_amqpvalue.AMQP_VALUE _value cdef c_amqpvalue.AMQP_VALUE cloned if c_amqp_definitions.properties_get_to(self._c_value, &_value) == 0: if _value == NULL: return None cloned = c_amqpvalue.amqpvalue_clone(_value) if cloned == NULL: self._value_error() return value_factory(cloned) else: return None @to.setter def to(self, AMQPValue value): if c_amqp_definitions.properties_set_to( self._c_value, value._c_value) != 0: self._value_error("Could not set 'to'.") @property def subject(self): cdef char* _value if c_amqp_definitions.properties_get_subject(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @subject.setter def subject(self, char* value): if c_amqp_definitions.properties_set_subject( self._c_value, value) != 0: self._value_error("Could not set 'subject'.") @property def reply_to(self): cdef c_amqpvalue.AMQP_VALUE _value cdef c_amqpvalue.AMQP_VALUE cloned if c_amqp_definitions.properties_get_reply_to(self._c_value, &_value) == 0: if _value == NULL: return None cloned = c_amqpvalue.amqpvalue_clone(_value) if cloned == NULL: self._value_error() return value_factory(cloned) else: return None @reply_to.setter def reply_to(self, AMQPValue value): if c_amqp_definitions.properties_set_reply_to( self._c_value, value._c_value) != 0: self._value_error("Could not set 'reply_to'.") @property def correlation_id(self): cdef c_amqpvalue.AMQP_VALUE _value cdef c_amqpvalue.AMQP_VALUE cloned if c_amqp_definitions.properties_get_correlation_id(self._c_value, &_value) == 0: if _value == NULL: return None cloned = c_amqpvalue.amqpvalue_clone(_value) if cloned == NULL: self._value_error() return value_factory(cloned) else: return None @correlation_id.setter def correlation_id(self, AMQPValue value): if c_amqp_definitions.properties_set_correlation_id( self._c_value, value._c_value) != 0: self._value_error("Could not set 'correlation_id'.") @property def content_type(self): cdef char* _value if c_amqp_definitions.properties_get_content_type(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @content_type.setter def content_type(self, char* value): if c_amqp_definitions.properties_set_content_type( self._c_value, value) != 0: self._value_error("Could not set 'content_type'.") @property def content_encoding(self): cdef char* _value if c_amqp_definitions.properties_get_content_encoding(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @content_encoding.setter def content_encoding(self, char* value): if c_amqp_definitions.properties_set_content_encoding( self._c_value, value) != 0: self._value_error("Could not set 'content_encoding'.") @property def absolute_expiry_time(self): cdef c_amqpvalue.timestamp _value if c_amqp_definitions.properties_get_absolute_expiry_time(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @absolute_expiry_time.setter def absolute_expiry_time(self, c_amqpvalue.timestamp value): if c_amqp_definitions.properties_set_absolute_expiry_time( self._c_value, value) != 0: self._value_error("Could not set 'absolute_expiry_time'.") @property def creation_time(self): cdef c_amqpvalue.timestamp _value if c_amqp_definitions.properties_get_creation_time(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @creation_time.setter def creation_time(self, c_amqpvalue.timestamp value): if c_amqp_definitions.properties_set_creation_time( self._c_value, value) != 0: self._value_error("Could not set 'create_time'.") @property def group_id(self): cdef const char* _value if c_amqp_definitions.properties_get_group_id(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @group_id.setter def group_id(self, const char* value): if c_amqp_definitions.properties_set_group_id( self._c_value, value) != 0: self._value_error("Could not set 'group_id'.") @property def group_sequence(self): cdef c_amqp_definitions.sequence_no _value if c_amqp_definitions.properties_get_group_sequence(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @group_sequence.setter def group_sequence(self, c_amqp_definitions.sequence_no value): if c_amqp_definitions.properties_set_group_sequence( self._c_value, value) != 0: self._value_error("Could not set 'group_Sequence'.") @property def reply_to_group_id(self): cdef char* _value if c_amqp_definitions.properties_get_reply_to_group_id(self._c_value, &_value) == 0: if _value == NULL: return None return _value else: return None @reply_to_group_id.setter def reply_to_group_id(self, char* value): if c_amqp_definitions.properties_set_reply_to_group_id( self._c_value, value) != 0: self._value_error("Could not set 'reply_to_group_id'.") azure-uamqp-python-1.2.6/src/sasl.pyx000066400000000000000000000121301362133436400176030ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports cimport c_xio cimport c_sasl_mechanism _logger = logging.getLogger(__name__) cpdef _get_sasl_mechanism_interface(): cdef const c_sasl_mechanism.SASL_MECHANISM_INTERFACE_DESCRIPTION* interface interface = c_sasl_mechanism.saslmssbcbs_get_interface() if interface == NULL: raise ValueError("Failed to create SASL CBS Interface description") desc = SASLMechanismInterfaceDescription() desc.wrap(interface) return desc cpdef saslanonymous_get_interface(): cdef c_sasl_mechanism.SASL_MECHANISM_INTERFACE_DESCRIPTION* io_desc io_desc = c_sasl_mechanism.saslanonymous_get_interface() if io_desc == NULL: raise ValueError("Failed to create SASL Anonymous Interface description") interface = SASLMechanismInterfaceDescription() interface.wrap(io_desc) return interface cpdef saslplain_get_interface(): cdef c_sasl_mechanism.SASL_MECHANISM_INTERFACE_DESCRIPTION* io_desc io_desc = c_sasl_mechanism.saslplain_get_interface() if io_desc == NULL: raise ValueError("Failed to create SASL plain Interface description") interface = SASLMechanismInterfaceDescription() interface.wrap(io_desc) return interface cpdef get_sasl_mechanism(SASLMechanismInterfaceDescription interface=None): if interface is None: interface = _get_sasl_mechanism_interface() sasl_mechanism = SASLMechanism() sasl_mechanism.create(interface) return sasl_mechanism cpdef get_plain_sasl_mechanism(SASLMechanismInterfaceDescription interface, SASLPlainConfig parameters): _logger.debug("Creating SASL Mechanism") sasl_mechanism = SASLMechanism() sasl_mechanism.create_with_parameters(interface, ¶meters._c_value) return sasl_mechanism cdef class SASLMechanism(StructBase): cdef c_sasl_mechanism.SASL_MECHANISM_HANDLE _c_value def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating SASLMechanism") self.destroy() cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying SASLMechanism") c_sasl_mechanism.saslmechanism_destroy(self._c_value) self._c_value = NULL cdef wrap(self, c_sasl_mechanism.SASL_MECHANISM_HANDLE value): self.destroy() self._c_value = value self._create() cdef create(self, SASLMechanismInterfaceDescription sasl_mechanism_interface_description): self.destroy() self._c_value = c_sasl_mechanism.saslmechanism_create(sasl_mechanism_interface_description._c_value, NULL) self._create() cdef create_with_parameters(self, SASLMechanismInterfaceDescription sasl_mechanism_interface_description, void *parameters): self.destroy() self._c_value = c_sasl_mechanism.saslmechanism_create(sasl_mechanism_interface_description._c_value, parameters) self._create() cdef class SASLMechanismInterfaceDescription(object): cdef c_sasl_mechanism.SASL_MECHANISM_INTERFACE_DESCRIPTION* _c_value def __cinit__(self): pass cdef wrap(self, c_sasl_mechanism.SASL_MECHANISM_INTERFACE_DESCRIPTION* value): self._c_value = value cdef class SASLClientIOConfig(object): cdef c_sasl_mechanism.SASLCLIENTIO_CONFIG _c_value cdef XIO _underlying_io def __cinit__(self, XIO underlying_io, SASLMechanism sasl_mechanism): if underlying_io._c_value is NULL: raise ValueError("UnderLying IO must not be NULL") if sasl_mechanism._c_value is NULL: raise ValueError("SASL Mechanism must not be NULL") self._underlying_io = underlying_io self._c_value = c_sasl_mechanism.SASLCLIENTIO_CONFIG( underlying_io._c_value, sasl_mechanism._c_value ) cdef class SASLPlainConfig(object): cdef c_sasl_mechanism.SASL_PLAIN_CONFIG _c_value def __cinit__(self): self._c_value = c_sasl_mechanism.SASL_PLAIN_CONFIG(NULL, NULL, NULL) self._c_value.authcid = NULL self._c_value.passwd = NULL self._c_value.authzid = NULL @property def authcid(self): return self._c_value.authcid @authcid.setter def authcid(self, const char* value): self._c_value.authcid = value @property def passwd(self): return self._c_value.passwd @passwd.setter def passwd(self, const char* value): self._c_value.passwd = value @property def authzid(self): return self._c_value.authzid @authzid.setter def authzid(self, const char* value): self._c_value.authzid = value azure-uamqp-python-1.2.6/src/session.pyx000066400000000000000000000124151362133436400203320ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging # C imports from libc cimport stdint cimport c_amqpvalue cimport c_amqp_definitions cimport c_session cimport c_connection _logger = logging.getLogger(__name__) cpdef create_session(Connection connection, on_link_attached_context): session = cSession() session.create(connection, on_link_attached, on_link_attached_context) return session cdef class cSession(StructBase): _links = [] cdef c_session.SESSION_HANDLE _c_value cdef Connection _connection def __cinit__(self): pass def __dealloc__(self): _logger.debug("Deallocating cSession") self.destroy() def __enter__(self): return self def __exit__(self, *args): self.destroy() @property def incoming_window(self): cdef stdint.uint32_t value if c_session.session_get_incoming_window(self._c_value, &value) != 0: self._value_error() return value @incoming_window.setter def incoming_window(self, stdint.uint32_t value): if c_session.session_set_incoming_window(self._c_value, value) != 0: self._value_error() @property def outgoing_window(self): cdef stdint.uint32_t value if c_session.session_get_outgoing_window(self._c_value, &value) != 0: self._value_error() return value @outgoing_window.setter def outgoing_window(self, stdint.uint32_t value): if c_session.session_set_outgoing_window(self._c_value, value) != 0: self._value_error() @property def handle_max(self): cdef c_amqp_definitions.handle value if c_session.session_get_handle_max(self._c_value, &value) != 0: self._value_error() return value @handle_max.setter def handle_max(self, c_amqp_definitions.handle value): if c_session.session_set_handle_max(self._c_value, value) != 0: self._value_error() cdef _create(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cSession") c_session.session_destroy(self._c_value) self._c_value = NULL self._connection = None cdef wrap(self, cSession value): self.destroy() self._connection = value._connection self._c_value = value._c_value self._create() cdef create(self, Connection connection, c_session.ON_LINK_ATTACHED on_link_attached, void* callback_context): self.destroy() self._connection = connection self._c_value = c_session.session_create(connection._c_value, on_link_attached, callback_context) self._create() cpdef begin(self): if c_session.session_begin(self._c_value) != 0: self._value_error() cpdef end(self, const char* condition_value, const char* description): if c_session.session_end(self._c_value, condition_value, description) != 0: self._value_error() #### Callback cdef bint on_link_attached( void* context, c_session.LINK_ENDPOINT_HANDLE new_link_endpoint, const char* name, c_amqp_definitions.role role, c_amqpvalue.AMQP_VALUE source, c_amqpvalue.AMQP_VALUE target, c_amqp_definitions.fields properties): cdef c_amqp_definitions.SOURCE_HANDLE wrapped_source cdef c_amqp_definitions.TARGET_HANDLE wrapped_target cdef c_amqpvalue.AMQP_VALUE wrapped_props cdef c_amqpvalue.AMQP_VALUE cloned_source cdef c_amqpvalue.AMQP_VALUE cloned_target cdef stdint.uint32_t _value attach_properties = None context_obj = context if context_obj == NULL: return True if properties != NULL: wrapped_props = c_amqpvalue.amqpvalue_clone(properties) attach_properties = value_factory(wrapped_props) if source == NULL or target == NULL: _logger.info("Link ATTACH frame missing source and/or target. DETACH pending.") context_obj._attach_received(None, None, attach_properties, "ATTACH frame Source and/or Target is NULL") else: try: cloned_source = c_amqpvalue.amqpvalue_clone(source) cloned_target = c_amqpvalue.amqpvalue_clone(target) if c_amqp_definitions.amqpvalue_get_source(cloned_source, &wrapped_source) != 0: context_obj._attach_received(None, None, attach_properties, "Unable to decode ATTACH frame source") elif c_amqp_definitions.amqpvalue_get_target(cloned_target, &wrapped_target) != 0: context_obj._attach_received(None, None, attach_properties, "Unable to decode ATTACH frame target") else: context_obj._attach_received(source_factory(wrapped_source), target_factory(wrapped_target), attach_properties, None) except Exception as e: _logger.info("Failed to process link ATTACH frame: %r", e) return True azure-uamqp-python-1.2.6/src/source.pyx000066400000000000000000000141451362133436400201510ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging import copy # C imports cimport c_amqp_definitions cimport c_amqpvalue _logger = logging.getLogger(__name__) cpdef create_source(): source = cSource() return source cdef source_factory(c_amqp_definitions.SOURCE_HANDLE c_source): source = cSource() source.wrap(c_source) return source cdef class cSource(StructBase): cdef c_amqp_definitions.SOURCE_HANDLE _c_value def __cinit__(self): self._c_value = c_amqp_definitions.source_create() self._validate() def __dealloc__(self): _logger.debug("Deallocating cSource") self.destroy() cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cSource") c_amqp_definitions.source_destroy(self._c_value) self._c_value = NULL cdef wrap(self, c_amqp_definitions.SOURCE_HANDLE value): self.destroy() self._c_value = value self._validate() @property def value(self): cdef c_amqpvalue.AMQP_VALUE _value _value = c_amqp_definitions.amqpvalue_create_source(self._c_value) if _value == NULL: self._null_error("Failed to create source.") return value_factory(_value) @property def address(self): cdef c_amqpvalue.AMQP_VALUE _value if c_amqp_definitions.source_get_address(self._c_value, &_value) != 0: self._value_error("Failed to get source address") if _value == NULL: return None return value_factory(_value).value @address.setter def address(self, AMQPValue value): if c_amqp_definitions.source_set_address(self._c_value, value._c_value) != 0: self._value_error("Failed to set source address") @property def durable(self): cdef c_amqp_definitions.terminus_durability _value if c_amqp_definitions.source_get_durable(self._c_value, &_value) != 0: self._value_error("Failed to get source durable") if _value == NULL: return None return _value @durable.setter def durable(self, c_amqp_definitions.terminus_durability value): if c_amqp_definitions.source_set_durable(self._c_value, value) != 0: self._value_error("Failed to set source durable") @property def expiry_policy(self): cdef c_amqp_definitions.terminus_expiry_policy _value if c_amqp_definitions.source_get_expiry_policy(self._c_value, &_value) != 0: self._value_error("Failed to get source expiry_policy") if _value == NULL: return None return _value @expiry_policy.setter def expiry_policy(self, c_amqp_definitions.terminus_expiry_policy value): if c_amqp_definitions.source_set_expiry_policy(self._c_value, value) != 0: self._value_error("Failed to set source expiry_policy") @property def timeout(self): cdef c_amqp_definitions.seconds _value if c_amqp_definitions.source_get_timeout(self._c_value, &_value) != 0: self._value_error("Failed to get source timeout") if _value == NULL: return None return _value @timeout.setter def timeout(self, c_amqp_definitions.seconds value): if c_amqp_definitions.source_set_timeout(self._c_value, value) != 0: self._value_error("Failed to set source timeout") @property def dynamic(self): cdef bint _value if c_amqp_definitions.source_get_dynamic(self._c_value, &_value) != 0: self._value_error("Failed to get source dynamic") if _value == NULL: return None return _value @dynamic.setter def dynamic(self, bint value): if c_amqp_definitions.source_set_dynamic(self._c_value, value) != 0: self._value_error("Failed to set source dynamic") @property def dynamic_node_properties(self): cdef c_amqp_definitions.node_properties _value if c_amqp_definitions.source_get_dynamic_node_properties(self._c_value, &_value) != 0: self._value_error("Failed to get source dynamic_node_properties") if _value == NULL: return None return annotations_factory(_value) @dynamic_node_properties.setter def dynamic_node_properties(self, cFields value): if c_amqp_definitions.source_set_dynamic_node_properties(self._c_value, value._c_value) != 0: self._value_error("Failed to set source dynamic_node_properties") @property def distribution_mode(self): cdef const char* _value if c_amqp_definitions.source_get_distribution_mode(self._c_value, &_value) != 0: self._value_error("Failed to get source distribution_mode") if _value == NULL: return None return _value @distribution_mode.setter def distribution_mode(self, const char* value): if c_amqp_definitions.source_set_distribution_mode(self._c_value, value) != 0: self._value_error("Failed to set source distribution_mode") @property def filter_set(self): cdef c_amqp_definitions.filter_set _value if c_amqp_definitions.source_get_filter(self._c_value, &_value) != 0: self._value_error("Failed to get source filter_set") if _value == NULL: return None return value_factory(_value) @filter_set.setter def filter_set(self, AMQPValue value): if c_amqp_definitions.source_set_filter(self._c_value, value._c_value) != 0: self._value_error("Failed to set source filter_set") azure-uamqp-python-1.2.6/src/target.pyx000066400000000000000000000117611362133436400201400ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # Python imports import logging import copy # C imports cimport c_amqp_definitions cimport c_amqpvalue _logger = logging.getLogger(__name__) cpdef create_target(): target = cTarget() return target cdef target_factory(c_amqp_definitions.TARGET_HANDLE c_target): target = cTarget() target.wrap(c_target) return target cdef class cTarget(StructBase): cdef c_amqp_definitions.TARGET_HANDLE _c_value def __cinit__(self): self._c_value = c_amqp_definitions.target_create() self._validate() def __dealloc__(self): _logger.debug("Deallocating cTarget") self.destroy() cdef _validate(self): if self._c_value is NULL: self._memory_error() cpdef destroy(self): if self._c_value is not NULL: _logger.debug("Destroying cTarget") c_amqp_definitions.target_destroy(self._c_value) self._c_value = NULL cdef wrap(self, c_amqp_definitions.TARGET_HANDLE value): self.destroy() self._c_value = value self._validate() @property def value(self): cdef c_amqpvalue.AMQP_VALUE _value _value = c_amqp_definitions.amqpvalue_create_target(self._c_value) if _value == NULL: self._null_error("Failed to create target.") return value_factory(_value) @property def address(self): cdef c_amqpvalue.AMQP_VALUE _value if c_amqp_definitions.target_get_address(self._c_value, &_value) != 0: self._value_error("Failed to get target address") if _value == NULL: return None return value_factory(_value).value @address.setter def address(self, AMQPValue value): if c_amqp_definitions.target_set_address(self._c_value, value._c_value) != 0: self._value_error("Failed to set target address") @property def durable(self): cdef c_amqp_definitions.terminus_durability _value if c_amqp_definitions.target_get_durable(self._c_value, &_value) != 0: self._value_error("Failed to get target durable") if _value == NULL: return None return _value @durable.setter def durable(self, c_amqp_definitions.terminus_durability value): if c_amqp_definitions.target_set_durable(self._c_value, value) != 0: self._value_error("Failed to set target durable") @property def expiry_policy(self): cdef c_amqp_definitions.terminus_expiry_policy _value if c_amqp_definitions.target_get_expiry_policy(self._c_value, &_value) != 0: self._value_error("Failed to get target expiry_policy") if _value == NULL: return None return _value @expiry_policy.setter def expiry_policy(self, c_amqp_definitions.terminus_expiry_policy value): if c_amqp_definitions.target_set_expiry_policy(self._c_value, value) != 0: self._value_error("Failed to set target expiry_policy") @property def timeout(self): cdef c_amqp_definitions.seconds _value if c_amqp_definitions.target_get_timeout(self._c_value, &_value) != 0: self._value_error("Failed to get target timeout") if _value == NULL: return None return _value @timeout.setter def timeout(self, c_amqp_definitions.seconds value): if c_amqp_definitions.target_set_timeout(self._c_value, value) != 0: self._value_error("Failed to set target timeout") @property def dynamic(self): cdef bint _value if c_amqp_definitions.target_get_dynamic(self._c_value, &_value) != 0: self._value_error("Failed to get target dynamic") if _value == NULL: return None return _value @dynamic.setter def dynamic(self, bint value): if c_amqp_definitions.target_set_dynamic(self._c_value, value) != 0: self._value_error("Failed to set target dynamic") @property def dynamic_node_properties(self): cdef c_amqp_definitions.node_properties _value if c_amqp_definitions.target_get_dynamic_node_properties(self._c_value, &_value) != 0: self._value_error("Failed to get target dynamic_node_properties") if _value == NULL: return None return annotations_factory(_value) @dynamic_node_properties.setter def dynamic_node_properties(self, cFields value): if c_amqp_definitions.target_set_dynamic_node_properties(self._c_value, value._c_value) != 0: self._value_error("Failed to set target dynamic_node_properties") azure-uamqp-python-1.2.6/src/tlsio.pyx000066400000000000000000000047161362133436400200060ustar00rootroot00000000000000#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # C imports cimport c_tlsio cimport c_xio DEFAULT_PORT = 5671 cdef class TLSIOConfig(object): cdef c_tlsio.TLSIO_CONFIG _c_value def __cinit__(self): self._c_value = c_tlsio.TLSIO_CONFIG(NULL, DEFAULT_PORT, NULL, NULL) @property def hostname(self): return self._c_value.hostname @hostname.setter def hostname(self, const char* value): self._c_value.hostname = value @property def port(self): return self._c_value.port @port.setter def port(self, int port): self._c_value.port = port cpdef set_proxy_config(self, HTTPProxyConfig underlying_io_parameters): cdef const c_xio.IO_INTERFACE_DESCRIPTION* proxy_io proxy_io = c_tlsio.http_proxy_io_get_interface_description() self._c_value.underlying_io_interface = proxy_io self._c_value.underlying_io_parameters = &underlying_io_parameters._c_value cdef class HTTPProxyConfig(object): cdef c_tlsio.HTTP_PROXY_IO_CONFIG _c_value def __cinit__(self): self._c_value = c_tlsio.HTTP_PROXY_IO_CONFIG(NULL, 0, NULL, 0, NULL, NULL) @property def hostname(self): return self._c_value.hostname @hostname.setter def hostname(self, const char* value): self._c_value.hostname = value @property def port(self): return self._c_value.port @port.setter def port(self, int port): self._c_value.port = port @property def proxy_hostname(self): return self._c_value.proxy_hostname @proxy_hostname.setter def proxy_hostname(self, const char* value): self._c_value.proxy_hostname = value @property def proxy_port(self): return self._c_value.proxy_port @proxy_port.setter def proxy_port(self, int port): self._c_value.proxy_port = port @property def username(self): return self._c_value.username @username.setter def username(self, const char* value): self._c_value.username = value @property def password(self): return self._c_value.password @password.setter def password(self, const char* value): self._c_value.password = value azure-uamqp-python-1.2.6/src/vendor/000077500000000000000000000000001362133436400173775ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/000077500000000000000000000000001362133436400220665ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/.gitattributes000066400000000000000000000014711362133436400247640ustar00rootroot00000000000000# Default behavior: if Git thinks a file is text (as opposed to binary), it # will normalize line endings to LF in the repository, but convert to your # platform's native line endings on checkout (e.g., CRLF for Windows). * text=auto # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. E.g., #*.c text # Declare files that will always have CRLF line endings on checkout. E.g., #*.sln text eol=crlf # Declare files that will always have LF line endings on checkout. E.g., *.sh text eol=lf *.json text eol=lf # Denote all files that should not have line endings normalized, should not be # merged, and should not show in a textual diff. *.docm binary *.docx binary *.ico binary *.lib binary *.png binary *.pptx binary *.snk binary *.vsdx binary *.xps binary azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/.gitignore000066400000000000000000000010241362133436400240530ustar00rootroot00000000000000################################################################################ # This .gitignore file was automatically created by Microsoft(R) Visual Studio. ################################################################################ **/bin/* **/obj/* *.lastbuildstate *.log *.opensdf *.sdf *.suo *.~vsdx *.lib *.pdb *.idb *.obj *.tlog *.cache *.exe *.ilk *.TMP *.zip *.ipch *.pch *.user *.codeanalysis *.codeanalysisast *.lastcodeanalysissucceeded *.dll *.config *.coverage *.exp *.i /cmake /build /.vscode/* /**/.vs/*azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/.gitmodules000066400000000000000000000007421362133436400242460ustar00rootroot00000000000000[submodule "deps/azure-c-shared-utility"] path = deps/azure-c-shared-utility url = https://www.github.com/Azure/azure-c-shared-utility [submodule "deps/azure-ctest"] path = deps/azure-ctest url = https://www.github.com/Azure/azure-ctest [submodule "deps/umock-c"] path = deps/umock-c url = https://www.github.com/Azure/umock-c [submodule "deps/azure-c-testrunnerswitcher"] path = deps/azure-c-testrunnerswitcher url = https://www.github.com/Azure/azure-c-testrunnerswitcher azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/CMakeLists.txt000066400000000000000000000256741362133436400246440ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) project(uamqp) FILE(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt UAMQP_VERSION) option(run_e2e_tests "set run_e2e_tests to ON to run e2e tests (default is OFF) [if possible, they are always built]" OFF) option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF) option(skip_samples "set skip_samples to ON to skip building samples (default is OFF)[if possible, they are always built]" OFF) option(use_installed_dependencies "set use_installed_dependencies to ON to use installed packages instead of building dependencies from submodules" OFF) option(memory_trace "set memory_trace to ON if memory usage is to be used, set to OFF to not use it" OFF) option(use_custom_heap "use externally defined heap functions instead of the malloc family" OFF) if(${use_custom_heap}) add_definitions(-DGB_USE_CUSTOM_HEAP) endif() if(${no_logging}) add_definitions(-DNO_LOGGING) endif() #do not add or build any tests of the dependencies set(original_run_e2e_tests ${run_e2e_tests}) set(original_run_int_tests ${run_int_tests}) set(original_run_unittests ${run_unittests}) set(run_e2e_tests OFF) set(run_int_tests OFF) set(run_unittests OFF) if(NOT ${use_installed_dependencies}) if(${original_run_e2e_tests} OR ${original_run_unittests}) if (NOT TARGET testrunnerswitcher) add_subdirectory(deps/azure-c-testrunnerswitcher) endif() if (NOT TARGET ctest) add_subdirectory(deps/azure-ctest) endif() if (NOT TARGET umock_c) add_subdirectory(deps/umock-c) endif() endif() if (NOT TARGET aziotsharedutil) add_subdirectory(deps/azure-c-shared-utility) endif() endif() include("dependencies.cmake") # Include the common build rules for C shared utility if(${use_installed_dependencies}) include(deps/azure-c-shared-utility/configs/azure_iot_build_rules.cmake) else() include(${SHARED_UTIL_FOLDER}/configs/azure_iot_build_rules.cmake) endif() set_platform_files(${SHARED_UTIL_FOLDER}) set(run_e2e_tests ${original_run_e2e_tests}) set(run_int_tests ${original_run_int_tests}) set(run_unittests ${original_run_unittests}) if(${memory_trace}) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) endif() option(use_socketio "set use_socketio to ON if socketio is to be included in the library, set to OFF if a different implementation will be provided" ON) if(WIN32) option(use_schannel "set use_schannel to ON if schannel is to be used, set to OFF to not use schannel" ON) option(use_openssl "set use_openssl to ON if openssl is to be used, set to OFF to not use openssl" OFF) option(use_wolfssl "set use_wolfssl to ON if wolfssl is to be used, set to OFF to not use wolfssl" OFF) else() option(use_schannel "set use_schannel to ON if schannel is to be used, set to OFF to not use schannel" OFF) option(use_openssl "set use_openssl to ON if openssl is to be used, set to OFF to not use openssl" ON) option(use_wolfssl "set use_wolfssl to ON if wolfssl is to be used, set to OFF to not use wolfssl" OFF) endif() # The native apple tlsio does not support socket_io if(MACOSX AND NOT ${use_openssl}) set(use_socketio OFF) endif() add_definitions(-DREFCOUNT_ATOMIC_DONTCARE) add_definitions(-D__STDC_NO_ATOMICS__=1) include_directories(${CMAKE_CURRENT_LIST_DIR}/inc) if(WIN32) include_directories($ENV{OpenSSLDir}/include) endif() set(uamqp_h_files ./inc/azure_uamqp_c/amqp_definitions_role.h ./inc/azure_uamqp_c/amqp_definitions_sender_settle_mode.h ./inc/azure_uamqp_c/amqp_definitions_receiver_settle_mode.h ./inc/azure_uamqp_c/amqp_definitions_handle.h ./inc/azure_uamqp_c/amqp_definitions_seconds.h ./inc/azure_uamqp_c/amqp_definitions_milliseconds.h ./inc/azure_uamqp_c/amqp_definitions_delivery_tag.h ./inc/azure_uamqp_c/amqp_definitions_sequence_no.h ./inc/azure_uamqp_c/amqp_definitions_delivery_number.h ./inc/azure_uamqp_c/amqp_definitions_transfer_number.h ./inc/azure_uamqp_c/amqp_definitions_message_format.h ./inc/azure_uamqp_c/amqp_definitions_ietf_language_tag.h ./inc/azure_uamqp_c/amqp_definitions_fields.h ./inc/azure_uamqp_c/amqp_definitions_error.h ./inc/azure_uamqp_c/amqp_definitions_amqp_error.h ./inc/azure_uamqp_c/amqp_definitions_connection_error.h ./inc/azure_uamqp_c/amqp_definitions_session_error.h ./inc/azure_uamqp_c/amqp_definitions_link_error.h ./inc/azure_uamqp_c/amqp_definitions_open.h ./inc/azure_uamqp_c/amqp_definitions_begin.h ./inc/azure_uamqp_c/amqp_definitions_attach.h ./inc/azure_uamqp_c/amqp_definitions_flow.h ./inc/azure_uamqp_c/amqp_definitions_transfer.h ./inc/azure_uamqp_c/amqp_definitions_disposition.h ./inc/azure_uamqp_c/amqp_definitions_detach.h ./inc/azure_uamqp_c/amqp_definitions_end.h ./inc/azure_uamqp_c/amqp_definitions_close.h ./inc/azure_uamqp_c/amqp_definitions_sasl_code.h ./inc/azure_uamqp_c/amqp_definitions_sasl_mechanisms.h ./inc/azure_uamqp_c/amqp_definitions_sasl_init.h ./inc/azure_uamqp_c/amqp_definitions_sasl_challenge.h ./inc/azure_uamqp_c/amqp_definitions_sasl_response.h ./inc/azure_uamqp_c/amqp_definitions_sasl_outcome.h ./inc/azure_uamqp_c/amqp_definitions_terminus_durability.h ./inc/azure_uamqp_c/amqp_definitions_terminus_expiry_policy.h ./inc/azure_uamqp_c/amqp_definitions_node_properties.h ./inc/azure_uamqp_c/amqp_definitions_filter_set.h ./inc/azure_uamqp_c/amqp_definitions_source.h ./inc/azure_uamqp_c/amqp_definitions_target.h ./inc/azure_uamqp_c/amqp_definitions_annotations.h ./inc/azure_uamqp_c/amqp_definitions_message_id_ulong.h ./inc/azure_uamqp_c/amqp_definitions_message_id_uuid.h ./inc/azure_uamqp_c/amqp_definitions_message_id_binary.h ./inc/azure_uamqp_c/amqp_definitions_message_id_string.h ./inc/azure_uamqp_c/amqp_definitions_address_string.h ./inc/azure_uamqp_c/amqp_definitions_header.h ./inc/azure_uamqp_c/amqp_definitions_delivery_annotations.h ./inc/azure_uamqp_c/amqp_definitions_message_annotations.h ./inc/azure_uamqp_c/amqp_definitions_application_properties.h ./inc/azure_uamqp_c/amqp_definitions_data.h ./inc/azure_uamqp_c/amqp_definitions_amqp_sequence.h ./inc/azure_uamqp_c/amqp_definitions_amqp_value.h ./inc/azure_uamqp_c/amqp_definitions_footer.h ./inc/azure_uamqp_c/amqp_definitions_properties.h ./inc/azure_uamqp_c/amqp_definitions_received.h ./inc/azure_uamqp_c/amqp_definitions_accepted.h ./inc/azure_uamqp_c/amqp_definitions_rejected.h ./inc/azure_uamqp_c/amqp_definitions_released.h ./inc/azure_uamqp_c/amqp_definitions_modified.h ./inc/azure_uamqp_c/amqp_definitions.h ./inc/azure_uamqp_c/amqp_frame_codec.h ./inc/azure_uamqp_c/amqp_management.h ./inc/azure_uamqp_c/amqp_types.h ./inc/azure_uamqp_c/amqpvalue.h ./inc/azure_uamqp_c/amqpvalue_to_string.h ./inc/azure_uamqp_c/async_operation.h ./inc/azure_uamqp_c/cbs.h ./inc/azure_uamqp_c/connection.h ./inc/azure_uamqp_c/frame_codec.h ./inc/azure_uamqp_c/header_detect_io.h ./inc/azure_uamqp_c/link.h ./inc/azure_uamqp_c/message.h ./inc/azure_uamqp_c/message_receiver.h ./inc/azure_uamqp_c/message_sender.h ./inc/azure_uamqp_c/messaging.h ./inc/azure_uamqp_c/sasl_anonymous.h ./inc/azure_uamqp_c/sasl_frame_codec.h ./inc/azure_uamqp_c/sasl_mechanism.h ./inc/azure_uamqp_c/sasl_server_mechanism.h ./inc/azure_uamqp_c/sasl_mssbcbs.h ./inc/azure_uamqp_c/sasl_plain.h ./inc/azure_uamqp_c/saslclientio.h ./inc/azure_uamqp_c/sasl_server_io.h ./inc/azure_uamqp_c/server_protocol_io.h ./inc/azure_uamqp_c/session.h ./inc/azure_uamqp_c/socket_listener.h ./inc/azure_uamqp_c/uamqp.h ) set(uamqp_c_files ./src/amqp_definitions.c ./src/amqp_frame_codec.c ./src/amqp_management.c ./src/amqpvalue.c ./src/amqpvalue_to_string.c ./src/async_operation.c ./src/cbs.c ./src/connection.c ./src/frame_codec.c ./src/header_detect_io.c ./src/link.c ./src/message.c ./src/message_receiver.c ./src/message_sender.c ./src/messaging.c ./src/sasl_anonymous.c ./src/sasl_frame_codec.c ./src/sasl_mechanism.c ./src/sasl_server_mechanism.c ./src/sasl_mssbcbs.c ./src/sasl_plain.c ./src/saslclientio.c ./src/session.c ) if(WIN32) set(socketlistener_c_files ./src/socket_listener_win32.c ) elseif(UNIX) set(socketlistener_c_files ./src/socket_listener_berkeley.c ) else() set(socketlistener_c_files ) endif() add_library(uamqp ${uamqp_c_files} ${uamqp_h_files} ${socketlistener_c_files} ) setTargetBuildProperties(uamqp) target_link_libraries(uamqp aziotsharedutil) if (NOT ${skip_samples}) add_subdirectory(samples) endif() if (${run_unittests}) include("dependencies-test.cmake") add_subdirectory(tests) endif() # The following "set" statetement exports across the project a global variable set(UAMQP_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "This is the include folder for UAMQP" FORCE) set(UAMQP_SRC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/src CACHE INTERNAL "This is the lib folder for UAMQP" FORCE) # Set CMAKE_INSTALL_LIBDIR if not defined include(GNUInstallDirs) if(${use_installed_dependencies}) # Install uamqp set(package_location "cmake") if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() install(TARGETS uamqp EXPORT uamqpTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot ) install(FILES ${uamqp_h_files} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot/azure_uamqp_c) include(CMakePackageConfigHelpers) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" VERSION ${UAMQP_VERSION} COMPATIBILITY SameMajorVersion ) configure_file("configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" COPYONLY ) install(EXPORT uamqpTargets FILE "${PROJECT_NAME}Targets.cmake" DESTINATION ${package_location} ) install( FILES "configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION ${package_location} ) else() set(install_staticlibs uamqp ) install(FILES ${uamqp_h_files} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azure_uamqp_c) install(TARGETS ${install_staticlibs} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() compileTargetAsC99(uamqp) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/LICENSE000066400000000000000000000021541362133436400230750ustar00rootroot00000000000000Microsoft Azure IoT SDKs Copyright (c) Microsoft Corporation All rights reserved. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/000077500000000000000000000000001362133436400240155ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/mbed/000077500000000000000000000000001362133436400247245ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/mbed/CMakeLists.txt000066400000000000000000000006241362133436400274660ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(shared_util_base_path ../../deps/azure-c-shared-utility) set(mbed_project_base "azure_uamqp_c" CACHE STRING "The item being built") include (${shared_util_base_path}/tools/mbed_build_scripts/mbedbldtemplate.txt) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/mbed/azure_uamqp_c_filelist.txt000066400000000000000000000203511362133436400322140ustar00rootroot00000000000000set(mbed_exported_project_files ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_accepted.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_address_string.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_amqp_error.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_amqp_sequence.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_amqp_value.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_annotations.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_application_properties.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_attach.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_begin.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_close.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_connection_error.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_data.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_delivery_annotations.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_delivery_number.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_delivery_tag.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_detach.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_disposition.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_end.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_error.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_fields.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_filter_set.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_flow.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_footer.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_handle.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_header.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_ietf_language_tag.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_link_error.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_message_annotations.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_message_format.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_message_id_binary.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_message_id_string.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_message_id_ulong.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_message_id_uuid.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_milliseconds.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_modified.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_node_properties.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_open.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_properties.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_received.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_receiver_settle_mode.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_rejected.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_released.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_role.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sasl_challenge.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sasl_code.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sasl_init.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sasl_mechanisms.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sasl_outcome.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sasl_response.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_seconds.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sender_settle_mode.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_sequence_no.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_session_error.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_source.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_target.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_terminus_durability.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_terminus_expiry_policy.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_transfer.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_definitions_transfer_number.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_frame_codec.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_management.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqp_types.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqpalloc.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqpvalue.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/amqpvalue_to_string.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/async_operation.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/cbs.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/connection.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/frame_codec.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/header_detect_io.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/link.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/logger.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/message.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/message_receiver.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/message_sender.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/messaging.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/sasl_anonymous.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/sasl_frame_codec.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/sasl_mechanism.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/sasl_mssbcbs.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/sasl_plain.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/sasl_server_mechanism.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/sasl_server_io.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/saslclientio.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/server_protocol_io.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/session.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/socket_listener.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_uamqp_c/uamqp.h ) set(mbed_project_files ${CMAKE_CURRENT_SOURCE_DIR}/../../src/amqp_definitions.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/amqp_frame_codec.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/amqp_management.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/amqpalloc.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/amqpvalue.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/amqpvalue_to_string.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/async_operation.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/cbs.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/connection.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/frame_codec.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/header_detect_io.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/link.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/message.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/message_receiver.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/message_sender.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/messaging.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sasl_anonymous.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sasl_frame_codec.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sasl_mechanism.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sasl_mssbcbs.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sasl_plain.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/saslclientio.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/session.c ) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/mbed/build.cmd000066400000000000000000000030301362133436400265040ustar00rootroot00000000000000 @setlocal EnableExtensions EnableDelayedExpansion @echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set repo-build-root=%current-path%\..\.. rem // resolve to fully qualified path for %%i in ("%repo-build-root%") do set repo-build-root=%%~fi rem ----------------------------------------------------------------------------- rem -- build (clean) compilembed tool rem ----------------------------------------------------------------------------- call "%repo-build-root%\deps\azure-c-shared-utility\tools\compilembed\build.cmd" --clean if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! rem ----------------------------------------------------------------------------- rem -- build uAMQP and samples rem ----------------------------------------------------------------------------- call %repo-build-root%\deps\azure-c-shared-utility\tools\mbed_build_scripts\release_mbed_project.cmd %repo-build-root%\build_all if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! call :compile message_sender_sample %repo-build-root%\samples\message_sender_sample\mbed if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof :compile setlocal EnableExtensions set "project_name=%~1" set "project_path=%~2" set "download_bin_path=%~3" set "cmake_project_bin_path=%project_name%_cmake_build" mkdir %cmake_project_bin_path% cd %cmake_project_bin_path% cmake -Dmbed_repo_name:string=%project_name% -Dmbed_output_bin_path:string=%download_bin_path% %project_path% set CMAKE_ERROR_CODE=!ERRORLEVEL! cd .. exit /b %CMAKE_ERROR_CODE% goto:eof azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/000077500000000000000000000000001362133436400257415ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/000077500000000000000000000000001362133436400271005ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/000077500000000000000000000000001362133436400303225ustar00rootroot00000000000000azure-uamqp-c-dev.dirs000066400000000000000000000000511362133436400343650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debianusr/lib usr/include usr/include/azureiot azure-uamqp-c-dev.install000066400000000000000000000000271362133436400350750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debianusr/include/azureiot/* azure-uamqp-c-lib.dirs000066400000000000000000000000101362133436400343500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debianusr/lib azure-uamqp-c-lib.install000066400000000000000000000000171362133436400350640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debianusr/lib/lib*.a azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/changelog-trusty000066400000000000000000000003301362133436400335400ustar00rootroot00000000000000azure-uamqp-c (0.2.0-1trusty) trusty; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Tue, 27 Sep 2016 11:00:00 +0000 azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/changelog-vivid000066400000000000000000000003271362133436400333150ustar00rootroot00000000000000azure-uamqp-c (0.1.0-65vivid) vivid; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Tue, 27 Sep 2016 11:00:00 +0000 azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/changelog-wily000066400000000000000000000003221362133436400331530ustar00rootroot00000000000000azure-uamqp-c (undefined) wily; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Tue, 27 Sep 2016 11:00:00 +0000 azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/changelog-xenial000066400000000000000000000003321362133436400334500ustar00rootroot00000000000000azure-uamqp-c (0.2.0.0-1xenial) xenial; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Tue, 29 Sep 2016 11:00:00 +0000 azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/compat000066400000000000000000000000021362133436400315200ustar00rootroot000000000000009 azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/control000066400000000000000000000031341362133436400317260ustar00rootroot00000000000000Source: azure-uamqp-c Priority: optional Maintainer: AzureIoT User Build-Depends: debhelper (>= 9), cmake (>= 2.8), libssl-dev, libcurl4-openssl-dev, curl, azure-c-shared-util-dev Standards-Version: 3.9.6 Section: libs Homepage: https://github.com/Azure/azure-uamqp-c.git #Vcs-Git: git://anonscm.debian.org/collab-maint/azure-uamqp-c.git #Vcs-Browser: https://anonscm.debian.org/gitweb/?p=collab-maint/azure-uamqp-c.git;a=summary Package: azure-uamqp-c-dev Section: libdevel Architecture: any Depends: azure-uamqp-c-lib (= ${binary:Version}), ${misc:Depends}, azure-c-shared-util-dev Description: uAMQP is a general purpose C library for AMQP. The goal is to be as compliant with the standard as possible while optimizing for low RAM footprint and also being portable. It is currently a client side implementation only. Although much of the standardis symmetrical, there are parts that are asymmetrical, like the SASL handshake. Currently uAMQP does not provide the server side for these asymmetrical protions of the ISO. Package: azure-uamqp-c-lib Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, curl, azure-c-shared-util-dev Description: uAMQP is a general purpose C library for AMQP. The goal is to be as compliant with the standard as possible while optimizing for low RAM footprint and also being portable. It is currently a client side implementation only. Although much of the standardis symmetrical, there are parts that are asymmetrical, like the SASL handshake. Currently uAMQP does not provide the server side for these asymmetrical protions of the ISO. azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/copyright000066400000000000000000000025141362133436400322570ustar00rootroot00000000000000Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: azure-uamqp-c Source: Files: * Copyright: 2016 AzureIoT User License: MIT Files: debian/* Copyright: 2016 Azure User License: MIT License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/docs000066400000000000000000000000121362133436400311660ustar00rootroot00000000000000readme.md azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/rules000077500000000000000000000021051362133436400314000ustar00rootroot00000000000000#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. export DH_VERBOSE = 1 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk # see FEATURE AREAS in dpkg-buildflags(1) #export DEB_BUILD_MAINT_OPTIONS = hardening=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append CFLAGS #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed # main packaging script based on dh7 syntax %: dh $@ --buildsystem=cmake --DSYSINSTALL_BINDINGS=ON override_dh_auto_configure: dh_auto_configure -- override_dh_auto_install: rm -f -r $$(pwd)/debian/tmp mkdir $$(pwd)/debian/tmp mkdir $$(pwd)/debian/tmp/usr mkdir $$(pwd)/debian/tmp/usr/lib mkdir $$(pwd)/debian/tmp/usr/include mkdir $$(pwd)/debian/tmp/usr/include/azureiot cp $$(pwd)/obj-*/*.a $$(pwd)/debian/tmp/usr/lib/ cp $$(pwd)/inc/azure_uamqp_c/* $$(pwd)/debian/tmp/usr/include/azureiot azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/source/000077500000000000000000000000001362133436400316225ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/linux/debian/source/format000066400000000000000000000000151362133436400330310ustar00rootroot000000000000003.0 (native) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/windows/000077500000000000000000000000001362133436400274335ustar00rootroot00000000000000Microsoft.Azure.uamqp.nuspec000066400000000000000000000050071362133436400347510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/windows Microsoft.Azure.uamqp 1.2.4 Microsoft Azure uAMQP Microsoft Corp Azure-IoT https://github.com/Azure/azure-uamqp-c/blob/master/LICENSE https://github.com/Azure/azure-uamqp-c true Microsoft Azure uAMQP library http://go.microsoft.com/fwlink/?LinkID=288890 This nuget package can be used for developing amqp applications and libraries Updated reference to shared utility nuget Copyright 2016 Microsoft Azure C Native x86 x64 arm native uamqp package Microsoft.Azure.uamqp.targets000066400000000000000000000175751362133436400351420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/windows static cdecl $(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories) $(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories) $(MSBuildThisFileDirectory)../../build/native/Win32/Debug/uamqp.lib;%(AdditionalDependencies) $(MSBuildThisFileDirectory)../../build/native/Win32/Release/uamqp.lib;%(AdditionalDependencies) $(MSBuildThisFileDirectory)../../build/native/x64/Debug/uamqp.lib;%(AdditionalDependencies) $(MSBuildThisFileDirectory)../../build/native/x64/Release/uamqp.lib;%(AdditionalDependencies) $(MSBuildThisFileDirectory)../../build/native/arm/Debug/uamqp.lib;%(AdditionalDependencies) $(MSBuildThisFileDirectory)../../build/native/arm/Release/uamqp.lib;%(AdditionalDependencies) Result = ((Text ?? "").Split(';').Contains(Library) ) ? Value : String.Empty; Microsoft.Azure.uamqp_thirdpartynotice.txt000066400000000000000000000010771362133436400377520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/windowsThird Party Notices for Azure Amqp library project This project incorporates material from the project(s) listed below (collectively, "Third Party Code"). Microsoft Corporation is not the original author of the Third Party Code. The original copyright notice and license, under which Microsoft Corporation received such Third Party Code, are set out below. This Third Party Code is licensed to you under their original license terms set forth below. Microsoft Corporation reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/packaging/windows/rebuild_nugets.cmd000066400000000000000000000100041362133436400331260ustar00rootroot00000000000000@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @echo off rem ----------------------------------------------------------------------------- rem -- setup path information rem ----------------------------------------------------------------------------- set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% echo Current Path: %current-path% set build-root=%current-path%\..\..\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi set client-root=%current-path%\..\..\.. for %%i in ("%client-root%") do set client-root=%%~fi rem ----------------------------------------------------------------------------- rem -- check prerequisites and clean directories rem ----------------------------------------------------------------------------- where /q nuget.exe if not !errorlevel! == 0 ( @Echo Azure Amqp needs to download nuget.exe from https://www.nuget.org/nuget.exe @Echo https://www.nuget.org choice /C yn /M "Do you want to download and run nuget.exe?" if not !errorlevel!==1 goto :eof rem if nuget.exe is not found, then ask user Powershell.exe wget -outf nuget.exe https://nuget.org/nuget.exe if not exist .\nuget.exe ( echo nuget does not exist exit /b 1 ) ) set build-path=%build-root%\cmake if exist %build-path%\azure_amqp_output ( rmdir /s/q %build-path%\azure_amqp_output rem no error checking ) rem ----------------------------------------------------------------------------- rem -- build project rem ----------------------------------------------------------------------------- call %build-root%\build_all\windows\build.cmd --make_nuget yes rem ----------------------------------------------------------------------------- rem -- Copy Win32 binaries rem ----------------------------------------------------------------------------- rem -- Copy all Win32 files from cmake build directory to the repo directory echo copying %build-path%\uamqp_win32\win32\debug rem -- Copy all Win32 files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\uamqp_win32\Debug\*.* %build-path%\azure_amqp_output\win32\debug\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem -- Copy all Win32 Release files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\uamqp_win32\Release\*.* %build-path%\azure_amqp_output\win32\Release\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem ----------------------------------------------------------------------------- rem -- build with CMAKE x64 rem ----------------------------------------------------------------------------- rem -- Copy all x64 files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\uamqp_x64\Debug\*.* %build-path%\azure_amqp_output\x64\debug\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem -- Copy all x64 Release files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\uamqp_x64\Release\*.* %build-path%\azure_amqp_output\x64\Release\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem ----------------------------------------------------------------------------- rem -- build with CMAKE ARM rem ----------------------------------------------------------------------------- rem -- Copy all ARM files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\uamqp_arm\Debug\*.* %build-path%\azure_amqp_output\arm\debug\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem -- Copy all x64 Release files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\uamqp_arm\Release\*.* %build-path%\azure_amqp_output\arm\Release\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! if exist *.nupkg ( del *.nupkg ) rem -- Package Nuget nuget pack %build-root%\build_all\packaging\windows\Microsoft.Azure.uamqp.nuspec -OutputDirectory %build-root%\build_all\packaging\windows rmdir /s/q %build-path%\azure_amqp_output popd goto :eof echo doneazure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/windows/000077500000000000000000000000001362133436400255075ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/build_all/windows/build.cmd000066400000000000000000000162021362133436400272740ustar00rootroot00000000000000@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% echo Current Path: %current-path% set build-root=%current-path%\..\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi set repo_root=%build-root%\..\.. rem // resolve to fully qualified path for %%i in ("%repo_root%") do set repo_root=%%~fi echo Build Root: %build-root% echo Repo Root: %repo_root% rem ----------------------------------------------------------------------------- rem -- check prerequisites rem ----------------------------------------------------------------------------- rem ----------------------------------------------------------------------------- rem -- parse script arguments rem ----------------------------------------------------------------------------- rem // default build options set build-clean=0 set build-config=Debug set build-platform=Win32 set CMAKE_DIR=uamqp_win32 set MAKE_NUGET_PKG=no :args-loop if "%1" equ "" goto args-done if "%1" equ "-c" goto arg-build-clean if "%1" equ "--clean" goto arg-build-clean if "%1" equ "--config" goto arg-build-config if "%1" equ "--platform" goto arg-build-platform if "%1" equ "--make_nuget" goto arg-build-nuget call :usage && exit /b 1 :arg-build-clean set build-clean=1 goto args-continue :arg-build-config shift if "%1" equ "" call :usage && exit /b 1 set build-config=%1 goto args-continue :arg-build-platform shift if "%1" equ "" call :usage && exit /b 1 set build-platform=%1 if %build-platform% == x64 ( set CMAKE_DIR=uamqp_x64 ) else if %build-platform% == arm ( set CMAKE_DIR=uamqp_arm ) goto args-continue :arg-build-nuget shift if "%1" equ "" call :usage && exit /b 1 set MAKE_NUGET_PKG=%1 goto args-continue :args-continue shift goto args-loop :args-done rem ----------------------------------------------------------------------------- rem -- clean solutions rem ----------------------------------------------------------------------------- if %build-clean%==1 ( rem -- call nuget restore "%build-root%\iothub_client\samples\iothub_client_sample_amqp\windows\iothub_client_sample_amqp.sln" rem -- call :clean-a-solution "%build-root%\iothub_client\samples\iothub_client_sample_amqp\windows\iothub_client_sample_amqp.sln" rem -- if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) rem ----------------------------------------------------------------------------- rem -- build with CMAKE and run tests rem ----------------------------------------------------------------------------- echo CMAKE Output Path: %build-root%\cmake\%CMAKE_DIR% if EXIST %build-root%\cmake\%CMAKE_DIR% ( rmdir /s/q %build-root%\cmake\%CMAKE_DIR% rem no error checking ) echo %build-root%\cmake\%CMAKE_DIR% mkdir %build-root%\cmake\%CMAKE_DIR% rem no error checking pushd %build-root%\cmake\%CMAKE_DIR% if %MAKE_NUGET_PKG% == yes ( echo ***Running CMAKE for Win32*** cmake %build-root% if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd echo ***Running CMAKE for Win64*** if EXIST %build-root%\cmake\uamqp_x64 ( rmdir /s/q %build-root%\cmake\uamqp_x64 ) mkdir %build-root%\cmake\uamqp_x64 pushd %build-root%\cmake\uamqp_x64 cmake %build-root% -G "Visual Studio 14 Win64" if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd echo ***Running CMAKE for ARM*** if EXIST %build-root%\cmake\uamqp_arm ( rmdir /s/q %build-root%\cmake\uamqp_arm ) mkdir %build-root%\cmake\uamqp_arm pushd %build-root%\cmake\uamqp_arm cmake %build-root% -G "Visual Studio 14 ARM" if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else if %build-platform% == Win32 ( echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:BOOL=ON -Drun_e2e_tests:BOOL=ON if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else if %build-platform% == arm ( echo ***Running CMAKE for ARM*** cmake %build-root% -Drun_unittests:BOOL=ON -Drun_e2e_tests:BOOL=ON -G "Visual Studio 14 ARM" if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else ( echo ***Running CMAKE for Win64*** cmake %build-root% -Drun_unittests:BOOL=ON -Drun_e2e_tests:BOOL=ON -G "Visual Studio 14 Win64" if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) if %MAKE_NUGET_PKG% == yes ( echo ***Building all configurations*** msbuild /m %build-root%\cmake\uamqp_win32\uamqp.sln /p:Configuration=Release msbuild /m %build-root%\cmake\uamqp_win32\uamqp.sln /p:Configuration=Debug if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! msbuild /m %build-root%\cmake\uamqp_x64\uamqp.sln /p:Configuration=Release msbuild /m %build-root%\cmake\uamqp_x64\uamqp.sln /p:Configuration=Debug if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! msbuild /m %build-root%\cmake\uamqp_arm\uamqp.sln /p:Configuration=Release msbuild /m %build-root%\cmake\uamqp_arm\uamqp.sln /p:Configuration=Debug if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else ( call :_run-msbuild "Build" uamqp.sln %2 %3 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! if %build-platform% neq arm ( echo Build Platform: %build-platform% if "%build-config%" == "Debug" ( ctest -C "debug" -V if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) ) ) popd goto :eof rem ----------------------------------------------------------------------------- rem -- subroutines rem ----------------------------------------------------------------------------- :clean-a-solution call :_run-msbuild "Clean" %1 %2 %3 goto :eof :build-a-solution call :_run-msbuild "Build" %1 %2 %3 goto :eof :run-unit-tests call :_run-tests %1 "UnitTests" goto :eof :usage echo build.cmd [options] echo options: echo -c, --clean delete artifacts from previous build before building echo --config ^ [Debug] build configuration (e.g. Debug, Release) echo --platform ^ [Win32] build platform (e.g. Win32, x64, arm, ...) goto :eof rem ----------------------------------------------------------------------------- rem -- helper subroutines rem ----------------------------------------------------------------------------- :_run-msbuild rem // optionally override configuration|platform setlocal EnableExtensions set build-target= if "%~1" neq "Build" set "build-target=/t:%~1" if "%~3" neq "" set build-config=%~3 if "%~4" neq "" set build-platform=%~4 msbuild /m %build-target% "/p:Configuration=%build-config%;Platform=%build-platform%" %2 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof :_run-tests rem // discover tests set test-dlls-list= set test-dlls-path=%build-root%\%~1\build\windows\%build-platform%\%build-config% for /f %%i in ('dir /b %test-dlls-path%\*%~2*.dll') do set test-dlls-list="%test-dlls-path%\%%i" !test-dlls-list! if "%test-dlls-list%" equ "" ( echo No unit tests found in %test-dlls-path% exit /b 1 ) rem // run tests echo Test DLLs: %test-dlls-list% echo. vstest.console.exe %test-dlls-list% if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof echo doneazure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/configs/000077500000000000000000000000001362133436400235165ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/configs/uamqpConfig.cmake000066400000000000000000000005151362133436400267720ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. include("${CMAKE_CURRENT_LIST_DIR}/uamqpTargets.cmake") get_target_property(UAMQP_INCLUDES uamqp INTERFACE_INCLUDE_DIRECTORIES) set(UAMQP_INCLUDES ${UAMQP_INCLUDES} CACHE INTERNAL "")azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/contribute.md000066400000000000000000000032411362133436400245660ustar00rootroot00000000000000## What to contribute There are many ways that you can contribute to the uAMQP project: * Submit a bug * Submit a code fix for a bug * Submit code to add a new platform/language support to the project, or modify existing code * Submit additions or modifications to the documentation * Submit a feature request ## Contributing Code To contribute code you need to issue a Pull Request against the master branch. All code submissions will be reviewed and tested, and those that meet a high bar for both quality and design/roadmap appropriateness will be merged into the source. You must sign a [Contribution License Agreement](https://cla.microsoft.com/) ([CLA](https://cla.microsoft.com/)) before submitting a Pull Request. To complete the CLA, you will need to submit the request via the form and then electronically sign the CLA when you receive the email containing the link to the document. ## Big contributions If your contribution is significantly big it is better to first check with the project developers in order to make sure the change aligns with the long term plans. This can be done simply by submitting a question via the GitHub Issues section. ## Things to keep in mind when contributing Some guidance for when you make a contribution: * Add/update the Visio design diagram when required by your change * Add/update module requirements as required by your change * Add/update unit tests and code as required by your change * Make sure you run all the unit tests on the affected platform(s). If the change is in common code, generally running on one platform would be acceptable * Run end-to-end tests or simple sample code to make sure the lib works in an end-to-end scenario. azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/dependencies-test.cmake000066400000000000000000000012331362133436400264720ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. if(${use_installed_dependencies}) #These need to be set for the functions included by azure-c-shared-utility set(SHARED_UTIL_SRC_FOLDER "${CMAKE_CURRENT_LIST_DIR}/deps/azure-c-shared-utility/src") set(SHARED_UTIL_FOLDER "${CMAKE_CURRENT_LIST_DIR}/deps/azure-c-shared-utility") set(SHARED_UTIL_ADAPTER_FOLDER "${CMAKE_CURRENT_LIST_DIR}/deps/azure-c-shared-utility/adapters") set_platform_files("${CMAKE_CURRENT_LIST_DIR}/deps/azure-c-shared-utility") find_package(umock_c REQUIRED CONFIG) endif()azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/dependencies.cmake000066400000000000000000000003661362133436400255230ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. if(${use_installed_dependencies}) find_package(azure_c_shared_utility REQUIRED config) endif()azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/000077500000000000000000000000001362133436400230215ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/000077500000000000000000000000001362133436400273345ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/.gitattributes000066400000000000000000000014711362133436400322320ustar00rootroot00000000000000# Default behavior: if Git thinks a file is text (as opposed to binary), it # will normalize line endings to LF in the repository, but convert to your # platform's native line endings on checkout (e.g., CRLF for Windows). * text=auto # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. E.g., #*.c text # Declare files that will always have CRLF line endings on checkout. E.g., #*.sln text eol=crlf # Declare files that will always have LF line endings on checkout. E.g., *.sh text eol=lf *.json text eol=lf # Denote all files that should not have line endings normalized, should not be # merged, and should not show in a textual diff. *.docm binary *.docx binary *.ico binary *.lib binary *.png binary *.pptx binary *.snk binary *.vsdx binary *.xps binary azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/.gitignore000066400000000000000000000033521362133436400313270ustar00rootroot00000000000000################################################################################ # This .gitignore file was automatically created by Microsoft(R) Visual Studio. ################################################################################ # Compiled object files *.o *.opp # Compiled static libraries *.a # Doxygen output html/ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ # Visual Studio 2015 cache/options directory .vs/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUNIT *.VisualState.xml TestResult.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # VS Code Directory .vscode/ # Azure IoT specific build artifacts /build /build_all/windows/nuget.exe /cmake* /.vs *.jar *.aps /res **/obj/* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # TFS 2012 Local Workspace $tf/ # NuGet Packages *.nupkg # The packages folder can be ignored because of Package Restore **/packages/* # except build/, which is used as an MSBuild target. !**/packages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/packages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/.gitmodules000066400000000000000000000005131362133436400315100ustar00rootroot00000000000000[submodule "testtools/ctest"] path = testtools/ctest url = https://github.com/Azure/azure-ctest.git [submodule "testtools/umock-c"] path = testtools/umock-c url = https://github.com/Azure/umock-c.git [submodule "testtools/testrunner"] path = testtools/testrunner url = https://github.com/Azure/azure-c-testrunnerswitcher.git azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/CMakeLists.txt000066400000000000000000000536131362133436400321040ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if (TARGET aziotsharedutil) RETURN() endif() project(azure_c_shared_utility) FILE(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt C_SHARED_VERSION) # Include the common build rules for the C SDK include(configs/azure_iot_build_rules.cmake) #the following variables are project-wide and can be used with cmake-gui option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF) option(skip_samples "set skip_samples to ON to skip building samples (default is OFF)[if possible, they are always built]" OFF) option(use_http "set use_http to ON if http is to be used, set to OFF to not use http" ON) option(use_condition "set use_condition to ON if the condition module and its adapters should be enabled" ON) option(use_wsio "set use_wsio to ON to build WebSockets support (default is ON)" ON) option(nuget_e2e_tests "set nuget_e2e_tests to ON to generate e2e tests to run with nuget packages (default is OFF)" OFF) option(use_installed_dependencies "set use_installed_dependencies to ON to use installed packages instead of building dependencies from submodules" OFF) option(use_default_uuid "set use_default_uuid to ON to use the out of the box UUID that comes with the SDK rather than platform specific implementations" OFF) option(run_e2e_tests "set run_e2e_tests to ON to run e2e tests (default is OFF). Chsare dutility does not have any e2e tests, but the option needs to exist to evaluate in IF statements" OFF) option(use_builtin_httpapi "set use_builtin_httpapi to ON to use the built-in httpapi_compact that comes with C shared utility (default is OFF)" OFF) option(use_cppunittest "set use_cppunittest to ON to build CppUnitTest tests on Windows (default is ON)" ON) option(suppress_header_searches "do not try to find headers - used when compiler check will fail" OFF) option(use_custom_heap "use externally defined heap functions instead of the malloc family" OFF) if(${use_custom_heap}) add_definitions(-DGB_USE_CUSTOM_HEAP) endif() if(WIN32) option(use_schannel "set use_schannel to ON if schannel is to be used, set to OFF to not use schannel" ON) option(use_openssl "set use_openssl to ON if openssl is to be used, set to OFF to not use openssl" OFF) option(use_wolfssl "set use_wolfssl to ON if wolfssl is to be used, set to OFF to not use wolfssl" OFF) option(use_etw "set use_etw to ON if ETW logging is to be used. Default is OFF" OFF) option(use_socketio "set use_socketio to ON if socketio is to be included in the library, set to OFF if a different implementation will be provided" ON) else() option(use_schannel "set use_schannel to ON if schannel is to be used, set to OFF to not use schannel" OFF) if(MACOSX) option(use_openssl "set use_openssl to ON if openssl is to be used, set to OFF to not use openssl" OFF) option(use_socketio "set use_socketio to ON if socketio is to be included in the library, set to OFF if a different implementation will be provided" OFF) else() option(use_openssl "set use_openssl to ON if openssl is to be used, set to OFF to not use openssl" ON) option(use_socketio "set use_socketio to ON if socketio is to be included in the library, set to OFF if a different implementation will be provided" ON) endif() option(use_wolfssl "set use_wolfssl to ON if wolfssl is to be used, set to OFF to not use wolfssl" OFF) endif() option(no_logging "disable logging (default is OFF)" OFF) # The options setting for use_socketio is not reliable. If openssl is used, make sure it's on, # and if apple tls is used then use_socketio must be off. if (MACOSX) if (${use_openssl}) set(use_socketio ON) else() # MACOSX only has native tls and open ssl, so this must be the native apple tls set(use_applessl ON) set(use_socketio OFF) endif() endif() if(${use_etw}) #create res folder file(MAKE_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/res) #populate res folder with the ETW resources execute_process(COMMAND ${CMAKE_CURRENT_LIST_DIR}/src/etw_provider_generate.cmd WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/src ) endif() option(build_as_dynamic "build the C Shared libaries as shared" OFF) if(${memory_trace}) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) add_definitions(-DGB_MEASURE_NETWORK_FOR_THIS -DGB_DEBUG_NETWORK) endif() if(${use_openssl}) if("${OPENSSL_ROOT_DIR}" STREQUAL "" AND NOT ("$ENV{OpenSSLDir}" STREQUAL "")) set(OPENSSL_ROOT_DIR $ENV{OpenSSLDir} CACHE PATH "") endif() # If OpenSSL::SSL OR OpenSSL::Crypto are not set then you need to run # the find package for openssl if (NOT TARGET OpenSSL::SSL OR NOT TARGET OpenSSL::Crypto OR NOT ${OPENSSL_INCLUDE_DIR}) find_package(OpenSSL REQUIRED) endif() include_directories(${OPENSSL_INCLUDE_DIR}) endif() if(${use_applessl}) # MACOSX only has native tls and open ssl, so use the native apple tls find_library(cf_foundation Foundation) find_library(cf_network CFNetwork) endif() if(${no_logging}) add_definitions(-DNO_LOGGING) endif() # Start of variables used during install set (LIB_INSTALL_DIR lib CACHE PATH "Library object file directory") #Setup the platform files include("${CMAKE_CURRENT_LIST_DIR}/configs/azure_c_shared_utilityFunctions.cmake") set_platform_files(${CMAKE_CURRENT_LIST_DIR}) if(MSVC) if (WINCE) # WEC 2013 uses older VS compiler. Build some files as C++ files to resolve C99 related compile issues SET_SOURCE_FILES_PROPERTIES(${LOGGING_C_FILE} ${XLOGGING_C_FILE} src/map.c adapters/uniqueid_win32.c src/tlsio_schannel.c src/x509_schannel.c PROPERTIES LANGUAGE CXX) if (${use_httpapi_compact}) SET_SOURCE_FILES_PROPERTIES(adapters/httpapi_compact.c PROPERTIES LANGUAGE CXX) else() SET_SOURCE_FILES_PROPERTIES(adapters/httpapi_wince.c PROPERTIES LANGUAGE CXX) endif() ELSE() if(${use_openssl}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_OPENSSL") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_OPENSSL") endif() if(${use_wolfssl}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_WOLFSSL") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_WOLFSSL") # Disables error if a bit-field is used on non-integer variable set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /wd4214") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /wd4214") endif() endif() elseif(LINUX) #LINUX OR APPLE set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat=2 -Wformat-security") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wformat-security") if(${use_openssl}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_OPENSSL") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_OPENSSL") endif() if(${use_wolfssl}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_WOLFSSL") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_WOLFSSL") endif() # Turn off warning that can not be fixed right now set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable -Wno-missing-braces -Wno-missing-field-initializers -Wno-format-nonliteral") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable -Wno-missing-braces -Wno-missing-field-initializers -Wno-format-nonliteral") elseif(APPLE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wformat-security") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wformat-security") if(${use_openssl}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_OPENSSL") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_OPENSSL") endif() if(${use_wolfssl}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_WOLFSSL") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_WOLFSSL") endif() endif() include_directories(${UMOCK_C_INC_FOLDER}) #these are the C source files set(source_c_files ./src/base32.c ./src/base64.c ./src/buffer.c ./src/connection_string_parser.c ./src/constbuffer.c ${LOGGING_C_FILE} ./src/crt_abstractions.c ./src/constmap.c ./src/doublylinkedlist.c ./src/gballoc.c ./src/gbnetwork.c ./src/gb_stdio.c ./src/gb_time.c ./src/gb_rand.c ./src/hmac.c ./src/hmacsha256.c ./src/xio.c ./src/singlylinkedlist.c ./src/map.c ./src/sastoken.c ./src/sha1.c ./src/sha224.c ./src/sha384-512.c ./src/strings.c ./src/string_token.c ./src/string_tokenizer.c ./src/uuid.c ./src/urlencode.c ./src/usha.c ./src/vector.c ${XLOGGING_C_FILE} ./src/optionhandler.c ./adapters/agenttime.c ${CONDITION_C_FILE} ${LOCK_C_FILE} ${PLATFORM_C_FILE} ${SOCKETIO_C_FILE} ${TICKCOUTER_C_FILE} ${THREAD_C_FILE} ${UNIQUEID_C_FILE} ${ENVIRONMENT_VARIABLE_C_FILE} ) if(UNIX) #LINUX OR APPLE set(source_c_files ${source_c_files} ./adapters/linux_time.c ) endif() if(${use_http}) set(source_c_files ${source_c_files} ./src/httpapiex.c ./src/httpapiexsas.c ./src/httpheaders.c ${HTTP_C_FILE} ) endif() if(${use_schannel}) set(source_c_files ${source_c_files} ./adapters/tlsio_schannel.c ./adapters/x509_schannel.c ) endif() # If SocketIO isn't used, then we need to substitute stubs for HTTP Proxy # since it depends on SocketIO if(${use_socketio}) set(source_c_files ${source_c_files} ./src/http_proxy_io.c ) else() set(source_c_files ${source_c_files} ./src/http_proxy_stub.c ) endif() if(${use_wolfssl}) set(source_c_files ${source_c_files} ./adapters/tlsio_wolfssl.c ) endif() if(${use_openssl}) set(source_c_files ${source_c_files} ./adapters/tlsio_openssl.c ./adapters/x509_openssl.c ) endif() if(${use_applessl}) set(source_c_files ${source_c_files} ./pal/ios-osx/tlsio_appleios.c ./pal/tlsio_options.c ) include_directories(./pal/ios-osx/) endif() #these are the C headers set(source_h_files ./inc/azure_c_shared_utility/agenttime.h ./inc/azure_c_shared_utility/base32.h ./inc/azure_c_shared_utility/base64.h ./inc/azure_c_shared_utility/buffer_.h ./inc/azure_c_shared_utility/connection_string_parser.h ./inc/azure_c_shared_utility/crt_abstractions.h ./inc/azure_c_shared_utility/constmap.h ./inc/azure_c_shared_utility/condition.h ./inc/azure_c_shared_utility/const_defines.h ${LOGGING_H_FILE} ./inc/azure_c_shared_utility/doublylinkedlist.h ./inc/azure_c_shared_utility/envvariable.h ./inc/azure_c_shared_utility/gballoc.h ./inc/azure_c_shared_utility/gbnetwork.h ./inc/azure_c_shared_utility/gb_stdio.h ./inc/azure_c_shared_utility/gb_time.h ./inc/azure_c_shared_utility/gb_rand.h ./inc/azure_c_shared_utility/hmac.h ./inc/azure_c_shared_utility/hmacsha256.h ./inc/azure_c_shared_utility/http_proxy_io.h ./inc/azure_c_shared_utility/singlylinkedlist.h ./inc/azure_c_shared_utility/lock.h ./inc/azure_c_shared_utility/macro_utils.h ./inc/azure_c_shared_utility/map.h ./inc/azure_c_shared_utility/optimize_size.h ./inc/azure_c_shared_utility/platform.h ./inc/azure_c_shared_utility/refcount.h ./inc/azure_c_shared_utility/sastoken.h ./inc/azure_c_shared_utility/sha-private.h ./inc/azure_c_shared_utility/shared_util_options.h ./inc/azure_c_shared_utility/sha.h ./inc/azure_c_shared_utility/socketio.h ./inc/azure_c_shared_utility/stdint_ce6.h ./inc/azure_c_shared_utility/strings.h ./inc/azure_c_shared_utility/strings_types.h ./inc/azure_c_shared_utility/string_token.h ./inc/azure_c_shared_utility/string_tokenizer.h ./inc/azure_c_shared_utility/string_tokenizer_types.h ./inc/azure_c_shared_utility/tlsio_options.h ./inc/azure_c_shared_utility/tickcounter.h ./inc/azure_c_shared_utility/threadapi.h ./inc/azure_c_shared_utility/xio.h ./inc/azure_c_shared_utility/umock_c_prod.h ./inc/azure_c_shared_utility/uniqueid.h ./inc/azure_c_shared_utility/uuid.h ./inc/azure_c_shared_utility/urlencode.h ./inc/azure_c_shared_utility/vector.h ./inc/azure_c_shared_utility/vector_types.h ./inc/azure_c_shared_utility/vector_types_internal.h ./inc/azure_c_shared_utility/xlogging.h ./inc/azure_c_shared_utility/constbuffer.h ./inc/azure_c_shared_utility/tlsio.h ./inc/azure_c_shared_utility/optionhandler.h ) if(UNIX) #LINUX OR APPLE set(source_h_files ${source_h_files} ./adapters/linux_time.h ) endif() if(${use_wsio}) set(source_h_files ${source_h_files} ./inc/azure_c_shared_utility/wsio.h ./inc/azure_c_shared_utility/uws_client.h ./inc/azure_c_shared_utility/uws_frame_encoder.h ./inc/azure_c_shared_utility/utf8_checker.h ./inc/azure_c_shared_utility/ws_url.h ) set(source_c_files ${source_c_files} ./src/wsio.c ./src/uws_client.c ./src/uws_frame_encoder.c ./src/utf8_checker.c ./src/ws_url.c ) endif() if(${use_http}) set(source_h_files ${source_h_files} ./inc/azure_c_shared_utility/httpapi.h ./inc/azure_c_shared_utility/httpapiex.h ./inc/azure_c_shared_utility/httpapiexsas.h ./inc/azure_c_shared_utility/httpheaders.h ) endif() if(${use_schannel}) set(source_h_files ${source_h_files} ./inc/azure_c_shared_utility/tlsio_schannel.h ./inc/azure_c_shared_utility/x509_schannel.h ) endif() if(${use_wolfssl}) set(source_h_files ${source_h_files} ./inc/azure_c_shared_utility/tlsio_wolfssl.h ) if(WIN32) include_directories($ENV{WolfSSLDir}) endif() endif() if(${use_openssl}) set(source_h_files ${source_h_files} ./inc/azure_c_shared_utility/tlsio_openssl.h ./inc/azure_c_shared_utility/x509_openssl.h ) endif() if(${use_applessl}) set(source_h_files ${source_h_files} ./pal/ios-osx/tlsio_appleios.h ) include_directories(./pal/ios-osx/) endif() #this is the product (a library) add_library(aziotsharedutil ${source_c_files} ${source_h_files}) setTargetBuildProperties(aziotsharedutil) target_include_directories(aziotsharedutil PUBLIC $) if(MSVC) set(source_h_files ${source_h_files} ./pal/windows/refcount_os.h ) target_include_directories(aziotsharedutil PUBLIC $$) else() set(source_h_files ${source_h_files} ./pal/linux/refcount_os.h ) target_include_directories(aziotsharedutil PUBLIC $$) endif() if(${build_as_dynamic}) # need to create a def file from existing def files due to cmake # not letting us build more than one file file(READ ./src/aziotsharedutil.def DEF_FILE_CONTENT) file(WRITE "${CMAKE_BINARY_DIR}/shared_util.def" ${DEF_FILE_CONTENT}) file(READ ./src/aziotsharedutil_http.def DEF_FILE_CONTENT) file(APPEND "${CMAKE_BINARY_DIR}/shared_util.def" ${DEF_FILE_CONTENT}) file(READ ./src/aziotsharedutil_wsio.def DEF_FILE_CONTENT) file(APPEND "${CMAKE_BINARY_DIR}/shared_util.def" ${DEF_FILE_CONTENT}) set(def_files "${CMAKE_BINARY_DIR}/shared_util.def") #make sure we can link as dll/so add_library(aziotsharedutil_dll SHARED ${source_c_files} ${source_h_files} ${def_files} ) set_target_properties(aziotsharedutil_dll PROPERTIES OUTPUT_NAME "aziotsharedutil_dll") endif() set(aziotsharedutil_target_libs) if(${use_http}) if(WIN32) if (WINCE) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} crypt32 ws2) else() set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} crypt32 winhttp) endif() else() if (NOT use_builtin_httpapi) if (CMAKE_CROSSCOMPILING) # As mentioned at https://cmake.org/Wiki/CMake_Cross_Compiling the # pkg-config tool can not be used by cmake while cross compiling. message(STATUS "Cross compiling not using pkg-config") else() # try pkg-config first find_package(PkgConfig) if(PKG_CONFIG_FOUND) pkg_check_modules(CURL libcurl) endif() endif() # if that didn't work, try CMake find_package if(NOT CURL_FOUND) find_package(CURL) endif() set(CURL_FIND_REQUIRED 1) find_package_handle_standard_args(CURL DEFAULT_MSG CURL_LIBRARIES) include_directories(${CURL_INCLUDE_DIRS}) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} ${CURL_LIBRARIES}) endif(NOT use_builtin_httpapi) endif() endif(${use_http}) if(${use_schannel}) if(WIN32) if (WINCE) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} secur32) else() set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} crypt32 ws2_32 secur32 advapi32 ncrypt) endif() endif() endif() if(${use_openssl}) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} ${OPENSSL_LIBRARIES}) if (WIN32) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} crypt32 ws2_32 secur32) endif() endif() if(${use_wolfssl}) if (WIN32) if (CMAKE_BUILD_TYPE EQUAL "DEBUG") set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} $ENV{WolfSSLDir}/Debug/wolfssl.lib) else() set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} $ENV{WolfSSLDir}/Release/wolfssl.lib) endif() else() set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} wolfssl) endif() endif() if(${use_applessl}) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} ${cf_foundation} ${cf_network}) endif() if(WIN32) if (NOT ${use_default_uuid}) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} rpcrt4.lib) endif() endif() if(LINUX) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} pthread m rt) if (NOT ${use_default_uuid}) if(APPLE) find_package(PkgConfig REQUIRED) pkg_search_module(UUID REQUIRED uuid) link_directories(${UUID_LIBRARY_DIRS}) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} -L${UUID_LIBRARY_DIRS} ${UUID_LIBRARIES}) else() set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} uuid) endif() endif() endif() target_link_libraries(aziotsharedutil ${aziotsharedutil_target_libs}) if(${build_as_dynamic}) target_link_libraries(aziotsharedutil_dll ${aziotsharedutil_target_libs}) endif() # do not add or build any tests of the dependencies set(original_run_e2e_tests ${run_e2e_tests}) set(original_run_unittests ${run_unittests}) set(run_e2e_tests OFF) set(run_unittests OFF) if (${original_run_unittests}) include("dependencies-test.cmake") add_subdirectory(testtools) endif() if (${run_unittests} OR ${run_e2e_tests}) setTargetBuildProperties(ctest) setTargetBuildProperties(testrunnerswitcher) setTargetBuildProperties(umock_c) endif() set(run_e2e_tests ${original_run_e2e_tests}) set(run_unittests ${original_run_unittests}) if (${run_unittests}) add_subdirectory(tests) endif() function(FindDllFromLib var libFile) get_filename_component(_libName ${libFile} NAME_WE) get_filename_component(_libDir ${libFile} DIRECTORY) while(NOT ("${_libDir}" STREQUAL "")) file(GLOB_RECURSE _dllList "${_libDir}/${_libName}.dll") list(LENGTH _dllList _listLen) if(${_listLen} GREATER 0) list(GET _dllList 0 _dll) set(${var} "${_dll}" PARENT_SCOPE) break() endif() get_filename_component(_libDir ${_libDir} DIRECTORY) endwhile() endfunction() if (NOT ${skip_samples}) if(${use_openssl} AND WIN32) FindDllFromLib(SSL_DLL "${OPENSSL_SSL_LIBRARY}") FindDllFromLib(CRYPTO_DLL "${OPENSSL_CRYPTO_LIBRARY}") endif() add_subdirectory(samples) endif() # Set CMAKE_INSTALL_* if not defined include(GNUInstallDirs) if(${use_installed_dependencies}) if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() # Install Azure C Shared Utility set(package_location "cmake") if(${build_as_dynamic}) set(targets aziotsharedutil aziotsharedutil_dll) else(${build_as_dynamic}) set(targets aziotsharedutil) endif(${build_as_dynamic}) install (TARGETS ${targets} EXPORT aziotsharedutilTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot ) install (FILES ${source_h_files} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot/azure_c_shared_utility) install (FILES ${micromock_h_files_full_path} ${INSTALL_H_FILES} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azureiot) include(CMakePackageConfigHelpers) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" VERSION ${C_SHARED_VERSION} COMPATIBILITY SameMajorVersion ) configure_file("configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" COPYONLY ) install(EXPORT aziotsharedutilTargets FILE "${PROJECT_NAME}Targets.cmake" DESTINATION ${package_location} ) install( FILES "configs/${PROJECT_NAME}Config.cmake" "configs/${PROJECT_NAME}Functions.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION ${package_location} ) else() set(install_staticlibs aziotsharedutil ) install(FILES ${source_h_files} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/azure_c_shared_utility) install(TARGETS ${install_staticlibs} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() compileTargetAsC99(aziotsharedutil) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/LICENSE000066400000000000000000000021541362133436400303430ustar00rootroot00000000000000Microsoft Azure IoT SDKs Copyright (c) Microsoft Corporation All rights reserved. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/README.md000066400000000000000000000057551362133436400306270ustar00rootroot00000000000000This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # Azure C Shared Utility azure-c-shared-utility is a C library providing common functionality for basic tasks (like string, list manipulation, IO, etc.). ## Dependencies azure-c-shared-utility provides 3 tlsio implementations: - tlsio_schannel - runs only on Windows - tlsio_openssl - depends on OpenSSL being installed - tlsio_wolfssl - depends on WolfSSL being installed azure-c-shared-utility depends on curl for HTTPAPI for Linux. azure-c-shared-utility uses cmake for configuring build files. ## Setup 1. Clone **azure-c-shared-utility** using the recursive option: ``` git clone --recursive https://github.com/Azure/azure-c-shared-utility.git ``` 2. Create a folder called *cmake* under *azure-c-shared-utility* 3. Switch to the *cmake* folder and run ``` cmake .. ``` 4. Build ``` cmake --build . ``` ### Installation and Use Optionally, you may choose to install azure-c-shared-utility on your machine: 1. Switch to the *cmake* folder and run ``` cmake -Duse_installed_dependencies=ON ../ ``` ``` cmake --build . --target install ``` or install using the follow commands for each platform: On Linux: ``` sudo make install ``` On Windows: ``` msbuild /m INSTALL.vcxproj ``` 2. Use it in your project (if installed) ``` find_package(azure_c_shared_utility REQUIRED CONFIG) target_link_library(yourlib aziotsharedutil) ``` _If running tests, this requires that umock-c, azure-ctest, and azure-c-testrunnerswitcher are installed (through CMake) on your machine._ ### Building the tests In order to build the tests use: ``` cmake .. -Drun_unittests:bool=ON ``` ## Configuration options In order to turn on/off the tlsio implementations use the following CMAKE options: * `-Duse_schannel:bool={ON/OFF}` - turns on/off the SChannel support * `-Duse_openssl:bool={ON/OFF}` - turns on/off the OpenSSL support. If this option is use an environment variable name OpenSSLDir should be set to point to the OpenSSL folder. * `-Duse_wolfssl:bool={ON/OFF}` - turns on/off the WolfSSL support. If this option is use an environment variable name WolfSSLDir should be set to point to the WolfSSL folder. * `-Duse_http:bool={ON/OFF}` - turns on/off the HTTP API support. * `-Duse_installed_dependencies:bool={ON/OFF}` - turns on/off building azure-c-shared-utility using installed dependencies. This package may only be installed if this flag is ON. * `-Drun_unittests:bool={ON/OFF}` - enables building of unit tests. Default is OFF. ## Porting to new devices Instructions for porting the Azure IoT C SDK to new devices are located [here](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/porting_guide.md). azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/000077500000000000000000000000001362133436400311375ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/README.md000066400000000000000000000015751362133436400324260ustar00rootroot00000000000000This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # azure-c-shared-utility/src This directory contains source files for Azure C Shared Utility. ### Where did that file go? Files related to adapting the Azure IoT C SDK to specific devices are being moved to new locations within the [azure-c-shared-utility/pal](https://github.com/Azure/azure-c-shared-utility/tree/master/pal) directory and its subfolders. ### Porting to new devices Instructions for porting the Azure IoT C SDK to new devices are located [here](https://github.com/Azure/azure-c-shared-utility/blob/pal-porting/devdoc/porting_guide.md). azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/agenttime.c000066400000000000000000000011751362133436400332640ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/gballoc.h" #include #include "azure_c_shared_utility/agenttime.h" time_t get_time(time_t* p) { return time(p); } struct tm* get_gmtime(time_t* currentTime) { return gmtime(currentTime); } time_t get_mktime(struct tm* cal_time) { return mktime(cal_time); } char* get_ctime(time_t* timeToGet) { return ctime(timeToGet); } double get_difftime(time_t stopTime, time_t startTime) { return difftime(stopTime, startTime); } agenttime_esp8266.c000066400000000000000000000011521362133436400343750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/xlogging.h" #include "lwip/apps/sntp.h" #include "lwip/apps/sntp_time.h" time_t get_time(time_t* currentTime) { return sntp_get_current_timestamp(); } double get_difftime(time_t stopTime, time_t startTime) { return (double)stopTime - (double)startTime; } struct tm* get_gmtime(time_t* currentTime) { return NULL; } char* get_ctime(time_t* timeToGet) { return NULL; } agenttime_mbed.c000066400000000000000000000011541362133436400341710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/agenttime.h" // mbed version of gmtime() returns NULL. // system RTC should be set to UTC as its localtime time_t get_time(time_t* currentTime) { return time(currentTime); } double get_difftime(time_t stopTime, time_t startTime) { return difftime(stopTime, startTime); } struct tm* get_gmtime(time_t* currentTime) { return localtime(currentTime); } char* get_ctime(time_t* timeToGet) { return ctime(timeToGet); } condition_pthreads.c000066400000000000000000000112001362133436400350760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/condition.h" #include "azure_c_shared_utility/xlogging.h" #include #include #include "azure_c_shared_utility/gballoc.h" #include "time.h" #include "linux_time.h" DEFINE_ENUM_STRINGS(COND_RESULT, COND_RESULT_VALUES); pthread_cond_t* create_cond(void) { pthread_cond_t * cond = (pthread_cond_t*)malloc(sizeof(pthread_cond_t)); if (cond != NULL) { #ifdef __MACH__ pthread_cond_init(cond, NULL); #else pthread_condattr_t cattr; pthread_condattr_init(&cattr); pthread_condattr_setclock(&cattr, time_basis); pthread_cond_init(cond, &cattr); pthread_condattr_destroy(&cattr); #endif } return cond; } COND_HANDLE Condition_Init(void) { set_time_basis(); // Codes_SRS_CONDITION_18_002: [ Condition_Init shall create and return a CONDITION_HANDLE ] // Codes_SRS_CONDITION_18_008: [ Condition_Init shall return NULL if it fails to allocate the CONDITION_HANDLE ] return create_cond(); } COND_RESULT Condition_Post(COND_HANDLE handle) { COND_RESULT result; // Codes_SRS_CONDITION_18_001: [ Condition_Post shall return COND_INVALID_ARG if handle is NULL ] if (handle == NULL) { result = COND_INVALID_ARG; } else { // Codes_SRS_CONDITION_18_003: [ Condition_Post shall return COND_OK if it succcessfully posts the condition ] if (pthread_cond_signal((pthread_cond_t*)handle) == 0) { result = COND_OK; } else { result = COND_ERROR; } } return result; } COND_RESULT Condition_Wait(COND_HANDLE handle, LOCK_HANDLE lock, int timeout_milliseconds) { COND_RESULT result; // Codes_SRS_CONDITION_18_004: [ Condition_Wait shall return COND_INVALID_ARG if handle is NULL ] // Codes_SRS_CONDITION_18_005: [ Condition_Wait shall return COND_INVALID_ARG if lock is NULL and timeout_milliseconds is 0 ] // Codes_SRS_CONDITION_18_006: [ Condition_Wait shall return COND_INVALID_ARG if lock is NULL and timeout_milliseconds is not 0 ] if (handle == NULL || lock == NULL) { result = COND_INVALID_ARG; } else { if (timeout_milliseconds > 0) { // Codes_SRS_CONDITION_18_013: [ Condition_Wait shall accept relative timeouts ] struct timespec tm; if (get_time_ns(&tm) != 0) { LogError("Failed to get the current time"); return COND_ERROR; } tm.tv_nsec += (timeout_milliseconds % MILLISECONDS_IN_1_SECOND) * NANOSECONDS_IN_1_MILLISECOND; tm.tv_sec += timeout_milliseconds / MILLISECONDS_IN_1_SECOND; // handle overflow in tv_nsec tm.tv_sec+= tm.tv_nsec / NANOSECONDS_IN_1_SECOND; tm.tv_nsec %= NANOSECONDS_IN_1_SECOND; int wait_result = pthread_cond_timedwait((pthread_cond_t *)handle, (pthread_mutex_t *)lock, &tm); if (wait_result == ETIMEDOUT) { // Codes_SRS_CONDITION_18_011: [ Condition_Wait shall return COND_TIMEOUT if the condition is NOT triggered and timeout_milliseconds is not 0 ] return COND_TIMEOUT; } else if (wait_result == 0) { // Codes_SRS_CONDITION_18_012: [ Condition_Wait shall return COND_OK if the condition is triggered and timeout_milliseconds is not 0 ] result = COND_OK; } else { LogError("Failed to pthread_cond_timedwait"); return COND_ERROR; } } else { if (pthread_cond_wait((pthread_cond_t*)handle, (pthread_mutex_t *)lock) != 0) { LogError("Failed to pthread_cond_wait"); return COND_ERROR; } else { // Codes_SRS_CONDITION_18_010: [ Condition_Wait shall return COND_OK if the condition is triggered and timeout_milliseconds is 0 ] result = COND_OK; } } } return result; } void Condition_Deinit(COND_HANDLE handle) { // Codes_SRS_CONDITION_18_007: [ Condition_Deinit will not fail if handle is NULL ] if (handle != NULL) { // Codes_SRS_CONDITION_18_009: [ Condition_Deinit will deallocate handle if it is not NULL pthread_cond_t* cond = (pthread_cond_t*)handle; pthread_cond_destroy(cond); free(cond); } } condition_rtx_mbed.cpp000066400000000000000000000016251362133436400354420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/condition.h" #include "rtos.h" COND_HANDLE Condition_Init(void) { return NULL; } COND_RESULT Condition_Post(COND_HANDLE handle) { COND_RESULT result; if (handle == NULL) { result = COND_INVALID_ARG; } else { result = COND_ERROR; } return result; } COND_RESULT Condition_Wait(COND_HANDLE handle, LOCK_HANDLE lock, int timeout_milliseconds) { COND_RESULT result; if (handle == NULL) { result = COND_INVALID_ARG; } else { result = COND_ERROR; } return result; } void Condition_Deinit(COND_HANDLE handle) { if (handle != NULL) { } } condition_win32.c000066400000000000000000000121011362133436400342270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/condition.h" #include "windows.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/gballoc.h" DEFINE_ENUM_STRINGS(COND_RESULT, COND_RESULT_VALUES); typedef struct CONDITION_TAG { volatile LONG waiting_thread_count; HANDLE event_handle; } CONDITION; COND_HANDLE Condition_Init(void) { // Codes_SRS_CONDITION_18_002: [ Condition_Init shall create and return a CONDITION_HANDLE ] CONDITION* cond = (CONDITION*)malloc(sizeof(CONDITION)); // Codes_SRS_CONDITION_18_008: [ Condition_Init shall return NULL if it fails to allocate the CONDITION_HANDLE ] if (cond != NULL) { cond->event_handle = CreateEvent(NULL, FALSE, FALSE, NULL); if (cond->event_handle == INVALID_HANDLE_VALUE) { LogError("CreateEvent failed with error %d", GetLastError()); free(cond); cond = NULL; } else { /* Needed to emulate pthread_signal as we only signal the event when there are waiting threads */ cond->waiting_thread_count = 0; } } else { LogError("Failed to allocate condition handle"); } return (COND_HANDLE)cond; } COND_RESULT Condition_Post(COND_HANDLE handle) { COND_RESULT result; if (handle == NULL) { LogError("Null argument handle passed to Condition_Post"); // Codes_SRS_CONDITION_18_001: [ Condition_Post shall return COND_INVALID_ARG if handle is NULL ] result = COND_INVALID_ARG; } else { CONDITION* cond = (CONDITION*)handle; /* Emulate pthreads signalling, by only unblocking *one* waiting thread if there is one waiting */ if (cond->waiting_thread_count == 0 || SetEvent(cond->event_handle)) { // Codes_SRS_CONDITION_18_003: [ Condition_Post shall return COND_OK if it succcessfully posts the condition ] result = COND_OK; } else { LogError("Failed SetEvent call with error %d", GetLastError()); result = COND_ERROR; } } return result; } COND_RESULT Condition_Wait(COND_HANDLE handle, LOCK_HANDLE lock, int timeout_milliseconds) { COND_RESULT result; // Codes_SRS_CONDITION_18_004: [ Condition_Wait shall return COND_INVALID_ARG if handle is NULL ] // Codes_SRS_CONDITION_18_005: [ Condition_Wait shall return COND_INVALID_ARG if lock is NULL and timeout_milliseconds is 0 ] // Codes_SRS_CONDITION_18_006: [ Condition_Wait shall return COND_INVALID_ARG if lock is NULL and timeout_milliseconds is not 0 ] if (handle == NULL || lock == NULL) { result = COND_INVALID_ARG; } else if (Unlock(lock) == 0) { CONDITION* cond = (CONDITION*)handle; DWORD wait_result; /* Increment the waiting thread count, unlock the lock and wait */ (void)InterlockedIncrement(&cond->waiting_thread_count); // Codes_SRS_CONDITION_18_013: [ Condition_Wait shall accept relative timeouts ] wait_result = WaitForSingleObject(cond->event_handle, timeout_milliseconds == 0 ? INFINITE : timeout_milliseconds); /* If we unlocked ok, it means the lock handle is valid, lock must succeed since it wraps EnterCriticalSection */ (void)Lock(lock); if (wait_result != WAIT_OBJECT_0 && wait_result != WAIT_TIMEOUT) { LogError("Failed wait, wait returned with %x", wait_result); /* cond might be freed at this point, just return error and do not touch condition */ result = COND_ERROR; } else { /* To handle the chance of a race condition reset the event again when there are no more waiting threads */ if (InterlockedDecrement(&cond->waiting_thread_count) == 0) { (void)ResetEvent(cond->event_handle); } if (wait_result == WAIT_TIMEOUT) { // Codes_SRS_CONDITION_18_011: [ Condition_Wait shall return COND_TIMEOUT if the condition is NOT triggered and timeout_milliseconds is not 0 ] result = COND_TIMEOUT; } else { // Codes_SRS_CONDITION_18_012: [ Condition_Wait shall return COND_OK if the condition is triggered and timeout_milliseconds is not 0 ] result = COND_OK; } } } else { LogError("Invalid lock passed which failed to unlock"); result = COND_ERROR; } return result; } void Condition_Deinit(COND_HANDLE handle) { // Codes_SRS_CONDITION_18_007: [ Condition_Deinit will not fail if handle is NULL ] // Codes_SRS_CONDITION_18_009: [ Condition_Deinit will deallocate handle if it is not NULL if (handle != NULL) { CONDITION* cond = (CONDITION*)handle; (void)CloseHandle(cond->event_handle); cond->event_handle = INVALID_HANDLE_VALUE; free(cond); } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/envvariable.c000066400000000000000000000005301362133436400335770ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/envvariable.h" const char* environment_get_variable(const char *variable_name) { return getenv(variable_name); } esp8266_mock.h000066400000000000000000000215771362133436400333730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef _ESP8266_MOCK_H_ #define _ESP8266_MOCK_H_ #include #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef void SSL; typedef void SSL_CTX; typedef void SSL_METHOD; /* * SSL_CTX_new - create a SSL context * * @param method - the SSL context configuration file * * @return the context point, if create failed return NULL */ //SSL_CTX* SSL_CTX_new(SSL_METHOD *method); MOCKABLE_FUNCTION(, SSL_CTX*, SSL_CTX_new, SSL_METHOD*, method); /* * SSL_CTX_free - free a SSL context * * @param method - the SSL context point * * @return none */ //void SSL_CTX_free(SSL_CTX *ctx); MOCKABLE_FUNCTION(, void, SSL_CTX_free, SSL_CTX*, ctx); /* * SSL_new - create a SSL * * @param ssl_ctx - the SSL context which includes the SSL parameter * * @return the result * result = 0 : successfully * result < 0 : error, you may see the mbedtls error code */ //SSL* SSL_new(SSL_CTX *ssl_ctx); MOCKABLE_FUNCTION(, SSL*, SSL_new, SSL_CTX*, ssl_ctx); /* * SSL_free - free the SSL * * @param ssl - the SSL point which has been "SSL_new" * * @return none */ //void SSL_free(SSL *ssl); MOCKABLE_FUNCTION(, void, SSL_free, SSL*, ssl); /* * SSL_connect - connect to the remote SSL server * * @param ssl - the SSL point which has been "SSL_new" * * @return the result * result = 0 : successfully * result < 0 : error, you can see the mbedtls error code */ //int SSL_connect(SSL *ssl); MOCKABLE_FUNCTION(, int, SSL_connect, SSL*, ssl); /* * SSL_read - read data from remote * * @param ssl - the SSL point which has been connected * @param buffer - the received data point * @param len - the received data length * * @return the result * result > 0 : the length of the received data * result = 0 : the connect is closed * result < 0 : error, you can see the mbedtls error code */ // int SSL_read(SSL *ssl, void *buffer, int len); MOCKABLE_FUNCTION(, int, SSL_read, SSL*, ssl, void*, buffer, int, len); /* * SSL_write - send the data to remote * * @param ssl - the SSL point which has been connected * @param buffer - the send data point * @param len - the send data length * * @return the result of verifying * result > 0 : the length of the written data * result = 0 : the connect is closed * result < 0 : error, you can see the mbedtls error code */ //int SSL_write(SSL *ssl, const void *buffer, int len); MOCKABLE_FUNCTION(, int, SSL_write, SSL*, ssl, const void*, buffer, int, len); /* * SSL_shutdown - shutdown the connection to the remote * * @param ssl - the SSL point which has been connected or accepted * * @return the result * result = 0 : successfully * result < 0 : error, you may see the mbedtls error code */ //int SSL_shutdown(SSL *ssl); MOCKABLE_FUNCTION(, int, SSL_shutdown, SSL*, ssl); /* * SSL_set_fd - set the socket file description to the SSL * * @param ssl - the SSL point which has been "SSL_new" * @param fd - socket file description * * @return the result * result = 1 : successfully * result <= 0 : error, SSL is NULL or socket file description is NULL */ //int SSL_set_fd(SSL *ssl, int fd); MOCKABLE_FUNCTION(, int, SSL_set_fd, SSL*, ssl, int, fd); /* * TLSv1_client_method - create the target SSL context client method * * @return the TLSV1.0 version SSL context client method */ //SSL_METHOD* TLSv1_client_method(void); MOCKABLE_FUNCTION(, SSL_METHOD*, TLSv1_client_method); /** * @brief set the SSL context read buffer length * * @param ctx - SSL context point * @param len - read buffer length * * @return none */ //void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len); MOCKABLE_FUNCTION(, void, SSL_CTX_set_default_read_buffer_len, SSL_CTX*, ctx, size_t, len); /** * @brief get SSL error code * * @param ssl - SSL point * @param ret_code - SSL return code * * @return SSL error number */ //int SSL_get_error(const SSL *ssl, int ret_code); MOCKABLE_FUNCTION(, int, SSL_get_error, const SSL*, ssl, int, ret_code); #define MEMP_NUM_NETCONN 10 typedef uint32_t u32_t; #define socklen_t unsigned int typedef uint8_t u8_t; typedef uint8_t uint8; typedef uint16_t u16_t; typedef int32_t err_t; struct ip_addr { u32_t addr; }; typedef struct ip_addr ip_addr_t; #define SOL_SOCKET 0xfff /* options for socket level */ #define SO_SNDBUF 0x1001 /* Unimplemented: send buffer size */ #define SO_RCVBUF 0x1002 /* receive buffer size */ #define SO_SNDLOWAT 0x1003 /* Unimplemented: send low-water mark */ #define SO_RCVLOWAT 0x1004 /* Unimplemented: receive low-water mark */ #define SO_SNDTIMEO 0x1005 /* Unimplemented: send timeout */ #define SO_RCVTIMEO 0x1006 /* receive timeout */ #define SO_ERROR 0x1007 /* get error status and clear */ #define SO_TYPE 0x1008 /* get socket type */ #define SO_CONTIMEO 0x1009 /* Unimplemented: connect timeout */ #define SO_NO_CHECK 0x100a /* don't create UDP checksum */ #define SO_REUSEADDR 1 /* Enable address reuse */ #define SO_KEEPALIVE 0x0008 /* keep connections alive */ #define IPPROTO_TCP 6 #define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */ #define TCP_KEEPIDLE 0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */ #define TCP_KEEPINTVL 0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */ #define TCP_KEEPCNT 0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */ #define SSL_ERROR_WANT_READ 2 #define SSL_ERROR_WANT_WRITE 3 #define AF_INET 2 /* Socket protocol types (TCP/UDP/RAW) */ #define SOCK_STREAM 1 #define SOCK_DGRAM 2 #define SOCK_RAW 3 int ioctl(int s, long cmd, void *argp); #define F_GETFL 3 #define F_SETFL 4 #define O_NONBLOCK 1 /* nonblocking I/O */ #define O_NDELAY 1 /* same as O_NONBLOCK, for compatibility */ #define LOCAL typedef u8_t sa_family_t; typedef u16_t in_port_t; typedef u32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; struct sockaddr_in { u8_t sin_len; sa_family_t sin_family; in_port_t sin_port; struct in_addr sin_addr; #define SIN_ZERO_LEN 8 char sin_zero[SIN_ZERO_LEN]; }; struct sockaddr { u8_t sa_len; sa_family_t sa_family; #if LWIP_IPV6 char sa_data[22]; #else /* LWIP_IPV6 */ char sa_data[14]; #endif /* LWIP_IPV6 */ }; /* FD_SET used for lwip_select */ //int my_FD_ISSET(int n, void* p); #ifndef FD_SET #undef FD_SETSIZE /* Make FD_SETSIZE match NUM_SOCKETS in socket.c */ #define FD_SETSIZE MEMP_NUM_NETCONN #define FD_SET(n, p) ((p)->fd_bits[(n)/8] |= (1 << ((n) & 7))) #define FD_CLR(n, p) ((p)->fd_bits[(n)/8] &= ~(1 << ((n) & 7))) //#define FD_ISSET(n,p) my_FD_ISSET(n, p) //((p)->fd_bits[(n)/8] & (1 << ((n) & 7))) #define FD_ZERO(p) memset((void*)(p),0,sizeof(*(p))) typedef struct fd_set { unsigned char fd_bits [(FD_SETSIZE+7)/8]; } fd_set; #endif /* FD_SET */ struct timeval { long tv_sec; /* seconds */ long tv_usec; /* and microseconds */ }; //err_t netconn_gethostbyname(const char *name, ip_addr_t *addr); MOCKABLE_FUNCTION(, err_t, netconn_gethostbyname, const char*, name, ip_addr_t*, addr); //int socket(int domain, int type, int protocol); MOCKABLE_FUNCTION(, int, socket, int, domain, int, type, int, protocol); //int bind(int s, const struct sockaddr* name, socklen_t namelen); MOCKABLE_FUNCTION(, int, bind, int, s, const struct sockaddr*, name, socklen_t, namelen); //int connect(int s, const struct sockaddr *name, socklen_t namelen); MOCKABLE_FUNCTION(, int, connect, int, s, const struct sockaddr*, name, socklen_t, namelen); //int lwip_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen) MOCKABLE_FUNCTION(, int, getsockopt, int, s, int, level, int, optname, void*, optval, socklen_t*, optlen); //int lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, // struct timeval *timeout); MOCKABLE_FUNCTION(, int, lwip_select, int, maxfdp1, fd_set*, readset, fd_set*, writeset, fd_set*, exceptset, struct timeval*, timeout); //os_delay_us(int us); MOCKABLE_FUNCTION(, void, os_delay_us, int, us); //int setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen); MOCKABLE_FUNCTION(, int, setsockopt, int, s, int, level, int, optname, const void*, optval, socklen_t, optlen); //int close(int s) MOCKABLE_FUNCTION(, int, close, int, s); MOCKABLE_FUNCTION(, int, FD_ISSET, int, n, void*, p); //int fcntl(int s, int cmd, int val); MOCKABLE_FUNCTION(, int, fcntl, int, s, int, cmd, int, val); #define htons(x) (x) #define ntohs(x) (x) #define htonl(x) (x) #define ntohl(x) (x) #ifdef __cplusplus } #endif /* __cplusplus */ #endif httpapi_compact.c000066400000000000000000001666571362133436400344300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/threadapi.h" #include "azure_c_shared_utility/shared_util_options.h" #ifdef _MSC_VER #define snprintf _snprintf #endif /*Codes_SRS_HTTPAPI_COMPACT_21_001: [ The httpapi_compact shall implement the methods defined by the `httpapi.h`. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_002: [ The httpapi_compact shall support the http requests. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_003: [ The httpapi_compact shall return error codes defined by HTTPAPI_RESULT. ]*/ #include "azure_c_shared_utility/httpapi.h" #define MAX_HOSTNAME 64 #define TEMP_BUFFER_SIZE 1024 /*Codes_SRS_HTTPAPI_COMPACT_21_077: [ The HTTPAPI_ExecuteRequest shall wait, at least, 10 seconds for the SSL open process. ]*/ #define MAX_OPEN_RETRY 100 /*Codes_SRS_HTTPAPI_COMPACT_21_084: [ The HTTPAPI_CloseConnection shall wait, at least, 10 seconds for the SSL close process. ]*/ #define MAX_CLOSE_RETRY 100 /*Codes_SRS_HTTPAPI_COMPACT_21_079: [ The HTTPAPI_ExecuteRequest shall wait, at least, 20 seconds to send a buffer using the SSL connection. ]*/ #define MAX_SEND_RETRY 200 /*Codes_SRS_HTTPAPI_COMPACT_21_081: [ The HTTPAPI_ExecuteRequest shall try to read the message with the response up to 20 seconds. ]*/ #define MAX_RECEIVE_RETRY 200 /*Codes_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ #define RETRY_INTERVAL_IN_MICROSECONDS 100 DEFINE_ENUM_STRINGS(HTTPAPI_RESULT, HTTPAPI_RESULT_VALUES) typedef struct HTTP_HANDLE_DATA_TAG { char* certificate; char* x509ClientCertificate; char* x509ClientPrivateKey; XIO_HANDLE xio_handle; size_t received_bytes_count; unsigned char* received_bytes; unsigned int is_io_error : 1; unsigned int is_connected : 1; unsigned int send_completed : 1; } HTTP_HANDLE_DATA; /*the following function does the same as sscanf(pos2, "%d", &sec)*/ /*this function only exists because some of platforms do not have sscanf. */ static int ParseStringToDecimal(const char *src, int* dst) { int result; char* next; long num = strtol(src, &next, 0); if (src == next || num < INT_MIN || num > INT_MAX) { result = EOF; } else { result = 1; } if (num < INT_MIN) num = INT_MIN; if (num > INT_MAX) num = INT_MAX; *dst = (int)num; return result; } /*the following function does the same as sscanf(pos2, "%x", &sec)*/ /*this function only exists because some of platforms do not have sscanf. This is not a full implementation; it only works with well-defined x numbers. */ #define HEXA_DIGIT_VAL(c) (((c>='0') && (c<='9')) ? (c-'0') : ((c>='a') && (c<='f')) ? (c-'a'+10) : ((c>='A') && (c<='F')) ? (c-'A'+10) : -1) static int ParseStringToHexadecimal(const char *src, size_t* dst) { int result; int digitVal; if (src == NULL) { result = EOF; } else if (HEXA_DIGIT_VAL(*src) == -1) { result = EOF; } else { (*dst) = 0; while ((digitVal = HEXA_DIGIT_VAL(*src)) != -1) { (*dst) *= 0x10; (*dst) += (size_t)digitVal; src++; } result = 1; } return result; } /*the following function does the same as sscanf(buf, "HTTP/%*d.%*d %d %*[^\r\n]", &ret) */ /*this function only exists because some of platforms do not have sscanf. This is not a full implementation; it only works with well-defined HTTP response. */ static int ParseHttpResponse(const char* src, int* dst) { int result; static const char HTTPPrefix[] = "HTTP/"; bool fail; const char* runPrefix; if ((src == NULL) || (dst == NULL)) { result = EOF; } else { fail = false; runPrefix = HTTPPrefix; while((*runPrefix) != '\0') { if ((*runPrefix) != (*src)) { fail = true; break; } src++; runPrefix++; } if (!fail) { while ((*src) != '.') { if ((*src) == '\0') { fail = true; break; } src++; } } if (!fail) { while ((*src) != ' ') { if ((*src) == '\0') { fail = true; break; } src++; } } if (fail) { result = EOF; } else { result = ParseStringToDecimal(src, dst); } } return result; } HTTPAPI_RESULT HTTPAPI_Init(void) { /*Codes_SRS_HTTPAPI_COMPACT_21_004: [ The HTTPAPI_Init shall allocate all memory to control the http protocol. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_007: [ If there is not enough memory to control the http protocol, the HTTPAPI_Init shall return HTTPAPI_ALLOC_FAILED. ]*/ /** * No memory is necessary. */ /*Codes_SRS_HTTPAPI_COMPACT_21_006: [ If HTTPAPI_Init succeed allocating all the needed memory, it shall return HTTPAPI_OK. ]*/ return HTTPAPI_OK; } void HTTPAPI_Deinit(void) { /*Codes_SRS_HTTPAPI_COMPACT_21_009: [ The HTTPAPI_Init shall release all memory allocated by the httpapi_compact. ]*/ /** * No memory was necessary. */ } /*Codes_SRS_HTTPAPI_COMPACT_21_011: [ The HTTPAPI_CreateConnection shall create an http connection to the host specified by the hostName parameter. ]*/ HTTP_HANDLE HTTPAPI_CreateConnection(const char* hostName) { HTTP_HANDLE_DATA* http_instance; TLSIO_CONFIG tlsio_config; if (hostName == NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_014: [ If the hostName is NULL, the HTTPAPI_CreateConnection shall return NULL as the handle. ]*/ LogError("Invalid host name. Null hostName parameter."); http_instance = NULL; } else if (*hostName == '\0') { /*Codes_SRS_HTTPAPI_COMPACT_21_015: [ If the hostName is empty, the HTTPAPI_CreateConnection shall return NULL as the handle. ]*/ LogError("Invalid host name. Empty string."); http_instance = NULL; } else { http_instance = (HTTP_HANDLE_DATA*)malloc(sizeof(HTTP_HANDLE_DATA)); /*Codes_SRS_HTTPAPI_COMPACT_21_013: [ If there is not enough memory to control the http connection, the HTTPAPI_CreateConnection shall return NULL as the handle. ]*/ if (http_instance == NULL) { LogError("There is no memory to control the http connection"); } else { tlsio_config.hostname = hostName; tlsio_config.port = 443; tlsio_config.underlying_io_interface = NULL; tlsio_config.underlying_io_parameters = NULL; http_instance->xio_handle = xio_create(platform_get_default_tlsio(), (void*)&tlsio_config); /*Codes_SRS_HTTPAPI_COMPACT_21_016: [ If the HTTPAPI_CreateConnection failed to create the connection, it shall return NULL as the handle. ]*/ if (http_instance->xio_handle == NULL) { LogError("Create connection failed"); free(http_instance); http_instance = NULL; } else { http_instance->is_connected = 0; http_instance->is_io_error = 0; http_instance->received_bytes_count = 0; http_instance->received_bytes = NULL; http_instance->certificate = NULL; http_instance->x509ClientCertificate = NULL; http_instance->x509ClientPrivateKey = NULL; } } } /*Codes_SRS_HTTPAPI_COMPACT_21_012: [ The HTTPAPI_CreateConnection shall return a non-NULL handle on success. ]*/ return (HTTP_HANDLE)http_instance; } static void on_io_close_complete(void* context) { HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)context; if (http_instance != NULL) { http_instance->is_connected = 0; } } void HTTPAPI_CloseConnection(HTTP_HANDLE handle) { HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)handle; /*Codes_SRS_HTTPAPI_COMPACT_21_020: [ If the connection handle is NULL, the HTTPAPI_CloseConnection shall not do anything. ]*/ if (http_instance != NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_019: [ If there is no previous connection, the HTTPAPI_CloseConnection shall not do anything. ]*/ if (http_instance->xio_handle != NULL) { http_instance->is_io_error = 0; /*Codes_SRS_HTTPAPI_COMPACT_21_017: [ The HTTPAPI_CloseConnection shall close the connection previously created in HTTPAPI_ExecuteRequest. ]*/ if (xio_close(http_instance->xio_handle, on_io_close_complete, http_instance) != 0) { LogError("The SSL got error closing the connection"); /*Codes_SRS_HTTPAPI_COMPACT_21_087: [ If the xio return anything different than 0, the HTTPAPI_CloseConnection shall destroy the connection anyway. ]*/ http_instance->is_connected = 0; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_084: [ The HTTPAPI_CloseConnection shall wait, at least, 10 seconds for the SSL close process. ]*/ int countRetry = MAX_CLOSE_RETRY; while (http_instance->is_connected == 1) { xio_dowork(http_instance->xio_handle); if ((countRetry--) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_085: [ If the HTTPAPI_CloseConnection retries 10 seconds to close the connection without success, it shall destroy the connection anyway. ]*/ LogError("Close timeout. The SSL didn't close the connection"); http_instance->is_connected = 0; } else if (http_instance->is_io_error == 1) { LogError("The SSL got error closing the connection"); http_instance->is_connected = 0; } else if (http_instance->is_connected == 1) { LogInfo("Waiting for TLS close connection"); /*Codes_SRS_HTTPAPI_COMPACT_21_086: [ The HTTPAPI_CloseConnection shall wait, at least, 100 milliseconds between retries. ]*/ ThreadAPI_Sleep(RETRY_INTERVAL_IN_MICROSECONDS); } } } /*Codes_SRS_HTTPAPI_COMPACT_21_076: [ After close the connection, The HTTPAPI_CloseConnection shall destroy the connection previously created in HTTPAPI_CreateConnection. ]*/ xio_destroy(http_instance->xio_handle); } #ifndef DO_NOT_COPY_TRUSTED_CERTS_STRING /*Codes_SRS_HTTPAPI_COMPACT_21_018: [ If there is a certificate associated to this connection, the HTTPAPI_CloseConnection shall free all allocated memory for the certificate. ]*/ if (http_instance->certificate) { free(http_instance->certificate); } #endif /*Codes_SRS_HTTPAPI_COMPACT_06_001: [ If there is a x509 client certificate associated to this connection, the HTTAPI_CloseConnection shall free all allocated memory for the certificate. ]*/ if (http_instance->x509ClientCertificate) { free(http_instance->x509ClientCertificate); } /*Codes_SRS_HTTPAPI_COMPACT_06_002: [ If there is a x509 client private key associated to this connection, then HTTP_CloseConnection shall free all the allocated memory for the private key. ]*/ if (http_instance->x509ClientPrivateKey) { free(http_instance->x509ClientPrivateKey); } free(http_instance); } } static void on_io_open_complete(void* context, IO_OPEN_RESULT open_result) { HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)context; if (http_instance != NULL) { if (open_result == IO_OPEN_OK) { http_instance->is_connected = 1; http_instance->is_io_error = 0; } else { http_instance->is_io_error = 1; } } } static void on_send_complete(void* context, IO_SEND_RESULT send_result) { HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)context; if (http_instance != NULL) { if (send_result == IO_SEND_OK) { http_instance->send_completed = 1; http_instance->is_io_error = 0; } else { http_instance->is_io_error = 1; } } } #define TOLOWER(c) (((c>='A') && (c<='Z'))?c-'A'+'a':c) static int InternStrnicmp(const char* s1, const char* s2, size_t n) { int result; if (s1 == NULL) result = -1; else if (s2 == NULL) result = 1; else { result = 0; while(n-- && result == 0) { if (*s1 == 0) result = -1; else if (*s2 == 0) result = 1; else { result = TOLOWER(*s1) - TOLOWER(*s2); ++s1; ++s2; } } } return result; } static void on_bytes_received(void* context, const unsigned char* buffer, size_t size) { unsigned char* new_received_bytes; HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)context; if (http_instance != NULL) { if (buffer == NULL) { http_instance->is_io_error = 1; LogError("NULL pointer error"); } else { /* Here we got some bytes so we'll buffer them so the receive functions can consumer it */ new_received_bytes = (unsigned char*)realloc(http_instance->received_bytes, http_instance->received_bytes_count + size); if (new_received_bytes == NULL) { http_instance->is_io_error = 1; LogError("Error allocating memory for received data"); } else { http_instance->received_bytes = new_received_bytes; if (memcpy(http_instance->received_bytes + http_instance->received_bytes_count, buffer, size) == NULL) { http_instance->is_io_error = 1; LogError("Error copping received data to the HTTP bufffer"); } else { http_instance->received_bytes_count += size; } } } } } static void on_io_error(void* context) { HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)context; if (http_instance != NULL) { http_instance->is_io_error = 1; LogError("Error signalled by underlying IO"); } } static int conn_receive(HTTP_HANDLE_DATA* http_instance, char* buffer, int count) { int result; if ((http_instance == NULL) || (buffer == NULL) || (count < 0)) { LogError("conn_receive: %s", ((http_instance == NULL) ? "Invalid HTTP instance" : "Invalid HTTP buffer")); result = -1; } else { result = 0; while (result < count) { xio_dowork(http_instance->xio_handle); /* if any error was detected while receiving then simply break and report it */ if (http_instance->is_io_error != 0) { LogError("xio reported error on dowork"); result = -1; break; } if (http_instance->received_bytes_count >= (size_t)count) { /* Consuming bytes from the receive buffer */ (void)memcpy(buffer, http_instance->received_bytes, count); (void)memmove(http_instance->received_bytes, http_instance->received_bytes + count, http_instance->received_bytes_count - count); http_instance->received_bytes_count -= count; /* we're not reallocating at each consumption so that we don't trash due to byte by byte consumption */ if (http_instance->received_bytes_count == 0) { free(http_instance->received_bytes); http_instance->received_bytes = NULL; } result = count; break; } /*Codes_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ ThreadAPI_Sleep(RETRY_INTERVAL_IN_MICROSECONDS); } } return result; } static void conn_receive_discard_buffer(HTTP_HANDLE_DATA* http_instance) { if (http_instance != NULL) { if (http_instance->received_bytes != NULL) { free(http_instance->received_bytes); http_instance->received_bytes = NULL; } http_instance->received_bytes_count = 0; } } static int readLine(HTTP_HANDLE_DATA* http_instance, char* buf, const size_t maxBufSize) { int resultLineSize; if ((http_instance == NULL) || (buf == NULL) || (maxBufSize == 0)) { LogError("%s", ((http_instance == NULL) ? "Invalid HTTP instance" : "Invalid HTTP buffer")); resultLineSize = -1; } else { char* destByte = buf; /*Codes_SRS_HTTPAPI_COMPACT_21_081: [ The HTTPAPI_ExecuteRequest shall try to read the message with the response up to 20 seconds. ]*/ int countRetry = MAX_RECEIVE_RETRY; bool endOfSearch = false; resultLineSize = -1; while (!endOfSearch) { xio_dowork(http_instance->xio_handle); /* if any error was detected while receiving then simply break and report it */ if (http_instance->is_io_error != 0) { LogError("xio reported error on dowork"); endOfSearch = true; } else { unsigned char* receivedByte = http_instance->received_bytes; while (receivedByte < (http_instance->received_bytes + http_instance->received_bytes_count)) { if ((*receivedByte) != '\r') { (*destByte) = (*receivedByte); destByte++; receivedByte++; if (destByte >= (buf + maxBufSize - 1)) { LogError("Received message is bigger than the http buffer"); receivedByte = http_instance->received_bytes + http_instance->received_bytes_count; endOfSearch = true; break; } } else { receivedByte++; if ((receivedByte < (http_instance->received_bytes + http_instance->received_bytes_count)) && ((*receivedByte) == '\n')) { receivedByte++; } (*destByte) = '\0'; resultLineSize = (int)(destByte - buf); endOfSearch = true; break; } } http_instance->received_bytes_count -= (receivedByte - http_instance->received_bytes); if (http_instance->received_bytes_count != 0) { (void)memmove(http_instance->received_bytes, receivedByte, http_instance->received_bytes_count); } else { conn_receive_discard_buffer(http_instance); } } if (!endOfSearch) { if ((countRetry--) > 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ ThreadAPI_Sleep(RETRY_INTERVAL_IN_MICROSECONDS); } else { /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ LogError("Receive timeout. The HTTP request is incomplete"); endOfSearch = true; } } } } return resultLineSize; } static int readChunk(HTTP_HANDLE_DATA* http_instance, char* buf, size_t size) { int cur, offset; // read content with specified length, even if it is received // only in chunks due to fragmentation in the networking layer. // returns -1 in case of error. offset = 0; while (size > (size_t)0) { cur = conn_receive(http_instance, buf + offset, (int)size); // end of stream reached if (cur == 0) { break; } // read cur bytes (might be less than requested) size -= (size_t)cur; offset += cur; } return offset; } static int skipN(HTTP_HANDLE_DATA* http_instance, size_t n) { // read and abandon response content with specified length // returns -1 in case of error. int result; if (http_instance == NULL) { LogError("Invalid HTTP instance"); result = -1; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_081: [ The HTTPAPI_ExecuteRequest shall try to read the message with the response up to 20 seconds. ]*/ int countRetry = MAX_RECEIVE_RETRY; result = (int)n; while (n > 0) { xio_dowork(http_instance->xio_handle); /* if any error was detected while receiving then simply break and report it */ if (http_instance->is_io_error != 0) { LogError("xio reported error on dowork"); result = -1; n = 0; } else { if (http_instance->received_bytes_count <= n) { n -= http_instance->received_bytes_count; http_instance->received_bytes_count = 0; } else { http_instance->received_bytes_count -= n; (void)memmove(http_instance->received_bytes, http_instance->received_bytes + n, http_instance->received_bytes_count); n = 0; } if (n > 0) { if ((countRetry--) > 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ ThreadAPI_Sleep(RETRY_INTERVAL_IN_MICROSECONDS); } else { /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ LogError("Receive timeout. The HTTP request is incomplete"); n = 0; result = -1; } } } } } return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_021: [ The HTTPAPI_ExecuteRequest shall execute the http communtication with the provided host, sending a request and reciving the response. ]*/ static HTTPAPI_RESULT OpenXIOConnection(HTTP_HANDLE_DATA* http_instance) { HTTPAPI_RESULT result; if (http_instance->is_connected != 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; } else { http_instance->is_io_error = 0; /*Codes_SRS_HTTPAPI_COMPACT_21_022: [ If a Certificate was provided, the HTTPAPI_ExecuteRequest shall set this option on the transport layer. ]*/ if ((http_instance->certificate != NULL) && (xio_setoption(http_instance->xio_handle, OPTION_TRUSTED_CERT, http_instance->certificate) != 0)) { /*Codes_SRS_HTTPAPI_COMPACT_21_023: [ If the transport failed setting the Certificate, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. ]*/ result = HTTPAPI_SET_OPTION_FAILED; LogInfo("Could not load certificate"); } /*Codes_SRS_HTTPAPI_COMPACT_06_003: [ If the x509 client certificate is provided, the HTTPAPI_ExecuteRequest shall set this option on the transport layer. ]*/ else if ((http_instance->x509ClientCertificate != NULL) && (xio_setoption(http_instance->xio_handle, SU_OPTION_X509_CERT, http_instance->x509ClientCertificate) != 0)) { /*Codes_SRS_HTTPAPI_COMPACT_06_005: [ If the transport failed setting the client certificate, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. ]*/ result = HTTPAPI_SET_OPTION_FAILED; LogInfo("Could not load the client certificate"); } else if ((http_instance->x509ClientPrivateKey != NULL) && (xio_setoption(http_instance->xio_handle, SU_OPTION_X509_PRIVATE_KEY, http_instance->x509ClientPrivateKey) != 0)) { /*Codes_SRS_HTTPAPI_COMPACT_06_006: [ If the transport failed setting the client certificate private key, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. ] */ result = HTTPAPI_SET_OPTION_FAILED; LogInfo("Could not load the client certificate private key"); } else { /*Codes_SRS_HTTPAPI_COMPACT_21_024: [ The HTTPAPI_ExecuteRequest shall open the transport connection with the host to send the request. ]*/ if (xio_open(http_instance->xio_handle, on_io_open_complete, http_instance, on_bytes_received, http_instance, on_io_error, http_instance) != 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_025: [ If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ result = HTTPAPI_OPEN_REQUEST_FAILED; } else { int countRetry; /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; /*Codes_SRS_HTTPAPI_COMPACT_21_077: [ The HTTPAPI_ExecuteRequest shall wait, at least, 10 seconds for the SSL open process. ]*/ countRetry = MAX_OPEN_RETRY; while ((http_instance->is_connected == 0) && (http_instance->is_io_error == 0)) { xio_dowork(http_instance->xio_handle); LogInfo("Waiting for TLS connection"); if ((countRetry--) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_078: [ If the HTTPAPI_ExecuteRequest cannot open the connection in 10 seconds, it shall fail and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ LogError("Open timeout. The HTTP request is incomplete"); result = HTTPAPI_OPEN_REQUEST_FAILED; break; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ ThreadAPI_Sleep(RETRY_INTERVAL_IN_MICROSECONDS); } } } } } if ((http_instance->is_io_error != 0) && (result == HTTPAPI_OK)) { /*Codes_SRS_HTTPAPI_COMPACT_21_025: [ If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ result = HTTPAPI_OPEN_REQUEST_FAILED; } return result; } static HTTPAPI_RESULT conn_send_all(HTTP_HANDLE_DATA* http_instance, const unsigned char* buf, size_t bufLen) { HTTPAPI_RESULT result; http_instance->send_completed = 0; http_instance->is_io_error = 0; if (xio_send(http_instance->xio_handle, buf, bufLen, on_send_complete, http_instance) != 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_028: [ If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_HTTP_HEADERS_FAILED. ]*/ result = HTTPAPI_SEND_REQUEST_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_079: [ The HTTPAPI_ExecuteRequest shall wait, at least, 20 seconds to send a buffer using the SSL connection. ]*/ int countRetry = MAX_SEND_RETRY; /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; while ((http_instance->send_completed == 0) && (result == HTTPAPI_OK)) { xio_dowork(http_instance->xio_handle); if (http_instance->is_io_error != 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_028: [ If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_HTTP_HEADERS_FAILED. ]*/ result = HTTPAPI_SEND_REQUEST_FAILED; } else if ((countRetry--) <= 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_080: [ If the HTTPAPI_ExecuteRequest retries to send the message for 20 seconds without success, it shall fail and return HTTPAPI_SEND_REQUEST_FAILED. ]*/ LogError("Send timeout. The HTTP request is incomplete"); /*Codes_SRS_HTTPAPI_COMPACT_21_028: [ If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_HTTP_HEADERS_FAILED. ]*/ result = HTTPAPI_SEND_REQUEST_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ ThreadAPI_Sleep(RETRY_INTERVAL_IN_MICROSECONDS); } } } return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_035: [ The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`. ]*/ const char httpapiRequestString[6][7] = { "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD" }; const char* get_request_type(HTTPAPI_REQUEST_TYPE requestType) { return (const char*)httpapiRequestString[requestType]; } /*Codes_SRS_HTTPAPI_COMPACT_21_026: [ If the open process succeed, the HTTPAPI_ExecuteRequest shall send the request message to the host. ]*/ static HTTPAPI_RESULT SendHeadsToXIO(HTTP_HANDLE_DATA* http_instance, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE httpHeadersHandle, size_t headersCount) { HTTPAPI_RESULT result; char buf[TEMP_BUFFER_SIZE]; int ret; //Send request /*Codes_SRS_HTTPAPI_COMPACT_21_038: [ The HTTPAPI_ExecuteRequest shall execute the resquest for the path in relativePath parameter. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_036: [ The request type shall be provided in the parameter requestType. ]*/ if (((ret = snprintf(buf, sizeof(buf), "%s %s HTTP/1.1\r\n", get_request_type(requestType), relativePath)) < 0) || ((size_t)ret >= sizeof(buf))) { /*Codes_SRS_HTTPAPI_COMPACT_21_027: [ If the HTTPAPI_ExecuteRequest cannot create a buffer to send the request, it shall not send any request and return HTTPAPI_STRING_PROCESSING_ERROR. ]*/ result = HTTPAPI_STRING_PROCESSING_ERROR; } /*Codes_SRS_HTTPAPI_COMPACT_21_028: [ If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_HTTP_HEADERS_FAILED. ]*/ else if ((result = conn_send_all(http_instance, (const unsigned char*)buf, strlen(buf))) == HTTPAPI_OK) { size_t i; //Send default headers /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ for (i = 0; ((i < headersCount) && (result == HTTPAPI_OK)); i++) { char* header; if (HTTPHeaders_GetHeader(httpHeadersHandle, i, &header) != HTTP_HEADERS_OK) { /*Codes_SRS_HTTPAPI_COMPACT_21_027: [ If the HTTPAPI_ExecuteRequest cannot create a buffer to send the request, it shall not send any request and return HTTPAPI_STRING_PROCESSING_ERROR. ]*/ result = HTTPAPI_STRING_PROCESSING_ERROR; } else { if ((result = conn_send_all(http_instance, (const unsigned char*)header, strlen(header))) == HTTPAPI_OK) { result = conn_send_all(http_instance, (const unsigned char*)"\r\n", (size_t)2); } free(header); } } //Close headers if (result == HTTPAPI_OK) { result = conn_send_all(http_instance, (const unsigned char*)"\r\n", (size_t)2); } } return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_042: [ The request can contain the a content message, provided in content parameter. ]*/ static HTTPAPI_RESULT SendContentToXIO(HTTP_HANDLE_DATA* http_instance, const unsigned char* content, size_t contentLength) { HTTPAPI_RESULT result; //Send data (if available) /*Codes_SRS_HTTPAPI_COMPACT_21_045: [ If the contentLength is lower than one, the HTTPAPI_ExecuteRequest shall send the request without content. ]*/ if (content && contentLength > 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_044: [ If the content is not NULL, the number of bytes in the content shall be provided in contentLength parameter. ]*/ result = conn_send_all(http_instance, content, contentLength); } else { /*Codes_SRS_HTTPAPI_COMPACT_21_043: [ If the content is NULL, the HTTPAPI_ExecuteRequest shall send the request without content. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; } return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_030: [ At the end of the transmission, the HTTPAPI_ExecuteRequest shall receive the response from the host. ]*/ static HTTPAPI_RESULT ReceiveHeaderFromXIO(HTTP_HANDLE_DATA* http_instance, unsigned int* statusCode) { HTTPAPI_RESULT result; char buf[TEMP_BUFFER_SIZE]; int ret; http_instance->is_io_error = 0; //Receive response if (readLine(http_instance, buf, TEMP_BUFFER_SIZE) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } //Parse HTTP response else if (ParseHttpResponse(buf, &ret) != 1) { //Cannot match string, error /*Codes_SRS_HTTPAPI_COMPACT_21_055: [ If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. ]*/ LogInfo("Not a correct HTTP answer"); result = HTTPAPI_RECEIVE_RESPONSE_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_046: [ The HTTPAPI_ExecuteRequest shall return the http status reported by the host in the received response. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_048: [ If the statusCode is NULL, the HTTPAPI_ExecuteRequest shall report not report any status. ]*/ if (statusCode) { /*Codes_SRS_HTTPAPI_COMPACT_21_047: [ The HTTPAPI_ExecuteRequest shall report the status in the statusCode parameter. ]*/ *statusCode = ret; } /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; } return result; } static HTTPAPI_RESULT ReceiveContentInfoFromXIO(HTTP_HANDLE_DATA* http_instance, HTTP_HEADERS_HANDLE responseHeadersHandle, size_t* bodyLength, bool* chunked) { HTTPAPI_RESULT result; char buf[TEMP_BUFFER_SIZE]; const char* substr; char* whereIsColon; int lengthInMsg; const char ContentLength[] = "content-length:"; const size_t ContentLengthSize = sizeof(ContentLength) - 1; const char TransferEncoding[] = "transfer-encoding:"; const size_t TransferEncodingSize = sizeof(TransferEncoding) - 1; const char Chunked[] = "chunked"; const size_t ChunkedSize = sizeof(Chunked) - 1; http_instance->is_io_error = 0; //Read HTTP response headers if (readLine(http_instance, buf, sizeof(buf)) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; while (*buf && (result == HTTPAPI_OK)) { if (InternStrnicmp(buf, ContentLength, ContentLengthSize) == 0) { substr = buf + ContentLengthSize; if (ParseStringToDecimal(substr, &lengthInMsg) != 1) { /*Codes_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } else { (*bodyLength) = (size_t)lengthInMsg; } } else if (InternStrnicmp(buf, TransferEncoding, TransferEncodingSize) == 0) { substr = buf + TransferEncodingSize; while (isspace(*substr)) substr++; if (InternStrnicmp(substr, Chunked, ChunkedSize) == 0) { (*chunked) = true; } } if (result == HTTPAPI_OK) { whereIsColon = strchr((char*)buf, ':'); /*Codes_SRS_HTTPAPI_COMPACT_21_049: [ If responseHeadersHandle is provide, the HTTPAPI_ExecuteRequest shall prepare a Response Header usign the HTTPHeaders_AddHeaderNameValuePair. ]*/ if (whereIsColon && (responseHeadersHandle != NULL)) { *whereIsColon = '\0'; HTTPHeaders_AddHeaderNameValuePair(responseHeadersHandle, buf, whereIsColon + 1); } if (readLine(http_instance, buf, sizeof(buf)) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } } } } return result; } static HTTPAPI_RESULT ReadHTTPResponseBodyFromXIO(HTTP_HANDLE_DATA* http_instance, size_t bodyLength, bool chunked, BUFFER_HANDLE responseContent) { HTTPAPI_RESULT result; char buf[TEMP_BUFFER_SIZE]; const unsigned char* receivedContent; http_instance->is_io_error = 0; //Read HTTP response body if (!chunked) { if (bodyLength) { if (responseContent != NULL) { if (BUFFER_pre_build(responseContent, bodyLength) != 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_052: [ If any memory allocation get fail, the HTTPAPI_ExecuteRequest shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; } else if (BUFFER_content(responseContent, &receivedContent) != 0) { (void)BUFFER_unbuild(responseContent); /*Codes_SRS_HTTPAPI_COMPACT_21_052: [ If any memory allocation get fail, the HTTPAPI_ExecuteRequest shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; } else if (readChunk(http_instance, (char*)receivedContent, bodyLength) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; } } else { /*Codes_SRS_HTTPAPI_COMPACT_21_051: [ If the responseContent is NULL, the HTTPAPI_ExecuteRequest shall ignore any content in the response. ]*/ if (skipN(http_instance, bodyLength) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } else { result = HTTPAPI_OK; } } } else { /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; } } else { size_t size = 0; /*Codes_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ result = HTTPAPI_OK; while (result == HTTPAPI_OK) { size_t chunkSize; if (readLine(http_instance, buf, sizeof(buf)) < 0) // read [length in hex]/r/n { /*Codes_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } else if (ParseStringToHexadecimal(buf, &chunkSize) != 1) // chunkSize is length of next line (/r/n is not counted) { //Cannot match string, error /*Codes_SRS_HTTPAPI_COMPACT_21_055: [ If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. ]*/ result = HTTPAPI_RECEIVE_RESPONSE_FAILED; } else if (chunkSize == 0) { // 0 length means next line is just '\r\n' and end of chunks if (readChunk(http_instance, (char*)buf, (size_t)2) < 0 || buf[0] != '\r' || buf[1] != '\n') // skip /r/n { (void)BUFFER_unbuild(responseContent); result = HTTPAPI_READ_DATA_FAILED; } break; } else { if (responseContent != NULL) { if (BUFFER_enlarge(responseContent, chunkSize) != 0) { (void)BUFFER_unbuild(responseContent); /*Codes_SRS_HTTPAPI_COMPACT_21_052: [ If any memory allocation get fail, the HTTPAPI_ExecuteRequest shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; } else if (BUFFER_content(responseContent, &receivedContent) != 0) { (void)BUFFER_unbuild(responseContent); /*Codes_SRS_HTTPAPI_COMPACT_21_052: [ If any memory allocation get fail, the HTTPAPI_ExecuteRequest shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; } else if (readChunk(http_instance, (char*)receivedContent + size, chunkSize) < 0) { result = HTTPAPI_READ_DATA_FAILED; } } else { /*Codes_SRS_HTTPAPI_COMPACT_21_051: [ If the responseContent is NULL, the HTTPAPI_ExecuteRequest shall ignore any content in the response. ]*/ if (skipN(http_instance, chunkSize) < 0) { /*Codes_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ result = HTTPAPI_READ_DATA_FAILED; } } if (result == HTTPAPI_OK) { if (readChunk(http_instance, (char*)buf, (size_t)2) < 0 || buf[0] != '\r' || buf[1] != '\n') // skip /r/n { result = HTTPAPI_READ_DATA_FAILED; } size += chunkSize; } } } } return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_037: [ If the request type is unknown, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ static bool validRequestType(HTTPAPI_REQUEST_TYPE requestType) { bool result; if ((requestType == HTTPAPI_REQUEST_GET) || (requestType == HTTPAPI_REQUEST_POST) || (requestType == HTTPAPI_REQUEST_PUT) || (requestType == HTTPAPI_REQUEST_DELETE) || (requestType == HTTPAPI_REQUEST_PATCH) || (requestType == HTTPAPI_REQUEST_HEAD)) { result = true; } else { result = false; } return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_021: [ The HTTPAPI_ExecuteRequest shall execute the http communtication with the provided host, sending a request and reciving the response. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_050: [ If there is a content in the response, the HTTPAPI_ExecuteRequest shall copy it in the responseContent buffer. ]*/ //Note: This function assumes that "Host:" and "Content-Length:" headers are setup // by the caller of HTTPAPI_ExecuteRequest() (which is true for httptransport.c). HTTPAPI_RESULT HTTPAPI_ExecuteRequest(HTTP_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE httpHeadersHandle, const unsigned char* content, size_t contentLength, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent) { HTTPAPI_RESULT result = HTTPAPI_ERROR; size_t headersCount; size_t bodyLength = 0; bool chunked = false; HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)handle; /*Codes_SRS_HTTPAPI_COMPACT_21_034: [ If there is no previous connection, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_037: [ If the request type is unknown, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_039: [ If the relativePath is NULL or invalid, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_041: [ If the httpHeadersHandle is NULL or invalid, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_053: [ The HTTPAPI_ExecuteRequest shall produce a set of http header to send to the host. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_040: [ The request shall contain the http header provided in httpHeadersHandle parameter. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_054: [ If Http header maker cannot provide the number of headers, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ if (http_instance == NULL || relativePath == NULL || httpHeadersHandle == NULL || !validRequestType(requestType) || HTTPHeaders_GetHeaderCount(httpHeadersHandle, &headersCount) != HTTP_HEADERS_OK) { result = HTTPAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } /*Codes_SRS_HTTPAPI_COMPACT_21_024: [ The HTTPAPI_ExecuteRequest shall open the transport connection with the host to send the request. ]*/ else if ((result = OpenXIOConnection(http_instance)) != HTTPAPI_OK) { LogError("Open HTTP connection failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } /*Codes_SRS_HTTPAPI_COMPACT_21_026: [ If the open process succeed, the HTTPAPI_ExecuteRequest shall send the request message to the host. ]*/ else if ((result = SendHeadsToXIO(http_instance, requestType, relativePath, httpHeadersHandle, headersCount)) != HTTPAPI_OK) { LogError("Send heads to HTTP failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } /*Codes_SRS_HTTPAPI_COMPACT_21_042: [ The request can contain the a content message, provided in content parameter. ]*/ else if ((result = SendContentToXIO(http_instance, content, contentLength)) != HTTPAPI_OK) { LogError("Send content to HTTP failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } /*Codes_SRS_HTTPAPI_COMPACT_21_030: [ At the end of the transmission, the HTTPAPI_ExecuteRequest shall receive the response from the host. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_073: [ The message received by the HTTPAPI_ExecuteRequest shall starts with a valid header. ]*/ else if ((result = ReceiveHeaderFromXIO(http_instance, statusCode)) != HTTPAPI_OK) { LogError("Receive header from HTTP failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } /*Codes_SRS_HTTPAPI_COMPACT_21_074: [ After the header, the message received by the HTTPAPI_ExecuteRequest can contain addition information about the content. ]*/ else if ((result = ReceiveContentInfoFromXIO(http_instance, responseHeadersHandle, &bodyLength, &chunked)) != HTTPAPI_OK) { LogError("Receive content information from HTTP failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } /*Codes_SRS_HTTPAPI_COMPACT_42_084: [ The message received by the HTTPAPI_ExecuteRequest should not contain http body. ]*/ else if (requestType != HTTPAPI_REQUEST_HEAD) { /*Codes_SRS_HTTPAPI_COMPACT_21_075: [ The message received by the HTTPAPI_ExecuteRequest can contain a body with the message content. ]*/ if ((result = ReadHTTPResponseBodyFromXIO(http_instance, bodyLength, chunked, responseContent)) != HTTPAPI_OK) { LogError("Read HTTP response body from HTTP failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } conn_receive_discard_buffer(http_instance); return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_056: [ The HTTPAPI_SetOption shall change the HTTP options. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_057: [ The HTTPAPI_SetOption shall receive a handle that identiry the HTTP connection. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_058: [ The HTTPAPI_SetOption shall receive the option as a pair optionName/value. ]*/ HTTPAPI_RESULT HTTPAPI_SetOption(HTTP_HANDLE handle, const char* optionName, const void* value) { HTTPAPI_RESULT result; HTTP_HANDLE_DATA* http_instance = (HTTP_HANDLE_DATA*)handle; if ( (http_instance == NULL) || (optionName == NULL) || (value == NULL) ) { /*Codes_SRS_HTTPAPI_COMPACT_21_059: [ If the handle is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_060: [ If the optionName is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_061: [ If the value is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ result = HTTPAPI_INVALID_ARG; } else if (strcmp(OPTION_TRUSTED_CERT, optionName) == 0) { #ifdef DO_NOT_COPY_TRUSTED_CERTS_STRING result = HTTPAPI_OK; http_instance->certificate = (char*)value; #else int len; if (http_instance->certificate) { free(http_instance->certificate); } len = (int)strlen((char*)value); http_instance->certificate = (char*)malloc((len + 1) * sizeof(char)); if (http_instance->certificate == NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_062: [ If any memory allocation get fail, the HTTPAPI_SetOption shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; LogInfo("unable to allocate memory for the certificate in HTTPAPI_SetOption"); } else { /*Codes_SRS_HTTPAPI_COMPACT_21_064: [ If the HTTPAPI_SetOption get success setting the option, it shall return HTTPAPI_OK. ]*/ (void)strcpy(http_instance->certificate, (const char*)value); result = HTTPAPI_OK; } #endif // DO_NOT_COPY_TRUSTED_CERTS_STRING } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0) { int len; if (http_instance->x509ClientCertificate) { free(http_instance->x509ClientCertificate); } len = (int)strlen((char*)value); http_instance->x509ClientCertificate = (char*)malloc((len + 1) * sizeof(char)); if (http_instance->x509ClientCertificate == NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_062: [ If any memory allocation get fail, the HTTPAPI_SetOption shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; LogInfo("unable to allocate memory for the client certificate in HTTPAPI_SetOption"); } else { /*Codes_SRS_HTTPAPI_COMPACT_21_064: [ If the HTTPAPI_SetOption get success setting the option, it shall return HTTPAPI_OK. ]*/ (void)strcpy(http_instance->x509ClientCertificate, (const char*)value); result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0) { int len; if (http_instance->x509ClientPrivateKey) { free(http_instance->x509ClientPrivateKey); } len = (int)strlen((char*)value); http_instance->x509ClientPrivateKey = (char*)malloc((len + 1) * sizeof(char)); if (http_instance->x509ClientPrivateKey == NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_062: [ If any memory allocation get fail, the HTTPAPI_SetOption shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; LogInfo("unable to allocate memory for the client private key in HTTPAPI_SetOption"); } else { /*Codes_SRS_HTTPAPI_COMPACT_21_064: [ If the HTTPAPI_SetOption get success setting the option, it shall return HTTPAPI_OK. ]*/ (void)strcpy(http_instance->x509ClientPrivateKey, (const char*)value); result = HTTPAPI_OK; } } else { /*Codes_SRS_HTTPAPI_COMPACT_21_063: [ If the HTTP do not support the optionName, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ result = HTTPAPI_INVALID_ARG; LogInfo("unknown option %s", optionName); } return result; } /*Codes_SRS_HTTPAPI_COMPACT_21_065: [ The HTTPAPI_CloneOption shall provide the means to clone the HTTP option. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_066: [ The HTTPAPI_CloneOption shall return a clone of the value identified by the optionName. ]*/ HTTPAPI_RESULT HTTPAPI_CloneOption(const char* optionName, const void* value, const void** savedValue) { HTTPAPI_RESULT result; size_t certLen; char* tempCert; if ( (optionName == NULL) || (value == NULL) || (savedValue == NULL) ) { /*Codes_SRS_HTTPAPI_COMPACT_21_067: [ If the optionName is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_068: [ If the value is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ /*Codes_SRS_HTTPAPI_COMPACT_21_069: [ If the savedValue is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ result = HTTPAPI_INVALID_ARG; } else if (strcmp(OPTION_TRUSTED_CERT, optionName) == 0) { #ifdef DO_NOT_COPY_TRUSTED_CERTS_STRING *savedValue = (const void*)value; result = HTTPAPI_OK; #else certLen = strlen((const char*)value); tempCert = (char*)malloc((certLen + 1) * sizeof(char)); if (tempCert == NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_070: [ If any memory allocation get fail, the HTTPAPI_CloneOption shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_072: [ If the HTTPAPI_CloneOption get success setting the option, it shall return HTTPAPI_OK. ]*/ (void)strcpy(tempCert, (const char*)value); *savedValue = tempCert; result = HTTPAPI_OK; } #endif // DO_NOT_COPY_TRUSTED_CERTS_STRING } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0) { certLen = strlen((const char*)value); tempCert = (char*)malloc((certLen + 1) * sizeof(char)); if (tempCert == NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_070: [ If any memory allocation get fail, the HTTPAPI_CloneOption shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_072: [ If the HTTPAPI_CloneOption get success setting the option, it shall return HTTPAPI_OK. ]*/ (void)strcpy(tempCert, (const char*)value); *savedValue = tempCert; result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0) { certLen = strlen((const char*)value); tempCert = (char*)malloc((certLen + 1) * sizeof(char)); if (tempCert == NULL) { /*Codes_SRS_HTTPAPI_COMPACT_21_070: [ If any memory allocation get fail, the HTTPAPI_CloneOption shall return HTTPAPI_ALLOC_FAILED. ]*/ result = HTTPAPI_ALLOC_FAILED; } else { /*Codes_SRS_HTTPAPI_COMPACT_21_072: [ If the HTTPAPI_CloneOption get success setting the option, it shall return HTTPAPI_OK. ]*/ (void)strcpy(tempCert, (const char*)value); *savedValue = tempCert; result = HTTPAPI_OK; } } else { /*Codes_SRS_HTTPAPI_COMPACT_21_071: [ If the HTTP do not support the optionName, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ result = HTTPAPI_INVALID_ARG; LogInfo("unknown option %s", optionName); } return result; } httpapi_curl.c000066400000000000000000001220511362133436400337230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/httpapi.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "curl/curl.h" #include "azure_c_shared_utility/xlogging.h" #ifdef USE_OPENSSL #include "azure_c_shared_utility/x509_openssl.h" #elif USE_WOLFSSL #define WOLFSSL_OPTIONS_IGNORE_SYS #include "wolfssl/options.h" #include "wolfssl/ssl.h" #include "wolfssl/error-ssl.h" #endif #include "azure_c_shared_utility/shared_util_options.h" #define TEMP_BUFFER_SIZE 1024 DEFINE_ENUM_STRINGS(HTTPAPI_RESULT, HTTPAPI_RESULT_VALUES); typedef struct HTTP_HANDLE_DATA_TAG { CURL* curl; char* hostURL; long timeout; long lowSpeedLimit; long lowSpeedTime; long forbidReuse; long freshConnect; long verbose; const char* x509privatekey; const char* x509certificate; const char* certificates; /*a list of CA certificates*/ } HTTP_HANDLE_DATA; typedef struct HTTP_RESPONSE_CONTENT_BUFFER_TAG { unsigned char* buffer; size_t bufferSize; unsigned char error; } HTTP_RESPONSE_CONTENT_BUFFER; static size_t nUsersOfHTTPAPI = 0; /*used for reference counting (a weak one)*/ HTTPAPI_RESULT HTTPAPI_Init(void) { HTTPAPI_RESULT result; if (nUsersOfHTTPAPI == 0) { if (curl_global_init(CURL_GLOBAL_NOTHING) != 0) { result = HTTPAPI_INIT_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { nUsersOfHTTPAPI++; result = HTTPAPI_OK; } } else { nUsersOfHTTPAPI++; result = HTTPAPI_OK; } return result; } void HTTPAPI_Deinit(void) { if (nUsersOfHTTPAPI > 0) { nUsersOfHTTPAPI--; if (nUsersOfHTTPAPI == 0) { curl_global_cleanup(); } } } HTTP_HANDLE HTTPAPI_CreateConnection(const char* hostName) { HTTP_HANDLE_DATA* httpHandleData; if (hostName == NULL) { LogError("invalid arg const char* hostName = %p", hostName); httpHandleData = NULL; } else { httpHandleData = (HTTP_HANDLE_DATA*)malloc(sizeof(HTTP_HANDLE_DATA)); if (httpHandleData != NULL) { size_t hostURL_size = strlen("https://") + strlen(hostName) + 1; httpHandleData->hostURL = malloc(hostURL_size); if (httpHandleData->hostURL == NULL) { LogError("unable to malloc"); free(httpHandleData); httpHandleData = NULL; } else { if ((strcpy_s(httpHandleData->hostURL, hostURL_size, "https://") == 0) && (strcat_s(httpHandleData->hostURL, hostURL_size, hostName) == 0)) { httpHandleData->curl = curl_easy_init(); if (httpHandleData->curl == NULL) { free(httpHandleData->hostURL); free(httpHandleData); httpHandleData = NULL; } else { httpHandleData->timeout = 242 * 1000; /*242 seconds seems like a nice enough time. Reasone for 242: 1. http://curl.haxx.se/libcurl/c/CURLOPT_TIMEOUT.html says Normally, name lookups can take a considerable time and limiting operations to less than a few minutes risk aborting perfectly normal operations. 2. 256KB of data... at 9600 bps transfers in about 218 seconds. Add to that a buffer of 10%... round it up to 242 :)*/ httpHandleData->lowSpeedTime = 0; httpHandleData->lowSpeedLimit = 0; httpHandleData->forbidReuse = 0; httpHandleData->freshConnect = 0; httpHandleData->verbose = 0; httpHandleData->x509certificate = NULL; httpHandleData->x509privatekey = NULL; httpHandleData->certificates = NULL; } } else { free(httpHandleData->hostURL); free(httpHandleData); httpHandleData = NULL; } } } } return (HTTP_HANDLE)httpHandleData; } void HTTPAPI_CloseConnection(HTTP_HANDLE handle) { HTTP_HANDLE_DATA* httpHandleData = (HTTP_HANDLE_DATA*)handle; if (httpHandleData != NULL) { free(httpHandleData->hostURL); curl_easy_cleanup(httpHandleData->curl); free(httpHandleData); } } static size_t HeadersWriteFunction(void *ptr, size_t size, size_t nmemb, void *userdata) { HTTP_HEADERS_HANDLE responseHeadersHandle = (HTTP_HEADERS_HANDLE)userdata; char* headerLine = (char*)ptr; if (headerLine != NULL) { char* token = strtok(headerLine, "\r\n"); while ((token != NULL) && (token[0] != '\0')) { char* whereIsColon = strchr(token, ':'); if(whereIsColon!=NULL) { *whereIsColon='\0'; HTTPHeaders_AddHeaderNameValuePair(responseHeadersHandle, token, whereIsColon+1); *whereIsColon=':'; } else { /*not a header, maybe a status-line*/ } token = strtok(NULL, "\r\n"); } } return size * nmemb; } static size_t ContentWriteFunction(void *ptr, size_t size, size_t nmemb, void *userdata) { HTTP_RESPONSE_CONTENT_BUFFER* responseContentBuffer = (HTTP_RESPONSE_CONTENT_BUFFER*)userdata; if ((userdata != NULL) && (ptr != NULL) && (size * nmemb > 0)) { void* newBuffer = realloc(responseContentBuffer->buffer, responseContentBuffer->bufferSize + (size * nmemb)); if (newBuffer != NULL) { responseContentBuffer->buffer = newBuffer; memcpy(responseContentBuffer->buffer + responseContentBuffer->bufferSize, ptr, size * nmemb); responseContentBuffer->bufferSize += size * nmemb; } else { LogError("Could not allocate buffer of size %zu", (size_t)(responseContentBuffer->bufferSize + (size * nmemb))); responseContentBuffer->error = 1; if (responseContentBuffer->buffer != NULL) { free(responseContentBuffer->buffer); } } } return size * nmemb; } static CURLcode ssl_ctx_callback(CURL *curl, void *ssl_ctx, void *userptr) { CURLcode result; if ( (curl == NULL) || (ssl_ctx == NULL) || (userptr == NULL) ) { LogError("unexpected parameter CURL *curl=%p, void *ssl_ctx=%p, void *userptr=%p", curl, ssl_ctx, userptr); result = CURLE_SSL_CERTPROBLEM; } else { HTTP_HANDLE_DATA *httpHandleData = (HTTP_HANDLE_DATA *)userptr; #ifdef USE_OPENSSL /*trying to set the x509 per device certificate*/ if ( (httpHandleData->x509certificate != NULL) && (httpHandleData->x509privatekey != NULL) && (x509_openssl_add_credentials(ssl_ctx, httpHandleData->x509certificate, httpHandleData->x509privatekey) != 0) ) { LogError("unable to x509_openssl_add_credentials"); result = CURLE_SSL_CERTPROBLEM; } /*trying to set CA certificates*/ else if ( (httpHandleData->certificates != NULL) && (x509_openssl_add_certificates(ssl_ctx, httpHandleData->certificates) != 0) ) { LogError("failure in x509_openssl_add_certificates"); result = CURLE_SSL_CERTPROBLEM; } #elif USE_WOLFSSL if ( (httpHandleData->x509certificate != NULL) && (httpHandleData->x509privatekey != NULL) && ( ((wolfSSL_use_certificate_chain_buffer(ssl_ctx, (unsigned char*)httpHandleData->x509certificate, strlen(httpHandleData->x509certificate)) != SSL_SUCCESS)) || ((wolfSSL_use_PrivateKey_buffer(ssl_ctx, (unsigned char*)httpHandleData->x509privatekey, strlen(httpHandleData->x509privatekey), SSL_FILETYPE_PEM) != SSL_SUCCESS)) ) ) { LogError("unable to add x509 certs to wolfssl"); result = CURLE_SSL_CERTPROBLEM; } else if ( (httpHandleData->certificates != NULL) && (wolfSSL_CTX_load_verify_buffer(ssl_ctx, (const unsigned char*)httpHandleData->certificates, strlen(httpHandleData->certificates), SSL_FILETYPE_PEM) != SSL_SUCCESS) ) { LogError("failure in adding trusted certificate to client"); result = CURLE_SSL_CERTPROBLEM; } #else if (httpHandleData->x509certificate != NULL || httpHandleData->x509privatekey != NULL) { LogError("Failure no platform is enabled to handle certificates"); result = CURLE_SSL_CERTPROBLEM; } #endif else { result = CURLE_OK; } } return result; } HTTPAPI_RESULT HTTPAPI_ExecuteRequest(HTTP_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE httpHeadersHandle, const unsigned char* content, size_t contentLength, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent) { HTTPAPI_RESULT result; HTTP_HANDLE_DATA* httpHandleData = (HTTP_HANDLE_DATA*)handle; size_t headersCount; HTTP_RESPONSE_CONTENT_BUFFER responseContentBuffer; if ((httpHandleData == NULL) || (relativePath == NULL) || (httpHeadersHandle == NULL) || ((content == NULL) && (contentLength > 0)) ) { result = HTTPAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (HTTPHeaders_GetHeaderCount(httpHeadersHandle, &headersCount) != HTTP_HEADERS_OK) { result = HTTPAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { char* tempHostURL; size_t tempHostURL_size = strlen(httpHandleData->hostURL) + strlen(relativePath) + 1; tempHostURL = malloc(tempHostURL_size); if (tempHostURL == NULL) { result = HTTPAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_VERBOSE, httpHandleData->verbose) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_VERBOSE (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if ((strcpy_s(tempHostURL, tempHostURL_size, httpHandleData->hostURL) != 0) || (strcat_s(tempHostURL, tempHostURL_size, relativePath) != 0)) { result = HTTPAPI_STRING_PROCESSING_ERROR; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } /* set the URL */ else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_URL, tempHostURL) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_URL (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_TIMEOUT_MS, httpHandleData->timeout) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_TIMEOUT_MS (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_LOW_SPEED_LIMIT, httpHandleData->lowSpeedLimit) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_LOW_SPEED_LIMIT (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_LOW_SPEED_TIME, httpHandleData->lowSpeedTime) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_LOW_SPEED_TIME (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_FRESH_CONNECT, httpHandleData->freshConnect) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_FRESH_CONNECT (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_FORBID_REUSE, httpHandleData->forbidReuse) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_FORBID_REUSE (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("failed to set CURLOPT_HTTP_VERSION (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { result = HTTPAPI_OK; switch (requestType) { default: result = HTTPAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); break; case HTTPAPI_REQUEST_GET: if (curl_easy_setopt(httpHandleData->curl, CURLOPT_HTTPGET, 1L) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_CUSTOMREQUEST, NULL) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } break; case HTTPAPI_REQUEST_HEAD: if (curl_easy_setopt(httpHandleData->curl, CURLOPT_HTTPGET, 1L) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_NOBODY, 1L) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (curl_easy_setopt(httpHandleData->curl, CURLOPT_CUSTOMREQUEST, NULL) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } break; case HTTPAPI_REQUEST_POST: if (curl_easy_setopt(httpHandleData->curl, CURLOPT_POST, 1L) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_CUSTOMREQUEST, NULL) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } break; case HTTPAPI_REQUEST_PUT: if (curl_easy_setopt(httpHandleData->curl, CURLOPT_POST, 1L)) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_CUSTOMREQUEST, "PUT") != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } break; case HTTPAPI_REQUEST_DELETE: if (curl_easy_setopt(httpHandleData->curl, CURLOPT_POST, 1L) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_CUSTOMREQUEST, "DELETE") != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } break; case HTTPAPI_REQUEST_PATCH: if (curl_easy_setopt(httpHandleData->curl, CURLOPT_POST, 1L) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_CUSTOMREQUEST, "PATCH") != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } break; } if (result == HTTPAPI_OK) { /* add headers */ struct curl_slist* headers = NULL; size_t i; for (i = 0; i < headersCount; i++) { char *tempBuffer; if (HTTPHeaders_GetHeader(httpHeadersHandle, i, &tempBuffer) != HTTP_HEADERS_OK) { /* error */ result = HTTPAPI_HTTP_HEADERS_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); break; } else { struct curl_slist* newHeaders = curl_slist_append(headers, tempBuffer); if (newHeaders == NULL) { result = HTTPAPI_ALLOC_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); free(tempBuffer); break; } else { free(tempBuffer); headers = newHeaders; } } } if (result == HTTPAPI_OK) { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_HTTPHEADER, headers) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { /* add content */ if ((content != NULL) && (contentLength > 0)) { if ((curl_easy_setopt(httpHandleData->curl, CURLOPT_POSTFIELDS, (void*)content) != CURLE_OK) || (curl_easy_setopt(httpHandleData->curl, CURLOPT_POSTFIELDSIZE, contentLength) != CURLE_OK)) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } else { if (requestType != HTTPAPI_REQUEST_GET) { if ((curl_easy_setopt(httpHandleData->curl, CURLOPT_POSTFIELDS, (void*)NULL) != CURLE_OK) || (curl_easy_setopt(httpHandleData->curl, CURLOPT_POSTFIELDSIZE, 0) != CURLE_OK)) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } else { /*GET request cannot POST, so "do nothing*/ } } if (result == HTTPAPI_OK) { if ((curl_easy_setopt(httpHandleData->curl, CURLOPT_WRITEHEADER, NULL) != CURLE_OK) || (curl_easy_setopt(httpHandleData->curl, CURLOPT_HEADERFUNCTION, NULL) != CURLE_OK) || (curl_easy_setopt(httpHandleData->curl, CURLOPT_WRITEFUNCTION, ContentWriteFunction) != CURLE_OK)) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (responseHeadersHandle != NULL) { /* setup the code to get the response headers */ if ((curl_easy_setopt(httpHandleData->curl, CURLOPT_WRITEHEADER, responseHeadersHandle) != CURLE_OK) || (curl_easy_setopt(httpHandleData->curl, CURLOPT_HEADERFUNCTION, HeadersWriteFunction) != CURLE_OK)) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } } if (result == HTTPAPI_OK) { responseContentBuffer.buffer = NULL; responseContentBuffer.bufferSize = 0; responseContentBuffer.error = 0; if (curl_easy_setopt(httpHandleData->curl, CURLOPT_WRITEDATA, &responseContentBuffer) != CURLE_OK) { result = HTTPAPI_SET_OPTION_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } if (result == HTTPAPI_OK) { /* Execute request */ CURLcode curlRes = curl_easy_perform(httpHandleData->curl); if (curlRes != CURLE_OK) { LogError("curl_easy_perform() failed: %s\n", curl_easy_strerror(curlRes)); result = HTTPAPI_OPEN_REQUEST_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { long httpCode; /* get the status code */ if (curl_easy_getinfo(httpHandleData->curl, CURLINFO_RESPONSE_CODE, &httpCode) != CURLE_OK) { result = HTTPAPI_QUERY_HEADERS_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (responseContentBuffer.error) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (statusCode != NULL) { *statusCode = (unsigned int)httpCode; } /* fill response content length */ if (responseContent != NULL) { if ((responseContentBuffer.bufferSize > 0) && (BUFFER_build(responseContent, responseContentBuffer.buffer, responseContentBuffer.bufferSize) != 0)) { result = HTTPAPI_INSUFFICIENT_RESPONSE_BUFFER; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { /*all nice*/ } } if (httpCode >= 300) { LogError("Failure in HTTP communication: server reply code is %ld", httpCode); LogInfo("HTTP Response:%*.*s", (int)responseContentBuffer.bufferSize, (int)responseContentBuffer.bufferSize, responseContentBuffer.buffer); } else { result = HTTPAPI_OK; } } } } if (responseContentBuffer.buffer != NULL) { free(responseContentBuffer.buffer); } } } } } } curl_slist_free_all(headers); } } free(tempHostURL); } } return result; } HTTPAPI_RESULT HTTPAPI_SetOption(HTTP_HANDLE handle, const char* optionName, const void* value) { HTTPAPI_RESULT result; if ( (handle == NULL) || (optionName == NULL) || (value == NULL) ) { result = HTTPAPI_INVALID_ARG; LogError("invalid parameter (NULL) passed to HTTPAPI_SetOption"); } else { HTTP_HANDLE_DATA* httpHandleData = (HTTP_HANDLE_DATA*)handle; if (strcmp(OPTION_HTTP_TIMEOUT, optionName) == 0) { long timeout = (long)(*(unsigned int*)value); httpHandleData->timeout = timeout; result = HTTPAPI_OK; } else if (strcmp(OPTION_CURL_LOW_SPEED_LIMIT, optionName) == 0) { httpHandleData->lowSpeedLimit = *(const long*)value; result = HTTPAPI_OK; } else if (strcmp(OPTION_CURL_LOW_SPEED_TIME, optionName) == 0) { httpHandleData->lowSpeedTime = *(const long*)value; result = HTTPAPI_OK; } else if (strcmp(OPTION_CURL_FRESH_CONNECT, optionName) == 0) { httpHandleData->freshConnect = *(const long*)value; result = HTTPAPI_OK; } else if (strcmp(OPTION_CURL_FORBID_REUSE, optionName) == 0) { httpHandleData->forbidReuse = *(const long*)value; result = HTTPAPI_OK; } else if (strcmp(OPTION_CURL_VERBOSE, optionName) == 0) { httpHandleData->verbose = *(const long*)value; result = HTTPAPI_OK; } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { httpHandleData->x509privatekey = value; if (httpHandleData->x509certificate != NULL) { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_callback) != CURLE_OK) { LogError("unable to curl_easy_setopt"); result = HTTPAPI_ERROR; } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_SSL_CTX_DATA, httpHandleData) != CURLE_OK) { LogError("unable to curl_easy_setopt"); result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } } else { /*if privatekey comes 1st and certificate is not set yet, then return OK and wait for the certificate to be set*/ result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { httpHandleData->x509certificate = value; if (httpHandleData->x509privatekey != NULL) { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_callback) != CURLE_OK) { LogError("unable to curl_easy_setopt"); result = HTTPAPI_ERROR; } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_SSL_CTX_DATA, httpHandleData) != CURLE_OK) { LogError("unable to curl_easy_setopt"); result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } } else { /*if certificate comes 1st and private key is not set yet, then return OK and wait for the private key to be set*/ result = HTTPAPI_OK; } } else if (strcmp(OPTION_HTTP_PROXY, optionName) == 0) { char proxy[MAX_HOSTNAME_LEN]; char* proxy_auth; HTTP_PROXY_OPTIONS* proxy_data = (HTTP_PROXY_OPTIONS*)value; if (sprintf_s(proxy, MAX_HOSTNAME_LEN, "%s:%d", proxy_data->host_address, proxy_data->port) <= 0) { LogError("failure constructing proxy address"); result = HTTPAPI_ERROR; } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_PROXY, proxy) != CURLE_OK) { LogError("failure setting curl proxy address"); result = HTTPAPI_ERROR; } else { if (proxy_data->username != NULL && proxy_data->password != NULL) { size_t authLen = strlen(proxy_data->username)+strlen(proxy_data->password)+1; proxy_auth = malloc(authLen+1); if (proxy_auth == NULL) { LogError("failure allocating proxy authentication"); result = HTTPAPI_ERROR; } else { // From curl website 'Pass a char * as parameter, which should be [user name]:[password]' if (sprintf_s(proxy_auth, MAX_HOSTNAME_LEN, "%s:%s", proxy_data->username, proxy_data->password) <= 0) { LogError("failure constructing proxy authentication"); result = HTTPAPI_ERROR; } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_PROXYUSERPWD, proxy_auth) != CURLE_OK) { LogError("failure setting curl proxy authentication"); result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } free(proxy_auth); } } else { result = HTTPAPI_OK; } } } } else if (strcmp("TrustedCerts", optionName) == 0) { /*TrustedCerts needs to trigger the CURLOPT_SSL_CTX_FUNCTION in curl so we can pass the CAs*/ if (curl_easy_setopt(httpHandleData->curl, CURLOPT_SSL_CTX_FUNCTION, ssl_ctx_callback) != CURLE_OK) { LogError("failure in curl_easy_setopt - CURLOPT_SSL_CTX_FUNCTION"); result = HTTPAPI_ERROR; } else { if (curl_easy_setopt(httpHandleData->curl, CURLOPT_SSL_CTX_DATA, httpHandleData) != CURLE_OK) { LogError("failure in curl_easy_setopt - CURLOPT_SSL_CTX_DATA"); result = HTTPAPI_ERROR; } else { httpHandleData->certificates = (const char*)value; result = HTTPAPI_OK; } } } else { result = HTTPAPI_INVALID_ARG; LogError("unknown option %s", optionName); } } return result; } HTTPAPI_RESULT HTTPAPI_CloneOption(const char* optionName, const void* value, const void** savedValue) { HTTPAPI_RESULT result; if ( (optionName == NULL) || (value == NULL) || (savedValue == NULL) ) { result = HTTPAPI_INVALID_ARG; LogError("invalid argument(NULL) passed to HTTPAPI_CloneOption"); } else { if (strcmp(OPTION_HTTP_TIMEOUT, optionName) == 0) { /*by convention value is pointing to an unsigned int */ unsigned int* temp = malloc(sizeof(unsigned int)); /*shall be freed by HTTPAPIEX*/ if (temp == NULL) { result = HTTPAPI_ERROR; LogError("malloc failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { *temp = *(const unsigned int*)value; *savedValue = temp; result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { /*this is getting the x509 certificate. In this case, value is a pointer to a const char* that contains the certificate as a null terminated string*/ if (mallocAndStrcpy_s((char**)savedValue, value) != 0) { LogError("unable to clone the x509 certificate content"); result = HTTPAPI_ERROR; } else { /*return OK when the certificate has been clones successfully*/ result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { /*this is getting the x509 private key. In this case, value is a pointer to a const char* that contains the private key as a null terminated string*/ if (mallocAndStrcpy_s((char**)savedValue, value) != 0) { LogError("unable to clone the x509 private key content"); result = HTTPAPI_ERROR; } else { /*return OK when the private key has been clones successfully*/ result = HTTPAPI_OK; } } else if (strcmp("TrustedCerts", optionName) == 0) { if (mallocAndStrcpy_s((char**)savedValue, value) != 0) { LogError("unable to clone TrustedCerts"); result = HTTPAPI_ERROR; } else { /*return OK when the certificates have been clones successfully*/ result = HTTPAPI_OK; } } else if (strcmp(OPTION_HTTP_PROXY, optionName) == 0) { HTTP_PROXY_OPTIONS* proxy_data = (HTTP_PROXY_OPTIONS*)value; HTTP_PROXY_OPTIONS* new_proxy_info = malloc(sizeof(HTTP_PROXY_OPTIONS)); if (new_proxy_info == NULL) { LogError("unable to allocate proxy option information"); result = HTTPAPI_ERROR; } else { new_proxy_info->host_address = proxy_data->host_address; new_proxy_info->port = proxy_data->port; new_proxy_info->password = proxy_data->password; new_proxy_info->username = proxy_data->username; *savedValue = new_proxy_info; result = HTTPAPI_OK; } } /*all "long" options are cloned in the same way*/ else if ( (strcmp(OPTION_CURL_LOW_SPEED_LIMIT, optionName) == 0) || (strcmp(OPTION_CURL_LOW_SPEED_TIME, optionName) == 0) || (strcmp(OPTION_CURL_FRESH_CONNECT, optionName) == 0) || (strcmp(OPTION_CURL_FORBID_REUSE, optionName) == 0) || (strcmp(OPTION_CURL_VERBOSE, optionName) == 0) ) { /*by convention value is pointing to an long */ long* temp = malloc(sizeof(long)); /*shall be freed by HTTPAPIEX*/ if (temp == NULL) { result = HTTPAPI_ERROR; LogError("malloc failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { *temp = *(const long*)value; *savedValue = temp; result = HTTPAPI_OK; } } else { result = HTTPAPI_INVALID_ARG; LogError("unknown option %s", optionName); } } return result; } httpapi_tirtos.c000066400000000000000000000202041362133436400342770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Texas Instruments. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include "azure_c_shared_utility/httpapi.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/xlogging.h" #define CONTENT_BUF_LEN 128 static const char* getHttpMethod(HTTPAPI_REQUEST_TYPE requestType) { switch (requestType) { case HTTPAPI_REQUEST_GET: return (HTTPStd_GET); case HTTPAPI_REQUEST_POST: return (HTTPStd_POST); case HTTPAPI_REQUEST_PUT: return (HTTPStd_PUT); case HTTPAPI_REQUEST_DELETE: return (HTTPStd_DELETE); case HTTPAPI_REQUEST_PATCH: return (HTTPStd_PATCH); default: return (NULL); } } static int splitHeader(char *headerName, char **headerValue) { *headerValue = strchr(headerName, ':'); if (*headerValue == NULL) { return (-1); } **headerValue = '\0'; (*headerValue)++; while (**headerValue == ' ') { (*headerValue)++; } return (0); } HTTPAPI_RESULT HTTPAPI_Init(void) { return (HTTPAPI_OK); } void HTTPAPI_Deinit(void) { } HTTP_HANDLE HTTPAPI_CreateConnection(const char* hostName) { int ret; struct sockaddr addr; HTTPCli_Handle cli; ret = HTTPCli_initSockAddr(&addr, hostName, 0); if (ret < 0) { LogError("HTTPCli_initSockAddr failed, ret=%d", ret); return (NULL); } ((struct sockaddr_in *) (&addr))->sin_port = htons(HTTPStd_SECURE_PORT); cli = HTTPCli_create(); if (cli == NULL) { LogError("HTTPCli_create failed"); return (NULL); } ret = HTTPCli_connect(cli, &addr, HTTPCli_TYPE_TLS, NULL); if (ret < 0) { LogError("HTTPCli_connect failed, ret=%d", ret); HTTPCli_delete(&cli); return (NULL); } return ((HTTP_HANDLE) cli); } void HTTPAPI_CloseConnection(HTTP_HANDLE handle) { HTTPCli_Handle cli = (HTTPCli_Handle) handle; if (cli) { HTTPCli_disconnect(cli); HTTPCli_delete(&cli); } } HTTPAPI_RESULT HTTPAPI_ExecuteRequest(HTTP_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE httpHeadersHandle, const unsigned char* content, size_t contentLength, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent) { HTTPCli_Handle cli = (HTTPCli_Handle) handle; int ret; int offset; size_t cnt; char contentBuf[CONTENT_BUF_LEN] = {0}; char *hname; char *hvalue; const char *method; bool moreFlag; method = getHttpMethod(requestType); if ((cli == NULL) || (method == NULL) || (relativePath == NULL) || (statusCode == NULL) || (responseHeadersHandle == NULL)) { LogError("Invalid arguments: handle=%p, requestType=%d, relativePath=%p, statusCode=%p, responseHeadersHandle=%p", handle, (int)requestType, relativePath, statusCode, responseHeadersHandle); return (HTTPAPI_INVALID_ARG); } else if (HTTPHeaders_GetHeaderCount(httpHeadersHandle, &cnt) != HTTP_HEADERS_OK) { LogError("Cannot get header count"); return (HTTPAPI_QUERY_HEADERS_FAILED); } /* Send the request line */ ret = HTTPCli_sendRequest(cli, method, relativePath, true); if (ret < 0) { LogError("HTTPCli_sendRequest failed, ret=%d", ret); return (HTTPAPI_SEND_REQUEST_FAILED); } /* Send the request headers */ while (cnt--) { ret = HTTPHeaders_GetHeader(httpHeadersHandle, cnt, &hname); if (ret != HTTP_HEADERS_OK) { LogError("Cannot get request header %d", cnt); return (HTTPAPI_QUERY_HEADERS_FAILED); } ret = splitHeader(hname, &hvalue); if (ret == 0) { ret = HTTPCli_sendField(cli, hname, hvalue, false); } free(hname); hname = NULL; if (ret < 0) { LogError("HTTP send field failed, ret=%d", ret); return (HTTPAPI_SEND_REQUEST_FAILED); } } /* Send the last header and request body */ ret = HTTPCli_sendField(cli, NULL, NULL, true); if (ret < 0) { LogError("HTTP send empty field failed, ret=%d", ret); return (HTTPAPI_SEND_REQUEST_FAILED); } if (content && contentLength != 0) { ret = HTTPCli_sendRequestBody(cli, (const char *)content, contentLength); if (ret < 0) { LogError("HTTP send request body failed, ret=%d", ret); return (HTTPAPI_SEND_REQUEST_FAILED); } } /* Get the response status code */ ret = HTTPCli_getResponseStatus(cli); if (ret < 0) { LogError("HTTP receive response failed, ret=%d", ret); return (HTTPAPI_RECEIVE_RESPONSE_FAILED); } *statusCode = (unsigned int)ret; /* Get the response headers */ hname = NULL; cnt = 0; offset = 0; do { ret = HTTPCli_readResponseHeader(cli, contentBuf, CONTENT_BUF_LEN, &moreFlag); if (ret < 0) { LogError("HTTP read response header failed, ret=%d", ret); ret = HTTPAPI_RECEIVE_RESPONSE_FAILED; goto headersDone; } else if (ret == 0) { /* All headers read */ goto headersDone; } if (cnt < offset + ret) { hname = (char *)realloc(hname, offset + ret); if (hname == NULL) { LogError("Failed reallocating memory"); ret = HTTPAPI_ALLOC_FAILED; goto headersDone; } cnt = offset + ret; } memcpy(hname + offset, contentBuf, ret); offset += ret; if (moreFlag) { continue; } ret = splitHeader(hname, &hvalue); if (ret < 0) { LogError("HTTP split header failed, ret=%d", ret); ret = HTTPAPI_HTTP_HEADERS_FAILED; goto headersDone; } ret = HTTPHeaders_AddHeaderNameValuePair(responseHeadersHandle, hname, hvalue); if (ret != HTTP_HEADERS_OK) { LogError("Adding the response header failed"); ret = HTTPAPI_HTTP_HEADERS_FAILED; goto headersDone; } offset = 0; } while (1); headersDone: free(hname); hname = NULL; if (ret != 0) { return ((HTTPAPI_RESULT)ret); } /* Get response body */ if (responseContent != NULL) { offset = 0; cnt = 0; do { ret = HTTPCli_readResponseBody(cli, contentBuf, CONTENT_BUF_LEN, &moreFlag); if (ret < 0) { LogError("HTTP read response body failed, ret=%d", ret); ret = HTTPAPI_RECEIVE_RESPONSE_FAILED; goto contentDone; } if (ret != 0) { cnt = ret; ret = BUFFER_enlarge(responseContent, cnt); if (ret != 0) { LogError("Failed enlarging response buffer"); ret = HTTPAPI_ALLOC_FAILED; goto contentDone; } ret = BUFFER_content(responseContent, (const unsigned char **)&hname); if (ret != 0) { LogError("Failed getting the response buffer content"); ret = HTTPAPI_ALLOC_FAILED; goto contentDone; } memcpy(hname + offset, contentBuf, cnt); offset += cnt; } } while (moreFlag); contentDone: if (ret < 0) { BUFFER_unbuild(responseContent); return ((HTTPAPI_RESULT)ret); } } return (HTTPAPI_OK); } HTTPAPI_RESULT HTTPAPI_SetOption(HTTP_HANDLE handle, const char* optionName, const void* value) { return (HTTPAPI_INVALID_ARG); } HTTPAPI_RESULT HTTPAPI_CloneOption(const char* optionName, const void* value, const void** savedValue) { return (HTTPAPI_INVALID_ARG); } httpapi_wince.c000066400000000000000000000471011362133436400340650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/httpapi.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/xlogging.h" #include "winsock2.h" #include "sslsock.h" #include "schnlsp.h" #define MAX_HOSTNAME 64 #define TEMPORARY_BUFFER_SIZE 4096 #define CHAR_COUNT(A) (sizeof(A) - 1) DEFINE_ENUM_STRINGS(HTTPAPI_RESULT, HTTPAPI_RESULT_VALUES) // data structure that contains all the information required to manage a connection class HTTP_HANDLE_DATA { public: char host[MAX_HOSTNAME]; SOCKET _sock_fd; struct sockaddr_in _remoteHost; }; // If Root CA is not found in CA database, dwFlags will be set to SSL_CERT_FLAG_ISSUER_UNKNOWN (value 1). In that case return SSL_ERR_CERT_UNKNOWN (value 10) int CALLBACK SSLValidateCertHook(DWORD dwType, LPVOID pvArg, DWORD dwChainLen, LPBLOB pCertChain, DWORD dwFlags) { DWORD dwRetValue = SSL_ERR_OKAY; // SSL_ERR_OKAY : The certificate is acceptable if (dwFlags) dwRetValue = SSL_ERR_CERT_UNKNOWN; // Issuer is unknown return dwRetValue; } // Initializes SSL layer, called only once on initialization int SSLInit(SOCKET s) { DWORD optval = SO_SEC_SSL; SSLVALIDATECERTHOOK hook; SSLPROTOCOLS protocolsToUse; int ret; if (setsockopt(s, SOL_SOCKET, SO_SECURE, (LPSTR)&optval, sizeof(optval)) == SOCKET_ERROR) { goto SSLInit_Error; } hook.HookFunc = SSLValidateCertHook; hook.pvArg = NULL; //WSAIoctl cannot handle the pointer copy, use a global variable if (WSAIoctl(s, SO_SSL_SET_VALIDATE_CERT_HOOK, &hook, sizeof(SSLVALIDATECERTHOOK), NULL, 0, NULL, NULL, NULL) == SOCKET_ERROR) { goto SSLInit_Error; } //specify TLS1 protocol protocolsToUse.dwCount = 1; protocolsToUse.ProtocolList[0].dwFlags = 0; protocolsToUse.ProtocolList[0].dwProtocol = SSL_PROTOCOL_TLS1; protocolsToUse.ProtocolList[0].dwVersion = 0; if (WSAIoctl(s, SO_SSL_SET_PROTOCOLS, (LPVOID)&protocolsToUse, sizeof(protocolsToUse), NULL, 0, NULL, NULL, NULL) == SOCKET_ERROR) { goto SSLInit_Error; } return 0; SSLInit_Error: ret = WSAGetLastError(); return ret; } HTTPAPI_RESULT HTTPAPI_Init(void) { WORD wVersionRequested; WSADATA wsaData; int err; LogInfo("HTTPAPI_Init::Start"); time_t ctTime; ctTime = time(NULL); LogInfo("HTTAPI_Init::Time is now (UTC) %s", ctime(&ctTime)); wVersionRequested = MAKEWORD(2, 2); err = WSAStartup(wVersionRequested, &wsaData); if (err != 0) { return HTTPAPI_INIT_FAILED; } if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2) { WSACleanup(); return HTTPAPI_INIT_FAILED; } LogInfo("HTTPAPI_Init::End"); return HTTPAPI_OK; } void HTTPAPI_Deinit(void) { WSACleanup(); } HTTP_HANDLE HTTPAPI_CreateConnection(const char* hostName) { LogInfo("HTTPAPI_CreateConnection::Start"); HTTP_HANDLE_DATA* handle = NULL; if (hostName) { LogInfo("HTTPAPI_CreateConnection::Connecting to %s", hostName); handle = new HTTP_HANDLE_DATA(); if (strcpy_s(handle->host, MAX_HOSTNAME, hostName) != 0) { LogError("HTTPAPI_CreateConnection::Could not strcpy_s"); delete handle; handle = NULL; } else { handle->_sock_fd = -1; } } else { LogInfo("HTTPAPI_CreateConnection:: null hostName parameter"); } LogInfo("HTTPAPI_CreateConnection::End"); return (HTTP_HANDLE)handle; } void HTTPAPI_CloseConnection(HTTP_HANDLE handle) { HTTP_HANDLE_DATA* h = (HTTP_HANDLE_DATA*)handle; if (h) { LogInfo("HTTPAPI_CloseConnection to %s", h->host); if (h->_sock_fd != -1) { LogInfo("HTTPAPI_CloseConnection to %s", h->host); closesocket(h->_sock_fd); h->_sock_fd = -1; } LogInfo("HTTPAPI_CloseConnection (delete h) to %s", h->host); delete h; } } static int readLine(SOCKET _sock_fd, char* buf, const size_t size) { // reads until \r\n is encountered. writes in buf all the characters // read until \r\n and returns the number of characters in the buffer. char* p = buf; char c; if (recv(_sock_fd, &c, 1, 0) < 0) return -1; while (c != '\r') { if ((p - buf + 1) >= (int)size) return -1; *p++ = c; if (recv(_sock_fd, &c, 1, 0) < 0) return -1; } *p = 0; if (recv(_sock_fd, &c, 1, 0) < 0 || c != '\n') // skip \n return -1; return p - buf; } static int readChunk(SOCKET _sock_fd, char* buf, size_t size) { size_t cur, offset; // read content with specified length, even if it is received // only in chunks due to fragmentation in the networking layer. // returns -1 in case of error. offset = 0; while (size > 0) { cur = recv(_sock_fd, buf + offset, size, 0); // end of stream reached if (cur == 0) return offset; // read cur bytes (might be less than requested) size -= cur; offset += cur; } return offset; } static int skipN(SOCKET _sock_fd, size_t n, char* buf, size_t size) { size_t org = n; // read and abandon response content with specified length // returns -1 in case of error. while (n > size) { if (readChunk(_sock_fd, (char*)buf, size) < 0) return -1; n -= size; } if (readChunk(_sock_fd, (char*)buf, n) < 0) return -1; return org; } //Note: This function assumes that "Host:" and "Content-Length:" headers are setup // by the caller of HTTPAPI_ExecuteRequest() (which is true for httptransport.c). HTTPAPI_RESULT HTTPAPI_ExecuteRequest(HTTP_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE httpHeadersHandle, const unsigned char* content, size_t contentLength, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent) { LogInfo("HTTPAPI_ExecuteRequest::Start"); HTTPAPI_RESULT result; size_t headersCount; char buf[TEMPORARY_BUFFER_SIZE]; int ret; size_t bodyLength = 0; bool chunked = false; const unsigned char* receivedContent; const char* method = (requestType == HTTPAPI_REQUEST_GET) ? "GET" : (requestType == HTTPAPI_REQUEST_POST) ? "POST" : (requestType == HTTPAPI_REQUEST_PUT) ? "PUT" : (requestType == HTTPAPI_REQUEST_DELETE) ? "DELETE" : (requestType == HTTPAPI_REQUEST_PATCH) ? "PATCH" : NULL; if (handle == NULL || relativePath == NULL || httpHeadersHandle == NULL || method == NULL || HTTPHeaders_GetHeaderCount(httpHeadersHandle, &headersCount) != HTTP_HEADERS_OK) { result = HTTPAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } HTTP_HANDLE_DATA* httpHandle = (HTTP_HANDLE_DATA*)handle; if (httpHandle->_sock_fd == -1) { // Make the connection if ((httpHandle->_sock_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { LogError("init_socket failed"); result = HTTPAPI_INIT_FAILED; goto exit; } else { // IP Address char address[5]; char *p_address = address; memset(&httpHandle->_remoteHost, 0, sizeof(struct sockaddr_in)); // Dot-decimal notation int result = sscanf(httpHandle->host, "%3u.%3u.%3u.%3u", (unsigned int*)&address[0], (unsigned int*)&address[1], (unsigned int*)&address[2], (unsigned int*)&address[3]); if (result != 4) { // Resolve address with DNS struct hostent *host_address = gethostbyname(httpHandle->host); if (host_address == NULL) { LogError("set_address failed"); result = HTTPAPI_INVALID_ARG; goto exit; } p_address = (char*)host_address->h_addr_list[0]; } memcpy((char*)&httpHandle->_remoteHost.sin_addr.s_addr, p_address, 4); // Address family httpHandle->_remoteHost.sin_family = AF_INET; // Set port httpHandle->_remoteHost.sin_port = htons(443); if (SSLInit(httpHandle->_sock_fd)) { LogError("SSLInit failed"); result = HTTPAPI_ERROR; goto exit; } if (connect(httpHandle->_sock_fd, (const struct sockaddr *) &httpHandle->_remoteHost, sizeof(httpHandle->_remoteHost)) < 0) { closesocket(httpHandle->_sock_fd); httpHandle->_sock_fd = -1; LogError("connect failed"); result = HTTPAPI_ERROR; goto exit; } } } //Send request if ((ret = _snprintf(buf, sizeof(buf), "%s %s HTTP/1.1\r\n", method, relativePath)) < 0 || ret >= sizeof(buf)) { result = HTTPAPI_STRING_PROCESSING_ERROR; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } LogInfo("HTTPAPI_ExecuteRequest::Sending=%*.*s", strlen(buf), strlen(buf), buf); if (send(httpHandle->_sock_fd, buf, strlen(buf), 0) < 0) { result = HTTPAPI_SEND_REQUEST_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } //Send default headers for (size_t i = 0; i < headersCount; i++) { char* header; if (HTTPHeaders_GetHeader(httpHeadersHandle, i, &header) != HTTP_HEADERS_OK) { result = HTTPAPI_HTTP_HEADERS_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } LogInfo("HTTPAPI_ExecuteRequest::Sending=%*.*s", strlen(header), strlen(header), header); if (send(httpHandle->_sock_fd, header, strlen(header), 0) < 0) { result = HTTPAPI_SEND_REQUEST_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); free(header); goto exit; } if (send(httpHandle->_sock_fd, "\r\n", 2, 0) < 0) { result = HTTPAPI_SEND_REQUEST_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); free(header); goto exit; } free(header); } //Close headers if (send(httpHandle->_sock_fd, "\r\n", 2, 0) < 0) { result = HTTPAPI_SEND_REQUEST_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } //Send data (if available) if (content && contentLength > 0) { LogInfo("HTTPAPI_ExecuteRequest::Sending data=%*.*s", contentLength, contentLength, content); if (send(httpHandle->_sock_fd, (char*)content, contentLength, 0) < 0) { result = HTTPAPI_SEND_REQUEST_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } } //Receive response if (readLine(httpHandle->_sock_fd, buf, sizeof(buf)) < 0) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } //Parse HTTP response if (sscanf(buf, "HTTP/%*d.%*d %d %*[^\r\n]", &ret) != 1) { //Cannot match string, error LogInfo("HTTPAPI_ExecuteRequest::Not a correct HTTP answer=%s", buf); result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } if (statusCode) *statusCode = ret; LogInfo("HTTPAPI_ExecuteRequest::Received response=%*.*s", strlen(buf), strlen(buf), buf); //Read HTTP response headers if (readLine(httpHandle->_sock_fd, buf, sizeof(buf)) < 0) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } while (buf[0]) { const char ContentLength[] = "content-length:"; const char TransferEncoding[] = "transfer-encoding:"; LogInfo("Receiving header=%*.*s", strlen(buf), strlen(buf), buf); if (_strnicmp(buf, ContentLength, CHAR_COUNT(ContentLength)) == 0) { if (sscanf(buf + CHAR_COUNT(ContentLength), " %d", &bodyLength) != 1) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } } else if (_strnicmp(buf, TransferEncoding, CHAR_COUNT(TransferEncoding)) == 0) { const char* p = buf + CHAR_COUNT(TransferEncoding); while (isspace(*p)) p++; if (_stricmp(p, "chunked") == 0) chunked = true; } char* whereIsColon = strchr((char*)buf, ':'); if (whereIsColon && responseHeadersHandle != NULL) { *whereIsColon = '\0'; HTTPHeaders_AddHeaderNameValuePair(responseHeadersHandle, buf, whereIsColon + 1); } if (readLine(httpHandle->_sock_fd, buf, sizeof(buf)) < 0) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } } //Read HTTP response body LogInfo("HTTPAPI_ExecuteRequest::Receiving body=%d,%x", bodyLength, responseContent); if (!chunked) { if (bodyLength) { if (responseContent != NULL) { if (BUFFER_pre_build(responseContent, bodyLength) != 0) { result = HTTPAPI_ALLOC_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (BUFFER_content(responseContent, &receivedContent) != 0) { (void)BUFFER_unbuild(responseContent); result = HTTPAPI_ALLOC_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } if (readChunk(httpHandle->_sock_fd, (char*)receivedContent, bodyLength) < 0) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } else { LogInfo("HTTPAPI_ExecuteRequest::Received response body=%*.*s", bodyLength, bodyLength, receivedContent); result = HTTPAPI_OK; } } else { (void)skipN(httpHandle->_sock_fd, bodyLength, buf, sizeof(buf)); result = HTTPAPI_OK; } } else { result = HTTPAPI_OK; } } else { size_t size = 0; result = HTTPAPI_OK; for (;;) { int chunkSize; if (readLine(httpHandle->_sock_fd, buf, sizeof(buf)) < 0) // read [length in hex]/r/n { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } if (sscanf(buf, "%x", &chunkSize) != 1) // chunkSize is length of next line (/r/n is not counted) { //Cannot match string, error result = HTTPAPI_RECEIVE_RESPONSE_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } if (chunkSize == 0) { // 0 length means next line is just '\r\n' and end of chunks if (readChunk(httpHandle->_sock_fd, (char*)buf, 2) < 0 || buf[0] != '\r' || buf[1] != '\n') // skip /r/n { (void)BUFFER_unbuild(responseContent); result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } break; } else { if (responseContent != NULL) { if (BUFFER_enlarge(responseContent, chunkSize) != 0) { (void)BUFFER_unbuild(responseContent); result = HTTPAPI_ALLOC_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else if (BUFFER_content(responseContent, &receivedContent) != 0) { (void)BUFFER_unbuild(responseContent); result = HTTPAPI_ALLOC_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } if (readChunk(httpHandle->_sock_fd, (char*)receivedContent + size, chunkSize) < 0) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } } else { if (skipN(httpHandle->_sock_fd, chunkSize, buf, sizeof(buf)) < 0) { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } } if (readChunk(httpHandle->_sock_fd, (char*)buf, 2) < 0 || buf[0] != '\r' || buf[1] != '\n') // skip /r/n { result = HTTPAPI_READ_DATA_FAILED; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goto exit; } size += chunkSize; } } if (size > 0) { LogInfo("HTTPAPI_ExecuteRequest::Received chunk body=%*.*s", (int)size, (int)size, (const char*)responseContent); } } exit: LogInfo("HTTPAPI_ExecuteRequest::End=%d", result); return result; } HTTPAPI_RESULT HTTPAPI_SetOption(HTTP_HANDLE handle, const char* optionName, const void* value) { HTTPAPI_RESULT result; if ( (handle == NULL) || (optionName == NULL) || (value == NULL) ) { result = HTTPAPI_INVALID_ARG; LogError("invalid parameter (NULL) passed to HTTPAPI_SetOption"); } else { result = HTTPAPI_INVALID_ARG; LogError("unknown option %s", optionName); } return result; } HTTPAPI_RESULT HTTPAPI_CloneOption(const char* optionName, const void* value, const void** savedValue) { HTTPAPI_RESULT result; if ( (optionName == NULL) || (value == NULL) || (savedValue == NULL) ) { result = HTTPAPI_INVALID_ARG; LogError("invalid argument(NULL) passed to HTTPAPI_CloneOption"); } else { *savedValue = NULL; result = HTTPAPI_INVALID_ARG; LogError("unknown option %s", optionName); } return result; } httpapi_winhttp.c000066400000000000000000001575501362133436400344670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "windows.h" #include "winhttp.h" #include "azure_c_shared_utility/httpapi.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/x509_schannel.h" #include "azure_c_shared_utility/shared_util_options.h" DEFINE_ENUM_STRINGS(HTTPAPI_RESULT, HTTPAPI_RESULT_VALUES) typedef enum HTTPAPI_STATE_TAG { HTTPAPI_NOT_INITIALIZED, HTTPAPI_INITIALIZED } HTTPAPI_STATE; typedef struct HTTP_HANDLE_DATA_TAG { /*working set*/ HINTERNET ConnectionHandle; X509_SCHANNEL_HANDLE x509SchannelHandle; /*options*/ unsigned int timeout; const char* x509certificate; const char* x509privatekey; const char* proxy_host; const char* proxy_username; const char* proxy_password; } HTTP_HANDLE_DATA; static HTTPAPI_STATE g_HTTPAPIState = HTTPAPI_NOT_INITIALIZED; /*There's a global SessionHandle for all the connections*/ static HINTERNET g_SessionHandle; static size_t nUsersOfHTTPAPI = 0; /*used for reference counting (a weak one)*/ /*returns NULL if it failed to construct the headers*/ static const char* ConstructHeadersString(HTTP_HEADERS_HANDLE httpHeadersHandle) { char* result; size_t headersCount; if (HTTPHeaders_GetHeaderCount(httpHeadersHandle, &headersCount) != HTTP_HEADERS_OK) { result = NULL; LogError("HTTPHeaders_GetHeaderCount failed."); } else { size_t i; /*the total size of all the headers is given by sumof(lengthof(everyheader)+2)*/ size_t toAlloc = 0; for (i = 0; i < headersCount; i++) { char *temp; if (HTTPHeaders_GetHeader(httpHeadersHandle, i, &temp) == HTTP_HEADERS_OK) { toAlloc += strlen(temp); toAlloc += 2; free(temp); } else { LogError("HTTPHeaders_GetHeader failed"); break; } } if (i < headersCount) { result = NULL; } else { result = (char*)malloc(toAlloc*sizeof(char) + 1 ); if (result == NULL) { LogError("unable to malloc"); /*let it be returned*/ } else { result[0] = '\0'; for (i = 0; i < headersCount; i++) { char* temp; if (HTTPHeaders_GetHeader(httpHeadersHandle, i, &temp) != HTTP_HEADERS_OK) { LogError("unable to HTTPHeaders_GetHeader"); break; } else { (void)strcat(result, temp); (void)strcat(result, "\r\n"); free(temp); } } if (i < headersCount) { free(result); result = NULL; } else { /*all is good*/ } } } } return result; } HTTPAPI_RESULT HTTPAPI_Init(void) { HTTPAPI_RESULT result; if (nUsersOfHTTPAPI == 0) { if ((g_SessionHandle = WinHttpOpen( NULL, WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0)) == NULL) { LogErrorWinHTTPWithGetLastErrorAsString("WinHttpOpen failed."); result = HTTPAPI_INIT_FAILED; } else { nUsersOfHTTPAPI++; g_HTTPAPIState = HTTPAPI_INITIALIZED; result = HTTPAPI_OK; } } else { nUsersOfHTTPAPI++; result = HTTPAPI_OK; } return result; } void HTTPAPI_Deinit(void) { if (nUsersOfHTTPAPI > 0) { nUsersOfHTTPAPI--; if (nUsersOfHTTPAPI == 0) { if (g_SessionHandle != NULL) { (void)WinHttpCloseHandle(g_SessionHandle); g_SessionHandle = NULL; g_HTTPAPIState = HTTPAPI_NOT_INITIALIZED; } } } } HTTP_HANDLE HTTPAPI_CreateConnection(const char* hostName) { HTTP_HANDLE_DATA* result; if (g_HTTPAPIState != HTTPAPI_INITIALIZED) { LogError("g_HTTPAPIState not HTTPAPI_INITIALIZED"); result = NULL; } else { result = (HTTP_HANDLE_DATA*)malloc(sizeof(HTTP_HANDLE_DATA)); if (result == NULL) { LogError("malloc returned NULL."); } else { wchar_t* hostNameTemp; size_t hostNameTemp_size = MultiByteToWideChar(CP_ACP, 0, hostName, -1, NULL, 0); if (hostNameTemp_size == 0) { LogError("MultiByteToWideChar failed"); free(result); result = NULL; } else { hostNameTemp = (wchar_t*)malloc(sizeof(wchar_t)*hostNameTemp_size); if (hostNameTemp == NULL) { LogError("malloc failed"); free(result); result = NULL; } else { if (MultiByteToWideChar(CP_ACP, 0, hostName, -1, hostNameTemp, (int)hostNameTemp_size) == 0) { LogError("MultiByteToWideChar failed"); free(result); result = NULL; } else { result->ConnectionHandle = WinHttpConnect( g_SessionHandle, hostNameTemp, INTERNET_DEFAULT_HTTPS_PORT, 0); if (result->ConnectionHandle == NULL) { LogErrorWinHTTPWithGetLastErrorAsString("WinHttpConnect returned NULL."); free(result); result = NULL; } else { result->timeout = 60000; result->x509certificate = NULL; result->x509privatekey = NULL; result->x509SchannelHandle = NULL; result->proxy_host = NULL; result->proxy_username = NULL; result->proxy_password = NULL; } } free(hostNameTemp); } } } } return (HTTP_HANDLE)result; } void HTTPAPI_CloseConnection(HTTP_HANDLE handle) { if (g_HTTPAPIState != HTTPAPI_INITIALIZED) { LogError("g_HTTPAPIState not HTTPAPI_INITIALIZED"); } else { HTTP_HANDLE_DATA* handleData = (HTTP_HANDLE_DATA*)handle; if (handleData != NULL) { if (handleData->ConnectionHandle != NULL) { (void)WinHttpCloseHandle(handleData->ConnectionHandle); /*no x509 free because the options are owned by httpapiex.*/ handleData->ConnectionHandle = NULL; } if (handleData->proxy_host != NULL) { free((void*)handleData->proxy_host); } if (handleData->proxy_username != NULL) { free((void*)handleData->proxy_username); } if (handleData->proxy_password != NULL) { free((void*)handleData->proxy_password); } x509_schannel_destroy(handleData->x509SchannelHandle); free(handleData); } } } HTTPAPI_RESULT HTTPAPI_ExecuteRequest(HTTP_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE httpHeadersHandle, const unsigned char* content, size_t contentLength, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent) { HTTPAPI_RESULT result; if (g_HTTPAPIState != HTTPAPI_INITIALIZED) { LogError("g_HTTPAPIState not HTTPAPI_INITIALIZED"); result = HTTPAPI_NOT_INIT; } else { HTTP_HANDLE_DATA* handleData = (HTTP_HANDLE_DATA*)handle; if ((handleData == NULL) || (relativePath == NULL) || (httpHeadersHandle == NULL)) { result = HTTPAPI_INVALID_ARG; LogError("NULL parameter detected (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { wchar_t* requestTypeString = NULL; switch (requestType) { default: break; case HTTPAPI_REQUEST_GET: requestTypeString = L"GET"; break; case HTTPAPI_REQUEST_HEAD: requestTypeString = L"HEAD"; break; case HTTPAPI_REQUEST_POST: requestTypeString = L"POST"; break; case HTTPAPI_REQUEST_PUT: requestTypeString = L"PUT"; break; case HTTPAPI_REQUEST_DELETE: requestTypeString = L"DELETE"; break; case HTTPAPI_REQUEST_PATCH: requestTypeString = L"PATCH"; break; } if (requestTypeString == NULL) { result = HTTPAPI_INVALID_ARG; LogError("requestTypeString was NULL (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { const char* headers2; headers2 = ConstructHeadersString(httpHeadersHandle); if (headers2 != NULL) { size_t requiredCharactersForRelativePath = MultiByteToWideChar(CP_ACP, 0, relativePath, -1, NULL, 0); wchar_t* relativePathTemp = (wchar_t*)malloc((requiredCharactersForRelativePath+1) * sizeof(wchar_t)); result = HTTPAPI_OK; /*legacy code*/ if (relativePathTemp == NULL) { result = HTTPAPI_ALLOC_FAILED; LogError("malloc failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (MultiByteToWideChar(CP_ACP, 0, relativePath, -1, relativePathTemp, (int)requiredCharactersForRelativePath) == 0) { result = HTTPAPI_STRING_PROCESSING_ERROR; LogError("MultiByteToWideChar was 0. (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { size_t requiredCharactersForHeaders = MultiByteToWideChar(CP_ACP, 0, headers2, -1, NULL, 0); wchar_t* headersTemp = (wchar_t*)malloc((requiredCharactersForHeaders +1) * sizeof(wchar_t) ); if (headersTemp == NULL) { result = HTTPAPI_STRING_PROCESSING_ERROR; LogError("MultiByteToWideChar was 0. (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (MultiByteToWideChar(CP_ACP, 0, headers2, -1, headersTemp, (int)requiredCharactersForHeaders) == 0) { result = HTTPAPI_STRING_PROCESSING_ERROR; LogError("MultiByteToWideChar was 0(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { HINTERNET requestHandle = WinHttpOpenRequest( handleData->ConnectionHandle, requestTypeString, relativePathTemp, NULL, WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_SECURE); if (requestHandle == NULL) { result = HTTPAPI_OPEN_REQUEST_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpOpenRequest failed (result = %s).", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if ((handleData->x509SchannelHandle!=NULL) && !WinHttpSetOption( requestHandle, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, (void*)x509_schannel_get_certificate_context(handleData->x509SchannelHandle), sizeof(CERT_CONTEXT) )) { LogErrorWinHTTPWithGetLastErrorAsString("unable to WinHttpSetOption"); result = HTTPAPI_SET_X509_FAILURE; } else { // Set proxy host if needed if (handleData->proxy_host != NULL) { WINHTTP_PROXY_INFO winhttp_proxy; wchar_t wproxy[MAX_HOSTNAME_LEN]; winhttp_proxy.dwAccessType = WINHTTP_ACCESS_TYPE_NAMED_PROXY; if (mbstowcs_s(NULL, wproxy, MAX_HOSTNAME_LEN, handleData->proxy_host, MAX_HOSTNAME_LEN-1) != 0) { LogError("Error during proxy host conversion"); result = HTTPAPI_ERROR; } else { winhttp_proxy.lpszProxy = wproxy; winhttp_proxy.lpszProxyBypass = NULL; if (WinHttpSetOption(requestHandle, WINHTTP_OPTION_PROXY, &winhttp_proxy, (DWORD)sizeof(WINHTTP_PROXY_INFO)) != TRUE) { LogError("failure setting proxy address (%i)", GetLastError()); result = HTTPAPI_ERROR; } else { //Set username and password if needed if (handleData->proxy_username != NULL && handleData->proxy_password != NULL) { wchar_t wusername[MAX_USERNAME_LEN]; if (mbstowcs_s(NULL, wusername, MAX_USERNAME_LEN, handleData->proxy_username, MAX_USERNAME_LEN-1) != 0) { LogError("Error during proxy username conversion"); result = HTTPAPI_ERROR; } else { wchar_t wpassword[MAX_PASSWORD_LEN]; if (mbstowcs_s(NULL, wpassword, MAX_PASSWORD_LEN, handleData->proxy_password, MAX_PASSWORD_LEN-1) != 0) { LogError("Error during proxy password conversion"); result = HTTPAPI_ERROR; } else { if (WinHttpSetCredentials(requestHandle, WINHTTP_AUTH_TARGET_PROXY, WINHTTP_AUTH_SCHEME_BASIC, wusername, wpassword, NULL) != TRUE) { LogErrorWinHTTPWithGetLastErrorAsString("Failure setting proxy credentials"); result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } } } else { result = HTTPAPI_OK; } } } } else { result = HTTPAPI_OK; } // verify if no error when set proxy if (result == HTTPAPI_OK) { if (WinHttpSetTimeouts(requestHandle, 0, /*_In_ int dwResolveTimeout - The initial value is zero, meaning no time-out (infinite). */ 60000, /*_In_ int dwConnectTimeout, - The initial value is 60,000 (60 seconds).*/ handleData->timeout, /*_In_ int dwSendTimeout, - The initial value is 30,000 (30 seconds).*/ handleData->timeout /* int dwReceiveTimeout The initial value is 30,000 (30 seconds).*/ ) == FALSE) { result = HTTPAPI_SET_TIMEOUTS_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpOpenRequest failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { DWORD dwSecurityFlags = 0; if (!WinHttpSetOption( requestHandle, WINHTTP_OPTION_SECURITY_FLAGS, &dwSecurityFlags, sizeof(dwSecurityFlags))) { result = HTTPAPI_SET_OPTION_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpSetOption failed (result = %s).", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (!WinHttpSendRequest( requestHandle, headersTemp, (DWORD)-1L, /*An unsigned long integer value that contains the length, in characters, of the additional headers. If this parameter is -1L ... */ (void*)content, (DWORD)contentLength, (DWORD)contentLength, 0)) { result = HTTPAPI_SEND_REQUEST_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpSendRequest: (result = %s).", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (!WinHttpReceiveResponse( requestHandle, 0)) { result = HTTPAPI_RECEIVE_RESPONSE_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpReceiveResponse: (result = %s).", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { DWORD dwStatusCode = 0; DWORD dwBufferLength = sizeof(DWORD); DWORD responseBytesAvailable; if (!WinHttpQueryHeaders( requestHandle, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, WINHTTP_HEADER_NAME_BY_INDEX, &dwStatusCode, &dwBufferLength, WINHTTP_NO_HEADER_INDEX)) { result = HTTPAPI_QUERY_HEADERS_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpQueryHeaders failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { BUFFER_HANDLE useToReadAllResponse = (responseContent != NULL) ? responseContent : BUFFER_new(); if (statusCode != NULL) { *statusCode = dwStatusCode; } if (useToReadAllResponse == NULL) { result = HTTPAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { int goOnAndReadEverything = 1; do { /*from MSDN: If no data is available and the end of the file has not been reached, one of two things happens. If the session is synchronous, the request waits until data becomes available.*/ if (!WinHttpQueryDataAvailable(requestHandle, &responseBytesAvailable)) { result = HTTPAPI_QUERY_DATA_AVAILABLE_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpQueryDataAvailable failed (result = %s).", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goOnAndReadEverything = 0; } else if (responseBytesAvailable == 0) { /*end of the stream, go out*/ result = HTTPAPI_OK; goOnAndReadEverything = 0; } else { if (BUFFER_enlarge(useToReadAllResponse, responseBytesAvailable) != 0) { result = HTTPAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goOnAndReadEverything = 0; } else { /*Add the read bytes to the response buffer*/ size_t bufferSize; const unsigned char* bufferContent; if (BUFFER_content(useToReadAllResponse, &bufferContent) != 0) { result = HTTPAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goOnAndReadEverything = 0; } else if (BUFFER_size(useToReadAllResponse, &bufferSize) != 0) { result = HTTPAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goOnAndReadEverything = 0; } else { DWORD bytesReceived; if (!WinHttpReadData(requestHandle, (LPVOID)(bufferContent + bufferSize - responseBytesAvailable), responseBytesAvailable, &bytesReceived)) { result = HTTPAPI_READ_DATA_FAILED; LogErrorWinHTTPWithGetLastErrorAsString("WinHttpReadData failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goOnAndReadEverything = 0; } else { /*if for some reason bytesReceived is zero If you are using WinHttpReadData synchronously, and the return value is TRUE and the number of bytes read is zero, the transfer has been completed and there are no more bytes to read on the handle.*/ if (bytesReceived == 0) { /*end of everything, but this looks like an error still, or a non-conformance between WinHttpQueryDataAvailable and WinHttpReadData*/ result = HTTPAPI_READ_DATA_FAILED; LogError("bytesReceived was unexpectedly zero (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); goOnAndReadEverything = 0; } else { /*all is fine, keep going*/ } } } } } } while (goOnAndReadEverything != 0); } } if (result == HTTPAPI_OK && responseHeadersHandle != NULL) { wchar_t* responseHeadersTemp; DWORD responseHeadersTempLength = sizeof(responseHeadersTemp); (void)WinHttpQueryHeaders( requestHandle, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, WINHTTP_NO_OUTPUT_BUFFER, &responseHeadersTempLength, WINHTTP_NO_HEADER_INDEX); responseHeadersTemp = (wchar_t*)malloc(responseHeadersTempLength + 2); if (responseHeadersTemp == NULL) { result = HTTPAPI_ALLOC_FAILED; LogError("malloc failed: (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { if (WinHttpQueryHeaders( requestHandle, WINHTTP_QUERY_RAW_HEADERS_CRLF, WINHTTP_HEADER_NAME_BY_INDEX, responseHeadersTemp, &responseHeadersTempLength, WINHTTP_NO_HEADER_INDEX)) { wchar_t *next_token; wchar_t* token = wcstok_s(responseHeadersTemp, L"\r\n", &next_token); while ((token != NULL) && (token[0] != L'\0')) { char* tokenTemp; size_t tokenTemp_size; tokenTemp_size = WideCharToMultiByte(CP_ACP, 0, token, -1, NULL, 0, NULL, NULL); if (tokenTemp_size == 0) { LogError("WideCharToMultiByte failed"); } else { tokenTemp = (char*)malloc(sizeof(char)*tokenTemp_size); if (tokenTemp == NULL) { LogError("malloc failed"); } else { if (WideCharToMultiByte(CP_ACP, 0, token, -1, tokenTemp, (int)tokenTemp_size, NULL, NULL) > 0) { /*breaking the token in 2 parts: everything before the first ":" and everything after the first ":"*/ /* if there is no such character, then skip it*/ /*if there is a : then replace is by a '\0' and so it breaks the original string in name and value*/ char* whereIsColon = strchr(tokenTemp, ':'); if (whereIsColon != NULL) { *whereIsColon = '\0'; if (HTTPHeaders_AddHeaderNameValuePair(responseHeadersHandle, tokenTemp, whereIsColon + 1) != HTTP_HEADERS_OK) { LogError("HTTPHeaders_AddHeaderNameValuePair failed"); result = HTTPAPI_HTTP_HEADERS_FAILED; break; } } } else { LogError("WideCharToMultiByte failed"); } free(tokenTemp); } } token = wcstok_s(NULL, L"\r\n", &next_token); } } else { LogError("WinHttpQueryHeaders failed"); } free(responseHeadersTemp); } } } } } } } } (void)WinHttpCloseHandle(requestHandle); } } free(headersTemp); } } free(relativePathTemp); } free((void*)headers2); } else { result = HTTPAPI_ALLOC_FAILED; /*likely*/ LogError("ConstructHeadersString failed"); } } } } return result; } HTTPAPI_RESULT HTTPAPI_SetOption(HTTP_HANDLE handle, const char* optionName, const void* value) { HTTPAPI_RESULT result; if ( (handle == NULL) || (optionName == NULL) || (value == NULL) ) { result = HTTPAPI_INVALID_ARG; LogError("invalid parameter (NULL) passed to HTTPAPI_SetOption"); } else { HTTP_HANDLE_DATA* httpHandleData = (HTTP_HANDLE_DATA*)handle; if (strcmp(OPTION_HTTP_TIMEOUT, optionName) == 0) { long timeout = (long)(*(unsigned int*)value); httpHandleData->timeout = timeout; result = HTTPAPI_OK; } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { httpHandleData->x509certificate = (const char*)value; if (httpHandleData->x509privatekey != NULL) { httpHandleData->x509SchannelHandle = x509_schannel_create(httpHandleData->x509certificate, httpHandleData->x509privatekey); if (httpHandleData->x509SchannelHandle == NULL) { LogError("unable to x509_schannel_create"); result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } else { /*if certificate comes 1st and private key is not set yet, then return OK and wait for the private key to be set*/ result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { httpHandleData->x509privatekey = (const char*)value; if (httpHandleData->x509certificate != NULL) { httpHandleData->x509SchannelHandle = x509_schannel_create(httpHandleData->x509certificate, httpHandleData->x509privatekey); if (httpHandleData->x509SchannelHandle == NULL) { LogError("unable to x509_schannel_create"); result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } else { /*if privatekey comes 1st and certificate is not set yet, then return OK and wait for the certificate to be set*/ result = HTTPAPI_OK; } } else if (strcmp("TrustedCerts", optionName) == 0) { /*winhttp accepts all certificates, because it actually relies on the system ones*/ result = HTTPAPI_OK; } else if (strcmp(OPTION_HTTP_PROXY, optionName) == 0) { char proxyAddressAndPort[MAX_HOSTNAME_LEN]; HTTP_PROXY_OPTIONS* proxy_data = (HTTP_PROXY_OPTIONS*)value; if (proxy_data->host_address == NULL || proxy_data->port <= 0) { LogError("invalid proxy_data values ( host_address = %p, port = %d)", proxy_data->host_address, proxy_data->port); result = HTTPAPI_ERROR; } else { if (sprintf_s(proxyAddressAndPort, MAX_HOSTNAME_LEN, "%s:%d", proxy_data->host_address, proxy_data->port) <= 0) { LogError("failure constructing proxy address"); result = HTTPAPI_ERROR; } else { if(httpHandleData->proxy_host != NULL) { free((void*)httpHandleData->proxy_host); httpHandleData->proxy_host = NULL; } if(mallocAndStrcpy_s((char**)&(httpHandleData->proxy_host), (const char*)proxyAddressAndPort) != 0) { LogError("failure allocate proxy host"); result = HTTPAPI_ERROR; } else { if (proxy_data->username != NULL && proxy_data->password != NULL) { if(httpHandleData->proxy_username != NULL) { free((void*)httpHandleData->proxy_username); httpHandleData->proxy_username = NULL; } if(mallocAndStrcpy_s((char**)&(httpHandleData->proxy_username), (const char*)proxy_data->username) != 0) { LogError("failure allocate proxy username"); free((void*)httpHandleData->proxy_host); httpHandleData->proxy_host = NULL; result = HTTPAPI_ERROR; } else { if(httpHandleData->proxy_password != NULL) { free((void*)httpHandleData->proxy_password); httpHandleData->proxy_password = NULL; } if(mallocAndStrcpy_s((char**)&(httpHandleData->proxy_password), (const char*)proxy_data->password) != 0) { LogError("failure allocate proxy password"); free((void*)httpHandleData->proxy_host); httpHandleData->proxy_host = NULL; free((void*)httpHandleData->proxy_username); httpHandleData->proxy_username = NULL; result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } } else { result = HTTPAPI_OK; } } } } } else { result = HTTPAPI_INVALID_ARG; LogError("unknown option %s", optionName); } } return result; } HTTPAPI_RESULT HTTPAPI_CloneOption(const char* optionName, const void* value, const void** savedValue) { HTTPAPI_RESULT result; if ( (optionName == NULL) || (value == NULL) || (savedValue == NULL) ) { result = HTTPAPI_INVALID_ARG; LogError("invalid argument(NULL) passed to HTTPAPI_CloneOption"); } else { if (strcmp(OPTION_HTTP_TIMEOUT, optionName) == 0) { /*by convention value is pointing to an unsigned int */ unsigned int* temp = (unsigned int*)malloc(sizeof(unsigned int)); /*shall be freed by HTTPAPIEX*/ if (temp == NULL) { result = HTTPAPI_ERROR; LogError("malloc failed (result = %s)", ENUM_TO_STRING(HTTPAPI_RESULT, result)); } else { *temp = *(const unsigned int*)value; *savedValue = temp; result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { /*this is getting the x509 certificate. In this case, value is a pointer to a const char* that contains the certificate as a null terminated string*/ if (mallocAndStrcpy_s((char**)savedValue, (const char*)value) != 0) { LogError("unable to clone the x509 certificate content"); result = HTTPAPI_ERROR; } else { /*return OK when the certificate has been clones successfully*/ result = HTTPAPI_OK; } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { /*this is getting the x509 private key. In this case, value is a pointer to a const char* that contains the private key as a null terminated string*/ if (mallocAndStrcpy_s((char**)savedValue, (const char*)value) != 0) { LogError("unable to clone the x509 private key content"); result = HTTPAPI_ERROR; } else { /*return OK when the private key has been clones successfully*/ result = HTTPAPI_OK; } } else if (strcmp("TrustedCerts", optionName) == 0) { *savedValue = malloc(1); /*_CloneOption needs to return in *savedValue something that can be free()'d*/ if (*savedValue == NULL) { LogError("failure in malloc"); result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } else if (strcmp(OPTION_HTTP_PROXY, optionName) == 0) { *savedValue = malloc(sizeof(HTTP_PROXY_OPTIONS)); if (*savedValue == NULL) { LogError("failure in malloc"); result = HTTPAPI_ERROR; } else { HTTP_PROXY_OPTIONS *savedOption = (HTTP_PROXY_OPTIONS*) *savedValue; HTTP_PROXY_OPTIONS *option = (HTTP_PROXY_OPTIONS*) value; memset((void*)*savedValue, 0, sizeof(HTTP_PROXY_OPTIONS)); if (mallocAndStrcpy_s((char**)&(savedOption->host_address), (const char*)option->host_address) != 0) { LogError("unable to clone the proxy host adress content"); free((void*)*savedValue); *savedValue = NULL; result = HTTPAPI_ERROR; } else { savedOption->port = option->port; if (option->username != NULL && mallocAndStrcpy_s((char**)&(savedOption->username), (const char*)option->username) != 0) { LogError("unable to clone the proxy username content"); free((void*)savedOption->host_address); savedOption->host_address = NULL; free((void*)*savedValue); *savedValue = NULL; result = HTTPAPI_ERROR; } else { if (option->password != NULL && mallocAndStrcpy_s((char**)&(savedOption->password), (const char*)option->password) != 0) { LogError("unable to clone the proxy password content"); free((void*)savedOption->host_address); savedOption->host_address = NULL; free((void*)savedOption->username); savedOption->username = NULL; free((void*)*savedValue); *savedValue = NULL; result = HTTPAPI_ERROR; } else { result = HTTPAPI_OK; } } } } } else { result = HTTPAPI_INVALID_ARG; LogError("unknown option %s", optionName); } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/linux_time.c000066400000000000000000000034111362133436400334570ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/xlogging.h" #include "linux_time.h" #ifdef __MACH__ #include #include #endif #ifndef __MACH__ clockid_t time_basis = -1; #endif void set_time_basis(void) { // The time basis depends on what clock is available. Prefer CLOCK_MONOTONIC, // then CLOCK_REALTIME, otherwise query the default pthread_condattr_t value // and use that. Note the time basis stuff requires _POSIX_TIMERS [TMR] at a // minimum; querying pthread_condattr_t requires _POSIX_CLOCK_SELECTION [CS]. // OSX has neither so we use a platform-specific clock. #ifndef __MACH__ #if defined(CLOCK_MONOTONIC) time_basis = CLOCK_MONOTONIC; #elif defined(CLOCK_REALTIME) time_basis = CLOCK_REALTIME; #else pthread_condattr_t cattr; pthread_condattr_init(&cattr); pthread_condattr_getclock(&cattr, &time_basis); pthread_condattr_destroy(&cattr); #endif #endif } int get_time_ns(struct timespec* ts) { int err; #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; err = host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); if (!err) { err = clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); if (!err) { ts->tv_sec = mts.tv_sec; ts->tv_nsec = mts.tv_nsec; } } #else err = clock_gettime(time_basis, ts); #endif return err; } time_t get_time_s() { struct timespec ts; if (get_time_ns(&ts) != 0) { LogError("Failed to get the current time"); return INVALID_TIME_VALUE; } return (time_t)ts.tv_sec; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/linux_time.h000066400000000000000000000011111362133436400334570ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef LINUX_TIME_H #define LINUX_TIME_H #include #include #ifndef __MACH__ extern clockid_t time_basis; #endif extern void set_time_basis(void); extern int get_time_ns(struct timespec* ts); extern time_t get_time_s(void); #define INVALID_TIME_VALUE (time_t)(-1) #define NANOSECONDS_IN_1_SECOND 1000000000L #define MILLISECONDS_IN_1_SECOND 1000 #define NANOSECONDS_IN_1_MILLISECOND 1000000L #endif lock_pthreads.c000066400000000000000000000057131362133436400340540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/xlogging.h" LOCK_HANDLE Lock_Init(void) { /* Codes_SRS_LOCK_10_002: [Lock_Init on success shall return a valid lock handle which should be a non NULL value] */ pthread_mutex_t* result = (pthread_mutex_t*)malloc(sizeof(pthread_mutex_t)); if (result == NULL) { LogError("malloc failed."); } else { if (pthread_mutex_init(result, NULL) != 0) { /* Codes_SRS_LOCK_10_003: [Lock_Init on error shall return NULL ] */ LogError("pthread_mutex_init failed."); free(result); result = NULL; } } return (LOCK_HANDLE)result; } LOCK_RESULT Lock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Lock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { if (pthread_mutex_lock((pthread_mutex_t*)handle) == 0) { /* Codes_SRS_LOCK_10_005: [Lock on success shall return LOCK_OK] */ result = LOCK_OK; } else { /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ LogError("pthread_mutex_lock failed."); result = LOCK_ERROR; } } return result; } LOCK_RESULT Unlock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Unlock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { if (pthread_mutex_unlock((pthread_mutex_t*)handle) == 0) { /* Codes_SRS_LOCK_10_009: [Unlock on success shall return LOCK_OK] */ result = LOCK_OK; } else { /* Codes_SRS_LOCK_10_010: [Unlock on error shall return LOCK_ERROR] */ LogError("pthread_mutex_unlock failed."); result = LOCK_ERROR; } } return result; } LOCK_RESULT Lock_Deinit(LOCK_HANDLE handle) { LOCK_RESULT result; if (NULL == handle) { /* Codes_SRS_LOCK_10_007: [Lock_Deinit on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { /* Codes_SRS_LOCK_10_012: [Lock_Deinit frees the memory pointed by handle] */ if(pthread_mutex_destroy((pthread_mutex_t*)handle) == 0) { free(handle); handle = NULL; result = LOCK_OK; } else { LogError("pthread_mutex_destroy failed;"); result = LOCK_ERROR; } } return result; } lock_rtx_mbed.cpp000066400000000000000000000051021362133436400343760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/xlogging.h" #include "rtos.h" LOCK_HANDLE Lock_Init(void) { /* Codes_SRS_LOCK_10_002: [Lock_Init on success shall return a valid lock handle which should be a non NULL value] */ /* Codes_SRS_LOCK_10_003: [Lock_Init on error shall return NULL] */ Mutex* result = new Mutex(); if (result == NULL) { LogError("Failed to instantiate a new Mutex object."); } return (LOCK_HANDLE)result; } LOCK_RESULT Lock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Lock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { Mutex* lock_mtx = (Mutex*)handle; if (lock_mtx->lock() == osOK) { /* Codes_SRS_LOCK_10_005: [Lock on success shall return LOCK_OK] */ result = LOCK_OK; } else { /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ LogError("Mutex(%p)->lock() failed.", handle); result = LOCK_ERROR; } } return result; } LOCK_RESULT Unlock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Unlock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { Mutex* lock_mtx = (Mutex*)handle; if (lock_mtx->unlock() == osOK) { /* Codes_SRS_LOCK_10_009: [Unlock on success shall return LOCK_OK] */ result = LOCK_OK; } else { /* Codes_SRS_LOCK_10_010: [Unlock on error shall return LOCK_ERROR] */ LogError("Mutex(%p)->unlock() failed.", handle); result = LOCK_ERROR; } } return result; } LOCK_RESULT Lock_Deinit(LOCK_HANDLE handle) { LOCK_RESULT result; if (NULL == handle) { /* Codes_SRS_LOCK_10_007: [Lock_Deinit on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { /* Codes_SRS_LOCK_10_012: [Lock_Deinit frees the memory pointed by handle] */ Mutex* lock_mtx = (Mutex*)handle; delete lock_mtx; result = LOCK_OK; } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters/lock_win32.c000066400000000000000000000066431362133436400332660ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/lock.h" #include #include #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/macro_utils.h" LOCK_HANDLE Lock_Init(void) { /* Codes_SRS_LOCK_10_002: [Lock_Init on success shall return a valid lock handle which should be a non NULL value] */ /* Codes_SRS_LOCK_10_003: [Lock_Init on error shall return NULL ] */ HANDLE result = CreateSemaphoreW(NULL, 1, 1, NULL); if (result == NULL) { LogError("CreateSemaphore failed."); } return (LOCK_HANDLE)result; } LOCK_RESULT Lock_Deinit(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Lock_Deinit on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { /* Codes_SRS_LOCK_10_012: [Lock_Deinit frees the memory pointed by handle] */ CloseHandle((HANDLE)handle); result = LOCK_OK; } return result; } LOCK_RESULT Lock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Lock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { DWORD rv = WaitForSingleObject((HANDLE)handle, INFINITE); switch (rv) { case WAIT_OBJECT_0: /* Codes_SRS_LOCK_10_005: [Lock on success shall return LOCK_OK] */ result = LOCK_OK; break; case WAIT_ABANDONED: LogError("WaitForSingleObject returned 'abandoned'."); /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ result = LOCK_ERROR; break; case WAIT_TIMEOUT: LogError("WaitForSingleObject timed out."); /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ result = LOCK_ERROR; break; case WAIT_FAILED: LogError("WaitForSingleObject failed: %d", GetLastError()); /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ result = LOCK_ERROR; break; default: LogError("WaitForSingleObject returned an invalid value."); /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ result = LOCK_ERROR; break; } } return result; } LOCK_RESULT Unlock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Unlock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { if (ReleaseSemaphore((HANDLE)handle, 1, NULL)) { /* Codes_SRS_LOCK_10_009: [Unlock on success shall return LOCK_OK] */ result = LOCK_OK; } else { /* Codes_SRS_LOCK_10_010: [Unlock on error shall return LOCK_ERROR] */ LogError("ReleaseSemaphore failed: %d", GetLastError()); result = LOCK_ERROR; } } return result; } platform_esp8266.c000066400000000000000000000015561362133436400342540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #ifdef _CRTDBG_MAP_ALLOC #include #endif #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/tlsio_openssl.h" #include "azure_c_shared_utility/xlogging.h" #include "lwip/apps/sntp.h" #include "lwip/apps/sntp_time.h" int platform_init(void) { sntp_init(); u32_t ts = 0; while(ts == 0){ vTaskDelay(5000 / portTICK_RATE_MS); ts = sntp_get_current_timestamp(); LogInfo("%s", sntp_get_real_time(ts)); } return 0; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { return tlsio_openssl_get_interface_description(); } void platform_deinit(void) { sntp_stop(); } platform_freertos.c000066400000000000000000000016071362133436400347650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (C) Firmwave Ltd., All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/tlsio_cyclonessl.h" #include "azure_c_shared_utility/threadapi.h" #include "debug.h" int platform_init(void) { //TODO Add proper network events synchronization ThreadAPI_Sleep(10000); return 0; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { return tlsio_cyclonessl_get_interface_description(); } STRING_HANDLE platform_get_platform_info(void) { // Expected format: "(; ; )" return STRING_construct("(native; freertos; undefined)"); } void platform_deinit(void) { TRACE_INFO("Deinitializing platform \r\n"); while(1) {}; } platform_linux.c000066400000000000000000000030411362133436400342650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" #ifdef USE_OPENSSL #include "azure_c_shared_utility/tlsio_openssl.h" #endif #if USE_CYCLONESSL #include "azure_c_shared_utility/tlsio_cyclonessl.h" #endif #if USE_WOLFSSL #include "azure_c_shared_utility/tlsio_wolfssl.h" #endif #include #include #include int platform_init(void) { int result; #ifdef USE_OPENSSL result = tlsio_openssl_init(); #else result = 0; #endif return result; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { #if USE_CYCLONESSL return tlsio_cyclonessl_get_interface_description(); #elif USE_WOLFSSL return tlsio_wolfssl_get_interface_description(); #else return tlsio_openssl_get_interface_description(); #endif } STRING_HANDLE platform_get_platform_info(void) { // Expected format: "(; ; )" STRING_HANDLE result; struct utsname nnn; if (uname(&nnn) == 0) { result = STRING_construct_sprintf("(native; %s; %s)", nnn.sysname, nnn.machine); } else { LogInfo("WARNING: failed to find machine info."); result = STRING_construct("(native; Linux; undefined)"); } return result; } void platform_deinit(void) { #ifdef USE_OPENSSL tlsio_openssl_deinit(); #endif } platform_mbed.cpp000066400000000000000000000032151362133436400344000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // MBED seems to not implement size_t properly within their cstddef.h header, and builds will fail if stddef.h is not included by the projects. #include #include "azure_c_shared_utility/platform.h" #include "EthernetInterface.h" #include "NTPClient.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/tlsio_wolfssl.h" int setupRealTime(void) { int result; if (EthernetInterface::connect()) { result = __FAILURE__; } else { NTPClient ntp; if (ntp.setTime("0.pool.ntp.org") != 0) { result = __FAILURE__; } else { result = 0; } EthernetInterface::disconnect(); } return result; } int platform_init(void) { int result; if (EthernetInterface::init()) { result = __FAILURE__; } else if (setupRealTime() != 0) { result = __FAILURE__; } else if (EthernetInterface::connect()) { result = __FAILURE__; } else { result = 0; } return result; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { return tlsio_wolfssl_get_interface_description(); } STRING_HANDLE platform_get_platform_info(void) { // Expected format: "(; ; )" return STRING_construct("(native; mbed; undefined)"); } void platform_deinit(void) { EthernetInterface::disconnect(); } platform_stub.c000066400000000000000000000010671362133436400341110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/platform.h" int platform_init(void) { return 0; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { return NULL; } STRING_HANDLE platform_get_platform_info(void) { // Expected format: "(; ; )" return STRING_construct("(native; undefined; undefined)"); } void platform_deinit(void) { return; } platform_tizenrt.c000066400000000000000000000012401362133436400346240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/tlsio_mbedtls.h" int platform_init(void) { return 0; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { return tlsio_mbedtls_get_interface_description(); } STRING_HANDLE platform_get_platform_info(void) { // Expected format: "(; ; )" return STRING_construct("(native; tizenrt; undefined)"); } void platform_deinit(void) { return; } platform_win32.c000066400000000000000000000063651362133436400341040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/xlogging.h" #include "winsock2.h" #ifdef USE_OPENSSL #include "azure_c_shared_utility/tlsio_openssl.h" #endif #if USE_CYCLONESSL #include "azure_c_shared_utility/tlsio_cyclonessl.h" #endif #if USE_WOLFSSL #include "azure_c_shared_utility/tlsio_wolfssl.h" #endif #include "azure_c_shared_utility/tlsio_schannel.h" int platform_init(void) { int result; WSADATA wsaData; int error_code = WSAStartup(MAKEWORD(2, 2), &wsaData); if (error_code != 0) { LogError("WSAStartup failed: 0x%x", error_code); result = __FAILURE__; } else { #ifdef USE_OPENSSL tlsio_openssl_init(); #endif result = 0; } return result; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { #ifdef USE_OPENSSL return tlsio_openssl_get_interface_description(); #elif USE_CYCLONESSL return tlsio_cyclonessl_get_interface_description(); #elif USE_WOLFSSL return tlsio_wolfssl_get_interface_description(); #else #ifndef WINCE return tlsio_schannel_get_interface_description(); #else LogError("TLS IO interface currently not supported on WEC 2013"); return (IO_INTERFACE_DESCRIPTION*)NULL; #endif #endif } STRING_HANDLE platform_get_platform_info(void) { // Expected format: "(; ; )" STRING_HANDLE result; #ifndef WINCE SYSTEM_INFO sys_info; OSVERSIONINFO osvi; char *arch; GetSystemInfo(&sys_info); switch (sys_info.wProcessorArchitecture) { case PROCESSOR_ARCHITECTURE_AMD64: arch = "x64"; break; case PROCESSOR_ARCHITECTURE_ARM: arch = "ARM"; break; case PROCESSOR_ARCHITECTURE_IA64: arch = "IA64"; break; case PROCESSOR_ARCHITECTURE_INTEL: arch = "x32"; break; default: arch = "UNKNOWN"; break; } result = NULL; memset(&osvi, 0, sizeof(osvi)); osvi.dwOSVersionInfoSize = sizeof(osvi); #pragma warning(disable:4996) if (GetVersionEx(&osvi)) { DWORD product_type; if (GetProductInfo(osvi.dwMajorVersion, osvi.dwMinorVersion, 0, 0, &product_type)) { result = STRING_construct_sprintf("(native; WindowsProduct:0x%08x %d.%d; %s)", product_type, osvi.dwMajorVersion, osvi.dwMinorVersion, arch); } } if (result == NULL) { DWORD dwVersion = GetVersion(); result = STRING_construct_sprintf("(native; WindowsProduct:Windows NT %d.%d; %s)", LOBYTE(LOWORD(dwVersion)), HIBYTE(LOWORD(dwVersion)), arch); } #pragma warning(default:4996) #else result = STRING_construct("(native; Windows CE; undefined)"); #endif if (result == NULL) { LogError("STRING_construct_sprintf failed"); } return result; } void platform_deinit(void) { (void)WSACleanup(); #ifdef USE_OPENSSL tlsio_openssl_deinit(); #endif } socketio_berkeley.c000077500000000000000000001063201362133436400347330ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef _BSD_SOURCE #define _BSD_SOURCE #define SOCKETIO_BERKELEY_UNDEF_BSD_SOURCE #endif #define _DEFAULT_SOURCE #include #undef _DEFAULT_SOURCE #ifdef SOCKETIO_BERKELEY_UNDEF_BSD_SOURCE #undef _BSD_SOURCE #undef SOCKETIO_BERKELEY_UNDEF_BSD_SOURCE #endif #include #include #include #include #include #include #include "azure_c_shared_utility/socketio.h" #include #include #include #ifdef TIZENRT #include #else #include #endif #include #include #include #include #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/gbnetwork.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/const_defines.h" #include #include #include #include #define SOCKET_SUCCESS 0 #define INVALID_SOCKET -1 #define MAC_ADDRESS_STRING_LENGTH 18 #ifndef IFREQ_BUFFER_SIZE #define IFREQ_BUFFER_SIZE 1024 #endif // connect timeout in seconds #define CONNECT_TIMEOUT 10 typedef enum IO_STATE_TAG { IO_STATE_CLOSED, IO_STATE_OPENING, IO_STATE_OPEN, IO_STATE_CLOSING, IO_STATE_ERROR } IO_STATE; typedef enum ADDRESS_TYPE_TAG { ADDRESS_TYPE_IP, ADDRESS_TYPE_DOMAIN_SOCKET } ADDRESS_TYPE; typedef struct PENDING_SOCKET_IO_TAG { unsigned char* bytes; size_t size; ON_SEND_COMPLETE on_send_complete; void* callback_context; SINGLYLINKEDLIST_HANDLE pending_io_list; } PENDING_SOCKET_IO; typedef struct SOCKET_IO_INSTANCE_TAG { int socket; ADDRESS_TYPE address_type; ON_BYTES_RECEIVED on_bytes_received; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_error_context; char* hostname; int port; char* target_mac_address; IO_STATE io_state; SINGLYLINKEDLIST_HANDLE pending_io_list; unsigned char recv_bytes[RECEIVE_BYTES_VALUE]; } SOCKET_IO_INSTANCE; typedef struct NETWORK_INTERFACE_DESCRIPTION_TAG { char* name; char* mac_address; char* ip_address; struct NETWORK_INTERFACE_DESCRIPTION_TAG* next; } NETWORK_INTERFACE_DESCRIPTION; /*this function will clone an option given by name and value*/ static void* socketio_CloneOption(const char* name, const void* value) { void* result; if (name != NULL) { result = NULL; if (strcmp(name, OPTION_NET_INT_MAC_ADDRESS) == 0) { if (value == NULL) { LogError("Failed cloning option %s (value is NULL)", name); } else { if ((result = malloc(sizeof(char) * (strlen((char*)value) + 1))) == NULL) { LogError("Failed cloning option %s (malloc failed)", name); } else if (strcpy((char*)result, (char*)value) == NULL) { LogError("Failed cloning option %s (strcpy failed)", name); free(result); result = NULL; } } } else { LogError("Cannot clone option %s (not suppported)", name); } } else { result = NULL; } return result; } /*this function destroys an option previously created*/ static void socketio_DestroyOption(const char* name, const void* value) { if (name != NULL) { if (strcmp(name, OPTION_NET_INT_MAC_ADDRESS) == 0 && value != NULL) { free((void*)value); } } } static OPTIONHANDLER_HANDLE socketio_retrieveoptions(CONCRETE_IO_HANDLE handle) { OPTIONHANDLER_HANDLE result; if (handle == NULL) { LogError("failed retrieving options (handle is NULL)"); result = NULL; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)handle; result = OptionHandler_Create(socketio_CloneOption, socketio_DestroyOption, socketio_setoption); if (result == NULL) { LogError("unable to OptionHandler_Create"); } else if (socket_io_instance->target_mac_address != NULL && OptionHandler_AddOption(result, OPTION_NET_INT_MAC_ADDRESS, socket_io_instance->target_mac_address) != OPTIONHANDLER_OK) { LogError("failed retrieving options (failed adding net_interface_mac_address)"); OptionHandler_Destroy(result); result = NULL; } } return result; } static const IO_INTERFACE_DESCRIPTION socket_io_interface_description = { socketio_retrieveoptions, socketio_create, socketio_destroy, socketio_open, socketio_close, socketio_send, socketio_dowork, socketio_setoption }; static void indicate_error(SOCKET_IO_INSTANCE* socket_io_instance) { socket_io_instance->io_state = IO_STATE_ERROR; if (socket_io_instance->on_io_error != NULL) { socket_io_instance->on_io_error(socket_io_instance->on_io_error_context); } } static int add_pending_io(SOCKET_IO_INSTANCE* socket_io_instance, const unsigned char* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)malloc(sizeof(PENDING_SOCKET_IO)); if (pending_socket_io == NULL) { result = __FAILURE__; } else { pending_socket_io->bytes = (unsigned char*)malloc(size); if (pending_socket_io->bytes == NULL) { LogError("Allocation Failure: Unable to allocate pending list."); free(pending_socket_io); result = __FAILURE__; } else { pending_socket_io->size = size; pending_socket_io->on_send_complete = on_send_complete; pending_socket_io->callback_context = callback_context; pending_socket_io->pending_io_list = socket_io_instance->pending_io_list; (void)memcpy(pending_socket_io->bytes, buffer, size); if (singlylinkedlist_add(socket_io_instance->pending_io_list, pending_socket_io) == NULL) { LogError("Failure: Unable to add socket to pending list."); free(pending_socket_io->bytes); free(pending_socket_io); result = __FAILURE__; } else { result = 0; } } } return result; } static STATIC_VAR_UNUSED void signal_callback(int signum) { AZURE_UNREFERENCED_PARAMETER(signum); LogError("Socket received signal %d.", signum); } static int lookup_address_and_initiate_socket_connection(SOCKET_IO_INSTANCE* socket_io_instance) { int result; int err; struct addrinfo addrInfoHintIp; struct sockaddr_un addrInfoUn; struct sockaddr* connect_addr = NULL; socklen_t connect_addr_len; struct addrinfo* addrInfoIp = NULL; if (socket_io_instance->address_type == ADDRESS_TYPE_IP) { char portString[16]; memset(&addrInfoHintIp, 0, sizeof(addrInfoHintIp)); addrInfoHintIp.ai_family = AF_INET; addrInfoHintIp.ai_socktype = SOCK_STREAM; sprintf(portString, "%u", socket_io_instance->port); err = getaddrinfo(socket_io_instance->hostname, portString, &addrInfoHintIp, &addrInfoIp); if (err != 0) { LogError("Failure: getaddrinfo failure %d.", err); result = __FAILURE__; } else { connect_addr = addrInfoIp->ai_addr; connect_addr_len = sizeof(*addrInfoIp->ai_addr); result = 0; } } else { size_t hostname_len = strlen(socket_io_instance->hostname); if (hostname_len + 1 > sizeof(addrInfoUn.sun_path)) { LogError("Hostname %s is too long for a unix socket (max len = %zu)", socket_io_instance->hostname, sizeof(addrInfoUn.sun_path)); result = __FAILURE__; } else { memset(&addrInfoUn, 0, sizeof(addrInfoUn)); addrInfoUn.sun_family = AF_UNIX; // No need to add NULL terminator due to the above memset (void)memcpy(addrInfoUn.sun_path, socket_io_instance->hostname, hostname_len); connect_addr = (struct sockaddr*)&addrInfoUn; connect_addr_len = sizeof(addrInfoUn); result = 0; } } if (result == 0) { int flags; if ((-1 == (flags = fcntl(socket_io_instance->socket, F_GETFL, 0))) || (fcntl(socket_io_instance->socket, F_SETFL, flags | O_NONBLOCK) == -1)) { LogError("Failure: fcntl failure."); result = __FAILURE__; } else { err = connect(socket_io_instance->socket, connect_addr, connect_addr_len); if ((err != 0) && (errno != EINPROGRESS)) { LogError("Failure: connect failure %d.", errno); result = __FAILURE__; } } } if (addrInfoIp != NULL) { freeaddrinfo(addrInfoIp); } return result; } static int wait_for_connection(SOCKET_IO_INSTANCE* socket_io_instance) { int result; int err; int retval; int select_errno = 0; fd_set fdset; struct timeval tv; FD_ZERO(&fdset); FD_SET(socket_io_instance->socket, &fdset); tv.tv_sec = CONNECT_TIMEOUT; tv.tv_usec = 0; do { retval = select(socket_io_instance->socket + 1, NULL, &fdset, NULL, &tv); if (retval < 0) { select_errno = errno; } } while (retval < 0 && select_errno == EINTR); if (retval != 1) { LogError("Failure: select failure."); result = __FAILURE__; } else { int so_error = 0; socklen_t len = sizeof(so_error); err = getsockopt(socket_io_instance->socket, SOL_SOCKET, SO_ERROR, &so_error, &len); if (err != 0) { LogError("Failure: getsockopt failure %d.", errno); result = __FAILURE__; } else if (so_error != 0) { err = so_error; LogError("Failure: connect failure %d.", so_error); result = __FAILURE__; } else { result = 0; } } return result; } #ifndef __APPLE__ static void destroy_network_interface_descriptions(NETWORK_INTERFACE_DESCRIPTION* nid) { if (nid != NULL) { if (nid->next != NULL) { destroy_network_interface_descriptions(nid->next); } if (nid->name != NULL) { free(nid->name); } if (nid->mac_address != NULL) { free(nid->mac_address); } if (nid->ip_address != NULL) { free(nid->ip_address); } free(nid); } } static NETWORK_INTERFACE_DESCRIPTION* create_network_interface_description(struct ifreq *ifr, NETWORK_INTERFACE_DESCRIPTION* previous_nid) { NETWORK_INTERFACE_DESCRIPTION* result; if ((result = (NETWORK_INTERFACE_DESCRIPTION*)malloc(sizeof(NETWORK_INTERFACE_DESCRIPTION))) == NULL) { LogError("Failed allocating NETWORK_INTERFACE_DESCRIPTION"); } else if ((result->name = (char*)malloc(sizeof(char) * (strlen(ifr->ifr_name) + 1))) == NULL) { LogError("failed setting interface description name (malloc failed)"); destroy_network_interface_descriptions(result); result = NULL; } else if (strcpy(result->name, ifr->ifr_name) == NULL) { LogError("failed setting interface description name (strcpy failed)"); destroy_network_interface_descriptions(result); result = NULL; } else { char* ip_address; unsigned char* mac = (unsigned char*)ifr->ifr_hwaddr.sa_data; if ((result->mac_address = (char*)malloc(sizeof(char) * MAC_ADDRESS_STRING_LENGTH)) == NULL) { LogError("failed formatting mac address (malloc failed)"); destroy_network_interface_descriptions(result); result = NULL; } else if (sprintf(result->mac_address, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]) <= 0) { LogError("failed formatting mac address (sprintf failed)"); destroy_network_interface_descriptions(result); result = NULL; } else if ((ip_address = inet_ntoa(((struct sockaddr_in*)&ifr->ifr_addr)->sin_addr)) == NULL) { LogError("failed setting the ip address (inet_ntoa failed)"); destroy_network_interface_descriptions(result); result = NULL; } else if ((result->ip_address = (char*)malloc(sizeof(char) * (strlen(ip_address) + 1))) == NULL) { LogError("failed setting the ip address (malloc failed)"); destroy_network_interface_descriptions(result); result = NULL; } else if (strcpy(result->ip_address, ip_address) == NULL) { LogError("failed setting the ip address (strcpy failed)"); destroy_network_interface_descriptions(result); result = NULL; } else { result->next = NULL; if (previous_nid != NULL) { previous_nid->next = result; } } } return result; } static int get_network_interface_descriptions(int socket, NETWORK_INTERFACE_DESCRIPTION** nid) { int result; struct ifreq ifr; struct ifconf ifc; char buf[IFREQ_BUFFER_SIZE]; ifc.ifc_len = sizeof(buf); ifc.ifc_buf = buf; if (ioctl(socket, SIOCGIFCONF, &ifc) == -1) { LogError("ioctl failed querying socket (SIOCGIFCONF, errno=%d)", errno); result = __FAILURE__; } else { NETWORK_INTERFACE_DESCRIPTION* root_nid = NULL; NETWORK_INTERFACE_DESCRIPTION* new_nid = NULL; struct ifreq* it = ifc.ifc_req; const struct ifreq* const end = it + (ifc.ifc_len / sizeof(struct ifreq)); result = 0; for (; it != end; ++it) { strcpy(ifr.ifr_name, it->ifr_name); if (ioctl(socket, SIOCGIFFLAGS, &ifr) != 0) { LogError("ioctl failed querying socket (SIOCGIFFLAGS, errno=%d)", errno); result = __FAILURE__; break; } else if (ioctl(socket, SIOCGIFHWADDR, &ifr) != 0) { LogError("ioctl failed querying socket (SIOCGIFHWADDR, errno=%d)", errno); result = __FAILURE__; break; } else if (ioctl(socket, SIOCGIFADDR, &ifr) != 0) { LogError("ioctl failed querying socket (SIOCGIFADDR, errno=%d)", errno); result = __FAILURE__; break; } else if ((new_nid = create_network_interface_description(&ifr, new_nid)) == NULL) { LogError("Failed creating network interface description"); result = __FAILURE__; break; } else if (root_nid == NULL) { root_nid = new_nid; } } if (result == 0) { *nid = root_nid; } else { destroy_network_interface_descriptions(root_nid); } } return result; } static int set_target_network_interface(int socket, char* mac_address) { int result; NETWORK_INTERFACE_DESCRIPTION* nid; if (get_network_interface_descriptions(socket, &nid) != 0) { LogError("Failed getting network interface descriptions"); result = __FAILURE__; } else { NETWORK_INTERFACE_DESCRIPTION* current_nid = nid; while(current_nid != NULL) { if (strcmp(mac_address, current_nid->mac_address) == 0) { break; } current_nid = current_nid->next; } if (current_nid == NULL) { LogError("Did not find a network interface matching MAC ADDRESS"); result = __FAILURE__; } else if (setsockopt(socket, SOL_SOCKET, SO_BINDTODEVICE, current_nid->name, strlen(current_nid->name)) != 0) { LogError("setsockopt failed (%d)", errno); result = __FAILURE__; } else { result = 0; } destroy_network_interface_descriptions(nid); } return result; } #endif //__APPLE__ CONCRETE_IO_HANDLE socketio_create(void* io_create_parameters) { SOCKETIO_CONFIG* socket_io_config = io_create_parameters; SOCKET_IO_INSTANCE* result; if (socket_io_config == NULL) { LogError("Invalid argument: socket_io_config is NULL"); result = NULL; } else { result = malloc(sizeof(SOCKET_IO_INSTANCE)); if (result != NULL) { result->address_type = ADDRESS_TYPE_IP; result->pending_io_list = singlylinkedlist_create(); if (result->pending_io_list == NULL) { LogError("Failure: singlylinkedlist_create unable to create pending list."); free(result); result = NULL; } else { if (socket_io_config->hostname != NULL) { result->hostname = (char*)malloc(strlen(socket_io_config->hostname) + 1); if (result->hostname != NULL) { (void)strcpy(result->hostname, socket_io_config->hostname); } result->socket = INVALID_SOCKET; } else { result->hostname = NULL; result->socket = *((int*)socket_io_config->accepted_socket); } if ((result->hostname == NULL) && (result->socket == INVALID_SOCKET)) { LogError("Failure: hostname == NULL and socket is invalid."); singlylinkedlist_destroy(result->pending_io_list); free(result); result = NULL; } else { result->port = socket_io_config->port; result->target_mac_address = NULL; result->on_bytes_received = NULL; result->on_io_error = NULL; result->on_bytes_received_context = NULL; result->on_io_error_context = NULL; result->io_state = IO_STATE_CLOSED; } } } else { LogError("Allocation Failure: SOCKET_IO_INSTANCE"); } } return result; } void socketio_destroy(CONCRETE_IO_HANDLE socket_io) { if (socket_io != NULL) { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; /* we cannot do much if the close fails, so just ignore the result */ if (socket_io_instance->socket != INVALID_SOCKET) { close(socket_io_instance->socket); } /* clear allpending IOs */ LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); while (first_pending_io != NULL) { PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)singlylinkedlist_item_get_value(first_pending_io); if (pending_socket_io != NULL) { free(pending_socket_io->bytes); free(pending_socket_io); } (void)singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io); first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); } singlylinkedlist_destroy(socket_io_instance->pending_io_list); free(socket_io_instance->hostname); free(socket_io_instance->target_mac_address); free(socket_io); } } int socketio_open(CONCRETE_IO_HANDLE socket_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io == NULL) { LogError("Invalid argument: SOCKET_IO_INSTANCE is NULL"); result = __FAILURE__; } else { if (socket_io_instance->io_state != IO_STATE_CLOSED) { LogError("Failure: socket state is not closed."); result = __FAILURE__; } else if (socket_io_instance->socket != INVALID_SOCKET) { // Opening an accepted socket socket_io_instance->on_bytes_received_context = on_bytes_received_context; socket_io_instance->on_bytes_received = on_bytes_received; socket_io_instance->on_io_error = on_io_error; socket_io_instance->on_io_error_context = on_io_error_context; socket_io_instance->io_state = IO_STATE_OPEN; result = 0; } else { socket_io_instance->socket = socket (socket_io_instance->address_type == ADDRESS_TYPE_IP ? AF_INET : AF_UNIX, SOCK_STREAM, 0); if (socket_io_instance->socket < SOCKET_SUCCESS) { LogError("Failure: socket create failure %d.", socket_io_instance->socket); result = __FAILURE__; } #ifndef __APPLE__ else if (socket_io_instance->target_mac_address != NULL && set_target_network_interface(socket_io_instance->socket, socket_io_instance->target_mac_address) != 0) { LogError("Failure: failed selecting target network interface (MACADDR=%s).", socket_io_instance->target_mac_address); result = __FAILURE__; } #endif //__APPLE__ else if ((result = lookup_address_and_initiate_socket_connection(socket_io_instance)) != 0) { LogError("lookup_address_and_connect_socket failed"); } else if ((result = wait_for_connection(socket_io_instance)) != 0) { LogError("wait_for_connection failed"); } if (result == 0) { socket_io_instance->on_bytes_received = on_bytes_received; socket_io_instance->on_bytes_received_context = on_bytes_received_context; socket_io_instance->on_io_error = on_io_error; socket_io_instance->on_io_error_context = on_io_error_context; socket_io_instance->io_state = IO_STATE_OPEN; } else { if (socket_io_instance->socket >= SOCKET_SUCCESS) { close(socket_io_instance->socket); } socket_io_instance->socket = INVALID_SOCKET; } } } if (on_io_open_complete != NULL) { on_io_open_complete(on_io_open_complete_context, result == 0 ? IO_OPEN_OK : IO_OPEN_ERROR); } return result; } int socketio_close(CONCRETE_IO_HANDLE socket_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result = 0; if (socket_io == NULL) { result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if ((socket_io_instance->io_state != IO_STATE_CLOSED) && (socket_io_instance->io_state != IO_STATE_CLOSING)) { // Only close if the socket isn't already in the closed or closing state (void)shutdown(socket_io_instance->socket, SHUT_RDWR); close(socket_io_instance->socket); socket_io_instance->socket = INVALID_SOCKET; socket_io_instance->io_state = IO_STATE_CLOSED; } if (on_io_close_complete != NULL) { on_io_close_complete(callback_context); } result = 0; } return result; } int socketio_send(CONCRETE_IO_HANDLE socket_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if ((socket_io == NULL) || (buffer == NULL) || (size == 0)) { /* Invalid arguments */ LogError("Invalid argument: send given invalid parameter"); result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io_instance->io_state != IO_STATE_OPEN) { LogError("Failure: socket state is not opened."); result = __FAILURE__; } else { LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); if (first_pending_io != NULL) { if (add_pending_io(socket_io_instance, buffer, size, on_send_complete, callback_context) != 0) { LogError("Failure: add_pending_io failed."); result = __FAILURE__; } else { result = 0; } } else { signal(SIGPIPE, SIG_IGN); ssize_t send_result = send(socket_io_instance->socket, buffer, size, 0); if ((send_result < 0) || ((size_t)send_result != size)) { if (send_result == INVALID_SOCKET) { if (errno == EAGAIN) /*send says "come back later" with EAGAIN - likely the socket buffer cannot accept more data*/ { /*do nothing*/ result = 0; } else { LogError("Failure: sending socket failed. errno=%d (%s).", errno, strerror(errno)); result = __FAILURE__; } } else { /* queue data */ if (add_pending_io(socket_io_instance, buffer + send_result, size - send_result, on_send_complete, callback_context) != 0) { LogError("Failure: add_pending_io failed."); result = __FAILURE__; } else { result = 0; } } } else { if (on_send_complete != NULL) { on_send_complete(callback_context, IO_SEND_OK); } result = 0; } } } } return result; } void socketio_dowork(CONCRETE_IO_HANDLE socket_io) { if (socket_io != NULL) { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); while (first_pending_io != NULL) { PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)singlylinkedlist_item_get_value(first_pending_io); if (pending_socket_io == NULL) { indicate_error(socket_io_instance); LogError("Failure: retrieving socket from list"); break; } signal(SIGPIPE, SIG_IGN); ssize_t send_result = send(socket_io_instance->socket, pending_socket_io->bytes, pending_socket_io->size, 0); if ((send_result < 0) || ((size_t)send_result != pending_socket_io->size)) { if (send_result == INVALID_SOCKET) { if (errno == EAGAIN) /*send says "come back later" with EAGAIN - likely the socket buffer cannot accept more data*/ { /*do nothing until next dowork */ break; } else { free(pending_socket_io->bytes); free(pending_socket_io); (void)singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io); LogError("Failure: sending Socket information. errno=%d (%s).", errno, strerror(errno)); indicate_error(socket_io_instance); } } else { /* simply wait until next dowork */ (void)memmove(pending_socket_io->bytes, pending_socket_io->bytes + send_result, pending_socket_io->size - send_result); pending_socket_io->size -= send_result; break; } } else { if (pending_socket_io->on_send_complete != NULL) { pending_socket_io->on_send_complete(pending_socket_io->callback_context, IO_SEND_OK); } free(pending_socket_io->bytes); free(pending_socket_io); if (singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io) != 0) { indicate_error(socket_io_instance); LogError("Failure: unable to remove socket from list"); } } first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); } if (socket_io_instance->io_state == IO_STATE_OPEN) { ssize_t received = 0; do { received = recv(socket_io_instance->socket, socket_io_instance->recv_bytes, RECEIVE_BYTES_VALUE, 0); if (received > 0) { if (socket_io_instance->on_bytes_received != NULL) { /* Explicitly ignoring here the result of the callback */ (void)socket_io_instance->on_bytes_received(socket_io_instance->on_bytes_received_context, socket_io_instance->recv_bytes, received); } } else if (received == 0) { // Do not log error here due to this is probably the socket being closed on the other end indicate_error(socket_io_instance); } else if (received < 0 && errno != EAGAIN) { LogError("Socketio_Failure: Receiving data from endpoint: errno=%d.", errno); indicate_error(socket_io_instance); } } while (received > 0 && socket_io_instance->io_state == IO_STATE_OPEN); } } } // Edison is missing this from netinet/tcp.h, but this code still works if we manually define it. #ifndef SOL_TCP #define SOL_TCP 6 #endif #ifndef __APPLE__ static void strtoup(char* str) { if (str != NULL) { while (*str != '\0') { if (isalpha((int)*str) && islower((int)*str)) { *str = (char)toupper((int)*str); } str++; } } } #endif // __APPLE__ static int socketio_setaddresstype_option(SOCKET_IO_INSTANCE* socket_io_instance, const char* addressType) { int result; if (socket_io_instance->io_state != IO_STATE_CLOSED) { LogError("Socket's type can only be changed when in state 'IO_STATE_CLOSED'. Current state=%d", socket_io_instance->io_state); result = __FAILURE__; } else if (strcmp(addressType, OPTION_ADDRESS_TYPE_DOMAIN_SOCKET) == 0) { socket_io_instance->address_type = ADDRESS_TYPE_DOMAIN_SOCKET; result = 0; } else if (strcmp(addressType, OPTION_ADDRESS_TYPE_IP_SOCKET) == 0) { socket_io_instance->address_type = ADDRESS_TYPE_IP; result = 0; } else { LogError("Address type %s is not supported", addressType); result = __FAILURE__; } return result; } int socketio_setoption(CONCRETE_IO_HANDLE socket_io, const char* optionName, const void* value) { int result; if (socket_io == NULL || optionName == NULL || value == NULL) { result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (strcmp(optionName, "tcp_keepalive") == 0) { result = setsockopt(socket_io_instance->socket, SOL_SOCKET, SO_KEEPALIVE, value, sizeof(int)); if (result == -1) result = errno; } else if (strcmp(optionName, "tcp_keepalive_time") == 0) { #ifdef __APPLE__ result = setsockopt(socket_io_instance->socket, IPPROTO_TCP, TCP_KEEPALIVE, value, sizeof(int)); #else result = setsockopt(socket_io_instance->socket, SOL_TCP, TCP_KEEPIDLE, value, sizeof(int)); #endif if (result == -1) result = errno; } else if (strcmp(optionName, "tcp_keepalive_interval") == 0) { result = setsockopt(socket_io_instance->socket, SOL_TCP, TCP_KEEPINTVL, value, sizeof(int)); if (result == -1) result = errno; } else if (strcmp(optionName, OPTION_NET_INT_MAC_ADDRESS) == 0) { #ifdef __APPLE__ LogError("option not supported."); result = __FAILURE__; #else if (strlen(value) == 0) { LogError("option value must be a valid mac address"); result = __FAILURE__; } else if ((socket_io_instance->target_mac_address = (char*)malloc(sizeof(char) * (strlen(value) + 1))) == NULL) { LogError("failed setting net_interface_mac_address option (malloc failed)"); result = __FAILURE__; } else if (strcpy(socket_io_instance->target_mac_address, value) == NULL) { LogError("failed setting net_interface_mac_address option (strcpy failed)"); free(socket_io_instance->target_mac_address); socket_io_instance->target_mac_address = NULL; result = __FAILURE__; } else { strtoup(socket_io_instance->target_mac_address); result = 0; } #endif } else if (strcmp(optionName, OPTION_ADDRESS_TYPE) == 0) { result = socketio_setaddresstype_option(socket_io_instance, (const char*)value); } else { result = __FAILURE__; } } return result; } const IO_INTERFACE_DESCRIPTION* socketio_get_interface_description(void) { return &socket_io_interface_description; } socketio_mbed.c000066400000000000000000000351771362133436400340500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/tcpsocketconnection_c.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #define UNABLE_TO_COMPLETE -2 #define MBED_RECEIVE_BYTES_VALUE 128 typedef enum IO_STATE_TAG { IO_STATE_CLOSED, IO_STATE_OPENING, IO_STATE_OPEN, IO_STATE_CLOSING, IO_STATE_ERROR } IO_STATE; typedef struct PENDING_SOCKET_IO_TAG { unsigned char* bytes; size_t size; ON_SEND_COMPLETE on_send_complete; void* callback_context; SINGLYLINKEDLIST_HANDLE pending_io_list; } PENDING_SOCKET_IO; typedef struct SOCKET_IO_INSTANCE_TAG { TCPSOCKETCONNECTION_HANDLE tcp_socket_connection; ON_BYTES_RECEIVED on_bytes_received; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_error_context; char* hostname; int port; IO_STATE io_state; SINGLYLINKEDLIST_HANDLE pending_io_list; } SOCKET_IO_INSTANCE; /*this function will clone an option given by name and value*/ static void* socketio_CloneOption(const char* name, const void* value) { (void)name; (void)value; return NULL; } /*this function destroys an option previously created*/ static void socketio_DestroyOption(const char* name, const void* value) { (void)name; (void)value; } static OPTIONHANDLER_HANDLE socketio_retrieveoptions(CONCRETE_IO_HANDLE socket_io) { OPTIONHANDLER_HANDLE result; (void)socket_io; result = OptionHandler_Create(socketio_CloneOption, socketio_DestroyOption, socketio_setoption); if (result == NULL) { /*return as is*/ } else { /*insert here work to add the options to "result" handle*/ } return result; } static const IO_INTERFACE_DESCRIPTION socket_io_interface_description = { socketio_retrieveoptions, socketio_create, socketio_destroy, socketio_open, socketio_close, socketio_send, socketio_dowork, socketio_setoption }; static void indicate_error(SOCKET_IO_INSTANCE* socket_io_instance) { if (socket_io_instance->on_io_error != NULL) { socket_io_instance->on_io_error(socket_io_instance->on_io_error_context); } } static int add_pending_io(SOCKET_IO_INSTANCE* socket_io_instance, const unsigned char* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)malloc(sizeof(PENDING_SOCKET_IO)); if (pending_socket_io == NULL) { result = __FAILURE__; } else { pending_socket_io->bytes = (unsigned char*)malloc(size); if (pending_socket_io->bytes == NULL) { free(pending_socket_io); result = __FAILURE__; } else { pending_socket_io->size = size; pending_socket_io->on_send_complete = on_send_complete; pending_socket_io->callback_context = callback_context; pending_socket_io->pending_io_list = socket_io_instance->pending_io_list; (void)memcpy(pending_socket_io->bytes, buffer, size); if (singlylinkedlist_add(socket_io_instance->pending_io_list, pending_socket_io) == NULL) { free(pending_socket_io->bytes); free(pending_socket_io); result = __FAILURE__; } else { result = 0; } } } return result; } CONCRETE_IO_HANDLE socketio_create(void* io_create_parameters) { SOCKETIO_CONFIG* socket_io_config = io_create_parameters; SOCKET_IO_INSTANCE* result; if (socket_io_config == NULL) { result = NULL; } else { result = malloc(sizeof(SOCKET_IO_INSTANCE)); if (result != NULL) { result->pending_io_list = singlylinkedlist_create(); if (result->pending_io_list == NULL) { free(result); result = NULL; } else { result->hostname = (char*)malloc(strlen(socket_io_config->hostname) + 1); if (result->hostname == NULL) { singlylinkedlist_destroy(result->pending_io_list); free(result); result = NULL; } else { strcpy(result->hostname, socket_io_config->hostname); result->port = socket_io_config->port; result->on_bytes_received = NULL; result->on_io_error = NULL; result->on_bytes_received_context = NULL; result->on_io_error_context = NULL; result->io_state = IO_STATE_CLOSED; result->tcp_socket_connection = NULL; } } } } return result; } void socketio_destroy(CONCRETE_IO_HANDLE socket_io) { if (socket_io != NULL) { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; tcpsocketconnection_destroy(socket_io_instance->tcp_socket_connection); /* clear all pending IOs */ LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); while (first_pending_io != NULL) { PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)singlylinkedlist_item_get_value(first_pending_io); if (pending_socket_io != NULL) { free(pending_socket_io->bytes); free(pending_socket_io); } (void)singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io); first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); } singlylinkedlist_destroy(socket_io_instance->pending_io_list); free(socket_io_instance->hostname); free(socket_io); } } int socketio_open(CONCRETE_IO_HANDLE socket_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io == NULL) { result = __FAILURE__; } else { socket_io_instance->tcp_socket_connection = tcpsocketconnection_create(); if (socket_io_instance->tcp_socket_connection == NULL) { result = __FAILURE__; } else { if (tcpsocketconnection_connect(socket_io_instance->tcp_socket_connection, socket_io_instance->hostname, socket_io_instance->port) != 0) { tcpsocketconnection_destroy(socket_io_instance->tcp_socket_connection); socket_io_instance->tcp_socket_connection = NULL; result = __FAILURE__; } else { tcpsocketconnection_set_blocking(socket_io_instance->tcp_socket_connection, false, 0); socket_io_instance->on_bytes_received = on_bytes_received; socket_io_instance->on_bytes_received_context = on_bytes_received_context; socket_io_instance->on_io_error = on_io_error; socket_io_instance->on_io_error_context = on_io_error_context; socket_io_instance->io_state = IO_STATE_OPEN; result = 0; } } } if (on_io_open_complete != NULL) { on_io_open_complete(on_io_open_complete_context, result == 0 ? IO_OPEN_OK : IO_OPEN_ERROR); } return result; } int socketio_close(CONCRETE_IO_HANDLE socket_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result = 0; if (socket_io == NULL) { result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if ((socket_io_instance->io_state == IO_STATE_CLOSED) || (socket_io_instance->io_state == IO_STATE_CLOSING)) { result = __FAILURE__; } else { tcpsocketconnection_close(socket_io_instance->tcp_socket_connection); socket_io_instance->tcp_socket_connection = NULL; socket_io_instance->io_state = IO_STATE_CLOSED; if (on_io_close_complete != NULL) { on_io_close_complete(callback_context); } result = 0; } } return result; } int socketio_send(CONCRETE_IO_HANDLE socket_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if ((socket_io == NULL) || (buffer == NULL) || (size == 0)) { /* Invalid arguments */ result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io_instance->io_state != IO_STATE_OPEN) { result = __FAILURE__; } else { LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); if (first_pending_io != NULL) { if (add_pending_io(socket_io_instance, buffer, size, on_send_complete, callback_context) != 0) { result = __FAILURE__; } else { result = 0; } } else { int send_result = tcpsocketconnection_send(socket_io_instance->tcp_socket_connection, buffer, size); if (send_result != size) { if (send_result < 0) { send_result = 0; } /* queue data */ if (add_pending_io(socket_io_instance, (unsigned char*)buffer + send_result, size - send_result, on_send_complete, callback_context) != 0) { result = __FAILURE__; } else { result = 0; } } else { if (on_send_complete != NULL) { on_send_complete(callback_context, IO_SEND_OK); } result = 0; } } } } return result; } void socketio_dowork(CONCRETE_IO_HANDLE socket_io) { if (socket_io != NULL) { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io_instance->io_state == IO_STATE_OPEN) { int received = 1; LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); while (first_pending_io != NULL) { PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)singlylinkedlist_item_get_value(first_pending_io); if (pending_socket_io == NULL) { socket_io_instance->io_state = IO_STATE_ERROR; indicate_error(socket_io_instance); break; } int send_result = tcpsocketconnection_send(socket_io_instance->tcp_socket_connection, (const char*)pending_socket_io->bytes, pending_socket_io->size); if (send_result != pending_socket_io->size) { if (send_result < 0) { if (send_result < UNABLE_TO_COMPLETE) { // Bad error. Indicate as much. socket_io_instance->io_state = IO_STATE_ERROR; indicate_error(socket_io_instance); } break; } else { /* send something, wait for the rest */ (void)memmove(pending_socket_io->bytes, pending_socket_io->bytes + send_result, pending_socket_io->size - send_result); } } else { if (pending_socket_io->on_send_complete != NULL) { pending_socket_io->on_send_complete(pending_socket_io->callback_context, IO_SEND_OK); } free(pending_socket_io->bytes); free(pending_socket_io); if (singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io) != 0) { socket_io_instance->io_state = IO_STATE_ERROR; indicate_error(socket_io_instance); } } first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); } while (received > 0) { unsigned char* recv_bytes = malloc(MBED_RECEIVE_BYTES_VALUE); if (recv_bytes == NULL) { LogError("Socketio_Failure: NULL allocating input buffer."); indicate_error(socket_io_instance); } else { received = tcpsocketconnection_receive(socket_io_instance->tcp_socket_connection, (char*)recv_bytes, MBED_RECEIVE_BYTES_VALUE); if (received > 0) { if (socket_io_instance->on_bytes_received != NULL) { /* explictly ignoring here the result of the callback */ (void)socket_io_instance->on_bytes_received(socket_io_instance->on_bytes_received_context, recv_bytes, received); } } free(recv_bytes); } } } } } int socketio_setoption(CONCRETE_IO_HANDLE socket_io, const char* optionName, const void* value) { /* Not implementing any options */ return __FAILURE__; } const IO_INTERFACE_DESCRIPTION* socketio_get_interface_description(void) { return &socket_io_interface_description; } socketio_win32.c000066400000000000000000000514171362133436400340760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include #include #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/gbnetwork.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" typedef enum IO_STATE_TAG { IO_STATE_CLOSED, IO_STATE_OPENING, IO_STATE_OPEN, IO_STATE_CLOSING } IO_STATE; typedef struct PENDING_SOCKET_IO_TAG { unsigned char* bytes; size_t size; ON_SEND_COMPLETE on_send_complete; void* callback_context; SINGLYLINKEDLIST_HANDLE pending_io_list; } PENDING_SOCKET_IO; typedef struct SOCKET_IO_INSTANCE_TAG { SOCKET socket; ON_BYTES_RECEIVED on_bytes_received; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_error_context; char* hostname; int port; IO_STATE io_state; SINGLYLINKEDLIST_HANDLE pending_io_list; struct tcp_keepalive keep_alive; unsigned char recv_bytes[RECEIVE_BYTES_VALUE]; } SOCKET_IO_INSTANCE; /*this function will clone an option given by name and value*/ static void* socketio_CloneOption(const char* name, const void* value) { (void)name; (void)value; return NULL; } /*this function destroys an option previously created*/ static void socketio_DestroyOption(const char* name, const void* value) { (void)name; (void)value; } static OPTIONHANDLER_HANDLE socketio_retrieveoptions(CONCRETE_IO_HANDLE handle) { OPTIONHANDLER_HANDLE result; (void)handle; result = OptionHandler_Create(socketio_CloneOption, socketio_DestroyOption, socketio_setoption); if (result == NULL) { LogError("unable to OptionHandler_Create"); /*return as is*/ } else { /*insert here work to add the options to "result" handle*/ } return result; } static const IO_INTERFACE_DESCRIPTION socket_io_interface_description = { socketio_retrieveoptions, socketio_create, socketio_destroy, socketio_open, socketio_close, socketio_send, socketio_dowork, socketio_setoption }; static void indicate_error(SOCKET_IO_INSTANCE* socket_io_instance) { if (socket_io_instance->on_io_error != NULL) { socket_io_instance->on_io_error(socket_io_instance->on_io_error_context); } } static int add_pending_io(SOCKET_IO_INSTANCE* socket_io_instance, const unsigned char* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)malloc(sizeof(PENDING_SOCKET_IO)); if (pending_socket_io == NULL) { result = __FAILURE__; } else { pending_socket_io->bytes = (unsigned char*)malloc(size); if (pending_socket_io->bytes == NULL) { LogError("Allocation Failure: Unable to allocate pending list."); free(pending_socket_io); result = __FAILURE__; } else { pending_socket_io->size = size; pending_socket_io->on_send_complete = on_send_complete; pending_socket_io->callback_context = callback_context; pending_socket_io->pending_io_list = socket_io_instance->pending_io_list; (void)memcpy(pending_socket_io->bytes, buffer, size); if (singlylinkedlist_add(socket_io_instance->pending_io_list, pending_socket_io) == NULL) { LogError("Failure: Unable to add socket to pending list."); free(pending_socket_io->bytes); free(pending_socket_io); result = __FAILURE__; } else { result = 0; } } } return result; } CONCRETE_IO_HANDLE socketio_create(void* io_create_parameters) { SOCKETIO_CONFIG* socket_io_config = (SOCKETIO_CONFIG*)io_create_parameters; SOCKET_IO_INSTANCE* result; struct tcp_keepalive tcp_keepalive = { 0, 0, 0 }; if (socket_io_config == NULL) { LogError("Invalid argument: socket_io_config is NULL"); result = NULL; } else { result = (SOCKET_IO_INSTANCE*)malloc(sizeof(SOCKET_IO_INSTANCE)); if (result != NULL) { result->pending_io_list = singlylinkedlist_create(); if (result->pending_io_list == NULL) { LogError("Failure: singlylinkedlist_create unable to create pending list."); free(result); result = NULL; } else { if (socket_io_config->hostname != NULL) { result->hostname = (char*)malloc(strlen(socket_io_config->hostname) + 1); if (result->hostname != NULL) { (void)strcpy(result->hostname, socket_io_config->hostname); } result->socket = INVALID_SOCKET; } else { result->hostname = NULL; result->socket = *((SOCKET*)socket_io_config->accepted_socket); } if ((result->hostname == NULL) && (result->socket == INVALID_SOCKET)) { LogError("Failure: hostname == NULL and socket is invalid."); singlylinkedlist_destroy(result->pending_io_list); free(result); result = NULL; } else { result->port = socket_io_config->port; result->on_bytes_received = NULL; result->on_io_error = NULL; result->on_bytes_received_context = NULL; result->on_io_error_context = NULL; result->io_state = IO_STATE_CLOSED; result->keep_alive = tcp_keepalive; } } } else { LogError("Allocation Failure: SOCKET_IO_INSTANCE"); } } return (XIO_HANDLE)result; } void socketio_destroy(CONCRETE_IO_HANDLE socket_io) { LIST_ITEM_HANDLE first_pending_io; if (socket_io != NULL) { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; /* we cannot do much if the close fails, so just ignore the result */ (void)closesocket(socket_io_instance->socket); /* clear allpending IOs */ while ((first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list)) != NULL) { PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)singlylinkedlist_item_get_value(first_pending_io); if (pending_socket_io != NULL) { free(pending_socket_io->bytes); free(pending_socket_io); } singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io); } singlylinkedlist_destroy(socket_io_instance->pending_io_list); if (socket_io_instance->hostname != NULL) { free(socket_io_instance->hostname); } free(socket_io); } } int socketio_open(CONCRETE_IO_HANDLE socket_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io == NULL) { LogError("Invalid argument: SOCKET_IO_INSTANCE is NULL"); result = __FAILURE__; } else { if (socket_io_instance->io_state != IO_STATE_CLOSED) { LogError("Failure: socket state is not closed."); result = __FAILURE__; } else if (socket_io_instance->socket != INVALID_SOCKET) { // Opening an accepted socket socket_io_instance->on_bytes_received_context = on_bytes_received_context; socket_io_instance->on_bytes_received = on_bytes_received; socket_io_instance->on_io_error = on_io_error; socket_io_instance->on_io_error_context = on_io_error_context; socket_io_instance->io_state = IO_STATE_OPEN; result = 0; } else { socket_io_instance->socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (socket_io_instance->socket == INVALID_SOCKET) { LogError("Failure: socket create failure %d.", WSAGetLastError()); result = __FAILURE__; } else { char portString[16]; ADDRINFO addrHint = { 0 }; ADDRINFO* addrInfo = NULL; addrHint.ai_family = AF_INET; addrHint.ai_socktype = SOCK_STREAM; addrHint.ai_protocol = 0; sprintf(portString, "%u", socket_io_instance->port); if (getaddrinfo(socket_io_instance->hostname, portString, &addrHint, &addrInfo) != 0) { LogError("Failure: getaddrinfo failure %d.", WSAGetLastError()); (void)closesocket(socket_io_instance->socket); socket_io_instance->socket = INVALID_SOCKET; result = __FAILURE__; } else { u_long iMode = 1; if (connect(socket_io_instance->socket, addrInfo->ai_addr, (int)addrInfo->ai_addrlen) != 0) { LogError("Failure: connect failure %d.", WSAGetLastError()); (void)closesocket(socket_io_instance->socket); socket_io_instance->socket = INVALID_SOCKET; result = __FAILURE__; } else if (ioctlsocket(socket_io_instance->socket, FIONBIO, &iMode) != 0) { LogError("Failure: ioctlsocket failure %d.", WSAGetLastError()); (void)closesocket(socket_io_instance->socket); socket_io_instance->socket = INVALID_SOCKET; result = __FAILURE__; } else { socket_io_instance->on_bytes_received = on_bytes_received; socket_io_instance->on_bytes_received_context = on_bytes_received_context; socket_io_instance->on_io_error = on_io_error; socket_io_instance->on_io_error_context = on_io_error_context; socket_io_instance->io_state = IO_STATE_OPEN; result = 0; } freeaddrinfo(addrInfo); } } } } if (on_io_open_complete != NULL) { on_io_open_complete(on_io_open_complete_context, result == 0 ? IO_OPEN_OK : IO_OPEN_ERROR); } return result; } int socketio_close(CONCRETE_IO_HANDLE socket_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result; if (socket_io == NULL) { LogError("Invalid argument: socket_io is NULL"); result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if ((socket_io_instance->io_state != IO_STATE_CLOSING) && (socket_io_instance->io_state != IO_STATE_CLOSED)) { (void)closesocket(socket_io_instance->socket); socket_io_instance->socket = INVALID_SOCKET; socket_io_instance->io_state = IO_STATE_CLOSED; } if (on_io_close_complete != NULL) { on_io_close_complete(callback_context); } result = 0; } return result; } int socketio_send(CONCRETE_IO_HANDLE socket_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if ((socket_io == NULL) || (buffer == NULL) || (size == 0)) { /* Invalid arguments */ LogError("Invalid argument: send given invalid parameter"); result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io_instance->io_state != IO_STATE_OPEN) { LogError("Failure: socket state is not opened."); result = __FAILURE__; } else { LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); if (first_pending_io != NULL) { if (add_pending_io(socket_io_instance, (const unsigned char*)buffer, size, on_send_complete, callback_context) != 0) { LogError("Failure: add_pending_io failed."); result = __FAILURE__; } else { result = 0; } } else { /* TODO: we need to do more than a cast here to be 100% clean The following bug was filed: [WarnL4] socketio_win32 does not account for already sent bytes and there is a truncation of size from size_t to int */ int send_result = send(socket_io_instance->socket, (const char*)buffer, (int)size, 0); if (send_result != (int)size) { int last_error = WSAGetLastError(); if (last_error != WSAEWOULDBLOCK) { LogError("Failure: sending socket failed %d.", last_error); result = __FAILURE__; } else { /* queue data */ if (add_pending_io(socket_io_instance, (const unsigned char*)buffer, size, on_send_complete, callback_context) != 0) { LogError("Failure: add_pending_io failed."); result = __FAILURE__; } else { result = 0; } } } else { if (on_send_complete != NULL) { on_send_complete(callback_context, IO_SEND_OK); } result = 0; } } } } return result; } void socketio_dowork(CONCRETE_IO_HANDLE socket_io) { int send_result; if (socket_io != NULL) { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (socket_io_instance->io_state == IO_STATE_OPEN) { LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); while (first_pending_io != NULL) { PENDING_SOCKET_IO* pending_socket_io = (PENDING_SOCKET_IO*)singlylinkedlist_item_get_value(first_pending_io); if (pending_socket_io == NULL) { LogError("Failure: retrieving socket from list"); indicate_error(socket_io_instance); break; } /* TODO: we need to do more than a cast here to be 100% clean The following bug was filed: [WarnL4] socketio_win32 does not account for already sent bytes and there is a truncation of size from size_t to int */ send_result = send(socket_io_instance->socket, (const char*)pending_socket_io->bytes, (int)pending_socket_io->size, 0); if (send_result != (int)pending_socket_io->size) { int last_error = WSAGetLastError(); if (last_error != WSAEWOULDBLOCK) { free(pending_socket_io->bytes); free(pending_socket_io); (void)singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io); } else { /* try again */ } } else { if (pending_socket_io->on_send_complete != NULL) { pending_socket_io->on_send_complete(pending_socket_io->callback_context, IO_SEND_OK); } free(pending_socket_io->bytes); free(pending_socket_io); if (singlylinkedlist_remove(socket_io_instance->pending_io_list, first_pending_io) != 0) { LogError("Failure: removing socket from list"); indicate_error(socket_io_instance); } } first_pending_io = singlylinkedlist_get_head_item(socket_io_instance->pending_io_list); } if (socket_io_instance->io_state == IO_STATE_OPEN) { int received = 0; do { received = recv(socket_io_instance->socket, (char*)socket_io_instance->recv_bytes, RECEIVE_BYTES_VALUE, 0); if ((received > 0)) { if (socket_io_instance->on_bytes_received != NULL) { /* Explicitly ignoring here the result of the callback */ (void)socket_io_instance->on_bytes_received(socket_io_instance->on_bytes_received_context, socket_io_instance->recv_bytes, received); } } else if (received == 0) { indicate_error(socket_io_instance); } else { int last_error = WSAGetLastError(); if (last_error != WSAEWOULDBLOCK && last_error != ERROR_SUCCESS) { LogError("Socketio_Failure: Receiving data from endpoint: %d.", last_error); indicate_error(socket_io_instance); } } } while (received > 0 && socket_io_instance->io_state == IO_STATE_OPEN); } } } } static int set_keepalive(SOCKET_IO_INSTANCE* socket_io, struct tcp_keepalive* keepAlive) { int result; DWORD bytesReturned; int err = WSAIoctl(socket_io->socket, SIO_KEEPALIVE_VALS, keepAlive, sizeof(struct tcp_keepalive), NULL, 0, &bytesReturned, NULL, NULL); if (err != 0) { LogError("Failure: setting keep-alive on the socket: %d.\r\n", err == SOCKET_ERROR ? WSAGetLastError() : err); result = __FAILURE__; } else { socket_io->keep_alive = *keepAlive; result = 0; } return result; } int socketio_setoption(CONCRETE_IO_HANDLE socket_io, const char* optionName, const void* value) { int result; if (socket_io == NULL || optionName == NULL || value == NULL) { result = __FAILURE__; } else { SOCKET_IO_INSTANCE* socket_io_instance = (SOCKET_IO_INSTANCE*)socket_io; if (strcmp(optionName, "tcp_keepalive") == 0) { struct tcp_keepalive keepAlive = socket_io_instance->keep_alive; keepAlive.onoff = *(int *)value; result = set_keepalive(socket_io_instance, &keepAlive); } else if (strcmp(optionName, "tcp_keepalive_time") == 0) { unsigned long kaTime = *(int *)value * 1000; // convert to ms struct tcp_keepalive keepAlive = socket_io_instance->keep_alive; keepAlive.keepalivetime = kaTime; result = set_keepalive(socket_io_instance, &keepAlive); } else if (strcmp(optionName, "tcp_keepalive_interval") == 0) { unsigned long kaInterval = *(int *)value * 1000; // convert to ms struct tcp_keepalive keepAlive = socket_io_instance->keep_alive; keepAlive.keepaliveinterval = kaInterval; result = set_keepalive(socket_io_instance, &keepAlive); } else { result = __FAILURE__; } } return result; } const IO_INTERFACE_DESCRIPTION* socketio_get_interface_description(void) { return &socket_io_interface_description; } tcpsocketconnection_c.cpp000066400000000000000000000044541362133436400361540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "mbed.h" #include #include "TCPSocketConnection.h" #include "azure_c_shared_utility/tcpsocketconnection_c.h" TCPSOCKETCONNECTION_HANDLE tcpsocketconnection_create(void) { return new TCPSocketConnection(); } void tcpsocketconnection_set_blocking(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, bool blocking, unsigned int timeout) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; tsc->set_blocking(blocking, timeout); } void tcpsocketconnection_destroy(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle) { delete (TCPSocketConnection*)tcpSocketConnectionHandle; } int tcpsocketconnection_connect(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, const char* host, const int port) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; return tsc->connect(host, port); } bool tcpsocketconnection_is_connected(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; return tsc->is_connected(); } void tcpsocketconnection_close(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; tsc->close(); } int tcpsocketconnection_send(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, const char* data, int length) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; return tsc->send((char*)data, length); } int tcpsocketconnection_send_all(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, const char* data, int length) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; return tsc->send_all((char*)data, length); } int tcpsocketconnection_receive(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, char* data, int length) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; return tsc->receive(data, length); } int tcpsocketconnection_receive_all(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, char* data, int length) { TCPSocketConnection* tsc = (TCPSocketConnection*)tcpSocketConnectionHandle; return tsc->receive_all(data, length); } threadapi_esp8266.c000066400000000000000000000015361362133436400343670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/threadapi.h" #include "azure_c_shared_utility/xlogging.h" DEFINE_ENUM_STRINGS(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); THREADAPI_RESULT ThreadAPI_Create(THREAD_HANDLE* threadHandle, THREAD_START_FUNC func, void* arg) { LogError("ESP8266 RTOS does not support multi-thread function."); return THREADAPI_ERROR; } THREADAPI_RESULT ThreadAPI_Join(THREAD_HANDLE threadHandle, int* res) { LogError("ESP8266 RTOS does not support multi-thread function."); return THREADAPI_ERROR; } void ThreadAPI_Exit(int res) { vTaskDelete(NULL); } void ThreadAPI_Sleep(unsigned int milliseconds) { vTaskDelay(milliseconds); } threadapi_pthreads.c000066400000000000000000000070041362133436400350600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define _DEFAULT_SOURCE #include "azure_c_shared_utility/threadapi.h" #include #include #include #ifdef TI_RTOS #include #else #include #endif #include #include #include "azure_c_shared_utility/xlogging.h" DEFINE_ENUM_STRINGS(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); typedef struct THREAD_INSTANCE_TAG { pthread_t Pthread_handle; THREAD_START_FUNC ThreadStartFunc; void* Arg; } THREAD_INSTANCE; static void* ThreadWrapper(void* threadInstanceArg) { THREAD_INSTANCE* threadInstance = (THREAD_INSTANCE*)threadInstanceArg; int result = threadInstance->ThreadStartFunc(threadInstance->Arg); return (void*)(intptr_t)result; } THREADAPI_RESULT ThreadAPI_Create(THREAD_HANDLE* threadHandle, THREAD_START_FUNC func, void* arg) { THREADAPI_RESULT result; if ((threadHandle == NULL) || (func == NULL)) { result = THREADAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { THREAD_INSTANCE* threadInstance = malloc(sizeof(THREAD_INSTANCE)); if (threadInstance == NULL) { result = THREADAPI_NO_MEMORY; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { threadInstance->ThreadStartFunc = func; threadInstance->Arg = arg; int createResult = pthread_create(&threadInstance->Pthread_handle, NULL, ThreadWrapper, threadInstance); switch (createResult) { default: free(threadInstance); result = THREADAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); break; case 0: *threadHandle = threadInstance; result = THREADAPI_OK; break; case EAGAIN: free(threadInstance); result = THREADAPI_NO_MEMORY; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); break; } } } return result; } THREADAPI_RESULT ThreadAPI_Join(THREAD_HANDLE threadHandle, int* res) { THREADAPI_RESULT result; THREAD_INSTANCE* threadInstance = (THREAD_INSTANCE*)threadHandle; if (threadInstance == NULL) { result = THREADAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { void* threadResult; if (pthread_join(threadInstance->Pthread_handle, &threadResult) != 0) { result = THREADAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { if (res != NULL) { *res = (int)(intptr_t)threadResult; } result = THREADAPI_OK; } free(threadInstance); } return result; } void ThreadAPI_Exit(int res) { pthread_exit((void*)(intptr_t)res); } void ThreadAPI_Sleep(unsigned int milliseconds) { #ifdef TI_RTOS Task_sleep(milliseconds); #else time_t seconds = milliseconds / 1000; long nsRemainder = (milliseconds % 1000) * 1000000; struct timespec timeToSleep = { seconds, nsRemainder }; (void)nanosleep(&timeToSleep, NULL); #endif } threadapi_rtx_mbed.cpp000066400000000000000000000072241362133436400354160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/threadapi.h" #include "azure_c_shared_utility/xlogging.h" #include "rtos.h" DEFINE_ENUM_STRINGS(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); #define MAX_THREADS 4 #define STACK_SIZE 0x4000 typedef struct _thread { Thread* thrd; osThreadId id; Queue result; } mbedThread; static mbedThread threads[MAX_THREADS] = { 0 }; typedef struct _create_param { THREAD_START_FUNC func; const void* arg; mbedThread *p_thread; } create_param; static void thread_wrapper(const void* createParamArg) { const create_param* p = (const create_param*)createParamArg; p->p_thread->id = Thread::gettid(); (*(p->func))((void*)p->arg); free((void*)p); } THREADAPI_RESULT ThreadAPI_Create(THREAD_HANDLE* threadHandle, THREAD_START_FUNC func, void* arg) { THREADAPI_RESULT result; if ((threadHandle == NULL) || (func == NULL)) { result = THREADAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { size_t slot; for (slot = 0; slot < MAX_THREADS; slot++) { if (threads[slot].id == NULL) break; } if (slot < MAX_THREADS) { create_param* param = (create_param*)malloc(sizeof(create_param)); if (param != NULL) { param->func = func; param->arg = arg; param->p_thread = threads + slot; threads[slot].thrd = new Thread(thread_wrapper, param, osPriorityNormal, STACK_SIZE); *threadHandle = (THREAD_HANDLE)(threads + slot); result = THREADAPI_OK; } else { result = THREADAPI_NO_MEMORY; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } } else { result = THREADAPI_NO_MEMORY; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } } return result; } THREADAPI_RESULT ThreadAPI_Join(THREAD_HANDLE thr, int *res) { THREADAPI_RESULT result = THREADAPI_OK; mbedThread* p = (mbedThread*)thr; if (p) { osEvent evt = p->result.get(); if (evt.status == osEventMessage) { Thread* t = p->thrd; if (res) { *res = (int)evt.value.p; } (void)t->terminate(); } else { result = THREADAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } } else { result = THREADAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } return result; } void ThreadAPI_Exit(int res) { mbedThread* p; for (p = threads; p < &threads[MAX_THREADS]; p++) { if (p->id == Thread::gettid()) { p->result.put((int*)res); break; } } } void ThreadAPI_Sleep(unsigned int millisec) { // // The timer on mbed seems to wrap around 65 seconds. Hmmm. // So we will do our waits in increments of 30 seconds. // const int thirtySeconds = 30000; int numberOfThirtySecondWaits = millisec / thirtySeconds; int remainderOfThirtySeconds = millisec % thirtySeconds; int i; for (i = 1; i <= numberOfThirtySecondWaits; i++) { Thread::wait(thirtySeconds); } Thread::wait(remainderOfThirtySeconds); } threadapi_win32.c000066400000000000000000000045321362133436400342130ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "windows.h" #include "azure_c_shared_utility/threadapi.h" #include "azure_c_shared_utility/xlogging.h" DEFINE_ENUM_STRINGS(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); THREADAPI_RESULT ThreadAPI_Create(THREAD_HANDLE* threadHandle, THREAD_START_FUNC func, void* arg) { THREADAPI_RESULT result; if ((threadHandle == NULL) || (func == NULL)) { result = THREADAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { *threadHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, arg, 0, NULL); if(*threadHandle == NULL) { result = (GetLastError() == ERROR_OUTOFMEMORY) ? THREADAPI_NO_MEMORY : THREADAPI_ERROR; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { result = THREADAPI_OK; } } return result; } THREADAPI_RESULT ThreadAPI_Join(THREAD_HANDLE threadHandle, int *res) { THREADAPI_RESULT result = THREADAPI_OK; if (threadHandle == NULL) { result = THREADAPI_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(THREADAPI_RESULT, result)); } else { DWORD returnCode = WaitForSingleObject(threadHandle, INFINITE); if( returnCode != WAIT_OBJECT_0) { result = THREADAPI_ERROR; LogError("Error waiting for Single Object. Return Code: %d. Error Code: %d", returnCode, result); } else { if (res != NULL) { DWORD exit_code; if (!GetExitCodeThread(threadHandle, &exit_code)) //If thread end is signaled we need to get the Thread Exit Code; { result = THREADAPI_ERROR; LogError("Error Getting Exit Code. Error Code: %u.", (unsigned int)GetLastError()); } else { *res = (int)exit_code; } } } CloseHandle(threadHandle); } return result; } void ThreadAPI_Exit(int res) { ExitThread(res); } void ThreadAPI_Sleep(unsigned int milliseconds) { Sleep(milliseconds); } tickcounter_esp8266.c000066400000000000000000000025221362133436400347540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (C) Firmwave Ltd., All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #ifdef _CRTDBG_MAP_ALLOC #include #endif #include "azure_c_shared_utility/gballoc.h" #include #include #include "azure_c_shared_utility/tickcounter.h" #include "azure_c_shared_utility/xlogging.h" typedef struct TICK_COUNTER_INSTANCE_TAG { unsigned char dummy; } TICK_COUNTER_INSTANCE; TICK_COUNTER_HANDLE tickcounter_create(void) { TICK_COUNTER_INSTANCE* result = (TICK_COUNTER_INSTANCE*)malloc(sizeof(TICK_COUNTER_INSTANCE)); if (result == NULL) { LogError("Failed creating tick counter"); } return result; } void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter) { if (tick_counter != NULL) { free(tick_counter); } } int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t * current_ms) { int result; if (tick_counter == NULL || current_ms == NULL) { LogError("tickcounter failed: Invalid Arguments.\r\n"); result = __LINE__; } else { //Currently configTICK_RATE_HZ is set to 100 (100Hz); a tick is 10ms *current_ms = (tickcounter_ms_t)xTaskGetTickCount()*10; result = 0; } return result; } tickcounter_linux.c000066400000000000000000000037521362133436400350040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include #include "azure_c_shared_utility/tickcounter.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "linux_time.h" typedef struct TICK_COUNTER_INSTANCE_TAG { time_t init_time_value; tickcounter_ms_t current_ms; } TICK_COUNTER_INSTANCE; TICK_COUNTER_HANDLE tickcounter_create(void) { TICK_COUNTER_INSTANCE* result = (TICK_COUNTER_INSTANCE*)malloc(sizeof(TICK_COUNTER_INSTANCE)); if (result != NULL) { set_time_basis(); result->init_time_value = get_time_s(); if (result->init_time_value == INVALID_TIME_VALUE) { LogError("tickcounter failed: time return INVALID_TIME."); free(result); result = NULL; } else { result->current_ms = 0; } } return result; } void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter) { if (tick_counter != NULL) { free(tick_counter); } } int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t * current_ms) { int result; if (tick_counter == NULL || current_ms == NULL) { LogError("tickcounter failed: Invalid Arguments."); result = __FAILURE__; } else { time_t time_value = get_time_s(); if (time_value == INVALID_TIME_VALUE) { result = __FAILURE__; } else { TICK_COUNTER_INSTANCE* tick_counter_instance = (TICK_COUNTER_INSTANCE*)tick_counter; tick_counter_instance->current_ms = (tickcounter_ms_t)(difftime(time_value, tick_counter_instance->init_time_value) * 1000); *current_ms = tick_counter_instance->current_ms; result = 0; } } return result; } tickcounter_mbed.cpp000066400000000000000000000026411362133436400351100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "mbed.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/tickcounter.h" class TICK_COUNTER_INSTANCE_TAG { public: clock_t last_clock_value; tickcounter_ms_t current_ms; }; TICK_COUNTER_HANDLE tickcounter_create(void) { TICK_COUNTER_INSTANCE_TAG* result; result = new TICK_COUNTER_INSTANCE_TAG(); result->last_clock_value = clock(); result->current_ms = result->last_clock_value * 1000 / CLOCKS_PER_SEC; return result; } void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter) { if (tick_counter != NULL) { delete tick_counter; } } int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t * current_ms) { int result; if (tick_counter == NULL || current_ms == NULL) { result = __FAILURE__; } else { TICK_COUNTER_INSTANCE_TAG* tick_counter_instance = (TICK_COUNTER_INSTANCE_TAG*)tick_counter; clock_t clock_value = clock(); tick_counter_instance->current_ms += (clock_value - tick_counter_instance->last_clock_value) * 1000 / CLOCKS_PER_SEC; tick_counter_instance->last_clock_value = clock_value; *current_ms = tick_counter_instance->current_ms; result = 0; } return result; } tickcounter_tirtos.c000066400000000000000000000037621362133436400351720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include #include #include "azure_c_shared_utility/tickcounter.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #define INVALID_TIME_VALUE (time_t)(-1) typedef struct TICK_COUNTER_INSTANCE_TAG { time_t init_time_value; tickcounter_ms_t current_ms; } TICK_COUNTER_INSTANCE; TICK_COUNTER_HANDLE tickcounter_create(void) { TICK_COUNTER_INSTANCE* result = (TICK_COUNTER_INSTANCE*)malloc(sizeof(TICK_COUNTER_INSTANCE)); if (result != NULL) { result->init_time_value = time(NULL); if (result->init_time_value == INVALID_TIME_VALUE) { LogError("tickcounter failed: time return INVALID_TIME."); free(result); result = NULL; } else { result->current_ms = 0; } } return result; } void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter) { if (tick_counter != NULL) { free(tick_counter); } } int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t * current_ms) { int result; if (tick_counter == NULL || current_ms == NULL) { LogError("tickcounter failed: Invalid Arguments."); result = __FAILURE__; } else { time_t time_value = time(NULL); if (time_value == INVALID_TIME_VALUE) { result = __FAILURE__; } else { TICK_COUNTER_INSTANCE* tick_counter_instance = (TICK_COUNTER_INSTANCE*)tick_counter; tick_counter_instance->current_ms = (tickcounter_ms_t)(difftime(time_value, tick_counter_instance->init_time_value) * 1000); *current_ms = tick_counter_instance->current_ms; result = 0; } } return result; } tickcounter_win32.c000066400000000000000000000076131362133436400346070ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/gballoc.h" #include #include #include "azure_c_shared_utility/tickcounter.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #define INVALID_TIME_VALUE (time_t)(-1) typedef struct TICK_COUNTER_INSTANCE_TAG { LARGE_INTEGER perf_freqency; LARGE_INTEGER last_perf_counter; time_t backup_time_value; tickcounter_ms_t current_ms; } TICK_COUNTER_INSTANCE; TICK_COUNTER_HANDLE tickcounter_create(void) { TICK_COUNTER_INSTANCE* result = (TICK_COUNTER_INSTANCE*)malloc(sizeof(TICK_COUNTER_INSTANCE)); if (result != NULL) { if (!QueryPerformanceFrequency(&result->perf_freqency)) { result->backup_time_value = time(NULL); if (result->backup_time_value == INVALID_TIME_VALUE) { LogError("tickcounter failed: time return INVALID_TIME."); free(result); result = NULL; } else { result->current_ms = 0; } } else { if (!QueryPerformanceCounter(&result->last_perf_counter)) { LogError("tickcounter failed: QueryPerformanceCounter failed %d.", GetLastError()); free(result); result = NULL; } else { result->backup_time_value = INVALID_TIME_VALUE; result->current_ms = 0; } } } return result; } void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter) { if (tick_counter != NULL) { free(tick_counter); } } int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t* current_ms) { int result; if (tick_counter == NULL || current_ms == NULL) { LogError("tickcounter failed: Invalid Arguments."); result = __FAILURE__; } else { TICK_COUNTER_INSTANCE* tick_counter_instance = (TICK_COUNTER_INSTANCE*)tick_counter; if (tick_counter_instance->backup_time_value == INVALID_TIME_VALUE) { // If the QueryPerformanceCounter is available use this LARGE_INTEGER curr_perf_item; if (!QueryPerformanceCounter(&curr_perf_item)) { LogError("tickcounter failed: QueryPerformanceCounter failed %d.", GetLastError() ); result = __FAILURE__; } else { LARGE_INTEGER perf_in_ms; LONGLONG remainder; perf_in_ms.QuadPart = (curr_perf_item.QuadPart - tick_counter_instance->last_perf_counter.QuadPart) * 1000000; remainder = (perf_in_ms.QuadPart % tick_counter_instance->perf_freqency.QuadPart) / 1000000; perf_in_ms.QuadPart /= tick_counter_instance->perf_freqency.QuadPart; tick_counter_instance->current_ms += perf_in_ms.QuadPart; tick_counter_instance->last_perf_counter = curr_perf_item; tick_counter_instance->last_perf_counter.QuadPart -= remainder; *current_ms = tick_counter_instance->current_ms / 1000; result = 0; } } else { time_t time_value = time(NULL); if (time_value == INVALID_TIME_VALUE) { result = __FAILURE__; } else { tick_counter_instance->current_ms = (tickcounter_ms_t)(difftime(time_value, tick_counter_instance->backup_time_value) * 1000); *current_ms = tick_counter_instance->current_ms; result = 0; } } } return result; } tlsio_mbedtls.c000066400000000000000000000620301362133436400340710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // DEPRECATED: the USE_MBED_TLS #define is deprecated. #ifdef USE_MBED_TLS #include #include #include #include #include #ifdef TIZENRT #include "tls/config.h" #include "tls/debug.h" #include "tls/ssl.h" #include "tls/entropy.h" #include "tls/ctr_drbg.h" #include "tls/error.h" #include "tls/certs.h" #include "tls/entropy_poll.h" #else #include "mbedtls/config.h" #include "mbedtls/debug.h" #include "mbedtls/ssl.h" #include "mbedtls/entropy.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/error.h" #include "mbedtls/certs.h" #include "mbedtls/entropy_poll.h" #endif #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/tlsio_mbedtls.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/optionhandler.h" static const char* const OPTION_UNDERLYING_IO_OPTIONS = "underlying_io_options"; // DEPRECATED: debug functions do not belong in the tree. //#define MBED_TLS_DEBUG_ENABLE static const size_t SOCKET_READ_LIMIT = 5; typedef enum TLSIO_STATE_ENUM_TAG { TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING_UNDERLYING_IO, TLSIO_STATE_IN_HANDSHAKE, TLSIO_STATE_OPEN, TLSIO_STATE_CLOSING, TLSIO_STATE_ERROR } TLSIO_STATE_ENUM; typedef struct TLS_IO_INSTANCE_TAG { XIO_HANDLE socket_io; ON_BYTES_RECEIVED on_bytes_received; ON_IO_OPEN_COMPLETE on_io_open_complete; ON_IO_CLOSE_COMPLETE on_io_close_complete; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_open_complete_context; void* on_io_close_complete_context; void* on_io_error_context; TLSIO_STATE_ENUM tlsio_state; unsigned char* socket_io_read_bytes; size_t socket_io_read_byte_count; ON_SEND_COMPLETE on_send_complete; void* on_send_complete_callback_context; mbedtls_entropy_context entropy; mbedtls_ctr_drbg_context ctr_drbg; mbedtls_ssl_context ssl; mbedtls_ssl_config config; mbedtls_x509_crt trusted_certificates_parsed; mbedtls_ssl_session ssn; char* trusted_certificates; } TLS_IO_INSTANCE; static const IO_INTERFACE_DESCRIPTION tlsio_mbedtls_interface_description = { tlsio_mbedtls_retrieveoptions, tlsio_mbedtls_create, tlsio_mbedtls_destroy, tlsio_mbedtls_open, tlsio_mbedtls_close, tlsio_mbedtls_send, tlsio_mbedtls_dowork, tlsio_mbedtls_setoption }; // DEPRECATED: debug functions do not belong in the tree. #if defined (MBED_TLS_DEBUG_ENABLE) void mbedtls_debug(void *ctx, int level, const char *file, int line, const char *str) { (void)ctx; ((void)level); printf("%s (%d): %s\r\n", file, line, str); } #endif static void indicate_error(TLS_IO_INSTANCE* tls_io_instance) { if (tls_io_instance->on_io_error != NULL) { tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } } static void indicate_open_complete(TLS_IO_INSTANCE* tls_io_instance, IO_OPEN_RESULT open_result) { if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, open_result); } } static int decode_ssl_received_bytes(TLS_IO_INSTANCE* tls_io_instance) { int result = 0; unsigned char buffer[64]; int rcv_bytes = 1; while (rcv_bytes > 0) { rcv_bytes = mbedtls_ssl_read(&tls_io_instance->ssl, buffer, sizeof(buffer)); if (rcv_bytes > 0) { if (tls_io_instance->on_bytes_received != NULL) { tls_io_instance->on_bytes_received(tls_io_instance->on_bytes_received_context, buffer, rcv_bytes); } } } return result; } static void on_underlying_io_open_complete(void* context, IO_OPEN_RESULT open_result) { if (context == NULL) { LogError("Invalid context NULL value passed"); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; int result = 0; if (open_result != IO_OPEN_OK) { tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); } else { tls_io_instance->tlsio_state = TLSIO_STATE_IN_HANDSHAKE; do { result = mbedtls_ssl_handshake(&tls_io_instance->ssl); } while (result == MBEDTLS_ERR_SSL_WANT_READ || result == MBEDTLS_ERR_SSL_WANT_WRITE); if (result == 0) { tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_OK); } else { tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); } } } } static void on_underlying_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { if (context != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; unsigned char* new_socket_io_read_bytes = (unsigned char*)realloc(tls_io_instance->socket_io_read_bytes, tls_io_instance->socket_io_read_byte_count + size); if (new_socket_io_read_bytes == NULL) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { tls_io_instance->socket_io_read_bytes = new_socket_io_read_bytes; (void)memcpy(tls_io_instance->socket_io_read_bytes + tls_io_instance->socket_io_read_byte_count, buffer, size); tls_io_instance->socket_io_read_byte_count += size; } } else { LogError("NULL value passed in context"); } } static void on_underlying_io_error(void* context) { if (context == NULL) { LogError("Invalid context NULL value passed"); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; switch (tls_io_instance->tlsio_state) { default: case TLSIO_STATE_NOT_OPEN: case TLSIO_STATE_ERROR: break; case TLSIO_STATE_OPENING_UNDERLYING_IO: case TLSIO_STATE_IN_HANDSHAKE: // Existing socket impls are all synchronous close, and this // adapter does not yet support async close. xio_close(tls_io_instance->socket_io, NULL, NULL); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); break; case TLSIO_STATE_OPEN: tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); break; } } } static void on_underlying_io_close_complete_during_close(void* context) { if (context == NULL) { LogError("Invalid context NULL value passed"); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; if (tls_io_instance->on_io_close_complete != NULL) { tls_io_instance->on_io_close_complete(tls_io_instance->on_io_close_complete_context); } } } static int on_io_recv(void *context, unsigned char *buf, size_t sz) { int result; if (context == NULL) { LogError("Invalid context NULL value passed"); result = MBEDTLS_ERR_SSL_BAD_INPUT_DATA; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; unsigned char* new_socket_io_read_bytes; size_t socket_reads = 0; // Read until we have data or until we've hit the read limit while (tls_io_instance->socket_io_read_byte_count == 0 && socket_reads < SOCKET_READ_LIMIT) { xio_dowork(tls_io_instance->socket_io); if (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN) { break; } // Control the reads so we don't get blocked by // a bug in the lower layer socket_reads++; } size_t bytes_cnt = tls_io_instance->socket_io_read_byte_count; if (bytes_cnt > sz) { bytes_cnt = sz; } if (bytes_cnt > 0) { (void)memcpy((void *)buf, tls_io_instance->socket_io_read_bytes, bytes_cnt); (void)memmove(tls_io_instance->socket_io_read_bytes, tls_io_instance->socket_io_read_bytes + bytes_cnt, tls_io_instance->socket_io_read_byte_count - bytes_cnt); tls_io_instance->socket_io_read_byte_count -= bytes_cnt; if (tls_io_instance->socket_io_read_byte_count > 0) { new_socket_io_read_bytes = (unsigned char*)realloc(tls_io_instance->socket_io_read_bytes, tls_io_instance->socket_io_read_byte_count); if (new_socket_io_read_bytes != NULL) { tls_io_instance->socket_io_read_bytes = new_socket_io_read_bytes; } } else { free(tls_io_instance->socket_io_read_bytes); tls_io_instance->socket_io_read_bytes = NULL; } } if ((bytes_cnt == 0) && (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN)) { result = MBEDTLS_ERR_SSL_WANT_READ; } else { result = (int)bytes_cnt; } } return result; } static int on_io_send(void *context, const unsigned char *buf, size_t sz) { int result; if (context == NULL) { LogError("Invalid context NULL value passed"); result = 0; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (xio_send(tls_io_instance->socket_io, buf, sz, tls_io_instance->on_send_complete, tls_io_instance->on_send_complete_callback_context) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); result = 0; } else { result = sz; } } return result; } static int tlsio_entropy_poll(void* v, unsigned char* output, size_t len, size_t* olen) { (void)v; int result = 0; srand((unsigned int)time(NULL)); for (uint16_t i = 0; i < len; i++) { output[i] = rand() % 256; } *olen = len; return result; } static void mbedtls_init(TLS_IO_INSTANCE* instance, const char *host) { const char *pers = "azure_iot_client"; // mbedTLS initialize... mbedtls_entropy_init(&instance->entropy); mbedtls_ctr_drbg_init(&instance->ctr_drbg); mbedtls_ssl_init(&instance->ssl); mbedtls_ssl_session_init(&instance->ssn); mbedtls_ssl_config_init(&instance->config); mbedtls_x509_crt_init(&instance->trusted_certificates_parsed); mbedtls_entropy_add_source(&instance->entropy, tlsio_entropy_poll, NULL, 128, 0); mbedtls_ctr_drbg_seed(&instance->ctr_drbg, mbedtls_entropy_func, &instance->entropy, (const unsigned char *)pers, strlen(pers)); mbedtls_ssl_config_defaults(&instance->config, MBEDTLS_SSL_IS_CLIENT, MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT); mbedtls_ssl_conf_rng(&instance->config, mbedtls_ctr_drbg_random, &instance->ctr_drbg); mbedtls_ssl_conf_authmode(&instance->config, MBEDTLS_SSL_VERIFY_REQUIRED); mbedtls_ssl_conf_min_version(&instance->config, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3); // v1.2 mbedtls_ssl_set_bio(&instance->ssl, instance, on_io_send, on_io_recv, NULL); mbedtls_ssl_set_hostname(&instance->ssl, host); mbedtls_ssl_set_session(&instance->ssl, &instance->ssn); // DEPRECATED: debug functions do not belong in the tree. #if defined (MBED_TLS_DEBUG_ENABLE) mbedtls_ssl_conf_dbg(&instance->config, mbedtls_debug, stdout); mbedtls_debug_set_threshold(1); #endif mbedtls_ssl_setup(&instance->ssl, &instance->config); } CONCRETE_IO_HANDLE tlsio_mbedtls_create(void* io_create_parameters) { TLSIO_CONFIG* tls_io_config = io_create_parameters; TLS_IO_INSTANCE* result; if (tls_io_config == NULL) { LogError("NULL tls_io_config"); result = NULL; } else { result = malloc(sizeof(TLS_IO_INSTANCE)); if (result != NULL) { SOCKETIO_CONFIG socketio_config; const IO_INTERFACE_DESCRIPTION* underlying_io_interface; void* io_interface_parameters; if (tls_io_config->underlying_io_interface != NULL) { underlying_io_interface = tls_io_config->underlying_io_interface; io_interface_parameters = tls_io_config->underlying_io_parameters; } else { socketio_config.hostname = tls_io_config->hostname; socketio_config.port = tls_io_config->port; socketio_config.accepted_socket = NULL; underlying_io_interface = socketio_get_interface_description(); io_interface_parameters = &socketio_config; } if (underlying_io_interface == NULL) { free(result); result = NULL; LogError("Failed getting socket IO interface description."); } else { result->on_bytes_received = NULL; result->on_bytes_received_context = NULL; result->on_io_open_complete = NULL; result->on_io_open_complete_context = NULL; result->on_io_close_complete = NULL; result->on_io_close_complete_context = NULL; result->on_io_error = NULL; result->on_io_error_context = NULL; result->trusted_certificates = NULL; result->socket_io = xio_create(underlying_io_interface, io_interface_parameters); if (result->socket_io == NULL) { LogError("socket xio create failed"); free(result); result = NULL; } else { result->socket_io_read_bytes = NULL; result->socket_io_read_byte_count = 0; result->on_send_complete = NULL; result->on_send_complete_callback_context = NULL; // mbeTLS initialize mbedtls_init((void *)result, tls_io_config->hostname); result->tlsio_state = TLSIO_STATE_NOT_OPEN; } } } else { LogError("Failure allocating tlsio."); } } return result; } void tlsio_mbedtls_destroy(CONCRETE_IO_HANDLE tls_io) { if (tls_io != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; // mbedTLS cleanup... mbedtls_ssl_free(&tls_io_instance->ssl); mbedtls_ssl_config_free(&tls_io_instance->config); mbedtls_x509_crt_free(&tls_io_instance->trusted_certificates_parsed); mbedtls_ctr_drbg_free(&tls_io_instance->ctr_drbg); mbedtls_entropy_free(&tls_io_instance->entropy); if (tls_io_instance->socket_io_read_bytes != NULL) { free(tls_io_instance->socket_io_read_bytes); } xio_destroy(tls_io_instance->socket_io); if (tls_io_instance->trusted_certificates != NULL) { free(tls_io_instance->trusted_certificates); } free(tls_io); } } int tlsio_mbedtls_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result = 0; if (tls_io == NULL) { LogError("NULL tls_io"); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) { LogError("IO should not be open: %d\n", tls_io_instance->tlsio_state); result = __FAILURE__; } else { tls_io_instance->on_bytes_received = on_bytes_received; tls_io_instance->on_bytes_received_context = on_bytes_received_context; tls_io_instance->on_io_open_complete = on_io_open_complete; tls_io_instance->on_io_open_complete_context = on_io_open_complete_context; tls_io_instance->on_io_error = on_io_error; tls_io_instance->on_io_error_context = on_io_error_context; tls_io_instance->tlsio_state = TLSIO_STATE_OPENING_UNDERLYING_IO; if (xio_open(tls_io_instance->socket_io, on_underlying_io_open_complete, tls_io_instance, on_underlying_io_bytes_received, tls_io_instance, on_underlying_io_error, tls_io_instance) != 0) { LogError("Underlying IO open failed"); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = __FAILURE__; } else { result = 0; } } } return result; } int tlsio_mbedtls_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result = 0; if (tls_io == NULL) { result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if ((tls_io_instance->tlsio_state == TLSIO_STATE_NOT_OPEN) || (tls_io_instance->tlsio_state == TLSIO_STATE_CLOSING)) { result = __FAILURE__; } else { tls_io_instance->tlsio_state = TLSIO_STATE_CLOSING; tls_io_instance->on_io_close_complete = on_io_close_complete; tls_io_instance->on_io_close_complete_context = callback_context; mbedtls_ssl_close_notify(&tls_io_instance->ssl); if (xio_close(tls_io_instance->socket_io, on_underlying_io_close_complete_during_close, tls_io_instance) != 0) { result = __FAILURE__; } else { result = 0; } } } return result; } int tlsio_mbedtls_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if (tls_io == NULL) { result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { result = __FAILURE__; } else { tls_io_instance->on_send_complete = on_send_complete; tls_io_instance->on_send_complete_callback_context = callback_context; int res = mbedtls_ssl_write(&tls_io_instance->ssl, buffer, size); if (res != (int)size) { result = __FAILURE__; } else { result = 0; } } } return result; } void tlsio_mbedtls_dowork(CONCRETE_IO_HANDLE tls_io) { if (tls_io != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if ((tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) && (tls_io_instance->tlsio_state != TLSIO_STATE_ERROR)) { decode_ssl_received_bytes(tls_io_instance); xio_dowork(tls_io_instance->socket_io); } } } const IO_INTERFACE_DESCRIPTION* tlsio_mbedtls_get_interface_description(void) { return &tlsio_mbedtls_interface_description; } /*this function will clone an option given by name and value*/ static void* tlsio_mbedtls_CloneOption(const char* name, const void* value) { void* result; if ((name == NULL) || (value == NULL)) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); result = NULL; } else { if (strcmp(name, OPTION_UNDERLYING_IO_OPTIONS) == 0) { result = (void*)value; } else if (strcmp(name, OPTION_TRUSTED_CERT) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s TrustedCerts value"); result = NULL; } else { /*return as is*/ } } else { LogError("not handled option : %s", name); result = NULL; } } return result; } /*this function destroys an option previously created*/ static void tlsio_mbedtls_DestroyOption(const char* name, const void* value) { /*since all options for this layer are actually string copies., disposing of one is just calling free*/ if (name == NULL || value == NULL) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); } else { if (strcmp(name, OPTION_TRUSTED_CERT) == 0) { free((void*)value); } else if (strcmp(name, OPTION_UNDERLYING_IO_OPTIONS) == 0) { OptionHandler_Destroy((OPTIONHANDLER_HANDLE)value); } else { LogError("not handled option : %s", name); } } } OPTIONHANDLER_HANDLE tlsio_mbedtls_retrieveoptions(CONCRETE_IO_HANDLE handle) { OPTIONHANDLER_HANDLE result; if (handle == NULL) { LogError("invalid parameter detected: CONCRETE_IO_HANDLE handle=%p", handle); result = NULL; } else { result = OptionHandler_Create(tlsio_mbedtls_CloneOption, tlsio_mbedtls_DestroyOption, tlsio_mbedtls_setoption); if (result == NULL) { LogError("unable to OptionHandler_Create"); /*return as is*/ } else { /*this layer cares about the certificates*/ TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)handle; OPTIONHANDLER_HANDLE underlying_io_options; if ((underlying_io_options = xio_retrieveoptions(tls_io_instance->socket_io)) == NULL || OptionHandler_AddOption(result, OPTION_UNDERLYING_IO_OPTIONS, underlying_io_options) != OPTIONHANDLER_OK) { LogError("unable to save underlying_io options"); OptionHandler_Destroy(underlying_io_options); OptionHandler_Destroy(result); result = NULL; } else if (tls_io_instance->trusted_certificates != NULL && OptionHandler_AddOption(result, OPTION_TRUSTED_CERT, tls_io_instance->trusted_certificates) != OPTIONHANDLER_OK) { LogError("unable to save TrustedCerts option"); OptionHandler_Destroy(result); result = NULL; } else { /*all is fine, all interesting options have been saved*/ /*return as is*/ } } } return result; } int tlsio_mbedtls_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) { int result; if (tls_io == NULL || optionName == NULL) { result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (strcmp(OPTION_TRUSTED_CERT, optionName) == 0) { if (tls_io_instance->trusted_certificates != NULL) { // Free the memory if it has been previously allocated free(tls_io_instance->trusted_certificates); tls_io_instance->trusted_certificates = NULL; } if (mallocAndStrcpy_s(&tls_io_instance->trusted_certificates, (const char*)value) != 0) { LogError("unable to mallocAndStrcpy_s"); result = __FAILURE__; } else { int parse_result = mbedtls_x509_crt_parse(&tls_io_instance->trusted_certificates_parsed, (const unsigned char *)value, (int)(strlen(value) + 1)); if (parse_result != 0) { LogInfo("Malformed pem certificate"); result = __FAILURE__; } else { mbedtls_ssl_conf_ca_chain(&tls_io_instance->config, &tls_io_instance->trusted_certificates_parsed, NULL); result = 0; } } } else { // tls_io_instance->socket_io is never NULL result = xio_setoption(tls_io_instance->socket_io, optionName, value); } } return result; } // DEPRECATED: the USE_MBED_TLS #define is deprecated. #endif // USE_MBED_TLS tlsio_openssl.c000066400000000000000000001512321362133436400341250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "openssl/ssl.h" #include "openssl/err.h" #include "openssl/crypto.h" #include "openssl/opensslv.h" #include #include #include #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/tlsio_openssl.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/x509_openssl.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/const_defines.h" typedef enum TLSIO_STATE_TAG { TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING_UNDERLYING_IO, TLSIO_STATE_IN_HANDSHAKE, // TLSIO_STATE_HANDSHAKE_FAILED is an ephemeral state signalling successful socket // operation but with rejected handshake. The tlsio will never be in this state // at the start of any of the API calls. TLSIO_STATE_HANDSHAKE_FAILED, TLSIO_STATE_OPEN, TLSIO_STATE_CLOSING, TLSIO_STATE_ERROR } TLSIO_STATE; typedef enum TLSIO_VERSION_TAG { VERSION_1_0, VERSION_1_1, VERSION_1_2, } TLSIO_VERSION; static bool is_an_opening_state(TLSIO_STATE state) { // TLSIO_STATE_HANDSHAKE_FAILED is deliberately not one of these states. return state == TLSIO_STATE_OPENING_UNDERLYING_IO || state == TLSIO_STATE_IN_HANDSHAKE; } typedef int(*TLS_CERTIFICATE_VALIDATION_CALLBACK)(X509_STORE_CTX*, void*); typedef struct TLS_IO_INSTANCE_TAG { XIO_HANDLE underlying_io; ON_BYTES_RECEIVED on_bytes_received; ON_IO_OPEN_COMPLETE on_io_open_complete; ON_IO_CLOSE_COMPLETE on_io_close_complete; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_open_complete_context; void* on_io_close_complete_context; void* on_io_error_context; SSL* ssl; SSL_CTX* ssl_context; BIO* in_bio; BIO* out_bio; TLSIO_STATE tlsio_state; char* certificate; char* cipher_list; const char* x509_certificate; const char* x509_private_key; TLSIO_VERSION tls_version; TLS_CERTIFICATE_VALIDATION_CALLBACK tls_validation_callback; void* tls_validation_callback_data; } TLS_IO_INSTANCE; struct CRYPTO_dynlock_value { LOCK_HANDLE lock; }; static const char* const OPTION_UNDERLYING_IO_OPTIONS = "underlying_io_options"; #define SSL_DO_HANDSHAKE_SUCCESS 1 /*this function will clone an option given by name and value*/ static void* tlsio_openssl_CloneOption(const char* name, const void* value) { void* result; if ( (name == NULL) || (value == NULL) ) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); result = NULL; } else { if (strcmp(name, OPTION_UNDERLYING_IO_OPTIONS) == 0) { result = (void*)value; } else if (strcmp(name, OPTION_TRUSTED_CERT) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s TrustedCerts value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, OPTION_OPENSSL_CIPHER_SUITE) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s CipherSuite value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, SU_OPTION_X509_CERT) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s x509certificate value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, SU_OPTION_X509_PRIVATE_KEY) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s x509privatekey value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, OPTION_X509_ECC_CERT) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s x509EccCertificate value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, OPTION_X509_ECC_KEY) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s x509EccKey value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, OPTION_TLS_VERSION) == 0) { int int_value; if (*(TLSIO_VERSION*)value == VERSION_1_0) { int_value = 10; } else if (*(TLSIO_VERSION*)value == VERSION_1_1) { int_value = 11; } else if (*(TLSIO_VERSION*)value == VERSION_1_2) { int_value = 12; } else { LogError("Unexpected TLS version value (%d)", *(int*)value); int_value = -1; } if (int_value < 0) { result = NULL; } else { int* value_clone; if ((value_clone = (int*)malloc(sizeof(int))) == NULL) { LogError("Failed clonning tls_version option"); } else { *value_clone = int_value; } result = value_clone; } } else if ( (strcmp(name, "tls_validation_callback") == 0) || (strcmp(name, "tls_validation_callback_data") == 0) ) { result = (void*)value; } else { LogError("not handled option : %s", name); result = NULL; } } return result; } /*this function destroys an option previously created*/ static void tlsio_openssl_DestroyOption(const char* name, const void* value) { /*since all options for this layer are actually string copies., disposing of one is just calling free*/ if ( (name == NULL) || (value == NULL) ) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); } else { if ( (strcmp(name, OPTION_TRUSTED_CERT) == 0) || (strcmp(name, OPTION_OPENSSL_CIPHER_SUITE) == 0) || (strcmp(name, SU_OPTION_X509_CERT) == 0) || (strcmp(name, SU_OPTION_X509_PRIVATE_KEY) == 0) || (strcmp(name, OPTION_X509_ECC_CERT) == 0) || (strcmp(name, OPTION_X509_ECC_KEY) == 0) || (strcmp(name, OPTION_TLS_VERSION) == 0) ) { free((void*)value); } else if ( (strcmp(name, "tls_validation_callback") == 0) || (strcmp(name, "tls_validation_callback_data") == 0) ) { // nothing to free. } else if (strcmp(name, OPTION_UNDERLYING_IO_OPTIONS) == 0) { OptionHandler_Destroy((OPTIONHANDLER_HANDLE)value); } else { LogError("not handled option : %s", name); } } } static OPTIONHANDLER_HANDLE tlsio_openssl_retrieveoptions(CONCRETE_IO_HANDLE handle) { OPTIONHANDLER_HANDLE result; if (handle == NULL) { LogError("invalid parameter detected: CONCRETE_IO_HANDLE handle=%p", handle); result = NULL; } else { result = OptionHandler_Create(tlsio_openssl_CloneOption, tlsio_openssl_DestroyOption, tlsio_openssl_setoption); if (result == NULL) { LogError("unable to OptionHandler_Create"); /*return as is*/ } else { /*this layer cares about the certificates and the x509 credentials*/ TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)handle; OPTIONHANDLER_HANDLE underlying_io_options; if ((underlying_io_options = xio_retrieveoptions(tls_io_instance->underlying_io)) == NULL || OptionHandler_AddOption(result, OPTION_UNDERLYING_IO_OPTIONS, underlying_io_options) != OPTIONHANDLER_OK) { LogError("unable to save underlying_io options"); OptionHandler_Destroy(underlying_io_options); OptionHandler_Destroy(result); result = NULL; } else if ( (tls_io_instance->certificate != NULL) && (OptionHandler_AddOption(result, OPTION_TRUSTED_CERT, tls_io_instance->certificate) != OPTIONHANDLER_OK) ) { LogError("unable to save TrustedCerts option"); OptionHandler_Destroy(result); result = NULL; } else if ( (tls_io_instance->cipher_list != NULL) && (OptionHandler_AddOption(result, OPTION_OPENSSL_CIPHER_SUITE, tls_io_instance->cipher_list) != OPTIONHANDLER_OK) ) { LogError("unable to save CipherSuite option"); OptionHandler_Destroy(result); result = NULL; } else if (tls_io_instance->x509_certificate != NULL && (OptionHandler_AddOption(result, SU_OPTION_X509_CERT, tls_io_instance->x509_certificate) != OPTIONHANDLER_OK) ) { LogError("unable to save x509 certificate option"); OptionHandler_Destroy(result); result = NULL; } else if (tls_io_instance->x509_private_key != NULL && (OptionHandler_AddOption(result, SU_OPTION_X509_PRIVATE_KEY, tls_io_instance->x509_private_key) != OPTIONHANDLER_OK) ) { LogError("unable to save x509 privatekey option"); OptionHandler_Destroy(result); result = NULL; } else if (tls_io_instance->tls_version != 0) { if (OptionHandler_AddOption(result, OPTION_TLS_VERSION, &tls_io_instance->tls_version) != OPTIONHANDLER_OK) { LogError("unable to save tls_version option"); OptionHandler_Destroy(result); result = NULL; } } else if (tls_io_instance->tls_validation_callback != NULL) { #ifdef WIN32 #pragma warning(push) #pragma warning(disable:4152) #endif void* ptr = tls_io_instance->tls_validation_callback; #ifdef WIN32 #pragma warning(pop) #endif if (OptionHandler_AddOption(result, "tls_validation_callback", (const char*)ptr) != OPTIONHANDLER_OK) { LogError("unable to save tls_validation_callback option"); OptionHandler_Destroy(result); result = NULL; } if (OptionHandler_AddOption(result, "tls_validation_callback_data", (const char*)tls_io_instance->tls_validation_callback_data) != OPTIONHANDLER_OK) { LogError("unable to save tls_validation_callback_data option"); OptionHandler_Destroy(result); result = NULL; } } else { /*all is fine, all interesting options have been saved*/ /*return as is*/ } } } return result; } static const IO_INTERFACE_DESCRIPTION tlsio_openssl_interface_description = { tlsio_openssl_retrieveoptions, tlsio_openssl_create, tlsio_openssl_destroy, tlsio_openssl_open, tlsio_openssl_close, tlsio_openssl_send, tlsio_openssl_dowork, tlsio_openssl_setoption }; static LOCK_HANDLE * openssl_locks = NULL; static void openssl_lock_unlock_helper(LOCK_HANDLE lock, int lock_mode, const char* file, int line) { #ifdef NO_LOGGING // Avoid unused variable warning when logging not compiled in (void)file; (void)line; #endif if (lock_mode & CRYPTO_LOCK) { if (Lock(lock) != 0) { LogError("Failed to lock openssl lock (%s:%d)", file, line); } } else { if (Unlock(lock) != 0) { LogError("Failed to unlock openssl lock (%s:%d)", file, line); } } } static void log_ERR_get_error(const char* message) { char buf[128]; AZURE_UNREFERENCED_PARAMETER(buf); unsigned long error; int i; if (message != NULL) { LogError("%s", message); } error = ERR_get_error(); for (i = 0; 0 != error; i++) { LogError(" [%d] %s", i, ERR_error_string(error, buf)); error = ERR_get_error(); } } static STATIC_VAR_UNUSED struct CRYPTO_dynlock_value* openssl_dynamic_locks_create_cb(const char* file, int line) { #ifdef NO_LOGGING // Avoid unused variable warning when logging not compiled in (void)file; (void)line; #endif struct CRYPTO_dynlock_value* result; result = malloc(sizeof(struct CRYPTO_dynlock_value)); if (result == NULL) { LogError("Failed to allocate lock! Out of memory (%s:%d).", file, line); } else { result->lock = Lock_Init(); if (result->lock == NULL) { LogError("Failed to create lock for dynamic lock (%s:%d).", file, line); free(result); result = NULL; } } return result; } static STATIC_VAR_UNUSED void openssl_dynamic_locks_lock_unlock_cb(int lock_mode, struct CRYPTO_dynlock_value* dynlock_value, const char* file, int line) { openssl_lock_unlock_helper(dynlock_value->lock, lock_mode, file, line); } static STATIC_VAR_UNUSED void openssl_dynamic_locks_destroy_cb(struct CRYPTO_dynlock_value* dynlock_value, const char* file, int line) { (void)file; (void)line; Lock_Deinit(dynlock_value->lock); free(dynlock_value); } static void openssl_dynamic_locks_uninstall(void) { #if (OPENSSL_VERSION_NUMBER >= 0x00906000) CRYPTO_set_dynlock_create_callback(NULL); CRYPTO_set_dynlock_lock_callback(NULL); CRYPTO_set_dynlock_destroy_callback(NULL); #endif } static void openssl_dynamic_locks_install(void) { #if (OPENSSL_VERSION_NUMBER >= 0x00906000) CRYPTO_set_dynlock_destroy_callback(openssl_dynamic_locks_destroy_cb); CRYPTO_set_dynlock_lock_callback(openssl_dynamic_locks_lock_unlock_cb); CRYPTO_set_dynlock_create_callback(openssl_dynamic_locks_create_cb); #endif } static void STATIC_VAR_UNUSED openssl_static_locks_lock_unlock_cb(int lock_mode, int lock_index, const char * file, int line) { if (lock_index < 0 || lock_index >= CRYPTO_num_locks()) { LogError("Bad lock index %d passed (%s:%d)", lock_index, file, line); } else { openssl_lock_unlock_helper(openssl_locks[lock_index], lock_mode, file, line); } } static void openssl_static_locks_uninstall(void) { if (openssl_locks != NULL) { int i; CRYPTO_set_locking_callback(NULL); for (i = 0; i < CRYPTO_num_locks(); i++) { if (openssl_locks[i] != NULL) { Lock_Deinit(openssl_locks[i]); } } free(openssl_locks); openssl_locks = NULL; } else { LogError("Locks already uninstalled"); } } static int openssl_static_locks_install(void) { int result; if (openssl_locks != NULL) { LogError("Locks already initialized"); result = __FAILURE__; } else { openssl_locks = malloc(CRYPTO_num_locks() * sizeof(LOCK_HANDLE)); if (openssl_locks == NULL) { LogError("Failed to allocate locks"); result = __FAILURE__; } else { int i; for (i = 0; i < CRYPTO_num_locks(); i++) { openssl_locks[i] = Lock_Init(); if (openssl_locks[i] == NULL) { LogError("Failed to allocate lock %d", i); break; } } if (i != CRYPTO_num_locks()) { int j; for (j = 0; j < i; j++) { Lock_Deinit(openssl_locks[j]); } result = __FAILURE__; } else { CRYPTO_set_locking_callback(openssl_static_locks_lock_unlock_cb); result = 0; } } } return result; } static void indicate_error(TLS_IO_INSTANCE* tls_io_instance) { if (tls_io_instance->on_io_error == NULL) { LogError("NULL on_io_error."); } else { tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } } static void indicate_open_complete(TLS_IO_INSTANCE* tls_io_instance, IO_OPEN_RESULT open_result) { if (tls_io_instance->on_io_open_complete == NULL) { LogError("NULL on_io_open_complete."); } else { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, open_result); } } static int write_outgoing_bytes(TLS_IO_INSTANCE* tls_io_instance, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; size_t pending = BIO_ctrl_pending(tls_io_instance->out_bio); if (pending == 0) { result = 0; } else { unsigned char* bytes_to_send = malloc(pending); if (bytes_to_send == NULL) { LogError("NULL bytes_to_send."); result = __FAILURE__; } else { if (BIO_read(tls_io_instance->out_bio, bytes_to_send, (int)pending) != (int)pending) { log_ERR_get_error("BIO_read not in pending state."); result = __FAILURE__; } else { if (xio_send(tls_io_instance->underlying_io, bytes_to_send, pending, on_send_complete, callback_context) != 0) { LogError("Error in xio_send."); result = __FAILURE__; } else { result = 0; } } free(bytes_to_send); } } return result; } // Non-NULL tls_io_instance is guaranteed by callers. // We are in TLSIO_STATE_IN_HANDSHAKE when entering this method. static void send_handshake_bytes(TLS_IO_INSTANCE* tls_io_instance) { int hsret; // ERR_clear_error must be called before any call that might set an // SSL_get_error result ERR_clear_error(); hsret = SSL_do_handshake(tls_io_instance->ssl); if (hsret != SSL_DO_HANDSHAKE_SUCCESS) { int ssl_err = SSL_get_error(tls_io_instance->ssl, hsret); if (ssl_err != SSL_ERROR_WANT_READ && ssl_err != SSL_ERROR_WANT_WRITE) { if (ssl_err == SSL_ERROR_SSL) { LogError("%s", ERR_error_string(ERR_get_error(), NULL)); } else { LogError("SSL handshake failed: %d", ssl_err); } tls_io_instance->tlsio_state = TLSIO_STATE_HANDSHAKE_FAILED; } else { if (write_outgoing_bytes(tls_io_instance, NULL, NULL) != 0) { LogError("Error in write_outgoing_bytes."); tls_io_instance->tlsio_state = TLSIO_STATE_HANDSHAKE_FAILED; } } } else { tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_OK); } } static void close_openssl_instance(TLS_IO_INSTANCE* tls_io_instance) { if (tls_io_instance->ssl != NULL) { SSL_free(tls_io_instance->ssl); tls_io_instance->ssl = NULL; } if (tls_io_instance->ssl_context != NULL) { SSL_CTX_free(tls_io_instance->ssl_context); tls_io_instance->ssl_context = NULL; } } static void on_underlying_io_close_complete(void* context) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; switch (tls_io_instance->tlsio_state) { default: case TLSIO_STATE_NOT_OPEN: case TLSIO_STATE_OPEN: case TLSIO_STATE_IN_HANDSHAKE: case TLSIO_STATE_HANDSHAKE_FAILED: case TLSIO_STATE_ERROR: break; case TLSIO_STATE_OPENING_UNDERLYING_IO: tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); break; case TLSIO_STATE_CLOSING: tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; if (tls_io_instance->on_io_close_complete != NULL) { tls_io_instance->on_io_close_complete(tls_io_instance->on_io_close_complete_context); } break; } close_openssl_instance(tls_io_instance); } static void on_underlying_io_open_complete(void* context, IO_OPEN_RESULT open_result) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (tls_io_instance->tlsio_state == TLSIO_STATE_OPENING_UNDERLYING_IO) { if (open_result == IO_OPEN_OK) { tls_io_instance->tlsio_state = TLSIO_STATE_IN_HANDSHAKE; // Begin the handshake process here. It continues in on_underlying_io_bytes_received send_handshake_bytes(tls_io_instance); } else { tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); LogError("Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO."); } } } static void on_underlying_io_error(void* context) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; switch (tls_io_instance->tlsio_state) { default: break; case TLSIO_STATE_OPENING_UNDERLYING_IO: case TLSIO_STATE_IN_HANDSHAKE: tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); break; case TLSIO_STATE_OPEN: indicate_error(tls_io_instance); break; } } static int decode_ssl_received_bytes(TLS_IO_INSTANCE* tls_io_instance) { int result = 0; unsigned char buffer[64]; int rcv_bytes = 1; while (rcv_bytes > 0) { if (tls_io_instance->ssl == NULL) { LogError("SSL channel closed in decode_ssl_received_bytes."); result = __FAILURE__; return result; } rcv_bytes = SSL_read(tls_io_instance->ssl, buffer, sizeof(buffer)); if (rcv_bytes > 0) { if (tls_io_instance->on_bytes_received == NULL) { LogError("NULL on_bytes_received."); } else { tls_io_instance->on_bytes_received(tls_io_instance->on_bytes_received_context, buffer, rcv_bytes); } } } return result; } static void on_underlying_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; int written = BIO_write(tls_io_instance->in_bio, buffer, (int)size); if (written != (int)size) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); log_ERR_get_error("Error in BIO_write."); } else { switch (tls_io_instance->tlsio_state) { default: break; case TLSIO_STATE_IN_HANDSHAKE: send_handshake_bytes(tls_io_instance); break; case TLSIO_STATE_OPEN: if (decode_ssl_received_bytes(tls_io_instance) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); LogError("Error in decode_ssl_received_bytes."); } break; } } } static int add_certificate_to_store(TLS_IO_INSTANCE* tls_io_instance, const char* certValue) { int result = 0; if (certValue != NULL) { X509_STORE* cert_store = SSL_CTX_get_cert_store(tls_io_instance->ssl_context); if (cert_store == NULL) { log_ERR_get_error("failure in SSL_CTX_get_cert_store."); result = __FAILURE__; } else { #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) const BIO_METHOD* bio_method; #else BIO_METHOD* bio_method; #endif bio_method = BIO_s_mem(); if (bio_method == NULL) { log_ERR_get_error("failure in BIO_s_mem"); result = __FAILURE__; } else { BIO* cert_memory_bio = BIO_new(bio_method); if (cert_memory_bio == NULL) { log_ERR_get_error("failure in BIO_new"); result = __FAILURE__; } else { int puts_result = BIO_puts(cert_memory_bio, certValue); if (puts_result < 0) { log_ERR_get_error("failure in BIO_puts"); result = __FAILURE__; } else { if ((size_t)puts_result != strlen(certValue)) { log_ERR_get_error("mismatching legths"); result = __FAILURE__; } else { X509* certificate; while ((certificate = PEM_read_bio_X509(cert_memory_bio, NULL, NULL, NULL)) != NULL) { if (!X509_STORE_add_cert(cert_store, certificate)) { X509_free(certificate); log_ERR_get_error("failure in X509_STORE_add_cert"); break; } X509_free(certificate); } if (certificate == NULL) { result = 0;/*all is fine*/ } else { /*previous while loop terminated unfortunately*/ result = __FAILURE__; } } } BIO_free(cert_memory_bio); } } } } return result; } static int create_openssl_instance(TLS_IO_INSTANCE* tlsInstance) { int result; const SSL_METHOD* method = NULL; #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (OPENSSL_VERSION_NUMBER >= 0x20000000L) if (tlsInstance->tls_version == VERSION_1_2) { method = TLSv1_2_method(); } else if (tlsInstance->tls_version == VERSION_1_1) { method = TLSv1_1_method(); } else { method = TLSv1_method(); } #else { method = TLS_method(); } #endif tlsInstance->ssl_context = SSL_CTX_new(method); if (tlsInstance->ssl_context == NULL) { log_ERR_get_error("Failed allocating OpenSSL context."); result = __FAILURE__; } else if ((tlsInstance->cipher_list != NULL) && (SSL_CTX_set_cipher_list(tlsInstance->ssl_context, tlsInstance->cipher_list)) != 1) { SSL_CTX_free(tlsInstance->ssl_context); tlsInstance->ssl_context = NULL; log_ERR_get_error("unable to set cipher list."); result = __FAILURE__; } else if (add_certificate_to_store(tlsInstance, tlsInstance->certificate) != 0) { SSL_CTX_free(tlsInstance->ssl_context); tlsInstance->ssl_context = NULL; log_ERR_get_error("unable to add_certificate_to_store."); result = __FAILURE__; } /*x509 authentication can only be build before underlying connection is realized*/ else if ( (tlsInstance->x509_certificate != NULL) && (tlsInstance->x509_private_key != NULL) && (x509_openssl_add_credentials(tlsInstance->ssl_context, tlsInstance->x509_certificate, tlsInstance->x509_private_key) != 0) ) { SSL_CTX_free(tlsInstance->ssl_context); tlsInstance->ssl_context = NULL; log_ERR_get_error("unable to use x509 authentication"); result = __FAILURE__; } else { SSL_CTX_set_cert_verify_callback(tlsInstance->ssl_context, tlsInstance->tls_validation_callback, tlsInstance->tls_validation_callback_data); tlsInstance->in_bio = BIO_new(BIO_s_mem()); if (tlsInstance->in_bio == NULL) { SSL_CTX_free(tlsInstance->ssl_context); tlsInstance->ssl_context = NULL; log_ERR_get_error("Failed BIO_new for in BIO."); result = __FAILURE__; } else { tlsInstance->out_bio = BIO_new(BIO_s_mem()); if (tlsInstance->out_bio == NULL) { (void)BIO_free(tlsInstance->in_bio); SSL_CTX_free(tlsInstance->ssl_context); tlsInstance->ssl_context = NULL; log_ERR_get_error("Failed BIO_new for out BIO."); result = __FAILURE__; } else { if ((BIO_set_mem_eof_return(tlsInstance->in_bio, -1) <= 0) || (BIO_set_mem_eof_return(tlsInstance->out_bio, -1) <= 0)) { (void)BIO_free(tlsInstance->in_bio); (void)BIO_free(tlsInstance->out_bio); SSL_CTX_free(tlsInstance->ssl_context); tlsInstance->ssl_context = NULL; LogError("Failed BIO_set_mem_eof_return."); result = __FAILURE__; } else { SSL_CTX_set_verify(tlsInstance->ssl_context, SSL_VERIFY_PEER, NULL); // Specifies that the default locations for which CA certificates are loaded should be used. if (SSL_CTX_set_default_verify_paths(tlsInstance->ssl_context) != 1) { // This is only a warning to the user. They can still specify the certificate via SetOption. LogInfo("WARNING: Unable to specify the default location for CA certificates on this platform."); } tlsInstance->ssl = SSL_new(tlsInstance->ssl_context); if (tlsInstance->ssl == NULL) { (void)BIO_free(tlsInstance->in_bio); (void)BIO_free(tlsInstance->out_bio); SSL_CTX_free(tlsInstance->ssl_context); tlsInstance->ssl_context = NULL; log_ERR_get_error("Failed creating OpenSSL instance."); result = __FAILURE__; } else { SSL_set_bio(tlsInstance->ssl, tlsInstance->in_bio, tlsInstance->out_bio); SSL_set_connect_state(tlsInstance->ssl); result = 0; } } } } } return result; } int tlsio_openssl_init(void) { (void)SSL_library_init(); SSL_load_error_strings(); ERR_load_BIO_strings(); OpenSSL_add_all_algorithms(); if (openssl_static_locks_install() != 0) { LogError("Failed to install static locks in OpenSSL!"); return __FAILURE__; } openssl_dynamic_locks_install(); return 0; } void tlsio_openssl_deinit(void) { openssl_dynamic_locks_uninstall(); openssl_static_locks_uninstall(); #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) && (FIPS_mode_set) FIPS_mode_set(0); #endif CRYPTO_set_locking_callback(NULL); CRYPTO_set_id_callback(NULL); ERR_free_strings(); EVP_cleanup(); #if (OPENSSL_VERSION_NUMBER < 0x10000000L) ERR_remove_state(0); #elif (OPENSSL_VERSION_NUMBER < 0x10100000L) || (OPENSSL_VERSION_NUMBER >= 0x20000000L) ERR_remove_thread_state(NULL); #endif #if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && (OPENSSL_VERSION_NUMBER < 0x10010000L) && (SSL_COMP_free_compression_methods) SSL_COMP_free_compression_methods(); #endif CRYPTO_cleanup_all_ex_data(); } CONCRETE_IO_HANDLE tlsio_openssl_create(void* io_create_parameters) { TLSIO_CONFIG* tls_io_config = io_create_parameters; TLS_IO_INSTANCE* result; if (tls_io_config == NULL) { result = NULL; LogError("NULL tls_io_config."); } else { result = malloc(sizeof(TLS_IO_INSTANCE)); if (result == NULL) { LogError("Failed allocating TLSIO instance."); } else { SOCKETIO_CONFIG socketio_config; const IO_INTERFACE_DESCRIPTION* underlying_io_interface; void* io_interface_parameters; if (tls_io_config->underlying_io_interface != NULL) { underlying_io_interface = tls_io_config->underlying_io_interface; io_interface_parameters = tls_io_config->underlying_io_parameters; } else { socketio_config.hostname = tls_io_config->hostname; socketio_config.port = tls_io_config->port; socketio_config.accepted_socket = NULL; underlying_io_interface = socketio_get_interface_description(); io_interface_parameters = &socketio_config; } if (underlying_io_interface == NULL) { free(result); result = NULL; LogError("Failed getting socket IO interface description."); } else { result->certificate = NULL; result->cipher_list = NULL; result->in_bio = NULL; result->out_bio = NULL; result->on_bytes_received = NULL; result->on_bytes_received_context = NULL; result->on_io_open_complete = NULL; result->on_io_open_complete_context = NULL; result->on_io_close_complete = NULL; result->on_io_close_complete_context = NULL; result->on_io_error = NULL; result->on_io_error_context = NULL; result->ssl = NULL; result->ssl_context = NULL; result->tls_validation_callback = NULL; result->tls_validation_callback_data = NULL; result->x509_certificate = NULL; result->x509_private_key = NULL; result->tls_version = VERSION_1_2; result->underlying_io = xio_create(underlying_io_interface, io_interface_parameters); if (result->underlying_io == NULL) { free(result); result = NULL; LogError("Failed xio_create."); } else { result->tlsio_state = TLSIO_STATE_NOT_OPEN; } } } } return result; } void tlsio_openssl_destroy(CONCRETE_IO_HANDLE tls_io) { if (tls_io == NULL) { LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->certificate != NULL) { free(tls_io_instance->certificate); tls_io_instance->certificate = NULL; } if (tls_io_instance->cipher_list != NULL) { free(tls_io_instance->cipher_list); tls_io_instance->cipher_list = NULL; } free((void*)tls_io_instance->x509_certificate); free((void*)tls_io_instance->x509_private_key); close_openssl_instance(tls_io_instance); if (tls_io_instance->underlying_io != NULL) { xio_destroy(tls_io_instance->underlying_io); tls_io_instance->underlying_io = NULL; } free(tls_io); } } int tlsio_openssl_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; if (tls_io == NULL) { result = __FAILURE__; LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) { LogError("Invalid tlsio_state. Expected state is TLSIO_STATE_NOT_OPEN."); result = __FAILURE__; } else { tls_io_instance->on_io_open_complete = on_io_open_complete; tls_io_instance->on_io_open_complete_context = on_io_open_complete_context; tls_io_instance->on_bytes_received = on_bytes_received; tls_io_instance->on_bytes_received_context = on_bytes_received_context; tls_io_instance->on_io_error = on_io_error; tls_io_instance->on_io_error_context = on_io_error_context; tls_io_instance->tlsio_state = TLSIO_STATE_OPENING_UNDERLYING_IO; if (create_openssl_instance(tls_io_instance) != 0) { LogError("Failed creating the OpenSSL instance."); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = __FAILURE__; } else if (xio_open(tls_io_instance->underlying_io, on_underlying_io_open_complete, tls_io_instance, on_underlying_io_bytes_received, tls_io_instance, on_underlying_io_error, tls_io_instance) != 0) { LogError("Failed opening the underlying I/O."); close_openssl_instance(tls_io_instance); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = __FAILURE__; } else { result = 0; } } } return result; } /* Codes_SRS_TLSIO_30_009: [ The phrase "enter TLSIO_STATE_EXT_CLOSING" means the adapter shall iterate through any unsent messages in the queue and shall delete each message after calling its on_send_complete with the associated callback_context and IO_SEND_CANCELLED. ]*/ /* Codes_SRS_TLSIO_30_006: [ The phrase "enter TLSIO_STATE_EXT_CLOSED" means the adapter shall forcibly close any existing connections then call the on_io_close_complete function and pass the on_io_close_complete_context that was supplied in tlsio_close_async. ]*/ /* Codes_SRS_TLSIO_30_051: [ On success, if the underlying TLS does not support asynchronous closing, then the adapter shall enter TLSIO_STATE_EXT_CLOSED immediately after entering TLSIO_STATE_EX_CLOSING. ]*/ int tlsio_openssl_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result; /* Codes_SRS_TLSIO_30_050: [ If the tlsio_handle parameter is NULL, tlsio_close_async shall log an error and return _FAILURE_. ]*/ if (tls_io == NULL) { LogError("NULL tls_io."); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_ERROR && tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { /* Codes_RS_TLSIO_30_053: [ If the adapter is in any state other than TLSIO_STATE_EXT_OPEN or TLSIO_STATE_EXT_ERROR then tlsio_close_async shall log that tlsio_close_async has been called and then continue normally. ]*/ // LogInfo rather than LogError because this is an unusual but not erroneous situation LogInfo("Closing tlsio from a state other than TLSIO_STATE_EXT_OPEN or TLSIO_STATE_EXT_ERROR"); } if (is_an_opening_state(tls_io_instance->tlsio_state)) { /* Codes_SRS_TLSIO_30_057: [ On success, if the adapter is in TLSIO_STATE_EXT_OPENING, it shall call on_io_open_complete with the on_io_open_complete_context supplied in tlsio_open_async and IO_OPEN_CANCELLED. This callback shall be made before changing the internal state of the adapter. ]*/ tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_CANCELLED); } if (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN) { // Attempt a graceful shutdown /* Codes_SRS_TLSIO_30_056: [ On success the adapter shall enter TLSIO_STATE_EX_CLOSING. ]*/ tls_io_instance->tlsio_state = TLSIO_STATE_CLOSING; tls_io_instance->on_io_close_complete = on_io_close_complete; tls_io_instance->on_io_close_complete_context = callback_context; // xio_close is guaranteed to succeed from the open state, and the callback completes the // transition into TLSIO_STATE_NOT_OPEN if (xio_close(tls_io_instance->underlying_io, on_underlying_io_close_complete, tls_io_instance) != 0) { close_openssl_instance(tls_io_instance); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; } } else { // Just force the shutdown /* Codes_SRS_TLSIO_30_056: [ On success the adapter shall enter TLSIO_STATE_EX_CLOSING. ]*/ /* Codes_SRS_TLSIO_30_051: [ On success, if the underlying TLS does not support asynchronous closing or if the adapter is not in TLSIO_STATE_EXT_OPEN, then the adapter shall enter TLSIO_STATE_EXT_CLOSED immediately after entering TLSIO_STATE_EXT_CLOSING. ]*/ // Current implementations of xio_close will fail if not in the open state, but we don't care (void)xio_close(tls_io_instance->underlying_io, NULL, NULL); close_openssl_instance(tls_io_instance); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; } result = 0; } /* Codes_SRS_TLSIO_30_054: [ On failure, the adapter shall not call on_io_close_complete. ]*/ return result; } int tlsio_openssl_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if (tls_io == NULL) { LogError("NULL tls_io."); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { LogError("Invalid tlsio_state. Expected state is TLSIO_STATE_OPEN."); result = __FAILURE__; } else { int res; if (tls_io_instance->ssl == NULL) { LogError("SSL channel closed in tlsio_openssl_send."); result = __FAILURE__; return result; } res = SSL_write(tls_io_instance->ssl, buffer, (int)size); if (res != (int)size) { log_ERR_get_error("SSL_write error."); result = __FAILURE__; } else { if (write_outgoing_bytes(tls_io_instance, on_send_complete, callback_context) != 0) { LogError("Error in write_outgoing_bytes."); result = __FAILURE__; } else { result = 0; } } } } return result; } void tlsio_openssl_dowork(CONCRETE_IO_HANDLE tls_io) { if (tls_io == NULL) { LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; switch (tls_io_instance->tlsio_state) { case TLSIO_STATE_OPENING_UNDERLYING_IO: case TLSIO_STATE_IN_HANDSHAKE: case TLSIO_STATE_OPEN: /* this is needed in order to pump out bytes produces by OpenSSL for things like renegotiation */ write_outgoing_bytes(tls_io_instance, NULL, NULL); break; case TLSIO_STATE_NOT_OPEN: case TLSIO_STATE_HANDSHAKE_FAILED: case TLSIO_STATE_CLOSING: case TLSIO_STATE_ERROR: default: break; } if (tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) { /* Same behavior as schannel */ xio_dowork(tls_io_instance->underlying_io); if (tls_io_instance->tlsio_state == TLSIO_STATE_HANDSHAKE_FAILED) { // The handshake failed so we need to close. The tlsio becomes aware of the // handshake failure during an on_bytes_received while the underlying // xio_dowork is pumping data out of the socket in a while loop. The tlsio can't // close down during the callback because that would mean the xio_dowork would // be trying to read from a closed socket. So instead, the tlsio sets its state // to TLSIO_STATE_HANDSHAKE_FAILED during the on_bytes_received callback, // can then gracefully shut things down here. // // Set the state to TLSIO_STATE_ERROR so close won't gripe about the state tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; tlsio_openssl_close(tls_io_instance, NULL, NULL); indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); } } } } int tlsio_openssl_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) { int result; if (tls_io == NULL || optionName == NULL) { result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (strcmp(OPTION_TRUSTED_CERT, optionName) == 0) { const char* cert = (const char*)value; size_t len; if (tls_io_instance->certificate != NULL) { // Free the memory if it has been previously allocated free(tls_io_instance->certificate); } // Store the certificate len = strlen(cert); tls_io_instance->certificate = malloc(len + 1); if (tls_io_instance->certificate == NULL) { result = __FAILURE__; } else { strcpy(tls_io_instance->certificate, cert); result = 0; } // If we're previously connected then add the cert to the context if (tls_io_instance->ssl_context != NULL) { result = add_certificate_to_store(tls_io_instance, cert); } } else if (strcmp(OPTION_OPENSSL_CIPHER_SUITE, optionName) == 0) { if (tls_io_instance->cipher_list != NULL) { // Free the memory if it has been previously allocated free(tls_io_instance->cipher_list); tls_io_instance->cipher_list = NULL; } // Store the cipher suites if (mallocAndStrcpy_s((char**)&tls_io_instance->cipher_list, value) != 0) { LogError("unable to mallocAndStrcpy_s %s", optionName); result = __FAILURE__; } else { result = 0; } } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { if (tls_io_instance->x509_certificate != NULL) { LogError("unable to set x509 options more than once"); result = __FAILURE__; } else { /*let's make a copy of this option*/ if (mallocAndStrcpy_s((char**)&tls_io_instance->x509_certificate, value) != 0) { LogError("unable to mallocAndStrcpy_s %s", optionName); result = __FAILURE__; } else { result = 0; } } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { if (tls_io_instance->x509_private_key != NULL) { LogError("unable to set more than once x509 options"); result = __FAILURE__; } else { /*let's make a copy of this option*/ if (mallocAndStrcpy_s((char**)&tls_io_instance->x509_private_key, value) != 0) { LogError("unable to mallocAndStrcpy_s %s", optionName); result = __FAILURE__; } else { result = 0; } } } else if (strcmp("tls_validation_callback", optionName) == 0) { #ifdef WIN32 #pragma warning(push) #pragma warning(disable:4055) #endif // WIN32 tls_io_instance->tls_validation_callback = (TLS_CERTIFICATE_VALIDATION_CALLBACK)value; #ifdef WIN32 #pragma warning(pop) #endif // WIN32 if (tls_io_instance->ssl_context != NULL) { SSL_CTX_set_cert_verify_callback(tls_io_instance->ssl_context, tls_io_instance->tls_validation_callback, tls_io_instance->tls_validation_callback_data); } result = 0; } else if (strcmp("tls_validation_callback_data", optionName) == 0) { tls_io_instance->tls_validation_callback_data = (void*)value; if (tls_io_instance->ssl_context != NULL) { SSL_CTX_set_cert_verify_callback(tls_io_instance->ssl_context, tls_io_instance->tls_validation_callback, tls_io_instance->tls_validation_callback_data); } result = 0; } else if (strcmp(OPTION_TLS_VERSION, optionName) == 0) { if (tls_io_instance->ssl_context != NULL) { LogError("Unable to set the tls version after the tls connection is established"); result = __FAILURE__; } else { const int version_option = *(const int*)value; if (version_option == 0 || version_option == 10) { tls_io_instance->tls_version = VERSION_1_0; } else if (version_option == 11) { tls_io_instance->tls_version = VERSION_1_1; } else if (version_option == 12) { tls_io_instance->tls_version = VERSION_1_2; } else { LogInfo("Value of TLS version option %d is not found shall default to version 1.2", version_option); tls_io_instance->tls_version = VERSION_1_2; } result = 0; } } else if (strcmp(optionName, OPTION_UNDERLYING_IO_OPTIONS) == 0) { if (OptionHandler_FeedOptions((OPTIONHANDLER_HANDLE)value, (void*)tls_io_instance->underlying_io) != OPTIONHANDLER_OK) { LogError("failed feeding options to underlying I/O instance"); result = __FAILURE__; } else { result = 0; } } else if (strcmp("ignore_server_name_check", optionName) == 0) { result = 0; } else { if (tls_io_instance->underlying_io == NULL) { result = __FAILURE__; } else { result = xio_setoption(tls_io_instance->underlying_io, optionName, value); } } } return result; } const IO_INTERFACE_DESCRIPTION* tlsio_openssl_get_interface_description(void) { return &tlsio_openssl_interface_description; } tlsio_schannel.c000066400000000000000000001527371362133436400342500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define SECURITY_WIN32 #ifdef WINCE #define UNICODE // Only Unicode version of secur32.lib functions supported on Windows CE #define SCH_USE_STRONG_CRYPTO 0x00400000 // not defined in header file #define SEC_TCHAR SEC_WCHAR #else #define SEC_TCHAR SEC_CHAR #endif #include #include #include #include #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/tlsio_schannel.h" #include "azure_c_shared_utility/socketio.h" #include "windows.h" #include "sspi.h" #include "schannel.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/x509_schannel.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/gballoc.h" #define TLSIO_STATE_VALUES \ TLSIO_STATE_NOT_OPEN, \ TLSIO_STATE_OPENING_UNDERLYING_IO, \ TLSIO_STATE_HANDSHAKE_CLIENT_HELLO_SENT, \ TLSIO_STATE_HANDSHAKE_SERVER_HELLO_RECEIVED, \ TLSIO_STATE_RENEGOTIATE, \ TLSIO_STATE_OPEN, \ TLSIO_STATE_CLOSING, \ TLSIO_STATE_ERROR DEFINE_ENUM(TLSIO_STATE, TLSIO_STATE_VALUES); DEFINE_ENUM_STRINGS(TLSIO_STATE, TLSIO_STATE_VALUES); typedef struct PENDING_SEND_TAG { unsigned char* bytes; size_t length; ON_SEND_COMPLETE on_send_complete; void* on_send_complete_context; } PENDING_SEND; typedef struct TLS_IO_INSTANCE_TAG { XIO_HANDLE socket_io; ON_IO_OPEN_COMPLETE on_io_open_complete; ON_IO_CLOSE_COMPLETE on_io_close_complete; ON_BYTES_RECEIVED on_bytes_received; ON_IO_ERROR on_io_error; void* on_io_open_complete_context; void* on_io_close_complete_context; void* on_bytes_received_context; void* on_io_error_context; CtxtHandle security_context; TLSIO_STATE tlsio_state; SEC_TCHAR* host_name; CredHandle credential_handle; bool credential_handle_allocated; bool ignore_server_name_check; unsigned char* received_bytes; size_t received_byte_count; size_t buffer_size; size_t needed_bytes; char* x509certificate; char* x509privatekey; X509_SCHANNEL_HANDLE x509_schannel_handle; SINGLYLINKEDLIST_HANDLE pending_io_list; } TLS_IO_INSTANCE; /*this function will clone an option given by name and value*/ static void* tlsio_schannel_CloneOption(const char* name, const void* value) { void* result; if ( (name == NULL) || (value == NULL) ) { LogError("invalid parameter detected: const char* name = %p, const void* value = %p", name, value); result = NULL; } else { if (strcmp(name, SU_OPTION_X509_CERT) == 0 || strcmp(name, OPTION_X509_ECC_CERT) == 0) { if (mallocAndStrcpy_s((char**)&result, (const char *) value) != 0) { LogError("unable to mallocAndStrcpy_s x509certificate value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, SU_OPTION_X509_PRIVATE_KEY) == 0 || strcmp(name, OPTION_X509_ECC_KEY) == 0) { if (mallocAndStrcpy_s((char**)&result, (const char *) value) != 0) { LogError("unable to mallocAndStrcpy_s x509privatekey value"); result = NULL; } else { /*return as is*/ } } else { LogError("not handled option : %s", name); result = NULL; } } return result; } /*this function destroys an option previously created*/ static void tlsio_schannel_DestroyOption(const char* name, const void* value) { /*since all options for this layer are actually string copies., disposing of one is just calling free*/ if ( (name == NULL) || (value == NULL) ) { LogError("invalid parameter detected: const char* name = %p, const void* value = %p", name, value); } else { if ( (strcmp(name, SU_OPTION_X509_CERT) == 0) || (strcmp(name, SU_OPTION_X509_PRIVATE_KEY) == 0) || (strcmp(name, OPTION_X509_ECC_CERT) == 0) || (strcmp(name, OPTION_X509_ECC_KEY) == 0) ) { free((void*)value); } else { LogError("not handled option : %s", name); } } } static OPTIONHANDLER_HANDLE tlsio_schannel_retrieveoptions(CONCRETE_IO_HANDLE handle) { OPTIONHANDLER_HANDLE result; if (handle == NULL) { LogError("invalid parameter detected: CONCRETE_IO_HANDLE handle = %p", handle); result = NULL; } else { result = OptionHandler_Create(tlsio_schannel_CloneOption, tlsio_schannel_DestroyOption, tlsio_schannel_setoption); if (result == NULL) { LogError("unable to OptionHandler_Create"); /*return as is*/ } else { /*this layer cares about the certificates and the x509 credentials*/ TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)handle; if ( (tls_io_instance->x509certificate != NULL) && (OptionHandler_AddOption(result, "x509certificate", tls_io_instance->x509certificate) != 0) ) { LogError("unable to save x509certificate option"); OptionHandler_Destroy(result); result = NULL; } else if ( (tls_io_instance->x509privatekey != NULL) && (OptionHandler_AddOption(result, "x509privatekey", tls_io_instance->x509privatekey) != 0) ) { LogError("unable to save x509privatekey option"); OptionHandler_Destroy(result); result = NULL; } else { /*all is fine, all interesting options have been saved*/ /*return as is*/ } } } return result; } static const IO_INTERFACE_DESCRIPTION tlsio_schannel_interface_description = { tlsio_schannel_retrieveoptions, tlsio_schannel_create, tlsio_schannel_destroy, tlsio_schannel_open, tlsio_schannel_close, tlsio_schannel_send, tlsio_schannel_dowork, tlsio_schannel_setoption }; static void indicate_error(TLS_IO_INSTANCE* tls_io_instance) { if (tls_io_instance->on_io_error != NULL) { tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } } static int resize_receive_buffer(TLS_IO_INSTANCE* tls_io_instance, size_t needed_buffer_size) { int result; if (needed_buffer_size > tls_io_instance->buffer_size) { unsigned char* new_buffer = (unsigned char*) realloc(tls_io_instance->received_bytes, needed_buffer_size); if (new_buffer == NULL) { LogError("realloc failed"); result = __FAILURE__; } else { tls_io_instance->received_bytes = new_buffer; tls_io_instance->buffer_size = needed_buffer_size; result = 0; } } else { result = 0; } return result; } static void on_underlying_io_close_complete(void* context) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (tls_io_instance->tlsio_state == TLSIO_STATE_CLOSING) { tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; if (tls_io_instance->on_io_close_complete != NULL) { tls_io_instance->on_io_close_complete(tls_io_instance->on_io_close_complete_context); } /* Free security context resources corresponding to creation with open */ DeleteSecurityContext(&tls_io_instance->security_context); if (tls_io_instance->credential_handle_allocated) { (void)FreeCredentialHandle(&tls_io_instance->credential_handle); tls_io_instance->credential_handle_allocated = false; } } } // This callback usage needs to be either verified and commented or integrated into // the state machine. static void unchecked_on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } static void send_client_hello(TLS_IO_INSTANCE* tls_io_instance) { SecBuffer init_security_buffers[2]; ULONG context_attributes; SECURITY_STATUS status; SCHANNEL_CRED auth_data; PCCERT_CONTEXT certContext; auth_data.dwVersion = SCHANNEL_CRED_VERSION; if (tls_io_instance->x509_schannel_handle != NULL) { certContext = x509_schannel_get_certificate_context(tls_io_instance->x509_schannel_handle); auth_data.cCreds = 1; auth_data.paCred = &certContext; } else { auth_data.cCreds = 0; auth_data.paCred = NULL; } auth_data.hRootStore = NULL; auth_data.cSupportedAlgs = 0; auth_data.palgSupportedAlgs = NULL; auth_data.grbitEnabledProtocols = 0; auth_data.dwMinimumCipherStrength = 0; auth_data.dwMaximumCipherStrength = 0; auth_data.dwSessionLifespan = 0; #if defined(SCH_USE_STRONG_CRYPTO) auth_data.dwFlags = SCH_USE_STRONG_CRYPTO | SCH_CRED_NO_DEFAULT_CREDS; #else auth_data.dwFlags = SCH_CRED_NO_DEFAULT_CREDS; #endif if (tls_io_instance->ignore_server_name_check) { auth_data.dwFlags |= SCH_CRED_NO_SERVERNAME_CHECK; } auth_data.dwCredFormat = 0; status = AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &auth_data, NULL, NULL, &tls_io_instance->credential_handle, NULL); if (status != SEC_E_OK) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { SecBufferDesc security_buffers_desc; tls_io_instance->credential_handle_allocated = true; init_security_buffers[0].cbBuffer = 0; init_security_buffers[0].BufferType = SECBUFFER_TOKEN; init_security_buffers[0].pvBuffer = NULL; init_security_buffers[1].cbBuffer = 0; init_security_buffers[1].BufferType = SECBUFFER_EMPTY; init_security_buffers[1].pvBuffer = 0; security_buffers_desc.cBuffers = 2; security_buffers_desc.pBuffers = init_security_buffers; security_buffers_desc.ulVersion = SECBUFFER_VERSION; status = InitializeSecurityContext(&tls_io_instance->credential_handle, NULL, tls_io_instance->host_name, ISC_REQ_EXTENDED_ERROR | ISC_REQ_STREAM | ISC_REQ_ALLOCATE_MEMORY | ISC_REQ_USE_SUPPLIED_CREDS, 0, 0, NULL, 0, &tls_io_instance->security_context, &security_buffers_desc, &context_attributes, NULL); if ((status == SEC_I_COMPLETE_NEEDED) || (status == SEC_I_CONTINUE_NEEDED) || (status == SEC_I_COMPLETE_AND_CONTINUE)) { if (xio_send(tls_io_instance->socket_io, init_security_buffers[0].pvBuffer, init_security_buffers[0].cbBuffer, unchecked_on_send_complete, NULL) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { /* set the needed bytes to 1, to get on the next byte how many we actually need */ tls_io_instance->needed_bytes = 1; if (resize_receive_buffer(tls_io_instance, tls_io_instance->needed_bytes + tls_io_instance->received_byte_count) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { tls_io_instance->tlsio_state = TLSIO_STATE_HANDSHAKE_CLIENT_HELLO_SENT; } } } } } static void on_underlying_io_open_complete(void* context, IO_OPEN_RESULT io_open_result) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPENING_UNDERLYING_IO) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { if (io_open_result != IO_OPEN_OK) { tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } } else { send_client_hello(tls_io_instance); } } } static int set_receive_buffer(TLS_IO_INSTANCE* tls_io_instance, size_t buffer_size) { int result; unsigned char* new_buffer = (unsigned char*) realloc(tls_io_instance->received_bytes, buffer_size); if (new_buffer == NULL) { LogError("realloc failed"); result = __FAILURE__; } else { tls_io_instance->received_bytes = new_buffer; tls_io_instance->buffer_size = buffer_size; result = 0; } return result; } static int send_chunk(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if ((tls_io == NULL) || (buffer == NULL) || (size == 0)) { LogError("invalid argument detected: CONCRETE_IO_HANDLE tls_io = %p, const void* buffer = %p, size_t size = %lu", tls_io, buffer, (unsigned long)size); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { LogError("invalid tls_io_instance->tlsio_state: %s", ENUM_TO_STRING(TLSIO_STATE, tls_io_instance->tlsio_state)); result = __FAILURE__; } else { SecPkgContext_StreamSizes sizes; SECURITY_STATUS status = QueryContextAttributes(&tls_io_instance->security_context, SECPKG_ATTR_STREAM_SIZES, &sizes); if (status != SEC_E_OK) { LogError("QueryContextAttributes failed: %x", status); result = __FAILURE__; } else { SecBuffer security_buffers[4]; SecBufferDesc security_buffers_desc; size_t needed_buffer = sizes.cbHeader + size + sizes.cbTrailer; unsigned char* out_buffer = (unsigned char*)malloc(needed_buffer); if (out_buffer == NULL) { LogError("malloc failed"); result = __FAILURE__; } else { (void)memcpy(out_buffer + sizes.cbHeader, buffer, size); security_buffers[0].BufferType = SECBUFFER_STREAM_HEADER; security_buffers[0].cbBuffer = sizes.cbHeader; security_buffers[0].pvBuffer = out_buffer; security_buffers[1].BufferType = SECBUFFER_DATA; security_buffers[1].cbBuffer = (unsigned long)size; security_buffers[1].pvBuffer = out_buffer + sizes.cbHeader; security_buffers[2].BufferType = SECBUFFER_STREAM_TRAILER; security_buffers[2].cbBuffer = sizes.cbTrailer; security_buffers[2].pvBuffer = out_buffer + sizes.cbHeader + size; security_buffers[3].cbBuffer = 0; security_buffers[3].BufferType = SECBUFFER_EMPTY; security_buffers[3].pvBuffer = 0; security_buffers_desc.cBuffers = sizeof(security_buffers) / sizeof(security_buffers[0]); security_buffers_desc.pBuffers = security_buffers; security_buffers_desc.ulVersion = SECBUFFER_VERSION; status = EncryptMessage(&tls_io_instance->security_context, 0, &security_buffers_desc, 0); if (FAILED(status)) { LogError("EncryptMessage failed: %x", status); result = __FAILURE__; } else { if (xio_send(tls_io_instance->socket_io, out_buffer, security_buffers[0].cbBuffer + security_buffers[1].cbBuffer + security_buffers[2].cbBuffer, on_send_complete, callback_context) != 0) { LogError("xio_send failed"); result = __FAILURE__; } else { result = 0; } } free(out_buffer); } } } } return result; } static int internal_send(TLS_IO_INSTANCE* tls_io_instance, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; while (size > 0) { size_t to_send = 16 * 1024; if (to_send > size) { to_send = size; } if (send_chunk(tls_io_instance, buffer, to_send, (to_send == size) ? on_send_complete : NULL, callback_context) != 0) { break; } size -= to_send; buffer = ((const unsigned char*)buffer) + to_send; } if (size > 0) { LogError("send_chunk failed"); result = __FAILURE__; } else { result = 0; } return result; } static void on_underlying_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; size_t consumed_bytes; if (resize_receive_buffer(tls_io_instance, tls_io_instance->received_byte_count + size) == 0) { (void)memcpy(tls_io_instance->received_bytes + tls_io_instance->received_byte_count, buffer, size); tls_io_instance->received_byte_count += size; if (size > tls_io_instance->needed_bytes) { tls_io_instance->needed_bytes = 0; } else { tls_io_instance->needed_bytes -= size; } /* Drain what we received */ while (tls_io_instance->needed_bytes == 0) { if ((tls_io_instance->tlsio_state == TLSIO_STATE_HANDSHAKE_CLIENT_HELLO_SENT) || (tls_io_instance->tlsio_state == TLSIO_STATE_RENEGOTIATE)) { SecBuffer input_buffers[2]; SecBuffer output_buffers[2]; SecBufferDesc input_buffers_desc; SecBufferDesc output_buffers_desc; SECURITY_STATUS status; unsigned long flags; ULONG context_attributes; /* we need to try and perform the second (next) step of the init */ input_buffers[0].cbBuffer = (unsigned long)tls_io_instance->received_byte_count; input_buffers[0].BufferType = SECBUFFER_TOKEN; input_buffers[0].pvBuffer = (void*)tls_io_instance->received_bytes; input_buffers[1].cbBuffer = 0; input_buffers[1].BufferType = SECBUFFER_EMPTY; input_buffers[1].pvBuffer = 0; input_buffers_desc.cBuffers = 2; input_buffers_desc.pBuffers = input_buffers; input_buffers_desc.ulVersion = SECBUFFER_VERSION; output_buffers[0].cbBuffer = 0; output_buffers[0].BufferType = SECBUFFER_TOKEN; output_buffers[0].pvBuffer = NULL; output_buffers[1].cbBuffer = 0; output_buffers[1].BufferType = SECBUFFER_EMPTY; output_buffers[1].pvBuffer = 0; output_buffers_desc.cBuffers = 2; output_buffers_desc.pBuffers = output_buffers; output_buffers_desc.ulVersion = SECBUFFER_VERSION; flags = ISC_REQ_EXTENDED_ERROR | ISC_REQ_STREAM | ISC_REQ_ALLOCATE_MEMORY | ISC_REQ_USE_SUPPLIED_CREDS; status = InitializeSecurityContext(&tls_io_instance->credential_handle, &tls_io_instance->security_context, tls_io_instance->host_name, flags, 0, 0, &input_buffers_desc, 0, &tls_io_instance->security_context, &output_buffers_desc, &context_attributes, NULL); switch (status) { case SEC_E_INCOMPLETE_MESSAGE: if (input_buffers[1].BufferType != SECBUFFER_MISSING) { //If SECBUFFER_MISSING not sent, try to read byte by byte. tls_io_instance->needed_bytes = 1; } else { tls_io_instance->needed_bytes = input_buffers[1].cbBuffer; } if (resize_receive_buffer(tls_io_instance, tls_io_instance->received_byte_count + tls_io_instance->needed_bytes) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } } break; case SEC_E_OK: consumed_bytes = tls_io_instance->received_byte_count; /* Any extra bytes left over or did we fully consume the receive buffer? */ if (input_buffers[1].BufferType == SECBUFFER_EXTRA) { consumed_bytes -= input_buffers[1].cbBuffer; (void)memmove(tls_io_instance->received_bytes, tls_io_instance->received_bytes + consumed_bytes, tls_io_instance->received_byte_count - consumed_bytes); } tls_io_instance->received_byte_count -= consumed_bytes; /* if nothing more to consume, set the needed bytes to 1, to get on the next byte how many we actually need */ tls_io_instance->needed_bytes = tls_io_instance->received_byte_count == 0 ? 1 : 0; if (set_receive_buffer(tls_io_instance, tls_io_instance->needed_bytes + tls_io_instance->received_byte_count) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } } else { if (tls_io_instance->tlsio_state == TLSIO_STATE_HANDSHAKE_CLIENT_HELLO_SENT) { tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_OK); } } else { LIST_ITEM_HANDLE first_pending_io; tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; first_pending_io = singlylinkedlist_get_head_item(tls_io_instance->pending_io_list); while (first_pending_io != NULL) { PENDING_SEND* pending_send = (PENDING_SEND*)singlylinkedlist_item_get_value(first_pending_io); if (pending_send == NULL) { LogError("Failure: retrieving pending IO from list"); indicate_error(tls_io_instance); break; } else { if (internal_send(tls_io_instance, pending_send->bytes, pending_send->length, pending_send->on_send_complete, pending_send->on_send_complete_context) != 0) { LogError("send failed"); indicate_error(tls_io_instance); } else { if (singlylinkedlist_remove(tls_io_instance->pending_io_list, first_pending_io) != 0) { LogError("Failure: removing pending IO from list"); indicate_error(tls_io_instance); } } } } } } break; case SEC_I_COMPLETE_NEEDED: case SEC_I_CONTINUE_NEEDED: case SEC_I_COMPLETE_AND_CONTINUE: if ((output_buffers[0].cbBuffer > 0) && xio_send(tls_io_instance->socket_io, output_buffers[0].pvBuffer, output_buffers[0].cbBuffer, unchecked_on_send_complete, NULL) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } } else { consumed_bytes = tls_io_instance->received_byte_count; /* Any extra bytes left over or did we fully consume the receive buffer? */ if (input_buffers[1].BufferType == SECBUFFER_EXTRA) { consumed_bytes -= input_buffers[1].cbBuffer; (void)memmove(tls_io_instance->received_bytes, tls_io_instance->received_bytes + consumed_bytes, tls_io_instance->received_byte_count - consumed_bytes); } tls_io_instance->received_byte_count -= consumed_bytes; /* if nothing more to consume, set the needed bytes to 1, to get on the next byte how many we actually need */ tls_io_instance->needed_bytes = tls_io_instance->received_byte_count == 0 ? 1 : 0; if (set_receive_buffer(tls_io_instance, tls_io_instance->needed_bytes + tls_io_instance->received_byte_count) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } } else { if (tls_io_instance->tlsio_state != TLSIO_STATE_RENEGOTIATE) { tls_io_instance->tlsio_state = TLSIO_STATE_HANDSHAKE_CLIENT_HELLO_SENT; } } } break; case SEC_E_UNTRUSTED_ROOT: tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } break; default: { LPVOID srcText = NULL; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, status, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)srcText, 0, NULL) > 0) { LogError("[%#x] %s", status, (LPTSTR)srcText); LocalFree(srcText); } else { LogError("[%#x]", status); } tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } break; } } else if (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN) { SecBuffer security_buffers[4]; SecBufferDesc security_buffers_desc; SECURITY_STATUS status; security_buffers[0].BufferType = SECBUFFER_DATA; security_buffers[0].pvBuffer = tls_io_instance->received_bytes; security_buffers[0].cbBuffer = (unsigned long)tls_io_instance->received_byte_count; security_buffers[1].BufferType = SECBUFFER_EMPTY; security_buffers[2].BufferType = SECBUFFER_EMPTY; security_buffers[3].BufferType = SECBUFFER_EMPTY; security_buffers_desc.cBuffers = sizeof(security_buffers) / sizeof(security_buffers[0]); security_buffers_desc.pBuffers = security_buffers; security_buffers_desc.ulVersion = SECBUFFER_VERSION; status = DecryptMessage(&tls_io_instance->security_context, &security_buffers_desc, 0, NULL); switch (status) { case SEC_E_INCOMPLETE_MESSAGE: if (security_buffers[1].BufferType != SECBUFFER_MISSING) { //If SECBUFFER_MISSING not sent, try to read byte by byte. tls_io_instance->needed_bytes = 1; } else { tls_io_instance->needed_bytes = security_buffers[1].cbBuffer; } if (resize_receive_buffer(tls_io_instance, tls_io_instance->received_byte_count + tls_io_instance->needed_bytes) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } break; case SEC_E_OK: if (security_buffers[1].BufferType != SECBUFFER_DATA) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { size_t i; /* notify of the received data */ if (tls_io_instance->on_bytes_received != NULL) { tls_io_instance->on_bytes_received(tls_io_instance->on_bytes_received_context, (const unsigned char *) security_buffers[1].pvBuffer, security_buffers[1].cbBuffer); } consumed_bytes = tls_io_instance->received_byte_count; for (i = 0; i < sizeof(security_buffers) / sizeof(security_buffers[0]); i++) { /* Any extra bytes left over or did we fully consume the receive buffer? */ if (security_buffers[i].BufferType == SECBUFFER_EXTRA) { consumed_bytes -= security_buffers[i].cbBuffer; (void)memmove(tls_io_instance->received_bytes, tls_io_instance->received_bytes + consumed_bytes, tls_io_instance->received_byte_count - consumed_bytes); break; } } tls_io_instance->received_byte_count -= consumed_bytes; /* if nothing more to consume, set the needed bytes to 1, to get on the next byte how many we actually need */ tls_io_instance->needed_bytes = tls_io_instance->received_byte_count == 0 ? 1 : 0; if (set_receive_buffer(tls_io_instance, tls_io_instance->needed_bytes + tls_io_instance->received_byte_count) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } } break; case SEC_I_RENEGOTIATE: { SecBuffer input_buffers[2]; SecBuffer output_buffers[2]; SecBufferDesc input_buffers_desc; SecBufferDesc output_buffers_desc; unsigned long flags; ULONG context_attributes; /* we need to try and perform the second (next) step of the init */ input_buffers[0].cbBuffer = (unsigned long)tls_io_instance->received_byte_count; input_buffers[0].BufferType = SECBUFFER_TOKEN; input_buffers[0].pvBuffer = (void*)tls_io_instance->received_bytes; input_buffers[1].cbBuffer = 0; input_buffers[1].BufferType = SECBUFFER_EMPTY; input_buffers[1].pvBuffer = 0; input_buffers_desc.cBuffers = 2; input_buffers_desc.pBuffers = input_buffers; input_buffers_desc.ulVersion = SECBUFFER_VERSION; output_buffers[0].cbBuffer = 0; output_buffers[0].BufferType = SECBUFFER_TOKEN; output_buffers[0].pvBuffer = NULL; output_buffers[1].cbBuffer = 0; output_buffers[1].BufferType = SECBUFFER_EMPTY; output_buffers[1].pvBuffer = 0; output_buffers_desc.cBuffers = 2; output_buffers_desc.pBuffers = output_buffers; output_buffers_desc.ulVersion = SECBUFFER_VERSION; flags = ISC_REQ_EXTENDED_ERROR | ISC_REQ_STREAM | ISC_REQ_ALLOCATE_MEMORY | ISC_REQ_USE_SUPPLIED_CREDS; status = InitializeSecurityContext(&tls_io_instance->credential_handle, &tls_io_instance->security_context, tls_io_instance->host_name, flags, 0, 0, &input_buffers_desc, 0, &tls_io_instance->security_context, &output_buffers_desc, &context_attributes, NULL); if ((status == SEC_I_COMPLETE_NEEDED) || (status == SEC_I_CONTINUE_NEEDED) || (status == SEC_I_COMPLETE_AND_CONTINUE)) { /* This needs to account for EXTRA */ tls_io_instance->received_byte_count = 0; if (xio_send(tls_io_instance->socket_io, output_buffers[0].pvBuffer, output_buffers[0].cbBuffer, unchecked_on_send_complete, NULL) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { tls_io_instance->needed_bytes = 1; if (resize_receive_buffer(tls_io_instance, tls_io_instance->needed_bytes + tls_io_instance->received_byte_count) != 0) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { tls_io_instance->tlsio_state = TLSIO_STATE_RENEGOTIATE; } } } break; } default: { LPVOID srcText = NULL; if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, status, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)srcText, 0, NULL) > 0) { LogError("[%#x] %s", status, (LPTSTR)srcText); LocalFree(srcText); } else { LogError("[%#x]", status); } tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } break; } } else { /* Received data in error or other state */ break; } } } } static void on_underlying_io_error(void* context) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; switch (tls_io_instance->tlsio_state) { default: case TLSIO_STATE_NOT_OPEN: case TLSIO_STATE_ERROR: break; case TLSIO_STATE_OPENING_UNDERLYING_IO: case TLSIO_STATE_HANDSHAKE_CLIENT_HELLO_SENT: case TLSIO_STATE_HANDSHAKE_SERVER_HELLO_RECEIVED: tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } break; case TLSIO_STATE_CLOSING: tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_close_complete != NULL) { tls_io_instance->on_io_close_complete(tls_io_instance->on_io_close_complete_context); } break; case TLSIO_STATE_OPEN: tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); break; } } CONCRETE_IO_HANDLE tlsio_schannel_create(void* io_create_parameters) { TLSIO_CONFIG* tls_io_config = (TLSIO_CONFIG *) io_create_parameters; TLS_IO_INSTANCE* result; if (tls_io_config == NULL) { LogError("invalid argument detected: void* io_create_parameters = %p", tls_io_config); result = NULL; } else { result = (TLS_IO_INSTANCE*)malloc(sizeof(TLS_IO_INSTANCE)); if (result == NULL) { LogError("malloc failed"); } else { (void)memset(result, 0, sizeof(TLS_IO_INSTANCE)); result->host_name = (SEC_TCHAR*)malloc(sizeof(SEC_TCHAR) * (1 + strlen(tls_io_config->hostname))); if (result->host_name == NULL) { LogError("malloc failed"); free(result); result = NULL; } else { SOCKETIO_CONFIG socketio_config; const IO_INTERFACE_DESCRIPTION* underlying_io_interface; void* io_interface_parameters; #ifdef WINCE (void) mbstowcs(result->host_name, tls_io_config->hostname, strlen(tls_io_config->hostname)); #else (void)strcpy(result->host_name, tls_io_config->hostname); #endif if (tls_io_config->underlying_io_interface != NULL) { underlying_io_interface = tls_io_config->underlying_io_interface; io_interface_parameters = tls_io_config->underlying_io_parameters; } else { socketio_config.hostname = tls_io_config->hostname; socketio_config.port = tls_io_config->port; socketio_config.accepted_socket = NULL; underlying_io_interface = socketio_get_interface_description(); io_interface_parameters = &socketio_config; } if (underlying_io_interface == NULL) { LogError("socketio_get_interface_description failed"); free(result->host_name); free(result); result = NULL; } else { result->socket_io = xio_create(underlying_io_interface, io_interface_parameters); if (result->socket_io == NULL) { LogError("xio_create failed"); free(result->host_name); free(result); result = NULL; } else { result->pending_io_list = singlylinkedlist_create(); if (result->pending_io_list == NULL) { LogError("Failed creating pending IO list."); xio_destroy(result->socket_io); free(result->host_name); free(result); result = NULL; } else { result->received_bytes = NULL; result->received_byte_count = 0; result->buffer_size = 0; result->tlsio_state = TLSIO_STATE_NOT_OPEN; result->x509certificate = NULL; result->x509privatekey = NULL; result->x509_schannel_handle = NULL; } } } } } } return result; } void tlsio_schannel_destroy(CONCRETE_IO_HANDLE tls_io) { if (tls_io != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; LIST_ITEM_HANDLE first_pending_io; if (tls_io_instance->credential_handle_allocated) { (void)FreeCredentialHandle(&tls_io_instance->credential_handle); tls_io_instance->credential_handle_allocated = false; } if (tls_io_instance->received_bytes != NULL) { free(tls_io_instance->received_bytes); } if (tls_io_instance->x509_schannel_handle != NULL) { x509_schannel_destroy(tls_io_instance->x509_schannel_handle); } if (tls_io_instance->x509certificate != NULL) { free(tls_io_instance->x509certificate); } if (tls_io_instance->x509privatekey != NULL) { free(tls_io_instance->x509privatekey); } xio_destroy(tls_io_instance->socket_io); free(tls_io_instance->host_name); first_pending_io = singlylinkedlist_get_head_item(tls_io_instance->pending_io_list); while (first_pending_io != NULL) { PENDING_SEND* pending_send = (PENDING_SEND*)singlylinkedlist_item_get_value(first_pending_io); if (pending_send == NULL) { LogError("Failure: retrieving socket from list"); indicate_error(tls_io_instance); break; } else { if (pending_send->on_send_complete != NULL) { pending_send->on_send_complete(pending_send->on_send_complete_context, IO_SEND_CANCELLED); } if (singlylinkedlist_remove(tls_io_instance->pending_io_list, first_pending_io) != 0) { LogError("Failure: removing pending IO from list"); } } } singlylinkedlist_destroy(tls_io_instance->pending_io_list); free(tls_io); } } int tlsio_schannel_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; if (tls_io == NULL) { LogError("invalid argument detected: CONCRETE_IO_HANDLE tls_io = %p", tls_io); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) { LogError("invalid tls_io_instance->tlsio_state = %s", ENUM_TO_STRING(TLSIO_STATE, tls_io_instance->tlsio_state)); result = __FAILURE__; } else { tls_io_instance->on_io_open_complete = on_io_open_complete; tls_io_instance->on_io_open_complete_context = on_io_open_complete_context; tls_io_instance->on_bytes_received = on_bytes_received; tls_io_instance->on_bytes_received_context = on_bytes_received_context; tls_io_instance->on_io_error = on_io_error; tls_io_instance->on_io_error_context = on_io_error_context; tls_io_instance->tlsio_state = TLSIO_STATE_OPENING_UNDERLYING_IO; if (xio_open(tls_io_instance->socket_io, on_underlying_io_open_complete, tls_io_instance, on_underlying_io_bytes_received, tls_io_instance, on_underlying_io_error, tls_io_instance) != 0) { LogError("xio_open failed"); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = __FAILURE__; } else { result = 0; } } } return result; } int tlsio_schannel_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result = 0; if (tls_io == NULL) { LogError("invalid argument detected: tls_io = %p", tls_io); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if ((tls_io_instance->tlsio_state == TLSIO_STATE_NOT_OPEN) || (tls_io_instance->tlsio_state == TLSIO_STATE_CLOSING)) { LogError("invalid tls_io_instance->tlsio_state = %s", ENUM_TO_STRING(TLSIO_STATE, tls_io_instance->tlsio_state)); result = __FAILURE__; } else { tls_io_instance->tlsio_state = TLSIO_STATE_CLOSING; tls_io_instance->on_io_close_complete = on_io_close_complete; tls_io_instance->on_io_close_complete_context = callback_context; if (xio_close(tls_io_instance->socket_io, on_underlying_io_close_complete, tls_io_instance) != 0) { LogError("xio_close failed"); result = __FAILURE__; } else { result = 0; } } } return result; } int tlsio_schannel_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state == TLSIO_STATE_RENEGOTIATE) { /* add to pending list */ PENDING_SEND* new_pending_send = (PENDING_SEND*)malloc(sizeof(PENDING_SEND)); if (new_pending_send == NULL) { LogError("Cannot allocate memory for pending IO"); result = __FAILURE__; } else { new_pending_send->bytes = (unsigned char*)malloc(size); if (new_pending_send->bytes == NULL) { LogError("Cannot allocate memory for pending IO payload"); result = __FAILURE__; } else { (void)memcpy(new_pending_send->bytes, buffer, size); new_pending_send->length = size; new_pending_send->on_send_complete = on_send_complete; new_pending_send->on_send_complete_context = callback_context; if (singlylinkedlist_add(tls_io_instance->pending_io_list, new_pending_send) == NULL) { LogError("Cannot add pending IO to list"); result = __FAILURE__; } else { result = 0; } } } } else { if (internal_send((TLS_IO_INSTANCE*)tls_io, buffer, size, on_send_complete, callback_context) != 0) { LogError("send failed"); result = __FAILURE__; } else { result = 0; } } return result; } void tlsio_schannel_dowork(CONCRETE_IO_HANDLE tls_io) { if (tls_io != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; xio_dowork(tls_io_instance->socket_io); } } int tlsio_schannel_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) { int result; if (tls_io == NULL || optionName == NULL) { LogError("invalid argument detected: CONCRETE_IO_HANDLE tls_io = %p, const char* optionName = %p", tls_io, optionName); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { if (tls_io_instance->x509certificate != NULL) { LogError("x509certificate has already been specified"); result = __FAILURE__; } else { tls_io_instance->x509certificate = (char *)tlsio_schannel_CloneOption(optionName, value); if (tls_io_instance->x509certificate == NULL) { LogError("tlsio_schannel_CloneOption failed"); result = __FAILURE__; } else { if (tls_io_instance->x509privatekey != NULL) { tls_io_instance->x509_schannel_handle = x509_schannel_create(tls_io_instance->x509certificate, tls_io_instance->x509privatekey); if (tls_io_instance->x509_schannel_handle == NULL) { LogError("x509_schannel_create failed"); result = __FAILURE__; } else { /*all is fine, the x509 shall be used later*/ result = 0; } } else { result = 0; /*all is fine, maybe x509 privatekey will come and then x509 is set*/ } } } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { if (tls_io_instance->x509privatekey != NULL) { LogError("x509privatekey has already been specified"); result = __FAILURE__; } else { tls_io_instance->x509privatekey = (char *)tlsio_schannel_CloneOption(optionName, value); if (tls_io_instance->x509privatekey == NULL) { LogError("tlsio_schannel_CloneOption failed"); result = __FAILURE__; } else { if (tls_io_instance->x509certificate != NULL) { tls_io_instance->x509_schannel_handle = x509_schannel_create(tls_io_instance->x509certificate, tls_io_instance->x509privatekey); if (tls_io_instance->x509_schannel_handle == NULL) { LogError("x509_schannel_create failed"); result = __FAILURE__; } else { /*all is fine, the x509 shall be used later*/ result = 0; } } else { result = 0; /*all is fine, maybe x509 cert will come and then x509 is set*/ } } } } else if (strcmp(OPTION_TRUSTED_CERT, optionName) == 0) { result = 0; } else if (strcmp("ignore_server_name_check", optionName) == 0) { bool* server_name_check = (bool*)value; tls_io_instance->ignore_server_name_check = *server_name_check; result = 0; } else if (tls_io_instance->socket_io == NULL) { LogError("tls_io_instance->socket_io is not set"); result = __FAILURE__; } else { result = xio_setoption(tls_io_instance->socket_io, optionName, value); } } return result; } const IO_INTERFACE_DESCRIPTION* tlsio_schannel_get_interface_description(void) { return &tlsio_schannel_interface_description; } tlsio_ssl_esp8266.c000066400000000000000000001215471362133436400344460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #ifdef _CRTDBG_MAP_ALLOC #include #endif #ifdef FREERTOS_ARCH_ESP8266 #include "openssl/ssl.h" #include "lwip/opt.h" #include "lwip/sockets.h" #include "lwip/sys.h" #else //mock header #include "esp8266_mock.h" #include "azure_c_shared_utility/gballoc.h" #endif #include #include #include "azure_c_shared_utility/lock.h" /* Codes_SRS_TLSIO_SSL_ESP8266_99_001: [ The tlsio_ssl_esp8266 shall implement and export all the Concrete functions in the VTable IO_INTERFACE_DESCRIPTION defined in the `xio.h`. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_002: [ The tlsio_ssl_esp8266 shall report the open operation status using the IO_OPEN_RESULT enumerator defined in the `xio.h`.]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_003: [ The tlsio_ssl_esp8266 shall report the send operation status using the IO_SEND_RESULT enumerator defined in the `xio.h`. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_004: [ The tlsio_ssl_esp8266 shall call the callbacks functions defined in the `xio.h`. ]*/ #include "azure_c_shared_utility/tlsio_openssl.h" /* Codes_SRS_TLSIO_SSL_ESP8266_99_005: [ The tlsio_ssl_esp8266 shall received the connection information using the TLSIO_CONFIG structure defined in `tlsio.h`. ]*/ #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" #define OPENSSL_FRAGMENT_SIZE 5120 #define OPENSSL_LOCAL_TCP_PORT 1000 /* Codes_SSRS_TLSIO_SSL_ESP8266_99_027: [ The tlsio_openssl_open shall set the tlsio to try to open the connection for MAX_RETRY times before assuming that connection failed. ]*/ #define MAX_RETRY 20 #define RETRY_DELAY 1000 * 1000 * 10 // 10s #define RECEIVE_BUFFER_SIZE 1024 #define OPENSSL_SELECT_TIMEOUT 20 struct timeval timeout = { OPENSSL_SELECT_TIMEOUT, 0 }; typedef enum TLSIO_STATE_TAG { TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING, TLSIO_STATE_OPEN, TLSIO_STATE_CLOSING, TLSIO_STATE_ERROR } TLSIO_STATE; typedef struct TLS_IO_INSTANCE_TAG { ON_BYTES_RECEIVED on_bytes_received; ON_IO_OPEN_COMPLETE on_io_open_complete; ON_IO_CLOSE_COMPLETE on_io_close_complete; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_open_complete_context; void* on_io_close_complete_context; void* on_io_error_context; SSL* ssl; SSL_CTX* ssl_context; TLSIO_STATE tlsio_state; char* hostname; int port; char* certificate; const char* x509certificate; const char* x509privatekey; int sock; ip_addr_t target_ip; } TLS_IO_INSTANCE; /*this function destroys an option previously created*/ static void tlsio_openssl_DestroyOption(const char* name, const void* value) { /*since all options for this layer are actually string copies, disposing of one is just calling free*/ if ( (name == NULL) || (value == NULL) ) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); } else { if ( (strcmp(name, "TrustedCerts") == 0) || (strcmp(name, "x509certificate") == 0) || (strcmp(name, "x509privatekey") == 0) ) { free((void*)value); } else { LogError("not handled option : %s", name); } } } /* Codes_SRS_TLSIO_SSL_ESP8266_99_078: [ The tlsio_openssl_retrieveoptions shall not do anything, and return NULL. ]*/ static OPTIONHANDLER_HANDLE tlsio_openssl_retrieveoptions(CONCRETE_IO_HANDLE tlsio_handle) { (void)(tlsio_handle); (void)tlsio_openssl_DestroyOption; /* Not implementing any options */ return NULL; } static const IO_INTERFACE_DESCRIPTION tlsio_openssl_interface_description = { tlsio_openssl_retrieveoptions, tlsio_openssl_create, tlsio_openssl_destroy, tlsio_openssl_open, tlsio_openssl_close, tlsio_openssl_send, tlsio_openssl_dowork, tlsio_openssl_setoption }; static void indicate_open_complete(TLS_IO_INSTANCE* tls_io_instance, IO_OPEN_RESULT open_result) { if (tls_io_instance->on_io_open_complete == NULL) { LogError("NULL on_io_open_complete."); } else { /* Codes_TLSIO_SSL_ESP8266_99_002: [ The tlsio_ssl_esp8266 shall report the open operation status using the IO_OPEN_RESULT enumerator defined in the `xio.h`.]*/ tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, open_result); } } static int lwip_net_errno(int fd) { int sock_errno = 0; u32_t optlen = sizeof(sock_errno); getsockopt(fd, SOL_SOCKET, SO_ERROR, &sock_errno, &optlen); return sock_errno; } static void lwip_set_non_block(int fd) { int flags = -1; int error = 0; while((void)1,1){ flags = fcntl(fd, F_GETFL, 0); if (flags == -1){ error = lwip_net_errno(fd); if (error != EINTR){ break; } } else{ break; } } fcntl(fd, F_SETFL, O_NONBLOCK); } LOCAL int openssl_thread_LWIP_CONNECTION(TLS_IO_INSTANCE* p) { //LogInfo("openssl_thread_LWIP_CONNECTION begin: %d", system_get_free_heap_size()); //system_show_malloc(); int result = 0; int ret = 0; int sock; struct sockaddr_in sock_addr; fd_set readset; fd_set writeset; fd_set errset; SSL_CTX *ctx; SSL *ssl; TLS_IO_INSTANCE* tls_io_instance = p; LogInfo("OpenSSL thread start..."); { LogInfo("create SSL context"); /* Codes_SRS_TLSIO_SSL_ESP8266_99_085: [ If SSL_CTX_new failed, the tlsio_openssl_open shall return __LINE__. ] */ ctx = SSL_CTX_new(TLSv1_client_method()); if (ctx == NULL) { result = __LINE__; LogError("create new SSL CTX failed"); } else { tls_io_instance->ssl_context = ctx; LogInfo("set SSL context read buffer size"); SSL_CTX_set_default_read_buffer_len(ctx, OPENSSL_FRAGMENT_SIZE); // LogInfo("create socket ......"); // LogInfo("size before creating socket: %d", system_get_free_heap_size()); /* Codes_SRS_TLSIO_SSL_ESP8266_99_080: [ If socket failed, the tlsio_openssl_open shall return __LINE__. ] */ sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { result = __LINE__; LogError("create socket failed"); } else { int keepAlive = 1; //enable keepalive int keepIdle = 20; //20s int keepInterval = 2; //2s int keepCount = 3; //retry # of times tls_io_instance->sock = sock; LogInfo("sock: %d", sock); LogInfo("create socket OK"); LogInfo("set socket keep-alive "); ret = 0; ret = ret || setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&keepAlive, sizeof(keepAlive)); ret = ret || setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&keepIdle, sizeof(keepIdle)); ret = ret || setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&keepInterval, sizeof(keepInterval)); ret = ret || setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, (void *)&keepCount, sizeof(keepCount)); if (ret != 0){ result = __LINE__; LogError("set socket keep-alive failed, ret = %d ", ret); } else { LogInfo("set socket keep-alive OK"); lwip_set_non_block(sock); LogInfo("bind socket ......"); memset(&sock_addr, 0, sizeof(sock_addr)); sock_addr.sin_family = AF_INET; sock_addr.sin_addr.s_addr = 0; sock_addr.sin_port = 0; // random local port /* Codes_SRS_TLSIO_SSL_ESP8266_99_082: [ If bind failed, the tlsio_openssl_open shall return __LINE__. ] */ ret = bind(sock, (struct sockaddr*)&sock_addr, sizeof(sock_addr)); // LogInfo("bind return: %d", ret); if (ret != 0) { result = __LINE__; LogError("bind socket failed"); } else { LogInfo("bind socket OK"); memset(&sock_addr, 0, sizeof(sock_addr)); sock_addr.sin_family = AF_INET; sock_addr.sin_addr.s_addr = tls_io_instance->target_ip.addr; sock_addr.sin_port = (in_port_t)htons(tls_io_instance->port); ret = connect(sock, (struct sockaddr*)&sock_addr, sizeof(sock_addr)); //LogInfo("connect return: %d %s", ret, ip_ntoa(&tls_io_instance->target_ip)); //LogInfo("EINPROGRESS: %d", EINPROGRESS); if (ret == -1) { ret = lwip_net_errno(sock); LogInfo("lwip_net_errno ret: %d", ret); /* Codes_SRS_TLSIO_SSL_ESP8266_99_083: [ If connect and getsockopt failed, the tlsio_openssl_open shall return __LINE__. ] */ if (ret != 115) { // EINPROGRESS result = __LINE__; ret = -1; LogError("socket connect failed, not EINPROGRESS %s", tls_io_instance->hostname); } } if(ret != -1) { FD_ZERO(&readset); FD_ZERO(&writeset); FD_ZERO(&errset); FD_SET(sock, &readset); FD_SET(sock, &writeset); FD_SET(sock, &errset); ret = lwip_select(sock + 1, NULL, &writeset, &errset, NULL); if (ret <= 0) { result = __LINE__; LogError("select failed: %d", lwip_net_errno(sock)); } else { if (!FD_ISSET(sock, &writeset) || FD_ISSET(sock, &errset)) { result = __LINE__; LogError("socket Error: %d", lwip_net_errno(sock)); }else { { LogInfo("Socket Connect OK"); /* Codes_SRS_TLSIO_SSL_ESP8266_99_087: [ If SSL_new failed, the tlsio_openssl_open shall return __LINE__. ] */ ssl = SSL_new(ctx); //LogInfo("after ssl new"); if (ssl == NULL) { result = __LINE__; LogError("create ssl failed"); } else { tls_io_instance->ssl = ssl; // LogInfo("SSL set fd"); /* Codes_SRS_TLSIO_SSL_ESP8266_99_088: [ If SSL_set_fd failed, the tlsio_openssl_open shall return __LINE__. ] */ ret = SSL_set_fd(ssl, sock); LogInfo("SSL_set_fd ret:%d", ret); if (ret != 1){ result = __LINE__; LogError("SSL_set_fd failed"); } else{ int retry_connect = 0; int connect_succeeded = false; LogInfo("SSL connect... "); FD_ZERO(&readset); FD_SET(sock, &readset); FD_ZERO(&writeset); FD_SET(sock, &writeset); FD_ZERO(&errset); FD_SET(sock, &errset); /* Codes_SRS_TLSIO_SSL_ESP8266_99_027: [ The tlsio_openssl_open shall set the tlsio to try to open the connection for MAX_RETRY times before assuming that connection failed. ]*/ while (retry_connect < MAX_RETRY) { int ssl_state; ret = lwip_select(sock + 1, &readset, &writeset, &errset, &timeout); if (ret == 0) { result = __LINE__; LogInfo("SSL connect timeout"); break; } if (FD_ISSET(sock, &errset)) { unsigned int len; result = __LINE__; LogInfo("error return : %d", lwip_net_errno(sock)); len = (unsigned int) sizeof( int ); if (0 != getsockopt (sock, SOL_SOCKET, SO_ERROR, &ret, &len)) LogInfo("SSL error ret : %d", ret); // socket is in error state break; } ret = SSL_connect(ssl); if (ret == 1) { // ssl connect success connect_succeeded = true; break; } FD_ZERO(&readset); FD_ZERO(&writeset); FD_ZERO(&errset); FD_SET(sock, &errset); ssl_state = SSL_get_error(ssl, ret); if (ssl_state == SSL_ERROR_WANT_READ) { FD_SET(sock, &readset); } else if(ssl_state == SSL_ERROR_WANT_WRITE) { FD_SET(sock, &writeset); } else { LogInfo("SSL state:%d", ssl_state); result = __LINE__; break; } retry_connect = retry_connect + 1; //LogInfo("SSL connect retry: %d", retry_connect); os_delay_us(RETRY_DELAY); } /* Codes_SRS_TLSIO_SSL_ESP8266_99_089: [ If SSL_connect failed, the tlsio_openssl_open shall return __LINE__. ] */ if (connect_succeeded == false) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_042: [ If the tlsio_openssl_open retry SSL_connect to open more than MAX_RETRY times without success, it shall return __LINE__. ]*/ result = __LINE__; LogError("SSL_connect failed"); }else{ LogInfo("SSL connect ok"); result = 0; } } } } } } } } } } } } //LogInfo("openssl_thread_LWIP_CONNECTION end: %d", system_get_free_heap_size()); if(result!=0){ tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; } return result; } static int decode_ssl_received_bytes(TLS_IO_INSTANCE* tls_io_instance) { int result; /* Codes_SRS_TLSIO_SSL_ESP8266_99_075: [ The tlsio_openssl_dowork shall create a buffer to store the data received from the ssl client. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_076: [ The tlsio_openssl_dowork shall delete the buffer to store the data received from the ssl client. ]*/ unsigned char buffer[RECEIVE_BUFFER_SIZE]; int rcv_bytes; rcv_bytes = SSL_read(tls_io_instance->ssl, buffer, sizeof(buffer)); // LogInfo("ssl_read: rcv_bytes %d", rcv_bytes); /* Codes_SRS_TLSIO_SSL_ESP8266_99_071: [ If there are no received data in the ssl client, the tlsio_openssl_dowork shall do nothing. ]*/ if (rcv_bytes >= 0) { result = 0; if (tls_io_instance->on_bytes_received == NULL) { LogError("NULL on_bytes_received."); } else { /* Codes_SRS_TLSIO_SSL_ESP8266_99_070: [ If there are received data in the ssl client, the tlsio_openssl_dowork shall read this data and call the on_bytes_received with the pointer to the buffer with the data. ]*/ tls_io_instance->on_bytes_received(tls_io_instance->on_bytes_received_context, buffer, rcv_bytes); } } else{ result = __LINE__; } return result; } static int destroy_openssl_instance(TLS_IO_INSTANCE* tls_io_instance) { int result = 0; //LogInfo("destroy openssl begin: %d", system_get_free_heap_size()); if (tls_io_instance != NULL) { if (tls_io_instance->ssl != NULL) { SSL_free(tls_io_instance->ssl); tls_io_instance->ssl = NULL; LogInfo("SSL_free"); } if (tls_io_instance->sock >= 0) { int close_ret = close(tls_io_instance->sock); if (close_ret != 0){ result = __LINE__;; LogError("close socket failed"); } LogInfo("close socket"); } if (tls_io_instance->ssl_context != NULL) { SSL_CTX_free(tls_io_instance->ssl_context); tls_io_instance->ssl_context = NULL; LogInfo("SSL_ctx_free"); } //LogInfo("destroy end: %d", system_get_free_heap_size()); } return result; } /* Codes_SRS_TLSIO_SSL_ESP8266_99_005: [ The tlsio_ssl_esp8266 shall received the connection information using the TLSIO_CONFIG structure defined in `tlsio.h`. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_009: [ The tlsio_openssl_create shall create a new instance of the tlsio for esp8266. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_017: [ The tlsio_openssl_create shall receive the connection configuration (TLSIO_CONFIG). ]*/ CONCRETE_IO_HANDLE tlsio_openssl_create(void* io_create_parameters) { //LogInfo("tlsio_openssl_create begin: %d", system_get_free_heap_size()); /* Codes_SRS_TLSIO_SSL_ESP8266_99_005: [ The tlsio_ssl_esp8266 shall received the connection information using the TLSIO_CONFIG structure defined in `tlsio.h`. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_017: [ The tlsio_openssl_create shall receive the connection configuration (TLSIO_CONFIG). ]*/ TLSIO_CONFIG* tls_io_config = (TLSIO_CONFIG*)io_create_parameters; TLS_IO_INSTANCE* result; /* Codes_SRS_TLSIO_SSL_ESP8266_99_013: [ The tlsio_openssl_create shall return NULL when io_create_parameters is NULL. ]*/ if (tls_io_config == NULL) { result = NULL; LogError("NULL tls_io_config."); } else { /* Codes_SRS_TLSIO_SSL_ESP8266_99_011: [ The tlsio_openssl_create shall allocate memory to control the tlsio instance. ]*/ result = (TLS_IO_INSTANCE*) malloc(sizeof(TLS_IO_INSTANCE)); if (result == NULL) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_012: [ If there is not enough memory to create the tlsio, the tlsio_openssl_create shall return NULL as the handle. ]*/ LogError("Failed allocating TLSIO instance."); } else { memset(result, 0, sizeof(TLS_IO_INSTANCE)); mallocAndStrcpy_s(&result->hostname, tls_io_config->hostname); result->port = (int)tls_io_config->port; result->ssl_context = NULL; result->ssl = NULL; result->certificate = NULL; /* Codes_SRS_TLSIO_SSL_ESP8266_99_016: [ The tlsio_openssl_create shall initialize all callback pointers as NULL. ]*/ result->on_bytes_received = NULL; result->on_bytes_received_context = NULL; result->on_io_open_complete = NULL; result->on_io_open_complete_context = NULL; result->on_io_close_complete = NULL; result->on_io_close_complete_context = NULL; result->on_io_error = NULL; result->on_io_error_context = NULL; /* Codes_SRS_TLSIO_SSL_ESP8266_99_020: [ If tlsio_openssl_create get success to create the tlsio instance, it shall set the tlsio state as TLSIO_STATE_NOT_OPEN. ]*/ result->tlsio_state = TLSIO_STATE_NOT_OPEN; result->x509certificate = NULL; result->x509privatekey = NULL; } } /* Codes_SRS_TLSIO_SSL_ESP8266_99_010: [ The tlsio_openssl_create shall return a non-NULL handle on success. ]*/ return (CONCRETE_IO_HANDLE)result; } /* Codes_SRS_TLSIO_SSL_ESP8266_99_021: [ The tlsio_openssl_destroy shall destroy a created instance of the tlsio for esp8266 identified by the CONCRETE_IO_HANDLE. ]*/ void tlsio_openssl_destroy(CONCRETE_IO_HANDLE tls_io) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_SSL_ESP8266_99_024: [ If the tlsio_handle is NULL, the tlsio_openssl_destroy shall not do anything. ]*/ if (tls_io == NULL) { LogError("NULL tls_io."); } else { /* Codes_SRS_TLSIO_SSL_ESP8266_99_025: [ If the tlsio state is TLSIO_STATE_OPENING, TLSIO_STATE_OPEN, or TLSIO_STATE_CLOSING, the tlsio_openssl_destroy shall destroy the tlsio, but log an error. ]*/ if ((tls_io_instance->tlsio_state == TLSIO_STATE_OPENING) || (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN) || (tls_io_instance->tlsio_state == TLSIO_STATE_CLOSING)) { LogError("TLS destroyed with a SSL connection still active."); } /* Codes_SRS_TLSIO_SSL_ESP8266_99_022: [ The tlsio_openssl_destroy shall free all memory allocated for tlsio_instance. ]*/ if (tls_io_instance->certificate != NULL) { free(tls_io_instance->certificate); } if (tls_io_instance->hostname != NULL) { free(tls_io_instance->hostname); } if (tls_io_instance->x509certificate != NULL) { free((void*)tls_io_instance->x509certificate); } if (tls_io_instance->x509privatekey != NULL) { free((void*)tls_io_instance->x509privatekey); } /* Codes_SRS_TLSIO_SSL_ESP8266_99_021: [ The tlsio_openssl_destroy shall destroy a created instance of the tlsio for esp8266 identified by the CONCRETE_IO_HANDLE. ]*/ free(tls_io_instance); } //LogInfo("tlsio_openssl_destroy end: %d", system_get_free_heap_size()); } /* Codes_SRS_TLSIO_SSL_ESP8266_99_026: [ The tlsio_openssl_open shall start the process to open the ssl connection with the host provided in the tlsio_openssl_create. ]*/ int tlsio_openssl_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { //LogInfo("tlsio_openssl_open begin: %d", system_get_free_heap_size()); int result; if (tls_io == NULL) { /* Codes_TLSIO_SSL_ESP8266_99_036: [ If the tls_io handle is NULL, the tlsio_openssl_open shall not do anything, and return _LINE_. ]*/ result = __LINE__; LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_SSL_ESP8266_99_035: [ If the tlsio state is not TLSIO_STATE_NOT_OPEN and not TLSIO_STATE_ERROR, then tlsio_openssl_open shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_. ]*/ if (tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN && tls_io_instance->tlsio_state != TLSIO_STATE_ERROR) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; tls_io_instance->on_io_error = on_io_error; tls_io_instance->on_io_error_context = on_io_error_context; result = __LINE__; LogError("Invalid tlsio_state for open. Expected state is TLSIO_STATE_NOT_OPEN or TLSIO_STATE_ERROR."); if (tls_io_instance->on_io_error != NULL) { tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } } else { int netconn_retry = 0; int ret; /* Codes_SRS_TLSIO_SSL_ESP8266_99_004: [ The tlsio_ssl_esp8266 shall call the callbacks functions defined in the `xio.h`. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_006: [ The tlsio_ssl_esp8266 shall return the status of all async operations using the callbacks. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_007: [ If the callback function is set as NULL. The tlsio_ssl_esp8266 shall not call anything. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ]*/ tls_io_instance->on_io_open_complete = on_io_open_complete; /* Codes_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ]*/ tls_io_instance->on_io_open_complete_context = on_io_open_complete_context; /* Codes_SRS_TLSIO_SSL_ESP8266_99_030: [ The tlsio_openssl_open shall store the provided on_bytes_received callback function address. ]*/ tls_io_instance->on_bytes_received = on_bytes_received; /* Codes_SRS_TLSIO_SSL_ESP8266_99_031: [ The tlsio_openssl_open shall store the provided on_bytes_received_context handle. ]*/ tls_io_instance->on_bytes_received_context = on_bytes_received_context; /* Codes_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ]*/ tls_io_instance->on_io_error = on_io_error; /* Codes_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ]*/ tls_io_instance->on_io_error_context = on_io_error_context; tls_io_instance->tlsio_state = TLSIO_STATE_OPENING; do { //LogInfo("size before netconn_gethostbyname: %d", system_get_free_heap_size()); /* Codes_SRS_TLSIO_SSL_ESP8266_99_018: [ The tlsio_openssl_open shall convert the provide hostName to an IP address. ]*/ ret = netconn_gethostbyname(tls_io_instance->hostname, &tls_io_instance->target_ip); /* Codes_SRS_TLSIO_SSL_ESP8266_99_027: [ The tlsio_openssl_open shall set the tlsio to try to open the connection for MAX_RETRY times before assuming that connection failed. ]*/ } while((ret != 0) && netconn_retry++ < MAX_RETRY); /* Codes_SRS_TLSIO_SSL_ESP8266_99_019: [ If the WiFi cannot find the IP for the hostName, the tlsio_openssl_open shall return __LINE__. ]*/ if (ret != 0 || openssl_thread_LWIP_CONNECTION(tls_io_instance) != 0){ tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; /* Codes_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ]*/ indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); /* Codes_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ]*/ result = __LINE__; LogError("openssl_thread_LWIP_CONNECTION failed."); if (tls_io_instance->on_io_error != NULL) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ]*/ tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } }else{ /* Codes_SRS_TLSIO_SSL_ESP8266_99_034: [ If tlsio_openssl_open get success to open the ssl connection, it shall set the tlsio state as TLSIO_STATE_OPEN, and return 0. ]*/ tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; /* Codes_SRS_TLSIO_SSL_ESP8266_99_041: [ If the tlsio_openssl_open get success to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_OK. ]*/ indicate_open_complete(tls_io_instance, IO_OPEN_OK); result = 0; os_delay_us(5000000); //delay added to give reconnect time to send last message //LogInfo("tlsio_openssl_open end: %d", system_get_free_heap_size()); } } } return result; } /* Codes_SRS_TLSIO_SSL_ESP8266_99_043: [ The tlsio_openssl_close shall start the process to close the ssl connection. ]*/ int tlsio_openssl_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result; //LogInfo("tlsio_openssl_close begin: %d", system_get_free_heap_size()); LogInfo("tlsio_openssl_close"); if (tls_io == NULL) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_049: [ If the tlsio_handle is NULL, the tlsio_openssl_close shall not do anything, and return _LINE_. ]*/ result = __LINE__; LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_SSL_ESP8266_99_048: [ If the tlsio state is TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING, or TLSIO_STATE_CLOSING, the tlsio_openssl_close shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_. ]*/ if ((tls_io_instance->tlsio_state == TLSIO_STATE_NOT_OPEN) || (tls_io_instance->tlsio_state == TLSIO_STATE_CLOSING) || (tls_io_instance->tlsio_state == TLSIO_STATE_OPENING)) { result = __LINE__; tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; LogError("Invalid tlsio_state for close. Expected state is TLSIO_STATE_OPEN or TLSIO_STATE_ERROR."); } else { int ret; /* Codes_SRS_TLSIO_SSL_ESP8266_99_045: [ The tlsio_openssl_close shall store the provided on_io_close_complete callback function address. ]*/ tls_io_instance->on_io_close_complete = on_io_close_complete; /* Codes_SRS_TLSIO_SSL_ESP8266_99_046: [ The tlsio_openssl_close shall store the provided on_io_close_complete_context handle. ]*/ tls_io_instance->on_io_close_complete_context = callback_context; /* Codes_SRS_TLSIO_SSL_ESP8266_99_047: [ If tlsio_openssl_close get success to start the process to close the ssl connection, it shall set the tlsio state as TLSIO_STATE_CLOSING, and return 0. ]*/ tls_io_instance->tlsio_state = TLSIO_STATE_CLOSING; ret = destroy_openssl_instance(tls_io_instance); if (ret != 0) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_052: [ If tlsio_openssl_close fails to shutdown the ssl connection, it shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_, and call on_io_error. ]*/ result = __LINE__; tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; if (tls_io_instance->on_io_error != NULL) { tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } } else { /* Codes_SRS_TLSIO_SSL_ESP8266_99_050: [ If tlsio_openssl_close successfully destroys the ssl connection, it shall set the tlsio state as TLSIO_STATE_NOT_OPEN, and return 0. ]*/ tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = 0; if (tls_io_instance->on_io_close_complete != NULL) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_051: [ If tlsio_openssl_close successfully destroys the ssl connection, it shall call on_io_close_complete. ]*/ tls_io_instance->on_io_close_complete(tls_io_instance->on_io_close_complete_context); } } } } //LogInfo("tlsio_openssl_close end: %d", system_get_free_heap_size()); return result; } /* Codes_SRS_TLSIO_SSL_ESP8266_99_053: [ The tlsio_openssl_send shall send all bytes in a buffer to the ssl connection. ]*/ int tlsio_openssl_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if ((tls_io == NULL) || (buffer == NULL) || (size == 0)) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_060: [ If the tls_io handle is NULL, the tlsio_openssl_send shall not do anything, and return _LINE_. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_061: [ If the buffer is NULL, the tlsio_openssl_send shall not do anything, and return _LINE_. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_062: [ If the size is 0, the tlsio_openssl_send shall not do anything, and return _LINE_. ]*/ result = __LINE__; LogError("Invalid parameter."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_059: [ If the tlsio state is not TLSIO_STATE_OPEN, the tlsio_openssl_send shall return _LINE_. ]*/ result = __LINE__; LogError("TLS is not ready to send data. Expected state is TLSIO_STATE_OPEN."); //LogInfo("TLS is not ready to send data. Expected state is TLSIO_STATE_OPEN."); } else { int total_write = 0; int ret = 0; int need_sent_bytes = (int)size; fd_set writeset; fd_set errset; /* Codes_SRS_TLSIO_SSL_ESP8266_99_056: [ The ssl will continue to send all data in the buffer until all bytes have been sent. ]*/ while(need_sent_bytes > 0) { FD_ZERO(&writeset); FD_SET(tls_io_instance->sock, &writeset); FD_ZERO(&errset); FD_SET(tls_io_instance->sock, &errset); ret = lwip_select(tls_io_instance->sock + 1, NULL, &writeset, &errset, &timeout); if (ret == 0) { result = __LINE__; LogError("select timeout and no data to be write"); break; } else if (ret < 0 || FD_ISSET(tls_io_instance->sock, &errset)) { result = __LINE__; LogError("get error %d", lwip_net_errno(tls_io_instance->sock)); break; } ret = SSL_write(tls_io_instance->ssl, ((uint8*)buffer)+total_write, (int)size); // LogInfo("SSL_write ret: %d", ret); //LogInfo("SSL_write res: %d, size: %d, retry: %d", res, size, retry); if(ret > 0){ total_write += ret; need_sent_bytes = need_sent_bytes - ret; } else { result = __LINE__; LogError("SSL_write failed."); break; } } if (need_sent_bytes != 0) { LogInfo("ssl write failed, return [-0x%x]", -ret); ret = SSL_shutdown(tls_io_instance->ssl); LogInfo("SSL_shutdown ret: %d", ret); /* Codes_SRS_TLSIO_SSL_ESP8266_99_054: [ The tlsio_openssl_send shall use the provided on_io_send_complete callback function address. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_055: [ The tlsio_openssl_send shall use the provided on_io_send_complete_context handle. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_057: [ If the ssl was not able to send all the bytes in the buffer, the tlsio_openssl_send shall call the on_send_complete with IO_SEND_ERROR, and return _LINE_. ]*/ result = __LINE__; if (on_send_complete != NULL) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_003: [ The tlsio_ssl_esp8266 shall report the send operation status using the IO_SEND_RESULT enumerator defined in the `xio.h`. ]*/ on_send_complete(callback_context, IO_SEND_ERROR); } } else { result = 0; // LogInfo("SSL Write OK"); /* Codes_SRS_TLSIO_SSL_ESP8266_99_058: [ If the ssl finish to send all bytes in the buffer, then tlsio_openssl_send shall call the on_send_complete with IO_SEND_OK, and return 0 ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_054: [ The tlsio_openssl_send shall use the provided on_io_send_complete callback function address. ]*/ /* Codes_SRS_TLSIO_SSL_ESP8266_99_055: [ The tlsio_openssl_send shall use the provided on_io_send_complete_context handle. ]*/ if (on_send_complete != NULL) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_003: [ The tlsio_ssl_esp8266 shall report the send operation status using the IO_SEND_RESULT enumerator defined in the `xio.h`. ]*/ on_send_complete(callback_context, IO_SEND_OK); } } // LogInfo("total write: %d", total_write); } } return result; } /* Codes_SRS_TLSIO_SSL_ESP8266_99_063: [ The tlsio_openssl_dowork shall execute the async jobs for the tlsio. ]*/ void tlsio_openssl_dowork(CONCRETE_IO_HANDLE tls_io) { if (tls_io == NULL) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_074: [ If the tlsio handle is NULL, the tlsio_openssl_dowork shall not do anything. ]*/ LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN) { /* Codes_SRS_TLSIO_SSL_ESP8266_99_069: [ If the tlsio state is TLSIO_STATE_OPEN, the tlsio_openssl_dowork shall read data from the ssl client. ]*/ int ret = decode_ssl_received_bytes(tls_io_instance); if (ret != 0) { ret = SSL_shutdown(tls_io_instance->ssl); //LogInfo("SSL_shutdown ret: %d", ret); } } else { //LogError("Invalid tlsio_state for dowork. Expected state is TLSIO_STATE_OPEN."); } } } /* Codes_SRS_TLSIO_SSL_ESP8266_99_077: [ The tlsio_openssl_setoption shall not do anything, and return 0. ]*/ int tlsio_openssl_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) { (void)tls_io, (void)optionName, (void)value; /* Not implementing any options */ return 0; } /* Codes_SRS_TLSIO_SSL_ESP8266_99_008: [ The tlsio_openssl_get_interface_description shall return the VTable IO_INTERFACE_DESCRIPTION. ]*/ const IO_INTERFACE_DESCRIPTION* tlsio_openssl_get_interface_description(void) { return &tlsio_openssl_interface_description; } tlsio_wolfssl.c000066400000000000000000000726321362133436400341410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #define WOLFSSL_OPTIONS_IGNORE_SYS #include "wolfssl/options.h" #include "wolfssl/ssl.h" #include "wolfssl/error-ssl.h" #include "wolfssl/wolfcrypt/types.h" #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/tlsio_wolfssl.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/shared_util_options.h" typedef enum TLSIO_STATE_ENUM_TAG { TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING_UNDERLYING_IO, TLSIO_STATE_IN_HANDSHAKE, TLSIO_STATE_OPEN, TLSIO_STATE_CLOSING, TLSIO_STATE_ERROR } TLSIO_STATE_ENUM; typedef struct TLS_IO_INSTANCE_TAG { XIO_HANDLE socket_io; ON_BYTES_RECEIVED on_bytes_received; ON_IO_OPEN_COMPLETE on_io_open_complete; ON_IO_CLOSE_COMPLETE on_io_close_complete; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_open_complete_context; void* on_io_close_complete_context; void* on_io_error_context; WOLFSSL* ssl; WOLFSSL_CTX* ssl_context; TLSIO_STATE_ENUM tlsio_state; unsigned char* socket_io_read_bytes; size_t socket_io_read_byte_count; ON_SEND_COMPLETE on_send_complete; void* on_send_complete_callback_context; char* certificate; char* x509certificate; char* x509privatekey; int wolfssl_device_id; } TLS_IO_INSTANCE; STATIC_VAR_UNUSED const char* const OPTION_WOLFSSL_SET_DEVICE_ID = "SetDeviceId"; static const size_t SOCKET_READ_LIMIT = 5; /*this function will clone an option given by name and value*/ static void* tlsio_wolfssl_CloneOption(const char* name, const void* value) { void* result; if ((name == NULL) || (value == NULL)) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); result = NULL; } else { if (strcmp(name, OPTION_TRUSTED_CERT) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s TrustedCerts value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, SU_OPTION_X509_CERT) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s x509certificate value"); result = NULL; } else { /*return as is*/ } } else if (strcmp(name, SU_OPTION_X509_PRIVATE_KEY) == 0) { if (mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s x509privatekey value"); result = NULL; } else { /*return as is*/ } } else { LogError("not handled option : %s", name); result = NULL; } } return result; } /*this function destroys an option previously created*/ static void tlsio_wolfssl_DestroyOption(const char* name, const void* value) { /*since all options for this layer are actually string copies., disposing of one is just calling free*/ if ((name == NULL) || (value == NULL)) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); } else { if ((strcmp(name, OPTION_TRUSTED_CERT) == 0) || (strcmp(name, SU_OPTION_X509_CERT) == 0) || (strcmp(name, SU_OPTION_X509_PRIVATE_KEY) == 0)) { free((void*)value); } else { LogError("not handled option : %s", name); } } } static OPTIONHANDLER_HANDLE tlsio_wolfssl_retrieveoptions(CONCRETE_IO_HANDLE tls_io) { OPTIONHANDLER_HANDLE result; if (tls_io == NULL) { LogError("NULL tls_io parameter"); result = NULL; } else { result = OptionHandler_Create(tlsio_wolfssl_CloneOption, tlsio_wolfssl_DestroyOption, tlsio_wolfssl_setoption); if (result == NULL) { LogError("unable to OptionHandler_Create"); /*return as is*/ } else { /*this layer cares about the certificates and the x509 credentials*/ TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if ( (tls_io_instance->x509certificate != NULL) && (OptionHandler_AddOption(result, SU_OPTION_X509_CERT, tls_io_instance->x509certificate) != 0) ) { LogError("unable to save x509certificate option"); OptionHandler_Destroy(result); result = NULL; } else if ( (tls_io_instance->x509privatekey != NULL) && (OptionHandler_AddOption(result, SU_OPTION_X509_PRIVATE_KEY, tls_io_instance->x509privatekey) != 0) ) { LogError("unable to save x509privatekey option"); OptionHandler_Destroy(result); result = NULL; } else if ( (tls_io_instance->certificate != NULL) && (OptionHandler_AddOption(result, OPTION_TRUSTED_CERT, tls_io_instance->certificate) != 0) ) { LogError("unable to save TrustedCerts option"); OptionHandler_Destroy(result); result = NULL; } else { /*all is fine, all interesting options have been saved*/ /*return as is*/ } } } return result; } static const IO_INTERFACE_DESCRIPTION tlsio_wolfssl_interface_description = { tlsio_wolfssl_retrieveoptions, tlsio_wolfssl_create, tlsio_wolfssl_destroy, tlsio_wolfssl_open, tlsio_wolfssl_close, tlsio_wolfssl_send, tlsio_wolfssl_dowork, tlsio_wolfssl_setoption }; static void indicate_error(TLS_IO_INSTANCE* tls_io_instance) { if (tls_io_instance->on_io_error != NULL) { tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } } static void indicate_open_complete(TLS_IO_INSTANCE* tls_io_instance, IO_OPEN_RESULT open_result) { if (tls_io_instance->on_io_open_complete != NULL) { tls_io_instance->on_io_open_complete(tls_io_instance->on_io_open_complete_context, open_result); } } static int decode_ssl_received_bytes(TLS_IO_INSTANCE* tls_io_instance) { int result = 0; unsigned char buffer[64]; int rcv_bytes = 0; do { rcv_bytes = wolfSSL_read(tls_io_instance->ssl, buffer, sizeof(buffer)); if (rcv_bytes > 0) { if (tls_io_instance->on_bytes_received != NULL) { tls_io_instance->on_bytes_received(tls_io_instance->on_bytes_received_context, buffer, rcv_bytes); } } } while (rcv_bytes > 0); return result; } static void on_underlying_io_open_complete(void* context, IO_OPEN_RESULT open_result) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (open_result != IO_OPEN_OK) { LogError("Underlying IO open failed"); tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); } else { int res; tls_io_instance->tlsio_state = TLSIO_STATE_IN_HANDSHAKE; res = wolfSSL_connect(tls_io_instance->ssl); if (res != SSL_SUCCESS) { LogError("WolfSSL connect failed"); indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; } } } static void on_underlying_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { if (context != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; unsigned char* new_socket_io_read_bytes = (unsigned char*)realloc(tls_io_instance->socket_io_read_bytes, tls_io_instance->socket_io_read_byte_count + size); if (new_socket_io_read_bytes == NULL) { LogError("Failed allocating memory for received bytes"); tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); } else { tls_io_instance->socket_io_read_bytes = new_socket_io_read_bytes; (void)memcpy(tls_io_instance->socket_io_read_bytes + tls_io_instance->socket_io_read_byte_count, buffer, size); tls_io_instance->socket_io_read_byte_count += size; } } else { LogInfo("Supplied context is NULL on bytes_received"); } } static void on_underlying_io_error(void* context) { if (context != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; switch (tls_io_instance->tlsio_state) { default: LogError("Unknown TLS IO WolfSSL state: %d", (int)tls_io_instance->tlsio_state); break; case TLSIO_STATE_NOT_OPEN: case TLSIO_STATE_ERROR: break; case TLSIO_STATE_OPENING_UNDERLYING_IO: case TLSIO_STATE_IN_HANDSHAKE: tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_open_complete(tls_io_instance, IO_OPEN_ERROR); break; case TLSIO_STATE_OPEN: tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); break; } } else { LogInfo("Supplied context is NULL on io_error"); } } static void on_underlying_io_close_complete(void* context) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (tls_io_instance->tlsio_state != TLSIO_STATE_CLOSING) { LogError("on_underlying_io_close_complete called when not in CLOSING state"); } else { if (tls_io_instance->on_io_close_complete != NULL) { tls_io_instance->on_io_close_complete(tls_io_instance->on_io_close_complete_context); } tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; } } static int on_io_recv(WOLFSSL *ssl, char *buf, int sz, void *context) { int result; if (context != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; unsigned char* new_socket_io_read_bytes; size_t socket_reads = 0; AZURE_UNREFERENCED_PARAMETER(ssl); while (tls_io_instance->socket_io_read_byte_count == 0 && socket_reads < SOCKET_READ_LIMIT) { xio_dowork(tls_io_instance->socket_io); if (tls_io_instance->tlsio_state != TLSIO_STATE_IN_HANDSHAKE) { break; } socket_reads++; } result = tls_io_instance->socket_io_read_byte_count; if (result > sz) { result = sz; } if (result > 0) { (void)memcpy(buf, tls_io_instance->socket_io_read_bytes, result); (void)memmove(tls_io_instance->socket_io_read_bytes, tls_io_instance->socket_io_read_bytes + result, tls_io_instance->socket_io_read_byte_count - result); tls_io_instance->socket_io_read_byte_count -= result; if (tls_io_instance->socket_io_read_byte_count > 0) { new_socket_io_read_bytes = (unsigned char*)realloc(tls_io_instance->socket_io_read_bytes, tls_io_instance->socket_io_read_byte_count); if (new_socket_io_read_bytes != NULL) { tls_io_instance->socket_io_read_bytes = new_socket_io_read_bytes; } } else { free(tls_io_instance->socket_io_read_bytes); tls_io_instance->socket_io_read_bytes = NULL; } } if (tls_io_instance->tlsio_state == TLSIO_STATE_ERROR) { result = WOLFSSL_CBIO_ERR_GENERAL; } else if ( (result == 0) && (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN)) { result = WOLFSSL_CBIO_ERR_WANT_READ; } else if ((result == 0) && (tls_io_instance->tlsio_state == TLSIO_STATE_CLOSING || tls_io_instance->tlsio_state == TLSIO_STATE_NOT_OPEN)) { result = WOLFSSL_CBIO_ERR_CONN_CLOSE; } } else { result = WOLFSSL_CBIO_ERR_GENERAL; } return result; } static int on_io_send(WOLFSSL *ssl, char *buf, int sz, void *context) { int result; AZURE_UNREFERENCED_PARAMETER(ssl); TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (xio_send(tls_io_instance->socket_io, buf, sz, tls_io_instance->on_send_complete, tls_io_instance->on_send_complete_callback_context) != 0) { LogError("Failed sending bytes through underlying IO"); tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; indicate_error(tls_io_instance); result = 0; } else { result = sz; } return result; } static int on_handshake_done(WOLFSSL* ssl, void* context) { AZURE_UNREFERENCED_PARAMETER(ssl); TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)context; if (tls_io_instance->tlsio_state != TLSIO_STATE_IN_HANDSHAKE) { LogInfo("on_handshake_done called when not in IN_HANDSHAKE state"); } else { tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; indicate_open_complete(tls_io_instance, IO_OPEN_OK); } return 0; } static int add_certificate_to_store(TLS_IO_INSTANCE* tls_io_instance) { int result; if (tls_io_instance->certificate != NULL) { int res = wolfSSL_CTX_load_verify_buffer(tls_io_instance->ssl_context, (const unsigned char*)tls_io_instance->certificate, strlen(tls_io_instance->certificate), SSL_FILETYPE_PEM); if (res != SSL_SUCCESS) { LogError("wolfSSL_CTX_load_verify_buffer failed"); result = __FAILURE__; } else { result = 0; } } else { result = 0; } return result; } static int x509_wolfssl_add_credentials(WOLFSSL* ssl, char* x509certificate, char* x509privatekey) { int result; if (wolfSSL_use_certificate_chain_buffer(ssl, (unsigned char*)x509certificate, strlen(x509certificate)) != SSL_SUCCESS) { LogError("unable to load x509 client certificate"); result = __FAILURE__; } else if (wolfSSL_use_PrivateKey_buffer(ssl, (unsigned char*)x509privatekey, strlen(x509privatekey), SSL_FILETYPE_PEM) != SSL_SUCCESS) { LogError("unable to load x509 client private key"); result = __FAILURE__; } #ifdef HAVE_SECURE_RENEGOTIATION else if (wolfSSL_UseSecureRenegotiation(ssl) != SSL_SUCCESS) { LogError("unable to enable secure renegotiation"); result = __FAILURE__; } #endif else { result = 0; } return result; } static void destroy_wolfssl_instance(TLS_IO_INSTANCE* tls_io_instance) { wolfSSL_free(tls_io_instance->ssl); tls_io_instance->ssl = NULL; } static int create_wolfssl_instance(TLS_IO_INSTANCE* tls_io_instance) { int result; tls_io_instance->ssl = wolfSSL_new(tls_io_instance->ssl_context); if (tls_io_instance->ssl == NULL) { LogError("Failed to add certificates to store"); result = __FAILURE__; } else { tls_io_instance->socket_io_read_bytes = NULL; tls_io_instance->socket_io_read_byte_count = 0; tls_io_instance->on_send_complete = NULL; tls_io_instance->on_send_complete_callback_context = NULL; #ifdef INVALID_DEVID tls_io_instance->wolfssl_device_id = INVALID_DEVID; #endif wolfSSL_set_using_nonblock(tls_io_instance->ssl, 1); wolfSSL_SetHsDoneCb(tls_io_instance->ssl, on_handshake_done, tls_io_instance); wolfSSL_SetIOWriteCtx(tls_io_instance->ssl, tls_io_instance); wolfSSL_SetIOReadCtx(tls_io_instance->ssl, tls_io_instance); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = 0; } return result; } static int prepare_wolfssl_open(TLS_IO_INSTANCE* tls_io_instance) { int result; if (add_certificate_to_store(tls_io_instance) != 0) { LogError("Failed to add certificates to store"); result = __FAILURE__; } /*x509 authentication can only be build before underlying connection is realized*/ else if ((tls_io_instance->x509certificate != NULL) && (tls_io_instance->x509privatekey != NULL) && (x509_wolfssl_add_credentials(tls_io_instance->ssl, tls_io_instance->x509certificate, tls_io_instance->x509privatekey) != 0)) { destroy_wolfssl_instance(tls_io_instance); LogError("unable to use x509 authentication"); result = __FAILURE__; } #ifdef INVALID_DEVID else if (tls_io_instance->wolfssl_device_id != INVALID_DEVID && wolfSSL_SetDevId(tls_io_instance->ssl, tls_io_instance->wolfssl_device_id) != WOLFSSL_SUCCESS) { LogError("Failure setting device id"); result = __FAILURE__; } #endif else { result = 0; } return result; } int tlsio_wolfssl_init(void) { (void)wolfSSL_library_init(); wolfSSL_load_error_strings(); return 0; } void tlsio_wolfssl_deinit(void) { } CONCRETE_IO_HANDLE tlsio_wolfssl_create(void* io_create_parameters) { TLS_IO_INSTANCE* result; if (io_create_parameters == NULL) { LogError("NULL io_create_parameters"); result = NULL; } else { TLSIO_CONFIG* tls_io_config = io_create_parameters; result = (TLS_IO_INSTANCE*)malloc(sizeof(TLS_IO_INSTANCE)); if (result == NULL) { LogError("Failed allocating memory for the TLS IO instance."); } else { (void)memset(result, 0, sizeof(TLS_IO_INSTANCE)); result->tlsio_state = TLSIO_STATE_NOT_OPEN; result->ssl_context = wolfSSL_CTX_new(wolfTLSv1_2_client_method()); if (result->ssl_context == NULL) { LogError("Cannot create the wolfSSL context"); free(result); result = NULL; } else { // Set the recv and send function on the wolfssl context object wolfSSL_SetIOSend(result->ssl_context, on_io_send); wolfSSL_SetIORecv(result->ssl_context, on_io_recv); SOCKETIO_CONFIG socketio_config; const IO_INTERFACE_DESCRIPTION* underlying_io_interface; void* io_interface_parameters; if (tls_io_config->underlying_io_interface != NULL) { underlying_io_interface = tls_io_config->underlying_io_interface; io_interface_parameters = tls_io_config->underlying_io_parameters; } else { socketio_config.hostname = tls_io_config->hostname; socketio_config.port = tls_io_config->port; socketio_config.accepted_socket = NULL; underlying_io_interface = socketio_get_interface_description(); io_interface_parameters = &socketio_config; } if (underlying_io_interface == NULL) { LogError("Failed getting socket IO interface description."); wolfSSL_CTX_free(result->ssl_context); free(result); result = NULL; } else { result->socket_io = xio_create(underlying_io_interface, io_interface_parameters); if (result->socket_io == NULL) { LogError("Failure connecting to underlying socket_io"); wolfSSL_CTX_free(result->ssl_context); free(result); result = NULL; } else if (create_wolfssl_instance(result) != 0) { LogError("Failure connecting to underlying socket_io"); wolfSSL_CTX_free(result->ssl_context); free(result); result = NULL; } } } } } return result; } void tlsio_wolfssl_destroy(CONCRETE_IO_HANDLE tls_io) { if (tls_io != NULL) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->socket_io_read_bytes != NULL) { free(tls_io_instance->socket_io_read_bytes); tls_io_instance->socket_io_read_bytes = NULL; } if (tls_io_instance->certificate != NULL) { free(tls_io_instance->certificate); tls_io_instance->certificate = NULL; } if (tls_io_instance->x509certificate != NULL) { free(tls_io_instance->x509certificate); tls_io_instance->x509certificate = NULL; } if (tls_io_instance->x509privatekey != NULL) { free(tls_io_instance->x509privatekey); tls_io_instance->x509privatekey = NULL; } destroy_wolfssl_instance(tls_io_instance); wolfSSL_CTX_free(tls_io_instance->ssl_context); tls_io_instance->ssl_context = NULL; xio_destroy(tls_io_instance->socket_io); free(tls_io); } } int tlsio_wolfssl_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; if (tls_io == NULL) { LogError("NULL tls_io instance"); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) { LogError("Invalid state encountered."); result = __FAILURE__; } else { tls_io_instance->on_bytes_received = on_bytes_received; tls_io_instance->on_bytes_received_context = on_bytes_received_context; tls_io_instance->on_io_open_complete = on_io_open_complete; tls_io_instance->on_io_open_complete_context = on_io_open_complete_context; tls_io_instance->on_io_error = on_io_error; tls_io_instance->on_io_error_context = on_io_error_context; tls_io_instance->tlsio_state = TLSIO_STATE_OPENING_UNDERLYING_IO; if (prepare_wolfssl_open(tls_io_instance) != 0) { LogError("Cannot create wolfssl instance."); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = __FAILURE__; } else if (xio_open(tls_io_instance->socket_io, on_underlying_io_open_complete, tls_io_instance, on_underlying_io_bytes_received, tls_io_instance, on_underlying_io_error, tls_io_instance) != 0) { LogError("Cannot open the underlying IO."); tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; result = __FAILURE__; } else { // The state can get changed in the on_underlying_io_open_complete if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { LogError("Failed to connect to server. The certificates may not be correct."); result = __FAILURE__; } else { result = 0; } } } } return result; } int tlsio_wolfssl_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result = 0; if (tls_io == NULL) { LogError("NULL tls_io handle."); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if ((tls_io_instance->tlsio_state == TLSIO_STATE_NOT_OPEN) || (tls_io_instance->tlsio_state == TLSIO_STATE_CLOSING)) { LogError("Close called while not open."); result = __FAILURE__; } else { tls_io_instance->tlsio_state = TLSIO_STATE_CLOSING; tls_io_instance->on_io_close_complete = on_io_close_complete; tls_io_instance->on_io_close_complete_context = callback_context; if (xio_close(tls_io_instance->socket_io, on_underlying_io_close_complete, tls_io_instance) != 0) { LogError("xio_close failed."); result = __FAILURE__; } else { result = 0; } } } return result; } int tlsio_wolfssl_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if (tls_io == NULL || buffer == NULL || size == 0) { LogError("Invalid parameter specified tls_io: %p, buffer: %p, size: %ul", tls_io, buffer, (unsigned int)size); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { LogError("send called while not open"); result = __FAILURE__; } else { tls_io_instance->on_send_complete = on_send_complete; tls_io_instance->on_send_complete_callback_context = callback_context; int res = wolfSSL_write(tls_io_instance->ssl, buffer, size); if ((res < 0) || ((size_t)res != size)) // Best way I can think of to safely compare an int to a size_t { LogError("Error writing data through WolfSSL"); result = __FAILURE__; } else { result = 0; } } } return result; } void tlsio_wolfssl_dowork(CONCRETE_IO_HANDLE tls_io) { if (tls_io == NULL) { LogError("NULL tls_io"); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if ((tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) && (tls_io_instance->tlsio_state != TLSIO_STATE_ERROR)) { decode_ssl_received_bytes(tls_io_instance); xio_dowork(tls_io_instance->socket_io); } } } static int process_option(char** destination, const char* name, const char* value) { int result; if (*destination != NULL) { free(*destination); *destination = NULL; } if (mallocAndStrcpy_s(destination, value) != 0) { LogError("unable to process option %s",name); result = __FAILURE__; } else { result = 0; } return result; } int tlsio_wolfssl_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) { int result; if (tls_io == NULL || optionName == NULL) { LogError("Bad arguments, tls_io = %p, optionName = %p", tls_io, optionName); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (strcmp(OPTION_TRUSTED_CERT, optionName) == 0) { result = process_option(&tls_io_instance->certificate, optionName, value); } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { result = process_option(&tls_io_instance->x509certificate, optionName, value); } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { result = process_option(&tls_io_instance->x509privatekey, optionName, value); } #ifdef INVALID_DEVID else if (strcmp(OPTION_WOLFSSL_SET_DEVICE_ID, optionName) == 0) { int device_id = *((int *)value); if (tls_io_instance->ssl != NULL) { if (tls_io_instance->ssl != NULL && wolfSSL_SetDevId(tls_io_instance->ssl, device_id) != WOLFSSL_SUCCESS) { LogError("Failure setting device id on ssl"); result = __FAILURE__; } else { result = 0; } } else { // Save the id till we create the ssl object tls_io_instance->wolfssl_device_id = device_id; result = 0; } } #endif else { if (tls_io_instance->socket_io == NULL) { LogError("NULL underlying IO handle"); result = __FAILURE__; } else { result = xio_setoption(tls_io_instance->socket_io, optionName, value); } } } return result; } const IO_INTERFACE_DESCRIPTION* tlsio_wolfssl_get_interface_description(void) { return &tlsio_wolfssl_interface_description; } uniqueid_linux.c000066400000000000000000000022521362133436400342670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include "azure_c_shared_utility/uniqueid.h" #include "azure_c_shared_utility/xlogging.h" DEFINE_ENUM_STRINGS(UNIQUEID_RESULT, UNIQUEID_RESULT_VALUES); UNIQUEID_RESULT UniqueId_Generate(char* uid, size_t len) { UNIQUEID_RESULT result; /* Codes_SRS_UNIQUEID_07_002: [If uid is NULL then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ /* Codes_SRS_UNIQUEID_07_003: [If len is less then 37 then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ if (uid == NULL || len < 37) { result = UNIQUEID_INVALID_ARG; LogError("Buffer Size is Null. (result = %s)", ENUM_TO_STRING(UNIQUEID_RESULT, result)); } else { uuid_t uuidVal; uuid_generate(uuidVal); /* Codes_SRS_UNIQUEID_07_001: [UniqueId_Generate shall create a unique Id 36 character long string.] */ memset(uid, 0, len); uuid_unparse(uuidVal, uid); result = UNIQUEID_OK; } return result; } uniqueid_stub.c000066400000000000000000000050521362133436400341060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/uniqueid.h" #include "azure_c_shared_utility/xlogging.h" #include DEFINE_ENUM_STRINGS(UNIQUEID_RESULT, UNIQUEID_RESULT_VALUES); static const char tochar[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; static void generate128BitUUID(unsigned char* arrayOfByte) { size_t arrayIndex; for (arrayIndex = 0; arrayIndex < 16; arrayIndex++) { arrayOfByte[arrayIndex] = (unsigned char)rand(); } // // Stick in the version field for random uuid. // arrayOfByte[7] &= 0x0f; //clear the bit field arrayOfByte[7] |= 0x40; //set the ones we care about // // Stick in the variant field for the random uuid. // arrayOfByte[8] &= 0xf3; // Clear arrayOfByte[8] |= 0x08; // Set } // TODO: The User will need to call srand before calling this function UNIQUEID_RESULT UniqueId_Generate(char* uid, size_t len) { UNIQUEID_RESULT result; unsigned char arrayOfChar[16]; /* Codes_SRS_UNIQUEID_07_002: [If uid is NULL then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ /* Codes_SRS_UNIQUEID_07_003: [If len is less then 37 then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ if (uid == NULL || len < 37) { result = UNIQUEID_INVALID_ARG; LogError("Buffer Size is Null or length is less then 37 bytes"); } else { size_t arrayIndex; size_t shiftCount; size_t characterPosition = 0; /* Codes_SRS_UNIQUEID_07_001: [UniqueId_Generate shall create a unique Id 36 character long string.] */ generate128BitUUID(arrayOfChar); for (arrayIndex = 0; arrayIndex < 16; arrayIndex++) { for (shiftCount = 0; shiftCount <= 1; shiftCount++) { char hexChar = tochar[arrayOfChar[arrayIndex] & 0xf]; if ((characterPosition == 8) || (characterPosition == 13) || (characterPosition == 18) || (characterPosition == 23)) { uid[characterPosition] = '-'; characterPosition++; } uid[characterPosition] = hexChar; characterPosition++; arrayOfChar[arrayIndex] = arrayOfChar[arrayIndex] >> 4; } } uid[characterPosition] = 0; result = UNIQUEID_OK; } return result; } uniqueid_win32.c000066400000000000000000000036561362133436400341030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/uniqueid.h" #include "azure_c_shared_utility/xlogging.h" #include DEFINE_ENUM_STRINGS(UNIQUEID_RESULT, UNIQUEID_RESULT_VALUES); UNIQUEID_RESULT UniqueId_Generate(char* uid, size_t len) { UNIQUEID_RESULT result; /* Codes_SRS_UNIQUEID_07_002: [If uid is NULL then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ /* Codes_SRS_UNIQUEID_07_003: [If len is less then 37 then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ if (uid == NULL || len < 37) { result = UNIQUEID_INVALID_ARG; LogError("Buffer Size is Null or length is less then 37 bytes"); } else { UUID uuidVal; RPC_STATUS status = UuidCreate(&uuidVal); if (status != RPC_S_OK && status != RPC_S_UUID_LOCAL_ONLY) { LogError("Unable to aquire unique Id"); result = UNIQUEID_ERROR; } else { unsigned char* randomResult; status = UuidToStringA(&uuidVal, &randomResult); if (status != RPC_S_OK) { LogError("Unable to convert Id to string"); result = UNIQUEID_ERROR; } else { size_t cpyLen; /* Codes_SRS_UNIQUEID_07_001: [UniqueId_Generate shall create a unique Id 36 character long string.] */ memset(uid, 0, len); cpyLen = strlen((char*)randomResult); if (cpyLen > len - 1) { cpyLen = len - 1; } (void)memcpy(uid, randomResult, len); RpcStringFreeA(&randomResult); result = UNIQUEID_OK; } } } return result; } x509_openssl.c000066400000000000000000000341051362133436400334770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/x509_openssl.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/const_defines.h" #include "openssl/bio.h" #include "openssl/rsa.h" #include "openssl/x509.h" #include "openssl/pem.h" #include "openssl/err.h" #ifdef __APPLE__ #ifndef EVP_PKEY_id #define EVP_PKEY_id(evp_key) evp_key->type #endif // EVP_PKEY_id #endif // __APPLE__ static void log_ERR_get_error(const char* message) { char buf[128]; AZURE_UNREFERENCED_PARAMETER(buf); unsigned long error; int i; if (message != NULL) { LogError("%s", message); } error = ERR_get_error(); for (i = 0; 0 != error; i++) { LogError(" [%d] %s", i, ERR_error_string(error, buf)); error = ERR_get_error(); } } static int load_certificate_chain(SSL_CTX* ssl_ctx, const char* certificate) { int result; BIO* bio_cert; X509* x509_value; if ((bio_cert = BIO_new_mem_buf((char*)certificate, -1)) == NULL) { log_ERR_get_error("cannot create BIO"); result = __FAILURE__; } else { /* Codes_SRS_X509_OPENSSL_07_005: [ x509_openssl_add_ecc_credentials shall load the cert chain by calling PEM_read_bio_X509_AUX and SSL_CTX_use_certification. ] */ if ((x509_value = PEM_read_bio_X509_AUX(bio_cert, NULL, NULL, NULL)) == NULL) { log_ERR_get_error("Failure PEM_read_bio_X509_AUX"); result = __FAILURE__; } else { if (SSL_CTX_use_certificate(ssl_ctx, x509_value) != 1) { log_ERR_get_error("Failure PEM_read_bio_X509_AUX"); result = __FAILURE__; } else { X509* ca_chain; result = 0; // If we could set up our certificate, now proceed to the CA // certificates. /* Codes_SRS_X509_OPENSSL_07_006: [ If successful x509_openssl_add_ecc_credentials shall to import each certificate in the cert chain. ] */ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) SSL_CTX_clear_extra_chain_certs(ssl_ctx); #else if (ssl_ctx->extra_certs != NULL) { sk_X509_pop_free(ssl_ctx->extra_certs, X509_free); ssl_ctx->extra_certs = NULL; } #endif while ((ca_chain = PEM_read_bio_X509(bio_cert, NULL, NULL, NULL)) != NULL) { if (SSL_CTX_add_extra_chain_cert(ssl_ctx, ca_chain) != 1) { X509_free(ca_chain); result = __FAILURE__; break; } } if (result != 0) { // When the while loop ends, it's usually just EOF. unsigned long err_value = ERR_peek_last_error(); if (ERR_GET_LIB(err_value) == ERR_LIB_PEM && ERR_GET_REASON(err_value) == PEM_R_NO_START_LINE) { ERR_clear_error(); result = 0; } else { result = __FAILURE__; } } } X509_free(x509_value); } BIO_free(bio_cert); } /* Codes_SRS_X509_OPENSSL_07_007: [ If any failure is encountered x509_openssl_add_ecc_credentials shall return a non-zero value. ] */ return result; } static int load_ecc_key(SSL_CTX* ssl_ctx, EVP_PKEY* evp_key) { int result; /* Codes_SRS_X509_OPENSSL_07_004: [ x509_openssl_add_ecc_credentials shall import the certification using by the EVP_PKEY. ] */ if (SSL_CTX_use_PrivateKey(ssl_ctx, evp_key) != 1) { LogError("Failed SSL_CTX_use_PrivateKey"); result = __FAILURE__; } else { result = 0; } /* Codes_SRS_X509_OPENSSL_07_007: [ If any failure is encountered x509_openssl_add_ecc_credentials shall return a non-zero value. ] */ return result; } static int load_key_RSA(SSL_CTX* ssl_ctx, EVP_PKEY* evp_key) { int result; /*Codes_SRS_X509_OPENSSL_02_005: [ x509_openssl_add_credentials shall use PEM_read_bio_RSAPrivateKey to read the x509 private key. ]*/ RSA* privatekey = EVP_PKEY_get1_RSA(evp_key); if (privatekey == NULL) { /*Codes_SRS_X509_OPENSSL_02_009: [ Otherwise x509_openssl_add_credentials shall fail and return a non-zero number. ]*/ log_ERR_get_error("Failure reading RSA private key"); result = __FAILURE__; } else { /*Codes_SRS_X509_OPENSSL_02_007: [ x509_openssl_add_credentials shall use SSL_CTX_use_RSAPrivateKey to load the private key into the SSL context. ]*/ if (SSL_CTX_use_RSAPrivateKey(ssl_ctx, privatekey) != 1) { /*Codes_SRS_X509_OPENSSL_02_009: [ Otherwise x509_openssl_add_credentials shall fail and return a non-zero number. ]*/ log_ERR_get_error("Failure calling SSL_CTX_use_RSAPrivateKey"); result = __FAILURE__; } else { /*all is fine*/ /*Codes_SRS_X509_OPENSSL_02_008: [ If no error occurs, then x509_openssl_add_credentials shall succeed and return 0. ]*/ result = 0; } RSA_free(privatekey); } return result; } int x509_openssl_add_credentials(SSL_CTX* ssl_ctx, const char* x509certificate, const char* x509privatekey) { int result; if (ssl_ctx == NULL || x509certificate == NULL || x509privatekey == NULL) { /*Codes_SRS_X509_OPENSSL_02_009: [ Otherwise x509_openssl_add_credentials shall fail and return a non-zero number. ]*/ LogError("invalid parameter detected: ssl_ctx=%p, x509certificate=%p, x509privatekey=%p", ssl_ctx, x509certificate, x509privatekey); result = __FAILURE__; } else { BIO* bio_key = BIO_new_mem_buf((char*)x509privatekey, -1); /*taking off the const from the pointer is needed on older versions of OPENSSL*/ if (bio_key == NULL) { log_ERR_get_error("cannot create private key BIO"); result = __FAILURE__; } else { // Get the Private Key type EVP_PKEY* evp_key = PEM_read_bio_PrivateKey(bio_key, NULL, NULL, NULL); if (evp_key == NULL) { log_ERR_get_error("Failure creating private key evp_key"); result = __FAILURE__; } else { // Check the type for the EVP key int evp_type = EVP_PKEY_id(evp_key); if (evp_type == EVP_PKEY_RSA || evp_type == EVP_PKEY_RSA2) { if (load_key_RSA(ssl_ctx, evp_key) != 0) { LogError("failure loading RSA private key cert"); result = __FAILURE__; } else { result = 0; } } else { if (load_ecc_key(ssl_ctx, evp_key) != 0) { LogError("failure loading ECC private key cert"); result = __FAILURE__; } else { result = 0; } } if (result == 0) { // Load the certificate chain if (load_certificate_chain(ssl_ctx, x509certificate) != 0) { LogError("failure loading private key cert"); result = __FAILURE__; } else { result = 0; } } EVP_PKEY_free(evp_key); } BIO_free(bio_key); } } return result; } /*return 0 if everything was ok, any other number to signal an error*/ /*this function inserts a x509certificate+x509privatekey to a SSL_CTX (ssl context) in order to authenticate the device with the service*/ int x509_openssl_add_certificates(SSL_CTX* ssl_ctx, const char* certificates) { int result; /*Codes_SRS_X509_OPENSSL_02_010: [ If ssl_ctx is NULL then x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ /*Codes_SRS_X509_OPENSSL_02_011: [ If certificates is NULL then x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ if ((certificates == NULL) || (ssl_ctx == NULL)) { /*Codes_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ LogError("invalid argument SSL_CTX* ssl_ctx=%p, const char* certificates=%s", ssl_ctx, P_OR_NULL(certificates)); result = __FAILURE__; } else { X509_STORE* cert_store = SSL_CTX_get_cert_store(ssl_ctx); if (cert_store == NULL) { /*Codes_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ log_ERR_get_error("failure in SSL_CTX_get_cert_store."); result = __FAILURE__; } else { /*Codes_SRS_X509_OPENSSL_02_012: [ x509_openssl_add_certificates shall get the memory BIO method function by calling BIO_s_mem. ]*/ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) const BIO_METHOD* bio_method; #else BIO_METHOD* bio_method; #endif bio_method = BIO_s_mem(); if (bio_method == NULL) { /*Codes_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ log_ERR_get_error("failure in BIO_s_mem"); result = __FAILURE__; } else { /*Codes_SRS_X509_OPENSSL_02_013: [ x509_openssl_add_certificates shall create a new memory BIO by calling BIO_new. ]*/ BIO* cert_memory_bio = BIO_new(bio_method); if (cert_memory_bio == NULL) { /*Codes_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ log_ERR_get_error("failure in BIO_new"); result = __FAILURE__; } else { /*Codes_SRS_X509_OPENSSL_02_014: [ x509_openssl_add_certificates shall load certificates into the memory BIO by a call to BIO_puts. ]*/ int puts_result = BIO_puts(cert_memory_bio, certificates); if ((puts_result<0) || (puts_result != (int)strlen(certificates))) { /*Codes_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ log_ERR_get_error("failure in BIO_puts"); result = __FAILURE__; } else { X509* certificate; /*Codes_SRS_X509_OPENSSL_02_015: [ x509_openssl_add_certificates shall retrieve each certificate by a call to PEM_read_bio_X509. ]*/ while ((certificate = PEM_read_bio_X509(cert_memory_bio, NULL, NULL, NULL)) != NULL) { /*Codes_SRS_X509_OPENSSL_02_016: [ x509_openssl_add_certificates shall add the certificate to the store by a call to X509_STORE_add_cert. ]*/ if (!X509_STORE_add_cert(cert_store, certificate)) { /*Codes_SRS_X509_OPENSSL_02_017: [ If X509_STORE_add_cert returns with error and that error is X509_R_CERT_ALREADY_IN_HASH_TABLE then x509_openssl_add_certificates shall ignore it as the certificate is already in the store. ]*/ /*if the certificate is already in the store, then ERR_peek_error would return REASON == X509_R_CERT_ALREADY_IN_HASH_TABLE, so that's no a "real" error*/ unsigned long error = ERR_peek_error(); if (ERR_GET_REASON(error) == X509_R_CERT_ALREADY_IN_HASH_TABLE) { /*not an error*/ } else { /*Codes_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ log_ERR_get_error("failure in X509_STORE_add_cert"); X509_free(certificate); break; } } X509_free(certificate); } if (certificate == NULL) { /*Codes_SRS_X509_OPENSSL_02_019: [ Otherwise, x509_openssl_add_certificates shall succeed and return 0. ]*/ result = 0;/*all is fine*/ } else { /*previous while loop terminated unfortunately*/ /*Codes_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ result = __FAILURE__; } } BIO_free(cert_memory_bio); } } } } return result; } x509_schannel.c000066400000000000000000000470651362133436400336200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/adapters// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "windows.h" #ifdef WINCE #include #endif #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/x509_schannel.h" #include "azure_c_shared_utility/xlogging.h" #if _MSC_VER > 1500 && !defined(WINCE) #include #endif #define KEY_NAME L"AzureAliasKey" #define ECC_256_MAGIC_NUMBER 0x20 #define ECC_384_MAGIC_NUMBER 0x30 typedef enum x509_CERT_TYPE_TAG { x509_TYPE_RSA, x509_TYPE_ECC, x509_TYPE_UNKNOWN, } x509_CERT_TYPE; typedef struct X509_SCHANNEL_HANDLE_DATA_TAG { HCRYPTPROV hProv; HCRYPTKEY x509hcryptkey; PCCERT_CONTEXT x509certificate_context; x509_CERT_TYPE cert_type; } X509_SCHANNEL_HANDLE_DATA; static unsigned char* convert_cert_to_binary(const char* crypt_value, DWORD* crypt_length) { unsigned char* result; DWORD result_length; if (!CryptStringToBinaryA(crypt_value, 0, CRYPT_STRING_ANY, NULL, &result_length, NULL, NULL)) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("Failed determine crypt value size"); result = NULL; } else { if ((result = (unsigned char*)malloc(result_length)) == NULL) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogError("unable to allocate memory for crypt value"); } else { if (!CryptStringToBinaryA(crypt_value, 0, CRYPT_STRING_ANY, result, &result_length, NULL, NULL)) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("Failed convert crypt value to binary"); free(result); result = NULL; } else { if (crypt_length != NULL) { *crypt_length = result_length; } } } } return result; } static unsigned char* decode_crypt_object(unsigned char* private_key, DWORD key_length, DWORD* blob_size, x509_CERT_TYPE* cert_type) { unsigned char* result; #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4306) #endif // _MSC_VER LPCSTR key_type = PKCS_RSA_PRIVATE_KEY; #ifdef _MSC_VER #pragma warning(pop) #endif // _MSC_VER DWORD private_key_blob_size = 0; /*Codes_SRS_X509_SCHANNEL_02_004: [ x509_schannel_create shall decode the private key by calling CryptDecodeObjectEx. ]*/ if (!CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, key_type, private_key, key_length, 0, NULL, NULL, &private_key_blob_size)) { #if _MSC_VER > 1500 && !defined(WINCE) key_type = X509_ECC_PRIVATE_KEY; if (!CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, key_type, private_key, key_length, 0, NULL, NULL, &private_key_blob_size)) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("Failed to CryptDecodeObjectEx x509 private key"); *cert_type = x509_TYPE_UNKNOWN; } else { *cert_type = x509_TYPE_ECC; } #else /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("Failed to CryptDecodeObjectEx x509 private key"); *cert_type = x509_TYPE_UNKNOWN; #endif } else { *cert_type = x509_TYPE_RSA; } if (*cert_type != x509_TYPE_UNKNOWN) { if ((result = (unsigned char*)malloc(private_key_blob_size)) == NULL) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogError("unable to malloc for x509 private key blob"); } else { if (!CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, key_type, private_key, key_length, 0, NULL, result, &private_key_blob_size)) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("Failed to CryptDecodeObjectEx x509 private key"); free(result); result = NULL; } else { if (blob_size != NULL) { *blob_size = private_key_blob_size; } } } } else { result = NULL; } return result; } static int set_ecc_certificate_info(X509_SCHANNEL_HANDLE_DATA* x509_handle, unsigned char* x509privatekeyBlob) { int result; #if _MSC_VER > 1500 && !defined(WINCE) SECURITY_STATUS status; CRYPT_BIT_BLOB* pPubKeyBlob = &x509_handle->x509certificate_context->pCertInfo->SubjectPublicKeyInfo.PublicKey; CRYPT_ECC_PRIVATE_KEY_INFO* pPrivKeyInfo = (CRYPT_ECC_PRIVATE_KEY_INFO*)x509privatekeyBlob; DWORD pubSize = pPubKeyBlob->cbData - 1; DWORD privSize = pPrivKeyInfo->PrivateKey.cbData; DWORD keyBlobSize = sizeof(BCRYPT_ECCKEY_BLOB) + pubSize + privSize; BYTE* pubKeyBuf = pPubKeyBlob->pbData + 1; BYTE* privKeyBuf = pPrivKeyInfo->PrivateKey.pbData; BCRYPT_ECCKEY_BLOB* pKeyBlob = (BCRYPT_ECCKEY_BLOB*)malloc(keyBlobSize); if (pKeyBlob == NULL) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogError("Failed to malloc NCrypt private key blob"); result = __FAILURE__; } else { pKeyBlob->dwMagic = privSize == ECC_256_MAGIC_NUMBER ? BCRYPT_ECDSA_PRIVATE_P256_MAGIC : privSize == ECC_384_MAGIC_NUMBER ? BCRYPT_ECDSA_PRIVATE_P384_MAGIC : BCRYPT_ECDSA_PRIVATE_P521_MAGIC; pKeyBlob->cbKey = privSize; memcpy((BYTE*)(pKeyBlob + 1), pubKeyBuf, pubSize); memcpy((BYTE*)(pKeyBlob + 1) + pubSize, privKeyBuf, privSize); /* Codes_SRS_X509_SCHANNEL_02_005: [ x509_schannel_create shall call CryptAcquireContext. ] */ /* at this moment, both the private key and the certificate are decoded for further usage */ /* NOTE: As no WinCrypt key storage provider supports ECC keys, NCrypt is used instead */ status = NCryptOpenStorageProvider(&x509_handle->hProv, MS_KEY_STORAGE_PROVIDER, 0); if (status != ERROR_SUCCESS) { /* Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogError("NCryptOpenStorageProvider failed with error 0x%08X", status); result = __FAILURE__; } else { SECURITY_STATUS status2; NCryptBuffer ncBuf = { sizeof(KEY_NAME), NCRYPTBUFFER_PKCS_KEY_NAME, KEY_NAME }; NCryptBufferDesc ncBufDesc; ncBufDesc.ulVersion = 0; ncBufDesc.cBuffers = 1; ncBufDesc.pBuffers = &ncBuf; CRYPT_KEY_PROV_INFO keyProvInfo = { KEY_NAME, MS_KEY_STORAGE_PROVIDER, 0, 0, 0, NULL, 0 }; /*Codes_SRS_X509_SCHANNEL_02_006: [ x509_schannel_create shall import the private key by calling CryptImportKey. ] */ /*NOTE: As no WinCrypt key storage provider supports ECC keys, NCrypt is used instead*/ status = NCryptImportKey(x509_handle->hProv, 0, BCRYPT_ECCPRIVATE_BLOB, &ncBufDesc, &x509_handle->x509hcryptkey, (BYTE*)pKeyBlob, keyBlobSize, NCRYPT_OVERWRITE_KEY_FLAG); if (status == ERROR_SUCCESS) { status2 = NCryptFreeObject(x509_handle->x509hcryptkey); if (status2 != ERROR_SUCCESS) { LogError("NCryptFreeObject for key handle failed with error 0x%08X", status2); } else { x509_handle->x509hcryptkey = 0; } } status2 = NCryptFreeObject(x509_handle->hProv); if (status2 != ERROR_SUCCESS) { LogError("NCryptFreeObject for provider handle failed with error 0x%08X", status2); } else { x509_handle->hProv = 0; } if (status != ERROR_SUCCESS) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogError("NCryptImportKey failed with error 0x%08X", status); result = __FAILURE__; } else if (!CertSetCertificateContextProperty(x509_handle->x509certificate_context, CERT_KEY_PROV_INFO_PROP_ID, 0, &keyProvInfo)) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("CertSetCertificateContextProperty failed to set NCrypt key handle property"); result = __FAILURE__; } else { result = 0; } } free(pKeyBlob); } #else (void)x509_handle; (void)x509privatekeyBlob; LogError("SChannel ECC is not supported in this compliation"); result = __FAILURE__; #endif return result; } static int set_rsa_certificate_info(X509_SCHANNEL_HANDLE_DATA* x509_handle, unsigned char* x509privatekeyBlob, DWORD x509privatekeyBlobSize) { int result; /*Codes_SRS_X509_SCHANNEL_02_005: [ x509_schannel_create shall call CryptAcquireContext. ]*/ /*at this moment, both the private key and the certificate are decoded for further usage*/ if (!CryptAcquireContext(&(x509_handle->hProv), NULL, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("CryptAcquireContext failed"); result = __FAILURE__; } else { /*Codes_SRS_X509_SCHANNEL_02_006: [ x509_schannel_create shall import the private key by calling CryptImportKey. ] */ if (!CryptImportKey(x509_handle->hProv, x509privatekeyBlob, x509privatekeyBlobSize, (HCRYPTKEY)NULL, 0, &(x509_handle->x509hcryptkey))) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("CryptImportKey for private key failed"); if (!CryptReleaseContext(x509_handle->hProv, 0)) { LogErrorWinHTTPWithGetLastErrorAsString("unable to CryptReleaseContext"); } result = __FAILURE__; } else { /*Codes_SRS_X509_SCHANNEL_02_008: [ x509_schannel_create shall call set the certificate private key by calling CertSetCertificateContextProperty. ]*/ if (!CertSetCertificateContextProperty(x509_handle->x509certificate_context, CERT_KEY_PROV_HANDLE_PROP_ID, 0, (void*)x509_handle->hProv)) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("unable to CertSetCertificateContextProperty"); if (!CryptDestroyKey(x509_handle->x509hcryptkey)) { LogErrorWinHTTPWithGetLastErrorAsString("unable to CryptDestroyKey"); } if (!CryptReleaseContext(x509_handle->hProv, 0)) { LogErrorWinHTTPWithGetLastErrorAsString("unable to CryptReleaseContext"); } result = __FAILURE__; } else { result = 0; } } } return result; } X509_SCHANNEL_HANDLE x509_schannel_create(const char* x509certificate, const char* x509privatekey) { X509_SCHANNEL_HANDLE_DATA* result; /*this is what happens with the x509 certificate and the x509 private key in this function*/ /* step 1: they are converted to binary form. step 1.1: the size of the binary form is computed step 1.2: the conversion happens step 2: the binary form is decoded step 2.1: the decoded form needed size is computed step 2.2: the decoded form is actually decoded step 3: a crypto provider is created step 4: the x509 private key is associated with the crypto provider step 5: a certificate context is created step 6: the certificate context is linked to the crypto provider */ /*Codes_SRS_X509_SCHANNEL_02_001: [ If x509certificate or x509privatekey are NULL then x509_schannel_create shall fail and return NULL. ]*/ if ( (x509certificate == NULL) || (x509privatekey == NULL) ) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogError("invalid argument const char* x509certificate=%p, const char* x509privatekey=%p", x509certificate, x509privatekey); result = NULL; } else { unsigned char* binaryx509Certificate; unsigned char* binaryx509privatekey; unsigned char* x509privatekeyBlob; DWORD binaryx509certificateSize; DWORD binaryx509privatekeySize; DWORD x509privatekeyBlobSize; result = (X509_SCHANNEL_HANDLE_DATA*)malloc(sizeof(X509_SCHANNEL_HANDLE_DATA)); if (result == NULL) { LogError("unable to malloc"); /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ /*return as is*/ } else { memset(result, 0, sizeof(X509_SCHANNEL_HANDLE_DATA)); /*Codes_SRS_X509_SCHANNEL_02_002: [ x509_schannel_create shall convert the certificate to binary form by calling CryptStringToBinaryA. ]*/ if ((binaryx509Certificate = convert_cert_to_binary(x509certificate, &binaryx509certificateSize)) == NULL) { LogError("Failure converting x509 certificate"); free(result); result = NULL; } /*Codes_SRS_X509_SCHANNEL_02_003: [ x509_schannel_create shall convert the private key to binary form by calling CryptStringToBinaryA. ]*/ /*at this moment x509 certificate is ready to be used in CertCreateCertificateContext*/ else if ((binaryx509privatekey = convert_cert_to_binary(x509privatekey, &binaryx509privatekeySize)) == NULL) { LogError("Failure converting x509 certificate"); free(binaryx509Certificate); free(result); result = NULL; } else if ((x509privatekeyBlob = decode_crypt_object(binaryx509privatekey, binaryx509privatekeySize, &x509privatekeyBlobSize, &result->cert_type)) == NULL) { LogError("Failure decoding x509 private key"); free(binaryx509Certificate); free(binaryx509privatekey); free(result); result = NULL; } else { /*Codes_SRS_X509_SCHANNEL_02_007: [ x509_schannel_create shall create a cerficate context by calling CertCreateCertificateContext. ]*/ PCCERT_CONTEXT cert_ctx = CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, binaryx509Certificate, binaryx509certificateSize); if ((result->x509certificate_context = cert_ctx) == NULL) { /*Codes_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ LogErrorWinHTTPWithGetLastErrorAsString("unable to CertCreateCertificateContext"); free(result); result = NULL; } else { /* Codes_SRS_X509_SCHANNEL_07_001: [ x509_schannel_create shall determine whether the certificate is of type RSA or ECC. ] */ if (result->cert_type == x509_TYPE_RSA) { if (set_rsa_certificate_info(result, x509privatekeyBlob, x509privatekeyBlobSize) != 0) { (void)CertFreeCertificateContext(result->x509certificate_context); free(result); result = NULL; } } else { if (set_ecc_certificate_info(result, x509privatekeyBlob) != 0) { (void)CertFreeCertificateContext(result->x509certificate_context); free(result); result = NULL; } } } free(x509privatekeyBlob); free(binaryx509privatekey); free(binaryx509Certificate); } } } return result; } void x509_schannel_destroy(X509_SCHANNEL_HANDLE x509_schannel_handle) { /*Codes_SRS_X509_SCHANNEL_02_011: [ If parameter x509_schannel_handle is NULL then x509_schannel_destroy shall do nothing. ]*/ if (x509_schannel_handle != NULL) { /*Codes_SRS_X509_SCHANNEL_02_012: [ Otherwise, x509_schannel_destroy shall free all used resources. ]*/ X509_SCHANNEL_HANDLE_DATA* x509crypto = (X509_SCHANNEL_HANDLE_DATA*)x509_schannel_handle; if (x509crypto->cert_type == x509_TYPE_RSA) { if (!CryptDestroyKey(x509crypto->x509hcryptkey)) { LogErrorWinHTTPWithGetLastErrorAsString("unable to CryptDestroyKey"); } if (!CryptReleaseContext(x509crypto->hProv, 0)) { LogErrorWinHTTPWithGetLastErrorAsString("unable to CryptReleaseContext"); } } else { #if _MSC_VER > 1500 && !defined(WINCE) if (x509crypto->x509hcryptkey != 0) { (void)NCryptFreeObject(x509crypto->x509hcryptkey); } if (x509crypto->hProv != 0) { (void)NCryptFreeObject(x509crypto->hProv); } #endif } if (!CertFreeCertificateContext(x509crypto->x509certificate_context)) { LogErrorWinHTTPWithGetLastErrorAsString("unable to CertFreeCertificateContext"); } free(x509crypto); } } PCCERT_CONTEXT x509_schannel_get_certificate_context(X509_SCHANNEL_HANDLE x509_schannel_handle) { PCCERT_CONTEXT result; if (x509_schannel_handle == NULL) { /*Codes_SRS_X509_SCHANNEL_02_013: [ If parameter x509_schannel_handle is NULL then x509_schannel_get_certificate_context shall return NULL. ]*/ result = NULL; } else { /*Codes_SRS_X509_SCHANNEL_02_014: [ Otherwise, x509_schannel_get_certificate_context shall return a non-NULL PCCERT_CONTEXT pointer. ]*/ X509_SCHANNEL_HANDLE_DATA* handleData = (X509_SCHANNEL_HANDLE_DATA*)x509_schannel_handle; result = handleData->x509certificate_context; } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/archive/000077500000000000000000000000001362133436400307555ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/archive/cyclonessl/000077500000000000000000000000001362133436400331335ustar00rootroot00000000000000CMakeLists-cyclone.txt000066400000000000000000000103431362133436400372470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/archive/cyclonessl## CycloneSSL is NOT supported for the Azure C shared utilities. ## The code here is provided for reference purposes. ## ## A security audit is required if you attempt to bring this code back. ## The code below is the parts are from CMakeLists.txt that integrated CycloneSSL into the build. option(use_cyclonessl "set use_cyclonessl to ON if cyclonessl is to be used, set to OFF to not use cyclonessl" OFF) if(${use_cyclonessl} AND WIN32) set(cyclonessl_c_files $ENV{CycloneSSLDir}/cyclone_ssl/ssl_common.c $ENV{CycloneSSLDir}/cyclone_ssl/tls.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_cache.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_cipher_suites.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_client.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_common.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_io.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_misc.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_record.c $ENV{CycloneSSLDir}/cyclone_ssl/tls_server.c $ENV{CycloneSSLDir}/common/date_time.c $ENV{CycloneSSLDir}/common/debug.c $ENV{CycloneSSLDir}/common/endian.c $ENV{CycloneSSLDir}/common/os_port_windows.c $ENV{CycloneSSLDir}/cyclone_crypto/aes.c $ENV{CycloneSSLDir}/cyclone_crypto/aria.c $ENV{CycloneSSLDir}/cyclone_crypto/asn1.c $ENV{CycloneSSLDir}/cyclone_crypto/base64.c $ENV{CycloneSSLDir}/cyclone_crypto/camellia.c $ENV{CycloneSSLDir}/cyclone_crypto/chacha.c $ENV{CycloneSSLDir}/cyclone_crypto/chacha20_poly1305.c $ENV{CycloneSSLDir}/cyclone_crypto/cipher_mode_cbc.c $ENV{CycloneSSLDir}/cyclone_crypto/cipher_mode_ccm.c $ENV{CycloneSSLDir}/cyclone_crypto/cipher_mode_gcm.c $ENV{CycloneSSLDir}/cyclone_crypto/des.c $ENV{CycloneSSLDir}/cyclone_crypto/des3.c $ENV{CycloneSSLDir}/cyclone_crypto/dh.c $ENV{CycloneSSLDir}/cyclone_crypto/dsa.c $ENV{CycloneSSLDir}/cyclone_crypto/ec.c $ENV{CycloneSSLDir}/cyclone_crypto/ec_curves.c $ENV{CycloneSSLDir}/cyclone_crypto/ecdh.c $ENV{CycloneSSLDir}/cyclone_crypto/ecdsa.c $ENV{CycloneSSLDir}/cyclone_crypto/hmac.c $ENV{CycloneSSLDir}/cyclone_crypto/idea.c $ENV{CycloneSSLDir}/cyclone_crypto/md5.c $ENV{CycloneSSLDir}/cyclone_crypto/mpi.c $ENV{CycloneSSLDir}/cyclone_crypto/oid.c $ENV{CycloneSSLDir}/cyclone_crypto/pem.c $ENV{CycloneSSLDir}/cyclone_crypto/poly1305.c $ENV{CycloneSSLDir}/cyclone_crypto/rc4.c $ENV{CycloneSSLDir}/cyclone_crypto/rsa.c $ENV{CycloneSSLDir}/cyclone_crypto/seed.c $ENV{CycloneSSLDir}/cyclone_crypto/sha1.c $ENV{CycloneSSLDir}/cyclone_crypto/sha224.c $ENV{CycloneSSLDir}/cyclone_crypto/sha256.c $ENV{CycloneSSLDir}/cyclone_crypto/sha384.c $ENV{CycloneSSLDir}/cyclone_crypto/sha512.c $ENV{CycloneSSLDir}/cyclone_crypto/x509.c $ENV{CycloneSSLDir}/cyclone_crypto/yarrow.c ) include_directories($ENV{CycloneSSLDir}/common/) include_directories($ENV{CycloneSSLDir}/cyclone_ssl/) include_directories($ENV{CycloneSSLDir}/cyclone_crypto/) include_directories($ENV{CycloneSSLDir}/demo/x86/ssl_client_demo/src/) set_source_files_properties(${cyclonessl_c_files} PROPERTIES COMPILE_FLAGS "/wd4200 /wd4201 /wd4244 /wd4100 /wd4267 /wd4701 /wd4703 /wd4389 /wd4005") set_source_files_properties(./src/tlsio_cyclonessl.c ./src/tlsio_cyclonessl_socket_bsd.c PROPERTIES COMPILE_FLAGS "/wd4200 /wd4201 /wd4244 /wd4100 /wd4267 /wd4701 /wd4703 /wd4389 /wd4005 /wd4996") add_library(cyclonessl ${cyclonessl_c_files}) endif() if(${use_cyclonessl} AND WIN32) set(source_c_files ${source_c_files} ./src/tlsio_cyclonessl.c ./src/tlsio_cyclonessl_socket_bsd.c ) endif() if(${use_cyclonessl} AND WIN32) set(source_h_files ${source_h_files} ./inc/azure_c_shared_utility/tlsio_cyclonessl.h ./inc/azure_c_shared_utility/tlsio_cyclonessl_socket.h ) endif() if(${use_cyclonessl}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DUSE_CYCLONESSL") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CYCLONESSL") endif() if(${use_cyclonessl} AND WIN32) set(aziotsharedutil_target_libs ${aziotsharedutil_target_libs} cyclonessl) endif() readme.md000066400000000000000000000002721362133436400346340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/archive/cyclonessl**CycloneSSL is NOT supported for the Azure C shared utilities.** The code here is provided for reference purposes. A security audit is required if you attempt to bring this code back.tlsio_cyclonessl.c000066400000000000000000000741061362133436400366200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/archive/cyclonessl// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #error CycloneSSL is NOT supported for the Azure C shared utilities. #error The code here is provided for reference purposes. #error #error A security audit is required if you attempt to bring this code back. #include /* Using tlsio_cyclonessl requires: - Downloading the source code for CycloneSSL. - If using cmake, defining the environment variable CycloneSSLDir to point to the location of the unpacked CycloneSSL source - Using the use_cyclonessl cmake option Alternately if cmake is not used, one has to make sure that the CycloneSSL headers are in the include directlroy list. */ #if _WIN32 #define _WINERROR_ #include #endif #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/tlsio_cyclonessl.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "error.h" #include "yarrow.h" #include "tls.h" #include "azure_c_shared_utility/tlsio_cyclonessl_socket.h" typedef enum TLSIO_STATE_TAG { TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPEN, TLSIO_STATE_ERROR } TLSIO_STATE; typedef struct TLS_IO_INSTANCE_TAG { ON_BYTES_RECEIVED on_bytes_received; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_error_context; TLSIO_STATE tlsio_state; char* hostname; int port; char* certificate; YarrowContext yarrowContext; TlsContext *tlsContext; TlsSocket socket; } TLS_IO_INSTANCE; static int tlsio_cyclonessl_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context); /*this function will clone an option given by name and value*/ static void* tlsio_cyclonessl_clone_option(const char* name, const void* value) { void* result; /* Codes_SRS_TLSIO_CYCLONESSL_01_070: [ If the name or value arguments are NULL, tlsio_cyclonessl_clone_option shall return NULL. ]*/ if((name == NULL) || (value == NULL)) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); result = NULL; } else { if (strcmp(name, "TrustedCerts") == 0) { /* Codes_SRS_TLSIO_CYCLONESSL_01_071: [ tlsio_cyclonessl_clone_option shall clone the option named `TrustedCerts` by calling mallocAndStrcpy_s. ]*/ if(mallocAndStrcpy_s((char**)&result, value) != 0) { LogError("unable to mallocAndStrcpy_s TrustedCerts value"); result = NULL; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_072: [ On success it shall return a non-NULL pointer to the cloned option. ]*/ /*return as is*/ } } else { LogError("not handled option : %s", name); result = NULL; } } return result; } /*this function destroys an option previously created*/ static void tlsio_cyclonessl_destroy_option(const char* name, const void* value) { /*since all options for this layer are actually string copies., disposing of one is just calling free*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_074: [ If any of the arguments is NULL, tlsio_cyclonessl_destroy_option shall do nothing. ]*/ if ((name == NULL) || (value == NULL)) { LogError("invalid parameter detected: const char* name=%p, const void* value=%p", name, value); } else { if (strcmp(name, "TrustedCerts") == 0) { free((void*)value); } else { LogError("not handled option : %s", name); } } } /* Codes_SRS_TLSIO_CYCLONESSL_01_001: [ tlsio_cyclonessl_create shall create a new instance of the tlsio for Cyclone SSL. ]*/ static CONCRETE_IO_HANDLE tlsio_cyclonessl_create(void* io_create_parameters) { TLS_IO_INSTANCE* result; /* Codes_SRS_TLSIO_CYCLONESSL_01_002: [ If io_create_parameters is NULL, tlsio_cyclonessl_create shall fail and return NULL. ]*/ if (io_create_parameters == NULL) { result = NULL; LogError("NULL tls_io_config."); } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_003: [ io_create_parameters shall be used as a TLSIO_CONFIG\*. ]*/ TLSIO_CONFIG* tls_io_config = io_create_parameters; /* Codes_SRS_TLSIO_CYCLONESSL_01_004: [ If the hostname member is NULL, then tlsio_cyclonessl_create shall fail and return NULL. ]*/ if (tls_io_config->hostname == NULL) { result = NULL; LogError("NULL hostname in the TLS IO configuration."); } else { result = malloc(sizeof(TLS_IO_INSTANCE)); if (result == NULL) { /* Codes_SRS_TLSIO_CYCLONESSL_01_076: [ If allocating memory for the TLS IO instance fails then tlsio_cyclonessl_create shall fail and return NULL. ]*/ LogError("Failed allocating TLSIO instance."); } else { uint8_t seed[32]; size_t i; /* Codes_SRS_TLSIO_CYCLONESSL_01_005: [ tlsio_cyclonessl_create shall copy the hostname and port values for later use when the open of the underlying socket is needed. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_006: [ hostname shall be copied by calling mallocAndStrcpy_s. ]*/ if (mallocAndStrcpy_s(&result->hostname, tls_io_config->hostname) != 0) { /* Codes_SRS_TLSIO_CYCLONESSL_01_007: [ If mallocAndStrcpy_s fails then tlsio_cyclonessl_create shall fail and return NULL. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_018: [ When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. ]*/ LogError("Failed to copy the hostname."); free(result); result = NULL; } else { result->port = tls_io_config->port; result->certificate = NULL; result->on_bytes_received = NULL; result->on_bytes_received_context = NULL; result->on_io_error = NULL; result->on_io_error_context = NULL; result->tlsio_state = TLSIO_STATE_NOT_OPEN; result->socket = (TlsSocket)NULL; /* seed should be initialized with some random seed ... */ for (i = 0; i < 32; i++) { seed[i] = rand() * 255 / RAND_MAX; } /* Codes_SRS_TLSIO_CYCLONESSL_01_008: [ tlsio_cyclonessl_create shall initialize the yarrow context by calling yarrowInit. ]*/ if (yarrowInit(&result->yarrowContext) != NO_ERROR) { /* Codes_SRS_TLSIO_CYCLONESSL_01_009: [ If yarrowInit fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_018: [ When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. ]*/ LogError("yarrowInit failed"); free(result->hostname); free(result); result = NULL; } /* Codes_SRS_TLSIO_CYCLONESSL_01_010: [ The yarrow context shall be seeded with 32 bytes of randomly chosen data by calling yarrowSeed. ]*/ else if (yarrowSeed(&result->yarrowContext, seed, sizeof(seed)) != NO_ERROR) { /* Codes_SRS_TLSIO_CYCLONESSL_01_011: [ If yarrowSeed fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_018: [ When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. ]*/ LogError("yarrowInit seed failed"); yarrowRelease(&result->yarrowContext); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_012: [ tlsio_cyclonessl_create shall create a TLS context by calling tlsInit. ]*/ result->tlsContext = tlsInit(); if (result->tlsContext == NULL) { /* Codes_SRS_TLSIO_CYCLONESSL_01_013: [ If tlsInit fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_018: [ When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. ]*/ tlsFree(result->tlsContext); yarrowRelease(&result->yarrowContext); free(result->hostname); free(result); LogError("Creating the TLS context failed"); result = NULL; } /* Codes_SRS_TLSIO_CYCLONESSL_01_014: [ The TLS context shall be setup to operate as a client by calling tlsSetConnectionEnd with TLS_CONNECTION_END_CLIENT. ]*/ else if (tlsSetConnectionEnd(result->tlsContext, TLS_CONNECTION_END_CLIENT)) { /* Codes_SRS_TLSIO_CYCLONESSL_01_015: [ If tlsSetConnectionEnd fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_018: [ When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. ]*/ tlsFree(result->tlsContext); yarrowRelease(&result->yarrowContext); free(result->hostname); free(result); LogError("tlsSetConnectionEnd failed"); result = NULL; } /* Codes_SRS_TLSIO_CYCLONESSL_01_016: [ The pseudo random number generator to be used shall be set by calling tlsSetPrng with the yarrow instance as argument. ]*/ else if (tlsSetPrng(result->tlsContext, YARROW_PRNG_ALGO, &result->yarrowContext) != NO_ERROR) { /* Codes_SRS_TLSIO_CYCLONESSL_01_017: [ If tlsSetPrng fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_018: [ When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. ]*/ tlsFree(result->tlsContext); yarrowRelease(&result->yarrowContext); free(result->hostname); free(result); LogError("tlsSetPrng failed"); result = NULL; } } } } } } return result; } static void tlsio_cyclonessl_destroy(CONCRETE_IO_HANDLE tls_io) { /* Codes_SRS_TLSIO_CYCLONESSL_01_020: [ If tls_io is NULL, tlsio_cyclonessl_destroy shall do nothing. ]*/ if (tls_io == NULL) { LogError("NULL tls_io."); } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_019: [ tlsio_cyclonessl_destroy shall free the tlsio CycloneSSL instance. ]*/ TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_CYCLONESSL_01_081: [ tlsio_cyclonessl_destroy should close the IO if it was open before freeing all the resources. ]*/ tlsio_cyclonessl_close(tls_io, NULL, NULL); /* Codes_SRS_TLSIO_CYCLONESSL_01_022: [ The TLS context shall be freed by calling tlsFree. ]*/ tlsFree(tls_io_instance->tlsContext); /* Codes_SRS_TLSIO_CYCLONESSL_01_021: [ tlsio_cyclonessl_destroy shall deinitialize the yarrow context by calling yarrowRelease. ]*/ yarrowRelease(&tls_io_instance->yarrowContext); /* Codes_SRS_TLSIO_CYCLONESSL_01_077: [ All options cached via tlsio_cyclonessl_set_option shall also be freed. ]*/ if (tls_io_instance->certificate != NULL) { free(tls_io_instance->certificate); } free(tls_io_instance->hostname); free(tls_io); } } static int tlsio_cyclonessl_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; /* Codes_SRS_TLSIO_CYCLONESSL_01_024: [ If any of the arguments tls_io, on_io_open_complete, on_bytes_received or on_io_error are NULL then tlsio_cyclonessl_open shall return a non-zero value. ]*/ if ((tls_io == NULL) || (on_io_open_complete == NULL) || (on_bytes_received == NULL) || (on_io_error == NULL)) { result = __FAILURE__; LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_CYCLONESSL_01_034: [ If tlsio_cyclonessl_open is called while the IO is open, tlsio_cyclonessl_open shall fail and return a non-zero value without performing any work to open the IO. ]*/ if (tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) { result = __FAILURE__; LogError("Invalid tlsio_state. Expected state is TLSIO_STATE_NOT_OPEN."); } else { tls_io_instance->on_bytes_received = on_bytes_received; tls_io_instance->on_bytes_received_context = on_bytes_received_context; tls_io_instance->on_io_error = on_io_error; tls_io_instance->on_io_error_context = on_io_error_context; /* Codes_SRS_TLSIO_CYCLONESSL_01_025: [ tlsio_cyclonessl_open shall create a socket by calling tlsio_cyclonessl_socket_create, while passing to it the hostname and port that were saved in the tlsio_cyclonessl_create. ]*/ if (tlsio_cyclonessl_socket_create(tls_io_instance->hostname, tls_io_instance->port, &tls_io_instance->socket) != 0) { /* Codes_SRS_TLSIO_CYCLONESSL_01_026: [ If tlsio_cyclonessl_socket_create fails, then tlsio_cyclonessl_open shall return a non-zero value. ]*/ LogError("Error: Cannot open socket"); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_027: [ The socket created by tlsio_cyclonessl_socket_create shall be assigned to the TLS context by calling tlsSetSocket. ]*/ if (tlsSetSocket(tls_io_instance->tlsContext, tls_io_instance->socket)) { /* Codes_SRS_TLSIO_CYCLONESSL_01_028: [ If tlsSetSocket fails then tlsio_cyclonessl_open shall return a non-zero value. ]*/ tlsio_cyclonessl_socket_destroy(tls_io_instance->socket); tls_io_instance->socket = (TlsSocket)NULL; LogError("Error: tlsSetSocket"); result = __FAILURE__; } else { unsigned char is_error = 0; if (tls_io_instance->certificate != NULL) { /* Codes_SRS_TLSIO_CYCLONESSL_01_078: [ If certificates have been set by using tlsio_cyclonessl_set_option then a call to tlsSetTrustedCaList shall be made to pass the certificates to CycloneSSL. ]*/ if (tlsSetTrustedCaList(tls_io_instance->tlsContext, tls_io_instance->certificate, strlen(tls_io_instance->certificate))) { is_error = 1; } } if (is_error) { /* Codes_SRS_TLSIO_CYCLONESSL_01_079: [ If tlsSetTrustedCaList fails then tlsio_cyclonessl_open shall return a non-zero value. ]*/ tlsio_cyclonessl_socket_destroy(tls_io_instance->socket); tls_io_instance->socket = (TlsSocket)NULL; LogError("tlsSetTrustedCaList failed"); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_031: [ tlsio_cyclonessl_open shall start the TLS handshake by calling tlsConnect. ]*/ if (tlsConnect(tls_io_instance->tlsContext)) { /* Codes_SRS_TLSIO_CYCLONESSL_01_032: [ If tlsConnect fails then tlsio_cyclonessl_open shall return a non-zero value. ]*/ tlsio_cyclonessl_socket_destroy(tls_io_instance->socket); tls_io_instance->socket = (TlsSocket)NULL; LogError("tlsConnect failed"); result = __FAILURE__; } else { tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; /* Codes_SRS_TLSIO_CYCLONESSL_01_033: [ If tlsConnect succeeds, the callback on_io_open_complete shall be called, while passing on_io_open_complete_context and IO_OPEN_OK as arguments. ]*/ on_io_open_complete(on_io_open_complete_context, IO_OPEN_OK); /* Codes_SRS_TLSIO_CYCLONESSL_01_023: [ tlsio_cyclonessl_open shall open the TLS io and on success it shall return 0. ]*/ result = 0; } } } } } } return result; } static int tlsio_cyclonessl_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) { int result = 0; if (tls_io == NULL) { LogError("NULL tls_io."); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_CYCLONESSL_01_041: [ If tlsio_cyclonessl_close is called when not open, tlsio_cyclonessl_close shall fail and return a non-zero value. ]*/ if (tls_io_instance->tlsio_state == TLSIO_STATE_NOT_OPEN) { result = __FAILURE__; LogError("Invalid tlsio_state. Expected state is TLSIO_STATE_NOT_OPEN or TLSIO_STATE_CLOSING."); } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_037: [ tlsio_cyclonessl_close shall close the TLS connection by calling tlsShutdown. ]*/ if (tlsShutdown(tls_io_instance->tlsContext)) { /* Codes_SRS_TLSIO_CYCLONESSL_01_038: [ If tlsShutdown fails, tlsio_cyclonessl_close shall fail and return a non-zero value. ]*/ LogError("tlsShutdown failed\r\n"); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_039: [ tlsio_cyclonessl_destroy shall destroy the underlying socket by calling tlsio_cyclonessl_socket_destroy. ]*/ tlsio_cyclonessl_socket_destroy(tls_io_instance->socket); tls_io_instance->socket = (TlsSocket)NULL; tls_io_instance->tlsio_state = TLSIO_STATE_NOT_OPEN; /* Codes_SRS_TLSIO_CYCLONESSL_01_040: [ On success, on_io_close_complete shall be called while passing as argument on_io_close_complete_context. ]*/ if (on_io_close_complete != NULL) { on_io_close_complete(on_io_close_complete_context); } /* Codes_SRS_TLSIO_CYCLONESSL_01_035: [ tlsio_cyclonessl_close shall close the TLS IO and on success it shall return 0. ]*/ result = 0; } } } return result; } static int tlsio_cyclonessl_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* on_send_complete_context) { int result; /* Codes_SRS_TLSIO_CYCLONESSL_01_043: [ If any of the arguments tls_io or buffer is NULL, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ if ((tls_io == NULL) || (buffer == NULL) || /* Codes_SRS_TLSIO_CYCLONESSL_01_044: [ If size is 0, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ (size == 0)) { LogError("NULL tls_io."); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_CYCLONESSL_01_048: [ If tlsio_cyclonessl_send is called when the IO is not open, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_049: [ If the IO is in an error state (an error was reported through the on_io_error callback), tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_056: [ Also the IO shall be considered in error and any subsequent calls to tlsio_cyclonessl_send shall fail. ]*/ if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { LogError("Invalid tlsio_state. Expected state is TLSIO_STATE_OPEN."); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_047: [ tlsio_cyclonessl_send shall send the bytes by calling tlsWrite and passing buffer and size as arguments. 0 shall be passed for the flags argument. ]*/ if (tlsWrite(tls_io_instance->tlsContext, buffer, size, 0) != 0) { LogError("SSL_write error."); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_045: [ on_send_complete shall be allowed to be NULL. ]*/ if (on_send_complete != NULL) { /* Codes_SRS_TLSIO_CYCLONESSL_01_046: [ On success, if a non-NULL value was passed for on_send_complete, then on_send_complete shall be called while passing to it the on_send_complete_context value. ]*/ on_send_complete(on_send_complete_context, IO_SEND_OK); } /* Codes_SRS_TLSIO_CYCLONESSL_01_042: [ tlsio_cyclonessl_send shall send the `size` bytes pointed to by `buffer` and on success it shall return 0. ]*/ result = 0; } } } return result; } static void tlsio_cyclonessl_dowork(CONCRETE_IO_HANDLE tls_io) { /* Codes_SRS_TLSIO_CYCLONESSL_01_051: [ If the tls_io argument is NULL, tlsio_cyclonessl_dowork shall do nothing. ]*/ if (tls_io == NULL) { LogError("NULL tls_io."); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_CYCLONESSL_01_052: [ If the IO is not open (no open has been called or the IO has been closed) then tlsio_cyclonessl_dowork shall do nothing. ]*/ if ((tls_io_instance->tlsio_state != TLSIO_STATE_NOT_OPEN) && (tls_io_instance->tlsio_state != TLSIO_STATE_ERROR)) { unsigned char buffer[64]; size_t received; /* Codes_SRS_TLSIO_CYCLONESSL_01_050: [ tlsio_cyclonessl_dowork shall check if any bytes are available to be read from the CycloneSSL library and indicate those bytes as received. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_053: [ If the IO is open, tlsio_cyclonessl_dowork shall attempt to read 64 bytes from the TLS library by calling tlsRead. ]*/ /* Codes_SRS_TLSIO_CYCLONESSL_01_054: [ The flags argument for tlsRead shall be 0. ]*/ if (tlsRead(tls_io_instance->tlsContext, buffer, sizeof(buffer), &received, 0) != 0) { /* Codes_SRS_TLSIO_CYCLONESSL_01_055: [ If tlsRead fails, the error shall be indicated by calling the on_io_error callback passed in tlsio_cyclonessl_open, while passing the on_io_error_context to the callback. ]*/ LogError("Error received bytes"); /* Codes_SRS_TLSIO_CYCLONESSL_01_055: [ If tlsRead fails, the error shall be indicated by calling the on_io_error callback passed in tlsio_cyclonessl_open, while passing the on_io_error_context to the callback. ]*/ tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } else { if (received > 0) { /* Codes_SRS_TLSIO_CYCLONESSL_01_080: [ If any bytes are read from CycloneSSL they should be indicated via the on_bytes_received callback passed to tlsio_cyclonessl_open. ]*/ tls_io_instance->on_bytes_received(tls_io_instance->on_bytes_received_context, buffer, received); } } } } } static int tlsio_cyclonessl_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) { int result; /* Tests_SRS_TLSIO_CYCLONESSL_01_057: [ If any of the arguments tls_io or option_name is NULL tlsio_cyclonessl_setoption shall return a non-zero value. ]*/ if ((tls_io == NULL) || (optionName == NULL)) { LogError("NULL tls_io"); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_CYCLONESSL_01_060: [ - "TrustedCerts" - a char\* that shall be saved by tlsio_cyclonessl as it shall be given to the underlying CycloneSSL TLS context when the IO is open. ]*/ if (strcmp("TrustedCerts", optionName) == 0) { const char* cert = (const char*)value; /* Codes_SRS_TLSIO_CYCLONESSL_01_062: [ If a previous TrustedCerts option was saved, then the previous value shall be freed. ]*/ if (tls_io_instance->certificate != NULL) { // Free the memory if it has been previously allocated free(tls_io_instance->certificate); tls_io_instance->certificate = NULL; } /* Codes_SRS_TLSIO_CYCLONESSL_01_063: [ A NULL value shall be allowed for TrustedCerts, in which case the previously stored TrustedCerts option value shall be cleared. ]*/ if (cert == NULL) { result = 0; } else { // Store the certificate if (mallocAndStrcpy_s(&tls_io_instance->certificate, cert) != 0) { /* Codes_SRS_TLSIO_CYCLONESSL_01_061: [ If copying the char\* passed in value fails then tlsio_cyclonessl_setoption shall return a non-zero value. ]*/ LogError("Error allocating memory for certificates"); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_059: [ If the option was handled by tlsio_cyclonessl, then tlsio_cyclonessl_setoption shall return 0. ]*/ result = 0; } } } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_058: [ If the option_name argument indicates an option that is not handled by tlsio_cyclonessl, then tlsio_cyclonessl_setoption shall return a non-zero value. ]*/ LogError("Unrecognized option"); result = __FAILURE__; } } return result; } static OPTIONHANDLER_HANDLE tlsio_cyclonessl_retrieve_options(CONCRETE_IO_HANDLE handle) { OPTIONHANDLER_HANDLE result; /* Codes_SRS_TLSIO_CYCLONESSL_01_064: [ If parameter handle is `NULL` then `tlsio_cyclonessl_retrieve_options` shall fail and return NULL. ]*/ if (handle == NULL) { LogError("invalid parameter detected: CONCRETE_IO_HANDLE handle=%p", handle); result = NULL; } else { /* Codes_SRS_TLSIO_CYCLONESSL_01_065: [ `tlsio_cyclonessl_retrieve_options` shall produce an OPTIONHANDLER_HANDLE. ]*/ result = OptionHandler_Create(tlsio_cyclonessl_clone_option, tlsio_cyclonessl_destroy_option, tlsio_cyclonessl_setoption); if (result == NULL) { /* Codes_SRS_TLSIO_CYCLONESSL_01_068: [ If producing the OPTIONHANDLER_HANDLE fails then tlsio_cyclonessl_retrieve_options shall fail and return NULL. ]*/ LogError("unable to OptionHandler_Create"); /*return as is*/ } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)handle; /* Codes_SRS_TLSIO_CYCLONESSL_01_066: [ `tlsio_cyclonessl_retrieve_options` shall add to it the options: ]*/ if ( (tls_io_instance->certificate != NULL) && /* Codes_SRS_TLSIO_CYCLONESSL_01_067: [ - TrustedCerts ]*/ (OptionHandler_AddOption(result, "TrustedCerts", tls_io_instance->certificate) != 0) ) { LogError("unable to save TrustedCerts option"); OptionHandler_Destroy(result); result = NULL; } else { /*all is fine, all interesting options have been saved*/ /*return as is*/ } } } return result; } static const IO_INTERFACE_DESCRIPTION tlsio_cyclonessl_interface_description = { tlsio_cyclonessl_retrieve_options, tlsio_cyclonessl_create, tlsio_cyclonessl_destroy, tlsio_cyclonessl_open, tlsio_cyclonessl_close, tlsio_cyclonessl_send, tlsio_cyclonessl_dowork, tlsio_cyclonessl_setoption }; /* Codes_SRS_TLSIO_CYCLONESSL_01_069: [ tlsio_cyclonessl_get_interface_description shall return a pointer to an IO_INTERFACE_DESCRIPTION structure that contains pointers to the functions: tlsio_cyclonessl_retrieve_options, tlsio_cyclonessl_create, tlsio_cyclonessl_destroy, tlsio_cyclonessl_open, tlsio_cyclonessl_close, tlsio_cyclonessl_send and tlsio_cyclonessl_dowork. ]*/ const IO_INTERFACE_DESCRIPTION* tlsio_cyclonessl_get_interface_description(void) { return &tlsio_cyclonessl_interface_description; } tlsio_cyclonessl_socket.c000066400000000000000000000073071362133436400401670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/archive/cyclonessl// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #error CycloneSSL is NOT supported for the Azure C shared utilities. #error The code here is provided for reference purposes. #error #error A security audit is required if you attempt to bring this code back. #include #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "tls.h" #include "azure_c_shared_utility/tlsio_cyclonessl_socket.h" /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_001: [ tlsio_cyclonessl_socket_create shall create a new socket to be used by CycloneSSL. ]*/ int tlsio_cyclonessl_socket_create(const char* hostname, unsigned int port, TlsSocket* new_socket) { int result; /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_003: [ If hostname or socket is NULL, then tlsio_cyclonessl_socket_create shall fail and it shall return a non-zero value. ]*/ if ((hostname == NULL) || (new_socket == NULL)) { LogError("Invalid arguments: hostname = %p, new_socket = %p", hostname, new_socket); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_004: [ tlsio_cyclonessl_socket_create shall call socketOpen to create a TCP socket. ]*/ Socket* socket = socketOpen(SOCKET_TYPE_STREAM, SOCKET_IP_PROTO_TCP); if (socket == NULL) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_007: [ If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. ]*/ LogError("socketOpen failed, cannot create socket"); result = __FAILURE__; } else { IpAddr ipAddr; /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_005: [ tlsio_cyclonessl_socket_create shall call getHostByName to obtain an IpAddr structure filled with the address of the hostname. ]*/ if (getHostByName(NULL, hostname, &ipAddr, 0) != 0) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_007: [ If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. ]*/ socketClose(socket); LogError("Cannot resolve host"); result = __FAILURE__; } /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_006: [ tlsio_cyclonessl_socket_create shall call socketConnect and pass the obtained address in order to connect the socket. ]*/ else if (socketConnect(socket, &ipAddr, port) != 0) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_007: [ If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. ]*/ socketClose(socket); LogError("Failed to connect"); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_002: [ On success tlsio_cyclonessl_socket_create shall return 0 and fill in the socket handle in the new_socket out argument. ]*/ *new_socket = (TlsSocket)socket; result = 0; } } } return result; } void tlsio_cyclonessl_socket_destroy(TlsSocket socket) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_009: [ If socket is NULL, tlsio_cyclonessl_socket_destroy shall do nothing. ]*/ if (socket == NULL) { LogError("tlsio_cyclonessl_socket_destroy: NULL socket"); } else { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_01_008: [ tlsio_cyclonessl_socket_destroy shall close the socket passed as argument by calling the function socketClose. ]*/ socketClose(socket); } } tlsio_cyclonessl_socket_bsd.c000066400000000000000000000104111362133436400410050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/archive/cyclonessl// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #error CycloneSSL is NOT supported for the Azure C shared utilities. #error The code here is provided for reference purposes. #error #error A security audit is required if you attempt to bring this code back. #include #if _WIN32 #define _WINERROR_ #include #include #endif #include #include "tls.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/tlsio_cyclonessl_socket.h" /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_001: [ tlsio_cyclonessl_socket_create shall create a new socket to be used by CycloneSSL. ]*/ int tlsio_cyclonessl_socket_create(const char* hostname, unsigned int port, TlsSocket* new_socket) { int result; /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_002: [ If hostname or new_socket is NULL, then tlsio_cyclonessl_socket_create shall fail and it shall return a non-zero value. ]*/ if ((hostname == NULL) || (new_socket == NULL)) { LogError("Invalid arguments: hostname = %p, new_socket = %p", hostname, new_socket); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_003: [ tlsio_cyclonessl_socket_create shall call socket to create a TCP socket. ]*/ SOCKET sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (sock == (SOCKET)-1) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_007: [ If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. ]*/ LogError("Error: Cannot create socket (%d)\r\n", WSAGetLastError()); result = __FAILURE__; } else { char portString[16]; ADDRINFO addrHint = { 0 }; ADDRINFO* addrInfo = NULL; addrHint.ai_family = AF_INET; addrHint.ai_socktype = SOCK_STREAM; addrHint.ai_protocol = 0; /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_004: [ tlsio_cyclonessl_socket_create shall call getaddrinfo to obtain a hint ADDRINFO. ]*/ if ((sprintf(portString, "%u", port) < 0) || (getaddrinfo(hostname, portString, &addrHint, &addrInfo) != 0)) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_007: [ If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. ]*/ LogError("Failure: getaddrinfo failure %d.", WSAGetLastError()); (void)closesocket(sock); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_006: [ tlsio_cyclonessl_socket_create shall call connect and pass the constructed address in order to connect the socket. ]*/ if (connect(sock, addrInfo->ai_addr, (int)addrInfo->ai_addrlen) < 0) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_007: [ If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. ]*/ LogError("Error: Failed to connect (%d)\r\n", WSAGetLastError()); closesocket(sock); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_008: [ On success tlsio_cyclonessl_socket_create shall return 0 and fill in the socket handle in the new_socket out argument. ]*/ *new_socket = (TlsSocket)sock; result = 0; } } } } return result; } void tlsio_cyclonessl_socket_destroy(TlsSocket socket) { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_010: [ If socket is INVALID_SOCKET (-1), tlsio_cyclonessl_socket_destroy shall do nothing. ]*/ if (socket == (SOCKET)-1) { LogError("Invalid socket\r\n"); } else { /* Codes_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_009: [ tlsio_cyclonessl_socket_destroy shall close the socket passed as argument by calling the function close. ]*/ (void)closesocket((SOCKET)socket); } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/000077500000000000000000000000001362133436400312635ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/linux/000077500000000000000000000000001362133436400324225ustar00rootroot00000000000000build.sh000077500000000000000000000036331362133436400340060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/linux#!/bin/bash #set -o pipefail # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/../.." && pwd) run_unit_tests=ON make_install= run_valgrind=0 run_unittests=OFF usage () { echo "build.sh [options]" echo "options" echo " -cl, --compileoption specify a compile option to be passed to gcc" echo " Example: -cl -O1 -cl ..." echo "-rv, --run_valgrind will execute ctest with valgrind" echo "--run-unittests run the unit tests" exit 1 } process_args () { save_next_arg=0 extracloptions=" " for arg in $* do if [ $save_next_arg == 1 ] then # save arg to pass to gcc extracloptions="$arg $extracloptions" save_next_arg=0 elif [ $save_next_arg == 2 ] then build_root="$arg" save_next_arg=0 else case "$arg" in "-cl" | "--compileoption" ) save_next_arg=1;; "-i" | "--install" ) make_install=1;; "-rv" | "--run_valgrind" ) run_valgrind=1;; "--run-unittests" ) run_unittests=ON;; "--build-root" ) save_next_arg=2;; * ) usage;; esac fi done } process_args $* log_dir=$build_root build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake -DcompileOption_C:STRING="$extracloptions" -Drun_valgrind:BOOL=$run_valgrind $build_root -Drun_unittests:BOOL=$run_unittests make --jobs=$CORES if [[ $make_install == 1 ]] ; then echo "Installing packaging" # install the package make install fi if [[ $run_valgrind == 1 ]] ; then #use doctored openssl export LD_LIBRARY_PATH=/usr/local/ssl/lib ctest -j $CORES --output-on-failure export LD_LIBRARY_PATH= else ctest -j $CORES -C "Debug" --output-on-failure fi popd azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed/000077500000000000000000000000001362133436400321725ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000006011362133436400346500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(shared_util_base_path ../..) set(mbed_project_base "azure_c_shared_utility" CACHE STRING "The item being built") include (${shared_util_base_path}/tools/mbed_build_scripts/mbedbldtemplate.txt) azure_c_shared_utility_filelist.txt000066400000000000000000000155021362133436400413130ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbedset(mbed_exported_project_files ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/agenttime.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/base64.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/buffer_.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/connection_string_parser.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/condition.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/constbuffer.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/consolelogger.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/const_defines.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/constmap.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/crt_abstractions.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/doublylinkedlist.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/gb_stdio.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/gb_time.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/gballoc.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/hmac.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/hmacsha256.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/httpapi.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/httpapiex.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/httpapiexsas.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/httpheaders.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/singlylinkedlist.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/lock.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/macro_utils.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/map.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/optimize_size.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/platform.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/refcount.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/sastoken.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/sha.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/sha-private.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/shared_util_options.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/socketio.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/string_tokenizer.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/strings.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/strings_types.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/string_tokenizer_types.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/threadapi.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/tickcounter.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/tlsio.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/tlsio_wolfssl.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/uniqueid.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/uuid.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/urlencode.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/vector.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/xio.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/xlogging.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/umock_c_prod.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/optionhandler.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/tcpsocketconnection_c.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/vector_types.h ${CMAKE_CURRENT_SOURCE_DIR}/../../inc/azure_c_shared_utility/vector_types_internal.h ${CMAKE_CURRENT_SOURCE_DIR}/../../pal/linux/refcount_os.h ) set(mbed_project_files ${CMAKE_CURRENT_SOURCE_DIR}/../../src/base64.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/buffer.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/constbuffer.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/connection_string_parser.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/constmap.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/crt_abstractions.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/consolelogger.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/doublylinkedlist.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/gb_stdio.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/gb_time.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/gballoc.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/hmac.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/hmacsha256.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/httpapiex.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/httpapiexsas.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/httpheaders.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/singlylinkedlist.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/map.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sastoken.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sha1.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sha224.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/sha384-512.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/string_tokenizer.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/strings.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/tickcounter.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/urlencode.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/usha.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/vector.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/xio.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/optionhandler.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/xlogging.c ${CMAKE_CURRENT_SOURCE_DIR}/../../src/uuid.c ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/agenttime_mbed.c ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/condition_rtx_mbed.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/httpapi_compact.c ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/lock_rtx_mbed.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/platform_mbed.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/socketio_mbed.c ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/tcpsocketconnection_c.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/threadapi_rtx_mbed.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/tickcounter_mbed.cpp ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/tlsio_wolfssl.c ${CMAKE_CURRENT_SOURCE_DIR}/../../adapters/uniqueid_stub.c ) build.cmd000066400000000000000000000025361362133436400337050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed @setlocal EnableExtensions EnableDelayedExpansion @echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set repo-build-root=%current-path%\..\.. rem // resolve to fully qualified path for %%i in ("%repo-build-root%") do set repo-build-root=%%~fi rem ----------------------------------------------------------------------------- rem -- build (clean) compilembed tool rem ----------------------------------------------------------------------------- call "%repo-build-root%\tools\compilembed\build.cmd" --clean if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! rem ----------------------------------------------------------------------------- rem -- build iothub client samples rem ----------------------------------------------------------------------------- call %repo-build-root%\tools\mbed_build_scripts\release_mbed_project.cmd %repo-build-root%\build_all if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof :compile setlocal EnableExtensions set "project_name=%~1" set "project_path=%~2" set "download_bin_path=%~3" set "cmake_project_bin_path=%project_name%_cmake_build" mkdir %cmake_project_bin_path% cd %cmake_project_bin_path% cmake -Dmbed_repo_name:string=%project_name% -Dmbed_output_bin_path:string=%download_bin_path% %project_path% set CMAKE_ERROR_CODE=!ERRORLEVEL! cd .. exit /b %CMAKE_ERROR_CODE% goto:eof azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed3/000077500000000000000000000000001362133436400322555ustar00rootroot00000000000000.yotta.json000066400000000000000000000001261362133436400343060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed3{ "build": { "target": "frdm-k64f-gcc,*", "targetSetExplicitly": true } } build.cmd000066400000000000000000000011521362133436400337610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed3@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal @REM Script arguments: @REM %1 File list for the project that is being built set project_path=..\.. set filelist=shared-util_filelist.txt if exist source rd /s /q source mkdir source echo Copying files ... for /f "tokens=*" %%i in (%filelist%) DO ( xcopy /y "%project_path%\%%i" "source" if !ERRORLEVEL! neq 0 goto :eof ) echo . yotta target frdm-k64f-gcc if !ERRORLEVEL! neq 0 goto :eof yotta build if !ERRORLEVEL! neq 0 goto :eof module.json000066400000000000000000000005741362133436400343640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed3{ "name": "azure-c-shared-utility", "version": "0.0.2", "description": "Azure C shared utility library", "repository": { "url": "git@github.com:Azure/azure-c-shared-utility.git", "type": "git" }, "keywords": [], "author": "Microsoft", "license": "MIT", "dependencies": {}, "targetDependencies": { "arm": { "mbedtls": "^2.0.0" } } } shared-util_filelist.txt000066400000000000000000000021431362133436400370530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/mbed3inc\agenttime.h inc\base64.h inc\buffer_.h inc\condition.h inc\constbuffer.h inc\constmap.h inc\consolelogger.h inc\crt_abstractions.h inc\doublylinkedlist.h inc\gb_stdio.h inc\gb_time.h inc\gballoc.h inc\hmac.h inc\hmacsha256.h inc\httpapi.h inc\httpapiex.h inc\httpapiexsas.h inc\httpheaders.h inc\list.h inc\lock.h inc\macro_utils.h inc\map.h inc\mqttapi.h inc\platform.h inc\refcount.h inc\sastoken.h inc\sha.h inc\sha-private.h inc\shared_util_options.h inc\socketio.h inc\string_tokenizer.h inc\strings.h inc\threadapi.h inc\tickcounter.h inc\tlsio.h inc\tlsio_wolfssl.h inc\urlencode.h inc\vector.h inc\xio.h inc\xlogging.h inc\vector_types.h inc\vector_types_internal.h src\base64.c src\buffer.c src\constbuffer.c src\consolelogger.c src\constmap.c src\crt_abstractions.c src\doublylinkedlist.c src\gb_stdio.c src\gb_time.c src\gballoc.c src\hmac.c src\hmacsha256.c src\httpapiex.c src\httpapiexsas.c src\httpheaders.c src\list.c src\map.c src\sastoken.c src\sha1.c src\sha224.c src\sha384-512.c src\string_tokenizer.c src\strings.c src\tickcounter.c src\urlencode.c src\usha.c src\vector.c src\xio.c src\xlogging.cazure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/000077500000000000000000000000001362133436400332075ustar00rootroot00000000000000linux/000077500000000000000000000000001362133436400342675ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packagingdebian/000077500000000000000000000000001362133436400355115ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linuxazure-c-shared-util-dev.dirs000066400000000000000000000000541362133436400427340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianusr/lib/ usr/include/ usr/include/azureiot/ azure-c-shared-util-dev.install000066400000000000000000000000311362133436400434340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianinc usr/include/azureiot azure-c-shared-util-lib.dirs000066400000000000000000000000151362133436400427210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianusr/ usr/lib azure-c-shared-util-lib.install000066400000000000000000000000271362133436400434310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debian/obj-*/lib*.a /usr/lib changelog-trusty000066400000000000000000000003361362133436400407350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianazure-c-shared-util (0.2.0-1trusty) trusty; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Tue, 27 Sep 2016 17:00:00 +0000 changelog-vivid000066400000000000000000000003351362133436400405030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianazure-c-shared-util (0.1.0-60vivid) vivid; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Thu, 29 Sep 2016 11:00:00 +0000 changelog-wily000066400000000000000000000003301362133436400403410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianazure-c-shared-util (undefined) wily; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Thu, 29 Sep 2016 11:00:00 +0000 changelog-xenial000066400000000000000000000003401362133436400406360ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianazure-c-shared-util (0.2.0.0-1xenial) xenial; urgency=low * See https://github.com/Azure/azure-iot-sdk-c/releases for details of the release -- AzureIoT User Thu, 29 Sep 2016 11:00:00 +0000 compat000066400000000000000000000000021362133436400367070ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debian9 control000066400000000000000000000021541362133436400371160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianSource: azure-c-shared-util Priority: optional Maintainer: Azure User Build-Depends: debhelper (>= 9), cmake (>= 2.8), uuid-dev, libssl-dev, libcurl4-openssl-dev, curl Standards-Version: 3.9.6 Section: libs Homepage: https://github.com/Azure/azure-c-shared-utility.git #Vcs-Git: git://anonscm.debian.org/collab-maint/azure-c-shared-util.git #Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/azure-c-shared-util.git;a=summary Package: azure-c-shared-util-dev Section: libdevel Architecture: any Depends: azure-c-shared-util-lib (= ${binary:Version}), ${misc:Depends}, uuid-dev, libssl-dev, libcurl4-openssl-dev, curl Description: AzureIoT Shared Utility Development Library Package The Microsoft Azure shared utility development library used to develop applications for developers and IT Staff Package: azure-c-shared-util-lib Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, uuid-dev, libssl-dev, libcurl4-openssl-dev, curl Description: AzureIoT Shared Utility Library Package The Microsoft Azure shared utility library used to develop applications for developers and IT Staff copyright000066400000000000000000000025601362133436400374470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianFormat: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: azure-c-shared-util Source: https://github.com/Azure/azure-c-shared-utility Files: * Copyright: 2015 AzureIoT User License: MIT Files: debian/* Copyright: 2015 AzureIoT User License: MIT License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. docs000066400000000000000000000000001362133436400363520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianrules000066400000000000000000000013371362133436400365720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debian#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. DH_VERBOSE = 1 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk # see FEATURE AREAS in dpkg-buildflags(1) #export DEB_BUILD_MAINT_OPTIONS = hardening=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append CFLAGS #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed # main packaging script based on dh7 syntax %: dh $@ --buildsystem=cmake --DSYSINSTALL_BINDINGS=ON override_dh_auto_configure: dh_auto_configure -- source/000077500000000000000000000000001362133436400370115ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debianformat000066400000000000000000000000151362133436400402200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/linux/debian/source3.0 (native) windows/000077500000000000000000000000001362133436400346225ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packagingMicrosoft.Azure.C.SharedUtility.nuspec000066400000000000000000000045141362133436400440510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/windows Microsoft.Azure.C.SharedUtility 1.1.4 Microsoft Azure C Shared Utility Microsoft Corp Azure-IoT https://github.com/Azure/azure-c-shared-utility/blob/master/LICENSE https://github.com/Azure/azure-c-shared-utility true Microsoft Azure C Shared Utility http://go.microsoft.com/fwlink/?LinkID=288890 This nuget package can be used to develop applications and libraries Copyright 2016 Microsoft Azure C Native x86 ARM x64 native package Microsoft.Azure.C.SharedUtility.targets000066400000000000000000000236641362133436400442340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/windows static cdecl $(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories) $(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/Win32/Debug/aziotsharedutil.lib;%(AdditionalDependencies) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/Win32/Release/aziotsharedutil.lib;%(AdditionalDependencies) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/x64/Debug/aziotsharedutil.lib;%(AdditionalDependencies) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/x64/Release/aziotsharedutil.lib;%(AdditionalDependencies) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/arm/Debug/aziotsharedutil.lib;%(AdditionalDependencies) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/arm/Release/aziotsharedutil.lib;%(AdditionalDependencies) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/arm64/Debug/aziotsharedutil.lib;%(AdditionalDependencies) Secur32.lib;ncrypt.lib;Ws2_32.lib;$(MSBuildThisFileDirectory)../../build/native/arm64/Release/aziotsharedutil.lib;%(AdditionalDependencies) Result = ((Text ?? "").Split(';').Contains(Library) ) ? Value : String.Empty; Microsoft.Azure.C.SharedUtility_thirdpartynotice.txt000066400000000000000000000011011362133436400470340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/windowsThird Party Notices for Azure Shared Utility project This project incorporates material from the project(s) listed below (collectively, "Third Party Code"). Microsoft Corporation is not the original author of the Third Party Code. The original copyright notice and license, under which Microsoft Corporation received such Third Party Code, are set out below. This Third Party Code is licensed to you under their original license terms set forth below. Microsoft Corporation reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. rebuild_nugets.cmd000066400000000000000000000100461362133436400403230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/packaging/windows@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @echo off rem ----------------------------------------------------------------------------- rem -- setup path information rem ----------------------------------------------------------------------------- set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% echo Current Path: %current-path% set build-root=%current-path%\..\..\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi set client-root=%current-path%\..\..\.. for %%i in ("%client-root%") do set client-root=%%~fi where /q nuget.exe if not !errorlevel! == 0 ( @Echo Azure Shared Utility needs to download nuget.exe from https://www.nuget.org/nuget.exe @Echo https://www.nuget.org choice /C yn /M "Do you want to download and run nuget.exe?" if not !errorlevel!==1 goto :eof rem if nuget.exe is not found, then ask user Powershell.exe wget -outf nuget.exe https://nuget.org/nuget.exe if not exist .\nuget.exe ( echo nuget does not exist exit /b 1 ) ) set build-path=%build-root%\cmake echo Build root is %build-root% echo Build path is %build-path% echo Client root is %client-root% if exist %build-path%\shared-util_output ( rmdir /s/q %build-path%\shared-util_output rem no error checking ) echo checking for nupkg if exist %build-root%\build_all\packaging\windows\*.nupkg ( echo deleting nupkg del %build-root%\build_all\packaging\windows\*.nupkg ) rem ----------------------------------------------------------------------------- rem -- build binaries rem ----------------------------------------------------------------------------- mkdir %build-path%\shared-util_output rem no error checking call %build-root%\build_all\windows\build.cmd --make_nuget yes if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! rem ----------------------------------------------------------------------------- rem -- Copy Win32 binaries rem ----------------------------------------------------------------------------- rem -- Copy all Win32 files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\shared-util_Win32\Debug\*.* %build-path%\shared-util_output\win32\debug\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem -- Copy all Win32 Release files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\shared-util_Win32\Release\*.* %build-path%\shared-util_output\win32\Release\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem ----------------------------------------------------------------------------- rem -- Copy x64 binaries rem ----------------------------------------------------------------------------- rem -- Copy all x64 files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\shared-util_x64\Debug\*.* %build-path%\shared-util_output\x64\debug\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem -- Copy all x64 Release files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\shared-util_x64\Release\*.* %build-path%\shared-util_output\x64\Release\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem ----------------------------------------------------------------------------- rem -- Copy x64 binaries rem ----------------------------------------------------------------------------- rem -- Copy all x64 files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\shared-util_arm\Debug\*.* %build-path%\shared-util_output\arm\debug\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem -- Copy all x64 Release files from cmake build directory to the repo directory xcopy /q /y /R %build-path%\shared-util_arm\Release\*.* %build-path%\shared-util_output\arm\Release\*.* if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! rem -- Package Nuget nuget pack %build-root%\build_all\packaging\windows\Microsoft.Azure.C.SharedUtility.nuspec -OutputDirectory %build-root%\build_all\packaging\windows rmdir %build-path%\shared-util_output /S /Q echo doneazure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/tirtos/000077500000000000000000000000001362133436400326075ustar00rootroot00000000000000package.bld000066400000000000000000000077351362133436400346220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/tirtos/* * ======== package.bld ======== */ var Build = xdc.useModule('xdc.bld.BuildEnvironment'); var Pkg = xdc.useModule('xdc.bld.PackageContents'); /* make command to search for the srcs */ Pkg.makePrologue = "vpath %.c ../../src ../../adapters"; /* lib/ is a generated directory that 'xdc clean' should remove */ Pkg.generatedFiles.$add("lib/"); var SRCS = [ "agenttime.c", "base64.c", "buffer.c", "consolelogger.c", "constbuffer.c", "crt_abstractions.c", "doublylinkedlist.c", "gballoc.c", "hmac.c", "hmacsha256.c", "httpapi_tirtos.c", "httpapiex.c", "httpapiexsas.c", "httpheaders.c", "lock_pthreads.c", "map.c", "platform_stub.c", "sastoken.c", "sha1.c", "sha224.c", "sha384-512.c", "strings.c", "string_tokenizer.c", "threadapi_pthreads.c", "tickcounter_tirtos.c", "urlencode.c", "usha.c", "vector.c", "xlogging.c", "optionhandler.c" ]; /* Paths to external source libraries */ xdcargs = java.lang.System.getenv("XDCARGS").split(" "); var slIncs = ""; var ndkIncs = ""; var wolfsslIncs = ""; var commonIncs = "-I../../inc -I../../inc/azure_c_shared_utility -I../../pal/linux "; var pthreadIncs = ""; /* Parse out the XDCARGS options for the library source paths */ for (x = 0; x < xdcargs.length; x++) { if (xdcargs[x].match(/^CC3200SDK=/)) { slIncs = (xdcargs[x] + "").replace(/'/g, ''); slIncs = slIncs.substring(slIncs.indexOf('=') + 1); if (slIncs != "") { slIncs += "/simplelink"; slIncs = "-I" + slIncs + " -I" + slIncs + "/include "; } } if (xdcargs[x].match(/^NDK=/)) { ndkIncs = (xdcargs[x] + "").replace(/'/g, ''); ndkIncs = ndkIncs.substring(ndkIncs.indexOf('=') + 1); if (ndkIncs != "") { ndkIncs = "-I" + ndkIncs + "/packages/ti/ndk/inc/bsd "; } } if (xdcargs[x].match(/^BIOS=/)) { pthreadIncs = (xdcargs[x] + "").replace(/'/g, ''); pthreadIncs = pthreadIncs.substring(pthreadIncs.indexOf('=') + 1); if (pthreadIncs != "") { pthreadIncs = "-I" + pthreadIncs + "/packages/ti/sysbios/posix "; } } if (xdcargs[x].match(/^WOLFSSL=/)) { wolfsslIncs = (xdcargs[x] + "").replace(/'/g, ''); wolfsslIncs = wolfsslIncs.substring(wolfsslIncs.indexOf('=') + 1); if (wolfsslIncs != "") { wolfsslIncs = "-I" + wolfsslIncs; } } } if (ndkIncs != "") { if (wolfsslIncs == "") { print("Warning: Cannot find WolfSSL directory: '" + wolfsslPath + "'. Skipping TLS support build."); wolfsslIncs = ""; } var wolfsslPath = wolfsslIncs.substring(2); try { var f = new java.io.File(wolfsslPath); if (!f.exists()) { print("Warning: Cannot find WolfSSL directory: '" + wolfsslPath + "'. Skipping TLS support build."); wolfsslIncs = ""; } } catch(e) { print("Warning: Cannot find WolfSSL directory: '" + wolfsslPath + "'. Skipping TLS support build."); wolfsslIncs = ""; } } for (var i = 0; i < Build.targets.length; i++) { var profile = "release"; var target = Build.targets[i]; var extraOpts = commonIncs + pthreadIncs; if (slIncs != "") { Pkg.addLibrary("lib/common_sl", target, { profile: profile, defs: "-DNET_SL -DREFCOUNT_ATOMIC_DONTCARE " + extraOpts, incs: slIncs }).addObjects(SRCS); } if (ndkIncs != "") { if (wolfsslIncs != "") { Pkg.addLibrary("lib/common_ndk_wolfssl", target, { profile: profile, defs: "-DNET_NDK -DNET_WOLFSSL -DWOLFSSL_TIRTOS " + extraOpts, incs: ndkIncs + wolfsslIncs }).addObjects(SRCS) } Pkg.addLibrary("lib/common_ndk", target, { profile: profile, defs: "-DNET_NDK " + extraOpts, incs: ndkIncs }).addObjects(SRCS); } } package.xdc000066400000000000000000000001061362133436400346200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/tirtos/* * ======== package.xdc ======== */ package build_all.tirtos { } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/windows/000077500000000000000000000000001362133436400327555ustar00rootroot00000000000000build.cmd000066400000000000000000000124351362133436400344670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/windows@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @echo off set CMAKE_DIR=shared-util_Win32 set MAKE_NUGET_PKG=no set SOLUTION_NAME=azure_c_shared_utility set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set build-root=%current-path%\..\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi rem ----------------------------------------------------------------------------- rem -- parse script arguments rem ----------------------------------------------------------------------------- rem // default build options set build-clean=0 set build-config= set build-platform=Win32 :args-loop if "%1" equ "" goto args-done if "%1" equ "-c" goto arg-build-clean if "%1" equ "--clean" goto arg-build-clean if "%1" equ "--config" goto arg-build-config if "%1" equ "--platform" goto arg-build-platform if "%1" equ "--make_nuget" goto arg-build-nuget if "%1" equ "--build-root" goto arg-build-root if "%1" equ "--solution-name" goto arg-solution-name call :usage && exit /b 1 :arg-build-clean set build-clean=1 goto args-continue :arg-build-config shift if "%1" equ "" call :usage && exit /b 1 set build-config=%1 goto args-continue :arg-build-platform shift if "%1" equ "" call :usage && exit /b 1 set build-platform=%1 if %build-platform% == x64 ( set CMAKE_DIR=shared-util_x64 ) else if %build-platform% == arm ( set CMAKE_DIR=shared-util_arm ) goto args-continue :arg-build-nuget shift if "%1" equ "" call :usage && exit /b 1 set MAKE_NUGET_PKG=%1 goto args-continue :arg-build-root shift if "%1" equ "" call :usage && exit /b 1 set build-root=%1 goto args-continue :arg-solution-name shift if "%1" equ "" call :usage && exit /b 1 set SOLUTION_NAME=%1 goto args-continue :args-continue shift goto args-loop :args-done rem ----------------------------------------------------------------------------- rem -- build with CMAKE rem ----------------------------------------------------------------------------- echo CMAKE Output Path: %build-root%\cmake\%CMAKE_DIR% if NOT EXIST %build-root%\cmake\%CMAKE_DIR% GOTO NO_CMAKE_DIR rmdir /s/q %build-root%\cmake\%CMAKE_DIR% rem no error checking :NO_CMAKE_DIR mkdir %build-root%\cmake\%CMAKE_DIR% rem no error checking pushd %build-root%\cmake\%CMAKE_DIR% if %MAKE_NUGET_PKG% == yes ( echo ***Running CMAKE for Win32 *** cmake %build-root% if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd echo *** Running CMAKE x64 *** if EXIST %build-root%\cmake\shared-util_x64 ( rmdir /s/q %build-root%\cmake\shared-util_x64 ) mkdir %build-root%\cmake\shared-util_x64 pushd %build-root%\cmake\shared-util_x64 cmake %build-root% -G "Visual Studio 14 Win64" if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd echo *** Running CMAKE ARM *** if EXIST %build-root%\cmake\shared-util_arm ( rmdir /s/q %build-root%\cmake\shared-util_arm ) mkdir %build-root%\cmake\shared-util_arm pushd %build-root%\cmake\shared-util_arm cmake %build-root% -G "Visual Studio 14 ARM" if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else if %build-platform% == Win32 ( echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:bool=ON -Duse_wsio:bool=ON if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else if %build-platform% == ARM ( echo ***Running CMAKE for ARM*** cmake %build-root% -G "Visual Studio 14 ARM" -Drun_unittests:bool=ON if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else ( echo ***Running CMAKE for Win64*** cmake %build-root% -G "Visual Studio 14 Win64" -Drun_unittests:bool=ON if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) if %MAKE_NUGET_PKG% == yes ( echo running Win32 Shared Util echo ***Building all configurations*** msbuild /m %build-root%\cmake\shared-util_Win32\%SOLUTION_NAME%.sln /p:Configuration=Release msbuild /m %build-root%\cmake\shared-util_Win32\%SOLUTION_NAME%.sln /p:Configuration=Debug if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! msbuild /m %build-root%\cmake\shared-util_x64\%SOLUTION_NAME%.sln /p:Configuration=Release msbuild /m %build-root%\cmake\shared-util_x64\%SOLUTION_NAME%.sln /p:Configuration=Debug if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! msbuild /m %build-root%\cmake\shared-util_arm\%SOLUTION_NAME%.sln /p:Configuration=Release msbuild /m %build-root%\cmake\shared-util_arm\%SOLUTION_NAME%.sln /p:Configuration=Debug if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else ( if not defined build-config ( echo ***Building both configurations*** msbuild /m %SOLUTION_NAME%.sln /p:Configuration=Release msbuild /m %SOLUTION_NAME%.sln /p:Configuration=Debug if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) else ( echo ***Building %build-config% only*** msbuild /m %SOLUTION_NAME%.sln /p:Configuration=%build-config% if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) ctest -C "debug" -V if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) popd goto :eof :usage echo build.cmd [options] echo options: echo --clean [] Cleans the project echo --config ^ [Debug] build configuration (e.g. Debug, Release) echo --platform ^ [Win32] build platform (e.g. Win32, x64, arm, ...) echo --make_nuget ^ [no] generates the binaries to be used for nuget packaging (e.g. yes, no) goto :eof azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/windowsce/000077500000000000000000000000001362133436400332655ustar00rootroot00000000000000build.cmd000066400000000000000000000037641362133436400350040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/build_all/windowsce@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set build-root=%current-path%\..\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi rem ----------------------------------------------------------------------------- rem -- check prerequisites rem ----------------------------------------------------------------------------- rem // check that SDK is installed rem ----------------------------------------------------------------------------- rem -- parse script arguments rem ----------------------------------------------------------------------------- rem // default build options set build-clean=0 set build-config=Debug set build-platform=WindowsCE rem ----------------------------------------------------------------------------- rem -- build solution with CMake rem ----------------------------------------------------------------------------- rmdir /s/q "%USERPROFILE%\cmake_su_ce8" rem no error checking mkdir "%USERPROFILE%\cmake_su_ce8" rem no error checking pushd "%USERPROFILE%\cmake_su_ce8" rem if you plan to use a different SDK you need to change SDKNAME to the name of your SDK. Ensure that this is also changed in the sample solutions iothub_client_sample_http, simplesample_http and remote_monitoring set SDKNAME=TORADEX_CE800 set PROCESSOR=arm cmake -DWINCE=TRUE -DCMAKE_SYSTEM_NAME=WindowsCE -DCMAKE_SYSTEM_VERSION=8.0 -DCMAKE_SYSTEM_PROCESSOR=%PROCESSOR% -DCMAKE_GENERATOR_TOOLSET=CE800 -DCMAKE_GENERATOR_PLATFORM=%SDKNAME% %build-root% -Drun_unittests:bool=OFF -Dskip_samples:BOOL=OFF if not %errorlevel%==0 exit /b %errorlevel% rem Currently, only building sample is supported msbuild "%USERPROFILE%\cmake_su_ce8\samples\iot_c_utility\iot_c_utility.vcxproj if not %errorlevel%==0 exit /b %errorlevel% azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/configs/000077500000000000000000000000001362133436400307645ustar00rootroot00000000000000azure_c_shared_utilityConfig.cmake000066400000000000000000000007471362133436400376060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. include("${CMAKE_CURRENT_LIST_DIR}/azure_c_shared_utilityTargets.cmake") get_target_property(AZURE_C_SHARED_UTILITY_INCLUDES aziotsharedutil INTERFACE_INCLUDE_DIRECTORIES) set(AZURE_C_SHARED_UTILITY_INCLUDES ${AZURE_C_SHARED_UTILITY_INCLUDES} CACHE INTERNAL "") include("${CMAKE_CURRENT_LIST_DIR}/azure_c_shared_utilityFunctions.cmake")azure_c_shared_utilityFunctions.cmake000066400000000000000000000720251362133436400403470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. function(target_link_libraries_with_arg_prefix arg_prefix whatIsBuilding lib) if(${arg_prefix} STREQUAL "debug") target_link_libraries(${whatIsBuilding} debug ${lib}) elseif(${arg_prefix} STREQUAL "optimized") target_link_libraries(${whatIsBuilding} optimized ${lib}) elseif(${arg_prefix} STREQUAL "general") target_link_libraries(${whatIsBuilding} general ${lib}) else() target_link_libraries(${whatIsBuilding} ${lib}) endif() endfunction() function(set_test_target_folder whatIsBuilding ext) if("${whatIsBuilding}" MATCHES ".*e2e.*") set_target_properties(${whatIsBuilding}_${ext} PROPERTIES FOLDER "tests/E2ETests") else() set_target_properties(${whatIsBuilding}_${ext} PROPERTIES FOLDER "tests/UnitTests") endif() endfunction() function(windows_unittests_add_dll whatIsBuilding) link_directories(${whatIsBuilding}_dll $ENV{VCInstallDir}UnitTest/lib) add_library(${whatIsBuilding}_dll SHARED ${${whatIsBuilding}_cpp_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ${logging_files} ) set_test_target_folder(${whatIsBuilding} "dll") set(PARSING_ADDITIONAL_LIBS OFF) set(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER) set(ARG_PREFIX "none") foreach(f ${ARGN}) set(skip_to_next FALSE) if(${f} STREQUAL "ADDITIONAL_LIBS") SET(PARSING_ADDITIONAL_LIBS ON) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(ARG_PREFIX "none") #also unset all the other states set(skip_to_next TRUE) elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") SET(PARSING_ADDITIONAL_LIBS OFF) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) set(skip_to_next TRUE) endif() if(NOT skip_to_next) if(PARSING_ADDITIONAL_LIBS) if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) SET(ARG_PREFIX ${f}) else() target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) set(ARG_PREFIX "none") endif() endif() endif() endforeach() target_include_directories(${whatIsBuilding}_dll PUBLIC ${sharedutil_include_directories} $ENV{VCInstallDir}UnitTest/include) target_compile_definitions(${whatIsBuilding}_dll PUBLIC -DCPP_UNITTEST) target_link_libraries(${whatIsBuilding}_dll micromock_cpp_unittest umock_c ctest testrunnerswitcher) endfunction() function(windows_unittests_add_exe whatIsBuilding) add_executable(${whatIsBuilding}_exe ${${whatIsBuilding}_cpp_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ${CMAKE_CURRENT_LIST_DIR}/main.c ${logging_files} ) set_test_target_folder(${whatIsBuilding} "exe") set(PARSING_ADDITIONAL_LIBS OFF) set(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER) set(ARG_PREFIX "none") foreach(f ${ARGN}) set(skip_to_next FALSE) if(${f} STREQUAL "ADDITIONAL_LIBS") SET(PARSING_ADDITIONAL_LIBS ON) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(ARG_PREFIX "none") #also unset all the other states set(skip_to_next TRUE) elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") SET(PARSING_ADDITIONAL_LIBS OFF) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) set(skip_to_next TRUE) endif() if(NOT skip_to_next) if(PARSING_ADDITIONAL_LIBS) if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) SET(ARG_PREFIX ${f}) else() target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) set(ARG_PREFIX "none") endif() endif() endif() endforeach() target_compile_definitions(${whatIsBuilding}_exe PUBLIC -DUSE_CTEST) target_include_directories(${whatIsBuilding}_exe PUBLIC ${sharedutil_include_directories}) target_link_libraries(${whatIsBuilding}_exe micromock_ctest umock_c ctest testrunnerswitcher) add_test(NAME ${whatIsBuilding} COMMAND ${whatIsBuilding}_exe) endfunction() #this function takes more than the 1 mandatory argument (whatIsBuilding) #the parameters are separated by "known" separators #for example, ADDITIONAL_LIBS starts a list of needed libraries function(linux_unittests_add_exe whatIsBuilding) add_executable(${whatIsBuilding}_exe ${${whatIsBuilding}_cpp_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ${CMAKE_CURRENT_LIST_DIR}/main.c ${logging_files} ) set_test_target_folder(${whatIsBuilding} "exe") target_compile_definitions(${whatIsBuilding}_exe PUBLIC -DUSE_CTEST) target_include_directories(${whatIsBuilding}_exe PUBLIC ${sharedutil_include_directories}) #this part detects # - the additional libraries that might be needed. # additional libraries are started by ADDITIONAL_LIBS parameter and ended by any other known parameter (or end of variable arguments) # - a valgrind suppression file (VALGRIND_SUPPRESSIONS_FILE) for memcheck # the file name follows immediately after set(PARSING_ADDITIONAL_LIBS OFF) set(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER) set(ARG_PREFIX "none") foreach(f ${ARGN}) set(skip_to_next FALSE) if(${f} STREQUAL "ADDITIONAL_LIBS") SET(PARSING_ADDITIONAL_LIBS ON) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(ARG_PREFIX "none") set(skip_to_next TRUE) #also unset all the other states elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") SET(PARSING_ADDITIONAL_LIBS OFF) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) set(skip_to_next TRUE) else() if(NOT skip_to_next) if(PARSING_ADDITIONAL_LIBS) if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) SET(ARG_PREFIX ${f}) else() target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) set(ARG_PREFIX "none") endif() elseif(PARSING_VALGRIND_SUPPRESSIONS_FILE) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER "--suppressions=${f}") endif() endif() endforeach() target_link_libraries(${whatIsBuilding}_exe micromock_ctest umock_c ctest) add_test(NAME ${whatIsBuilding} COMMAND $) if(${run_valgrind}) find_program(VALGRIND_FOUND NAMES valgrind) if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") else() add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) add_test(NAME ${whatIsBuilding}_helgrind COMMAND valgrind --tool=helgrind --num-callers=100 --error-exitcode=1 ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) add_test(NAME ${whatIsBuilding}_drd COMMAND valgrind --tool=drd --num-callers=100 --error-exitcode=1 ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) endif() endif() endfunction() function(build_test_artifacts whatIsBuilding use_gballoc) #the first argument is what is building #the second argument is whether the tests should be build with gballoc #defines or not #the following arguments are a list of libraries to link with if(${use_gballoc}) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) else() endif() #setting #defines if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS) else() endif() #setting includes set(sharedutil_include_directories ${sharedutil_include_directories} ${TESTRUNNERSWITCHER_INCLUDES} ${CTEST_INCLUDES} ${UMOCK_C_INCLUDES} ${AZURE_C_SHARED_UTILITY_INCLUDES}) set(sharedutil_include_directories ${sharedutil_include_directories} ${MICROMOCK_INC_FOLDER} ${TESTRUNNERSWITCHER_INC_FOLDER} ${CTEST_INC_FOLDER} ${SAL_INC_FOLDER} ${SHARED_UTIL_INC_FOLDER} ${SHARED_UTIL_SRC_FOLDER}) if(WIN32) else() include_directories(${sharedutil_include_directories}) endif() #setting logging_files if(DEFINED SHARED_UTIL_SRC_FOLDER) set(logging_files ${XLOGGING_C_FILE} ${LOGGING_C_FILE}) elseif(DEFINED SHARED_UTIL_FOLDER) set(logging_files ${XLOGGING_C_FILE} ${LOGGING_C_FILE}) else() message(FATAL_ERROR "No Shared Utility folder defined for src.") endif() #setting output type if(WIN32) if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) windows_unittests_add_exe(${whatIsBuilding} ${ARGN}) if (${use_cppunittest}) windows_unittests_add_dll(${whatIsBuilding} ${ARGN}) endif() else() if( (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${nuget_e2e_tests}) ) windows_unittests_add_exe(${whatIsBuilding}_nuget ${ARGN}) else() #do nothing endif() endif() else() if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) linux_unittests_add_exe(${whatIsBuilding} ${ARGN}) endif() endif() endfunction(build_test_artifacts) function(c_windows_unittests_add_dll whatIsBuilding folder) link_directories(${whatIsBuilding}_dll $ENV{VCInstallDir}UnitTest/lib) add_library(${whatIsBuilding}_testsonly_lib STATIC ${${whatIsBuilding}_test_files} ) SET(VAR 1) foreach(file ${${whatIsBuilding}_test_files}) set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS -DCPPUNITTEST_SYMBOL=some_symbol_for_cppunittest_${VAR}) MATH(EXPR VAR "${VAR}+1") endforeach() set_target_properties(${whatIsBuilding}_testsonly_lib PROPERTIES FOLDER ${folder} ) target_include_directories(${whatIsBuilding}_testsonly_lib PUBLIC ${sharedutil_include_directories} $ENV{VCInstallDir}UnitTest/include) target_compile_definitions(${whatIsBuilding}_testsonly_lib PUBLIC -DCPP_UNITTEST) target_compile_options(${whatIsBuilding}_testsonly_lib PUBLIC /TP /EHsc) add_library(${whatIsBuilding}_dll SHARED ${${whatIsBuilding}_cpp_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ${logging_files} ) set_target_properties(${whatIsBuilding}_dll PROPERTIES FOLDER ${folder}) set_source_files_properties(${${whatIsBuilding}_c_files} ${logging_files} PROPERTIES COMPILE_FLAGS /TC) set_source_files_properties(${${whatIsBuilding}_cpp_files} PROPERTIES COMPILE_FLAGS /TP) target_link_libraries(${whatIsBuilding}_dll umock_c ctest testrunnerswitcher ${whatIsBuilding}_testsonly_lib ) set(PARSING_ADDITIONAL_LIBS OFF) set(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER) set(ARG_PREFIX "none") foreach(f ${ARGN}) set(skip_to_next FALSE) if(${f} STREQUAL "ADDITIONAL_LIBS") SET(PARSING_ADDITIONAL_LIBS ON) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(ARG_PREFIX "none") #also unset all the other states set(skip_to_next TRUE) elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") SET(PARSING_ADDITIONAL_LIBS OFF) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) set(skip_to_next TRUE) endif() if(NOT skip_to_next) if(PARSING_ADDITIONAL_LIBS) if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) SET(ARG_PREFIX ${f}) else() target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_dll ${f}) target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_testsonly_lib ${f}) set(ARG_PREFIX "none") endif() endif() endif() endforeach() SET(SPACES " ") SET(VAR 1) foreach(file ${${whatIsBuilding}_test_files}) # for x64 the underscore is not needed if (ARCHITECTURE STREQUAL "x86_64" OR ARCHITECTURE STREQUAL "ARM") set_property(TARGET ${whatIsBuilding}_dll APPEND_STRING PROPERTY LINK_FLAGS ${SPACES}/INCLUDE:"some_symbol_for_cppunittest_${VAR}") else() set_property(TARGET ${whatIsBuilding}_dll APPEND_STRING PROPERTY LINK_FLAGS ${SPACES}/INCLUDE:"_some_symbol_for_cppunittest_${VAR}") endif() MATH(EXPR VAR "${VAR}+1") endforeach() endfunction() function(c_windows_unittests_add_exe whatIsBuilding folder) add_executable(${whatIsBuilding}_exe ${${whatIsBuilding}_test_files} ${${whatIsBuilding}_cpp_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ${CMAKE_CURRENT_LIST_DIR}/main.c ${logging_files} ) set_target_properties(${whatIsBuilding}_exe PROPERTIES FOLDER ${folder}) target_compile_definitions(${whatIsBuilding}_exe PUBLIC -DUSE_CTEST) target_include_directories(${whatIsBuilding}_exe PUBLIC ${sharedutil_include_directories}) target_link_libraries(${whatIsBuilding}_exe umock_c ctest testrunnerswitcher) set(PARSING_ADDITIONAL_LIBS OFF) set(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER) set(ARG_PREFIX "none") foreach(f ${ARGN}) set(skip_to_next FALSE) if(${f} STREQUAL "ADDITIONAL_LIBS") SET(PARSING_ADDITIONAL_LIBS ON) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(ARG_PREFIX "none") #also unset all the other states set(skip_to_next TRUE) elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") SET(PARSING_ADDITIONAL_LIBS OFF) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) set(skip_to_next TRUE) endif() if(NOT skip_to_next) if(PARSING_ADDITIONAL_LIBS) if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) SET(ARG_PREFIX ${f}) else() target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) set(ARG_PREFIX "none") endif() endif() endif() endforeach() add_test(NAME ${whatIsBuilding} COMMAND ${whatIsBuilding}_exe) endfunction() #this function takes more than the 1 mandatory argument (whatIsBuilding) #the parameters are separated by "known" separators #for example, ADDITIONAL_LIBS starts a list of needed libraries function(c_linux_unittests_add_exe whatIsBuilding folder) add_executable(${whatIsBuilding}_exe ${${whatIsBuilding}_test_files} ${${whatIsBuilding}_cpp_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ${CMAKE_CURRENT_LIST_DIR}/main.c ${logging_files} ) set_target_properties(${whatIsBuilding}_exe PROPERTIES FOLDER ${folder}) target_compile_definitions(${whatIsBuilding}_exe PUBLIC -DUSE_CTEST) target_include_directories(${whatIsBuilding}_exe PUBLIC ${sharedutil_include_directories}) #this part detects # - the additional libraries that might be needed. # additional libraries are started by ADDITIONAL_LIBS parameter and ended by any other known parameter (or end of variable arguments) # - a valgrind suppression file (VALGRIND_SUPPRESSIONS_FILE) for memcheck # the file name follows immediately after set(PARSING_ADDITIONAL_LIBS OFF) set(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER) set(ARG_PREFIX "none") foreach(f ${ARGN}) set(skip_to_next FALSE) if(${f} STREQUAL "ADDITIONAL_LIBS") SET(PARSING_ADDITIONAL_LIBS ON) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE OFF) set(ARG_PREFIX "none") #also unset all the other states set(skip_to_next TRUE) elseif(${f} STREQUAL "VALGRIND_SUPPRESSIONS_FILE") SET(PARSING_ADDITIONAL_LIBS OFF) SET(PARSING_VALGRIND_SUPPRESSIONS_FILE ON) set(skip_to_next TRUE) endif() if(NOT skip_to_next) if(PARSING_ADDITIONAL_LIBS) if((${f} STREQUAL "debug") OR (${f} STREQUAL "optimized") OR (${f} STREQUAL "general")) SET(ARG_PREFIX ${f}) else() target_link_libraries_with_arg_prefix(${ARG_PREFIX} ${whatIsBuilding}_exe ${f}) set(ARG_PREFIX "none") endif() elseif(PARSING_VALGRIND_SUPPRESSIONS_FILE) set(VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER "--suppressions=${f}") endif() endif() endforeach() target_link_libraries(${whatIsBuilding}_exe umock_c ctest m) add_test(NAME ${whatIsBuilding} COMMAND $) if(${run_valgrind}) find_program(VALGRIND_FOUND NAMES valgrind) if(${VALGRIND_FOUND} STREQUAL VALGRIND_FOUND-NOTFOUND) message(WARNING "run_valgrind was TRUE, but valgrind was not found - there will be no tests run under valgrind") else() add_test(NAME ${whatIsBuilding}_valgrind COMMAND valgrind --gen-suppressions=all --num-callers=100 --error-exitcode=1 --leak-check=full --track-origins=yes ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) add_test(NAME ${whatIsBuilding}_helgrind COMMAND valgrind --tool=helgrind --gen-suppressions=all --num-callers=100 --error-exitcode=1 ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) add_test(NAME ${whatIsBuilding}_drd COMMAND valgrind --tool=drd --gen-suppressions=all --num-callers=100 --error-exitcode=1 ${VALGRIND_SUPPRESSIONS_FILE_EXTRA_PARAMETER} $) endif() endif() endfunction() function(build_c_test_artifacts whatIsBuilding use_gballoc folder) #the first argument is what is building #the second argument is whether the tests should be build with gballoc #defines or not #the following arguments are a list of libraries to link with if(${use_gballoc}) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) else() endif() #setting #defines if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS) else() endif() #setting includes set(sharedutil_include_directories ${sharedutil_include_directories} ${TESTRUNNERSWITCHER_INCLUDES} ${CTEST_INCLUDES} ${UMOCK_C_INCLUDES} ${AZURE_C_SHARED_UTILITY_INCLUDES}) set(sharedutil_include_directories ${sharedutil_include_directories} ${MICROMOCK_INC_FOLDER} ${UMOCK_C_INC_FOLDER} ${TESTRUNNERSWITCHER_INC_FOLDER} ${CTEST_INC_FOLDER} ${SAL_INC_FOLDER} ${SHARED_UTIL_INC_FOLDER} ${SHARED_UTIL_SRC_FOLDER}) if(WIN32) else() include_directories(${sharedutil_include_directories}) endif() #setting logging_files if(DEFINED SHARED_UTIL_SRC_FOLDER) set(logging_files ${XLOGGING_C_FILE} ${LOGGING_C_FILE}) elseif(DEFINED SHARED_UTIL_FOLDER) set(logging_files ${XLOGGING_C_FILE} ${LOGGING_C_FILE}) else() message(FATAL_ERROR "No Shared Utility folder defined for includes/src.") endif() #setting output type if(WIN32) if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) if (${use_cppunittest}) c_windows_unittests_add_dll(${whatIsBuilding} ${folder} ${ARGN}) endif() c_windows_unittests_add_exe(${whatIsBuilding} ${folder} ${ARGN}) else() if( (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${nuget_e2e_tests}) ) c_windows_unittests_add_exe(${whatIsBuilding}_nuget ${folder} ${ARGN}) else() #do nothing endif() endif() else() if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) c_linux_unittests_add_exe(${whatIsBuilding} ${folder} ${ARGN}) endif() endif() endfunction() function(compile_c_test_artifacts_as whatIsBuilding compileAsWhat) if(WIN32) if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) if (${use_cppunittest}) if(${compileAsWhat} STREQUAL "C99") compileTargetAsC99(${whatIsBuilding}_dll) compileTargetAsC99(${whatIsBuilding}_testsonly_lib) endif() if(${compileAsWhat} STREQUAL "C11") compileTargetAsC11(${whatIsBuilding}_dll) compileTargetAsC11(${whatIsBuilding}_testsonly_lib) endif() endif() if(${compileAsWhat} STREQUAL "C99") compileTargetAsC99(${whatIsBuilding}_exe) endif() if(${compileAsWhat} STREQUAL "C11") compileTargetAsC11(${whatIsBuilding}_exe) endif() else() if( (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${nuget_e2e_tests}) ) if(${compileAsWhat} STREQUAL "C99") compileTargetAsC99(${whatIsBuilding}_exe) endif() if(${compileAsWhat} STREQUAL "C11") compileTargetAsC11(${whatIsBuilding}_exe) endif() else() #do nothing endif() endif() else() if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*e2e.*") AND ${run_e2e_tests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) if(${compileAsWhat} STREQUAL "C99") compileTargetAsC99(${whatIsBuilding}_exe) endif() if(${compileAsWhat} STREQUAL "C11") compileTargetAsC11(${whatIsBuilding}_exe) endif() endif() endif() endfunction() function(build_c_test_longhaul_test test_name test_c_files test_h_files) set(test_c_files ${CMAKE_CURRENT_LIST_DIR}/../common_longhaul/iothub_client_statistics.c ${CMAKE_CURRENT_LIST_DIR}/../common_longhaul/iothub_client_common_longhaul.c ${test_c_files} ) set(test_h_files ${CMAKE_CURRENT_LIST_DIR}/../common_longhaul/iothub_client_statistics.h ${CMAKE_CURRENT_LIST_DIR}/../common_longhaul/iothub_client_common_longhaul.h ${test_h_files} ) IF(WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) ENDIF(WIN32) #Conditionally use the SDK trusted certs in the samples if(${set_trusted_cert_in_samples}) add_definitions(-DSET_TRUSTED_CERT_IN_SAMPLES) include_directories(${PROJECT_SOURCE_DIR}/certs) set(samples_cert_file ${PROJECT_SOURCE_DIR}/certs/certs.c) endif() include_directories(${IOTHUB_TEST_INC_FOLDER}) include_directories(${IOTHUB_SERVICE_CLIENT_INC_FOLDER}) include_directories(.) add_executable(${test_name} ${test_c_files} ${test_h_files} ${samples_cert_file}) add_test(NAME ${test_name} COMMAND $) set_tests_properties(${test_name} PROPERTIES TIMEOUT 1296000) target_link_libraries(${test_name} iothub_test iothub_client) set_target_properties(${test_name} PROPERTIES FOLDER "tests/LongHaul") endfunction() # This function focuses on setting files which are unique to a given hardware platform. # The choice of tlsio is not unique per-platform, and is set in the main CMakeLists.txt function(set_platform_files c_shared_dir) if(WIN32) if(${use_condition}) set(CONDITION_C_FILE ${c_shared_dir}/adapters/condition_win32.c PARENT_SCOPE) endif() if(NOT ${use_etw}) set(XLOGGING_C_FILE ${c_shared_dir}/src/xlogging.c PARENT_SCOPE) set(LOGGING_C_FILE ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/consolelogger.h PARENT_SCOPE) else() set(XLOGGING_C_FILE ${c_shared_dir}/src/etwxlogging.c PARENT_SCOPE) set(LOGGING_C_FILE ${c_shared_dir}/src/etwlogger_driver.c PARENT_SCOPE) set(LOGGING_RC_FILE ${c_shared_dir}/res/etwlogger.rc CACHE INTERNAL "") set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/etwlogger_driver.h PARENT_SCOPE) endif() set(THREAD_C_FILE ${c_shared_dir}/adapters/threadapi_win32.c PARENT_SCOPE) set(LOCK_C_FILE ${c_shared_dir}/adapters/lock_win32.c PARENT_SCOPE) if (${use_builtin_httpapi}) set(HTTP_C_FILE ${c_shared_dir}/adapters/httpapi_compact.c PARENT_SCOPE) else() if (WINCE) set(HTTP_C_FILE ${c_shared_dir}/adapters/httpapi_wince.c PARENT_SCOPE) else() set(HTTP_C_FILE ${c_shared_dir}/adapters/httpapi_winhttp.c PARENT_SCOPE) endif() endif() set(PLATFORM_C_FILE ${c_shared_dir}/adapters/platform_win32.c PARENT_SCOPE) if (${use_socketio}) set(SOCKETIO_C_FILE ${c_shared_dir}/adapters/socketio_win32.c PARENT_SCOPE) endif() set(TICKCOUTER_C_FILE ${c_shared_dir}/adapters/tickcounter_win32.c PARENT_SCOPE) if (${use_default_uuid}) set(UNIQUEID_C_FILE ${c_shared_dir}/adapters/uniqueid_stub.c PARENT_SCOPE) else() set(UNIQUEID_C_FILE ${c_shared_dir}/adapters/uniqueid_win32.c PARENT_SCOPE) endif() else() set(XLOGGING_C_FILE ${c_shared_dir}/src/xlogging.c PARENT_SCOPE) set(LOGGING_C_FILE ${c_shared_dir}/src/consolelogger.c PARENT_SCOPE) set(LOGGING_H_FILE ${c_shared_dir}/inc/azure_c_shared_utility/consolelogger.h PARENT_SCOPE) if(${use_condition}) set(CONDITION_C_FILE ${c_shared_dir}/adapters/condition_pthreads.c PARENT_SCOPE) endif() if (${use_builtin_httpapi}) set(HTTP_C_FILE ${c_shared_dir}/adapters/httpapi_compact.c PARENT_SCOPE) else() set(HTTP_C_FILE ${c_shared_dir}/adapters/httpapi_curl.c PARENT_SCOPE) endif() set(LOCK_C_FILE ${c_shared_dir}/adapters/lock_pthreads.c PARENT_SCOPE) if (use_applessl) set(PLATFORM_C_FILE ${c_shared_dir}/pal/ios-osx/platform_appleios.c PARENT_SCOPE) else() set(PLATFORM_C_FILE ${c_shared_dir}/adapters/platform_linux.c PARENT_SCOPE) endif() if (${use_socketio}) set(SOCKETIO_C_FILE ${c_shared_dir}/adapters/socketio_berkeley.c PARENT_SCOPE) endif() set(THREAD_C_FILE ${c_shared_dir}/adapters/threadapi_pthreads.c PARENT_SCOPE) set(TICKCOUTER_C_FILE ${c_shared_dir}/adapters/tickcounter_linux.c PARENT_SCOPE) if (${use_default_uuid}) set(UNIQUEID_C_FILE ${c_shared_dir}/adapters/uniqueid_stub.c PARENT_SCOPE) else() set(UNIQUEID_C_FILE ${c_shared_dir}/adapters/uniqueid_linux.c PARENT_SCOPE) endif() endif() if(WIN32 OR MACOSX OR LINUX) set (ENVIRONMENT_VARIABLE_C_FILE ${c_shared_dir}/adapters/envvariable.c PARENT_SCOPE) endif() endfunction(set_platform_files) azure_iot_build_rules.cmake000066400000000000000000000265411362133436400363110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. # Silences a CMake warning, no apparent effect on the Azure IoT SDK if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) endif() #Use solution folders. set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Build with -fPIC always set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) option(run_valgrind "set run_valgrind to ON if tests are to be run under valgrind/helgrind/drd. Default is OFF" OFF) option(compileOption_C "passes a string to the command line of the C compiler" OFF) option(compileOption_CXX "passes a string to the command line of the C++ compiler" OFF) # These are the include folders. (assumes that this file is in a subdirectory of c-utility) get_filename_component(SHARED_UTIL_FOLDER ${CMAKE_CURRENT_LIST_DIR} DIRECTORY) set(SHARED_UTIL_FOLDER "${SHARED_UTIL_FOLDER}" CACHE INTERNAL "this is the sharedLib directory" FORCE) set(SHARED_UTIL_INC_FOLDER ${SHARED_UTIL_FOLDER}/inc CACHE INTERNAL "this is what needs to be included if using sharedLib lib" FORCE) set(SHARED_UTIL_SRC_FOLDER ${SHARED_UTIL_FOLDER}/src CACHE INTERNAL "this is what needs to be included when doing include sources" FORCE) set(SHARED_UTIL_ADAPTER_FOLDER "${SHARED_UTIL_FOLDER}/adapters" CACHE INTERNAL "this is where the adapters live" FORCE) # PAL will eventually absorb the contents of SHARED_UTIL_ADAPTER_FOLDER set(SHARED_UTIL_PAL_FOLDER "${SHARED_UTIL_FOLDER}/pal" CACHE INTERNAL "this is the PAL common sources directory" FORCE) set(SHARED_UTIL_PAL_INC_FOLDER "${SHARED_UTIL_FOLDER}/pal/inc" CACHE INTERNAL "this is the PAL include directory" FORCE) #making a global variable to know if we are on linux, windows, or macosx. if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(WINDOWS TRUE) elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(LINUX TRUE) #on Linux, enable valgrind #these commands (MEMORYCHECK...) need to apear BEFORE include(CTest) or they will not have any effect find_program(MEMORYCHECK_COMMAND valgrind) set(MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --error-exitcode=1") elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(MACOSX TRUE) endif() include(CTest) include_directories(${SHARED_UTIL_INC_FOLDER}) # OS-specific header files for ref counting if(MSVC) include_directories(${SHARED_UTIL_PAL_FOLDER}/windows) else() include_directories(${SHARED_UTIL_PAL_FOLDER}/linux) endif() # if the compiler check fails (such as for iOS) header search will also fail - this allows it to be suppressed if(NOT suppress_header_searches) include(CheckIncludeFiles) CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILES(stdbool.h HAVE_STDBOOL_H) else() message(STATUS "Bypassing header search") set(HAVE_STDINT_H TRUE) set(HAVE_STDBOOL_H TRUE) endif() if ((NOT HAVE_STDINT_H) OR (NOT HAVE_STDBOOL_H)) include_directories(${SHARED_UTIL_INC_FOLDER}/azure_c_shared_utility/windowsce) endif() # System-specific compiler flags if(MSVC) if (WINCE) # Be lax with WEC 2013 compiler set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") add_definitions(-DWIN32) #WEC 2013 ELSE() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") endif() elseif(UNIX) #LINUX OR APPLE set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") if(NOT (IN_OPENWRT OR APPLE)) set (CMAKE_C_FLAGS "-D_POSIX_C_SOURCE=200112L ${CMAKE_C_FLAGS}") endif() endif() enable_testing() include(CheckSymbolExists) function(detect_architecture symbol arch) if (NOT DEFINED ARCHITECTURE OR ARCHITECTURE STREQUAL "") set(CMAKE_REQUIRED_QUIET 1) check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch}) unset(CMAKE_REQUIRED_QUIET) # The output variable needs to be unique across invocations otherwise # CMake's crazy scope rules will keep it defined if (ARCHITECTURE_${arch}) set(ARCHITECTURE "${arch}" PARENT_SCOPE) set(ARCHITECTURE_${arch} 1 PARENT_SCOPE) add_definitions(-DARCHITECTURE_${arch}=1) endif() endif() endfunction() if (MSVC) detect_architecture("_M_AMD64" x86_64) detect_architecture("_M_IX86" x86) detect_architecture("_M_ARM" ARM) else() detect_architecture("__x86_64__" x86_64) detect_architecture("__i386__" x86) detect_architecture("__arm__" ARM) endif() if (NOT DEFINED ARCHITECTURE OR ARCHITECTURE STREQUAL "") set(ARCHITECTURE "GENERIC") endif() message(STATUS "target architecture: ${ARCHITECTURE}") #if any compiler has a command line switch called "OFF" then it will need special care if(NOT "${compileOption_C}" STREQUAL "OFF") set(CMAKE_C_FLAGS "${compileOption_C} ${CMAKE_C_FLAGS}") endif() if(NOT "${compileOption_CXX}" STREQUAL "OFF") set(CMAKE_CXX_FLAGS "${compileOption_CXX} ${CMAKE_CXX_FLAGS}") endif() include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-std=c++11" CXX_FLAG_CXX11) macro(compileAsC99) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "--std=c99 ${CMAKE_C_FLAGS}") if (CXX_FLAG_CXX11) set (CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}") else() set (CMAKE_CXX_FLAGS "--std=c++0x ${CMAKE_CXX_FLAGS}") endif() endif() else() set (CMAKE_C_STANDARD 99) set (CMAKE_CXX_STANDARD 11) endif() endmacro(compileAsC99) macro(compileAsC11) if (CXX_FLAG_CXX11) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "--std=c11 ${CMAKE_C_FLAGS}") set (CMAKE_C_FLAGS "-D_POSIX_C_SOURCE=200112L ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}") endif() else() set (CMAKE_C_STANDARD 11) set (CMAKE_CXX_STANDARD 11) endif() else() if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "--std=c99 ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "--std=c++0x ${CMAKE_CXX_FLAGS}") else() set (CMAKE_C_STANDARD 11) set (CMAKE_CXX_STANDARD 11) endif() endif() endmacro(compileAsC11) function(compileTargetAsC99 theTarget) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set_target_properties(${theTarget} PROPERTIES COMPILE_FLAGS "--std=c99") endif() else() set_target_properties(${theTarget} PROPERTIES C_STANDARD 99) set_target_properties(${theTarget} PROPERTIES CXX_STANDARD 11) endif() endfunction() function(compileTargetAsC11 theTarget) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") if (CXX_FLAG_CXX11) set_target_properties(${theTarget} PROPERTIES COMPILE_FLAGS "--std=c11 -D_POSIX_C_SOURCE=200112L") else() set_target_properties(${theTarget} PROPERTIES COMPILE_FLAGS "--std=c99 -D_POSIX_C_SOURCE=200112L") endif() endif() else() set_target_properties(${theTarget} PROPERTIES C_STANDARD 11) set_target_properties(${theTarget} PROPERTIES CXX_STANDARD 11) endif() endfunction() IF((WIN32) AND (NOT(MINGW))) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) IF(WINCE) # Don't treat warning as errors for WEC 2013. WEC 2013 uses older compiler version add_definitions(/WX-) ELSE() # Make warning as error add_definitions(/WX) ENDIF() ELSE() # Make warning as error set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") ENDIF() function(add_files_to_install filesToBeInstalled) set(INSTALL_H_FILES ${INSTALL_H_FILES} ${filesToBeInstalled} CACHE INTERNAL "Files that will be installed on the system") endfunction() # XCode and stricter warning levels such as -Wall and -Wextra warn about unused # variables and unused static functions, both of which are produced by serializer function(usePermissiveRulesForSamplesAndTests) if (NOT MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable -Wno-unused-function -Wno-missing-braces -Wno-strict-aliasing") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable -Wno-unused-function -Wno-missing-braces -Wno-strict-aliasing") if(NOT APPLE AND NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-variable -Wno-clobbered") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable -Wno-clobbered") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE) endif() endfunction() # For targets which set warning switches as project properties (e.g. XCode) function(setTargetBuildProperties stbp_target) if(XCODE) set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_BOOL_CONVERSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_COMMA "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_CONSTANT_CONVERSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_EMPTY_BODY "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_ENUM_CONVERSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_INFINITE_RECURSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_INT_CONVERSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_NON_LITERAL_NULL_CONVERSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_OBJC_LITERAL_CONVERSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_OBJC_ROOT_CLASS "YES_ERROR") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_RANGE_LOOP_ANALYSIS "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_STRICT_PROTOTYPES "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_SUSPICIOUS_MOVE "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN_UNREACHABLE_CODE "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_CLANG_WARN__DUPLICATE_METHOD_MATCH "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_64_TO_32_BIT_CONVERSION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_ABOUT_RETURN_TYPE "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_UNDECLARED_SELECTOR "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_UNINITIALIZED_AUTOS "YES_AGGRESSIVE") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_UNUSED_FUNCTION "YES") set_target_properties(${stbp_target} PROPERTIES XCODE_ATTRIBUTE_GCC_WARN_UNUSED_VARIABLE "YES") endif() endfunction() azure_iot_external_pal_unit_test_setup.cmake000066400000000000000000000015451362133436400417710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) # quiet the CMake warning about unused command line args "use_wsio". This is from the c-utility CMake command. set(ignore_me ${use_wsio}) # Set up to make an external repo's unit tests include("${CMAKE_CURRENT_LIST_DIR}/azure_iot_build_rules.cmake") include("${SHARED_UTIL_FOLDER}/dependencies-test.cmake") add_subdirectory(${SHARED_UTIL_FOLDER}/testtools/ctest) add_subdirectory(${SHARED_UTIL_FOLDER}/testtools/testrunner) add_subdirectory(${SHARED_UTIL_FOLDER}/testtools/umock-c) #Setup the platform files in order to include the logging file definitions include("${SHARED_UTIL_FOLDER}/configs/azure_c_shared_utilityFunctions.cmake") set_platform_files(${SHARED_UTIL_FOLDER}) dependencies-test.cmake000066400000000000000000000003531362133436400336630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. if(${use_installed_dependencies}) find_package(umock_c REQUIRED CONFIG) endif()azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/dependencies.cmake000066400000000000000000000002241362133436400327620ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/000077500000000000000000000000001362133436400306005ustar00rootroot00000000000000agenttime_requirements.md000066400000000000000000000022321362133436400356220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocAgentTime ================ ## Overview AgentTime exports platform independent time related functions. It is a platform abstraction and it requires a specific implementation for each platform. Most of the times these functions can simply call the C standard time functions. Most implementations of the C `time()` function return seconds since 00:00 hours, Jan 1, 1970 UTC. Implementations which do not must convert the output of `time()` to conform to this spec. ###### Header files - [agenttime.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/agenttime.h)
## Exposed API **SRS_AGENT_TIME_99_001: [** AGENT_TIME shall have the following interface **]** ```c /* same functionality as most implementations time() of standard C function */ time_t get_time(time_t* p); /*the same as C's difftime*/ extern double get_difftime(time_t stopTime, time_t startTime); ``` **SRS_AGENT_TIME_30_002: [** The `time_t` values in this interface shall be seconds since 00:00 hours, Jan 1, 1970 UTC. **]** **SRS_AGENT_TIME_30_003: [** The `get_gmtime`, `get_mktime`, and `get_ctime` functions in are deprecated and shall not be used. **]** base32_requirements.md000066400000000000000000000101231362133436400347220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# Base32 Requirements ================ ## Overview This module is used to encode an array of unsigned chars using the standard base32 encoding stream. ## References [IETF RFC 4648](https://tools.ietf.org/html/rfc4648) ## Exposed API ```c extern STRING_HANDLE Base32_Encode(BUFFER_HANDLE input); extern char* Base32_Encode_Bytes(const unsigned char* source, size_t size); BUFFER_HANDLE Base32_Decode(STRING_HANDLE handle); BUFFER_HANDLE Base32_Decode_String(const char* source); ``` ### Base32_Encode ```c extern STRING_HANDLE Base32_Encode(BUFFER_HANDLE source); ``` **SRS_BASE32_07_001: [** If `source` is NULL `Base32_Encode` shall return NULL. **]** **SRS_BASE32_07_002: [** If successful `Base32_Encode` shall return the base32 value of source. **]** **SRS_BASE32_07_015: [** If `source` length is 0 `Base32_Encode` shall return an empty string. **]** **SRS_BASE32_07_003: [** `Base32_Encode` shall call into `Base32_Encode_impl` to encode the source data. **]** **SRS_BASE32_07_013: [** `Base32_Encode` shall wrap the `Base32_Encode_impl` result into a `STRING_HANDLE`. **]** **SRS_BASE32_07_014: [** Upon failure `Base32_Encode` shall return NULL. **]** ### Base32_Encode_Bytes ```c extern char* Base32_Encode_Bytes(const unsigned char* source, size_t size); ``` **SRS_BASE32_07_004: [** If `source` is NULL `Base32_Encode_Bytes` shall return NULL. **]** **SRS_BASE32_07_005: [** If `size` is 0 `Base32_Encode_Bytes` shall return an empty string. **]** **SRS_BASE32_07_006: [** If successful `Base32_Encode_Bytes` shall return the base32 value of input. **]** **SRS_BASE32_07_007: [** `Base32_Encode_Bytes` shall call into `Base32_Encode_impl` to encode the source data. **]** **SRS_BASE32_07_014: [** Upon failure `Base32_Encode_Bytes` shall return NULL. **]** ### base32_encode_impl ```c static char* base32_encode_impl(const unsigned char* source, size_t src_size) ``` **SRS_BASE32_07_009: [** `base32_encode_impl` shall allocate the buffer to the size of the encoding value. **]** **SRS_BASE32_07_010: [** `base32_encode_impl` shall look through `source` and separate each block into 5 bit chunks **]** **SRS_BASE32_07_011: [** `base32_encode_impl` shall then map the 5 bit chunks into one of the BASE32 values (a-z,2,3,4,5,6,7) values. **]** **SRS_BASE32_07_012: [** If the `src_size` is not divisible by 8 and less than the 40-bits, `base32_encode_impl` shall pad the remaining places with `=`. **]** ### Base32_Decode_String ```c extern BUFFER_HANDLE Base32_Decode_String(const char* source); ``` **SRS_BASE32_07_008: [** If source is NULL `Base32_Decode_String` shall return NULL. **]** **SRS_BASE32_07_019: [** On success `Base32_Decode_String` shall return a BUFFER_HANDLE that contains the decoded bytes for source. **]** **SRS_BASE32_07_020: [** `Base32_Decode_String` shall call `base32_decode_impl` to decode the base64 value. **]** ### Base32_Decode ```c extern BUFFER_HANDLE Base32_Decode(STRING_HANDLE source); ``` **SRS_BASE32_07_016: [** If source is NULL `Base32_Decode` shall return NULL. **]** **SRS_BASE32_07_017: [** On success `Base32_Decode` shall return a `BUFFER_HANDLE` that contains the decoded bytes for source. **]** **SRS_BASE32_07_018: [** `Base32_Decode` shall call `base32_decode_impl` to decode the base64 value **]** **SRS_BASE32_07_027: [** If the string in source value is NULL, `Base32_Decode` shall return NULL. **]** ### base32_decode_impl ```c static BUFFER_HANDLE base32_decode_impl(const char* source) ``` **SRS_BASE32_07_021: [** If the source length is not evenly divisible by 8, `base32_decode_impl` shall return NULL. **]** **SRS_BASE32_07_022: [** `base32_decode_impl` shall allocate a temp buffer to store the in process value. **]** **SRS_BASE32_07_023: [** If an error is encountered, `base32_decode_impl` shall return NULL. **]** **SRS_BASE32_07_024: [** `base32_decode_impl` shall loop through and collect 8 characters from the source variable. **]** **SRS_BASE32_07_025: [** `base32_decode_impl` shall group 5 bytes at a time into the temp buffer. **]** **SRS_BASE32_07_026: [** Once `base32_decode_impl` is complete it shall create a BUFFER with the temp buffer. **]**base64_requirements.md000066400000000000000000000045461362133436400347430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocBase64 Requirements ================ ## Overview This module is used to encode a BUFFER using the standard base64 encoding stream. ## References [IETF RFC 4648](https://tools.ietf.org/html/rfc4648) ## Exposed API ```c extern STRING_HANDLE Base64_Encoder(BUFFER_HANDLE input); extern STRING_HANDLE Base64_Encode_Bytes(const unsigned char* source, size_t size); extern BUFFER_HANDLE Base64_Decoder(const char* source); ``` ### Base64_Encoder ```c extern STRING_HANDLE Base64_Encoder(BUFFER_HANDLE input); ``` Base64_Encoder takes as a parameter a pointer to BUFFER, input. **SRS_BASE64_06_001: [** If input is NULL then Base64_Encoder shall return NULL. **]** The size of the BUFFER pointed to by input MAY be zero. **SRS_BASE64_06_006: [** If when allocating memory to produce the encoding a failure occurs then Base64_Encoder shall return NULL. **]** **SRS_BASE64_06_007: [** Otherwise Base64_Encoder shall return a pointer to STRING, that string contains the base 64 encoding of input. **]** This encoding of input shall NOT contain embedded line feeds. ### Base64_Encode_Bytes ```c extern STRING_HANDLE Base64_Encode_Bytes(const unsigned char* source, size_t size); ``` Base64_Encode_Bytes shall produce a STRING_HANDLE containing the base64 encoding of the buffer pointed to by source, having the size as given by parameter size. **SRS_BASE64_02_001: [** If source is NULL then Base64_Encode_Bytes shall return NULL. **]** **SRS_BASE64_02_002: [** If source is not NULL and size is zero, then Base64_Encode_Bytes shall produce an empty STRING_HANDLE. **]** **SRS_BASE64_02_003: [** Otherwise, Base64_Encode_Bytes shall produce a STRING_HANDLE containing the Base64 representation of the buffer. **]** **SRS_BASE64_02_004: [** In case of any errors, Base64_Encode_Bytes shall return NULL. **]** ### Base64_Decoder ```c extern BUFFER_HANDLE Base64_Decoder(const char* source); ``` **SRS_BASE64_06_008: [** If source is NULL then Base64_Decoder shall return NULL. **]** **SRS_BASE64_06_009: [** If the string pointed to by source is zero length then the handle returned shall refer to a zero length buffer. **]** **SRS_BASE64_06_010: [** If there is any memory allocation failure during the decode then Base64_Decoder shall return NULL. **]** **SRS_BASE64_06_011: [** If the source string has an invalid length for a base 64 encoded string then Base64_Decoder shall return NULL. **]** buffer_requirements.md000066400000000000000000000207521362133436400351250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocBUFFER Requirements ================ ## Overview The BUFFER object encapsulastes a unsigned char* variable. ## Exposed API ```c typedef void* BUFFER_HANDLE; extern BUFFER_HANDLE BUFFER_new(void); extern void BUFFER_delete(BUFFER_HANDLE handle); extern BUFFER_HANDLE BUFFER_create(const unsigned char* source, size_t size); extern int BUFFER_pre_build(BUFFER_HANDLE handle, size_t size); extern int BUFFER_build(BUFFER_HANDLE handle, const unsigned char* source, size_t size); extern int BUFFER_unbuild(BUFFER_HANDLE handle); extern int BUFFER_enlarge(BUFFER_HANDLE handle, size_t enlargeSize); extern int BUFFER_content(BUFFER_HANDLE handle, const unsigned char** content); extern int BUFFER_size(BUFFER_HANDLE handle, size_t* size); extern int BUFFER_append(BUFFER_HANDLE handle1, BUFFER_HANDLE handle2); extern int BUFFER_prepend(BUFFER_HANDLE handle1, BUFFER_HANDLE handle2); extern unsigned char* BUFFER_u_char(BUFFER_HANDLE handle); extern size_t BUFFER_length(BUFFER_HANDLE handle); extern BUFFER_HANDLE BUFFER_clone(BUFFER_HANDLE handle); extern int BUFFER_fill(BUFFER_HANDLE handle, unsigned char fill_char); ``` ### BUFFER_new ```c BUFFER_HANDLE BUFFER_new(void) ``` **SRS_BUFFER_07_001: [** BUFFER_new shall allocate a BUFFER_HANDLE that will contain a NULL unsigned char*. **]** ### BUFFER_create ```c extern BUFFER_HANDLE BUFFER_create(const unsigned char* source, size_t size); ``` BUFFER_create creates a new buffer from the memory at source, having size "size". **SRS_BUFFER_02_001: [** If source is NULL then BUFFER_create shall return NULL. **]** **SRS_BUFFER_02_002: [** Otherwise, BUFFER_create shall allocate memory to hold size bytes and shall copy from source size bytes into the newly allocated memory. **]** **SRS_BUFFER_02_003: [** If allocating memory fails, then BUFFER_create shall return NULL. **]** **SRS_BUFFER_02_004: [** Otherwise, BUFFER_create shall return a non-NULL handle. **]** ### BUFFER_delete ```c void BUFFER_delete(BUFFER_HANDLE handle) ``` **SRS_BUFFER_07_003: [** BUFFER_delete shall delete the data associated with the BUFFER_HANDLE along with the Buffer. **]** **SRS_BUFFER_07_004: [** BUFFER_delete shall not delete any BUFFER_HANDLE that is NULL. **]** ### BUFFER_pre_build ```c int BUFFER_pre_build(BUFFER_HANDLE handle, size_t size) ``` **SRS_BUFFER_07_005: [** BUFFER_pre_build allocates size_t bytes of BUFFER_HANDLE and returns zero on success. **]** **SRS_BUFFER_07_006: [** If handle is NULL or size is 0 then BUFFER_pre_build shall return a nonzero value. **]** **SRS_BUFFER_07_007: [** BUFFER_pre_build shall return nonzero if the buffer has been previously allocated and is not NULL. **]** **SRS_BUFFER_07_013: [** BUFFER_pre_build shall return nonzero if any error is encountered. **]** ### BUFFER_build ```c int BUFFER_build(BUFFER_HANDLE handle, const unsigned char* source, size_t size) ``` **SRS_BUFFER_07_008: [** BUFFER_build allocates size_t bytes, copies the unsigned char* into the buffer and returns zero on success. **]** **SRS_BUFFER_07_009: [** BUFFER_build shall return nonzero if handle is NULL **]** **SRS_BUFFER_01_001: [** If size is positive and source is NULL, BUFFER_build shall return nonzero **]** **SRS_BUFFER_01_002: [** The size argument can be zero, in which case the underlying buffer held by the buffer instance shall be freed. **]** **SRS_BUFFER_01_003: [** If size is zero, source can be NULL. **]** **SRS_BUFFER_07_010: [** BUFFER_build shall return nonzero if any error is encountered. **]** **SRS_BUFFER_07_011: [** BUFFER_build shall overwrite previous contents if the buffer has been previously allocated. **]** ### BUFFER_append_build ```c int BUFFER_append_build(BUFFER_HANDLE handle, const unsigned char* source, size_t size) ``` **SRS_BUFFER_07_029: [** `BUFFER_append_build` shall return nonzero if handle or source are NULL or if size is 0. **]** **SRS_BUFFER_07_030: [** if handle->buffer is NULL `BUFFER_append_build` shall allocate the a buffer of size bytes... **]** **SRS_BUFFER_07_031: [** ... and copy the contents of source to handle->buffer. **]** **SRS_BUFFER_07_032: [** if handle->buffer is not NULL `BUFFER_append_build` shall realloc the buffer to be the handle->size + size **]** **SRS_BUFFER_07_033: [** ... and copy the contents of source to the end of the buffer. **]** **SRS_BUFFER_07_034: [** On success `BUFFER_append_build` shall return 0 **]** **SRS_BUFFER_07_035: [** If any error is encountered `BUFFER_append_build` shall return a non-null value. **]** ### BUFFER_unbuild ```c int BUFFER_unbuild(BUFFER_HANDLE b) ``` **SRS_BUFFER_07_012: [** BUFFER_unbuild shall clear the underlying unsigned char* data associated with the BUFFER_HANDLE this will return zero on success. **]** **SRS_BUFFER_07_014: [** BUFFER_unbuild shall return a nonzero value if BUFFER_HANDLE is NULL. **]** **SRS_BUFFER_07_015: [** BUFFER_unbuild shall return a nonzero value if the unsigned char* referenced by BUFFER_HANDLE is NULL. **]** ### BUFFER_enlarge ```c int BUFFER_enlarge(BUFFER_HANDLE handle, size_t enlargeSize) ``` **SRS_BUFFER_07_016: [** BUFFER_enlarge shall increase the size of the unsigned char* referenced by BUFFER_HANDLE. **]** **SRS_BUFFER_07_017: [** BUFFER_enlarge shall return a nonzero result if any parameters are NULL or zero. **]** **SRS_BUFFER_07_018: [** BUFFER_enlarge shall return a nonzero result if any error is encountered. **]** ### BUFFER_shrink ```c int BUFFER_shrink(BUFFER_HANDLE handle, size_t decreaseSize, bool fromEnd) ``` **SRS_BUFFER_07_036: [** if handle is NULL, `BUFFER_shrink` shall return a non-null value **]** **SRS_BUFFER_07_037: [** If decreaseSize is equal zero, `BUFFER_shrink` shall return a non-null value **]** **SRS_BUFFER_07_038: [** If decreaseSize is less than the size of the buffer, `BUFFER_shrink` shall return a non-null value **]** **SRS_BUFFER_07_039: [** `BUFFER_shrink` shall allocate a temporary buffer of existing buffer size minus decreaseSize. **]** **SRS_BUFFER_07_040: [** if the fromEnd variable is true, `BUFFER_shrink` shall remove the end of the buffer of size decreaseSize. **]** **SRS_BUFFER_07_041: [** if the fromEnd variable is false, `BUFFER_shrink` shall remove the beginning of the buffer of size decreaseSize. **]** **SRS_BUFFER_07_042: [** If a failure is encountered, `BUFFER_shrink` shall return a non-null value **]** **SRS_BUFFER_07_043: [** If the decreaseSize is equal the buffer size , `BUFFER_shrink` shall deallocate the buffer and set the size to zero. **]** ### BUFFER_content ```c int BUFFER_content(BUFFER_HANDLE handle, unsigned char** content) ``` **SRS_BUFFER_07_019: [** BUFFER_content shall return the data contained within the BUFFER_HANDLE. **]** **SRS_BUFFER_07_020: [** If the handle and/or content*is NULL BUFFER_content shall return nonzero. **]** ### BUFFER_size ```c int BUFFER_size(BUFFER_HANDLE b, size_t* size) ``` **SRS_BUFFER_07_021: [** BUFFER_size shall place the size of the associated buffer in the size variable and return zero on success. **]** **SRS_BUFFER_07_022: [** BUFFER_size shall return a nonzero value for any error that is encountered. **]** ### BUFFER_append ```c int BUFFER_append(BUFFER_HANDLE handle1, BUFFER_HANDLE handle2) ``` **SRS_BUFFER_07_024: [** BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success. **]** **SRS_BUFFER_07_023: [** BUFFER_append shall return a nonzero upon any error that is encountered. **]** ### BUFFER_prepend ```c int BUFFER_prepend(BUFFER_HANDLE handle1, BUFFER_HANDLE handle2) ``` **SRS_BUFFER_01_004: [** BUFFER_prepend concatenates handle1 onto handle2 without modifying handle1 and shall return zero on success. **]** **SRS_BUFFER_01_005: [** BUFFER_prepend shall return a non-zero upon value any error that is encountered. **]** ### BUFFER_fill ```c extern int BUFFER_fill(BUFFER_HANDLE handle, unsigned char fill_char); ``` **SRS_BUFFER_07_001: [** `BUFFER_fill` shall fill the supplied `BUFFER_HANDLE` with the supplied fill character. **]** **SRS_BUFFER_07_002: [** If `handle` is NULL `BUFFER_fill` shall return a non-zero value. **]** ### BUFFER_u_char ```c unsigned char* BUFFER_u_char(BUFFER_HANDLE handle) ``` **SRS_BUFFER_07_025: [** BUFFER_u_char shall return a pointer to the underlying unsigned char*. **]** **SRS_BUFFER_07_026: [** BUFFER_u_char shall return NULL for any error that is encountered. **]** ### BUFFER_length ```c size_t BUFFER_length(BUFFER_HANDLE handle) ``` **SRS_BUFFER_07_027: [** BUFFER_length shall return the size of the underlying buffer. **]** **SRS_BUFFER_07_028: [** BUFFER_length shall return zero for any error that is encountered. **]** condition_requirements.md000066400000000000000000000066531362133436400356460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocCondition Requirements ================ ## Overview Condition is a module which allows thread synchronization to occur in a cross-platform manner. It provides a mechanism for signalling events between threads and for waiting on events in a platform-independent manner. ## References [lock](lock_requirements.md) ## Exposed API ```C /** * @brief This API creates and returns a valid condition handle. * * @return A valid @c COND_HANDLE when successful or @c NULL otherwise. */ extern COND_HANDLE Condition_Init(void); /** * @brief unblock all currently working condition. * * @param handle A valid handle to the lock. * * @return Returns @c COND_OK when the condition object has been * destroyed and @c COND_ERROR when an error occurs * and @c COND_TIMEOUT when the handle times out. */ extern COND_RESULT Condition_Post(COND_HANDLE handle); /** * @brief block on the condition handle unti the thread is signalled * or until the timeout_milliseconds is reached. * * @param handle A valid handle to the lock. * * @return Returns @c COND_OK when the condition object has been * destroyed and @c COND_ERROR when an error occurs * and @c COND_TIMEOUT when the handle times out. */ extern COND_RESULT Condition_Wait(COND_HANDLE handle, LOCK_HANDLE lock, int timeout_milliseconds); /** * @brief The condition instance is deinitialized. * * @param handle A valid handle to the condition. * * @return Returns @c COND_OK when the condition object has been * destroyed and @c COND_ERROR when an error occurs. */ extern void Condition_Deinit(COND_HANDLE handle); ``` ### Condition_Init ```C extern COND_HANDLE Condition_Init(void); ``` **SRS_CONDITION_18_002: [** `Condition_Init` shall create and return a `CONDITION_HANDLE` **]** **SRS_CONDITION_18_008: [** `Condition_Init` shall return `NULL` if it fails to allocate the `CONDITION_HANDLE` **]** ### Condition_Post ```C extern COND_RESULT Condition_Post(COND_HANDLE handle); ``` **SRS_CONDITION_18_003: [** `Condition_Post` shall return `COND_OK` if it succcessfully posts the condition **]** **SRS_CONDITION_18_001: [** `Condition_Post` shall return `COND_INVALID_ARG` if `handle` is `NULL` **]** ### Condition_Wait ```C extern COND_RESULT Condition_Wait(COND_HANDLE handle, LOCK_HANDLE lock, int timeout_milliseconds); ``` **SRS_CONDITION_18_004: [** `Condition_Wait` shall return `COND_INVALID_ARG` if `handle` is `NULL` **]** **SRS_CONDITION_18_005: [** `Condition_Wait` shall return `COND_INVALID_ARG` if `lock` is `NULL` and `timeout_milliseconds` is `0` **]** **SRS_CONDITION_18_006: [** `Condition_Wait` shall return `COND_INVALID_ARG` if `lock` is `NULL` and `timeout_milliseconds` is not `0` **]** **SRS_CONDITION_18_010: [** `Condition_Wait` shall return `COND_OK` if the condition is triggered and `timeout_milliseconds` is `0` **]** **SRS_CONDITION_18_011: [** `Condition_Wait` shall return `COND_TIMEOUT` if the condition is NOT triggered and `timeout_milliseconds` is not `0` **]** **SRS_CONDITION_18_012: [** `Condition_Wait` shall return `COND_OK` if the condition is triggered and `timeout_milliseconds` is not `0` **]** **SRS_CONDITION_18_013: [** `Condition_Wait` shall accept relative timeouts **]** ### Condition_Deinit ```C extern void Condition_Deinit(COND_HANDLE handle); ``` **SRS_CONDITION_18_007: [** `Condition_Deinit` will not fail if `handle` is `NULL` **]** **SRS_CONDITION_18_009: [** `Condition_Deinit` will deallocate `handle` if it is not `NULL` **]** connectionstringparser_requirements.md000066400000000000000000000154061362133436400404570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc#connectionstringparser requirements ==================================== ## Overview connection_parser is module that parses key/value pairs from a connection string. The format of the connection string is: [key1]=[value1];[key2]=[value2]; ... ## Exposed API ```c extern MAP_HANDLE connectionstringparser_parse_from_char(const char* connection_string); extern MAP_HANDLE connectionstringparser_parse(STRING_HANDLE connection_string); extern int connectionstringparser_splitHostName_from_char(const char* hostName, STRING_HANDLE nameString, STRING_HANDLE suffixString); extern int connectionstringparser_splitHostName(STRING_HANDLE hostNameString, STRING_HANDLE nameString, STRING_HANDLE suffixString); ``` ### connectionstringparser_parse ```c extern MAP_HANDLE connectionstringparser_parse(STRING_HANDLE connection_string); ``` **SRS_CONNECTIONSTRINGPARSER_01_001: [** connectionstringparser_parse shall parse all key value pairs from the connection_string passed in as argument and return a new map that holds the key/value pairs. **]** **SRS_CONNECTIONSTRINGPARSER_01_018: [** If creating the result map fails, then connectionstringparser_parse shall return NULL. **]** **SRS_CONNECTIONSTRINGPARSER_01_002: [** If connection_string is NULL then connectionstringparser_parse shall fail and return NULL. **]** **SRS_CONNECTIONSTRINGPARSER_01_003: [** connectionstringparser_parse shall create a STRING tokenizer to be used for parsing the connection string, by calling STRING_TOKENIZER_create. **]** **SRS_CONNECTIONSTRINGPARSER_01_015: [** If STRING_TOKENIZER_create fails, connectionstringparser_parse shall fail and return NULL. **]** **SRS_CONNECTIONSTRINGPARSER_01_004: [** connectionstringparser_parse shall start scanning at the beginning of the connection string. **]** **SRS_CONNECTIONSTRINGPARSER_01_016: [** 2 STRINGs shall be allocated in order to hold the to be parsed key and value tokens. **]** **SRS_CONNECTIONSTRINGPARSER_01_017: [** If allocating the STRINGs fails connectionstringparser_parse shall fail and return NULL. **]** **SRS_CONNECTIONSTRINGPARSER_01_005: [** The following actions shall be repeated until parsing is complete: **]** **SRS_CONNECTIONSTRINGPARSER_01_006: [** connectionstringparser_parse shall find a token (the key of the key/value pair) delimited by the `=` character, by calling STRING_TOKENIZER_get_next_token. **]** **SRS_CONNECTIONSTRINGPARSER_01_007: [** If STRING_TOKENIZER_get_next_token fails, parsing shall be considered complete. **]** **SRS_CONNECTIONSTRINGPARSER_01_008: [** connectionstringparser_parse shall find a token (the value of the key/value pair) delimited by the `;` character, by calling STRING_TOKENIZER_get_next_token. **]** **SRS_CONNECTIONSTRINGPARSER_01_009: [** If STRING_TOKENIZER_get_next_token fails, connectionstringparser_parse shall fail and return NULL (freeing the allocated result map). **]** **SRS_CONNECTIONSTRINGPARSER_01_010: [** The key and value shall be added to the result map by using Map_Add. **]** **SRS_CONNECTIONSTRINGPARSER_01_011: [** The C strings for the key and value shall be extracted from the previously parsed STRINGs by using STRING_c_str. **]** **SRS_CONNECTIONSTRINGPARSER_01_019: [** If the key length is zero then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map). **]** **SRS_CONNECTIONSTRINGPARSER_01_012: [** If Map_Add fails connectionstringparser_parse shall fail and return NULL (freeing the allocated result map). **]** **SRS_CONNECTIONSTRINGPARSER_01_013: [** If STRING_c_str fails then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map). **]** **SRS_CONNECTIONSTRINGPARSER_01_014: [** After the parsing is complete the previously allocated STRINGs and STRING tokenizer shall be freed by calling STRING_TOKENIZER_destroy. **]** ### connectionstringparser_parse_from_char ```c extern MAP_HANDLE connectionstringparser_parse_from_char(const char* connection_string); ``` **SRS_CONNECTIONSTRINGPARSER_21_020: [** connectionstringparser_parse_from_char shall create a STRING_HANDLE from the connection_string passed in as argument and parse it using the connectionstringparser_parse. **]** **SRS_CONNECTIONSTRINGPARSER_21_021: [** If connectionstringparser_parse_from_char get error creating a STRING_HANDLE, it shall return NULL. **]** ### connectionstringparser_splitHostName_from_char ```c extern int connectionstringparser_splitHostName_from_char(const char* hostName, STRING_HANDLE nameString, STRING_HANDLE suffixString); ``` **SRS_CONNECTIONSTRINGPARSER_21_022: [** connectionstringparser_splitHostName_from_char shall split the provided hostName in name and suffix. **]** **SRS_CONNECTIONSTRINGPARSER_21_023: [** connectionstringparser_splitHostName_from_char shall copy all characters, from the beginning of the hostName to the first `.` to the nameString. **]** **SRS_CONNECTIONSTRINGPARSER_21_024: [** connectionstringparser_splitHostName_from_char shall copy all characters, from the first `.` to the end of the hostName, to the suffixString. **]** **SRS_CONNECTIONSTRINGPARSER_21_025: [** If connectionstringparser_splitHostName_from_char get success splitting the hostName, it shall return 0. **]** **SRS_CONNECTIONSTRINGPARSER_21_026: [** If the hostName is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__. **]** **SRS_CONNECTIONSTRINGPARSER_21_027: [** If the hostName is an empty string, connectionstringparser_splitHostName_from_char shall return __FAILURE__. **]** **SRS_CONNECTIONSTRINGPARSER_21_028: [** If the nameString is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__. **]** **SRS_CONNECTIONSTRINGPARSER_21_029: [** If the suffixString is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__. **]** **SRS_CONNECTIONSTRINGPARSER_21_030: [** If the hostName is not a valid host name, connectionstringparser_splitHostName_from_char shall return __FAILURE__. **]** **SRS_CONNECTIONSTRINGPARSER_21_031: [** If connectionstringparser_splitHostName_from_char get error copying the name to the nameString, it shall return __FAILURE__. **]** **SRS_CONNECTIONSTRINGPARSER_21_032: [** If connectionstringparser_splitHostName_from_char get error copying the suffix to the suffixString, it shall return __FAILURE__. **]** ### connectionstringparser_splitHostName ```c extern int connectionstringparser_splitHostName(STRING_HANDLE hostNameString, STRING_HANDLE nameString, STRING_HANDLE suffixString); ``` **SRS_CONNECTIONSTRINGPARSER_21_033: [** connectionstringparser_splitHostName shall convert the hostNameString to a connection_string passed in as argument, and call connectionstringparser_splitHostName_from_char. **]** **SRS_CONNECTIONSTRINGPARSER_21_034: [** If the hostNameString is NULL, connectionstringparser_splitHostName shall return __FAILURE__. **]** constbuffer_requirements.md000066400000000000000000000076151362133436400361770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocConstBuffer Requirements ================ ## Overview ConstBuffer is a module that implements a read-only buffer of bytes (unsigned char). Once created, the buffer can no longer be changed. The buffer is ref counted so further _Clone calls result in zero copy. ## References [refcount](../inc/refcount.h) [buffer](buffer_requirements.md) ## Exposed API ```C /*this is the handle*/ typedef struct CONSTBUFFER_HANDLE_DATA_TAG* CONSTBUFFER_HANDLE; /*this is what is returned when the content of the buffer needs access*/ typedef struct CONSTBUFFER_TAG { const unsigned char* buffer; size_t size; } CONSTBUFFER; /*this creates a new constbuffer from a memory area*/ extern CONSTBUFFER_HANDLE CONSTBUFFER_Create(const unsigned char* source, size_t size); /*this creates a new constbuffer from an existing BUFFER_HANDLE*/ extern CONSTBUFFER_HANDLE CONSTBUFFER_CreateFromBuffer(BUFFER_HANDLE buffer); extern CONSTBUFFER_HANDLE CONSTBUFFER_Clone(CONSTBUFFER_HANDLE constbufferHandle); extern const CONSTBUFFER* CONSTBUFFER_GetContent(CONSTBUFFER_HANDLE constbufferHandle); extern void CONSTBUFFER_HANDLE_Destroy(CONSTBUFFER constbufferHandle); ``` ### ConstBuffer_Create ```C extern CONSTBUFFER_HANDLE CONSTBUFFER_Create(const unsigned char* source, size_t size); ``` **SRS_CONSTBUFFER_02_001: [** If `source` is NULL and `size` is different than 0 then CONSTBUFFER_Create shall fail and return NULL. **]** **SRS_CONSTBUFFER_02_002: [** Otherwise, `CONSTBUFFER_Create` shall create a copy of the memory area pointed to by `source` having `size` bytes. **]** **SRS_CONSTBUFFER_02_003: [** If creating the copy fails then `CONSTBUFFER_Create` shall return NULL. **]** **SRS_CONSTBUFFER_02_004: [** Otherwise `CONSTBUFFER_Create` shall return a non-NULL handle. **]** **SRS_CONSTBUFFER_02_005: [** The non-NULL handle returned by `CONSTBUFFER_Create` shall have its ref count set to "1". **]** ### CONSTBUFFER_CreateFromBuffer ```C extern CONSTBUFFER_HANDLE CONSTBUFFER_CreateFromBuffer(BUFFER_HANDLE buffer); ``` **SRS_CONSTBUFFER_02_006: [** If `buffer` is NULL then `CONSTBUFFER_CreateFromBuffer` shall fail and return NULL. **]** **SRS_CONSTBUFFER_02_007: [** Otherwise, `CONSTBUFFER_CreateFromBuffer` shall copy the content of `buffer`. **]** **SRS_CONSTBUFFER_02_008: [** If copying the content fails, then `CONSTBUFFER_CreateFromBuffer` shall fail and return NULL. **]** **SRS_CONSTBUFFER_02_009: [** Otherwise, `CONSTBUFFER_CreateFromBuffer` shall return a non-NULL handle. **]** **SRS_CONSTBUFFER_02_010: [** The non-NULL handle returned by `CONSTBUFFER_CreateFromBuffer` shall have its ref count set to "1". **]** ### CONSTBUFFER_GetContent ```C extern const CONSTBUFFER* CONSTBUFFER_GetContent(CONSTBUFFER_HANDLE constbufferHandle); ``` **SRS_CONSTBUFFER_02_011: [** If `constbufferHandle` is NULL then CONSTBUFFER_GetContent shall return NULL. **]** **SRS_CONSTBUFFER_02_012: [** Otherwise, `CONSTBUFFER_GetContent` shall return a `const CONSTBUFFER*` that matches byte by byte the original bytes used to created the const buffer and has the same length. **]** ### CONSTBUFFER_Clone ```C extern CONSTBUFFER_HANDLE CONSTBUFFER_Clone(CONSTBUFFER_HANDLE constbufferHandle); ``` **SRS_CONSTBUFFER_02_013: [** If `constbufferHandle` is NULL then CONSTBUFFER_Clone shall fail and return NULL. **]** **SRS_CONSTBUFFER_02_014: [** Otherwise, `CONSTBUFFER_Clone` shall increment the reference count and return `constbufferHandle`. **]** ### CONSTBUFFER_Destroy ```C extern void CONSTBUFFER_Destroy(CONSTBUFFER_HANDLE constbufferHandle); ``` **SRS_CONSTBUFFER_02_015: [** If `constbufferHandle` is NULL then `CONSTBUFFER_Destroy` shall do nothing. **]** **SRS_CONSTBUFFER_02_016: [** Otherwise, `CONSTBUFFER_Destroy` shall decrement the refcount on the `constbufferHandle` handle. **]** **SRS_CONSTBUFFER_02_017: [** If the refcount reaches zero, then `CONSTBUFFER_Destroy` shall deallocate all resources used by the CONSTBUFFER_HANDLE. **]** constmap_requirements.md000066400000000000000000000134771362133436400355060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocConstMap Requirements ================ ## Overview Const Map is a module that implements a read-only dictionary of `const char*` key to `const char*` values. It is intially populated by a Map. ## References [refcount](../inc/refcount.h) [Map](map_requirements.md) ## Exposed API ```C #define CONSTMAP_RESULT_VALUES \ CONSTMAP_OK, \ CONSTMAP_ERROR, \ CONSTMAP_INVALIDARG, \ CONSTMAP_KEYNOTFOUND DEFINE_ENUM(CONSTMAP_RESULT, CONSTMAP_RESULT_VALUES); typedef struct CONSTMAP_HANDLE_DATA_TAG* CONSTMAP_HANDLE; extern CONSTMAP_HANDLE CONSTMAP_Create(MAP_HANDLE sourceMap); extern void ConstMap_Destroy(CONSTMAP_HANDLE handle); extern CONSTMAP_HANDLE ConstMap_Clone(CONSTMAP_HANDLE handle); extern MAP_HANDLE ConstMap_CloneWriteable(CONSTMAP_HANDLE handle); extern bool ConstMap_ContainsKey(CONSTMAP_HANDLE handle, const char* key); extern bool ConstMap_ContainsValue(CONSTMAP_HANDLE handle, const char* value); extern const char* ConstMap_GetValue(CONSTMAP_HANDLE handle, const char* key); extern CONSTMAP_RESULT ConstMap_GetInternals(CONSTMAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count); ``` ### ConstMap_Create ```C extern CONSTMAP_HANDLE ConstMap_Create(MAP_HANDLE sourceMap); ``` **SRS_CONSTMAP_17_001: [** `ConstMap_Create` shall create an immutable map, populated by the key, value pairs in the source map. **]** **SRS_CONSTMAP_17_048: [** `ConstMap_Create` shall accept any non-`NULL` `MAP_HANDLE` as input. **]** **SRS_CONSTMAP_17_002: [** If during creation there are any errors, then `ConstMap_Create` shall return `NULL`. **]** **SRS_CONSTMAP_17_003: [** Otherwise, it shall return a non-`NULL` handle that can be used in subsequent calls. **]** ### ConstMap_Destroy ```C extern void ConstMap_Destroy(CONSTMAP_HANDLE handle); ``` **SRS_CONSTMAP_17_005: [** If parameter handle is `NULL` then `ConstMap_Destroy` shall take no action. **]** **SRS_CONSTMAP_17_049: [** `ConstMap_Destroy` shall decrement the internal reference count of the immutable map. **]** **SRS_CONSTMAP_17_004: [** If the reference count is zero, `ConstMap_Destroy` shall release all resources associated with the immutable map. **]** ### ConstMap_Clone ```C extern CONSTMAP_HANDLE ConstMap_Clone(CONSTMAP_HANDLE handle); ``` **SRS_CONSTMAP_17_038: [** `ConstMap_Clone` returns `NULL` if parameter `handle` is `NULL`. **]** **SRS_CONSTMAP_17_039: [** `ConstMap_Clone` shall increase the internal reference count of the immutable map indicated by parameter `handle` **]** **SRS_CONSTMAP_17_050: [** `ConstMap_Clone` shall return the non-`NULL` handle. **]** ### ConstMap_CloneWriteable ```C extern MAP_HANDLE ConstMap_CloneWriteable(CONSTMAP_HANDLE handle); ``` This function will return a new MAP_HANDLE populated by the key, value pairs contained in the CONSTMAP_HANDLE. This MAP_HANDLE needs to be destroyed when it is no longer needed. **SRS_CONSTMAP_17_051: [** `ConstMap_CloneWriteable` returns `NULL` if parameter handle is `NULL`. **]** **SRS_CONSTMAP_17_052: [** `ConstMap_CloneWriteable` shall create a new, writeable map, populated by the key, value pairs in the parameter defined by `handle`. **]** **SRS_CONSTMAP_17_053: [** If during copying, any operation fails, then `ConstMap_CloneWriteableap_Clone` shall return `NULL`. **]** **SRS_CONSTMAP_17_054: [** Otherwise, `ConstMap_CloneWriteable` shall return a non-`NULL` handle that can be used in subsequent calls. **]** ### ConstMap_ContainsKey ```C extern bool ConstMap_ContainsKey(CONSTMAP_HANDLE handle, const char* key); ``` `ConstMap_ContainsKey` returns `true` if the map contains a key with the same value as parameter `key`. **SRS_CONSTMAP_17_024: [** If parameter `handle` or `key` are `NULL` then `ConstMap_ContainsKey` shall return `false`. **]** **SRS_CONSTMAP_17_025: [** Otherwise if a key exists then `ConstMap_ContainsKey` shall return `true`. **]** **SRS_CONSTMAP_17_026: [** If a key doesn't exist, then `ConstMap_ContainsKey` shall return `false`. **]** ### ConstMap_ContainsValue ```C extern bool ConstMap_ContainsValue(CONSTMAP_HANDLE handle, const char* value); ``` `ConstMap_ContainsKey` returns `true` if at least one pair in the map contains the `value` parameter. **SRS_CONSTMAP_17_027: [** If parameter `handle` or `value` is `NULL` then `ConstMap_ContainsValue` shall return `false`. **]** **SRS_CONSTMAP_17_028: [** Otherwise, if a pair has its value equal to the parameter `value`, the `ConstMap_ContainsValue` shall return `true`. **]** **SRS_CONSTMAP_17_029: [** Otherwise, if such a does not exist, then `ConstMap_ContainsValue` shall return `false`. **]** ### ConstMap_GetValue ```C extern const char* ConstMap_GetValue(CONSTMAP_HANDLE handle, const char* key); ``` `ConstMap_GetValue` returns the value of a stored key. **SRS_CONSTMAP_17_040: [** If parameter `handle` or `key` is `NULL` then `ConstMap_GetValue` returns `NULL`. **]** **SRS_CONSTMAP_17_041: [** If the key is not found, then `ConstMap_GetValue` returns `NULL`. **]** **SRS_CONSTMAP_17_042: [** Otherwise, `ConstMap_GetValue` returns the key's value. **]** ### ConstMap_GetInternals ```C extern CONSTMAP_RESULT ConstMap_GetInternals(CONSTMAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count); ``` **SRS_CONSTMAP_17_046: [** If parameter `handle`, `keys`, `values` or `count` is `NULL` then `ConstMap_GetInternals` shall return `CONSTMAP_INVALIDARG`. **]** **SRS_CONSTMAP_17_043: [** `ConstMap_GetInternals` shall produce in `*keys` a pointer to an array of `const char*` having all the keys stored so far by the map. **]** **SRS_CONSTMAP_17_044: [** `ConstMap_GetInternals` shall produce in `*values` a pointer to an array of `const char*` having all the values stored so far by the map. **]** **SRS_CONSTMAP_17_045: [** `ConstMap_GetInternals` shall produce in `*count` the number of stored keys and values. **]** crt_abstraction_requirements.md000066400000000000000000000351351362133436400370360ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocCRTAbstractions Requirements ================ ## Overview Many old CRT functions have newer, more secure versions via Microsoft's implementation of the run-time library. These have the _s ("secure") suffix. The CRTAbstractions module provides the same secure functions for when not using a Microsoft platforms. ## Generic Requirements **SRS_CRT_ABSTRACTIONS_99_001: [** The module shall not redefine the secure functions implemented by Microsoft CRT. **]** **SRS_CRT_ABSTRACTIONS_99_040: [** The module shall still compile when building on a Microsoft platform. **]** ##Exposed API **SRS_CRT_ABSTRACTIONS_99_002: [** CRTAbstractions module shall expose the following API: ```c int strcat_s(char* dst, size_t dstSizeInBytes, const char* src); int strcpy_s(char* dst, size_t dstSizeInBytes, const char* src); int strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t maxCount); int sprintf_s(char* dst, size_t dstSizeInBytes, const char* format, ... ); int mallocAndStrcpy_s(char** destination, const char* source); int unsignedIntToString(char* destination, size_t destinationSize, unsigned int value); int size_tToString(char* destination, size_t destinationSize, size_t value); ``` **]** ### strcat_s ```c int strcat_s(char* dst, size_t dstSizeInBytes, const char* src); ``` **SRS_CRT_ABSTRACTIONS_99_008: [** strcat_s shall append the src to dst and terminates the resulting string with a null character. **]** **SRS_CRT_ABSTRACTIONS_99_009: [** The initial character of src shall overwrite the terminating null character of dst. **]** **SRS_CRT_ABSTRACTIONS_99_003: [** strcat_s shall return Zero upon success. **]** strcat_s shall return an error code upon failure as follows: **SRS_CRT_ABSTRACTIONS_99_004: [** If dst is NULL or unterminated, the error code returned shall be EINVAL & dst shall not be modified. **]** **SRS_CRT_ABSTRACTIONS_99_005: [** If src is NULL, the error code returned shall be EINVAL and dst[0 **]** shall be set to 0.] **SRS_CRT_ABSTRACTIONS_99_006: [** If the dstSizeInBytes is 0 or smaller than the required size for dst & src, the error code returned shall be ERANGE & dst[0 **]** set to 0.] ### strcpy_s ```c int strcpy_s(char* dst, size_t dstSizeInBytes, const char* src); ``` **SRS_CRT_ABSTRACTIONS_99_016: [** strcpy_s shall copy the contents in the address of src, including the terminating null character, to the location that's specified by dst. **]** **SRS_CRT_ABSTRACTIONS_99_011: [** strcpy_s shall return Zero upon success **]** strcpy shall return an error code upon failure as follows: **SRS_CRT_ABSTRACTIONS_99_012: [** If dst is NULL, the error code returned shall be EINVAL & dst shall not be modified. **]** **SRS_CRT_ABSTRACTIONS_99_013: [** If src is NULL, the error code returned shall be EINVAL and dst[0 **]** shall be set to 0.] **SRS_CRT_ABSTRACTIONS_99_014: [** If the dstSizeInBytes is 0 or smaller than the required size for the src string, the error code returned shall be ERANGE & dst[0 **]** set to 0.] ### strncpy_s ```c int strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t maxCount); ``` **SRS_CRT_ABSTRACTIONS_99_025: [** strncpy_s shall copy the first N characters of src to dst, where N is the lesser of MaxCount and the length of src. **]** **SRS_CRT_ABSTRACTIONS_99_041: [** If those N characters will fit within dst (whose size is given as dstSizeInBytes) and still leave room for a null terminator, then those characters shall be copied and a terminating null is appended; otherwise, strDest[0 **]** is set to the null character and ERANGE error code returned.] **SRS_CRT_ABSTRACTIONS_99_026: [** If MaxCount is _TRUNCATE (defined as -1), then as much of src as will fit into dst shall be copied while still leaving room for the terminating null to be appended. **]** **SRS_CRT_ABSTRACTIONS_99_018: [** strncpy_s shall return Zero upon success **]** strncpy_s shall return an error code upon failure as follows: **SRS_CRT_ABSTRACTIONS_99_019: [** If truncation occurred as a result of the copy, the error code returned shall be STRUNCATE. **]** **SRS_CRT_ABSTRACTIONS_99_020: [** If dst is NULL, the error code returned shall be EINVAL and dst shall not be modified. **]** **SRS_CRT_ABSTRACTIONS_99_021: [** If src is NULL, the error code returned shall be EINVAL and dst[0 **]** shall be set to 0.] **SRS_CRT_ABSTRACTIONS_99_022: [** If the dstSizeInBytes is 0, the error code returned shall be EINVAL and dst shall not be modified. **]** **SRS_CRT_ABSTRACTIONS_99_023: [** If dst is not NULL & dstSizeInBytes is smaller than the required size for the src string, the error code returned shall be ERANGE and dst[0 **]** shall be set to 0.] ### sprintf_s ```c int sprintf_s(char* dst, size_t dstSizeInBytes, const char* format, ... ); ``` **SRS_CRT_ABSTRACTIONS_99_029: [** The sprintf_s function shall format and store series of characters and values in dst. Each argument (if any) is converted and output according to the corresponding Format Specification in the format variable. **]** **SRS_CRT_ABSTRACTIONS_99_031: [** A null character is appended after the last character written. **]** **SRS_CRT_ABSTRACTIONS_99_027: [** sprintf_s shall return the number of characters stored in dst upon success. This number shall not include the terminating null character. **]** **SRS_CRT_ABSTRACTIONS_99_028: [** If dst or format is a null pointer, sprintf_s shall return -1 and set errno to EINVAL **]** **SRS_CRT_ABSTRACTIONS_99_034: [** If the dst buffer is too small for the text being printed, then dst is set to an empty string and the function shall return -1. **]** ### mallocAndStrcpy_s ```c int mallocAndStrcpy_s(char** destination, const char* source); ``` **SRS_CRT_ABSTRACTIONS_99_038: [** mallocAndstrcpy_s shall allocate memory for destination buffer to fit the string in the source parameter. **]** **SRS_CRT_ABSTRACTIONS_99_039: [** mallocAndstrcpy_s shall copy the contents in the address source, including the terminating null character into location specified by the destination pointer after the memory allocation. **]** **SRS_CRT_ABSTRACTIONS_99_035: [** mallocAndstrcpy_s shall return Zero upon success **]** mallocAndstrcpy_s shall return an error code upon failure as follows: **SRS_CRT_ABSTRACTIONS_99_036: [** destination parameter or source parameter is NULL, the error code returned shall be EINVAL and destination shall not be modified. **]** **SRS_CRT_ABSTRACTIONS_99_037: [** Upon failure to allocate memory for the destination, the function will return ENOMEM. **]** ### unsignedIntToString ```c int unsignedIntToString(char* destination, size_t destinationSize, unsigned int value) ``` **SRS_CRT_ABSTRACTIONS_02_001: [** unsignedIntToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize. **]** **SRS_CRT_ABSTRACTIONS_02_002: [** If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and unsignedIntToString shall fail. **]** **SRS_CRT_ABSTRACTIONS_02_003: [** If destination is NULL then unsignedIntToString shall fail. **]** **SRS_CRT_ABSTRACTIONS_02_004: [** If the conversion has been successfull then unsignedIntToString shall return 0. **]** ### size_tToString ```c int size_tToString(char* destination, size_t destinationSize, size_t value) ``` **SRS_CRT_ABSTRACTIONS_02_001: [** size_tToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize. **]** **SRS_CRT_ABSTRACTIONS_02_002: [** If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and size_tToString shall fail. **]** **SRS_CRT_ABSTRACTIONS_02_003: [** If destination is NULL then size_tToString shall fail. **]** **SRS_CRT_ABSTRACTIONS_02_004: [** If the conversion has been successfull then size_tToString shall return 0. **]** ### strtoull_s ```c unsigned long long strtoull_s(const char* nptr, char** endptr, int base) ``` **SRS_CRT_ABSTRACTIONS_21_001: [** The strtoull_s must convert the initial portion of the string pointed to by nptr to unsigned long long int representation. **]** **SRS_CRT_ABSTRACTIONS_21_002: [** The strtoull_s must resembling an integer represented in some radix determined by the value of base. **]** **SRS_CRT_ABSTRACTIONS_21_003: [** The strtoull_s must return the integer that represents the value in the initial part of the string. If any. **]** **SRS_CRT_ABSTRACTIONS_21_004: [** The strtoull_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string. **]** **SRS_CRT_ABSTRACTIONS_21_005: [** The strtoull_s must convert number using base 2 to 36. **]** **SRS_CRT_ABSTRACTIONS_21_006: [** The strtoull_s must use the letters from a (or A) through z (or Z) to represent the numbers between 10 to 35. **]** **SRS_CRT_ABSTRACTIONS_21_007: [** If the base is 0 and no special chars precedes the number, strtoull_s must convert to a decimal (base 10). **]** **SRS_CRT_ABSTRACTIONS_21_008: [** If the base is 0 and '0x' or '0X' precedes the number, strtoull_s must convert to a hexadecimal (base 16). **]** **SRS_CRT_ABSTRACTIONS_21_009: [** If the base is 0 and '0' precedes the number, strtoull_s must convert to an octal (base 8). **]** **SRS_CRT_ABSTRACTIONS_21_010: [** The white-space must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'. **]** **SRS_CRT_ABSTRACTIONS_21_011: [** The valid sequence starts after the first non-white-space character, followed by an optional positive or negative sign, a number or a letter (depending of the base). **]** **SRS_CRT_ABSTRACTIONS_21_012: [** If the subject sequence is empty or does not have the expected form, the strtoull_s must **not** perform any conversion and must returns 0L; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer. **]** **SRS_CRT_ABSTRACTIONS_21_013: [** If no conversion could be performed, the strtoull_s returns the value 0L. **]** **SRS_CRT_ABSTRACTIONS_21_014: [** If the correct value is outside the range, the strtoull_s returns the value ULLONG_MAX, and errno will receive the value ERANGE. **]** **SRS_CRT_ABSTRACTIONS_21_035: [** If the nptr is NULL, the strtoull_s must **not** perform any conversion and must returns 0L; endptr must receive NULL, provided that endptr is not a NULL pointer. **]** **SRS_CRT_ABSTRACTIONS_21_038: [** If the subject sequence starts with a negative sign, the strtoull_s will convert it to the posive representation of the negative value. **]** ### strtof_s ```c float strtof_s(const char* nptr, char** endptr) ``` **SRS_CRT_ABSTRACTIONS_21_015: [** The strtof_s must convert the initial portion of the string pointed to by nptr to float representation. **]** **SRS_CRT_ABSTRACTIONS_21_016: [** The strtof_s must return the float that represents the value in the initial part of the string. If any. **]** **SRS_CRT_ABSTRACTIONS_21_017: [** The strtof_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string. **]** **SRS_CRT_ABSTRACTIONS_21_018: [** The white-space for strtof_s must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'. **]** **SRS_CRT_ABSTRACTIONS_21_019: [** The valid sequence for strtof_s starts after the first non-white-space character, followed by an optional positive or negative sign, a number, 'INF', or 'NAN' (ignoring case). **]** **SRS_CRT_ABSTRACTIONS_21_020: [** If the subject sequence is empty or does not have the expected form, the strtof_s must **not** perform any conversion and must returns 0.0f; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer. **]** **SRS_CRT_ABSTRACTIONS_21_021: [** If no conversion could be performed, the strtof_s returns the value 0.0f. **]** **SRS_CRT_ABSTRACTIONS_21_022: [** If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE. **]** **SRS_CRT_ABSTRACTIONS_21_023: [** If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float. **]** **SRS_CRT_ABSTRACTIONS_21_024: [** If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence. **]** **SRS_CRT_ABSTRACTIONS_21_036: [** If the nptr is NULL, the strtof_s must **not** perform any conversion and must returns 0.0f; endptr must receive NULL, provided that endptr is not a NULL pointer. **]** ### strtold_s ```c long double strtold_s(const char* nptr, char** endptr) ``` **SRS_CRT_ABSTRACTIONS_21_025: [** The strtold_s must convert the initial portion of the string pointed to by nptr to long double representation. **]** **SRS_CRT_ABSTRACTIONS_21_026: [** The strtold_s must return the long double that represents the value in the initial part of the string. If any. **]** **SRS_CRT_ABSTRACTIONS_21_027: [** The strtold_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string. **]** **SRS_CRT_ABSTRACTIONS_21_028: [** The white-space for strtold_s must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'. **]** **SRS_CRT_ABSTRACTIONS_21_029: [** The valid sequence for strtold_s starts after the first non-white-space character, followed by an optional positive or negative sign, a number, 'INF', or 'NAN' (ignoring case). **]** **SRS_CRT_ABSTRACTIONS_21_030: [** If the subject sequence is empty or does not have the expected form, the strtold_s must **not** perform any conversion and must returns 0.0; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer. **]** **SRS_CRT_ABSTRACTIONS_21_031: [** If no conversion could be performed, the strtold_s returns the value 0.0. **]** **SRS_CRT_ABSTRACTIONS_21_032: [** If the correct value is outside the range, the strtold_s returns the value plus or minus HUGE_VALL, and errno will receive the value ERANGE. **]** **SRS_CRT_ABSTRACTIONS_21_033: [** If the string is 'INF' of 'INFINITY' (ignoring case), the strtold_s must return the INFINITY value for long double. **]** **SRS_CRT_ABSTRACTIONS_21_034: [** If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtold_s must return 0.0 and points endptr to the first character after the 'NAN' sequence. **]** **SRS_CRT_ABSTRACTIONS_21_037: [** If the nptr is NULL, the strtold_s must **not** perform any conversion and must returns 0.0; endptr must receive NULL, provided that endptr is not a NULL pointer. **]** azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/dns_async.md000066400000000000000000000104721362133436400331070ustar00rootroot00000000000000dns_async ================= ## Overview **dns_async** performs an asynchronous lookup of a TCP IPv4 address given a host name. This module is intended to locate IP addresses for an Azure server, and more flexible behavior is deliberately out-of-scope at this time. IPv6 address lookup is currently out-of-scope, although support for it may be added in the future via addition of a `dns_async_get_ipv6` call. The present implementation will not actually provide asynchronous behavior, which is a feature to be added in the future. ## References [dns_async.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/dns_async.h) ### Exposed API **SRS_DNS_ASYNC_30_001: [** The dns_async shall use the constants and types defined in `dns_async.h`. ```c typedef void* DNS_ASYNC_HANDLE; // If options are added in future, DNS_ASYNC_OPTIONS will become a struct containing the options typedef void DNS_ASYNC_OPTIONS; ``` **]** **SRS_DNS_ASYNC_30_002: [** The dns_async shall implement the methods defined in `dns_async.h`. ```c DNS_ASYNC_HANDLE dns_async_create(const char* hostname, DNS_ASYNC_OPTIONS* options); int dns_async_is_lookup_complete(DNS_ASYNC_HANDLE dns, bool* is_complete); uint32_t dns_async_get_ipv4(DNS_ASYNC_HANDLE dns); void dns_async_destroy(DNS_ASYNC_HANDLE dns); ``` **]** ### dns_async_create `dns_async_create` begins a single attempt at asynchronous DNS lookup. ```c DNS_ASYNC_HANDLE dns_async_create(const char* hostname, DNS_ASYNC_OPTIONS* options); ``` **SRS_DNS_ASYNC_30_010: [** `dns_async_create` shall make a copy of the `hostname` parameter to allow immediate deletion by the caller. **]** **SRS_DNS_ASYNC_30_011: [** If the `hostname` parameter is `NULL`, `dns_async_create` shall log an error and return `NULL`. **]** **SRS_DNS_ASYNC_30_012: [** The optional `options` parameter shall be ignored. **]** **SRS_DNS_ASYNC_30_013: [** On success, `dns_async_create` shall return the created `DNS_ASYNC_HANDLE`. **]** **SRS_DNS_ASYNC_30_014: [** On any failure, `dns_async_create` shall log an error and return `NULL`. **]** ### dns_async_is_lookup_complete `dns_async_is_lookup_complete` tests whether `dns_async_create`'s single attempt at DNS lookup has been completed. To complete the lookup process, this method must be called repeatedly until it returns `true`. ```c bool dns_async_is_create_complete(DNS_ASYNC_HANDLE dns); ``` **SRS_DNS_ASYNC_30_020: [** If the `dns` parameter is NULL, `dns_async_is_create_complete` shall log an error and return `false`. **]** **SRS_DNS_ASYNC_30_021: [** `dns_async_is_create_complete` shall perform the asynchronous work of DNS lookup and log any errors. **]** **SRS_DNS_ASYNC_30_022: [** If the DNS lookup process has completed, `dns_async_is_create_complete` shall return `true`. **]** **SRS_DNS_ASYNC_30_023: [** If the DNS lookup process is not yet complete, `dns_async_is_create_complete` shall return `false`. **]** **SRS_DNS_ASYNC_30_024: [** If `dns_async_is_create_complete` has previously returned `true`, `dns_async_is_create_complete` shall do nothing and return `true`. **]** ### dns_async_get_ipv4 `dns_async_get_ipv4` retrieves the IP address address after `dns_async_is_create_complete` indicates completion. A return value of 0 indicates failure. ```c uint32_t dns_async_get_ipv4(DNS_ASYNC_HANDLE dns); ``` **SRS_DNS_ASYNC_30_030: [** If the `dns` parameter is NULL, `dns_async_get_ipv4` shall log an error and return 0. **]** **SRS_DNS_ASYNC_30_031: [** If `dns_async_is_create_complete` has not yet returned `true`, `dns_async_get_ipv4` shall log an error and return 0. **]** **SRS_DNS_ASYNC_30_032: [** If `dns_async_is_create_complete` has returned `true` and the lookup process has succeeded, `dns_async_get_ipv4` shall return the discovered IPv4 address. **]** **SRS_DNS_ASYNC_30_033: [** If `dns_async_is_create_complete` has returned `true` and the lookup process has failed, `dns_async_get_ipv4` shall return 0. **]** ### dns_async_destroy `dns_async_destroy` releases any resources acquired during the DNS lookup process. ```c void dns_async_destroy(DNS_ASYNC_HANDLE dns); ``` **SRS_DNS_ASYNC_30_050: [** If the `dns` parameter is `NULL`, `dns_async_destroy` shall log an error and do nothing. **]** **SRS_DNS_ASYNC_30_051: [** `dns_async_destroy` shall delete all acquired resources and delete the `DNS_ASYNC_HANDLE`. **]** doublylinkedlist_requirements.md000066400000000000000000000105201362133436400372250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocDoublyLinkedList Requirements ================ ## Overview These functions are the basic linking structures used throughout NT. They have been publicly available since 1992. Note that the lists do NOT store any data, by design. They simply provide a consistent mechanism for linking homogenous items. Also note that no input error checking is provided for this set of APIs. ## References [http://www.dcl.hpi.uni-potsdam.de/research/WRK/2009/07/single_list_entry-containing_record/](http://www.dcl.hpi.uni-potsdam.de/research/WRK/2009/07/single_list_entry-containing_record/) ## Exposed API ```c typedef struct DLIST_ENTRY_TAG { struct DLIST_ENTRY_TAG *Flink; struct DLIST_ENTRY_TAG *Blink; } DLIST_ENTRY, *PDLIST_ENTRY; extern void DList_InitializeListHead(PDLIST_ENTRY listHead); extern int DList_IsListEmpty(const PDLIST_ENTRY listHead); extern void DList_InsertTailList(PDLIST_ENTRY listHead, PDLIST_ENTRY listEntry); extern void DList_InsertHeadList(PDLIST_ENTRY listHead, PDLIST_ENTRY entry); extern void DList_AppendTailList(PDLIST_ENTRY listHead, PDLIST_ENTRY ListToAppend); extern int DList_RemoveEntryList(PDLIST_ENTRY listEntry); extern PDLIST_ENTRY DList_RemoveHeadList(PDLIST_ENTRY listHead); // // Calculate the address of the base of the structure given its type, and an // address of a field within the structure. // #define containingRecord(address, type, field) ((type *)((char *)(address) - offsetof(type,field))) ``` ### DList_InitializeListHead ```c extern void DList_InitializeListHead(PDLIST_ENTRY listHead); ``` **SRS_DLIST_06_005: [** DList_InitializeListHead will initialize the Flink & Blink to the address of the DLIST_ENTRY. **]** ### DList_IsListEmpty ```c extern int DList_IsListEmpty(const PDLIST_ENTRY listHead); ``` **SRS_DLIST_06_003: [** DList_IsListEmpty shall return a non-zero value if there are no DLIST_ENTRY's on this list other than the list head. **]** **SRS_DLIST_06_004: [** DList_IsListEmpty shall return 0 if there is one or more items in the list. **]** Notes: 1. DList_IsListEmpty shall be undefined if the DLIST_ENTRY is not currently part of a list. 2. DList_IsListEmpty shall be undefined if the DLIST_ENTRY has not been initialized as with DList_InitializeListHead. ### DList_InsertTailList ```c extern void DList_InsertTailList(PDLIST_ENTRY listHead, PDLIST_ENTRY listEntry); ``` **SRS_DLIST_06_006: [** DList_InsertTailList shall place the DLIST_ENTRY at the end of the list defined by the listHead parameter. **]** ### DList_InsertHeadList ```c extern void DList_InsertHeadList(PDLIST_ENTRY listHead, PDLIST_ENTRY entry); ``` **SRS_DLIST_02_002: [** DList_InsertHeadList inserts a singular entry in the list having as head listHead after "head". **]** (see diagram below) DList_InsertHeadList shall assume listHead and listEntry non-NULL and pointing to existing DLIST_ENTRY structures. Calling DList_InsertHeadList with NULL parameters is undefined behavior. ### DList_AppendTailList ```c extern void DList_AppendTailList(PDLIST_ENTRY listHead, PDLIST_ENTRY ListToAppend); ``` **SRS_DLIST_06_007: [** DList_AppendTailList shall place the list defined by listToAppend at the end of the list defined by the listHead parameter. **]** ### DList_RemoveEntryList ```c extern int DList_RemoveEntryList(PDLIST_ENTRY listEntry); ``` **SRS_DLIST_06_008: [** DList_RemoveEntryList shall remove a listEntry from whatever list it is properly part of. **]** **SRS_DLIST_06_009: [** The remaining list is properly formed. **]** **SRS_DLIST_06_010: [** DList_RemoveEntryList shall return non-zero if the remaining list is empty. **]** **SRS_DLIST_06_011: [** DList_RemoveEntryList shall return zero if the remaining list is NOT empty. **]** Notes: 1. If listEntry is NOT part of a list then the result of this function is undefined. Therefore, calling DList_RemoveEntryList twice on the same listEntry is undefined. 2. The Flink & Blink of the listEntry parameter shall be undefined after calling this function ### DList_RemoveHeadList ```c extern PDLIST_ENTRY DList_RemoveHeadList(PDLIST_ENTRY listHead); ``` **SRS_DLIST_06_012: [** DList_RemoveHeadList removes the oldest entry from the list defined by the listHead parameter and returns a pointer to that entry. **]** **SRS_DLIST_06_013: [** DList_RemoveHeadList shall return listHead if that's the only item in the list. **]** Note: The Flink & Blink of the returned PDLIST_ENTRY shall be undefined. gballoc_requirements.md000066400000000000000000000207351362133436400352600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# gballoc requirements ================ ## Overview gballoc is a module that is a pass through for the malloc, realloc and free memory management functions described in C99, section 7.20.3. The pass through has the purpose of tracking memory allocations in order to compute the maximal memory usage of an application using the memory management functions. ## References [ISO/IEC 9899:TC3] ## Exposed API ```c extern int gballoc_init(void); extern void gballoc_deinit(void); extern void* gballoc_malloc(size_t size); extern void* gballoc_calloc(size_t nmemb, size_t size); extern void* gballoc_realloc(void* ptr, size_t size); extern void gballoc_free(void* ptr); extern int gballoc_resetCounters(void); extern size_t gballoc_getMaximumMemoryUsed(void); extern size_t gballoc_getCurrentMemoryUsed(void); extern size_t gballoc_getAllocationCount(void)); extern void gballoc_resetMetrics(void); ``` ### gballoc_init ```c extern int gballoc_init(void); ``` **SRS_GBALLOC_01_024: [** gballoc_init shall initialize the gballoc module and return 0 upon success. **]** **SRS_GBALLOC_01_025: [** Init after Init shall fail and return a non-zero value. **]** **SRS_GBALLOC_01_026: [** gballoc_Init shall create a lock handle that will be used to make the other gballoc APIs thread-safe. **]** **SRS_GBALLOC_01_027: [** If the Lock creation fails, gballoc_init shall return a non-zero value. **]** **SRS_GBALLOC_01_002: [** Upon initialization the total memory used and maximum total memory used tracked by the module shall be set to 0. **]** ### gballoc_deinit ```c extern void gballoc_deinit(void); ``` **SRS_GBALLOC_01_028: [** gballoc_deinit shall free all resources allocated by gballoc_init. **]** **SRS_GBALLOC_01_029: [** if gballoc is not initialized gballoc_deinit shall do nothing. **]** ### gballoc_malloc ```c extern void* gballoc_malloc(size_t size); ``` **SRS_GBALLOC_01_003: [** gballoc_malloc shall call the C99 malloc function and return its result. **]** **SRS_GBALLOC_01_004: [** If the underlying malloc call is successful, gballoc_malloc shall increment the total memory used with the amount indicated by size. **]** **SRS_GBALLOC_01_012: [** When the underlying malloc call fails, gballoc_malloc shall return NULL and size should not be counted towards total memory used. **]** **SRS_GBALLOC_01_013: [** When gballoc_malloc fails allocating memory for its internal use, gballoc_malloc shall return NULL. **]** **SRS_GBALLOC_01_030: [** gballoc_malloc shall ensure thread safety by using the lock created by gballoc_Init. **]** **SRS_GBALLOC_01_039: [** If gballoc was not initialized gballoc_malloc shall simply call malloc without any memory tracking being performed. **]** **SRS_GBALLOC_01_048: [** If acquiring the lock fails, gballoc_malloc shall return NULL. **]** ### gballoc_calloc ```c extern void* gballoc_calloc(size_t nmemb, size_t size); ``` **SRS_GBALLOC_01_020: [** gballoc_calloc shall call the C99 calloc function and return its result. **]** **SRS_GBALLOC_01_021: [** If the underlying calloc call is successful, gballoc_calloc shall increment the total memory used with nmemb*size. **]** **SRS_GBALLOC_01_022: [** When the underlying calloc call fails, gballoc_calloc shall return NULL and size should not be counted towards total memory used. **]** **SRS_GBALLOC_01_023: [** When gballoc_calloc fails allocating memory for its internal use, gballoc_calloc shall return NULL. **]** **SRS_GBALLOC_01_031: [** gballoc_calloc shall ensure thread safety by using the lock created by gballoc_Init **]** **SRS_GBALLOC_01_040: [** If gballoc was not initialized gballoc_calloc shall simply call calloc without any memory tracking being performed. **]** **SRS_GBALLOC_01_046: [** If acquiring the lock fails, gballoc_calloc shall return NULL. **]** ### gballoc_realloc ```c extern void* gballoc_realloc(void* ptr, size_t size); ``` **SRS_GBALLOC_01_005: [** gballoc_realloc shall call the C99 realloc function and return its result. **]** **SRS_GBALLOC_01_006: [** If the underlying realloc call is successful, gballoc_realloc shall look up the size associated with the pointer ptr and decrease the total memory used with that size. **]** **SRS_GBALLOC_01_007: [** If realloc is successful, gballoc_realloc shall also increment the total memory used value tracked by this module. **]** **SRS_GBALLOC_01_014: [** When the underlying realloc call fails, gballoc_realloc shall return NULL and no change should be made to the counted total memory usage. **]** **SRS_GBALLOC_01_015: [** When allocating memory used for tracking by gballoc_realloc fails, gballoc_realloc shall return NULL and no change should be made to the counted total memory usage. **]** **SRS_GBALLOC_01_016: [** When the ptr pointer cannot be found in the pointers tracked by gballoc, gballoc_realloc shall return NULL and the underlying realloc shall not be called. **]** **SRS_GBALLOC_01_017: [** When ptr is NULL, gballoc_realloc shall call the underlying realloc with ptr being NULL and the realloc result shall be tracked by gballoc. **]** **SRS_GBALLOC_01_032: [** gballoc_realloc shall ensure thread safety by using the lock created by gballoc_Init. **]** **SRS_GBALLOC_01_041: [** If gballoc was not initialized gballoc_realloc shall shall simply call realloc without any memory tracking being performed. **]** **SRS_GBALLOC_01_047: [** If acquiring the lock fails, gballoc_realloc shall return NULL. **]** ### gballoc_free ```c extern void gballoc_free(void* ptr); ``` **SRS_GBALLOC_01_008: [** gballoc_free shall call the C99 free function. **]** **SRS_GBALLOC_01_009: [** gballoc_free shall also look up the size associated with the ptr pointer and decrease the total memory used with the associated size amount. **]** **SRS_GBALLOC_01_019: [** When the ptr pointer cannot be found in the pointers tracked by gballoc, gballoc_free shall not free any memory. **]** **SRS_GBALLOC_01_033: [** gballoc_free shall ensure thread safety by using the lock created by gballoc_Init. **]** **SRS_GBALLOC_01_042: [** If gballoc was not initialized gballoc_free shall shall simply call free. **]** **SRS_GBALLOC_01_049: [** If acquiring the lock fails, gballoc_free shall do nothing. **]** ### gballoc_getMaximumMemoryUsed ```c extern size_t gballoc_getMaximumMemoryUsed(void); ``` **SRS_GBALLOC_01_010: [** gballoc_getMaximumMemoryUsed shall return the maximum amount of total memory used recorded since the module initialization. **]** **SRS_GBALLOC_01_011: [** The maximum total memory used shall be the maximum of the total memory used at any point. **]** **SRS_GBALLOC_01_034: [** gballoc_getMaximumMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init. **]** **SRS_GBALLOC_01_038: [** If gballoc was not initialized gballoc_getMaximumMemoryUsed shall return MAX_INT_SIZE. **]** **SRS_GBALLOC_01_050: [** If the lock cannot be acquired, gballoc_getMaximumMemoryUsed shall return SIZE_MAX. **]** ### gballoc_getCurrentMemoryUsed ```c extern size_t gballoc_getCurrentMemoryUsed(void); ``` **SRS_GBALLOC_02_001: [** gballoc_getCurrentMemoryUsed shall return the currently used memory size. **]** **SRS_GBALLOC_01_036: [** gballoc_getCurrentMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init. **]** **SRS_GBALLOC_01_044: [** If gballoc was not initialized gballoc_getCurrentMemoryUsed shall return SIZE_MAX. **]** **SRS_GBALLOC_01_051: [** If the lock cannot be acquired, gballoc_getCurrentMemoryUsed shall return SIZE_MAX. **]** ### gballoc_getAllocationCount ```c extern size_t gballoc_getAllocationCount(void)); ``` **SRS_GBALLOC_07_001: [** If `gballoc` was not initialized `gballoc_getAllocationCount` shall return `0`. **]** **SRS_GBALLOC_07_002: [** `gballoc_getAllocationCount` shall ensure thread safety by using the lock created by `gballoc_Init` **]** **SRS_GBALLOC_07_003: [** If the lock cannot be acquired, `gballoc_getAllocationCount` shall return `0`. **]** **SRS_GBALLOC_07_004: [** `gballoc_getAllocationCount` shall return the currently number of allocations. **]** ### gballoc_resetMetrics ```c extern void gballoc_resetMetrics(void); ``` **SRS_GBALLOC_07_005: [** If `gballoc` was not initialized `gballoc_reset Metrics` shall do nothing.**]** **SRS_GBALLOC_07_006: [** `gballoc_resetMetrics` shall ensure thread safety by using the lock created by `gballoc_Init` **]** **SRS_GBALLOC_07_007: [** If the lock cannot be acquired, `gballoc_reset Metrics` shall do nothing.**]** **SRS_GBALLOC_07_008: [** `gballoc_resetMetrics` shall reset the total allocation size, max allocation size and number of allocation to zero. **]** http_proxy_io_requirements.md000066400000000000000000000532151362133436400365630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdochttp_proxy_io ============= ## Overview http_proxy_io implements an IO that has minimal functionality allowing communication over an HTTP proxy. ## References [RFC 2616](https://tools.ietf.org/html/rfc2616) [RFC 2617](https://tools.ietf.org/html/rfc2617) [RFC 2817](https://www.ietf.org/rfc/rfc2817.txt) ## Exposed API ```c MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, http_proxy_io_get_interface_description); ``` ### http_proxy_io_create `http_proxy_io_create` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_create` member. ```c CONCRETE_IO_HANDLE http_proxy_io_create(void* io_create_parameters); ``` **SRS_HTTP_PROXY_IO_01_001: [** `http_proxy_io_create` shall create a new instance of the HTTP proxy IO. **]** **SRS_HTTP_PROXY_IO_01_002: [** If `io_create_parameters` is NULL, `http_proxy_io_create` shall fail and return NULL. **]** **SRS_HTTP_PROXY_IO_01_003: [** `io_create_parameters` shall be used as an `HTTP_PROXY_IO_CONFIG*`. **]** **SRS_HTTP_PROXY_IO_01_004: [** If the `hostname` or `proxy_hostname` member is NULL, then `http_proxy_io_create` shall fail and return NULL. **]** **SRS_HTTP_PROXY_IO_01_005: [** `http_proxy_io_create` shall copy the `hostname`, `port`, `username` and `password` values for later use when the actual CONNECT is performed. **]** **SRS_HTTP_PROXY_IO_01_006: [** `hostname` and `proxy_hostname`, `username` and `password` shall be copied by calling `mallocAndStrcpy_s`. **]** **SRS_HTTP_PROXY_IO_01_094: [** `username` and `password` shall be optional. **]** **SRS_HTTP_PROXY_IO_01_095: [** If one of the fields `username` and `password` is non-NULL, then the other has to be also non-NULL, otherwise `http_proxy_io_create` shall fail and return NULL. **]** **SRS_HTTP_PROXY_IO_01_007: [** If `mallocAndStrcpy_s` fails then `http_proxy_io_create` shall fail and return NULL. **]** **SRS_HTTP_PROXY_IO_01_009: [** `http_proxy_io_create` shall create a new socket IO by calling `xio_create` with the arguments: **]** **SRS_HTTP_PROXY_IO_01_010: [** - `io_interface_description` shall be set to the result of `socketio_get_interface_description`. **]** **SRS_HTTP_PROXY_IO_01_011: [** - `xio_create_parameters` shall be set to a `SOCKETIO_CONFIG*` where `hostname` is set to the `proxy_hostname` member of `io_create_parameters` and `port` is set to the `proxy_port` member of `io_create_parameters`. **]** **SRS_HTTP_PROXY_IO_01_050: [** If `socketio_get_interface_description` fails, `http_proxy_io_create` shall fail and return NULL. **]** **SRS_HTTP_PROXY_IO_01_012: [** If `xio_create` fails, `http_proxy_io_create` shall fail and return NULL. **]** **SRS_HTTP_PROXY_IO_01_008: [** When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. **]** ### http_proxy_io_destroy `http_proxy_io_destroy` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_destroy` member. ```c void http_proxy_io_destroy(CONCRETE_IO_HANDLE http_proxy_io); ``` **SRS_HTTP_PROXY_IO_01_013: [** `http_proxy_io_destroy` shall free the HTTP proxy IO instance indicated by `http_proxy_io`. **]** **SRS_HTTP_PROXY_IO_01_014: [** If `http_proxy_io` is NULL, `http_proxy_io_destroy` shall do nothing. **]** **SRS_HTTP_PROXY_IO_01_015: [** `http_proxy_io_destroy` should close the IO if it was open before freeing all the resources. **]** **SRS_HTTP_PROXY_IO_01_016: [** `http_proxy_io_destroy` shall destroy the underlying IO created in `http_proxy_io_create` by calling `xio_destroy`. **]** ### http_proxy_io_open `http_proxy_io_open` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_open` member. ```c int http_proxy_io_open(CONCRETE_IO_HANDLE http_proxy_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) ``` **SRS_HTTP_PROXY_IO_01_017: [** `http_proxy_io_open` shall open the HTTP proxy IO and on success it shall return 0. **]** **SRS_HTTP_PROXY_IO_01_018: [** If any of the arguments `http_proxy_io`, `on_io_open_complete`, `on_bytes_received` or `on_io_error` are NULL then `http_proxy_io_open` shall return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_019: [** `http_proxy_io_open` shall open the underlying IO by calling `xio_open` on the underlying IO handle created in `http_proxy_io_create`, while passing to it the callbacks `on_underlying_io_open_complete`, `on_underlying_io_bytes_received` and `on_underlying_io_error`. **]** **SRS_HTTP_PROXY_IO_01_020: [** If `xio_open` fails, then `http_proxy_io_open` shall return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_021: [** If `http_proxy_io_open` is called while the IO was already open, `http_proxy_io_open` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_051: [** The arguments `on_io_open_complete_context`, `on_bytes_received_context` and `on_io_error_context` shall be allowed to be NULL. **]** ### http_proxy_io_close `http_proxy_io_close` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_close` member. ```c int http_proxy_io_close(CONCRETE_IO_HANDLE http_proxy_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) ``` **SRS_HTTP_PROXY_IO_01_022: [** `http_proxy_io_close` shall close the HTTP proxy IO and on success it shall return 0. **]** **SRS_HTTP_PROXY_IO_01_023: [** If the argument `http_proxy_io` is NULL, `http_proxy_io_close` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_024: [** `http_proxy_io_close` shall close the underlying IO by calling `xio_close` on the IO handle create in `http_proxy_io_create`, while passing to it the `on_underlying_io_close_complete` callback. **]** **SRS_HTTP_PROXY_IO_01_025: [** If `xio_close` fails, `http_proxy_io_close` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_026: [** The `on_io_close_complete` and `on_io_close_complete_context` arguments shall be saved for later use. **]** **SRS_HTTP_PROXY_IO_01_027: [** If `http_proxy_io_close` is called when not open, `http_proxy_io_close` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_028: [** `on_io_close_complete` shall be allowed to be NULL. **]** **SRS_HTTP_PROXY_IO_01_052: [** `on_io_close_complete_context` shall be allowed to be NULL. **]** **SRS_HTTP_PROXY_IO_01_053: [** `http_proxy_io_close` while OPENING shall trigger the `on_io_open_complete` callback with `IO_OPEN_CANCELLED`. **]** **SRS_HTTP_PROXY_IO_01_054: [** `http_proxy_io_close` while OPENING shall fail and return a non-zero value. **]** ### http_proxy_io_send `http_proxy_io_send` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_send` member. ```c int http_proxy_io_send(CONCRETE_IO_HANDLE http_proxy_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* on_send_complete_context) ``` **SRS_HTTP_PROXY_IO_01_029: [** `http_proxy_io_send` shall send the `size` bytes pointed to by `buffer` and on success it shall return 0. **]** **SRS_HTTP_PROXY_IO_01_030: [** If any of the arguments `http_proxy_io` or `buffer` is NULL, `http_proxy_io_send` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_031: [** If `size` is 0, `http_proxy_io_send` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_032: [** `on_send_complete` shall be allowed to be NULL. **]** **SRS_HTTP_PROXY_IO_01_033: [** `http_proxy_io_send` shall send the bytes by calling `xio_send` on the underlying IO created in `http_proxy_io_create` and passing `buffer` and `size` as arguments. **]** **SRS_HTTP_PROXY_IO_01_034: [** If `http_proxy_io_send` is called when the IO is not open, `http_proxy_io_send` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_035: [** If the IO is in an error state (an error was reported through the `on_io_error` callback), `http_proxy_io_send` shall fail and return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_055: [** If `xio_send` fails, `http_proxy_io_send` shall fail and return a non-zero value. **]** ### http_proxy_io_dowork `http_proxy_io_dowork` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_dowork` member. ```c void http_proxy_io_dowork(CONCRETE_IO_HANDLE http_proxy_io) ``` **SRS_HTTP_PROXY_IO_01_037: [** `http_proxy_io_dowork` shall call `xio_dowork` on the underlying IO created in `http_proxy_io_create`. **]** **SRS_HTTP_PROXY_IO_01_038: [** If the `http_proxy_io` argument is NULL, `http_proxy_io_dowork` shall do nothing. **]** **SRS_HTTP_PROXY_IO_01_039: [** If the IO is not open (no open has been called or the IO has been closed) then `http_proxy_io_dowork` shall do nothing. **]** ### http_proxy_io_set_option `http_proxy_io_set_option` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_setoption` member. ```c int http_proxy_io_set_option(CONCRETE_IO_HANDLE http_proxy_io, const char* optionName, const void* value) ``` **SRS_HTTP_PROXY_IO_01_040: [** If any of the arguments `http_proxy_io` or `option_name` is NULL, `http_proxy_io_set_option` shall return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_042: [** If the option was handled by `http_proxy_io_set_option` or the underlying IO, then `http_proxy_io_set_option` shall return 0. **]** **SRS_HTTP_PROXY_IO_01_043: [** If the `option_name` argument indicates an option that is not handled by `http_proxy_io_set_option`, then `xio_setoption` shall be called on the underlying IO created in `http_proxy_io_create`, passing the option name and value to it. **]** **SRS_HTTP_PROXY_IO_01_044: [** if `xio_setoption` fails, `http_proxy_io_set_option` shall return a non-zero value. **]** **SRS_HTTP_PROXY_IO_01_056: [** The `value` argument shall be allowed to be NULL. **]** Options that shall be handled by HTTP proxy IO: **SRS_HTTP_PROXY_IO_01_045: [** None. **]** ### http_proxy_io_retrieve_options `http_proxy_io_retrieve_options` is the implementation provided via `http_proxy_io_get_interface_description` for the `concrete_io_retrieveoptions` member. ```c static OPTIONHANDLER_HANDLE http_proxy_io_retrieve_options(CONCRETE_IO_HANDLE http_proxy_io) ``` **SRS_HTTP_PROXY_IO_01_046: [** `http_proxy_io_retrieve_options` shall return an `OPTIONHANDLER_HANDLE` obtained by calling `xio_retrieveoptions` on the underlying IO created in `http_proxy_io_create`. **]** **SRS_HTTP_PROXY_IO_01_047: [** If the parameter `http_proxy_io` is NULL then `http_proxy_io_retrieve_options` shall fail and return NULL. **]** **SRS_HTTP_PROXY_IO_01_048: [** If `xio_retrieveoptions` fails, `http_proxy_io_retrieve_options` shall return NULL. **]** ### http_proxy_io_get_interface_description ```c extern const IO_INTERFACE_DESCRIPTION* http_proxy_io_get_interface_description(void); ``` **SRS_HTTP_PROXY_IO_01_049: [** `http_proxy_io_get_interface_description` shall return a pointer to an `IO_INTERFACE_DESCRIPTION` structure that contains pointers to the functions: `http_proxy_io_retrieve_options`, `http_proxy_io_retrieve_create`, `http_proxy_io_destroy`, `http_proxy_io_open`, `http_proxy_io_close`, `http_proxy_io_send` and `http_proxy_io_dowork`. **]** ### on_underlying_io_open_complete **SRS_HTTP_PROXY_IO_01_057: [** When `on_underlying_io_open_complete` is called, the `http_proxy_io` shall send the CONNECT request constructed per RFC 2817: **]** **SRS_HTTP_PROXY_IO_01_078: [** When `on_underlying_io_open_complete` is called with `IO_OPEN_ERROR`, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_079: [** When `on_underlying_io_open_complete` is called with `IO_OPEN_CANCELLED`, the `on_open_complete` callback shall be triggered with `IO_OPEN_CANCELLED`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_059: [** - If `username` and `password` have been specified in the arguments passed to `http_proxy_io_create`, then the header `Proxy-Authorization` shall be added to the request. **]** **SRS_HTTP_PROXY_IO_01_060: [** - The value of `Proxy-Authorization` shall be the constructed according to RFC 2617. **]** **SRS_HTTP_PROXY_IO_01_061: [** Encoding to Base64 shall be done by calling `Base64_Encode_Bytes`. **]** **SRS_HTTP_PROXY_IO_01_062: [** If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_063: [** The request shall be sent by calling `xio_send` and passing NULL as `on_send_complete` callback. **]** **SRS_HTTP_PROXY_IO_01_064: [** If `xio_send` fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_076: [** When `on_underlying_io_open_complete` is called while waiting for the CONNECT reply, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_077: [** When `on_underlying_io_open_complete` is called in after OPEN has completed, the `on_io_error` callback shall be triggered passing the `on_io_error_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_081: [** `on_underlying_io_open_complete` called with NULL context shall do nothing. **]** ### on_underlying_io_bytes_received **SRS_HTTP_PROXY_IO_01_065: [** When bytes are received and the response to the CONNECT request was not yet received, the bytes shall be accumulated until a double new-line is detected. **]** **SRS_HTTP_PROXY_IO_01_066: [** When a double new-line is detected the response shall be parsed in order to extract the status code. **]** **SRS_HTTP_PROXY_IO_01_067: [** If allocating memory for the buffered bytes fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_068: [** If parsing the CONNECT response fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_069: [** Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. **]** **SRS_HTTP_PROXY_IO_01_070: [** When a success status code is parsed, the `on_open_complete` callback shall be triggered with `IO_OPEN_OK`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_071: [** If the status code is not successful, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_072: [** Any bytes that are extra (not consumed by the CONNECT response), shall be indicated as received by calling the `on_bytes_received` callback and passing the `on_bytes_received_context` as context argument. **]** **SRS_HTTP_PROXY_IO_01_073: [** Once a success status code was parsed, the IO shall be OPEN. **]** **SRS_HTTP_PROXY_IO_01_074: [** If `on_underlying_io_bytes_received` is called while OPEN, all bytes shall be indicated as received by calling the `on_bytes_received` callback and passing the `on_bytes_received_context` as context argument. **]** **SRS_HTTP_PROXY_IO_01_080: [** If `on_underlying_io_bytes_received` is called while the underlying IO is being opened, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_082: [** `on_underlying_io_bytes_received` called with NULL context shall do nothing. **]** ### on_underlying_io_close_complete **SRS_HTTP_PROXY_IO_01_083: [** `on_underlying_io_close_complete` while CLOSING shall call the `on_io_close_complete` callback, passing to it the `on_io_close_complete_context` as `context` argument. **]** **SRS_HTTP_PROXY_IO_01_084: [** `on_underlying_io_close_complete` called with NULL context shall do nothing. **]** **SRS_HTTP_PROXY_IO_01_086: [** If the `on_io_close_complete` callback passed to `http_proxy_io_close` was NULL, no callback shall be triggered. **]** ### on_underlying_io_error **SRS_HTTP_PROXY_IO_01_087: [** If the `on_underlying_io_error` callback is called while OPENING, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. **]** **SRS_HTTP_PROXY_IO_01_088: [** `on_underlying_io_error` called with NULL context shall do nothing. **]** **SRS_HTTP_PROXY_IO_01_089: [** If the `on_underlying_io_error` callback is called while the IO is OPEN, the `on_io_error` callback shall be called with the `on_io_error_context` argument as `context`. **]** ## RFC 2817 relevant part 5.2 Requesting a Tunnel with CONNECT A CONNECT method requests that a proxy establish a tunnel connection on its behalf. **SRS_HTTP_PROXY_IO_01_075: [** The Request-URI portion of the Request-Line is always an 'authority' as defined by URI Generic Syntax [2], which is to say the host name and port number destination of the requested connection separated by a colon: **]** CONNECT server.example.com:80 HTTP/1.1 Host: server.example.com:80 Other HTTP mechanisms can be used normally with the CONNECT method -- except end-to-end protocol Upgrade requests, of course, since the tunnel must be established first. For example, proxy authentication might be used to establish the authority to create a tunnel: CONNECT server.example.com:80 HTTP/1.1 Host: server.example.com:80 Proxy-Authorization: basic aGVsbG86d29ybGQ= Like any other pipelined HTTP/1.1 request, data to be tunneled may be sent immediately after the blank line. The usual caveats also apply: data may be discarded if the eventual response is negative, and the connection may be reset with no response if more than one TCP segment is outstanding. 5.3 Establishing a Tunnel with CONNECT **SRS_HTTP_PROXY_IO_01_090: [** Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. **]** It may be the case that the proxy itself can only reach the requested origin server through another proxy. In this case, the first proxy SHOULD make a CONNECT request of that next proxy, requesting a tunnel to the authority. A proxy MUST NOT respond with any 2xx status code unless it has either a direct or tunnel connection established to the authority. An origin server which receives a CONNECT request for itself MAY respond with a 2xx status code to indicate that a connection is established. If at any point either one of the peers gets disconnected, any outstanding data that came from that peer will be passed to the other one, and after that also the other connection will be terminated by the proxy. If there is outstanding data to that peer undelivered, that data will be discarded. ## RFC 2617 relevant part Basic Authentication Scheme The "basic" authentication scheme is based on the model that the client must authenticate itself with a user-ID and a password for each realm. The realm value should be considered an opaque string which can only be compared for equality with other realms on that server. The server will service the request only if it can validate the user-ID and password for the protection space of the Request-URI. There are no optional authentication parameters. For Basic, the framework above is utilized as follows: challenge = "Basic" realm credentials = "Basic" basic-credentials Upon receipt of an unauthorized request for a URI within the protection space, the origin server MAY respond with a challenge like the following: WWW-Authenticate: Basic realm="WallyWorld" where "WallyWorld" is the string assigned by the server to identify the protection space of the Request-URI. A proxy may respond with the same challenge using the Proxy-Authenticate header field. **SRS_HTTP_PROXY_IO_01_091: [** To receive authorization, the client sends the userid and password, separated by a single colon (":") character, within a base64 [7] encoded string in the credentials. **]** basic-credentials = base64-user-pass base64-user-pass = user-pass = userid ":" password userid = * password = *TEXT **SRS_HTTP_PROXY_IO_01_093: [** Userids might be case sensitive. **]** If the user agent wishes to send the userid "Aladdin" and password "open sesame", it would use the following header field: Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== A client SHOULD assume that all paths at or deeper than the depth of the last symbolic element in the path field of the Request-URI also are within the protection space specified by the Basic realm value of the current challenge. **SRS_HTTP_PROXY_IO_01_092: [** A client MAY preemptively send the corresponding Authorization header with requests for resources in that space without receipt of another challenge from the server. **]** Similarly, when a client sends a request to a proxy, it may reuse a userid and password in the Proxy-Authorization header field without receiving another challenge from the proxy server. See section 4 for security considerations associated with Basic authentication. httpapi_compact_requirements.md000066400000000000000000000504111362133436400370260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdochttpapi_compact =============== ## Overview httpapi_compact implements a compact version of the HTTP (Hypertext Transfer Protocol). ## References [http://](http://httpwg.org/) ## Exposed API **SRS_HTTPAPI_COMPACT_21_001: [** The httpapi_compact shall implement the methods defined by the `httpapi.h`. ```c /** * @brief Global initialization for the HTTP API component. * * Platform specific implementations are expected to initialize * the underlying HTTP API stacks. * * @return @c HTTPAPI_OK if initialization is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_Init); /** @brief Free resources allocated in ::HTTPAPI_Init. */ MOCKABLE_FUNCTION(, void, HTTPAPI_Deinit); /** * @brief Creates an HTTPS connection to the host specified by the @p * hostName parameter. * * @param hostName Name of the host. * * This function returns a handle to the newly created connection. * You can use the handle in subsequent calls to execute specific * HTTP calls using ::HTTPAPI_ExecuteRequest. * * @return A @c HTTP_HANDLE to the newly created connection or @c NULL in * case an error occurs. */ MOCKABLE_FUNCTION(, HTTP_HANDLE, HTTPAPI_CreateConnection, const char*, hostName); /** * @brief Closes a connection created with ::HTTPAPI_CreateConnection. * * @param handle The handle to the HTTP connection created via ::HTTPAPI_CreateConnection. * * All resources allocated by ::HTTPAPI_CreateConnection should be * freed in ::HTTPAPI_CloseConnection. */ MOCKABLE_FUNCTION(, void, HTTPAPI_CloseConnection, HTTP_HANDLE, handle); /** * @brief Sends the HTTP request to the host and handles the response for * the HTTP call. * * @param handle The handle to the HTTP connection created * via ::HTTPAPI_CreateConnection. * @param requestType Specifies which HTTP method is used (GET, * POST, DELETE, PUT, PATCH). * @param relativePath Specifies the relative path of the URL * excluding the host name. * @param httpHeadersHandle Specifies a set of HTTP headers (name-value * pairs) to be added to the * HTTP request. The @p httpHeadersHandle * handle can be created and setup with * the proper name-value pairs by using the * HTTPHeaders APIs available in @c * HTTPHeaders.h. * @param content Specifies a pointer to the request body. * This value is optional and can be @c NULL. * @param contentLength Specifies the request body size (this is * typically added into the HTTP headers as * the Content-Length header). This value is * optional and can be 0. * @param statusCode This is an out parameter, where * ::HTTPAPI_ExecuteRequest returns the status * code from the HTTP response (200, 201, 400, * 401, etc.) * @param responseHeadersHandle This is an HTTP headers handle to which * ::HTTPAPI_ExecuteRequest shall add all the * HTTP response headers so that the caller of * ::HTTPAPI_ExecuteRequest can inspect them. * You can manipulate @p responseHeadersHandle * by using the HTTPHeaders APIs available in * @c HTTPHeaders.h * @param responseContent This is a buffer that shall be filled by * ::HTTPAPI_ExecuteRequest with the contents * of the HTTP response body. The buffer size * shall be increased by the * ::HTTPAPI_ExecuteRequest implementation in * order to fit the response body. * ::HTTPAPI_ExecuteRequest shall also handle * chunked transfer encoding for HTTP responses. * To manipulate the @p responseContent buffer, * use the APIs available in @c Strings.h. * * @return @c HTTPAPI_OK if the API call is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_ExecuteRequest, HTTP_HANDLE, handle, HTTPAPI_REQUEST_TYPE, requestType, const char*, relativePath, HTTP_HEADERS_HANDLE, httpHeadersHandle, const unsigned char*, content, size_t, contentLength, unsigned int*, statusCode, HTTP_HEADERS_HANDLE, responseHeadersHandle, BUFFER_HANDLE, responseContent); /** * @brief Sets the option named @p optionName bearing the value * @p value for the HTTP_HANDLE @p handle. * * @param handle The handle to the HTTP connection created via * ::HTTPAPI_CreateConnection. * @param optionName A @c NULL terminated string representing the name * of the option. * @param value A pointer to the value for the option. * * @return @c HTTPAPI_OK if initialization is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_SetOption, HTTP_HANDLE, handle, const char*, optionName, const void*, value); /** * @brief Clones the option named @p optionName bearing the value @p value * into the pointer @p savedValue. * * @param optionName A @c NULL terminated string representing the name of * the option * @param value A pointer to the value of the option. * @param savedValue This pointer receives the copy of the value of the * option. The copy needs to be free-able. * * @return @c HTTPAPI_OK if initialization is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_CloneOption, const char*, optionName, const void*, value, const void**, savedValue); ``` **]** **SRS_HTTPAPI_COMPACT_21_002: [** The httpapi_compact shall support the http requests: ```c #define HTTPAPI_REQUEST_TYPE_VALUES \ HTTPAPI_REQUEST_GET, \ HTTPAPI_REQUEST_POST, \ HTTPAPI_REQUEST_PUT, \ HTTPAPI_REQUEST_DELETE, \ HTTPAPI_REQUEST_PATCH \ /** @brief Enumeration specifying the HTTP request verbs accepted by * the HTTPAPI module. */ DEFINE_ENUM(HTTPAPI_REQUEST_TYPE, HTTPAPI_REQUEST_TYPE_VALUES); ``` **]** **SRS_HTTPAPI_COMPACT_21_003: [** The httpapi_compact shall return error codes defined by HTTPAPI_RESULT: ```c #define HTTPAPI_RESULT_VALUES \ HTTPAPI_OK, \ HTTPAPI_INVALID_ARG, \ HTTPAPI_ERROR, \ HTTPAPI_OPEN_REQUEST_FAILED, \ HTTPAPI_SET_OPTION_FAILED, \ HTTPAPI_SEND_REQUEST_FAILED, \ HTTPAPI_RECEIVE_RESPONSE_FAILED, \ HTTPAPI_QUERY_HEADERS_FAILED, \ HTTPAPI_QUERY_DATA_AVAILABLE_FAILED, \ HTTPAPI_READ_DATA_FAILED, \ HTTPAPI_ALREADY_INIT, \ HTTPAPI_NOT_INIT, \ HTTPAPI_HTTP_HEADERS_FAILED, \ HTTPAPI_STRING_PROCESSING_ERROR, \ HTTPAPI_ALLOC_FAILED, \ HTTPAPI_INIT_FAILED, \ HTTPAPI_INSUFFICIENT_RESPONSE_BUFFER, \ HTTPAPI_SET_X509_FAILURE, \ HTTPAPI_SET_TIMEOUTS_FAILED \ /** @brief Enumeration specifying the possible return values for the APIs in * this module. */ DEFINE_ENUM(HTTPAPI_RESULT, HTTPAPI_RESULT_VALUES); ``` **]** ### HTTPAPI_Init ```c HTTPAPI_RESULT HTTPAPI_Init(void); ``` **SRS_HTTPAPI_COMPACT_21_004: [** The HTTPAPI_Init shall allocate all memory to control the http protocol. **]** **SRS_HTTPAPI_COMPACT_21_006: [** If HTTPAPI_Init succeed allocating all the needed memory, it shall return HTTPAPI_OK. **]** **SRS_HTTPAPI_COMPACT_21_007: [** If there is not enough memory to control the http protocol, the HTTPAPI_Init shall return HTTPAPI_ALLOC_FAILED. **]** ### HTTPAPI_Deinit ```c void HTTPAPI_Deinit(void); ``` **SRS_HTTPAPI_COMPACT_21_009: [** The HTTPAPI_Init shall release all memory allocated by the httpapi_compact. **]** ### HTTPAPI_CreateConnection ```c HTTP_HANDLE HTTPAPI_CreateConnection(const char* hostName); ``` **SRS_HTTPAPI_COMPACT_21_011: [** The HTTPAPI_CreateConnection shall create an http connection to the host specified by the hostName parameter. **]** **SRS_HTTPAPI_COMPACT_21_012: [** The HTTPAPI_CreateConnection shall return a non-NULL handle on success. **]** **SRS_HTTPAPI_COMPACT_21_013: [** If there is not enough memory to control the http connection, the HTTPAPI_CreateConnection shall return NULL as the handle. **]** **SRS_HTTPAPI_COMPACT_21_014: [** If the hostName is NULL, the HTTPAPI_CreateConnection shall return NULL as the handle. **]** **SRS_HTTPAPI_COMPACT_21_015: [** If the hostName is empty, the HTTPAPI_CreateConnection shall return NULL as the handle. **]** **SRS_HTTPAPI_COMPACT_21_016: [** If the HTTPAPI_CreateConnection failed to create the connection, it shall return NULL as the handle. **]** ### HTTPAPI_CloseConnection ```c void HTTPAPI_CloseConnection(HTTP_HANDLE handle); ``` **SRS_HTTPAPI_COMPACT_21_017: [** The HTTPAPI_CloseConnection shall close the connection previously created in HTTPAPI_ExecuteRequest. **]** **SRS_HTTPAPI_COMPACT_21_076: [** After close the connection, The HTTPAPI_CloseConnection shall destroy the connection previously created in HTTPAPI_CreateConnection. **]** **SRS_HTTPAPI_COMPACT_21_018: [** If there is a certificate associated to this connection, the HTTPAPI_CloseConnection shall free all allocated memory for the certificate. **]** **SRS_HTTPAPI_COMPACT_06_001: [** If there is a x509 client certificate associated to this connection, the HTTAPI_CloseConnection shall free all allocated memory for the certificate. **]** **SRS_HTTPAPI_COMPACT_06_002: [** If there is a x509 client private key associated to this connection, then HTTP_CloseConnection shall free all the allocated memory for the private key. **]** **SRS_HTTPAPI_COMPACT_21_019: [** If there is no previous connection, the HTTPAPI_CloseConnection shall not do anything. **]** **SRS_HTTPAPI_COMPACT_21_020: [** If the connection handle is NULL, the HTTPAPI_CloseConnection shall not do anything. **]** **SRS_HTTPAPI_COMPACT_21_084: [** The HTTPAPI_CloseConnection shall wait, at least, 10 seconds for the SSL close process. **]** **SRS_HTTPAPI_COMPACT_21_085: [** If the HTTPAPI_CloseConnection retries 10 seconds to close the connection without success, it shall destroy the connection anyway. **]** **SRS_HTTPAPI_COMPACT_21_086: [** The HTTPAPI_CloseConnection shall wait, at least, 100 milliseconds between retries. **]** **SRS_HTTPAPI_COMPACT_21_087: [** If the xio return anything different than 0, the HTTPAPI_CloseConnection shall destroy the connection anyway. **]** ### HTTPAPI_ExecuteRequest ```c HTTPAPI_RESULT HTTPAPI_ExecuteRequest(HTTP_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE httpHeadersHandle, const unsigned char* content, size_t contentLength, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent); ``` **SRS_HTTPAPI_COMPACT_21_021: [** The HTTPAPI_ExecuteRequest shall execute the http communtication with the provided host, sending a request and reciving the response. **]** **SRS_HTTPAPI_COMPACT_21_022: [** If a Certificate was provided, the HTTPAPI_ExecuteRequest shall set this option on the transport layer. **]** **SRS_HTTPAPI_COMPACT_21_023: [** If the transport failed setting the Certificate, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. **]** **SRS_HTTPAPI_COMPACT_06_003: [** If the x509 client certificate is provided, the HTTPAPI_ExecuteRequest shall set this option on the transport layer. **]** **SRS_HTTPAPI_COMPACT_06_005: [** If the transport failed setting the client certificate, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. **]** **SRS_HTTPAPI_COMPACT_06_004: [** If the x509 client certificate private key is provided, the HTTPAPI_ExecuteRequest shall set this optionon the transport layer. **]** **SRS_HTTPAPI_COMPACT_06_006: [** If the transport failed setting the client certificate private key, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_024: [** The HTTPAPI_ExecuteRequest shall open the transport connection with the host to send the request. **]** **SRS_HTTPAPI_COMPACT_21_025: [** If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_026: [** If the open process succeed, the HTTPAPI_ExecuteRequest shall send the request message to the host. **]** **SRS_HTTPAPI_COMPACT_21_027: [** If the HTTPAPI_ExecuteRequest cannot create a buffer to send the request, it shall not send any request and return HTTPAPI_STRING_PROCESSING_ERROR. **]** **SRS_HTTPAPI_COMPACT_21_028: [** If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_HTTP_HEADERS_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_029: [** If the HTTPAPI_ExecuteRequest cannot send the buffer with the request, it shall return HTTPAPI_SEND_REQUEST_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_030: [** At the end of the transmission, the HTTPAPI_ExecuteRequest shall receive the response from the host. **]** **SRS_HTTPAPI_COMPACT_21_032: [** If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_033: [** If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. **]** **SRS_HTTPAPI_COMPACT_21_034: [** If there is no previous connection, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_035: [** The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`. **]** **SRS_HTTPAPI_COMPACT_21_036: [** The request type shall be provided in the parameter requestType. **]** **SRS_HTTPAPI_COMPACT_21_037: [** If the request type is unknown, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_038: [** The HTTPAPI_ExecuteRequest shall execute the resquest for the path in relativePath parameter. **]** **SRS_HTTPAPI_COMPACT_21_039: [** If the relativePath is NULL or invalid, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_040: [** The request shall contain the http header provided in httpHeadersHandle parameter. **]** **SRS_HTTPAPI_COMPACT_21_041: [** If the httpHeadersHandle is NULL or invalid, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_042: [** The request can contain the a content message, provided in content parameter. **]** **SRS_HTTPAPI_COMPACT_21_043: [** If the content is NULL, the HTTPAPI_ExecuteRequest shall send the request without content. **]** **SRS_HTTPAPI_COMPACT_21_044: [** If the content is not NULL, the number of bytes in the content shall be provided in contentLength parameter. **]** **SRS_HTTPAPI_COMPACT_21_045: [** If the contentLength is lower than one, the HTTPAPI_ExecuteRequest shall send the request without content. **]** **SRS_HTTPAPI_COMPACT_21_046: [** The HTTPAPI_ExecuteRequest shall return the http status reported by the host in the received response. **]** **SRS_HTTPAPI_COMPACT_21_047: [** The HTTPAPI_ExecuteRequest shall report the status in the statusCode parameter. **]** **SRS_HTTPAPI_COMPACT_21_048: [** If the statusCode is NULL, the HTTPAPI_ExecuteRequest shall report not report any status. **]** **SRS_HTTPAPI_COMPACT_21_049: [** If responseHeadersHandle is provide, the HTTPAPI_ExecuteRequest shall prepare a Response Header usign the HTTPHeaders_AddHeaderNameValuePair. **]** **SRS_HTTPAPI_COMPACT_21_050: [** If there is a content in the response, the HTTPAPI_ExecuteRequest shall copy it in the responseContent buffer. **]** **SRS_HTTPAPI_COMPACT_21_051: [** If the responseContent is NULL, the HTTPAPI_ExecuteRequest shall ignore any content in the response. **]** **SRS_HTTPAPI_COMPACT_21_052: [** If any memory allocation get fail, the HTTPAPI_ExecuteRequest shall return HTTPAPI_ALLOC_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_053: [** The HTTPAPI_ExecuteRequest shall produce a set of http header to send to the host. **]** **SRS_HTTPAPI_COMPACT_21_054: [** If Http header maker cannot provide the number of headers, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_055: [** If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_073: [** The message received by the HTTPAPI_ExecuteRequest shall starts with a valid header. **]** **SRS_HTTPAPI_COMPACT_21_074: [** After the header, the message received by the HTTPAPI_ExecuteRequest can contain addition information about the content. **]** **SRS_HTTPAPI_COMPACT_21_075: [** The message received by the HTTPAPI_ExecuteRequest can contain a body with the message content. **]** **SRS_HTTPAPI_COMPACT_21_077: [** The HTTPAPI_ExecuteRequest shall wait, at least, 10 seconds for the SSL open process. **]** **SRS_HTTPAPI_COMPACT_21_078: [** If the HTTPAPI_ExecuteRequest cannot open the connection in 10 seconds, it shall fail and return HTTPAPI_OPEN_REQUEST_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_079: [** The HTTPAPI_ExecuteRequest shall wait, at least, 20 seconds to send a buffer using the SSL connection. **]** **SRS_HTTPAPI_COMPACT_21_080: [** If the HTTPAPI_ExecuteRequest retries to send the message for 20 seconds without success, it shall fail and return HTTPAPI_SEND_REQUEST_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_081: [** The HTTPAPI_ExecuteRequest shall try to read the message with the response up to 20 seconds. **]** **SRS_HTTPAPI_COMPACT_21_082: [** If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_083: [** The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. **]** **SRS_HTTPAPI_COMPACT_42_088: [** The message received by the HTTPAPI_ExecuteRequest should not contain http body. **]** ### HTTPAPI_SetOption ```c HTTPAPI_RESULT HTTPAPI_SetOption(HTTP_HANDLE handle, const char* optionName, const void* value); ``` **SRS_HTTPAPI_COMPACT_21_056: [** The HTTPAPI_SetOption shall change the HTTP options. **]** **SRS_HTTPAPI_COMPACT_21_057: [** The HTTPAPI_SetOption shall receive a handle that identiry the HTTP connection. **]** **SRS_HTTPAPI_COMPACT_21_058: [** The HTTPAPI_SetOption shall receive the option as a pair optionName/value. **]** **SRS_HTTPAPI_COMPACT_21_059: [** If the handle is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_060: [** If the optionName is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_061: [** If the value is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_062: [** If any memory allocation get fail, the HTTPAPI_SetOption shall return HTTPAPI_ALLOC_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_063: [** If the HTTP do not support the optionName, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_064: [** If the HTTPAPI_SetOption get success setting the option, it shall return HTTPAPI_OK. **]** ### HTTPAPI_CloneOption ```c HTTPAPI_RESULT HTTPAPI_CloneOption(const char* optionName, const void* value, const void** savedValue); ``` **SRS_HTTPAPI_COMPACT_21_065: [** The HTTPAPI_CloneOption shall provide the means to clone the HTTP option. **]** **SRS_HTTPAPI_COMPACT_21_066: [** The HTTPAPI_CloneOption shall return a clone of the value identified by the optionName. **]** **SRS_HTTPAPI_COMPACT_21_067: [** If the optionName is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_068: [** If the value is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_069: [** If the savedValue is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_070: [** If any memory allocation get fail, the HTTPAPI_CloneOption shall return HTTPAPI_ALLOC_FAILED. **]** **SRS_HTTPAPI_COMPACT_21_071: [** If the HTTP do not support the optionName, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. **]** **SRS_HTTPAPI_COMPACT_21_072: [** If the HTTPAPI_CloneOption get success setting the option, it shall return HTTPAPI_OK. **]** httpapiex_requirements.md000066400000000000000000000237241362133436400356640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocHTTPAPIEX Requirements ================ ## Overview HTTAPIEX is a utility module that provides HTTP requests with build-in retry capability to an HTTP server. Features over "regular" HTTPAPI include: - Optional parameters - Implementation independent - Retry mechanism - Persistent options ## References [httpapi_requirements] ## Exposed API ```c #define HTTPAPIEX_RESULT_VALUES \ HTTPAPIEX_OK, \ HTTPAPIEX_ERROR, \ HTTPAPIEX_INVALID_ARG, \ HTTPAPIEX_RECOVERYFAILED /*to be continued*/ DEFINE_ENUM(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); extern HTTPAPIEX_HANDLE HTTPAPIEX_Create(const char* hostName); extern HTTPAPIEX_RESULT HTTPAPIEX_ExecuteRequest(HTTPAPIEX_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeadersHandle, BUFFER_HANDLE requestContent, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent); extern void HTTPAPIEX_Destroy(HTTPAPIEX_HANDLE handle); extern HTTPAPIEX_RESULT HTTPAPIEX_SetOption(HTTPAPIEX_HANDLE handle, const char* optionName, const void* value); ``` ### HTTPAPIEX_Create ```c HTTPAPIEX_HANDLE HTTPAPIEX_Create(const char* hostName) ``` HTTPAPIEX_Create shall create a HTTPAPIEX_HANDLE that can be used in further calls. **SRS_HTTPAPIEX_02_001: [** If parameter hostName is NULL then HTTPAPIEX_Create shall return NULL. **]** **SRS_HTTPAPIEX_02_002: [** Parameter hostName shall be saved. **]** **SRS_HTTPAPIEX_02_003: [** If saving the parameter hostName fails for any reason, then HTTPAPIEX_Create shall return NULL. **]** **SRS_HTTPAPIEX_02_004: [** Otherwise, HTTPAPIEX_Create shall return a HTTAPIEX_HANDLE suitable for further calls to the module. **]** **SRS_HTTPAPIEX_02_005: [** If creating the handle fails for any reason, then HTTAPIEX_Create shall return NULL. **]** ### HTTPAPIEX_ExecuteRequest ```c HTTPAPIEX_RESULT HTTPAPIEX_ExecuteRequest(HTTPAPIEX_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeadersHandle, BUFFER_HANDLE requestContent, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent); ``` HTTPAPIEX_ExecuteRequest tries to execute an HTTP request of type requestType, on the server's relativePath relativePath, pushing the request HTTP headers requestHttpHeadersHandle, having the content of the request as pointed to by requestcontent. If successful, HTTAPIEX writes in the out parameter statusCode the HTTP status, populates the responseHeadersHandle with the response headers and copies the response body to responseContent. **SRS_HTTPAPIEX_02_006: [** If parameter handle is NULL then HTTPAPIEX_ExecuteRequest shall fail and return HTTPAPIEX_INVALID_ARG. **]** **SRS_HTTPAPIEX_02_007: [** If parameter requestType does not indicate a valid request, HTTPAPIEX_ExecuteRequest shall fail and return HTTPAPIEX_INVALID_ARG. **]** **SRS_HTTPAPIEX_02_008: [** If parameter relativePath is NULL then HTTPAPIEX_INVALID_ARG shall not assume a relative path - that is, it will assume an empty path (""). **]** **SRS_HTTPAPIEX_02_009: [** If parameter requestHttpHeadersHandle is NULL then HTTPAPIEX_ExecuteRequest shall allocate a temporary internal instance of HTTPHEADERS, shall add to that instance the following headers Host:{hostname} - as it was indicated by the call to HTTPAPIEX_Create API call Content-Length:the size of the requestContent parameter, and use this instance to all the subsequent calls to HTTPAPI_ExecuteRequest as parameter httpHeadersHandle. **]** **SRS_HTTPAPIEX_02_010: [** If any of the operations in SRS_HTTAPIEX_02_009 fails, then HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_ERROR. **]** **SRS_HTTPAPIEX_02_011: [** If parameter requestHttpHeadersHandle is not NULL then HTTPAPIEX_ExecuteRequest shall create or update the following headers of the request: Host:{hostname} Content-Length:the size of the requestContent parameter, and shall use the so constructed HTTPHEADERS object to all calls to HTTPAPI_ExecuteRequest as parameter httpHeadersHandle. **]** **SRS_HTTPAPIEX_02_012: [** If any of the operations required for SRS_HTTAPIEX_02_011 fails, then HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_ERROR. **]** **SRS_HTTPAPIEX_02_013: [** If requestContent is NULL then HTTPAPIEX_ExecuteRequest shall behave as if a buffer of zero size would have been used, that is, it shall call HTTPAPI_ExecuteRequest with parameter content = NULL and contentLength = 0. **]** **SRS_HTTPAPIEX_02_014: [** If requestContent is not NULL then its content and its size shall be used for parameters content and contentLength of HTTPAPI_ExecuteRequest. **]** **SRS_HTTPAPIEX_02_015: [** If statusCode is NULL then HTTPAPIEX_ExecuteRequest shall not write in statusCode the HTTP status code, and it will use a temporary internal int for parameter statusCode to the calls of HTTPAPI_ExecuteRequest. **]** **SRS_HTTPAPIEX_02_016: [** If statusCode is not NULL then If statusCode is NULL then HTTPAPIEX_ExecuteRequest shall use it for parameter statusCode to the calls of HTTPAPI_ExecuteRequest. **]** **SRS_HTTPAPIEX_02_017: [** If responseHeaders handle is NULL then HTTPAPIEX_ExecuteRequest shall create a temporary internal instance of HTTPHEADERS object and use that for responseHeaders parameter of HTTPAPI_ExecuteRequest call. **]** **SRS_HTTPAPIEX_02_018: [** If creating the temporary http headers in SRS_HTTPAPIEX_02_017 fails then HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_ERROR. **]** **SRS_HTTPAPIEX_02_019: [** If responseHeaders is not NULL, then then HTTPAPIEX_ExecuteRequest shall use that object as parameter responseHeaders of HTTPAPI_ExecuteRequest call. **]** **SRS_HTTPAPIEX_02_020: [** If responseContent is NULL then HTTPAPIEX_ExecuteRequest shall create a temporary internal BUFFER object and use that as parameter responseContent of HTTPAPI_ExecuteRequest call. **]** **SRS_HTTPAPIEX_02_021: [** If creating the BUFFER_HANDLE in SRS_HTTPAPIEX_02_020 fails, then HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_ERROR. **]** **SRS_HTTPAPIEX_02_022: [** If responseContent is not NULL then HTTPAPIEX_ExecuteRequest use that as parameter responseContent of HTTPAPI_ExecuteRequest call. **]** **SRS_HTTPAPIEX_02_023: [** HTTPAPIEX_ExecuteRequest shall try to execute the HTTP call by ensuring the following API call sequence is respected: **]** 1. HTTPAPI_Init 2. HTTPAPI_CreateConnection 3. HTTPAPI_ExecuteRequest **SRS_HTTPAPIEX_02_035: [** HTTPAPIEX_ExecuteRequest shall pass all the saved options (see HTTPAPIEX_SetOption) to the newly create HTTPAPI_HANDLE in step 2 by calling HTTPAPI_SetOption. **]** **SRS_HTTPAPIEX_02_036: [** If setting the option fails, then the failure shall be ignored. **]** **SRS_HTTPAPIEX_02_024: [** If any point in the sequence fails, HTTPAPIEX_ExecuteRequest shall attempt to recover by going back to the previous step and retrying that step. **]** **SRS_HTTPAPIEX_02_025: [** If the first step fails, then the sequence fails. **]** **SRS_HTTPAPIEX_02_026: [** A step shall be retried at most once. **]** **SRS_HTTPAPIEX_02_027: [** If a step has been retried then all subsequent steps shall be retried too. **]** **SRS_HTTPAPIEX_02_028: [** HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_OK when a call to HTTPAPI_ExecuteRequest has been completed successfully. **]** **SRS_HTTPAPIEX_02_029: [** Otherwise, HTTAPIEX_ExecuteRequest shall return HTTPAPIEX_RECOVERYFAILED. **]** ### HTTPAPIEX_Destroy ```c void HTTPAPIEX_Destroy(HTTPAPIEX_HANDLE handle); ``` **SRS_HTTPAPIEX_02_043: [** If parameter handle is NULL then HTTPAPIEX_Destroy shall take no action. **]** **SRS_HTTPAPIEX_02_042: [** HTTPAPIEX_Destroy shall free all the resources used by HTTAPIEX_HANDLE. **]** ### HTTPAPIEX_SetOption ```c extern HTTPAPIEX_RESULT HTTPAPIEX_SetOption(HTTPAPIEX_HANDLE handle, const char* optionName, const void* value); ``` HTTPAPIEX_SetOption set the option "optionName" to the value pointed to by value. Since underlying layer's handle is not necessarily created yet at the time of HTTPAPIEX_SetOption, the options and values are to be saved until the HTTPAPI_HANDLE is created and passed to HTTPAPI_HANDLE at that time. If HTTPAPI_HANDLE exists at the time of calling HTTPAPIEX_SetOption, the option and the value are still saved and passed immediately to HTTPAPI_SetOption. **SRS_HTTPAPIEX_02_032: [** If parameter handle is NULL then HTTPAPIEX_SetOption shall return HTTPAPIEX_INVALID_ARG. **]** **SRS_HTTPAPIEX_02_033: [** If parameter optionName is NULL then HTTPAPIEX_SetOption shall return HTTPAPIEX_INVALID_ARG. **]** **SRS_HTTPAPIEX_02_034: [** If parameter value is NULL then HTTPAPIEX_SetOption shall return HTTPAPIEX_INVALID_ARG. **]** **SRS_HTTPAPIEX_02_030: [** If parameter optionName is one of the options handled by HTTPAPIEX then it shall be set to value *value. **]** **SRS_HTTPAPIEX_02_037: [** HTTPAPIEX_SetOption shall attempt to save the value of the option by calling HTTPAPI_CloneOption passing optionName and value, irrespective of the existence of a HTTPAPI_HANDLE **]** **SRS_HTTPAPIEX_02_038: [** If HTTPAPI_CloneOption returns HTTPAPI_INVALID_ARG then HTTPAPIEX shall return HTTPAPIEX_INVALID_ARG. **]** **SRS_HTTPAPIEX_02_039: [** If HTTPAPI_CloneOption returns HTTPAPI_OK then HTTPAPIEX_SetOption shall create or update the pair optionName/value. **]** **SRS_HTTPAPIEX_02_041: [** If creating or updating the pair optionName/value fails then shall return HTTPAPIEX_ERROR. **]** **SRS_HTTPAPIEX_02_040: [** For all other return values of HTTPAPI_SetOption, HTTPIAPIEX_SetOption shall return HTTPAPIEX_ERROR. **]** **SRS_HTTPAPIEX_02_031: [** If HTTPAPI_HANDLE exists then HTTPAPIEX_SetOption shall call HTTPAPI_SetOption passing the same optionName and value and shall return a value conforming to the below table: **]** |HTTPAPI return code |HTTPAPIEX return code| |-------------------------------|---------------------| |HTTPAPI_OK |HTTPAPIEX_OK | |HTTPAPI_INVALID_ARG |HTTPAPIEX_INVALID_ARG| |Any other HTTPAPI return code |HTTPAPIEX_ERROR | Options currently handled in HTTAPIEX: -none httpapiex_retry_mechanism.vsdx000066400000000000000000001170051362133436400367120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocPK!1qÙ´ [Content_Types].xml ¢( ´•Ín‚@…÷Múd¶ ŒÚ¦iÑE–­ û梓2?™Qß¾w±«Æ †s¾3÷Âe<ÝÈ"*Á:¡UJ†É€D 2Í…Z¤äkþ?‘Èy¦8+´‚”lÁ‘éäöf<ßpª•KÉÒ{óL©Ë– ™K´…+¹¶’y¼´ jXöÍ@GƒÁ#Í´ò |샙Œ_!g«ÂGo¼½K2'ÑËî¹€J‰A¿‰Ã =©±P¸–ˆSˆŒyÜ-o%‹ëT *«gÜRw‡Ñÿ „•ãT¿µîËi‡hƬÿ`³ÓRà¶(×ÙJâÆ“ó>!¨tq¥I¸eklF"™Pûd§è=³Ú8,®…€ã5•êØ X/ ©ÅY"Ö ?Pç¹È ©„Ösà}ÙÙÊy-ÿßÙt„/ºÇï†ÖçšžÖ’sí<ÅögôEŒ®¸¿>âáƒãÇáÃcûJp¹ ÷^]²Ëæ8@¸^÷Š]K.{—¬¼ž}ªrP]&xü©­Ž]jÓl­9SÙì™´ú‰M~ÿÿPK!§Xµ%^ _rels/.rels ¢( ¬“ËNÃ0E÷Hüƒå}ã¤<„P“nRw…ìIb?dOªöï± "%eÑ.=ß{f®¼ZïL϶¢v¶äE–s†V:¥m[ò·úyñÀY$° zg±ä{Œ|]]_­^±Jb§}dIÅÆ’wDþQˆ(;43çѦ›Æ”Ž¡ä´(–y~/Â_ ^4ÙF•¤éò—ýýÕ훫½yx›Ä«ø.Ý»çûñÝ]xËö‘q¿Q«7öçA¸¨ Þ_‡;^²”{'ó ]íÅÉ}V„¬ ©uö)H»z—+^Ú/«epËŽªË„­XòȪLJ’eÊÒš²ª\ÅË‹à@ÐÀ» ÖQzž¤Óô)‚»êÇÓpÁœ'a9?¾Y‡3 mA•o¢5“Õ÷÷­ï‡ÓE°TÔF¯}¸oýÂéã/)[`G¬Ž›-0~âþâ>b«}hàÓ"u¿IÂÙxÜDlv\?Ü'~=¼Hâ”ÝŠ–®Žk‡ûöŠþ,™E?Hú»`•Â01 ¿HÄàÓýbf²@¬lØ(ã(†ÂÄÿÇ‹4yªœ|<ª6ZÕÊå›ÁQõ‡î?Uh)‡¶„ÔøéHÈ„ÿQèqQQ«Þ­÷†F~µàCAz2cM¤ ã-+erp0Pº„´½Á¨MAÒêtdEM à‡*EiÄ…QÚ÷ðCA”vy!¤,J»½N2$!J»ƒÉp<®S)í»ø! -¥ÝQ?Diw|0MZDiwØuÇ ¢´Ûoz£&QÚ¶F15¤ZZ»}0¤,J»“LªZJ»“Ú¤9!õ¢´Û¯ ºCjì¶´vû£Á¸O´¨­´Ûu;}jHµ•vƒÖ¤Cõt[k·Ú¥Äm+íÔ{“!Õm¥ÝÖ¸ÛíSzi+íöƒæˆl‘Ò.Œ– ÙGm¥Ýfú‘R][iwÐNÆÔ`h+ív½ÖÞ¥Ýf«S; ôÒQÚm·zmru”váhÜ º±£´[4k-JÜŽÒî¨7îLjT)J»Ý~sHu@Gi·Óîu†¤,J»cœd£•v'm˜|ÅÜ—ûÅ6ú³`Õ¡üg¿_U‡AÞ$aµr½Á€a—ÁâžòºÝìtkõV»R¯u›ÝƒN½^¯Ô+ þáCÀž Ž©7]üù"XÄ+° •z»Ò®4ø§UiÂÿAO“(¸ŽtìNûR ˆ›Ó%š_*'#nvdržÅ¬VNVÃõ*ç:ÿuT¥`•1dQT9;ªŠM­ØÎÑztÜ.-Z.…4‚<€·`ßL⤿\FO¼|1,²ò±ê,¼Hm¯V¯µêý'úÖ@ó>¤ ºR0.À6Ì·â2^/ÐuÙÆ‹Y?IâÏÓðÆ©b¸eõ Ø}¸àt?§KÁ6 ƒ¥KÐÅÑÕqF4i®’`!:ÃRÖ0ž/±%WOK!¬EÅNE30ŸxÕV?"‘R®T¼s}š›>Ì>›…Z5"ÑÔ¹E4Äñ4GÉä¡u{`m"ŒÖÈmO$ŸßÝ­XúÑm{ñ{â& ÿo͸é\›ÞƒÙœÆ GY½ ªDkA¶T¦ÈÓ‡ø³[Ç)»Kß I—v‰SÈG„S‹4ˆSX:|Ô÷,IChP? ï‰i…³Þ3¨äá(¸™¦q6öÄŽœÍ-d… œ)à¨â6H•íéúÓøöÓ‡p–>¸¬Hzk¬)æz†´wñ##Æ‚$ƒIýÕd¥k±ˆ¥Ä”D>>éi6X|hÂeœ¾ò†°PÓ\ïÓ/ãYèõé§Â‡Ó2]ì›$^{j„ÍòöÃ[šm :ñé 7,Ü.hÎIÏy¥ER]¯€‰ýœ.…Æww ±”bÏdE,cdA1“xQXÈÉbƾÐü—lµAßIȽ.ù,>¿ùçÛ`1ƒƒ:E]\$áq˜F¬|6bBàëå ÆŸŽ{9$·NpL›Ý·Ÿ\"ú0èúC}ºHØKÀ]D( &ÏUÞß3¹ZV&ܰÁ‘±ŽsfÃd* ÍÒâÀ‹~)Þ³ì“ÕFë4^'”gñiøÈ2§ ÑY0ÖÀ¨üƒ½cÉ=ÑÆ³¦B|Gv%L0¶˜²õ†av véɈKʯ¯§¦¸|ù•=}Ž“™Ç¤bSÎèÆâ{/ÂÚ¥`^Œ‚4ÈúѯqÀƒÁ?‚NG7Ñ0 ÕèØ€þ8yÏ6 ÖëȆBß·.ÄÖo,ø-‹–°i†·i*o/Ÿ`@fæªI9 žXòŽÍo²±jÒ>^®#–ŒÐ-— #¸iÙ™¿o  þs¨˜Úû·ú{fÕâží¿R9ïÜ¢äàä¼^*çõ ÅY}Ä7Á|.FŸ5,‡°'à>½gÞ' ¶Ê¦ŸM…ù€W8ëvcÑf(+WÄLå¦È2ÀµŠ8ʈ Æ­à´d…+ØžÑê}±º\eDzƙcçd….^ƒj|²’»1µ¡Å3|£ˆîj/,™3ô–‘ ì#pAox—¶ÇÎh®ñ; ¿°ÙPªÐ¥_Dñç2œóRáL÷µEËÎÍy`|TT<žý÷z¾¤0þ d`øz6Š€WÏØ†IÊeÌÏY\ cj›æ5]F”•¨i)ŽWƒÙ >e,r©—l{n+.M¸p©qirß„3šK¦IÔ_,–kbfôãp†|"6^>=Q4T8߈-©Ã…ʾUÃÚ¨’ê›!!ôàÈ!ˆÑüWñÌžllíÕÖ‘K2î<`YŒ¾ Y€Í¯È’Ý&÷aŸ‡Ë+ƒ½Ùµê×Y@ ÄÿJÈ @–@pŽŠ¸,E»“à_ŽGIãe¡ÅøþìŸp~ÁSŠ;`Q4A¿Š]*XôÔEFÿ¼ÅÎ×ó“(‡OÎ=°g÷q™÷˜œ³€@¸>ƒˆÛ•B÷Öà¿ [¿£h+Ï'ðC°'¹€rBÖ‹æ&*ì]Boxˆ¢×%~¾B ÀLbõ1-'ú’%¿†”ËíœO‰qf°ÆÝok°…ùZ€¯}šõšµéi:ËJÀ`Ìp‹'"o­¿<0 JÀPºwAš„_6â•Áeò2P.Ü›ÙbÞuÆ-t»w4gý ¼…1†UÀÚ—À0x‚/ãÏ<(±f„]àŠÃuþ}mbÌM)áñ ÊQyËùj,–9¸Pà5[§½¿ì™±ùÃ2øð¯á¦+‰`gȺÐ(ÿâiÊΰ=$k—k¯ÁÙ¤ñúþÁBü-äEW˜goí¯Â`¡´mÙCL±/ÓÛ$\¦% JG¯-ÕQ÷0ûÐçÓ“ âÑ#ãÆ},<#ÖýI˜PPð„ï*ü\ïR¦KÜÃùï¯ë{–Ïyº°;¡˜úw8r1ˆÆRØÛ8ùƒ_ r’¥„Á:‚ p—EüËIæö.(´Ú5Í£sÜÔ`ˆs9}Uóø*-QA—\7+«7`L“}‡ÊTG"zbK2=è‰léÊx†®‰ƒÆ†v˜DA{̳ Õ.Õe–ý¬bîóeŒ·9±mYàØ¿•óÆ‹ù‚Û<Œ^«`?ñzŽªMXÙáD®¿!Ÿú¦" edôD± –Uà#nÅòkõûVqpÜâœñm öusâ ŒºËŠqfl– ^Gç‡Áýz>RwÍœx:Ä-›{F–äGðFfvŒ_"]—Z'…*Ó3Í_¨cç‡âhóYÜ#u T1®\§¡ÝS®nD–+ÓhOM!œ7ª Ø·<ØçW?q;Јò+ G„2ð¼•Y‚'oh–`Qî…X#L˜fùûsq.LbîÀ$ —ZùpAË€ÀÅQÏ‹ä $Z……€«VXTþDÕ¥G›°òsë®4r7”`¿æM´vƒùñ8EÊ—n¢Ë”nJczzÊÉSŽƒ{ •†lŸ±¿ÒìÂÿ¼]L Û>¦¦L òö2 ±ìfaÚÏÀ¶£­i`³« +{Ú‹0ìêBŒÚ7áLC¹5CÙÙÖ´· rÞN-2aóVÉ xlñÙ~gqžº3ûd¾® æno ¯¥gîeß•¥gõ“a,ñÎ]9ewïŒ;ût”³ÿÆÆÝßÐn±æ€i ™¦ŠúK­9Çt$.®úì¡ÆNç± [Àaì:¡Ååƒy‹òQú\f¢Š>ð7Dt‡zë¹Îdi+ DžˆWÔª ^UG¢ä°µ^YG =¯®#æ+ 2FäY¯$0Ä+ lëÆ« € ?#;×~µ ÁÎM ûƒê™ÞÐ9Oú×§Wã÷ã³+;õ¿z󿥓›X¹D@Rë6°`+±:1,u— HªæúPv ‚γ‘¿M‚ í£Â%¸ØG¥³;ùîF>Œúùr ëöa÷ÿ‡x厓VZ%Ü@(èÅ¿>¨kË×[XMÆëhÀwøxWÒäú›<æÝÛ¤”Âa=»“Paºþ´R$ñbcµW«×¬×i‰°UícS áô¯,/›À.¶a‚5[àk¯é¡#”àÎ@vÍÖ}„·b‰²y=—DՀě ›]ß(‚™ãlVYs1# l6®f7Ë5·Üj¹r·/>Ùܦ©þÔžE¯nÍ‚-îîvDÆí+ƒo¡Ú=V”Pú±2®³9÷$L¸$ŒÂé¼·ã|Þ‚—rBoÁþ§œÑ?Üñ?}+$ñª×»Apûé>Á÷ʈ-è§ÿª[{г?VS. ÆÑ£‘ú ÌoÈß¹'à0áwÿ離çÞ¸)ÁÜΞjßÐ¥¨¾ép™óuº\à 6;Hc,áEÖEÂCö9;œÄþl¯šú´^º¤÷Àà£AÓ°ØÜ%š|q±Q>vÅÁ:•/U/±5 YYê}·øæÜL ž5å·5<±Äkn3øô6^ªRá²ï,® ¾ÖQ`.‚( äÈŸŒxýlñúzŠdc¡‚GŠÈ7΂å;_=žÅýu ä·˜F&Êû ZË ÆÂSµæKá-äÛ£-‡ãëôÐ:>äWB§ðöôìŸ')›WNFøÑ § ã;ªÂýbŸ¿©¨ì©üßâ:ð¨úÛš­!>ùÄÎC+HîYÚOîWGÕU-Žýéäô¼²;ŸÄÁ»ˆg¨Ρªç†Q5|ûêUŸ/ÙBÔ¼Ïk ØÇwÇRAÇÿ/ÿÿPK!‚Ôe$visio/masters/_rels/masters.xml.rels´’ËjÃ@ E÷…þà},Û !”Œ³+dÒÆŠ=Äó`4„æï#…º”ì¼¼sÚ¾ý¤n”ÙÅ ¡©jPlì]4|?W;P\LèÍi¸á{ÛŸh2E–xt‰•PkKIˆlGò†«˜(Èä³7Eb0{5a[×[Ì¿Ð͘êØkÈÇ~ ê|ObþÃöÎæÈñR*=Þœ ЦžCQjÊÂ0y ¢á™×•Ôüߨ.al_›%ŒÍ+ãf ãæÇˆ³çèÿÿPK!Ã™ì¸  visio/pages/_rels/pages.xml.rels\ÏÏ Â0 ð»à;”Ü]7"²v7aWÑ(]ìŠëš"úöÆ›óB~_¾~x…E<±OQA×´ 0Ú4ùèÜ®çÝU'³¤ˆ ÞH0èí¦¿àb*Ñì3 V")˜kÍ')ÉÎ 5)cäÍ=•`*ÅÉlìÃ8”û¶=Èòk€^™bœ”qê@\ß™“ÿìàmI”îµ±)ȧçŒvíå<‡,˜â°*øN]Ã/Ô½\UÐÿÿPK!Èglfývisio/_rels/document.xml.rels¤’ËjÃ0E÷…þƒ˜}-;}PBälJ!Û’~€Ç¶¨õ@Ræï;¸.Ž‹ Y‰¹B÷ÌèÎfûe:ÖcˆÚYE–C«\¥m#à}ÿz÷ ,&i+Ù9‹Ža[ÞÞlÞ°“‰ÅVûÈÈÅFmJ~ÍyT-3çÑÒMí‚‘‰ÊÐp/Õ‡l¯òü‰‡S(gžlW »êØþè‰üÇÛh\tuÊ”3¼×4™ùÜ”´­Ü!’‰ &£Q_À—‘«ëžæ;%ÍMâ%hq”¾;QŠÓœ£ÀÇóúñ z!>W×Zá‹SŸmZH‘'Ч6†òG,.õðp¦‡ÆÜËNWÃ>NèIûóÙÒ–ßÿÿPK!+»°`zà visio/pages/pages.xmlÜVMâ8½¯´ÿ!·œ: 00l«Ã¨e©§iºwf.#wRI¬qì¬ã@³¿~ËF¦ÏÃ!’íçªWÏÏeî>½ÌYƒ¬¨à¡Ûñ׋„ò,tk•Þ ]çÓè÷ßîžH•ƒh^…n®TyëûUœCA*¯ ±•H•‹ÂiJcð×cúÝ Óõ B¹Û콕g»E ã¦BDUžÙ.ÄTÄu\a`àK`D!Ë*§ee¢ÝV%‰!tK È5¸#ÃÒ™OCëx$<‡®&~Ói†ÇÑ …M†Û±èaïøs½6Á¼ ¿„îÀë` t{ÁÇ~íÕ¯¡ûÁëÝáðàÓïáwÇ Ê”ó@9Dj«S ›eì8ZÁ›:ŒFw`ÌylØýC•c$†¬±€ù£ëŸBþšåÊ`†^¿åÉf‘¦¨/`×q_ îæP‹häjˆµ¤œJ²AÓœƒ¾Ïlú{ýVÛvm}6íˆ9Ïé+U'åùvMôAÄ?–P24Ç e/v¢=rZ—ŒÆD]Ã>Ï_Ðͯ”Qµ=Ï©Õn§jÎá•Ñk¸çÛ§°ŽS#Œf3+!MðŽMs'Ø*[2YIše µq¾-dr’žA‚.\B:Þ:«ÆQîîF`Z·çè§ûµ ‰Öb,üÀ‹¥gxÒ:¯šµ®½¶µ²ÖöšÙ7…rof{mÌðˆ",hoÏÞÇ~‹§°Æ×»_¯Á×ìˆÚGkC£ç¤„]Ñ\±5&‚ é¾sžÀ›Ñ¤×³‹û3M!V×1Á9‚~j&øO­®11‡T}&2Ó6ðZF.uSyt%Ê÷ÇB)Q¼+)WšÄBR켦Ñí¡TØùµÑŸ±Ók‹ÕÚ`ÜÓû>úBXÝrÙž¤(ÊæP±!‡î£pføêÔŒèóó1(~wÉFwVÖ²=¤ã£X¹ô3c¨Î˜ØÄ9‘Ê6ƒñKSI¿o/DXdÝ\·Àž7f×)Nœ÷¤%2‘N¦ïQ|úÌÙÚqt<Ÿ=4Í“íÕ:™5ï'§kårq+I¸UG£¢>-T§M¨ƒùm¾¿ŠP—‹»*T÷‚P ÿ:¡õ¬ãêBq­Bï¥ßôhü‹¥ß9æÈ[š„®œ'ƽf¯±U£ÿÿÿPK!ßOøü" ä(visio/masters/masters.xmlìY]sâ8}ïªü¿ù!0ºB¦Æ5„i’ÙîyÙrŒ0Þ16c›¦“­ýï{®d;@'ÙéÙÚÙŠR±¾®®®®¾G?|]Ú'~öõÆ™¡k"t£¹z}}“.ê]]ûáòäÝÅ•“¤Ó &}}™¦ë÷Œ%îR¬œälå»q”D‹ôÌV,Z,|W°/>´²¦Ñh²•ㇺjû>Þk­E½‹(^9irÅ^¦ÂŠÜÍJ„)”‹ÀIag²ô׉Ôö>Y;®èëëX$"þ"ôËÌNmbõõ¦®];+q××-á’-0a’ 7I­²Š†9&èÚ4ŽVë"±ãiéRhÉÒY - ÓHfç±³…»´µã‰3ôàFáÌ„UhËß ©/iÍ•“ºËÁƒÊÃÓ$z·ž;©¾ ýß7‚,ÿg³{Þk »n†I£Þ™R£;´[F{Ðü—® œDÉŸw-Î;VݶM«n¢q}Ðêñú¹mÝvï¼Ûk ?uRLbhއ9„c>˜x$Õß>¬¥­—S g¶"Õ>ø¡˜¥* gûA°ËÝŠ¯i‘»¼Š Юû:5þ›?O—ºöK_7uí®¯O®uV• ß[¦GEfËùöf±HDúIÊgfû€ªÜg)W?&(‡ä:b˜ž=«0Ç4—³ a’É]™ý¥±•µFyô“péßûé,tÖjhåJ2óCäþöQ¬,ïL€ŒÜÜ|8$imÖïb}Cönò öÀ½øéÃ~ŸäÃæJïÞ´4yèe¾« †$¤ÇlÇM£X*o”ÍÌüñQ$e—UD¦±¦4ð›ØÇ†—û|ßÊ)6^ü“Î÷«f´)Û(žãpÀªË7}í³HØuT[ÑÖ]:qZ»wß­ù¡:pp.Ⱥ6¢S»ß$XîIR[Ç‘Kqâ­uðõVNÍŸÝÔzØŒ4¸™pé0¢ÕþÁy1ΞÑV›|¢]²[ç´Ù¥9vÞ}Ù3Ã(ÈÖl·Ë3¸`£ÆQñµœÃb—Öœt ì¨âW#q.’?*zh}í—ë±¢ãÇ`£4TJå ú_žÜmì„ù84»¯_Gšs~84\—á›ù)¹EéÔ¹¼ Ó7ç|ÀùˆO†üç‘áÜŠ¸Ç¹>¤å8ÿ™>ƒ° Ÿd©R$ÕíòC$é* ,ÕÈx(ÓºäWß’À´«þ¹ÅØÖbTĶ'ïš2äPÊ ñÇÂë^ªl€£/L˜yHÌ”¶—åTÈÜrbT¤OT ©ËJ+c+Iúö¤«Hü»BvšiÎuªª“wLI:³&4šI©¹JšX{…²?% uEPz«:Ð^…B ‰Ý˜wöªYÌ}——çcP:”ÇØ¿«ñåýä1•z¹º¼âéÎ[åâ—¤©{I»#2R­à£á”&éTN€\GÞã˜zøš18×¢_÷ä®@|CÝ ädJ.(9¥%5&a4–û¦+'Ö#å]RËLrïiæcÆÊ3KÕ*lûý &ˆ‹"Ðâ÷þ¼¯Ç“¹<£˜34"¬¾Ž³5NÙˆn‘cpðˆÈ>,Pàw—DˆËIÞÄÞ ÏC‡Q \=×¢…æhë8òbg¥Ñ…ô]£ÝmVì¼06›Ã4õѹ5ª›v§QQ½èhv&fû 0N1©/Âo€±ÀþYÀx+â•:€°5üD\×äî­aÛ*ú©ïµÉµ„"³m¬°£‚”;ˆY—o¸ò Wõ€5qùkÿ¸’îìCáÏ@{ýTÑ[†!óË¿ˆ(ª¨2ƒ (/dŠ!ø"S$\‰Ý‹¬JÙe%ô Oì‚áž½R‰"Ç9zTº–°ê¿â»=g¾´àϰ2sò~Dþ³$è^ñcÚ7°î³ÌÐg@%å<œË¹j!‘è¾Î'%•™-êŽáʦü¹zW¶ \i=„ˆP ¿[CôÃþ¾|F´‚3o—~²Ó©9ЗàG€8‚-Ž6©H´{‘n…wôd¢ùiÞ(yÈ)Vf%Á÷•XIÃhò^Ãè*|ù<+iŸ7{7ÛõQ‹[õFÃjÖùÈ$R³c€ÆìÙmÞ{Èl› +“}^²Uf\Ho‰¬ÔIH³ÇD–Ø—@…‚,IH³÷Pâßí² eÞ0£rEyX¬L¦™Çô&õÞøÇŒ{-‹7,övinÿ_X¼ãƒ+³xo´Ý4¥PÜšb¼4%ÓQªT,äŽh’UÖõãÕã!~’o ËÍùWÓöJ‘“yÅØéNdÔç˜*†2!ã[€KTìBÝð×ßP’Û cÀÑá- Ë cÅÕäœMÓE{…yáJ#SÔ§uõxÕÂÿ#ê3¤6õ±rrµÒ3îé܈Ñ`eßаo4(›Tß™ ÐPX@=¡ç«6l@Lꆪw¯~å–ÊïlP^R6$¸·]p(z>yG~†åÛR.“£—(—RϪwUšÏ,õšÛS–eZªÛ‡W²ç=|L $Z—·À¦ñkäIÿÂ@OƒsÖcb±`‹Ö˜òíx6”"/Z·Z=Öëöê‘g­Ç"ïoòO¨÷l¥‘!Žz´(T2ÖB—€WÝ}Æö¼’×í!ÚïÏ9m·¹ÇOnz“9Ž«fGd*€ ×,¹üùvwÎ|n.)eG\˜ üìs¢í¨óW€) §2˜¢Ç'O¼V[>ñ¶_ÀØó†aŽZ&‚»fÝ™¼Þ«óÎhdYÛ>o_¦šßJ]Ý{LVÕ!‘nz{â%¬ýöÄûª'ÞÝv—oÔÝËíæž~aóÖVÑ|ˆìá÷0KG¥Ož€ßž~ßž~qeþ>ýú\LüÒŸ;¹4홸{eȸ Ó§ÅD…ö:åôpÉZUrÊ£çÈ’©&o/qP¦Ñ ¡bÁÉ»?ª¡Ò¾Dä|s*Š¡Q{Àªc~x¡†J{e]îÉæÛëÖ¼ô玿… s IXî;„#’"qîgêC[Ä¥iÇóP÷ŒÄ³õªG5#¥™-¦8ýÈÓ¯ä@ ™%’ËÿÿPK!-y¢rY!visio/masters/master2.xmlìksÚFð{gúwZáÔ¿â8$•‘dkb„‹ä×§Ž,P#tªtئþ÷®î$q‡ÀàÆm=Iýs·¯Û×íîñîÃÃ8”îP’8jɪÒ%ù¸DÖ×ñ`ø¨~ñz³¡6ëc/ˆd†û6©`ãE@w€“±GR'Ü„ŽýÉØ‘Æ~=A¡G@ÜtÄ)¥ö6=µä8A)Jîüþ3òb”柒¥·ä=Yr§1@Ñ-Y: "äi+²da8ûæ¢2ûv¿MPFããƒsgÇT·µƒÝãíÝÝmû°¹¼m6Lõx_5Õ?}…¡d·äó º–¥Ë–Ü”¥‹–lÙr]ؼYºyôɈd¶ä 8 ¢£7 អ`8"©¡ìÀ‰Ï±‡Òàwä>’Ã=Ã~)lCP)Ÿ×ÙbžÉßPÔ7"7FG‹†!bâQÑtã„'i†AÌ´Õ˜_ÎùðËì,Ü/(rÂwà-úmØÿSÁ´×=7l׸v¯,»¶É•<éô þi§œ%Fe VçzÌš¹~çQ1bÁ}Þ&°Î°–[6Vô…±‹ãÀ§&¸ Ò_Î{×7Š?¿únï°ÑØáOÜÆñ4)ý·ü&ÕüM)KR§H.R'1NhP$IƒP£ˆ©”Ç_á Ãñ>µ½Ð¿:¥b:;ó¦(é ñ-Jr7Ἠ{ûk–1ªX4ƒ8q°X(þ<—£¹#K0mbFYm4y¡f`YæY xöñý€&¤è5À2é:I‚v¾ÇÄ[Î OÒu@3 «p CV§Y3« !SH¤=|Ÿ­´qJ¸´zé…“"ì³äfcÉ„[cz¼ŽÏ<Ž™‰øå3ï…ôД*gðŒ†Ç~â1œhJqøõÒ;øU+Ên¼Û2Óq .Q !ÅéñÀ ŸPŸò€Kxé¡Î¼hhé EÛϼE}så:è¯T"èÃGijO¨»Ïî¡gÒfN^ÊésÇæôÊ‹»R­BļXµvï#ÈÏ®NFö´(xÚ‹Õ¢9‰hü/T$­·GãÂ2^¯Û«µ»¶«Y¶ÑsN ÃífMÝÚpîƒqèEhcó-•.-ØÕtË>Éîý­ áÚ_™!J©¾;8ÄK䣬ˆ.ªØgJ”´Di?ƒ:…jôźµõÿeá¯L•à>d’.tK1?غq]klApÇ CRØ ô´ØÏù-vÕ#‰:4êY‘̆P}¦Gm¨9BD`º4”$ðÏ•è§%(n¬(ž'Ý»<ôËsóz^¶A§=«ß`J±o`­¬‚³®[rƒ³\Þå­Ñfæ] ßÉݯ=HŠÎqyé@%¹¥õUYÓ=V„i‚OŒ2.³s-çÈß/U¨Yq–éGýýÌwû‹úÃ/@GͪŽxÏ8AxŒH2UM¸r«gSŠÝÃòo‡Ç-¼Já ô s²Š…é§@¡7ÿ_ óœF+ÖìJÊÛTøø…ãŠ&4I|þƒ7ŽX_ ”w+F…Ë%½ [Óõ®]Û° ÷ªÛû(9§Ú¹!÷`~Õs-ëØöùë´ŽzzЖ®î1{Èëw£pÊÉ´¸Ãž¿ª9®(!Ñ0ˆN<‰W5Ã)žö(WKêzCÛ³QÀ#yøxBŽLSî@ =iõ8³” C ‘|ëÀT•‹¬Òì!,åP’P/X®¨¨˜ß1\³v‚H jt2¸¹U™únþÈC±Ü%‚åk<'ÑO8æƒÛ™ónG4=d¸Q5[¯1¾-^b¶´EÏ"l°Óñ"VÜ„ãXõ nSpn}ÞòÜ–`jXl˦ËWeo‹lË ¤{‘\D €ýG [˜lƒ*ŠÑ*'­…7Çà¹Ìf™‚Õæ„Ùr{Æ–©9†P?ÿ÷¦Z˜“3}Î2Lâ`æ–=nq&œµ³ªP&ðÕÚ¼?O.‹:cáU-ûµɾ{Cäø0—ã=c FÌ? ]yÚ¡ Ÿãœ½×ãÙÑ®k b¼mXg0k©eÖSÃ:9ukîe!´Þg³†Ò8ØÛœi¡FÚ·(QäJSaãl”ž_/\˜Ø8›u¯¼vlìŒðý:`‘·ú³1ðë‰7\J2+Ü–ÜÁwÈÅì<|ñP4Ióokx¼bîQo²¤Zß”Y69å‹ã,µ¿L¿µòFmîñ•1µÚv¡wU¹Þ;V03BxÔ#D€–ø×jÚ¨påø cà¢{ޜ߳Fµ/'=ŽÇÌBŸÛ´ CƒÚugÀÆõìŽl¾ž‰z­Öó8ÒÍœv¹ˆ\æáwuñ÷ïÿÿÿPK!¼+ãþÑ visio/pages/_rels/page1.xml.rels´‘ÍjÃ0 €ïƒ½ƒÑ}V’£No…^K÷ÆQÓøË”öí«CM»õ$$¡ï“Ðzs ³:SaŸ¢V7 (º4ø8ø9l?¾@qµq°sŠdàJ ›þým½§ÙVâÉgVB‰l`ª5#²›(XÖ)S”Î1•`«¤eÄlÝÉŽ„]Ó|byd@¿`ªÝ` ì†¨Ã5‹ù‰¼+‰Ó±j—ž½ жYBQÖ¨T„aËHÕ€Ö÷ßãJˆ€Ë»Ë»ÿäí‹åí¯¿ìoÿÿPK!N ‡v$avisio/pages/page1.xmlì][s7–~ߪýšÊ“­iª/èÛ”å©f_ÕÊŽW”å)EKm‹ŠÔPtïÔþ÷=h4Ðh‚[2”*ÏjœÐ·ï\ðìŸÞ.Žþ¨×÷óÕòdäÝÑQ½¼Z]Ï—ïOF6ïœdtôÏçÿùÏ^ÏÞ×ùj¹©—›û#¨´¼?Ýl6wÿ8>¾¿º©og÷ãÛùÕzu¿z·_­nWïÞͯêã?æ úØw=ÿøv6_ŽHݬ{µWwõä¾[­og›ûñjý¾Q¬®>ÜÂkAˆ¯ëÅl½¿™ßÝ7Òþq7»ªOFwëú¾^ÿQž?›ÞÌîêûöN èÙèèÕì¶~s2*ê+Ü$h .à¿øt¿7uGG/g÷›ZéŽÞ,çÿúPc)ÿ޲jRy¡çø¥ç;Èc'Íý‰‹ J«,LŠ,ú?h@^/G¯NF¯çËËÑÑÏ'£pŽŽ…ò_›òxìùÂ_~™_onš?y|…ëùû›MSîŽc¡ÆÙꊽƅ×U'£Óå _›ó›Ùzvû0l©ç«G§—'#—Û^¹Må]ý~øÕp 5ž?;nÅ2àä’€µ€Z0]bÒVIDÒ–x\KèzR¬F#Y~O–f+§ÒÄ=\lX°MØÀм¨W·õfýiÄw÷âd„w‹)î÷pC_íжjGÄžn b6’ÜþxxxsѶa¦( þÝ“Úö…òõ$‘².—?,Þ,Ÿ?»ºk?æñóòÏúêæ>¯ÑÜoדGŽÊ#&>b·EfÂ%¨)ž¤~†Pè$qœ:(sgy§*‹¢H‹tâú¾5aý©ÂMˆ/Õè:A[Ìd1ÓÈ[ÌÔ‡aCÇb&‹™Z,f1ÓG œ´˜ICZäÈC¼Çˆ™~¼¸x½>ýít9DLpW‚!$PHn’ÅUZNêU¡ƒ’°rÒ Lœ¸Ê€)ò¤ c%BãD1@qP„0Äæp’ "’ªˆ|„ŽWàÞéáæ(`ôÙ7Ì#éÆD ’”‡™9’ÎL÷÷ˆ#å'`OÑù¡k—eŠ”<ŽE=õ¢Bü “5ü.Ùü1™¥ RÔ >]ÈÒ¶ JãùZV>JÙOèÛ²#K²]°’zÛ+å-¬ëºÄ ð£@¿ŽÌ” •ËÅb~·™_ÍÙúŠrQýÑþ_÷ӱ–>ݳ³–ˆÅ’âŒÿô‰Ió„‹û(}¬^¡åÛ•-êfŽg¹-æsˤZ&õiøÜ×Þzµèp:&c^¯îçØ)¯çœÔ,:Îð$,3®ü”r³¦t«ôWú€Ó[¢¸_Ë&òÌXŸT·ÚÅ U‹+û„ ZJ£~™ î´¢ð°â Kë”>ökEýÔ›"%L=Ÿƒ).`”8öS'q슀U²ª@Î$‹ÜK½0*ÕNVÆ5=âñEH-ÄÁë–ÞÆX·t MnU¤U‘OCE~)¶‰2$CS§³Ô¤’ÒáÀHV_u[:qhÓņõ5¨$lEoÝÒ±s>wTLðU¨®ê& Uþøz’Hµ;X‡…zö=êb•¯küéø‚!ÆÇO4þVÐY•UTF‘_:~åG²W¹Dé¹Né¥AìVI2ñr%}£CªŒ½‰¤ÙN¡ÃJ€eÉÈ3*f+yÓÀ(¼„X•­ìÃêH'_½ÑÆýqô i¬H]Hô§¦o¼‡Ò7fr}ƒA+%±­¾H¨\mc¥ò_±µŒ¾‰ØÄ=ˆÜ/Oà@Ç¿(ƒÓÌ­ŽÃiNXt™HìwXäYþqÖçyeø‘ell”d\(œ[ñQäéDIîÄØ´ Š[npEŒ®Ñ/?FØkoǃ—>àlt(×4®µ¼”ÐJiª¥Í Âåf+Èš”¹uÌL[ÆÄA‘Y3A¹[y~âDe;È+bg2I“ d‚B?IÜ*R‚’^¾†F²ºƒ ´·tà„´EAðjH:©(u 9Ý÷°Y ›Xàx~oÈÖóÈza†LLHðpÏ£ÜÒ5rB˜V‰JØNŸb©¯D¥MPVšœ?–Ö.céš§@טg*ñHÒqži;^U"M20cùaä„Uè¹^R–^T)ñäU¢’Öí€Ñ8ÒDªuZ9`nŒv1`jè›Y­T ðA´’Ô\™«ÑØP8²†8D ÔÙF&@ôÞ6*©6s_‘ÊeÿFÖè`(!”€IÀIE]8LbêR"Ñ ¿ê}UL0‰¡TÐräêZ«á>„b™¢©“t¸PÄ$¾P½c>„bYêW€IüÇÄ{à M3MyT"Æ)b1ˆuJ±N)ÝMd“¤+ŠCÜ}œCt}1Ô!¬¾Ãc ЙêÆvF4§”¾ èš9ïúJÎÑ´eœO .R‚1€¨Œ+/OPêä…Áα8iä@…ï¢Ihèˆ7ã(õ—ü›ð½b@Ä—®­Ðœ´¬‹ŠuQ¡—cPúÅ&mVœ¼íEOÉ…Óº¨Xši<åäøŽ Æ~¡_rùV"Šp~P%P\DQùn”†DM2…8?àEŽWø¡ ?bOiG‚ðä(ò Áÿ‚Ø>IÍ„¸P»ƒDîtÐÉ£Àç WDÜ7var¨ ˆÕÙÊä@æ/âºþzŠ~H¼N“ÿPñ˜ÀëÐCõ §A­7"Õ!ÛY¹-W¢Šf»–É8>âÅ=[„â+¨s‹T.s1Œáé\’"÷Ž£6ø¶@Ç‘o‹feI+‘§{àäæû]Ûx…[#wDÆ&4÷iïnã/_X S¾a«õLi‘•€ŽÎðÇËÚßaΰ¤ÓõئaÖð0D0Ã6ßFh@'Ë Ø<ªÐ,}2Ë~˜ô$jq‹Å-·È¸¥]P==+¤Íd¸D¿üÖÞáq‡Ï;úî3"º…r‹ûf*dù”yéfñÄ ;y9YúŽŸúq0)¿¬ %Û]ÎN¸ÂñûaÜ[i•}À; ÊÙbÄfƒDÉ´>ÌÊb f±t$"t‘q($‹eÿ!ÚÎhMü–Xy‰Å²ÔCp'„Ê 泚¾´Ãf˜±fàÕÝ2ÌõÔ Ÿ|ñA‘‹R?t/hGî9†:´+ò¯­.åÚ¶òÐÉÁ*Ô4ñ 2 ïv}7©\ä@07¸¿„pAæ¡ÊÉÊ,€Ô¿a"µÃp8Fïi«¼C"ÛÝáÞ%¼Ç0á¢Í)ΘÀêl¥<€' SÞñ[ŸÌЧE^ ðlgkC’¦ÖÃCk¡ào ®hñ†#¢­Ž)ѯí JÍê’øF»ÀÒ@1ï4*C–/±|‰åKd¾D±Üz°@µÀ¸‡x\£RŒÒÒe G%–Si2sñpI_wMpc"`’9‚@ ¥7°èûRNâ$‰“—nd*'NŠ#©|/-ò* 3/U_~0/ µÆH_­3ðÀg|Ëýx»âŸ Ïä˜àh÷V75À?:0ÇáŸÙŸDÆC cº¤ÈD,ȃ£L-,:¡˜ÉüÆÀŽ6‹ÍSÄ:ìuiµ ðFOR[Hc!…4=HÓ¬* r4uãÀý¡C.º…Ø•þ*ü E¡Z¹æîIÒ˜uˆN†—ɽRŒ@µÉqM¨-ãâšp‘ɈqM1$Å™\qbBšÉT22 'Q„ÈåW!ÍÛ6­p£Ã8¡´Ã-B¬‚ j²AM6¨ ØBO CpS#ñÄ6¨É5q u%k…d'&Hà|õQ¾n©«•Ò!“J•¢g´bsŠœÓå|3tÑ6ÞE †DZ'-+ˆé†K /ð! ü®»¥†Þ¤‚»‚*t•N6II:Iv¨È(‰1Ì0µÕņø/ãIÅê˜9f6:6ŠãoH≻ïèȱ|€½1¹Â‰Ñ7ÃRÓV‡çð¤mD^ÄýèZ̃UX®:ŽÜ]»{§q{ûbŸ¡¨ìí‹_ãí‹ÖPe Ux¡;ˆ·èK Pú Ë7o¨Ê×õlSCÄÛ²¾ÚÌWËA£8ö*q‘h´Êb¿ˆÊ8q*H¶å ¨òœ¼v•à“œæ(Í| —¤9ÏvÉÀhÅfc…¶2Iûج´X×ÍÀÔ˜¬X@î0åCƒ¬e"IŸwÆ„H2”ʈ$ ^F«Xc´Ëeã3Zu\ž4býÎh%–Ër`´z(•„âÇd´‚ !<|¬‚º[ ¸Å JKØ´^À†ÛLz¸ÜbÐúkÄ ;ÝÞ.(î˜Ï™€(|a ’~ù1é3[¬­©nípJ-e'{Uj„1Ò~òȖЃì3A¹~‹¬_™±JÒ¯zcxu÷]XÄÚÌßtb‡4ïDz¿ Ã߈±J‹ž¦±ªMë(Qä<¾€¨Í À‚ k«²¶*Ù$Ò„ÞòFƒÖ¼B–§ÍÐ 5TLJñiÙ Ñþ|t–*Ö}-ré[ªˆBç†LJ­¬¾¥J/ËØRÜ“-U´Œ³Tá"%##Zª¢")Ò,‰·,ñíš,')'@Ð@Z"?È2·(ÕnÄp_&?½8ˆ$º7iŒ ‚ D¬Aà µz(í<Âѳ-³Oõúe}û¶^+ß^…{¨+XÀÐ÷üo/TçZ\9_-VDîwÈ‹½ôJõ`5_,&ÖX)?"3pµÇk¬R¸ÅVöâñ§tK£5VYc• bµn¢‹WXcÕÑéåÉ»/™_&/Îá2˜_„@ÜcßɪÜsʬ*áZ„ÒõõUQÍß+b22»aœ¨JsêˆÜ2Šç«³ÕÕ¹qãRLCVÁq@w™G©Bª$*‡åê•Êåd½TLˆ#fœ’ˆ#Éäň#ŒWq—û%;ûïgoÊï;*åïðîöJí¿ÿ2[üþz]¿«×õòªþÇŒP´¯ã" 톨‡ÒDîã2Dé`$[b0iuÞù–&²4‘¥‰dšRÅò;\Ël´«ˆ£<K„+(4³E)VàáI"e«wufV æcë ô\nu?¹MLŠ’az³œÿëC}ZœŒþ%a¹pE„¥ðÿ’…Nr«‰ç:{Tªñ9eûÞ¸ÃÑ.{Ø£ºñ]@…®¹¬0Ê4¬‚¡+Xˆ˜åH*—-G¬Ðd–˜ fÈâÛ0IÁ(i"­;Õœb`U`˜uY]œŸ¾xQž?½©ëÍøqeÖ†m6)-- ó[°aÁ†2ØÀØ@LÄÖâ ²ŽTp£­2ˆ8z«PVÝ_}üë¿–ñé[¥Xê1$¥VVß*¥“µC2âT¶ Ë,."pÉɽRø¥ëLBÈHœ„e5 Pá)€cù',QކÁš­Àû@¡ŽôÂîHHE…È€…R!RùÁbˆ„ 3$ômÜ:ùP$ô¨nÔ_i/!!‘º¦›’BY $¡vQq€‡)oÑ‚Ñ.úeØ1/,V¤U:‡‡Aêðï݉ ä‰E.Á>’Ãm—EÓíp([_]¬F©†Üq*DÚÆRé>—)w,:‘D)äØ7’⬣”=‹zí PÑÏ¡3Ø…ö&6•´ ´ Ò:M7³õæô=)9qJôU9*Ì«ÀQÆ áç9¨‚K)Ò"ô—N*ðBŠ“I®ÿ Eš’a¾„äìáŠã½øÏ&¸µ®VôÛP¶ƒ¿‘ÎÄ [tš…ÁÞÒ¿@Iœ+ÛáH7&€øO¢8ÈÁ½¯£~ÌàC0cëÍAð”ïǸOmìöë›^‰yžA³”ïÞA€Öð3m0Ã6QD ’2N“–pŒFþ¥\Š7L‚gIXûaß ¯§¨t–¥Ö5F2…tKó9ií«±!¥ì'"&ѶìèN³]ðqû}ž?ã>Ô‹zu[oÖŸìp¡Å-À¹6¨þV ‹¼µv]¿8ñÊŸúuäüBår±˜ßmæW³ˆú£0K{AÇZú8TçT~7)võIûuûcÚ«"´œï¶ ÊcF[¤i° [9**˜¨{ÉÎêæËEýçæù³«;æßÔ¬¡Èû¬Jè%Y!!t¸¥S Ià TºpwF9EW±ï£hR&Jâ C/Ňc,ÖÆ—uzŸùÚ ÿZœ ®5Ê—N'ÆÒx4if(0™Lcó$bŽsi¢£áB)õ2†“ʬ13D2#ÝÔíõDc)Í-˱ñ “,¸ýèbKÅÊ,à^,–eÊ Xiîü®M‡Ú$ÏÐàÖok¨¾§³\â]äk»ÔÔÌò¨ŸÉ–q³Œ›eÜdƬ*Ž' ûÕÜå¦]ˆãÖ_…Htúü øÐeFáñ ö©í¬D³Bgµ²%õ¢C麡p~Ò%÷Žñw§<@~ PÎO,÷½ %e„Bõ]ìàÙ$²„àø›gº…ƒrî"Ç  ‘Pƒ¬Û¾%‡b4iH¾GægU@R¦l:Äß0ÚaBcʪ¡^VĉÙëníõ øú„/Em=Y«Y À[PÚDŒd©Ôžò¨J¥‰êN↩HAØgPì{õÜ€òÚ-ºAäöÇc¿%‰UQ5CÍ凨û`’P5ÃדG@R\ò‡í10Àä^Ï·å? uy¡¡wÊÃ*ôË®,u£»?•‡ÊÔÉ‘çÆŸz¨P²04µž´P$P¤XJ8Ú=ùávÚFRÒÈÒ¡”†§á˜ÎãJ¤Bñò,W&•¸=ÅŒY:ˆdFÁô²:pDŠVeÈ(hxC:Dë@$Ñ!dÉržØÑÌ&À‹lÖkh2¨ô‚Å–aâ%ò‰S´– Ž²³7¯ü/)*PÔ~Ä78NšGÚ WÌ–ïu;/¹vT`pmM³|ópq;9øâóú~þ¿õËÕµBR£Ë‹·‹|1¿ú[?½._]”—¿œ¾ú^0±áIðz¶ÙÔk~½\üX¾,[³œð8ž%;<>½¹þ¸Óã³»×™Þ¬>6­¾+në‹õìz^/7årövQƒÇÐÄ¡€ks•MË^»÷¬ú?`(›µðól=ŸaÌß¼U˜¿0#¬ãuj&†Þ›„`þ<Õq(|›¾½Îé;éWz|µÂ›J»¹MñÕ ¯wU9ÛfýÕjºœÝ©žoVp±ž½ïþØ:ٜ׋-~6üÆËíÅ‚º)¸©Ô[§¯ñ!º™üpΈÀÃb© îe»Töb¢0…Êl呚®`búMÝU¨Š‰á¾soT;SuÉÎÎŽ¦?f¯ËéÑÙÏåìùG\yþæìâèe™½:}õâèâ'\|z~”ŸÿôË0$O“&~ZÎnçWGWäb‹Õ,MÔ2]*þfà^SNPžUUæ@îÄ Ê¸µtR/‹’*…LŠÚÎÅXé`É`RÇYHOt‰É`þ2Û¢Ú¾³ÃìtGhX2-H?¹ÙÂØ¸³L˜Ûfm˜KŽÈÉ.97s0¹»0;¦ÌŒDè Ê:mh½–›Õçwpi¾b¶^·HNÄûÐ…îOÂ6N˜ꨨ9Zº'»¿Ó^¶úzC4§€E0Hm¾J£{‚o¢þƒµ"Z+âÑΗ°÷¶õVÑËÑþ–îùÈœ¾y9D÷TÙéÙד‚*ð ܱ;\OGÚÖ »p4€÷ t –(éçÔ1H|!>NãAI” Ä‡p/àlð¿/M n„h;¸¡ƒP$n„æù)!` ˆW¼–Ó%ËÜൾ#sƒçמü žŒ{V¤f8rw÷{¨íŽÆün¤8Ôò ²wˆSKQbûRš•>tÀ6;¥bÁCRx,½¨ï7Gùì¾>šzƒÛ2ìéÛ–ã1!·mË¡¬míVLn {º$ºÝбE Ã1ß¿ØßD›3õÐö÷ô·bp+°w°­8‡)ÕÙ§ëçÆÍ¿Ó&¾ÚÏ "ó_ý ˆØZ.ŸQÒâ_ê~K6‘Ž”çpu?x™ŸÝt!¢ª©^Ï=¤ nuwã0 Qìºø_妋Æ^G.Å °ëþ^ÃÖ3ÚnºvÓµ›.lºƒ¤®ç‚/ÜÁ]«·v_å‡åqGœØ}Õî«v_…}u·õÜC:. qìmu\0k„'æg7]»éÚM6Ý-Äí!]Bmæ¼^šKXª`çkëŠû%ãKù™uÅ%®¸U8l;¤/B6ô!ÇDû“ò„ÅHô.T´;­ÝiíNKRxpLÛ×ÉÏ/l»Ó¶;mÔßiInè{p! õÝÿ;ªÖ«Û&Dùd„cìñ¯Ømðd¨q† ŠAV"Ìæ®ÚGCœZzEleB&–ûñ%¶³­Ú àë€çy%ÿ"œ‰±{Q+¼*5ySÓú&¦xJ7ëRÓrE0ÙÂzD2àl{Ï–á“Äþcí1ì‘ðž-=ÂN-ª™½ ž2ìF zÏž=2›ßðT×£á7ùø}B°Tº7 /ÙýgÏ£f+V;tFKV|Ñ–.é–¬ÑG° »ô  .¾gÏ™}$ómé†Îì# /î’¯Ûï̺$ìwŸq% ïÙÒ#Í’5ëÐ_´­"á=à tóÛ¬GðÔ_²Ž„÷lélWJ•dÖ#ì²m¶Ùé&·Ù$¼gϽ)0WHnèŒvñE[º¤›vf]2ß¾µóÛ¬K‹†»Ô´\VÍzON;Ý{Œ:äíСf½ìÛ!ñEƒ›÷ƒÖ$@ånø é:d´1ˆ/ìVí}¢`‡Aû&³I'¼i¸KÍP1̺#ÜÍîáäëÞdÖ%áMƒ]zд „õºgŒæ]hÞ£¾'Õ|$"“—¬ãŽj8~={_ïðù¼þÿÿÿPK!H‡³¦švisio/masters/master1.xmläYësâ6ÿÞ™þºtZ“”ðÊãr—ã®›ÄsÁPì¼>u#À=c¹¶È£þï]I6HØ®M§é]¾K«]i¿]­Þ}x˜èljO¦V¯Ô4„C ýpÜÔft´{¤¡ï¿ýæ]×M(ŽÛ$¤8¤ ‚eaÒÔ&”Fo«Õěਜ਼T¦¾“„ŒhÅ#Ó*|Wï|`^mÔêêÔõCM¬}çV“‡ÀwDâ©K“ ‰Ç) x³)ˆ&µÃjŒ—Âv“‰%œÛÛ$r=ÜÔ¢'8¾ÃÚûwöÄp’þ"Sojûr# âS:÷ClÓÇF^k¨ãÁâËÁtñuú¿Í0ãñÇA£U¯­ƒÝÎáÞ›Ý}£ýf÷¤ÓÑwôƒÆQ&NZí?A|²šZ߯5tÙÔºhj¦¥U•É›•“WþNøl=[Š:MíXÑñÈTH ϰ?žP¾¨Vy}[7À‰ÿ;vhJ(-='Þ|¯µŠ²”‹Ùaƒ9z±ýZeO&Ø//i…ã‹ÍÉœ: Õ–‡Söò°8B— 8ÁÁ>ë ‚þ³ÎK†©UŽöä?YߙҖ($ .ÌÀüÔ{ØPÔ>W"èV]¦Új¿~(ý),²Ý.[Æì죺*|¾¹‚¥+ìhÜA„ê·A;ð½O©™™Çöú†å×Εi•¶å“œá rHä{œøÒO~é®o*Þdú껃7µZ]&n“è1ž{÷ü •¼mÄ u3èAmG$æQA¨È&(E‡aEf ŠøÔvïêŒoCzî>⸋§·8ÎûmïöW†'ùU_ì(ðE$*žr8²0øi“€ÎõZCÞÔ‚ŒáÒd sHî7 ì€o@Æv×uiì?ˆó=µ½MèŒÑ{4Ù„”í0OgÃrÀ|†©ƒBñ@; ÷ȼ†ø‘@·M2Gߨt?ÎX0¶ê@Jš®l" Êài5ÑÜA ­®äÔšQrŠ!/2x‚®“i$|ª€ª šX¨£žS‡’Er™c…~•vò¹â ÐO#§Ÿ¥¤ÇN¾RKEÙnÉ7þï´÷Oô…袚‚T‘ ô(ŒpLA? {8%TÒÖ¥̲âduÐËÁ,e÷s÷ Ú¸J3 ‚\ý?Éã6‰éGüÈ×Èãsèy-š!«Æo‹ê°Kû#ÁG)Ät—º>ááZ„:wñ©s2î^زdȱ8ºR"] +”câá$±f<Ù.jägÒfÊ¥ü‹õ*ow­Z•|ýbÕÚ»¡vyvu ¶Ï EÅÓ^¬;³W…ŠäU¿í xN6;Æ`ДÚ=Ëi™–1°Ï ÃR½¼eßûÓÀ ñÖö+~»4a¶¥›Ö)«Ë[[Jy¼!æ»újì`S7¦€G삟ݰŸ 8kÄy?ƒ:•Û‹uk#þ;ÊÆ_™*Á}è,)tK,ݸ.ÕÊÜQE,ªˆÌþy±ŸÊ+vÕc‹PÄͰ1Ü}“ã6\ La:H8ŽáŸ+×§ÐëCpµ2Ãh¦”ksྜ1_ž›Öo-ŽäÌTiù?¿È×¥.g¼„ù¾ÿƒ;ŽE½çãD>¬à"Dƒ «¥ë=«´eÎUoðÙg­¾úè Ó°UtoO°·II¥û‰ åÚúÚk€Ýa/ ²nuå¹l§Õ”'x쇧1™EÒA‹oÃà‘Ìh{âëwê¸cËŠ¹à"›ûÉŒRv ±Ë¥?A©øiþ8JicšvOmh…J;7;P JPJ…lŸ{ÐJÁ–3¿m8Ò)¦<*ñkãv9שÝþQ¦×j•,“%©~"maÉ1¤™%OfTÓCGz-K/ ¹MyÇb¨ÌÏ¢LˆÓÉ[̹‰$1ïÒ¤âÒø²å¥)ÅÔ0®ØVô†¯|:aýû"Û t$ÈÁܰ@(ñÒ°™É¶¸¢¯y£ô©ð–<—ÙÌŽbµ¥Í”Á…Qî´ÎmCÉ+ÿ½© 1™ésÈpC…»({’L¸(óêJqµT%+þ <“UŒJO¬nZ;:€}/ì»cl{p_•=cAÂ? 7½üþÿ¾¼%ko$±Ûº.xÛ0ÏáRb73Ã<=sJγø)g¯ÛU¶Ûr­Ò8ØV¼©P%…>ÅdŠi Éi¹WkÖáNó‹'a-èµyÇ"ö„ÜoBºë³˜Exã]ÝñJ–¬jpšZ—Üa‡ˆóÈÕüï'^ûÂrÄÜQnº7‚ýÓïf _yL™¼µÍËT¢úb—É,j^îðGŠ•óÍ@%r„8å#öd¿}¥¼}É£S…nð$™Ê”_áDD ݯ”v—&óÈ|·^¹Þäˆ òI©‹¨`¡Å%Ê~᡺ª>°¿ÿ ÿÿPK!ÒòØ "&visio/masters/master4.xmläZmsÛ6þ~3÷ß\)ûdJTäÄ£´ EÙšZ”O¤mùS‡¦ ‰ E°$dÇwÓÿÞ@ŠI½$ugÜæ“M`± ì>û‚…Þÿðy((N|vT]kª =<õÃyG]‘Ùñ©ªüðáŸÿx?t‚b‡…$Q`Y˜tÔ!Ñ»F#ñhé&ÚÒ÷bœàÑ<¼làÙÌ÷PãÁæVSo5–®ª|í»¸´G(¾3/]’h8ž§,zØ[-A,0i¾iÄ(p l7YøQ¸½K"×C5ŠQ‚â¤~xo/Ü%é_eÐë¨mUqž" bSªré‡È&OŒ¼U•¾ù—ƒ>“üë:ô]!Êãÿz¯ÛmŸ'ǧýfë¸Ý>ysüýë¶q¬wõfS7ÞèíîÇß@¼‚@±:ê•NT妣¶T庣,µ!MÞmœ¼õ§dÁfõl©Òï¨×p@­‡fî* œD`xüù‚°EMííIiÝ%þÿ󙤄ÂÒKì­÷ÚÔ¤¥LÌ,Ñóí7µ×²0ξ¸¤ÎÄ7'rê~ÄuÔ,§ìÅa~„!žVp‚ƒ}Ñ8ý–ä†)ê˜Í·Žl/v‰·Ðîtqç¹Ú)ŠkS•WÈf)¨9ÛLQÑ0Î×m8Úz' 7É|÷ëÝFà{ŸRR8Ž®LË1'ÎíÀªЧ½@AäàÈ÷ñŸü|5žÜiÞbùê_'ß7›-‘ØÀÑS¼†îúK©y‡ Ê0‹+ŠãƒzÁÿ5Eé‚—±…‰’ºþTƒ>nàÝ^°mHÚ½tŸPDç=Èèî†.‰ýÏü|Û¶·9›!$ûÒ–élX¥LÈ¿ ŠŽñ£2˜€³µ"Tl€9D¬£r ëùqÆ‚ØÂJòÍ*pEÜQ{6­9s#§îŠàsIúüº«/#Ž© ªh"W‡^R‡”"Jiá[ÓO«¤ŸBF£Èؤ¥ þêXyýGtQ¨!þVÎÔHƒ”ˆyôI37èlKèÑô–TÑš8ÆA¢ÁšŸ¥HŸ9^aÁ°;© !a26Úõ¬^˜è‡õ¦”E»;ãÆÇÆNŠÞF w*U•ž:UDn~ú¼ºM=§¨­&XG¬í†Ä·=ÊB¡´\G^^0ÓØš”"Ù¤÷”†Õ¢ˆ-Y¯kc™^»“¤À$ST°Üe£’¹ 7<VEƒ܇ø±«²E½°$B1yÊõkà„Î|ãf¢öM+‚Š/Ý{°c1®Â M†.ÏC?Šz°qL~BOl8¾N‚oÅÑAH/}÷Uåþ Šýç#Õû=—¸P˜|BÓhÌ.U—n8pТðøÚ%Cµ‡Â©+”tyî¤÷±{(I¬+ûr°>“6SöJÊ¿Z¯âvwªU‚Ý‹Uëè1„*úÙÕÉÙ>ƒ%¤½X-öW!«ƒ+É–íŒYu8è›ãñh\3F–ÓXæØ¾0MglökzýÀ~ô—¢ƒÃW,ÈÞ `¶ÛXçô¦V?8RŒ›D`æb½«oÆ6qcñˆö‘²˜óL‚±VïgP§Ô‘y±°6Ã韣L`ü©àCVI%,åø`õÌI­Y§U„Æi<³™ï§òª¡zfa¢0@£éÙ T@غ0É™WÙ…F%ŠcøçÖõ ´”¸äÂhEÄP³3¶Eê—óÊò¸Ë"95½IT”ÇC®X¥óï«ïÜetÆë=%âa9¡ _[Ý^odÕ,Ó¹Rì‹î•©\¡7v¦-Gwc¼}JªžŸ¸P®í®½ÆÈŽÂ +à67>ŠvÚLùÍýð<Æ«H8hu_¦<á1~°{§Ž;·Ü%¯Æ+Z*Y`ÿ¸"‡}x?`Ò·PJ8-Gª3mDÒ&½ wÁa×f …`%¥RlŸ¡hg+™ß6~í‘1šñÛãa½ô pø‘Šßœd²tL”$ãDØBÂL ÂŒlzèMÁ ®kõj\nGÜ1ª³›°4ÁF¤`U‚‰ ±Œ aR‚0^´¼0%™Æ%Ûò'ˆ[Ÿ,è3Q•m9…ò$Šƒ˜aPà¿Õ°™É˜¢8¯uË~›{ žËlƒ¾dµÂfêÎøÚ¬÷»—¶ùÂLU“©>ó€œ÷ªª<ŽZ8¾³@Wî½êÅî#d0Ö­hdƒt†|³Óº^Ï&¶SKÊ ðQ.Õp}¦OµêòÊT—êA‘oÂÒâ†ãçÝÚ5=ÈO£p}^Ì{â®Ütñ!Œ~½¼@÷’HÛq1É0—pgªÑKÓ…98¿p(¨Ë׳‡7h×i­“Ãæ\«½Žç/‰!•ß8,L_†Òl(xµ…éÓÍÎ,ia{÷! ÝÝ9×Âì] =ßÈ’Ö8NG¥Í-óó”) O•cŠÅ÷#é^~—±Ï©8n8YƒAÕC&©Üî/?‡Iº¯•Tn¦ï)©²‘Î÷´ñXm¼ëWˆ\5›ø5ÂN¶ Ë ªk“]ŠÌIùó7?ß FpIÞ_ÜŠê¬ñ/ÿP €ÎuIl;ôY{]t´Ì­jÓU‚…F÷½í&ºßßÕn§òï[˜ïÿ)Ö+Hʬ÷úZ¦­ï½(M5Ô¾|¨Á~Пì/ü`ª!ÿÐëÃïÿÿPK!Àkšªw visio/masters/master3.xmlŒV]oÚH}_iÿƒÛ}0´Ä6l“VQHå‚ H@Rìmàiå˜ ž=cÍ84ô×ï|Ø0ƒiU?$òÌ=çÞ{ùüšgÖ(C÷í®ãÙà„¬Þöí—rsñɶ>ßþùÇÍ,f%ÐÁ%à’Y†YßN˲¸v]–¤ÇÌÉQB #›ÒIHî’Í%àî'w{^·çæ1¶Â^Óš€9ï†Ð<.™Cè¶¢’ä%çn9‰wåRÈâ’‡ËRT0ÉvÍŠ8¾]P`@w`ßÞ„i\«þ[“aß¾´­{жÇ™xå‰Fû‚ƒ¤¥mM†°Ügü„§Þf â’Dò†¾Á;ÊP¡ÄÔ­Fþ4 vÊû¯íÀИ‘uíZ+‚’­’ôô\‘÷ô¢ ­¥õéiUJÝ6z-zÊ|à ò£E0j‰Ù¡$cŽh§Âhb#9®ÄUÕû5Ú1‹ÉñÇnáÅ1Ÿ+ÎÌ_¶¢`=N†Ñ¸¥ ¢iw.ß Ò˜:!í4$­¥<§÷Á|$§à“»qTvêPNÉÌ~ë}4žOŠ­ÊBtÒ‰´ ]Õßéö̧Fñ®·¢VwÎú¬%ÙÕQângÉã¸Ù/cÈŠˆ(‘Wßû7 œ$ÍßüÅ÷”çé4Rìùò©&óðfqî5«·¦5 ´ Tn7Dz|¾f$ˆYÕb[;:éœøÚâ/äµÛpGë§8yn¶î]öbù5oîŸþ;1'S´ÎóÏ·®Øzz,r‹†E†Ê2~ªæÝ0˜Æ{ 3ÈŸ€J´”'„D X¦ÕtðÕ½ ßÅ>%ü´^ºj q£ÕtÉC­üˆ¥svöôøWµ}µ5Ïœ•YréB-ÿɨu¿h…Ñ"ôgA+û˜‹z"Ú·oÛ1Z××ñŒÙXÕlFjƒ‹b«ex $/Ôž_@Q-Kh&Bt¹†üo%/ÿ u¾’CI÷¶5YНàQÙ9_=éʨœ(=>œ„)ùÞ Ÿã¸8wþõ%ÏCo—¢ØQßž‘DDÅÔÕbúiµ¥J*ÍŠBYSô~‡‚Wú ÕŽ¿†*zÓÊíÊi¨~…¸æ¯§ÛÿÿÿPK!Bz» ÔNdocProps/thumbnail.emfì\Ûs×_¦™Éô¥íCúÔÉcÿ€N§OíK›€uÃ…$ ·À&“–&i&¸X˘ºÅHê0ÅvmlYßñÝ n0˜ø X#c 2¦6rAMI<ÞþVG>:Ö®äÝ•´vÎJßžýÎ9ßùíÙ³¿ó}+­á8®ûâ¶ÂË‹ø¶—ã~ñ"ǽôk²×pÃFŽûò×`ÿ>öÝØ…ÍŸ¿Àqó8ñcá$³í8û"÷³­/p¯që¸ ØM8÷+în'÷÷÷.÷vXWþÅ-Ú–m8ñ ö—¸¾E|Û~9ˆÈ<χ²ßÄçO°`wˆ¼XÏîG!!?zCy-·ý-%lò_½¨¥´­À¤5òHwÝü·O¡ `Dõ4ªóßpZŒ.óZ69ÌÆ¦Â÷4hm¢¯©¨bŸž5C-†JKæ\pVS\¦|ƒ•fC{¾IœÊ²Ö=š½ËÚj¹dï+­ŒbKÜfÝPÇiMqy:÷¨ôãuµ¶Œ.».ø•“çì vrNgÉN5´þæÏ?p[tývÌ ÆÔÛuåYÓ^MqMh²­(«îÐ[HWж9÷§oQ‹µp‘º]‡‰Ç–4Ý=qù+ 5.´ÏÓÝeÞ“[éáÊ Þ¢-·šÿÂÚÁåvû'8­&ج¦T¨-Ö””G€Kû'¬\&÷?žaÏEÉè|T9¼?Úu§ë¸ä)63x³W5|ôQÈZ«.3ý$ÚvðFOúÜG#'·Mu—PÛ <ÇE@cuâ‚g\oã‰Dó«—¡Žò*«ÉcÓ×üu§jf¸ªp9ó·÷ªsLm!ݘ«¯´˜n~)Ü ·´Ã…LÆ*>o-rÙ76Ø—yðz§ÕÔï°(­Ð›>óîÜÝk°Fi¨>péÙÿ:¥ðDxÄ/´ºÜý+U“)ŒœÚ¸ÔȲ{ ¸üc;kФü?ž÷uÖ¿øÀÝY׋¶øÝå<ßeÜGMÉ}dÍTw]+ýmàJ3k@ºãÂÚ*)_ê8]e]/Ì»w‘y÷!χy ; ÂÌ ƒç§$ËÒÌUˆ ú6=Ö?èÌIä9½:q Þ¯5Ó‹¯BÐ-øS†»àa‰ld ¤Ç2çèÃ{V[ðfëñ=˜PhqVÀ²‹;6G©¬._7|^™mhÉ3xrÖÃ;I;£¸øÖLø®êíWîëðÈŠûœî¸„.ì.< ¨süÂaÛ€áƒÎ¨À¥§úSø=[½My†J³ m4iŠ £å¿¯Ïi>°¾Î–AA!N½Ý8V}Ýñ>û,|2süã?V8õv›Y÷xÔE¸Éã€àmlË?ì´®”þž-u£úOpE¥è0%÷,˜›öá¢ÝþWÑÂa·wáR{Î"±¶~œ­øÉ—ü|09R¿£Ú¦§@ƒïc0‚³ïµ±iþéÙʕʩ…Ú[‰v>dÄÈMD¨\0‚È!a3ðf¿ù›ì ã†Él`á[Ñ‚…‚:ù[rpõ†8(¡¡K»!ÝSóB3Ÿî&“.ÛmÖ‰Ê,žbq‰ßQDÝ*²MUö×bA¿¸œ³ÉÁENKc5–øc[>.hîιÒÿŒ]Ó®:ípÁ=‚žÇ±R.]ÇáEŽS[‚§žã" `’qÁôAi[TƒêÆ j“\æ Þð̌̂U¶ H’Ó¡ \POh~}U{|fp ­îMàlHp¯Š9¨R\ú[N «‡FÚŠlÃè…v>¸`¨cÕC½A ]aºÅ,…Ð%ù¸ Â†#ïxl$*tÛLÅfzO¥5. Û ,Ã'ßh5ë)=ç~ЭvÐs³§Â¡¢-À%þsg¡ý¡¢ÎìèÕàvZtX(Ð ÁnÙ”\9¡y—˜"\Ç a:Ïÿ²Ÿ_8WUL/¯"£Qj¤ ^¡B¤‡¼ÿn`¶Åéúºá˜¢zQV€ !©~›oñwf/ ßÂZiÍDhBˆNÈöª‚(g-êß ÎtÖÊ?ÖÛZeûÍ™\=\ ÛF¸é§Ò² pY¶j8Së v!©ŽfE5ÇPMþ6¼‚EVÔ©T&Ø:ÕS”D£'¿(L)O‰eª2\pû[ŠcÕ…ü(WSM™§d>wà!•$M2[«)ÀåÚùð<>á[5°µÇõÖã{á! ‘&’’³ÉÂp0÷&Bk¦äD¨1.pîÂÅ Go,Ò¤¤epÁ0žβœh¦³Ðs™¨«Øf ü(>-à"Iá@7ñzzMïÌÝ$^àŠ«Ö&‡úñ>ǹªƒê¶ØTi\Äz$gj´ïbéÞdµ«ù½Žß…ZcQ†KâqßXv$˜¹yÖÛž`%lqe¸à–C¶¼L¤KŸ–YVŽšLú'§*¢£.-Å4> &&ß>™šÏ.bSœ`»L$ÕVDWA1Æä¤› ööƒ¯öÚ2(¹€0>êoÊ{·6Çèóì“S‰L„ÃÁ¶$!S—‰v%žÓqê"g”‘“|ꈅòQ¼ é°/Ö•S\¾¬Šc³ŠSŠqQÜÆüa¼Üóƒ(ùûçÞœî[êqáyð®²ýXO!€k!žn8i éóu÷¾ø~ï´‚FC\–‹O?ÇE.ð§‚ìÈi>}Ç âøÕƒk…Ö¨êqQºz\6ÞH/#j>ûO;ÖÇx¨Ka©fꕸÀû]²çeE.™¸ÀƒáÎÛ\Ëü,„a”Ò+‘jŠq¡Ô~1fœ-Ó\™¿®í;¶Ým]â3'Ú²ê½'·Ó lªÐú(Ç£„¿ŽO^¼À냔¿Âï[•#ñ-¢TÊ÷„ßq‡ƒ°DÀ+œ˜n”V•\ý0. óßø;Žâ²6ðqr}j¬º(?3BxàË‚P€1‘°ñZ jPm ÂbI܃Q[uÞIÕö à’ñ2Íóèùt‘Ôs[m‚WÃ>p\Ìz{^=EÌ„h’q4^w˜ç'1e1Ñxþ¼¹íÄÇ2ïÓ›[¶ø\ÄÚ0·¦`<Ì€16úê©X3ñœÉÎÏV$+iù2¸  . <Ì¥­…ÃI²Šde&Ý«’ˆaËãBjOÑ  _ïiêo.Fº\±gÈGdÉðf"ýTZ6‚ ê|îÈ¿Wø…ÿdPŽ‘oD·ë#[ç ý}P-ÃcYGäò,]r#óòM"ša\H‰Ò¼ÀÃßÇÛ;)Ùœû7á] 2³ŸóÚóž#)iR^¥Ò¸…~4 áá ^çOÕ†_Tfë[Ík'½~æv÷6/’?ÁJ•¢z#÷‘è”Fâ¿'Ãÿ‚­x„SÀå{Ø(Ø~€]ÿÿÿPK!eþxÆvisio/windows.xmlÌT[oÚ0}Ÿ´ÿ7?5WHJRµPؤvEM/LBšÜ`ÀZbG¶í¿ßç˜Ð°¢>íaN0ÜÞ*( ¼ò-˜)¬õèô{ý°ÅoÈ ¸¾÷òª©c†©3âLU"Ì–3¼&ÈÒk3㉒]–ã"¸(xÿ!KçF@•ˆy‚BÛÙ~àž‡°v³?Ô³×¢^èõXt¶á»ûº€ËN½ØéDMf*è2u ÞüoP}ª+AðïCO1}5]’Cvj¢&4Éõ]Ì8eêPó§EM2¢/ÓAìÅqÆpuÈúƒ>œ±‹4ùëWE˜6±Lƒž)è@MÉ%[D:i<~c¬¨I^3üR¥Öã?à—¬*¨½g\¦® {ÿ…ÅŽ¹à#Oy­MÌgp¶œ-¸÷Tx(´ð)Ky‹íMå÷ÎÛ†ƒ§˜Ñ>‚†‹™àkKkBñâ¶}vÖ]óä,¯¿¸ç\-LQó­l ÞZxn,®.³ÉÍݯGû)ËæÚ¢yöú# ] n2¤¦‚×Uêiãt£´ÖN;®S ¡“Òù-»Ï¤ó\>2FøÿK¶ùäñÇèß©æ¦ÚÞy2ýÿÿPK!`5‰_q d@visio/theme/theme1.xmlìÙrÛÈñ=UùÞaá>T–·pJ²u•(9åÇ ’X€²µ©ýˆT>'•¿ÉKþ"=ƒƒ3ÀP¢MZö&’«–˜AOOßÝs`ßþòe‘ qQ&yv$*odQˆ³q>I²Ù‘x{I¶(”Ê&(ͳøH|ŒKñ—wþÓ[tXÍãE,Àø¬ ¨6¾HÆE^æÓêÍ8_äĆð%°pE= þC¬7ÌV‹#QÓÚöñíiÕæ*Ë~èý§}÷{ðÁr#;Zh;¡+™Žc7r(yQ,i®¹ðçYZÃÍÝý,›ìÊÊ@UØ…'‰‘9ˆß ( ‚@ lÓ‘|5Œ$ÝR€R;r%GÑÝÈÕdÛw¢†ÒT$¨‚x.];>hqwʾ!fa‘gyE"›Rk`ü<Í‹'¶ÆÕÂQ­¡ëZ†ù>Q Gµ†¬+–â F5jèÆ^ȡӟ à¨QCg×Á……£ZOº4 Gµ¬¡½„] aáêfOñ-åº[ô2ý¨I@¡Tk¨(O׌&²pTk¨(72 ™õEþœ¢\ß²ä ?êû(ŠŠí' Pª5T•¡X¸}*J7<Ó¬Ó5ÉsŠÒ5/ôV ¥p ¥ë]Êbá¨ÖУ¨ÄÅÂQ­¡Gñ…pÔ¨¡G}›¢Â¨+ (ì Ð½*Jã ï9EE\gNQ¡ÏcèYZW<”žó(Ë×sŠ2£®š¡æzΣ<_žP_¤¢Ê–dØú·íê ev§yVm*›è×¼ˆ¦k3¡z\ÆS4†RÜGirW$88Á,ˆzSwËAž ªœ"YBtâ^ŒD ä?ÿüû¿ÿõzlð†£^‹#ØV¿`$}7M3ÚiÓLø|$:†jˆÂ;•…‡ÅL§Ìf5¡ÏZÒ6ÎÃèzY”U€Êym äUcÝi†î…2Ží¾È¼ßfþÛ‘¦)Ö·) Ça1òFJ­“Øòòºê“F ý—4pMÖãé"4íœTNÝ„_ …û– !`ÉÛ;Sõý¬o¿¼2¸ŸÕ/,¿“Û}“¯aùö›}ërSkA»H%\d“¯/…£Ãíªº˜ù±Äõ6§È†$ýÂ\ƒ:XñS ¬‰ëTqRÁ»ZÂÜ·ÃL¾+0ÐIÍôšq†[%¯§Ù\úÃe¸²0LumÙ¿^XFéª&9*\‘ÔUG‘\= %ÅSuݶ5¸Bi5™‡\u‘r`/Wõê$—/ë‡/O׉|vUË ;Ð%K¶á6%Ü”<Õõ$Ë ½PUtÛµýu¢­™ ¿ü¬ìvuEø…Ï®oÂ…QÓ†Û¢¡cƒvC_r/’dÛ^ îÉFkv{uÅOÍ÷€V¾ SÕ5 xW, îûš·gAé°/«®ã+ºÕ  -"ʽ¨×$WE¾„‚*XIã«÷8Acßü ^á›G]ÙTï9.ôš¾ë9x‡ìZ`=V;X,CÜMõѼÛz&Ìø#grHIø½xRÄžm÷¤Glì9Mv1ì¨a°µ²¥×™8~¹µ'þœÒkü£®2hógühCpÆõвúN&ì(®&ùF$»Ší9šÙ~åBÎ}ñqny\ä«å^Ò۸݃ˆð¡2A^ç6hÖi¯Ä8Ü’þ1þàâÉý$jÏfÓ™"²];ÕÿãÄXOé`g•àõõþåý}°»Zï0¾„ù´'öûÑÁÙzRk0l› ~i­;ºBù,Š¥µø’c„¶d¦¡†®íšVØT‡ÝGYd’&Þíûƒ/ ·/îâ4MÊ9þ—~$DHÀ…ïéä œ[‰®öÚçzC¨má°Ù<×uûp<|éׇgj<´ºñZS÷ÇÃio7ž©ñÐêÆ“¯<ÁІ㿂~¬W@PfEɪ•ÌàE_ˆëçzB„ºcÙd;ZäëM.» ñ+„°ëü; QÛd‰p’Ú ž)!B«"ùö˜ËÄ®BxÁùwâFwÞ•‰]ÇïêÎ_á ›…¸é ÙâÆ»Þx °þm»È¶ý=~~÷+0ð¹Ð*­Jˆ~dX`“¸‹Þ8•7ÿ‡€wÿÿÿPK!Ù7ïÂvisio/validation.xmlìX[oâ8~_iÿƒÅÃ$Ú¦·é6Œ„ Igw=‰ ‘‚lÓNç×ï±LRÍìÛTH Æ>>·ïœïäîÓ÷e†ž )£®åœw,DhÄâ”&®µ–ó³ }êýùÇÝœ¥1–° Á*\k!åêÖ¶E´ K,ΗiÄ™`sy±¥Íæó4"ös ‚ínÇéÚKœR+?{Ë÷N³¡ wÎøKqÎxRˆ²h½$T‚ΕÍI¦u‹t%´´[±Âq­'‚ðgbõJª>rËeJš`! HìZ ÒÅ™Ó=ë^„çÖ,ØË8¡Œ«ËîÝÍÖ ˆæ ‡à& ùxIž\k”±—h¹´Ðˆˆ§+å!×úBx:Er%2{Xਂ9A£”D’Äh¥uÌ^ÏAóâºQ†QÜ^¹ð‰&ٚăü8ã`IÆ_]«XLŸSùZÑÇìG©@”I¤¥ Ðî“ y,6÷ÒLÞ›M'^³å:w¶RªXÔ †DÈ^ß6û÷÷ƒé“6ï'OÞ0øÜô‚æE«…\ä´Qí¯—ù¯­\ª–”?æ¶kc»Æ»Ïþ“Ê[ËðeJ±Ü5Yï@6òh\±¸âu´ÀÊp”BrƒœdÆ!4Þ¸#-Ñyy´*^QfOgÍÏý`нûéìk³anj´ÚSÒÿêÍv[mî2÷À© œý¯9ñFaó¡„ÞÌW߯/;­öÇV»qòf4¶®j´àïPë¢ç@|þJäߨs,BL„ÀO¿6>é„ýŽBX]|º'ÅçÂÄÇg:u¶Q®ú§7À3(Xª`…Eô`D5 AªH„˜'Dªò˜£¹(ÆÑx™xa3¯Sÿ±E¦UL•@UFÕÎr ²{'Y÷‹ÔÆ…Gn®Ct o§ óÛ5>ËÚÆAƒ©ï{ƒÐÔRˆ¶cgÏÒúÂyY ;ó@üòš‚ü¿… ð{B~eBþ­ ¢e !¦yåínÓ,$ôÇW,ðÚ–X…®‘XniñÍ~TEA§óúä¿6žØæý˜>¤qœê Óe _(Ê é‘! Š)Ôt¨ I¨zÄÈ=¥˜œ¼y¿ÕhôŠ}ìеªƒ79wB!:JÜ€A´8dlD^¦k©2xúIuH"5-ÐÂûX_o{&h ”\‘iŠ%5x#ÉoùÿÈÓvZ¦½¦1„¹>I?ùŒL¼¯”anÐÃįœD,¡éX‡¤ÅÕ™£âŸ:>j´9Ûw¹CaÖ=N"5‹t–¢JVH¾ÃµÍ•üû°PtY=ê=¶\–ß­VþÒa_þ‡Sä_Ÿ ¿S/ÿâùWÝ÷ÊÏí€@ØÛ—Q½ÿÿÿPK!"ÚhdocProps/app.xml ¢( œTÁnÚ@½Wê?X¾Ãšª -Ž(Ê!$Ôƒ¥j²êö®µ»±B¿¾³v0$A•ZN3ó†çy3Ïæ·/U4h¬ÔjކQ :—j? ·érð- ¬•C©ÎÂ#Úð6þü‰oŒ®Ñ8‰6 egáÁ¹zʘ¬À V„ÚTà(5{¦‹B \hñ\¡rìK}eøâPå˜êž0ì§û_Ò\ ?ŸÝ¥ÇšŽyŠU]‚Ãx>ÍÙ¨‚¥,Ñf+)Œ¶ºpÁº.M2£µËºa)k$-'ZÑ .E77Ùý]²|\ÿÜwIúƒ³žßÕu)8Úf|fÞyÎ.Až(qNCÆ”9;ø‚?À¤±1oÜ´Aá´ ¬üM'‡ÁXôÒfaF‚r$Ñ·uI—µu&ÞÀ-g„uy^¶]ÆrÚ þÚØq­À:2Î?°¯³ûñ:…ôØ·ÚSéèHëbÆ]YÅäríTÝ"Îâ¢Wõý(üMÔåð=˜8zû®ò«è⨠’ÂBµg¹Ú•ñh2Œè×ZüTãÌ¿‚Ý'"þÿÿPK!Éê~¼ldocProps/core.xml ¢( Œ“ËnÛ0E÷úÙÉÔÃ- ÅVвjqТ;†œ(l$R ÇQô÷Q–b÷tGrîÎ!7W/mÞÁãì–g«”3°Êicë-¿Û_'8 (­–³°å~U½}³Q]©œ‡wx4‘l(U·åˆ])DPÐʰ"…¥àƒó­DÚúZtR=ÉDž¦ïE (µD)F`Ò-D~Djµ »ƒo"@+ ´`1ˆl•‰W-‚oÃ_bäDÙ:òt,÷”­Õ\Ô/Á,¾ïW}Ë ú3ñýæëm´š;öJ¯6Z•h°j#^—´ ‡ûŸ p:^6P$:_}´Úƒa;çí}Lž#cÏŸ`è×òÏvД7Ò$'úÙ©ð†Fû`@~¿èOÁxߘ³óÆ"è*O³u’åI¾Þ§i¹NË"ýË8‘ñØçÉhF+§>Ï‘oÅç/ûkþÞ¬Š®éÖØKÿO⻲ÈË´  gâ ¨â㕵óCÅ.¼œÛ‚¡ñ±Ñ{–¡gIí¼¨ñ2UsÒ8ÞFÚú@¸›ÜÝÆI-G“úìT¿ÿÿPK!‘s)lodocProps/custom.xml ¢( ¼“Mo‚0ÆïKöHïH©ø &&›1ó°‹A(Ú„¶¤-nfÙw_•a<ì´™ÝúÉó{ž¦õ'ï´2XHÂYìf9/Ûà%›c`H•±"«8Ã8b &áý¿¼ÆB, -ÁdöJÕžeÉ|i&{zÌô¤ä‚fJ—bgñ²$9ŽyÞPÌ”… Zy#§f}‘­žwP¿•,x~r'×é±ÖvCÿ[üh”T‘"ñ`Ç80QâÎLÚSÓí»#Ž!DS4›»Qò Œú´Œ€Á2ª£oÖ«E¼‰Òäi¥É2zLžµøAyUý&•}ëúÜAÿˆïwøiCªbÙÐ-33…‹NœÐÖ9ŽGpt¶ ;¾u#¼ó>)È?Ñ}!±$o#o9¯Â2«$>ç=—7K<ì˜)¡ø:jI*¬t/DÐvL™ÈI¡í¡¾ç8¯g#—k3Öé-¶?%üÿÿPK-!1qÙ´ [Content_Types].xmlPK-!§Xµ%^ Ù_rels/.relsPK-!çX¥y £/visio/document.xmlPK-!‚Ôe$Øvisio/masters/_rels/masters.xml.relsPK-!Ã™ì¸  î visio/pages/_rels/pages.xml.relsPK-!Èglfýä!visio/_rels/document.xml.relsPK-!+»°`zà 3#visio/pages/pages.xmlPK-!ßOøü" ä(à&visio/masters/masters.xmlPK-!-y¢rY!90visio/masters/master2.xmlPK-!¼+ãþÑ â7visio/pages/_rels/page1.xml.relsPK-!N ‡v$añ8visio/pages/page1.xmlPK-!H‡³¦šš]visio/masters/master1.xmlPK-!ÒòØ "&édvisio/masters/master4.xmlPK-!Àkšªw )mvisio/masters/master3.xmlPK-!Bz» ÔN qdocProps/thumbnail.emfPK-!eþxÆù{visio/windows.xmlPK-!`5‰_q d@ ~visio/theme/theme1.xmlPK-!Ù7ïÂEŠvisio/validation.xmlPK-!"ÚhzdocProps/app.xmlPK-!Éê~¼l´’docProps/core.xmlPK-!‘s)lo§•docProps/custom.xmlPK£L˜httpapiexsas_requirements.md000066400000000000000000000141401362133436400363630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# HTTPAPIEX SAS Requirements ================ ## Overview This module is used to manage the SAS Tokens within HTTP headers that are passing through to the HTTPAPIEX interface. A guiding principle of this module to that if SAS Tokens are being used within the http headers then at all costs SAS token expiration should be avoided. Retransmission is very expensive. Additionally this module does not try to enforce any policy on the headers. For instance, if there is no "Authorization" header, this module will make no attempt to error out. It will still try to invoke the HTTPAPIEX_ExecuteRequest. ## References [SAS Token Create requirements] [HTTPAPIEX requirements] [HTTP headers requirements] ## Exposed API ```c typedef void* HTTPAPIEX_SAS_HANDLE; extern HTTPAPIEX_SAS_HANDLE HTTPAPIEX_SAS_Create(STRING_HANDLE key, STRING_HANDLE uriResource, STRING_HANDLE keyName); extern HTTPAPIEX_SAS_HANDLE HTTPAPIEX_SAS_Create_From_String(const char* key, const char* uriResource, const char* keyName); extern void HTTPAPIEX_SAS_Destroy(HTTPAPIEX_SAS_HANDLE handle); extern HTTPAPIEX_RESULT HTTPAPIEX_SAS_ExecuteRequest(HTTPAPIEX_SAS_HANDLE sasHandle, HTTPAPIEX_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeadersHandle, BUFFER_HANDLE requestContent, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent); ``` ### HTTPAPIEX_SAS_Create ```c extern HTTPAPIEX_SAS_HANDLE HTTPAPIEX_SAS_Create(STRING_HANDLE key, STRING_HANDLE uriResource, STRING_HANDLE keyName); ``` **SRS_HTTPAPIEXSAS_01_001: [** HTTPAPIEX_SAS_Create shall create a new instance of HTTPAPIEX_SAS and return a non-NULL handle to it. **]** **SRS_HTTPAPIEXSAS_06_001: [** If the parameter key is NULL then HTTPAPIEX_SAS_Create shall return NULL. **]** **SRS_HTTPAPIEXSAS_06_002: [** If the parameter uriResource is NULL then HTTPAPIEX_SAS_Create shall return NULL. **]** **SRS_HTTPAPIEXSAS_06_003: [** The parameter keyName for HTTPAPIEX_SAS_Create is optional and can be NULL. **]** **SRS_HTTPAPIEXSAS_06_004: [** If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL. **]** ### HTTPAPIEX_SAS_Create_From_String ```c extern HTTPAPIEX_SAS_HANDLE HTTPAPIEX_SAS_Create_From_String(const char* key, const char* uriResource, const char* keyName); ``` **SRS_HTTPAPIEXSAS_07_001: [** If the parameter `key` or `uriResource` is NULL then `HTTPAPIEX_SAS_Create_From_String` shall return NULL. **]** **SRS_HTTPAPIEXSAS_07_002: [** If there are any other errors in the instantiation of this handle then `HTTPAPIEX_SAS_Create_From_String` shall return NULL. **]** **SRS_HTTPAPIEXSAS_07_003: [** `HTTPAPIEX_SAS_Create_From_String` shall create a new instance of `HTTPAPIEX_SAS` and return a non-NULL handle to it **]** ### HTTPAPIEX_SAS_Destroy ```c extern void HTTPAPIEX_SAS_Destroy(HTTPAPIEX_SAS_HANDLE handle); ``` **SRS_HTTPAPIEXSAS_06_005: [** If the parameter handle is NULL then HTTAPIEX_SAS_Destroy shall do nothing and return. **]** Otherwise, **SRS_HTTPAPIEXSAS_06_006: [** HTTAPIEX_SAS_Destroy shall deallocate any structures denoted by the parameter handle. **]** ### HTTPAPIEX_SAS_ExecuteRequest ```c extern HTTPAPIEX_RESULT HTTPAPIEX_SAS_ExecuteRequest(HTTPAPIEX_SAS_HANDLE sasHandle, HTTPAPIEX_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeadersHandle, BUFFER_HANDLE requestContent, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent); ``` **SRS_HTTPAPIEXSAS_06_007: [** If the parameter sasHandle is NULL then HTTPAPIEX_SAS_ExecuteRequest shall simply invoke HTTPAPIEX_ExecuteRequest with the remaining parameters (following sasHandle) as its arguments and shall return immediately with the result of that call as the result of HTTPAPIEX_SAS_ExecuteRequest. **]** This invocation of HTTPAPIEX_ExecuteRequest and returning its result as the result of HTTPAPIEX_SAS_ExecuteRequest shall be henceforth known as fallthrough. Otherwise,**SRS_HTTPAPIEXSAS_06_008: [** if the parameter requestHttpHeadersHandle is NULL then fallthrough. **]** **SRS_HTTPAPIEXSAS_06_009: [** HTTPHeaders_FindHeaderValue shall be invoked with the requestHttpHeadersHandle as its first argument and the string "Authorization" as its second argument. **]** **SRS_HTTPAPIEXSAS_06_010: [** If the return result of the invocation of HTTPHeaders_FindHeaderValue is NULL then fallthrough. **]** The caller of HTTPAPIEX_SAS_ExecuteRequest may know that there is no "Authorization" header. HTTPAPIEX_SAS_ExecuteRequest does not try to enforce policy. **SRS_HTTPAPIEXSAS_06_018: [** A value of type time_t that shall be known as currentTime is obtained from calling get_time. **]** **SRS_HTTPAPIEXSAS_06_019: [** If the value of currentTime is (time_t)-1 is then fallthrough. **]** The size_t value ((size_t) (difftime(currentTime,0) + 3600)) is obtained an shall be known as expiry. **SRS_HTTPAPIEXSAS_06_011: [** SASToken_Create shall be invoked. **]** **SRS_HTTPAPIEXSAS_06_012: [** If the return result of SASToken_Create is NULL then fallthrough. **]** The call to HTTPAPIEX_ExecuteRequest is attempted because there certainly could still be a valid SAS Token as the value the Authorization header. Note also that an error will be logged that the token could not be created. The result of the SASToken_Create shall be known as newSASToken. **SRS_HTTPAPIEXSAS_06_013: [** HTTPHeaders_ReplaceHeaderNameValuePair shall be invoked with "Authorization" as its second argument and STRING_c_str (newSASToken) as its third argument. **]** **SRS_HTTPAPIEXSAS_06_015: [** STRING_delete(newSASToken) will be invoked. **]** **SRS_HTTPAPIEXSAS_06_014: [** If the result of the invocation of HTTPHeaders_ReplaceHeaderNameValuePair is NOT HTTP_HEADERS_OK then fallthrough. **]** Note that an error will be logged that the "Authorization" header could not be replaced. Finally, **SRS_HTTPAPIEXSAS_06_016: [** HTTPAPIEX_ExecuteRequest with the remaining parameters (following sasHandle) as its arguments will be invoked and the result of that call is the result of HTTPAPIEX_SAS_ExecuteRequest. **]** httpheaders_requirements.md000066400000000000000000000173431362133436400361710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdochttpheaders requirements ================ ## Overview HttpHeaders is a utility module that handles message-headers. HttpHeaders uses Map function calls to store / retrieve http headers. ## References [http headers: http://tools.ietf.org/html/rfc2616 , section 4.2, section 4.1](http://tools.ietf.org/html/rfc2616) [structure of header fields: http://tools.ietf.org/html/rfc822#section-3.1](http://tools.ietf.org/html/rfc822#section-3.1) ## Exposed API **SRS_HTTP_HEADERS_99_001: [** HttpHeaders shall have the following interface **]** ```c typedef enum HTTP_HEADERS_RESULT_TAG { HTTP_HEADERS_OK, HTTP_HEADERS_INVALID_ARG, HTTP_HEADERS_ALLOC_FAILED, HTTP_HEADERS_INSUFFICIENT_BUFFER, HTTP_HEADERS_ERROR } HTTP_HEADERS_RESULT; typedef void* HTTP_HEADERS_HANDLE; extern HTTP_HEADERS_HANDLE HTTPHeaders_Alloc(void); extern void HTTPHeaders_Free(HTTP_HEADERS_HANDLE httpHeadersHandle); extern HTTP_HEADERS_RESULT HTTPHeaders_AddHeaderNameValuePair(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name, const char* value); extern HTTP_HEADERS_RESULT HTTPHeaders_ReplaceHeaderNameValuePair(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name, const char* value); extern const char* HTTPHeaders_FindHeaderValue(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name); extern HTTP_HEADERS_RESULT HTTPHeaders_GetHeaderCount(HTTP_HEADERS_HANDLE httpHeadersHandle, size_t* headersCount); extern HTTP_HEADERS_RESULT HTTPHeaders_GetHeader(HTTP_HEADERS_HANDLE handle, size_t index, char** destination); extern HTTP_HEADERS_HANDLE HTTPHeaders_Clone(HTTP_HEADERS_HANDLE handle); ``` An application would use HTTPHeaders_Alloc to create a new set of HTTP headers. After getting the handle, the application would build in several headers by consecutive calls to HTTPHeaders_AddHeaderNameValuePair. When the headers are constructed, the application can retrieve the stored data by calling one of the following functions: HTTPHeaders_FindHeaderValue - when the name of the header is known and it wants to know the value of that header HTTPHeaders_GetHeaderCount - when the application needs to know the count of all the headers HTTPHeaders_GetHeader - when the application needs to know the retrieve name+": "+value based on an index. ### HTTPHeaders_Alloc ```c HTTP_HEADERS_HANDLE HTTPHeaders_Alloc(void); ``` **SRS_HTTP_HEADERS_99_002: [** This API shall produce a HTTP_HANDLE that can later be used in subsequent calls to the module. **]** **SRS_HTTP_HEADERS_99_003: [** The function shall return NULL when the function cannot execute properly **]** **SRS_HTTP_HEADERS_99_004: [** After a successful init, HTTPHeaders_GetHeaderCount shall report 0 existing headers. **]** ### HTTPHeaders_Free ```c HTTPHeaders_Free(HTTP_HEADERS_HANDLE httpHeadersHandle); ``` **SRS_HTTP_HEADERS_99_005: [** Calling this API shall de-allocate the data structures allocated by previous API calls to the same handle. **]** **SRS_HTTP_HEADERS_02_001: [** If httpHeadersHandle is NULL then HTTPHeaders_Free shall perform no action. **]** ### HTTPHeaders_AddHeaderNameValuePair ```c HTTP_HEADERS_RESULT HTTPHeaders_AddHeaderNameValuePair(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name, const char* value); ``` **SRS_HTTP_HEADERS_99_012: [** Calling this API shall record a header from name and value parameters. **]** **SRS_HTTP_HEADERS_99_013: [** The function shall return HTTP_HEADERS_OK when execution is successful. **]** **SRS_HTTP_HEADERS_99_014: [** The function shall return when the handle is not valid or when name parameter is NULL or when value parameter is NULL. **]** **SRS_HTTP_HEADERS_99_015: [** The function shall return HTTP_HEADERS_ALLOC_FAILED when an internal request to allocate memory fails. **]** **SRS_HTTP_HEADERS_99_016: [** The function shall store the name:value pair in such a way that when later retrieved by a call to GetHeader it will return a string that shall strcmp equal to the name+": "+value. **]** **SRS_HTTP_HEADERS_99_017: [** If the name already exists in the collection of headers, the function shall concatenate the new value after the existing value, separated by a comma and a space as in: old-value+", "+new-value. **]** **SRS_HTTP_HEADERS_99_031: [** If name contains the character ":" then the return value shall be HTTP_HEADERS_INVALID_ARG. **]** **SRS_HTTP_HEADERS_99_036: [** If name contains the characters outside character codes 33 to 126 then the return value shall be HTTP_HEADERS_INVALID_ARG **]** (so says http://tools.ietf.org/html/rfc822#section-3.1) **SRS_HTTP_HEADERS_02_002: [** The LWS from the beginning of the value shall not be stored. **]** ### HTTPHeaders_ReplaceHeaderNameValuePair ```c HTTP_HEADERS_RESULT HTTPHeaders_ReplaceHeaderNameValuePair(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name, const char* value); ``` **SRS_HTTP_HEADERS_06_001: [** This API will perform exactly as HTTPHeaders_AddHeaderNameValuePair except that if the header name already exists the already existing value will be replaced as opposed to concatenated to. **]** ### HTTPHeaders_FindHeaderValue ```c const char* HTTPHeaders_FindHeaderValue(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name); ``` **SRS_HTTP_HEADERS_99_018: [** Calling this API shall retrieve the value for a previously stored name. **]** **SRS_HTTP_HEADERS_99_022: [** The return value shall be NULL if name parameter is NULL or if httpHeadersHandle is NULL **]** **SRS_HTTP_HEADERS_99_020: [** The return value shall be different than NULL when the name matches the name of a previously stored name:value pair. **]** **SRS_HTTP_HEADERS_99_021: [** In this case the return value shall point to a string that shall strcmp equal to the original stored string. **]** ### HTTPHeaders_GetHeaderCount ```c HTTP_HEADERS_RESULT HTTPHeaders_GetHeaderCount(HTTP_HEADERS_HANDLE httpHeadersHandle, size_t* headersCount); ``` **SRS_HTTP_HEADERS_99_023: [** Calling this API shall provide the number of stored headers. **]** **SRS_HTTP_HEADERS_99_024: [** The function shall return HTTP_HEADERS_INVALID_ARG when an invalid handle is passed. **]** **SRS_HTTP_HEADERS_99_025: [** The function shall return HTTP_HEADERS_INVALID_ARG when headersCount is NULL. **]** **SRS_HTTP_HEADERS_99_026: [** The function shall write in *headersCount the number of currently stored headers and shall return HTTP_HEADERS_OK **]** **SRS_HTTP_HEADERS_99_037: [** The function shall return HTTP_HEADERS_ERROR when an internal error occurs. **]** ### HTTPHeaders_GetHeader ```c HTTP_HEADERS_RESULT HTTPHeaders_GetHeader(HTTP_HEADERS_HANDLE handle, size_t index, char** destination); ``` **SRS_HTTP_HEADERS_99_027: [** Calling this API shall produce the string value+": "+pair) for the index header in the *destination parameter. **]** **SRS_HTTP_HEADERS_99_028: [** The function shall return HTTP_HEADERS_INVALID_ARG if the handle is invalid. **]** **SRS_HTTP_HEADERS_99_029: [** The function shall return HTTP_HEADERS_INVALID_ARG if index is not valid (for example, out of range) for the currently stored headers. **]** **SRS_HTTP_HEADERS_99_032: [** The function shall return HTTP_HEADERS_INVALID_ARG if the destination is NULL **]** **SRS_HTTP_HEADERS_99_034: [** The function shall return HTTP_HEADERS_ERROR when an internal error occurs **]** **SRS_HTTP_HEADERS_99_035: [** The function shall return HTTP_HEADERS_OK when the function executed without error. **]** ### HTTPHeaders_Clone ```c extern HTTP_HEADERS_HANDLE HTTPHeaders_Clone(HTTP_HEADERS_HANDLE handle); ``` HTTPHeaders_Clone produces a clone of the handle parameter. **SRS_HTTP_HEADERS_02_003: [** If handle is NULL then HTTPHeaders_Clone shall return NULL. **]** **SRS_HTTP_HEADERS_02_004: [** Otherwise HTTPHeaders_Clone shall clone the content of handle to a new handle. **]** **SRS_HTTP_HEADERS_02_005: [** If cloning fails for any reason, then HTTPHeaders_Clone shall return NULL. **]** azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img/000077500000000000000000000000001362133436400313545ustar00rootroot00000000000000porting_guide_overview.png000066400000000000000000001224031362133436400365720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img‰PNG  IHDR¥¢ MùsRGB®ÎégAMA± üa pHYsÃÃÇo¨d¤˜IDATx^íýƒ$Õ½ yÏ×x?ÅÎÌÎŽŸ¿³»³;3ëfïŽî½r€ð á=÷Þ4NH€„aÛ{ Ix+šnhÚ–é÷D¤©ÌHÓUyòdFþž}–[•iêddü㩬ÖüÀ*¢÷€Q0?_ûoöI’$ëÎ×O€Hè= :á >7øÝ÷Þýõß’$I ' sù 0tô—ùùósógæ^zéåÏ>ûì €ÂéÁK/¿|pv>œ0ÔÏ€á¡÷€¸„Þ›™ß{p6ôÞê—ä„Óƒp’ðÕÁÙC³þ°ÃGï ‡í¹ìýù/öÏü꥗ô(NÂIÂî}3Cï > ½D¤öÇœûÍíÚ«÷@j½·ó«Cûgæô†ŽÞ"ŽÚ3³óûÎ~®÷@7j½÷Ùž¬÷†ŽÞ"Òè½¹_Ò{ “ÖÏ÷ô†ŽÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆ¤ê½?½ùÚ«/o%ÙêΟ8êÅ_þ²óW;~M²Õßÿö£9fè=DEï}ï…G nß¾}ýŸdÓÍÿûß½N¤œIuÖäõ×޸/û¯l†élvÔˆ~àÐ{ˆŠÞ"Ú#ï½ù0œÂˆZwÃß!Ùtãƒÿñw¿ýõÌÜ|~òV¿ cnþð믾qãq÷ïÞO²i¦gçg³_¤Æ=jè=DEïqï…‡ çmgæôY0ôÞë¯ÿzß¡Ùì·õõw 2‰lÈà×^ùÞ# †aúÕÁÙC³ÑLï!*zˆÈ¨{ïðáÙùÃûé=²hè½ßüæåüÔÍ|m„ÅkòªÞ#; Ãt÷¾™‡æò¿ê¬¿eb ÷½D$AïÍ…‡›Õ{dÁÐ{¯þæå/÷Ïò_;a9ê=²›a˜îÚ7³?ô^äßé=DEïIÓ{>ß#;Ìzïµ—¿ÈzÏÇ{m„“Ë3s¯üZï‘E³ÞÛ;“ýø|6aã¡÷½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDïM‚Ç|røðW;þiÇåIýÑ _å/èüág^/\ÅÔ{½Ð{‹ö‰•ožû•«Š—Ñ#=Ä_½òQýÈðÎ…«A½‡j ÷€ˆè½%øÌ3ùIÌáOžé¸*ØèŸa6†½÷OßÚyxþÍc:.çàê½^T½÷6¼’:š¾r^aƒÅ›¼÷òk×o踜±Ô{¨zˆˆÞ[‚Þ›ßyÃŽÂU7ü×߬Ÿ«%ë½ìé½ùÖ:.âX~äXs¤ë0Lõ^/*Ü{WÝ·;¼ÔÝ÷Ä…罓I™LÙÆ»WþUÇåíß{Y»¶ý8ãc‚µ…zÕ@ïÑ{K°;ºæDÖ?ŸìÈ>⛊ÞË?ÌÔ{ÃUïõ¢²½—ÿéc—:Ê“oQŸò[ïõú‰ÆA½W½‡¨è= "zo ÖC"«¯ÂŸ2îØñföÏØ:*¨ù¡_°õòlûìCÂü®:®ÍÌ«vUý›t»Ïü¯+f¶>½…h—ÙücÔÖç.w•ßsû?ÆëÖN­O ³öX=%Øù@Í«6è¿‹ýŽé·c¯ÞëEU{ïõa/íúÜš*û0ûbáo>5•oÓÜÕƒÙG‚ÝbláÔe63²÷=×ÍŸ^çU={¯uûÌÚG”==˜¶ùÎ :+ñˆÏpñw^´Bqª÷P ô½·ñÓÑEÌ–‡Gk˜-tKÞoí¡²p'µo©uãöLêsŸ]Û¬¶M×›4žCËM wXK»n¼ZøIû»uN—ÿU•fÂÕb©ýn Û·}®ØfÛSê÷(áënÔfmƒ¹ÔAïUŠö^þ±Uš ½×̘úUÍÜ*6L!ÆòoÛ¢yóüž[oÛçŸÞµ>ÕÅ÷^¿G_×~´˜Ù÷g_úë½rè=DEïÑ{Kp!$òiôÌBœôë½¶nÉC¥Û'„Ùוի»Ú[¨³sº=Ÿü¡³Íš_t½6û¶O8µÞsßG)|ÝÕ|ƒ¶¿#]¸ÉÒ½W=¦¾÷Úþæ³­Óú÷^áÓ¶ÜæÍ;î¹KA5l½ªý! ¶>bßG/|ÝÕŽgØr“î\ï•Cï!*zˆˆÞ[‚-!ÑR-1VŒ“¼ÇòŸºîbz¯Ká´ö^ÏûìÕ{­Ÿ›e66ëK-Þú]ÑÖ'Ù÷QÂ×ݨŎÕh¹É?Bç:Lˆz¯í½>}Uø®Tïµ~>–Ù¸IÇ=žOþmë¡f Þëõèáë.IÖn¿Ÿ}€;×{åÐ{ˆŠÞ"¢÷–`[HÔ¬­UZ+¨f ½ÔöY\Gá´^Ûçó½~÷Ù¥sÚžOÝf#u¥…‡è|-vô^¯G)|ÝÕŽÕh¹d€AïUŽŠöÞ‡x…Ë[?úëÑWµÛÑ{>ßË/àÎõ^9ô¢¢÷€ˆè½%ØÙÇ_‡ßüªµ¸úUÐâ{¯½â‚Í»ê{ŸÝ:§ã®Šÿø­KÕ/ïþÿìDögÒïQÂ×½¨iç-7_ú ÷*GU{//Ž©ŽÔ-­ÿJí½×Öiu{rزq±¦ê½¾¾î’díöýÙ—~çz¯zQÑ{@DôÞ,„Döm–| —´UPöùX3Tò8\ø6•^½W»¶ñGŒù}†oó»íwŸ5˜ÙvWíßv¥ÌüQ‚`ëbûcõy”Æ·ý¬¶ýÂ6ùÂö½·¾?B·u˜õ^/*Û{µDiO¾mê½^T¼÷úÚQeSä4ÿì‹Wï¡è= "z¶ýÕèÔ{5õ^/ôžÞc/õªÞ"¢÷X°×IÆSïÕÔ{½Ð{z½Ô{¨zˆˆÞ#ÇD½×‹iî=²¿zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïÑ{䘨÷z¡÷È^ê=T½DDï‘c¢Þë…Þ#{©÷P ô½Gމz¯zì¥ÞC5Ð{@Dô9&ê½^è=²—zÕ@ïIÕ{;¶oÛ¾þ¡íëlü—œz7=ù›ß¾öåþY½W Ö{¿ùÍÖ=·uÅc›W<¶‰dîæíÛvè=T½D$Mïœýøó=þð³ß¿÷éï|ú;rê}ãÝOß|ÿ/íÞ·ç@è½p6åtj°gæví=ðÎG;Ã*…µ*¬9…†7ÂÞûôÝOvïÚ7³ÿÐ\vب¿c¢ ÷½D$Aï忪ÿbÿÌ'_|×wvîçsrÚ}÷óýî>Þ†{Îé½a1š„þì«Cì:Öª°zäÞáíðé—¿Ü?¦êÜ|öN‰‡ÞCTô‘Q÷Þüá0“ÍÎupv×ÞCáì-̪~ä”û—=‡vî çm#ø=ýÄêwvîð¾C³_ìŸ °V…Õ#§Ð0=?Ûsh÷¾™½GñGàzQÑ{@DFÜ{ìÔmþðÁ™¹p^ûÕÙ=$3ÃIÛÜ™ìýìÓ=gS-„Ũýž¨qИéX=r ¥·ïP{#ø%‘ÞCTô‘½Wûm}æÌÜ|T$ƒáíý/.Dþ]˜PòäËÖÇAƒlš4ææó¿äŒ~ØÐ{ˆŠÞ"2úÞ«fE&€&õ7Eý=‚ae7€"£:hè=DEï í$½&½‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "zôGï!*zˆˆÞýÑ{ˆŠÞ"¢÷@ô¢¢÷€ˆè=н‡¨è= "Þ›ý|ïÌK/ÿúÕ×~ó›×_ÿÿk¿ÉþK’$§ÙÚù@8=' ŸíÑ{ˆ‚Þ"Ú³sóûÍíÚ;óî_¾üÃûùÝ;ŸþöO_ç“ð_’$9冃7ÞýôíO¾¨}¾'÷0tô‘pÔž››?83ÿÅþ™O¾<øÞ®oýeߟ?#I’ îë³}ï~¾ÿã/îÞ7s@ï!zˆK8pÏÌÎïÍþ¤óЧ{}¸û I’dæ?úâÀ'_ø|ïÌWgÍÊ= ½Ä%¹g³øæBò}¹f×¾™ÝûfI’$wïÿ=ôåþC!öη†úÙ0<ôpððC³ógçdΓ$IfÎÌ…Óƒp’0;ïÃ=DAvGòðI’$ëÎ×O€Hè=¨&zª‰Þ€j¢÷ šè=¨&zª‰Þ€j¢÷ šè=¨&zª‰Þ€j¢÷ šè=¨& ½7þ¿ðßðò¯H’$I’ãkÖnáÿ†¯³ÿv¥Þ{áú¹ùù={ö¾øë×^xùµçI’$I’ãmh·?þKH¹^ÁWï½°ÅÁÙ¹÷?úäñu/þЫ$I’$É1÷Ö'_zõ·84;‚®Vvê½73;·ïÐì;ïüЪ—¿¶üu’$I’䘻ìÑ_ÿúõ?ì?47Û#ø²Þ ׄ"Üs`öÏïé=’$I’œ Cï½ü›?„”›éñ7õÞ;8;ÿÅþÙ?¾û‘Þ#I’$ɉ0ôÞK¿ùýûgBÐõë½3s»÷ͼù·z$I’$'ÂÐ{¿zír!èúôÞ¼Þ#I’$ÉÉ2ï½ß7z¯Kð-ôÞ®½‡þ ÷H’$IrBÔ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$I’$YMõI’$IVS½G’$I’ÕTï‘$I’d5Õ{$IöuÍó‡<ñhÇå$I޽z$9ß|b×á^~³ãò”žõòùÃ_ÜÚqyÁ[ß:<¿ëÓ³:.ŸDûþÈÙk4ÿÖ{—“$'X½G’Sm‡ë¶VMö¡VãòºíÐñ©WÖE½>+nœ§Å"꽊O iþLº~ìöè§>üšö {¸¸ÞËžF³TÛ–«î?ú‹ý#w½’ä$«÷HrzÍÏþÎï÷ Áe§þm‘ç\ËgtímP ¡^Ցݶ탣Åô^‹O¦qaÌø©ÙåÇUuþ€Ñ䶸%IV@½G’SkþZ¯¿ßë–XmQ×Úùƽ;¡³"&¥÷ŠÏ³ê½W©?^%IõIN­yïõ:¹ïšX­ýÓl¼7úý»¯.•ÒÞQµ{hØ%]º>™EÄOþ™dkÞtþqf¸6_‡Üb²æ÷Öza¯Þëx öçœ]·e¡²{Ë¡ó äëÓ¼I°v«ø?r¯$9¡ê=’œ^ó6è‘j]«5'êíqäOêÑza¡[ª£ëãö¼°|ü„ wRx&ÝžyÏêx†í Õ¸ª= O þµoî¤óŒÿ#wþ $ɉVï‘äT[O¾`¡Ùzœ÷/O¾An[uÚQ Áfïå_´g¶ýbžÌÂ(º¤øi½Ûö‡îòܽ´`ãÞ 7¨x'ù=´^k¿µ=½üìì½¶Go:¤¹ËGš$ɉVï‘$ó&ɳ¡=6:«5Qj5²&˃îŸ6ìÒoµG v«‹Ž êñd:s(¸ä»ÚB´í¡ÛïªËí¶Ý[vÛ|³Î;iyÚO =;ÀØ?r0¿7½G’•Qï‘$kfa°pêß5±Zs¢Ñy0tÙ²é{¯xÛ͂ËŸÎk myèl³Úœ_ž|»½Bï‘$‡¬Þ#I6lͪ®‰Õ$-í‘7FG‡4ì(à8¾W»¤=½Ú6èõ“f7Éï¼ùEñùìxíÚùÆý‘sõIVK½G’¬Û3Ý+ß qa[{Ô>l ‰¦±Ð{ݲ*+–ÂçÝžÌbâ§Ì´ý¼¹ Ý~?M;oÒjvm=bÛV¦W>u¬Ìzoð¹f×¥&IN¬z$§Õì̾í±ÑvÞŸ§BKºÚ#ß¾ó±Ì–™ÍÞ«ßm{®tôFÇ“i\x„øi«ÚXŒŸpIãNZ%¿ªÐ¨ÍË;´iö^x«ñÇœ¹ÅŸ(ûú=¿]¾éƒÂå,oXÕ°¶a… —s4Nô áööÎ}qà‹ý3!èúõÞ¡Ù¹=fÿ²çÐû»ö¿½sÿŸ?ÛW=ûÑW§=òfísÏðEø¶°Iޡ׮|·và ÓhËŸv®%ɸâõ!HjÇ¢{6X¸–e ëY[ذÂa ×2¶“>dC¸½·kÿ_ö )×ãÏ9óÞ ÌÌÎí;4»{ßLØúã/~¸ûÀ‡»Ã«ãŸÿ²ï?ûcí嬾 6#ɱò†Uﵸ¾}ÿ/¾ýea’Œêº7v}ýÞzìÕüáÖ Ûp0ÃJ¶.lXç°Ú…mÏɲ>úâÀ§{†ˆÛhn¶ûŸs6z/\{0K¾¹¯Ì~±ofWµüð‹g<Ú{5Ã…áªÂÆ$9&Þ¼¶mÕ<êþ7^ûà«Â–$É­Ú]ˆ½šîø¸°%—jXêÃj‡5/lÉVcÈîÞwhÏþÙ}gÍÎõȽFï…+Ã3³ó‡fCøÍ¨–ïï:øÊû{jÞ¶þý`óÛpUac’?ß7ÓüËçûgæÆ°øô^$ô^Zô^ÕÐ{Q £éÀÌÜî}3Û~¥÷H’\²Oo|é½Ov~upöЬޛô^Zô^ÕÐ{Q £iÿÌÜç{é=’$0ôÞ;íÜs ë½úpô^$ô^Zô^ÕÐ{Q©õÞN½G’ä@†Þ{û£_îŸÑ{ÓƒÞK‹Þ«z/*z$É2Ö{ïÀÌ¡9½7-轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=²Œg½|`þð·v\ß÷^8|øƒ—ßì¸|©¾ùÄ®Ãó»>=«øuç·$»«÷¦½—½W5ô^Tô™ùè§„·CÃÅw”Þ#©÷¦½—½W5ô^Tô™7ÛáÖ4/É:g‘)5y½·æ‹ùÞx´ãò̾×ï†äT«÷¦½—½W5ô^Tô§Ýü“½–Ø[šz¤Þ›Bô^Zô^ÕÐ{QÑ{œro}ëð¢ƒ-Ï¡úß|ÖoÒ转¾jW,¿ÿ.WÕoØø;Ò…«²¬jÜä­÷šÛ·_º«gïuüDÍ-[Ÿnvÿ­Wè½æ·]nØeÝ!§U½7…轴轪¡÷¢¢÷8ÝæVȪîæÍÓÜ2´MþuíoAÛóoáÓÂE…k^Õ¸a{ µn“§`÷›wVb‹½{/ÿ¶Xe‹é½üÛ Ûœ`ö¸ ·%§H½7…轴轪¡÷¢¢÷8Ýöü”¬Ãî[æÙÖšO}î°­-k½×¾e{RÖ·©•[ñªb ¶8¢Þ+>¥Å¯$Y5õÞ¢÷Ò¢÷ª†Þ‹ŠÞãt»øJÉó¦cã–$«Y¨ VÛ®êÅnÿ’p!±:ŸgÏg>ªÞkÿ:®%§G½7…轴轪¡÷¢¢÷8Ýf-Ô#Ϻ˜§TÍzP©÷òoë7É=Rïµmœ™oÓåÓ¼ô½×ú¬ü1'§Y½7…轴轪¡÷¢¢÷8Ý gqÖÃ,kª¾½×-Ÿ–ôùÞ‚u7½·°AÏ'CNƒzo Ñ{iÑ{UCïEEïqÚÍ2¦Weõ¶?ýz¯ø¡\ËU]{¯_5µÝ6³Ë'~u‹O©°å0{¯ñS¼Üå*rzÔ{SˆÞK‹Þ«z/*z¬ý•fáj²˜R¡vº…P¿ÞËû­iµGéÛ{µ [žI˃¶]Uÿ€±G¶^ç–ÅP\tïoX3ÿƒ ·"§N½7…轴轪¡÷¢¢÷ÈÌìë¼[r»vT­¸ê¶eX¯Þ[È­Ú}fÉ×·÷2[ŸI{Dµ<ðˆÙu}žÁþ[.\›=™Ö¨k¼â·…Ö/ì¬erÚÔ{SˆÞK‹Þ«z/*zdóÞk-^rêÔ{SˆÞK‹Þ«z/*zd Ûþf•œNõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#9°=ÿ*•œ&õÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*z$É2ê½)Dï¥EïU ½½G’dõÞ¢÷Ò¢÷ª†Þ‹ŠÞ#I²Œzo Ñ{iÑ{UCïEEï‘$YF½7…轴轪¡÷¢¢÷H’,£Þ›Bô^Zô^ÕÐ{QÑ{$I–QïM!z/-z¯j轨è=’$˨÷¦½—½W5ô^TôI’eÔ{SˆÞK‹Þ«z/*­½wõã/‡ä#I’‹wåæ_e½·?ë½q >½ ½—½W5ô^Tj½÷ùޙ߼ùΖ_Ýòâ+ó†§^[·£x!¹ÞöŸÂ…äúðÚWƒ… 9 _Èþ»ýåß|øùÞ/÷ÏœÕ{Ó‚ÞK‹Þ«z/*a4˜™ßµoö£ÝßÞ¹ÿOÙ÷æ'{+ãÕ+ÞùÚò׿ÿÈ›¯½¿§pÙß°Ï„='ì?a/*\EŽ•Ï¾öÙ×ïùm0|Q¸Š±ýã§ûÞúlÿû»þå«C{öÏÒ{SƒÞK‹Þ«z/*a2œßs`î³=‡>Ü}à½Ï÷¿ûùjxݪw›ÿ¸â?ûã>Ù[Ø€ìeØ[Â>ÓܾTØ€WÿîóPzµ5|¾-lÀؾ¿ëÀÇ_ܵofßÁÙ™Ù¹úpô^$ô^Zô^ÕÐ{±™›ßhnÏÙ]{íüêÐg•ð¦5ï5OÖkžþèßÛµ¿°ÙiØOÂÞRØÂUØŒLî¦7w}ýÞzìÕ ß† ›1ž;÷Î|¾wf÷¾™½‡æÎÌÍÎé½iAï¥EïU ½›ùùù™Ù¹ƒ³sfæöš­€·­{¿õ¨é™?ÿãç_,lL¶ö°Ÿöœša¿*lL&ô…·¾øF{ìÕ †« 3ªgçÍÍÏŽßÿXK@ïEBï¥EïU ½›Ð{ùæÃ¨ªžápüñ ’‹1ì9aÿ)\HŽ¡þêÓ`áBŽÈðÿÏçC´>TÇ ½ ½—½W5ôÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsL %zaF€H‹Þ«ÆÊ`Ôa`ŒsŒ3~¿+œîÔ<åá7ƒÍo_yoO}#L=†`$ ˆ´è½*ðögûk™¬M¯æ·áªúF@ÂiPs‡9æ7~´íãÚ׿üõ_ÍÎ×7ºö°ŸÔv˜°ç„ý§öu0ìWõ€ñàÎ |mùëþZ¿ÓŠ! "-{Î6<ý¾û“7›ß¾ðÖ—õªÂ´|¾×uŒ… ëW½©ýÖ­°ó|ãÞßú7CØOÂÞRØüŽãIaV†óžú˜b Áxi ]]XüàÙý)¤`}‹ª0EÏYcb‹§0íÌ9,‰ÂD7Ë1Î4g¥ØCC0DZ ÉWÉØ L׿ßkŽ1±‡¥Òœvæ 9ÑÍrŒ?aDŠ=0ãa@¤¥™|U½@ÏÞ›››{ÿƒÞ«×=ó‡`ý› ^¬Ù¹¹ú‹7|õÕÞú3«¯þáÝS~cÍËoÕ¿¯;?ÿ|~œþFx>õgV!žöŸ°Õ¿¯_íÝ;šý§ªƒ ÕãÃ>ú{b÷î/ê÷žˆ1‚KX;wNÀ@™ ±û‹/–´þá½P¿åó‹íþÁOßxó­ Xÿý 0p»÷^¸ŸO>ùtû†Ÿnzô(N„áÅúø“OÂ0ô3á9¼úòÖ-OžWx’[·oß>vžŒú‹˜Šlž?žOárl ïôW^Þ:ß1˜8AîØüì®Ý»k´¡îæÅç7mùÅ©…šB?°òõŸÛß}îSŠ\öìö-Ï/ò€6Ú½û‹ «¶î„ûó;W¿þÚ Ü.½—¿=‡xØþÜ•ënø;œËõáÇŸÌä»À’÷‚¡<ˆÃù߆{ÿ~áIrl ãðàÌÜl>ë/d"Â˜ËÆsárl ïôW^Úzhv>jòÕŽl'ÅúìóݳsÙÈá>ÂñÅ›Ößþÿ+<кø• ”üˆßý»÷s(žóo ½Î6³ä®/sOÂë³k÷«ß\¸ìÇ=þ›Wß`àvë½pX™Ÿñ°ÍXËõî‡ÈŽ€C.ƒ>~ý’Þ›$Ã8üêàì¡Ù¹p©¿)FHäzo‚ ïô—µeÿ¡¹p>ïðc0q²Ü±þ¡?Û• åaUÃ]„3¼ô^îâVØ l¦÷†hè½m[žüÚ }ÈÚsóŸ}¾{¥Þž¡÷^}åw Ü®Ÿï͇Wñ½?6V'Èðb½õÞG_˜Íßå‡Ëà„ÇçëáüOïMa~±ofX§&Sûé½I2¼Ó_úÕ–púuÄñ_ƒ‰“åöõ½ÿéÎp4Ë>â«ïÅÞVsó‡ÃñYïÕ\äÀª ”°™Þ¢Yïm~þËý³áL¯ÿùB¾þ‡?ݹ{åczoh†ÞûõË¿`àvï½C³Æê„¹õ¹+ÿôî‡{̆×.â9×"¨%½7Y†qøùÞCõßÕ_É„‡ž™ß{PïM’Yクe1ã¿ 'ËÐ{ï~¼ó«l(/ñ¼¬ƒpãpáø¬÷j.r`5×Mï ÑÐ{[7?_ëíp¾×‡ü =÷Ég»ôÞ ½÷òË¿`àvÿ÷{áz÷cu’ ½÷Çw?ürÿL>Zê/eÂã뽉3ŒÃϾ:”ÿ*:åîzfNïM˜áþ«·ìÞ7s0ÿõ×rØLœ,Cï½óñΡü6Üxvþð¾C³z¯æ"V¶n?)œ4s`k½øµÏWëkÝÚ/é>Ö{C5ôÞK/ÿn€«÷*¢ÞcÃ8Ü96½÷ÕY½7A6{/ÿuo¬ÝÇ`âd™õÞGz/Š‹XÙºé½a[ë½]{é½$6{o©WïUD½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴NOïýÓ·vžßyÃŽâå‹óG7|•æ?óz᪠wê{oQ;ÆŽoV壘zoÌ,w ­zìtb{o>É{ïªûvÏ~çŽËã»á•Ç?ºï‰ŽËGçÔö^º½ÍjõÞ3Ï„Ÿ Õ¯vüÓÆµeŽDùmß<¦ãò*8½wÌ'í{E‹!áô^)§¶÷^3ß…†°?‰zo ì¿;Õ¦ê›oý¨p«Ìü¨ØØxa—ëºå“gZ¯e›ãß{KyéÇËø½—eÕÂâ´™ñUï=°>bë7´^˜yÞ;íϼpÃ'V¾}xþíW®Z¸dQNRïe+°{å_u\>z/‚…ÉTË¿ú Ù¢D]Æ[6«ZÒ±RN×ç{ù.1À©Æõ^ïÓ¯$NkïåÇ„£Ú+z½èƒîÏc¢Þ/»îN=ö½ü¸pyø¶1"‹£¶Öm4 ªþ µ¼cÞ{‹éÇÐø½×b^M¯œ×vá8õ^~ÉÛÝžO¡vjù·…zoiê½vL¦üwðµ²½—ÿ1§Þ‹Mx|½wd{œ~¥rJ{/{žy=?2Œ"·z½èƒîÏc¢Þ/»îNÝ÷½üóºîÁÖ>j{MÏ ßu£:Þ½·è—~,Õ{ —dOïþê•:ždgíäŸ6Ÿ¶Þ[šz/‚“©åQÅ#QýϱrÛ~;Õ¸0óÍcZ7«]R»yË¿èËl[õ6hlî<»“ðÐ-7©mß¼ó„19õ½×1¢òmê6^îöÞ«í'-ù×í&™=v’–_CÔlû9{¬ìùäc5·ÏþY¿‡^O ÛÞØzmy§²÷ò"[çæm­ËÞã•äEi^ò‘§÷ŽC½7^vÙjöè½ÖÃæ‚{`Û±®iÛfluzo/}fŸãI«z ‡ãØôÞŸ}¶6XýÚ¼Á®Êï§nÇß^Öÿ&³uû¦ 7 éRè½¼Ù²{k~Q¸a[íäO¬yÉt÷^ãÕ©Ù-•×6Vµ½÷òÕK‘Súù^¸¼p¶0ä:Ç[~¶ÔvÐÉoÒëò3ìð¸ wÒ8»ª½æÉVý&…'0Zõ^Ûˆjß ¼Rµ¯ëÕÔܾõ ¦ÇMj—wÝIò õ(›mÍ-ûO}ƒÚ·ÍûÏï§}ÿl}ûjçÞ8\§±÷òE®-x¾¼½Ž9×ö~¥–ü¢/\Þ²Yfñ@×z·o7)ܼïŽC½7^vÙzî{õ}©Ë/Z÷Àö£k»‡AÖó¿ç\ÜKß÷xÒûªâÀÊ·âh§Vùáiá®óh,°ÚîAï-†ðøãÐ{ÅW6·6„ÞÊþÛ¾A¯›ôÝI†Þ{õ}xÁ… †;,;ºÞË|áhPw/¬pë‹Û¶ø}_©¥½èMûïÏKï½ö猸çõÞxÙewê½ïµ™w]}³Ö=°}7n7Û9&2œÞ«Ùã¥ïsßË%û .l¯÷z÷^ûª¶¼dÝ®­ÙxÑóuK÷ßTö^~¸i9o9é vÞIÿís[UÙy†­÷CxüĽ×û¤eääÛ4^ëÞ7é·“XûÖ1ÞúïŸm­ØiçÞ8\§¬÷Z÷–nf/e¯Õî÷J-ñEox„ýyIGž#ìH1Ô{ãe—Ý©÷¾×nËq¦ý=Òõ>ã—&ÚÉê½/}ŸãÉ„m;FëÉUy'¬÷ºd[‹ÅÀh½«¶»Í\ظk­µ_¨÷º¯@Ǫ¶ýû½üÏbÛ¯­Ùò¢çÛ,}é†ât~¾—nšçRù)QË©U±îº\’’fX·o;X‹=ëµz¯õì¤ðR†®öºç—7^ÁüNšûCß›öŠÆ·­{TþuÇö>õ?ÒÞ˜=½–é˜_ñ¼jºz¯ßÉkýòúñ¤Åîû@°å•Zê‹^÷Hûó’Ž<ýw¤ê½ñ²ëî]ØqÉ.,îW©m ÖÞ­w[ÛÓºìÏÌëÞ[ôK¤Ã]¿«v¹ìá:öÉNZïÕ.i¹“pŸ µÐùßdîªqÃ<ö·Yïu{VÁ¶íõ^(¼ý¿ ¯H­ÆóË/z¾þ=>¦Óúï÷j©Ü0u²Ô<µZ8â4.ìz²•†¶=h~ó¶K–tÖ5bõ^áìdáÕ6^”üÂ…W°¶Mó~ºÞ$ó;Iíòp·Ùshî`…ÇêÜ=nÛ¼°õZ~–ÆÆ½ÞCpªz¯øFnºpÒSüÕuqý{¼Rƒ¼èÁ#íÏK>òôÞ‘b¨÷ÆË.»Sû.Q³¶c´_޲Ϸí=î¤Û›ˆ Çýó½Å¿ô­[öÙ%Z®ª [ÎЊ;d9'®÷2óû©[¨¬FÈCBdÉ×òùR-?rÃ#fTߦí 4¬ÝUíæz¯uÍk6Þ¶«Š«Ô²æ…—uaÍkÛvŒX­ÞãÒ®Þã°ªÞ;¢ÙÖ™X\Pï‘Nؿߪ]¡Cu¤½Çv'©÷ª¨Þ›võ˨÷ÚÌi]üͧ=Ô{d§zOïUR½—V½7íê=–Qï-üéZᯘآÞ#;Õ{z¯’ê½´ê½iWﱌz«÷ÈN§¹÷b«÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—V½7íê=–Qïq`õÙ©Þ‹§ÞK¨ÞK«Þ›võ˨÷8°zìTïÅSï%Tï¥UïM»zeÔ{X½Gvª÷â©÷ª÷Òª÷¦]½Ç2ê=¬Þ#;Õ{ñÔ{ Õ{iÕ{Ó®ÞcõVï‘ê½x꽄꽴ê½iWﱌz«÷ÈNõ^<õ^Bõ^ZõÞ´«÷XF½ÇÕ{d§z/žz/¡z/­zoÚÕ{,£ÞãÀê=²S½O½—P½—Ö(½·}ýO7=z'Âðb[ïmyò¼Â“äØ:†½Wx†[Ã;}”½g0q"ܾùÙ½·å§h  ÷î>÷)Å.{v©½·aÕÖÂp`~çêaö^8åÚ½÷àzû7xëÕß¿õÊïÿ\o[ù‡`áÂI7¼Fá•úh÷¾/÷φ׮Üd)Kxû84÷á§ŸÿîUÛžýOg>òƪ_ý±pùDûêïÿüÚÞúÃÛfãóàìXôÞÁÙ?¿÷Ñëo¾õÚï«vü©žµƒÏÛíübÿÌÁÙù¨½WáÁ´ñ•ìØþ[¸œ‹÷Ûß¼èñ7~õ»âåI ûçoÿøÎ§_Øs`fH½7¿ÿÐÜ»ý% ÖpÄNµÿ'‚KXÙº…Þ;8ûÖ{ýöÍÚºïp| «Ö6¬páò±²vÀÿóûŸf½q(ôF}©»Rë½/öüÃ[ï†>æí±:€ô²¶þï~º{€Ûµ÷Â+4÷ÕÙÏöz×wvî{çþ·>ÛWïÙüá×–¿ _®š\ë^£ðJ…×+¼jùç{K؆Nxø°†òüô˃ï}ž=·ÂžP÷ÑW§=òfØy¾}ÿï¶þiwáÚÉõíÏö½÷ù¿8¸kï¡p>1;ŸÍÈT4Çóç{}´ûÀ»ŸWçàSUkŸ¿ì9˜ÿqAÄcO…ÓKï|yâC¿Ç–ðßðuáZ.Æ•¯ïüú=¿ kxá/ÿüæ§{ ׎ØÚPþp÷Á{göœË [ênŒfæÂIö'a°î:ŽÛ…ã0—4°²28l67 7L²n‹1¬gXÕ°¶a…Ã:®ÃŽÎëÂÙ]8Ç;bo„Ý>ìüá-Þáí0Îí±:€ô±ÌÀíÖ{ù)Wx‡„|üì«CáàÞ'ð­…ײiø¶°Áä^£ðJ…×+;ü-©÷#>ì…{Ά#ì§{²çVx¶“hx›þ³?6wž£îãWï|YØfB /P8v‡¾Ús`æ`öçÙ+˜ŠÚÁ'œÖ„Y²sou>6¼FÙs(œ††J/^Û‡ª¦ß~¸÷¤<öj†¯Ã%…mØßõ¿ßõõ{³sµš—<ùÖûy$4ìŸ;¿:ŽcÙß¼ ã—hὕý¾#ÿ]XxÇ~ÿ“!~ðŬpUØ l67 7ÏãFXɰžÍµ ëV»°Í˜˜­ÿž,¶Ã9Þ{#;hÏ®ô1>hᤗa ¸Ýÿž3?²Ìï;4ûÕÙ‘a¾Nºíø¸ùZ6 6›PÃk^©ðz…W-æ×¢ÈÞásóávÇ=•Ø>þòÀ.̹šáèüú‡_¶œDÃ8ŽÝá%Ë~YvïÉ?á(&D8³ù2Ûf O˜cexƒ‡·yȰpð‰ú˦J¦?ÿeÿÉ/Ä^ÍpI¸¼°%{¹íO»¿Ñr®VóÒ§ß®ý4‰á¨Þ{Îåï‹ì]QþŽÌÙ`ÍöÿP/£>0ŽÏ\êÀª¯ÛÌ\¸Ií¶…;LnXÃÖØ«V;¬yaËq°vÀgwõõ¯/swj{~x „7Bx;Œ~¿]Œcxéc™Û¥÷á.Âý„û ÷^ªü¿ì¯Þùò’'ß®yÊÃo›ß†« O¦õ×>;úÕ_ÔԎ°³sÙ}Ø~¸õãæó{wþ/þ\ûúÚ•ïîÞ—}¤>醾 ÖþIò(<~x³yõU`ç™›Ÿ!|ˆÑŸŠ ¦pô¸}ýÍcK8Éh~.§G…íÙ釻^ñÌ;µE;ëç:ú‡o4×ðñ—>-l¨ƒÐ{£ÁŒ„ÞK‹Þ«ze0ê ½W½7 ÁH轴轪¡÷P£ÀÐÑ{åÑ{£ÁŒ„ÞK‹Þ«ze0ê ½W½7 ÁH轴轪¡÷P£ÀÐÑ{åÑ{£ÁŒ„ÞK‹Þ«ze0ê ½W½7 ÁH轴轪¡÷P£ÀÐÑ{åÑ{£ÁŒ„ÞK‹Þ«ze0ê …p$¹òÙwÂFð´Gþxü_û:øÊ{{êaÑè½Ñ`FBï¥EïU ½‡2u†EèºoÜûÛ¯-½Uj0ôÞh0#¡÷Ò¢÷ª†ÞCŒ:C¤|ÆÓÀè½Ñ`FBï¥EïU ½‡2u†K3ù̦2è½Ñ`FBï¥EïU ½‡2u@Böï?ðò ¯þjǯ+æÏW¿rÇ“ü¹Â‹µÿÀùùúË•ÍW>ûNýDÃŒ„ÞK‹Þ«ze0ê€T„jøä“Ož~pÃeÿõN„O=¸áãO>™›Eñùß8 †`$ô^Zô^ÕÐ{(ƒQ$!CȆ>þä±;Ö~÷ïÞω0¼X|ôÉ¡Ùù,ù"7ŸÞ †`$ô^Zô^ÕÐ{(ƒQ$!ÄÂìÜ|ˆ‡Ÿß±¦[ËõÎï?4^»Øñé½Ñ`FBï¥EïU ½‡2u@æççgææßÿPïM’áÅúó{î=8^»Øðé½Ñ`FBï¥EïU ½‡2u@B,š÷ƒõÞùèkþøî‡_îŸ ¯¿ç¬†`$ô^Zô^ÕÐ{(ƒQ$!ï½9½7Y6zo&¼vz¯‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔIÐ{“¨Þ«†`$ô^Zô^ÕÐ{(ƒQ$AïM¢z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$ª÷ª‡! ½—½W5ôÊ`ÔI¨Rï]ußîùÃï<ÐqyõÔ{ÕÃŒ„ÞK‹Þ«ze0ê€$$ï½<Ò×}û•«:6X¼Ãë½'V¾Ýùd6¼Ò|ž¹¯œ×zíHÕ{ÕÃŒ„ÞK‹Þ«ze0ê€$¤í½¼Ðv¯ü«…o?ºï‰æµKuÀÞ;ïÖç[ì½Z”¶=·ìV‡ç×oX¸d„ê½êaFBï¥EïU ½‡2u@’ö^þ‰Ùð’)VïýÕ+b¯fž|I>åÓ{ÕÃŒ„ÞK‹Þ«ze0ê€$¤ï½>Ù‡Vö1Zn[YÕ>^«Ù(ÆöÞË›­5ÿºÜ¤¶M‹­—7žØëÃU]3²ø1àÈÔ{ÕÃŒ„ÞK‹Þ«ze0ê€$$í½ZJõøˆ/ϳ…OÕZ?Lkÿ`-ÜIíë–Þë{õ›>¯Ë®êóù^¿¨ë‚qÕ{ÕÃŒ„ÞK‹Þ«ze0ê€$¤í½`=ù‚mM•WV{f[fÛt¹ªf³÷:2¬x“¶OÐ{ýþèTïaX‚‘Ð{iÑ{UCï¡ F„ä½—›÷U^}õݺý“¹<Òv¯<¯Ç¿¦«oP»ŸöËï­ãÏA§÷ú¢÷Fƒ! ½—½W5ôÊ`ÔIÞ«Yûð O¯ÎB ÖÂ,ï½âU¹µOíVæÕ×¶Aû¿l¸ÈÞ+~6Øjã#Çâå±Õ{ÕÃŒ„ÞK‹Þ«ze0ê€$ŒSïÕÒ+OµÁ?ß{çú§…-»u­Ç¦Gè½>â ù_tñê½êaFBï¥EïU ½‡2u@ƪ÷êE—¥W—OÕ¦õ¬¬Fï…¯óm>y˾횈™Gê½… ]Ø ³åÙŽZ½W= ÁH轴轪¡÷P£HBÊÞË:ªø)\3äòšZ¨¬Öo W…¬µ\KïÕ#­Ùx…›d×6s®Ëg‰í½Wÿˆ¯-ùjwس!#«÷ª‡! ½—½W5ôÊ`ÔIHüù^^eM‹ùÔvmÛ'iµÜªÛ–ˆ Ù¥ñš7ii¹æ–™õ»*ö^fûSíñž#RïUC0z/-z¯jè=”Á¨’¸÷8z¯z‚‘Ð{iÑ{UCï¡ F½7‰ê½êaFBï¥EïU ½‡2u@ôÞ$:ÊÞ[ýÛÏïÝüaýDÃŒ„ÞK‹Þ«ze0ê€$è½It”½g¸C0z/-z¯j (ƒQ$AïM¢z¯z‚‘Ð{iÑ{UÃH@Œ: zoÕ{ÕÃŒ„ÞK‹Þ«FÊ`ÔIÐ{“¨Þ«†`$ô^Zô^Õ0P£H‚Þ›Dõ^õ0#¡÷Ò¢÷ª†‘€2u@ôÞ$ª÷ª‡! ½—½W5Œ”Á¨’ ÷&Q½W= ÁH轴轪a$  F½7‰ê½êaFBï¥EïU #e0ê€$è½ITïUC0z/-z¯j (ƒQ$AïM¢z¯z‚‘Ð{iÑ{UÃH@Œ: zoÕ{ÕÃŒ„ÞK‹Þ«FÊ`ÔIÐ{“¨Þ«†`$ô^Zô^Õ0P£H‚Þ›Dõ^õ0#¡÷Ò¢÷ª†‘€2u@ôÞ$ª÷ª‡! ½—½W5Œ”Á¨’ ÷&Q½W= ÁH轴轪a$  F½7‰ê½êaFBï¥EïU #e0ê€$è½ITïUC0z/-z¯j (ƒQ$AïM¢z¯z‚‘Ð{iÑ{UÃH@Œ: zoÕ{ÕÃŒ„ÞK‹Þ«FÊ`ÔIÐ{“¨Þ«†`$ô^Zô^Õ0P£H‚Þ›Dõ^õ0#¡÷Ò¢÷ª†‘€2u@ôÞ$ª÷ª‡! ½—½W5Œ”Á¨’ ÷&Q½W= ÁH轴轪a$  F½7‰ê½êaFBï¥EïU #e0ê€$è½ITïUC0z/-z¯j (ƒQ$AïM¢z¯z‚‘Ð{iÑ{UÃH@Œ: zoÕ{ÕÃŒ„ÞK‹Þ«FÊ`ÔIÐ{“¨Þ«†`$ô^Zô^Õ0P£H‚Þ›Dõ^õ0#¡÷Ò¢÷ª†‘€2u@ôÞ$ª÷ª‡! ½—½W5Œ”Á¨’ ÷&Q½W= ÁH轴轪a$  F½7‰ê½êaFBï¥EïU #e0ê€$è½ITïUC0z/-z¯j (ƒQ$AïM¢z¯z‚‘Ð{iÑ{UÃH@Œ: zoÕ{ÕÃŒ„ÞK‹Þ«FÊ`ÔIÐ{“¨Þ«†`$ô^Zô^Õ0P£H‚Þ›Dõ^õ0#¡÷Ò¢÷ª†‘€2u@ôÞ$ª÷ª‡! ½—½W5Œ”Á¨’ ÷&Q½W= ÁH轴轪a$  F„Zï½÷Ñ'›Öo[ñØæmª’Ï<¶9X¸°†ëOï}¬÷ª„! ½—½W5Œ”Á¨’0??hv~ÏÙw>Úùæûyã½Oßx÷Óß½S_{ëÓó3¾(\5¹†W'¼Fá•úô˃áU ¯] þZÆÁp †`$ô^Zô^Õ0P£HB¨…™¹ù¯ÌîÜ{èÃÝÞû|ÿ;;÷¿þ;áþé³}ýò­¯-=¾ß6˜Twî¯Qx¥Âë^µðÚé½j`FBï¥EïU #e0ê€$„V˜?|`fnOH¾¯}ºçà§{}òåÁ‰öƒ].y²{5÷áÂÂf“hxuÂk^©ðz…W-¼v‘ÿœÓp†`$ô^Zô^Õ0P£HÂ|†ùÃ3só!öœýêàl‰‰öó½3—=ývkìÕ †« O¢á5 ¯Tx½ò÷²—/*†ûh0#¡÷Ò¢÷ª†‘€2u@*B/„f˜ŸŸ™Íþ-ߤûêû{~öâ§5/yêí`óÛpUaã 5¼Rµ¸ûý€á> ÁH轴轪a$  F–¬ú²ð«µÁTÿ¦Jä/Öh0ÜGƒ! ½—½W5Œ”Á¨0t ¦òXÃÑ`FBï¥EïU #e0ê ƒ©<Öp4‚‘Ð{iÑ{UÃH@Œ:CÇ`*5 †`$ô^Zô^Õ0P£ÀÐ1˜Êc Gƒ! ½—½W5Œ”Á¨0t ¦òXÃÑ`FBï¥EïU #e0ê ƒ©<Öp4‚‘Ð{iÑ{UÃH@Œ:CÇ`*5 †`$ô^Zô^Õ0P£ÀÐ1˜Êc Gƒ! ½—½W5Œ”Á¨0t ¦òXÃÑ`FBï¥EïU #e0ê ƒ©Ü}àw~Ý‹Ï>üëkH’ä`^ôÌÁÂ…\’g>¾òªÕ.äÐ=úïÙqkáB–7¬jXÛÂ…™·lº÷äŸl*\8¡>ù«^ýÝo¿Ü7sàPößཷç@öáÞûŸøÍŸÞ_zïåkH’ä`^ôôÁÂ…\’Yï­z¸p!‡nÖ{Ûo-\Èò†UÍz¯ãrŽÆ[6æ½×qù$úä‹YïíÞ;³ïàŸtÒ{_îŸýtÏ¡w?ßÿ›?†Þ{æá—¯&I’ƒyÑÓ¿.ä’<óñyï/çp=úòÞ+^Î’æ½÷BáBŽÌ[6Þ“÷^ñòI4ôÞ+¿}}÷¾™}‡æfÊôÞûfBï½×ø|ï¡—¯&I’ƒYë½Â…\’gä½W¸C74ÉÝÛo-\Èò†U k[¸#óæ¼÷ N¨Yïýîõ]{³ÿ%ù™Ù’Ÿï}yð½]^ÿók_|æ¡—¯"I’ƒÙè½âå\¼yï=T¸C7ï½[ ²¼aUóÞ+^ÎÑxóÆ»óÞ+^>‰>ùâkŸïí­ý?ÌP¦÷²¿§÷H’,­Þ+¯Þz/’z/­ë½W7ìÞ[óâ3¾tI’Ì ŸþE°p!—dè½+W>T¸C74Éòm·.dyꆵ-\È‘yó†»Oúɦ…ê/_ˆÕ{W’$ÉÁ¼ðéǃ… ¹$óÞ{°p!‡nÞ{7.dyêæ½W¼œ£1ï½… 'Ô_¾p¿Þ#Ir¼Ô{åÕ{£QïERï¥Uïéè½§|é ’$9˜Þ+^ÎÅ{ÆãÏå½W¼œÃ5ï½› ²¼aUóÞ+^ÎÑxó†åyï/ŸDãôÞ OÿøWW$ÉÁ¼ð©Çƒ… ¹$Ïxì¹+V>X¸C74É][o*\Èò†U k[¸#ó¦Ð{o,\8¡>¡÷H’7õ^yõÞhÔ{‘Ô{iÕ{EºõÞå$Ir0/|ê±`áB.ɼ÷~\¸C7ï½ ²¼aUóÞ+^ÎÑxÓ†»òÞ+^>‰>ñÂ}QzïG¿ºœ$IæO=,\È%yzÞ{… 9tÊ{¯p!ËV5¬máBŽÌóÞ+\8¡†Þ{%Nï]F’$ï­›nýú½¿þÚò× † ÃU…ÙÕë×Ýý7w¿ZXÀ`Þ$76æÀ^ðÔc…®yÊO×ýðÅ+ sñ†Õ kXXÕšù/€ŠÛs¸Þ÷üÕÇ=¸µ°ò5ó_·Ÿ£õÞ‹—‘$É%Ù™|õØëØ’½¼~m1ù²ØÛrCa3–´3ù²Ø{áÊÂf\ªa ;“/‹½Ž-Ãûv\}Ü‹ÉwÅŠ6›,Ÿx>Jï=õÀ‹—’$É¥zë¦[šÉ—ÇÞ-… xD¯[»¼™|!öîÜr}aÅ žúym‘ƒ!QîáŠÂ̰’­ÉÖ¹°£zŽmI¾ËWü¨°ÁÄù‹çïÕ{$IŽ‘µä{e¬%ŸØ‹m-ùÄÞÐm&ŸØKb3ù*{Áñí½G^¸eëömÛcÆSÛñÃ/ýá Åãv«:,ž\÷|°þ âçk^X¹qÂÖpóö­¿pmxöó®†÷àŠmÏÕo™Žž{q˶õo±vÛú^¸t±ëöâ¥aûú-1 Vl[±ø¡ðР׆ý¼~Ë1fÖí®x±þÍxóÄö‡ú¯”Þ[ýÂS?|qY)_XöØó÷þhåŽÚ©$É1ñô‡^]¹uõ}Ù?2¹ôþ:ŽÞ£õþ VÊ'Öoûéó·Ýÿâ¥aß.ìí³wß —®ßºé¸¾V¸“)4œòÞŽHù1¡°PkÛ„í ÷À {àú­›9Ââ?òÂma?/Ü vÙ£¿~zÛ“÷e½W\í¦?ÏØõ^ØWî{áÒÇvÜg„“ä¸zoÅÖ5÷>y˜îG<µŠjá´ø±ç VÇpü“wÜÿBöæ:©sØÿ³ÞÛ¬÷‚¡ßîÙqÅ}/dÉQ\¨‚/\6Ó{C4ìë¶n^ÌPÈÚËy^ï Ó¬÷¶>uïó—…zêµþÑzï…Köþàó—þ|û}á$9ff½·eÍÝÛ¯¸oÇ¥?|>œ<á#3Ë VÉ'Öm{pë÷l¿<ìÛa/ìó­†kï{þ²pž­÷‚¡ß–o»"œòfEñ|q­š†«Âa3½7Dk½·˜¡P;hÿdûízoˆ†Þ{jëÓÙï;žï¹þYïý6Bïe¯èÀ>ɽ;.}tûý¬|¾ð#‘$Ózï¹-kïÚvå=Ùo³SÒdfÃbÙ£Û VÇ_¬Ûöã­Ë—oéri'ݽ/ìüÏ/»g‡Þ«úíÎmWß½ã²{³ïŠËÕ4\6›é½!Zë½E …l¿½ô¡íwè½!zïÉ-OßµýÊì÷ùï‰:×{n¾7üÌ'Éñs¡÷¶×Ϋ:Žá#óùpÖ»ìg~9È ¹Ð{;–Ýÿ|Ç>ßð¾.¾÷…KîÞ®÷ê†~»cëUwï¸<”pXœÂr5 W… Âfzoˆ.ôÞ‡Âó‡;ë½uzoh†Þûeè½mWÜó|XÿŽ5Ï}üù»‡ß{«^x*{G ìó—„güˆÞ#Éñ³Ö{wl½òî—Þ›ŸZ%3ËürU2ôÞ[—ßµýŠ{v,»ïùŽ}¾á½™Ë–ï¸TïÕÌ{ïêå;.¥°8…åjš­Ûó—„ÍôÞ­õÞ¢†Âó‡ûÁíw„ý¼p'ؼ÷ž©¯aÁ>¦÷H’‹Wï‘ñÔ{ƒ©÷ª÷Òš°÷ž¼ï…‹7ì Ï/{dÛ}F8IŽ›Þ»âîËîÍÎG;Žá#3—ṵ̈`…Ì{ï®»¶_~ÏŽKî{¾cŸoxofè–ez¯fÞ{W-ßqY8(…Å),WÓlÝž¿8l¦÷†h£÷1ž¿(ìØn¿]ï ÑÚßsÖ׿°à {~y”Þ»÷ùðŽÔ‡güÈÖûXa„“äxzïÙÍkoßrÅòíËîÙqqñ>J³aqI6,ô«bÖ{[îºsÛåwo¿äÞû|Ã{2/¹k»Þ«úíö-Wݵý²pP ‹SX®¦Ùºí¸8l¦÷†h­÷5v\vì·é½aZë½Û·æë_Xð†íˆÕ{nØj#|…ÿ‰m’/½wùòí—Ü“vÃGf6,.Î{ϰ`EÌ{ïÎ;·]v÷ö‹ïÝѱÏ7¼'3tË%z¯fÞ{WÞµýÒpP ‹SX®¦Ùºí¸(l¦÷†h£÷1v\vì·Ý¦÷†h£÷òõ/,xC½G’\‚zŒ§ÞL½—P½—Ö”½—‰uÇEËw\òS½G’ãg­÷nÛry8×¼;?µJf6,ô+e8þá–;ïØvÙòíß³£cŸoxwæÅw꽆¡ßnÛråÛ/ ¥°8…åjš­ÛŽ‹ÂfzoˆÖzoQCaÇ…aÇþ±ÞªµÞ»mk¾þ…oøó8½÷Ë{ž¿`pÃÞ°ãb½G’chÞ{knÛrY>Úà é8†ÌlX\ôÈÖ{õ+c£÷.Í{¯cŸo˜÷^è½W7ï½+îܾ¬Ñ{Å«Ùè½ezoˆ6zoCaÇzoè6z/¬ÿŽvþŸï¸+Jïݽ©uÇ…wé=’Kk½wë–˹æòᤳã>2³aqÑOõ+d8¾Ë·o»4;uÛѱÏ7\þü…ËŸ¿è½×0ôÛ­[®¸cû²å;. ‹SX®¦Ùºíë¦÷†i­÷5v\vì齡z÷îÜ~q¯ÿÑ(½÷ü/ïÞqþàn{C>ÂõIŽ™õÞÛ|éÛ.^¾=ÌïŽcøÈ̆Ņ?ÝzaÁʘõÞæ;oߺì®mݽ½cŸo¸|ÇáÄúŽm뽚Yïm¾üŽm—,ߊ®çq)[·íaÝ.Ñ{C4ë½-›5¶Ÿvìm½Uï Ñzïm ëQ¯ÿÑíz$¹hõO½7˜z/¡z/­Ézoåó¿\¾ã¼ÁÝ~þÛ/ü‰N’ãg­÷nÙ¼ìŽmݵ=œ?uÃGf6,.Ð{¬’á<ø¾Íwܶõ’;·]¸|{Ç>ßð®çßµã‚Û·]¤÷j†~»eóe·o»ø®í„Å),WÓlݶ‡u»Xï ÑZï-j(l?/ìØl½Eï Ѽ÷žºuKXÿ {íün¿Sï‘$«Þ#ã©÷Sï%Tï¥Uï‘$‡¬Þ#ã©÷Sï%Tï¥5eïݵãÜÁÝ~ÞÛ/xØ'Éñ³Ñ{—ܾíÂ;·‡ó§ŽcøÈ̆Åù?Ùz·aÁʘ÷Þí·n½øŽmܵ½cŸoxçŽóîÜqþmÛ.\·u“Þ †~»yó¥!€ïÜ~~XœÂr5ÍÖmûùa3½7D½·ˆ¡°ýܰc?°õf½7Dk½wË–°þôÚù¶ýŽ8½R»í¼°7è=’Cë½·é’Û·^xç¶óŠðQš ‹ó²Eï±:f½·éö[·ä½·­cŸoΪC·Ü¶UïÕÍzoÓ¥·o½èÎmçgÉѱb5³uÛv~ØLï Ñzï-f(lÓ{Ã7ë½ÍOe½½õ‚^;¤Þ{â®íç n¶7œÿ°_Ù’äøÙ轋³Ñ’vÃGf6,ÎûÉ–å†+cÞ{·Ýºå¢p"t×¶Ž}¾áyºÜ¶õ½W3ï½eµÞ‹SX®¦Ùºm;/l¦÷†h£÷1¶vl½7\½Öÿü^;¬Þ»3{S ê¶so×{$9–ÖzïæM‡sÍ;¶…“ÎŽcøÈ̆Åyë=VÈp|ï¦ÛnÙrQ8ºs[Ç>ßðŽíçÞ±ý¼[õ^ÃÐo7mZvÛÖ ïØv^XœÂr5ÍÖm[èd½7LøvËæE …mç„û‡zo¨†ÞûÅæ§nÞÖÿü^;ÿ#ÑzïìÁÍö†óÞj„“äØÙÒ{çß‘vÃGf6,ÎÕ{¬’Þ»0œݹ­cŸoxGž.·n=_ïÕlô^Öaq ËÕ4[·mç†ÍôÞmé½# …mg‡û‡[oúź­…;áÀ6zï¢Û¶ž×kçdûíz$¹XõO½7˜z/¡z/­ÉzoÅŽ'îØvöàn='<㇌p’?Cï=³yÍM/¾uËù·o 'OÇð‘™ ½ÇJzïžM·Ý¼ùÂìÔmkÇ>ßðöü—·l9ݽ—úíÆËnÝrÁí[Ï ‹SX®¦Ùºm=7l¦÷†h­÷5¶žvìû·è½aZë½›6]të–ózíül‹Õ{g n¶7œ«÷Hr Í{oõMóÑ’vÃGf6,ÎÑ{¬’yïÝzóæ ‰Ð[;öù†·çérË–óô^ͼ÷.©õFXœÂr5ÍÖmë9a3½7D½·ˆ¡°õ¬°cß¿åF½7DóÞ{2ï½s{íül»Mï‘$«Þ#ã©÷Sï%Tï¥5aïýâŽmgn¶7œóЖ»Œp’7½wa6Z²óÑŽcøÈ̆ÅÙ¬yïÝ’÷Þ9wlíØçÞž§Ë-[ÎÕ{5óÞ»¸Öaq ËÕ4[·­g‡ÍôÞÍ{oÓ¢†ÂÖ3ÃŽ­÷†k£÷ÂúŸÓkçÕ{·o=sp·œž±Þ#É1´Ö{7n¸ð–ÍçÞ¶%œßð¶ü—7oÖ{uC¿Ý°áâ[6ŸwÛ–³Ãâ–«i¶n[Λé½!Zë½E …-g†û¾Ízo˜f½·éÉ7†õ?§×ÎÿÓ­z$¹hõO½7˜z/¡z/­i{ïŒÁÍö†³õIŽ¡Þ» -ÙùhÇ1|dfÃâ,½Ç*Ùè½óÉÐí[:öù†·åéróæsô^ͼ÷.ªõFXœÂr5ÍÖmËYa3½7D½·ˆ¡°åŒ°cß·ù½7DóÞûåÃúŸÝkçÿéÖ[‡ß{ÏíøÅmÙ›jP·œyË–³Ô{$9~Özï†|´ßº%œtvÃGf6,ÎzPï±BÖzïÆM燡۶tìó oÝzæ­[ϺIï5¬õÞ͛ϽuËYaq ËÕ4[·-¡“õÞ0­õÞ¢†Â–3ÂŽ­÷†kè½Ç7ýò†ܼùì^;¤Þ{ü¶­§n¶7œõà–;p’7½wþ-a´dç£Çð‘™ ‹3ÜlX°:æ½wó›Î 'B·méØçÞš§ËM›ÏÖ{5óÞ»0ï½PÂ=KÙºm9Sï ×Fï-b(l9=ìØzo¸6zïü›7ŸÕkçÖ{á 5°›Ï¸eóYF8IŽ¡õÞ[ŸöÍgà£4z•²Þ{Ï 'B·mîØç†³êÐ-7mÒ{u³Þ[á͛νuó™Yrt¬XÍlÝ6Ÿ6Ó{C´Þ{‹ ›O;ö}›ôÞ0­÷Þ†óoÞtV¯?Vïݺ僻ùô›³~‡N’ãf­÷®_Þ͛Ϻes8ê8†ÌlXœaX°J†óàÐ{7l<7œݺ¹cŸoxKö9É7n:+œgë½`è·ë×_pÓ¦snÙ|FXœÂr5ÍÖmóa3½7Dk½·¨¡°ùaǾwÓõzoˆÖzïú çÝ´éÌ^;ÿO¶Þ¢÷H’‹Uï‘ñÔ{ƒ©÷ª÷Òª÷H’CVï‘ñÔ{ƒ©÷ª÷Òš²÷nÙrÚànþÁM›Ïø±N’ãg­÷®[îM›Ï¼ys8ê8†ÌlXœnX°J†óàåoºaã9áDè–Íû|Û·üàæ-§ß°éL½W3ôÛuëÏ¿qÓÙ7o>=,Na¹šfë¶ùô°™Þ¢µÞ[ÔPØ|ZرïÝtÞ¢µÞ»nù7n:£×ÎÿðÖ›õ9~®ùbþð'í¸œL­Þ#ã©÷Sï%´:½7™§^I{oó÷wÓi7m:ýÇ›ŒpŽØ7ŸØux~×§g/Oà­oË3! f½·)ôÞ97…Ѳ)ÌïŽcøÈ̆Å~¼évÃbœ=ëå󇿸µãrv5ë½ 7Þ°áìp"t˦Ž}¾áÍ›O 'Ö7l.þ7™{À‰6ï½U×®ÏÎGoÊÎG;Žá#3§ýxÓmÓ8,zÁjçë-—gçõ3˜Âá"¿‡ù·Þkl¹`~' [†oËœ x<­·¼÷n¸~ÃYáDèæMû|Ûòt §wCì½Þ¯û¤ôÞ¹7l<3ôFXœÂr5ÍÖmSX·3Ë~¾×í 8à®>‡J£÷16}/ìØcÚ{‘Ž9ñeyï=Ö?ï½îëÿð–›ô§Ònëñp)“5þq„,¨÷ÆÂ®G°ü“½ž‡µŽÃEöÇK]N€ò1ºuà`ê½%™®÷ú¼îz¯Ãno@½7ɽm'(KÖ{Ïîxì¦Í§î¦ïݰé´MççÈìr°n{·×ÿŒ»å/£jçgH™Åck~‡uÛGfý(Ó¸«ü†ùcÕ·o?囵Ýy÷{n½‡ö«z?²¼µÞ»fýY7lúÁ›ÂùSÇ1|dfÃâûz¯i~k˜Ý¤í´#?4užˆäçý½Î{ÚÿX´Ø–Ý>í§YµWË“ìr“Þ·)0œß¹á†ë6œN„nÚÔ±Ï7¼qó÷nÜüýë7þ`Ƚ×ýuoŽ™}¦L«²Ý »‡üQr‡Û'¡ß®YwîõϸqÓ÷Ãâ–«i¶n›Âº³÷ºÿŒÝÎú®dËùF°¸\ 7 oáfï_©þËÞzÿ×.ÞZï-j(l:5ìØwoº¦lï ý@Ô~굤3ÀŽoûËѸ‡ÌæKÜó¶ü,íO©¡÷ÛôDXÿp@èµó?´åF½Ç©4³µ#Ú”wuý=Ü|“×oR¸yë·oÑÚ{¸å°•?PëÛ¾å(ß~H:Â=ç×¶ ÛŸXxÚ O’†zo,l§çæ§t-“¢‡‹ŽÓ”ÖË»ÝUþ  ‡ Âsèqði9¦uœcµÞ¤p|ëx¶SbºÞëýº·Ç#½jݯ*ÎÁ|˶qVα齅=¼öms›â û¬dþrt_ØÂ·ù ÷ùÆí¯Tß§ÔúöÏ/üí6êÞËüE-Î"Dm×fÖß Kß6î¶ã!Úï­Ù{ù·?EëÍÛ^÷Ö'V|)û˜®÷¶?vÓ¦ïîÆSoØø}½Ç¸™mï®â8ß~á Üvj•ß°w³Õް…Û¶|ÛjᮎpÏÇ‘âöäЭ÷Þº3oØxÚÃüî8†ÌlX|ïÇ›nÕ{¹},¹í‡‹ŽãR›Íó›–Ž.‡—l³ú=>Í£VÇYQßã[ñà6-f½·þ†ëÖŸN„nÚØ±Ï7¼qÓ©áÄúú § ±÷‚Ý^÷`þJõx¡[^µ~/hmkÝc[vž!˜÷Þ9×o8ýÆ¡èz—²uÛÖíôh½×ºÓ¶½%k+ÐòŽë»ÿíwÊÑÒ ­¯Tfï§T8\éèÑ×zï-f(lünرïÞxu‰Þëøñˈ‚Å[·É_îÂr5·ï¸ÃöÅ,þÅÇj{Ý›/åR€Yïm|"¬8 ôÚùõ§Õ.ë¶eñ œ¿ [¶oyǯ*¾½;¸ùm»[ wu¤{.~Û÷Üõ8Òõ7[ä°Ô{cᑎ`],.oí±^îrxY8¸õ>ø4Î¥ò§×ï ÚîÀÏv›ÞkÝÇZv­>¯Zß´ó”ºó’2NhïõÜÿ‹oçÖ»jω¶K ·êó”ò/º÷Æ’}ï ó@Ô¶¶uc÷^ï×=¿·]Â6ýæí¦í½“7ßôãÚå`¿o°¥¼Û;¾mò›Ç‚.G#ÜsÇÑ0Û¾pØ"‡k£÷Îê²óÑŽcøÈ̆ũ?Út‹ÞëwaÓâáb±6Ž`=ΊêÇÌžŸ–3Î|›…“˜¾Ç·AŸí¤›÷Þu×®ÿAØ·oÜØ±Ï7¼!O—ë6|/^ïµL®ÖáØçUë÷‚vÎÁ–gæ½wÖuN ½§°\M³uÛÖí´ô½×ÿ/vKë]u¼6n}¥2{>¥ì&C{5zoCaãÉaÇ.Õ{?~ÉQ—S¯%v,ráµ+þ}_÷æ~ÕmëeKï}¯×Ϋ÷nÈÞTƒºñ”ëôcÛå½Ôv \ú»½åÚpçÅnË»½íÚ…í8.gö¿çâa¥cûðSô<¬Y뽫ÂhÙø½ë7†“ÎŽcøÈ̆ũè½óWÛå ì&‹8ÃË6+újǺÂá¥ÿ·ÍÇÍ/oÜaþ´›¥ÂMÚŽo·)1œß±þºkÖÿ ìÛ7lìØç^¿é”ë7}÷Ú!ö^ï×½0û¼jG¼jaÌ÷„…-Kúíªug]»á´ë7~7,Na¹šfë¶1¬Û8ô^¿å*tKí}Ýý”£öJÕß,m¯TcËîO©~Ÿ-ürÔzoQCaãÉaÇ^^ª÷ŠëÖÿÛ#ˆ:–¨~«Î·CËú´½²m«¶—£ãÚÜÂ3lyÝ[_ôü!:žXW›½½vþH½÷è OÜ '_·áÔ6NåçÈìr°n;P.íÝÌï°nËÑ6˜¿·»åÛ7î¸Ã¦½ï9¸pWÛ¶Ýy×;$KXï½µ§‡õõÂüî8†ÌlX|÷7ë½6[­çÙå‹è½`¯{(^U¼·®ŸüÂ…cim›¶sæMº9ÛîjÌ{ïÚkÖöí6tìó ¯Ï>'9åÚõ§ó󽞯{Ûp,nY˜J=®ªï³á`÷½wP³Þ[{æµë¿ý†Pt=KÙºmëöýqè½Ì>+Ù²VáµÈÎIZÞ ïŽì³Ê_¯â+Õû)?eêþôg½÷36œvìå®\tïÕW nóGk»ªÌ¨í5jºÔ3À–Gl}9:®mÞ¤Ûëž?hËÏRÛ:ž[§õÞ[{z8 ôÚùÜ|½Þ#ÇÀâÑ„SõÏ”½ÓÂÙöÐuïM¸]^Ž'!±zoVâÔ+Yï=³ýÑë7ž8¸ùÞðC#œÓdñ—I业÷ÞÊ«ÖþàÚ ß½nC8ê8†ÌlXœ¢÷X%_·õöõ×^½îû׆nÙбÏ7¼nãI×m<ùšõßÕ{5C¿]¹öŒkÖïº '‡Å),WÓlÝ6„uûÞ”÷^Çç“ùVƒ¾@Þ[ÄPØpbرïÚpŘô^5N½j½Ö?zíü?Þ|Þ#“Ûö—úä8«÷Èxê½ÁÔ{K¶ð×’…¿&]ŠÛ{9õÒ{$É!«÷ÈxVµ÷b«÷:¹ŸïUÔ½wÝÆ7ßî7ÂIrü¬õÞ•kO»fÃ)×nçOÇð‘™ ‹“ýrU2ï½k®Z÷½k²žÚ±Ï7¼vã‰×n<éj½×0ôÛkO¿zý©×n8),Na¹šfë¶!¬Û©zoˆÖzoQCaà aǾsÃåzoˆ†ÞûùÆÇÃú_½þ”^;´Þ ©]âµëO¹ƒN’cg½÷ÖœvM-ëO,ÀGi6,Nþ¡aÁ ™õÞºk®Zû½kÖŸ|ÝúŽ}¾a8«ÎºeÞ«›õÞšÓ¯^wêµëOÊ’£cÅjfë¶>¬›Þ¦õÞ[ÌPXBرï\¯÷†i½÷Öœvõº¼· kžûãMzïéí^»áøÁÍ÷†û7Üd„“ä¸Yë½+Ö|ÿêõ'_³>œ?uÃGf6,N2,X%Cïݶîê+×~ïêÐ-ë;öù†×dŸ“œxÕºSô^ͼ÷~pÕºï^³þİ8…åjš­Ûú°nßÕ{C4k ë;¶Þ®µÞ ëÕº“{íü?Út­Þ#I.V½GÆSï ¦ÞK¨ÞKkÂÞûÙµŽÜõÇç#üF#œ$ÇÍFïeç£×dç£Çð‘™ ‹ Vɼ÷®ºrí©Wg®Ü±Ï7¼&O—pz§÷jæ½wZàÐaq ËÕ4[·õaÝNÑ{C´Ñ{‹ ë ;¶Þ®ÞûÞUëNêµóÿhÓ5QzïšìM5¨yýßg„“äøYë½ËÃhYÒÕ¡¸ ðQš ½ÇJYë½+ÖžzÕú¯Yß±Ï7¼zÃñWo8áJ½×0ôÛåkN»rÝ)W¯?!,Na¹šfë¶>¬›Þ¦µÞ[ÔPX\رïXyØÏ w ½÷èÆÇ³õ_wR¯ÿ(½·ígÙAj`×õ:½G’ãh½÷Vç£eÝñÅø(͆…Þc¥ÌzoíUW¬9õªu'^³®cŸoΪ³nY«÷êf½·ú´+מrõº²äèX±šÙº­ ë¦÷†i½÷3Övl½7\ë½ÖmÞÛ…5Ï×{ÇîºãÂ×{$9†6z/œ†ÑIÇ1|dfÃâ½Ç*Ùè½ï^µî„kÖuìó ¯ÎÓåʵ'齚Þ;9ôFXœÂr5ÍÖm]X·“õÞmôÞ"†ÂºcÃŽ}ÇúËôÞÍ{ï±lýמØkçÕ{WgoªAÍë_ï‘äzï©M+/[}ê•ëNº*Wá>J³aq‚aÁ*΃o]{Õåk¾{庮^×±Ï7¼*û»¸ã¯Ð{ C¿]¶ú´+Öž|ÕºãÃâ–«i¶nëºé½aZë½E …udžûv½7Tk½—­ÿÚ{íü¡÷~§÷¾3¸yýá$9†6z/œžxUv>Úq ™Ù°8þ¾ 7¬ŒÞ;åÊìÏ•;öù†WåérÅÚõ^ͼ÷¾8ôFXœÂr5ÍÖm]X·“ôÞmôÞ"†Âºï„ûöõ—>¾nKáN8°Þûî•kOèµó?°éê8½Rƒ{ìUkO¸o½Þ#ɱ³Þ{«Âh9ñªµÇvÀGiÇß·^ï±:f½·&ï½µyïõ0œUgݲFïÕÍzoUÞ{kË’£cÅjfë¶Vï Ùzï-n(„[ï ×¶Þë±ó?°1Jï=rÕºcJ˜í a„ÿÐ'É13ï½—®:劵'\¹6œ?à£4 ‹ãô«dè½[Ö\yÙš“¯Èº¥°Ã/xeö9ɱ—¯9AïÕ ývéªï]¾öÄ+×§°\M³u[{lØLï Ѱ®Ù²q‘C!ìØ·­_¦÷†h­÷.]Öÿø^;ÿõIrñê=2žzo0õ^Bõ^Z“õÞSÛ¹2{S ìwÂ3¾Wï‘äøYë½e«N¹|í W¬ '…ø( Ãâ8ÂU2ôÞÍk®¼tÍÉ—¯=®c‡_ðаó¯;ö2½×0ôÛ²Uß»lí‰W¬=6,Na¹šfë¶öذ™Þ¢µÞ[äP;¶Þ®µÞ[¶:¬ÿñ½vþû£õÞÑ%Ìêß'É1´Ñ{á|ôø+Ö†AR8€Ò0,޽wýõ†+cÞ{W\ºæ¤Ë³Ï© ;ü‚WäérÙšãõ^ͼ÷N½,ï°8…åjš­ÛÚï„ÍôÞmôÞ¢†BرõÞpmô^öK¢^;ÿý¯ŠÐ{[¹ríÑ%<æŠ5z$ÇÑzï­<ùò5Ç_±æ˜Žø( ÃBï±RÖ{oõI—¯9¶c‡_0œUgݲZïÕÍzoå©—­9áŠ5ßÉ’£cÅjfë¶&t²Þ¦õÞ[ÜP;ömëôÞ0ÍzoÃcYo¯9®×Îÿ†8½wÅÚ£J˜í ÷d#Ü»‘$ÇËZï]²òäËÖwùšpþT8€Ò0,¾sÏúë VƼ÷._¶úÄ˲n)ìð ^vþµÇ\ºú8½W3ôÛ%+¿Bîò5Ç„Å),WÓlÝÖ£÷†k­÷9ÂŽ}ëºKôÞÍ{ïç—¬:é²5ÇöÚùïßp¥Þ#I.V½GÆSï ¦ÞK¨ÞK«Þ#IY½GÆSï ¦ÞK¨ÞKkÂÞûéåk¿]Âlo0ÂIr ­õÞÅ+Oºtͱ—­ çO…ø( ÃâÂU²Ö{—¬>áÒ¬[ ;ü‚—…íÑËV«÷j†~»xå)—®9þ²5G‡Å),WÓlÝÖ6Ó{C´Ö{‹ aǾeÝÅzoˆ†ÞûÙ†Ÿ_¼êÄK×|§×Î_¬Þ[óíuÙêïܳÎ'ɱ3ë½+.^qÒ¥«½lõQðQ†Å1†«d½÷Vpéêc:vøÃYuè–e«ô^ݬ÷Vœréêã/[}t–+V3[·ÕG‡ÍôÞ­÷Þâ†BرoY«÷†i½÷VžxéêïôÚùãõÞ·Jøm#œ$ÇÓFïå£eu$…ø( Ãâè{Ö]kX°2æ½wÙ%«Ž¿tõÑ;ü‚—åé²lÕwô^ͼ÷N¾tõq¡7Ââ–«i¶n« ›é½!Úè½E …°cß²ö"½7D[zï˜^;ÿ}®~ï=¹õ§—eoªÍêÿn½G’ãg­÷.Zqâ²Õß¹tu8é,ÀGiGß­÷X!CïÝ”÷Þ²ìsªÂ¿à¥aç_sÔ%«¾γõ^0ôÛE+N^¶ú¸KCÎe1\\±šÙº­>*l¦÷†h­÷9ÂŽ­÷†k­÷.ZÖÿ˜^;¼Þûf ³ú7ÂIr môÞ ÙhYIá>Jð8êîu׬Œá<ø¦5—^²ê¸eÙçT…~ÁKót¹dÕ1k¶lÐ{Á¼÷NZ¶úØÐaq ËÕ4[·Õß›é½!Úè½E …°cë½áš÷Þ£­ ët¯ÿ¾ —ë=’äbÕ{d<õÞ`꽄꽴¦ì½KW³„ßZ¶êèåz$ÇÏÐ{On\qás'„sÍe«ÂÉSá>Jð8êîµzÕ1œ߸úÒ‹Wwɪ£:vø—…õ·/^©÷ê†~»ð¹“.Yuì²U!çz—²u[:Yï ÓZï-r(„ûæ5zo˜f½·þÑÐÛ—¬:º×Îïú(½÷“KW£„ß #|¹_Ù’äøÙè½ã³Ñ²* ’Â|”†añm½Ç*Ùè½c/YõíŽ~Áeyº\¼òh½W3ï½/YõÐaq ËÕ4[·Uß ›é½!Úè½E …°cß¼æB½7D½Öÿ¨^;¿Þ#I.A½GÆSï ¦ÞK¨ÞKkÊÞ[¶úë%Ìö½G’chÞ{Ï]øÜq¯:ê’Uᤳp¥aX|k¹Þc… çÁ7¬^vÑÊï\œuKa‡_ð’°ó¯þÖE+Ò{5k½wñªcÂA),Na¹šfë¶ê›a3½7D½·¨¡vì›×\ ÷†hè½GÖ?zኰþßîµóß³þ²8½·êë%üÆ%+¿m„“äZï½g»xåQ—¬üfÇ|”†a¡÷X)³Þ[µì¢ß¹xå·:vø/ ;ÿªo]´BïÕÍzïÙ/^yL8(…Å),WÓlÝV~3l¦÷†hÖ{›7.r(„[ï ×zï…Þ^ùí^;Ö{¯G齿-á×ó~µN’ãf£÷ŽÍFËÊ0Z ðQ†Å7 VÉFïsqvÞ\Øá¼$K—o^´âÛz¯fÞ{'\¼òèpP ‹SX®¦Ùº­üFØLï ÑFï-j(„ûæ5çë½!Úè½°þßêµóë=’äÔ{d<õÞ`꽄꽴&ë½_nýÉ%Ù›j`³O{ï2ÂIrü¬õÞÏ{ÑÊo_œZà£4 ½ÇJYë½ WsQöw‰…~Á‹Ãοê›꽆¡ß.xö„‹VJaq ËÕ4[·•ß›é½!Zë½E…°cߤ÷†j­÷.x.¬ÿ·zíü‘zïáKVýM ³ú×{$9†6zï;ÙhYFKá>Jðø†Þc•Ì{ï’ W}QvÞ\Øá¼8K—o\¸â[z¯fÞ{Ç_´ò¨pP ‹SX®¦Ùº­üzØLï ÑFï-j(„[ï ×¼÷~vÁsaý¿Ùkç¿gý¥zoË׬ü›þíÅ+ôIŽ£õÞ{æ;­øÖÅ+¾Þq¥aX|cùÂÕññµ[nXyÉ…Ï}ÑŠotìð ^vþ•zoÁzï­8*”Ââ–«i¶n+¾6Ó{C´Þ{‹ aǾiµÞ¦õÞ ½½â›½vþ{ÖÅ齋Wþu ³½á®µWá$9nÖzïüg޹pÅ7/ZN: ðQ†Å×ïZcX°:†Þ»~åÅ}ÂyÏ}Ás_ÏF{Ç|”†çpþ³GóÌqg?}ŠaÁ ÷{g=yêÙO|î3Çÿì·/\ñ·…½½Õ Wüõ…ÏýÍÏ~ó¼gŽ9çéÎz2œ,îmZÌJ§žóÔ‰ç=óóŸûfX–°8…åjZ[·°YØ8Ü$ÜÐq£¤K aÇ»wØÉîvø°ÛîK2_ÿïžóôñç?sÔφõï¾ó/_¥÷ºhÅØ ³½áoÎoÅÎyꤳI’c`8 ‡Ãò¹á¼êÙo]øÜ߆Ãuá>J³aNyŸûæ¹Ï“ÿ~0œ½\xÂääxòÙOŸxÎÓÇåçÍ߸ð¹¿îóþºð¹,]ÂéuöËñgŽ=û©ÎyºpoSd(·sž9ö¼góóÝþë–4þ:l67É“¯xo\’K õõîa'»zØá´Kš¯ÿñç>}ÌÏ~ó‚çj¿$*.{pùÚK†ß{OlyèÂìEÐ ²_ÙþõùÏýíyÏ}ëÜl‡8æœg¾ö$’dZÏ eõì1ç>óíóŸýÆÙïÑ‹ðQº0,ž5,8ñæ{ï1¡CÎ{ö›ç?û·„œË~ý]Üí[üÚ+þæ¼<ùÎ ûxo¶ßá”X_·gŽ ¥p4ÈŠ¢¸P¿6 ‡›„:h”tIC!;h¯øë°{‡<ìêÖ¿¼að…õ?ïÙoŸÿÜ×Ã@ìuЈ×{ÿ_9ÿÛÏ}íügÿæüg¿žù\x“$Ó{^8Uz®v2†w$…£÷ˆ5,X!óÝ8œ4‡÷WÇ®^4ægÏÙïÇû²ãަƽ!!ÎÏ>í r„ƒR¶ná ñ\8h„usЂK Ù–Ùú;hÉlÿ6Ä^>»¯ÿòµcïÕžní@–½{I’cb~XÎæJúØkÏ“œD³9ß«{œ·µšo™Õ 3}PªmY¼9v)C¡qÐwÜ3+í#¬¬Þ» {-Kû\þ†$IŽ•ÙÁ¹ãˆPÂUr©ï/ûp€ƒ’u¢vÚ´iýïŠÖ{E’$I’Lh´Þ{î¯H’$I’ Ô{žÿÜÿK’$I’Lè]k/Ò{$I’$YAãõÞ%I’$I&Tï‘$I’d5Ò{¿ØòàyÏýW’$I’dBïŒÒ{›<ïÙÿ‡$I’$™Ð;×\¨÷H’$I²‚Æê½sŸý¿I’$I’ ½cÍz$I’$+¨Þ#I’$Éj©÷~|γÿI’$I2¡¡÷^ŽÒ{Ïü_$I’$Ʉޱ:Bï=¾ùÇg?ó’$I’$zûêóõI’$IVÐH½÷£³Ÿù?H’$I’ Ó{›~tÖÓÿI’$I2¡·é=’$I’¬¤ñzï¿$I’$zÛêó¢ôÞ™Oÿ’$I’dBãõÞ&I²:¾¼}þðûk7ü§âå$Iޱ·­>wø½÷ئñÔ&I²›§¬ùòðü—^ÿÔê¸jnxô“Çðš?¼ýáÁîa þ¨ÄsŽëu¯>üÉ›§t\N’ä¾uU”Þ{àŒl"’$§Õ—¶çI¶`$µk[{o©æ·ý躎ËcÛlª¶KZÀ×^j^U÷ú7ß_Ø`ÀŸw1v>7’$ëê=’d³Þ{͆Öo›¶èÞ+ÜIf¢¶i&µk{m?`s›¶›D{Úz$ÙÓX½wúSÿ‰$9½6©yÉCž?¼ý¡ìë…Þk^ÛÝŽ;9}ã>üñ›§,\2 ÛŸp¯ç'ßk/Õ¾Í?ýû躶 b™=ÖÈׄ$9Æë½ÿ$9½ÖSmá’Æç]áë“ó|úÙõ«ò¬ûñ›'çæÛ4.ÌüèºÖÍj—Ôn~ú†Ÿ…k^þÚKõ» æºý¡Æáγ; Ýr“ÚöÍ;o<ó›—7µ}›ÌÖŸ+ï½–Ÿ±§µk6¢`ï*sáVaIk½×ò´{Ý'Irú¼uÕ9qzïÉÿ$9½þªÑ{Kê™”}Ýè¢ÆåÿáäúfÙ­¿ö«úM:爛^ÍíƒùMzÝÃõ¨ý º…;it]í™,d^ý&…'›ßI}û“/Øò36î9äVû6m¶?\¸IëÓè»,o›)ÛuãÎå"IN™±zïOþo$Éé5«Ž÷Vo¨{ÝÞ«5IþíÉ«ódº®¹ñ‚׿ymýÛö;ÉlLã’ü®šÛç>B«qçíÛ¸öðößæѺAûÈ,Ö„-¶| W0¯Än?KñÉ÷º¼ùCV ³Ø{m‹™Ùþ¸$Éi2VïöËÿH’œ^k}²¾ãòÌ“òÞ{äÚâ×o?¼¦¾eç¬$¯“º›{m­ñò[µ~]óÁCÿl°¹}~¯þª¹Aû(~›Y¼‡¯y5ÄUûÆ f?Këuò½.oùA²Gi¿¶å’âC’œvo^zïU½G’ª‹ì½bÛ,±÷zõX# Ëö^×|ê,·ÜÎÇjµÛµ½ú°ÿÕqmÛštÖ IrªÕ{$É.²÷Ú›'±bnµÕKÇ%yG-ÔW·oï½üæ]>Ê«=ÏÖä«=îÂË~üâ£.Xx¶ánk÷Ðí§èñmíž[º°qöL>>%INqzoã§=ñI’Óë‹yï­ë¸<³Ñ{µo×Õ‹%‹–ߟ”¥Tè¢ÆÆ×þ>«—ÌÚ…ùÆa³æ™ÙcÕï¡ð ùÍÛ.©÷^ãÛÚ¾úbsƒFï¿î°íAÛï³ÛÅçÜpá ¶>Vï*Ør«ð¸Ùól»ÿÖÛ6×™$9•Þ¼"Bïý|ã¿ÿÄÿJ’ä[OÁŽËI’œo^q–Þ#I²è³O·ý¸ãr’$'Èh½÷‹ÿ•$ɉ5ÿ‡…\Óq9I’“¤Þ#I’$Éj«÷¾÷‹ÿ…$I’$™Ð›bõÞãÿ I’$I2¡7=§÷H’$I²Šê=’$I’¬¦QzïÑ÷ŸúøÿL’$I’LèÏ¡÷6Üêcÿ3I’$I2¡7>«÷H’$I²ŠÆê½ï>öH’$I’ ½ñÙ3âôÞÏÿI’$I2¡z$I’$«i´Þ{ô?$I’$zã3qzï”GÿI’$I2¡7Dé½õ÷Ÿò³ÿ‰$I’$™P½G’$I’Õ4Jïýlýý'ÿì"I’$I&4Zï=ò?‘$I’$zÃÓQzモù÷$I’$É„ÞðôéQz蘭þ{’$I’dB¯Jï‘$I’dÓ{ëî;é'ÿž$I’$™ÐX½wâOþ=I’$I2¡×Å꽇ÿI’$I2¡×=ù½G’$I’4Zï=ôïH’$I’ Õ{'<ôïH’$I’ Ó{kï;áÁG’$I’Lèu¿ŒÕ{ÿ–$I’$™Ð(½÷ÈÚûŽÿñ¿%I’$I&ôÚ'ôI’$IVÑh½÷£K’$I’LhÖ{¿‰Ð{Çýèß’$I’$zM´Þû7$I’$É„^óÄizoÍ}Ç=ðoH’$I’ ½æz$I’$«h”ÞûéšûŽýá¿!I’$I&ôšÇõI’$IVQ½G’$I’Õ4ZïÝÿoH’$I’ Ô{÷~çþM’$I’LèÕQzoõ½ß¹ï_“$I’$zõcz$I’$«h´Þ»÷_“$I’$«÷޹÷_“$I’$ª÷H’$I²šÆé½U÷sÏ¿"I’$I&ôêŸø½÷“U÷}Ï¿"I’$I&ôªX½w÷¿"I’$I&ôªGõI’$IVÑh½·ü_‘$I’$«÷ŽZþ¯H’$I’ ½2NïÝsÔòI’$I’Lè•~/NïÝõ/I’$I’ ½ògz$I’$«hœÞ[yÏ·ïü—$I’$É„^ùÈ÷^Ò{$I’$Y=õI’$IVÓh½wÇ¿$I’$I&4Vï}ëŽÿ‘$I’$™Ð+bõÞíÿ#I’$I2¡WüTï‘$I’dÒ{¯¸ç›·ý$I’$É„^®÷H’$I²’ê=’$I’¬¦ÑzïÖA’$I’Lèå?95Jï}ãÖA’$I’Lh´Þ»å_$I’$zùÃz$I’$«hœÞ{îžoÜü/H’$I’ Ò{=wÏ×oþ$I’$É„^­÷þ9I’$I2¡—=üÝ8½wÓ?'I’$I&ô²‡ôI’$IVÑX½÷·7þs’$I’dB/{0JïÝý·7þ3’$I’dBãôÞ³wÿí ÿŒ$I’$™P½G’$I’Õ4VïýÍ ÿŒ$I’$™ÐKcõÞõÿŒ$I’$™ÐK«÷þ)I’$I2¡—þø”(½÷××ýS’$I’dB—é=’$I’¬¤z$I’$«iœÞ{æî¿¾öŸ’$I’$ºìGzïÁg–íÚB’$I’Lh´Þ»æŸ$I’$ºì½G’$I’U4Zï]ýOH’$I’ Ízïµ½÷ß®þ'$I’$É„^¥÷ž^þß®úÇ$I’$É„^òÓõI’$IVÐX½÷ÿ]ùI’$I’ ½ø~½G’$I’U4Zï]ñI’$I’ Ò{?~zù_]ñI’$I’ Õ{$I’$YMãôÞSËÿêòD’$I’LèÅ÷¥÷þßËÿI’$I2¡Åê½ËþI’$I2¡z$I’$«i”ÞûÑSËÿë¥ÿˆ$I’$™Ð‹îÕ{$I’$YE#õÞ]ÿuÙ?$I’$I&ô¢{âôÞÿ³ì’$I’$za”Þ{ò®ÿç’H’$I’L¨Þ#I’$Éj­÷.þ‡$I’$É„^xwœÞû¿/þH’$I’ ½àîõI’$IVÐ8½÷Ë»þï‹þ’$I’dB/X®÷H’$I²ŠÆê½ÿëÂÿ$I’$™Ðx½÷H’$I’ ½`ù qzï‚@’$I’Lèwé=’$I’¬¢Qzï_Þõ^ðH’$I’ =?Jï=q×ÿyþ? I’$I&4^ïý÷$I’$É„æ½÷Êð{ïÿ8ï¿'I’$I&ôü;õI’$IVQ½G’$I’Õ4Zïûß“$I’$zþQzïÎÿrîß'I’$I&ô¼;ŽÓ{çü}’$I’dB³Þ{Uï‘$I’dåŒÓ{¿¸ó¿œý÷I’$I’ =ïö½÷Ã_ÜùŸÏþû$I’$É„ž­÷þI’$I2¡Ñz﬿G’$I’Lè¹·é=’$I’¬¢qzïñ;ÿÓ™$I’$™P½G’$I’Õ4Zïñ÷H’$I’ =÷V½G’$I’U4JïÝÿøÿû—$I’$™Ðsn=.NïþwI’$I’ Õ{$I’$YMãôÞcwüo?ø»$I’$É„ž}‹Þ#I’$É*:ÌÞûô˃ï}Þè½Óþ.I’$I2¡gß|ܯ†øù^è½ßüéý¼÷þ;’$I’dBϾùØÐ{»öÎ|up¶üç{‡Þ ½÷Ǭ÷þãiÿI’$I2¡¡÷^ ½·¯Ñ{sƒöÞžüó½wwîÿÍŸÞzÕWÞsI’$I2¡Þùž™ýù¿ß›Ë‚oÞ;n¿{ïÌ'_ É÷ögû‚ïìÜÿîÎýïí:@’$I’ïî:ðÎÎ}oï 9¶ï½]û?úâÀν3{Ì847“º7àç{fæ¾:0ûùÞCÙsèã/„ûý苃Ÿ|ؽÿÃ/ö‡ûì«C_ìÏ?ÜËþ˜óðáùÃô^ˆÄ‹!÷˜ w·kï¡~ŸïÙµ$I’$9:C‹íüêÐν‡vï±whï¡ÚÿRKöW™Ù§{ü﵄[͆ä›;83ÚqïÁÙÜðI’$Irt~u`6óàì¾C³û³Ø› ±–ÿsÖYrï治Ȝ™›?œ ÿ= $I’$9Jgæf]673;—}¬W¶:ƒô^“üB³Ï gç²ÿçüH’$I’£3„Xn㟥H©Þ«Q«¾Î»Ä£Ùbù¿×ëh²Ã‡ÿÿÄÎáeÿçZIEND®B`‚azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img/readme.txt000066400000000000000000000001421362133436400333470ustar00rootroot00000000000000The images in this directory were generated from source files in the sibling 'img_src' directory. tlsio_state_diagram.png000066400000000000000000000643561362133436400360370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img‰PNG  IHDR6 ¡sRGB@À}Å pHYsÄÄ•+tEXtSoftwareMicrosoft Officeí5qhnIDATxÚíÝo°TÕÿ{Y©â>ï#êÞÂò>°*cUîM™ûÀ1¥£I”¨˜1jÆDÆcð™üP'"Q 1ø'ŠÔ/„ƒ2Â/—‰ð "B„ 0ˆ"QT"qÖå³q5«×Ù{õîî½»÷Ÿ÷«j—rÎéÝÝ»{w?k¯?'µq‡¨P# F@€!5Bj„Ô¨P#™Q£F™ñãÇó¸xý9îF™I[ðÙ:t¨ãÇ*D[ÝWèqgý8ÓÞ·žƒû8dÒ¤IÑÏÞ{ï½hŸO=õ”6lXt»“N:Élß¾=ÕñI{[=öV t\«è+·-‰¶¢èH«+/¾ø¢>|xSšô·q]‚ôû´ÅuÒíŸþù¶ï+ô¸ãnk‹ð4…¬½½}\í3ÏnQo÷õØc5þßý½ZŸ4DZÕcoõïVï‡*² hA€:Ò*ìÝ»7jVÚêö*nýbßÞÞ/Rã´6ZÝWèqÇÝþ~Ĉ¶n€Ý·[ðû%®8wŸgÚâ»Ý"Ý?¡ÐêýÐ ¿À¶[Ñßï Г`_p÷’¿ÙĪ7Jè²”}³¹·»ü”´½±O<ñÄ!÷ŸöÍØê¾‹øá:ÞI_õKr€î¥àÖþwO– îöI+Í}%=î¤:B[šÇ™´÷{7tÌÜ‚ÛýÿV ÕñI{[=öVWBÏ­e WN_i–¬ßÝ·s·0À¾ÙZ€¤‚Ö³Åí#é¶iû¡¥¹oÛ·­Ó`ÐííÓ>æV} €VÚìwa)ê€Ðãî¶‹- Ýû u!ò™}œ‹/n*ø{q Ícog°ÿܪ¨h…¿Õ—.@¡"?më½ÿækÜA'þ¾ÝVý¤+iﻨÀÿ`qƒA–—âõ7(5TðùÅe\÷ÿû¼Ý¾õiÆ´{_q]m:ÙÆ/¢ícIsßîcõk…V ‹1i{; cŠVø[•­ö‘¦e;îdj÷¾ãZÛÝdë|»lÖª«NÜ¥·PêÒ÷œ[…§¤«%q3BÄÍ ¡ÛV ÷±·ºwpÓ¦M›bg'pW0 îwRÜ,@qŸí¡¤~v?ËýÛ§íŠâßW«Ç÷×NÃÛð¨ïµÉ“'7î¿Õ}»/nvž¤Ðêø¤=Ž¡ÇwœÛy?TQÑ «TÀC†¹ûp? ’ncßÐI—¢ÒÜw¨€uƒŠ+`Óˆ´Ç"îCÔîÏ¿ë>¦4;Tü·z~ú]÷ѪkUQÇÙt­R‰+‚“úúÇ€¤¤W wrßI]xTÀÞtÓMMExÜ߆no `÷9Øç–Ôò qÇ%îêI«Ç÷l Šëš×’Òê>Üço_#?øÏ«€*jgÚQ Né€ÄµÇu¥É:¤¹ïPþ¤–î4 4ë@§³ú¤ iw» ÍÕÿ>Üãî^íuY*ú M€tZM&R”Ïû^m·š4÷-î•Ð4žS¦L‰ çЕ…¤+ iƒKÒñl5f ´€ÿ¸CÓ“¶º2“ö>Ù8C€nÙ"Ü-Ì“ vô] u3jwÐ2@Zó¿d®Ÿ2¯i›:ëÙèç/oþ“9ük%Ä! q!€.8 OWÝ>ÇœñÏw·Ñ7þ$ ƒë¶rÀ>A@i©¥ßÝ_´&*øu5Àg™n&Ïü•Ùúú[…}>«6¿e–¬ßmÊïê•¥bÿ‘+Í·þ¬) ( ¬~¥xÝ”Ÿ^»Ë|å¶%Ñ6yà•\”žº¢¦]D4oqkõ‹”#i£^¼EzmÞx{¿™ñÄ 9ÿÚûA@W>8øaaÞËw¼Óî6uþ&óÜÆ=æð‘»¾(½´E¦-ˆó,H Å –k ° Ž}(ê>ÔO»Þ>µöO_øjlÐöµ)Ë£¿é”J\AI?_@¼}û˜qÓæ7ÆôºKºö¨ËÏ5¬J,úí6~æZó·3¹_(•n@/Ê,u²! „·ìÚµôºci£À¿rúʨÏÿœeÛ¢ÿ·?×ß<¹bG¦÷O¥à.2i7[XúE¦¿ÂüÈ‘#Í‘#GbÿÖßo»Åû‹/¾hN<ñÄÆú7“'OnÚGhÿ“&Mjzl{÷î5Æ kZDÓ ¡}é¶#FŒ0sçÎ˦M›š€}¬­éôï§ãÕ*„^›~²!@Wò¢n>7ÏZ7¤oÿº­ûšþnâìõVÝ&kP*­®¨È>|xâB”î߯u ÒïÓ†ÿö¶€÷ ö¤ýûUÅñ•W^in¹å–!·Õ¾üûvŸ@»Å¿?ÚGÜ…V;¯M?i\€Æ(d½f€ºúÌZòZ£è¿üîÁ¨U?©Kσ‹¶DWòB¥Ò*ĵ¢'ým\w{û4Ýfâ ZwŸ­öo jûXuEà©§ž2§vZS€Ðß¶ÚWÜã¶·Ÿ6mZTüwúœBü«¡Ðêµé·_®Ø€›î[˜Ù>5¯¿ ~[üÏ|æ-§õÌb¦Ÿ(•4cl¡i»å¸Ål– îöíQm[øGý­mqW1~ê©§¦ÚW(ćvž“Ëíò”¦‹U;¯M¿išP;+PT컃x·íy¿Ï“J¥ÝAÀ*hÝB³HWì>TäïܹÓ\zé¥Q!­Ûé1Úp汆€~¦}¥)¸CWlñïÞG;WZ½6E`§í†ZøÝ¾þ Wí,Ô9D¥¢‚Ò8*2ý‚6®KŠ_°¦˜êwi±²ß/?´[¤_sÍ5M}å/¸àó™Ï|¦Ql·ÚW«`ÿ¾Õø†Ð?Øûì4mL€Æ¨øWèÔ›ïþ¥1­§æí×Â^EC¥âvA‰›ÈŸeF[hЪÛ%¥“YiÜÇ£âzpp°Ñm'íþÕŠî>N[„'µøÇí+M°ÿnõýûq—}¬î¬Gi@«×¦ß4øWàŠ[ÖÑíÕòo§ðTÈcŸ,€£Tø+h•àvià®íö£â¿Õ@ß~" öTôÛÀê Ô.;àWÝ~Ô ¨È1ün0þV”Õ~Ñ=ÛõGÛ³«7·}{MõiWí-bŸµõÈ‚•âÿ¾9Ë:ÚÇØk¢ Å½Ê€€Úyý?G ~Ùâ_A O¯ÝÕXÝ7ï¼²B@é©ßþÔYÏFÅüÖ×ßJü;þ“gþªQø«Ï'Ý~¢û8l.¿{0 ?x¥ëâ_݈$´?'(:èJ€Šü¯Mµ±¹VàÃ>6æl#Lä@Eú7¦­0×=¸:ƒ–ÿc› +L>(ŠŽºR§ðÞÁ#ælR”«è_ºéÆÿ—=tr5$«+(½ T´ÿlÉ3 <üÕ;—E!`Ë®ý…~þЕ:÷?üŸ;£2ô7eoµ¯rPq>op{¦Å¿Ýnœ¹¶Sƒ@£ˆ?á„¢íä“O6‡jüî¼óÎ3kÖ¬1Æ ‹~ÒI'™íÛ·7Ýö©§žŠý}«ýïÝ»7º{{ý~ß¾}Û´»¿#F˜¹sçšO<±qÛÐm¤Uk[ÿ·ü×Áà±ô€mÉ·Ý…þõ‘?˜ÃG>nü~åï÷7u'r†»/»Ÿ5[ß‹‡þö[m1oí?ÜØ×k{þb.½ïÕ¦ýùc 4Ž…¶‘#Gš÷Þ{¯éi³Ç$éøù?Os›~Ò\þ*Òo}|}æ`ú‚W£}?ŠŒ@ÍÙ"Í-~'Mš„GŽiüÞ-Âõ{¿t¯bÚ¿}Òþm°û³ÿVÁh¯*t³?÷9ºW)ü‚¿UPq}õü>¶˜vÅíþZí3n_nAï^‘°ÅvE íûÅ_4Ço U.ÿXtrüZ½Ný2qöú¨HÏf柡݀ž\ñzáÏy5W ÚVt·åÜ-þl‘­ŸÅý^­Ë¶oµw_–_Lv»¿8~1šGPë¾ßâï^Ið‹öоlp¯@¸û÷_Üßû¯ßc={¿iºó´:~­^§~ûÉ^ZÌ+ë`·¢#Ps*ÔÔUÆíÂa·¤¿ÝÚ' Ýý%=Ïv@']€Z÷ßqÝuÚ í\p_ø.VqÇ¢Ýã×êuê—kX•køÆÝ+¢ý€škÕ$®ÀwoÓÉWWZíÏ£îÏÚ½ iø¶\ú{¿‹O»Àíÿß*¬¸Ç×ïÂWÌ·süZ½Nýró¬uQ®±yíûkS–úœ'Psq}µã~ßj @Rhµÿv@'ûó Xû7í;ÈÖO¬z«ñ3·h›644“ßjßNÐÿ·š¡(‰_¬»c.Ú9~î¿[½Ný2}á«fôäe™,æo?ýû(è*C‘@ìL.~Á4ËO«Ðjÿí€Nö' -öoõø'OžÜvVŸV ù-ón‘îÏä·Ú·DA$´?÷x†ºå¸Ýwì1iuüânzúeáªQ‘þík2v10…Œ"#€ ªÌó_u*þã¦õVwo¾û—¨Hùýßd¾€íÿ¿jó[…>D(¿ P\(€‰æéÿÈK™€ÙK·™ë~¼Ê\~÷`á7Ê!®kÅ<“C‡ÿjþóù×£Â=«ðîÃц¢# v~øä&óOSžë*hñ¯«ïáè¾6–æ¹P; vQ°K8hf>󇎺ýŒ¹we´uýyçƒÃ¥xîÔ’ºëØ0ꎥfÒì Q‹~šâÚüMæ«w.kÌû¿mÏû¥yÞ@.tĬ~e»ydÁÊh›:ëYsý”yMÛŒ'£ß=»z³yãíý4=§+Só*äµÝúøú¨À l» i û÷ eè÷ï"2³õõ·Ìã‹ÖDÅýÿ|wÛÛèb&Ïü•ÙôÚn&€žÚ¸ã3qöz³wÿ!³á6_¿k0*ðÕʯ.Búÿ‹°Ì¬ÛºÏìÞw0ZìKk ”q5е—7ÿ)¶è¿âÖŸ™ûæ,‹Zù×mþÎÝô3ýî¦ûšó¯½¿é¶—LxÔ,XºÁ|pðC0€žR‹þ•ÓW6Zùí¦~þ»Þ>PúçGtL-õnáö˜éQWuéé¤pý?GWt%ÀîSÁà—+6q° #@GÔß-üÕÒ¿ov-c?0nÚüÆ}\uûœ( ºC´EE¸Šq[˜g]øût5á±5‚†þ èšùÚ¾ú*Ê{5XW݉&>´¨:4nÐ MÓi[â5h·ƒs5>À†5´hIÅ¿˜«–ø~R uÒc™·ø%^h¤½lñ¯A¹úw¿izP{%@ƒ…éAv¶Íé_„âßÒàc;¡H ŠŽH¤A¿¶»þ¿hì4¡ €ô€DvºOµ¶‘B‰4Ï©H J€Xê[o»ØôcÆŸ´lW É3Å‹)±TP«°Ö€"ÓÂdö*c 5`ÒvÁ¯^-öÕK&<=VV €Ö€!TH« Va]dv°¿éjÀອ¼ƒB³ê”av»>AܦµCCLõlTDÿrŦB?Η7ÿ©1Méù7Î5_šðk@ À¶k 좳«ÿÝ÷˜3¿ù#Æ@ ÀZõW…ôoï/ÅãµSjÓÚ€d}³jó[fβmfâìõææYëÌÔùÇ»›,Y¿Û8DŽ~Ñ€2u£ÑãÔcÖÌEE\±Š„ ç6îxÇŒºc©ùÊmKš¶«î{Á,ûíó䊟)¼ùî_8hÒê¸êǯ¹ü¯Ÿ2/qÀl7uP"­%uAÐ3Ûö¼oþúñ›ßí|×\r×sæw¯0·ÌzÙ<ð‹ÍÑöðÓ¿7O î0.ÚbÆÜ»²)ÌZò°M/ZÓ ËÖzSHbà0€: 艙Ïü!*ä§/ø]TäÏ]¾=úoh{ì×[Í·g¬i„]@kê·¯~ðõíoZ÷€.DªŽ wj½W?òû¿1wüü·- ÓÕ«ïÁlÝý3¿ø?ëêæ ß™m¾|ÓB3ò¶Åæo_Zûí&=k¾|ó/Ìyã~nιnfÓñÒØ‡~È @eäJ}mñ¯B¾Ýâè¶+êöÓ(f¯¸'*p)ø[o|w~c QmZÄ› @eäæ›ËïŒÀ^éºøW7" íOã ÐL]Ü>ÿZ‹â>ý¦+î•€Áu[yS¨$€Ü¨HÿÆ´æºWgÐòlÓ a€ÉGšÍ[üR£x=ûš‡)ê;ØÎ;«q 5CT@n4ãŠöŸ-ùcf@ƒ‡¿zç²(lÙUŽEªzE+­ÿÙ]ÐbhPE¹Pq>op{¦Å¿Ýnœ¹¶–Sƒª T¨ë“]½W› Y úÎ7®¢Œ™Î‰  ’r¡¹üU¤ßúøúÌÀô¯Fû4ÔÉ•ÓW6º?Å·ÿº Y úÎ6 ž¶Çªˆ g¯ŠÕlfþÚ èɯ×î˜Ú`7?¸€B¾‹àÇ2š4i’yì±Çøˆ‚û…ënüžßóûäßýd/-æ•u°[]­¿Ù @¨_8xð 9ï¼óÌöíÛ?KFeÆÏ—Ù4ÕêÂU;›º®PÈ  @-j7ÏZ ¼Ð;*N5 ¯Öÿ¯MY^«cêw²…ÿá#G¿ç @½€ŠÿÓO?Ýœp Ñ6räHsäÈ‘¦àÿÍÉ'Ÿl:ýÎ ¿ÓöüóÏ·| I·Ù»w¯9í´ÓÌ„ ¿sïK÷mn¯BÄݦÕcÐm† Öøû“N:©†’ž»®|øE¡Õý»ÏÕ½ Œw¼}ɪОé _5£'/Ëd0{øéß7®2Ô‰ ~áo¸ na¯¢5©›ûw/¾ø¢>|xc?þ¿ã„nc s»ý{ĈÑïôw_|qVD¹ m{ûxõØÝÀ’†ncƒPÒswÿÆ=~¡ûw?P€Ð9¨:¾=cMæÀ.¦Q'šõ(®ð·q {[ÔÆÒ­‚‚ßRî ÝÆ¶¦»÷i }·õß½:àß&nqüýÙâ>é¹'…‘Ðý»¡¨@èÜ›ïþ%:F~ÿ7™¯`ûÿ¯ÚüÚÑ«pùÔÁèõÝú_޹¼EûU÷½£ç¶bÆÄÃi@¨ Nè6­@\Ë|'@ü©§žÚøÿêB«çî‡%ê‚@º£ëñ¼”i˜½t›¹îÇ«¢n0I-áu•e¸sà•h%g—-® ÅÑÎ `Û'Þõ½ìäþÎ/Ú­N€_˜+dÄêþs×c¸à‚ Ìßÿýß7èþÓ L ;*Èþ«ùÏç_ ÷¬BÀ»G(še–lx#Úß”'6iõWM(Û&n°ß=Æmyïõ `wîã²j;í¤¢ßîë²Ë.3—^ziã8$=wܰÐêþã3PV€€‡ŽD! nÅMé¨(ûá“›Ì?My®« Å¿®¾ÿ…£ûÚÈAME°-ÿnñO ´+mñÞO­º8UF+evQ°K8M«ÛI·Ÿ1÷Ÿçs`cd6ï|×¼wð#sÉÑÀÖnˆë6ä {[+î¾~úëךö±âwoy îß|øÑ_Í]Gï‡=šMànèvY€NCHR7$ .¬dCŸ £îXj&ÍÞµè§)þ§Íßt´È\Ö˜÷Ÿ+rɺ ¶=®ànlAîàög6ØÛ¹û×ßøÿvocCEh¿nð @k€ÆÙQa9õh1o±ºõñõQ7@ØvÒöï è÷–UhUDû ®°w¯(Ø¿kµÿ¤ýhL‚½Rô7qAñ ŸójâìõfïþCfÃÿl¾~×`tž©•_]„ôÿÿ`™Y·uŸÙ½ï`´ØWhî{ׯ*¾U¼«‹Žf„r»ÿÄýmÒøµøÛ}$=ƬǸ+.³±q»|Ú >ôÐ1@È—ŠA»ºmÓÛ݃f×Û8@mêW ÐÀa·xw¯ X1–ÝGRØ °Õq:E (“n@ÚÙ}:½ÔâoC@šˆzu€.@(2ºE (“,fòØf9 éþZuïI3N€1¨ºE`E²e×þès)IV Ù.:~ÐÏ“‹[<Ìÿ™Š}÷6i÷ãßÎÿfBhdÛUèJbúÂW£©P55qÜŒHY€¸¹øÅ×I]…üÛÄuý±Å»wuÀßOÜ߸ûQ¢¹÷…ÆJÅT™Þç ?tŠÀ:ŠdβmM5­ª® XY€:oY 0@/éÒ¾>wÜMÓ¡ªðצϢ¸™@ÔÊþÜÆ=j€€,²¤®nQ¯«‹ú|±«$w³MxÅœyå}*Ž€,Úe[îÝV{µÐ§)âõ…®¿w7õû·ûšì¬Œì®¬û®P}d@¢ÅÊ–¬ßµä§)ò5€WŸ'*äUÐ?½vWô9“vÑ3Ý—»Xšºý¸TY Xꟿjó[VýQw,-òÕ"¯ßëïž\±#úqêvC@!BûVw"€€ê# ðؾú¶ÛZÛ“ºìh&[èçMW D’¨>ÍP¨ÏŸkXÅÁ@Ç`Ž-²5kÉkÑ—j\±¯Û²¯A¼¡B¼_T½'PK*àÕ¥F-øêV7µ¦úöëoÒöÑï7ÕGm‚,8É€Ú°­üqÓnªå_¿Z÷ËŠ@@õQ› N2 ²B­üêÒ£þýš‰Gƒêª`ô?i®þû"ŠùN¶ï/1g\q™÷·gE›0fÇN&µ ²@à$*EżåVµ•?ä¦û6ÀÿíIŠù6'¿ ç|óè7ä Ç·áÃ5ʘ»î2fùrN4ô µ ²@à$JO³ö¨¥âìõ•oåy|ÑšF8wì, ú¶óoœÛ8†»ÿ÷ÿ£9¸Û½÷râ¡/¨M'PZêÓÿà¢-MÝ{Tôkõ\ÍÙ_7«_ÙÞÔýË7ÿ‚¢¾mäm‹Í™ßüQãøm¼þ»ñÅÿ׿Îɇ¾¡6AJEýú®Ú9dºNÍÚ£–þ‡ŽÔúøL|hQ£€ýü•÷›‹n}šâ>eñÖÕ3Çî’ šÃïp¬ëè„>" ¥ðÜÆ=Qw·è×]šÕ§,Ótö¾ýÌ…c:~%àŠ{Ìyã~Πà„í¢‰¿2_?¯©åÿì1ÓÍÖ×?¹‚¤®>~øÔ§Œ™5‹7úBÝõù§+@§¤l ¿TØ«‹¿¯fõ©cŸ´Ôèükïoêij Gq?ÿåŠMÇæž=Ç ~þÏééJÀU·Ï9Öè_~lκf†9wìãæÜïÌ1_œ°ðè¿ÿ£/E÷™ßº7óûþ¸¹Ñvöu3ÍçÇt|ÔígÓk»‡Lúî ß‡> Î9ǘwßå ‡ž! €Ð[úbsûökp¯®Ðŧ='¡‘®œ¾rÈT¨Ú.¸ùÿKlýÎ{S¡Ý†û<ëÚŸ4=¿/ߺ؜ÿ?ž2çÞ0; çtïñ7u—º~Ê<3oñKæðG á2®À_½úøø€SN1fÃÞxèÙç$Ý"€ü©E_ƒzÝn>*\õ3Mï‰ÎÌY¶-¶ø×Ö¯îS &š¥)Ç·îƒÝ´.D.Ô=èŒ3Ž Ð¢a@ÎÈ €äGÅ ðºSxªˆÓ—²¡™‘übXWúE‹°¹¯u–(⊠ÏÕ¡CŒ @O@ÈžäÒ—m ¶çXUWçí]9QÀR×)÷8kÛ¶çý¾<&·õ?¯+þ`qm={_1.=B@zBÚŸÆS_`ý*H«JE¿ÆQ¨…]A@§íñÖxŠ~q[ÿóº  ncqWôóž`\z€€,äJ…¿;£ZU êJ²¥¾î¶•]!Àcý\­ðý×úŸÇU{@-ÿî8MÛ“¤4.೟e\r=ÏõžVJ S€R6Ð9Ÿn‹¿ 3dLã™=Øn}f¹¨íêÉý×úŸçUwЯ†g¢cÔðõ¯póͼI‘lõ_ S€Ð>ønÁ§âK3úäÇ~V)dq,Å–]û£+AÚl ½Vv¶?Ëò½·/Û-Ê^mèÙ{Ñ]ExÔ(Æ d@ÒSQ¥BßÕGA _ÝNªNÇUÇ׳jù.ÃÕ»6A¿º€éé1ô¬xZ¾Ü˜¿ù›c!àÓŸ>š†ú7Õ@@ µæº3°¨ë‹wåGŸM6h•­èwÐ{Õ}Ÿö$4íØq|\€ÂÀÂ…¼‰Ñ1²@ aê¾á.À¤ÿ×Ï«šÇ¿ç[3Ôï î¸u êIXõÇLšÄ! €O“?ÀW-«ÈºüØ«,*^˺`Z€}«ø·Ç³g]Õ€.€ÔàÛŸcn¯Züu Ìã*ì€à"¼gtldõž–ž=&Æ  d Í.ãöóg€oïŽyÏ ÔšÒÕ^Æ èl#L?§öEùèk%Õ9` Í¥ÎßÞsµúW…®bha²¢…GuIê˸u²]‚7?Z²Ÿ eíˆb Pwn«¿íîƒ|©‹Œí'¯Õs«ÖÊW”1qô˜ì v½ß³\¥8H‚mÐ@a Y PWjõ[ éîÓö¸WõJK‘€¨›•®RØ÷~ÏŠ,u²ãÔ5H]„€ÀgÝ P×÷½í QæÙfÊD­þ³–¼ý¿ºÿT¹ooÑ€¥×@]츋žŒ Ð`` ¶ã4Xð@u¢~wŽyZýó§âR…¿=æ=ërÒGe .…u…SP˦uÇhÚPÀA@Ôé½N«o©{ºùØâ_A ³ü”1Ø`¬1O¯ÝÕ›;e\Pc´ú÷‡W«˜´3Îô¤e¹ Š´@;Üõ/\´¥7ŸqˆA@@M©³3üè¿*J‘/®ÔŸ\Ç\_ä=é[ŽLhµkÜzve˜qðØAꬾŽn脪RŸfÛšÙ³…jN]GT<Ú/íºó¢®Ö¶=ïGS…Ú.L=y5.àK_b\":ôÙ­F S€ªFÅŠ ~[ü3¯þünVuÿ<)ã€$êΤ13=0nÜñð­o1. ¦È €€*QË¥ú›Û.?|yäÁÕCU)(@÷|\ÀÀ€1ŸúÔ±pÆÆì¡HÝ@Uz/۾˚y†¾ùS1hW•epõqU ⎠èÙ¹µaƒ1§œr, nÌêÕ¼±j„€,(;¡j™´­”šÉùÒç†í篫.´ú7«Z°¯³}^úoOh\À9ç º"ððü¹j‚€,(3Xvžyu?©Ã"Sý¤ñvz>oZüãU1Ø×_…™=Ïz6ÈÛpÝuŒ ¨²@*HSzÚ¾çꆢE§ïñ¶Sªª;ƒ«“•u€v¨øWÐa\ò@@@Ÿ5åbV—-ÊñÖÂT˜¹ãzrµƒqµA@tBÙØþþ*>z65aMÙ¢N¿®¶ÐêŸNÙ×HËuKïžkŒ ¨ÛŽÆtƒ@@Y¨•ßíΪ¾ùk ¦VȲ_À,¤–^UÇÄñ×ÝèÙsÖXÆp€Ê@©]hJÅ¿Z‘õ_·­ºÚ´¢2ÚSÇâEW‡ì \ =é–§Ö;.@WtuœCÀ'yÄN?È%áü¸}ýоº/º"гù ñ  qà  ˆ€"SñošRAÊ—A~T¬ÙA³–¼ÆÀê.Ô¹xqÏÙžMÍ«43 ƒÀ9„Ú#PTúà·_*(胞ßg€íR¥Å½hõï^Ý‹…G „¶W“æ,Û–ÿj €;.@k€sµFJÆ]uT}ÿ)þ³§jì¸ ]]¡Å?;uX éùXÆTY %¢âß.ð¥•Â4{jõ·ÇX‹{1£ò¢ äžÇ=™•q¥G@tB‘¸«ûòžÌ‡;e£þŸ«+Ù«Ë:íÒº:¿ÕÕ,wŒ (5û=ÀçºA  (ÔmÂBµÓ ";ö‹Ô¶þë¿È­—ñì:=;ÇPZö}tƒ@@¸Ý~z2`°FTøëüvûùÓª–/@2°A_WIzò^¼÷Þã!àK_b\@ @ýæÎöÃû0[êR¥>þvJFõÇFþaºÚgß—ê†ÖË—ó7s,|úÓGÄ^ˆ# €úI­vÕY DvÇÕín¡cKôÞ!´¦÷£Š{Œzr¬vì0泟=.ä…((²@  _Ôeü̵ÑûOÿe¶Ÿìhñ%WuµÐê¾èÍ1W÷5…­Q“—š oûM£¨Õç,Ý®’Ùñ?iƸÇY]ˆ4àÚJuœ5.àë_?Þ%hÒ¤Ž^ãŽî©P0*öÝ9èùâÌæ˜ª8±AJ…¿V÷E¾Ô­Êöiw·+¦­0ϾüFô:ØŸ©`äªÀP*ž[ H:ÎWÝ÷‚YöÛ=ígw\À¨QÁq™ß7Z"  `l÷u•à˲{jAµ]©¸š×¸þ×ÿÛünç»æ’»ž3߸{…¹eÖËæ_l޶‡Ÿþ½ybp‡ypÑ3æÞ•M…ã¬%¯qcÞÃv\€>ìêÔ¹çãxû‡€,è„^Ó£”J uwÔÚo§íJÅ1ÍŸºªDŸ› ~€s—oþÚûõVóík¯]³†Ò¸Û-Pa@vîÇ9a\¯q?×lF €zISÚvµø¡sîj¦Oí¸F~ÿ7掟ÿ¶eQèoj9¾úþÌÖÝïq0c¨øS‹ú]OnìÝqvÇŒÇkÜgº*l¯Ý Ðë÷š6MO‰ÎÙ>Ò*”S½aW«0T‘×na8tÛN+q‘ŽóÀ€YõÊñ÷Y!Ð ê–bѱmwÇQ]$ìì#j-eö¤ÞP÷ÛGý¯t]ª‹‰ŠLíÏöwG3¯q1@ySj»ª¤™æñÔŠhC”Šæõï-pߘ¶Â\÷àê Z…mPÚÓŰ8μÆ%@@VäÍÎøÃ\ÿ±­þ¶û”Ž'Ó¦öžfƒQA÷³%̬8ÔÀÒ¯Þ¹,z]éÆÕÿãÌk\ d…ô‰ ˜šñ‡é>;£~þö>·q¤T¸ÍÜžiah·? wLÙßãÌk\d…ôÛï_ƒúžº÷ØY}tÕD­þtùéÂn}|}æÅáôǯqœûwœy‹ƒ€¬è„<¸ýþyoµNªµŸÓÅaW­ÎfV˜¡]Dž\ñ:¹ÏǙ׸8È  €€<Ø~ÿ ôûOGýúíqÓvó¬u´úÄØOwÒBOY‡vC3¯qqlÜñNã3è €€¬Ù9¼Õý‡UiÓÑq²Óê¸1ox±Ø«Yy‡ß¸{E´ŽsÿŽ3¯qq@YÒ¥[º¯¤çÎæ£þÁÚMÅ£BDïiõÏ£8´ƒ¼9Îý;μÆÅA@VdE]}ìt•¼ŸZÓ—œZýŸ^»+ú7Ý}ŠKïçÑ“—e²8”¿=üôïÝå8Îý;μÆÅúl$ €²¢)îìÀ-æ©O¦ d_rå°pÕÎèµúöŒ5™‡v¡(>ƒû{œy‹ƒ€¬€œiM;å'‹Ý„“ík̼àåag%ùýßd>O¼íÎT¹ý=μÆÅA@V@ÎÜþ³h}œJåÑxä¥L‹ÃÙK·™ë~¼*ê ÆlYý?μÆÅ@@VZlH'š]th—íF¦/8ºþ ¥A½v_µ2ªÕŸB |ôš:üWóŸÏ¿uYˆï8Ì*Ù=<Îj…OoÃk\ d…@@7ôEj§¯dÖŸ¡4§ºFi£Å¿üT þðÉM柦<×U¨…¡®¾ÿ…£ûÚÈAíáqÖ9¨sQŸY*2{rß÷.6æÝwyQÛ }§Lx…ƒ®è†]¸Š%µÏΈdÿqu¤üTÚ£.ýá ™ùÌ:ê2æÞ•«fÌþÔ»ã¬sЮø«-®U>óûþ·'Í;û³a/lJLN‚¬è”´Ú/Rý?ŽY·u_c-ú7ªCE£-Õš9_´©¸¤Ox1޳®Äý]f÷}è1×]w,h7޶²B  ¶õ_­cta8ö…¥¢ßöóç˜Ôƒú‘«€Ü»ÿÙðÇ?›¯ßul<ŒZ€Õ}Dÿñ–EWvï;Íþ¤ùæ^Œã¬óÔNË«ó7n\@f÷ýðÃÇ®(œsãÈ ȘmýWÿØ:S ÿd§Õ«!õ¥Ö^-‚gß vS70Í…bgÿVñžÛ}¯^mÌðáÇBÀ)§0. Y!Ò4zLûy¬¯¿I­‡Ì‚ˆ({5<÷Íöì1æŒ3@@VtB»ìbV¡–²ªSð±Å¿ºÐå.@9©qCWl÷ÜÎkÆ@í°}ÿ뺪¥Zým?a šç@õèÜÖ•½\gñb\@¬§×î¢K%2A  vV ;…^](ìh¼ƒž»ú3»Pm\¿5.àoþ†qêd…À‰† èr¸]Õ¶N]^4³)DÏV´B jpÇ(äüwì0泟=>.`áBŽ;u 2@àDCl xfþÑ8[he_fsA€êPW?»°_®}Ò5.àë_?>.`Ò¤Úsêd…À‰†.© ŒôZ‡ÕKíøõ÷çü@»Õ¢à¯Éì•Ï\q»÷Þã!`Ô¨ZŽ  .AV@—ì¬ šñ¦ê4¾Áâ”[Ñ.@uiPpîÅéòåÇÇ|úÓÆl©×`X²Bºd§þ|nãžÊ>Gµò©›OOæG¥ªËÎPÓÓq 5@@Vœhè‚ZÀíbWUúS{5À×NqšëÔ¨<@µ©k   rTÓqÔ%È € ]P—˜*ÏɬY~lÁ¦A~Lñ  5ŒŒ±¦rm©Ù¸êd…À‰†.ØÁ¿*”«D]|ì >½ÿiõÐýj4°‹æ:^¨FãtL醉,±³à¨…«*Tôk0s]5£÷èT?*þÕX¢ñRŒ èY!b»ÿTeî}¡Ø¾»ú/_0È ~t…Ô~¶hµðܦKÖ¸uªð¸²B Ä®€k/q—™mõ·-ÿuZͽE¨'}¦Ø™Ä4©@®³¦©ð·!@… *‚€¬€TeöûØu5ƒVô ¾ôy£ ì{ ×…ÕÈŽ P× uª²B:`绞:S)¿úáê‹D}rE_Ì´ú£Ðç§½²®Ï¢Ük0°Ûq,\rd…@ $Ñ"7eýV\õõ—âsm…<¸ÔåPWsëJ©iAÝqš6´ÄÈ  €€$v@[™ZÍÕÊo.kSÜÜé€Ôúï®0¾pÕÎüî¬"ãÈ  €€8¶ÿ¿ZÑËÄv[Ò¦ E ™Ôìg“ºUæ6®ªãì„ ¬Í‚nˆ³jó[ÑûBÝ€ÊÀm)Ò¼ª-Z†r¡ âhV uIÌýJ@ÉÇhÜVUfŸCˆc[«rý’Ê€º÷ØËëO®ØÁ ‡B ‰Æ#©‘Âýw.J<.€€¬ˆS†`ü¶5MëÐê¢ ûý˸€fd…´ÉÖEœÿßT§«e^§ÕC@=ð©O•f\Y!mЬ?E¬/ˆËïd ‰€´Üqcg¬Éo½€ Œ9å”ããV¯.ì1! +€ºÁ§®4zOØ´Š@¡D3C¸ ëhŠˆ€vh€]·$׉4.àœsŽ…]xøáB²B À§)½'4sh†»&¾$éî jìÊåvÝ•\/7îø¸€ë®+ĸéRá¯Í~Þ늈þ­Æ>÷Ñ @E}OØVÛšª/GZýTZ¾s00p|\Àg³gO_Ÿ³ý¬÷7•:A ÀW”Uõå§Ç¡Ö ]•Ê‚.@è†Öaq[Ás[ÍÜ0|xßǨû“_ük|D™V£G±ðõ³ÿ¥Zøm±¯}÷’8PtKE¿¦7¶ ¹(и€¸«´þ£€|ý šÑG3û°<ÊŽ€,¨AĶŠç>þ© ãÜ«´þ£[  vŽý^-¬e¿Ù}Ýn—¼ KZ(Ì~«•<·±Pþ¸]è1]é°çOÑW¢Gñ€6Øéèr›Ú¡/3Ûê¯ÖÍ”yPk¸>/Õ5(÷q£Fõíyj܃ž'3ÿ [€ºþýÌ/Wl23ž4×O™gÎøç»û¶}éߟŽÞg^y_î÷uæ·î5_úÞ¯Ì'üOóù1÷7~®c0uÖ³fÁÒ æõ7þÌ¥9´ÙÐïÇÁ¹T- ö m§“#¤9Wλäöhë×{ö¬kbþþÛ³ qþp^• €Ð/ZcÎ3½0lç÷?ä £â¼÷—&hèËêðGLŠâŸ?Eß8—ÊM­â.ÚÒÑ ÙR+WÜÃy…®ýóÆÛûÍU·Ï¡(I¹]2áQ³õõ·xã€ó‡s©öž^»+ê6™fÂÎΫº"úÇÿ@>ëêæ ß™m¾|ÓB3ò¶Åæo_ZËí&=k¾|ó/Ìyã~nιnfÓ1ºpìC惃òæççRíi`°(«ÁI«s®p^Õ €Ðºë^êÔ ¬ñÛßoÎüæÇkâC‹xqþpþp.Á¡é›uEÀÀ¹ÂyUg€@ïér¬Ûóüçò!ÚbSk‹ÛÊ2¸n+o$ÎÎÎ%˜¡ãôÿúç çUÝP(ó¿Ôø8ûš‡ùðL¹;öø¬š}œ?œ?œK8Πقf-Z˹ÂyUkŠ>h‘é®…åŠ[Ɖó‡ó‡s  °k¹Œ½—s…óªÞtê=}0Ø }`ðÁ™~àU£5kÌtÞHœ?œ?œKˆ¡ÁúNç\Ἢ;@ _Z$dõ+Û›~æöÔœé7wnhÔçç8W8¯ €ŸM¯ín|Œ›6?ZÑÿPæ³ÍWçØ¡ž88—À¹Ây…4€ü¼¼ùOÍ+ì^{tE€e>\Ñ9ÎÎ%p®”Ἲ~ʼ¦M«ÿrÅ& ë!@ jí·³•œuÕƒæìkÿÃù`˜Æ‡2E :DQùΕ2œW­6-Ц:AÓµ"€@6ÔÝG'²}ãOšNrM¿vÑ­O›3¿uï>0)ZÐÎÎ%p®”á¼R/w{dÁʨF¸d£CjýLW-r¡V~]ÒÓÒßþɬî>vþ÷ÉÀ wV>”)ZÐ>ÎÎ%p®”ý¼:üÑóìêÍfòÌ_Eõ‚½Õ˜¨ß£{dJ…¿NZ?½k~r%ø×ßøsôwþý^'5Ê-èçç8Wªv^©vpÕ=ÈÖè €.@é©x×%<»´ºþ«  î?qtòÚ«Jú½øP¾|ê yóÝ¿˜­ÿõžùêË ¿_Š´‹¢†s œ+EûnÊê¼\·µÑ«@5†?8ÚC ¤£V%r{b«ð·Óz†h´¿?À§Ûå;^1ýø¿›ö9ðÜvj!¯¢fɆ7bïïÃþjÆÏ\K@mÏ•«î{Á>òñýOyb# ‡óꃃFcÝ#ZSo¹þ›Ôâß‹e[¤¸¼öP! h†-ÈZž ªÅ>ççJ·ÁØ62Ùí§¿~-úùŠß½ÉµœÎ+ÛÕX!@]ŠÑ>@ LIÜŽØWÿ¼4­þy}(Û–ÿP« UGà\BoÎûãÿ~(•€ªžW6¨þ@û€°›î[Ø™¯0ÐÏåÍ;ß5ïüÈ\2å¹¶@\·!ÿCÛÞÖrï+n¿*˜ôïýñê¦ËÃq_zìq’¾X(Zõù“EÐß輸ç©ß5Î'ûý.í9Øjôò\iõÓí÷‚ –5!;ŠòÝ”×y¥±‡¶‚E{€dê¿o/¿e¹PG'ʶf«Ë­q†öCÖý@ó[nìíÜýëoì¿“>dÅý‚ˆë¢ä‰tÓÒJÑ‚~‰û»ÐïÒœƒ­öA@/Ï•´W“ã>ßý÷pš÷ÜÕ†4ß1EùnÊó¼²‹ŠŽ›6Ÿ7u›èÈ}s–E'þ›¥n@«V ÿÃ0®°w?üìßµÚÒ‡¬ÿaéï'n¿iŸ E ²:ºWĽw“~—ölµzy®¤mtJ þÕ-÷½žtNØ+`¡‚Üÿþ(ÊwSžç•ºÛ1ˆhQÚÖI—õü^€PN÷CÒíþ÷·I²þåaÿƒ€¬õû @Òß$ý.í9ØëqœKœ+y€¸nCî{;i<›® øçC«ï˜¢|7å}^ÙÅÂÐ@Àô…¯F]€–¬ßÍÁð¨ß¿N¸,»ÿtú¡Üi ÐÀaÿÃÖï™f @«Yº!ke iÎAŠr®„®\µºŠ•6ÄéU(S »€¨º#£=€@²ë§Ì+Ì€´ý1;½4ûƒýpìôCÖXìÀS´ çW8—8W²×0 öçif´Ë;dýÝ”çy¥©Ç™ ¨3€@2;àñEk ñ¡œfʵNÇ$ÝŸßE¨ÝY}ÐüðHf E ÊÚ@@QΕVß9qïפ÷p;cÎz²þnÊó¼²³f=±€dZ’Û¼Ñ%¸"|(Û.:q¬’‹”åÿLôîm’‚D§—Yãt2w4E ÊÒžƒñ\IúÎI°š¨ÕûßÿêE ¬¾›ò:¯l뿺ÿd±QÝaºä¦“oê¬g3ÛgV­2®ÐŒq· Mch…A7­º)t(ZÐëY€Ä€vÎAŠv®Ä}ç$u Š[ËÂ=‡Bûõ¿·z=8‹s0ËóJ¿‹øÈ‚•¼¡;@ „©ÿ¿=™³:ó*`Џ%õMÛ”¢u>(Û¹’ô™_õ怜Ï+­CdÓxDt†€®ürÅ¦Æ ­e¹»]¸NLÜ¥_ÛÓÉ—E ÷\)KÈú»)ËóJãÕåGû¸êö9]×uF@×ì ©TÞÍÌ@u+`â.·šÍˆ¢œ?”ï\)KÈú»©Õy¥B]‰Cã _Þü§¨à··ŸøÐ¢LÇÖ €.@é½þÆŸ›NN]–ë$PÀP´ sœ?œKà\)Ëy¥Ö{;‹6ù.Õ –n0—Lx´ñ7Ý62â8@ }º”)Z/ÎÎ%p®”á¼Ò >v¯Ýæ-~)ª Ü:B›þV¿£Õ?;€@g”êu"ÛA:î ¬Ëv0¬¯>”)ZÎÎ%p®ÿ¼šjÎú¤ÛðYWÏ0g]õ`Óëá× Ï®ÞÌ6€@w”Ôµ^€ûa y›Æ‡2E :DQùΕ2œWv»à»óÍÙ×<ÜXÍWcTð¿ñö~Þ¤9#²¥n@êϧ+#àöë‹ÛøÀ¤hA{88—À¹R†óÊ3˜4ù"øP¦hçç8Wز?¯4ûÛ;€Ð[ð¡LÑÎ6Î%ζžŸW3¨n?ã¦Íg€oP(î¬þû">4Ónß_bθâŠÎÎÎ%p®p^¡%@]€zÏø‹ÿö$š)7}¹S¯‚ó‡ó‡s œ+œWHB ôžæùµçŽÅgÊíüç6Ž›¾ØÀùÃùùÎÎ+$!zOë¸ý¿|ó/øðl±¼m±9ó›?j3Í´ÎÎÎ%p®p^!  €ÐZøÃ~P|þÊûÍE·>͇hàƒU ©¸—VHÅùÃùùÎÎ+„ý±oÿæ…î¸Çœ7îç Ôr¶‹&þÊ|qü¼¦V•³ÇLÖZççç8W8¯B ô.Ïžíý)W®ÙæÌ¤ànšSàüá\ç çZ! °Ô:·Z`?·ÏÿË£­HI—T7½FHE{çÏ…O4ã¾ð/+œKœ+ü®IÚþþ_5_œ°0ú/çºA@á©Õ@³¸ó6÷k;ÿ»ÿmý~ºl}ý”yfÞâ—èO‰ŽÎŸy{–Ùú¿þo½'§–¶èç\B«s¥HÛ¹7ÌŽz&远Wè €.@pmÛó~ô~ЦÿJkÏc>õ©£ßG¿.ìjWêÓ[Æéýlßo Læ,Û}é¿@7¸&¼Òú ´Æ;Vükûìg»ÚÕ·þ¬©åOó«—AtEïÚûy/ Tf>ó‡è;h᪠t…@€å¶þs¥æ¶þۭëϮÞÒg]õ ¹à»ó!@+‹ì·÷³")J‰ºY!p¢!·õŸ«(5·õ¿‹«ê×û•OºÑœ}í˜/|g¶ùü˜-ë*²‹êåÍŠ§ú(eB]‚¬8ÑÐB\ë?WPJq­ÿ^°EtÒ¦ÁE¥Ç¦Ç8yæ¯xO T¦ÎßD]‚L¸Ö® ”âZÿ»¸ °`éóÈ‚•fƃÂ_ÿ_ô™?ì”ÌK޲¹yÖºè»gãŽw8è hƒ-üRZ½Ú˜åËmÇ+üŽÿìСŽw­þôeêÿ¯UI?8ø!ï ”Ê5¬Š¾ƒv½}€ƒ®€6P§œr,ìØ‘Éît%  Ýj4K‘ç¸ióy t¾6eyôtàsë£;€ºÁG@ed^ãÏ–u­¬ZDê–dyÒ F@ÙèûgÔK9è €Ÿú]Ò÷•q‰-*ôUÛú¯µ €²yóÝ¿D5É•ÓWr0Ð5@@eåÔò¯+*²7½V¬ÏM÷±iõb l¶ìÚÕ$ t‹@€O¼|ø¢rbgºpìC…ê ¤>ÿLý‰2[µù­¨&ÑT @·ø€ÊÈ)¨Ÿ½ØR±­é6‹0èÔYÏ6(+êø •'W숾ô_ [€|TFN@TdÛÁ¶jqïg°ýþÕý§hÝ’€vØEÀt%èh•‘cÛjq·SnöcÎ}-Tf(+úú@+¬€,€6P9Ñ`[°3ïôªû†‘ˆQ‡|Ì È €.@ðP=¢•wí*Áº"w1®+îýÑò*ضçýè»gü̵ d‚@€uP= ¢y; í”õTœÚßM÷-l܇ +|U :Dõȃ‹¶p0 @@eõ0Xƒë¶6ºÙ"]Wº$¬~·ð×`_MEZ„Ù‡€¬Ì|æQ=²pÕN2A ÀÇ:¨Œ>ÑÕènPÑ®«š±'te@·}yóŸ¢Á½*úíÂ^v÷ÍYÆ4Ÿ¨¤±3ÖDõˆºY àc *£OÀR ½ZÿuÀñþ¦¢^k ¸…¾¿ipñ# VRø£²:}ï|mÊr2C ÀG@eô9¸Ô²¯îAjÁWÁï^ð‹}ý^3ü(}ÿÑ7€ºÁG@e€¾²3ÿÐú~ àcTèZÿÑo€€Ê"}Cë?ú@@Ü{‚uP  /Vm~‹Öô €cP çùØ\9}%«þ¢ïø¨ Ðs³–¼}‡Œ±& @¿€6P §v½} êöCÃ"Š€´€Ê =e{L_ø*}GHq²’ÔaP gžÛ¸'úî¸üîAþ¢øX•AzâÀ¡#Qá¯zâéµ»8 (@@e€žÐ\ÿª%ÆÏ\ËÁ@aˆ{O°*äÎ]ñWÿ €cP wšî“QD€|TÈ•úûÛ¿Ìù¢!m  2@n4ÓÏצ,¾/Vm~‹‚Â!m  2@nl‚ɯp0PH€'0]€`P s–mcÎ €ë 2@æôý`Šø®@‘*‹dJ­ývÁ/]ŠŒ@@Ü{‚uP  S¶fà;e@Hq2`1•A2C¿”  €•A2A¿”h•AºF¿”h•AºF¿” ʼnÍ%=XTè ýþQf€|¬€Ê £ß?ÊŽ@PY #ôûGˆ{OÐו@ÚvøÈÇfìŒ5Qm0qözJ‹@€1¨ Ðÿ*úõ pàÐ J‹@€€Ê m™¾ðÕèóÿÊé+Í›ïþ…‚R#m  2@j³–¼}ömÊr³ëí”h•ARY¸jgô¹?ꎥfË®ýT €.@ðP ¥U›ßj|î¯Ûº‚Ê àcTÒg½ZýU<½v•B ¨,hÛž÷£þþÌõª"÷ž`Tˆ¥~4Ó¾ÿ5óPE€|Œ@e€!4·ÿ5¬b¡/T €•Ašh¡/û½?~æÚèß@U€6P A-ÿv•_]`•_Th•A"*öÇÎXÃ*¿¨@]€à# 2@TìÛâ_ÿ}çƒÃÔ €ë 2¨9w¶ÿtûA*‹€Ó<ÿ—ß=ؘ퇿¨@qï Ö@%PSî"_“^¡øG-ð1•A@ ­ÛºÏŒºc)‹|¡öø¨ jfÕæ·ÅÿÌgþÀA­€6PÔÈ’õ»Ÿßs–m〠ö@¨ jbáªÏî§×î d§cQXT5 ®>ös[WC ÀÇ:¨ *LsúÛq|ê÷¯Á¿Ž#T¥i>í÷·þ«hF À×Ëu^|ñEsñÅ›#GÚ[rïÞ½æ´ÓN3‡*Õ±5j”yì±Ç*ó| € znãžÆL?ú¬fu_  €_/ÇLš4É<ÿüóm߮ۂùàÁƒæ¼óÎ3Û·oïË1öïŸ*D‹y=¸hKã3ši>0@¾^€¸"xذaGëµ¢í¤“Nj*п»ì²ËsÒíôóK/½Ô|ï{ßküN­ïºßÓO?½ñ³ñãÇGû×ÕˆO<±éoõ³n¸!úû‘#Gš‹.º¨ñû“O>¹Q°«eß=Ný­®jøÏQçrÿ6L˜0¡ñóN‚<TÄ;6ãg®>›µÂ¯®#mèUhÕêívÒߎ1¢©v ð¸ÛíÞ½; ¶Ë»V-ðö÷sçÎ5ÇþN…½ >÷w÷Üs9óÌ3›Bˆíâ¤ÇmCH\ø±µÓ®QðP[ví7—ß=}._óÀ*³ëí І^€¸"×må×f[ÒýâÛ/Øãn§à ÛRïà~ë¿Ý¦M›ÖBT¤ûW&Üdzoß>3zôhóÓŸþ4ºÿq‡€ûXé”JNsúÛþþ“^¡¿?Ð@]€àëWпO=õÔFÑëþ>’n×nˆkqû¹íBä^°û[³f¹í¶Û¢ÛÝrË-M]ƒ„Ðc””úûO¿‰•}.ðõj¿Èõ‹mËö €_ä»]€’nçwr÷W€»]Œ¬PWœ¸â^]tÚŸÆ hs‹x@PBú>;cM£¿ÿªÍoqP€è—¸™xT »}ýþóöwH«®6n ðog¯\pÁ±kím’+` 6€{îí,{{{ þߨàß? '”ŒVòUѯïe…úû#àëå:nAœ5ŠhPšågâìõ.?Ó¾uÐ9@¾^®çl7Pn«¿fûY·uÈ €_/+ ,®ÕŸY~€ì€6P­þ@þ@¨  †V wt‚€Ê  @hõz‹@€¯Wë¹# hõúƒ@@ÝTav <§OÍò±ä9ËS*ôÙÓkwÑêô  €_/×è@o˘1c†¬°Ü3ô‰ }»š/­þ@ðõj € ñaÆ5VÖ=餓š E­¤ë®Ê«‚]?³+íÚ•„׬Y­ü{ÑEWüõWÝ0aBÓß«µú†n0§Ÿ~º9rdÔjí¯l÷«}$Ýgè6I«ýÆ=פÇof‹î¤û‹Û§ÿ·~áÞÉóµ%îµÑëÙ×°B@mÛó~Sw}ÇÒêô €_¿»ÝEÅ®Ëý¹ýûÝ»wGAÂ-ˆí~ôÿ§žzjSAmƒ‡ÿ÷/¼ð‚>|x#„èïFŒûï¤}豄n~úÓŸÆ>W»_ÿñ‹-ª“ãäÉ“‡ìÓ¿·HïôùêÛÇ÷ÚØ× oÝ€èõóW+¿ýüT·Ÿ…«v²š/ÐG  ½ *m‹²6Ûòn Nÿª€[ĺEpRËz\ësÒß6ªq!Ķr·SÌ·ºÍÎ;cŸ«$µžÇÝîý=õÔSCöé·îû-ù<ߤ×Á¿B‘wØ·ÿ€ùåŠMfƃæú)óÌÿ|w´½ñ¿œ€Ñ£oiü¬n›ŽÇÔYÏšK7˜×ßø3pS·ž9˶™Qw,>7õßYK^£»P  ½ ~ëv\¡¨VjuÉq»Å¨(]¼xq£õºìÀm‘÷Ÿk§ÀíŠc÷é??_· îµIz]³ôø¢5æì1Óc‹ß{ÿï‘æÑÿó|sÞ%·×6ø›BÒá(N³ ~ 쵟™Sçoâj:P €ºÁ×Ëà†*$íŸ[ÔªPýÜç>׸m¨8Mê”&ø]bÜ}…Zó“nãw¹ÑóõûûûϵÝ.@Io¯ ¸ëëäùúÀmâ^笼ñö~sÕís(ê;Ø.™ð¨Ùúú[|ØuhÕæ·Ì5¬j|VjÒõýP,€|½\ÀàzÙe—EMm¿r·›ŠÛ2í÷GoÕ²î†u· âvQr»Ó„î3é6þþ®½öZ3zôè¦ÁÈþs{üö¸¹E·IÇÏïäNž¯ûXüׯ¬Yò‹ÿ³®ža¾ðÙæË7-4#o[lþñö¥µßþaÒ³æË7ÿœ7îçæœëf6¯ Ç>d>8ø!xmزkTìÛÂ_!@a@1(¿¥Å~mò˜TÝ~Åì÷D.ëí‚ïÎ7g~óGc7ñ¡E¼iSPëþäW…¿ºýh~ÅF ÀWôu’fBñ^›<ºÿ¨ëÛçÿüçRÜ·±éŠ€{%`pÝVÞ¸ Ôºï¶øk€¯ü2À(@¾~M ¤1oñKâõìk¦¨ï`;wì¬Æ1Ô A8NÓv.Y¿»ñÝh§ôTᯩ>” €E¦‚•Öÿì®\qëÏxS™cóø«ÈwgõÑ÷£ºú0—?PN  ™ V[¼ª¥ ïlppã*ʘéµ~?©ñëÁE[óøk?s­ynãN6 ä@(2·ÿº Y úÎ6 ž¶Ç±Ž4£;°W›þ­Ÿ¨@]€às€.‰»_vÓÏù=¿ï×ïϽavT¸RÈwœ U'jÙW ¿;°WWøª‡@€OkL_ðjôÿ üž@¨ÂgšŠ| æu§òd`/Pm€€2q W y@ÍÝ?ó™?4 êÕ6vÆšh–öÕG ( É®·D­úîžv6ý\¿P€€2!\úîZ¸jgÔ²ïýjùW·] PO€€2!Ôo_óó»«ôÚ½Ó¾­à ¨@ý€úë¯ÛºÏÌZòZÓ >îôšÝ‡~ý\¨@=€fîI*øµ©õ_W:ÂI  €.@Ê$ÏpÕ}/Ķ"Oyb# g*ø5P×ïÖãÎÞ£Y}Ô½‡¢@€€2É+,ÙðF´ÿç¶7ýü§¿~-úùŠß½Y«ww­¸ûäŠfâìõQß} ~Y#”IàÎWÌ_?þï!Å¿ªt% 4«ŽfÑÉ‚¾[Ô_­ûSço2[?€¼Ê$°yç»æ½ƒ™K¦<ûû˧FŸ‘[ÿë=óÕ;—7®èßÿúãÕM­åq!ÂË¿šÐξò *¾Ý9ôÓÒcV ÄU¡¯™xÔ•'®eŸ‚@¯Ê$ëWܧ ¶ËЇý5¨êúnáî_=ˆ»Ú`÷·ÿ¼®:¸ÇQÅ{Ü`[ýÜ-ìí¦ùõUà'õ×÷áÒßévÚóòè@@™dìÀßV}ü“€_ ëïl˜°á"®Åßß—$ÜÇ•×U¿ÏÿËÍùÿã©–E|«íkS–GE¾Zþm¡¯àÀ´œú‰Q¤×mÈ-æmk¿tUÀ-øãö•² g]3#ôøÜÂÞnêÓ¯_y ¨PyuJü1i@œ"»©[ŽŠ|?pe@™è Lú18î*A(ØŸ']ˆ›‚´ŸÀÒýi`®¼Ë÷€2#”I Õ4Ÿq}ôã~æ_)HÛ¿(ÀÒ¬<êêó·yÃ(-@@™äµ˜ wñC@Òa¡Y€Ü}Ä ÖßµêNÔÏU@ (“¼@Ü|ý’Ô5Èí÷<õ»¦~þqWüýúSŽ {€€2É3´³%¨ÂJÀP€€2! T€ijL ÕØåìÝÍ®PÉïÿ_¸jgÓ@vÓ,!ü¾ûßO¿)ZhÉßìì+ü~èï¿8a¡9ó[÷ö=”}#¨:@€¾PGM^š¸Œí"Äïù=¿ç÷Eùý™WÞG @ …¸/Ùª´ v÷{Zðóý=W ÚÿýY×Ì0g\q€A¨ˆ¢Œ @± "HƒA @¨ˆÑ7þ¤Q¸^øï‹(æ;Ù¾¿¤1Ž‚ ª(”_|Ñ\|ñÅæÈ‘#mÝnïÞ½æ´ÓN3‡*Õó5j”yì±Ç õ|Êz,­I“&ÅÓ">žNßïInºoa£pýâ¿=I1ßÁ¦àdá%åC@%P(*–žþù¶o×mÑzðàAsÞyç™íÛ·÷åyû÷Oèî=T– cÆŒÉì}÷ø¢5âõܱ³(è;ØÎ¿qnã*P@PqEð°aÃÌ 'œm'tRS¡400ÐøÝe—]Ö(Z“n§Ÿ_z饿{ßû^ãw*Ìt¿§Ÿ~zãgãÇö¯ÖÙO<±éoõ³n¸!úû‘#Gš‹.º¨ñû“O>¹Q4«eß=Ný­Zyýç¨âðrÿ¶Ÿ0aBãçqÁH÷ãÞÿ\Ðø;{_kÖ¬‰ž·ûXÝ}é1¤¹oÿ¹ëùøÇÈî×ë¸ûŒ»:ÜûÏÑ &þc·?s î¤Ç·ß¸×ÜÕÉóµÇ}O¸ïƒ,ËêW¶7õ_ÿòÍ¿ ¨ocyÛbsæ7Ô8~ –nàƒ@%P­ZžÝîúÛ#F4Ò~qèßn÷îÝQ0°Å–»V-ðö÷sçÎ5ÇþN…½-:}îïî¹çsæ™g6…ÛåÃIáÇ>Ö¸®"q÷ïþ,éy»ûÒÿŸzê©MÇ-é¾_xá…Æs÷Ÿÿï¤}è±ÄÝF!%.üô§?M<ÆqÝ=¦¡Ç8yòä!ûMzÍ»y¾:ÆöñĽ6ö5ȲÐćŽwaùü•÷›‹n}šâ>eñÖÕ3šºÿþ(›×І€ÂH*rm‹ª6Ûòì¿~ñw;Ÿ~À°­²~±ç·ôÚmÚ´iM!DEŸeÂ}<ûöí3£GŽ YÝÿ¸C ©EܽÿþÝ¿³ûí+®õ9éï›^Ÿ¸bgÒ>â zÝæ©§žŠýû;w&㤖s÷çIQ÷çï7é5w¯ä´û|“^÷1föí?`.ûÐñ+WÜcÎ÷s'lMü•ùâøyM-ÿg™n¶¾þÊ*‹€Âð !¿…×ý}($Ý®ÝW”ÅýÜv!r¯@¸Ýon»í¶èv·ÜrKS7é&$Ý¿îcñâÅý•9¸ÇÓ?ÆÝ·+ŽÝ¯ÿü|Ýû÷îkz¯uC]οöþ¦î@l1›3Û»ýrÅ&>T…áQ~a¤BÊí{îùn ¤ÛÅu…±ûhÕÝà kqŽºþØÖ_õ׿÷aï6ø÷¯BõsŸû\ӕФ}%uJücäî+ijÑ»®”øc#âºt¹Ç¸“.@I·±!$î5wK»Ï×þkÓê=Õ ] ¸êö9ùmlêö³éµÝ|¨< #n&w§úúýçíï4V]mÜ@àßÎ^Ð@ÙÐ`ؤAÀ~+±{îí,{{wЩÿ7nqèÞštÿ~ôVûrÆî;®…Üíj•ÔÉÿwÒmÜŸ_{íµÑëéDŽ;Æþc÷iÒcL:vq¯¹{Ì;y¾~ q_›¸Ç›5µfk6w€ö·©•-úÕ]êú)ó̼Å/Ñç@mP(yCeŸÞ²çjÉF±^›,§̓ú—qZL;0…’Ww©KÍN„b½6y¾ß³rÅ­?kj1×Ze Çªq€¡€XÏ®ÞÒg]õ ¹à»ó!@ƒŒ‹ì·÷³’/C¨?üW>éFsöµÿa¾ðÙæóch´¬«È.ª—7ÿ)zœêÛŠÂÑI›Í•›ã䙿â…€@¬K7˜G¬43žlþúÿ¢Ï˜c§?e>ˆG´¤þôeêÿ¯Õ|?8ø!/Ä ZÒ•€2t«Ñ,Ezœã¦ÍçE€@K¯¿ñçF˺V."uK² ži#@< •‰-*ôUÛú¯µ É€TÔò¯+*²7½¶»°M«’©Ù.ûP¡º©Ï?S@:@jêg¯¶TlkºÍ"L:uֳʊ:>Š„h‹Šl;ØV-îý ¶ß¿ºÿ­[Ð6Ûjq·SnöcÎ}-Tf(+úúP$@G4ØVcìÌ;½ê~£°ag$bÅ_hÐ1­¼kW Ö¼‹q]ypï–hеÈÛYxl— ¬§âÔþnºoaã>4YáÐ> ƒë¶6ºÙ"]Wº$¬~·ð×`_MEZ„Ù‡ ¬€Ìèj€ t7¨h×UÍØº2 Û¾¼ùOÑà^ýva/»ûæ,cšOÈ9µÐ«õ_Wlïo*굦€[èû›?²`%…?dˆÈ•ZöÕ=H-ø*øÝ«~±¯ßk†…Š~ȨP# F@€!5Bj„Ô¨P# F@€!5Bj„Ô¨P# F@€ùÿ±ÃjHîŽIEND®B`‚xio_chain.png000066400000000000000000000471031362133436400337510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img‰PNG  IHDR û׳PsRGB®ÎégAMA± üa pHYsÃÃÇo¨dMØIDATx^í½pÕîí?R.¶\· 唪RQ©Þ Uª[µ…Vû&ñ%?P a•€²ZCŒÂâרX€ ŠŒ12ÁAÆ&޼ca¢kÙ¤Å8aˆmŒì+\ËÄN/~¥bƒëÈÉ–ï#}Ogfzzºgºg¦ŸO}kêœ3gºOŸùö3O÷ôôÌø”8 J'(œ p‚RÐíÚ÷§Kç¶$Œ¿}4®:X}¬P!3hÿ#3œ#È9 z‚fLƒBCCƒ´ÄcÎÅM3ͪDZ4sæLUòDÔÑÑÇÞÞ^©‚õo«Ò§Ÿ.ü¨9˜ ×·U >™œÐ˜ ­Ï¿#ý?]SS#eMyy¹*}úéèèhII‰~cÐY . a‚R¢'"YÄgPkk«*]x2E^NÐÏÛ­ºfŸ\œ œ‚”NP 8A)h‚,•µBuºÀ• パT×ì“—ÿ1_UU¥J™&cÔÝÝ­J‰ÐsqúÄT·îÖ¢ã/7èF飑Y8;1)ÕxM æi£c)allL• ***àa©ñÐ"nÈÀ555Á›b‚šž =A|¶Z7JÌÂÐ)µ©2A˜s‚ä)aöìÙª”2–AÎè¹HªÓôD$‹ø] ÔÖÖ¦u á’¬LÐÆöƒªt‡~òUkRt\»dµêtÖí¯X3b…êePþ J'(œ ¤1Aߘÿ¸*Mci­ªÓ®ûÙW¬X»½Á¬ª~ÓX’_ûᣪ«;†‡‡Ui‡“™ñ¤1AÖ‡«ž‹3C½º¬Cuº€ÌBÝÆê§^h‘òÞ¾]2/R•n‚5ðAVKÂùd`vâ'¦ÑjLFÒ ’S¢æ‰QÓ¿÷#=˜ Éócç'FMï‡Íže™‡Ðýe pÒRø}ÏÚÏO~rë†#xD‹9T¥ Ìš5K•2D2(a¨N0繃‘hžýHIÐ"&ȼàz"äºÄø ²®i”BII‰Lf̘¡çe``@ ÀýWŒ!dw±_´š¬yb¯*]ÀšŽøPý!ü Êq8A)ी”‚ &èš[6Z*kFü‡Öwñ¡úBd͈ñóÖtćꗈÚÚZUÊ~'¨¢¢¢»»nµ¨¨H5}–š{_Ñsjwk ç'Fuc¼QÄT­8¤§C¾bE‹<…˜îkƒ‘$üÒ}æÌ™p§555èä«Wqªn¾}ö;Aru¢ª$AÏB&ÈlL˜Aæ‰hÁ,§œ ùSÿÎ.†·*{œ ØÎWUÉÖ¤˜¡zXÓaEåMmª_ ‘Ay '(œ p‚Ràq‚,¡µBuº@õO®Ò×!v¼ô$×í¸K·¨~°T9>T¿@ÈÌY—)ªNб`ÝTe‚Vnž~ò¼´K75¦uTý.ð,p†bõYJJJŠ‹‹Qê‘„¤÷iM=2ô\Èu‰Ö½êï_< ³Ì‚C˜§P?üxBfaüìäOc–òùÉOÌ B¨ÞÓR Øþ„NÚ'Aìbz"ÎŒþõÜÄÙñsSo8 º]ºỉHªßêëëU)9úD=5pðGÌ&ò¨©©IÚ“Ä}wù¿ÉD`j°[¡Eï\ÒMcMG|¨~^qøÙV<'(:p‚RÀ J'(œ p‚RÀ "¾`_0ˆ/˜@ÄL â‹ÂI še[U)}RÞîË:è!‚¼£XP¦ˆ¿tÂÂÊ‘r ££#áw3æ-XsH$œž>thêê¢xðîîyõ¤¾€Ksäøii´²Aâ“ɉ›fÊ/ôï̻֙ἠ+E~qÕØØ¨JŸ9‡þ%%%òyL¸„”—py€ 4EŽ(P>š"§hÿþý3.ÐÙÙ©Zs•‚J ]ûþ¤Jé0¿q»*%góŽ—­„H+âïY0Pˆ/˜@ÄL â‹èæû~G™Và%êÅŽ8ü-—C¸¼»Åõ+:¬º€o $…£@–oM+ð«¥$ÁºlÔC¤\EžRø $¿i4 ñá3¬û[׸K8¯"åFFFTé³ÈÕÝæ…ÌòÓùÕ)ˆÊ?9‘@%%%r’ÓÂŒ$wbyÿÔ8Þ U1wÈÊ ÄÑÝ5xDÞ t£xw±„„§‰e² ‰³“ãg§~V¬ñûž!<¢ÛùÉOäG·n8‚¹—³D²U QÿxB# ‘ðl²r"‹¡?²Óÿ¨"UI—¦¦&I ÑÑQi‘Ÿ¨H‹üÀ°©ð©@n"å*ZZ’vHö%F.P8 tWCiq)ÿ!ÑʱêÑÕ² ‹ÂI  L â &ñˆø"i¹ùŽÚ–{M+Ô"’ðÆ[ï™?)O7þåöUjA‰°±‡P *8²¢@‡¬VN¤jI0³Aª ÖÍÁ£ÜDk·7ÈíSê6VëF YNB¬lð)ãAWW—uib[[›y’0¹ÕñŒ3äv!EEEÕÕÕ(ãqbbBΨáQN°ÉY"é€öÑÑQ9E”ìÄ›Òx¥>[*›„ÕëSR2YÖI3ùb+'lšúO¯3C½(Lž“[¡Äw“˜ZJ"äDœ™ n dµ`!{^=9½HU+ÉÍ ¥Qoxà5Ù:i‘3Ñæ« çÈ]¯‡†¦þJN#iw=‹I‹›ûØ„Bz©§3¹ŒHo¡IZ „FäÍ`OÓØ™o $XÙà!Ô‚¡ó0tj i”GýŸÜHetpH dXgE<Ì3ÑΗ&šwšOë®óþI/\’V¹µˆ$XÙ q~ò¼¾ÝŽ|rÉ?<¶GÍP J„™ ÞÂ94eeeú3 Ÿh¥¥¥RN‰–(3ð)!7DBY X8ä ©‰2¨€›oKœIú®Ô¯}V•2ÊÊ×[iá2V­¼Z-"9VB¤?Zåôߑ߮û•é†ZPÁ‘"Ñ D|Á"¾`_0ˆ/˜@ÄL â &ñˆø‚ D|Á"¾`_0ˆ/˜@ÄL â &ñEA%‡;­yb¯z±#Þî<$‘òwÓy èÓ”wºæ–Öå‘éÆsÿƒZVÁÁJ• ÞB-«à`¥ÆJo¡–åHUU•*ÔÖÖªRNRÈ ‹Å***ô«äVÉ~Ëæ€• fŒ° ÉB-+ ÞîP–ò7555ºÜ]*ãr™yƒy”ŸfN?“€„?œF+Ì@Þœ>Ñ@=ÞþLB/ÍÂj”÷[\~a˜ 鬄}ã’K.1÷I YÊÃÃÃÎ ô@!'@ÒHUWW£ wÇx<''Ï¡ðÞ±˜ù”zi HH©è,;‰€mœ5k–¤ˆ´I$™¤cFnkgRà ”¬TðjYI˜={¶*%¡¼¼\•r &Pj¬TðjYÉá= +¼…Z– pØ…ð ,×`¥ÆÏí;u¨e…³a±¯ªR: ¼{jü\êÛY<ô“¯Z á>¶?ø7«ÈS¨@ÄL â &ñˆø‚ D|Á"¾`_@Þ® }æù7ÔëYp÷fë…)Ãåõ¦~.i-ÔÿéM še[U)}R¾Ö:}ç>R^oz墨•q7ÍL+®¨? –UpÎG˜•i…ZD¬lðjYh*Ô"’`¥‚·PËJNGGGÂë­??È5 <äÖ÷f!a¨E$ÁJ+¶>ÿŽÕ"·²·B-+ ]]]ª”ˆ¾¾>UŠcÆŒéÞ¦¾ººZ•2AÈ äþÿ7„×¼®J~<5kVN¤û/ ÿ%CþÚÂÊ<ŽŸüÕ®©šÿmÐÿ·xDݺáHü “ý‡©1ÖUˆúrÕ„—ãQ’F§ŽYţ̰\è800uÝ-ÊÈ!óÒG?ä„!id¦†‡‡H¿h[-y# t~bTuë;ÞN¶äå•õJH#¢iK¿üw3É„²~ $ée†Ã*þuîõª2@ ?È^‘( !¹‚²¼ÐL ´è¤Á#@å’é;Ÿ„Ÿ@aytþ—”X9@#òÆÿ߸è$ GùÏoôG˜~ „ô2ÿó[Ú ’ð(SX9‘V¨E$ÁÌÏ¡–•œdfYŠå&L ©P‹H‚• ÞB-+û÷šuç¿xÊM íÞ•<åÉh+'Ò µˆ$|cÑ+<„ZVÁ´íÚ÷'UJ‡®î7U)9›w¼l¥…›py½é7nù•î£rÙ‹¼¤•Ä0ˆ/˜@ÄL â &ñˆø‚ D|Á"¾È|ݽá9UŠã·Þ³Îã¹çUKI‚õ?ðé†ZJ"0lëÜ`ºqÅ’ÿ©–Up$N yËÛU)£´¯ù¢•î#å•ËVBXQ·±ëv܅ǵÛt»Ž¯ÝðˆZP•K_°ÂC¨ee¹ [($N Kç&½Ù‘¬œH7ÔR’`fCÿö½}âØø¹1”%]@hÑ ´ã¥'õS›l¥‚·PËr䢋.R¥ Ä·h亰™3g ¬_¿U¹A⌠—ÇH}ä"5©ê‚\„lj‰‰Y³fM?ã…ÄïJÀ ÔÝZd†ZJt*œý+r!Y"! ´ró|”÷öí2Ÿ’ðœ@¹¤Õù^R•••ªd í)..–Û?–””ÈåcÖEd&¦VÉu‰EEEÞ.ÀÒH ¹àKF CǺ§ŸI€uù漦©›÷X @ãéÝÈy…ó£Ç_n0ûè@‡KZ­„pŽd $×°j–?>e¼¬<Àcf/i5/AÔ—´655áQ_Ÿ944$…\#=BŽK!sQЪhù¦L¢•¹/®™@º1>ô;aÆ#ÇO[ ‘n`“±+ÐRsï+²^ iDdð’Öÿë’ÿ®*Ó $úÌéuø, —4ÛƒÝBçdRZ×ËY !a) /[FL/#)VB¤Éö “@2@³tI«åW\¢u |c ä+!Ò µ”$X qrä„4Š•Ö`€ðx~ò¼Tu¸L Ï¡–•çO(‡Ÿõà£Ù#ˆ†­†Ù@OÉ¥õ@_c/ÕáááÑÑQH€îà™‚M sguYŽÁ_£€Z°nŽ~V"ÜzzzL¿Œ$pþ½€•tbR¡@È$”HßnÜÏñ—ø]©_û¬*e”_®úG+'ÜGûš/ª¥$ÁJ$Ù¨Ë8Â?xln×qÍÒ_M/&ߪû½• B-+X¬ÊIwkÏWa:'Ÿ•î#åxªî¼Ãʉ´B-% V6¤ îÝ©Tp¤ø\ Ä&ñˆø‚ D|Á"¾`_0ˆ/˜@ÄL â &ñˆø‚ D|Á"„„ˆ BHhP€!¡A"„„ˆ BHhP€!¡A"„„ˆ \d~ãvU „F>jÝÞ£*>¸vÉjëf`AÆ®uÿmÓÖ÷$¹(çðöoÖþ¹ù¾ß¨’'úÉW-E%ܽY ˆä ¢ðy?gKŠŒß•º®®nÆŒxÜÿY/¾øâ… šÿNAÒ…D MÂDJIUUÕÈȈªHC¢bÊ(@y >ukŒ¿TéîîÖÿª¢ÿü¦··òGQn0wÝ÷O«Rräµ4–8Ç'“x<°iæØ™³ÝøÜŠúúzUš¾¡?&S?ŽÀ®Ž²Ì¼´ëàÒ´´¸U@-XŽT/¹ä’¢¢"T«««±üááa4JYgúEªƒ‘â½FUÆ)#4—³P€òÉ0LŠÅb"=Û¶m3E*%ó·þ’Á}<ú_–8‡)@xÄÚ¥]Z^ßVñÞ±˜ÙÓ}øÙН~çÿ‘©0Ñ2Q\\,Aæ6áßÓàÐL•ÑKFattTª%%%xIš~ò3eýAÆ`6Μ95™hGˆôÈs P^¢ÓKþeT ÔG,Z$kõfJLïpäøiUJŽå/,!pŽó£x¹9º»¦»µH‹‘x"Yà`OS²ÿ;M~¶bhh(þ„ŽÞ½!²ÃË_Ê:ˆ»Ãÿ¹ Qø<{b AXás+ÀìÙ³U)}¼<Š2 ¢ Y466BŒúûûU=ƒƒƒUUUuuuªNÒ„”sœ8yF•‚å«×oR%Oì\ûyK B‰¯ü cD€”s„r!¢ÿ+¡÷‡#–÷¬¼N†ä  BHhP€!¡A"„„ˆ BHhP€!¡A"„„ˆ.@ßÛÜö@§*ù à{›fêf¦•7µY¿/2æÜ¹ÿᶃj($O(d ëÞ¦¯û‹*y"¬{›ú¼™é7nù¥¡Äõ+ÔmIH^ÀC°œÃÒ…ÀÂçÏ8-!+2øcTÀû±f PÎaéB`Aòë~¬ùHÝDNî2¥ïìÕÐÐàùÎ^>±t!aÝ]óÇg«Q83ÔÛÝZd>å9B ­Ï¿sïYç'?±ZœÃÏV˜÷crÃIatt-RFé‚dމûû±,D &&&ô=-= ǫoŸæp¿´œ‚¤’IRA Ð÷6ųn¬{ãš×e—PuG¤gͽ¯|ø±«;Ztîãaý”´àQª'ßêp©PØu÷¼zRFEP#KΑã§ÍÎR¶âô‡çt¹ÿ¥°ïðØR]Eˆ˜DY·KU¨jÅ¡¡Scx<:pFžEU V¤»ÒsùãGËËËUÓg‘=Ù¼/*ýñ‰áò~¬À¼Yª ‘’¢¢"d¾Á³ù,F‚§$§ ™a¢’Ò.ÝpØèGì2 H¡åF¿7xƒñ(ï™~Ýóþ©q$·ª8‚núþ¡–.$Œ„Hý `}ÇÛ.û­ª8: ¦-ý?ýÙ S›D€Ðbµ#<ŒÇåVˆè£ð~¬@[ ¹û-@‹ÞÏãáýXÓ‚”sXºXø9x–„>·‚÷c  PÎaéB`A2áýXƒ¡(¬{›ŽŸûÌ_M¥KX÷6õy3Óoß±×Ò‚PâŸðK5 ’²…u!¢ÏÛ›†roSÿ73Ýù‡c–WÔíT£!yÁ!¡A"„„ˆ BHhP€!¡A"„„ˆ BHhx yËÛÛwV•,óÌóoÔ,Ûª*éóÆ[ïÕݱxóý_¶®»ËF`-Kë<<¨Öí û;·­¼zå5×ýì+Åwîøá‹|]FŒaW.Þvùm]ÖõÄ×ÿvÎMS7T!ùEz˜îijnËKªäšúúë-&V¯¸\ÀW޾̒+Þ>qlÁº9V£ÄŽ—ž¬ÛXm5¦?ò5”tøæ¢í–(„?rŸÉÒ LýÒÏVméB¡Fà K$ :P‘y\·ã®½}»ð”ùй‰³º}Öno0 èp~ò¼î0¼½Ë–„ÙHÑÖÖÖÊÏÒÜÜìçþ‡Éîæ!÷÷©®®VõäXK{†Xú^"Ép³®¬BÊJ¨xÂ’ýðƒ“#'P?7&íÐ)‹B<& é  ñqêéé©­­UwÔÕÕuu¥ñ·"¢²ó‹èë²<+·+Ó7B»ä’KÌ›¢9yŸ3´Ë2QÖí¦¦¦&Yš¹œX,¦ïÐÙ Œßç4K”{›"ÔDS"@ºj кw=õÂÔ¤I#ºéžÎAÊ,sâ[0¿V ‹ôv•'Ïø¼á±gÞxë=UrÍ÷n~ÈÒ…`âÚ%«ÕC (Ctvv–••UVV¶´´ì7hmmEcqqqGG‡êJC È7ååå.Å"UZZ:66¦ê$(@¹Èg¨ù ¹¹¹¿¿_U\344´páBU –ššUÊC(@¹…{š1Íèè¨.ƒááayvæÌ™V!«x 3C½Ý­EÎ-é†W|îÌ8.S%Ⱥz{{'&&ܬÚìƒJÁzauuµ*å ÜÂ¥•””¨Ò4)Äb19pÝÑíÙàÃ'T)M:º»æÏV£à_nâC È5æV´´|fò±'O«ú¦Ð£€…„â^__¯J©ÐÂQ\\,UÇmÛ¶ ‹…aù³fÍB»”ñ¬ŒG^%@^ˆG©bœ"Lær™,&(ñ€KB’éôH5UúôSÉ9$1òUv›´¸qÍëW6TGЭæÞWdö#@x”FÝ‚ò{Çb¨bÉxL+¦‡æq+êêê¤ÑDÏsEE…€ìäЋøóD8‚S¥Tè%ËÇ ªz"I¨ÂIY0ßtÓ¡gSS“T¥]Ò ás PnáR€€|ÄIÚ™$Ëx,**’—ÈNë!°û ‘Ýr~bTªƒ=MÒÓ}øÙо¾>5²Ï @ ¤ÈNŽG}Ì«Q¥Th5i‹ ÁI¡»»ƒ¤ï¸ A¤G TIÒQËÐt³[Þ?5.{£ª;"=?²’FˆNO¬Ä¿a0ž·¢³3ÁORd>­=Yïüñ$T±„à]ÚX™¤° phDA†-7ÐD´£€HÏt÷©ªŒM^eº¶ÜD%.É\ |¾!%%óÌ‚HòRç«{°«’#²Ó i ÐëÛ*ÄòˆÜŒÐey„î¹X²¼Ä}Èx€‡­(--U%=ÚQ¢ÅA€ÊËËU‰¸€”[¤ë€r„´(«¡䉡¡¡ÁÁAUñŽ¿|.!jP€r ÏPò 䣫«KUÒ¤¿¿ßýñ(@¹Èg¨ù£¬¬l,Í+›qä•îK å Ÿ¡äŽ[WÅÓÚÚzñÅó°Ë3 Ü‚ä3Ô€2”¨©© gêK¦ À"¡ÑÃ/6ˆ(·øn]L•‚eüÜß/öÀU7o´„ ”xaÃçÔ€Hž@Ê-b;_U¥`ñyOe ÛÒ‚PbÍÊËÔ€Hž@Ê9B¹)bëöUòÊ­õu–þúE5’'P€r‘yËÛß°¯ñÏ]ÝonlwuÑpJ¾˃ík¾h‰B0ñ‹{þiC[8w³%~ BBƒD !$4(@„РBBƒD !$4(@„РBBƒD !$4(@„РBBƒD !$4 \€ÆÏM¬ÛòÒ¥s[ˆ5OìýÛG®þ /%öÚÍ{¬åg#ܽÙç½M0ìŸ?¹ÏZEqýŠŽ n ’B ö݇Þ=¥*ðÁÈGþo-øtç¡í~ÁºáVVãÆÛïVëöAì·¯W.{Qþé8”øö¢§ÕPHþP°„Oã'ϨJ€ÀA†T%}0ìk?o Dqõ¢‡ÕèìĤÕbEÿ;ÖÜûŠÕ˜0Ô€üxBÊÉÎÏÞðÀk(ߺáˆt–§ .(8ƒ²:£§n¯ZqhºûTY; ñ³“hùÕ®YH|ÈK€›­XþøQL¾”ëêê¤`¢÷dÌ<‘|@òHUƒ#8UJ’ÊÔ/ª²#Yµ<Æ?‹OD]Æ0 PqqñtÛh×>hÖ¬YÒ˜ D]€DGiâ}Ð’î†UCzdp)@º³B˜èåÇf½w,&íÒ‚ÇÓ'º¥Å½EÂH°ÓÊHd`ÎHO‘¡„tMcOWïûR†šˆÖ †N™Uhßá >ºS!b$HÒ“‘a`î·$=ñôõõ©VÙ“¹3ƒd{òÈȈ*¥bllÌôÔ"%âe MÈ:‰Ñ¤Ÿ-**’gñr@2„U ›ÈÚu·xÝ  Ðx«´ÜH wíi¬z}ÇÛ’Ùi ö„ÂÉ·¦†§ìÏñ—ÌžnâýSã2 „ ÌÝãO(@(zBJ`´m9?ù‰YE@€dÚ%H%@°?ÒßáÐ,­­Ð„·©³³Sµh²vZÙÏãI¨bÉ€”HK³$eñæñ$eAF…þZ€ôÑ¢TH'V$—a›‡~¡CRX¤EGÚM—›½jÈKž eo¤}: ;°”A7Œ\ÊÉHŠc9 ˜#Ë¡EÚµiBxs@ÀåV`ÚõTZZ*½'ëÃp$“ Pyy¹*wD]€ð©2eg/莔>|¤E Q )IWûL\ Ð`ÏÔ)s-@òÚîÖ"Ýrt÷ÔâÞþ d!ÞH&@ò¬ˆ…œÜÉS²ç‹ É9 ´ÀI7ˆ‘t“>"@RÉìB:x`hhhppPU<ã/ŸKˆ Q l€e#Ô<‘L€‚5 O@>ºº<þš¬¿¿?­ã/"P€2(ÄPòAYYYºW6ãÈ+Ý—”y(@!†?p8V\\l]OkkëÅ_ÌÃ.?P€2(ÄPÊP¢¦¦&93(À"¡ÑÃ/6H<+@ß­›ú¶"¾zý&UJŸ«nÞhéB0ñ†ϩx¢òGOZBJ\ñã—Õ€HžP°Ûùª*Κ'öªRú`Ø–4kV^¦Fà ÛÒ‚Pâë‹«Dò„‚ ÊMýßúÖú:KˆGý¢Z½WæÜ²Í’ƒàcÃÓ>#Ù¦Ì[Þþæ€Û }2ðî©ùÛÇÏ©ŸGùáû·<ؾ拖Fd)~qÏ?mhËŒRWÞ«\ú‚% ÁÄ7—ìzhË5’?¸Br !$4(@„РBBƒD !$4(@„РBBƒD !$4(@„РBBƒD !$4(@„РBB#mzã­÷VmÚóÚ±¿¨z6ÁZÖ<±÷àaïÿ:ðo·ÿrõŠË­[pe)Ö¬¼ìêÅÔŠýñ½Û¿rÙüë~ö•Àâê•×|çö?S ¾{ëS__´ÓºUXqùm]—/îð9x é ÔG•‚¥«ûMUJ‡k—¬¶4"€X|çjõ^™³h­¥AÆï_:¦Æ‘&•7µYº|ì~‰ÿT‘g¤'@ë¶¼¤JÁÒ¾û°*¹/±¤!°X»ÙûN1lK¬¨ýùe'GNX:ÎMœµZÒ 8/5”tÀ°--%à¿Ô€Hžžve‹¿}4®J®™»ô1K‹Ënðþ¿`×,ý•¥i…%@ç'Ï[…”1·éëj(épõíOYZJ\QŸß·…ž5k–*y¢¦¦F•ò‡‚= â?üùücBKp=Pñ>Ú¡3×í¸ë©þþ4Öm¬ÞñÒ“Ò/@è°v{^µ·o—´ÄÇÔ8Ò¤Pÿ˜ìß¿¿¾¾¾Ò ®®êiO$S ÐÄÄ„1û444HÁzauuµ*%Á庲 (ó‘qB<6uX‡‚ÐÊÍ󵂘îFúôÿgŸù”.h‹d¾Ê IZžÕÖÖbçtøûÓ¡¡!é£êé€Waçß²eËŒ3z{{ÑRTT4sæLq@xvlllÛ¶mhA7ô‘v)ãY(‹t#âQª£££"Læ„ŠŠ ä%Àyð‚¹ £´¹Àn,é*-R–ÏQ“tÅHV˜¢«È{†þ´@JYIf^:@†ÜÂt@/?6ë½c1i—<ž>Ñ--î-V­GâR€tçl ›ÀRN5ÀÞ+}0þ„tMcOWïûR†šˆÖ †N™Uhßá >ºS!b$HÒ“‘a`n/˜›ÐŒkÂgª «ôôô¨qG¶àCCË´Ñ´§{üõþ©qɇÄÒ»=׃¡pò­©!iûsüå³§›Àª×w¼-#IK€°?䂹™j ÷^ÑMý3 è )ýѶåüä'fB7´KK€`¤¿n—ƒÌMLðK-@æù€”ñ_!çU‰¸#‹,Ò¢#íøI÷›?I/U‰$x ÝèÓÉ C.{‚”sA€d$ÎS 0f½uÉHŠc9 ˜#Ë¡EÚµiBxs@ åàs𛛥`¢H„dgÚÚÚT‰¸#+dž RúÄ@£2ŽKì™:M®H^ÛÝZ¤[ŽîžJ5÷ö¡È¹#@i‘L€äY ùl€ÉS²ç‹ É9 ´ÀI7ˆ‘t“>"@RÉìB:x ¾¾^• LÝ1¯¾I&@ÉÚÝìºÁdí…A¶öÿÐq)@Ù Pˆ¡ä‰ÊÊJUò„Ï—'à -ˆ~”.§ e>²*@;^zrÉ#× §\ˆˆêºgV ŠòÊÍêw¤Ò.WúŒŸ;xlOÝÆj”×í¸kíöœC’…!@ ªªÊÛyœòòrUJ“ŠŠ ‘y¹AYŸ@‹\Ô£/n"@òT,³:K‹œâ˜¸ð{ 9ýªW'G!¦º…(ó‘me¬,X7UQ"}ñ!B®T„ôˆâè§ÎŒþU:8‡J:Œ¹²yhhHÕAç´®œ¶€XÈår¢ "Aýh„ür"^€ðßYZäK:y! RÕ«CŠʵ?& ÌG¶Hì yDöG_Ü,?¼ø÷æoé_`È•Ð"L)C % I€4õõõÅÅÅØ]-}éïïGcYYY]]jòŠØÓ݈LHËt[€¤]„O9; ´@ŒD­ðsuh™Òï¿L(@™l (Žv@Rw@Xšþɺu½öŒôL2’´(HÊ}D›Lâ[°®-…ôh_ïqU ÷!Zzÿ¯-],æ.}L "}nY½Í’+ %rÒG+‹–È ÚÅõ@ž¤Ýü˜œ£ú'WM#M¯î´„ ”¨\ú‚P4ð#@pCr,.é PͲ­ª,ó·«’kNœ<ó†ÏYÒLø¹q-†=÷þ¯Y¢`GÁÒ ù9«Õ˜0æ,Z«†’ö?~Ù’ƒà£ò&^†“g¤}¶±=h—Ûùêø¹ UI˜ à5è¶û6«Õ{&ÈYƒ²UwÞâmªLP¸T¹d§çÁ“°ðrhÕ¦=8æ&îÞðœZ«'Þ=…"k™YŠê%›2uÓ~ ûš¥¿²–Ÿí¸£ù7jõ^Á°¯¾ý)k±ÁIJw«A¼¢`OBBr !$4(@„РBBƒD !$4(@„РBBƒD !$4(@„РBBƒD !$4(@„РBBƒD !$4(@„РBBƒD !$4(@„РBBƒD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈAD!„ÈADˆ+Þxë½yËÛWmÚÓ¾ûðkÇþ¢ZólÈ3Ï¿±æ‰½5˶<<¨ZsÌö¿Ýþ˺;¯^qùæû¿¼ÿ‘ØÌ5+/[Z¿àêÅrê½ ¤P¡"$ø0žß¸]U š»7<×Õý¦ª„fûÚ%«-sÁX|çÏ8ª&…’h€q¢}÷áu[^R•îöbíõõ×[V ²±zÅåk7ïQSCÉ44@„81oyû›êþöÑø7æ?®*3wécík¾hù€ÈÆsÿÃe7´¨©!„d Bœ¸tnä>BÜd¬Ú2tÃ=Ó××7{öìŒ{¯xÃ–ŠŠŠÑÑQU϶ÆzÊ¡'É*4@„8‘ÁO èxIII27@@þôK´(**Ê’hÆoòžWOÞ¸æõ­Ï¿£êþ8rütͽ¯`i~<¡š. $^G­`šÓ'º-dö™ý4Ûç~$B|/êëë[ZR¯=¡§‘“"’ÆÀƒ=Dï6& ÀKô%èСCØÙ̳GÇÜê=¯ž¼qÍëò Ï-Õê#ÇOËqøŽeêOh¬×òžÃÁIùô‰nÝSÊ–IB;†ôÞ±˜î†êñ—¤š©kªV-O¥ 9ÝrtàŒTáEÌ2ÕÕû¾YýÕ®„Õ}‡?²6@²dm†Ìþ·n82~vÒ\²i€¬3@ÎÃpY}/–?~T–†Þi¬­­u ÄüÄÞ˜{jzzzfÏž­*¶£¸¸8¡÷Ó GqKhàÞâ=G²×Z«Ã†_rÉ%¨Zí ×eM¯®ÊìÅjêÖÒ\Îv¡Ê?LMÌæá‚Þ¯°%4@æÑú ¼mÛ6ʘûjÆ©˜÷¸VÿÀŸd_¹±Íòž#¥Âfjsßçõmç'F­ƒ=Mæ23aMõÁ£ÿ•®ÂŒi‡!ay Øq* Ÿ•ЖÂ<$ýM×bšä< ³Ñ9‚/þGíÆ?½ùÿÉT¤Äú„vðEa@Bc>¹/ºè"UÉÖ°5&ú¦Ûý d" ,ËѬ¥Ñ%ƒ(ÿȆÒ`Ï<É®b–5²ŸëýÐÚýt9ãè­~ÿÔøúŽ·µ^gäPèÓó€ëµüçp0@ºBŒÎäù±žXI((¬©î â6ĸø1@X‚ÿyú'Þ™€Êê{¡ÏaÀX œŠklllnn–)‰ÿHNø!-8<•Œ¶¶¶… ªJF1ù€ ,™‰AY¾ú¸õë×»7@ú)y9Ðí⫤å•W^ùÒ—¾d ÝAV¡×%ʬÑ+5gXLtÈê¹ù¼†(ÿКès/²¿é]Hv3Ó‰ ˜§^ÑÇ4=ò½„ ’p«ñ©`~|ú!Ù¢°^ËxËÁ˜æÞH;!³Ý2I°;’þÎ˪f*šj€UëÏxç€ùÐ_6Yß=‰9ЮŹºïðbSÐn}í¥ÛÍþæz-—“Ö0\FVß‹ƒGÿ+áÅXõõõ--®D&¡§Iè-@º¨³³3JBˆ†(ÿH¨‰OX[õZþ à#Äê-ñ뽬¬¬Ä£ªËÈÈÖž½Û"Ðå!~>…HX[õZþ à#Äê-ñwgªªªª¯¯ êV@ÍÍÍååå´>$h€òp51,ÂÚj¬×ò!&Vm9€ˆGŽììúNÍ0(™ý]úÈÈHkk+–œÕ;M’ ü#G41`ÂÚj¬×ò!&Vm9€ˆGnîì===õõõeeeÅÅÅ•••MMMÎö¥¿¿¿«« =kjjðB88*þñ  ü#751Û„µÕX¯å >BL0¬Úrhîì„ PþQ¿öÙ}½ÇU%¼90óüûh\mgàÈĮݼgÁÝ›­áåo`[~öØîp'6!2Û?ò…Ú•[¬1L`ÓV=ú¿raò/Ìö¾ëWtXƒ,ÈÀf®zôÅL{B •¬ ö݇ç7nx÷”ª"Œ|tÛ­Û{T=žîF;7g€,O†H¶.çlò±"ËD<ÂJû”tvvÖÕÕ•••͘1£²²å–––ýÉimmmllDÏ‹/¾¸¸¸xáÂ…cc? È6ž ªg‡1XO¥;Zâ   ÀVc–9ˆB„•NX¯åœClŠiDL$É:å“ì«+9¤¿³Ì“Kd}‰f™*—ØäcE–ˆx„•öñÀ¯”——WUUeÖ¸ÀHÕÖÖ–––Â!eÕiK!g>fΜÙÛÛ+í£££æŒ¤¤¤D ýZ«Ý:‰‹ÅâðrLšt£…õ”® À/ÊPMt‡øuÅû6˜9½½Ò¿©© ek!2H³½à¡Ê0l5Va™ƒ(DXé„õZnÀ!`Aðø]@£Ÿ3@þ ÕÂ3@ùa¥½¦¹¹¹²²²¿¿_Õ³ÉÐÐ ÖÂ… GFFTSæHöa¯ÏôX§|̪~­ ýZ¸“¢¢¢ŸÏ&;{ä`,¬§Ìª¬KÖ&èÖº¬j´9Ó4šk±¶E÷)lòÌáÍSïÏgß!$j½@|þ¡™@o¿Õ⟠«°ÌA¦âÀ¦™g†zÇÎ t·YOépÓ'Ö'Ök¹doaº 9Ù¿b yJì‘àp>ÆÙIYˆn´Zd ëžY¡/9Jv½‘s6ùX‘å‹­Ï¿svbò†^³ÚÝGÕŠCýï|8tj¬æÞW¬§¸®ÌÚ ýaŸÌ‰uS#âR ëì‹ÆjÇËå%($3ÖSz&æÙ kHæºVñÃþðK_ú’þdÔ ‘í•AÊi€ü’Ù]×z›-ÄY¶WÜ’™èÚîHÉõÌ’l«ß?•öÍÍNýí,YU ° ËxŽ£»k>™œøã³ÕR Ëܸ‰ NlB>üx¡*X¯åò(, å92>ùÉ^ˆY °ð`€š¶ôŸŸüä§±?[팬¦}²…´´´Ô×׫Jòé>u”ùY¬ÏoÕ:c†ùÙ¬š>{2#Îà Ä?ùtHöŸ„(¡x‰vñb€:„½7{öÖÜê=¯ž¼qÍë"dWÕê¼\^;¯éÕNh3„UXæÀs8 )Ÿ>Ñ­{JÙ2IhÇÞ;ÓÝP=þrƒT3œØ„9~ZˆÃw,S›!¬×rŒŒOþòÇÊPÀÌ«Öt œn9:pFªð"f‹êê}߬þj×@Âê¾ÃHY Y²6Cfÿ[7?;i.Ù4@Ö ça¸Œ¬¦}Âw¡µµµ®®NÊ)ѧ4hq8¡;[§R’ÑÜÜÜØØ¨*„dšü»È<þЧp’ X,fžõAyÛ¶mEEEÉÎ$ù§bÞãZ¤²0Cÿ÷7[æÀs¤4@Ø"mnâû¼¾­âüĨÕa°§É\f¦"Û›0ðIö•Û,7Áfòaʯû¥Õ˜,Äm ?µÃ°<Šì‚8•„ÏJhKaž’þ¦k1Mƒr†ÙèÁ§ý·æ?þ¿{ËT¤Ä2@æw4ñ˜QŽ¿J!ž‘‘‘‹/¾XUÉ4y|´iz ë‹X1@ú T7ç`= ·úýSãë;ÞÖ²âáˆMŸB@j¿«î ‹UXæÀs8 Ý!FgòüXO¬$,”Á‰Mˆ>„0ˆ±^Ë D02>ùúÜCüù6½p÷!nCŒ‹„%,xðÿ˜§â  ¬¦}Âw‚ÙÙÙ)Rb çó:Vg7ôõõ•——« !™&o ì‹yÄ m™æÆ2@ry•i€¤Šéî)I¸Õ/ó<¿Kàx´é1Á*,sà9,cšx#í„ÌvË$Áî`Hú;/«šÁÈàÄ&$Ù¢°^Ë D02>ùþW²+®ôg¼sÀ|è/›¬ïžÄh×â\Ýwø±)h·¾öÒífs½–ËIk.#«iŸð]*--…•QuGâ=¥ÌR,UîHUr9ÒNfûH.“Çg€r“¶«°ÌA"¬tÂz-7Álò±"ËDVg‡AJÙÜ:Y¦¾Ý‘ÃEëQ€(ðÕX…e¢a¥Ök¹t#þf2gÏž WäçöЃƒƒpTUUU_|q]]]ˆ_·ÉEK·Ür‹y&x”Ћ$ëãÞ%Ü:éðôÓO› &4@&€­Æ*,s…+°^Ë ¤ nñl€þúáèfžãÑ'„äïß­%ø‰À&+²@Ä#¬´w ,Ñþýû›ššjkkËËËå+˜„”••Áî gggg0¬á†X,¦­ƒØ95b:i—­Høm‘ƒÿÊÒ̪¼Êúâlz'YË„ƒL¶uƒDOÓœE“, ïÖÅNœ<£*Ñ`üÜÄW¯ß¤*Y㪛7î\ûyËv¼°ás_ùA8Ÿß¾iÓ¿þ´Ò2i¼ –cž›AUWo€¤Ñ꣫òg«râÇü:Lzʳ蜩/¿sïÿÚ?ÿà,3*ôä·ïØk™€ÈÆ?~ùŸðK55¤°°lSBÜôñFÄ/ýÑdÑÅv¾º±ý ªDƒgžcÍ{U%k`bïj¨±,BaÇš•—ýì±Ýjûƒ³}Åíu–'H+`_¬3@YƒÇödvu߹㇫ý_j:² fû‹vX> ²ñõÅ¿]õè‹jj!™&‹ìÚ÷§U›ÔÅ Oëö„ªd™ßýáÈ­õu–K(Ô¸gåuþ:Ìßþá¹ý'–-pA „ç“üÄ÷ê—¶<½OMD ìüñ9·l³¬@㊺žŽÖ$!“]$à¨nÞòv˜¡7ÔUZÃÀ»§ººßœß¸}cûÁñs nì–U6ïxùû·<øÐO¾Ú¾æ‹–iÈ÷Øþà~qÏ?]»dõ†¶=ÁOlBZwtÏYôðUõ×Wÿä*Ë%X|ÿÞ+þåÇ×ÍY´ö¡-/†5ù­Û_©¼)ö[~W¹ôËpT.{ñ›KvUÞÔöЖ9’ö„0A B!„œ‚ˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!‘ƒˆB!ãÓOÿ[$> ÝÒ-IEND®B`‚azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img_src/000077500000000000000000000000001362133436400322235ustar00rootroot00000000000000porting_guide_overview.vsdx000066400000000000000000000625211362133436400376450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img_srcPK!O£ ‡z[Content_Types].xml ¢( ¤”Énà E÷•úÛ “tQUUœ,:,Û,Ò@𜠚A@¦¿ïÃq¢ÆÊ„º±eýçÂã1šltS¬ÀeME†å€`„•ÊÌ+ò=û Ï¤‘Ék "[d2¾¿ͶBj*²ˆÑ½0Ä4¥u`p¤¶^óˆŸ~Î?|ìq0xbš&Ò˜<Èxô5_6±xßàï]Ð5)^wóª"J'ý†¦vRã¡ =w®Q‚G\[ÙKF»T%*Û9a¡\xÀègiä8Õ_@§ûÂíôJB1å>~rÙÙJᲘ´b©qáåeŸTÚjJéù‹Qj®Ì>Ùyî~Äb²îê$¹Œa>ã:Âa©ž|æØ·‚÷¬ðÉýº9KÚuVìNrÝ;b{kŸ·$?nCjëZ 8œÁÖægN½uÛÕà eèáö½•ÔÔ¡ø¨àÐ]§Îðˆ]•ì­Òe"Aæ²Å2D«ÿßÙœ€³öæÿÿÿPK!§Xµ%^ _rels/.rels ¢( ¬“ËNÃ0E÷Hüƒå}ã¤<„P“nRw…ìIb?dOªöï± "%eÑ.=ß{f®¼ZïL϶¢v¶äE–s†V:¥m[ò·úyñÀY$° zg±ä{Œ|]]_­^±Jb§}dIÅÆ’wDþQˆ(;43çѦ›Æ”Ž¡ä´(–y~/Â_ ^4ÙF•FñÊK“½(~ÊŠÈk…BÚ‡­X^ Ò&KÈÒ~HÖÞ\œ6×±HDü,šg'9ËL¤)4%iÜGë[ï @ÐÀ±xô6Az/¾¥³ô%€‡]ýðÒ…õpêõð|ã/rhª<6"¯îìø¤eü>™…ÞZS;Ç'-㉤O¾¥"ÄŽHκ= $d>"iA_BÔ}û‹Iè=bq¶ÒbžžÜÆQ*檥ÉYû¤e>Ðô¥·]=ÈéW^’Â0!äOrÄðËS¸ €ìˆ• ­€“QDP˜úÿ$Lã—ÆÅçÓf§×lÜO›íOñoZ*¡rC†ÇÃñ9Ì!½1þå ý2:¿F¾’e:™Âr¬!ˆà ]oª”ÞñQÈBö5dzt42u;9dz8LGưªhx0îLXˆÖîh<ÙŸv¸R´vÛmhö„ƒhíöÛƒq¯ÏA´v{Ã~·Ã6Zk·ßvzÇ\)Z»ƒ£qûˆëÆžÖîhè耞ÖîpÝT˜â°+á‹=££F°–óOïy¶èÄ¥/4Xh.xÎi­d¥URÝÞL(ƒÎ—"“ÇG‚YJ±g²" à®W3ÂÊB.Â…øÆó߉uîOüèžÜíÙäëèæáŸï½p"ŽÞÆ~ˆ›?Ž8Jƒ V9›‡#ð‡õÆ›Ž¶’]'lͦB,¼ù›ˆ{E~…þä_ncñ(bØ–3J‚ÉsûOO"_-SéØàÈØÙ0™êBA³¼8``qÿ/[@˾HÆ0ZgÑ&愼Ž.ýg‘mN™Î‚±^å/âJÄOL¯#˜ Ñ#Û•0ÁD¸ðòÖÇìÓ‹±”T„ï>̨¸ÒŽü(^¾FñBÉC©Ø”›ÃÒVÉ" +óbì¥^ÖnŽ 7nò :?£À×£c úóô*Zl@\¬#[ ½‚¨ˆ­ßZð{¬Áhús‰¤ÊEë™»J)—Þ‹ˆ¯Äê!«”öùnˆxŒáT9Á°å%ùóºâ¿Š9Û¯¸]ÔÏD¡U«h@f…®¤JÞ„ŸØÁ)yTÉëJ²ºˆçÞj¥FŸ1,G°Ç¦Q½g:CÙ'¡H²égRa>Ä}˺èwÃ@Y‘Ÿ03Uº"k×*f+£ Œ[ÅiÈ>ö0/šhô¾Z]îÁ³YãèØ¸H0”F¨FÁInØ]ˆ1¨ =žÑÒ º­¹\ÜŠx%0ÒÆxF&€ñLÀ-oðîÌÈ&ìÑlçwê‹Q®B›~D_+ȰÏKUÐÒÕJ-Û7—€ñUQ=Pq{ö?›Õš€ÜäE€ãËè™§ž± ÓÀÏ—12ž³¤&œ™–5[œ—XÐR¶³A|)žE`SïD6ÍŠMSa\jlZn7afGi ’‹p½afÆà9òXá0ÞÆðÊè茪¡"ùÆbÍm.Ü#0ï[=<Œ‰šSâ`3r?8Jft ÿ}t ³'[{û*º”s @Æ] p‹16‘`òkrÎn’`çူwûÆ–¯ä”J@üo.Ûä%0œ£jž—R„“à_VD©Àç…Vã‹Âþw)ö€EÑý>²©r`ñSÝó;¿˜ŸLÁ8|Já=³w°ˆ»r”€Á”‚ ÂŽ”@Ò¯Tº7æ€|®tlr»…àSLö Ƹûi¾°\ °ã‹˜æ~ðÎܳ†Á²0$ 4‘D”­u—nA Jw奱ÿmKq ^\¶!¯ÅMw¿•+4W±ÉÆÖÇÞ;V]{|P@ùÛß;è·ûLJÝÎaÿ8;ÜÉ: »©²D ¨U"!; µå¤¥:A*ª”K÷ÉO—rIQKgˇ´AŸj×7DV ^÷9ÕŸËÉ®¤«E¦¢|¨ªB!*k‘FžLª)†èh½áJ:x\)„Š"œŠB`” ­½Ä•va5 Ũ2d‘½¡ÖÏ[è?o¡ÿc —¶2~ {4c™zÿÉ\XôG!Ö¸Õs3Ƽm„æ9ÂŀŽÂØ"t~Ïx.7&zÕ¥ãH“¢!j¹&“ØFù‹HçË„Ýlyg’æ\ y°‚Ó$ÕXÃOST\xÌ£9ã`|$8%=mÞÞÓÆ¬£¥G§J²½}uêœ-’ $-š¢É5ÃÌሮ*SR Ù©‚»•(44•(vH¡­‹xHZ|h¡£ ð“%† ˜,šŒÑk¹v“8Ù ÐñWŒ=+ã]¸}ÈwWØãÛ›K8ÀvbÑg¢Ër5ÒXžÝPû¯6÷ÝX¶ƒ¶åˆ¾¸þßiEûƱ÷Vâ_É»#²Bº£µÔb¸—þƒŸb°([Ü…c«q ™‡5ûLj!Ì‹3ª¬.0ÇîÁ‡ØÃËVKgºî–ÈqaŸÌV3È®#g´ÐíÎÑœõƒŠnTvÄL L«€µ/†#`ˆŸÜE_eòW›¤]àŠ#uñ}™nBæ¦Ã•pÄ F¨¼òùJ VË(Èš]La_öhîEy³ 1üpÒ`².$åß@ž%O™ÁþìÑ2ÞØ\ãhÁ&ˆ6OKt yŽè@°iRaÛ:H|/ÔÚ6ü!L¦Ä·Ù<ö×i ˆÖÑ;CuÜ9L úü 2Õ€€$žbdÜÂÀxнõÒ12`ÝŸú1çwø¶r€ ÷õ6e¶F.Ÿ¿Ûß3bγõPý«Pˆr”‘ёŦXV%@ŽL8aT˯Ñï;åÁIs!ÍØu:qPƢ˪q47Ë„¨c‘ç†Áùz9S­fI¼"Å-›{ &/ÉÌü·DE]zèTª¬˜iîB­;7G¸Ï:á®Y$JUãêuú=õêFd½2I{êh á²QuÀDÞzðrbŸ[ir#$ý@’åW®¶uàe/³OÙѬÁ¢Ã 5°$M™fåóºŠX”X: $R«Ÿ.h8¸8³À 9Ò™Va!ªU•{Ñu£Myù¥õ WšÜæ`·æ)ºƒ¹ñ8Eê—NÑuJ§ÒÐHO=yêqȨ¡Ö3v×Ãmø¯÷‹™aúÇ<€úÉ ¢ì/³ÃofÔf¦mLÙeX]ûÓNñ«+1Únž†Jo†ó³,õ· ¹ì§V9€`¼õåܶ¸|¿ë¨L}sûè?µöÆðzóô¨-ûSyzF?gIZ8{åÌ»û͹3wG%_ð?عûô[Œ9@!ꪠ«w’ϱ"“@nKÔ bél86¡Øªc&F%Æ®•ºQÉ€V~‡òQúR>Euñ þ.x;µC5øüÃànü·öÓµ·Ð)6b—ZJ!ø’;_”«Ïåä *cŸU¾G—øpòÝÞ‡M/ûp2ŠŸšàzRúן)ìTÎk”þ0g¼Öæq¯WiWY‹ÇÞnÖbã®­1C]ïÝÛÈï¾/­£==FåËÜC”!—G(Œw2Bá¡]ˆç«™Zzq騌{bY•¹•ø£°¤X9æ²ü×þ#þ¥«ŸÜpí¨ îY6›WLuõæ7Ýî6ó·'çÆhÇû y¾yÅ}ð]¼ârtÙm˜Ë»ƒÁp—< ºzÙ¥Ú~q&þgôr;Ì\f4‘1ãZ°qyYׂÙ"äq=˜Á°×„\éº0ƒ°¯ 3 ÒõaÁ^#fpßã:1S-ØÔâZ1Cg®3(öš1ƒƒü,¯|ݘY׎Léú1ƒ°Ò_Œ´ æudÅ_Kf€²¸ÒuEc ›ª× w]Ñ%MùÞ  Wº<æ‚Gj^ct­ n r`kˆ—Ý,]oä‹CwrCëÞ;‘"ɶê"¨ú‹•¨Ž-]t(Õ8Ñ×  ,^‡¬ÄÐk‘ ¹IPä¬kT7;Ðíˆa3±ß÷·%dL2‰x¹)2"ÆjŠ´WöÈHŸ(µËw ™äA¦ŠR!ƒÐ©‚÷Ðs'2ÚÉ… H*|ËY²™lXÕy\æaM¼V0dWµïr1«ì,NÊåŽ50är¬çr ƒ_$Ö@³bÿl±Ò#÷ï'W“ƒË¿QL3ðP NÏæ¶2¸"¼4yZ•!l2T‘4åž>yIn„l¹ Å VTY-šVg1϶ª¨*\ÁKƒCÑ‘9åf(ÒV¶J$Ca$Ø´•¡â´¨âÐg MÞAµÈåvð5‘¶ìP“2Ãô5n5”ƼÚmW.ëxÐÕ¨¼®Š°-¬a‘-œ\BØ–-yaÕA¾lœ›y&››Ä³áÊÙ˜ôªíL;ÔEE¤'†[Gr'Æš¾•Ûr¤x®üî¬>ÛÚºœ£¸’U›…ÜͪǣÂ/Z6Ö‰—ò(`!Ò6$‘Ä µ.ó2~œ¬½|©×…ƒŒy¹·ž26mìêqY—€ë±YƒwcÛa~W`wXÚ ¦úê(xô]Ü­*xꯗúbnyÇÄO= ß¡ùÆÝÞ­°ïûng)ßfƲºn»ÓʦXÈýàš‚àLî ïÀ›âüºpM.\¶wá*r´£);ÞýŠ ¬ÀH÷ ·ÝŠÒÀ{±ò6X ¯ÁÂPºRF‹Ãö×ÁÙyîÛÉlÕÕ+|¡3 ƒ]¹¥‚Ë·¯ºF`ƒ¿ëmÁ`ååï{[HÊ0o—[ 9!¯8{·§E×Í“¨”!³  ã¸®ù7F‘ø…­ãÛg`r”ZÜLeÖ¤ß3Îd¼­ ^ïÄT÷ÿ8øäèööëÖþÇí¶¾4«-úoE‘qM½ñ®/n>߈èË™»òì-AÈkÜÆtÖª¢mùíoúÒ}KŽšþANÙï(~‡¤½BñiFÓ+¿¿“è_¡ø¯[üÃ×-~ÿu‹ôºÅ?~âÿ¾ï?pÚHç¢öMÛ›e¶LÊwÔþ›eþ#µÿf™ÿHí¿Yæ?Rû¯Þ2WEÈøjœþ"%~EŽ$rÀóÊL‹þkS9n6)¼²ŽÙWÜÛ:ñ rðÕ—g_0_¹,ð~‰/Ü'‡>ƒ‹¢W¼ÑŽD1! 6ò6úÕîúÍu’•¥_r‡¯ËËs!ò÷xÖ”Ÿ6v©ßmgÓgsølV ¡beú.Ë…DDà¤0‘dw¯’çÙæaGsøÚ…úH)ñ1?zð­Yɼ"ÊÅ|0yvG3¡á®Îj­^Ø…‹X…ªà:lRГŒ¦²¥©’´4 ¾Á—±ë³ôXiGÐbù™Ýì5P-ãÛ»gÿÿÿPK!¬M„visio/_rels/document.xml.rels¤’ÁjÃ0Dï…þƒØ{-;-¥”ȹ”@®%ý!¯mQK+$%iþ¾Kê’¸¸¹ä$v„çíx´\}¹Aì1&K^AU” Ðj¬ï|l×/ RÖ¾ÑyTpÄ«úþnùŽƒÎüQêmH‚]|RÐç^¥L¦G§SA=ß´Î<ÆNm>u‡rQ–Ï2^z@=ñ›FAÜ4 ¶ÇÀä?ÞΚH‰Ú\rro9›VåÔT¬oèØDdz‚Q(x/óÈÅmÈÀù.€§‘s³x ZÝåß¹ÅsÎQãy ýôz¦>j[kðÌΡÏ3-ÊÌÕãyÓø#V¿;ÈÉÛ©¿ÿÿPK!Ã™ì¸  visio/pages/_rels/pages.xml.rels\ÏÏ Â0 ð»à;”Ü]7"²v7aWÑ(]ìŠëš"úöÆ›óB~_¾~x…E<±OQA×´ 0Ú4ùèÜ®çÝU'³¤ˆ ÞH0èí¦¿àb*Ñì3 V")˜kÍ')ÉÎ 5)cäÍ=•`*ÅÉlìÃ8”û¶=Èòk€^™bœ”qê@\ß™“ÿìàmI”îµ±)ȧçŒvíå<‡,˜â°*øN]Ã/Ô½\UÐÿÿPK!/ÂF¹$visio/masters/_rels/masters.xml.rels\ÏÏ Â0 ð»à;”Ü]6"²Î›àUôJ·âú‡¦ ÷ö¼8!¿äkÏo?©™2»44U Š‚½ ƒ†Çý²;‚âbBo¦HÃB çn»io4™"K<ºÄJ”ÀÆRÒ ‘íHÞp™ª•T4-S¾­„¯…-YLc½ºcÒ­Ïìx¤k î)Œñã)žøÝïà`rœb<ƒú¥=ŒßéàlZŠç;«ñeèö~¦~€À†Æ|ÆNaI|â,¼úÁ¡ãlBGw9›ó3°xÐëâçÚ‘º"»Š{OŸó³'«Ö›­;8iÃÞÏq‹ôþÎÏŽ»¿—á`¾¡û) ÛÏ?P÷Ê.404F†ÙãÐÀs¯¡1r¤àY]ôCI=žô+JƒÓÐéüZûMO˜˜Z0›¸zѺÿ@¼6nª0i(yŽ]£jÐ÷G޹"F÷4·Ä%‹}$æ±¹¡œú§î“ÝŸœñWÿÿPK!9ÕñÔ visio/pages/pages.xmlŒT]oÚ0}Ÿ´ÿ7?5_|£†j…±!uPÚµOSšÜ$Öœ8s(ûõ»vB›Æ*!„ñ¹Ççžûqyõœ1c ¢¤<÷ˆcÚÄ€<äÍT2¾ãjòñÃåm@i :/=’JYŒ-« SÈ‚ÒÌh(xÉci†<³xÓ¬-EN˵×Êš“:v,Ž¢y9òÆ\d,M.’†bÆÃ*ƒ\"‰Ý·°@¢Ê2¥E©ÙÆe„à‘B@ b d¢U‹™G0eÁG”ð §>¾žî)ìü0`n›ý1ÔS| ăGFf¿×w»£ãº®Óiß>z¤oª»Ñhh»½Þ¨ß<ë§Ò¸¡9ør¯y‰1§Œ½ž6ð,_N“Ë)0f,kIßi$S|KÐ5]g8èÙv?ý!JÃ$Kb½ø 4Ieâš]w`;ÝQÏtl÷DˆŸF»U— tŒm:nï,îQã.þT¶jk '¨f"Øaƒ~ÌÛÉ`ô7lö4t­lU­„­(6‚& eâð:œrÆÖc ñõÞØÔÞ’¦!0Àj"^­\ä)}¢Òσ¢ö¥-MåxÃßk(vZPõ¸^­nN!gUÁhÈsØ»Å=ŽÆeTîßT…z›å¡Ot ŸýUÁ§×5Oƒ|̲é½v¬¶ßWKyÏš¡ÓiC>Ç1„òà5—’gïÀ šK%b%(n(½µÞ7…{\W BÙ Û¾?~4úûÒG—q£ªù¹Ã ª‡ïÔ)+·Ú»•ˆô߇¼Xu¢ïnÏŠºpçydÉ9nóŠJ‚…¤øÝ<†¿ê6Âm©•bL#ˆEäh´ºm@åäÿÿPK!&÷°½ visio/pages/_rels/page1.xml.rels\ÏÍ Â0 à»à;”Üm6"²Î›àUôJ·âúCSDßÞ<8O! ù’tÇW˜Õ“ û ´ºEÑ¥ÁÇÑÀízÚìAqµq°sŠdàM Ç~½ê.4Û*C<ùÌJ”ȦZó‘ÝDÁ²N™¢tî©[%-#fëv$Ü6Í˯ýÂTçÁ@9-¨ë;Ëæ?;xW§{Õ.|zy@жY¢(gT*bØ2R5 õ·Äߨj¹°ïpñQÿÿÿPK!ìBõ} visio/masters/master1.xmlÄWÛrÚ0}ïLÿAM”t_ 4i“ÉpI˜ ”—§ŽcÖÔ¶<²!¡_ßµ|“±é>4¼€åÕîêèìÙ¥}õâ¹hCxH™o`]Ñ0"¾ÍÔ_x-O/0ºê¼×YaDx—ùñ£Á6?4°EÁ¥ª†¶C<+T0Òëõod—ÉѵÝå4ˆ¼|OBú›ŒØ"ó(eÖßÀEöžÜ®Kí_Y@HëÛ¤?6ûsóa8>>‘Ý70Y@ma<£áÏ铥؎÷áãYë¼Õm»,ØòÉü Û'(& eE]ÆÆ‘„®á‚ÅÆ¥Z(²cÁ™iàÒ쎤ÅDz(îOS4­¹óNL ™ÍÛþ¨?»¾;>*6}Ö”ÆÙÄ,üû,Œy+N/;%vLÿ˜PŽ~ò”¿gÏh87°¿3Ʀwve²{¬¡ŠŒDò"Àj²_—mó¼Spò1C¨íµkÉF×ëˆÝ…Yœú~» g^À_c¥Âé ô RÙÅ!’¢)%ûŠbÉ18-yÈA(ÕțШ€ptd÷XåÁîaÿƃ22o†A³Š¬…©vÊtüì“úݾgU^¡‡´Ž¼J´Ï‹¡Î‡AMÕ&B6À”°Ä‚ " óÉ,€$¨f–»N4W/5ÖCT¨6f×±¸eÕÞUê)tÌD½y!¾fÝzN"sµnóHÄ·¸ÒÆ,žnR•טŨn}ê°çÚuß ÒõýB=f¢sõ¸µÚkCoxÄ6ÄdIÆUÍN&˜² Å.Q,+³ªR ³¢%@¤ø¤Y¤ª0ÜdñÈ©¸Ì÷ƪ С±ôšX¢–öƪ)uÙÇ^±{}¤–T)Yn!£¢®ÌKÕ_sa…é£t¸‚ઘ¼`ñ ½Zþ#ÒùÿÿPK!½êƒòšÄvisio/pages/page1.xmlì]msÛ6ºý¾3÷?h»älSŠß;qvÜ8I3·I½±»¿ÜE¦mMlÑ#)i³¿þð x’%*vRzg§1L ðàœç À“ýy{3ú”,Wótq8v,{9½žÞ%«â¿£WLJcvöùe^OWë½`xüYrs3zs8>™/ÞGÿ9Vúã ùËyöDZœ8Œ ´cæ…Q(?õûüb}=ZŒ¼ÿs2¿º^ç5XnèÅqùü}ßvå~IgU'\+@%£‡ãW‹ký¡¼?¶DYu,`nÌ|Ç«}c¾H~]°-Ûv½É?ãÑo€³º·_Ìon^¤Ëäjq‘}Á?.³ŸìѳŸŸ¿~þò·£·Ço_þtÀ|ÿqñÿGä>ó:N¦k 9D#ì¨|¹œ^Ì1ËÏÓ÷7IÞ-?ô6]O×IùØïóõu1“¨-{ð4™qÁà A]ä¿avߦŒ^½ã‰ù̧¹q„‹±•c‚jD]ŽVW6ã5“e2M´nY"úéh%õƒÖíjýƺÐ%¬{§=­âMƒÛ*¸y¯'Å”b!Ks{=]Ng$´X7µÏÒ›t™Ë©ý¨rš‰ìŽ~9øîxºüð].§- ¾LÒÛd½ü<®¤ˆ7{v8~~JÎÒ¼Xˆ¶•Ç\Lªü µ¬R—ƒ 2fT«.íµ —Òw]Z†c»&|MâZš Rçú,ùs ¬Ÿdx"“Ãk]Hà c`l³0 ì@P=_TÌŠ¡ç¾2Æ q˜å0N¡ë„àù)‰L\ 5ñ’í{n#™–ðú¢À¢Ø÷™,,%ÿåì“÷Ó±üÈå?6gªÐ j_Ø™WJ'ò£ÅÕM’-kÏ æâ+"Û¼0#®ãç/å’_” … ão+°Iúñ®l!«|K&1ÞU募3”"š4‚uë|Ñft`éÐ}]â¤.Ñvt¨!˰”:y£õêàÒ¡ÿãTK;²H50O)H§ëôNb!ï}è²ËlÖ%méõé¯g¯Þœ6:šÍ ÿd/ß=züƒëRJ«þl9]@.õŸr<åçNÒÕœ+Eâ):”²ÄÉïIÝÝ÷ŽÎÝï½ó–ñ%Nû/‹rCÿ§Ñ…AŸ„–Óeø=»çÑϰ‡öÞŽ“›B.u¯®v€þ$ Y/ê…Q]!æT–¿˜?I9}õk‡ÂѰ±(“±EæØè[>sl7ô}|¡WÏ¡‘å÷@…ˆk0'Êl¿R‡n²ÀÌ"íÀwÈc’ŸÌ¶àJ“H«2ŒºcQ _™ç¸¾ËüÜòmÀÀØé ie?·i ࿹Òß Tõ¦lÍGõZdIJã5ëkÍh„Ëšå9ÿ ©Ñ†ôÅH¾·”²â–.ë˱S—kjkPžà½(ARǺî"Lòb3¬ Ÿ>Ù]šÐÁ@’íÆ6u±h03ÉU¾k¢+B¬•4 ìŸV¸äbôq=¿™¯?·á>DXÃý¢LÆ}™ã~E–ÄÄ+M8¶ÂØvíÈq#Û#›XÖëá@iªc\ ¢£Y¡ë°)€UleÔK Ð0 ÝØÇ-`;$IœË1À=ª7ôìžÐxC¯”ÙÌ׳Xòüüux“\èPR¹åˆ´Žºªmô:«Y•{ÄÑÓãÿ¼JÏ~þø~òü øÇ£60…›ž $ÑÓõç¸+áTà.:ñGíê7‘®¨Ì-CŸC _Ý?%W(üþùââÝ£ “áOÂUþî‡t”‡pó7Ïù›çÊ›kmËc~ˆ¥. ?p|„Ðêé¿ßžð6ÈÛôì{þûyþû9~'i?² .÷QÖ¸m‹9,‚šÙQø­@[Ygþɳ”‡EP;{,oA}ND‹@À/´Ã8€ï$„%οäèìè “{þXþ*¹É7ó»|ðilÅ%>K|›¬y ¶¹•œYVžÍ£ôZö§¼ºØbÍlÈ;Y[Ÿƒì‘³ªÉpââõÓ‡ y\""ùÓtöá !òÅEüîÑ÷™Ý„+6W.Ó¯§ëåüϬĺOqYßüÔóËK¸õW›|tĦ§²=Z.Ó?²‘‚±Rþ²'äÚH ¿è x) oR>úX½IùHfåDÚÞ¤§×ŧ¨å‹é]ÝóÙ¨/§WâÒ–ŠÅ'¯IØUd]ƒh’¼~"&Zý‚²õÌ,âÞ0µ ÿؤä`ZzõÆgCË¡ÛÚ6³_y (µ‚pë{<‘‡ã´†ŽGú°/Ô mžáƒ¤Ðü\$zÝ7ø²8°ñ¢-€ö{_1ápÁÕCüó‡mPZ!qU[=”ÆñäèíÁ ²®+>W2'*dGPA @öÛÐ@ò€YLýÜ×cfoxžæqci7ß:ë8ì±=veãÁ7™Ã{šÎ>$ëöä#§.ƒ·,$2Ñ)‡·v+™ÀîÕl›7œr 9HQ,/LÚ3¿*³ø=üÀåî¸t3Ÿãp¬l3¶óÁ¹İ±(Õ¤¢­$Mv]›e µõExv볂´ï•¾ƒ¾«ënæíêqÆ|ÅFÒ£‡›®eyø¾†h°øv%ˆª·Ù\)ÕèC¿U5ú¤4Ì Òü†¸mþõbö¸þC¶‘œ=;åØÒ‘uÔdî]B²s§½ïÀAà„HìêÂæEÇÎÜÿØV‚ (P¤…åd¨öã¤Û‰<€•x|ë±TÅž´‰58á«íÂ]#z]¸©¯gËØ-¶øú8&ƒÙˆÌäFÔ=û„0áHH¥¹L’+yN¹›¾.¯¿Šp©¡š‰4|ÔäØõ¾ ¥\õÑT„_RY¥ÞôÝÔ`† fÈf3DƒY¥ÚÖÔ|;%}fî” Þö‚Øñ¾&1 &¡ϦC~p1ótI½‚QæBY<'òá#"L³'š(ôÞ˜+à*‚‹Ïî‰&Š xÙàŽ‚ß,S®ïŸ$r÷_lû±‡'YØ%¶ðJÛ³°3Ȇ>ØÂ)ƒÌ”EκS´b o{¶0lj`‹-î‰-Úðog¶îè.¬¢¸+PfîÂr” ÈÊCQîG÷ápí¦Æg“y(°ÃgÕ!Ãrbd7‘œ+ÙEv"ìx =æ ¶Sù<9µ''E™öÆ}Yä$¹¿¦;Lv:˜ùlÚ'G8ê½6º H3K_ÖÝ]šÖ½ f?ïg UUã_E=ѲC®£æUR|úާR>8ÛÕS3nòJó©´¿³oåz™L/ŽN^µºV –ê(XDYt,h½ˆš4@â=[sßnR‘#ÙpÎÖ»<¥Ù,8 Xœ}:@âüÔNîë-ØÜ¡?}hECXù:… QÖ ‹chl¸œ±>&Æ¥öÖ,j J”g[µI ŽÒ%¥,”%…—u”’7Ý)EfÊnˆJR ƒºº"¥¿|)SBÒú¢ÈN-7§C!£ò(î›Ïå\˜Ñ{SÎ9Mn?®“?[Q¦.¥‚…e:¥TðÓ¹jÒ“¬tÁŽTlÆÄ~# =„¿Â+g`8€%Æ)Zòc2ÈTqióŒC¾IŒsépØŽæäÕafŸ·vFLz½.ª²ô%ôeÝíвn€v²Î ZúKŒát)ª¦>øÛÕsoÖ?ŽÑ[®&ÉzÖ 0}fVà6’ì\N¡æJ±#“™_"؇¼ ’£Ì azhM@7;q举ÚSÄ,æ>8;E€„'ì)`ö0÷Ä·N·’Ó”ˆ*òDËÕ —w+³4„÷\’­^«‚wúwIÄ'Åݼì„þײ¸üpQ™÷†Ù2»—Y+þí1cê¹»¤áµnÃîB.öàãú~ΊÈTÈâ Ò:Ý ~7p)6 Š :ø[ŒšªˆBÿ¦6¢ˆ¹B‚­eÄ¥3Å@ß Q‹‰Ïs¢ˆ`Uðãûcž¹ÌïàËüf Á‚,Q; °™¨L43¢~›ˆñqªlÃ[÷ œ{1  nò¤HœNoGþ—ï£ïÓrp‘Št>Øf~1z÷œlǧ”c¡¬2×èúAkF6¯·@`ÀœO _–\›¤¦ç×?–û‚H z@ß}7£/~±e ;çt —ŸâCªóþÕáÊΊyŸ‰Ï¸15OÝÀ!S¿3µ;Þ2ÇÇhovÔÈËKôb }Œ¤iâÚúò4C@$Òíp ¹Ôç>A8;Òƒ‚{—pa g“{ájž‹B|9:¥èÇQºßU~Zn Œ›ømh¥¦UêxõAUìTÿ Öp¤—RÞ¸7GOÿ–Ä…ŽR¥8©…vAmjओ6s’ÀÕ^©)Ë·®ÃÞJÍ¡ÞÅ"ÈR¬ùÚîd8ˆ:â0âŸ7¶²AH÷_ð«XÅðï—”pO,nÔ`„{'¥‡tÎn5µK°‡hyOUr^µN%¯pö1gŸO÷Ä™.»KôóHõŒDŽ“Ú†žv£ÛÎ]šÖ³7:¥Î˜4õ—È1œ0Åï¡þvõÜ[îL¶sf¾¸jM&©ãJQHpeæ¸BܘU2lÛÜb[¶F$Û@€ ³à'ç??~ÎÅ-öÈw;X8Ûᜎ8Š\äÌÈÊY{Ny%6kã´õß"Vl•µ—]às^lóÀA#¼næ{±ç 9¦ö­ÎN*ÛÓ¶%~¥éìf¹ŠFSP ¾<ÖÂ-YŸÆ¨ KÍÔšL*mHî.  ¦Ô)ÚŽ2ãKaéþ:ìtú‚6ùÏ¿àë¥ePëÅMa] ºHžQº(tiÂPæ”ÏÒ¥¤Uü4À­•k¥ û6Ά4nÛ‘“·^OÓuºü<Â5t¹n#;~G†Fve¡Lv¼Ìœì"‹¾;“彜_ïü6üÙÄe`%™!çjÎZ¡e3á”ûju̘M9Õ³U‘Rày`¶Ã±½{î‘Ù~½[ÏÓÅôƌ؊ÍTðè¿Å-fÓÅÕM‚s¶SË̉_ ‡SÃpudû¸hˆbË ƒË°ó³©Š#aìFk ·wáìÅ/|&ÌWj|í{¥ñn×¶)£îP«Z½²É£fÞöN¢Õy¦]2[Ì¢—Iz›¬—ŸÇÙÁvqÄ€øuú©: f`d=Jtn#€›¨RQÍèè‹¶vf”ŠjFÎèK6à©:Àš9pz“$w­’Vt  ($@©n)ku£›eåS¯;uO¸¿j&OòÉn­vq,õî/µµ½7Bzëý85_]+i_/<Û7V ó@@¦ÏF:´ðeÑ)gdHdÄ ‹uw¾=¤œ‘úy¦.½­ÊéPÊÕœŽš¤tƒDF¥RÓÆª£riFL™MâÒòÍÙ$£6f“(UVÙ$J¹ÚÔM2d“lVÒE&]žçAnË.}1Pℤ(Ìu>˜<Y›Dž·BUÕZ^sý"k·Ï­MúNsišUd¹¸$ÉÁ]I!B­,Øjl"Œƒ`œgÂÄ{On„º!CÛá‰à¬À%<ÒWRÐËMYÊýCb*}¾%óDâNüÄxÇÅ=r'r‡\EzmÒ8Rúsè9 „+å*„W¹‡åUÖä§TiÚÔÀ[Ü [àÄ„fÜ™-úL{¯W šxR¹kä4¤Ì ÍSžþɲ%¤ýú ©ói¢^l(?¨KeMP³©~ز©~øùAM9ÿbÛ¢Ëá«¢u·Ag0ÜXU¿²áªàWª†²­Ê¥ À?ÿ7üð³l’€¿<±ìä ƒoÎ0¨N8¨&zÃ@¯ÇǨaàУ´iy/ü@«4mjà‡¾~Èà +¤çùÓâ_£Ëôöô:IÖ‡c~ ~ã^Ãqî æ¿ŸL—ø#.®¥Å“<?ÍŸÙh+ëÏÐI‹çíü2’¼A¹¾oˬ™¬Ém›áw{¶ã zûïá7¸š6ÄͲ­Î59~÷é ™KÏhÝ¡!~ž™,8\±Ù~èÿaØ› ñ¶Rç’†2kê]Þt¾,²¯(VQãØeË«\FyàR_FHý5ý$¾)}û±ÃNÓ†’Ù‘Û>vâ`ÖR‡YjÂ:³†ÈØmø¤¦YÚ¢¥VôÎnÚz)Q¹ÛðIM0¤ÒDPÓädz•à×u²X¯žþ?ÿÿPK!$7#až ,NdocProps/thumbnail.emfì\mL[×¾Ù*­û³MÓ4­ÿús?ö#ª´!MÕ´µÒ¦5«´¬B뤵Z—¨kºÐdc‹“4K ̘R7¥,q0'`> ÆÆ†‹mìkßkÛØ€`(¢(V–ġP”ˆ=—k®/÷ÚÆ!`GØG¯Í{Þ÷=ï9Ïùö9Gì"¢Ÿµ°Ì/×"øûõ¯Äéç âÅW^{• vßÛC_†|§Ãç>\8þ‚øÑsñÍ/Ä8¥(¼þíç‰;Öçˆ7ˆŸ¿ÆçWÐýŒ8D¼MTï&ö'm¹|k_K%”–å7Pqê‰Ñ”qüåT$ů¬¬¬ŠßÁ÷wñ©åbHÌñk~vß᤼Sž+}'kõ·¼¼¼P”!‘HÀìÚ¾«G.Ö5vkƒS¡$~EsíKÿ|½¨èOŸ*Rø¶*¿ÿáÞ¢¢MÇ&…ö?¦SýðLyQÑûš)üv|T¦ü]QÑÁÖS“ÓkãÿDçÇ?nx«¨èÝ™þ“=ê—ÿPTt¨½:…ÿTßùŸhöý¥ëÜät8¹þ65þôò{EEíUNάá?cizµã`QQ¥I•Â_=tá=‡‹Šª, )üç†5{Œ•y ƒÆJý¸Ž^ ÒK¤2JêÇI¥£N…„TŽë Ùc¬ËC1Å‘Au(2•ÿJ›v¯ùH>é°³Ïî°3¯ù ‘Ÿ¦ð×Û[/;:èí6jømëéßZŽŸnÚDnuŽy*­ãªËã”Ë!Ñt"Ç´ª^§1…ÿã‘¶~g ío¡¦7·•\®¡÷É¿5t9ŽêŸ(/Ú¢Õ¹ú$©Pæ§ n宲«H—%…ÿç“Ë”üäöú?Úª‘£‰€DüW)£$Êlq™].RbŒhv鲆…ñßHu˜ó‚Ÿr‘•Nõ{#Jä(A" ‘‡Û$IV×ÜJŒ£úªL*¾j†©Ápd:9ÿ]pwZ(3H¼¤ÆõUqV½ó-°¾DÌ% È,­¥\ˆ‚*\Ÿr5 G ¸]` dU‚U'XßBÌjZç–¶j;Ýæ°¡>›˜/±5Ê%ø7tÂXµÝžI*”yø)iûÃ[v•šÚ¿…6 º-yÀï¦È3LóQ¦ 9Jä‚ß@[%©PfÒm…[yòì*»ÿeÆh¦­i׉­ºi꬯õ¤¯¹ÙÛ+öì%»Æ´b Ï÷~DSAÞΘyÞk7Žy¾ßcöÐnÁFÌ ÐVäÈK5ÞS'hI™jÿ¯íŠÏÄS;mø,LŽfY<ˆU¶¾jXÂó^Ý¡>›F.·X\Gåò.ªmÞ/—C"Qõû†§¢3Üü'>ÿž RÓÿÈå4<Òwv–1äb™‹Í5›$·œéTÄü¹|–”rùç‘@¸õ€\‰\uÿþ}¿8Üû"jmó9’¿Fyù­[·`)u(NÃó^Ì–––ĸ‚C±„çÇú›„ß¿H"¤Û³“a†fx{üÈ~Cò3©ÂIƒÀ 6‡—PÙÒÒ çíNï(ßÍ^ºèHkaõÇa™Ý!,Q,˜aª{GïÌäM.‡1?;JR¡HÔ¸Ÿ¶¹äûèö7þÅ2£™TÌX ÿ6·Y #oÉg±ýËT¶}¦Š í3ÅLÑÐ>&VÖBÑåý_Õ¨L!Ù©L1Uô±j)éÿphbBÑ•{p¨bnÀ³*zƒPqÕ‘?çœ •™b„¬â„þ\ïT™Sô†iCBÿ÷—×84Ú;s~¶Ò«Aã÷ÇîŠy»Ö¡ñóêŒý_Ührüòöä%ü™Ì²ãçS•µ¤™Œü[?þ»^ÔbZz¥eD<ÿ•_u¦5ƒ°‘LÍYÂRhE•É›\c~þ“¤B‘0ÿyšTB½‡ÏcþˤJ¶?ö¡^s;O4íd{j…(˜©ë1Ì“ѹy±|¬ÿŸ³_лwïÂìáÇÞ@H{F}Ýg…(ÿtfX,ÅB1?ÑsNx$ÁâÂG‘5 Àó׿&Ùðpäv;N&yf,vm64T“z®Ûó4·ŠkÛϿҞºqÕ™9à$?³2©É´_Ê’]ZU ÿúªÎrþ‹‘‚î'„˜¥nÉo¢™˜[_ÌFt™´iåá ¿O+‡ÿQˆ" ý'ýãcÔиÓÌkïøìLî–zæçÎÂàNŒæá‚P~'–”ðs¿Jí_ˆñ¿‰þmzO#H<–Pãᘈ]Œ²‹â^;_êÿíÿcf ž ÙþØ~ò;ðM|Ow› º7‘P’„?b)Ìü·:ïnò+Ó1î&ÝmáþGr÷3]G%µþôQø„ç§÷#x˜õ#ætï®OM·ÌÄÌç×§¦t‚dqqññãÇDt:46¨[7¤{”ë¢[2àóé3K^"Õ¨s£‰Ã?¡?•û ´c,Ù!] ©ýóÓÿ±ÄÃVìÿðö4Š-` »@Cü¶!®7Äñ’•…Ü—¸Í=ZêÕùb¥þ¿6þ¥óÿ–LøÏ¼“äüaI,6æÑ£GÒó¿'Ú=xðÀëõbOþL…H„;_Î1<~È…Ãigæ˜÷v˜a;˲lîž·?Îü3Xf—£ÉËš=I-\?.Ï ‹-%é2ùA<ÂlZ˜ñ/ÁPÀh¾ñƒÁ, RþUX>ò·þcÿˆÍ¶@ÏTÀÁVîøþØ·’ÿ ìIþÿÿÿPK!c^aæ³9visio/windows.xmlÔTËnÛ0¼è?èÆöP=mY2$ŽºZİÒ$ ŒLÛD%R i;ùû.õªÒ¤E9¤A;»Kr†³ŒNî‹Ü8!)g1rL„e|MÙ6F{µù ã$yÿ.º¦lÍÒ˜æ”0uM×jõ£Aˆè ¡ÛŠQ«2£R娲d¶#–fA3Á%ß(3ã…Å7šë@ao˵×*0eMïX<éæ%a°î†‹+ir±m–˜ñl_À¡`Û·ɱ6rGKY­6–%ÎHŒJA$‚’†q>‹0®¹]>”P4øä[0UXêØ#o4pwÐ&¾’ Õò4ݼ„ÐsÚ¸SȶP«PèA×”3t‰¨·]à-A†þV'º¢ä˜f8בé¡)p$â&F¡é}wŽ×u¯Ÿý#ßÔ¹0 lw8 }`›îøq¹Ïá–'²zQ•™ ºNì¯þ+TåTü³ëé!ußž®I—×Q•nŒdúœ2ÕÕ<Á£y¾')Q —IYâ(e¸ì²n8„3ö‘*v¯Ó7¨ zPU2aÛœH+‰f ƒ5É3†ïr²Öz<ƒF—ø.-sª@ï—‰mÂÞ`‘U_ü#3u×_ßj gËhÞ 1“?rì0`Lêj+ýöaå$§‹'¹°AÝÐ)]d´îÑt¼Z¾¸0>S`l|¸ü«oíÔÕÄ­–œ«Uýïø«jþŒ ìöZ9¶ç­N'éùôö»y•¦7Ú”¢šx=ÿڜ৚Ö\ð}™8Ú:}àQZ«§=×+Ðгâ™f–ªI|^<\ÝÖ½9á&ËåÅuúzʹ/Tž€ÿ\¹ÓÉíìì=ç½P¹î=ÿ×À¾iÏróåâõ<§Ñ¿NkóæÉäÿÿPK!`5‰_q d@visio/theme/theme1.xmlìÙrÛÈñ=UùÞaá>T–·pJ²u•(9åÇ ’X€²µ©ýˆT>'•¿ÉKþ"=ƒƒ3ÀP¢MZö&’«–˜AOOßÝs`ßþòe‘ qQ&yv$*odQˆ³q>I²Ù‘x{I¶(”Ê&(ͳøH|ŒKñ—wþÓ[tXÍãE,Àø¬ ¨6¾HÆE^æÓêÍ8_äĆð%°pE= þC¬7ÌV‹#QÓÚöñíiÕæ*Ë~èý§}÷{ðÁr#;Zh;¡+™Žc7r(yQ,i®¹ðçYZÃÍÝý,›ìÊÊ@UØ…'‰‘9ˆß ( ‚@ lÓ‘|5Œ$ÝR€R;r%GÑÝÈÕdÛw¢†ÒT$¨‚x.];>hqwʾ!fa‘gyE"›Rk`ü<Í‹'¶ÆÕÂQ­¡ëZ†ù>Q Gµ†¬+–â F5jèÆ^ȡӟ à¨QCg×Á……£ZOº4 Gµ¬¡½„] aáêfOñ-åº[ô2ý¨I@¡Tk¨(O׌&²pTk¨(72 ™õEþœ¢\ß²ä ?êû(ŠŠí' Pª5T•¡X¸}*J7<Ó¬Ó5ÉsŠÒ5/ôV ¥p ¥ë]Êbá¨ÖУ¨ÄÅÂQ­¡Gñ…pÔ¨¡G}›¢Â¨+ (ì Ð½*Jã ï9EE\gNQ¡ÏcèYZW<”žó(Ë×sŠ2£®š¡æzΣ<_žP_¤¢Ê–dØú·íê ev§yVm*›è×¼ˆ¦k3¡z\ÆS4†RÜGirW$88Á,ˆzSwËAž ªœ"YBtâ^ŒD ä?ÿüû¿ÿõzlð†£^‹#ØV¿`$}7M3ÚiÓLø|$:†jˆÂ;•…‡ÅL§Ìf5¡ÏZÒ6ÎÃèzY”U€Êym äUcÝi†î…2Ží¾È¼ßfþÛ‘¦)Ö·) Ça1òFJ­“Øòòºê“F ý—4pMÖãé"4íœTNÝ„_ …û– !`ÉÛ;Sõý¬o¿¼2¸ŸÕ/,¿“Û}“¯aùö›}ërSkA»H%\d“¯/…£Ãíªº˜ù±Äõ6§È†$ýÂ\ƒ:XñS ¬‰ëTqRÁ»ZÂÜ·ÃL¾+0ÐIÍôšq†[%¯§Ù\úÃe¸²0LumÙ¿^XFéª&9*\‘ÔUG‘\= %ÅSuݶ5¸Bi5™‡\u‘r`/Wõê$—/ë‡/O׉|vUË ;Ð%K¶á6%Ü”<Õõ$Ë ½PUtÛµýu¢­™ ¿ü¬ìvuEø…Ï®oÂ…QÓ†Û¢¡cƒvC_r/’dÛ^ îÉFkv{uÅOÍ÷€V¾ SÕ5 xW, îûš·gAé°/«®ã+ºÕ  -"ʽ¨×$WE¾„‚*XIã«÷8Acßü ^á›G]ÙTï9.ôš¾ë9x‡ìZ`=V;X,CÜMõѼÛz&Ìø#grHIø½xRÄžm÷¤Glì9Mv1ì¨a°µ²¥×™8~¹µ'þœÒkü£®2hógühCpÆõвúN&ì(®&ùF$»Ší9šÙ~åBÎ}ñqny\ä«å^Ò۸݃ˆð¡2A^ç6hÖi¯Ä8Ü’þ1þàâÉý$jÏfÓ™"²];ÕÿãÄXOé`g•àõõþåý}°»Zï0¾„ù´'öûÑÁÙzRk0l› ~i­;ºBù,Š¥µø’c„¶d¦¡†®íšVØT‡ÝGYd’&Þíûƒ/ ·/îâ4MÊ9þ—~$DHÀ…ïéä œ[‰®öÚçzC¨má°Ù<×uûp<|éׇgj<´ºñZS÷ÇÃio7ž©ñÐêÆ“¯<ÁІ㿂~¬W@PfEɪ•ÌàE_ˆëçzB„ºcÙd;ZäëM.» ñ+„°ëü; QÛd‰p’Ú ž)!B«"ùö˜ËÄ®BxÁùwâFwÞ•‰]ÇïêÎ_á ›…¸é ÙâÆ»Þx °þm»È¶ý=~~÷+0ð¹Ð*­Jˆ~dX`“¸‹Þ8•7ÿ‡€wÿÿÿPK!Á1ï›rodocProps/custom.xml ¢( ¬“Oo‚0ÆïKöHïH)€F“iÌÆ<ìbŠ6¡-i«›YöÝWu³ì´yëû'Ïïy’·Ñà6Æ I8‹ÝƒÀÀ¬äa›¼äÓ†T«Š†3ƒ–`ÜßE Á[,ÁÒÐLÆ`«TZ–,·˜²§ÇLOj.h¡t)6¯kRâ”—;Š™²„žUî¤âÔl/rà¬îÕ_%+^ÝÉe~hµÝ$ú?5U¤ŠÁGêŽÓÔ…®‰²`lÚЙ<˜Ð‡Ðx ³O`´Çe VP}µ\LÓÕð1ÏžæÃ<›gٳ߫°iߤId]¿;è?ñN‡íHSÍwtÅXàBáê 'ýĆ}Çñ~p² ;‘u#|ÿ|V‘Ÿtßs<Ýœîvô©œa%Hy޼æ¼IꢑøD<•7KìuÌœP|µ& Vº— hëS LÛÍ ]Bÿõdä²qmÆ:Þâù§$_ÿÿPK!Î’åÔé docProps/app.xml ¢( ¤SQkÛ0~ì?=m‰í¶„d—6¡t°Ð°8¡†q“ÏŽ˜-I3É~ýÎvc'Ûèæ§»ûħï¾;ñ»CUz +µŠX8 ˜‡JèLª"bÛäqrË<ë@ePj…;¢ewñûw|mtÆI´Q(±½sõÜ÷­ØcvJ°"$צG©)|çRàR‹*ç_ÁÌǃC•a6©BÖ3Î÷¯¤™­>»KŽ5 Žy‚U]‚Ãx1O ) TÞ£,Iü‡Ãíìcº’Âh«sç=wS£µKû8œ¥$<¡iui\_§÷›O‹å×ít·I^¸?<Àï뺔´»–ûç ß(qA:ãJ‹Ü ü ¡Á¤±1oܼAá´ñ¬üIS¸aÞ7°Øv±Œå¨ËöZŸtqY[gâ5h¹OXŸwáùµóXÞÄaw‚7/ö\+°ŽvçÿÙ[y}‡ôìeï‰t4§ç| ÆýÅŠ«s+:U½có“¾£× Š’|j}ËӤ㷗W ÈJCÀ-tUƒ:Riˆ>KõÝnëD/Ûu{ìe‘oö`0£pÂÇ¢™š’HhÀ­—ùÚÅžÔcv¢øh7q×ÿì8œM:ÝžjÜÿpü ÿÿPK!!;å™docProps/core.xml ¢( „’AOã0…ïHü‡È÷ÔI ÀZm8€8„Dˆ›±‡`HlËžúï™:Mh¥]íÍã÷òyæe—ß]›}AˆÆÙ%+gËÀ*§m–ìqu“_°,¢´Z¶ÎÂ’m ²Ëúøh¡¼P.À}pˆ‘lÊ/Ù;¢œGõŒ3rXß\è$Rî¥ú” ðª(Îx(µDÉ·ÀÜOD¶Cj5!ý:´  ‡:°y9+ù¯!tñ¯$eÏÙÜxši×î>[«AœÜßÑLƾïgýIjƒú/ùóÝíC57v›•V/´h°…zÁtŠë×P8\O *€Dêki³«`"ºÖ}´ëÕmé]БA4DŒGú›Ã äneÄû`,‚®«¢<ËË"/þ¬ŠRTâ´xIÈ} ’rúQbÈmTžN®®W7ì¼Ñ•& W'`G[öfþG<§öòr¾ª*1?ó9u8G@–Q"4.l†PÔTQ(­´Íš¶­›?>¤8§«4ïá"×?ÿÿPK-!O£ ‡z[Content_Types].xmlPK-!§Xµ%^ ¸_rels/.relsPK-!7Eж´wvisio/document.xmlPK-!¬M„ôvisio/_rels/document.xml.relsPK-!Ã™ì¸  1visio/pages/_rels/pages.xml.relsPK-!/ÂF¹$'visio/masters/_rels/masters.xml.relsPK-!²s³£u "visio/masters/masters.xmlPK-!9ÕñÔ Î!visio/pages/pages.xmlPK-!&÷°½ Õ$visio/pages/_rels/page1.xml.relsPK-!ìBõ} Ð%visio/masters/master1.xmlPK-!½êƒòšÄ—)visio/pages/page1.xmlPK-!$7#až ,N¼?docProps/thumbnail.emfPK-!c^aæ³9ŽIvisio/windows.xmlPK-!`5‰_q d@pLvisio/theme/theme1.xmlPK-!Á1ï›roXdocProps/custom.xmlPK-!Î’åÔé ÀZdocProps/app.xmlPK-!!;å™ß]docProps/core.xmlPKŒ¯`readme.txt000066400000000000000000000001521362133436400341400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img_srcThis directory contains the source files used to generate the image files in the sibling 'img' directory. tlsio_state_diagram.pptx000066400000000000000000002154621362133436400371110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img_srcPK! bðRøZ[Content_Types].xml ¢( Ì—ÛRÛ0†ï;Ówðè¶+–‡‹–^Ñ–è¨ö&è4Ò&·ïZ9™Œ‹ 1ƒo<–åýÿO’-í/µJæàƒ´&cƒ´Ï0¹-¤™dìÏíÞ)K Se dl]Œ>~Þ.„„¢MÈØÑsò)hRëÀPÏØz-š~ÂÈïÅøQ¿Âsk ö°Ô`£áw‹™Âäò‘/IîLXòmùbé•1©KØÁkc<¨°#œS2H£ãsSìõVT)EÆwÂTºð‰ÐY½CÙóªj°ŠûMÓéeɵðøKhBçÎ!w:¥Ï+Õ ÚñXæPØ|¦I$­Šiõ¤™j!Ízÿƒ ŠŠ€´ô¼Ò´MVÑ~ÓŠæm8šŒEëY©4Z§©h71•+}í­ m¯ÌF¸‰`.ááM6ÂMHû ðx=|)¢L££ø«à ZŸwÜJ7QÄŸçJ,ì WÿŲqø$ìì£×2µý}¶ÀtÜA¦ÏdúÒA¦“2}í Ói™Î:È4èwê=wòÊ©zøæý¢S5¦=7eêøö¾õ9ØJ?w˜Q.³*G<ìÿm¬k‡2ºç(A6ÕC]â½q¤ªaà Êb©€b_ï|Ðêƒí—25æ Ë‘ÆG ”—±Ô+´(6ey-â÷¼šôd{-yÜë ÎêcÈ'ÿ§·°H @(qb–E2ù.¬†Ø"I®½zÈÛiÌ(²š‹yÐæ´ êûìÀô3”ÏXñ°ý ´þ;È7QxçÕ`ÑÑÌÄ4ãˉ1å²qìK/tuJyûËÈÆœ%Òå)Ix tõ2 Bø‰Ég©ÞÿÿPK!Ø‚k×Î ppt/slides/_rels/slide1.xml.rels¬‘ÁjÃ0 †ïƒ½ƒÑ}VÒC£N/£PèiíÀØJb–ØÆrÇòös/ÅÂ.»é—Ч´ÛÿÌ“ø¦Ä.x­l@7Á:?(ø¼^^ApÖÞê)xR°þ{~Ú}ФsYâÑE…âYÁ˜s|Cd3Ò¬Y†H¾LúfKLFm¾ô@¸iš-¦šÝŠ)ŽVA:Ú ˆËËå¿Ù¡ï¡÷`®3ùüàú‰Ï“³T¨: ”HYµ¹ª[YÜkµÿ©Å7£“^Â5¯¼ª>cîf¸úB÷ ÿÿPK!?-ž"gppt/_rels/presentation.xml.rels ¢( ¬”ÑNà †ïM|½¥:Ý1Ù…‰ÑùØž¶D „ƒÓ¾½¤ÓÊ–¥ÞpùàçËá„Õú«Wd¥ÑœYN èÊÔR·œ¾n.n)A/t-”ÑÀéH×åùÙê”ðávÒ" )9í¼·wŒaÕA/03tXiŒë…ҵ̊ê]´Ày¾d.ΠåA&ÙÔœºM}IÉv°áæÿ³MÓÈ îMõуö'®`ÚxÀG\ˆ®Ïidb¼£È;e§±nRbyñ¦àÅ*wŠÌ9EJT²†?„Q"§ÙjÉ!ŽidØ›?@{1‹µL‰åCOGµ%ÇY†ë” ; ŸOÎØ¨M&k®I®RBXx1Y¿ìà{(¿ÿÿPK!èñ]Lppt/presentation.xmlì—KnÛ0†÷zÛÂÑ[–ËÝTE€0êäŒDÛB(R iÇIÑ»wHÑ•ât [­ÌÇðŸá§±43¿>5Ô9!kÎrä_yÈ!¬äUÍv9z¸/&)r¤Â¬Â”3’£"Ñõâó§y›µ‚HÂVpÔ&3œ£½Rm溲ܓË+Þ{[.¬`*vn%ð3È7Ô QÏÇ÷fÓ HS±€â ( ½h€4 (Jƒ>ã_ìH5 hÚ üYïhýáÒT, tè„Á˜AHS±€f@³ ñÆ—´Î MÅTÏïKÌ6ƒrÓ–À0r¢ÎѯoŲXa8ñ’°˜DÁ*ž¤~8ÌnаˆýÕÒ÷–¿”¶~¬ ú" bÛX}×:4u)¸ä[uUòÆíz·åÏD´¼6mˆ {™YùÖ6µ8T¨\Ôг€8¯Èi¹î*â4²¦%…[Bu)v‹Îe´ —‘© u°ÆÄÕ#£ÛÝ wXѾ^ÿ!j ¸ö@÷ükxC33lžÿÿPK!ªç{H•Úppt/slides/slide1.xmlì][“›È~OUþ¥§äÁ ÍMå™-ÏØ³q•w½åñæu #4RÌ-©ü÷|§»¹ tŸ±=…Æ’€††ïܾsN󿧇e¤Ý…i¶Hâ³{­´0’é"¾9ýþåê•;Ҳܧ~”ÄáÙè1ÌF?ÿõ/oV“,šj8:Î&þÙhžç«Éxœópég¯“UcÛ,I—~ޝéÍxšú÷u ]·ÇKÔñé.Ç'³Ù"ß%Áí2Œs9HF~Ž+Ïæ‹UVŒ¶Úe´UfFݸ¤sÌ,¸Ž¦ô¶ú’†!}Šï~NW׫ßR±ù×»ßRm1Åýi±¿ÄmÕµ›øc7|·¿)Fò'³tyþÆŸ`nÚÃÙ7ÿ‘þâ >äZ  ª_ƒù§Ž}ƒùû޽ÇÅ påIiVrFÓa^1¡/8ýEò 1æ–s£´ü?ÓÌצXŒ—‰ÛTœ»œœ¡s×5L1EÓum  9QÆ=î¸ÖH£érf{\œºœ…?Y¥Yþs˜,5úp6Jà Ñ­òï>f9Ýéjú9N®Q$Ÿ€¼¨Õ„.úH[¿âÌç>õ˜ìß·~Ž´èCœar¦kyöHËÅ7Û3?ÿ›?õW9„U»_äs曋YËqvLË–ùeúwõòs?{ŒƒyšÄÉmvè¸bZùy%Y¨%qôø÷ÆÒÃÂP< RBq Ü)aŸ“ÛxNµÏxè¸YQhz hâü$i•Ìm¤iY&×!¸Ō9¦eØM@:ŽåZ Ûv8m߀GºDº¾~PŠ9K-’,âÏá êReH‘ /£T»ó*? ©˜Ü4÷§¡üÙÒñO]P»t„¸¼ˆ¤‘g€9¶ {l9/µ?Îf˜Hy°Bö¦ƒË#Ä™“¸:x¹ˆ“´kff¥Î,÷øP7¦CV¥tz\7B8¹£“Ғ©¶HÙT[²U dSKK1Õ| =Ù òT>óuÙ$eçG7’r'ÜÞqe¼K^/I¦'‚ÒÎtHDD ?øõŽ/>ï!w})†åén[-»®ËmÜo¡•)€~¤`/)ø_Žß ÄÀØ` å‘(Ìr CƒN1p,Î\x/ƒnÎ {‰ƒÓˆPØëÆQÖ@úD2áÌá–³æ9ÇöA 1€« ØÓ'"kpSÀ7É€yØà qÁ¼OÓ$ÝQ‚‡øZ6—ôq‚BÔªÌÁužú‹›y®½Åø÷ÚeLjá’Tc†UJD9b¼xŠo’È‚Ý(BPŠÈÀýzWîÚ «k?KVER=Ú,Z¬þIÌiÅh1ƒ=‘²dê0(2†®Ø-œ–L 3¸çÈø»?¾ÎÔüʉÉSõ°?Q¬Ýc`O·dðJœÑ;?›Ëè9{Ìè Ý(þ"zOµüq./O‚` m¸˜(–Q©ºó]aû¡uwL¾CXýÜ1yþ°!&'\x,?Äu 6ˆ›7j€4“~Ê`:[ ðnDr‡ó-`Z¼|äÏtÍ–£ÃÀUB²$8™n[ÈŸãÀ9 °â»NˆÀ’ÎÞ€ÀŠß.bü_Œ9¼í -¥ GXñvÇ(MÍNõizœ™fA(µu}3·I·J_ܳؓBtП;qš§C¯YrßÐ[Qà5ô Õü1 þÌ´8¹œÃš…o³|R‚OƒTnšºÍaÍ ©¾˜"­ ½my&S ÕÂfKl*cŸ%ÑbJÙ2ïYzóµdÓ¯®ê¼y}·A?…&jy›¤•uÓ.¾ÖYìÝ”4"xƒÓIP+°»íZôÁj"z³È ™ØVŠñ8«> P$®Hãàî%zv³ÓêÒ Dè!…¿2¥ Hp£xêð”6)ìº@”ž®€Æ(µ¢Ã & mÜf"ëWz'ÌhÇ(×xö|6ÝM™3Siµ ìÁv†{†H IÞFl¼‘cjŽÒ•Ú>|°0E†ê«#_žG(˜ùcšÜ'éŸßÅÅ Ü!ùîGQÖ¸ €mÿ´»‰ÀH*íJh„s)tô‘BcyÜD¶Fx Ìr]§¥žQrb˜žÒφgºæóÕ|©Ù $”â¯Ê@´­ˆ¤º«?D1GPIñô7?õ?C@×jMXó,R]ïJ ´AS¹§Ç†¡Èt”¦åÜB°C:¼Rµ³-[@é`ï³?z—ä§Œ‰¸a §³Z„ôœþt?^óDwÞ…”` >©ZKViíE|R¼-ä0[ #mVÑNŒ*ß·$’Y‡ò4 ¢áapÁw"ú¦èÜtm×£Vê“ÙT}©jÝž4&jFÙÜÊXHf€›³ܤõ:δ-¸hÒ›ëLð0F ª ÑQcÃôö)Š=ääφ€¾¶è4ò‡ÜÌBñ‰ôŽrG× l¹·uÿHÉöÛÔ†ÛEyUc*ôùî¥àUè5©Ý.ÞW“¶ç/¯?|Ò®ÑÐjïþMê/@¸Õ‡òÊÚÏC{ÕVŽ˜°n»2xíìœíZT‡*xަ ãUæÊpmdž*OÚµù÷‘øŒÙÑÆÌ ‡ºÅw¢2;†ž“Í‘ž“ázoÒs2'¶…wTAÑæ@ª¢øžÔqÚÙ…ê¤ÒWó¡~ú•v€â“é=fx:jbšzÏi É&ë”EÛl߆˜ñ‰ ÕN–ì…VÙ¦öàØth=a½Ÿ9ÕËLÇô6% h|4ÎUZ¤ß {&˜zñ$zÔÁ6¨Ú"È;8Úl¢1Ã+ÜÁÎ*ƹÉ(%Íè!ß+{¢Ä©ÎAõÜe7 ð£‹\lQÚ$‚•7tœN9n/ã²×ª¸„®Ü5þh#ζP© ã+ø2Ç@›hÓ?[Áàô=W¡%—šÙ+»2¸Ç%¯¸§;šZ@b¶£s"ð¤O7TÔZà¡ÅqÏJ¢c{òStžwf?»™ê³oŸ¤#×pT5èï““ßJÆ”áñåmz‡J‰²íð]þa=£YU«"‚­—ÿU®2¢¨›îvW½âwèç¬^‰•&(/´@ÏQ6™f^ä`œu±%f©_–ßT4ÜI›Š¶cHíš²]¡ß|bîåÔe×üŽmÍüÃàîäöÓ½fé *@~ gEŠ,X"ºf‘éÇ6ŒjÀ±-×´•Ú4±x`%$ªX…y®i©ÆtTùñmåÏ5t}¢?F`T€†Îy3UÚߟþ r2[FXÔË/hê¤õíÁj»áZŽ0Í1p[jûèr‚òN«3«V3¡Ó×›Uh¿B¶Ê$íR³Ã2tƒdª¬c™ˆŠƒ?p‡žbzP͒ΦÇ\9¼µ½ð «áD2bïʯ¬ÆZ—1óB®l{·M×q¨­”3Vܯ;Ya%Åón>âa-–bݤ'dee‡Uí“;2­ÏBù…i¨úGT©¡§§•ܪ۵]è³Á®•+²ýÚÝj¹Cæs·Zî»üÑ‹98o2äî9!ûùŽRäPP·ƒ0} ªþ …xž';Nj1ÈàKKŽ!¢-Ö¦+—|q2W6ewÈ\ÕŒ}3ç¡yU™9„ýŽã‰¨[ä37¬ò÷rE®L_tˆ\•·ØSäÕ¿µ¨6éZ‚ž@4稛”à rÚõ"˜cå¶’å”?h8˜%e¬¡~¡àMJB»Y1l¹ ©"kF€b}‡þ^ƒ9×Aô@t™gKãk²K«”«=€%GÆ{K3©Œ Ë),9Ä~£.dTjµ²‹ª¾Œp/ж˜‰.J™^4P»Æ“sãX¾fÈ1v´>î›cü±[~·k̶¯RªÕ:T¦òÔh îl‹æ¤åÙ=ê–‚æ4uÝ’µ?5Åé¡<›)Ãn8è„’ ½ZŸ¾ÈèUåµÙXuü›©Í2Ùý‰2qU~{gW™ ¨JCÓÊÕä. ‹faèɦUªSâ¤T£˜{ÏÒ a„õî²°J#Ê;U i[²¨žIð£ÕÜ—ëÒ–ú'nÒšµœR3_¸~¦úz7ü­óþ₦J#Ö×»é­-ÂŽ;ô~IÈo’„T(}ÁV‰t±Ì¤Ëj úTuBS}…t……,É%Jçƒ6×x,ÈÄ@• (a‚(9`w„09´DY+…1ÈR±¸ä KB=5³¨ßKâã@YZ_èÒ%DHeá÷åñÒ Î,Y,¥šà0pÍ™qa ¸ZFmXQ¨ñÊœJù½Y%õ£Foä¡ ­Þ&Ìói#£Ûå/ÉTÚwDgE|†Ÿ?á]NÂÛes…‘.Fi›lè¼+ˆÎšŸkj9ùƒ‹»V5‹¾ò°ukªâ•­ÑÓ¡âTÆÆÂ4ÉJ©ƒM“éVÚ¦ Ý„ž#ËÂ*lÓ`›ÎF'{'ÑS%7 Ó¶8oNSÞ^oË6¯’}=(¬Ð‘(­ÞOyÊÅmq¥˜(ölKªjè1aç\ÙË[9¢E˜¥‚ögj!:¼îð¦ªÉ@¤šð oªÍZ¹zAÍËšZa*Ê›qLíç¾PÆ3¸ŠdXW7óðë»jðPx4 m(·-(”K$5ÁåËåïOMwnÖ“ÜÃBbÔ#$ô$3° ÉGåÑX¶aP11œ-Dh¶Ö£‡¹”eYI¿Ã<ß&cDoÜ«ñ5öåp‘¢ÇÆ‹ý Á)öd¿d¡Á)œâ—îó[u~§SÐ+OžWç[ ož¥åò¥ÎÇëˆ[:Ÿ:ÞɈ‰¾Q ‹Ð<éR ¼ÁAËé>ËVŸ¥¿ÉÎ)}fÁÈw(ÌpÔ:£›®dHc0dÂÔû¢wj¶ÿØ{‘û’†x¿öj‚~Q¼^}ÒnÓÅÙ连m\º¯.¿zÅßyΫ·W¶õê ¯ç—îÛKóýÿÚ]1> ÒÐÏIüaª=,£8›àdzÑ<ÏW“ñXähýìõr¤I–Ìò×A²ÃíZáx•܇é*YÄù‹–é㥿ˆG’ð5àÑs¬GQ^†«9½âj©âì:šÒeQú‹¿út'¨ß¥Ÿá ðx ~Zá}¢äé7v¡¹ã¸ÿÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout7.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!ÕÑ’ñ¾7-ppt/slideLayouts/_rels/slideLayout11.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!J¯u9Ô¿*ppt/notesSlides/_rels/notesSlide1.xml.rels¬ÁjÃ0 †ïƒ½ƒÑ}VÒãN/cÐC/¥{a+‰ibËíÛ×P vÙIüúô¡íî2Oꇳø ´ºÅÁFçÃ`àëôùòJ GS làÊ»îùi{ä‰J]’Ñ'Q•ÄÀXJzG;òL¢câP'}Ì3•ó€‰ì™ÆMÓ¼b^2 [1ÕÞÈ{·uº¦zùovì{où#Úï™CypeòŽ+òÀÅ€Ö÷ŽÜK««,àcö?=B,,’Âye³è .¯®ÞÞÝÿÿPK!ÕÑ’ñ¾7-ppt/slideLayouts/_rels/slideLayout10.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!uK¸CÁ^ppt/notesSlides/notesSlide1.xml¬T]OÛ0}Ÿ´ÿù=¤iÒÒFMQ“’ ‰•ŠÂ0ŽÛDslÏvK;Äß“¶¢‰—Ö¹öý8çÞ{&gûŠ9;ªt)xŒü“r('"/ù&F·7™;BŽ6˜ç˜ Nct M¿~™Èˆ Cµþ\G8F…12òÕÆË¾‡¸óú½ÞЫpÉQë¯>â/Öë’й ÛŠrÓQ”aµë¢”º‹&?M*ª!Œõþ£¤)`#+–×ÿZÞ(Jëß}Sr%—Ê^/vKå”90†Ž+ yíEûÌ~rxï•û¦‹„£ýZUÓ Ž›³Ð¨Á GtoÒɳ•Wï¼%Åù;¯½.Tð”´FÕ z §ßÁY±2§ÎE…7ÔY2Lh!XN•ã?álœ1»ä‡v¸ä !âZ˜ö”˜oèLKJ¬©aƒ,v]ºY8æ HÍò‹jS§±´Õ·öÐ9hèAsÙÀø;˜ ³°“úFÿ8Œã•Þ‰ü€`  E––Ö+#³OÀ¡nlíhAàˆi³2F!Ž -Ðuž/±Â×0` ¸‹åîíÊòa_@–.qv4 ]l«;èâK*‚Ï š¡A*~Åèç+CUÇŒæÏ¡fÍr»t³¬zÁØõÃ0qÃðt쎆ï¦él<ŸŸ²Ó {DO£Ì¡ºš]õŠVGW&eƒøµ[g¦þöÆÀØá2þ_Olk:í€E¾ÔPÚ•Þª2FI2öÓQâ&~˜¹á||êβáÀÍA¦Éh–çP²ôÈ(jeê"oåŒo$®*‰Z¬Í •×h¥'Å=UR”V.ý^«¹;ÌbÔúßF#» P/TiW­«L ¦¾cyµƒ]Ĩ;´7µ& zÞ.Êó“ºÙõÆMÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout8.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout9.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout4.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!i¢_!Ç,ppt/slideMasters/_rels/slideMaster1.xml.relsÄÕÝjà ðûÁÞAÎýb’¶é5½ƒÂ®F÷O>X¢¢v,o?) (ŽBÀ›€Šçüø+æxúzòÆvJ2È’ÊJ‰N6 >/o/; Öq)x¯$2Ñ©|~:~`ÏßdÛN[â«HË uN(µU‹·‰Ò(ýJ­ÌÀš†j^}ñiž¦5ÓPÎj’³``ÎÂ÷¿ŒÚwþ¿¶ªë®ÂWU]”îN jûNà;ÕÕù²Ü4è$ÉtÞN»ÄóÞ—­bÊV!Ù6¦l’eù’4ç¯Îò6Coß,äX”ñè­ÊC²lÉ€•3+bÊŠ`fqC ¦¶‰™Ú&˜šëã=­Y²­cÒÖ!Ù>¦lÿ'£³ßoù ÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout3.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout1.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout5.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!=˜¢†* "ppt/slideLayouts/slideLayout11.xml´VÛnã6}/Ð ÔgE¢n–ŒØ [±‹Ù$¨½}çJt,,%ª$íµ[,°¿Õ~Î~I‡”è4q’:›ôE¶å™Ã™s†3sþnW3´¥BV¼9øÌwm ^VÍíÈù°œ»©ƒ¤"MIoèÈÙSé¼ÿøÃy;”¬¼${¾Q09$#g­T;ô'C`íFˆ¸×Op"CÝËâîm±¾~ĶXϱöìÁáPпí2:N'°é< Òë|`\òâ“D ‡„5]žÅÕÖ¢êäõ9íuš(­‡ƒ¸¨@¹N¢Þ«354Yoi¨¶ñŠ‚(ôÀ:‚?‰ãû\á'Y4jÆÂ( qšC,ÒA·Cµ›òr¯™þŸ ¨.š‘C‰N¾ƒeR-ÔžQ£°F†<À˜}Ñhã~Xt¶jœ³ªø„G´¬zO¤¢™¬á&Ê9è¡  <±a˜È4aOËË£‹ä†‘‚®9+á¸@õmuø.¥4„‚j‡R´2Ÿ.XØZ¯0 2?þõ‚2BlË—êåúi†|òýŒˆð°§‚ž¯’-8ôF·”€h}q¹®Äé€aW®Ï1ç¡Ö'‡€X­ž|Ù-ˆì-¸ ŠÞ+~“Úk‹¿T08ÿ€!DØÊéËÞtdˆò‰º7WÎÞcÛNLÏ8n +@9Bì‡A'B.vaxí™ù~ËÏ© †sRqVÀrc Ì2ò"Î4â‚‚¶{; 7Ђ%ü9Djw‚uÒ=UÇ´Â. Ö±;ñ=Ÿf-Wò|„fÃ5<ì*¦Ž§7sCr‡’‘ް ïO#n+*N zªž""ã;¡ª“S O@¤å€ÏkhÅzy QSÚÏj´Pp±|“Ƭ´ê4ÎeŽ·6óòÒs^‚Ak‡ý{åOæÁh¹«QºrÃ(õÝd:ñ]? Âñ$ô£ K¾8ƒÙPª¢5ÉèíNë¶ñc»@²V)#.ÌÁkÕrêùÜFþì^k‚žMšâ üîØs^b!»+çÚž¾÷#ŸÝ—R‰~cþÚa+ؽy‰u_=6‹×edjÙ0Ztµ«?üÀËä5<º€~”ã¯,ÛuèÓp¹ëÕsWÙtâf“ Ó$Z¥Áú $Þúaœ bZ±?Š¡%„Á£6®¦¹à’—ê,çµ×÷ƒ^Ë?ÑrjZB4ô•†i<žù£Ù|@¾¥1›- é~Î\»L¼Åíuîƒcè`Aÿ©j¡g5ëÐû]»í—ÿÿÿPK!ÒAô¹ !ppt/slideLayouts/slideLayout2.xml¬VÑr›8}ß™þƒ†}&6fbw 1;;“&™:ýDP+V’]»Îô·ºŸÓ/Ù+IÛd3NêlÄÕѽGGG÷ôõ®ahK¤¢¼;þÉÈA¤-xIÛÛ¹óî:wc)Û3Þ’¹³'Êy½xõÇ©H+Ïñžo4ŒV%xîÔZ‹ÄóTQ“«.H ß*.¬áUÞz¥Ä»aÞx4šx ¦­ÓÏ—‡ÌçUE rÆ‹MCZÝH°†üUM…ÐÄ!hB0vöÏ)é½€jùÍ{Ù ¹…WßY@ÝÅš•¨Å \SÍvPÆ[ H6@‰kIˆ m·I±WÒλØ^IDKƒÓÏw¼þCf_[ƒ?Þ/Óo$œì*Ù,Nqd ÝÜ=Û›'L ÙiTtƒÅýhQ_>[Ô«G¢½aÈànQØnÑUô°œñPNG‡WUŠaê9/>(Ôr¨Ó”ß•W\l0S³5ê˜×†Ù>®ûhùâpjÉÒ»”—{Sø üÚAœ0¥×zψ%ÒÆ €ÃègØ›´î»µAlj^dŒ戔T£7Xi"‘]”(§@ˆ†ý°(ð@ÈeXþvÌü??ÁÀO/tÅpAjÎJXhlÒQ \<“-ZÂ^„(à±-»“Óó‰3´¼©Gˆ³ìÁcXÅfþôö¬IÁá€1²%ìDËçÓˆ×5•‡Nž""ç©ëƒS @¤Õ€Ï“_8Èï kò“öli/×^wRK 7Ä'p[Ì*ìÍèÑz‘=°æXÛ?/=¹˜­ñÌÏK?š£qì.GÙÒ ãÌwÓIä»~„ã(ôã O¿8½}”Pª¦ ÉéíF’Ë1懀T£3F0Ü|½{êÅÄó¸Vüé½Ö 3›´å–øíCy‰)DîäœÃùѬ@~w_*-»ùgƒ%¬0ìÍÍ⸌LFÖŒ–]lš›_x‰~Ï+;½BÛÐRc½ãȲ]…~0 W±»ZÎb7 ÒÜ]NW+7ž¬fA”ͦÓpy'[e*o!»CÕúýë·?¿ý÷Z…²ïûððswž°íÄFR8i:›Œ³8uS?ÌÝðl6u—ù$ró(Ã,—Y°ú‰ ?L IlOõwÙ÷v0ø kh!¹â•>)xãu'øG"§¶·óG}ƒ¸Åp#AÃû‘?íñ€|!Kk.C¶0dz3{2ù‹Ë-¸N ýgvH@ó ® ½1µÍìâ?ÿÿPK!Àš7¢¶!ppt/slideLayouts/slideLayout1.xmlÌX]nã6~/Ð;ê³"Qÿ/lÇ. d“ Î€‘èXXê§íµ[,°×j³'é %ÆN6ÅfS?øÅ¦¨áð›ofÈ¿ÛV‚l¸ìʦ¾°è™k^çMQÖÖ‡»¹X¤S¬.˜hj~aíxg½ýüÓy›u¢¸b»f­註Œ]X+¥ÚÌqº|Å+Ö5-¯áݲ‘Sð(œB²O »Žçº‘S±²¶†õò5ë›å²Ìùe“¯+^«^‰ä‚)À߭ʶ3ÚÚ×hk%ï@^ý’Úµ`­*•àÑbrÔåùB¤fLÜ¡Yˆ²àúU×ÞIÎQ¨Þü*ÛE{+õŠëÍ­$e†•–3¼Äôc b0pž-0šX¶]ÊjtÎ2 ‚l/,ð×aËøV‘¼ŸÌ÷³ùêæÙ|5{AÚ1‚ÇMÁÕmoÑ·æxÆœžúhU/Ê`éU“ìHÝ€h~o^~½1ÊÐfTß®HÏz®¤Ö6ˆöï5%fI§i5XɃ$ zFhy>õžòy4N=@v¨'.Mõ&FlÒ«n3µ4ÅY½‡í–‰N-ÔNpÍ6pÂ2@?à[Á0cxmXô›ªÑT”ùG¢‹R‘÷¬S\¥¦C-çÀ¶gk-ð €ÙXcA^þ›|ß¿Xß÷zµÁ †Ý7ñß­ï{þ!`!šŒË^ïꦱ—ôŽð’ M`ü$@Cê¹ÚSÚ^zà6 Œu²/6‚B<ŠÉ+e]@Rë!p¬A@Ar‚'××pˆi$_þŽa5¼óRý€'Ÿ I6L@þo1áÁKe­ú™8t]Us(¬è3Œ~øP ½=T? ãX:=¼rÀëïñÆ> 1{N/‚ð{¼axz€å8<D¾‹ØéF”àèpâAnŸ$`D9Ž÷€=šáiæ¢'€­šI‡(ÀéàÔ‹\<ûO/†¥>ªÍ5Žèßv‹ÃyÌ‹<0ù%SœÜ –óU# (|¼ÿï…^((âÿ„‚˜‰%8F_êý%†u¦& ÍO_é]M)òh Õ0–¶i˜ú®—Øcw:¶ƒdJíIR›NýÀ šøóÉgk¨ò 0U•Ÿ—kÉoÖÊBwTþ4ÞPWóº¸e’ÁÍþ¼{Ky¯Ì›K·C¿ÇðËêí˜?ÖLÂÆ7ß©¸~Ä7Çe$2Œè†‡\¯«ûg¼„Çà:KPý"5ºÀÕ½ÀñÂvP? f‰=§‰ø“¹=Žg3;‰f©NÓ8ÆaÛa«Wº×Fë×/ÿòõË?GˆUݘöz½«º‡Vw}kYBþM&iäM“‰=¡ÁÜ.ÓØϣО‡~L'ÉxêÏ>ð–Y.¹n{+†ö&¿i™«2—M×,ÕYÞTNß{;mó‰Ë¶’“Ðzx]/{1 ¢Äõâ¾­ÒØtScЂ Ø<ë#MÈ÷¬½ÙÀ‘Ì2øZñ¥4Lµð}BE÷"h»ùÞ0úÿÿPK!‡’é¡`0!ppt/slideMasters/slideMaster1.xmlì[]nãÈ~;Ìc ÿE #/$µÀ;k¬½h‘-‹q‹dÈ–ÖÞÅs‡Ü ·Hò–£ÌIòUw“’lËkïÌöÚ@¢º‹Åªúªª«Šž·ß\­„µáu“—ÅÈvß8¶Å‹´Ìòâbdÿx>ëŶÕHVdL”Ù×¼±¿9úóŸÞVÃFdß±FòÚ¢²‘½”²öûMºä+Ö¼)+^`oQÖ+&ñ³¾èg5û ¼W¢ï9NÔ_±¼°ÍýõCî/‹<åïÊt½â…ÔLj.˜„üÍ2¯š–[õnUͰQwï‰týÒ3‘Ñ÷üBþÀVž]ÁJŽãÚGoÙPéɧ¢¶6LŒìù…k÷Þöé›+º¹©ÎkÎéªØ|[WgÕiM?Ò›Ó<ÁÒ¶ ¶‚}‰Ú0dêg2Íxïö‹–^-êIóX(^Ó'nbC~%­T/¦ÛÕtùý´éòøê~û¨Ö=”´ÒÝVÇkÕ9Ï¥àÖ©`)_–"ƒ¯() õm°buR¦—U”ЙL¡U…qZƤ?=ªZZòº‚•$±5tz’}£ìÛ ÝYÅÂA¤Mã9n÷ì…±ÅØ'+Å~ UØò©êF~ËË•E#»æ©T~À6'$©Ù°%Qàk9ª¡¼š”Ù5a1Ç7 GÀáþeYÿl[â}ÑŒìšT?” ¶UïîÌ÷v¤˜–ð8ËŠ|Fv*k%K`¯e¹ÈDú‘ôpÑÈ3y-¸Òر!¬Š$Å;/z?ži£È£©ÈÓKK–Ïri™HW†GBÒV*Á…4W*·ªí‡Ä_ñ}7qüäé; ¡ý(ÿ@Yb£M9Íãý… UîÒÜá/ÊiðÑ>Åù¾§œñ´,2Kð à¨<é~??_æõÃú:<îqV®k¹|°ˆÁ8æ‹{ŸuAuï˜ÜÏÌJµÏºL¢^ø¹‰…‰>… ºß}A¹¾glÔždîÀ‰â6S{Ñ`>ƒàÛËÔ*šÚ|¬róF¸L\ 6­e|ñ–Èœ(9µÖ”"Ïf¹Dp£þWº,‘y!uE2é>< ù¹#Ö¿¶|°§Ÿ¤6î$ˆ¾6=K ‘©rå—±&¾ãޱ3÷‚xêö&QèöÜ©xaàÆþlò+Ž3uZgð4™¯ø,¿X×üûµ>4o;V³’SÁÔ7…‹<Šú®ÏlC"8¼ÈNYÍÈ>7ήßs…mPÌÊ’ ÚÝÃHùÞç†Å§³òkVã &4TÈ=*4¼ I|SÄÜžïFÁ96ÚBçéEÇ—õɨõÉ3D<·>¬WóžRd®g¢‹뻜S9þ£œ3ôü÷9ç>qëüé¹f—¸ׂã¸w}üÏÈÖð»mÓŒs ù:Uë:Ù¿L&IäMãIoâ³^ð.ôƳ(ìÍB?¦“x<õ…à• Óš«ÿ}fF X¼5Xåi]6åB¾IËU_ÏúUù¯«*CŽ™W¨n?ðàëèÔ’¶a…l85•ŒJZ\¶#„TÔ߱ʀg»D³£zdg—¸š_x´F½ß®²K\±4ÅTæ¢]Á¾^éhüv͔ނbæ¢] Ûœrz+jWc–"/.a ú²­E)þ¦Ú+c%NØu¹–ï3ƒÄΊ* <7h ƒëfõûL™HnïÞ£ Ñ¿v´¦é;H [u´¦T=H ût´æü>H Ëu´&£¤EñÜÑF·,³¯¬ÝÑ~ƒ8t´ñoÐvhUÙ{}1¼ëøºªªº‡x¸Ö©wLa€—WjˆÐP8ªq€úIÂ”Ž¦†¥sÚB&“öü-’‰$|‡¤{jVñ¼“˜Œ>}$ >ƒd°EÒõbÇ¥næEBy;(a‹§%ág  w Œ‚0Ù;)_NTþï¿·Òë³@’à3HF[$Ñ…¹ê%Ý‹ Ê;òësJÂÏ@9ØÒǰ!x©ùõ™BIø(ã(U#ò e÷ºæ9D%ág L¶Pú®'/¶êy¦QIø©Ùãΰ –rÉënt€FùTnZæÛïͶ$í(Gw§ì/ß½ì4îø[œ§_Yê·¢7÷öoŠ^ísw;ÜŽý^ís Ét’úÌ×Ûˆ­[ù¾h#îîˆt'ûj Yú 7 Ô[é×t z‡uÔ{„WÝ]{ ^-¼&izÁ×Uš»Å%Þtoß Ò›ûöýÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout6.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK!$¸î%!ppt/slideLayouts/slideLayout3.xmlÌXënÛ6þ?`ï h¿‹ºËˆ]ØŽ½H“ N€‘èX(uE»ö†}­íqú$ýHI¶ãf˜›AþØyxøÏG¿ÙäÜX3Qge10É™m¬HÊ4+îæ‡Û™™F-i‘R^l`nYm¾þúËyÕ¯yzI·åJÐQÔ}:0—RVý^¯N–,§õYY±s‹RäTâUÜ÷RA?AwÎ{Žm½œf…Ù®§¬/‹,ae²ÊY!%‚q*¿^fUÝi«NÑV VC^ý’ÜV°¶fÉŒ¦¦¡ÅCÄÂödÎS£ 9æ,Q›J =[W·‚1%W¬Õ¼ºzÑÕúFYª”´‹Í^;ÑŠé×bxè-¿ï4Ñþf!òá9íÃÆf`"h[õ‹E´Ï6ÒHšÁd?š,¯‘M–ÓG¤{Ý@°Ûñ®‹¾7Çé̹Í$gÙYÕˆR,½,“µQ”°S™ß˜—\­;eÊf¥¾Zë¥RÕÊ5“Ú|­}ÚÝyÂÃÈoÜá:. à¡S‡„±åš8Ž"ß×{tаG£¹êË͸L·Ê£wøGàh‘,K$©lTòZÎå–#Ì´ÏלAù=ªˆ# h?e‹÷ªÿ˜.rÝ4îtÜ PÎÛmÛ•ˆ6´h„¯iÁ”pªÊ‘Ö‡y³¹Nx–|4di°4“Æ;ZK& í4Ô+`)…R«…¼¤Èo¸ÇëØóO.·—Ä«@¶x£¼‹õ ý«@¶xã¼±د²ÞÈæ$>nå =¹KÓfýPkW]Xwöú§[»×µö *ÙƒÖî>GkO%î  =KÊH*Ýâ›N¦­öz˜kg5„KŠŽœtŒK7Ò®ýêÍŠ ÞŠDÿ=Bãwm'²FöddyÑ„XãÀ'™¸žã{$rgãÏfË'S˜*³œÍ²û•`×+iªÄ:Ž€Qçr‹k)…=ââ¢A½ßA­fEzCU4=…pù]Tfe©ÈÜ!åòž#. )šÀü¹¢;t±ùþõ#±y^Gæ N̸ZåwG~Ñìýg©(.²Pý¨k4ÕY|δzÄ ¼idMGqdyîxfÂéÔŠ‚iìú“8 ½Ñ.mkeyt§fë×/ÿüöõ˿ϫš#wYœ>—5_®D†úãÀ™DckL¼™å]Ä¡5š¾5ó]Ï›Œ£ÑÄ~ðŠxýD0}Ë~›¶·} ~wCϳD”u¹gI™÷š«~¯*?1Q•àŪíö“&Í®C‚8ôâ@—ð%Ž_ý¯ÑâQÝÔõm…‹w´º^ëƒ'ÿ ߪð9)®D÷"xÛ}Þ~ÿÿPK!Ž4=‚†!ppt/slideLayouts/slideLayout4.xmlìX]nã6~/Ð;ê³"ë×’{a+vQ ›uöŒDÇêR¢JÒN¼Å{­ö8{’)Ññ:^ÛÙæ¥@^…ú8œùf8úÈówE+ÂEÉêåžõ,Dêœe}?°>ÜNíØBBâºÀ”Õd`­‰°Þ þé¼I-.ñš-%µHñÀZHÙ¤Ž#ò©°8c ©áÝœñ Kø—ß;Ç`»¢Ž×ëEN…ËÚêæóSæ³ù¼ÌÉË—©ek„Š%ø/e#Œµæk 'ÌèÙߺ$× D+ØõÝÒ8¾‚×BèùŒ¨Æ Ü>0”±Z‚ýJ4·œªW¿òfÖÜp=ãjuÃQY( ÝLËé^t0ýo 0xpv¦ßK8}œójxŽS`=,HØZýÂ$œ’G‰òv0Í×{°ùb²í˜ÀƒÍ¢ë¦èy8ž ç¶”” wU Å0õ’åªÄ©ÂoÃ˯VƘŠY™o¨£]™êpíK͇Á àT“%ǬX«Àïà¯Ä)r&×”hBÀmœ‚qøú)VUMjûÃLYÇ©f´Ì?"É)J‰Þc! GR‡"”•s DB>´øƒà‹Y[f¾ÏoøéŠÝPœ“£,ä)7 œ /dK|‚"ÇtnAaAÖ µß¡L¼S<^â¹½¶‚?öݤ¥Å”‘öýžïU1yQQ ÛE¢’¡b0”ìÍ…Z𮍫±8-ÈüwH‡r߃6ЙÜÀ£÷ë&ÛX¬¿mc °Ál°5À†Ç°ØèÖÛ?†5ÀÆÇ°Øä¶@úÌ&Q‰Ñ{f"°°é$/ß3ªhô–{öÌî*ºTïÌÉY] JV„ž`Qo¥Ão%?Ý ßî…CDLÙ’ËÅÉ.ê½sØÅi9?`ðe'8Ôytt¯Öy4ùºG«f fºUTC{:OÜïo­ç­õ¤o­g·;þï[OhZÏ–äÅ£{à÷V%;Ú§UJ6ïmAZgÔ(ZêoáĽRêÜ0Û£^6²ƒ8síqº¶›ùnìOÇŸ­N´ª,+2-ï—œ\/ÕqšýŽìD¢’%[f—ÃÈq}8ɸý§Ï¸ f“º¸Á+±´£]DŠF&+SÆ”ÌÝV¢¡úÚý×¼Ì%oóçsXÁèÒ#Âô%¹y]Fú†‘- ‚®–ÕÝ/Ñkð'e0½—š#_ΗP³)ÛIàúQ0‰íÉ(‰íÀOíQ2±ãh’øa–ôûÁhS¶BE^ƒw§Vë×/ÿòõË?¯P«úôdNË /œ´}ˆ]òößxœD^í±Líà"éÛ£iÚÓЂl2òoÜ Í9ÑÇøßŠî:Ÿ]TeΙ`sy–³Êi=Þ°R_'¸½îNb…A »=@ôÛcöMëã-„ îôÖ¡ü=n®WZíÀíÔ¦‡¸ï€<*èDÅnîO†ÿÿÿPK!å§ß•!ppt/slideLayouts/slideLayout5.xmlìY]nã6~/Ð;ê³bSÿ2’,lÇ. d“ ö€‘èX]IT)ÚI¶X`¯ÕgOÒJ´Ùëõ:úм(Ž4ü8œŸÃáù»§<3–LT)/.LrÖ5 VÄ4bêßÄàG§5üA#ÑÞÓLä—ç´Ö0ž.LpÚ3>aí±'iÄõËxý6žßîç£Ò=h°šü]Ö+Ú^Ž­—3MeÆ ²ZU-Jaè5?VFÁa¸üzyñÍRƒáš¾œéª‘«?*{hùJÙT+º²„ã{_›Ãî·«fZÛÄ÷BÇá;Z&tBˆA5…Æ)jà²'Ÿ4r*®U¥E|€?Ñ)÷‹ =åŸÚÅFõ VAÔ÷z™.W?mŠPGãA¨þ6*B¡ ¦³F âÙ ÁA¨î6*B5¨î•t£ÀÆÔ8ÖÙ†E¬ÖÛ€u}§ë¾±X6´Ãu8V[Äj`ƒ5¬M"×Cþ8±Øp0ƒ]¶Ã¶ˆÕÀF°‘íw_ã2ÄRŒ²™ЍpˆºÕ¦¢fÿ!âBŽQ¼U½š¸\M\C^HHÏÜ弎»0¡ç4›Ë‘¹ªFYwà‰2’ÞôN±kÇRr£®"¦õ–ó‚¹ì0 |RÓ£FzÕž³&$ÜQwQ†Í&y!ͬd[Ó–EòXɶh£-‹Q»’mqÁ^ÙV‚ï•meí^ÙV*î•må×^Ùÿ,iÔ–šMm³/5',æEbdlɲiØFTÑ¿¿J™ÎSq8 JÎý€c¾r~°Š.ÙwÓÙÀ«™ahú¹¢’½8½ù¯ãžºU˜HèQ¿<Ç‘ú0‚ç·9Åxºw¶³Å§ÊLužA››¶õá€çtíÐêw‡}Ë ‡Äø±È¸ÉsI茟ͦ™ÀReš³qú°ìv!MU·¶ŒmT¹fŒBï]iŒ->¿Chl“`]±ƒ 8šÉzíâ1ý@èì×Ýë1çØkÜì§ðËLB=»½=4çß“øæ´‰´E&Yš0ãf‘ß·ìžÂ.pqÐ;MóþÃQa;r‰ã»£Ðõ£ÐrÁØê£‘ú£Èñ†Q¸ýUØV¸ò´;4Z¿~ùû—¯_þ9A¬ªFˆ¾8¿® Ý]ªûŒ…H!ÿƒÈ·‡áÀwl¹WQ`õǾg=Çu‡ƒ°?tFŸAñ’¸½X0u«ó[ÒÜ.ÁË­¡<¯øLžÅ<ïÔWK’?2QòTÝ.‘nsEµ¤Ð s\èeh*Ú}AKÕ…×ÚÂ+¼RåT&ÞÓòv©Žçp6T¯J¸þ?¢èZ×®¯Ó.ÿÿÿPK!TÍ Iý!ppt/slideLayouts/slideLayout9.xml¼X[nã6ý/Ð=ê·bQ¤^F’íØELÔ™0 £W%Ú±§`¶Õ.gVÒ{)ѶòÀ8¡?¶D]Þçá%Ï?l²ÔX‹ªNŠüÂ$g¶iˆ<*â$¼0?ÝϬÀ4jÉó˜§E..Ì­¨Í—¿þr^ë4¾æÛb% ÀÈë!¿0—R–ÃÁ Ž–"ãõYQо-Š*ã^«ÇA\ñ'ÀÎÒcÛÞ ãIn¶ó«cæ‹E‰«"Ze"— H%R.Aÿz™”µF+A++QŒšÝUInK°¶L¢ûi(±j ļË£y9Ï`à.‰äªÆS"—Æ„—¨‡’©ËûJ”Î׿Wå¼¼«ÔÔ›õ]e$1Bµæ ýЊ©×Äàaðlú£FâÃÍ¢Ê.Ïù*hùZùT+ºóa”´ñu›±g^a4‰èF\ÏÔ" i Ë¡ÜŒ‹x‹.}€ˆÏ£e™ú€3ø0­å\nSˆ3<¯S<}„RJ! ø0‹?a¨þ{6,ù -ßÉC»8àb>GÀLM9V¢È­OófIy9I“è³! Cĉ4>òZŠÊP¾‚ReP*X@g“´)Ê:tóÛ±¤:–:»ïR‰e‘ưƒj@ è¸Y(,ªRTçÁiñe,¤^Ø8F'}'¼Ô&>äJ¦ô[ñ}3¨¯®U‘%y Œ¡‡Õ ТšujCݬØ&Ê£ƒùÑ@QÏõ=Hˆ£ð€+÷xÒâÑ=žO Úy ñ¤Åc{×5–Juf^U ÔßxzÎ$[cÂf» }k4ó\kæRÆ&ã`4¡Ó¯ xIØ0ª„º=ø#no1`ðÅÍC–DUQ yÙ ¹Â”Å“¨Ê"Q·Än¯BÖ¸”Aƒî3Û£¾Úb•nê §µðBµSiõ‘—·kE¼péù?QC%\³@Qt/‚¶ëk›ËÿÿÿPK!S;dZ0!ppt/slideLayouts/slideLayout8.xmlÄXënÛ6ý?`ï h¿U‹ºY2š¶kÒ4˜Ó`$:Ö¦Û(ÚM6èkmÓ'Ù!%:²âÅJR`l™><ú.äù>òí»»<3vŒ×iYœ™äm¬ˆË$-nÏÌO×K+4ZÐ"¡YY°3óžÕæ»óx[Mê,¹ ÷åVà(ê =37BT“ѨŽ7,§õ›²bþ[—<§?ùí(áô3¸óläØv0ÊiZ˜í|>d~¹^§1{_ÆÛœ¢!á,£ö×›´ª5[5„­â¬š}h’¸¯àmyóÛõi(ßa€˜çð<^e‰QÐó²`0>§bcÌi%íP˜ººæŒIt±û™W«êŠ«©—»+n¤‰¤j)ÌQûG S? Àð0êM¿ÕLtr·æùù[:ADŒ»3‰»—Ÿ˜D'ìNq3?ŒÆ›G°ñfq=Ò/€û—"çUãÑcwíÎu*2f½W ”bêEÿ^E ?¥û{ñåN“IŸ%}µ1šð IÕâš?U<4¾V1Õ†î#áþ8@tá8Ö˜ã‡1q<;|„KF&ô2VAë:ÜWq7+“{Ð|#o´ˆ7%ÖéMC™Õb%î3d™N²]F`A³[l¤ k€N¶þCõŸp7°ñÊí÷ã¹ÃƒÓ €Lͨ܇¬°>­šWŠóy–Æ¿¢4X’ ã­ㆊ6*Œ‘„BÑ‚Ï DÔ´+xlrøß™tu&õÚ¾ÊhÌ6e–àEŽ4;@gí™yM¬Júá)uB„Ïk–¸Êix˜SÏ#OXæÔs"Ç ]‰’Tµaºh3ÙK #ØPvxtÚUØI¶°¬ûK¢.V€õŽ`lÐ`ýSX 68…Õ`ǧ°lx «ÀF§° àØÖÀL {©{þV‘â¨vJ}d«¨ý‚ýµVŸÞ+—EbdlDzŒj=Íx½IùpBµÒŸ&\–[Žú4ÔD¯Ù]O…v™®Ÿ |žàxZp®ejºj£\{¹Ú4UDj7šˆð†fkŤ² ª‰¬9êa¥¥ÔG9ôTY!¶*ÒÓ ƒºâzžMÈ«5ÈÈ)¿Pµ=-´òQšv³½D7¦”«#;„t¥DV#‰Åf‘ ÔR©â¡Ägwùz2Öò]â;ùÂ.]OéZ:bGc'È7îòõÔPóy« ÇøzŠ©ùB'”n Šß_OU[>‡Dž¼„¯§¼šdîÐ|Ø×SgÍ¡î½(ÿ›‚?O{|­=ï©`Ú£DðµÚ“ˆGÊCšÖ@6öG¥»ú¡]ÓçA“¢~¨>qsˆ §swñ†WěĜ© ‡_’öâƒ.+ò4æe]®Å›¸ÌGͭǨ*?3^•©ºø v{{²£è†qŠîT{€{¬ÿ¹ªp3ƒPeŸ.Þ¿›‰PUù9>ð­¶ S!žÛ­E躊lhÕ ”Á·‚Ëkx•k7—øä®+w8ŒÝ—Ìîâå[âyQ”„žq²­)ÓmI+¬¡~µ)…곉·d’*Hc¢ÿ.I ½©0»µ-ã&w`ðì '«*·®Áƨĕ¤´yb»R¬ÄRß‹ÝRZeÞÄv1¶Û}èÜÌ+7xpŸ…¯ûL8ܲ^ÌpXû¹ Jš_Â!Ýk‹´Fòd%›ËW|É&}ÅÛí€ mPµˆ^Âöpΰ¦Ö²Â„nx•SiyÛ( YÎ9¹Uã¹a¢EJ.v}Þ~s’ØX-õ¹†Æû"⪰?ç°†¡ÆÙ<ôñ è6<ê}ÌóCÃÉ ü#+¥WúPQà Âa 6¢üˆ¼ÑÔ '$‘ƒ‚ÄsâñÈs¼ÄGÃò?‹ïì¾(€ªËšfåz+éåVC;àP‚ÀÐpa(s®WPw­“Šb¸Pèxˆò\%¿yW—3?ö6„„ NGÞ–jïhüñáL4+NÈV¬  ®2ò–ÆÈ$t¾¤ÑBR{ ¡*b௺ E¾vÅ‚n§Ó*Rr¯ñWoñ‹E™Óc‘¯*ÊM ¢(#â×ËRêM¾M*ªÆyÿ’ÙJÈÖ”†Ñsζr¦j ‹ØCöùœˆ“ .­rfvGËKE©}ãëÏJÎå…rgë …ÊÂ4Ž^Ðl4fî/3x ^¸ß´H$Ù,T5>$ p6#J¶µOp" Ý”׋ùÓj¾<ßa›/§;¬ƒöˆàñP›UÑëtºm:5ø1«Ú”€ë‰Èo5âò´é×éågëÌæláå=#¾±«7­½NYf“Šbk¿†_·H¦ÍÜlu„@Ø$pxýŒX]Sî_Í-:IÌ8ce~‹Œ@´( :%ÚP…\áAø€r„¨‡C'B,íÁðZ3óo~–Ÿcb(º`$§KÁ 8¥kc)µD¼‹ªÂÀ ýj'lá¾ øØ‰Á1fyý/ê s+ڟ܆nìO:ÙÄâ ûi¿‡}œ…Q·á8œ¥w^S¿R5eEgåÍJÑó•ñvUéÊdŒè<|͸à®5<ñ!XoÊ‹ ¢È××e|OU¢¶*3!lÅŸ×%ÜG]FÕ…ù¶" NhkÓʲÞ/#½–‘9+ ŠÎVÕõ ^¢}ðc wRãîÞe;pئ±? c? Ó™?L§~ÜŸÃ^6 ¢É£lµÍœCtoUëÃý¯O÷¿÷ U×HÚÁ]üDCÓ‘®Ÿ¯T ÷/M‡ýn§~Š£™þdÖïù³^EYO²pzK%¹¢n¦})šÙ ‹¯æaUæJh±0¹¨‚z°R|§JŠÒÍVÜiôš°‘DFƒîaw= ^ˆÒ5—6ZX²Sѵ4¦N‰<_C÷! | €þ3·$aøCÓ³¦O&6÷öcbüÿÿPK!ÕÑ’ñ¾7,ppt/slideLayouts/_rels/slideLayout2.xml.rels„Á Â0Dï‚ÿönÒz‘¦^DðàEô–dÛÛ$d£èß›cÁãì0ovšýkÅ“»à5Ô²AÞë|¯áv=®¶ 8£·8OÞİo—‹æB#æâÁE…âYÃsÜ)Åf  Y†H¾8]Hæ"S¯"š;ö¤ÖUµQi΀ö‹)NVC:ÙÄõKóvè:gèÌc"ŸT(¥3r¦T°˜zʤœßy.jYÞÕ6êknûÿÿPK !N‚·à€€docProps/thumbnail.jpegÿØÿàJFIF``ÿÛCÿÛCÿÀ°"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?þþ+ä/öìýšµ?ˆþÉâ?ˆÞñwÁK^|A<ýž¿h¯‡¶²øi£é¾"ñµÿ…¾ xÿáO†¼ñÃDðÞ· x”ß|8ñ?‹-5 ø“à Ҧ¾ÑüK¡^ê_WÍ^=ý‘¾|Gñ·Ä-{Køƒ¤xÚÓ_ñ‰“Äÿ~9üuøA«Íªø³áÿ„þëÿnºøOñ#ÁO©i·Þ ð'ƒ¬ÓBÔ>Õ¡YjþÒ|Y§é¶¾.µMr±­õgYaÝUá§<«Fr§O*øeNµhBQ•l5,7×%<59Ыˆ¯õhG…§íjÒt9£íÕWVœ§ì¥)QŠ›«F<ñjk?g x—í#†\õ%…Åû´/ºÿ‚þȶ>Ñ#~Òþj~ñoŽ< q¨|i¹Õ> x?\ñ7ÃOñÄ«/ü@ø«¦x?Àm~iz®žÞ:Ö~ø“Äú'„u £kúŽŸ¬¤ºzrº7üçö#ðç€ô?†~ø_ãø3CÔæÔÛNпh?ÚCG¾ñDWúU–‹âüIññrÛÄŸ< ã{ 7N>üNÕü]à‰·–6šŸÄ ø—S‚+Å‹â‡ü×ö%øÍuñ¢ûâW߈^$½ý¡îoßã%ßü4¿íE£ÜxÛIÔ¼/uà¹üs6ƒñ›K“Jøc†o.4­7áF€ÚOÃ=7['ÂvWqCq˜‡>|t°‹§Ë˜fÒÄTqš“–]ý”ñØŠT¤œiÅfë0 ,]iK.xiPPÄ©åCàËÖ%þòÔiR„o/aX©eôjII¥‰yeJÄWMІ>•Iª•põ¨û§Ã?Û+öIøÍâ¦ð'ÂoÚgà?Ä_nøßÃPø7Áß¼¯x®û[økkáûïˆV:W‡týj}_WoYx³Â÷ž'ŸK³»µÑm9è8ýžcñF¯k>‘k`|7'Ço |:MwIñ}ηgmðÛÄzS]øwâÄÄ? µ_Káí}tÜï‡_ðK¿ØcáGÆï…Ÿ´o¾ ]éß> xS[ð7Âê>5ø¦?øGÄ~·ð†³áý Ã^,ø®xF:óD·uòeÐf6Ú¶£®øŽÑ ñˆµíWRó¯ÿÁÿàŸü3aàÿ|ñ狼=¥øÎÓÇZu–¿ûPþÖ:œ¶Z¦™w£ê:…o¨]|q“RO†þÕt'X𗵟„þÖ­N³á¯ézÍÝÜúÏÙ©àýŸ´•>J+0æPUE›á#‰©‚´¹%d+^… D áœK „©‰ž ±³ÅÿÂ~[øÁ_þ[/ßXøZïBÇö¥·ˆï-tI­SS¸†Õýá‡í3û8|nñ‰ü%ð_öø#ñwÅ^ Š ügំ¼ ãïxF «»­>ÚoèÞ×µmG@ŠâþÆöÊ 5[kDšîÎêÚ2Ó[ʉùñðÿþ•ûxcàf©û?|F‹ãoíà­Wâ-—ÄkCãÆéž({­ â«ñSÁÞ»Õ>Éðn×[ð_¼{­êž ðÎâM7Z%“M³Ö5 cNð×…lô?¼>þÊ¿>kš÷ÂÿÂ+«_ØÉ¦ÝÝÿÂQã=sͲ—Ãß ü+$>G‰zQÍ'›añÒ”W&޶xš•kBžµî±èáµÃB½åõkûµ«QŽ;O,MnQ£í2õƒÄ`§ Ó—Ö'ZŽ+F*3_BÑE (¢Š(¢Š(¢Š(¢Š(¢Š(¢Šù+ãßí)ãO~$E‹övø­ñƒÀ‰¢økP¼Õ~ xsÆž>øöµ¨øÇOÕml¼ §x |-gá±¢x^îõÅ;_\ÚxªââßÂBßD·›^ù·Ä_ðUß„>ð§Ä-SâgÀ¯Ú“á¯Ä/ xÖ|/øã‡>ðÏÇßÚÿY‹Jðn¯â+ÏØŸá~½ãý/Ä_´–àûÙ'‰d𕵾³c>™«[ K˜¬à½ýG¯œ?hÞ7ø*š©á¿‚^0øË¡\i^#ÔüIkðöÛźώldÑ5O[Ùé~ð¾…àèZi牵kX|São‡ÐI?…cÒ´ëVm^â} TŽ ¾&«t(QÅÏù”£õÕŒ§V. ^ÎXl¾L¹GÙÕUý§ÖeŠäF°ƒ¯ˆQ§âÏ 4c5Ï%\5Hº•.ÚÅãªPÆÔ¼¡ì•…£*Tª¹ÃãÉÿà¨wºW„ñ&.Ÿ¦^ÙAÕýþ Áð7Ç>7×|9ð_áí3ûDü?ðö¤_ß~Ò³÷ß üVý–î5»Í.ÿWñ€ôŽ~ø7„5¿|?‚ÄXøçÃúL÷‡Kñ¡¥xBÂëUñn¡ˆÚ‡þ ‰ðƒÃ§Ç’üjøIûAþËš/…|á?xCÆ¿µ'4‚øÛã/ÁâëÏ üø)âø¦ ¿~Ð×6~¸“QøC¦hßð’Ú\jštzÌ##¾ÿÁEåÖôoü)ñ®·w¦|ñ…÷5ñNë[¶:€uéß >$x£\ø ÿįkÿ<ãÙëš*꞊þkË-bœ&éTr«5õ|¹Fœy,Û|1ºATU%Ž–S™M`iÂ5!R8e„¬áˆÃSÆs©^Š’qææž;ÚN2T¥–ÔÄåu)ÇÙóB|”©c(á-UILjH2êß¼-û~Ü¿üYk?…cÒ>%x/à6½{û4k¾#ð–·âûÝNOŽš)ñ%–—káˆô)¼#®ÙÜxb]z/kÐàÑfÑõké·uŸÛÏÅéÆ8<-ûþܺޱðsÆ7þ¹‡ZøW០è`Ò`ðíÿоkÒxçVˆÞ½ƒÇéþÔ|)¥jÛšÿƒü]i4zV‡£]ø–,ߎðP{á7Åëÿ~ý†¿n_‹~.‰¼#ý•ñÁ|Gyû4j¶þ&ð~³ãýBOŽšdZä]¯…—C›Âí•÷„ÄpøûXðÆ†ž:V­uâ--ÃJxmûJŸS¥R­hÚØÿ­S©ŒÃâi(Þ)K *-Ò¤êGÙQ­9S„å)QÒ+\\µprÅ*>Ñ¥ #ÀÏ …Å©Î*Ÿ¶|j°ñÏÁÍ7ã6£ðïã'ëÛ]^ê÷á÷~xª×âþ‹ý¯j>ž ÿ†^²ñ'Šnn/¦Ó›TѡѬµI5}÷MÖ¬Ñì¼ÞV4/¾ðìþ)Mß³í¸Ó-þÑæ[K»ápò#ßjú/߈ õ­n÷Þ$ñ&ƒáoÆšŸ†¼Gàÿi¶Úïu‰¼'á¿kº$–z÷|?¨ÚxW·Ô|A êÍ¢iZ祄£†©B¤ªR«Z­7Rnu4Õ t”å5F¶ ¿µä´å'N³Ÿ$dÝÆ£ó%Zºú¿%x*uiQJ½\JŠ¥Z’Q‹“§Š¡ì[ÅF£ÆrKÚ95Mnèß´oýwâ?‡~Ùéß­|QâŸÉã}'û{àçÅO é©£E{yc"k7ž%ðŽ’|5z’ÙMºC¤ÆK;C7ö†£§ÙÝ{ÍyÄŒºõ›iºŠ>!üGÕôóªé<§A¨ëƒI7-e»âOR¼Ò|+àKz’Ú[ëþ5ñ§jV÷vZDº–¡i5šÞø9⟉>3ð&™âŠß íþx¾öK‘qà¸|_gãYlí"“˵¼»Õl4Í6ÎÞãQUk±¥ÇöÙ4ûy †îðÞý¢ÞßLf ØjXêJ˜<+*|¸Ìà [‰©Q×k†Ã{,&xG^ÎUia«aéÖ„”± U#J/ ŠX©„­ˆ†+Ióa°XŠxz„h§B½i‰¡O5Oiu+Ò­:SN4Z„ªKÔh¢ŠòD(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š+Ë~-øûÄ ¼9mâ}ÀZÏÄ+;+ÝBçÅZO†¢×uYxSFð§‰|K©_øGÃ^ð¿‰õx¶êçC±ð÷†¼ :žŠ*Ð|5wã]Æð|`°û~‹âK¦øwR²ñ=Ƨ¢tvßðQ¯oÀZ©ÿËÿ‚™h—ß¼a§x[C¸¹øKð YÑ4;SÒu-Z/ø÷Äžý¦¼Ká߆^¶M5¬5ñTðÏŠtÝZ÷MÓï|/ ×± èæ„ýŒáZs–+1K›J™ncRx\«)OX}F¶# ]U÷kâðô¡‰ÄB:Ó®øå&©by¬¨<5:ª›ŸÕ±yn–c™bãÞ5}¦ð)©P£Z¬°ôœ±ãø§þ £ðßÂ^ øŸwâ߃¾ü`ðω®< ðSàOíá߆ÿkÿÚø{Âzæ£/ì£àï ÚüMøµñãÁ¾“Æ:mŒu… |gâý ìµskð÷Wº¶´°¿õ?~Ý:5-SD½ý‹nOê/ÄÝ;áMæ¡â/ÐéÞÕ5mCÂ:‰×Æþñ¡â­>}kàúÞë­á6ø•{¤hºm‰4mj ~ËB³±’ò½[ö~ý¤µ_Úá·~%Cû?|{ø;oáxÛÂÞðGÇÏj¿ ¾&xæÏÁq­´~,´ð^¯·ºW†üe«E{ÿ=Ô³_\kþËÖ¯-´­CPºðö—í)¬D–qk¿~5Ísuá©|F×ÞøãMsÈ-—FŽçEøãÂß ü_¼÷z¥ÊiúN©àm.öþËH¿¾ÀUmvW“æxØÕ•*Kì¨e´*/i‡Âòb('ˆÄâU9ÕG<Ö… TkQ¼éaÒƒÁÇRŒÕ|sǃœ!Z«Â?¬æŠw§Wå­¬ 0êp§(AeuñX*tªÉIâ+)ÕļF¯²¡ã¾ý»|YñOðv«áߨ[öÚðÕ‡ˆ>+Úü4×ßâ÷­'áµ÷ƒtÉþ x¿áìŸ5¯Š|MâGÁqIáh|v5?Cm3þ‡ˆ4?ÜêVšž§¥øsQá¼iÿ*×´‹.øEá¯ø'çü+ÅWþñWŒ´¯xúOÙË_Ò¾ëþðEdžá¸ñGŸ‰Sø‡Dø“qãh¼J·_ 4+_ìøHáðï‹Äš¯‚n4›HuO¦¸°Óµïƒß­õÍrÇÇWÞÐ ðß…çÖüj>x+Rñ¦¯gàí!üi«­jÚ’érøÞkOêúåΟ'ö=¶yº>uÿ‡ƒ|@_x/ÃÍû~Õ’¿Š4üKÕu‹_„Ÿχü!ðòK†|5­j÷ß 4ëøj?ˆëD}à:ü¦FÞ%}_ãÜ áû#â. N—<>'DòzØ•VQ§?¬O àpÙ”'‡o ©`³³2¨°¼Üþ±†ÆT”hS”zibpø§‰­‡ÖšÆûE9'‡XIW¯‰ÃòÕÖ*T¯‡Äàáõ™^›ö8j˜Zmâåß_xٵߌŸ³¦«}á|Pø®|Bøck¯èúúxÍø½ðÒ]oD¶×ÓPøw¨Øj×ñøÏK‚WÑµÏ ZÛÿÂMi¨ý»MÐoôßçꖟü'ø£ð?áÝΕâ_ê·ÇÆÏ‰:nƒƒÄŠ_±íɨ\éðKok²|)áMöfÑüàïÏl’ë7ºˆu«x¬¬_†%Eàꡃ¯‰…J´Õ%N”éS©R¶' †‚uQÒ‚–&­%)MQ«$¢ÛQ§);%sž¶* Ó§QÔs©“„)P¯^N5R\´)ÔqŒ]Zi¹$¯8¥vì}ExÄ¿|qÚ6~Íÿ'ò8í?fÿù#]?+]ýžÛ4ÃççÆþwǨvøu|˜÷ZÝý—Å¿éPmð³m¹û>¿ÙØùùÿæYÖßõýåé­þ[?¯PþLgþ³?ú†òü»«û=ãüQñÄhÙû7ühŸÈñè‘ùZïìð>Ù¦?>0·ó¾=C·Ã«äǺÖïì¾-ÿJƒo…›mÏÙÉ~(øâ?´lý›þ4OäxtHü­wöxlÓŸŸ[ùß¡ÛáÕòcÝkwö_ÿ¥A·ÂͶçìçöv#þ~`ðé–u·ýEÿyzk†V>½Cù1ŸønÌ<ÿêËòî¯ìôWŒKñGÇý£gìßñ¢#Äk¢Gåk¿³Àûf˜|üøÂßÎøõ߯“ë[¿²ø·ý* ¾m·?g%ø£ãˆþѳöoøÑ?‘â5Ñ#òµßÙà}³L>~|aoç|z‡o‡WÉu­ßÙ|[þ•ß 6ÛŸ³ŸÙØùùÿæYÖßõýåé­þXúõäÆá»0óÿ¨o/˺¿³Ñ^1/ÅGöŸ³Ɖü®‰•®þÏíšaóóã ;ãÔ;|:¾L{­nþËâßô¨6øY¶ÜýŸçÿÚoö€ø‹àÿ†Wñé? ~&|,Õ•L ©ˆ« QÚ8òó8ÞnEZÓPŒ¹å TªUj2P§9®S Vm…Âáëb*CÉFœ¦×ÔqæåNÑS«B(¹µÊ¥R¤)¦âç8ÅósÑ_?~=ükðÿÄ?J[OŠ?´ ‡‹­ÞÓTðm·ˆ|&·áûoøjòTñ–ƒqãýgÁZEºË{c£é>"¶½ñ¶‘¥ÝÏ­ÿiAa}âKˆ"¿ý»ø£ã‹oíŸ'öoøÑ¨f[ésÙ}“]ýžþ)u²ý®ÏFûÇ«/"çCûDßÚâì+I¾Ãuý‰u¬o²ûg^mÃ8Ì« <ñ}UV:Ôê}†n3Ÿ²’•]z5©òÖæ4à£8BU£'N50ËóÌ6aBu£GMÓ«*S‡Õ15Ò”aíW-L=*´§ÍMÆVŒœ£)*rJrŠ—³Ñ^1wñGÇßÛ>Oìßñ£PþÌ·Òç²û&»û<'ü$Rêeû]žöÿV^E·ö‰¿µÄØV“}†ëûëXßeöÏÄ_ø*¿í¥ûBèWÇ> о0~Í^+ñ7ƈµÿ_MðÏŠ¼i§ü/ºøge¢?ƒ|UàßÜø‡IЮ¤ñåÝÖ·}¦Ë¦A©]Zi°xwÄ~"ÐÅõÔûp÷æ\Gš`ò¼%l¾L]NOm<ÇV4’¡,D§*8jõ±2µ(ËݧJOž2„¹:®ç\IÉ2üNa‰§œ0ðçöqÁb©ºÕÕ­FÞ¤£¬êE8µ(ósAKöKâïÅ/Zøã¿þ é>¾ø¡â­ Tñ޵⮡sào…´»¨´ƒâÝ{Eѯt½oÆÖ·â«}ÂÓuŸ qí|C©j*дÿNטW jm>Õ´/Ú£OÖüGI“ÃÞ7ø!àÃðÒõ£Ï™aö?_xoâ• ​¨ˆZÔÚtîןaÔ¡A¦?ñógãŸÚþm'UøÇ§ü[ý°¥ÐÏØ<®|T³øÍûA¾’²$¾Õô¿ j¾8‡ÅÆÏþ%rø‡RÔì4½Sý MrúöÞÖ&Ôî%ŸþKöÿ£§ýª?ñ&>:ÿóÀ¯ØéxF1¥„θrR¢Õ ã\7,^|UN0•YW(ª´êT© rµ)ÉFªŒ¶ŠŒ`æäà£E{•ç?<}{ðÇÀ:ßtïxßâmö•.‹miேzRk^*Õg×5í3@Š{kž:^Œú ×xR°±ø·ðköŒø/mâo‡gÆ_õ_Š¿ì<§|DñõÌZT~ý–<u¯x–Æ~Ø;Õ.uÛ?‡Ÿü7‰µ¯Úø_TÔ´}VXÌPWåµ1TiT…)¹ª•EN*i{GK ŠÆÎ4ån3’Ãàëµ·)VöX)b±XZ5¿@§‡«V©Fœÿ¼¦¥S†ÂÆNšš‡¶ÅÑR©ËÉNŸµ¯RQ¡‡ÄT¥ú1E~^|?ÿ‚£øsÇ1êZ¦­ûþÞß<ᤴ¿ñçÄÿ|ðkáwß Dúoü&>0ñ§Ž¼qñsKÐôÿ|-µ¸×/¾'5Ƨ«øRxº t›FÇO±Õ=ÁßðPŸü@“Ä÷> øûOxÂv:²é¿ þ$é¿ t¾þÒ—6zÖ§¤xŸörñÑñÂè?<â=E> ðÇŠaºÒôøoQÓ¼G¤ÜÝhfúþÇ£[Â)JS©J¥jt¡NµHS’§ûº0R«Ruª9RÂÓ„%SZŽ&–êaq1¥Î§ Ô¿-*uaFu§ztaRPö­J¬ÔiÆ4hòÖÅTrTðt*Q­Š•U©N~Q^/ð#ã×Ç]xÂóàÿÆ‚6~$Ö|1qàŸŽþÒ$xÏÃÐOñOÄöÎ2“øៈ­¤±ð]”œ4^!ø¯¦Ýê퇅~›i­µ¡è`ðXš©b£R8<=Šøúó4«C–j4çN3­[ÆjŽlLcûßf©ÆS'B›ú¼¡,Mjm`èÂ5jΜ¯*‘œ£J•kW:T¿wí9Ú‹³¥ü5ý™ÿeëI~ =¿…þ-ž‰ÿ£xçÇ/Õ5-Wû"}J}hèQx£Çzî­¬]M©j,ŽÖpßͨjæÃF°d»‡EÑml¬§í 'ˆØ'Â߃¿¾$BãåןÂöß <"ƒønF·ñ‹Sð æ³§3T½ð^‹âÑ6ñ-¼S[¤óûàÏÙóᧃõÈ|cq§ê>:ø‰È«ñ+â^«uãŸ@&ÛçE¢êšÑš×ÁöŒI¢ø"ÃÃZòÑ—KW·Wf+‚©UÖ¯,~y‹jÒÅfxŠ´¨Ë§#£N­LmXÇYSªó;—2çÂÂÎ2åÃá1P¦©RŽ)Ã'xáð)Ô«ý¯k:tð´å%e:kY'w4Ó_>Å«þÔz³£/>x&Õ¤RQø•ãê«n^›­+Nøià}6ÚðFÓ†·µñ6©l$Š·ò,ïöoç»þ !¢þЖºßìÝ©üpÕþkö)}ûIØx:÷á·…üK Ûéº^¥wð"ûOÓüOq®ëÚÔjÚ„N¡.“cd±Ém§h·²ÞjzÝÔ³>Ÿý2xÛǾøs£G¯xÏ[·Ñ4ëBÏG°ÕkZ‹2iÚƒ£i¶÷šÇˆ5ÝA£“ì:.‰aªÞ¦kkI) ü±ñöuŸöÊÑtüzÐï| ðËÂ!ñuŸÃ+m[@ñ£ñ&ßÃWZzø~ëâ5í¥¶¡£èzEý¹ñD3x;ÃºŽµxÖš¾‹«Üx·KÕôùô8>§‚x†Ÿç¹vy‰Ërü.W…­[ÚT’ÄNøZôg ¾®&¦+VªuàªÆ„¥Nš©N8©Ð£QLùþ*É'œåܦ†;ˆÇâ)Söp•H*ÿh£V3ÆR¡ >6¨ÍÒ•eÍÂ£ÃÆµX8ÉoÃÚ3YøWmáöÑüàMWÄ>–ê'Æš¥÷Å ;ÅVÚ æ©&»/†í®|ñ+šfm½4ÚÖŸâM#JÓ¾ iŒ‰6“ã+´±Ž×ßn?ࣿ'ÐÓÃÃÀ? -´ÔÕ¼-¬«ÚÛ|QƒX·½ðˆ¼Sâ6]+Ä«ñPø“×/ªxÃY•õO êÚ6·e4¿Ú:&§¤ëWŽ©}ýAÿà ~ÄŸôg?²¿þ#ßÂOþdk矄°·ì ~'þÒɯþÎß³¯Š´›?‰>²ðÿ‡µoÙkàæ‘¥x*)¾x3^m;Â:„Zf§.«¡ÝišöŠ5=–Xø£SKFmff¨Tñk„³o­ã1œ!ˆ«Wõ|Æ1¯˜Ôœ§Z†¥ABŒ¨Q ø…‰NnŒ•GjÕœeùý/ ø,ö8\Ò¥Oõ¼YQÀÂ¥ˆËêC«JUUj«…ÂÃ.Oi?e 0—-0äþGügâ›ßø³Å~5Õãµ¶Ô|Wâ-wÅ:¤V¯zÖV÷ºî¥u«^Çm&§{¨ê-k÷R¬/¨j7צ%V»½ºŸÌÿ«ßØ'áßìýñgöRø þø³ñ'Ä~*ðŸÁOƒþøŸáïþØ¿´%‚|>ñí·Ãí ÁúÏüñžÃJøq{¥j¶º”> ‹CÐ-4HlΟ¦iVÛÅ¿ªÁ6¿fß|YñÇþÏ_×ì/t¿|QÔu &ÃZ ý¥>YªxsÇ ¥j6shŸ4ë>!ø<ßZ_ã?Ý]øGÄ?â‰X¼÷.áßõK‰ÃåÙZ”³XPÇV£Ž¥Øj©a(S‡±„烫MÚUê{ m/÷ZëP?Oð‡Ãž£â¬'ç²Àg™½*1á<ʾ_CÃÚ±Ó­‰©ÄsQÄfLc„œ¡K–añ²¬z¢ó L¶¥LfØá—~ÐÍûEâ_þÖŸüû(ÿ†]øiÿC7íÿ‰ûZóì«ß~?hnµ¿k:©ðËãG‚mí$ø‰ðkųZ·‰¼;Û¼~"Ðïíéž<øq­ÜC:xcâ/…äºÐ5f†ãM½þÆñF®xoH÷Êü· Ĺ–2Œk᳼ʭ)]),v22Œá.YÓ©Nu#RjS‹§ZX­•:°„àâ¾»;àÙpÞe_(β ‡Tª:rÂà«R­‡ÄR†#Ábðê¶0ËqøZ”q™ng€¯‰ËójÜ'…­F´þuÿ†]øiÿC7íÿ‰ûZóì£þwá§ý ß´Wþ%ÿíiÿϲ¾Š¢º?¶ó¯úæŸø_‹ÿå¾Kî<Ÿì¬¯þ…¸ü#Ãÿò¿%÷:ÿÃ.ü4ÿ¡›öŠÿÄ¿ý­?ùöW;ãÙ»áÖá/êðxŸöŠé~ÖõOü5ïía&%±Ó.®c;&øÕ$/óÄ>IQãnŽŒ¤ƒõepŸî¯Ãˆ×L¥ÖÛÀž/”pXCáýBB ž`¸ñ“[asœæxœ<m™µ:ôb××ñZ©TŠkø½V†Uò¼®4+Kû;¹iT•þ§‡Ó– ßø},ŸÉÏìóÍ¿À_‚É{¨jzµóü+ð Íþ§¬êú¦½ªj…ß…´»«ëËÝ_Z»¾Õ/f¹»šiL·wRº«,i²$HרkÌ>ÀÖ¿>Z¹ öß <2çk4>Òcf\€pJ’2ÇQ^Ÿ\9Œ¹³ |·æÆbûÞ¼ÙÕ\¸,{apëî£QEqAEPEP^1û;]}·àg»¿í};^ûG‚ôi¶t#ûLÔ÷[ƒö»û7GþÌ·›ïGiý—aä—ìÑô¯g¯ý®¾Ûð3á]ßö¾¯}£Áz4¿Û:F‘ý¦j{­Áû]Ž‹ý›£ÿf[Í÷£´þ˰òGËöhúW}5ÿ ˜·m±ùr¿.×Ãæšs{7kÚöö°æµý^^jü+Ô$6w’é÷*­aãï‰vëcâ/ÎðÅ}¥éãÃÞ,ÑøföóWôpXzNq¸µ'ƒÃJtàùg‹ÄÔRtp”å«‚”aR¥zÖµåkש‡§W‹^¢<.—ë5Ô¤§%Í =8ª¸™ÇNw8S£J÷«Zq½¨ÂµJw¼ðŸ\×üA¦|Wøé-†½ñÅÚóÁÞ °™ï~üŽâ‹ìÞ†h _xÜÛË%¶»ñ;Uµ]ZèËuaák_ øry4«Ÿ¢(®gÆ>2ðÇÃÿ j¾0ñ–±k øsEŠ5 NïÍd®® °±µ‚ÞÞ9®ïµKQº´Ó4­2ÂÞçQÕu;»M7Nµº¾º··“:øŒVc^”y\æÜ0øL&›öt£)Úž BÍ'9é©T­Vr©RU+Tœçt¨ÐÀÑ©.e®jØœMi®z’ŒW=|EiY6¡y>XS§ ¡G¦¯ñÅ ËínãÀß 4vñ‡‹>Ç­¥ïŠ6—ágÃý_L†d‡OøâK;¨æmj]Aa¶>ðÂj¾1nmou›èi⩬?>'_y×O®|'ð—¯è:®Œ,/,G޾%höMwiâ+Sðüóü:ðæ¡~ÚB"åñΡ§ÛjÚ_ˆàð‹ÝK¦·¨xWÂ~ð6ƒ§x[Á¾Ò<1áÍ&&‡NÑt; m7M´G‘æ”Åkkq n'’K‹™ÙZk«™e¹¸’Yå’FÕSÃ`®ñ˜¼U¢á†„ù°ôyàÚ–*µ9Z¥ZwƒXZ2”T¹¡Š« Ò©…žnuñVT9°ø{¾jó‡-z¼²Š¶œ×¹NiN.½X©8ÚXzrŒáˆ!à߆vú³wãoj÷¾-ø‹¬é.™­ø‚âãX·Ðm†•¦Ãi< ðmö·­i~Òµ+á}¬^Xé“Ü^]_jw?Ú­ü1ÚGmêQ\uñ±3ö•¦êIFì£ tâ£N8E(S§N)FáÂIF)huR£N„9)AB<Ò›µÛ”æÜ§9É·)ÎrnSœ›”›nM°¯ž>øÛ¾"ø›ûDé:/ÛÄwúÄ/ ܾ.­§^ÚèÖáÃ+'>‚ÓWÔ&o IªÁ|/ï ž™ xÔø£O0Ksi5Ýηí'¥üAÖþ|BÑþAö¿êšU¥…¥{(gÔ4k­cM‡ÅúmŒúŒöÖvÚž£à÷׬t«©îmŶ¥qkp“Ã$i"þ>~ÎÖêß¾Gð‡ì67ö>1µÓåÖ¼9á¤Ôl4xSPÒ5Š^Õoltù`𤗅ËxVæÞöm:K]wÄÞ¶–4º¼¶GûáúY–Kžc§Ó£<2¦ ª,£E|} õpóç¥.V×,”£ ”êBêNiTŒéU¦å·N¬'⛋iIV:ñ䩤ù¢Ô¥ ÂViNH8Ô§4›Jtå$ÚNÍŸüEÒ~ülƒL°ø¥w/ìÝûD|9‡\ñGÃÿi^4ð´~:ð=”vúM÷Ž| âYGöwŒ~kòµ‡‰ü5ã-4ZÉo£øÿÁWcMX®|$ý¥ï#ñ>ðwãÍׄ4ïˆwúž¡ xâ‚/VãàÏÇký¥MCOð– ÷ú›x#â¾MâŸþ'ÕnâM*ò¾¢‡áóŒ #ɳ9FaŒÄBŽ3R3¯”TåÆÓÁ{ tý¤±4q*„èÔÂb«‹ÃÒ©‚…z¸Ì$ý‰ÛƒñIåô'ÀÜm•b8›†²úš™;R–Џj¶#W0–3‡+U§õlFUSëÔÍøkÉ’æ•%šWÀÇ!ϪÇ<Ãþùi>2ð†¿q¥h^*ðÞµ©ÚZýºëNÒuÍ/R¿¶²ûmΛö»‹;;©®!µþѳ¼°ûD‘¬_m´¹µßçÁ,kÒWóÙðoÄÐþ&|Õ|¯øgÁ–ößü?á†ñtUšh‡¬|EáÿøN|«k)gö 7‰´Ëë_Åg¨\é“/Š<_á8Ä/µ8¤þ„뛉ò* Ö¤* à•ßMÂf-Ûl~\¯Ëµðù¦œÞÍÚö½½¬9­gW—šßü(a•÷Á㯽«eÚòûE{_e>[ÛÚSæå«ìôQEpE|ûûIþÓ_ ?e†(øñWÅ:Ni¡hZ¦©¤ø~mJÖßÄ1Ôìí&—Oð熴ùÜ^êšÕòA¥Ú:BÖ¶÷7QI{5½ºÉ*ÿ:§üûöǹÔon4?þÍ65̲iºV¯àoŠ>$Õ4û6b`µ¿×¬¾5x^ÏV»†<,×ÖÞÑ¡Áxì-Ô„¯²ážân.¥ˆ¯’à¡R†P…JøŠô°´œçÌÔ)J«µ’Qn|‰¨+s4åþc>ã ‡†çB–i‹•:Ø…)B•U1aËyT$ýœ[’Qç³–¼©¤íýþѰÂ]oðËà·™‹/Œ,ôŸB£sOðÏÁš>­ñ Ç3¦á/ÅPøgKøu«>m£jž³·Ò¥·Ô¬ímíõ ]o,õ g²›N±ã?ø,í½ã-ãÃûþx> É­î­à|EÐ|M6ŸÊ÷ºU–»«|gñ)ÑU¶YM«é66Úþœ’ý¯EÔôë袸_º©àÇVÃåx5†ÀQ¥J5êb¥,Ã(ÉÅN5k%çSý††<°º½&•¤äßÈÓñG„éÖÇâ^#R¥IQ†+^.xzxJ6ä”al]lc¼µµK»®T¿©oüN‚ vø'J¸ñß‹žýôÝjçM›Eøtÿa·¿‹Rø™©É¨Aÿå´¶×¶w~‹wž-ñ ¼þÐoìíuÛþøgsi©é;ø‹«Ãã?Š–¾¸Ð®5»õÂU½î¯w«ÝÁàßÞkšÖ™áâË5Žu­ù—>&×4½ G]sW¼’+Êaø÷û3|?øÉáŸi £ñíïŽo|Aá!mÍ¢ø×BñÿŠÕu˜µ=AV½¶½·—T‘ïŒí_YWåXçW,¯‹ÊéÒž¶µl:spxºµ°ó«CJu)Êp¥C›žÃP©*U9`ëTĸSœCÂ*xêX|Âu#‰§^,V1RXzt«Bj5! Æ2©[—–Q¯Z©i*P §8H¢Š+È= ¢ŠüÃÿ‚–~Þ^*ý‹¼?ðÇIøuá/x“â/Å©¼gq¢ßxÖ=VïÁþÑ>ÿÂ"šý楤èZ¶«ë7÷W^7ÐmtÍ>Û^Ñ¢u Ë‹ãöHí.ý<Ÿ(ÇçÙž(Ë(ªøìmIS¡I΢Ü)άå*•%B0¥Nu$Ûøb웲|9že„Ê08œËQÑÂa`§Z¢„¦Ò”ãN B ÊRIÂIo%{-OÓÊñ…ÖßgñÇí/öwˆì¾ÛñŸCºûN¶ûôÍ_gìñðËûGÁëöO+Ñ}“û&é>Ѫgź_Šdût~göfüÓÃî?mÏú?eü5ÿú"+‘ðßüöÊð¾³ñ\±Ñf뫯ˆþ.²ñž³¥ð×âÅž›©Xø Á"²Ð!‡ãí´–:Dš?€ô­Fk[©µ ‡×¯õ»Õ¼K[Ëk Ô°þ ñÝ:8øKR¯„…*ifXgÍ5ŽÁWiÚ¢I*tjJòRâ’\Î_ŸWñG„'W(âñMQÄJ¤ßÔq ÑxLU$ÕàÛ|õ`­;6ïdÓþ»¨¯å7Mÿ‚ÞþÙ6ú…œÚÇ‚?f]WJŠâ7¿ÓtÏüSÐ5 ÛPß½·³Ö®þ6ø’ÛL¸uÈŽî}UŽ&Ák)Gý5|ø‘añ“ᯋÚVu¤i~øâF›¤ßI×Ú]‡Ž|1¥øžÏN¼š –êÊßTŽÚâH@‰æ‰Ú1°Šøž(àn"àøa*gxZ4iã¥Vz”qTq”è¨Jp—²“”$£8µÌ¬ÕìôgÕd[’q4±0Êq*ϩʴ*ЫFJ5\”$½¤R’n-;;§ÐôŠ©acªY^i𕦣¦ê³Ù_é÷öÐÞY_Y]DÐ\Ú^Z\$\ÚÜÂï öóFñM´r##mÑ_"›M4Úi¦šºi­SMlÓÙŸHÒi¦“MY¦®š{¦žéŸ:êþÖ|£¤Øø~oŠß|a}•â‡Ôº%Ô ü#{¦Í¦jñx/Ã÷š7—ã‡â&·}Ká½ö£%ö£E¨ZxÏ[ŠM3Àéæ~ñ¡ðÚWŒ~jº§Ç_ÙOT€ÜÙÙhWþ3ø“ðoOŽG†sá,Í{â_ÃmX¦·¿ðÏÚþ*ü:{KÍ'ÃpøÇK‡Nð?„>Ö¯ñ‡|O¡ê:ÏÄ_„W¼g&Š–3|;ñ¿}§ü.ñ‰OǯÝÜÝÙÁg¨Ÿ øÎæ ¯Ziþ2ЭbŽãR×þÛãm'ŶÚ}„6;b0ø|ÞTåR¤pÅ>XashrÂTÚŒ¨fP—î§J­©ûJ­Bœ¥o‰_[q̰ޮIľ§‰ÀÔÃG=á\|•L׆qr¨àêSV£˜dõá|F[›`£*ßRÆao‰§ “À5ŠÉ±ì0õ x›Ã¾3Ð4xK\Ò¼Ká­~Æ OE×´Kë}OIÕl.W|v7Ö’Kosƒ£Å#Á”á•€òßÚfàZþÍÿ´Ó)u¶ø#ñ^vQÁa€õé ‚x‚àÆM/“ÿÁ\>;i?<_ñ3ö{ðW‡? ||×Z£ü3ñG‡±–ã3¯‡,^µe™`ê9Ð…J5¥V7^2RtÛ_W­8J¡:^Ö¥5OWóN*ñ#úSÆáø{:Çãð˜œg†X쯆Åà«ÔjO/Ì' 3ÃV©‡«w€ö¸|f¦è`±Uq9VúßðÔ káÍÕ˜;[hšT Ê a±‚2À@%r3Î m×òS ÿÁfÿlO èz7†¼=àÙ3GÐ<=¥iú&‰¤Ø|&ø³–—¤iV‘XéÚ}œ+ûDmŠÖÎÎmàŒp‘Fª:Wiá¯ø.í? ë6zÇÄÿ‡Ÿ|Eà-9çŠt¿xKâ„|[.n<ëù4-g_ø·ãm=FT–K[ký[{¹ÄpËufŒÓªÄø/ǰúÅu€ÂTŒ}­T–aƒUgy$©ª®*r_aTiKNv¬ßŸ‡ñGƒåì)Éiq¦xW—Âú%‰5À¿“àõ߉®šÓÇNúöŸej—?~#†š¤¢ÆâiŸAñ6¢|#âãâo‡zèœx A¤oÉa£ÊuË/ìà“ÿs~*ð¾ã ø“Á~+Òíõ¿ x¿AÖXU²i{_ŸqöaG„­S*©MÔ©‡®§xWíjÖÀfU*Ñ,Õæ•<TêÑPöÔi¤Óåúþ ÿ(õø!ÿcíÿ­'ñ~¿K«Ê~|ð/ìõð¯Áß>ØÝØx7ÁV7vºbj¨jW—z¦©¯kºÎ©xÉÜjºÿˆ5]W\Õ$·‚ÒÏûCQ¹6VVb H}Z¿—sÜm,Ë;Îs q¡˜f¹†6Œj%Š–+Z½5Q'$¦¡Q)%)%+¤ÚÔýó(ÂÔÀeYf³Œªàòü¬ Ûƒ©‡ÃR£7Òn.Pn-¤ÚµÒØ(¢Šò@+ùÅÿ‚÷ÿÈÙûØ»ûMéËöo¯èê¾1ýµ?c_…ÿµ÷€´Û/Ùx×þ‡k¯ë~Õ~k¾ðïŒMÞ£clÚŸ…,u/h~%ðtV1›GÑ-/¤×´Y µ¸°Ó¯£½Ó«ÜWÖð.{‚áž+Ê3ÌÆ5å‚ÀTÄ˰Ôýµu ØNJ+ÅÔp•hÉÂ/žQMAJV‹ùî*Éq|Eãò\°ðÆcþ­K,]xapʤ1˜zÉVÄÕj•5M§Z¬£JùêÎÔ¤¿’ÿ†¬þ|,ñWùü{â­{ƺŒ¬ïn|c<^ ó4-:êÚ /Æß õ ZðOÄÛõ6ÒõÝ:?Û\äßi*–vþF£©¥Ö¶·ûCøCTð>¡ Yüð—âË«J+/Áá¿…aÒ´{í¼?6ú%·Áû-bç\ƒH0Ãý·ã «Xu[Khú&ãû_ź¯Ù:Oü’óâGüóÀÿ´¯Ã_üfÓ>>ëÿ ´‰×ÿ |A«ü,ñ¯‡µ%,§Õõ;i¾øO¦ëwºç‹t(`Ôü ¢^øˆÞZ]ê–ZºfÔ¡¸Söÿà‹?±ïÄoxwÇý£¿i?økÄÚ]®«¥kZ'‹>Ýé·°\F yOìø’«C0’ÞâÚæ(/,î"–ÖöÞÞî¡ú&‹>fX*ÃëYc °Ð­„§A}UÂëΆ%Õ£*¿X”ÿ%Ï<#ñ/ƒø‹6à¬Â®IK3àÜÇ4Èñ1Áæ Ãõ¬¿;Í#˜G ™a°õèf¸zy­LmJx¸VÄPE‡ªð³ÃÅ5õýÄ~Âßòd±Ïýš¿ì÷ÿª“Â5ù¬Á f¯ø_^ø;àÏŒ¿´_Š'³·Õ|kñÎ Ÿ|¸ÿ„'áïö­kà«;»Íà¶‘&âOˆ;“G]ÞækCRðw‡¼yw¦iöïkˆtèÁ¾ðïÃÿxWÀ^Ó"Ñ<%à è~ð¶“Í‘áÏ i–º6‰¦C-Գ܈™ekk—3Í;¤A¦–I 9ü÷Åþ:É8·PÊcSÃÏŒ«õ¬Ö0mIµQN ' [¤¢Š+ð³õ°¢Š(øýš>&'‰ü-â§ÆËŸÚii¨ü5ñèø_ñF{Ý7Oa¨xOǧÃ1ÿ„zòAiºœƒÃ×çRðî¡­h¹´þÒ7}xj¿‰£ëVW?²„|Q«ëþ×4¹8Òlo­îµø«Äß £ð׉m!<Ú6ºÞø7á*ù‚ú=#ÄEä¶îñ%ìAØ×оåŒbÂC9…hR­ƒ•a]J9(9AÖÅI©KÙS¤§Î¡ìéÃÜVm©xÆù,<±SÊgN¥j8¿jêÆ•hÆu1ù\há ¹±µçìù‚p¥MÆ•*TãõçÅ} ö¸Õ<kð7ÃÓþÇm#Z×¾4x§áh ³øYã—°ø“áO _øßMðþ­ã_âv…¤ø‡á>£aá+ WJÓtë³xÃPÑu-&=ëïª(¯åV"_gN…QÃÑçöP©Wë—´’”½¥uNŠ–«Ý:4©ÇY*~ÒujTþ†¡FtùçV¢«Z¯'´œ)ûo’<±ä¥ÏQÇMå:•*=Ÿ$)ÂQ\‡@QEWŒ~Îw_møðfóû_N×þÕðËÁSÿméGö•«ù¾°í;CþÍÑ¿²,¯3çÛißÙ:oØâuƒìVÛ<¤özñÙÎëí¿þ ÞkéÚÿÚ¾x*í½#HþÀÒµ7Ãöý£§hÙº7öE•æ|ûm;û'MûN°}ŠÛg”ô×ü%ã¶Çåªü»_šéÍì¯kòûj|Ö¿²«ËÍGŽoþ0ÊûàñÎ×ÞÕ²íy}¢½¯¿²Ÿ-íí)órÕöz(¢¸À¢Š(Æ5Ë]ÿ´?Âëßì:o³üøóký½.¯äêúoÛ‹]µû%ü Ö …8ÆáB*Ñ„"£®ÑŒRIy$QEAAEP_>þÔ× ðkľ Óe–-âìºoÁo½»º¶Ô~)ÞGá ½f ÙxOAÔµŸÞ“Nðõ쪎Ⱦ‚¯˜´Y?ápüw»ñRŸáßìù.µáO ÌãÏÄ_u›94ŸköDð|3ðµÔÿloâ&6ñ‹¾%èóÆ.|=•êåPÅ}~vöZXéó+Æ¥ZSÔðÖû_Zź4f£yFƒ­^Ü”fן™IÊ‡Õ ßµÇ·„…¾(S©õšë·ÕðþÒ¬\­UT©]J¬úRÎÒÛO´µ°²…-¬ì­ ´´·ˆb8-­¢X`†1Î(‘xU¬ÑEym¶Ûm¶ÝÛz¶Þí¾­ž‚VI%d´I+$–É ¢Š)QEQEWŒ~Îw_møðfóû_N×þÕðËÁSÿméGö•«ù¾°í;CþÍÑ¿²,¯3çÛißÙ:oØâuƒìVÛ<¤özñÙÎëí¿þ ÞkéÚÿÚ¾x*í½#HþÀÒµ7Ãöý£§hÙº7öE•æ|ûm;û'MûN°}ŠÛg”ô×ü%ã¶Çåªü»_šéÍì¯kòûj|Ö¿²«ËÍGŽoþ0ÊûàñÎ×ÞÕ²íy}¢½¯¿²Ÿ-íí)órÕöz(¢¸À¢Š(Æ5Ë]ÿ´?Âëßì:o³üøóký½.¯äêúoÛV½ÊYfs•ýœ.”`ï'*‘нV‹…/t¢¿#`ý±à©æÚïþ u5üº·ˆ¤µ‰?n?€P7…´Ùµ‰4ÛÆ¿‡L×4xõ»»qá=:'QÖ4™õMO\Õ/ía´Ðü5¬^ZýUàߌ߶¥á=UñßìW¦øOÅ–>0ð¦•áï x{öšðŒíõïk>±ÔüKâëÏÞxOÁöÚ¥àß¾«á[Ÿ  Hë–Öº_ˆtmvk}NöÃDóéÉU•HG™:_Tæö‘•(¿®Ë’’§:ª­ìåþ÷ìeQ`#ûÌkÃӴιIC–üÍJXÅÊwú‹~ÖRQMÓUR¾Ú(‹_YWÉ¿°oü™?ìÿfóðÿP}¾²¯' ÿ‘Kÿbœ»ÿP蟠x³ÿ'SÄ¿û8eÿ­dQEzÇçáEPEón½ñoÄ~?Õ5O~ÏPéÚÍþyu¢ø¿ã« ^ü2øqnZý?Oòe„üLø¦É˜ßÂÜz6…{Cã¯h1Û躯^[)*j0¥I)â15eìðØjmÛÚWªÓQMû´á*µªZ ukNåψÅRÃ(óóJ¥FãF…5Ï^¼Ò¿%*jÎM-g&ãN”/R´éÒŒ§¼qâ-gZ‹àoÂ{çµøâ-6CÅ~0·Ž‹_ƒï§šÒ_‰D–òxÇ[÷úgÂÿÏ­«k¶÷Zõý³ø_Âúûׯx'Ážøyá=Á>°o‡¼9§Å§i¶¦Yn&(…¤šîúòv’ëPÔõ ©'Ô5]RòY¯µMJêïP¾ž{»™¦|_†ß ü;ð¿C¸Ò´FÔ5-GV¿—\ñg‹uû„Ôö-kF]^fÖ­u›]" oì=i-®¯%ŠÆ=C5–c4½8G›–ÎxŒ54ù½•¬çV*ÿ¾¦Ú¾‰¹;(MÆþ¿…ÖÕ%+^ê4kÍ«sßHÓozsWêÒKYFþÏEx¥÷ÆZÁ5ieø%ñ‰âÓ4} TŠD´ør‰«\ëo¡Äú–÷? V×4i5©#Õâ¾6x}XM3QÔÙtÑ©Dßõ›Ä6öŸþ/j7Ó4ë¨, øo4×7úå·‡¯[ÃvÑ7ĘÞhö~![½ZÛT]6È[izœúf¡©ÄÚSê‚ËqNÖT5å·ûf |^Ê×¾#OãS½íkÊööu9[ÇaÕîëi{ÿ³b^Ü÷ÚŽ¿ÃžÛékóÛ3âT¾'Ð>-|?ñÞðƒÄ¿àÑ>übðõÕ߃õéÞ"Ò¯|Oão€v­·üàÜÚx†ÏÃ:Æ·}w}}%ý’ø"+}2xS¸²Õ¼ö•ð¿Ž>?x)ü…ÿn?ƒÑxcÄžñŒ'ýš¾0þÎÿ ¼kã²––7~ O^|a»»Ãvm®½ÿ‰ôýI|&º…ÿ‡,åÑ5­RmàÕ}òãâÞ¹ö®ß¿î³t]W‡ìö?ö¼ú¿ö/Ÿ¡é^oÄxwëZö¼ÿÛQß}‡Nû ZþÎÔµ//NþÒÏOŽS\\kÖšwŠڵ֢hºÌÖÚXøguqy.¯—>‰gø–’G¬hzškúv²ºšéÚj_ø7Å–zv¥©\i°G{×*R­K…Äeù^"Xe Е\Ò­*óTs …9ÛœaãÐÄb©Eû*tãZ^Úõ§XÔ:˜¼Ef>„qQ¬©`)Μ]\Lâ¥W-­'*´0õsœåzKÙZŒ¾$ñ¯ìÕâï^Ý_ø«Pÿ‚’jmáôº·]'À¿´§Â/øGâ_…|QÝǃ5ŸŸëáíF÷Ãöúµ½×ˆ¼K©Yx'Q¾Õ<5,~Ôãð¾§sáMgÊüGûk·?𳿲þ/ÁiôѬé~ ‡ÃCß·¿Ã‰á{ÒõHþ·Œ>6jý©s§êWQøÚóâÓk0]ßéíâÝ·‰­´mj_ÓmOã>¡¤Å©Oyð_âòCa§xfêÚgƒá¼kZŸŠ/<=§ZøcH’ïâM²Kâ;CÄ+c{ixllæ¼Òõ;mÿU™´¤Õ,Ü|[× þÕÛð7ã=Ïön‹¢êðýžÇááþןWþÅóô=+ÍøýkBþןûj;ï°éÑÿak_ÙÚ–¥åéßÚZBŒ•Ôrœ¡*ÕaZªXúÐUª¿¨7:Ê9ÌYÂ5«s+KŒÌq3J½|ME”'¾?0|•8_J~Ê–)Æ4¹²Ér*Qœ¨Ñäø0Ø|&ìÔ¨ÒAû?x÷Nðωü3¬x—þ eñãÏ|G—R×>:þÊ1j^/‹þýCÁ“ü+ÒWJñ§„4«/†šu–¹o¬x»Â®—á­?Å'ðuŸˆ&Õ¼Y¨ëã+Â?²O~Ùk–püVÿ‚»|@}:Çâ\ÖÞ.ýªÿfÍv÷^Õ>7x>/^\èoãÍ/þ Á}?ˆ>i¾#ƒEðƒ¼a§Kâ] LñF¢ºsÝþƒê?u-2=NkŸ‚ßÄVo†ï-å6ÿ áZÔ|Kuáû<5¤=×Ä›u“Ä:}î¾,ïíoM”·ZN©o¤_ê²-59î>-ëjíøñžçû7EÑux~ÏcððÿkÏ«ÿbùú•æüG‡~µ¡kÏýµ÷Øtèÿ°µ¯ìíKRòôïí._¨Ð©øw“äÓúÌ`ñ0yž!T©J¾ƒQ¨Öw£RŽŒ#N.*sUªR:Øe<7B¯:n…e™fqú¼ÿÙäð4§T¡[мò¹Bu)ÕÅըܔå%õxÔ烧ü3à/ÙÏÆ_ ”ý¿¾'AákojZÖ¡ñ¿ã§ÁïŒÿÅÍSÃWþ6ZêÞ)ý¢´HKˆÀׯ•zpÄÊ­7:*¸ŽU„Y\;QÅF.¦êÒ¥UÄÓ•ª\”>C1˜œ«…³:ØÏ4¡Š£G •Nj5±Tés}bXu“ ÉÆ¿·U$£J¢ªåQʯ秀à ·ÃxGáÏ‚?ioèÞð/‡t ø_Io†_³æ¤Únƒ ØÁ¦éV'PÕ~Þêw¦ÚÊÞMÕýåÕäû<ˉ啙Ï]ÿ<ÿ‚…ÑÔx‹ÿ /ìÙÿÎN¼—àçÇáÏ…Y47VÔþë~ ŠÁHÒm/PÑuya·ÿŠTñ5ì­|¿˜øÓ¼5–à²Jù~(áú³­Œ„å‡ÀV¢±ª1ÂÚ.]…©:q•J±ž"0ºàª§;iágç¸üVkK_2Îa XYF5±tê}UÉâ/W›ˆ§%¸Âœ£EÎZ©¸5ôð°PYˆUPK18’I<$ž¯Ÿ5¯Úcá´Zφ|ÚÏÆÏÖ“xKàõ”/“N½L¶ñG‹åÃÏ4eãó[Ç^0ðæ‘ˆ–ieŠ)#ÿ†\øI©2Iã«_ü\eÆm~0x÷Æ?¼<ÍÌëàok7~·’Gä{? Û´Ÿ$LL[E»é>“ i¶z6ƒ¥éÚ&‘§Ä °Ò´‹m7M±€30†ÎÆÎ(mm¢ ÌÂ8bDÜÌq’kùñcÐ÷¿Û³­¡(R˰êKTç(ÕÆâ1¤ô•8¬^[¸Ö„­oÙßöm?Ù0Pë8ʦ6»‹¶‘Œ©áhЩv§'Œ§ÍkÒ”S¿Î¯ð÷âßÅõcñ_ƒáç.,Ÿ¾ëw²êZ휙W´øñdZéÅåÜ%ï…¾éÞ²ÖŸ©x»ÆzEÃD~†Ðô-Ã>›áï éf èÖpiÚF‹£XÛišV—aj‚+k-?O²ŠK;X#PÛÛÅQ¨ ªjÑ\ø¬}|TaIªt0´äåK †‡²ÃÓ“\¼ü·”ëVåJÄâjVÅNŒjVšŠ¶Ø|%,<¥Q9Ö¯4£S^^Ò¼Òwåæ´aJŸ7¼¨P…*“r…(¶îQEÄuQ@Q@Q@Q@Q@Q@wñgáo„>5ü:ñ_¯Úß_x3ÆÚpÑüIc¦ê·úíî–n­îg³ƒXÒ§µÕ4Óuöu‚KÍ2îÏQ‚)ì¯-.„W~n?üãþ †Ò³/ìç~!¹Ôt½GT±ŸãoÇýNÇX:$ZZé6w¶úÇÅEmì¬î|?á›ß/I:d×OáÍ2Âú{­õ-+Pýg¢¢éÒÄýr8SÅÚ„~µÆž\5J•pÑöñJ­°õkV«AsZ•Jµ'O–S“nmÔ¥ 5©FœêT…)·*P©YRYœ¯άhQI$¥5F’“jœ-ðïÃ_ø&çìQð{Dñg‡þ|°ð–ŸãÏxwá×eÓügñ&]_Å~ð—‰uOøsMñˆo¼ew¯ê·:OˆµÍoQ¶Ö¯u9µÒu­^Ö]NKNöÚ}x¿àŸ±Ä:׉¼MÀí|Sã<3kâ/sÆMâ»ëOø›ÀÞ2ðí¤^&o6»§ZXø§á§€µÙ-tÍBÎßPÔ<-¥M©Gxa`ÿeÑT’Š´RKš´¬’K›SV¼¬¾Õz¸üuJÏz•1¸¹ÏšXŠÎyÆœ#„aBœa¥ÓÃRÁQÃSQJÊz9n]J„Rå¥K‚§MF8Z ŸÁÚ‡ü3ö!ñ¬ž$ñ§À ø÷Åsxj ëþ%ñmÆ«{yã=çìH#|dеûo-Ι|/tßèÿ,uÍ'EþÒÑtmXø;LÔ-<ÚΑ¥ë-áóªiö—pþÑR©ÓUcˆTà«Á5 ÊUbž*†9¨Ô·‡ew}âMKX»ñ¥ìÚÅî—©ØÝø‡_›Sà´ßø$¿ü÷Høy­|)Ó~Iiàü/‹àÆ©áø¾,üpÚÿ £ø‹§|Y—¶z“üJmcJ·Ô>!i:‰5CIÔ,µ}v{d²Öu í-¤±Ñš*¡N³ÄÓŠ§ˆxzXGˆ‚Q¬ð´(b0´pάmQáèáqx¼5*.^Î V"Œ"©Ö©)%:q£4¥Jª˜èR’R§ m\E]\d`ïâªb°ø|MLBJ¬ñ(Ö”ÝJP”~]øgû|ø1¯é×Â_§ÃËîg²ð—†g¾Ú‰ÖæÖu)4©á¹˜ß뺆±±«ÜG{ºÖ´‹QV+Ëï˯u¿?fÿ´÷†4ï|qð%·´]SƎɬø“ÂúÖ‘¨yF¥Ò|QàÝgÃÞ'Ób¼‡l:•¥Ž±ž§ pŨÁtB©î´WF‰ÁÔ£[ˆ¯…­†œªaëaªÔ¡V…IÎSœéT¥(Μå9ÊNP’•ÞæUðø|L*SÄP£^•jp£V•ZP©Jt©ß–”©J.›¦¥)Ôpåå•jµ«É:ժ΂??à™?²‡Â?³ß‰GÂÍ7Hý—uícľ5Üë?j u} Å(Ñï.>xªóÄéñ,<+á•ñN¦ø)uÒ4ÙußYéúÌéúN«¡ý~?àðOB|BA~д™„ø[üƒ_£Ú¾‘¤øƒJÔ´-{KÓµ½Y±»ÒõW²¶Ô´­WL¿í¯´íKN½ŠkKëËid·»´º†[{ˆ$x¦ãvSó,_±Wìñ—ö%¿‡ü}ká øokñßãݯÂD±“ÍߤEð‚ßâl "Ð&’Ð#ð’h­lE©°6È‘/Õÿ®yýz8xWâ~&ÂÕÃÁÑsÂæÊ«V¥Xկ͙aeõˆ{GKºŠ¥Q‡îý•çóßêÆQJ­iRÈr*ôëÍUåÄ`°´Ý *p¦éÒåÀ×NŒùN[Sä©*’÷ý§¹ùýð{þ ­ûüOø•ñg[ðçÁ«ýo࿃æðo‚| ¬§ÆÿÚ QÑüOñÃW~0ºø¿¨é××.-|Qá½>ãQð_æW‚ïAOø?Åúl2Ý̺´þÎéZV™¡izn‡¢iÖ:>‹£XYéZF“¥ÚAa¦éz^o¥†§XÚǵ••¤1[ZZ[ÅöñG 1¤hª#Ñ´]ÚN x{IÓ4 G³·Ó´F°µÒô+O´aµ°Ó´ë ³±³¶…V+{[hb‚ÕR4UVx¹¾w™g5`ñ¹†cŒ£AFhcñØŒc¤•*t¥Q{j“Œ*×öQ©]ÓQS¨Þ–JÞ®[•`rÊrXL R«r¯,ŽTnsœbÕ(EÊ.w *nN0I^÷ (¢¼sÒ (¢€ (¢€ (¢€ (¢€ (¢€?ÿÙPK!õ mxdh!ppt/notesMasters/notesMaster1.xmlìYënÛ6þ?`ï h?ÕºY’8…íÄm€´ šôh‰¶…P—Q´›´(Ð×ê§O²ïP’/I–:m7tkþÄ/‡<¿sáÉÁÓ«L+.«´È¦óÄ6 žÇE’æóùæbbE¦Q)–'L9˜×¼2ŸþúËAÙÏ Å«¬R\’W}60J•ýN§Š ýNçõß×|f¤Ép²mÇ<<`}­' i¬˜˜Ó¹cv:´“›-®Ê É9µòÕ3Yž—g’>â—«3 ™i9Ë€0 ÐÍ4ý™cZ-xgù¼•ÄúW3™Ñ‰â¯é/±>¿RF\wÆ›ÞxñꎹñâøŽÙv¨¶Þ”´ª5º­ŽÛªóœ³9,æ‹BP[c¤U¬×Æò´ˆ/+#/ 4aQë tZÉíU. u]¦E"ÁÌwó%“ `³¤ž‡Sæë¥•ƺUà~„Ü^èD6À#œünF‘¼Y]ÊJ=ãEfPc`J+Ͷ:­›õÛ)úúëÝ˾ºÉ5ÝÆ¿¸tÖ/ ùÎ4ÄI^ ÌžãûØZ鿺øÛ#Ó%Æ8×ܱ¨Ô¹º ë‹•p ´ÁÄF-ôù>{.BÌá5Z53õ±·%à^A›<9c’Ñ2ÁÈðÜzsÞ¬Ä  Üj…fÍ…¿g„×2âˆ)¾Ã—D~+e6¶©H ÆìÃ/ŠüÀÁù6¶ÑZÌÿ‘òkù0‰vUï]Vâ‡Ë:¶å‡ž5:rzVè»Qäxst<ü"kCMpÝ*Íø$/%µ¬ÍEÞ •Qej,8_B«Ã ãxðïNHF¥4Gq„ïÏL¿eæ¹Hnœdl¾KPïË…ëz]ÀžÉãÌ…«Îa?oV‰ä$›7 Öö ‰»/ƒ\‡v5ƒÇ÷ìÚÀ7žß÷£žßmüšgG"XcÈmàh½Ö^Ž!úOR!tx¹ñ–¼J™t;Ui”>Hì&>" \6ûnÍÂõŠ\Ûê¿à- –Çðº3V:h`ïÆujeþχ{©CûKʘv\ŸÿefQLÙrŽ­cÛ …Pvcaí 5mÄ£ êêèGÁÏ·í.£AiÝa×ô×áÑ l›8EüïÄÇÍ%S„Dü[;D Ö¿é—ôtuxœ¤Êhr]EhTk«c¢P²kÆë?­pË@î=ÂÏy\ä‰!øŠ‹=$j÷p¿Ä‹E*÷¨yr¿ÀI±”j±÷5­¿ 1Ý#¬}@j´6)`a»Éf÷{XØ ®b'Ù¬ L«ù ƒéÀ¶"Ø™‹„cǶn§áoZkg:­•i])±ý‡ÌBÖ*u¬¹Ì¦7| žCô]œÑ||g¶ÓÓŸ‘9ßž¯'¨¼ž…ÖÈòý°gEçXãñ°wttMBo²ÎW+Js\Þ]û®4õóÇO¿}þøçÆsu’ Zlêˆ2§²ÞR?ß—2˜ïG£^àŽ£‘5rü‰åõBk8 ºÖ¤ëùþx ÇÞñ¼tü~,¹®jœ$Mu·*"YË¢*fêI\dº´Ò)‹·\–Eª«+ŽÝ”htÃsBÇukÖ¾IŸMç'íi¡B[5‰…|ÁJ5¼Acu…Vr‰ÖtîRŠê ­ä-Ç(Ä`FÓh{0^÷¬çxmžlõkmO·íAòUm¢ÅB¤ù%À Ó˜âyÝѶj  \·Õ“§”3¬_מÖlzŽ—µ~ÁcH*Vœæ#‰ 3U¨òæS艀2ØÙ2¯ßĶ›otã’KªÊÑ{Æ·Ræ[¥'€Û„‹YzWý›¡30ÏrK¨ÚYsvc€³z ®n ÄU#»>¡ÎuÖ¥íé]ʦjhtåâàC 4‘ÐÛàÓ’¤­Îü¼ü!P|ü >ª xZ<ØJ* @Ý-€"”Y¢“Pi 6¹n=2* @á@¡ïQPyŒa‚PiŠ6:ºÐñè¤ • Þ@A7|tÒ:õ!Tt¼/Ò oóÿÑÿÿÿPK!MHÜ—Ø ppt/theme/theme2.xmlìZ_‹Éä; ó.ëߌþ,–i$yÏÞµ%;Üc¯ÔšioÏ´èníZ†à{ÊK pwä%·<ÇÜA޼äÃl’ˇHuÏhÔ-µìÝÅv–™Ö¯ª]U]UêÞ»Ÿ½L©w¹ ,ëùõ;5ßÃÙŒÍI÷ügÓq¥ã{B¢lŽ(ËpÏ_cávï·¿¹‹Žd‚Sì|&ŽPÏO¤\U«bÃHÜaKœÁg ÆS$á•ÇÕ9G— 7¥ÕF­Öª¦ˆd¾—¡Ô>^,È {S¥Ò¿·Q>¢ðšI¡f”O”jlIhìü¼®b-"ʽ D{>Ì3g—SüRúEBÂ=¿¦üê½»UtTQy@ÖëŸB®˜Ÿ7ôœ<>+' ‚0hõKý@å>nÔµF­RŸ Ù Všs1u†ƒî`X”?:tÛÃfÝÂú›{œû¡úµð”ëöðãqV´ð”ãÃ=|´Q`á5(Ç·öðíZ´-¼%”dç{èZØjF›Õ–£ÇNx7 ÆíF¡|‹‚h(£KM±`™<k)zÁø H‘$™'×K¼@3ˆâQrƉwBâo‰2&`¸Ö¨kMø«~ý¤-‚Ž02¤/`"ö†OÌ8YÊžÿ´úäí/¿¼yýó›×óÕWo^ÿPÌ­UYrÇ(‹M¹_ÿö§ÿüå÷Þ¿úë¯_“O½‹&þÝ÷x÷¾O=¬xkŠ·ßþøîçßþùÿúîk‡ö>Gg&|JR,¼GøÒ{ÊRX ƒ?>ãד˜&ˆ˜ý,(Cj‡þ‘L,ô£5¢È`ÛŽÏ9¤ðþê…Ex’ð•$“Ôž2FŒ;­ðPÍe˜yºÊb÷ä|eâž"táš;B™ååÑj 9–¸TF ¶h>¡(“(Æ–žúŒcìXÝ„Xv=%3Î[Hï â qšdJάhÚ “ü²v[¶9}î u­zˆ/l$ì D䧘Zf¼V¥.•S”RÓà'H&.’“5Ÿ™¸‘àéSææX—Ìcë5œþÒŒÛí§tÚH.ɹKç bÌDÙy” téÂNH–˜ØÏÅ9„(òž0邟2{‡¨wðʺû9Á–»?œ žA†5)mD}²â_ÞÇÌŠßÉš.v¥š>O­ÛçăUl…ö Æ]¢9ÆÞ³Ï liÙ|KúAYå»ë²cU½gX@¯¤š›ýN×ãVl¥¬kö;‡RÊñN—s·ÛÛDŒÏɧßÚ Ñ*{‚¡šìç­ÛÎæ¶³ñÿï;›Cûù¶Ÿ9ÔuÜö3>ô·ýLqÄòqú™m Ý:öÈ{ôáOzðìgA(È5Å'BÿøV3à’Ó瞸< \&ð¨ÊL`ábŽ´ŒÇ™ü‘É$AK8#ªûJI, Õ±ð–LÀÑ‘vêVxºJOÙh¶½{Ãþ• I…“3ž¶7#Ò»±õþ{×ñ¦ŠHL¬Oä&n{‘RéæÊŠôaË«<% ̹ˆ±‚W®ݘ­¬Öjë+1¦‰‡Ù»ã1õ j’ÞVN¼Çà5QRøL 4iâ¬0Ø`R×9“]&Ð!fmøühH)1,L´½šùy+[×Wðf¶ˆ©%kKëúæ—­Ë“UÃS„£‚i½ßh]Û)èS‹¸^¯×íÕ z€}4µ²”i6úõNN³²‹´»µf­áâKô×dnu:f+“Å5 ûØXÀoÔÖÛ«Þ€,¾¹€ot¶»Ýuo@¿¾€ï_k­7\¼EŒ&“´vh¿ŸQ/ cÎv+áߨeð9 ¢¡ˆ.Íb̵,Öbü‹>4aE¤f)c¢¸‹ ªàM‚K3vÈ— Cš’¾ ©j{¦2bNïÍËïß¼|ŽÞ¼|vüøÅñ㟎Ÿ<9~ü£¥å,ÜÅIX^øúÛÏþüúcôÇóo^?ý¢/Ëø_øä—Ÿ?¯BÍ%zõå³ß^<{õÕ§¿÷´¾-ð¨ Ò˜Ht‡¡ƒnÆ0®äd$ηbaZ^±„'Xs© ßS‘ƒ¾3à Wà:ĵà}¤ xsúÐx‰©Ê\îhv+Šàç¬ÃE¥ni^%3§IXÍ\L˸Œ«xwqâø·7M¡tÒ*’݈8bî3œ(’„(¤çø„ {= Ô±ëõ—|¬ÐŠ:˜VšdHGN4ÍíÒü2«üíØfï>êpV¥õ9t‘˜U?$Ì1ãM½Ü£¡#Ò<@ôÌTTøò&áNüflŒ‰)5P×rÓä²vŸ¹vo Z™<»'*ö2ÜÉ:Ýå" ÿþ2½ƒ§É>ÌXÜ«.«ôe•öþóUzY>_|mž—c¨Ôºw²M·iÁã¥ø˜26P3FnKÓ„KØ„‚> êuæôIŠYÁ£Îd`ààBÍ$¸úˆªháøº§‰„2#J”r G3\I[ãá ì±³©$¶rH¬öx`‡×ôp~î(È©Bs¸Í­ige¶v-# º½ ³ºêÌÜêF4Sn…ÊÚÄæ€&/TƒÁšÐÝ è‰ÀÊëpþ׬áàƒ ´Ý­r·/\¤‹d„’ùHë½è£ºqR+ Šh=l0èCä)V+qki²ïÀí,N*³k,a—{ï]¼”GðÜK@íd:²¤œœ,AGm¯Õ\mzÈÇiÛÙã¼.uC‰YO¾6ìOMf“åso¶rÅÜ$¨Ã5ˆµû‚ÂNH…T;XF64ÌT,Ñœ¬ü«M0ëE)PQÎ&ÅÚÃ?&ØÑu-‰¯ÊÎ.hÛÙ׬”ò©"bGhĦâƒûu¨‚>•põa*‚~{:mm3åç,éÊ·cgÇ1K#œ•[¢y&[¸)H… æ­$èV)»Qîüª˜”¿ UÊaü?SEï'p ±høpM,0Ò™Òö¸P‡*”FÔï hLí€h»^˜† ‚Ëjó_Cýßæœ¥aÒN“ꀆHPØT$Ù‡²d¢ïbõlï²$YFÈDTI\™Z±Gä°¡®ëzo÷P¡nªIV îdü¹ïYBÝä”óÍ©dÅÞksàïî|l2ƒRn6 MnÿBÄ¢=˜ïªv½Yžï½eEôļÍjäYÌJ[A+Kû·áœ[­­X ¯6sáÀ‹‹Ã`Ñ¥p™„ôØÿ¨ð™ýò¡7Ô!?€ÚŠàC†&aQ}Å6HH;8‚ÆÉÚ`Ò¤¬i³ÖI[-߬/¸Ó-øž0¶–ì,þ>§±‹æÌeçäâE;³°ck;¶ÔÔàÙ“) Cãü cc>™•¿jñÑCpô|?˜2%M0Á7+¡‡˜<€ä·ÍÒ­¿ÿÿPK!´ÏX»$,ppt/notesMasters/_rels/notesMaster1.xml.rels„Á Â0Dï‚ÿönÒö "Mz¡W©Òml“D±o  ‚—…™eßÌÖÍ{žÈ C4Îr(i­r½±šÃ½»N@b’¶—“³ÈaÁØïêN2å£8I¦ØÈaLÉŸ‹jÄYFê<Ú¼\˜eÊ2hæ¥zH¬*Š# ß &i{¡íK Ýâsò¶£ðâÔsF›~D°”{aÊ 1q tuÖYÑܘ¨Ùæ7ñÿÿPK!j_Ž0ppt/viewProps.xmlŒ’MoÂ0 †ï“ö¢Ü¡¥@Ç* —i'“`»G‰["µI”„Ï_?§Ú1œb;ö¿væËc]‘=X'µÊéhSŠk!U™ÓïÍç`F‰óL Vi9=£ËÅëËÜd{ ‡/K \ÆrºõÞdQäøjæ†Ú€Â»BÛšytm Ë®«(‰ã4ª™TôRoŸ©×E!9|h¾«Aùb¡b›w[iÜ•fž¡ 1MõŸ–(N…¶«ŸFbð1×k b…'š¦IL£þÝF›æê}’¦ÍUôŸã*) Ãòu%z^g:Î*XÌYæŽ$,&™R"ðŒ0†OÂøÞ¥ÎdÚÊR*rÌé`”Žq‹'´ÒQZÆ<Þ=Uî°¥•óAJc¬ÅÁà µ=Sb´ rg“Vm›Ò“qÜ‘×A¼§ Ý;ÍJ{p8ú®…^7÷Â[Ùáé›è.àí ú‚ñ£ØënlL~ðti¥XÆñ_ŽÓzõ"€#¡5ÛyíÛŸð ÿÿPK!Øý¬¶ppt/tableStyles.xml ÌI‚0@Ὁwhþ}-CQ$ +wê*”!é@h£ãÝeùò’/Í?J¢—Xìd4ÿàº5ݤ{ƒc@ÖqÝqi´`° y¶ß¥}«ëçiŒ¥uJÏ HDrºWó¶?î6p "çùÜóQϲ?¥×íÕ—•©•NΞû ½±Qh4»š7`ç½©ãØ‰œ¸[h#çP´¸G»{ËŸÂÓc„Šxâj'½}^ƒ²Ób?€c+ljÛ)ã^º™÷t;Ÿã© CŠÑ~·ûvÅkg·÷ëÑF|l@FJF)ˆÛUüå³ÿæü_]ØE{«ð‹•ÅšUJ×0K2 iÅ(,º$-JÁåo4IV÷Ê nû¯ßJÖ+ßqÏOÆ„òÃLJXíôàBOñÑ•Øè'iVctr÷@NÀî’±K‚ L`Y- ÌR\AB»RJ–yQ`”'è•Q|?úcgÔ'âaü&à¦ËÙ†"¶f0ËS«ešÀ¬ 8¥,,ivÌk±ãÖßY.BÆnå@¹“ý+fþñyFŽ!¸  9xùý°=ÏÔmÿÿÿPK!Tò¤GpdocProps/custom.xml ¢( Ä•M‹Û0†ï…þã»bI±c;$Ùæ³š²4i¯A–Ç-II7[úß+“lŸ ^Lo–%FÏ;zgfòð\•Þ´JN}2À¾’«\ȧ©ÿý°A‰ïËdÎJ%aê_Áø³&ZÕ ­ã¹ÒLý“µõ8 ?AÅÌÀmK·S(]1ë–ú)PE!8¬?W m@1ül¬ªPý7œ‹7¾Ø®!sÅ:óãp­îlr~õŠÊŠ|êÿZEËÕ*¢ët‰& ”Óácº ËM:_ÿö½º9L}O²ÊIßí·Ç/,ƒòX„”±aHQã i’ ,'A–%QšF˜&ü¸–,+!w÷_츬«g}†I𶞯lï¤v¥Ü Û6dL‹4I²%£‚ °¥„eˆæ1Ï1!yƽˆ»ŠøE+Íó"«Å@È›Á]®-pë¾ìå¬aÀUÕœ þ›â¨«â=ØÅµ¥ù‚´ºšZª×ʨÂ6òzy§Ñ;¨WÌB‹›bâ o„0=:ÆxLñ€qűûÑ‹„¸«„¯®´ø?ƒÍÊ^(]óíÖ{æu] Ϋ·`w¯ÞðæMxÛ·âð\ϼWG/ZÒ®ZÖÏdùq·ßŽ;°'ÕîWó³› N+ï…›¸‘x{„=H#¬¸Û®¼8 p‰½ÊÙÿÿPK!réHdocProps/app.xml ¢( ¤TMoÛ0 ½Ø0|o”tÙ°ŠŠ!E‘òˆÛž5‹N„É’!²Y»_?ÚŠg)vØ|züð#ùH[^?×.ÛCDü<ŸŒÆy¾ Æúí<¿/n/>ç’öF»àaž¿æ×êý;¹Ž¡H0c ó|GÔÌ„ÀrµÆ‡=GªkMlÆ­UeK¸ åS žÄåxüIÀ37`.šWÂ<1Îöô¯¤&”møP¼4ܰ’E í [ƒš|¼º’âhËÇ ªS)’_šÆÙR+¢V¶ŒCEÙ]×{¶?!®ƒõ$Å0‘õ䡺×n»™Õâ )ÔR¼’kõ6êf‡jÂ¥¦Ü8k€ÝRü(9Kk øCt,ʼn-W«…³ *ôPnJí`Á’¨J;¦~uÈ%èvÝkm#*¹§ÙJ 1Cû‹>ͳï¡ržïu´Ú Ú¦%£Ã®AŠªàÍ37Ç’ÝÁaÚÛi;"ç2økbâê¦Í KðÿK´uÓ˜\ûT€Tâ®â•Ðz\õèZKj¤.Wr&Ä«$ÇûɆgq6Q·îín¾Zÿï›"Üh‚~—§N¹Ù醿²>~tÈ%¯1º–d±Ó~ ¦Ï9´ßÁCú1ð‰ŽÆüt'ßûÚ»îê7ÿÿPK!Ñ^ü&p®docProps/core.xml ¢( „’QKÃ0…ßÿCÉ{—¶Ã­†¶•=9®¢ø’»-Ø&%‰ëöïMÚ­v(ø˜Üs¿œ{n²Å±®‚h#”ÌQ<‰P’).ä.G¯å2LQ`,•œVJBŽN`Т¸½ÉXC˜Ò°Öªm˜À‘¤!¬ÉÑÞÚ†`lØjj&N!]q«tM­;ên(û¤;ÀIÍp –rj)öÀ°ˆèŒäl@6_ºêœa¨ i Ž'1þÑZеù³¡«Œ”µ°§ÆÍt¶;fsÖõшAضí¤v6œÿ¿¯ž7ݨ¡>+¨È8#VØ ŠµjA¯•6Xk0Î1µ.ì  ¯e¨UºxQ§`ã"h«Np¹öqWÔØ•ÛÌV8])W}ƒ†ƒð{-’4Ãã³{°Ë¢xà¦#}—ÊÛôñ©\¢"‰âyÝ…IZF3ÍIrÿá]õûiû‹úìï_â,Œ§e’dN¦éˆxãëV|ÿÿPK-! bðRøZ[Content_Types].xmlPK-!G¿Ðu 1_rels/.relsPK-!Ø‚k×Î uppt/slides/_rels/slide1.xml.relsPK-!?-ž"gŠppt/_rels/presentation.xml.relsPK-!èñ]Lñ ppt/presentation.xmlPK-!ªç{H•Ú&ppt/slides/slide1.xmlPK-!ÕÑ’ñ¾7,îppt/slideLayouts/_rels/slideLayout7.xml.relsPK-!ÕÑ’ñ¾7-öppt/slideLayouts/_rels/slideLayout11.xml.relsPK-!J¯u9Ô¿*ÿppt/notesSlides/_rels/notesSlide1.xml.relsPK-!ÕÑ’ñ¾7-!ppt/slideLayouts/_rels/slideLayout10.xml.relsPK-!uK¸CÁ^$"ppt/notesSlides/notesSlide1.xmlPK-!ÕÑ’ñ¾7,"%ppt/slideLayouts/_rels/slideLayout8.xml.relsPK-!ÕÑ’ñ¾7,*&ppt/slideLayouts/_rels/slideLayout9.xml.relsPK-!ÕÑ’ñ¾7,2'ppt/slideLayouts/_rels/slideLayout4.xml.relsPK-!i¢_!Ç,:(ppt/slideMasters/_rels/slideMaster1.xml.relsPK-!ÕÑ’ñ¾7,¢)ppt/slideLayouts/_rels/slideLayout3.xml.relsPK-!ÕÑ’ñ¾7,ª*ppt/slideLayouts/_rels/slideLayout1.xml.relsPK-!ÕÑ’ñ¾7,²+ppt/slideLayouts/_rels/slideLayout5.xml.relsPK-!=˜¢†* "º,ppt/slideLayouts/slideLayout11.xmlPK-!´ÿ~ÒJ " 1ppt/slideLayouts/slideLayout10.xmlPK-!ÒAô¹ !5ppt/slideLayouts/slideLayout2.xmlPK-!Àš7¢¶!9ppt/slideLayouts/slideLayout1.xmlPK-!‡’é¡`0!õ=ppt/slideMasters/slideMaster1.xmlPK-!ÕÑ’ñ¾7,HFppt/slideLayouts/_rels/slideLayout6.xml.relsPK-!$¸î%!PGppt/slideLayouts/slideLayout3.xmlPK-!Ž4=‚†!}Lppt/slideLayouts/slideLayout4.xmlPK-!å§ß•!>Qppt/slideLayouts/slideLayout5.xmlPK-!TÍ Iý!?Wppt/slideLayouts/slideLayout9.xmlPK-!S;dZ0!›\ppt/slideLayouts/slideLayout8.xmlPK-!ÁgÀj!4bppt/slideLayouts/slideLayout7.xmlPK-!“‰ƒmK“!ƒeppt/slideLayouts/slideLayout6.xmlPK-!ÕÑ’ñ¾7, ippt/slideLayouts/_rels/slideLayout2.xml.relsPK- !N‚·à€€jdocProps/thumbnail.jpegPK-!õ mxdh!Jêppt/notesMasters/notesMaster1.xmlPK-!MHÜ—Ø íðppt/theme/theme2.xmlPK-!¹îs–°¶øppt/theme/theme1.xmlPK-!´ÏX»$,~ÿppt/notesMasters/_rels/notesMaster1.xml.relsPK-!j_Ž0ƒppt/viewProps.xmlPK-!Øý¬¶3ppt/tableStyles.xmlPK-!øB´W¯gppt/presProps.xmlPK-!Tò¤GpîdocProps/custom.xmlPK-!réH8docProps/app.xmlPK-!Ñ^ü&p®W docProps/core.xmlPK++ þ xio_chain.pptx000066400000000000000000001210031362133436400350170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/img_srcPK! bðRáZ[Content_Types].xml ¢( Ì—ÉnÛ0†ïú¯…E;m“´°œC—S—I€‘Æ6[n ÇnüöQvª¶åÔÊ‹ çÿç£$nã«­²%ø ­)Ø(² Li+if»»ý<¸dY@a*¡¬‚­ °«ÉËãÛ•ƒ‘Ú„‚ÍÝ{ÎC9-Bnj™Z¯Règ܉ò§˜?Ïyi ‚ÁÖl2þS±P˜}z Ç É3–}hëZ“º6ˆ |«Æƒ O4Â9%KÔΗ¦zB6XS夌9a.]xE ;*Ô-» ¬ußéuzYAv-<~š²¸sȇ@º˜›ïwÚ‚j§SYBeË…&IÞ6Óê¯0×BšM'vÁE¿Š€ôéÛÁèÔd-Ö4ýpt‹6o¥œœ¦åÝÅT+¯½u¡&w,%üê…àѸ‹i^æzü§ˆ6Ž‚\)8y¯[Öˆ/be¸MÐÏèh¼ÿ•é,A¦× 2½Iém‚Lç 2]$Èt™ Ó»™FáþçLÞZUŸ¼ZUã¶ç¦Ùæý¹ïgw­÷‘:n>è8âáù›³C­82rÿ’þX‘¬î3ÔÇ’ ªçÖ.­>º|c³¥8'ÃÉoÿÿPK!G¿Ðu _rels/.rels ¢( ¬“ÛJÄ0†ïß!ä~›îz@dÓ½aïDêŒÉ´6’©ì¾½¡à¡P«à^fæŸo²ÝlÏÞ0&ãäë¢ä òÚ¸Vò§ú~uÃY"pzïPò#&¾«Î϶Øå¡Ô™X¦¸$yGn…HªC ©ð]î4>Z |Œ­ ^¡E±)Ëk¿3x5a²½–<îõgõ1àÿØÂ"¡|ÄUˆy:’É»°b‹$¹öê!—Ó˜(2™‹y¡Íi…¨ì³ÓϨ|öŠ—€íOBë¿ ù¦1 ï¼,:šóš&¾œB "¦\ÓK7tuJ!5$òö—'3KJ—§T¡Ө—¥ „#1ù,Õ;ÿÿPK!Ø‚kÖÎ ppt/slides/_rels/slide1.xml.rels¬‘1kÄ0 …÷BÿƒÑ^;¹¡”rÎ-åàà¦öúŒ­$¦‰l,]iþ}Ý¥$pC‡ŽzzúÞí_ó¤>±pLd¡Õ ($ŸB¤ÁÂûåøðŠÅQpS"´° ỿۿâä¤ñ3«J!¶0ŠägcØ8;Ö)#ÕMŸÊ줎e0Ùù7 Ù5Í£)kt¦: åv .KÆ¿°SßG/É_g$¹a( òÛVª+Š­WòÚÒêÊs»VûŸµø'îì–t•M¯•¾1ý63›/tßÿÿPK!?-žgppt/_rels/presentation.xml.rels ¢( ¬”ÁJÄ0†ï‚ïænÓ®ºŠlºö ˆ®m§m0MBWûö†Ukº,ÅCŽógæÏÇ?!«õg/É­Z1(²ªJ×Bµ ^··@œçªæR+d0 ƒuy~¶zFÉ}r0ŽåtÞ›;J]ÕaÏ]¦ ªpÒhÛsJÛRë7Þ"]äù’ÚØʉ'ÙÔ ì¦¾² þÇ[7¨ð^Wï=*â ª´G÷ÈGl¹mÑ3ˆÄIG‘ §±nRby¾“øâ±"qd‘ÄIQã¡üQgÓ(’C/)'³XˤK ³Q6‡ò[œe¸Nɰøñdµ‰žÉ(ÍA\¥„0ÝÄ(ýBÐÉ÷P~ÿÿPK!K5z¬:Ò ppt/presentation.xmlì—ÛŽÚ0†ï+õ,ßVlÈ9‹+µR%*¡…}o2@´ŽÙ†Â>}ljI]Uû¹ËxfþžœæOç’“HUT"¥îÔY•bŸÒ—ír’P¢49ã•€”^@ѧÅ×/ózVKP 4Ó˜JPF¨KéAëzæ8*;@ÉÔCUƒ@ß®’%Óhʽ“KöåKîxÓi䔬ÔæËÏäW»]‘ÁÏ*;–X¾‘À›>Ô¡¨ÕU­þŒÚp·-)v‚ÍñU^VB+¤C¸mÅóßLi¿ò•Òw+¤ÈSê¹A$~””È™YAKÅÜù(]TÔÿÖzߊ|”‚·×m/a4hÂë›ÆnÞIvNiì»!삉qàÃéÚ±QQ&ÓkÔ£Æh¢rر#×[8ë¾pXÌ™Y[¯¥½z^K™™,“—MÓÌ0„Ÿ¸[cLÉä*¥X‚ñ=N%§c¶ìuóžÒ Œ›¥æM°•ø.ßÌé3šè:`)´õQdº=½® …JnbtÞ@šÁ7šÆ¯*^äË‚óÆ0c?¸$'†Õô¹=Ä»¨¦*Ñ—·Ÿá-ò­®M$›»sk™ºsdªÇñlp8‹ÆëÑ\!Œ| ËÇïù´c9òi¡X>AÏÇõc7]©X@áPâ%M÷# CÅŠz@ž—DÍ[`d¨X@ñ}Ž€*PÒ2tƇtGÅzŠÂx|HwTš×?1Û‘Å_ÿÿPK!Š y Hppt/slides/slide1.xmlìœ[oÛ6€ßì?zO-RÔͨ[ÄN3k× I÷ÎJ´-L&5Šqœ ûï#)Qrù’ÔvW/Ñ<䡾ÃsÈãèíûÅ,³æ„)£¼ql‹Ð˜%) 쯷—g¡mÓgŒ’ý@ ûý»_y›÷‹,±dmZôñÀž ‘÷{½"ž’.Þ°œPùlÌø yÉ'½„ã{)u–õ ãø½N©]Õç»Ôgãq“ ßÍ¥N2,dÏ‹išFZ¾‹´œ“BŠÑµuéÔ,¾Éu,ò[Nˆ:£óßx~“_qýøù·ÒDŽ—mQ<“Ãb÷ªU1}Içú¤·R}bNq1æ3u”ºY‹-ÿAýí©{d!¬¸¼7wãé—–²ñôCKéži ·Ô¨Òªì\‹:°VèšÝÑ„$Ö5‰åÛŸdÄÖZ¶ªØÈoUÎ (‡YwÛ "zõ ýÀPÙ}}u¾¬î缿6³ÔÉÀ檇ª{¶zˆçŸ Q–7åÔí‚eir™f™¾P8QÆ­9Î6ŽcIÒÕ³»Ùg–”÷ÏqÌøÕUÊ«FZÏè)â!#Z½&c9R¨¥¶6ÊGSœò¶j®½=-P•Ë6kÙ•€vÙ¥˜ª¼ÞñXŽQ]ÙÙ^¹®¡[f´©½ •úw5*®–¶7TüjEî»a¸²""èÑÏÀÊhŠS*ýã+‡¥ÎÆ7°TXìø^µ­‚EácXd@áy‘YwúÀ÷õÌsZŠ¿ï0ÿ^žçSZúH“ƒO8Ïí“5Oñ¾úó¬Lv{oö™ÉvëLvÃú㈶a½„á“\ÎeÒÖ鄜¹|Y•~½ºÒ3­E4V|®ÁÈ ôPèÔ‹ü`‹M,Kó‚ìd*ž´îõn“óòGFŸc`e ç˜ OÅnæ¤ îÖGsÕÅHh¨ŽoŸ·£«=PWçêô+?2un̈ :ìN»:_Ú`§cµ‡]A°ú …»Wˆ]¼ 7y#uú¾:)x#8N'SasÎî­£TbŸ¥54ÖB¤ÊB^4¿ßÖ{f¦¢IýL¹òj—¥Æs©+Ë„.Ý^†ÔKþ4#mpõü(T‰9.^}¿ e ­nƒÐ-i5´¬µ¨¯5.Zì‚ ÷§'hb‰‡\à©Þw«ÞN³ögOmÛŽÚa˨}¯i‡í¢cï55¦Ú²×¤`0|nµÎºmÕߪ± Tô½ ®ÁS†®€U>ýªDâÓÿšèø||ÖY­ |Ûø 6ðéíÏrw:ð|-µÏnþ<>ëtÑ>õ®Ï&>ÍÙÂg,Å¡/æÓuA„@¹ôÖî}Ï%÷ÞMŸ'€§J&nųI£¬ÁÓL‘mx׿o<ÛÝ{Çç‰ñY§jÖó‰šÜÍ>á>ëߟtU¶vï+ÿÝëÂ(ìø<%>ëìÐ>›tÑ>ý |š¹u|BàE®J'uóçÏÂgÑÙÀg“âYÃg´O3·î›ÏöùSñ ;>O‡Ï:÷³Ï&´†ÏpŸ†Ý}ð ?@*$YË'@èæÏW§óÍù åÈWgÖOö¿ÃaäÃQ8<ty†.¢àìüÒ÷Î.=¡Ñ0<¹þSߨs¢?/óÑ|&GÞ|òišYsV°±x³Yõ›^Îî ÏYª?sœê[9ZÂ(ò"¤7X{ºkæ¨;«t©¾^gü3οÌ5·²-AøHßÊS:©ÐoŠ(Õe½ÿÿÿPK!ÕÑ’ñ¼7,ppt/slideLayouts/_rels/slideLayout7.xml.relsŒÏ½ Â0ð]ðÂí&­ƒˆ4uÁÁEôŽäÚÛ$ä¢èۛтƒã}ýþ\³M£xRb¼†ZV È›`ï5Ü®ÇÕgôÇàIÛöírÑ\hÄ\Žxp‘EQï«P,Ž‚›¡…2ìºç§íNNê1³ªb £H~5†ýˆ³c2Ríô©ÌNjY“?¹ͺi6¦Ü3 [0Õ>X(û°u¼eü ;õ}ôø–üyF’' O1`º2 XÐú;ùi´ºÁ<öhÿÓƒ’  –…Í]¾ú53‹·w_ÿÿPK!ÕÑ’ñ¼7-ppt/slideLayouts/_rels/slideLayout10.xml.relsŒÏ½ Â0ð]ðÂí&­ƒˆ4uÁÁEôŽäÚÛ$ä¢èۛтƒã}ýþ\³M£xRb¼†ZV È›`ï5Ü®ÇÕgôÇàIÛöírÑ\hÄ\Žxp‘EQ€ëͱ=ÛPØÔwŸí$@¶VSoðÉñùýlÎη5"UÅÙЃ'¡ü¨ØjèÝßÍüÌJ#V Êz;¢¼óÑ×/gbÀ¸& ¦hè•Z‹A(\’©.3{K.k¤Í§\…D&nMƒ( Ó FóZù¾\V˜\p¼® ÓMI(Ò¦vUVBuÑÄG¢ I” 㼟•42½á-ìªÄ$ÄJlóMŠ…˜K·}½™KP†˜ª /h7Z3÷É6N^¸¯: ¶KYÛÕô¶CÏàßÙßÀêÈVÜ(ñA‹Ë›7lq9}Ã:èGImWMq¯Û‰ºv´*¸¬ÑŠ€9E˜”œD¸ï³ë@‰+Ž(À¸é°Âo¹n¥¼DlEÆJìT ½{ƒÈ®¢z'LfE‹ËzÕ6»N8ÿ&9?ÍzYØ00‰ÃðÅ,Šú©5°tâ0Kacq̨‰í„sŠ;N×îŠÞ'ô>„^ì<“i{0ÿ —Lo'ÆÁ沎N‰Té…ÞQâ>„CÁŠ9’èÖ4A‘}à„ù÷‹‚pÁ»H`<¿+×ëúÁ´Œ"þ æ>˜Ðf ýz?×Hj";2Íù} š%-\S¿§“<„yÞóS˜A?™æ¹?î…¹Gá4?í_ôú0yòöµ™Î™©Î†/°UëœÄöT %­ï¥0ÿs&n鯒¹ÝWJ·XËÊ´0™ôÓ(Ï&þ&3?¹èŸúãYÚóg½8IòI6Îãé“s0`Iܼ,ºÙ “WÓ³®°äŠ/õ æu;†Á‰¼r“†í8ß j¦Ht'°—¥Y{@¦¶nuÕÚ#o',¦ò;7w=L2s¼¹S óWÑÞŽƒ‰=cûâFÿÿPK!ÕÑ’ñ¼7,ppt/slideLayouts/_rels/slideLayout8.xml.relsŒÏ½ Â0ð]ðÂí&­ƒˆ4uÁÁEôŽäÚÛ$ä¢èۛтƒã}ýþ\³M£xRb¼†ZV È›`ï5Ü®ÇÕgôÇàIÛöírÑ\hÄ\Žxp‘EQÜÅê{çgÍ(Ç]ÿm('Š)#;+bÊ ²³¸¥‘­­cÒÖdkJTsHLëÐæyÑ&¯ÛfÝy¢4”…¸ à\kQ7ª 5w ùA8ÛÔ½0v£­¼(Iý]kà~˜Ñ¡-t3T»Œ—{=ú´ €f4²ÖÉ·°Lª…Ú3b^ýcH fX©í÷‹6V§Œ‘∔T¡7X*"É*P4 e¸R—×Xàw`¨¤BÝs°1¤{²†ÿiƒÇ&jy®.Èš³Hù/á§VíÀN˜_›ð㶺þÀÚÕ0Ý(ý‰®6Úƒ-»-§S.Ïoås[ÛÁ.§Á¤à°1²%ì DããiÄ嚊óƒïæ|#ÔúlÄð Dº: øóJ$ìKd†yPF€çVF • ÿ†s ³U_-×'‹ÂÌz¸vŸX­+8»tÿDy’Æó<µ³©7³ÃY §~è¦vœ$“0› Ò >÷Gb ©*Z‘œÞl¹Úèî±%HVjÊ®okAŽÁë%wî…þüOW¢Þ•œs]]÷}1Ëè¹¾¬”hùkƒÌÐ{ó ëG¼yYEâ^‘£%Ao7Õ‡]Ì>ø\]àBÐG¥1;Ì /Û<÷ó©—evšå;œøs{’%3;‰çé_©vì6íž Æên Œÿ6ê^ Zu‚[úσ¯IÎáÄ2²#ìD+÷󈛊ÊÓ£ÿÌøVêêdÄøDZ> øó29v™¼ÄšÜK`+À&p «þ‚{³Ò¥nËõ,WE w¼ñâïA6J†«,ñÓE¸ôãå^Ÿ—øÃÑh§ËqÅÑ'÷dદ5ÉèÍV’«­y ‡©Z/ÁÍíYгqà GÇè…gâóQ¸¨dœ›Óu7.6~4.¥–m`>l±„\l¾ç^ùJlΫÈÐ)²f´ èͶ~÷@—Á9t‚  Ÿ”ÆÞ0gNÛ,ëg‹0Mý$Íæ~<ï¯üy:Zú£á*Y Fý,IŽi«Œç °;5[¿|þç·/Ÿÿ=C®ÚÆJpÓ_*ÝõÐVRp$MÇÃþ"Iý4Œ38ã‘?φ?Dq¼H“ù"Z}2WOrIl5÷{áêÀ0~T Ö4—\ñR_ä¼îJÊ@ðD NmUöº:p‡Í‹õãhÜ‹"{m–›k-[øµñZ&_cqµ³IRÛ÷ka§”½]ŽMŒï®ŒžýÿÿPK!k ê‰T !ppt/slideLayouts/slideLayout2.xml´VÛnÛ8}_`ÿPŸY²,ÉFí²­ÅiÔé0qK‰\’víú[ÝÏé—ì’âÜš56î‹xÑðpæÌ!9¯ßìj†¶D*Ê›©ãŸ Dšœ´¹™:®27qÒ¸)0ã ™:{¢œ7³ß{-&ŠçxÏ7F£&xêTZ‹‰ç©¼"5Vg\þ•\ÖXÃPÞx…ÄŸ»f^0D^iãtëå1ëyYÒœ,y¾©I£[IÖ࿪¨P=š8MH¢Æ®¾ï’Þ ˆ–_ÿå k$·0ôįY\ÃÄÕŒ `-x£É(q% 1½fû‡kq)íºwÛK‰hapºõŽ×ýèÌì°ÙÚŽ÷`ùMßÅ“])kÓh7u g{óõÌÙi”·“ùa6¯.ž°Í«ÕÖ^¿wgSUëÜãp‚>œ–ÿ6ªÞ_%ÎyþQ¡†C<&ü6¼[‹6fÓŠªc^¨Î®ýi;g:²ô.åÅÞlr ­Ä¦ôZï±a>Ö þ2l„M÷úå@ÏŒæ‘æˆT£·Xi"‘Ý”(†mi±(¤).±Ä‚J}‡Ba=îÝózþ~Îâ°g±“ºd8'g¸¼ŒSZì&' S˜à·ìVHÏÑ»ºËªQ§%UÝcµåë!¸uøyð5É9œ>F¶„hi|ñª¢òxÀáf|#uu4bx"-ŸüuÚ {m.±&÷„i xéa/4<2ŸáÂÆ¬t:±¶¾žD­%Ü×&Š/£,N¢U–¸éÂ_ºá2‚ç-$nÇó0]Ž“a8üÚßý„ªiM2z³‘äbcîöÇ)AªÖ Fps{ôlìù#xKüøpá™üüϬŒú¬dœ›Óu7/VF/ÍK©e›˜¿7XÂ}nNx“œ–‘¨gdÍhAлM}ý€—Ñ)xÊ Ÿ¤ÆÞ0'–m–ÙÂOS7I³¹΃•;Oã¥G«d5Šƒ,I²U&ò¼;V­?¾}õãÛ?'ЪmúÒnús¥»ÚH ¤é8 Iê¦~˜ÁùÇî<‹Fn6†á"Mæ‹áê«)¡üp’Kb˲?‹¾ óÃG%]MsÉ/õYÎë®6ôÿD¤àÔ–‡þ +è¶.×(Fƒq`EàYÏúÖújÒ¾6ÑCËä[,.¶V"µ}½vJ@õÚ)ä`b"ï«áÙ¿ÿÿPK!x(Å4C!ppt/slideLayouts/slideLayout1.xml¼—ÝnÛ6ÇïìíZ‘õ-µ ˶†iÔéÐ ¥D¤\{C¾Öö8}’R’%'i–c7&M‘?žsþGGä»÷û‚h;ÌxNˉn]Œt —)Íòòn¢ºMŒP׸@e†-ñD?`®¿ŸþúË»jÌIv‰´0J>F}+D56Mžnqø­p Ï6”HÀ_vgf }vAL{4òÍå¥Þ®gÏYO7›<Å šÖ.Ea˜ öóm^ñŽV=‡V1Ì£VŸš$x+rA°®©il–>ÏÓÉ´0p+gh+’gX=âÕ-ÃXöÊÝï¬ZU7L­¸ÚÝ0-Ï$¡]©›íƒvšú[îTǼ·ü®ë¢ñ~à ÙB ´ýD½ò×”cx/´´LûÑt{ýÈÜt»|d¶Ùm`6•^5Æ=tÇîÜia½êìåÕ%M?s­¤àt¿qï8£ñY¶Õ¶z*˜¢µS›çªÓÛóh0"ËuG—®F®wÏ }õ\ºyÞÈ}às®ÆbÓì ¯¡_Q™n)dèºA.Vâ@°êïˆUÉ)ä®TÆër4Û0Èÿ‚ÉM›Ú¹MÀ¨är‰Á"‚äÛ‡KãÓªÙNLç$O?k‚j8Ë…öq™¦Ò^O€H PXEÁevƒ’ aZ–31кRNwÎ*ÿŸ–Ûéä^ÕëfwûŠózÝ(›ìû%¯R^öBë)é}ßvFjÂs¤ÿ©Þb—êíÉË ŠˆêžæÀº¾‚¢©ƒtˆüÙ ºvµB; _N‡y&q-ÙéÉŽïþËÉ= K\Kv{râ“åš#YâZ²×“Çòì7’%®%û=¹K›·%®%GQ`¿B´äµèp€®õ OÐ’×¢£ÚõYß„–¼38ÞU™ÿ³Æ¹][ µ‚R¼¥$sœsÔºLè*f[D6]½klýiÁS»>Y—Ôã M¤{IúË$4â¹µ0Ü…g9¨Œ†37^D¡ã:_»ƒN®Š¼ÀI~W3|] %ö}©4^ˆ9Á¨<ž"Ä42-NVЫ&<¡Ï+Uñ:UJej uqÏ¡Ë2\ ógìÐió£—hsÞˆøÇo±<}jWu±¾õ{ó·™d€~44êÛæ´M;™[ql„q23Ü™½4fq°0.½ÀN°O[.=/Áºçfë÷oÿüöýÛ¿gÈUÕtg}8f\rÑö´šåàHG¾=c#¶ÜÞ¿(0f‰ï‰ç¸î<gsgùUÞ,wœ2¬î dÝíÅrÜ_Šo‡tx;“…>Bx,ðP¼ÓŸ}-c·ÊJaº‘¦‹Ÿ÷見ó=ÚýöýÎCõ¬çîOÇk§s+άKNS¶(y\Á¡në{]]”éMm‰æ¦CÑLu­ÑÌ_«…¥î*0«´Y£×\ÄÁƱ½Q oà5ÓuIè;ñ }gà‡fÞïx^°5y:¬d­~deaéÁÈ–,UȺº¨U£Úª GÕPÝŽËìNkNá1‚„ƒû¥üݶøQìK3™‰HýÙÌôÿ;©é†$@LÍõbðÕzœN›Œ8^qW‡ò9ìä8:›±™†_‡“ÄMj×%ϳ$ç|ÏFÝ6û• ÕH¢ÀqÚȬ•›³~û ?šqÇ?döŒgÈ¡I‡çIÜOܳ9 a§Iœ¸FÑ)Ÿ bŸøØ-%€h*/X’Ï—’ý¼lØM«.Ô„3*Ö•H únÛ:7ÚäÆLïêfǟ̉ Í‰¤,umëf&ñ×fÅ Gÿµ¤ž`23îI™áÏwõ¢t(5<ÆqüŠS£Ý)½¸äø¶” [J^/Ìú¸,¦;ÄÄÍÈ×ÞÁô>n"ïŸVµÝ0Ä Ó›-Û/”™ë²$^2qÇã^O~ïÚù7žý¯h¸zÃsð…ÆDÞ±6ÞÿCpðG>¶Ë$ôcuîî.»Jü½Dû5ló-mó›Ü“ÿÿÿPK!ÕÑ’ñ¼7,ppt/slideLayouts/_rels/slideLayout6.xml.relsŒÏ½ Â0ð]ðÂí&­ƒˆ4uÁÁEôŽäÚÛ$ä¢èۛтƒã}ýþ\³M£xRb¼†ZV È›`ï5Ü®ÇÕgôÇàIÛöírÑ\hÄ\Žxp‘EQ3ðÛ@´ÎX^ÔwgƇ›ÔŒ $$©sR²šž{*Œwç?þ𶙈2¿ {¶‘lÔbBÎŒµ”ÍIJD¶¦oXCkø¶b¼"†üÎÊ9ù¶«Òrl;°*RÔF§ÏÑg«U‘Ñ9Ë6­ek„Ó’HÀ/ÖE#zkÍ1ÖN˜ÑÚ÷!É}lÍ~¡$7ä[˜ÂÆ9pÏ–eŽjRÁÄ’fJ)AÊõWÑÜpJU¯ÞþÌ›es͵Òåöš£"WF:eÃê>tbzXouÇz ~×wÉd·â•jÁhwf@Ðöê×Rst'QÖNfÃl¶¾zD6[/‘¶ú¬Ñ¢ŠU î[:NOç¦%EøÀªÇ+š –}¨fÀGÑoé$ZΪmÖë¥2Õɵugó¨'¼8Ƹ¥Dnû÷}¸vìWŒ=l·cÆ­åf"w Ë÷JûZ`JêlÍ Io[›¥K¹/©îoKÜÊéê7€[<»÷çA@õGŠúÑz”J¢v­ÍËv y>+‹ì#’ Ѽè=’r¤}ÛŒ(ƒR›ÕVh_N‚±1”\ŽÂÛh¦=CMú黇+W^—$£kVB¾#çÁV6`¡Ý þ¬˜ãÈõÃè© ¶m‡GÇü{FázÓuˆêj­Í%œ’Zk”qÐ~¬,ò´(K=P§•mI é¾S IJ¨e;úö!}Âíh°cõ ÝÏ2Ýu 8r¢èH´‘ýrhÄ­; u?Tñ:mè¼Z±Cë h}/ ¼#Ñ*Á—B« vhýmèbßy…hÄm0 ±§ÎÐW‡VAìІ£]fÇ¡sì6{I¸ c7Á¬øØ}ö’pÆn<‚ëÁAþ7šÂøxaWàAàpÝzªÐ/Æõ]•.]ÞŽúþœÊíõ•{N$½W¹ÝSTî\ÚákR®ú Þºð»%\¯úd¥ÕíÁ\³‹?ý4Œ‚E™É ÏMoÀËij#3é—ÌãÈõÜÏýµ=ª²¨hZÜm8½ÚH燎G¢’³’’úy[؇g¿„'nVϼOù}TRÆTÄÇqñN—•äm`~ß+ô±ù—ëÕ‰Íi=ôYÂN£èrSÝ>ð‹¾µý_¿À£L?ê}“=qÚ¦©“Îp’˜Q’NMoê,ÌiÎÍ0XD ?tÒ(ÒV(æ5 ;6[¿~ù맯_þ>A®ê¦´Âés!d×C^‘$‰g%f‚½ö_šÓ4ðÍÔw=o–DÓ™»ø¬¿Ø›dœêõ¯yÿÇÞ7¯ñªÈ8l%ßd¬êžõVÃ>QÞ°B¿ì±Ý½ÅõÙŒm'Šc(úز4¶¾ÕhUà—Š?´%Oš«­N’JŸ©3=Õõ]—#ƒˆâÞÿ•qþÿÿPK!2ãÕͶ!ppt/slideLayouts/slideLayout4.xmlìW[nÛ8ý`ö@¨ßŠÞµ ˶¤MP» `$:Ö”"9$íØè¶f–Ó• IIq⸎۸ý)Š<¼÷œ#‰÷õ›MÁqQQ2°¼ ׈´¬ÈíÀú0ÏíÔBBRBL X[$¬7Ãß{Íú——pKW( "úp`-¥d}ÇÅÕP\P†ˆz¶ ¼†RÝò[§äðNaרñ]7vjX«]ÏOYO‹ª@Z¬jDd†RÅ/–;q$ŒYý8$¹e*[yG¯nþ²€™Ç×jij†*õb†K@`­æwŒ)‘ Æ<lÎÒ=²þƒ³»æfÅ»õ5U©Ú•–Ó>h§™[²6goùm×…ý͂׺UL€ÍÀR‚mõÕÑch#AÑ »Ñbyu`n±œ˜ít86ÕY5Á=MÇïÒ™W#àÝgÕÅ+Ø%-> @¨ÊG§ß¤w?£ÉY·lÙÑ®¡ÚyÍCÓÙÓ’%7-·z“ÕšAØÇBÎä#sÃôÅ„ÁU¼jW#b˜5ÈáWÅG )@e%Á[($âÀì¯l¯P4!ÒÐbP)¯!‡ï÷À@Yqù€Bf"îÂs:þ¾ÍbбØZ \cX %Å¥ ǧâ“z ^Xj§Ínò7ˆ=`±Èõ{~ã$pýhÏl禽¸5‘—„nDûVjOVŒi~×øÞ«Çœ>NÇdt„k$Ù7LŸ¡‚’`´FøD£ÔqÄù²â§ÏætÅåòdÄðÄjqðçÙ?/ª²PЩyæóýC¶Ís?{Yf§Y>²Ã‘?µGY2±“xšN£ÄÏÓtg[¡3'*ºSÝúõË¿¯¾~ùï ^5MW]¨/ý¥m¬x¥ɲ^ìÓÌμ0Wï_/±GyÙy„á8KGã`úYW)^Ø/82eÏŸeW0yá“’©® N]È‹‚Ömíå0z‡8£•)¿<·-˜ÖP®7‰üÐóÒV&[ךhµð3¿j1 ÙÕÚ˜¤6ÿ¯±bª>l=²›¢sïêÍáÿÿÿPK!èg•qñk!ppt/slideLayouts/slideLayout5.xmlì™Ýr£6Çï;Ów`è5 B|zÖÙ1¶ét&›djï( º€¨»Ù×jgŸ¤’c;Ž—8Þ›NnŒ,¤ŸÎ9éGyÿagÊ Ó*%ÅPï UÁEDâ´xªŸæ¡æ©JÅP£Œx¨np¥~¸úù§÷å Êâk´!K¦pFQ ÐPM+º^E ÎQõŽ”¸àï„æˆñ¯ôA)zäì<ÓMÃpô¥…Ú̧}æ“Å"ð„Dˬ†Pœ!Æí¯’´¬ZZÙ‡VR\qŒœ½oÛ”Ü[öHæëù#¹½ÿCUä`ºâÝ@½âþG³,V ”óŽ1ÉKDÓŠòMUÎ)Æ¢U¬~¥å¬¼£rÂÍêŽ*i,ÍDUo^4Ãä×b%úÁô‡¶‰ëÍÅ“GCYU.ÚF|ꢯ™ÕQ×%·GÆFÉôÈh½]@ßYTxU÷Ô³ugž² +`ëUkoU^“ès¥„û#ܯÝÛŽ¨}Ï2iC/P͸ú¥ltÆ„m@Ï…ÒE`9†}>t_mh˜¦}èp .lx#&ßó§ ²ŠÍØ&ÃòK)>¤”Ç!CâÄàBû4«×dWã,>+Œ(8N™òU SEúŧˆu™\]Rpß!Š~?€)qJÙŽ4¥4³5OZ|Z¸UG„á.CNHs[ÌK%£ò…ÖÝð³ôr\Ór¤^\.‹÷×zAÓ·ë}ôRP%„ç”ûÙJ'Û« ðiJŽèµÜúió4 š°¼á¹NΊñBèQý5T}±oî['·†gv<à™ž×êO ‚Ô@a…Ží ú@]ó T¨ÕAmËs¬žP9p*H Ôî .¶0àL¨ 5P§ƒúÀ²D¨Î„ Ruw„2|×ì«Ôª@5To‡Ê‘ ¯TG¨ÕPýªÅs×+´¨º½sdkðÛšp*£Mw™8¤2U{‰ìœeµ)jL ÆÝÛËRðuYJ$AÙ¢ÉQ2ç]S Ã4àAQÙKRÀr¡_[U~Œ&‡p·ÓðŽH+^á¬Q÷4qž¤´?Pj’%eIo¢Õƒ˜.Ž\‰¶Ÿ-ÑÒÜË”hqþ\"Ê7Jsdt_t k@(²ûs›çTÀ·‚ýV°ß öÿ¸`;§ ¶<ò¯+ØûyJ&Á³óÔñ¢½›¨ÞŠö[Ñ~ùpÛ30A ïçE;fuÉÞùí j[Ÿ=rÕž»u‘ÅÒ‹¿íÐõœièiÁL4kℚgžæ¸îÈ &¾-ø¥½‹¹«,Íq˜>,)¾]2™Ô%Qªœ3ŒŠíY`W¾lÝ4€Û©ÃM8¡Ï™ªx­*!!âtíêâ^B—£Ç~Kï\~¼D›ËFÄo#2ËÒ+7Ëüþ .Þ%âRe1G Íwþæ:kÛ†¡ŽAh^Ž4kdNµQàN4×™zSÛ5CÏë¶m%Î|í¹f¨ûA0vãi:®ó½ûÊ T‘—$ÉïAÕ¯WB•òaâ/Ť ¸ÚÕG\D†åÁ§•ôy^xùð»ª$u-+>¬‹’Ñ÷Öe!XS˜¿V˜ÁºÚ¼òjú–Úœ6#A—‘y‘g]­Ê»yñO‘^d€~25¯<"jÛ$±“‰Çz'cÝÛ3}S=ðgáÌ ì$ û¶å2ò ¼;´[þøç·Ÿ?þ=A¯ªC· êsÉE;B+–C qùö$ŒõØrXQ ßÓÏqÝIŽ'Îì»ÜL°ÜQʈڥø#ëö7,÷ÑG™§¬æõBœ¥uÙn•´þJ­sµ[b™íþƃ„Z¾ï™­ +øÖ•·²ðs? ö Óëµj’RiêD]¢yußöHo"cﶇ.þÿÿPK!ÆÆì8ÓL!ppt/slideLayouts/slideLayout8.xml¼XÛnã6}/ÐÔgE÷›±É²­¢@6 jï0«+‰*E;ö ìoµŸ³_Ò!%ÚŠãØJœöÅ‹Ã#Μ™C‰>®‹\YaZg¤¼TÍ CUp™4+.ÕϳX T¥f¨LQNJ|©np­~¼úù§Õ ÎÓk´!K¦FYÐ¥º`¬èz,pê RáÆæ„ˆÁ_ú §=v‘ë–axz²RmçÓ>óÉ|ž%xL’eKÖ€Pœ#ë¯YUK´ªZEq 0böÓ%±MÑ’û?fkUnt7Lõ "O¦yª”¨€#R2@P3¶PF¨âH§®fcn•«_i5­î¨˜z³º£J–r¨BÕÛÖMü-WÂÐ÷¦?H ÖsZð+dDY_ª@܆ÿêü^3%in&»»Éâö€o²˜ðÖåôÎCyTÍ➇cÉpf˱bn£’ë­«k’|©•’@<<ü&¼­G3¿V‹6ýŒCµ~Í 0v‹9˜ ×°ß!š{9±l7´«‰Õs £qèÜW¶ŽHºá“ïá ¢2Y¨Óû2¯Ù”mr,ìUn¶ëIñüwp®¿Â¬-úÖÛ‰ÿó(LÊo<\jŸ§Í3ØÕ(Ï’/ # N3¦|B5ÃT©ÎȬ@Áez‡(â+è‚)iFY‡ÝJD*#A'Ø–Ë’¿ËQ‚$Oa9ÖytgézçÒŸiÛ4ÂÐl¨¶C'ô÷¨¶}ö­¶¬MppÜÞ\ŸA°0­¾¦Õñ•`ÚÏ}C¯ã*ÇÁtž»FÇUŽƒéžp•ã`z'\å8˜þ W9fpÂUŽƒžpmÆuNÅë|•oåìX'Mº Ä‹DôOý¤šÖصy|ŠR¦JŽW8ï(:æ8âl‘Ñþ€öiÀ˜,)lS}ˆÙü à'CÎvŸáv5H$àÜ-‡7¿*êoò¹Ú(“àê­{P`Ym3¿°™®åx¶{®0)¢×bÏÊô™›bÖòÞÜĬNwÁÆ÷¢lµHíæÙ ÎíÊÕž²µp¶çú^O8§+ª{ê×¹NÀcèwD![8ßÞ·§¢-\h:Üëõp{J+©0BŸo4¯ÇÛ“c‰`fo2Žh¶Äƒ6ÞÄÆÿ-ì¯WŠÍ1üDl„6ž+6){&5f“›µF<õ¨$ˆ?"ƒsøJáQüåÆ~àMâ@‹FæXsÆ|Ö9F y¾?t¢qØŽýM~ó¤*Ë gKŠo—LP¹Ÿx¥.Ø(ǨÜòîBÝtáÊôwy‡%Ù Þ¸x’•˜Îx—!£çò2g´!æÏ%¢ðÉ͉7Ô×pó¾ñeF¦y–båfYÜïåÅ{¼À?@L͉-òMeÇV<2£H ¢x¨9Ck¢ #¬ùÞ$˜¸¾Á®lky «ë[­?¾ÿýËïÿ¼C­Š‹üÚõ¹®Yk)KšA QzÖ(ˆ´Ètbè¿Ð׆±çj±k;Î( †#{òŸ˜Î ¡XGü–ʃ Óyv”Qd %5™³‹„홈^‘GL+’‰cÓh2V(çïÒfèA¶Z’`eò*ÖÊiŸòèášÓO¨º]‰)„¢ŽÄ­*+Ú Ù¹ðÈå)ÐÕ¿ÿÿPK!ý¤ïj!ppt/slideLayouts/slideLayout7.xml¬Uán›0þ?iï€ØoJ HÔ¤ I˜&um´´à‚iPíÙN–lªÔ×Ú§O²³ÁM×vRä6ÇÝù¾ï;Χg»†8[,dÍèØ Nz®ƒiÁÊšÞŽÝë«ÜK]G*DKDÅcw¥{6ùøá”$)ÏÑžm”9¨¡±»VŠ|_kÜ yÂ8¦ð­b¢A ^Å­_ ôr7Ä{½ØoPMÝ.^¼'žUU]à9+6 ¦ªM"0A ê—ëšK›¿'XBýoIjÏí AôÎuŒ›Ø‚!p'€¼X‘Ò¡¨Cf<´Qò+±ÞÑígÁW|)ŒïÅv)œºÔ±]Œëw:7óJ·fã¿¿µ[4ÚU¢Ñ+PàìÆ.(µ×O_ÛðN9Ek,Öb}ù†o±^¼áíÛüg‡jTmq¯á„Î)ì, *ðš‘ 'xhK—üœwÒ¡  i&Z¤O-|½òuG}© ñ~‚ˆˆT.åm¡ÖÙluv<ª]ÆÊ½>ôVcD#"ÕJí 6/\?*PP£ø5È“4^ä©—Í‚¹Íchù¨—zq’L£l>LûQÿÞöC PUÝ༾Ý|¹Q®Î%€høa0õ®WPw£f#úD¹š ý`ý$šhe膌t´\"¾½HÒJ L‹É·zü_•¾U%gLÏu ¡K¥D+Ì÷ p‚ÕÆÆA›ã2YFV¤.±s±in^ðÒ?/0 !õ›ÔÞܶyæ³ Ë¼4˧^4 Þ4Kæ^/ÒÅ ó4=´­ÔÈ)T÷Þn}|øýéñáÏzÕ,v0”:—ªÛ9Q,Æá,ͼ,ˆrøÿ†‰7Íã—úQ4ËÒ鬿¸×6ˆF…ÀfT)í¢Wc¾© Á$«ÔIÁšî¾ð9ûgµ¹2‚^7ä·ˆÀK{a<¦AÜɵÙÕT«…_iü°ññË­i8 Dž‡;­ë‘ƒ‹ÆnïÈÉ_ÿÿPK!=ãr(¸!ppt/slideLayouts/slideLayout6.xml¬VánÚ0þ?iï`e¿Ó$ BE€L“ÚRöÜÄ”¨Žíن¦J}­íqú$;;qéÚnª&þÄŽ}wþ¾ïιŸl+Š6Dª’³¡µšÇþÇÿÇ+Æ«œå´&éÕÄÂ2Z4䮽u:£…ÄM)F›iù3Û(¯ÿ†·ð_üúkøÿ©-¿k/MqrGª[#4ÒÛ)T§k“ 5šÏr©;,U?ü?æWÔñ+_g/¹žÑE69hÕу£ÊÊr=§W¸q…Q@Q@Q@Q@Q@Q@Q@Q@Q@Q@eøwþAòÿ×å×þ”IZ•oo©é¢Xmíí.ai¤•d’á¢oÙÈ*#n…ˆÎyÇj¥µ…Ôàüiâéºæ§o¥YÜ\[¤ÈÖrA`òFÑ&a™A× gF*À-äôÿõojÖÚ»x–Ëû>êBh­¢HÈF¶ û©Ÿ¼Xrx\0@û_hÖ¿çÂÃÿŸÿŒÑökþ|,?ð9ÿøÍ¬.cø¯PÖ,lA‰1 p±…oÏÀÈÍkéQ°-Ý”CîÁe=¼Kþìqºªþ´4½ÇFIÊÚ8 ‡t®£/+yØòÍîÄšÄУãí_ì?±Lâÿ΃þ=¼Ÿ7Ëó“ÍÛæü™ò÷ãwó®:ÛRø¥kmϤé’ï¹2Ë‚PbeùÔÌXm8 ¾bËé”PjWÿ³`{8,Zð=ËRNHÔ«q»šÇЬü5âÅŽî+Éþ;[x­¤“ÅçåÊ‚}zöÍTcϤV¢råÕ³¬®S[ø«áê2Xj> ±¶¼‹ýd &Y3Î à㱫šç,ÿ¡žÇóo𯌬¼ =ýŒ7]ÂÍ",¾^BœäV'ŒsÁ¬Ýs÷:”gde6B£àÿÀdCÆG=x5ð8óNÒXUnüÌ÷KFO•Uwô?@|7ã ÆòÏ¢ê–Ú”q6Ù ¼ŠÐ0ê3ï[ñïì»â«O x‹T7qÞH·«oj‚ÒÖI†ö— _h!@Üy>¸'õ6±ã I¼Ô.!¿h-bic°˜±U8y5ú¦G«œeÔqΟ/´¾›í'Ðùœe8ákÎ5ùmø«™Þ'ø³àßê?`×TZ–ûEKYZm>u- ‘”É0ç¿QÆ .×PGmÖðZîV@È £gœ«‚ävõ O¢¼å¾3C6¬Ú]¿‡u¤½Pµ±“íV葯šáYÃ;‚.ó•È; ÄVÿ…ØÐÿi}§Ãª½­Ìñ¤PªÈòE ÄŽü7\ÈHþÀ‚(ÓèªZ.¨šÞ“k~Ín—E8Ô\?H=A5v€ (¢€ (¢€ (¢€ (¢€0t»‹Ý+L´²}"îf¶‰a2Äðì}  Ã2ƒŒò¦í‡íøEfóĦa.Ë]ÂB/Ÿ3;°Ï\ è(ªæ¾¶&Þf<:„ÖêD^¼Œd#[Ž€ÿ-}€§é«q6«yy5¬–‰$0±ÌÈX•i ?+0ÇÎ;çƒÇ®­syÁ_üBýžüwsã­~óMÐÿ´ìooî/"¸†îÝÙdi‘$ŠÀØçnS7:{½†×àÅÐ"øféT ¡F£h3œ®õ¦Iû>üM›o™ák‡Ú6®íBÐàzßWÜôWʨ9NÜÓÿÀ—ùŸöÞ+²û¿àž û3ü)ñ€ïuCÄK¦›ˆ’mÌÑÊí‚IbQ˜Óç¯LsïtQ_o—à(å˜X`ð÷äí}^­·ø³Ç¯ZxŠŽ¬÷ðÇÄ??fˆºÿÅÍk^ðÞ‘ý©a}*ÜEq ì¼m±AR$‘H ƒÈÈÆ9í^~¿²ÏÆUÀ¸.ÁZÓîç8ÿ_Ó<ýkôzŠûª0+ŒÜ\jv¬±¯L²³`@O ¯ÑÚ+oõŸÒ1ûŸù™ÿcáû¿½‘WJ²þÍÒìí y†Þ‹v1ªJn©¤Ú렸ˠ`êÈ쎌:2ºÊzò<š¹E|Žúžé…ÿíðàxŸV°òíê`Í[Òô4¹eŸÌšîö`·wO¾F ®I;TÉ'&´¨¤EPEPEPEPX6ú]ž«©êï{i ãEr±Æn#l_&&ÀÏA–cÇrkz°mõK-+SÕÒöî6–ådŒ\H#Þ¾LK¸g¨Ê°ã¸5q¾¶%ù˜šþ±áêãKŸG¶›Ph¡•-ⵋs‰gFqËœÑxÜWrå<'®ø'Æ××Öš=…¥Ô¶+ºÍ€A ’5‘·(Õl•ê0r·â Ox¢âÞmNþÖâKvWƒ“ ‰Õ·,ˆÀWøÇÍŽ3Ž(Ðìüá»É®ôÉôË+‰¢He’;¥ÌˆŠª¾o›h^ é–ÇÞl¿Ì=ÒmrMÁMa¨ÈÖZŸœÉspÅ`g“#aÏï*ã?‡Z¿yãMO¶[‹­oO·™TI%Ê*åˆ 2Or@üj®­&•â¹ôû lõ{o9Þæ–hü¿&EùÇ#²Œ¹ö­«Í.ÏRµ[k»H.­Õ•Ä3F)NÆAB_¹§=îG½¯)ùß®øƒPÖµ‹Ëë»Ù®n'•¤i ÎIéÏÐt®Â5­y6ÒÛ.$XÕ–]ø,±²çnz¬Šp9ëÇO^Ðu Y½²¼²žÞæ™7Œ‚'Û‘èzÍXƒÄíªÆ±K2yaB‘ÈÚqéß"¿“k}oë5½·´øž×îÏÓá콜99v]Š7°êk¢]yð3.à®ÄdƒùAˆ"½ûöMñÔ:ü$zv³­Çom¾ÏìP^\WóÈÃI™Ó5àz…ΣªÈ²] euåã©,O’I$ž¤šúöCð«H|K¨ê:Xkröcžâ@–?<±BG ‘ë_SÁßYþÛ‡´çöv–÷íצö<ÜÛÙýMòòóiùÿ‘ô%÷Œ4-6ÖK›­fÂÞÞ1—–K” £8É9àWçÄOŸ|vñ;kÞ!¾MukØâÖvo.ä‘b€c ƒ`úŒæ¿K/¬-µKI-o-â»¶aᣠç ~`|mð~±¤ü^ñ”si7P¤Ú½ÝÌ8¶´RLï.*Ã¥~×›6¨EÒNüß…¼Ìñ¼Ö]‡¶©á»{Íá5ÝBå~ÑgöèIBùû@»ã ‚ 's|¼f¬Ã?„îíaŠ=RŠçìâY$šöDÈævL˜ŠõòW#®N { ønÖÞ×Ó^4130ŽV…XÛ³6â9ó¶+à!8Ëdƒ]ðÇ…ÿ²õ tˆ5f¹…ÈŽâ6c³°#îŽllÿx8é´Ÿ›ÿiWæyÊþGCû?øÖ_ ü|Ò¾Íâ ˜ü>÷sC$×—c’ÛkàÉ»  È +ô øÛÃë¥DëvÇÉûGÚ>Ò›<½»·g=1Í~wþÌ^ Õ5ožݤ\Mg¯-ÓKò’?-/‘ŒÏR@ï_£çI²m,é†Î§~Ìlü±åy[vù{1»xÆ1Ž+éò÷gí“¿3û¬»ž–Ÿ‘Øüéý¢¼W«x³ã~»–«=ýªÊ‘Y-µÁ1ÄjFÌ ubG“\=–ƒâ»ë‹H—í±‹©c‚9$™•7¾ÝªNzÊØë´îÆ9®ïöð޳῎ºõ;—=¼M¤±5ÙúyËcýÛÜý>𿎴moE¶u½>âuàÇpŸ,»™NnéÚŸsã­.KæéwVº¾³¸(°·¸MɕݾLd¤`ul@ ¦ç…t84ÖÞ+Hm&hÑ®(«¾]Š¬ÍŽ§å>£Ôü-muyý£f±iúʰq*Yð»vKкÁRG@AR‰KÙÝò§ä~…{+œÄÞ>nnb}^ÊÖ{y|™­—C¼¸ò\ª»Ã.íÅ€VÚž=+£ð÷‰›Vkx®!‰êÛí–—²!¹‡åË)* ‘½2¬?Œ`·ÍŒ-CÁw…Ô’Ýh=ô’8i¤þÒ¸.ˆ ©’+T¬\)Î:œôzf‹rš€Ôu+˜î/&‚íâ1ÃlU˜I,Ä¢e‰þ…\¶qèh3ÅZ–³¦&˜Ú6™¨ó^,71É'–#…‘ó&ìmm™á¸ÈÇqį¼~o¥˜xµ¶•…©½ (‘™Fò¸%ðª‡ÍÁé:’\ɧÝ%œ‹ÛD¢¾Òx=ñØý p¶þñܶº•µïˆ­qu¦I Mj;¶\ S*JybM¤üÔ±øÛÅ÷–sÍ„ÖEÓn.#†{‰ 5ʤM G÷@Ûäé“òàá²¢|uãHn£†OµÔjïγ˜Ãd#FFSŽYðW¡. 8ZÿðüK³Õ„±ø– Ëiæ‰Yd*À‹û|Œ¶épJ†¹Ê\¹Ñþ#]ɨI¹gb†kk"9ØfýËòŽˆ}Ü1Îrß0òÎÌ-æ\ºñ—Šmuø­WÁ³O`÷ëeö˜î”툷7'¸o]Ù\ð îk’ðŸ‹íuyÆ¿¨Z^iëc6ñ…f•¥|/A€‘¬`ŸãgvÂŒ*õ´t¡EPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPEPÿÙPK!ODþ‹Ìx!ppt/notesMasters/notesMaster1.xmlìXïnÛ6ÿ>`ï hÕ¢þ˨SÄJÜHÛ N€–h[Eií$ ôµ¶Çé“ìH‘þ—,u3oX‘|±ŽÇã‘üñwÇ3_¾º©¨µ$¼-k6°Ñ ×¶Ëë¢d³ýñrä$¶Õ Ì LkFö-iíWG?ÿô²é³Zö-náxamì¹M¿×kó9©pû¢nƒ¾iÍ+, Ég½‚ãkð^ÑžçºQ¯Â%³õx¾Ïøz:-srR狊0Ñ9á„b;hçeÓoÍ>ÞNZp£Fo-év˜i!¿“Y÷ûL­²¸œ\î+Ï$£ÜZb:°'3d÷Ž^ö´±–äà¶¹ä„H‰-_ófÜ\p5ûåŸàÒ¶®aé@uh3ÕdK%ôv†ÏŒˆû7S^É/ÀcÁ áoåoOêȰòN™¯µùüý=¶ùüôëž™ ·1©ÜU·¸»ÛñÌvÞ\A.(Îɼ¦RV)c³ø¶9¯ó«Öb5lNbÑíueÑ ¿ÍÜ· ø˜ùi`ÿ¶À(¨‡tvJX/r„¼4F‰«w„Iœ$[ÛÇý†·â5©+K ›“\(&àåy+:Sc¢ÖÑÍÞôÅͰ.n¥å¾€ŒŸ×ü“mÑ3ÖìL-T#c|³g²Õ#hVÓÕh+Æâ–%/)‚i-LgÔT­¯ Ó ’ˆ!`¹Þ•¶ìä …˜c9Œb™s>ŽõÈFíÎìJmôaFø†'X->x‡àC!l›ßÍ?I‚ùO…ü±|˜ÒBäïCÏ;EYzâd£Ôu‚Qpâ G>r‚0;ö‡‘w¦égÛ ·(+2*g NÞ/:xø©¬¶%˜­6 ŽÒ !#£X®F¨5MeB>43ÃÌ1- bUx¶MPÿÛéC-´”ÍaQä¸m€ û±·¥ÅY5Ó Vñð] v¢$T4–"ønw k'ž—F†Ç¾›Dhuä"2†ÛTRÚQY×’E1øTàÔ€£ì5n×÷#€z¥çݰ’dcÿUtX˜åàg`çB]k¢«Æ¿ùBïw²bÚbVpˆÔ'!Ú¾ ;)Ú~6hºa¸C£0H¢`E# TÐYü@ùp}È2#B¾[Y(@vó’NE§E),]ë ‰F+}µëÄÔ¥ÌÎï–su€;“¼f…EÉ’Ð=<ªôð°ÇËyÉ÷w¨xò°ÃQ½àb¾·GEëox,§÷:Î(>>ºt}ŠÌùçµìé0sQ–…N„¨`O³Ì9ÝÌñ=÷4‹S(eQ°ªe[I ‡·o ûõË¿|ýòç Xõ1opºp8Z²¼”Eù0¼,:CŒœà$ãQ:£Ð‚l˜gþégù¬‚~Ήzñ8+Ì[ î¼–TeÎë¶žŠy]ég—^S_ÞÔ¥zyA®~¾QÅ—øŠL_3L­Í|Õje\蕜ò·¸±&3Ñ/ h7 W MfžÔyRçIH8Ï `¡£ñŒfeão4ÑFMh4‘ÑÀm1§%»0äǶ¦5}Ó)ŒÔ¥õøu‡”æçu^³€š—x2fúi†ž¢¹2!øœ ù•úË _¯˜nB—üûP²ÙÅ‚uÿv8¢Ä¶®—v’îwjîW)ÀönÍ ‹–“*bO!à ì_+æP¡ÓÞé X?µ;y«}w ÜŽ<%zkdPqô ÂDÃã¯á1§¿¾…ïúêÏÀkPÚô¶ðÃaÙ0J›þÞïµ{}S¿¥ÍƾYéö½¦× ˆ’dº…®øz°Zí2atÇ oûÞ°Y[Â3T9]©|"‹b-Fw@;I’8r1Ã4\€(9âÄÙ%a7C 0\©U†•:|«?O·´GÑyŒrÒéÐHl )>Žq2“÷*husÏž=øôùÃߟ?zôüá¯Ë¹·åvPæå^ýôÍ??|éüýÛ¯kÇ‹<þå/_½üãÏÿR/ Zß=yùôÉ‹ï¿þëçÇx—££<üÄX8×ñ‰s“Ű@Ëøˆ¿Äa„H^¢›„%HÉXÐèë D‘׿osH6àåù]ƒðAÄç’X€×¢Øî1F{Œ[×tMÍ•·Â< í“óyw¡cÛÜÁ†—óÄ=±© "lÐܧàrâKG=cSŒ-bw1ìºGFœ 6‘Îâô±šäÑ” íü²°¶Ù»íôµ©ïãc {Q›JL 3^Fs‰b+cÓ¨¡YÇÀ?NÐŒg O¨L…h˜tÜ‘\ú]2ËŒ ÙG"JaúQºþ˜HÌJbˆõ¼h’q«ÖšjŸ(¹våÓ³œþÉ;O&x$ F².Ç™Kk¿p>$ò' l$a*ÅPàˆyŠ&ЗhéèZ×¥W«yùâÅùãçç;òäüñ/‹¾7í®Á$,Û½þñë¿¿ÿüõ믟~cÆó2þÕÏ_¾úý7¹­oŸ½zþìåw_ýùÓS¼Çภ?Æ1âà&:wh,hèÙÛYG—-zIÈa3z(" }s 4àúHã=&Eü:{ >ŠØL`ðFkÀCJIŸ2ã˜nd}•£0KBsçlVÆÝðÄÔ··–åá,•S›\zÒhÞ&2å0D  »G§Ìîc¬ÅõûŒr:à>}ˆ!9Æcm6­Œ®áXæen"(ó­ÅæðèSbr?@':R® HL.ÑÂxÎŒŒaLÊÈ("É£9óµ€s!3"BÁ0@œ›ln±¹F÷†”sÚÉ<Ö‘Là© y)-#têE0Nœq•±Ÿñ©œ¢ܦÂH‚ê+$«Ë<Àdkºïa¤¥ûâµ}WÊy‚dwfÌ´$Õ×ãœL RΫkºãäB‘_“w÷¿‘÷÷&ì»—ôÃÆ5µ.äÛpëòíQà_½p–ÜFrÁ|ïâýïmëy÷’½Riu¨/ŽîÊM|Á9~‚ 9s‚¸Ry.Œd£ª(ÓåÃCÉâ¢S 2¨Ê€Qñ9ÑQSÙYMõò…냔r¹O¨f£oµÏÌâCä­µZñ¼*  XµË}¦h—»’È[›­ÕƒÙÒ½ª…ê1º Ù¾ ‰Rg:‰†D«h¼€„ÙNXt ,Ú™û­,Ôe‘¹ Ìþðpœ‘œu  ËSn_dwç™ÞL}ØuÃð:×ÝdZ#Qšn:‰Ò4Œ`€Ö›wœëÎ*¥½,›4Zí÷‘ëLJÖ´$z œÊ5×p¥¦]k"Oˆ²§ÒÏÔ’0éZ¾Xúß(Kʸ@å0u+Œb€àXÎõrH²âV«·²1~ ä:ö‡9u)'M&È[ZVUy/wb¼ûŽà¬Bg’ôQœ‚1™±;PÊmÕ²˜‹e4ÌJ“{Å5¹Z,Eí´Õ…$àbG)‹yWå%Ò8ÓõQéõÅ`Æa–¤wÞu/6ZÍ-H¶kšõãýmò%V+Ý×XåÒ½®uBë¶íï¾!”¨­:Ó¨eŒ Ô¶í;<”º[NÍm{Ä®wƒõY›mÅéRÕ6^[Ðñ9óòÐ:#‚çÿœÉ'¯ø«9WÕZ¨Ë™3†»ÖCÛí9^Ýõ*vÛVœ†cWÚn¯Qé¹n£6tkö _$ƒ"¢¸ææ}äS ™/Þʨö73qqؾäÓ¸JÕi¸ªŒÕ›™Z}û›€ed6ë£N£ÓoV:Þ¨â úíJÇkö+ƒ¦×ŒžÛîŒYàD^ÃsšÃv¥Yó¼ŠÓ´3úíN¥åÔë=§ÕkÞ£E¬åÈ‹k^ÅkÿÿÿPK!´ÏX¹$,ppt/notesMasters/_rels/notesMaster1.xml.relsŒÏÁ Â0 à»à;”Üm·Ddí."ì*óJ—uÅ­-m÷övqàÁK ÿR7ïy"/ Ñ8Ë¡¤´ÊõÆj÷îz8‰IÚ^NÎ"‡#4b¿«o8É”Cq4>’¬ØÈaLÉŸ‹jÄYFê<Ú¼\˜eÊmÐÌKõYUG¾ “´=‡Ðö%nñøí†Á(¼8õœÑ¦'XÊYÌ  J×ÉZ+š=`¢f›ßÄÿÿPK!nëh¾ˆ.ppt/viewProps.xmlŒRÁNÃ0 ½#ñQîÐFjÝBpဴÁ=J¼.¨M¢8Ûº}=nÚ 8pjm¿÷üìx…¯>\VÉÉ©?i£*T¿•s_ë¥gÓ·d®xK§¿ï/µ­7›ü)~qŠÊˆ|êþX†‹å2Ä!¢«d&÷(%Â1Æôž.ÖÉ|õÓuêv1uÉ*«¾Ù=lŸXå¡(c£€¢8ÂcÐ8FYN‚,‹Ã$ 1ùa%YVBn÷?›´¬Ÿ´ifûæÿ6žøW¶¤õ¥Ü ]ȈIgŠÇAaJËÍ#žcBò,ˆ‘úJ|…¢cÐæFÛà°ZxB¾æÅÜÂàí—Ç^N x\Uíÿ¿‡}¿(k¦Ùh0̘ÂJe¶Ól“Ï/¾f$Da¤ÐÖÀ4{…ÝðÏŸØÊ[>*%L˜fUŒnBi(*¨E`Ù`¥´¾C¿¥¶,Uw¶x®ÁDz9Ž)¼D0ä…ë³Vq²‹ÿ**mÑôóW‡zœåP;-"ð‡Ä&9Ê£]šå6 «øÕó]ľ[/¿¼f´EìÖ9­ Ñ0¾T…·Á–‘ìuWö'ø•U&2Ú'¢]°½ÍS÷|ö¢­=Sb+áÅÖ W>#å²µV0Íè±o6¶‰°…’̾:dô$fËåL+— ÈÖ…Ð0CÇx)t@cŽ ¶ÑLÃJ(Ì]œì ˆÖ“ ~á<Œ3ò$4>O³ðJ˜˜µ´6HX»=Ÿ[ÙŒvÉûÜ>VWüK" øØjí_õµG¡ì#¹ŠÂÿ‘‚ä#âS‡Û#J|óxÆðë¾á©‡Öî¶[Ô×ýö:4Z=yõQÜ«mÏ2N׿ á8ø¤?Ïïœ:ÜùÍ-ï•ù6.·wÍ6î‡ð4ÉÖ•ð qÑ»!ílvxÝðg•0[ÎûB³Àíwk0Ä/íê!×,äáOÄÿÿPK!#I…xs×docProps/core.xml ¢( Œ’AOÂ0Çï&~‡¦'=Œn€Ë‰F"·¦{@ãÚ.í“Á··0 ’è±}¿÷ëë¿MF•“5X'Ò¨RZ˜Lêå¾ÍÇAŸ‡\g<7†t ŽŽÒë«D±0¦Ö`Q‚#Þ¤],Š!]!1cN¬@q×ò„öÅ…±Š£_Ú%+¸øâK`í0ì1È3ŽœU hŒt¯ÌD£,¾m^ 2Á ‹Z;²V¹‹ uå„T·\DņÞ8Ù€eY¶ÊNúù#ö1y™ÕW ¤®²@Ó$1JÌ!šìÔHdjÁù‰9ú°Ö+,p46}5[2ó”9¹ytè÷™™–ÜÂmÝu`«7ȹÉ®…„ìaûwûï–Êba-«öj¢Y&û8wGBF| ñ.´Cå½óø4Ó´F÷A8¢»y»‡ý¸;ø¬¦=ë? Õ~€»ƒø®b<Òzâó¯˜þÿÿPK-! bðRáZ[Content_Types].xmlPK-!G¿Ðu _rels/.relsPK-!Ø‚kÖÎ \ppt/slides/_rels/slide1.xml.relsPK-!?-žgpppt/_rels/presentation.xml.relsPK-!K5z¬:Ò Ï ppt/presentation.xmlPK-!Š y H; ppt/slides/slide1.xmlPK-!ÕÑ’ñ¼7,rppt/slideLayouts/_rels/slideLayout7.xml.relsPK-!ÕÑ’ñ¼7-xppt/slideLayouts/_rels/slideLayout11.xml.relsPK-!J¯u9Ò¿*ppt/notesSlides/_rels/notesSlide1.xml.relsPK-!ÕÑ’ñ¼7-™ppt/slideLayouts/_rels/slideLayout10.xml.relsPK-!IôGô¹ ppt/notesSlides/notesSlide1.xmlPK-!ÕÑ’ñ¼7,Ÿppt/slideLayouts/_rels/slideLayout8.xml.relsPK-!ÕÑ’ñ¼7,¥ppt/slideLayouts/_rels/slideLayout9.xml.relsPK-!ÕÑ’ñ¼7,«ppt/slideLayouts/_rels/slideLayout4.xml.relsPK-!i¢_!Ç,±ppt/slideMasters/_rels/slideMaster1.xml.relsPK-!ÕÑ’ñ¼7, ppt/slideLayouts/_rels/slideLayout3.xml.relsPK-!ÕÑ’ñ¼7,!ppt/slideLayouts/_rels/slideLayout1.xml.relsPK-!ÕÑ’ñ¼7,"ppt/slideLayouts/_rels/slideLayout5.xml.relsPK-!µv“§Üm ""#ppt/slideLayouts/slideLayout11.xmlPK-!(‘ⓨ ">'ppt/slideLayouts/slideLayout10.xmlPK-!k ê‰T !&+ppt/slideLayouts/slideLayout2.xmlPK-!x(Å4C!î.ppt/slideLayouts/slideLayout1.xmlPK-!Ò…-¨Z2!a3ppt/slideMasters/slideMaster1.xmlPK-!ÕÑ’ñ¼7,ú:ppt/slideLayouts/_rels/slideLayout6.xml.relsPK-!jQ)·z!<ppt/slideLayouts/slideLayout3.xmlPK-!2ãÕͶ!¹@ppt/slideLayouts/slideLayout4.xmlPK-!èg•qñk!ÅDppt/slideLayouts/slideLayout5.xmlPK-!gÅ‚àÀe!õIppt/slideLayouts/slideLayout9.xmlPK-!ÆÆì8ÓL!ôNppt/slideLayouts/slideLayout8.xmlPK-!ý¤ïj!Tppt/slideLayouts/slideLayout7.xmlPK-!=ãr(¸!4Wppt/slideLayouts/slideLayout6.xmlPK-!ÕÑ’ñ¼7,›Zppt/slideLayouts/_rels/slideLayout2.xml.relsPK- !h<'×11¡[docProps/thumbnail.jpegPK-!ODþ‹Ìx!sppt/notesMasters/notesMaster1.xmlPK-!{C¼]ÄÏ yppt/theme/theme2.xmlPK-!s°§€ppt/theme/theme1.xmlPK-!´ÏX¹$,P†ppt/notesMasters/_rels/notesMaster1.xml.relsPK-!nëh¾ˆ.S‡ppt/viewProps.xmlPK-!Øý¬¶ ‰ppt/tableStyles.xmlPK-!£d#k2ç‰ppt/presProps.xmlPK-!„Ü̇p£‹docProps/custom.xmlPK-!'ß¹°  âŽdocProps/app.xmlPK-!#I…xs×%’docProps/core.xmlPK++ Ï”lock_requirements.md000066400000000000000000000040761362133436400346050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# lock ## Overview The **lock** adapter implements synchronization needed with the **threadapi** adapter. A functional Lock adapter implementation is only required if the optional threadapi adapter is being used. ## Exposed API **SRS_LOCK_10_001: [** `Lock` interface exposes the following APIs **]** ```c typedef enum LOCK_RESULT_TAG { LOCK_OK, LOCK_ERROR } LOCK_RESULT; ``` ```c typedef void* HANDLE_LOCK; ``` **SRS_LOCK_10_015: [** This is the handle to the different lock instances **]** ```c HANDLE_LOCK Lock_Init (void); ``` **SRS_LOCK_30_001: [** If the **lock** adapter is not implemented, `Lock_Init` shall return NULL. **]** **SRS_LOCK_10_002: [** `Lock_Init` on success shall return a valid lock handle which should be a non-`NULL` value **]** **SRS_LOCK_10_003: [** `Lock_Init` on error shall return `NULL` **]** ```c LOCK_RESULT Lock(HANDLE_LOCK handle); ``` **SRS_LOCK_30_001: [** If the **lock** adapter is not implemented, `Lock` shall return `LOCK_ERROR`. **]** **SRS_LOCK_10_004: [** `Lock` shall be implemented as a non-recursive lock **]** **SRS_LOCK_10_005: [** `Lock` on success shall return `LOCK_OK` **]** **SRS_LOCK_10_006: [** `Lock` on error shall return `LOCK_ERROR` **]** **SRS_LOCK_10_007: [** `Lock` on `NULL` handle passed returns `LOCK_ERROR` **]** ```c LOCK_RESULT Unlock(HANDLE_LOCK handle); ``` **SRS_LOCK_30_001: [** If the **lock** adapter is not implemented, `Unlock` shall return `LOCK_ERROR`. **]** **SRS_LOCK_10_008: [** `Unlock` shall be implemented as a mutex unlock **]** **SRS_LOCK_10_009: [** `Unlock` on success shall return `LOCK_OK` **]** **SRS_LOCK_10_010: [** `Unlock` on error shall return `LOCK_ERROR` **]** **SRS_LOCK_10_011: [** `Unlock` on `NULL` handle passed returns `LOCK_ERROR` **]** ```c LOCK_RESULT Lock_Deinit(HANDLE_LOCK handle); ``` **SRS_LOCK_30_001: [** If the **lock** adapter is not implemented, `Lock_Deinit` shall do nothing. **]** **SRS_LOCK_10_012: [** `Lock_Deinit` frees all resources associated with `handle` **]** **SRS_LOCK_10_013: [** `Lock_Deinit` on NULL `handle` passed returns `LOCK_ERROR` **]** map_requirements.md000066400000000000000000000177051362133436400344350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocmap requirements ================ ## Overview Map is a module that implements a dictionary of STRING_HANDLE key to STRING_HANDLE values. ## References [strings_requiremens.md] [json.org](http://www.json.org) ## Exposed API ```c #define MAP_RESULT_VALUES \ MAP_OK, \ MAP_ERROR, \ MAP_INVALIDARG, \ MAP_KEYEXISTS, \ MAP_KEYNOTFOUND, \ MAP_FILTER_REJECT DEFINE_ENUM(MAP_RESULT, MAP_RESULT_VALUES); typedef void* MAP_HANDLE; typedef int (*MAP_FILTER_CALLBACK)(const char* mapProperty, const char* mapValue); extern MAP_HANDLE Map_Create(MAP_FILTER_CALLBACK mapFilterFunc); extern void Map_Destroy(MAP_HANDLE handle); extern MAP_HANDLE Map_Clone(MAP_HANDLE handle); extern MAP_RESULT Map_Add(MAP_HANDLE handle, const char* key, const char* value); extern MAP_RESULT Map_AddOrUpdate(MAP_HANDLE handle, const char* key, const char* value); extern MAP_RESULT Map_Delete(MAP_HANDLE handle, const char* key); extern MAP_RESULT Map_ContainsKey(MAP_HANDLE handle, const char* key, bool* keyExists); extern MAP_RESULT Map_ContainsValue(MAP_HANDLE handle, const char* value, bool* valueExists); extern STRING_HANDLE Map_GetValueFromKey(MAP_HANDLE handle, const char* key); extern MAP_RESULT Map_GetInternals(MAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count); extern STRING_HANDLE Map_ToJSON(MAP_HANDLE handle); ``` ### Map_Create ```c extern MAP_HANDLE Map_Create(MAP_FILTER_CALLBACK mapFilterFunc); ``` **SRS_MAP_02_001: [** Map_Create shall create a new, empty map. **]** **SRS_MAP_02_002: [** If during creation there are any error, then Map_Create shall return NULL. **]** **SRS_MAP_02_003: [** Otherwise, it shall return a non-NULL handle that can be used in subsequent calls. **]** ### Map_Destroy ```c extern void Map_Destroy(MAP_HANDLE handle); ``` **SRS_MAP_02_004: [** Map_Destroy shall release all resources associated with the map. **]** **SRS_MAP_02_005: [** If parameter handle is NULL then Map_Destroy shall take no action. **]** ### Map_Clone ```c extern MAP_HANDLE Map_Clone(MAP_HANDLE handle); ``` **SRS_MAP_02_038: [** Map_Clone returns NULL if parameter handle is NULL. **]** **SRS_MAP_02_039: [** Map_Clone shall make a copy of the map indicated by parameter handle and return a non-NULL handle to it. **]** **SRS_MAP_02_047: [** If during cloning, any operation fails, then Map_Clone shall return NULL. **]** ### Map_Add ```c extern MAP_RESULT Map_Add(MAP_HANDLE handle, const char* key, const char* value); ``` Map_Add adds to the map a pair of key, value. **SRS_MAP_02_006: [** If parameter handle is NULL then Map_Add shall return MAP_INVALID_ARG. **]** **SRS_MAP_02_007: [** If parameter key is NULL then Map_Add shall return MAP_INVALID_ARG. **]** **SRS_MAP_02_008: [** If parameter value is NULL then Map_Add shall return MAP_INVALID_ARG. **]** **SRS_MAP_02_009: [** If the key already exists, then Map_Add shall return MAP_KEYEXISTS. **]** **SRS_MAP_02_010: [** Otherwise, Map_Add shall add the pair to the map. **]** **SRS_MAP_02_011: [** If adding the pair fails then Map_Add shall return MAP_ERROR. **]** **SRS_MAP_02_012: [** Otherwise, Map_Add shall return MAP_OK. **]** **SRS_MAP_07_009: [** If the mapFilterCallback function is not NULL, then the return value will be checked and if it is not zero then Map_Add shall return MAP_FILTER_REJECT. **]** ### Map_AddOrUpdate ```c extern MAP_RESULT Map_AddOrUpdate(MAP_HANDLE, const char* key, const char* value); ``` **SRS_MAP_02_013: [** If parameter handle is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG. **]** **SRS_MAP_02_014: [** If parameter key is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG. **]** **SRS_MAP_02_015: [** If parameter value is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG. **]** **SRS_MAP_02_016: [** If the key already exists, then Map_AddOrUpdate shall overwrite the value of the existing key with parameter value. **]** **SRS_MAP_02_017: [** Otherwise, Map_AddOrUpdate shall add the pair to the map. **]** **SRS_MAP_02_018: [** If there are any failures then Map_AddOrUpdate shall return MAP_ERROR. **]** **SRS_MAP_02_019: [** Otherwise, Map_AddOrUpdate shall return MAP_OK. **]** **SRS_MAP_07_008: [** If the mapFilterCallback function is not NULL, then the return value will be check and if it is not zero then Map_AddOrUpdate shall return MAP_FILTER_REJECT. **]** ### Map_Delete ```c extern MAP_RESULT Map_Delete(MAP_HANDLE handle, const char* key); ``` Map_Delete removes a key and its associated value from the map. **SRS_MAP_02_020: [** If parameter handle is NULL then Map_Delete shall return MAP_INVALIDARG. **]** **SRS_MAP_02_021: [** If parameter key is NULL then Map_Delete shall return MAP_INVALIDARG. **]** **SRS_MAP_02_022: [** If key does not exist then Map_Delete shall return MAP_KEYNOTFOUND. **]** **SRS_MAP_02_023: [** Otherwise, Map_Delete shall remove the key and its associated value from the map and return MAP_OK. **]** ### Map_ContainsKey ```c extern MAP_RESULT Map_ContainsKey(MAP_HANDLE handle, const char* key, bool* keyExists); ``` Map_ContainsKey returns in parameter keyExists if the map contains a key with the same value as parameter key. **SRS_MAP_02_024: [** If parameter handle, key or keyExists are NULL then Map_ContainsKey shall return MAP_INVALIDARG. **]** **SRS_MAP_02_025: [** Otherwise if a key exists then Map_ContainsKey shall return MAP_OK and shall write in keyExists "true". **]** **SRS_MAP_02_026: [** If a key doesn't exist, then Map_ContainsKey shall return MAP_OK and write in keyExists "false". **]** ### Map_ContainsValue ```c extern MAP_RESULT Map_ContainsValue(MAP_HANDLE handle, const char* value, bool* valueExists); ``` Map_ContainsKey returns in valueExists if at least one pair in the map contains the value parameter. **SRS_MAP_02_027: [** If parameter handle, value or valueExists is NULL then Map_ContainsValue shall return MAP_INVALIDARG. **]** **SRS_MAP_02_028: [** Otherwise, if a pair has its value equal to the parameter value, the Map_ContainsValue shall return MAP_OK and shall write in valueExists "true". **]** **SRS_MAP_02_029: [** Otherwise, if such a does not exist, then Map_ContainsValue shall return MAP_OK and shall write in valueExists "false". **]** ### Map_GetValueFromKey ```c extern const char* Map_GetValueFromKey(MAP_HANDLE handle, const char* key); ``` Map_GetValueFromKey returns the value of a stored key. **SRS_MAP_02_040: [** If parameter handle or key is NULL then Map_GetValueFromKey returns NULL. **]** **SRS_MAP_02_041: [** If the key is not found, then Map_GetValueFromKey returns NULL. **]** **SRS_MAP_02_042: [** Otherwise, Map_GetValueFromKey returns the key's value. **]** ### Map_GetInternals ```c extern MAP_RESULT Map_GetInternals(MAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count); ``` **SRS_MAP_02_046: [** If parameter handle, keys, values or count is NULL then Map_GetInternals shall return MAP_INVALIDARG. **]** **SRS_MAP_02_043: [** Map_GetInternals shall produce in *keys an pointer to an array of const char* having all the keys stored so far by the map. **]** **SRS_MAP_02_044: [** Map_GetInternals shall produce in *values a pointer to an array of const char* having all the values stored so far by the map. **]** **SRS_MAP_02_045: [** Map_GetInternals shall produce in *count the number of stored keys and values. **]** ### Map_ToJSON ```c extern STRING_HANDLE Map_ToJSON(MAP_HANDLE handle); ``` **SRS_MAP_02_052: [** If parameter handle is NULL then Map_ToJSON shall return NULL. **]** **SRS_MAP_02_048: [** Map_ToJSON shall produce a STRING_HANDLE representing the content of the MAP. **]** **SRS_MAP_02_049: [** If the MAP is empty, then Map_ToJSON shall produce the string "{}". **]** **SRS_MAP_02_050: [** If the map has properties then Map_ToJSON shall produce the following string:{"name1":"value1", "name2":"value2" ...} **]** **SRS_MAP_02_051: [** If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL. **]** optionhandler_requirements.md000066400000000000000000000143261362133436400365220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# OptionHandler # Overview Option Handler is a module that builds a container of options relevant to a module. The options can be later retrieved. It does so by asking the module to clone its options or to destroy them. `OptionHandler` is agnostic to the module it serves. ## Exposed API ```c #define OPTIONHANDLER_RESULT_VALUES OPTIONHANDLER_OK, OPTIONHANDLER_ERROR, OPTIONHANDLER_INVALIDARG DEFINE_ENUM(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES) #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "azure_c_shared_utility/umock_c_prod.h" typedef struct OPTIONHANDLER_HANDLE_DATA_TAG* OPTIONHANDLER_HANDLE; /*the following function pointer points to a function that produces a clone of the option specified by name and value (that is, a clone of void* value)*/ /*returns NULL if it failed to produce a clone, otherwise returns a non-NULL value*/ /*to be implemented by every module*/ typedef void* (*pfCloneOption)(const char* name, const void* value); /*the following function pointer points to a function that frees resources allocated for an option*/ /*to be implemented by every module*/ typedef void (*pfDestroyOption)(const char* name, const void* value); /*the following function pointer points to a function that sets an option for a module*/ /*to be implemented by every module*/ /*returns 0 if _SetOption succeeded, any other value is error, if the option is not intended for that module, returns 0*/ typedef int (*pfSetOption)(void* handle, const char* name, const void* value); MOCKABLE_FUNCTION(,OPTIONHANDLER_HANDLE, OptionHandler_Create, pfCloneOption, cloneOption, pfDestroyOption, destroyOption, pfSetOption setOption); MOCKABLE_FUNCTION(, OPTIONHANDLER_HANDLE, OptionHandler_Clone, OPTIONHANDLER_HANDLE, handler); MOCKABLE_FUNCTION(,OPTIONHANDLER_RESULT, OptionHandler_AddOption, OPTIONHANDLER_HANDLE, handle, const char*, name, void*, value); MOCKABLE_FUNCTION(,OPTIONHANDLER_RESULT, OptionHandler_FeedOptions, OPTIONHANDLER_HANDLE, handle, void*, destinationHandle); MOCKABLE_FUNCTION(,void, OptionHandler_Destroy, OPTIONHANDLER_HANDLE, handle); #ifdef __cplusplus } #endif /* __cplusplus */ ### OptionHandler_Create ```c OPTIONHANDLER_HANDLE OptionHandler_Create(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) ``` **SRS_OPTIONHANDLER_02_001: [** `OptionHandler_Create` shall fail and retun `NULL` if any parameters are `NULL`. **]** **SRS_OPTIONHANDLER_02_002: [** `OptionHandler_Create` shall create an empty VECTOR that will hold pairs of `const char*` and `void*`. **]** **SRS_OPTIONHANDLER_02_003: [** If all the operations succeed then `OptionHandler_Create` shall succeed and return a non-`NULL` handle. **]** **SRS_OPTIONHANDLER_02_004: [** Otherwise, `OptionHandler_Create` shall fail and return `NULL`. **]** ### OptionHandler_Clone ```c OPTIONHANDLER_HANDLE OptionHandler_Clone(OPTIONHANDLER_HANDLE handler); ``` **SRS_OPTIONHANDLER_01_001: [** `OptionHandler_Clone` shall clone an existing option handler instance. **]** **SRS_OPTIONHANDLER_01_002: [** On success it shall return a non-NULL handle. **]** **SRS_OPTIONHANDLER_01_010: [** If `handler` is NULL, OptionHandler_Clone shall fail and return NULL. **]** **SRS_OPTIONHANDLER_01_003: [** `OptionHandler_Clone` shall allocate memory for the new option handler instance. **]** **SRS_OPTIONHANDLER_01_004: [** If allocating memory fails, `OptionHandler_Clone` shall return NULL. **]** **SRS_OPTIONHANDLER_01_005: [** `OptionHandler_Clone` shall iterate through all the options stored by the option handler to be cloned by using VECTOR's iteration mechanism. **]** **SRS_OPTIONHANDLER_01_006: [** For each option the option name shall be cloned by calling `mallocAndStrcpy_s`. **]** **SRS_OPTIONHANDLER_01_007: [** For each option the value shall be cloned by using the cloning function associated with the source option handler `handler`. **]** **SRS_OPTIONHANDLER_01_008: [** If cloning one of the option names fails, `OptionHandler_Clone` shall return NULL. **]** **SRS_OPTIONHANDLER_01_009: [** If cloning one of the option values fails, `OptionHandler_Clone` shall return NULL. **]** **SRS_OPTIONHANDLER_01_011: [** When adding one of the newly cloned options to the option handler storage vector fails, `OptionHandler_Clone` shall return NULL. **]** ### OptionHandler_AddOption ```c OPTIONHANDLER_RESULT OptionHandler_AddOption(OPTIONHANDLER_HANDLE handle, const char* name, void* value) ``` **SRS_OPTIONHANDLER_02_005: [** `OptionHandler_AddOption` shall fail and return `OPTIONHANDLER_INVALIDARG` if any parameter is NULL. **]** **SRS_OPTIONHANDLER_02_006: [** OptionHandler_AddOption shall call `pfCloneOption` passing `name` and `value`. **]** **SRS_OPTIONHANDLER_02_007: [** OptionHandler_AddOption shall use `VECTOR` APIs to save the `name` and the newly created clone of `value`. **]** **SRS_OPTIONHANDLER_02_008: [** If all the operations succed then `OptionHandler_AddOption` shall succeed and return `OPTIONHANDLER_OK`. **]** **SRS_OPTIONHANDLER_02_009: [** Otherwise, `OptionHandler_AddOption` shall succeed and return `OPTIONHANDLER_ERROR`. **]** ### OptionHandler_FeedOptions ```c OPTIONHANDLER_RESULT OptionHandler_FeedOptions(OPTIONHANDLER_HANDLE handle, void* destinationHandle); ``` **SRS_OPTIONHANDLER_02_010: [** `OptionHandler_FeedOptions` shall fail and return `OPTIONHANDLER_INVALIDARG` if any argument is `NULL`. **]** **SRS_OPTIONHANDLER_02_011: [** Otherwise, `OptionHandler_FeedOptions` shall use `VECTOR`'s iteration mechanisms to retrieve pairs of name, value (`const char*` and `void*`). **]** **SRS_OPTIONHANDLER_02_012: [** `OptionHandler_FeedOptions` shall call for every pair of name,value `setOption` passing `destinationHandle`, name and value. **]** **SRS_OPTIONHANDLER_02_013: [** If all the operations succeed then `OptionHandler_FeedOptions` shall succeed and return `OPTIONHANDLER_OK`. **]** **SRS_OPTIONHANDLER_02_014: [** Otherwise, `OptionHandler_FeedOptions` shall fail and return `OPTIONHANDLER_ERROR`. **]** ### OptionHandler_Destroy ```c void OptionHandler_Destroy(OPTIONHANDLER_HANDLE handle) ``` **SRS_OPTIONHANDLER_02_015: [** OptionHandler_Destroy shall do nothing if parameter `handle` is `NULL`. **]** **SRS_OPTIONHANDLER_02_016: [** Otherwise, OptionHandler_Destroy shall free all used resources. **]** platform_requirements.md000066400000000000000000000046351362133436400355020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# platform ## Overview This document specifies the **platform** adapter for the Azure IoT C SDK. The purpose of _platform_ is to provide any global init and de-init that may be required, such as `WSAStartup` and `WSACleanup` for Windows. It also provides the SDK with the proper TLSIO adapter via `platform_get_default_tlsio`. Although the platform adapter provides a mechanism for performing global init and de-init, device implementers may find it makes more sense to perform these operations outside of the scope of the Azure IoT SDK. In that case, the `platform_init` and `platform_deinit` calls may be left empty. ### References [Azure IoT porting guide](https://github.com/Azure/azure-c-shared-utility/blob/master/doc/porting_guide.md)
[platform.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/platform.h)
[xio.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/xio.h) ### Exposed API The platform adapter must implement 3 of the 4 functions defined in [platform.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/platform.h): `platform_init`, `platform_deinit`, and `platform_get_default_tlsio`. The fourth function, `platform_get_platform_info`, is not used by the SDK and my be omitted. ### platform_init The `platform_init` call performs any global initialization necessary for a particular platform. ```c int platform_init(); ``` **SRS_PLATFORM_30_000: [** The `platform_init` call shall perform any global initialization needed by the platform and return 0 on success. **]** **SRS_PLATFORM_30_001: [** On failure, `platform_init` shall return a non-zero value. **]** ### platform_deinit The `platform_deinit` call performs any global initialization necessary for a particular platform. ```c void platform_deinit(); ``` **SRS_PLATFORM_30_010: [** The `platform_deinit` call shall perform any global deinitialization needed by the platform. **]** ### platform_get_default_tlsio This call returns the `IO_INTERFACE_DESCRIPTION*` for the platform's tlsio as defined in [xio.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/xio.h). ```c const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void); ``` **SRS_PLATFORM_30_020: [** The `platform_get_default_tlsio` call shall return the `IO_INTERFACE_DESCRIPTION*` for the platform's tlsio. **]** porting_guide.md000066400000000000000000000406011362133436400337030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# How to Port the Azure IoT C SDK to Other Platforms The purpose of this document is to provide guidance on how to port the C Shared utility library to platforms not supported out of the box. The C shared utility library is used by C SDKs like IoTHub client SDK and EventHub client SDK. The document does not cover the specifics of any particular platform. ## References ###### Specifications - [tickcounter adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/tickcounter.md)
- [agenttime adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/agenttime_requirements.md)
- [threadapi and sleep adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/threadapi_and_sleep_requirements.md)
- [platform adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/platform_requirements.md)
- [tlsio specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/tlsio_requirements.md)
- [xio specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/xio_requirements.md)
- [lock adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/lock_requirements.md)
###### Header files - [tickcounter.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/tickcounter.h)
- [threadapi.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/threadapi.h)
- [xio.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/xio.h)
- [tlsio.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/tlsio.h)
- [socketio.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/socketio.h)
- [lock.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/lock.h)
- [platform.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/platform.h)
# Table of contents - [Overview](#Overview) - [tickcounter adapter](#tickcounter-adapter) - [agenttime adapter](#agenttime-adapter) - [sleep adapter](#sleep-adapter) - [platform adapter](#platform-adapter) - [tlsio adapter overview](#tlsio-adapter-overview) - [socketio adapter overview (optional)](#socketio-adapter) - [tlsio adapter implementation](#tlsio-adapter-implementation) - [threadapi and lock adapters (optional)](#threadapi-and-lock-adapters) ## Overview The C shared utility library is written in C99 for the purpose of portability to most platforms. However, several components rely on platform-specific resources in order to achieve the functionality required. Thus, porting the C shared utility library is done by porting the PAL components (adapters) that are part of the library. Below is a rough overview of the components: ![](img/porting_guide_overview.png) There are several mandatory components for which an adapter must be provided: - A `tickcounter` implementation: this provides the SDK an adapter for getting a tick counter expressed in ms. The precision does not have to be milliseconds, but rather the value provided to the SDK has to be expressed in milliseconds. - An `agenttime` implementation: this provides the SDK adapters for the C time management functions like `time`, `difftime`, etc. This is needed due to the very wide spread differences in the way time is handled by different platforms. - A `sleep` implementation to provide a device-independent sleep function. - A `platform` implementation to perform global init and de-init. - A `tlsio` implementation to allow the SDK to communicate over TLS. The IoT Hub does not support insecure communication. Additionally, there are two optional components, `threadapi` and `lock`, that allow the SDK to communicate with an IoT Hub on a dedicated thread. Yet another optional component is the `socketio` adapter, which is used with some kinds of `tlsio` adapter implementations. There are several existing adapters that can be found under the SDK's [adapters directory](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters) and [source directory](https://github.com/Azure/azure-c-shared-utility/blob/master/src). If any of these adapters work for your device, simply include that file in your project directly. ### tickcounter adapter Tickcounter behavior is specified in the [tickcounter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/tickcounter.md). To get started, copy [this version of tickcounter.c](https://github.com/Azure/azure-c-shared-utility/blob/master/pal/freertos/tickcounter.c) file and modify it to suit your device. If memory size is an issue, the [tickcounter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/tickcounter.md) contains an optimization suggestion that may work for you. ### agenttime adapter The agenttime adapter is specified in [agenttime adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/agenttime_requirements.md) and provides platform-independent time functions. For most platforms/OSs you can include the standard [agenttime.c](https://github.com/Azure/azure-c-shared-utility/blob/master/pal/agenttime.c) file in your build. This adapter simply calls the C functions `time`, `difftime`, `ctime`, etc. If this file does not work for your implementation, make a copy of it and modify it appropriately. The Azure IoT SDK only requires the `get_time` and `get_difftime` functions. The other functions in this adapter -- `get_gmtime`, `get_mktime`, and `get_ctime` -- are deprecated and may be omitted or left non-functional. ### sleep adapter The sleep adapter is a single function that provides a device-independent thread sleep. Unlike other adapters, it does not have its own header file. Instead, its declaration is contained in the [threadapi.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/threadapi.h) file along with the declarations for the optional threadapi adapter, and its implementation is typically contained in an associated threadapi.c file. Unlike the rest of the functions in [threadapi.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/threadapi.h), however, `ThreadAPI_Sleep` is required by the SDK and must always be functional. The specification for the sleep adapter is found in the [threadapi and sleep adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/threadapi_and_sleep_requirements.md). ### platform adapter The platform adapter performs one time initialization and deinitialization for the platform and also supplies the SDK with an appropriate TLSIO. The [platform adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/platform_requirements.md) gives full instructions for writing the platform adapter. To get started creating your platform adapter, copy [this Windows platform.c file](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/platform_win32.c) and modify it to suit your needs. ### threadapi and lock adapters The **threadapi** and **lock** adapters must exist for the SDK to compile, but their functionality is optional. Their specification documents (see below) detail what each empty function should do if threading functionality is not needed. These components that allow the SDK to communicate with an IoT Hub within a dedicated thread. The use of a dedicated thread has some cost in memory consumption because of the need for a separate stack, which may make the dedicated thread difficult to use on devices with little free memory. The upside of the dedicated thread is that all current tlsio adapters may repeatedly block for some fraction of a minute when attempting to connect to their IoT Hub when the network is unavailable, and having a thread dedicated to the Azure IoT SDK will allow other device functions to remain responsive while the SDK is blocked. Future versions of the SDK may eliminate this potential blocking behavior, but for now, devices which must be responsive will need to use a dedicated thread for the SDK, which requires implementing the ThreadApi and Lock adapters. Here are the specs for the threadapi and lock adapters: - [threadapi and sleep adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/threadapi_and_sleep_requirements.md)
- [lock adapter specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/lock_requirements.md)
These specs explain how to create null _lock_ and _threadapi_ adapters for when threading is not desired. To get started creating your threadapi and lock adapters, copy these Windows adapter files and modify them appropriately: - [threadapi.c](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/threadapi_win32.c) - [lock.c](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/lock_win32.c) ### tlsio adapter overview A **tlsio** adapter provides the SDK with secure TLS communication wtih the Azure IoT Hub. Tlsio adapters expose their functionality to the SDK via `xio`, which is a generic C-language bits-in-bits-out interface [defined here](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/xio.h). A tlsio adapter instance is created via the adapter's [`xio_create`](https://github.com/Azure/azure-c-shared-utility/blob/bc5d4eb8f9dbe3092c9cf046db9b7187b5baad4b/inc/azure_c_shared_utility/xio.h#L64) function, and the configuration parameter `const void* io_create_parameters` must be of the specialized type [`TLSIO_CONFIG`](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/tlsio.h) when creating the tlsio instance. Implementation of tlsio adapters for new devices is done by selecting the existing tlsio adapter (and perhaps also a socketio adapter) that most closely fits your needs and modifying it accordingly. ##### The two styles of tlsio There are two possible design patterns for a tlsio adapter: _direct_, and _chained_. In the _direct_ style, the tlsio adapter owns a TCP socket which it uses to directly perform TLS communication with the remote host. In the _chained_ style, the tlsio adapter does not own a TCP socket and does not communicate directly with the remote host. Instead, it still does all the TLS chores like encryption, decryption, and negotiation, but it communicates with the remote host indirectly via yet another xio-style adapter of some sort. The _direct_ style adapters require less code and avoid extra memory buffer copying, so they are more suited to microcontrollers. The tlsio adapters for Arduino and ESP32 are both _direct_ types. The _chained_ style adapters are more resource-hungry, but they offer more flexibilty. The tlsio adapters for Windows, Linux, and Mac are all _chained_ style adapters. The choice of TLS implementation may dictate the style of tlsio. For example, the TLS implementations for Arduino and Espressif's OpenSSL implementation for ESP32 can only work directly with their own internal TCP socket, so they can only be used as part of a _direct_ style tlsio. By contrast, the full official version of OpenSSL can be used either way. ### socketio adapter overview In order to connect to the internet, a _chained_ tlsio must at some point talk through an `xio` adapter that contains a TCP socket. In the Azure IoT SDK, an `xio` adapter managing a TCP socket is called a `socketio` adapter. Multiple xio components can be chained together if desired. Here is a diagram illustrating the differences between a _direct_ tlsio, a _chained_ tlsio, and a _chained_ tlsio with an xio-based http proxy component: ![](img/xio_chain.png) The `xio_http_proxy` component is only shown to illustrate xio capability. Its details are beyond the scope of this document. ### tlsio adapter implementation Adapters other than tlsio are easy to implement, even for inexperienced developers. The tlsio adapters, however, are quite complicated, and writing a tlsio adapter is a task only for experienced developers who are comfortable setting up include directories and external libraries without instruction. The most up-to-date information on tlsio implementation is contained in the [tlsio specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/tlsio_requirements.md). All of the existing tlsio adapters use TLS libraries that are not part of the Azure IoT SDK. Refer to the documentation for the specific TSL libraries for instructions on library usage such as setting include directories and linking library files. #### Existing _direct_ tlsio implementations There are two existing _direct_ adapter implementations: - [tlsio_openssl_compact for ESP32](https://github.com/Azure/azure-iot-pal-esp32/blob/master/pal/src/tlsio_openssl_compact.c) - [tlsio_arduino for Arduino](https://github.com/Azure/azure-iot-pal-arduino/blob/master/pal/src/tlsio_arduino.c) Of these two, the [tlsio_openssl_compact for ESP32](https://github.com/Azure/azure-iot-pal-esp32/blob/master/pal/src/tlsio_openssl_compact.c) is probably the better candidate for copying for re-use because it is more likely to resemble newer devices, and it was written in tandem with the [tlsio specification](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/tlsio_requirements.md). The [tlsio_openssl_compact for ESP32](https://github.com/Azure/azure-iot-pal-esp32/blob/master/pal/src/tlsio_openssl_compact.c) abstracts its operating system dependencies using these two files: - [socket_async.c](https://github.com/Azure/azure-c-shared-utility/blob/master/pal/socket_async.c) - [dns_async.c](https://github.com/Azure/azure-c-shared-utility/blob/master/pal/dns_async.c) It is recommended that all _direct_ tlsio implementatons follow this pattern. The [socket_async.c](https://github.com/Azure/azure-c-shared-utility/blob/master/pal/socket_async.c) and [dns_async.c](https://github.com/Azure/azure-c-shared-utility/blob/master/pal/dns_async.c) files can be re-used without change for most socket implementations by merely changing the content of the included "socket_async_os.h" file, which contains os-specific headers. #### Existing _chained_ tlsio implementations _Chained_ adapter implementations include: - [tlsio_openssl for Windows, Linux, and Mac](https://github.com/Azure/azure-c-shared-utility/blob/master/src/tlsio_openssl.c) - [tlsio_schannel for Windows only](https://github.com/Azure/azure-c-shared-utility/blob/master/src/tlsio_schannel.c) - [tlsio_wolfssl for embedded devices](https://github.com/Azure/azure-c-shared-utility/blob/master/src/tlsio_wolfssl.c) - [tlsio_cyclonessl for embedded devices](https://github.com/Azure/azure-c-shared-utility/blob/master/src/tlsio_cyclonessl.c) - [tlsio_mbedtls for mbed](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/tlsio_mbedtls.c) #### Existing socketio implementations for _chained_ tlsio adapters There is no spec for socketio adapters, so it is necessary to copy the behavior of an existing one, and [socketio_berkeley](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/socketio_berkeley.c) is the best candidate for copying. However, be aware that all existing socketio adapters including [socketio_berkeley](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/socketio_berkeley.c) purge their pending io lists during socketio_destroy, which is incorrect. The pending io lists should be purged during socketio_close instead. - [socketio_berkeley for Linux, easily adapted to any Berkeley socket](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/socketio_berkeley.c) - [socketio_win32 for Windows](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/socketio_win32.c) - [socketio_mbed for mbed](https://github.com/Azure/azure-c-shared-utility/blob/master/adapters/socketio_mbed.c) - [tlsio_cyclonessl_socket for use with cyclonessl](https://github.com/Azure/azure-c-shared-utility/blob/master/src/tlsio_cyclonessl_socket.c) ### Adding device support repositories Newly supported devices are likely to use a wide variety of possible build systems, so no single standard source tree can be prescribed. The [support repository for ESP32](https://github.com/Azure/azure-iot-pal-esp32) is the one we recommend considering as a model for creating a new device support repository. ##### Last step: profit! refcount_requirements.md000066400000000000000000000043671362133436400355050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc`refcount` requirements ================ ## Overview `refcount` is a module that provides reference counting for a given structure. It wraps the structure that needs to be ref counted into another structure that contains an additional field (ref count). ## Exposed API ```c #define REFCOUNT_TYPE_CREATE(type) C2(REFCOUNT_SHORT_TYPE(type), _Create)() #define REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE(type, size) C2(REFCOUNT_SHORT_TYPE(type), _Create_With_Extra_Size)(size) #define REFCOUNT_TYPE_DESTROY(type, var) C2(REFCOUNT_SHORT_TYPE(type), _Destroy)(var) #define DEFINE_REFCOUNT_TYPE(type) \ ... ``` ### DEFINE_REFCOUNT_TYPE **SRS_REFCOUNT_01_001: [** `DEFINE_REFCOUNT_TYPE` shall define the create/create_with_Extra_size/destroy functions for the type `type`. **]** ### REFCOUNT_TYPE_CREATE ```c REFCOUNT_TYPE_CREATE(type) ``` `REFCOUNT_TYPE_CREATE` creates a ref counted object instance. **SRS_REFCOUNT_01_002: [** `REFCOUNT_TYPE_CREATE` shall allocate memory for the type that is ref counted. **]** **SRS_REFCOUNT_01_003: [** On success it shall return a non-NULL handle to the allocated ref counted type `type`. **]** **SRS_REFCOUNT_01_004: [** If any error occurrs, `REFCOUNT_TYPE_CREATE` shall return NULL. **]** ### REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE ```c REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE(type, size) ``` `REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE` creates a ref counted object instance while allocating extra memory (useful for flexible arrays). **SRS_REFCOUNT_01_005: [** `REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE` shall allocate memory for the type that is ref counted (`type`) plus extra memory enough to hold `size` bytes. **]** **SRS_REFCOUNT_01_006: [** On success it shall return a non-NULL handle to the allocated ref counted type `type`. **]** **SRS_REFCOUNT_01_007: [** If any error occurrs, `REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE` shall return NULL. **]** ### REFCOUNT_TYPE_DESTROY ```c REFCOUNT_TYPE_DESTROY(type, counted_type) ``` `REFCOUNT_TYPE_DESTROY` frees the memory for a ref counted type. **SRS_REFCOUNT_01_008: [** `REFCOUNT_TYPE_DESTROY` shall free the memory allocated by `REFCOUNT_TYPE_CREATE` or `REFCOUNT_TYPE_CREATE_WITH_EXTRA_MEMORY`. **]** **SRS_REFCOUNT_01_009: [** If `counted_type` is NULL, `REFCOUNT_TYPE_DESTROY` shall return. **]** sastoken_requirements.md000066400000000000000000000101331362133436400354730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocsastoken requirements ================ ## Overview This function is used to create a SAS token. ## References [Keyed-Hashing for Message Authentication, RFC2104](https://www.ietf.org/rfc/rfc2104.txt) [SASToken format](https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-shared-access-signature-part-1/) ## Exposed API ```c MOCKABLE_FUNCTION(, bool, SASToken_Validate, STRING_HANDLE, sasToken); MOCKABLE_FUNCTION(, STRING_HANDLE, SASToken_Create, STRING_HANDLE, key, STRING_HANDLE, scope, STRING_HANDLE, keyName, size_t, expiry); ``` ### SASToken_Create ```c extern STRING_HANDLE SASToken_Create(STRING_HANDLE key, STRING_HANDLE scope, STRING_HANDLE keyName, size_t expiry); ``` **SRS_SASTOKEN_06_001: [** If key is NULL then SASToken_Create shall return NULL. **]** **SRS_SASTOKEN_06_003: [** If scope is NULL then SASToken_Create shall return NULL. **]** **SRS_SASTOKEN_06_007: [** keyName is optional and can be set to NULL. **]** **SRS_SASTOKEN_06_029: [** The key parameter is decoded from base64. **]** **SRS_SASTOKEN_06_030: [** If there is an error in the decoding then SASToken_Create shall return NULL. **]** The decoded value shall henceforth be known as decodedKey. The expiry argument shall be converted to a char* by invoking size_tToString. **SRS_SASTOKEN_06_026: [** If the conversion to string form fails for any reason then SASToken_Create shall return NULL. **]** The string shall be henceforth referred to as tokenExpirationTime. **SRS_SASTOKEN_06_009: [** The scope is the basis for creating a STRING_HANDLE. **]** **SRS_SASTOKEN_06_010: [** A "\n" is appended to that string. **]** **SRS_SASTOKEN_06_011: [** tokenExpirationTime is appended to that string. **]** This is henceforth referred to as toBeHashed. **SRS_SASTOKEN_06_012: [** An HMAC256 hash is calculated using the decodedKey, over toBeHashed. **]** **SRS_SASTOKEN_06_013: [** If an error is returned from the HMAC256 function then NULL is returned from SASToken_Create. **]** **SRS_SASTOKEN_06_014: [** If there are any errors from the following operations then NULL shall be returned. **]** **SRS_SASTOKEN_06_015: [** The hash is base 64 encoded. **]** That (STRING_HANDLE) shall be called base64Signature. **SRS_SASTOKEN_06_028: [** base64Signature shall be url encoded. **]** This (STRING_HANDLE) shall be called urlEncodedSignature. **SRS_SASTOKEN_06_016: [** The string "SharedAccessSignature sr=" is the first part of the result of SASToken_Create. **]** **SRS_SASTOKEN_06_017: [** The scope parameter is appended to result. **]** **SRS_SASTOKEN_06_018: [** The string "&sig=" is appended to result. **]** **SRS_SASTOKEN_06_019: [** The string urlEncodedSignature shall be appended to result. **]** **SRS_SASTOKEN_06_020: [** The string "&se=" shall be appended to result. **]** **SRS_SASTOKEN_06_021: [** tokenExpirationTime is appended to result. **]** **SRS_SASTOKEN_06_022: [** If keyName is non-NULL, the string "&skn=" is appended to result. **]** **SRS_SASTOKEN_06_023: [** If keyName is non-NULL, the argument keyName is appended to result. **]** result is returned. ### SASToken_Validate ```c extern bool SASToken_Validate(STRING_HANDLE handle); ``` **SRS_SASTOKEN_25_024: [** If handle is NULL then SASToken_Validate shall return false. **]** **SRS_SASTOKEN_25_025: [** SASToken_Validate shall get the SASToken value by invoking STRING_c_str on the handle. **]** **SRS_SASTOKEN_25_026: [** If STRING_c_str on handle return NULL then SASToken_Validate shall return false. **]** **SRS_SASTOKEN_25_027: [** If SASTOKEN does not obey the SASToken format then SASToken_Validate shall return false. **]** **SRS_SASTOKEN_25_028: [** SASToken_validate shall check for the presence of sr, se and sig from the token and return false if not found **]** **SRS_SASTOKEN_25_029: [** SASToken_validate shall check for expiry time from token and if token has expired then would return false **]** **SRS_SASTOKEN_25_030: [** SASToken_validate shall return true only if the format is obeyed and the token has not yet expired **]** **SRS_SASTOKEN_25_031: [** If malloc fails during validation then SASToken_Validate shall return false. **]** singlylinkedlist_requirements.md000066400000000000000000000203621362133436400372410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocsinglylinkedlist requirements ================ ## Overview SinglyLinkedList is module that provides the functionality of a singly linked list, allowing its user to add, remove and iterate the list elements. ## Exposed API ```c typedef struct SINGLYLINKEDLIST_INSTANCE_TAG* SINGLYLINKEDLIST_HANDLE; typedef struct LIST_ITEM_INSTANCE_TAG* LIST_ITEM_HANDLE; typedef bool (*LIST_MATCH_FUNCTION)(LIST_ITEM_HANDLE list_item, const void* match_context); typedef bool (*LIST_CONDITION_FUNCTION)(const void* item, const void* match_context, bool* continue_processing); typedef void (*LIST_ACTION_ACTION)(const void* item, const void* action_context, bool* continue_processing); extern SINGLYLINKEDLIST_HANDLE singlylinkedlist_create(void); extern void singlylinkedlist_destroy(SINGLYLINKEDLIST_HANDLE list); extern LIST_ITEM_HANDLE singlylinkedlist_add(SINGLYLINKEDLIST_HANDLE list, const void* item); extern LIST_ITEM_HANDLE singlylinkedlist_add_head(SINGLYLINKEDLIST_HANDLE list, const void* item); extern int singlylinkedlist_remove(SINGLYLINKEDLIST_HANDLE list, LIST_ITEM_HANDLE item_handle); extern LIST_ITEM_HANDLE singlylinkedlist_get_head_item(SINGLYLINKEDLIST_HANDLE list); extern LIST_ITEM_HANDLE singlylinkedlist_get_next_item(LIST_ITEM_HANDLE item_handle); extern LIST_ITEM_HANDLE singlylinkedlist_find(SINGLYLINKEDLIST_HANDLE list, LIST_MATCH_FUNCTION match_function, const void* match_context); extern int singlylinkedlist_remove_if(SINGLYLINKEDLIST_HANDLE list, LIST_CONDITION_FUNCTION condition_function, const void* match_context); extern int singlylinkedlist_foreach(SINGLYLINKEDLIST_HANDLE list, LIST_ACTION_ACTION action_function, const void* action_context); extern const void* singlylinkedlist_item_get_value(LIST_ITEM_HANDLE item_handle); ``` ### singlylinkedlist_create ```c extern SINGLYLINKEDLIST_HANDLE singlylinkedlist_create(void); ``` **SRS_LIST_01_001: [** singlylinkedlist_create shall create a new list and return a non-NULL handle on success. **]** **SRS_LIST_01_002: [** If any error occurs during the list creation, singlylinkedlist_create shall return NULL. **]** ### singlylinkedlist_destroy ```c extern void singlylinkedlist_destroy(SINGLYLINKEDLIST_HANDLE list); ``` **SRS_LIST_01_003: [** singlylinkedlist_destroy shall free all resources associated with the list identified by the handle argument. **]** **SRS_LIST_01_004: [** If the list argument is NULL, no freeing of resources shall occur. **]** ### singlylinkedlist_add ```c extern int singlylinkedlist_add(SINGLYLINKEDLIST_HANDLE list, const void* item); ``` **SRS_LIST_01_005: [** singlylinkedlist_add shall add one item to the tail of the list and on success it shall return a handle to the added item. **]** **SRS_LIST_01_006: [** If any of the arguments is NULL, singlylinkedlist_add shall not add the item to the list and return NULL. **]** **SRS_LIST_01_007: [** If allocating the new list node fails, singlylinkedlist_add shall return NULL. **]** ### singlylinkedlist_get_head_item ```c extern const void* singlylinkedlist_get_head_item(SINGLYLINKEDLIST_HANDLE list); ``` **SRS_LIST_01_008: [** singlylinkedlist_get_head_item shall return the head of the list. **]** **SRS_LIST_01_009: [** If the list argument is NULL, singlylinkedlist_get_head_item shall return NULL. **]** **SRS_LIST_01_010: [** If the list is empty, list_get_head_item_shall_return NULL. **]** ### singlylinkedlist_get_next_item ```c extern LIST_ITEM_HANDLE singlylinkedlist_get_next_item(LIST_ITEM_HANDLE item_handle); ``` **SRS_LIST_01_018: [** singlylinkedlist_get_next_item shall return the next item in the list following the item item_handle. **]** **SRS_LIST_01_019: [** If item_handle is NULL then singlylinkedlist_get_next_item shall return NULL. **]** **SRS_LIST_01_022: [** If no more items exist in the list after the item_handle item, singlylinkedlist_get_next_item shall return NULL. **]** ### singlylinkedlist_find ```c extern const void* singlylinkedlist_find(SINGLYLINKEDLIST_HANDLE list, const void* match_context, LIST_MATCH_FUNCTION match_function); ``` **SRS_LIST_01_011: [** singlylinkedlist_find shall iterate through all items in a list and return the first one that satisfies a certain match function. **]** **SRS_LIST_01_012: [** If the list or the match_function argument is NULL, singlylinkedlist_find shall return NULL. **]** **SRS_LIST_01_014: [** list find shall determine whether an item satisfies the match criteria by invoking the match function for each item in the list until a matching item is found. **]** **SRS_LIST_01_013: [** The match_function shall get as arguments the list item being attempted to be matched and the match_context as is. **]** **SRS_LIST_01_016: [** If the match function returns false, singlylinkedlist_find shall consider that item as not matching. **]** **SRS_LIST_01_017: [** If the match function returns true, singlylinkedlist_find shall consider that item as matching. **]** **SRS_LIST_01_015: [** If the list is empty, singlylinkedlist_find shall return NULL. **]** ### singlylinkedlist_remove_if ```c extern int singlylinkedlist_remove_if(SINGLYLINKEDLIST_HANDLE list, LIST_CONDITION_FUNCTION condition_function, void* match_context); ``` **SRS_LIST_09_001: [** If the list or the condition_function argument is NULL, singlylinkedlist_remove_if shall return non-zero value. **]** **SRS_LIST_09_002: [** singlylinkedlist_remove_if shall iterate through all items in a list and remove all that satisfies a certain condition function. **]** **SRS_LIST_09_003: [** singlylinkedlist_remove_if shall determine whether an item satisfies the condition criteria by invoking the condition function for that item. **]** **SRS_LIST_09_004: [** If the condition function returns true, singlylinkedlist_find shall consider that item as to be removed. **]** **SRS_LIST_09_005: [** If the condition function returns false, singlylinkedlist_find shall consider that item as not to be removed. **]** **SRS_LIST_09_006: [** If the condition function returns continue_processing as false, singlylinkedlist_remove_if shall stop iterating through the list and return. **]** **SRS_LIST_09_007: [** If no errors occur, singlylinkedlist_remove_if shall return zero. **]** ### singlylinkedlist_foreach ```c extern int singlylinkedlist_foreach(SINGLYLINKEDLIST_HANDLE list, LIST_ACTION_ACTION action_function, void* action_context); ``` **SRS_LIST_09_008: [** If the list or the action_function argument is NULL, singlylinkedlist_foreach shall return non-zero value. **]** **SRS_LIST_09_009: [** singlylinkedlist_foreach shall iterate through all items in a list and invoke action_function for each one of them. **]** **SRS_LIST_09_010: [** If the condition function returns continue_processing as false, singlylinkedlist_foreach shall stop iterating through the list and return. **]** **SRS_LIST_09_011: [** If no errors occur, singlylinkedlist_foreach shall return zero. **]** ### singlylinkedlist_remove ```c extern int singlylinkedlist_remove(SINGLYLINKEDLIST_HANDLE list, LIST_ITEM_HANDLE item_handle); ``` **SRS_LIST_01_023: [** singlylinkedlist_remove shall remove a list item from the list and on success it shall return 0. **]** **SRS_LIST_01_024: [** If any of the arguments list or item_handle is NULL, singlylinkedlist_remove shall fail and return a non-zero value. **]** **SRS_LIST_01_025: [** If the item item_handle is not found in the list, then singlylinkedlist_remove shall fail and return a non-zero value. **]** ### singlylinkedlist_item_get_value ```c extern const void* singlylinkedlist_item_get_value(LIST_ITEM_HANDLE item_handle); ``` **SRS_LIST_01_020: [** singlylinkedlist_item_get_value shall return the value associated with the list item identified by the item_handle argument. **]** **SRS_LIST_01_021: [** If item_handle is NULL, singlylinkedlist_item_get_value shall return NULL. **]** ### singlylinkedlist_add_head ``` extern LIST_ITEM_HANDLE singlylinkedlist_add_head(SINGLYLINKEDLIST_HANDLE list, const void* item); ``` `singlylinkedlist_add` inserts `item` at the head of `list`. **SRS_LIST_02_001: [** If `list` is `NULL` then `singlylinkedlist_add_head` shall fail and return `NULL`. **]** **SRS_LIST_02_002: [** `singlylinkedlist_add_head` shall insert `item` at head, succeed and return a non-`NULL` value. **]** **SRS_LIST_02_003: [** If there are any failures then `singlylinkedlist_add_head` shall fail and return `NULL`. **]** sntp_lwip_requirements.md000066400000000000000000000040121362133436400356620ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocsntp_lwip ================= ## Overview **sntp_lwip** implements Azure IoT C Shared Utility `sntp` adapter on devices running lwIP. The `sntp` adapter is intentionally lightweight and aimed at small devices because NTP's time setting function is taken care of by the OS on larger machines. ## References [lwIP](http://savannah.nongnu.org/projects/lwip/) ### Exposed API **SRS_SNTP_LWIP_30_001: [** The ntp_lwip shall implement the methods defined in `sntp.h`. ```c int SNTP_SetServerName(const char* serverName); int SNTP_Init(); void SNTP_Deinit(); ``` **]** ### SNTP_SetServerName `SNTP_SetServerName` must be called before `SNTP_Init`. The character array pointed to by `serverName` parameter must persist between calls to `SNTP_SetServerName` and `SNTP_Deinit` because the char* is stored and no copy of the string is made. `SNTP_SetServerName` is a wrapper for the lwIP call `sntp_setservername` and defers parameter validation to the lwIP library. Future implementations of this adapter may allow multiple calls to `SNTP_SetServerName` in order to support multiple servers. ```c int SNTP_SetServerName(const char* serverName); ``` **SRS_SNTP_LWIP_30_002: [** The `serverName` parameter shall be an NTP server URL which shall not be validated. (Validation is deferred to the underlying library.) **]** **SRS_SNTP_LWIP_30_003: [** The `SNTP_SetServerName` shall set the NTP server to be used by ntp_lwip and return 0 to indicate success. (lwIP has no failure path.) **]** ### SNTP_Init `SNTP_Init` initializes the SNTP client and begins the process of contacting the NTP server. It blocks until NTP time has been successfully received. ```c int SNTP_Init(); ``` **SRS_SNTP_LWIP_30_004: [** `SNTP_Init` shall initialize the SNTP client, contact the NTP server to set system time, then return 0 to indicate success (lwIP has no failure path). **]** ### SNTP_Denit `SNTP_Denit` deinitializes the SNTP client. ```c void SNTP_Denit(); ``` **SRS_SNTP_LWIP_30_005: [** `SNTP_Denit` shall deinitialize the SNTP client. **]** azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/socket_async.md000066400000000000000000000233641362133436400336170ustar00rootroot00000000000000socket_async ================= ## Overview **socket_async** abstracts a non-blocking TCP or UDP socket while hiding OS implementation details. The socket handling code in `socket_async.c` is common to many environments, and a system of header includes and #defines will adapt the code for each particular environment. Validation of SOCKET_ASYNC_HANDLE parameters is deferred to the underlying socket layer. It is anticipated that socket_async.c will work for all non-Windows environments, and a socket_async_win32.c will be needed for Windows. ## References [socket_async.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/socket_async.h) [sys/socket.h, a typical linux socket implementation](http://pubs.opengroup.org/onlinepubs/7908799/xns/syssocket.h.html) ### Exposed API **SRS_SOCKET_ASYNC_30_001: [** The socket_async shall use the constants and types defined in `socket_async.h`. ```c #define SOCKET_ASYNC_INVALID_SOCKET -1 typedef struct { int keep_alive; // < 0 for system defaults, 0 to disable, >= 0 to use supplied keep_alive, idle, interval, and count int keep_idle; // seconds before first keepalive packet (ignored if keep_alive <= 0) int keep_interval; // seconds between keepalive packets (ignored if keep_alive <= 0) int keep_count; // number of times to try before declaring failure (ignored if keep_alive <= 0) } SOCKET_ASYNC_OPTIONS; typedef SOCKET_ASYNC_OPTIONS* SOCKET_ASYNC_OPTIONS_HANDLE; typedef int SOCKET_ASYNC_HANDLE; ``` **]** **SRS_SOCKET_ASYNC_30_002: [** The socket_async shall implement the methods defined in `socket_async.h`. ```c SOCKET_ASYNC_HANDLE socket_async_create(uint32_t host_ipv4, uint16_t port, bool is_UDP, SOCKET_ASYNC_OPTIONS_HANDLE options); int socket_async_is_create_complete(SOCKET_ASYNC_HANDLE sock, bool* is_complete); int socket_async_send(SOCKET_ASYNC_HANDLE sock, void* buffer, size_t size, size_t* sent_count); int socket_async_receive(SOCKET_ASYNC_HANDLE sock, void* buffer, size_t size, size_t* received_count); void socket_async_destroy(SOCKET_ASYNC_HANDLE sock); ``` **]** ### socket_async_create `socket_async_create` creates a socket and sets its configuration, including setting the socket to non-blocking. It then binds the socket to the supplied `host_ipv4` and `port`, and begins the process of connecting the socket to the bound address. ```c SOCKET_ASYNC_HANDLE socket_async_create(uint32_t host_ipv4, uint16_t port, bool is_UDP, SOCKET_ASYNC_OPTIONS_HANDLE options); ``` **SRS_SOCKET_ASYNC_30_011: [** The `host_ipv4` parameter shall be the 32-bit IP V4 of the target server. **]** **SRS_SOCKET_ASYNC_30_012: [** The `port` parameter shall be the port number for the target server. **]** **SRS_SOCKET_ASYNC_30_013: [** The `is_UDP` parameter shall be `true` for a UDP connection, and `false` for TCP. **]** **SRS_SOCKET_ASYNC_30_014: [** If the optional `options` parameter is non-NULL and `is_UDP` is false, and options->keep_alive is non-negative, `socket_async_create` shall set the socket options to the provided options values. **]** **SRS_SOCKET_ASYNC_30_015: [** If the optional `options` parameter is non-NULL and `is_UDP` is false, and options->keep_alive is negative, `socket_async_create` not set the socket keep-alive options. **]** **SRS_SOCKET_ASYNC_30_016: [** If `is_UDP` is true, the optional `options` parameter shall be ignored. **]** **SRS_SOCKET_ASYNC_30_017: [** If the optional `options` parameter is NULL and `is_UDP` is false, `socket_async_create` shall disable TCP keep-alive. **]** **SRS_SOCKET_ASYNC_30_018: [** On success, `socket_async_create` shall return the created and configured SOCKET_ASYNC_HANDLE. **]** **SRS_SOCKET_ASYNC_30_019: [** The socket returned shall be non-blocking. **]** **SRS_SOCKET_ASYNC_30_010: [** If socket option creation fails, `socket_async_create` shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. **]** **SRS_SOCKET_ASYNC_30_020: [** If socket option setting fails, `socket_async_create` shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. **]** **SRS_SOCKET_ASYNC_30_021: [** If socket binding fails, `socket_async_create` shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. **]** **SRS_SOCKET_ASYNC_30_022: [** If socket connection fails, `socket_async_create` shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. **]** ### socket_async_is_create_complete `socket_async_is_create_complete` tests whether the socket has completed its initial TCP handshake. For UDP connections the `socket_async_is_create_complete` call is optional and always returns true. If this method fails then `socket_async_destroy` must be called. Validation of the `sock` parameter is deferred to the underlying socket call. ```c int socket_async_is_create_complete(SOCKET_ASYNC_HANDLE sock, bool* is_complete); ``` **SRS_SOCKET_ASYNC_30_023: [** The `sock` parameter shall be the socket to check for initial handshake completion. **]** **SRS_SOCKET_ASYNC_30_024: [** The `is_complete` parameter shall receive the completion state. **]** **SRS_SOCKET_ASYNC_30_025: [** If the `is_complete` parameter is NULL, `socket_async_is_create_complete` shall log an error and return _FAILURE_. **]** **SRS_SOCKET_ASYNC_30_026: [** On success, the `is_complete` value shall be set to the completion state and `socket_async_create` shall return 0. **]** **SRS_SOCKET_ASYNC_30_027: [** On failure, the `is_complete` value shall be set to `false` and `socket_async_create` shall return _FAILURE_. **]** ### socket_async_send `socket_async_send` attempts to send `size` bytes from `buffer` to the underlying socket. If this method fails then `socket_async_destroy` must be called. This includes the case of NULL `buffer` and `sent_count` parameters, which are assumed to be unrecoverable program bugs. Validation of the `sock` parameter is deferred to the underlying socket call. The function signature for `socket_async_send` is a pass-through for the underlying socket `send()` call, and the parameter types are identical for the two calls. ```c int socket_async_send(SOCKET_ASYNC_HANDLE sock, void* buffer, size_t size, size_t* sent_count); ``` **SRS_SOCKET_ASYNC_30_030: [** The `sock` parameter shall be the socket to send the message to. **]** **SRS_SOCKET_ASYNC_30_031: [** The `buffer` parameter shall contain the message to send to the target server. **]** **SRS_SOCKET_ASYNC_30_032: [** The `size` parameter shall be the size of the message in bytes. **]** **SRS_SOCKET_ASYNC_30_033: [** If the `buffer` parameter is NULL, `socket_async_send` shall log the error return _FAILURE_. **]** **SRS_SOCKET_ASYNC_30_034: [** If the `sent_count` parameter is NULL, `socket_async_send` shall log the error return _FAILURE_. **]** **SRS_SOCKET_ASYNC_30_073: [** If the `size` parameter is 0, `socket_async_send` shall set `sent_count` to 0 and return 0. **]** **SRS_SOCKET_ASYNC_30_035: [** If the underlying socket accepts one or more bytes for transmission, `socket_async_send` shall return 0 and the `sent_count` parameter shall receive the number of bytes accepted for transmission. **]** **SRS_SOCKET_ASYNC_30_036: [** If the underlying socket is unable to accept any bytes for transmission because its buffer is full, `socket_async_send` shall return 0 and the `sent_count` parameter shall receive the value 0. **]** **SRS_SOCKET_ASYNC_30_037: [** If `socket_async_send` fails unexpectedly, `socket_async_send` shall log the error return _FAILURE_. **]** ### socket_async_receive `socket_async_receive` attempts to receive up to `size` bytes into `buffer`. If this method fails then `socket_async_destroy` must be called. This includes the case of NULL `buffer` and `received_count` parameters, which are assumed to be unrecoverable program bugs. Validation of the `sock` parameter is deferred to the underlying socket call. The function signature for `socket_async_receive` is a pass-through for the underlying socket `send()` call, and the parameter types are identical for the two calls. ```c int socket_async_receive(SOCKET_ASYNC_HANDLE sock, void* buffer, size_t size, size_t* received_count); ``` **SRS_SOCKET_ASYNC_30_050: [** The `sock` parameter shall be the socket to receive the message from. **]** **SRS_SOCKET_ASYNC_30_051: [** The `size` parameter shall be the size of the `buffer` in bytes. **]** **SRS_SOCKET_ASYNC_30_052: [** If the `buffer` parameter is NULL, `socket_async_receive` shall log the error and return _FAILURE_. **]** **SRS_SOCKET_ASYNC_30_053: [** If the `received_count` parameter is NULL, `socket_async_receive` shall log the error and return _FAILURE_. **]** **SRS_SOCKET_ASYNC_30_072: [** If the `size` parameter is 0, `socket_async_receive` shall log an error and return _FAILURE_. **]** **SRS_SOCKET_ASYNC_30_054: [** On success, the underlying socket shall set one or more received bytes into `buffer`, `socket_async_receive` shall return 0, and the `received_count` parameter shall receive the number of bytes received into `buffer`. **]** **SRS_SOCKET_ASYNC_30_055: [** If the underlying socket has no received bytes available, `socket_async_receive` shall return 0 and the `received_count` parameter shall receive the value 0. **]** **SRS_SOCKET_ASYNC_30_056: [** If the underlying socket fails unexpectedly, `socket_async_receive` shall log the error and return _FAILURE_. **]** ### socket_async_destroy `socket_async_destroy` calls the underlying socket `close()` on the supplied socket. Parameter validation is deferred to the underlying call, so no validation is performed by `socket_async_destroy`. ```c void socket_async_destroy(SOCKET_ASYNC_HANDLE sock); ``` **SRS_SOCKET_ASYNC_30_070: [** The `sock` parameter shall be the SOCKET_ASYNC_HANDLE of the socket to be closed. **]** **SRS_SOCKET_ASYNC_30_071: [** `socket_async_destroy` shall call the underlying `close` method on the supplied socket. **]** ssl_socket_compact.md000066400000000000000000000071551362133436400347320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocssl_socket_compact ================= ## Overview **ssl_socket_compact** creates and destroys a non-blocking TCP socket suitable for use with SSL implementations that require a TCP socket. The compact (for microcontrollers) implementation of OpenSSL is one example. The socket handling code in `ssl_socket_compact.c` is common to many environments, and preprocessor switches enable the proper headers for a particular environment. Socket creation, configuration,binding, and connection are all performed in the `SSL_Socket_Create` call defined in `ssl_socket.h`. ## References [ssl_socket.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/ssl_socket.h) [sys/socket.h, a typical linux socket implementation](http://pubs.opengroup.org/onlinepubs/7908799/xns/syssocket.h.html) ### Exposed API **SRS_SSL_SOCKET_COMPACT_30_001: [** The ssl_socket_compact shall use the constants defined in `ssl_socket.h`. ```c #define AZURE_SSL_SOCKET_SO_KEEPALIVE 1 /* enable keepalive */ #define AZURE_SSL_SOCKET_TCP_KEEPIDLE 20 /* seconds */ #define AZURE_SSL_SOCKET_TCP_KEEPINTVL 2 /* seconds */ #define AZURE_SSL_SOCKET_TCP_KEEPCNT 3 /* retry count */ ``` **]** **SRS_SSL_SOCKET_COMPACT_30_001: [** The ssl_socket_compact shall implement the methods defined in `ssl_socket.h`. ```c int SSL_Socket_Create(const char* hostname, int port); void SSL_Socket_Close(int sock); ``` **]** ### SSL_Socket_Create `SSL_Socket_Create` creates a socket and sets its configuration, including setting the socket to non-blocking. It then binds the socket to the supplied `hostname` and `port`, and finally connects the socket to the bound address. If successful, it returns a non-negative integer to represent the socket's file descriptor. On failure, it returns -1. ```c int SSL_Socket_Create(const char* hostname, int port); ``` **SRS_SSL_SOCKET_COMPACT_30_002: [** The `hostname` parameter shall be the fully-qualified domain name (FQDN) of the target server. Example: azure-iot-team.azure-devices.net **]** **SRS_SSL_SOCKET_COMPACT_30_003: [** The `port` shall be the TCP port number for the target server. **]** **SRS_SSL_SOCKET_COMPACT_30_004: [** The `SO_KEEPALIVE` option value of the returned socket shall be `AZURE_SSL_SOCKET_SO_KEEPALIVE`. **]** **SRS_SSL_SOCKET_COMPACT_30_005: [** The `TCP_KEEPIDLE` option value of the returned socket shall be `AZURE_SSL_SOCKET_TCP_KEEPIDLE`. **]** **SRS_SSL_SOCKET_COMPACT_30_006: [** The `TCP_KEEPINTVL` option value of the returned socket shall be `AZURE_SSL_SOCKET_TCP_KEEPINTVL`. **]** **SRS_SSL_SOCKET_COMPACT_30_007: [** The `TCP_KEEPCNT` option value of the returned socket shall be `AZURE_SSL_SOCKET_TCP_KEEPCNT`. **]** **SRS_SSL_SOCKET_COMPACT_30_008: [** The returned socket shall be set to `O_NONBLOCK`. **]** **SRS_SSL_SOCKET_COMPACT_30_009: [** If the `hostname` cannot be resolved by DNS lookup, `SSL_Socket_Create` shall return -1. **]** **SRS_SSL_SOCKET_COMPACT_30_010: [** If socket binding fails, `SSL_Socket_Create` shall return -1. **]** **SRS_SSL_SOCKET_COMPACT_30_011: [** If socket connection fails, `SSL_Socket_Create` shall return -1. **]** ### SSL_Socket_Close `SSL_Socket_Close` calls the underlying socket `close()` on the supplied socket. Parameter validation is deferred to the underlying call, so no validation is performed by `SSL_Socket_Close`. ```c void SSL_Socket_Close(int sock); ``` **SRS_SSL_SOCKET_COMPACT_30_012: [** The `sock` parameter shall be the integer file descriptor of the socket to be closed. **]** **SRS_SSL_SOCKET_COMPACT_30_013: [** `SSL_Socket_Close` shall call the underlying `close` method on the supplied socket. **]** string_token_requirements.md000066400000000000000000000124421362133436400363570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocSTRING TOKENIZER Requirements ================ ## Overview The STRING TOKENIZER provides the functionality of splitting a STRING into multiples tokens ## Exposed API ```C extern STRING_TOKEN_HANDLE StringToken_GetFirst(const char* source, size_t length, const char** delimiters, size_t n_delims); extern bool StringToken_GetNext(STRING_TOKEN_HANDLE token, const char** delimiters, size_t n_delims); extern const char* StringToken_GetValue(STRING_TOKEN_HANDLE token); extern size_t StringToken_GetLength(STRING_TOKEN_HANDLE token); extern const char* StringToken_GetDelimiter(STRING_TOKEN_HANDLE token); extern int StringToken_Split(const char* source, size_t length, const char** delimiters, size_t n_delims, bool include_empty, char*** tokens, size_t* token_count); extern void StringToken_Destroy(STRING_TOKEN_HANDLE token); ``` ### StringToken_GetFirst ```c extern STRING_TOKEN_HANDLE StringToken_GetFirst(const char* source, size_t length, const char** delimiters, size_t n_delims); ``` **SRS_STRING_TOKENIZER_09_001: [** If `source` or `delimiters` are NULL, or `n_delims` is zero, the function shall return NULL **]** **SRS_STRING_TOKENIZER_09_002: [** If any of the strings in `delimiters` are NULL, the function shall return NULL **]** **SRS_STRING_TOKENIZER_09_003: [** A STRING_TOKEN structure shall be allocated to hold the token parameters **]** **SRS_STRING_TOKENIZER_09_004: [** If the STRING_TOKEN structure fails to be allocated, the function shall return NULL **]** **SRS_STRING_TOKENIZER_09_005: [** The source string shall be split in a token starting from the beginning of `source` up to occurrence of any one of the `demiliters`, whichever occurs first in the order provided **]** **SRS_STRING_TOKENIZER_09_006: [** If the source string does not have any of the `demiliters`, the resulting token shall be the entire `source` string **]** **SRS_STRING_TOKENIZER_09_007: [** If any failure occurs, all memory allocated by this function shall be released **]** ### StringToken_GetNext ```c extern bool StringToken_GetNext(STRING_TOKEN_HANDLE token, const char** delimiters, size_t n_delims); ``` **SRS_STRING_TOKENIZER_09_008: [** If `token` or `delimiters` are NULL, or `n_delims` is zero, the function shall return false **]** **SRS_STRING_TOKENIZER_09_009: [** If the previous token already extended to the end of `source`, the function shall return false **]** **SRS_STRING_TOKENIZER_09_010: [** The next token shall be selected starting from the position in `source` right after the previous delimiter up to occurrence of any one of `demiliters`, whichever occurs first in the order provided **]** **SRS_STRING_TOKENIZER_09_011: [** If the source string, starting right after the position of the last delimiter found, does not have any of the `demiliters`, the resulting token shall be the entire remaining of the `source` string **]** **SRS_STRING_TOKENIZER_09_012: [** If a token was identified, the function shall return true **]** ### StringToken_GetValue ```c extern const char* StringToken_GetValue(STRING_TOKEN_HANDLE token); ``` **SRS_STRING_TOKENIZER_09_013: [** If `token` is NULL the function shall return NULL **]** **SRS_STRING_TOKENIZER_09_014: [** The function shall return the pointer to the position in `source` where the current token starts. **]** ### StringToken_GetLength ```c extern size_t StringToken_GetLength(STRING_TOKEN_HANDLE token); ``` **SRS_STRING_TOKENIZER_09_015: [** If `token` is NULL the function shall return zero **]** **SRS_STRING_TOKENIZER_09_016: [** The function shall return the length of the current token **]** ### StringToken_GetDelimiter ```c extern const char* StringToken_GetDelimiter(STRING_TOKEN_HANDLE token); ``` **SRS_STRING_TOKENIZER_09_017: [** If `token` is NULL the function shall return NULL **]** **SRS_STRING_TOKENIZER_09_018: [** The function shall return a pointer to the delimiter that defined the current token, as passed to the previous call to `StringToken_GetNext()` or `StringToken_GetFirst()` **]** **SRS_STRING_TOKENIZER_09_019: [** If the current token extends to the end of `source`, the function shall return NULL **]** ### StringToken_Destroy ```c extern void StringToken_Destroy(STRING_TOKEN_HANDLE token); ``` **SRS_STRING_TOKENIZER_09_020: [** If `token` is NULL the function shall return **]** **SRS_STRING_TOKENIZER_09_021: [** Otherwise the memory allocated for STRING_TOKEN shall be released **]** ### StringToken_Split ```c extern int StringToken_Split(const char* source, size_t length, const char** delimiters, size_t n_delims, bool include_empty, char*** tokens, size_t* token_count); ``` **SRS_STRING_TOKENIZER_09_022: [** If `source`, `delimiters`, `token` or `token_count` are NULL, or `n_delims` is zero the function shall return a non-zero value **]** **SRS_STRING_TOKENIZER_09_023: [** `source` (up to `length`) shall be split into individual tokens separated by any of `delimiters` **]** **SRS_STRING_TOKENIZER_09_024: [** All NULL tokens shall be ommited if `include_empty` is not TRUE **]** **SRS_STRING_TOKENIZER_09_025: [** The tokens shall be stored in `tokens`, and their count stored in `token_count` **]** **SRS_STRING_TOKENIZER_09_026: [** If any failures splitting or storing the tokens occur the function shall return a non-zero value **]** **SRS_STRING_TOKENIZER_09_027: [** If no failures occur the function shall return zero **]** string_tokenizer_requirements.md000066400000000000000000000077161362133436400372610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocSTRING TOKENIZER Requirements ================ ## Overview The STRING TOKENIZER provides the functionality of splitting a STRING into multiples tokens ## Exposed API ```C typedef struct STRING_TOKEN_TAG* STRING_TOKENIZER_HANDLE; extern STRING_TOKENIZER_HANDLE STRING_TOKENIZER_create(STRING_HANDLE handle); extern STRING_TOKENIZER_HANDLE STRING_TOKENIZER_create_from_char(const char* input); extern int STRING_TOKENIZER_get_next_token(STRING_TOKENIZER_HANDLE t, STRING_HANDLE output, const char* delimiters); extern void STRING_TOKENIZER_destroy(STRING_TOKENIZER_HANDLE t); ``` ### STRING_TOKENIZER_create extern STRING_TOKENIZER_HANDLE STRING_TOKENIZER_create(STRING_HANDLE handle); **SRS_STRING_TOKENIZER_04_001: [** STRING_TOKENIZER_create shall return an NULL STRING_TOKENIZER_HANDLE if parameter handle is NULL **]** **SRS_STRING_TOKENIZER_04_002: [** STRING_TOKENIZER_create shall allocate a new STRING_TOKENIZER _HANDLE having the content of the STRING_HANDLE copied and current position pointing at the beginning of the string **]** **SRS_STRING_TOKENIZER_04_003: [** STRING_TOKENIZER_create shall return an NULL STRING_TOKENIZER _HANDLE on any error that is encountered **]** ### STRING_TOKENIZER_create_from_char extern STRING_TOKENIZER_HANDLE STRING_TOKENIZER_create_from_char(const char* input); **SRS_STRING_TOKENIZER_07_001: [** STRING_TOKENIZER_create_from_char shall return an NULL STRING_TOKENIZER_HANDLE if parameter input is NULL **]** **SRS_STRING_TOKENIZER_07_002: [** STRING_TOKENIZER_create_from_char shall allocate a new STRING_TOKENIZER _HANDLE having the content of the STRING_HANDLE copied and current position pointing at the beginning of the string **]** **SRS_STRING_TOKENIZER_07_003: [** STRING_TOKENIZER_create_from_char shall return an NULL STRING_TOKENIZER _HANDLE on any error that is encountered **]** ### STRING_TOKENIZER_get_next_token extern int STRING_TOKENIZER_get_next_token(STRING_TOKENIZER_HANDLE t, STRING_HANDLE output,const char* delimiters); **SRS_STRING_TOKENIZER_04_004: [** STRING_TOKENIZER_get_next_token shall return a nonzero value if any of the 3 parameters is NULL **]** **SRS_STRING_TOKENIZER_04_005: [** STRING_TOKENIZER_get_next_token searches the string inside STRING_TOKENIZER_HANDLE for the first character that is NOT contained in the current delimiter **]** **SRS_STRING_TOKENIZER_04_006: [** If no such character is found, then STRING_TOKENIZER_get_next_token shall return a nonzero Value (You've reach the end of the string or the string consists with only delimiterstokens). **]** **SRS_STRING_TOKENIZER_04_007: [** If such a character is found, STRING_TOKENIZER_get_next_token shall consider it as the start of a token. **]** **SRS_STRING_TOKENIZER_04_008: [** STRING_TOKENIZER_get_next_token than searches from the start of a token for a character that is contained in the delimiters string. **]** **SRS_STRING_TOKENIZER_04_009: [** If no such character is found, STRING_TOKENIZER_get_next_token extends the current token to the end of the string inside t, copies the token to output and returns 0. **]** **SRS_STRING_TOKENIZER_04_010: [** If such a character is found, STRING_TOKENIZER_get_next_token shall consider it the end of the token and copy its content to output, updates the current position inside t to the next character and returns 0. **]** **SRS_STRING_TOKENIZER_04_011: [** Each subsequent call to STRING_TOKENIZER_get_next_token starts searching from the saved position on t and behaves as described above. **]** **SRS_STRING_TOKENIZER_TOKENIZER_04_014: [** STRING_TOKENIZER_get_next_token shall return nonzero value if t contains an empty string. **]** ### STRING_TOKENIZER_destroy extern void STRING_TOKENIZER_destroy(STRING_TOKENIZER_HANDLE t); **SRS_STRING_TOKENIZER_TOKENIZER_04_012: [** STRING_TOKENIZER_destroy shall free the memory allocated by the STRING_TOKENIZER_create **]** **SRS_STRING_TOKENIZER_TOKENIZER_04_013: [** When the t argument is NULL, then STRING_TOKENIZER_destroy shall not attempt to free **]** strings_requirements.md000066400000000000000000000270221362133436400353420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocstrings requirements ================ ## Overview The STRING object encapsulates a char* variable. This interface is access by STRING_HANDLE variables that provide further encapsulation of the interface. ## Exposed API ```c typedef void* STRING_HANDLE; typedef void* STRING_HANDLE; extern STRING_HANDLE STRING_new(void); extern STRING_HANDLE STRING_clone(STRING_HANDLE handle); extern STRING_HANDLE STRING_construct(const char* psz); extern STRING_HANDLE STRING_construct_n(const char* psz, size_t n); extern STRING_HANDLE STRING_new_with_memory(const char* memory); extern STRING_HANDLE STRING_new_quoted(const char* source); extern STRING_HANDLE STRING_new_JSON(const char* source); extern STRING_HANDLE STRING_from_byte_array(const unsigned char* source, size_t size); extern void STRING_delete(STRING_HANDLE handle); extern int STRING_concat(STRING_HANDLE handle, const char* s2); extern int STRING_concat_with_STRING(STRING_HANDLE s1, STRING_HANDLE s2); extern int STRING_quote(STRING_HANDLE handle); extern int STRING_copy(STRING_HANDLE s1, const char* s2); extern int STRING_copy_n(STRING_HANDLE s1, const char* s2, size_t n); extern const char* STRING_c_str(STRING_HANDLE handle); extern int STRING_empty(STRING_HANDLE handle); extern size_t STRING_length(STRING_HANDLE handle); extern int STRING_compare(STRING_HANDLE h1, STRING_HANDLE h2); extern STRING_HANDLE STRING_construct_sprintf(const char* format, ...); extern int STRING_sprintf(STRING_HANDLE s1, const char* format, ...); ``` ### STRING_new ```c extern STRING_HANDLE STRING_new(void); ``` **SRS_STRING_07_001: [** STRING_new shall allocate a new STRING_HANDLE pointing to an empty string. **]** **SRS_STRING_07_002: [** STRING_new shall return an NULL STRING_HANDLE on any error that is encountered. **]** ### STRING_clone ```c extern STRING_HANDLE STRING_clone(STRING_HANDLE handle); ``` **SRS_STRING_02_001: [** STRING_clone shall produce a new string having the same content as the handle string. **]** **SRS_STRING_02_002: [** If parameter handle is NULL then STRING_clone shall return NULL. **]** **SRS_STRING_02_003: [** If STRING_clone fails for any reason, it shall return NULL. **]** ### STRING_construct ```c extern STRING_HANDLE STRING_construct(const char*) ``` **SRS_STRING_07_003: [** STRING_construct shall allocate a new string with the value of the specified const char*. **]** **SRS_STRING_07_005: [** If the supplied const char* is NULL STRING_construct shall return a NULL value. **]** **SRS_STRING_07_032: [** STRING_construct encounters any error it shall return a NULL value. **]** ### STRING_new_with_memory ```c extern STRING_HANDLE STRING_new_with_memory(char*) ``` **SRS_STRING_07_006: [** STRING_new_with_memory shall return a STRING_HANDLE by using the supplied char* memory. **]** **SRS_STRING_07_007: [** STRING_new_with_memory shall return a NULL STRING_HANDLE if the supplied char* is NULL. **]** ### STRING_new_quoted ```c extern STRING_HANDLE STRING_new_quoted(const char*) ``` **SRS_STRING_07_008: [** STRING_new_quoted shall return a valid STRING_HANDLE Copying the supplied const char* value surrounded by quotes. **]** **SRS_STRING_07_009: [** STRING_new_quoted shall return a NULL STRING_HANDLE if the supplied const char* is NULL. **]** **SRS_STRING_07_031: [** STRING_new_quoted shall return a NULL STRING_HANDLE if any error is encountered. **]** ### STRING_new_JSON ```c extern STRING_HANDLE STRING_new_JSON(const char* source); ``` STRING_new_JSON produces a JSON value representation of the parameter passed as argument source. **SRS_STRING_02_011: [** If source is NULL then STRING_new_JSON shall return NULL. **]** STRING_new_JSON shall produce a STRING_HANDLE according to the following: **SRS_STRING_02_012: [** The string shall begin with the quote character. **]** **SRS_STRING_02_013: [** The string shall copy the characters of source "as they are" (until the '\0' character) with the following exceptions: **]** **SRS_STRING_02_014: [** If any character has the value outside [1...127 **]** then STRING_new_JSON shall fail and return NULL.] **SRS_STRING_02_016: [** If the character is " (quote) then it shall be repsented as \". **]** **SRS_STRING_02_017: [** If the character is \ (backslash) then it shall represented as \\. **]** **SRS_STRING_02_018: [** If the character is / (slash) then it shall be represented as \/. **]** **SRS_STRING_02_019: [** If the character code is less than 0x20 then it shall be represented as \u00xx, where xx is the hex representation of the character code. **]** **SRS_STRING_02_020: [** The string shall end with " (quote). **]** **SRS_STRING_02_021: [** If the complete JSON representation cannot be produced, then STRING_new_JSON shall fail and return NULL. **]** ### STRING_delete ```c extern void STRING_delete(STRING_HANDLE handle); ``` **SRS_STRING_07_010: [** STRING_delete will free the memory allocated by the STRING_HANDLE. **]** **SRS_STRING_07_011: [** STRING_delete will not attempt to free anything with a NULL STRING_HANDLE. **]** ### STRING_concat ```c extern int STRING_concat(STRING_HANDLE handle, const char* s2) ``` **SRS_STRING_07_012: [** STRING_concat shall concatenate the given STRING_HANDLE and the const char* value and place the value in the handle. **]** **SRS_STRING_07_013: [** STRING_concat shall return a nonzero number if an error is encountered. **]** ### STRING_concat ```c extern int STRING_concat(STRING_HANDLE handle, const char* s2) ``` **SRS_STRING_07_034: [** String_Concat_with_STRING shall concatenate a given STRING_HANDLE variable with a source STRING_HANDLE. **]** **SRS_STRING_07_035: [** String_Concat_with_STRING shall return a nonzero number if an error is encountered. **]** ### STRING_quote ```c extern int STRING_quote(STRING_HANDLE handle) ``` **SRS_STRING_07_014: [** STRING_quote shall "quote" the supplied STRING_HANDLE and return 0 on success. **]** **SRS_STRING_07_015: [** STRING_quote shall return a nonzero value if any of the supplied parameters are NULL. **]** **SRS_STRING_07_029: [** STRING_quote shall return a nonzero value if any error is encountered. **]** ### STRING_copy ```c extern int STRING_copy(STRING_HANDLE s1, const char* s2) ``` **SRS_STRING_07_016: [** STRING_copy shall copy the const char* into the supplied STRING_HANDLE. **]** **SRS_STRING_07_017: [** STRING_copy shall return a nonzero value if any of the supplied parameters are NULL. **]** **SRS_STRING_07_027: [** STRING_copy shall return a nonzero value if any error is encountered. **]** **SRS_STRING_07_026: [** If the underlying char* refered to by s1 handle is equal to char* s2 than STRING_copy shall be a noop and return 0. **]** **SRS_STRING_07_033: [** If overlapping pointer address is given to STRING_copy the behavior is undefined. **]** ### STRING_copy_n ```c extern int STRING_copy_n(STRING_HANDLE s1, const char* s2, size_t n) ``` **SRS_STRING_07_018: [** STRING_copy_n shall copy the number of characters in const char* or the size_t whichever is lesser. **]** **SRS_STRING_07_019: [** STRING_copy_n shall return a nonzero value if STRING_HANDLE or const char* is NULL. **]** **SRS_STRING_07_028: [** STRING_copy_n shall return a nonzero value if any error is encountered. **]** ### STRING_c_str ```c extern const char* STRING_c_str(STRING_HANDLE handle) ``` **SRS_STRING_07_020: [** STRING_c_str shall return the const char* associated with the given STRING_HANDLE. **]** **SRS_STRING_07_021: [** STRING_c_str shall return NULL if the STRING_HANDLE is NULL. **]** ### STRING_empty ```c extern int STRING_empty(STRING_HANDLE s1) ``` **SRS_STRING_07_022: [** STRING_empty shall revert the STRING_HANDLE to an empty state. **]** **SRS_STRING_07_023: [** STRING_empty shall return a nonzero value if the STRING_HANDLE is NULL. **]** **SRS_STRING_07_030: [** STRING_empty shall return a nonzero value if the STRING_HANDLE is NULL. **]** ### STRING_length ```c extern size_t STRING_length(STRING_HANDLE handle) ``` **SRS_STRING_07_024: [** STRING_length shall return the length of the underlying char* for the given handle **]** **SRS_STRING_07_025: [** STRING_length shall return zero if the given handle is NULL. **]** ### STRING_construct_n ```c extern STRING_HANDLE STRING_construct_n(const char* psz, size_t n); ``` **SRS_STRING_02_007: [** STRING_construct_n shall construct a STRING_HANDLE from first "n" characters of the string pointed to by psz parameter. **]** **SRS_STRING_02_008: [** If psz is NULL then STRING_construct_n shall return NULL. **]** **SRS_STRING_02_009: [** If n is bigger than the size of the string psz, then STRING_construct_n shall return NULL. **]** **SRS_STRING_02_010: [** In all other error cases, STRING_construct_n shall return NULL. **]** ### STRING_compare ```c extern int STRING_compare(STRING_HANDLE h1, STRING_HANDLE h2); ``` **SRS_STRING_07_034: [** STRING_compare returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string s2. **]** **SRS_STRING_07_035: [** If h1 and h2 are both NULL then STRING_compare shall return 0. **]** **SRS_STRING_07_036: [** If h1 is NULL and h2 is a nonNULL value then STRING_compare shall return 1. **]** **SRS_STRING_07_037: [** If h2 is NULL and h1 is a nonNULL value then STRING_compare shall return -1. **]** **SRS_STRING_07_038: [** STRING_compare shall compare the char s variable using the strcmp function. **]** ### STRING_from_byte_array ```c extern STRING_HANDLE STRING_from_byte_array(const unsigned char* source, size_t size) ``` STRING_from_BUFFER builds a string that has the same content (byte-by-byte) as a byte array. **SRS_STRING_02_022: [** If `source` is NULL and size > 0 then `STRING_from_BUFFER` shall fail and return NULL. **]** **SRS_STRING_02_023: [** Otherwise, `STRING_from_BUFFER` shall build a string that has the same content (byte-by-byte) as source and return a non-NULL handle. **]** **SRS_STRING_02_024: [** If building the string fails, then `STRING_from_BUFFER` shall fail and return NULL. **]** ### STRING_construct_sprintf ```c extern STRING_HANDLE STRING_construct_sprintf(const char* format, ...); ``` STRING_construct_sprintf constructs the STRING_HANDLE from a printf formatting **SRS_STRING_07_039: [** If the parameter format is NULL then STRING_construct_sprintf shall return NULL. **]** **SRS_STRING_07_040: [** If any error is encountered STRING_construct_sprintf shall return NULL. **]** **SRS_STRING_07_041: [** STRING_construct_sprintf shall determine the size of the resulting string and allocate the necessary memory. **]** **SRS_STRING_07_045: [** STRING_construct_sprintf shall allocate a new string with the value of the specified printf formated const char. **]** ### STRING_sprintf ```c extern int STRING_sprintf(STRING_HANDLE s1, const char* format, ...); ``` STRING_sprintf shall append a printf format style string to the end of a STRING_HANDLE. **SRS_STRING_07_042: [** if the parameters s1 or format are NULL then STRING_sprintf shall return non zero value. **]** **SRS_STRING_07_043: [** If any error is encountered STRING_sprintf shall return a non zero value. **]** **SRS_STRING_07_044: [** On success STRING_sprintf shall return 0. **]** ### STRING_replace ```c int STRING_replace(STRING_HANDLE handle, char target, char replace) ``` **SRS_STRING_07_046: [** If handle is NULL `STRING_replace` shall return a non-zero value. **]** **SRS_STRING_07_047: [** `STRING_replace` shall replace all instances of target with replace. **]** **SRS_STRING_07_048: [** If target and replace are equal `STRING_replace`, shall do nothing shall return zero. **]** **SRS_STRING_07_049: [** On success `STRING_replace` shall return zero. **]** template_requirements.md000066400000000000000000000061021362133436400354600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoctemplate ========= ## Overview Template is a fake project to demonstrate how to create a new code for the Azure IoT SDKs using the unit test suite together with mockable functions. This sample simulate a target module that calls functions in the callee module. The unit test will test the target functions emulating different behaviors for the callee mockable functions. To complete this sample, this document describes the requirements for the target functions. If you are creating a new module for the SDK, it is mandatory that you create the requirements, each requirement must show up in the code, and must have, at least, one unity test to cover it. Note that it is just a sample, so, this requirement does not contemplate all possible situations and we only have unit tests for the requirements that helped to demonstrate a test suite feature. ## References Add any reference that can support this implementation here. For example, it the target implement a TLS protocol, it can have the follow references: [TLS Protocol (RFC2246)](https://www.ietf.org/rfc/rfc2246.txt) [TLS Protocol (generic information)](https://en.wikipedia.org/wiki/Transport_Layer_Security) ## Exposed API **SRS_TEMPLATE_21_011: [** The target shall return the errors defined by the TARGET_RESULT in target.h. **]** ```c #define TARGET_RESULT_VALUES \ TARGET_RESULT_OK, \ TARGET_RESULT_FAIL, \ TARGET_RESULT_OUT_OF_MEMORY DEFINE_ENUM(TARGET_RESULT, TARGET_RESULT_VALUES); ``` **]** **SRS_TEMPLATE_21_012: [** The target shall implement the APIs defined in target.h: ```c TARGET_RESULT target_create(size_t size); void target_destroy(void); TARGET_RESULT target_foo(void); ``` **]** ### target_create ```c TARGET_RESULT target_create(size_t size); ``` **SRS_TEMPLATE_21_001: [** The target_create shall call callee_open to do stuff and allocate the memory. **]** **SRS_TEMPLATE_21_002: [** If callee_open return error, the target_create shall return TARGET_RESULT_FAIL. **]** **SRS_TEMPLATE_21_003: [** If there is no memory to control the target_create information, it shall return TARGET_RESULT_OUT_OF_MEMORY. **]** **SRS_TEMPLATE_21_008: [** If callee_open got success, it shall return TARGET_RESULT_OK. **]** **SRS_TEMPLATE_21_009: [** If callee_open is called but the connection is already created, it shall return TARGET_RESULT_OK. **]** ### target_destroy ```c void target_destroy(void); ``` **SRS_TEMPLATE_21_006: [** The target_destroy shall call callee_close to do stuff and free the memory. **]** **SRS_TEMPLATE_21_007: [** If target_destroy is called but the connection is not created, the target_destroy shall not do anything. **]** ### target_foo ```c TARGET_RESULT target_foo(void); ``` **SRS_TEMPLATE_21_004: [** The target_foo shall do stuff calling callee_bar_1 and callee_bar_2. **]** **SRS_TEMPLATE_21_005: [** If target_foo is called but the connection is not created, the target_foo shall return TARGET_RESULT_FAIL. **]** **SRS_TEMPLATE_21_010: [** If target_foo cannot execute foo, the target_foo shall return TARGET_RESULT_FAIL. **]** threadapi_and_sleep_requirements.md000066400000000000000000000120741362133436400376250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# threadapi and sleep ## Overview This document defines the behavior of the Azure IoT's **sleep** and **threadapi** adapters. These two adapters are specifed together because they are declared in the same [threadapi.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/threadapi.h) header file. The _sleep_ and _threadapi_ adapters are related because they share a header file and they both deal with thread functionality, but they are described as distinct adapters in these documents because the _sleep_ adapter is mandatory for correct SDK operation, while the _threadapi_ adapter is optional. ## References [Azure IoT porting guide](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/porting_guide.md)
[threadapi.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/threadapi.h) ## Exposed API The _threadapi_ adapter uses these types specified in threadapi.h: ``` typedef void* THREAD_HANDLE; typedef enum { THREADAPI_OK, THREADAPI_INVALID_ARG, THREADAPI_NO_MEMORY, THREADAPI_ERROR, } THREADAPI_RESULT; ``` ## sleep Adapter ### ThreadAPI_Sleep The _sleep_ adapter is a single exposed function, `ThreadAPI_Sleep`. This function is required for correct SDK operation. ```c void ThreadAPI_Sleep(unsigned int milliseconds); ``` **SRS_THREADAPI_30_001: [** ThreadAPI_Sleep shall suspend the thread for at least the supplied value of `milliseconds`. **]** ## threadapi Adapter ### ThreadAPI_Create Creates a thread with an entry point specified by the `func` argument. The concrete type of the `void* THREAD_HANDLE` is at the discretion of the developer. ```c THREADAPI_RESULT ThreadAPI_Create(THREAD_HANDLE* threadHandle, THREAD_START_FUNC func, void* arg); ``` **SRS_THREADAPI_30_010: [** If the **threadapi** adapter is not implemented, `ThreadAPI_Create` shall return `THREADAPI_ERROR`. **]** **SRS_THREADAPI_30_011: [** If `threadHandle` is NULL `ThreadAPI_Create` shall return `THREADAPI_INVALID_ARG`. **]** **SRS_THREADAPI_30_012: [** If `func` is NULL `ThreadAPI_Create` shall return `THREADAPI_INVALID_ARG`. **]** **SRS_THREADAPI_30_013: [** If `ThreadAPI_Create` is unable to create a thread it shall return `THREADAPI_ERROR` or `THREADAPI_NO_MEMORY`, whichever seems more appropriate. **]** **SRS_THREADAPI_30_014: [** On success, `ThreadAPI_Create` shall return the created thread object in `threadHandle`. **]** **SRS_THREADAPI_30_015: [** On success, `ThreadAPI_Create` shall return `THREADAPI_OK`. **]** ### ThreadAPI_Join Waits for the thread identified by the `threadHandle` argument to complete. When the `threadHandle` thread completes, all resources associated with the thread must be released and the thread handle will no longer be valid. ```c THREADAPI_RESULT ThreadAPI_Join(THREAD_HANDLE threadHandle, int* result); ``` **SRS_THREADAPI_30_020: [** If the **threadapi** adapter is not implemented, `ThreadAPI_Join` shall return `THREADAPI_ERROR`. **]** **SRS_THREADAPI_30_021: [** If `threadHandle` is NULL `ThreadAPI_Join` shall return `THREADAPI_INVALID_ARG`. **]** **SRS_THREADAPI_30_022: [** If `ThreadAPI_Join` fails it shall return `THREADAPI_ERROR`. **]** **SRS_THREADAPI_30_023: [** On success, `ThreadAPI_Join` shall wait for the thread identified by the `threadHandle` argument to complete. **]** **SRS_THREADAPI_30_024: [** On success, all resources associated with the thread shall be released. **]** **SRS_THREADAPI_30_025: [** On success, if `result` is non-NULL then the result of the `THREAD_START_FUNC` shall be returned in `result`. **]** **SRS_THREADAPI_30_026: [** On success, `ThreadAPI_Join` shall return `THREADAPI_OK`. **]** ### ThreadAPI_Exit This function is called by the `THREAD_START_FUNC` when it exits. If another thread has called `ThreadAPI_Join` then that thread will be unblocked when `ThreadAPI_Exit` is called. The implementation must maintain the relationship between the `THREAD_HANDLE` passed into `ThreadAPI_Join` and the running thread so that `ThreadAPI_Exit` unblocks the correct waiting thread when when more than one `THREAD_HANDLE` has been created. This relationship will need to be maintained in thread-local storage or the equivalent; the thread function cannot be used for disambiguation because there is no guarantee that multiple threads are not using the same thread function. ```c void ThreadAPI_Exit(int result); ``` For this `ThreadAPI_Exit` specification, the phrase _"associated `ThreadAPI_Join`"_ means a `ThreadAPI_Join` which was provided with the same `THREAD_HANDLE` parameter that was returned during the creation of the thread from which `ThreadAPI_Exit` was called. **SRS_THREADAPI_30_030: [** If the **threadapi** adapter is not implemented, `ThreadAPI_Exit` shall do nothing. **]** **SRS_THREADAPI_30_031: [** If another thread has made an _associated `ThreadAPI_Join`_ call, then that thread shall be unblocked when `ThreadAPI_Exit` is called. **]** **SRS_THREADAPI_30_032: [** The `result` parameter supplied to `ThreadAPI_Exit` shall be returned in the `result` parameter of the _associated `ThreadAPI_Join`_ call. **]** threadapi_freertos_requirements.md000066400000000000000000000032261362133436400375230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocthreadapi_freertos ================= ## Overview threadapi_freertos implements a wrapper function for the FreeRTOS `vTaskDelay` function. FreeRTOS is not guaranteed to support threading, so it returns an error for the other ThreadAPI functions. ## References [vTaskDelay](http://www.freertos.org/a00127.html) ### Exposed API **SRS_THREADAPI_FREERTOS_30_001: [** The threadapi_freertos shall implement the method `ThreadAPI_Sleep` defined in `threadapi.h`. ```c /** * @brief Sleeps the current thread for the given number of milliseconds. * * @param milliseconds The number of milliseconds to sleep. */ void ThreadAPI_Sleep(unsigned int milliseconds); ``` **]** ### ThreadAPI_Sleep ```c void ThreadAPI_Sleep(unsigned int milliseconds); ``` **SRS_THREADAPI_FREERTOS_30_002: [** The ThreadAPI_Sleep shall receive a time in milliseconds. **]** **SRS_THREADAPI_FREERTOS_30_003: [** The ThreadAPI_Sleep shall stop the thread for the specified time. **]** ### ThreadAPI_Create ```c THREADAPI_RESULT ThreadAPI_Create(THREAD_HANDLE* threadHandle, THREAD_START_FUNC func, void* arg); ``` **SRS_THREADAPI_FREERTOS_30_004: [** FreeRTOS is not guaranteed to support threading, so ThreadAPI_Create shall return THREADAPI_ERROR. **]** ### ThreadAPI_Join ```c THREADAPI_RESULT ThreadAPI_Join(THREAD_HANDLE threadHandle, int* res); ``` **SRS_THREADAPI_FREERTOS_30_005: [** FreeRTOS is not guaranteed to support threading, so ThreadAPI_Join shall return THREADAPI_ERROR. **]** ### ThreadAPI_Exit ```c void ThreadAPI_Exit(int res); ``` **SRS_THREADAPI_FREERTOS_30_006: [** FreeRTOS is not guaranteed to support threading, so ThreadAPI_Exit shall do nothing. **]** tickcounter_freertos_requirement.md000066400000000000000000000077331362133436400377400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoctickcounter_freertos ========= ## Overview tickcounter_freertos implements the Azure IoT C Shared Utility tickcounter adapter for devices running FreeRTOS. FreeRTOS tick counting is provided by the FreeRTOS call `xTaskGetTickCount`, which requires the FreeRTOS call `vTaskStartScheduler` to be called beforehand. The call to `vTaskStartScheduler` happens during initialization for any realistic FreeRTOS application, so further system initialization in the tickcounter_freertos adapter is not required. FreeRTOS can be configured to use 16-bit ticks by setting the configUSE_16_BIT_TICKS value to '0'. This could lead to incorrect behavior due to overflow in some situations, so use caution when employing 16-bit ticks. ## References [Azure IoT C Shared Utility tickcounter adapter](https://github.com/Azure/azure-c-shared-utility/blob/master/doc/porting_guide.md#tickcounter-adapter) [tickcounter.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/tickcounter.h) ## Exposed API **SRS_TICKCOUNTER_FREERTOS_30_001: [** The tickcounter_freertos adapter shall use the following data types as defined in tickcounter.h. ```c // uint_fast32_t is a 32 bit uint typedef uint_fast32_t tickcounter_ms_t; // TICK_COUNTER_INSTANCE_TAG* is an opaque handle type typedef struct TICK_COUNTER_INSTANCE_TAG* TICK_COUNTER_HANDLE; ``` **]** **SRS_TICKCOUNTER_FREERTOS_30_002: [** The tickcounter_freertos adapter shall implement the API calls defined in tickcounter.h: ```c TICK_COUNTER_HANDLE tickcounter_create(void); void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter); int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t* current_ms); ``` **]** ### tickcounter_create The `tickcounter_create` call allocates and initializes an internally defined TICK_COUNTER_INSTANCE structure and returns its pointer as type TICK_COUNTER_HANDLE. ```c TICK_COUNTER_HANDLE tickcounter_create(void); ``` **SRS_TICKCOUNTER_FREERTOS_30_003: [** `tickcounter_create` shall allocate and initialize an internally-defined TICK_COUNTER_INSTANCE structure and return its pointer on success. **]** **SRS_TICKCOUNTER_FREERTOS_30_004: [** If allocation of the internally-defined TICK_COUNTER_INSTANCE structure fails, `tickcounter_create` shall return NULL. (Initialization failure is not possible for FreeRTOS.) **]** ### tickcounter_destroy The `tickcounter_destroy` call releases all resources acquired by the `tickcounter_create` call. ```c void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter); ``` **SRS_TICKCOUNTER_FREERTOS_30_005: [** `tickcounter_destroy` shall delete the internally-defined TICK_COUNTER_INSTANCE structure specified by the `tick_counter` parameter. (This call has no failure case.) **]** **SRS_TICKCOUNTER_FREERTOS_30_006: [** If the `tick_counter` parameter is NULL, `tickcounter_destroy` shall do nothing. **]** ### tickcounter_get_current_ms The `tickcounter_get_current_ms` call returns the number of milleconds elapsed since the `tickcounter_create` call. ```c int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t* current_ms); ``` **SRS_TICKCOUNTER_FREERTOS_30_007: [** If the `tick_counter` parameter is NULL, `tickcounter_get_current_ms` shall return a non-zero value to indicate error. **]** **SRS_TICKCOUNTER_FREERTOS_30_008: [** If the `current_ms` parameter is NULL, `tickcounter_get_current_ms` shall return a non-zero value to indicate error. **]** **SRS_TICKCOUNTER_FREERTOS_30_009: [** `tickcounter_get_current_ms` shall set `*current_ms` to the number of milliseconds elapsed since the `tickcounter_create` call for the specified `tick_counter` and return 0 to indicate success (In FreeRTOS this call has no failure case.) **]** **SRS_TICKCOUNTER_FREERTOS_30_010: [** If the FreeRTOS call `xTaskGetTickCount` experiences a single overflow between the calls to `tickcounter_create` and `tickcounter_get_current_ms`, the `tickcounter_get_current_ms` call shall still return the correct interval. **]** tlsio_cyclonessl_requirements.md000066400000000000000000000352071362133436400372450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoctlsio_cyclonessl ============= ## Overview tlsio_cyclonessl implements a tls adapter for the CycloneSSL TLS library. This adapter only works in blocking mode. ## References [CycloneSSL official page](http://www.oryx-embedded.com/cyclone_ssl.html) [TLS Protocol (generic information)](https://en.wikipedia.org/wiki/Transport_Layer_Security) ## Exposed API ```c MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, tlsio_cyclonessl_get_interface_description); ``` ### tlsio_cyclonessl_create tlsio_cyclonessl_create is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_create member. ```c CONCRETE_IO_HANDLE tlsio_cyclonessl_create(void* io_create_parameters); ``` **SRS_TLSIO_CYCLONESSL_01_001: [** tlsio_cyclonessl_create shall create a new instance of the tlsio for Cyclone SSL. **]** **SRS_TLSIO_CYCLONESSL_01_002: [** If io_create_parameters is NULL, tlsio_cyclonessl_create shall fail and return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_003: [** io_create_parameters shall be used as a TLSIO_CONFIG\*. **]** **SRS_TLSIO_CYCLONESSL_01_004: [** If the hostname member is NULL, then tlsio_cyclonessl_create shall fail and return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_005: [** tlsio_cyclonessl_create shall copy the hostname and port values for later use when the open of the underlying socket is needed. **]** **SRS_TLSIO_CYCLONESSL_01_006: [** hostname shall be copied by calling mallocAndStrcpy_s. **]** **SRS_TLSIO_CYCLONESSL_01_076: [** If allocating memory for the TLS IO instance fails then tlsio_cyclonessl_create shall fail and return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_007: [** If mallocAndStrcpy_s fails then tlsio_cyclonessl_create shall fail and return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_008: [** tlsio_cyclonessl_create shall initialize the yarrow context by calling yarrowInit. **]** **SRS_TLSIO_CYCLONESSL_01_009: [** If yarrowInit fails then tlsio_cyclonessl_create shall return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_010: [** The yarrow context shall be seeded with 32 bytes of randomly chosen data by calling yarrowSeed. **]** **SRS_TLSIO_CYCLONESSL_01_011: [** If yarrowSeed fails then tlsio_cyclonessl_create shall return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_012: [** tlsio_cyclonessl_create shall create a TLS context by calling tlsInit. **]** **SRS_TLSIO_CYCLONESSL_01_013: [** If tlsInit fails then tlsio_cyclonessl_create shall return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_014: [** The TLS context shall be setup to operate as a client by calling tlsSetConnectionEnd with TLS_CONNECTION_END_CLIENT. **]** **SRS_TLSIO_CYCLONESSL_01_015: [** If tlsSetConnectionEnd fails then tlsio_cyclonessl_create shall return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_016: [** The pseudo random number generator to be used shall be set by calling tlsSetPrng with the yarrow instance as argument. **]** **SRS_TLSIO_CYCLONESSL_01_017: [** If tlsSetPrng fails then tlsio_cyclonessl_create shall return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_018: [** When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. **]** ### tlsio_cyclonessl_destroy tlsio_cyclonessl_destroy is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_destroy member. ```c void tlsio_cyclonessl_destroy(CONCRETE_IO_HANDLE tls_io); ``` **SRS_TLSIO_CYCLONESSL_01_019: [** tlsio_cyclonessl_destroy shall free the tlsio CycloneSSL instance. **]** **SRS_TLSIO_CYCLONESSL_01_020: [** If tls_io is NULL, tlsio_cyclonessl_destroy shall do nothing. **]** **SRS_TLSIO_CYCLONESSL_01_021: [** tlsio_cyclonessl_destroy shall deinitialize the yarrow context by calling yarrowRelease. **]** **SRS_TLSIO_CYCLONESSL_01_022: [** The TLS context shall be freed by calling tlsFree. **]** **SRS_TLSIO_CYCLONESSL_01_077: [** All options cached via tlsio_cyclonessl_set_option shall also be freed. **]** **SRS_TLSIO_CYCLONESSL_01_081: [** tlsio_cyclonessl_destroy should close the IO if it was open before freeing all the resources. **]** ### tlsio_cyclonessl_open tlsio_cyclonessl_open is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_open member. ```c int tlsio_cyclonessl_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) ``` **SRS_TLSIO_CYCLONESSL_01_023: [** tlsio_cyclonessl_open shall open the TLS io and on success it shall return 0. **]** **SRS_TLSIO_CYCLONESSL_01_024: [** If any of the arguments tls_io, on_io_open_complete, on_bytes_received or on_io_error are NULL then tlsio_cyclonessl_open shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_025: [** tlsio_cyclonessl_open shall create a socket by calling tlsio_cyclonessl_socket_create, while passing to it the hostname and port that were saved in the tlsio_cyclonessl_create. **]** **SRS_TLSIO_CYCLONESSL_01_026: [** If tlsio_cyclonessl_socket_create fails, then tlsio_cyclonessl_open shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_027: [** The socket created by tlsio_cyclonessl_socket_create shall be assigned to the TLS context by calling tlsSetSocket. **]** **SRS_TLSIO_CYCLONESSL_01_028: [** If tlsSetSocket fails then tlsio_cyclonessl_open shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_078: [** If certificates have been set by using tlsio_cyclonessl_set_option then a call to tlsSetTrustedCaList shall be made to pass the certificates to CycloneSSL. **]** **SRS_TLSIO_CYCLONESSL_01_079: [** If tlsSetTrustedCaList fails then tlsio_cyclonessl_open shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_031: [** tlsio_cyclonessl_open shall start the TLS handshake by calling tlsConnect. **]** **SRS_TLSIO_CYCLONESSL_01_032: [** If tlsConnect fails then tlsio_cyclonessl_open shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_033: [** If tlsConnect succeeds, the callback on_io_open_complete shall be called, while passing on_io_open_complete_context and IO_OPEN_OK as arguments. **]** **SRS_TLSIO_CYCLONESSL_01_034: [** If tlsio_cyclonessl_open is called while the IO is open, tlsio_cyclonessl_open shall fail and return a non-zero value without performing any work to open the IO. **]** ### tlsio_cyclonessl_close tlsio_cyclonessl_close is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_close member. ```c int tlsio_cyclonessl_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) ``` **SRS_TLSIO_CYCLONESSL_01_035: [** tlsio_cyclonessl_close shall close the TLS IO and on success it shall return 0. **]** **SRS_TLSIO_CYCLONESSL_01_036: [** If the argument tls_io is NULL, tlsio_cyclonessl_close shall fail and return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_037: [** tlsio_cyclonessl_close shall close the TLS connection by calling tlsShutdown. **]** **SRS_TLSIO_CYCLONESSL_01_038: [** If tlsShutdown fails, tlsio_cyclonessl_close shall fail and return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_039: [** tlsio_cyclonessl_destroy shall destroy the underlying socket by calling tlsio_cyclonessl_socket_destroy. **]** **SRS_TLSIO_CYCLONESSL_01_040: [** On success, on_io_close_complete shall be called while passing as argument on_io_close_complete_context. **]** **SRS_TLSIO_CYCLONESSL_01_041: [** If tlsio_cyclonessl_close is called when not open, tlsio_cyclonessl_close shall fail and return a non-zero value. **]** ### tlsio_cyclonessl_send tlsio_cyclonessl_send is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_send member. ```c int tlsio_cyclonessl_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* on_send_complete_context) ``` **SRS_TLSIO_CYCLONESSL_01_042: [** tlsio_cyclonessl_send shall send the `size` bytes pointed to by `buffer` and on success it shall return 0. **]** **SRS_TLSIO_CYCLONESSL_01_043: [** If any of the arguments tls_io or buffer is NULL, tlsio_cyclonessl_send shall fail and return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_044: [** If size is 0, tlsio_cyclonessl_send shall fail and return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_045: [** on_send_complete shall be allowed to be NULL. **]** **SRS_TLSIO_CYCLONESSL_01_046: [** On success, if a non-NULL value was passed for on_send_complete, then on_send_complete shall be called while passing to it the on_send_complete_context value. **]** **SRS_TLSIO_CYCLONESSL_01_047: [** tlsio_cyclonessl_send shall send the bytes by calling tlsWrite and passing buffer and size as arguments. 0 shall be passed for the flags argument. **]** **SRS_TLSIO_CYCLONESSL_01_048: [** If tlsio_cyclonessl_send is called when the IO is not open, tlsio_cyclonessl_send shall fail and return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_049: [** If the IO is in an error state (an error was reported through the on_io_error callback), tlsio_cyclonessl_send shall fail and return a non-zero value. **]** ### tlsio_cyclonessl_dowork tlsio_cyclonessl_dowork is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_dowork member. ```c void tlsio_cyclonessl_dowork(CONCRETE_IO_HANDLE tls_io) ``` **SRS_TLSIO_CYCLONESSL_01_050: [** tlsio_cyclonessl_dowork shall check if any bytes are available to be read from the CycloneSSL library and indicate those bytes as received. **]** **SRS_TLSIO_CYCLONESSL_01_051: [** If the tls_io argument is NULL, tlsio_cyclonessl_dowork shall do nothing. **]** **SRS_TLSIO_CYCLONESSL_01_052: [** If the IO is not open (no open has been called or the IO has been closed) then tlsio_cyclonessl_dowork shall do nothing. **]** **SRS_TLSIO_CYCLONESSL_01_053: [** If the IO is open, tlsio_cyclonessl_dowork shall attempt to read 64 bytes from the TLS library by calling tlsRead. **]** **SRS_TLSIO_CYCLONESSL_01_080: [** If any bytes are read from CycloneSSL they should be indicated via the on_bytes_received callback passed to tlsio_cyclonessl_open. **]** **SRS_TLSIO_CYCLONESSL_01_054: [** The flags argument for tlsRead shall be 0. **]** **SRS_TLSIO_CYCLONESSL_01_055: [** If tlsRead fails, the error shall be indicated by calling the on_io_error callback passed in tlsio_cyclonessl_open, while passing the on_io_error_context to the callback. **]** **SRS_TLSIO_CYCLONESSL_01_056: [** Also the IO shall be considered in error and any subsequent calls to tlsio_cyclonessl_send shall fail. **]** ### tlsio_cyclonessl_setoption tlsio_cyclonessl_setoption is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_setoption member. ```c int tlsio_cyclonessl_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) ``` **SRS_TLSIO_CYCLONESSL_01_057: [** If any of the arguments tls_io or option_name is NULL tlsio_cyclonessl_setoption shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_058: [** If the option_name argument indicates an option that is not handled by tlsio_cyclonessl, then tlsio_cyclonessl_setoption shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_059: [** If the option was handled by tlsio_cyclonessl, then tlsio_cyclonessl_setoption shall return 0. **]** Options that shall be handled by tlsio_cyclonessl: **SRS_TLSIO_CYCLONESSL_01_060: [** - "TrustedCerts" - a char\* that shall be saved by tlsio_cyclonessl as it shall be given to the underlying CycloneSSL TLS context when the IO is open. **]** **SRS_TLSIO_CYCLONESSL_01_061: [** If copying the char\* passed in value fails then tlsio_cyclonessl_setoption shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_01_062: [** If a previous TrustedCerts option was saved, then the previous value shall be freed. **]** **SRS_TLSIO_CYCLONESSL_01_063: [** A NULL value shall be allowed for TrustedCerts, in which case the previously stored TrustedCerts option value shall be cleared. **]** ### tlsio_cyclonessl_retrieve_options tlsio_cyclonessl_retrieve_options is the implementation provided via tlsio_cyclonessl_get_interface_description for the concrete_io_retrieveoptions member. ```c static OPTIONHANDLER_HANDLE tlsio_cyclonessl_retrieve_options(CONCRETE_IO_HANDLE handle) ``` tlsio_cyclonessl_retrieveoptions produces an OPTIONHANDLER_HANDLE. **SRS_TLSIO_CYCLONESSL_01_064: [** If parameter handle is `NULL` then `tlsio_cyclonessl_retrieve_options` shall fail and return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_065: [** `tlsio_cyclonessl_retrieve_options` shall produce an OPTIONHANDLER_HANDLE. **]** **SRS_TLSIO_CYCLONESSL_01_066: [** `tlsio_cyclonessl_retrieve_options` shall add to it the options: **]** **SRS_TLSIO_CYCLONESSL_01_067: [** - TrustedCerts **]** **SRS_TLSIO_CYCLONESSL_01_068: [** If producing the OPTIONHANDLER_HANDLE fails then tlsio_cyclonessl_retrieve_options shall fail and return NULL. **]** ### tlsio_cyclonessl_get_interface_description ```c extern const IO_INTERFACE_DESCRIPTION* tlsio_cyclonessl_get_interface_description(void); ``` **SRS_TLSIO_CYCLONESSL_01_069: [** tlsio_cyclonessl_get_interface_description shall return a pointer to an IO_INTERFACE_DESCRIPTION structure that contains pointers to the functions: tlsio_cyclonessl_retrieve_options, tlsio_cyclonessl_create, tlsio_cyclonessl_destroy, tlsio_cyclonessl_open, tlsio_cyclonessl_close, tlsio_cyclonessl_send and tlsio_cyclonessl_dowork. **]** ### tlsio_cyclonessl_clone_option tlsio_cyclonessl_clone_option is the implementation provided to the option handler instance created as part of tlsio_cyclonessl_retrieve_options. ```c void* tlsio_cyclonessl_clone_option(const char* name, const void* value) ``` **SRS_TLSIO_CYCLONESSL_01_070: [** If the name or value arguments are NULL, tlsio_cyclonessl_clone_option shall return NULL. **]** **SRS_TLSIO_CYCLONESSL_01_071: [** tlsio_cyclonessl_clone_option shall clone the option named `TrustedCerts` by calling mallocAndStrcpy_s. **]** **SRS_TLSIO_CYCLONESSL_01_072: [** On success it shall return a non-NULL pointer to the cloned option. **]** **SRS_TLSIO_CYCLONESSL_01_073: [** If mallocAndStrcpy_s for `TrustedCerts` fails, tlsio_cyclonessl_clone_option shall return NULL. **]** ### tlsio_cyclonessl_destroy_option tlsio_cyclonessl_destroy_option is the implementation provided to the option handler instance created as part of tlsio_cyclonessl_retrieve_options. ```c void tlsio_cyclonessl_destroy_option(const char* name, const void* value) ``` **SRS_TLSIO_CYCLONESSL_01_074: [** If any of the arguments is NULL, tlsio_cyclonessl_destroy_option shall do nothing. **]** **SRS_TLSIO_CYCLONESSL_01_075: [** If the option name is `TrustedCerts`, tlsio_cyclonessl_destroy_option shall free the char\* option indicated by value. **]** tlsio_cyclonessl_socket_bsd_requirements.md000066400000000000000000000040631362133436400414410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoctlsio_cyclonessl_socket ============= ## Overview tlsio_cyclonessl_socket provides an implementation for creating/destroying BSD sockets to be used by the CycloneSSL TLS library. ## References [CycloneSSL official page](http://www.oryx-embedded.com/cyclone_ssl.html) ## Exposed API ```c MOCKABLE_FUNCTION(, int, tlsio_cyclonessl_socket_create, const char*, hostname, int, port, TlsSocket* new_socket); MOCKABLE_FUNCTION(, void, tlsio_cyclonessl_socket_destroy, TlsSocket, socket); ``` ### tlsio_cyclonessl_socket_create ```c int tlsio_cyclonessl_socket_create(const char* hostname, int port, TlsSocket* new_socket); ``` **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_001: [** tlsio_cyclonessl_socket_create shall create a new socket to be used by CycloneSSL. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_008: [** On success tlsio_cyclonessl_socket_create shall return 0 and fill in the socket handle in the new_socket out argument. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_002: [** If hostname or new_socket is NULL, then tlsio_cyclonessl_socket_create shall fail and it shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_003: [** tlsio_cyclonessl_socket_create shall call socket to create a TCP socket. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_004: [** tlsio_cyclonessl_socket_create shall call getaddrinfo to obtain a hint ADDRINFO. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_006: [** tlsio_cyclonessl_socket_create shall call connect and pass the constructed address in order to connect the socket. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_007: [** If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. **]** ### tlsio_cyclonessl_socket_destroy ```c void tlsio_cyclonessl_socket_destroy(TlsSocket socket) ``` **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_009: [** tlsio_cyclonessl_socket_destroy shall close the socket passed as argument by calling the function close. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_010: [** If socket is INVALID_SOCKET (-1), tlsio_cyclonessl_socket_destroy shall do nothing. **]** tlsio_cyclonessl_socket_requirements.md000066400000000000000000000040761362133436400406150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoctlsio_cyclonessl_socket ============= ## Overview tlsio_cyclonessl_socket provides an implementation for creating/destroying Cyclone TCP sockets to be used by the CycloneSSL TLS library. ## References [CycloneSSL official page](http://www.oryx-embedded.com/cyclone_ssl.html) ## Exposed API ```c MOCKABLE_FUNCTION(, int, tlsio_cyclonessl_socket_create, const char*, hostname, int, port, TlsSocket* new_socket); MOCKABLE_FUNCTION(, void, tlsio_cyclonessl_socket_destroy, TlsSocket, socket); ``` ### tlsio_cyclonessl_socket_create ```c int tlsio_cyclonessl_socket_create(const char* hostname, int port, TlsSocket* new_socket); ``` **SRS_TLSIO_CYCLONESSL_SOCKET_01_001: [** tlsio_cyclonessl_socket_create shall create a new socket to be used by CycloneSSL. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_01_002: [** On success tlsio_cyclonessl_socket_create shall return 0 and fill in the socket handle in the new_socket out argument. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_01_003: [** If hostname or socket is NULL, then tlsio_cyclonessl_socket_create shall fail and it shall return a non-zero value. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_01_004: [** tlsio_cyclonessl_socket_create shall call socketOpen to create a TCP socket. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_01_005: [** tlsio_cyclonessl_socket_create shall call getHostByName to obtain an IpAddr structure filled with the address of the hostname. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_01_006: [** tlsio_cyclonessl_socket_create shall call socketConnect and pass the obtained address in order to connect the socket. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_01_007: [** If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. **]** ### tlsio_cyclonessl_socket_destroy ```c void tlsio_cyclonessl_socket_destroy(TlsSocket socket) ``` **SRS_TLSIO_CYCLONESSL_SOCKET_01_008: [** tlsio_cyclonessl_socket_destroy shall close the socket passed as argument by calling the function socketClose. **]** **SRS_TLSIO_CYCLONESSL_SOCKET_01_009: [** If socket is NULL, tlsio_cyclonessl_socket_destroy shall do nothing. **]**tlsio_requirements.md000066400000000000000000000657211362133436400350130ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# tlsio ## Overview This specification defines generic behavior for tlsio adapters, which operate primarily through the `xio` interface and provide communication to remote systems over a TLS-conformant secure channel. ## References [TLS Protocol (RFC2246)](https://www.ietf.org/rfc/rfc2246.txt) [TLS Protocol (generic information)](https://en.wikipedia.org/wiki/Transport_Layer_Security) [xio.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/xio.h) ## Exposed API **SRS_TLSIO_30_001: [** The tlsio shall implement and export all the Concrete functions in the VTable IO_INTERFACE_DESCRIPTION defined in the `xio.h`. ```c typedef OPTIONHANDLER_HANDLE (*IO_RETRIEVEOPTIONS)(CONCRETE_IO_HANDLE concrete_io); typedef CONCRETE_IO_HANDLE(*IO_CREATE)(void* io_create_parameters); typedef void(*IO_DESTROY)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_OPEN)(CONCRETE_IO_HANDLE concrete_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); typedef int(*IO_CLOSE)(CONCRETE_IO_HANDLE concrete_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); typedef int(*IO_SEND)(CONCRETE_IO_HANDLE concrete_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); typedef void(*IO_DOWORK)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_SETOPTION)(CONCRETE_IO_HANDLE concrete_io, const char* optionName, const void* value); typedef struct IO_INTERFACE_DESCRIPTION_TAG { IO_RETRIEVEOPTIONS concrete_io_retrieveoptions; IO_CREATE concrete_io_create; IO_DESTROY concrete_io_destroy; IO_OPEN concrete_io_open; IO_CLOSE concrete_io_close; IO_SEND concrete_io_send; IO_DOWORK concrete_io_dowork; IO_SETOPTION concrete_io_setoption; } IO_INTERFACE_DESCRIPTION; ``` **]** The following types from `xio.h` are also referenced in individual requirements. ```c typedef enum IO_OPEN_RESULT_TAG { IO_OPEN_OK, IO_OPEN_ERROR, IO_OPEN_CANCELLED } IO_OPEN_RESULT; typedef enum IO_SEND_RESULT_TAG { IO_SEND_OK, IO_SEND_ERROR, IO_SEND_CANCELLED } IO_SEND_RESULT; typedef void(*ON_BYTES_RECEIVED)(void* context, const unsigned char* buffer, size_t size); typedef void(*ON_SEND_COMPLETE)(void* context, IO_SEND_RESULT send_result); typedef void(*ON_IO_OPEN_COMPLETE)(void* context, IO_OPEN_RESULT open_result); typedef void(*ON_IO_CLOSE_COMPLETE)(void* context); typedef void(*ON_IO_ERROR)(void* context); typedef struct TLSIO_CONFIG_TAG { const char* hostname; int port; const IO_INTERFACE_DESCRIPTION* underlying_io_interface; void* underlying_io_parameters; } TLSIO_CONFIG; ``` ## External State The external state of the tlsio adapter is determined by which of the adapter's interface functions have been called and which callbacks have been performed. The adapter's internal state should map cleanly to its external state, but the mapping is not necessarily 1:1. The external states are defined as follows: * TLSIO_STATE_EXT_CLOSED means either that the module is newly constructed by `tlsio_create`, that the `tlsio_close_async` complete callback has been received, or that the `on_tlsio_open_complete` callback has returned with `IO_OPEN_ERROR`. * TLSIO_STATE_EXT_OPENING means that the `tlsio_open_async` call has completed successfully but the `on_tlsio_open_complete` callback has not been performed. * TLSIO_STATE_EXT_OPEN means that the `on_tlsio_open_complete` callback has returned with `IO_OPEN_OK`. * TLSIO_STATE_EXT_CLOSING means that either the `tlsio_close_async` call has completed successfully but the `on_tlsio_close_complete` callback has not yet been performed, or that the `on_tlsio_open_complete` callback has returned with `IO_OPEN_CANCELLED`. * TLSIO_STATE_EXT_ERROR means that `on_io_error` has been called from `tlsio_dowork`. ## State Transitions This list shows the effect of the calls as a function of state with happy internal functionality. Unhappy functionality is not shown. The `tlsio_setoption` and `tlsio_getoptions` calls are not shown because they have no effect on state and are always allowed. Calls to `tlsio_send_async` also do not affect state, and are allowed only during TLSIO_STATE_EXT_OPEN. All transitions into TLSIO_STATE_EXT_CLOSED are understood to pass through TLSIO_STATE_EXT_CLOSING. From state TLSIO_STATE_EXT_CLOSED
tlsio_destroy ok (destroyed)
tlsio_open_async ok, enter TLSIO_STATE_EXT_OPENING
tlsio_close_async ok, remain in TLSIO_STATE_EXT_CLOSED
tlsio_dowork ok (does nothing), remain in TLSIO_STATE_EXT_CLOSED
From state TLSIO_STATE_EXT_OPENING
tlsio_destroy log error, force immediate close, destroy (destroyed)
tlsio_open_async fail, log error, remain in TLSIO_STATE_EXT_OPENING (usage error)
tlsio_close_async ok, force immediate close, enter TLSIO_STATE_EXT_CLOSED
tlsio_dowork ok (continue opening), remain in TLSIO_STATE_EXT_OPENING or enter TLSIO_STATE_EXT_OPEN
From state TLSIO_STATE_EXT_OPEN
tlsio_destroy (a possible normal SDK behavior) force immediate close, destroy (destroyed)
tlsio_open_async fail, log error, remain in TLSIO_STATE_EXT_OPEN (usage error)
tlsio_close_async adapters with internal async close: ok, enter TLSIO_STATE_EXT_CLOSING
adatpers without internal async close: ok, enter TLSIO_STATE_EXT_CLOSING, then
immediately enter TLSIO_STATE_EXT_CLOSED
tlsio_dowork ok (send and receive as necessary), remain in TLSIO_STATE_EXT_OPEN
From state TLSIO_STATE_EXT_CLOSING
tlsio_destroy log error, force immediate close, destroy (destroyed)
tlsio_open_async fail, log error, remain in TLSIO_STATE_EXT_CLOSING (usage error)
tlsio_close_async ok, force immediate close, enter TLSIO_STATE_EXT_CLOSED
tlsio_dowork ok (continue graceful closing) , remain in TLSIO_STATE_EXT_CLOSING or
enter TLSIO_STATE_EXT_CLOSED
From state TLSIO_STATE_EXT_ERROR
tlsio_destroy log error, force immediate close, destroy (destroyed)
tlsio_open_async fail, log error, remain in TLSIO_STATE_EXT_ERROR (usage error)
tlsio_close_async ok, force immediate close, enter TLSIO_STATE_EXT_CLOSED
tlsio_dowork ok (does nothing), remain in TLSIO_STATE_EXT_ERROR
![State transition diagram](img/tlsio_state_diagram.png) ## Definitions #### Explicit state transitions Throughout this document, state transitions only occur as explicitly specified. If no state transition is called out, then none is allowed. (So "do nothing" is always understood as the default.) #### Specified state transitions Requirements in this document use the phrase "shall enter TLSIO_STATE_EXT_XXXX" to specify behavior. Here are the definitions of the state transition phrases: ##### "enter TLSIO_STATE_EXT_ERROR" **SRS_TLSIO_30_005: [** The phrase "enter TLSIO_STATE_EXT_ERROR" means the adapter shall call the `on_io_error` function and pass the `on_io_error_context` that was supplied in `tlsio_open_async`. **]** ##### "enter TLSIO_STATE_EXT_CLOSING" **SRS_TLSIO_30_009: [** The phrase "enter TLSIO_STATE_EXT_CLOSING" means the adapter shall iterate through any unsent messages in the queue and shall delete each message after calling its `on_send_complete` with the associated `callback_context` and `IO_SEND_CANCELLED`. **]** ##### "enter TLSIO_STATE_EXT_CLOSED" **SRS_TLSIO_30_006: [** The phrase "enter TLSIO_STATE_EXT_CLOSED" means the adapter shall forcibly close any existing connections then call the `on_io_close_complete` function and pass the `on_io_close_complete_context` that was supplied in `tlsio_close_async`. **]** ##### "enter TLSIO_STATE_EXT_OPENING" The phrase "enter TLSIO_STATE_EXT_OPENING" means the adapter will continute the process of opening the TSL connection to the host on the next `tlsio_dowork` call, but no other externally visible action is being specified. ##### "enter TLSIO_STATE_EXT_OPEN" **SRS_TLSIO_30_007: [** The phrase "enter TLSIO_STATE_EXT_OPEN" means the adapter shall call the `on_io_open_complete` function and pass IO_OPEN_OK and the `on_io_open_complete_context` that was supplied in `tlsio_open_async`. **]** ##### "destroy the failed message" **SRS_TLSIO_30_002: [** The phrase "destroy the failed message" means that the adapter shall remove the message from the queue and destroy it after calling the message's `on_send_complete` along with its associated `callback_context` and `IO_SEND_ERROR`. **]** ## API Calls ### tlsio_get_interface_description ```c const IO_INTERFACE_DESCRIPTION* tlsio_get_interface_description(void); ``` **SRS_TLSIO_30_008: [** The tlsio_get_interface_description shall return the VTable IO_INTERFACE_DESCRIPTION. **]** ### tlsio_create Implementation of `concrete_io_create`. ```c CONCRETE_IO_HANDLE tlsio_create(void* io_create_parameters); ``` ##### _Direct_ versus _chained_ tlsio adapters Tlsio adapters have two different styles of implementation: _direct_, and _chained_. A _direct_ tlsio adapter communicates directly with the remote host using a TCP port that the tlsio adapter owns. A _chained_ tlsio adapter does not own a TCP port, and instead owns another xio adapter -- typically a `socketio` as explained [here](https://github.com/Azure/azure-c-shared-utility/blob/master/devdoc/porting_guide.md#socketio-adapter-overview) which it uses to communicate with the remote host. For the purposes of this spec, an _owned xio resource_ is an xio adapter created by the tlsio adapter to communicate with the remote host, and whose lifetime is managed by the tlsio adapter according to standard programming practices. Its lifetime management is covered by the "all necessary resources" clauses of the `tlsio_create` and `tlsio_destroy` requirements. For _chained_ tlsio adapters, the _owned xio resource_ type may be specifed in the `underlying_io_interface` member of `io_create_parameters`. If it is not, then it is understood that the tlsio adapter will need to create a `socketio` using the supplied `hostname` and `port` via the global `socketio_get_interface_description` function defined in [socketio.h](https://github.com/Azure/azure-c-shared-utility/blob/master/inc/azure_c_shared_utility/socketio.h). This practical necessity is not specified in this document as a requirement because it is considered an internal implementation detail. **SRS_TLSIO_30_010: [** The `tlsio_create` shall allocate and initialize all necessary resources and return an instance of the `tlsio` in TLSIO_STATE_EXT_CLOSED. **]** **SRS_TLSIO_30_011: [** If any resource allocation fails, `tlsio_create` shall return NULL. **]** **SRS_TLSIO_30_012: [** The `tlsio_create` shall receive the connection configuration as a `TLSIO_CONFIG*` in `io_create_parameters`. **]** **SRS_TLSIO_30_013: [** If the `io_create_parameters` value is NULL, `tlsio_create` shall log an error and return NULL. **]** **SRS_TLSIO_30_014: [** If the `hostname` member of `io_create_parameters` value is NULL, `tlsio_create` shall log an error and return NULL. **]** **SRS_TLSIO_30_015: [** If the `port` member of `io_create_parameters` value is less than 0 or greater than 0xffff, `tlsio_create` shall log an error and return NULL. **]** **SRS_TLSIO_30_016: [** `tlsio_create` shall make a copy of the `hostname` member of `io_create_parameters` to allow deletion of `hostname` immediately after the call. This copy may be delegated to an underlying `xio`. **]** **SRS_TLSIO_30_017: [** For _direct_ designs, if either the `underlying_io_interface` or `underlying_io_parameters` of `io_create_parameters` is non-NULL, `tlsio_create` shall log an error and return NULL. **]** **SRS_TLSIO_30_018: [** For _chained_ designs, if the `underlying_io_interface` member of `io_create_parameters` is non-NULL, `tlsio_create` shall use `underlying_io_interface` to create an _owned xio resource_ for remote host communication. **]** **SRS_TLSIO_30_019: [** For _chained_ designs with a non-NULL `underlying_io_interface` parameter, `tlsio_create` shall pass the `underlying_io_parameters` to `underlying_io_interface->xio_create` when creating the _owned xio resource_. **]** ### tlsio_destroy Implementation of `concrete_io_destroy` ```c void tlsio_destroy(CONCRETE_IO_HANDLE tlsio_handle); ``` **SRS_TLSIO_30_020: [** If `tlsio_handle` is NULL, `tlsio_destroy` shall do nothing. **]** **SRS_TLSIO_30_021: [** The `tlsio_destroy` shall release all allocated resources and then release `tlsio_handle`. **]** **SRS_TLSIO_30_022: [** If the adapter is in any state other than TLSIO_STATE_EXT_CLOSED when `tlsio_destroy` is called, the adapter shall [enter TLSIO_STATE_EXT_CLOSING](#enter-TLSIO_STATE_EXT_CLOSING "Iterate through any unsent messages in the queue and delete each message after calling its `on_send_complete` with the associated `callback_context` and `IO_SEND_CANCELLED`.") and then [enter TLSIO_STATE_EXT_CLOSED](#enter-TLSIO_STATE_EXT_CLOSED "Forcibly close any existing connections then call the `on_io_close_complete` function and pass the `on_io_close_complete_context` that was supplied in `tlsio_close_async`.") before completing the destroy process. **]** ### tlsio_open_async Implementation of `concrete_io_open` ```c int tlsio_open_async( CONCRETE_IO_HANDLE tlsio_handle, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); ``` **SRS_TLSIO_30_030: [** If the `tlsio_handle` parameter is NULL, `tlsio_open_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_031: [** If the on_io_open_complete parameter is NULL, `tlsio_open_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_032: [** If the on_bytes_received parameter is NULL, `tlsio_open_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_033: [** If the on_io_error parameter is NULL, `tlsio_open_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_037: [** If the adapter is in any state other than TLSIO_STATE_EXT_CLOSED when `tlsio_open_async` is called, it shall log an error, and return `_FAILURE_`. **]** **SRS_TLSIO_30_038: [** If `tlsio_open_async` fails to [enter TLSIO_STATE_EXT_OPENING](#enter-TLSIO_STATE_EXT_OPENING "Continute the process of opening the TSL connection to the host on the next `tlsio_dowork` call") it shall return `_FAILURE_`. **]** **SRS_TLSIO_30_039: [** On failure, `tlsio_open_async` shall not call `on_io_open_complete`. **]** **SRS_TLSIO_30_034: [** On success, `tlsio_open_async` shall store the provided `on_bytes_received`, `on_bytes_received_context`, `on_io_error`, `on_io_error_context`, `on_io_open_complete`, and `on_io_open_complete_context` parameters for later use as specified and tested per other line entries in this document. **]** **SRS_TLSIO_30_035: [** On success, `tlsio_open_async` shall cause the adapter to [enter TLSIO_STATE_EXT_OPENING](#enter-TLSIO_STATE_EXT_OPENING "Continute the process of opening the TSL connection to the host on the next `tlsio_dowork` call") and return 0. **]** ### tlsio_close_async Implementation of `concrete_io_close` ```c int tlsio_close_async(CONCRETE_IO_HANDLE tlsio_handle, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); ``` **SRS_TLSIO_30_050: [** If the `tlsio_handle` parameter is NULL, `tlsio_close_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_055: [** If the `on_io_close_complete` parameter is NULL, `tlsio_close_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_054: [** On failure, the adapter shall not call `on_io_close_complete`. **]** **SRS_TLSIO_30_053: [** If the adapter is in any state other than TLSIO_STATE_EXT_OPEN or TLSIO_STATE_EXT_ERROR then `tlsio_close_async` shall log that `tlsio_close_async` has been called and then continue normally. **]** **SRS_TLSIO_30_057: [** On success, if the adapter is in TLSIO_STATE_EXT_OPENING, it shall call `on_io_open_complete` with the `on_io_open_complete_context` supplied in `tlsio_open_async` and `IO_OPEN_CANCELLED`. This callback shall be made before changing the internal state of the adapter. **]** **SRS_TLSIO_30_056: [** On success the adapter shall [enter TLSIO_STATE_EXT_CLOSING](#enter-TLSIO_STATE_EXT_CLOSING "Iterate through any unsent messages in the queue and delete each message after calling its `on_send_complete` with the associated `callback_context` and `IO_SEND_CANCELLED`."). **]** **SRS_TLSIO_30_051: [** On success, if the underlying TLS does not support asynchronous closing or if the adapter is not in TLSIO_STATE_EXT_OPEN, then the adapter shall [enter TLSIO_STATE_EXT_CLOSED](#enter-TLSIO_STATE_EXT_CLOSED "Forcibly close any existing connections then call the `on_io_close_complete` function and pass the `on_io_close_complete_context` that was supplied in `tlsio_close_async`.") immediately after entering TLSIO_STATE_EXT_CLOSING. **]** **SRS_TLSIO_30_052: [** On success `tlsio_close_async` shall return 0. **]** ### tlsio_send_async Implementation of `concrete_io_send` ```c int tlsio_send_async(CONCRETE_IO_HANDLE tlsio_handle, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); ``` **SRS_TLSIO_30_060: [** If the `tlsio_handle` parameter is NULL, `tlsio_send_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_061: [** If the `buffer` is NULL, `tlsio_send_async` shall log the error and return `_FAILURE_`. **]** **SRS_TLSIO_30_062: [** If the `on_send_complete` is NULL, `tlsio_send_async` shall log the error and return `_FAILURE_`. **]** **SRS_TLSIO_30_067: [** If the `size` is 0, `tlsio_send_async` shall log the error and return `_FAILURE_`. **]** **SRS_TLSIO_30_065: [** If the adapter state is not TLSIO_STATE_EXT_OPEN, `tlsio_send_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_064: [** If the supplied message cannot be enqueued for transmission, `tlsio_send_async` shall log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_066: [** On failure, `on_send_complete` shall not be called. **]** **SRS_TLSIO_30_063: [** On success, `tlsio_send_async` shall enqueue for transmission the `on_send_complete`, the `callback_context`, the `size`, and the contents of `buffer` and then return 0. **]** ### tlsio_dowork Implementation of `concrete_io_dowork` ```c void tlsio_dowork(CONCRETE_IO_HANDLE tlsio_handle); ``` The `tlsio_dowork` call executes async jobs for the tlsio. This includes connection completion, sending to the TLS connection, and checking the TLS connection for available bytes to read. **SRS_TLSIO_30_070: [** If the `tlsio_handle` parameter is NULL, `tlsio_dowork` shall do nothing except log an error. **]** #### Behavior selection **SRS_TLSIO_30_071: [** If the adapter is in TLSIO_STATE_EXT_ERROR then `tlsio_dowork` shall do nothing. **]** **SRS_TLSIO_30_075: [** If the adapter is in TLSIO_STATE_EXT_CLOSED then `tlsio_dowork` shall do nothing. **]** **SRS_TLSIO_30_077: [** If the adapter is in TLSIO_STATE_EXT_OPENING then `tlsio_dowork` shall perform only the [TLSIO_STATE_EXT_OPENING behaviors](#TLSIO_STATE_EXT_OPENING-behaviors). **]** **SRS_TLSIO_30_077: [** If the adapter is in TLSIO_STATE_EXT_OPEN then `tlsio_dowork` shall perform only the [Data transmission behaviors](#data-transmission-behaviors) and the [Data reception behaviors](#data-reception-behaviors). **]** **SRS_TLSIO_30_078: [** If the adapter is in TLSIO_STATE_EXT_CLOSING then `tlsio_dowork` shall perform only the [TLSIO_STATE_EXT_CLOSING behaviors](#TLSIO_STATE_EXT_CLOSING-behaviors). **]** #### TLSIO_STATE_EXT_OPENING behaviors Transitioning from TLSIO_STATE_EXT_OPENING to TLSIO_STATE_EXT_OPEN may require multiple calls to `tlsio_dowork`. The number of calls required is not specified. **SRS_TLSIO_30_080: [** The `tlsio_dowork` shall establish a TLS connection using the `hostName` and `port` provided during `tlsio_open_async`. **]** **SRS_TLSIO_30_082: [** If the connection process fails for any reason, `tlsio_dowork` shall log an error, call `on_io_open_complete` with the `on_io_open_complete_context` parameter provided in `tlsio_open_async` and `IO_OPEN_ERROR`, and [enter TLSIO_STATE_EXT_CLOSED](#enter-TLSIO_STATE_EXT_CLOSED "Forcibly close any existing connections then call the `on_io_close_complete` function and pass the `on_io_close_complete_context` that was supplied in `tlsio_close_async`."). **]** **SRS_TLSIO_30_083: [** If `tlsio_dowork` successfully opens the TLS connection it shall [enter TLSIO_STATE_EXT_OPEN](#enter-TLSIO_STATE_EXT_OPEN "Call the `on_io_open_complete` function and pass IO_OPEN_OK and the `on_io_open_complete_context` that was supplied in `tlsio_open_async`."). **]** #### Data transmission behaviors **SRS_TLSIO_30_091: [** If `tlsio_dowork` is able to send all the bytes in an enqueued message, it shall first dequeue the message then call the messages's `on_send_complete` along with its associated `callback_context` and `IO_SEND_OK`. **]**
The message needs to be dequeued before calling the callback because the callback may trigger a re-entrant `tlsio_close` call which will need a consistent message queue. **SRS_TLSIO_30_093: [** If the TLS connection was not able to send an entire enqueued message at once, subsequent calls to `tlsio_dowork` shall continue to send the remaining bytes. **]** **SRS_TLSIO_30_095: [** If the send process fails before sending all of the bytes in an enqueued message, `tlsio_dowork` shall [destroy the failed message](#destroy-the-failed-message "Remove the message from the queue and destroy it after calling the message's `on_send_complete` along with its associated `callback_context` and `IO_SEND_ERROR`.") and [enter TLSIO_STATE_EXT_ERROR](#enter-TLSIO_STATE_EXT_ERROR "Call the `on_io_error` function and pass the `on_io_error_context` that was supplied in `tlsio_open_async`."). **]** **SRS_TLSIO_30_096: [** If there are no enqueued messages available, `tlsio_dowork` shall do nothing. **]** #### Data reception behaviors **SRS_TLSIO_30_100: [** As long as the TLS connection is able to provide received data, `tlsio_dowork` shall repeatedly read this data and call `on_bytes_received` with the pointer to the buffer containing the data, the number of bytes received, and the `on_bytes_received_context`. **]** **SRS_TLSIO_30_102: [** If the TLS connection receives no data then `tlsio_dowork` shall not call the `on_bytes_received` callback. **]** #### TLSIO_STATE_EXT_CLOSING behaviors Adapters whose underlying TLS connection does not have an asynchronous 'closing' state will not have an externally visible TLSIO_STATE_EXT_CLOSING state and so their `tlsio_dowork` will not perform these behaviors. **SRS_TLSIO_30_106: [** If the closing process fails to end gracefully, `tlsio_dowork` shall log an error and [enter TLSIO_STATE_EXT_CLOSED](#enter-TLSIO_STATE_EXT_CLOSED "Forcibly close any existing connections then call the `on_io_close_complete` function and pass the `on_io_close_complete_context` that was supplied in `tlsio_close_async`."). **]** **SRS_TLSIO_30_107: [** If the closing process ends gracefully, `tlsio_dowork` shall [enter TLSIO_STATE_EXT_CLOSED](#enter-TLSIO_STATE_EXT_CLOSED "Forcibly close any existing connections then call the `on_io_close_complete` function and pass the `on_io_close_complete_context` that was supplied in `tlsio_close_async`."). **]** ### tlsio_setoption Implementation of `concrete_io_setoption`. Specific tlsio implementations must define the behavior of successful `tlsio_setoption` calls. The options are conceptually part of `tlsio_create` in that options which are set persist until the instance is destroyed. ```c int tlsio_setoption(CONCRETE_IO_HANDLE tlsio_handle, const char* optionName, const void* value); ``` **SRS_TLSIO_30_120: [** If the `tlsio_handle` parameter is NULL, `tlsio_setoption` shall do nothing except log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_121: [** If the `optionName` parameter is NULL, `tlsio_setoption` shall do nothing except log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_122: [** If the `value` parameter is NULL, `tlsio_setoption` shall do nothing except log an error and return `_FAILURE_`. **]** **SRS_TLSIO_30_124 [** Adapters which implement options shall store the option value until `tlsio_destroy` is called. **]** ### tlsio_retrieveoptions Implementation of `concrete_io_retrieveoptions` Specific tlsio implementations must define the behavior of successful `tlsio_retrieveoptions` calls. ```c OPTIONHANDLER_HANDLE tlsio_retrieveoptions(CONCRETE_IO_HANDLE tlsio_handle); ``` **SRS_TLSIO_30_160: [** If the `tlsio_handle` parameter is NULL, `tlsio_retrieveoptions` shall do nothing except log an error and return `_FAILURE_`. **]** ### Error Recovery Testing Error recovery for tlsio adapters is performed by the higher level modules that own the tlsio. There are a very large number of error recovery sequences which might be performed, and performing all of the possible retry sequences is out-of-scope for this document. However, the two tests here represent a minimal test suite to mimic the retry sequences that the higher level modules might perform. The test conditions in this section are deliberately underspecified and left to the judgement of the implementer, and code commenting in the unit tests themselves will be considered sufficient documentation for any further detail. Any of a number of possible specific call sequences is acceptable as long as the unit test meets the criteria of the test requirement. The words "high-level retry sequence" as used in this section means that: 1. A failure has been injected at some specified point 2. `tlsio_close_async` has been called and the `on_io_close_complete` callback has been received. 3. `tlsio_open_async` has been called successfully. 4. `tlsio_dowork` has been called as necessary to permit this sequence of events. 5. The `on_io_open_complete` callback has been received with `IO_OPEN_OK`. Note that the requirements in this section have corresponding entries in the unit test files, but do not appear in the implementation code. **SRS_TLSIO_30_200: [** The "high-level retry sequence" shall succeed after an injected fault which causes `on_io_open_complete` to return with `IO_OPEN_ERROR`. **]** **SRS_TLSIO_30_201: [** The "high-level retry sequence" shall succeed after an injected fault which causes `on_io_error` to be called. **]** tlsio_ssl_esp8266.md000066400000000000000000000350101362133436400342520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoctlsio_ssl_esp8266 ============= ## Overview tlsio_ssl_esp8266 implements a tls adapter for the ESP8266 RTOS platform. This adapter only works in blocking mode. ## References [TLS Protocol (RFC2246)](https://www.ietf.org/rfc/rfc2246.txt) [TLS Protocol (generic information)](https://en.wikipedia.org/wiki/Transport_Layer_Security) ## Exposed API **SRS_TLSIO_SSL_ESP8266_99_001: [** The tlsio_ssl_esp8266 shall implement and export all the Concrete functions in the VTable IO_INTERFACE_DESCRIPTION defined in the `xio.h`. ```c typedef OPTIONHANDLER_HANDLE (*IO_RETRIEVEOPTIONS)(CONCRETE_IO_HANDLE concrete_io); typedef CONCRETE_IO_HANDLE(*IO_CREATE)(void* io_create_parameters); typedef void(*IO_DESTROY)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_OPEN)(CONCRETE_IO_HANDLE concrete_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); typedef int(*IO_CLOSE)(CONCRETE_IO_HANDLE concrete_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); typedef int(*IO_SEND)(CONCRETE_IO_HANDLE concrete_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); typedef void(*IO_DOWORK)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_SETOPTION)(CONCRETE_IO_HANDLE concrete_io, const char* optionName, const void* value); typedef struct IO_INTERFACE_DESCRIPTION_TAG { IO_RETRIEVEOPTIONS concrete_io_retrieveoptions; IO_CREATE concrete_io_create; IO_DESTROY concrete_io_destroy; IO_OPEN concrete_io_open; IO_CLOSE concrete_io_close; IO_SEND concrete_io_send; IO_DOWORK concrete_io_dowork; IO_SETOPTION concrete_io_setoption; } IO_INTERFACE_DESCRIPTION; ``` **]** **SRS_TLSIO_SSL_ESP8266_99_002: [** The tlsio_ssl_esp8266 shall report the open operation status using the IO_OPEN_RESULT enumerator defined in the `xio.h`: ```c typedef enum IO_OPEN_RESULT_TAG { IO_OPEN_OK, IO_OPEN_ERROR, IO_OPEN_CANCELLED } IO_OPEN_RESULT; ``` **]** **SRS_TLSIO_SSL_ESP8266_99_003: [** The tlsio_ssl_esp8266 shall report the send operation status using the IO_SEND_RESULT enumerator defined in the `xio.h`: ```c typedef enum IO_SEND_RESULT_TAG { IO_SEND_OK, IO_SEND_ERROR, IO_SEND_CANCELLED } IO_SEND_RESULT; ``` **]** **SRS_TLSIO_SSL_ESP8266_99_004: [** The tlsio_ssl_esp8266 shall call the callbacks functions defined in the `xio.h`: ```c typedef void(*ON_BYTES_RECEIVED)(void* context, const unsigned char* buffer, size_t size); typedef void(*ON_SEND_COMPLETE)(void* context, IO_SEND_RESULT send_result); typedef void(*ON_IO_OPEN_COMPLETE)(void* context, IO_OPEN_RESULT open_result); typedef void(*ON_IO_CLOSE_COMPLETE)(void* context); typedef void(*ON_IO_ERROR)(void* context); ``` **]** **SRS_TLSIO_SSL_ESP8266_99_005: [** The tlsio_ssl_esp8266 shall received the connection information using the TLSIO_CONFIG structure defined in `tlsio.h`: ```c typedef struct TLSIO_CONFIG_TAG { const char* hostname; int port; } TLSIO_CONFIG; ``` **]** ## Callbacks **SRS_TLSIO_SSL_ESP8266_99_006: [** The tlsio_ssl_esp8266 shall return the status of all async operations using the callbacks. **]** **SRS_TLSIO_SSL_ESP8266_99_007: [** If the callback function is set as NULL. The tlsio_ssl_esp8266 shall not call anything. **]** ### tlsio_openssl_get_interface_description ```c const IO_INTERFACE_DESCRIPTION* tlsio_openssl_get_interface_description(void); ``` **SRS_TLSIO_SSL_ESP8266_99_008: [** The tlsio_openssl_get_interface_description shall return the VTable IO_INTERFACE_DESCRIPTION. **]** ### tlsio_openssl_create Implementation of `IO_CREATE concrete_io_create` ```c CONCRETE_IO_HANDLE tlsio_openssl_create(void* io_create_parameters); ``` **SRS_TLSIO_SSL_ESP8266_99_009: [** The tlsio_openssl_create shall create a new instance of the tlsio for esp8266. **]** **SRS_TLSIO_SSL_ESP8266_99_010: [** The tlsio_openssl_create shall return a non-NULL handle on success. **]** **SRS_TLSIO_SSL_ESP8266_99_011: [** The tlsio_openssl_create shall allocate memory to control the tlsio instance. **]** **SRS_TLSIO_SSL_ESP8266_99_012: [** If there is not enough memory to create the tlsio, the tlsio_openssl_create shall return NULL as the handle. **]** **SRS_TLSIO_SSL_ESP8266_99_013: [** The tlsio_openssl_create shall return NULL when io_create_parameters is NULL. **]** **SRS_TLSIO_SSL_ESP8266_99_016: [** The tlsio_openssl_create shall initialize all callback pointers as NULL. **]** **SRS_TLSIO_SSL_ESP8266_99_017: [** The tlsio_openssl_create shall receive the connection configuration (TLSIO_CONFIG). **]** **SRS_TLSIO_SSL_ESP8266_99_020: [** If tlsio_openssl_create get success to create the tlsio instance, it shall set the tlsio state as TLSIO_STATE_NOT_OPEN. **]** ### tlsio_openssl_destroy Implementation of `IO_DESTROY concrete_io_destroy` ```c void tlsio_openssl_destroy(CONCRETE_IO_HANDLE tls_io); ``` **SRS_TLSIO_SSL_ESP8266_99_021: [** The tlsio_openssl_destroy shall destroy a created instance of the tlsio for ESP8266 identified by the CONCRETE_IO_HANDLE. **]** **SRS_TLSIO_SSL_ESP8266_99_022: [** The tlsio_openssl_destroy shall free all memory allocated for tlsio_instance. **]** **SRS_TLSIO_SSL_ESP8266_99_024: [** If the tlsio_handle is NULL, the tlsio_openssl_destroy shall not do anything. **]** **SRS_TLSIO_SSL_ESP8266_99_025: [** If the tlsio state is TLSIO_STATE_OPENING, TLSIO_STATE_OPEN, or TLSIO_STATE_CLOSING, the tlsio_openssl_destroy shall destroy the tlsio, but log an error. **]** ### tlsio_openssl_open Implementation of `IO_OPEN concrete_io_open` ```c int tlsio_openssl_open( CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); ``` **SRS_TLSIO_SSL_ESP8266_99_018: [** The tlsio_openssl_open shall convert the provide hostName to an IP address. **]** **SRS_TLSIO_SSL_ESP8266_99_019: [** If the WiFi cannot find the IP for the hostName, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_026: [** The tlsio_openssl_open shall start the process to open the ssl connection with the host provided in the tlsio_openssl_create. **]** **SRS_TLSIO_SSL_ESP8266_99_027: [** The tlsio_openssl_open shall set the tlsio to try to open the connection for MAX_RETRY times before assuming that connection failed. **]** **SRS_TLSIO_SSL_ESP8266_99_028: [** The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. **]** **SRS_TLSIO_SSL_ESP8266_99_029: [** The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. **]** **SRS_TLSIO_SSL_ESP8266_99_030: [** The tlsio_openssl_open shall store the provided on_bytes_received callback function address. **]** **SRS_TLSIO_SSL_ESP8266_99_031: [** The tlsio_openssl_open shall store the provided on_bytes_received_context handle. **]** **SRS_TLSIO_SSL_ESP8266_99_032: [** The tlsio_openssl_open shall store the provided on_io_error callback function address. **]** **SRS_TLSIO_SSL_ESP8266_99_033: [** The tlsio_openssl_open shall store the provided on_io_error_context handle. **]** **SRS_TLSIO_SSL_ESP8266_99_034: [** If tlsio_openssl_open get success to open the ssl connection, it shall set the tlsio state as TLSIO_STATE_OPEN, and return 0. **]** **SRS_TLSIO_SSL_ESP8266_99_035: [** If the tlsio state is not TLSIO_STATE_NOT_OPEN and not TLSIO_STATE_ERROR, then tlsio_openssl_open shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_036: [** If the tls_io handle is NULL, the tlsio_openssl_open shall not do anything, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_037: [** If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_039: [** If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. **]** **SRS_TLSIO_SSL_ESP8266_99_040: [** If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. **]** **SRS_TLSIO_SSL_ESP8266_99_041: [** If the tlsio_openssl_open get success to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_OK. **]** **SRS_TLSIO_SSL_ESP8266_99_042: [** If the tlsio_openssl_open retry SSL_connect to open more than MAX_RETRY times without success, it shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_080: [** If socket failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_081: [** If setsockopt failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_082: [** If bind failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_083: [** If connect and getsockopt failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_084: [** If lwip_select failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_085: [** If SSL_CTX_new failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_087: [** If SSL_new failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_088: [** If SSL_set_fd failed, the tlsio_openssl_open shall return __LINE__. **]** **SRS_TLSIO_SSL_ESP8266_99_089: [** If SSL_connect failed, the tlsio_openssl_open shall return __LINE__. **]** ### tlsio_openssl_close Implementation of `IO_CLOSE concrete_io_close` ```c int tlsio_openssl_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); ``` **SRS_TLSIO_SSL_ESP8266_99_043: [** The tlsio_openssl_close shall start the process to close the ssl connection. **]** **SRS_TLSIO_SSL_ESP8266_99_045: [** The tlsio_openssl_close shall store the provided on_io_close_complete callback function address. **]** **SRS_TLSIO_SSL_ESP8266_99_046: [** The tlsio_openssl_close shall store the provided on_io_close_complete_context handle. **]** **SRS_TLSIO_SSL_ESP8266_99_047: [** If tlsio_openssl_close get success to start the process to close the ssl connection, it shall set the tlsio state as TLSIO_STATE_CLOSING, and return 0. **]** **SRS_TLSIO_SSL_ESP8266_99_048: [** If the tlsio state is TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING, or TLSIO_STATE_CLOSING, the tlsio_openssl_close shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_049: [** If the tlsio_handle is NULL, the tlsio_openssl_close shall not do anything, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_050: [** If tlsio_openssl_close successfully destroys the ssl connection, it shall set the tlsio state as TLSIO_STATE_NOT_OPEN, and return 0. **]** **SRS_TLSIO_SSL_ESP8266_99_051: [** If tlsio_openssl_close successfully destroys the ssl connection, it shall call on_io_close_complete. **]** **SRS_TLSIO_SSL_ESP8266_99_052: [** If tlsio_openssl_close fails to shutdown the ssl connection, it shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_, and call on_io_error. **]** ### tlsio_openssl_send Implementation of `IO_SEND concrete_io_send` ```c int tlsio_openssl_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) ``` **SRS_TLSIO_SSL_ESP8266_99_053: [** The tlsio_openssl_send shall send all bytes in a buffer to the ssl connection. **]** **SRS_TLSIO_SSL_ESP8266_99_054: [** The tlsio_openssl_send shall use the provided on_io_send_complete callback function address. **]** **SRS_TLSIO_SSL_ESP8266_99_055: [** The tlsio_openssl_send shall use the provided on_io_send_complete_context handle. **]** **SRS_TLSIO_SSL_ESP8266_99_056: [** The ssl will continue to send all data in the buffer until all bytes have been sent. **]** **SRS_TLSIO_SSL_ESP8266_99_057: [** If the ssl was not able to send all the bytes in the buffer, the tlsio_openssl_send shall call the on_send_complete with IO_SEND_ERROR, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_058: [** If the ssl finish to send all bytes in the buffer, then tlsio_openssl_send shall call the on_send_complete with IO_SEND_OK, and return 0 **]** **SRS_TLSIO_SSL_ESP8266_99_059: [** If the tlsio state is not TLSIO_STATE_OPEN, the tlsio_openssl_send shall return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_060: [** If the tls_io handle is NULL, the tlsio_openssl_send shall not do anything, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_061: [** If the buffer is NULL, the tlsio_openssl_send shall not do anything, and return _LINE_. **]** **SRS_TLSIO_SSL_ESP8266_99_062: [** If the size is 0, the tlsio_openssl_send shall not do anything, and return _LINE_. **]** ### tlsio_openssl_dowork Implementation of `IO_DOWORK concrete_io_dowork` ```c void tlsio_openssl_dowork(CONCRETE_IO_HANDLE tls_io) ``` **SRS_TLSIO_SSL_ESP8266_99_063: [** The tlsio_openssl_dowork shall execute the async jobs for the tlsio. **]** **SRS_TLSIO_SSL_ESP8266_99_069: [** If the tlsio state is TLSIO_STATE_OPEN, the tlsio_openssl_dowork shall read data from the ssl client. **]** **SRS_TLSIO_SSL_ESP8266_99_070: [** If there are received data in the ssl client, the tlsio_openssl_dowork shall read this data and call the on_bytes_received with the pointer to the buffer with the data. **]** **SRS_TLSIO_SSL_ESP8266_99_071: [** If there are no received data in the ssl client, the tlsio_openssl_dowork shall do nothing. **]** **SRS_TLSIO_SSL_ESP8266_99_074: [** If the tlsio handle is NULL, the tlsio_openssl_dowork shall not do anything. **]** **SRS_TLSIO_SSL_ESP8266_99_075: [** The tlsio_openssl_dowork shall create a buffer to store the data received from the ssl client. **]** **SRS_TLSIO_SSL_ESP8266_99_076: [** The tlsio_openssl_dowork shall delete the buffer to store the data received from the ssl client. **]** ### tlsio_openssl_setoption Implementation of `IO_SETOPTION concrete_io_setoption` ```c int tlsio_openssl_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) ``` **SRS_TLSIO_SSL_ESP8266_99_077: [** The tlsio_openssl_setoption shall not do anything, and return 0. **]** ### tlsio_openssl_retrieveoptions Implementation of `IO_RETRIEVEOPTIONS concrete_io_retrieveoptions` ```c OPTIONHANDLER_HANDLE tlsio_openssl_retrieveoptions(CONCRETE_IO_HANDLE tlsio_handle) ``` **SRS_TLSIO_SSL_ESP8266_99_078: [** The tlsio_openssl_retrieveoptions shall not do anything, and return NULL. **]** uniqueid_requirements.md000066400000000000000000000017041362133436400354730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocuniqueid requirements ================= ## Overview The UniqueIDs module provides pseudo unique identifiers to the rest of the modules ## Exposed API ```C #define UNIQUEID_RESULT_VALUES \ UNIQUEID_OK, \ UNIQUEID_INVALID_ARG, \ UNIQUEID_ERROR DEFINE_ENUM(UNIQUEID_RESULT, UNIQUEID_RESULT_VALUES) extern UNIQUEID_RESULT UniqueId_Generate(char* uid, size_t bufferSize); ``` ### UniqueId_Generate ```C extern UNIQUEID_RESULT UniqueId_Generate(char* uid, size_t len); ``` **SRS_UNIQUEID_07_001: [** UniqueId_Generate shall create a unique Id 36 character long string. **]** **SRS_UNIQUEID_07_002: [** If uid is NULL then UniqueId_Generate shall return UNIQUEID_INVALID_ARG **]** **SRS_UNIQUEID_07_003: [** If len is less then 37 then UniqueId_Generate shall return UNIQUEID_INVALID_ARG **]** **SRS_UNIQUEID_07_004: [** If there is a failure for any reason the UniqueId_Generate shall return UNIQUEID_ERROR **]** url_encode_requirements.md000066400000000000000000000013461362133436400357710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocurl_encode requirements ================ ## Overview This document will specify the requirements for URL_Encode. ## Exposed API ```c extern STRING* URL_Encode(STRING* input); ``` ### URL_Encode URL_Encode will take as a parameter a pointer to a STRING, input. URL_Encode will return a pointer to STRING. **SRS_URL_ENCODE_06_001: [** If input is NULL then URL_Encode will return NULL. **]** **SRS_URL_ENCODE_06_002: [** If an error occurs during the encoding of input then URL_Encode will return NULL. **]** **SRS_URL_ENCODE_06_003: [** If input is a zero length string then URL_Encode will return a zero length string. **]** URL_Encode will encode input in a manner that respects the encoding used in the .net HttpUtility.UrlEncode. utf8_checker_requirements.md000066400000000000000000000026131362133436400362220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# utf8_checker requirements ## Overview utf8_checker is module that provides basic validation whether a string is a UTF-8 string. ## References [Unicode spec chapter 3.9](http://www.unicode.org/versions/Unicode9.0.0/ch03.pdf#G7404) ## Exposed API ```c MOCKABLE_FUNCTION(, bool, utf8_checker_is_valid_utf8, const unsigned char*, utf8_str, size_t, length); ``` ### utf8_checker_is_valid_utf8 ```c extern bool utf8_checker_is_valid_utf8(const unsigned char* utf8_str, size_t length); ``` **SRS_UTF8_CHECKER_01_001: [** `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. **]** **SRS_UTF8_CHECKER_01_005: [** On success it shall return true. **]** **SRS_UTF8_CHECKER_01_002: [** If `utf8_checker_is_valid_utf8` is called with NULL `utf8_str` it shall return false. **]** **SRS_UTF8_CHECKER_01_003: [** If `length` is 0, `utf8_checker_is_valid_utf8` shall consider `utf8_str` to be valid UTF-8 and return true. **]** ### Relevant Unicode spec table Scalar Value First Byte Second Byte Third Byte Fourth Byte **SRS_UTF8_CHECKER_01_006: [** 00000000 0xxxxxxx 0xxxxxxx **]** **SRS_UTF8_CHECKER_01_007: [** 00000yyy yyxxxxxx 110yyyyy 10xxxxxx **]** **SRS_UTF8_CHECKER_01_008: [** zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx **]** **SRS_UTF8_CHECKER_01_009: [** 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx **]** uuid_requirements.md000066400000000000000000000044311362133436400346160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocuuid requirements ================= ## Overview The UUID module provides functions to create and convert UUID values. ## Exposed API ```c typedef unsigned char UUID_T[16]; extern int UUID_generate(UUID_T* uuid); extern int UUID_from_string(char* uuid_string, UUID_T* uuid); extern char* UUID_to_string(UUID_T* uuid); ``` ### UUID_generate ```c extern int UUID_generate(UUID_T* uuid); ``` **SRS_UUID_09_001: [** If `uuid` is NULL, UUID_generate shall return a non-zero value **]** **SRS_UUID_09_002: [** UUID_generate shall obtain an UUID string from UniqueId_Generate **]** **SRS_UUID_09_003: [** If the UUID string fails to be obtained, UUID_generate shall fail and return a non-zero value **]** **SRS_UUID_09_004: [** The UUID string shall be parsed into an UUID_T type (16 unsigned char array) and filled in `uuid` **]** **SRS_UUID_09_005: [** If `uuid` fails to be set, UUID_generate shall fail and return a non-zero value **]** **SRS_UUID_09_006: [** If no failures occur, UUID_generate shall return zero **]** ### UUID_from_string ```c extern int UUID_from_string(char* uuid_string, UUID_T* uuid); ``` **SRS_UUID_09_007: [** If `uuid_string` or `uuid` are NULL, UUID_from_string shall return a non-zero value **]** **SRS_UUID_09_008: [** Each pair of digits in `uuid_string`, excluding dashes, shall be read as a single HEX value and saved on the respective position in `uuid` **]** **SRS_UUID_09_009: [** If `uuid` fails to be generated, UUID_from_string shall return a non-zero value **]** **SRS_UUID_09_010: [** If no failures occur, UUID_from_string shall return zero **]** ### UUID_to_string ```c extern char* UUID_to_string(UUID_T* uuid); ``` **SRS_UUID_09_011: [** If `uuid` is NULL, UUID_to_string shall return a non-zero value **]** **SRS_UUID_09_012: [** UUID_to_string shall allocate a valid UUID string (`uuid_string`) as per RFC 4122 **]** **SRS_UUID_09_013: [** If `uuid_string` fails to be allocated, UUID_to_string shall return NULL **]** **SRS_UUID_09_014: [** Each character in `uuid` shall be written in the respective positions of `uuid_string` as a 2-digit HEX value **]** **SRS_UUID_09_015: [** If `uuid_string` fails to be set, UUID_to_string shall return NULL **]** **SRS_UUID_09_016: [** If no failures occur, UUID_to_string shall return `uuid_string` **]** uws_client_requirements.md000066400000000000000000004032701362133436400360300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# uws_client requirements ## Overview uws_client is module that provides the public API for a WebSocket client. It is part of uWS, a WebSocket library for small devices. ## References RFC6455 - The WebSocket Protocol. ## Exposed API ```c typedef struct UWS_CLIENT_INSTANCE_TAG* UWS_CLIENT_HANDLE; #define WS_SEND_FRAME_RESULT_VALUES \ WS_SEND_FRAME_OK, \ WS_SEND_FRAME_ERROR, \ WS_SEND_FRAME_CANCELLED DEFINE_ENUM(WS_SEND_FRAME_RESULT, WS_SEND_FRAME_RESULT_VALUES); #define WS_OPEN_RESULT_VALUES \ WS_OPEN_OK, \ WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED, \ WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED, \ WS_OPEN_ERROR_NOT_ENOUGH_MEMORY, \ WS_OPEN_ERROR_CANNOT_CONSTRUCT_UPGRADE_REQUEST, \ WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST, \ WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS, \ WS_OPEN_ERROR_CONSTRUCTING_UPGRADE_REQUEST, \ WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS, \ WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN, \ WS_OPEN_CANCELLED, \ WS_OPEN_ERROR_UNDERLYING_IO_ERROR, \ WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE, \ WS_OPEN_ERROR_BAD_RESPONSE_STATUS DEFINE_ENUM(WS_OPEN_RESULT, WS_OPEN_RESULT_VALUES); #define WS_ERROR_VALUES \ WS_ERROR_NOT_ENOUGH_MEMORY, \ WS_ERROR_BAD_FRAME_RECEIVED, \ WS_ERROR_CANNOT_REMOVE_SENT_ITEM_FROM_LIST, \ WS_ERROR_UNDERLYING_IO_ERROR, \ WS_ERROR_CANNOT_CLOSE_UNDERLYING_IO DEFINE_ENUM(WS_ERROR, WS_ERROR_VALUES); #define WS_FRAME_TYPE_TEXT 0x01 #define WS_FRAME_TYPE_BINARY 0x02 #define CLOSE_NORMAL 1000 #define CLOSE_GOING_AWAY 1001 #define CLOSE_PROTOCOL_ERROR 1002 #define CLOSE_CANNOT_ACCEPT_DATA_TYPE 1003 #define CLOSE_UNDEFINED_1004 1004 #define CLOSE_RESERVED_1005 1005 #define CLOSE_RESERVED_1006 1006 #define CLOSE_INCONSISTENT_DATA_IN_MESSAGE 1007 #define CLOSE_POLICY_VIOLATION 1008 #define CLOSE_MESSAGE_TOO_BIG 1009 #define CLOSE_UNSUPPORTED_EXTENSION_LIST 1010 #define CLOSE_UNEXPECTED_CONDITION 1011 #define CLOSE_RESERVED_1015 1015 typedef void(*ON_WS_FRAME_RECEIVED)(void* context, unsigned char frame_type, const unsigned char* buffer, size_t size); typedef void(*ON_WS_SEND_FRAME_COMPLETE)(void* context, WS_SEND_FRAME_RESULT ws_send_frame_result); typedef void(*ON_WS_OPEN_COMPLETE)(void* context, WS_OPEN_RESULT ws_open_result); typedef void(*ON_WS_CLOSE_COMPLETE)(void* context); typedef void(*ON_WS_PEER_CLOSED)(void* context, uint16_t* close_code, const unsigned char* extra_data, size_t extra_data_length); typedef void(*ON_WS_ERROR)(void* context, WS_ERROR error_code); typedef struct WS_PROTOCOL_TAG { const char* protocol; } WS_PROTOCOL; MOCKABLE_FUNCTION(, UWS_CLIENT_HANDLE, uws_client_create, const char*, hostname, unsigned int, port, const char*, resource_name, bool, use_ssl, const WS_PROTOCOL*, protocols, size_t, protocol_count); MOCKABLE_FUNCTION(, UWS_CLIENT_HANDLE, uws_client_create_with_io, const IO_INTERFACE_DESCRIPTION*, io_interface, void*, io_create_parameters, const char*, hostname, unsigned int, port, const char*, resource_name, const WS_PROTOCOL*, protocols, size_t, protocol_count); MOCKABLE_FUNCTION(, void, uws_client_destroy, UWS_CLIENT_HANDLE, uws_client); MOCKABLE_FUNCTION(, int, uws_client_open_async, UWS_CLIENT_HANDLE, uws_client, ON_WS_OPEN_COMPLETE, on_ws_open_complete, void*, on_ws_open_complete_context, ON_WS_FRAME_RECEIVED, on_ws_frame_received, void*, on_ws_frame_received_context, ON_WS_PEER_CLOSED, on_ws_peer_closed, void*, on_ws_peer_closed_context, ON_WS_ERROR, on_ws_error, void*, on_ws_error_context); MOCKABLE_FUNCTION(, int, uws_client_close_async, UWS_CLIENT_HANDLE, uws_client, ON_WS_CLOSE_COMPLETE, on_ws_close_complete, void*, on_ws_close_complete_context); MOCKABLE_FUNCTION(, int, uws_client_close_handshake_async, UWS_CLIENT_HANDLE, uws_client, uint16_t, close_code, const char*, close_reason, ON_WS_CLOSE_COMPLETE, on_ws_close_complete, void*, on_ws_close_complete_context); MOCKABLE_FUNCTION(, int, uws_client_send_frame_async, UWS_CLIENT_HANDLE, uws_client, unsigned char, frame_type, const unsigned char*, buffer, size_t, size, bool, is_final, ON_WS_SEND_FRAME_COMPLETE, on_ws_send_frame_complete, void*, callback_context); MOCKABLE_FUNCTION(, void, uws_client_dowork, UWS_CLIENT_HANDLE, uws_client); MOCKABLE_FUNCTION(, int, uws_client_set_request_header, UWS_CLIENT_HANDLE, uws_client, const char*, name, const char*, value); MOCKABLE_FUNCTION(, int, uws_client_set_option, UWS_CLIENT_HANDLE, uws_client, const char*, option_name, const void*, value); MOCKABLE_FUNCTION(, OPTIONHANDLER_HANDLE, uws_client_retrieve_options, UWS_CLIENT_HANDLE, uws_client); ``` ### uws_client_create ```c extern UWS_CLIENT_HANDLE uws_client_create(const char* hostname, unsigned int port, const char* resource_name, bool use_ssl, const WS_PROTOCOL* protocols, size_t protocol_count); ``` XX**SRS_UWS_CLIENT_01_001: [** `uws_client_create` shall create an instance of uws and return a non-NULL handle to it.**]** XX**SRS_UWS_CLIENT_01_002: [** If any of the arguments `hostname` and `resource_name` is NULL then `uws_client_create` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_003: [** If allocating memory for the new uws instance fails then `uws_client_create` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_004: [** The argument `hostname` shall be copied for later use. **]** XX**SRS_UWS_CLIENT_01_392: [** If allocating memory for the copy of the `hostname` argument fails, then `uws_client_create` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_403: [** The argument `port` shall be copied for later use. **]** XX**SRS_UWS_CLIENT_01_459: [** Any previously allocated underlying IO handle shall be destroyed by calling `xio_destroy`. **]** XX**SRS_UWS_CLIENT_01_005: [** If `use_ssl` is false then `uws_client_create` shall obtain the interface used to create a socketio instance by calling `socketio_get_interface_description`. **]** XX**SRS_UWS_CLIENT_01_006: [** If `use_ssl` is true then `uws_client_create` shall obtain the interface used to create a tlsio instance by calling `platform_get_default_tlsio`. **]** XX**SRS_UWS_CLIENT_01_007: [** If obtaining the underlying IO interface fails, then `uws_client_create` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_008: [** The obtained interface shall be used to create the IO used as underlying IO by the newly created uws instance. **]** XX**SRS_UWS_CLIENT_01_009: [** The underlying IO shall be created by calling `xio_create`. **]** XX**SRS_UWS_CLIENT_01_010: [** The create arguments for the socket IO (when `use_ssl` is 0) shall have: **]** XX**SRS_UWS_CLIENT_01_011: [** - `hostname` set to the `hostname` argument passed to `uws_client_create`. **]** XX**SRS_UWS_CLIENT_01_012: [** - `port` set to the `port` argument passed to `uws_client_create`. **]** XX**SRS_UWS_CLIENT_01_013: [** The create arguments for the tls IO (when `use_ssl` is 1) shall have: **]** XX**SRS_UWS_CLIENT_01_014: [** - `hostname` set to the `hostname` argument passed to `uws_client_create`. **]** XX**SRS_UWS_CLIENT_01_015: [** - `port` set to the `port` argument passed to `uws_client_create`. **]** XX**SRS_UWS_CLIENT_01_016: [** If `xio_create` fails, then `uws_client_create` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_404: [** The argument `resource_name` shall be copied for later use. **]** XX**SRS_UWS_CLIENT_01_410: [** The `protocols` argument shall be allowed to be NULL, in which case no protocol is to be specified by the client in the upgrade request. **]** XX**SRS_UWS_CLIENT_01_411: [** If `protocol_count` is non zero and `protocols` is NULL then `uws_client_create` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_412: [** If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_413: [** The protocol information indicated by `protocols` and `protocol_count` shall be copied for later use (for constructing the upgrade request). **]** XX**SRS_UWS_CLIENT_01_414: [** If allocating memory for the copied protocol information fails then `uws_client_create` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_405: [** If allocating memory for the copy of the `resource_name` argument fails, then `uws_client_create` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_017: [** `uws_client_create` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. **]** XX**SRS_UWS_CLIENT_01_018: [** If `singlylinkedlist_create` fails then `uws_client_create` shall fail and return NULL. **]** ### uws_client_create_with_io ```c UWS_CLIENT_HANDLE uws_client_create_with_io(const IO_INTERFACE_DESCRIPTION* io_interface, void* io_create_parameters, const char* hostname, unsigned int port, const char* resource_name, const WS_PROTOCOL* protocols, size_t protocol_count) ``` XX**SRS_UWS_CLIENT_01_515: [** `uws_client_create_with_io` shall create an instance of uws and return a non-NULL handle to it. **]** XX**SRS_UWS_CLIENT_01_516: [** If any of the arguments `io_interface`, `hostname` and `resource_name` is NULL then `uws_client_create_with_io` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_517: [** If allocating memory for the new uws instance fails then `uws_client_create_with_io` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_518: [** The argument `hostname` shall be copied for later use. **]** XX**SRS_UWS_CLIENT_01_519: [** If allocating memory for the copy of the `hostname` argument fails, then `uws_client_create` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_520: [** The argument `port` shall be copied for later use. **]** XX**SRS_UWS_CLIENT_01_521: [** The underlying IO shall be created by calling `xio_create`, while passing as arguments the `io_interface` and `io_create_parameters` argument values. **]** XX**SRS_UWS_CLIENT_01_522: [** If `xio_create` fails, then `uws_client_create_with_io` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_523: [** The argument `resource_name` shall be copied for later use. **]** XX**SRS_UWS_CLIENT_01_529: [** If allocating memory for the copy of the `resource_name` argument fails, then `uws_client_create_with_io` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_524: [** The `protocols` argument shall be allowed to be NULL, in which case no protocol is to be specified by the client in the upgrade request. **]** XX**SRS_UWS_CLIENT_01_525: [** If `protocol_count` is non zero and `protocols` is NULL then `uws_client_create_with_io` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_526: [** If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create_with_io` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_527: [** The protocol information indicated by `protocols` and `protocol_count` shall be copied for later use (for constructing the upgrade request). **]** XX**SRS_UWS_CLIENT_01_528: [** If allocating memory for the copied protocol information fails then `uws_client_create_with_io` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_530: [** `uws_client_create_with_io` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. **]** XX**SRS_UWS_CLIENT_01_531: [** If `singlylinkedlist_create` fails then `uws_client_create_with_io` shall fail and return NULL. **]** ### uws_client_destroy ```c extern void uws_client_destroy(UWS_CLIENT_HANDLE uws); ``` XX**SRS_UWS_CLIENT_01_019: [** `uws_client_destroy` shall free all resources associated with the uws instance. **]** XX**SRS_UWS_CLIENT_01_020: [** If `uws_client` is NULL, `uws_client_destroy` shall do nothing. **]** XX**SRS_UWS_CLIENT_01_021: [** `uws_client_destroy` shall perform a close action if the uws instance has already been open. **]** XX**SRS_UWS_CLIENT_01_023: [** `uws_client_destroy` shall destroy the underlying IO created in `uws_client_create` by calling `xio_destroy`. **]** XX**SRS_UWS_CLIENT_01_024: [** `uws_client_destroy` shall free the list used to track the pending sends by calling `singlylinkedlist_destroy`. **]** XX**SRS_UWS_CLIENT_01_437: [** `uws_client_destroy` shall free the protocols array allocated in `uws_client_create`. **]** ### uws_client_open_async ```c extern int uws_client_open_async(UWS_CLIENT_HANDLE uws, ON_WS_OPEN_COMPLETE on_ws_open_complete, void* on_ws_open_complete_context, ON_WS_FRAME_RECEIVED on_ws_frame_received, void* on_ws_frame_received_context, ON_WS_PEER_CLOSED, on_ws_peer_closed, void*, on_ws_peer_closed_context, ON_WS_ERROR on_ws_error, void* on_ws_error_context); ``` XX**SRS_UWS_CLIENT_01_025: [** `uws_client_open_async` shall open the underlying IO by calling `xio_open` and providing the IO handle created in `uws_client_create` as argument. **]** XX**SRS_UWS_CLIENT_01_367: [** The callbacks `on_underlying_io_open_complete`, `on_underlying_io_bytes_received` and `on_underlying_io_error` shall be passed as arguments to `xio_open`. **]** XX**SRS_UWS_CLIENT_01_026: [** On success, `uws_client_open_async` shall return 0. **]** XX**SRS_UWS_CLIENT_01_027: [** If `uws_client`, `on_ws_open_complete`, `on_ws_frame_received`, `on_ws_peer_closed` or `on_ws_error` is NULL, `uws_client_open_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_393: [** The context arguments for the callbacks shall be allowed to be NULL. **]** XX**SRS_UWS_CLIENT_01_028: [** If opening the underlying IO fails then `uws_client_open_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_394: [** `uws_client_open_async` while the uws instance is already OPEN or OPENING shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_400: [** `uws_client_open_async` while CLOSING shall fail and return a non-zero value. **]** ### uws_client_close_async ```c extern int uws_client_close_async(UWS_CLIENT_HANDLE uws, ON_WS_CLOSE_COMPLETE on_ws_close_complete, void* on_ws_close_complete_context); ``` XX**SRS_UWS_CLIENT_01_029: [** `uws_client_close_async` shall close the uws instance connection if an open action is either pending or has completed successfully (if the IO is open). **]** XX**SRS_UWS_CLIENT_01_396: [** On success `uws_client_close_async` shall return 0. **]** XX**SRS_UWS_CLIENT_01_030: [** if `uws_client` is NULL, `uws_client_close_async` shall return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_399: [** `on_ws_close_complete` and `on_ws_close_complete_context` shall be saved and the callback `on_ws_close_complete` shall be triggered when the close is complete. **]** XX**SRS_UWS_CLIENT_01_397: [** The `on_ws_close_complete` argument shall be allowed to be NULL, in which case no callback shall be called when the close is complete. **]** XX**SRS_UWS_CLIENT_01_398: [** `on_ws_close_complete_context` shall also be allowed to be NULL. **]** XX**SRS_UWS_CLIENT_01_031: [** `uws_client_close_async` shall close the connection by calling `xio_close` while passing as argument the IO handle created in `uws_client_create`. **]** XX**SRS_UWS_CLIENT_01_368: [** The callback `on_underlying_io_close` shall be passed as argument to `xio_close`. **]** XX**SRS_UWS_CLIENT_01_395: [** If `xio_close` fails, `uws_client_close_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_032: [** `uws_client_close_async` when no open action has been issued shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_033: [** `uws_client_close_async` after a `uws_client_close_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_034: [** `uws_client_close_async` shall obtain all the pending send frames by repetitively querying for the head of the pending IO list and freeing that head item. **]** XX**SRS_UWS_CLIENT_01_035: [** Obtaining the head of the pending send frames list shall be done by calling `singlylinkedlist_get_head_item`. **]** XX**SRS_UWS_CLIENT_01_036: [** For each pending send frame the send complete callback shall be called with `UWS_SEND_FRAME_CANCELLED`. **]** XX**SRS_UWS_CLIENT_01_037: [** When indicating pending send frames as cancelled the callback context passed to the `on_ws_send_frame_complete` callback shall be the context given to `uws_client_send_frame_async`. **]** ### uws_client_close_handshake_async ```c extern int uws_client_close_handshake_async(UWS_CLIENT_HANDLE uws, uint16 close_code, const char* close_reason, ON_WS_CLOSE_COMPLETE on_ws_close_complete, void* on_ws_close_complete_context); ``` XX**SRS_UWS_CLIENT_01_465: [** `uws_client_close_handshake_async` shall initiate the close handshake by sending a close frame to the peer. **]** XX**SRS_UWS_CLIENT_01_466: [** On success `uws_client_close_handshake_async` shall return 0. **]** XX**SRS_UWS_CLIENT_01_467: [** if `uws_client` is NULL, `uws_client_close_handshake_async` shall return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_468: [** `on_ws_close_complete` and `on_ws_close_complete_context` shall be saved and the callback `on_ws_close_complete` shall be triggered when the close is complete. **]** XX**SRS_UWS_CLIENT_01_469: [** The `on_ws_close_complete` argument shall be allowed to be NULL, in which case no callback shall be called when the close is complete. **]** XX**SRS_UWS_CLIENT_01_470: [** `on_ws_close_complete_context` shall also be allowed to be NULL. **]** XX**SRS_UWS_CLIENT_01_472: [** If `xio_send` fails, `uws_client_close_handshake_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_473: [** `uws_client_close_handshake_async` when no open action has been issued shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_474: [** `uws_client_close_handshake_async` when already CLOSING shall fail and return a non-zero value. **]** ### uws_client_send_frame_async ```c extern int uws_client_send_frame_async(UWS_CLIENT_HANDLE uws, const unsigned char* buffer, size_t size, bool is_final, ON_WS_SEND_FRAME_COMPLETE on_ws_send_frame_complete, void* on_ws_send_frame_complete_context); ``` XX**SRS_UWS_CLIENT_01_038: [** `uws_client_send_frame_async` shall create and queue a structure that contains: **]** XX**SRS_UWS_CLIENT_01_040: [** - the send complete callback `on_ws_send_frame_complete` **]** XX**SRS_UWS_CLIENT_01_041: [** - the send complete callback context `on_ws_send_frame_complete_context` **]** XX**SRS_UWS_CLIENT_01_042: [** On success, `uws_client_send_frame_async` shall return 0. **]** XX**SRS_UWS_CLIENT_01_425: [** Encoding shall be done by calling `uws_frame_encoder_encode` and passing to it the `buffer` and `size` argument for payload, the `is_final` flag and setting `is_masked` to true. **]** XX**SRS_UWS_CLIENT_01_426: [** If `uws_frame_encoder_encode` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_428: [** The encoded frame buffer memory shall be obtained by calling `BUFFER_u_char` on the encode buffer. **]** XX**SRS_UWS_CLIENT_01_429: [** The encoded frame size shall be obtained by calling `BUFFER_length` on the encode buffer. **]** XX**SRS_UWS_CLIENT_01_431: [** Once encoded the frame shall be sent by using `xio_send` with the following arguments: **]** XX**SRS_UWS_CLIENT_01_053: [** - the io handle shall be the underlyiong IO handle created in `uws_client_create`. **]** XX**SRS_UWS_CLIENT_01_054: [** - the `buffer` argument shall point to the complete websocket frame to be sent. **]** XX**SRS_UWS_CLIENT_01_055: [** - the `size` argument shall indicate the websocket frame length. **]** XX**SRS_UWS_CLIENT_01_056: [** - the `send_complete` callback shall be the `on_underlying_io_send_complete` function. **]** XX**SRS_UWS_CLIENT_01_057: [** - the `send_complete_context` argument shall identify the pending send. **]** XX**SRS_UWS_CLIENT_01_058: [** If `xio_send` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_09_001: [** If `xio_send` fails and the message is still queued, it shall be de-queued and destroyed. **]** XX**SRS_UWS_CLIENT_01_043: [** If the uws instance is not OPEN (open has not been called or is still in progress) then `uws_client_send_frame_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_044: [** If the argument `uws_client` is NULL, `uws_client_send_frame_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_045: [** If `size` is non-zero and `buffer` is NULL then `uws_client_send_frame_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_047: [** If allocating memory for the newly queued item fails, `uws_client_send_frame_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_048: [** Queueing shall be done by calling `singlylinkedlist_add`. **]** XX**SRS_UWS_CLIENT_01_049: [** If `singlylinkedlist_add` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_050: [** The argument `on_ws_send_frame_complete` shall be optional, if NULL is passed by the caller then no send complete callback shall be triggered. **]** ### uws_client_dowork ```c extern void uws_client_dowork(UWS_CLIENT_HANDLE uws); ``` XX**SRS_UWS_CLIENT_01_059: [** If the `uws_client` argument is NULL, `uws_client_dowork` shall do nothing. **]** XX**SRS_UWS_CLIENT_01_060: [** If the IO is not yet open, `uws_client_dowork` shall do nothing. **]** XX**SRS_UWS_CLIENT_01_430: [** `uws_client_dowork` shall call `xio_dowork` with the IO handle argument set to the underlying IO created in `uws_client_create`. **]** ### uws_client_set_request_header ```c int uws_client_set_request_header(UWS_CLIENT_HANDLE uws_client, const char* name, const char* value); ``` XX**SRS_UWS_CLIENT_09_002: [** If any of the arguments `uws_client` or `name` or `value` is NULL `uws_client_set_request_header` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_09_003: [** A copy of `name` and `value` shall be stored for later sending in the request message. **]** XX**SRS_UWS_CLIENT_09_004: [** If `name` or `value` fail to be stored the function shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_09_005: [** If no failures occur the function shall return zero. **]** ### uws_setoption ```c extern int uws_client_set_option(UWS_CLIENT_HANDLE uws, const char* option_name, const void* value); ``` XX**SRS_UWS_CLIENT_01_440: [** If any of the arguments `uws_client` or `option_name` is NULL `uws_client_set_option` shall return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_510: [** If the option name is `uWSClientOptions` then `uws_client_set_option` shall call `OptionHandler_FeedOptions` and pass to it the underlying IO handle and the `value` argument. **]** XX**SRS_UWS_CLIENT_01_511: [** If `OptionHandler_FeedOptions` fails, `uws_client_set_option` shall fail and return a non-zero value. **]** XX**SRS_UWS_CLIENT_01_441: [** Otherwise all options shall be passed as they are to the underlying IO by calling `xio_setoption`. **]** XX**SRS_UWS_CLIENT_01_442: [** On success, `uws_client_set_option` shall return 0. **]** XX**SRS_UWS_CLIENT_01_443: [** If `xio_setoption` fails, `uws_client_set_option` shall fail and return a non-zero value. **]** ### uws_client_retrieve_options ```c OPTIONHANDLER_HANDLE uws_client_retrieve_options(UWS_CLIENT_HANDLE uws) ``` XX**SRS_UWS_CLIENT_01_444: [** If parameter `uws_client` is `NULL` then `uws_client_retrieve_options` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_445: [** `uws_client_retrieve_options` shall call `OptionHandler_Create` to produce an `OPTIONHANDLER_HANDLE` and on success return the new `OPTIONHANDLER_HANDLE` handle. **]** XX**SRS_UWS_CLIENT_01_446: [** If `OptionHandler_Create` fails then `uws_client_retrieve_options` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_501: [** `uws_client_retrieve_options` shall add to the option handler one option, whose name shall be `uWSClientOptions` and the value shall be queried by calling `xio_retrieveoptions`. **]** XX**SRS_UWS_CLIENT_01_502: [** When calling `xio_retrieveoptions` the underlying IO handle shall be passed to it. **]** XX**SRS_UWS_CLIENT_01_503: [** If `xio_retrieveoptions` fails, `uws_client_retrieve_options` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_504: [** Adding the option shall be done by calling `OptionHandler_AddOption`. **]** XX**SRS_UWS_CLIENT_01_505: [** If `OptionHandler_AddOption` fails, `uws_client_retrieve_options` shall fail and return NULL. **]** ### uws_client_clone_option `uws_client_clone_option` is the implementation provided to the option handler instance created as part of `uws_client_retrieve_options`. ```c void* uws_client_clone_option(const char* name, const void* value) ``` XX**SRS_UWS_CLIENT_01_507: [** `uws_client_clone_option` called with `name` being `uWSClientOptions` shall clone the options by calling `OptionHandler_Clone`. **]** XX**SRS_UWS_CLIENT_01_514: [** If `OptionHandler_Clone` fails, `uws_client_clone_option` shall fail and return NULL. **]** XX**SRS_UWS_CLIENT_01_512: [** `uws_client_clone_option` called with any other option name than `uWSClientOptions` shall return NULL. **]** XX**SRS_UWS_CLIENT_01_506: [** If `uws_client_clone_option` is called with NULL `name` or `value` it shall return NULL. **]** ### uws_client_destroy_option `uws_client_destroy_option` is the implementation provided to the option handler instance created as part of `uws_client_retrieve_options`. ```c void uws_client_destroy_option(const char* name, const void* value) ``` XX**SRS_UWS_CLIENT_01_508: [** `uws_client_destroy_option` called with the option `name` being `uWSClientOptions` shall destroy the value by calling `OptionHandler_Destroy`. **]** XX**SRS_UWS_CLIENT_01_513: [** If `uws_client_destroy_option` is called with any other `name` it shall do nothing. **]** XX**SRS_UWS_CLIENT_01_509: [** If `uws_client_destroy_option` is called with NULL `name` or `value` it shall do nothing. **]** ### on_underlying_io_open_complete XX**SRS_UWS_CLIENT_01_369: [** When `on_underlying_io_open_complete` is called with `IO_OPEN_ERROR` while uws is OPENING (`uws_client_open_async` was called), uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED`. **]** XX**SRS_UWS_CLIENT_01_402: [** When `on_underlying_io_open_complete` is called with `IO_OPEN_CANCELLED` while uws is OPENING (`uws_client_open_async` was called), uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED`. **]** XX**SRS_UWS_CLIENT_01_401: [** If `on_underlying_io_open_complete` is called with a NULL context, `on_underlying_io_open_complete` shall do nothing. **]** XX**SRS_UWS_CLIENT_01_371: [** When `on_underlying_io_open_complete` is called with `IO_OPEN_OK` while uws is OPENING (`uws_client_open_async` was called), uws shall prepare the WebSockets upgrade request. **]** X**SRS_UWS_CLIENT_01_408: [** If constructing of the WebSocket upgrade request fails, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_CONSTRUCTING_UPGRADE_REQUEST`. **]** XX**SRS_UWS_CLIENT_01_497: [** The nonce needed for the upgrade request shall be Base64 encoded with `Base64_Encode_Bytes`. **]** XX**SRS_UWS_CLIENT_01_498: [** If Base64 encoding the nonce for the upgrade request fails, then the uws client shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BASE64_ENCODE_FAILED`. **]** XX**SRS_UWS_CLIENT_01_406: [** If not enough memory can be allocated to construct the WebSocket upgrade request, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. **]** XX**SRS_UWS_CLIENT_01_372: [** Once prepared the WebSocket upgrade request shall be sent by calling `xio_send`. **]** XX**SRS_UWS_CLIENT_01_373: [** If `xio_send` fails then uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST`. **]** **SRS_UWS_CLIENT_01_374: [** When `on_underlying_io_open_complete` is called when the uws instance is already OPEN, an error shall be reported to the user by calling the `on_ws_error` callback that was passed to `uws_client_open_async`. **]** XX**SRS_UWS_CLIENT_01_407: [** When `on_underlying_io_open_complete` is called when the uws instance has send the upgrade request but it is waiting for the response, an error shall be reported to the user by calling the `on_ws_open_complete` with `WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS`. **]** XX**SRS_UWS_CLIENT_01_409: [** After any error is indicated by `on_ws_open_complete`, a subsequent `uws_client_open_async` shall be possible. **]** ### on_underlying_io_error XX**SRS_UWS_CLIENT_01_375: [** When `on_underlying_io_error` is called while uws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR`. **]** XX**SRS_UWS_CLIENT_01_376: [** When `on_underlying_io_error` is called while the uws instance is OPEN, an error shall be reported to the user by calling the `on_ws_error` callback that was passed to `uws_client_open_async` with the argument `WS_ERROR_UNDERLYING_IO_ERROR`. **]** XX**SRS_UWS_CLIENT_01_377: [** When `on_underlying_io_error` is called while the uws instance is CLOSING the underlying IO shall be closed by calling `xio_close`. **]** XX**SRS_UWS_CLIENT_01_500: [** The callback `on_ws_close_complete` shall be called, while passing the `on_ws_close_complete_context` argument to it. **]** XX**SRS_UWS_CLIENT_01_499: [** If the CLOSE was due to the peer closing, the callback `on_ws_close_complete` shall not be called. **]** ### on_underlying_io_bytes_received XX**SRS_UWS_CLIENT_01_415: [** If called with a NULL `context` argument, `on_underlying_io_bytes_received` shall do nothing. **]** XX**SRS_UWS_CLIENT_01_416: [** If called with NULL `buffer` or zero `size` and the state of the iws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS`. **]** XX**SRS_UWS_CLIENT_01_378: [** When `on_underlying_io_bytes_received` is called while the uws is OPENING, the received bytes shall be accumulated in order to attempt parsing the WebSocket Upgrade response. **]** XX**SRS_UWS_CLIENT_01_417: [** When `on_underlying_io_bytes_received` is called while OPENING but before the `on_underlying_io_open_complete` has been called, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN`. **]** XX**SRS_UWS_CLIENT_01_379: [** If allocating memory for accumulating the bytes fails, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. **]** XX**SRS_UWS_CLIENT_01_380: [** If an WebSocket Upgrade request can be parsed from the accumulated bytes, the status shall be read from the WebSocket upgrade response. **]** XX**SRS_UWS_CLIENT_01_381: [** If the status is 101, uws shall be considered OPEN and this shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `IO_OPEN_OK`. **]** XX**SRS_UWS_CLIENT_01_382: [** If a negative status is decoded from the WebSocket upgrade request, an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_RESPONSE_STATUS`. **]** XX**SRS_UWS_CLIENT_01_383: [** If the WebSocket upgrade request cannot be decoded an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE`. **]** XX**SRS_UWS_CLIENT_01_384: [** Any extra bytes that are left unconsumed after decoding a succesfull WebSocket upgrade response shall be used for decoding WebSocket frames **]** XX**SRS_UWS_CLIENT_01_385: [** If the state of the uws instance is OPEN, the received bytes shall be used for decoding WebSocket frames. **]** XX**SRS_UWS_CLIENT_01_418: [** If allocating memory for the bytes accumulated for decoding WebSocket frames fails, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_NOT_ENOUGH_MEMORY`. **]** XX**SRS_UWS_CLIENT_01_386: [** When a WebSocket data frame is decoded succesfully it shall be indicated via the callback `on_ws_frame_received`. **]** XX**SRS_UWS_CLIENT_01_419: [** If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. **]** XX**SRS_UWS_CLIENT_01_460: [** When a CLOSE frame is received the callback `on_ws_peer_closed` passed to `uws_client_open_async` shall be called, while passing to it the argument `on_ws_peer_closed_context`. **]** XX**SRS_UWS_CLIENT_01_461: [** The argument `close_code` shall be set to point to the code extracted from the CLOSE frame. **]** XX**SRS_UWS_CLIENT_01_462: [** If no code can be extracted then `close_code` shall be NULL. **]** XX**SRS_UWS_CLIENT_01_463: [** The extra bytes (besides the close code) shall be passed to the `on_ws_peer_closed` callback by using `extra_data` and `extra_data_length`. **]** ### on_underlying_io_close_complete XX**SRS_UWS_CLIENT_01_495: [** When `on_underlying_io_close_complete` is called with NULL `context`, it shall do nothing. **]** XX**SRS_UWS_CLIENT_01_387: [** When `on_underlying_io_close_complete` is called when the uws instance is closing, the `on_ws_close_complete` callback passed to `uws_client_close_async` shall be called. **]** XX**SRS_UWS_CLIENT_01_476: [** If the close is as a result of receiving a CLOSE frame, no callback shall be called. **]** XX**SRS_UWS_CLIENT_01_475: [** When `on_underlying_io_close_complete` is called while closing the underlying IO a subsequent `uws_client_open_async` shall succeed. **]** XX**SRS_UWS_CLIENT_01_477: [** When `on_underlying_io_close_complete` is called with a NULL context, it shall do nothing. **]** ### on_underlying_io_send_complete XX**SRS_UWS_CLIENT_01_432: [** The indicated sent frame shall be removed from the list by calling `singlylinkedlist_remove`. **]** XX**SRS_UWS_CLIENT_01_433: [** If `singlylinkedlist_remove` fails an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_CANNOT_REMOVE_SENT_ITEM_FROM_LIST`. **]** XX**SRS_UWS_CLIENT_01_434: [** The memory associated with the sent frame shall be freed. **]** XX**SRS_UWS_CLIENT_01_389: [** When `on_underlying_io_send_complete` is called with `IO_SEND_OK` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_OK`. **]** XX**SRS_UWS_CLIENT_01_390: [** When `on_underlying_io_send_complete` is called with `IO_SEND_ERROR` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_ERROR`. **]** XX**SRS_UWS_CLIENT_01_391: [** When `on_underlying_io_send_complete` is called with `IO_SEND_CANCELLED` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_CANCELLED`. **]** XX**SRS_UWS_CLIENT_01_435: [** When `on_underlying_io_send_complete` is called with a NULL `context`, it shall do nothing. **]** XX**SRS_UWS_CLIENT_01_436: [** When `on_underlying_io_send_complete` is called with any other error code, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_ERROR`. **]** ### on_underlying_io_close_sent XX**SRS_UWS_CLIENT_01_489: [** When `on_underlying_io_close_sent` is called with NULL context, it shall do nothing. **]** XX**SRS_UWS_CLIENT_01_490: [** When `on_underlying_io_close_sent` is called while the uws client is CLOSING, `on_underlying_io_close_sent` shall close the underlying IO by calling `xio_close`. **]** XX**SRS_UWS_CLIENT_01_496: [** If the close was initiated by the peer no `on_ws_close_complete` shall be called. **]** ### RFC6455 3. WebSocket URIs This specification defines two URI schemes, using the ABNF syntax defined in RFC 5234 [RFC5234], and terminology and ABNF productions defined by the URI specification RFC 3986 [RFC3986]. ws-URI = "ws:" "//" host [ ":" port ] path [ "?" query ] wss-URI = "wss:" "//" host [ ":" port ] path [ "?" query ] host = port = path = query = The port component is OPTIONAL; the default for "ws" is port 80, while the default for "wss" is port 443. The URI is called "secure" (and it is said that "the secure flag is set") if the scheme component matches "wss" case-insensitively. The "resource-name" (also known as /resource name/ in Section 4.1) can be constructed by concatenating the following: - "/" if the path component is empty - the path component - "?" if the query component is non-empty - the query component Fragment identifiers are meaningless in the context of WebSocket URIs and MUST NOT be used on these URIs. As with any URI scheme, the character "#", when not indicating the start of a fragment, MUST be escaped as %23. 4. Opening Handshake 4.1. Client Requirements XX**SRS_UWS_CLIENT_01_061: [** To _Establish a WebSocket Connection_, a client opens a connection and sends a handshake as defined in this section. **]** A connection is defined to initially be in a CONNECTING state. XX**SRS_UWS_CLIENT_01_063: [** A client will need to supply a /host/, /port/, /resource name/, and a /secure/ flag, which are the components of a WebSocket URI as discussed in Section 3, along with a list of /protocols/ and /extensions/ to be used. **]** **SRS_UWS_CLIENT_01_064: [** Additionally, if the client is a web browser, it supplies /origin/. **]** Clients running in controlled environments, e.g., browsers on mobile handsets tied to specific carriers, MAY offload the management of the connection to another agent on the network. In such a situation, the client for the purposes of this specification is considered to include both the handset software and any such agents. XX**SRS_UWS_CLIENT_01_065: [** When the client is to _Establish a WebSocket Connection_ given a set of (/host/, /port/, /resource name/, and /secure/ flag), along with a list of /protocols/ and /extensions/ to be used, and an /origin/ in the case of web browsers, it MUST open a connection, send an opening handshake, and read the server's handshake in response. **]** The exact requirements of how the connection should be opened, what should be sent in the opening handshake, and how the server's response should be interpreted are as follows in this section. In the following text, we will use terms from Section 3, such as "/host/" and "/secure/ flag" as defined in that section. 1. **SRS_UWS_CLIENT_01_066: [** The components of the WebSocket URI passed into this algorithm (/host/, /port/, /resource name/, and /secure/ flag) MUST be valid according to the specification of WebSocket URIs specified in Section 3. **]** **SRS_UWS_CLIENT_01_067: [** If any of the components are invalid, the client MUST _Fail the WebSocket Connection_ and abort these steps. **]** 2. If the client already has a WebSocket connection to the remote host (IP address) identified by /host/ and port /port/ pair, even if the remote host is known by another name, the client MUST wait until that connection has been established or for that connection to have failed. There MUST be no more than one connection in a CONNECTING state. If multiple connections to the same IP address are attempted simultaneously, the client MUST serialize them so that there is no more than one connection at a time running through the following steps. If the client cannot determine the IP address of the remote host (for example, because all communication is being done through a proxy server that performs DNS queries itself), then the client MUST assume for the purposes of this step that each host name refers to a distinct remote host, and instead the client SHOULD limit the total number of simultaneous pending connections to a reasonably low number (e.g., the client might allow simultaneous pending connections to a.example.com and b.example.com, but if thirty simultaneous connections to a single host are requested, that may not be allowed). For example, in a web browser context, the client needs to consider the number of tabs the user has open in setting a limit to the number of simultaneous pending connections. NOTE: This makes it harder for a script to perform a denial-of-service attack by just opening a large number of WebSocket connections to a remote host. A server can further reduce the load on itself when attacked by pausing before closing the connection, as that will reduce the rate at which the client reconnects. NOTE: There is no limit to the number of established WebSocket connections a client can have with a single remote host. Servers can refuse to accept connections from hosts/IP addresses with an excessive number of existing connections or disconnect resource-hogging connections when suffering high load. 3. **SRS_UWS_CLIENT_01_072: [** _Proxy Usage_: If the client is configured to use a proxy when using the WebSocket Protocol to connect to host /host/ and port /port/, then the client SHOULD connect to that proxy and ask it to open a TCP connection to the host given by /host/ and the port given by /port/. **]** EXAMPLE: For example, if the client uses an HTTP proxy for all traffic, then if it was to try to connect to port 80 on server example.com, it might send the following lines to the proxy server: CONNECT example.com:80 HTTP/1.1 Host: example.com If there was a password, the connection might look like: CONNECT example.com:80 HTTP/1.1 Host: example.com Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE= **SRS_UWS_CLIENT_01_073: [** If the client is not configured to use a proxy, then a direct TCP connection SHOULD be opened to the host given by /host/ and the port given by /port/. **]** NOTE: Implementations that do not expose explicit UI for selecting a proxy for WebSocket connections separate from other proxies are encouraged to use a SOCKS5 [RFC1928] proxy for WebSocket connections, if available, or failing that, to prefer the proxy configured for HTTPS connections over the proxy configured for HTTP connections. **SRS_UWS_CLIENT_01_074: [** For the purpose of proxy autoconfiguration scripts, the URI to pass the function MUST be constructed from /host/, /port/, /resource name/, and the /secure/ flag using the definition of a WebSocket URI as given in Section 3. **]** NOTE: The WebSocket Protocol can be identified in proxy autoconfiguration scripts from the scheme ("ws" for unencrypted connections and "wss" for encrypted connections). 4. XX**SRS_UWS_CLIENT_01_075: [** If the connection could not be opened, either because a direct connection failed or because any proxy used returned an error, then the client MUST _Fail the WebSocket Connection_ and abort the connection attempt. **]** 5. XX**SRS_UWS_CLIENT_01_076: [** If /secure/ is true, the client MUST perform a TLS handshake over the connection after opening the connection and before sending the handshake data [RFC2818]. **]** XX**SRS_UWS_CLIENT_01_077: [** If this fails (e.g., the server's certificate could not be verified), then the client MUST _Fail the WebSocket Connection_ and abort the connection. **]** XX**SRS_UWS_CLIENT_01_078: [** Otherwise, all further communication on this channel MUST run through the encrypted tunnel [RFC5246]. **]** **SRS_UWS_CLIENT_01_079: [** Clients MUST use the Server Name Indication extension in the TLS handshake [RFC6066]. **]** XX**SRS_UWS_CLIENT_01_080: [** Once a connection to the server has been established (including a connection via a proxy or over a TLS-encrypted tunnel), the client MUST send an opening handshake to the server. **]** XX**SRS_UWS_CLIENT_01_081: [** The handshake consists of an HTTP Upgrade request, along with a list of required and optional header fields. **]** The requirements for this handshake are as follows. 1. XX**SRS_UWS_CLIENT_01_082: [** The handshake MUST be a valid HTTP request as specified by [RFC2616]. **]** 2. XX**SRS_UWS_CLIENT_01_083: [** The method of the request MUST be GET, and the HTTP version MUST be at least 1.1. **]** For example, if the WebSocket URI is "ws://example.com/chat", the first line sent should be "GET /chat HTTP/1.1". 3. XX**SRS_UWS_CLIENT_01_084: [** The "Request-URI" part of the request MUST match the /resource name/ defined in Section 3 (a relative URI) or be an absolute http/https URI that, when parsed, has a /resource name/, /host/, and /port/ that match the corresponding ws/wss URI. **]** 4. XX**SRS_UWS_CLIENT_01_085: [** The request MUST contain a |Host| header field whose value contains /host/ plus optionally ":" followed by /port/ (when not using the default port). **]** 5. XX**SRS_UWS_CLIENT_01_086: [** The request MUST contain an |Upgrade| header field whose value MUST include the "websocket" keyword. **]** 6. XX**SRS_UWS_CLIENT_01_087: [** The request MUST contain a |Connection| header field whose value MUST include the "Upgrade" token. **]** 7. XX**SRS_UWS_CLIENT_01_088: [** The request MUST include a header field with the name |Sec-WebSocket-Key|. **]** XX**SRS_UWS_CLIENT_01_089: [** The value of this header field MUST be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see Section 4 of [RFC4648]). **]** XX**SRS_UWS_CLIENT_01_090: [** The nonce MUST be selected randomly for each connection. **]** NOTE: As an example, if the randomly selected value was the sequence of bytes 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10, the value of the header field would be "AQIDBAUGBwgJCgsMDQ4PEC==" 8. **SRS_UWS_CLIENT_01_091: [** The request MUST include a header field with the name |Origin| [RFC6454] if the request is coming from a browser client. **]** **SRS_UWS_CLIENT_01_092: [** If the connection is from a non-browser client, the request MAY include this header field if the semantics of that client match the use-case described here for browser clients. **]** **SRS_UWS_CLIENT_01_093: [** The value of this header field is the ASCII serialization of origin of the context in which the code establishing the connection is running. **]** See [RFC6454] for the details of how this header field value is constructed. As an example, if code downloaded from www.example.com attempts to establish a connection to ww2.example.com, the value of the header field would be "http://www.example.com". 9. XX**SRS_UWS_CLIENT_01_094: [** The request MUST include a header field with the name |Sec-WebSocket-Version|. **]** XX**SRS_UWS_CLIENT_01_095: [** The value of this header field MUST be 13. **]** NOTE: Although draft versions of this document (-09, -10, -11, and -12) were posted (they were mostly comprised of editorial changes and clarifications and not changes to the wire protocol), values 9, 10, 11, and 12 were not used as valid values for Sec-WebSocket-Version. These values were reserved in the IANA registry but were not and will not be used. 10. XX**SRS_UWS_CLIENT_01_096: [** The request MAY include a header field with the name |Sec-WebSocket-Protocol|. **]** **SRS_UWS_CLIENT_01_097: [** If present, this value indicates one or more comma-separated subprotocol the client wishes to speak, ordered by preference. **]** **SRS_UWS_CLIENT_01_098: [** The elements that comprise this value MUST be non-empty strings with characters in the range U+0021 to U+007E not including separator characters as defined in [RFC2616] **]** **SRS_UWS_CLIENT_01_099: [** and MUST all be unique strings **]**. The ABNF for the value of this header field is 1#token, where the definitions of constructs and rules are as given in [RFC2616]. 11. **SRS_UWS_CLIENT_01_100: [** The request MAY include a header field with the name |Sec-WebSocket-Extensions|. **]** If present, this value indicates the protocol-level extension(s) the client wishes to speak. The interpretation and format of this header field is described in Section 9.1. 12. **SRS_UWS_CLIENT_01_101: [** The request MAY include any other header fields, for example, cookies [RFC6265] and/or authentication-related header fields such as the |Authorization| header field [RFC2616], which are processed according to documents that define them. **]** XX**SRS_UWS_CLIENT_01_102: [** Once the client's opening handshake has been sent, the client MUST wait for a response from the server before sending any further data. **]** **SRS_UWS_CLIENT_01_103: [** The client MUST validate the server's response as follows: **]** 1. **SRS_UWS_CLIENT_01_104: [** If the status code received from the server is not 101, the client handles the response per HTTP [RFC2616] procedures. **]** In particular, **SRS_UWS_CLIENT_01_105: [** the client might perform authentication if it receives a 401 status code; **]** **SRS_UWS_CLIENT_01_106: [** the server might redirect the client using a 3xx status code **]** **SRS_UWS_CLIENT_01_107: [** (but clients are not required to follow them) **]**, etc. Otherwise, proceed as follows. 2. **SRS_UWS_CLIENT_01_108: [** If the response lacks an |Upgrade| header field or the |Upgrade| header field contains a value that is not an ASCII case-insensitive match for the value "websocket", the client MUST _Fail the WebSocket Connection_. **]** 3. **SRS_UWS_CLIENT_01_109: [** If the response lacks a |Connection| header field or the |Connection| header field doesn't contain a token that is an ASCII case-insensitive match for the value "Upgrade", the client MUST _Fail the WebSocket Connection_. **]** 4. **SRS_UWS_CLIENT_01_110: [** If the response lacks a |Sec-WebSocket-Accept| header field or the |Sec-WebSocket-Accept| contains a value other than the base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-Key| (as a string, not base64-decoded) with the string "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and trailing whitespace, the client MUST _Fail the WebSocket Connection_. **]** 5. **SRS_UWS_CLIENT_01_111: [** If the response includes a |Sec-WebSocket-Extensions| header field and this header field indicates the use of an extension that was not present in the client's handshake (the server has indicated an extension not requested by the client), the client MUST _Fail the WebSocket Connection_. **]** (The parsing of this header field to determine which extensions are requested is discussed in Section 9.1.) 6. **SRS_UWS_CLIENT_01_112: [** If the response includes a |Sec-WebSocket-Protocol| header field and this header field indicates the use of a subprotocol that was not present in the client's handshake (the server has indicated a subprotocol not requested by the client), the client MUST _Fail the WebSocket Connection_. **]** **SRS_UWS_CLIENT_01_113: [** If the server's response does not conform to the requirements for the server's handshake as defined in this section and in Section 4.2.2, the client MUST _Fail the WebSocket Connection_. **]** **SRS_UWS_CLIENT_01_114: [** Please note that according to [RFC2616], all header field names in both HTTP requests and HTTP responses are case-insensitive. **]** XX**SRS_UWS_CLIENT_01_115: [** If the server's response is validated as provided for above, it is said that _The WebSocket Connection is Established_ and that the WebSocket Connection is in the OPEN state. **]** **SRS_UWS_CLIENT_01_116: [** The _Extensions In Use_ is defined to be a (possibly empty) string, the value of which is equal to the value of the |Sec-WebSocket-Extensions| header field supplied by the server's handshake or the null value if that header field was not present in the server's handshake. **]** **SRS_UWS_CLIENT_01_117: [** The _Subprotocol In Use_ is defined to be the value of the |Sec-WebSocket-Protocol| header field in the server's handshake or the null value if that header field was not present in the server's handshake. **]** **SRS_UWS_CLIENT_01_118: [** Additionally, if any header fields in the server's handshake indicate that cookies should be set (as defined by [RFC6265]), these cookies are referred to as _Cookies Set During the Server's Opening Handshake_. **]** 4.2. Server-Side Requirements Servers MAY offload the management of the connection to other agents on the network, for example, load balancers and reverse proxies. In such a situation, the server for the purposes of this specification is considered to include all parts of the server-side infrastructure from the first device to terminate the TCP connection all the way to the server that processes requests and sends responses. EXAMPLE: A data center might have a server that responds to WebSocket requests with an appropriate handshake and then passes the connection to another server to actually process the data frames. For the purposes of this specification, the "server" is the combination of both computers. 4.2.1. Reading the Client's Opening Handshake When a client starts a WebSocket connection, it sends its part of the opening handshake. The server must parse at least part of this handshake in order to obtain the necessary information to generate the server part of the handshake. The client's opening handshake consists of the following parts. If the server, while reading the handshake, finds that the client did not send a handshake that matches the description below (note that as per [RFC2616], the order of the header fields is not important), including but not limited to any violations of the ABNF grammar specified for the components of the handshake, the server MUST stop processing the client's handshake and return an HTTP response with an appropriate error code (such as 400 Bad Request). 1. An HTTP/1.1 or higher GET request, including a "Request-URI" [RFC2616] that should be interpreted as a /resource name/ defined in Section 3 (or an absolute HTTP/HTTPS URI containing the /resource name/). 2. A |Host| header field containing the server's authority. 3. An |Upgrade| header field containing the value "websocket", treated as an ASCII case-insensitive value. 4. A |Connection| header field that includes the token "Upgrade", treated as an ASCII case-insensitive value. 5. A |Sec-WebSocket-Key| header field with a base64-encoded (see Section 4 of [RFC4648]) value that, when decoded, is 16 bytes in length. 6. A |Sec-WebSocket-Version| header field, with a value of 13. 7. Optionally, an |Origin| header field. This header field is sent by all browser clients. A connection attempt lacking this header field SHOULD NOT be interpreted as coming from a browser client. 8. Optionally, a |Sec-WebSocket-Protocol| header field, with a list of values indicating which protocols the client would like to speak, ordered by preference. 9. Optionally, a |Sec-WebSocket-Extensions| header field, with a list of values indicating which extensions the client would like to speak. The interpretation of this header field is discussed in Section 9.1. 10. Optionally, other header fields, such as those used to send cookies or request authentication to a server. Unknown header fields are ignored, as per [RFC2616]. 4.2.2. Sending the Server's Opening Handshake When a client establishes a WebSocket connection to a server, the server MUST complete the following steps to accept the connection and send the server's opening handshake. 1. If the connection is happening on an HTTPS (HTTP-over-TLS) port, perform a TLS handshake over the connection. If this fails (e.g., the client indicated a host name in the extended client hello "server_name" extension that the server does not host), then close the connection; otherwise, all further communication for the connection (including the server's handshake) MUST run through the encrypted tunnel [RFC5246]. 2. The server can perform additional client authentication, for example, by returning a 401 status code with the corresponding |WWW-Authenticate| header field as described in [RFC2616]. 3. The server MAY redirect the client using a 3xx status code [RFC2616]. Note that this step can happen together with, before, or after the optional authentication step described above. 4. Establish the following information: /origin/ The |Origin| header field in the client's handshake indicates the origin of the script establishing the connection. The origin is serialized to ASCII and converted to lowercase. The server MAY use this information as part of a determination of whether to accept the incoming connection. If the server does not validate the origin, it will accept connections from anywhere. If the server does not wish to accept this connection, it MUST return an appropriate HTTP error code (e.g., 403 Forbidden) and abort the WebSocket handshake described in this section. For more detail, refer to Section 10. /key/ The |Sec-WebSocket-Key| header field in the client's handshake includes a base64-encoded value that, if decoded, is 16 bytes in length. This (encoded) value is used in the creation of the server's handshake to indicate an acceptance of the connection. It is not necessary for the server to base64-decode the |Sec-WebSocket-Key| value. /version/ The |Sec-WebSocket-Version| header field in the client's handshake includes the version of the WebSocket Protocol with which the client is attempting to communicate. If this version does not match a version understood by the server, the server MUST abort the WebSocket handshake described in this section and instead send an appropriate HTTP error code (such as 426 Upgrade Required) and a |Sec-WebSocket-Version| header field indicating the version(s) the server is capable of understanding. /resource name/ An identifier for the service provided by the server. If the server provides multiple services, then the value should be derived from the resource name given in the client's handshake in the "Request-URI" [RFC2616] of the GET method. If the requested service is not available, the server MUST send an appropriate HTTP error code (such as 404 Not Found) and abort the WebSocket handshake. /subprotocol/ Either a single value representing the subprotocol the server is ready to use or null. The value chosen MUST be derived from the client's handshake, specifically by selecting one of the values from the |Sec-WebSocket-Protocol| field that the server is willing to use for this connection (if any). If the client's handshake did not contain such a header field or if the server does not agree to any of the client's requested subprotocols, the only acceptable value is null. The absence of such a field is equivalent to the null value (meaning that if the server does not wish to agree to one of the suggested subprotocols, it MUST NOT send back a |Sec-WebSocket-Protocol| header field in its response). The empty string is not the same as the null value for these purposes and is not a legal value for this field. The ABNF for the value of this header field is (token), where the definitions of constructs and rules are as given in [RFC2616]. /extensions/ A (possibly empty) list representing the protocol-level extensions the server is ready to use. If the server supports multiple extensions, then the value MUST be derived from the client's handshake, specifically by selecting one or more of the values from the |Sec-WebSocket-Extensions| field. The absence of such a field is equivalent to the null value. The empty string is not the same as the null value for these purposes. Extensions not listed by the client MUST NOT be listed. The method by which these values should be selected and interpreted is discussed in Section 9.1. 5. If the server chooses to accept the incoming connection, it MUST reply with a valid HTTP response indicating the following. 1. XX**SRS_UWS_CLIENT_01_478: [** A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. **]** Such a response could look like "HTTP/1.1 101 Switching Protocols". 2. **SRS_UWS_CLIENT_01_479: [** An |Upgrade| header field with value "websocket" as per RFC 2616 [RFC2616]. **]** 3. **SRS_UWS_CLIENT_01_480: [** A |Connection| header field with value "Upgrade". **]** 4. **SRS_UWS_CLIENT_01_481: [** A |Sec-WebSocket-Accept| header field. **]** **SRS_UWS_CLIENT_01_482: [** The value of this header field is constructed by concatenating /key/, defined above in step 4 in Section 4.2.2, with the string "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" **]**, **SRS_UWS_CLIENT_01_483: [** taking the SHA-1 hash of this concatenated value to obtain a 20-byte value **]** **SRS_UWS_CLIENT_01_484: [** and base64-encoding (see Section 4 of [RFC4648]) this 20-byte hash. **]** The ABNF [RFC2616] of this header field is defined as follows: Sec-WebSocket-Accept = base64-value-non-empty base64-value-non-empty = (1*base64-data [ base64-padding ]) | base64-padding base64-data = 4base64-character base64-padding = (2base64-character "==") | (3base64-character "=") base64-character = ALPHA | DIGIT | "+" | "/" NOTE: As an example, if the value of the |Sec-WebSocket-Key| header field in the client's handshake were "dGhlIHNhbXBsZSBub25jZQ==", the server would append the string "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" to form the string "dGhlIHNhbXBsZSBub25jZQ==258EAFA5-E914-47DA-95CA-C5AB0DC85B11". The server would then take the SHA-1 hash of this string, giving the value 0xb3 0x7a 0x4f 0x2c 0xc0 0x62 0x4f 0x16 0x90 0xf6 0x46 0x06 0xcf 0x38 0x59 0x45 0xb2 0xbe 0xc4 0xea. This value is then base64-encoded, to give the value "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=", which would be returned in the |Sec-WebSocket-Accept| header field. 5. **SRS_UWS_CLIENT_01_485: [** Optionally, a |Sec-WebSocket-Protocol| header field, with a value /subprotocol/ as defined in step 4 in Section 4.2.2. **]** 6. **SRS_UWS_CLIENT_01_486: [** Optionally, a |Sec-WebSocket-Extensions| header field, with a value /extensions/ as defined in step 4 in Section 4.2.2. **]** **SRS_UWS_CLIENT_01_487: [** If multiple extensions are to be used, they can all be listed in a single |Sec-WebSocket-Extensions| header field or split between multiple instances of the |Sec-WebSocket-Extensions| header field. **]** This completes the server's handshake. If the server finishes these steps without aborting the WebSocket handshake, the server considers the WebSocket connection to be established and that the WebSocket connection is in the OPEN state. At this point, the server may begin sending (and receiving) data. 4.3. Collected ABNF for New Header Fields Used in Handshake This section is using ABNF syntax/rules from Section 2.1 of [RFC2616], including the "implied *LWS rule". Note that the following ABNF conventions are used in this section. Some names of the rules correspond to names of the corresponding header fields. Such rules express values of the corresponding header fields, for example, the Sec-WebSocket-Key ABNF rule describes syntax of the |Sec-WebSocket-Key| header field value. ABNF rules with the "-Client" suffix in the name are only used in requests sent by the client to the server; ABNF rules with the "-Server" suffix in the name are only used in responses sent by the server to the client. For example, the ABNF rule Sec-WebSocket-Protocol-Client describes syntax of the |Sec-WebSocket-Protocol| header field value sent by the client to the server. The following new header fields can be sent during the handshake from the client to the server: Sec-WebSocket-Key = base64-value-non-empty Sec-WebSocket-Extensions = extension-list Sec-WebSocket-Protocol-Client = 1#token Sec-WebSocket-Version-Client = version base64-value-non-empty = (1*base64-data [ base64-padding ]) | base64-padding base64-data = 4base64-character base64-padding = (2base64-character "==") | (3base64-character "=") base64-character = ALPHA | DIGIT | "+" | "/" extension-list = 1#extension extension = extension-token *( ";" extension-param ) extension-token = registered-token registered-token = token extension-param = token [ "=" (token | quoted-string) ] ; When using the quoted-string syntax variant, the value ; after quoted-string unescaping MUST conform to the ; 'token' ABNF. NZDIGIT = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" version = DIGIT | (NZDIGIT DIGIT) | ("1" DIGIT DIGIT) | ("2" DIGIT DIGIT) ; Limited to 0-255 range, with no leading zeros The following new header fields can be sent during the handshake from the server to the client: **SRS_UWS_CLIENT_01_131: [** Sec-WebSocket-Extensions = extension-list **]** **SRS_UWS_CLIENT_01_132: [** Sec-WebSocket-Accept = base64-value-non-empty **]** **SRS_UWS_CLIENT_01_133: [** Sec-WebSocket-Protocol-Server = token **]** **SRS_UWS_CLIENT_01_134: [** Sec-WebSocket-Version-Server = 1#version **]** 4.4. Supporting Multiple Versions of WebSocket Protocol This section provides some guidance on supporting multiple versions of the WebSocket Protocol in clients and servers. **SRS_UWS_CLIENT_01_135: [** Using the WebSocket version advertisement capability (the |Sec-WebSocket-Version| header field), a client can initially request the version of the WebSocket Protocol that it prefers (which doesn't necessarily have to be the latest supported by the client). **]** **SRS_UWS_CLIENT_01_136: [** If the server supports the requested version and the handshake message is otherwise valid, the server will accept that version. **]** **SRS_UWS_CLIENT_01_137: [** If the server doesn't support the requested version, it MUST respond with a |Sec-WebSocket-Version| header field (or multiple |Sec-WebSocket-Version| header fields) containing all versions it is willing to use. **]** **SRS_UWS_CLIENT_01_138: [** At this point, if the client supports one of the advertised versions, it can repeat the WebSocket handshake using a new version value. **]** The following example demonstrates version negotiation described above: GET /chat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade ... Sec-WebSocket-Version: 25 The response from the server might look as follows: HTTP/1.1 400 Bad Request ... Sec-WebSocket-Version: 13, 8, 7 Note that the last response from the server might also look like: HTTP/1.1 400 Bad Request ... Sec-WebSocket-Version: 13 Sec-WebSocket-Version: 8, 7 The client now repeats the handshake that conforms to version 13: GET /chat HTTP/1.1 Host: server.example.com Upgrade: websocket Connection: Upgrade ... Sec-WebSocket-Version: 13 5. Data Framing 5.1. Overview In the WebSocket Protocol, data is transmitted using a sequence of frames. XX**SRS_UWS_CLIENT_01_140: [** To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). **]** (Note that XX**SRS_UWS_CLIENT_01_141: [** masking is done whether or not the WebSocket Protocol is running over TLS. **]**) The server MUST close the connection upon receiving a frame that is not masked. In this case, a server MAY send a Close frame with a status code of 1002 (protocol error) as defined in Section 7.4.1. A server MUST NOT mask any frames that it sends to the client. XX**SRS_UWS_CLIENT_01_144: [** A client MUST close a connection if it detects a masked frame. **]** XX**SRS_UWS_CLIENT_01_145: [** In this case, it MAY use the status code 1002 (protocol error) as defined in Section 7.4.1. (These rules might be relaxed in a future specification.) **]** The base framing protocol defines a frame type with an opcode, a payload length, and designated locations for "Extension data" and "Application data", which together define the "Payload data". Certain bits and opcodes are reserved for future expansion of the protocol. XX**SRS_UWS_CLIENT_01_146: [** A data frame MAY be transmitted by either the client or the server at any time after opening handshake completion and before that endpoint has sent a Close frame (Section 5.5.1). **]** 5.2. Base Framing Protocol This wire format for the data transfer part is described by the ABNF [RFC5234] given in detail in this section. (Note that, unlike in other sections of this document, the ABNF in this section is operating on groups of bits. The length of each group of bits is indicated in a comment. When encoded on the wire, the most significant bit is the leftmost in the ABNF). A high-level overview of the framing is given in the following figure. In a case of conflict between the figure below and the ABNF specified later in this section, the figure is authoritative. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-------+-+-------------+-------------------------------+ |F|R|R|R| opcode|M| Payload len | Extended payload length | |I|S|S|S| (4) |A| (7) | (16/64) | |N|V|V|V| |S| | (if payload len==126/127) | | |1|2|3| |K| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | Extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | |Masking-key, if MASK set to 1 | +-------------------------------+-------------------------------+ | Masking-key (continued) | Payload Data | +-------------------------------- - - - - - - - - - - - - - - - + : Payload Data continued ... : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Payload Data continued ... | +---------------------------------------------------------------+ FIN: 1 bit X**SRS_UWS_CLIENT_01_147: [** Indicates that this is the final fragment in a message. **]** X**SRS_UWS_CLIENT_01_148: [** The first fragment MAY also be the final fragment. **]** RSV1, RSV2, RSV3: 1 bit each **SRS_UWS_CLIENT_01_149: [** MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. **]** **SRS_UWS_CLIENT_01_150: [** If a nonzero value is received and none of the negotiated extensions defines the meaning of such a nonzero value, the receiving endpoint MUST _Fail the WebSocket Connection_. **]** Opcode: 4 bits Defines the interpretation of the "Payload data". **SRS_UWS_CLIENT_01_151: [** If an unknown opcode is received, the receiving endpoint MUST _Fail the WebSocket Connection_. **]** The following values are defined. **SRS_UWS_CLIENT_01_152: [** * %x0 denotes a continuation frame **]** XX**SRS_UWS_CLIENT_01_153: [** * %x1 denotes a text frame **]** XX**SRS_UWS_CLIENT_01_154: [** * %x2 denotes a binary frame **]** **SRS_UWS_CLIENT_01_155: [** * %x3-7 are reserved for further non-control frames **]** XX**SRS_UWS_CLIENT_01_156: [** * %x8 denotes a connection close **]** XX**SRS_UWS_CLIENT_01_157: [** * %x9 denotes a ping **]** **SRS_UWS_CLIENT_01_158: [** * %xA denotes a pong **]** **SRS_UWS_CLIENT_01_159: [** * %xB-F are reserved for further control frames **]** Mask: 1 bit XX**SRS_UWS_CLIENT_01_160: [** Defines whether the "Payload data" is masked. **]** **SRS_UWS_CLIENT_01_161: [** If set to 1, a masking key is present in masking-key, and this is used to unmask the "Payload data" as per Section 5.3. **]** **SRS_UWS_CLIENT_01_162: [** All frames sent from client to server have this bit set to 1. **]** Payload length: 7 bits, 7+16 bits, or 7+64 bits XX**SRS_UWS_CLIENT_01_163: [** The length of the "Payload data", in bytes: **]** XX**SRS_UWS_CLIENT_01_164: [** if 0-125, that is the payload length. **]** XX**SRS_UWS_CLIENT_01_165: [** If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. **]** XX**SRS_UWS_CLIENT_01_166: [** If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. **]** XX**SRS_UWS_CLIENT_01_167: [** Multibyte length quantities are expressed in network byte order. **]** XX**SRS_UWS_CLIENT_01_168: [** Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. **]** XX**SRS_UWS_CLIENT_01_169: [** The payload length is the length of the "Extension data" + the length of the "Application data". **]** **SRS_UWS_CLIENT_01_170: [** The length of the "Extension data" may be zero, in which case the payload length is the length of the "Application data". **]** Masking-key: 0 or 4 bytes **SRS_UWS_CLIENT_01_171: [** All frames sent from the client to the server are masked by a 32-bit value that is contained within the frame. **]** **SRS_UWS_CLIENT_01_172: [** This field is present if the mask bit is set to 1 and is absent if the mask bit is set to 0. **]** See Section 5.3 for further information on client-to-server masking. Payload data: (x+y) bytes XX**SRS_UWS_CLIENT_01_173: [** The "Payload data" is defined as "Extension data" concatenated with "Application data". **]** Extension data: x bytes **SRS_UWS_CLIENT_01_174: [** The "Extension data" is 0 bytes unless an extension has been negotiated. **]** **SRS_UWS_CLIENT_01_175: [** Any extension MUST specify the length of the "Extension data", or how that length may be calculated, and how the extension use MUST be negotiated during the opening handshake. **]** **SRS_UWS_CLIENT_01_176: [** If present, the "Extension data" is included in the total payload length. **]** Application data: y bytes **SRS_UWS_CLIENT_01_177: [** Arbitrary "Application data", taking up the remainder of the frame after any "Extension data". **]** **SRS_UWS_CLIENT_01_178: [** The length of the "Application data" is equal to the payload length minus the length of the "Extension data". **]** The base framing protocol is formally defined by the following ABNF [RFC5234]. It is important to note that the representation of this data is binary, not ASCII characters. As such, a field with a length of 1 bit that takes values %x0 / %x1 is represented as a single bit whose value is 0 or 1, not a full byte (octet) that stands for the characters "0" or "1" in the ASCII encoding. A field with a length of 4 bits with values between %x0-F again is represented by 4 bits, again NOT by an ASCII character or full byte (octet) with these values. [RFC5234] does not specify a character encoding: "Rules resolve into a string of terminal values, sometimes called characters. In ABNF, a character is merely a non-negative integer. In certain contexts, a specific mapping (encoding) of values into a character set (such as ASCII) will be specified." Here, the specified encoding is a binary encoding where each terminal value is encoded in the specified number of bits, which varies for each field. ws-frame = frame-fin ; 1 bit in length frame-rsv1 ; 1 bit in length frame-rsv2 ; 1 bit in length frame-rsv3 ; 1 bit in length frame-opcode ; 4 bits in length frame-masked ; 1 bit in length frame-payload-length ; either 7, 7+16, ; or 7+64 bits in ; length [ frame-masking-key ] ; 32 bits in length frame-payload-data ; n*8 bits in ; length, where ; n >= 0 frame-fin = %x0 ; more frames of this message follow / %x1 ; final frame of this message ; 1 bit in length frame-rsv1 = %x0 / %x1 ; 1 bit in length, MUST be 0 unless ; negotiated otherwise frame-rsv2 = %x0 / %x1 ; 1 bit in length, MUST be 0 unless ; negotiated otherwise frame-rsv3 = %x0 / %x1 ; 1 bit in length, MUST be 0 unless ; negotiated otherwise frame-opcode = frame-opcode-non-control / frame-opcode-control / frame-opcode-cont frame-opcode-cont = %x0 ; frame continuation frame-opcode-non-control= %x1 ; text frame / %x2 ; binary frame / %x3-7 ; 4 bits in length, ; reserved for further non-control frames frame-opcode-control = %x8 ; connection close / %x9 ; ping / %xA ; pong / %xB-F ; reserved for further control ; frames ; 4 bits in length frame-masked = %x0 ; frame is not masked, no frame-masking-key / %x1 ; frame is masked, frame-masking-key present ; 1 bit in length frame-payload-length = ( %x00-7D ) / ( %x7E frame-payload-length-16 ) / ( %x7F frame-payload-length-63 ) ; 7, 7+16, or 7+64 bits in length, ; respectively frame-payload-length-16 = %x0000-FFFF ; 16 bits in length frame-payload-length-63 = %x0000000000000000-7FFFFFFFFFFFFFFF ; 64 bits in length frame-masking-key = 4( %x00-FF ) ; present only if frame-masked is 1 ; 32 bits in length frame-payload-data = (frame-masked-extension-data frame-masked-application-data) ; when frame-masked is 1 / (frame-unmasked-extension-data frame-unmasked-application-data) ; when frame-masked is 0 frame-masked-extension-data = *( %x00-FF ) ; reserved for future extensibility ; n*8 bits in length, where n >= 0 frame-masked-application-data = *( %x00-FF ) ; n*8 bits in length, where n >= 0 frame-unmasked-extension-data = *( %x00-FF ) ; reserved for future extensibility ; n*8 bits in length, where n >= 0 frame-unmasked-application-data = *( %x00-FF ) ; n*8 bits in length, where n >= 0 5.3. Client-to-Server Masking A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". The masking key is a 32-bit value chosen at random by the client. When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. The unpredictability of the masking key is essential to prevent authors of malicious applications from selecting the bytes that appear on the wire. RFC 4086 [RFC4086] discusses what entails a suitable source of entropy for security-sensitive applications. The masking does not affect the length of the "Payload data". To convert masked data into unmasked data, or vice versa, the following algorithm is applied. The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): j = i MOD 4 transformed-octet-i = original-octet-i XOR masking-key-octet-j The payload length, indicated in the framing as frame-payload-length, does NOT include the length of the masking key. It is the length of the "Payload data", e.g., the number of bytes following the masking key. 5.4. Fragmentation The primary purpose of fragmentation is to allow sending a message that is of unknown size when the message is started without having to buffer that message. If messages couldn't be fragmented, then an endpoint would have to buffer the entire message so its length could be counted before the first byte is sent. With fragmentation, a server or intermediary may choose a reasonable size buffer and, when the buffer is full, write a fragment to the network. A secondary use-case for fragmentation is for multiplexing, where it is not desirable for a large message on one logical channel to monopolize the output channel, so the multiplexing needs to be free to split the message into smaller fragments to better share the output channel. (Note that the multiplexing extension is not described in this document.) Unless specified otherwise by an extension, frames have no semantic meaning. An intermediary might coalesce and/or split frames, if no extensions were negotiated by the client and the server or if some extensions were negotiated, but the intermediary understood all the extensions negotiated and knows how to coalesce and/or split frames in the presence of these extensions. XX**SRS_UWS_CLIENT_01_211: [** One implication of this is that in absence of extensions, senders and receivers must not depend on the presence of specific frame boundaries. **]** The following rules apply to fragmentation: o **SRS_UWS_CLIENT_01_212: [** An unfragmented message consists of a single frame with the FIN bit set (Section 5.2) and an opcode other than 0. **]** o **SRS_UWS_CLIENT_01_213: [** A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. **]** A fragmented message is conceptually equivalent to a single larger message whose payload is equal to the concatenation of the payloads of the fragments in order; however, in the presence of extensions, this may not hold true as the extension defines the interpretation of the "Extension data" present. For instance, "Extension data" may only be present at the beginning of the first fragment and apply to subsequent fragments, or there may be "Extension data" present in each of the fragments that applies only to that particular fragment. In the absence of "Extension data", the following example demonstrates how fragmentation works. EXAMPLE: For a text message sent as three fragments, the first fragment would have an opcode of 0x1 and a FIN bit clear, the second fragment would have an opcode of 0x0 and a FIN bit clear, and the third fragment would have an opcode of 0x0 and a FIN bit that is set. o **SRS_UWS_CLIENT_01_214: [** Control frames (see Section 5.5) MAY be injected in the middle of a fragmented message. **]** **SRS_UWS_CLIENT_01_215: [** Control frames themselves MUST NOT be fragmented. **]** o **SRS_UWS_CLIENT_01_216: [** Message fragments MUST be delivered to the recipient in the order sent by the sender. **]** o **SRS_UWS_CLIENT_01_217: [** The fragments of one message MUST NOT be interleaved between the fragments of another message unless an extension has been negotiated that can interpret the interleaving. **]** o **SRS_UWS_CLIENT_01_218: [** An endpoint MUST be capable of handling control frames in the middle of a fragmented message. **]** o **SRS_UWS_CLIENT_01_219: [** A sender MAY create fragments of any size for non-control messages. **]** o **SRS_UWS_CLIENT_01_220: [** Clients and servers MUST support receiving both fragmented and unfragmented messages. **]** o As control frames cannot be fragmented, an intermediary MUST NOT attempt to change the fragmentation of a control frame. o An intermediary MUST NOT change the fragmentation of a message if any reserved bit values are used and the meaning of these values is not known to the intermediary. o An intermediary MUST NOT change the fragmentation of any message in the context of a connection where extensions have been negotiated and the intermediary is not aware of the semantics of the negotiated extensions. Similarly, an intermediary that didn't see the WebSocket handshake (and wasn't notified about its content) that resulted in a WebSocket connection MUST NOT change the fragmentation of any message of such connection. o **SRS_UWS_CLIENT_01_225: [** As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. **]** **SRS_UWS_CLIENT_01_226: [** Since control frames cannot be fragmented, the type for all fragments in a message MUST be either text, binary, or one of the reserved opcodes. **]** NOTE: If control frames could not be interjected, the latency of a ping, for example, would be very long if behind a large message. Hence, the requirement of handling control frames in the middle of a fragmented message. IMPLEMENTATION NOTE: **SRS_UWS_CLIENT_01_227: [** In the absence of any extension, a receiver doesn't have to buffer the whole frame in order to process it. **]** For example, if a streaming API is used, a part of a frame can be delivered to the application. However, note that this assumption might not hold true for all future WebSocket extensions. 5.5. Control Frames **SRS_UWS_CLIENT_01_228: [** Control frames are identified by opcodes where the most significant bit of the opcode is 1. **]** **SRS_UWS_CLIENT_01_229: [** Currently defined opcodes for control frames include 0x8 (Close), 0x9 (Ping), and 0xA (Pong). **]** **SRS_UWS_CLIENT_01_230: [** Opcodes 0xB-0xF are reserved for further control frames yet to be defined. **]** **SRS_UWS_CLIENT_01_231: [** Control frames are used to communicate state about the WebSocket. **]** **SRS_UWS_CLIENT_01_232: [** Control frames can be interjected in the middle of a fragmented message. **]** **SRS_UWS_CLIENT_01_233: [** All control frames MUST have a payload length of 125 bytes or less and MUST NOT be fragmented. **]** 5.5.1. Close XX**SRS_UWS_CLIENT_01_234: [** The Close frame contains an opcode of 0x8. **]** XX**SRS_UWS_CLIENT_01_235: [** The Close frame MAY contain a body (the "Application data" portion of the frame) that indicates a reason for closing, such as an endpoint shutting down, an endpoint having received a frame too large, or an endpoint having received a frame that does not conform to the format expected by the endpoint. **]** XX**SRS_UWS_CLIENT_01_236: [** If there is a body, the first two bytes of the body MUST be a 2-byte unsigned integer (in network byte order) representing a status code with value /code/ defined in Section 7.4. **]** XX**SRS_UWS_CLIENT_01_237: [** Following the 2-byte integer, the body MAY contain UTF-8-encoded data with value /reason/, the interpretation of which is not defined by this specification. **]** This data is not necessarily human readable but may be useful for debugging or passing information relevant to the script that opened the connection. XX**SRS_UWS_CLIENT_01_238: [** As the data is not guaranteed to be human readable, clients MUST NOT show it to end users. **]** XX**SRS_UWS_CLIENT_01_239: [** Close frames sent from client to server must be masked as per Section 5.3. **]** XX**SRS_UWS_CLIENT_01_240: [** The application MUST NOT send any more data frames after sending a Close frame. **]** XX**SRS_UWS_CLIENT_01_241: [** If an endpoint receives a Close frame and did not previously send a Close frame, the endpoint MUST send a Close frame in response. **]** **SRS_UWS_CLIENT_01_439: [** (When sending a Close frame in response, the endpoint typically echos the status code it received.) **]** XX**SRS_UWS_CLIENT_01_242: [** It SHOULD do so as soon as practical. **]** **SRS_UWS_CLIENT_01_243: [** An endpoint MAY delay sending a Close frame until its current message is sent (for instance, if the majority of a fragmented message is already sent, an endpoint MAY send the remaining fragments before sending a Close frame). **]** However, there is no guarantee that the endpoint that has already sent a Close frame will continue to process data. **SRS_UWS_CLIENT_01_244: [** After both sending and receiving a Close message, an endpoint considers the WebSocket connection closed and MUST close the underlying TCP connection. **]** The server MUST close the underlying TCP connection immediately; **SRS_UWS_CLIENT_01_245: [** the client SHOULD wait for the server to close the connection but MAY close the connection at any time after sending and receiving a Close message **]**, e.g., if it has not received a TCP Close from the server in a reasonable time period. If a client and server both send a Close message at the same time, both endpoints will have sent and received a Close message and should consider the WebSocket connection closed and close the underlying TCP connection. 5.5.2. Ping XX**SRS_UWS_CLIENT_01_247: [** The Ping frame contains an opcode of 0x9. **]** XX**SRS_UWS_CLIENT_01_248: [** A Ping frame MAY include "Application data". **]** XX**SRS_UWS_CLIENT_01_249: [** Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in response **]**, **SRS_UWS_CLIENT_01_438: [** unless it already received a Close frame. **]** XX**SRS_UWS_CLIENT_01_250: [** It SHOULD respond with Pong frame as soon as is practical. **]** Pong frames are discussed in Section 5.5.3. **SRS_UWS_CLIENT_01_251: [** An endpoint MAY send a Ping frame any time after the connection is established and before the connection is closed. **]** NOTE: A Ping frame may serve either as a keepalive or as a means to verify that the remote endpoint is still responsive. 5.5.3. Pong **SRS_UWS_CLIENT_01_252: [** The Pong frame contains an opcode of 0xA. **]** Section 5.5.2 details requirements that apply to both Ping and Pong frames. XX**SRS_UWS_CLIENT_01_253: [** A Pong frame sent in response to a Ping frame must have identical "Application data" as found in the message body of the Ping frame being replied to. **]** XX**SRS_UWS_CLIENT_01_254: [** If an endpoint receives a Ping frame and has not yet sent Pong frame(s) in response to previous Ping frame(s), the endpoint MAY elect to send a Pong frame for only the most recently processed Ping frame. **]** XX**SRS_UWS_CLIENT_01_255: [** A Pong frame MAY be sent unsolicited. **]** This serves as a unidirectional heartbeat. XX**SRS_UWS_CLIENT_01_256: [** A response to an unsolicited Pong frame is not expected. **]** 5.6. Data Frames **SRS_UWS_CLIENT_01_257: [** Data frames (e.g., non-control frames) are identified by opcodes where the most significant bit of the opcode is 0. **]** XX**SRS_UWS_CLIENT_01_258: [** Currently defined opcodes for data frames include 0x1 (Text), 0x2 (Binary). **]** **SRS_UWS_CLIENT_01_259: [** Opcodes 0x3-0x7 are reserved for further non-control frames yet to be defined. **]** Data frames carry application-layer and/or extension-layer data. **SRS_UWS_CLIENT_01_260: [** The opcode determines the interpretation of the data: **]** Text **SRS_UWS_CLIENT_01_261: [** The "Payload data" is text data encoded as UTF-8. **]** Note that **SRS_UWS_CLIENT_01_262: [** a particular text frame might include a partial UTF-8 sequence; however, the whole message MUST contain valid UTF-8. **]** **SRS_UWS_CLIENT_01_263: [** Invalid UTF-8 in reassembled messages is handled as described in Section 8.1. **]** Binary XX**SRS_UWS_CLIENT_01_264: [** The "Payload data" is arbitrary binary data whose interpretation is solely up to the application layer. **]** 5.7. Examples o A single-frame unmasked text message * 0x81 0x05 0x48 0x65 0x6c 0x6c 0x6f (contains "Hello") o A single-frame masked text message * 0x81 0x85 0x37 0xfa 0x21 0x3d 0x7f 0x9f 0x4d 0x51 0x58 (contains "Hello") o A fragmented unmasked text message * 0x01 0x03 0x48 0x65 0x6c (contains "Hel") * 0x80 0x02 0x6c 0x6f (contains "lo") o Unmasked Ping request and masked Ping response * 0x89 0x05 0x48 0x65 0x6c 0x6c 0x6f (contains a body of "Hello", but the contents of the body are arbitrary) * 0x8a 0x85 0x37 0xfa 0x21 0x3d 0x7f 0x9f 0x4d 0x51 0x58 (contains a body of "Hello", matching the body of the ping) o 256 bytes binary message in a single unmasked frame * 0x82 0x7E 0x0100 [256 bytes of binary data] o 64KiB binary message in a single unmasked frame * 0x82 0x7F 0x0000000000010000 [65536 bytes of binary data] 5.8. Extensibility The protocol is designed to allow for extensions, which will add capabilities to the base protocol. **SRS_UWS_CLIENT_01_265: [** The endpoints of a connection MUST negotiate the use of any extensions during the opening handshake. **]** **SRS_UWS_CLIENT_01_266: [** This specification provides opcodes 0x3 through 0x7 and 0xB through 0xF, the "Extension data" field, and the frame-rsv1, frame-rsv2, and frame-rsv3 bits of the frame header for use by extensions. **]** The negotiation of extensions is discussed in further detail in Section 9.1. Below are some anticipated uses of extensions. This list is neither complete nor prescriptive. o "Extension data" may be placed in the "Payload data" before the "Application data". o Reserved bits can be allocated for per-frame needs. o Reserved opcode values can be defined. o Reserved bits can be allocated to the opcode field if more opcode values are needed. o A reserved bit or an "extension" opcode can be defined that allocates additional bits out of the "Payload data" to define larger opcodes or more per-frame bits. 6. Sending and Receiving Data 6.1. Sending Data To _Send a WebSocket Message_ comprising of /data/ over a WebSocket connection, an endpoint MUST perform the following steps. 1. XX**SRS_UWS_CLIENT_01_268: [** The endpoint MUST ensure the WebSocket connection is in the OPEN state **]** (cf. Sections 4.1 and 4.2.2.) XX**SRS_UWS_CLIENT_01_269: [** If at any point the state of the WebSocket connection changes, the endpoint MUST abort the following steps. **]** 2. XX**SRS_UWS_CLIENT_01_270: [** An endpoint MUST encapsulate the /data/ in a WebSocket frame as defined in Section 5.2. **]** **SRS_UWS_CLIENT_01_271: [** If the data to be sent is large or if the data is not available in its entirety at the point the endpoint wishes to begin sending the data, the endpoint MAY alternately encapsulate the data in a series of frames as defined in Section 5.4. **]** 3. XX**SRS_UWS_CLIENT_01_272: [** The opcode (frame-opcode) of the first frame containing the data MUST be set to the appropriate value from Section 5.2 for data that is to be interpreted by the recipient as text or binary data. **]** 4. **SRS_UWS_CLIENT_01_273: [** The FIN bit (frame-fin) of the last frame containing the data MUST be set to 1 as defined in Section 5.2. **]** 5. XX**SRS_UWS_CLIENT_01_274: [** If the data is being sent by the client, the frame(s) MUST be masked as defined in Section 5.3. **]** 6. **SRS_UWS_CLIENT_01_275: [** If any extensions (Section 9) have been negotiated for the WebSocket connection, additional considerations may apply as per the definition of those extensions. **]** 7. XX**SRS_UWS_CLIENT_01_276: [** The frame(s) that have been formed MUST be transmitted over the underlying network connection. **]** 6.2. Receiving Data XX**SRS_UWS_CLIENT_01_277: [** To receive WebSocket data, an endpoint listens on the underlying network connection. **]** XX**SRS_UWS_CLIENT_01_278: [** Incoming data MUST be parsed as WebSocket frames as defined in Section 5.2. **]** **SRS_UWS_CLIENT_01_279: [** If a control frame (Section 5.5) is received, the frame MUST be handled as defined by Section 5.5. **]** XX**SRS_UWS_CLIENT_01_280: [** Upon receiving a data frame (Section 5.6), the endpoint MUST note the /type/ of the data as defined by the opcode (frame-opcode) from Section 5.2. **]** XX**SRS_UWS_CLIENT_01_281: [** The "Application data" from this frame is defined as the /data/ of the message. **]** XX**SRS_UWS_CLIENT_01_282: [** If the frame comprises an unfragmented message (Section 5.4), it is said that _A WebSocket Message Has Been Received_ with type /type/ and data /data/. **]** **SRS_UWS_CLIENT_01_283: [** If the frame is part of a fragmented message, the "Application data" of the subsequent data frames is concatenated to form the /data/. **]** **SRS_UWS_CLIENT_01_284: [** When the last fragment is received as indicated by the FIN bit (frame-fin), it is said that _A WebSocket Message Has Been Received_ with data /data/ (comprised of the concatenation of the "Application data" of the fragments) and type /type/ (noted from the first frame of the fragmented message). **]** **SRS_UWS_CLIENT_01_285: [** Subsequent data frames MUST be interpreted as belonging to a new WebSocket message. **]** **SRS_UWS_CLIENT_01_286: [** Extensions (Section 9) MAY change the semantics of how data is read, specifically including what comprises a message boundary. **]** **SRS_UWS_CLIENT_01_287: [** Extensions, in addition to adding "Extension data" before the "Application data" in a payload, MAY also modify the "Application data" (such as by compressing it). **]** A server MUST remove masking for data frames received from a client as described in Section 5.3. 7. Closing the Connection 7.1. Definitions 7.1.1. Close the WebSocket Connection XX**SRS_UWS_CLIENT_01_288: [** To _Close the WebSocket Connection_, an endpoint closes the underlying TCP connection. **]** XX**SRS_UWS_CLIENT_01_289: [** An endpoint SHOULD use a method that cleanly closes the TCP connection, as well as the TLS session, if applicable, discarding any trailing bytes that may have been received. **]** XX**SRS_UWS_CLIENT_01_290: [** An endpoint MAY close the connection via any means available when necessary, such as when under attack. **]** **SRS_UWS_CLIENT_01_291: [** The underlying TCP connection, in most normal cases, SHOULD be closed first by the server **]**, so that it holds the TIME_WAIT state and not the client (as this would prevent it from re-opening the connection for 2 maximum segment lifetimes (2MSL), while there is no corresponding server impact as a TIME_WAIT connection is immediately reopened upon a new SYN with a higher seq number). **SRS_UWS_CLIENT_01_292: [** In abnormal cases (such as not having received a TCP Close from the server after a reasonable amount of time) a client MAY initiate the TCP Close. **]** As such, when a server is instructed to _Close the WebSocket Connection_ it SHOULD initiate a TCP Close immediately, and **SRS_UWS_CLIENT_01_293: [** when a client is instructed to do the same, it SHOULD wait for a TCP Close from the server. **]** As an example of how to obtain a clean closure in C using Berkeley sockets, one would call shutdown() with SHUT_WR on the socket, call recv() until obtaining a return value of 0 indicating that the peer has also performed an orderly shutdown, and finally call close() on the socket. 7.1.2. Start the WebSocket Closing Handshake **SRS_UWS_CLIENT_01_294: [** To _Start the WebSocket Closing Handshake_ with a status code (Section 7.4) /code/ and an optional close reason (Section 7.1.6) /reason/, an endpoint MUST send a Close control frame, as described in Section 5.5.1, whose status code is set to /code/ and whose close reason is set to /reason/. **]** **SRS_UWS_CLIENT_01_295: [** Once an endpoint has both sent and received a Close control frame, that endpoint SHOULD _Close the WebSocket Connection_ as defined in Section 7.1.1. **]** 7.1.3. The WebSocket Closing Handshake is Started XX**SRS_UWS_CLIENT_01_296: [** Upon either sending or receiving a Close control frame, it is said that _The WebSocket Closing Handshake is Started_ and that the WebSocket connection is in the CLOSING state. **]** 7.1.4. The WebSocket Connection is Closed **SRS_UWS_CLIENT_01_297: [** When the underlying TCP connection is closed, it is said that _The WebSocket Connection is Closed_ and that the WebSocket connection is in the CLOSED state. **]** **SRS_UWS_CLIENT_01_298: [** If the TCP connection was closed after the WebSocket closing handshake was completed, the WebSocket connection is said to have been closed _cleanly_. **]** **SRS_UWS_CLIENT_01_299: [** If the WebSocket connection could not be established, it is also said that _The WebSocket Connection is Closed_, but not _cleanly_. **]** 7.1.5. The WebSocket Connection Close Code **SRS_UWS_CLIENT_01_300: [** As defined in Sections 5.5.1 and 7.4, a Close control frame may contain a status code indicating a reason for closure. **]** **SRS_UWS_CLIENT_01_301: [** A closing of the WebSocket connection may be initiated by either endpoint, potentially simultaneously. **]** **SRS_UWS_CLIENT_01_302: [** _The WebSocket Connection Close Code_ is defined as the status code (Section 7.4) contained in the first Close control frame received by the application implementing this protocol. **]** **SRS_UWS_CLIENT_01_303: [** If this Close control frame contains no status code, _The WebSocket Connection Close Code_ is considered to be 1005. **]** **SRS_UWS_CLIENT_01_304: [** If _The WebSocket Connection is Closed_ and no Close control frame was received by the endpoint (such as could occur if the underlying transport connection is lost), _The WebSocket Connection Close Code_ is considered to be 1006. **]** NOTE: Two endpoints may not agree on the value of _The WebSocket Connection Close Code_. As an example, if the remote endpoint sent a Close frame but the local application has not yet read the data containing the Close frame from its socket's receive buffer, and the local application independently decided to close the connection and send a Close frame, both endpoints will have sent and received a Close frame and will not send further Close frames. Each endpoint will see the status code sent by the other end as _The WebSocket Connection Close Code_. As such, it is possible that the two endpoints may not agree on the value of _The WebSocket Connection Close Code_ in the case that both endpoints _Start the WebSocket Closing Handshake_ independently and at roughly the same time. 7.1.6. The WebSocket Connection Close Reason **SRS_UWS_CLIENT_01_305: [** As defined in Sections 5.5.1 and 7.4, a Close control frame may contain a status code indicating a reason for closure, followed by UTF-8-encoded data, the interpretation of said data being left to the endpoints and not defined by this protocol. **]** **SRS_UWS_CLIENT_01_308: [** A closing of the WebSocket connection may be initiated by either endpoint, potentially simultaneously. **]** **SRS_UWS_CLIENT_01_307: [** _The WebSocket Connection Close Reason_ is defined as the UTF-8-encoded data following the status code (Section 7.4) contained in the first Close control frame received by the application implementing this protocol. **]** **SRS_UWS_CLIENT_01_306: [** If there is no such data in the Close control frame, _The WebSocket Connection Close Reason_ is the empty string. **]** NOTE: Following the same logic as noted in Section 7.1.5, two endpoints may not agree on _The WebSocket Connection Close Reason_. 7.1.7. Fail the WebSocket Connection Certain algorithms and specifications require an endpoint to _Fail the WebSocket Connection_. **SRS_UWS_CLIENT_01_309: [** To do so, the client MUST _Close the WebSocket Connection_, and MAY report the problem to the user (which would be especially useful for developers) in an appropriate manner. **]** Similarly, to do so, the server MUST _Close the WebSocket Connection_, and SHOULD log the problem. **SRS_UWS_CLIENT_01_310: [** If _The WebSocket Connection is Established_ prior to the point where the endpoint is required to _Fail the WebSocket Connection_, the endpoint SHOULD send a Close frame with an appropriate status code (Section 7.4) before proceeding to _Close the WebSocket Connection_. **]** **SRS_UWS_CLIENT_01_311: [** An endpoint MAY omit sending a Close frame if it believes the other side is unlikely to be able to receive and process the Close frame, due to the nature of the error that led the WebSocket connection to fail in the first place. **]** **SRS_UWS_CLIENT_01_312: [** An endpoint MUST NOT continue to attempt to process data (including a responding Close frame) from the remote endpoint after being instructed to _Fail the WebSocket Connection_. **]** Except as indicated above or as specified by the application layer (e.g., a script using the WebSocket API), clients SHOULD NOT close the connection. 7.2. Abnormal Closures 7.2.1. Client-Initiated Closure **SRS_UWS_CLIENT_01_313: [** Certain algorithms, in particular during the opening handshake, require the client to _Fail the WebSocket Connection_. **]** **SRS_UWS_CLIENT_01_314: [** To do so, the client MUST _Fail the WebSocket Connection_ as defined in Section 7.1.7. **]** **SRS_UWS_CLIENT_01_315: [** If at any point the underlying transport layer connection is unexpectedly lost, the client MUST _Fail the WebSocket Connection_. **]** **SRS_UWS_CLIENT_01_316: [** Except as indicated above or as specified by the application layer (e.g., a script using the WebSocket API), clients SHOULD NOT close the connection. **]** 7.2.2. Server-Initiated Closure Certain algorithms require or recommend that the server _Abort the WebSocket Connection_ during the opening handshake. To do so, the server MUST simply _Close the WebSocket Connection_ (Section 7.1.1). 7.2.3. Recovering from Abnormal Closure Abnormal closures may be caused by any number of reasons. Such closures could be the result of a transient error, in which case reconnecting may lead to a good connection and a resumption of normal operations. Such closures may also be the result of a nontransient problem, in which case if each deployed client experiences an abnormal closure and immediately and persistently tries to reconnect, the server may experience what amounts to a denial-of-service attack by a large number of clients trying to reconnect. The end result of such a scenario could be that the service is unable to recover in a timely manner or recovery is made much more difficult. To prevent this, clients SHOULD use some form of backoff when trying to reconnect after abnormal closures as described in this section. The first reconnect attempt SHOULD be delayed by a random amount of time. The parameters by which this random delay is chosen are left to the client to decide; a value chosen randomly between 0 and 5 seconds is a reasonable initial delay though clients MAY choose a different interval from which to select a delay length based on implementation experience and particular application. Should the first reconnect attempt fail, subsequent reconnect attempts SHOULD be delayed by increasingly longer amounts of time, using a method such as truncated binary exponential backoff. 7.3. Normal Closure of Connections XX**SRS_UWS_CLIENT_01_318: [** Servers MAY close the WebSocket connection whenever desired. **]** XX**SRS_UWS_CLIENT_01_317: [** Clients SHOULD NOT close the WebSocket connection arbitrarily. **]** **SRS_UWS_CLIENT_01_319: [** In either case, an endpoint initiates a closure by following the procedures to _Start the WebSocket Closing Handshake_ (Section 7.1.2). **]** 7.4. Status Codes **SRS_UWS_CLIENT_01_320: [** When closing an established connection (e.g., when sending a Close frame, after the opening handshake has completed), an endpoint MAY indicate a reason for closure. **]** **SRS_UWS_CLIENT_01_321: [** The interpretation of this reason by an endpoint, and the action an endpoint should take given this reason, are left undefined by this specification. **]** **SRS_UWS_CLIENT_01_322: [** This specification defines a set of pre-defined status codes and specifies which ranges may be used by extensions, frameworks, and end applications. **]** **SRS_UWS_CLIENT_01_323: [** The status code and any associated textual message are optional components of a Close frame. **]** 7.4.1. Defined Status Codes Endpoints MAY use the following pre-defined status codes when sending a Close frame. 1000 XX**SRS_UWS_CLIENT_01_324: [** 1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled. **]** 1001 XX**SRS_UWS_CLIENT_01_325: [** 1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page. **]** 1002 XX**SRS_UWS_CLIENT_01_326: [** 1002 indicates that an endpoint is terminating the connection due to a protocol error. **]** 1003 XX**SRS_UWS_CLIENT_01_327: [** 1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message). **]** 1004 XX**SRS_UWS_CLIENT_01_328: [** Reserved. The specific meaning might be defined in the future. **]** 1005 XX**SRS_UWS_CLIENT_01_329: [** 1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. **]** It is designated for use in applications expecting a status code to indicate that no status code was actually present. 1006 XX**SRS_UWS_CLIENT_01_330: [** 1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. **]** It is designated for use in applications expecting a status code to indicate that the connection was closed abnormally, e.g., without sending or receiving a Close control frame. 1007 XX**SRS_UWS_CLIENT_01_331: [** 1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message). **]** 1008 XX**SRS_UWS_CLIENT_01_332: [** 1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy. **]** This is a generic status code that can be returned when there is no other more suitable status code (e.g., 1003 or 1009) or if there is a need to hide specific details about the policy. 1009 XX**SRS_UWS_CLIENT_01_333: [** 1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process. **]** 1010 XX**SRS_UWS_CLIENT_01_334: [** 1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. **]** **SRS_UWS_CLIENT_01_335: [** The list of extensions that are needed SHOULD appear in the /reason/ part of the Close frame. **]** Note that this status code is not used by the server, because it can fail the WebSocket handshake instead. 1011 XX**SRS_UWS_CLIENT_01_336: [** 1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request. **]** 1015 XX**SRS_UWS_CLIENT_01_337: [** 1015 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. **]** It is designated for use in applications expecting a status code to indicate that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified). 7.4.2. Reserved Status Code Ranges 0-999 Status codes in the range 0-999 are not used. 1000-2999 Status codes in the range 1000-2999 are reserved for definition by this protocol, its future revisions, and extensions specified in a permanent and readily available public specification. 3000-3999 Status codes in the range 3000-3999 are reserved for use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by this protocol. 4000-4999 Status codes in the range 4000-4999 are reserved for private use and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by this protocol. 8. Error Handling 8.1. Handling Errors in UTF-8-Encoded Data **SRS_UWS_CLIENT_01_342: [** When an endpoint is to interpret a byte stream as UTF-8 but finds that the byte stream is not, in fact, a valid UTF-8 stream, that endpoint MUST _Fail the WebSocket Connection_. **]** **SRS_UWS_CLIENT_01_343: [** This rule applies both during the opening handshake and during subsequent data exchange. **]** 9. Extensions **SRS_UWS_CLIENT_01_344: [** WebSocket clients MAY request extensions to this specification, and WebSocket servers MAY accept some or all extensions requested by the client. **]** **SRS_UWS_CLIENT_01_345: [** A server MUST NOT respond with any extension not requested by the client. **]** **SRS_UWS_CLIENT_01_346: [** If extension parameters are included in negotiations between the client and the server, those parameters MUST be chosen in accordance with the specification of the extension to which the parameters apply. **]** 9.1. Negotiating Extensions **SRS_UWS_CLIENT_01_347: [** A client requests extensions by including a |Sec-WebSocket-Extensions| header field, which follows the normal rules for HTTP header fields (see [RFC2616], Section 4.2) and the value of the header field is defined by the following ABNF [RFC2616]. **]** Note that this section is using ABNF syntax/rules from [RFC2616], including the "implied *LWS rule". **SRS_UWS_CLIENT_01_348: [** If a value is received by either the client or the server during negotiation that does not conform to the ABNF below, the recipient of such malformed data MUST immediately _Fail the WebSocket Connection_. **]** Sec-WebSocket-Extensions = extension-list extension-list = 1#extension extension = extension-token *( ";" extension-param ) extension-token = registered-token registered-token = token extension-param = token [ "=" (token | quoted-string) ] ;When using the quoted-string syntax variant, the value ;after quoted-string unescaping MUST conform to the ;'token' ABNF. **SRS_UWS_CLIENT_01_349: [** Note that like other HTTP header fields, this header field MAY be split or combined across multiple lines. **]** Ergo, the following are equivalent: Sec-WebSocket-Extensions: foo Sec-WebSocket-Extensions: bar; baz=2 is exactly equivalent to Sec-WebSocket-Extensions: foo, bar; baz=2 **SRS_UWS_CLIENT_01_350: [** Any extension-token used MUST be a registered token (see Section 11.4). **]** **SRS_UWS_CLIENT_01_351: [** The parameters supplied with any given extension MUST be defined for that extension. **]** **SRS_UWS_CLIENT_01_352: [** Note that the client is only offering to use any advertised extensions and MUST NOT use them unless the server indicates that it wishes to use the extension. **]** **SRS_UWS_CLIENT_01_353: [** Note that the order of extensions is significant. **]** Any interactions between multiple extensions MAY be defined in the documents defining the extensions. **SRS_UWS_CLIENT_01_354: [** In the absence of such definitions, the interpretation is that the header fields listed by the client in its request represent a preference of the header fields it wishes to use, with the first options listed being most preferable. **]** **SRS_UWS_CLIENT_01_355: [** The extensions listed by the server in response represent the extensions actually in use for the connection. **]** **SRS_UWS_CLIENT_01_356: [** Should the extensions modify the data and/or framing, the order of operations on the data should be assumed to be the same as the order in which the extensions are listed in the server's response in the opening handshake. **]** For example, if there are two extensions "foo" and "bar" and if the header field |Sec-WebSocket-Extensions| sent by the server has the value "foo, bar", then operations on the data will be made as bar(foo(data)), be those changes to the data itself (such as compression) or changes to the framing that may "stack". Non-normative examples of acceptable extension header fields (note that long lines are folded for readability): Sec-WebSocket-Extensions: deflate-stream Sec-WebSocket-Extensions: mux; max-channels=4; flow-control, deflate-stream Sec-WebSocket-Extensions: private-extension **SRS_UWS_CLIENT_01_357: [** A server accepts one or more extensions by including a |Sec-WebSocket-Extensions| header field containing one or more extensions that were requested by the client. **]** **SRS_UWS_CLIENT_01_358: [** The interpretation of any extension parameters, and what constitutes a valid response by a server to a requested set of parameters by a client, will be defined by each such extension. **]** 9.2. Known Extensions Extensions provide a mechanism for implementations to opt-in to additional protocol features. This document doesn't define any extension, but implementations MAY use extensions defined separately. 10. Security Considerations This section describes some security considerations applicable to the WebSocket Protocol. Specific security considerations are described in subsections of this section. 10.1. Non-Browser Clients The WebSocket Protocol protects against malicious JavaScript running inside a trusted application such as a web browser, for example, by checking of the |Origin| header field (see below). See Section 1.6 for additional details. Such assumptions don't hold true in the case of a more-capable client. While this protocol is intended to be used by scripts in web pages, it can also be used directly by hosts. Such hosts are acting on their own behalf and can therefore send fake |Origin| header fields, misleading the server. Servers should therefore be careful about assuming that they are talking directly to scripts from known origins and must consider that they might be accessed in unexpected ways. In particular, a server should not trust that any input is valid. EXAMPLE: If the server uses input as part of SQL queries, all input text should be escaped before being passed to the SQL server, lest the server be susceptible to SQL injection. 10.2. Origin Considerations Servers that are not intended to process input from any web page but only for certain sites SHOULD verify the |Origin| field is an origin they expect. If the origin indicated is unacceptable to the server, then it SHOULD respond to the WebSocket handshake with a reply containing HTTP 403 Forbidden status code. The |Origin| header field protects from the attack cases when the untrusted party is typically the author of a JavaScript application that is executing in the context of the trusted client. The client itself can contact the server and, via the mechanism of the |Origin| header field, determine whether to extend those communication privileges to the JavaScript application. The intent is not to prevent non-browsers from establishing connections but rather to ensure that trusted browsers under the control of potentially malicious JavaScript cannot fake a WebSocket handshake. 10.3. Attacks On Infrastructure (Masking) In addition to endpoints being the target of attacks via WebSockets, other parts of web infrastructure, such as proxies, may be the subject of an attack. As this protocol was being developed, an experiment was conducted to demonstrate a class of attacks on proxies that led to the poisoning of caching proxies deployed in the wild [TALKING]. The general form of the attack was to establish a connection to a server under the "attacker's" control, perform an UPGRADE on the HTTP connection similar to what the WebSocket Protocol does to establish a connection, and subsequently send data over that UPGRADEd connection that looked like a GET request for a specific known resource (which in an attack would likely be something like a widely deployed script for tracking hits or a resource on an ad-serving network). The remote server would respond with something that looked like a response to the fake GET request, and this response would be cached by a nonzero percentage of deployed intermediaries, thus poisoning the cache. The net effect of this attack would be that if a user could be convinced to visit a website the attacker controlled, the attacker could potentially poison the cache for that user and other users behind the same cache and run malicious script on other origins, compromising the web security model. To avoid such attacks on deployed intermediaries, it is not sufficient to prefix application-supplied data with framing that is not compliant with HTTP, as it is not possible to exhaustively discover and test that each nonconformant intermediary does not skip such non-HTTP framing and act incorrectly on the frame payload. Thus, the defense adopted is to mask all data from the client to the server, so that the remote script (attacker) does not have control over how the data being sent appears on the wire and thus cannot construct a message that could be misinterpreted by an intermediary as an HTTP request. Clients MUST choose a new masking key for each frame, using an algorithm that cannot be predicted by end applications that provide data. For example, each masking could be drawn from a cryptographically strong random number generator. If the same key is used or a decipherable pattern exists for how the next key is chosen, the attacker can send a message that, when masked, could appear to be an HTTP request (by taking the message the attacker wishes to see on the wire and masking it with the next masking key to be used, the masking key will effectively unmask the data when the client applies it). It is also necessary that once the transmission of a frame from a client has begun, the payload (application-supplied data) of that frame must not be capable of being modified by the application. Otherwise, an attacker could send a long frame where the initial data was a known value (such as all zeros), compute the masking key being used upon receipt of the first part of the data, and then modify the data that is yet to be sent in the frame to appear as an HTTP request when masked. (This is essentially the same problem described in the previous paragraph with using a known or predictable masking key.) If additional data is to be sent or data to be sent is somehow changed, that new or changed data must be sent in a new frame and thus with a new masking key. In short, once transmission of a frame begins, the contents must not be modifiable by the remote script (application). The threat model being protected against is one in which the client sends data that appears to be an HTTP request. As such, the channel that needs to be masked is the data from the client to the server. The data from the server to the client can be made to look like a response, but to accomplish this request, the client must also be able to forge a request. As such, it was not deemed necessary to mask data in both directions (the data from the server to the client is not masked). Despite the protection provided by masking, non-compliant HTTP proxies will still be vulnerable to poisoning attacks of this type by clients and servers that do not apply masking. 10.4. Implementation-Specific Limits **SRS_UWS_CLIENT_01_359: [** Implementations that have implementation- and/or platform-specific limitations regarding the frame size or total message size after reassembly from multiple frames MUST protect themselves against exceeding those limits. **]** (For example, a malicious endpoint can try to exhaust its peer's memory or mount a denial-of-service attack by sending either a single big frame (e.g., of size 2**60) or by sending a long stream of small frames that are a part of a fragmented message.) Such an implementation SHOULD impose a limit on frame sizes and the total message size after reassembly from multiple frames. 10.5. WebSocket Client Authentication This protocol doesn't prescribe any particular way that servers can authenticate clients during the WebSocket handshake. The WebSocket server can use any client authentication mechanism available to a generic HTTP server, such as cookies, HTTP authentication, or TLS authentication. 10.6. Connection Confidentiality and Integrity XX**SRS_UWS_CLIENT_01_360: [** Connection confidentiality and integrity is provided by running the WebSocket Protocol over TLS (wss URIs). **]** XX**SRS_UWS_CLIENT_01_361: [** WebSocket implementations MUST support TLS and SHOULD employ it when communicating with their peers. **]** For connections using TLS, the amount of benefit provided by TLS depends greatly on the strength of the algorithms negotiated during the TLS handshake. For example, some TLS cipher mechanisms don't provide connection confidentiality. XX**SRS_UWS_CLIENT_01_362: [** To achieve reasonable levels of protection, clients should use only Strong TLS algorithms. **]** "Web Security Context: User Interface Guidelines" [W3C.REC-wsc-ui-20100812] discusses what constitutes Strong TLS algorithms. [RFC5246] provides additional guidance in Appendix A.5 and Appendix D.3. 10.7. Handling of Invalid Data **SRS_UWS_CLIENT_01_363: [** Incoming data MUST always be validated by both clients and servers. **]** **SRS_UWS_CLIENT_01_364: [** If, at any time, an endpoint is faced with data that it does not understand or that violates some criteria by which the endpoint determines safety of input, or when the endpoint sees an opening handshake that does not correspond to the values it is expecting (e.g., incorrect path or origin in the client request), the endpoint MAY drop the TCP connection. **]** **SRS_UWS_CLIENT_01_365: [** If the invalid data was received after a successful WebSocket handshake, the endpoint SHOULD send a Close frame with an appropriate status code (Section 7.4) before proceeding to _Close the WebSocket Connection_. **]** Use of a Close frame with an appropriate status code can help in diagnosing the problem. If the invalid data is sent during the WebSocket handshake, the server SHOULD return an appropriate HTTP [RFC2616] status code. A common class of security problems arises when sending text data using the wrong encoding. This protocol specifies that messages with a Text data type (as opposed to Binary or other types) contain UTF-8-encoded data. Although the length is still indicated and applications implementing this protocol should use the length to determine where the frame actually ends, sending data in an improper encoding may still break assumptions that applications built on top of this protocol may make, leading to anything from misinterpretation of data to loss of data or potential security bugs. 10.8. Use of SHA-1 by the WebSocket Handshake The WebSocket handshake described in this document doesn't depend on any security properties of SHA-1, such as collision resistance or resistance to the second pre-image attack (as described in [RFC4270]). uws_frame_encoder_requirements.md000066400000000000000000000400731362133436400373410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# uws_frame_encoder requirements ## Overview uws_frame_encoder is module that implements the WebSocket frame encoding rules. ## References RFC6455 - The WebSocket Protocol. ## Exposed API ```c #define RESERVED_1 0x04 #define RESERVED_2 0x02 #define RESERVED_3 0x01 #define WS_FRAME_TYPE_VALUES \ WS_CONTINUATION_FRAME = 0x00, \ WS_TEXT_FRAME = 0x01, \ WS_BINARY_FRAME = 0x02, \ WS_RESERVED_NON_CONTROL_FRAME_3 = 0x03, \ WS_RESERVED_NON_CONTROL_FRAME_4 = 0x04, \ WS_RESERVED_NON_CONTROL_FRAME_5 = 0x05, \ WS_RESERVED_NON_CONTROL_FRAME_6 = 0x06, \ WS_RESERVED_NON_CONTROL_FRAME_7 = 0x07, \ WS_CLOSE_FRAME = 0x08, \ WS_PING_FRAME = 0x09, \ WS_PONG_FRAME = 0x0A, \ WS_RESERVED_CONTROL_FRAME_B = 0x0B, \ WS_RESERVED_CONTROL_FRAME_C = 0x0C, \ WS_RESERVED_CONTROL_FRAME_D = 0x0D, \ WS_RESERVED_CONTROL_FRAME_E = 0x0E, \ WS_RESERVED_CONTROL_FRAME_F = 0x0F DEFINE_ENUM(WS_FRAME_TYPE, WS_FRAME_TYPE_VALUES); extern int uws_frame_encoder_encode(BUFFER_HANDLE encode_buffer, WS_FRAME_TYPE opcode, const unsigned char* payload, size_t length, bool is_masked, bool is_final, unsigned char reserved); ``` ### uws_create ```c extern int uws_frame_encoder_encode(BUFFER_HANDLE encode_buffer, WS_FRAME_TYPE opcode, const unsigned char* payload, size_t length, bool is_masked, bool is_final, unsigned char reserved); ``` **SRS_UWS_FRAME_ENCODER_01_001: [** `uws_frame_encoder_encode` shall encode the information given in `opcode`, `payload`, `length`, `is_masked`, `is_final` and `reserved` according to the RFC6455 into a new buffer. **]** **SRS_UWS_FRAME_ENCODER_01_044: [** On success `uws_frame_encoder_encode` shall return a non-NULL handle to the result buffer. **]** **SRS_UWS_FRAME_ENCODER_01_054: [** If `length` is greater than 0 and payload is NULL, then `uws_frame_encoder_encode` shall fail and return NULL. **]** **SRS_UWS_FRAME_ENCODER_01_048: [** The newly created buffer shall be created by calling `BUFFER_new`. **]** **SRS_UWS_FRAME_ENCODER_01_049: [** If `BUFFER_new` fails then `uws_frame_encoder_encode` shall fail and return NULL. **]** **SRS_UWS_FRAME_ENCODER_01_046: [** The result buffer shall be resized accordingly using `BUFFER_enlarge`. **]** **SRS_UWS_FRAME_ENCODER_01_047: [** If `BUFFER_enlarge` fails then `uws_frame_encoder_encode` shall fail and return NULL. **]** **SRS_UWS_FRAME_ENCODER_01_050: [** The allocated memory shall be accessed by calling `BUFFER_u_char`. **]** **SRS_UWS_FRAME_ENCODER_01_051: [** If `BUFFER_u_char` fails then `uws_frame_encoder_encode` shall fail and return a NULL. **]** **SRS_UWS_FRAME_ENCODER_01_052: [** If `reserved` has any bits set except the lowest 3 then `uws_frame_encoder_encode` shall fail and return NULL. **]** **SRS_UWS_FRAME_ENCODER_01_053: [** In order to obtain a 32 bit value for masking, `gb_rand` shall be used 4 times (for each byte). **]** ### RFC6455 relevant parts 5. Data Framing 5.2. Base Framing Protocol This wire format for the data transfer part is described by the ABNF [RFC5234] given in detail in this section. (Note that, unlike in other sections of this document, the ABNF in this section is operating on groups of bits. The length of each group of bits is indicated in a comment. When encoded on the wire, the most significant bit is the leftmost in the ABNF). A high-level overview of the framing is given in the following figure. In a case of conflict between the figure below and the ABNF specified later in this section, the figure is authoritative. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-------+-+-------------+-------------------------------+ |F|R|R|R| opcode|M| Payload len | Extended payload length | |I|S|S|S| (4) |A| (7) | (16/64) | |N|V|V|V| |S| | (if payload len==126/127) | | |1|2|3| |K| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | Extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | |Masking-key, if MASK set to 1 | +-------------------------------+-------------------------------+ | Masking-key (continued) | Payload Data | +-------------------------------- - - - - - - - - - - - - - - - + : Payload Data continued ... : + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | Payload Data continued ... | +---------------------------------------------------------------+ FIN: 1 bit **SRS_UWS_FRAME_ENCODER_01_002: [** Indicates that this is the final fragment in a message. **]** **SRS_UWS_FRAME_ENCODER_01_003: [** The first fragment MAY also be the final fragment. **]** RSV1, RSV2, RSV3: 1 bit each **SRS_UWS_FRAME_ENCODER_01_004: [** MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. **]** If a nonzero value is received and none of the negotiated extensions defines the meaning of such a nonzero value, the receiving endpoint MUST _Fail the WebSocket Connection_. Opcode: 4 bits Defines the interpretation of the "Payload data". **SRS_UWS_FRAME_ENCODER_01_006: [** If an unknown opcode is received, the receiving endpoint MUST _Fail the WebSocket Connection_. **]** The following values are defined. **SRS_UWS_FRAME_ENCODER_01_007: [** * %x0 denotes a continuation frame **]** **SRS_UWS_FRAME_ENCODER_01_008: [** * %x1 denotes a text frame **]** **SRS_UWS_FRAME_ENCODER_01_009: [** * %x2 denotes a binary frame **]** **SRS_UWS_FRAME_ENCODER_01_010: [** * %x3-7 are reserved for further non-control frames **]** **SRS_UWS_FRAME_ENCODER_01_011: [** * %x8 denotes a connection close **]** **SRS_UWS_FRAME_ENCODER_01_012: [** * %x9 denotes a ping **]** **SRS_UWS_FRAME_ENCODER_01_013: [** * %xA denotes a pong **]** **SRS_UWS_FRAME_ENCODER_01_014: [** * %xB-F are reserved for further control frames **]** Mask: 1 bit **SRS_UWS_FRAME_ENCODER_01_015: [** Defines whether the "Payload data" is masked. **]** **SRS_UWS_FRAME_ENCODER_01_016: [** If set to 1, a masking key is present in masking-key, and this is used to unmask the "Payload data" as per Section 5.3. **]** All frames sent from client to server have this bit set to 1. Payload length: 7 bits, 7+16 bits, or 7+64 bits **SRS_UWS_FRAME_ENCODER_01_018: [** The length of the "Payload data", in bytes: **]** **SRS_UWS_FRAME_ENCODER_01_043: [** if 0-125, that is the payload length. **]** **SRS_UWS_FRAME_ENCODER_01_019: [** If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. **]** **SRS_UWS_FRAME_ENCODER_01_020: [** If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. **]** **SRS_UWS_FRAME_ENCODER_01_021: [** Multibyte length quantities are expressed in network byte order. **]** **SRS_UWS_FRAME_ENCODER_01_022: [** Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. **]** **SRS_UWS_FRAME_ENCODER_01_023: [** The payload length is the length of the "Extension data" + the length of the "Application data". **]** The length of the "Extension data" may be zero, in which case the payload length is the length of the "Application data". Masking-key: 0 or 4 bytes All frames sent from the client to the server are masked by a 32-bit value that is contained within the frame. **SRS_UWS_FRAME_ENCODER_01_026: [** This field is present if the mask bit is set to 1 and is absent if the mask bit is set to 0. **]** See Section 5.3 for further information on client-to-server masking. Payload data: (x+y) bytes The "Payload data" is defined as "Extension data" concatenated with "Application data". Extension data: x bytes The "Extension data" is 0 bytes unless an extension has been negotiated. Any extension MUST specify the length of the "Extension data", or how that length may be calculated, and how the extension use MUST be negotiated during the opening handshake. If present, the "Extension data" is included in the total payload length. Application data: y bytes Arbitrary "Application data", taking up the remainder of the frame after any "Extension data". The length of the "Application data" is equal to the payload length minus the length of the "Extension data". The base framing protocol is formally defined by the following ABNF [RFC5234]. It is important to note that the representation of this data is binary, not ASCII characters. As such, a field with a length of 1 bit that takes values %x0 / %x1 is represented as a single bit whose value is 0 or 1, not a full byte (octet) that stands for the characters "0" or "1" in the ASCII encoding. A field with a length of 4 bits with values between %x0-F again is represented by 4 bits, again NOT by an ASCII character or full byte (octet) with these values. [RFC5234] does not specify a character encoding: "Rules resolve into a string of terminal values, sometimes called characters. In ABNF, a character is merely a non-negative integer. In certain contexts, a specific mapping (encoding) of values into a character set (such as ASCII) will be specified." Here, the specified encoding is a binary encoding where each terminal value is encoded in the specified number of bits, which varies for each field. ws-frame = frame-fin ; 1 bit in length frame-rsv1 ; 1 bit in length frame-rsv2 ; 1 bit in length frame-rsv3 ; 1 bit in length frame-opcode ; 4 bits in length frame-masked ; 1 bit in length frame-payload-length ; either 7, 7+16, ; or 7+64 bits in ; length [ frame-masking-key ] ; 32 bits in length frame-payload-data ; n*8 bits in ; length, where ; n >= 0 frame-fin = %x0 ; more frames of this message follow / %x1 ; final frame of this message ; 1 bit in length frame-rsv1 = %x0 / %x1 ; 1 bit in length, MUST be 0 unless ; negotiated otherwise frame-rsv2 = %x0 / %x1 ; 1 bit in length, MUST be 0 unless ; negotiated otherwise frame-rsv3 = %x0 / %x1 ; 1 bit in length, MUST be 0 unless ; negotiated otherwise frame-opcode = frame-opcode-non-control / frame-opcode-control / frame-opcode-cont frame-opcode-cont = %x0 ; frame continuation frame-opcode-non-control= %x1 ; text frame / %x2 ; binary frame / %x3-7 ; 4 bits in length, ; reserved for further non-control frames frame-opcode-control = %x8 ; connection close / %x9 ; ping / %xA ; pong / %xB-F ; reserved for further control ; frames ; 4 bits in length frame-masked = %x0 ; frame is not masked, no frame-masking-key / %x1 ; frame is masked, frame-masking-key present ; 1 bit in length frame-payload-length = ( %x00-7D ) / ( %x7E frame-payload-length-16 ) / ( %x7F frame-payload-length-63 ) ; 7, 7+16, or 7+64 bits in length, ; respectively frame-payload-length-16 = %x0000-FFFF ; 16 bits in length frame-payload-length-63 = %x0000000000000000-7FFFFFFFFFFFFFFF ; 64 bits in length frame-masking-key = 4( %x00-FF ) ; present only if frame-masked is 1 ; 32 bits in length frame-payload-data = (frame-masked-extension-data frame-masked-application-data) ; when frame-masked is 1 / (frame-unmasked-extension-data frame-unmasked-application-data) ; when frame-masked is 0 frame-masked-extension-data = *( %x00-FF ) ; reserved for future extensibility ; n*8 bits in length, where n >= 0 frame-masked-application-data = *( %x00-FF ) ; n*8 bits in length, where n >= 0 frame-unmasked-extension-data = *( %x00-FF ) ; reserved for future extensibility ; n*8 bits in length, where n >= 0 frame-unmasked-application-data = *( %x00-FF ) ; n*8 bits in length, where n >= 0 5.3. Client-to-Server Masking **SRS_UWS_FRAME_ENCODER_01_033: [** A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. **]** **SRS_UWS_FRAME_ENCODER_01_034: [** The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. **]** **SRS_UWS_FRAME_ENCODER_01_035: [** It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". **]** **SRS_UWS_FRAME_ENCODER_01_036: [** The masking key is a 32-bit value chosen at random by the client. **]** **SRS_UWS_FRAME_ENCODER_01_037: [** When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. **]** **SRS_UWS_FRAME_ENCODER_01_038: [** The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. **]** The unpredictability of the masking key is essential to prevent authors of malicious applications from selecting the bytes that appear on the wire. RFC 4086 [RFC4086] discusses what entails a suitable source of entropy for security-sensitive applications. The masking does not affect the length of the "Payload data". **SRS_UWS_FRAME_ENCODER_01_039: [** To convert masked data into unmasked data, or vice versa, the following algorithm is applied. **]** **SRS_UWS_FRAME_ENCODER_01_040: [** The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. **]** **SRS_UWS_FRAME_ENCODER_01_041: [** Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): **]** j = i MOD 4 transformed-octet-i = original-octet-i XOR masking-key-octet-j **SRS_UWS_FRAME_ENCODER_01_042: [** The payload length, indicated in the framing as frame-payload-length, does NOT include the length of the masking key. **]** It is the length of the "Payload data", e.g., the number of bytes following the masking key. vector_requirements.md000066400000000000000000000145541362133436400351610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocVECTOR Requirements ================ ## Overview The VECTOR object is an index based collection of uniform size elements. ## Exposed API ```c typedef struct VECTOR_TAG* VECTOR_HANDLE; typedef bool(*PREDICATE_FUNCTION)(const void* element, const void* value); /* creation */ extern VECTOR_HANDLE VECTOR_create(size_t elementSize); extern VECTOR_HANDLE VECTOR_move(VECTOR_HANDLE handle); extern void VECTOR_destroy(VECTOR_HANDLE handle); /* insertion */ extern int VECTOR_push_back(VECTOR_HANDLE handle, const void* elements, size_t numElements); /* removal */ extern void VECTOR_erase(VECTOR_HANDLE handle, void* elements, size_t numElements); extern void VECTOR_clear(VECTOR_HANDLE handle); /* access */ extern void* VECTOR_element(VECTOR_HANDLE handle, size_t index); extern void* VECTOR_front(VECTOR_HANDLE handle); extern void* VECTOR_back(VECTOR_HANDLE handle); extern void* VECTOR_find_if(VECTOR_HANDLE handle, PREDICATE_FUNCTION pred, const void* value); /* capacity */ extern size_t VECTOR_size(VECTOR_HANDLE handle); ``` ### PREDICATE_FUNCTION ```c bool(*PREDICATE_FUNCTION)(const void* element, const void* value); /** * PREDICATE_FUNCTION defines a function prototype that is used in conjunction with `VECTOR_find_if()`. * VECTOR_find_if will iterate through each element of the object and call the given function * with two parameters. Once a match is found, a pointer to the matched element will be returned. * NULL will be returned if no match is found. * Care must be taken if one or both of the arguments are of type VECTOR_HANDLE. For example, * calling the `VECTOR_move` from inside a `PREDICATE_FUNCTION` is not supported and may cause undefined * behavior. * * - element: points to the member of the array being evaluated. * - value: points to a variable whose contents will be used to find a matching element. **/ ``` ### VECTOR_create ```c VECTOR_HANDLE VECTOR_create(size_t elementSize) ``` **SRS_VECTOR_10_001: [** VECTOR_create shall allocate a VECTOR_HANDLE that will contain an empty vector. The size of each element is given in elementSize. **]** **SRS_VECTOR_10_002: [** VECTOR_create shall fail and return NULL if elementsize is equal to 0. **]** **SRS_VECTOR_10_033: [** VECTOR_create shall fail and return NULL if malloc fails. **]** ### VECTOR_move ```c VECTOR_HANDLE VECTOR_move(VECTOR_HANDLE handle) ``` **SRS_VECTOR_10_004: [** VECTOR_move shall allocate a VECTOR_HANLDE and move the data to it from the given handle. **]** **SRS_VECTOR_10_005: [** VECTOR_move shall fail and return NULL if the given handle is NULL. **]** **SRS_VECTOR_10_006: [** VECTOR_move shall fail and return NULL if malloc fails. **]** ### VECTOR_destroy ```c void VECTOR_destroy(VECTOR_HANDLE handle) ``` **SRS_VECTOR_10_008: [** VECTOR_destroy shall free the given handle and its internal storage. **]** **SRS_VECTOR_10_009: [** VECTOR_destroy shall return if the given handle is NULL. **]** ### VECTOR_push_back ```c int VECTOR_push_back(VECTOR_HANDLE handle, const void* elements, size_t numElements) ``` **SRS_VECTOR_10_011: [** VECTOR_push_back shall fail and return non-zero if `handle` is NULL. **]** **SRS_VECTOR_10_034: [** VECTOR_push_back shall fail and return non-zero if `elements` is NULL. **]** **SRS_VECTOR_10_035: [** VECTOR_push_back shall fail and return non-zero if `numElements` is 0. **]** **SRS_VECTOR_10_012: [** VECTOR_push_back shall fail and return non-zero if memory allocation fails. **]** **SRS_VECTOR_10_013: [** VECTOR_push_back shall append the given elements and return 0 indicating success. **]** ### VECTOR_erase ```c void VECTOR_erase(VECTOR_HANDLE handle, void* elements, size_t numElements) ``` **SRS_VECTOR_10_014: [** VECTOR_erase shall remove the `numElements` starting at `elements` and reduce its internal storage. **]** **SRS_VECTOR_10_015: [** VECTOR_erase shall return if `handle` is NULL. **]** **SRS_VECTOR_10_038: [** VECTOR_erase shall return if `elements` is NULL. **]** **SRS_VECTOR_10_040: [** VECTOR_erase shall return if `elements` is out of bound. **]** **SRS_VECTOR_10_041: [** VECTOR_erase shall return if `elements` is misaligned. **]** **SRS_VECTOR_10_039: [** VECTOR_erase shall return if `numElements` is 0. **]** **SRS_VECTOR_10_027: [** VECTOR_erase shall return if `numElements` is out of bound. **]** ### VECTOR_clear ```c void VECTOR_clear(VECTOR_HANDLE handle) ``` **SRS_VECTOR_10_016: [** VECTOR_clear shall remove all elements from the object and release internal storage. **]** **SRS_VECTOR_10_017: [** VECTOR_clear shall return if the object is NULL or empty. **]** ### VECTOR_element ```c void* VECTOR_element(VECTOR_HANDLE handle, size_t index) ``` **SRS_VECTOR_10_018: [** VECTOR_element shall return a pointer to the element at the given index. **]** **SRS_VECTOR_10_019: [** VECTOR_element shall fail and return NULL if handle is NULL. **]** **SRS_VECTOR_10_020: [** VECTOR_element shall fail and return NULL if the given index is out of range. **]** ### VECTOR_front ```c void* VECTOR_front(VECTOR_HANDLE handle) ``` **SRS_VECTOR_10_021: [** VECTOR_front shall return the element at index 0. **]** **SRS_VECTOR_10_022: [** VECTOR_front shall fail and return NULL if handle is NULL. **]** **SRS_VECTOR_10_028: [** VECTOR_front shall fail and return NULL if the vector is empty. **]** ### VECTOR_back ```c void* VECTOR_back(VECTOR_HANDLE handle) ``` **SRS_VECTOR_10_023: [** VECTOR_back shall return the last element of the vector. **]** **SRS_VECTOR_10_024: [** VECTOR_back shall fail and return NULL if handle is NULL. **]** **SRS_VECTOR_10_029: [** VECTOR_back shall fail and return NULL if the vector is empty. **]** ### VECTOR_find_if ```c void* VECTOR_find_if(VECTOR_HANDLE handle, PREDICATE_FUNCTION pred, const void* value) ``` **SRS_VECTOR_10_030: [** VECTOR_find_if shall fail and return NULL if `handle` is NULL. **]** **SRS_VECTOR_10_036: [** VECTOR_find_if shall fail and return NULL if `pred` is NULL. **]** **SRS_VECTOR_10_031: [** VECTOR_find_if shall return the first element in the vector that matches `pred`. **]** **SRS_VECTOR_10_032: [** VECTOR_find_if shall return NULL if no matching element is found. **]** ### VECTOR_size ```c size_t VECTOR_size(VECTOR_HANDLE handle) ``` **SRS_VECTOR_10_025: [** VECTOR_size shall return the number of elements stored with the given handle. **]** **SRS_VECTOR_10_026: [** VECTOR_size shall return 0 if the given handle is NULL. **]**ws_url_requirements.md000066400000000000000000000143421362133436400351650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocSTRING TOKENIZER Requirements ================ ## Overview The WS_URL provides functionality parse Websocket URLs. ## Exposed API ```C typedef struct WS_URL_TAG* WS_URL_HANDLE; extern WS_URL_HANDLE ws_url_create(const char* url); extern int ws_url_is_secure(WS_URL_HANDLE url, bool* is_secure); extern int ws_url_get_host(WS_URL_HANDLE url, const char** host, size_t* length); extern int ws_url_get_port(WS_URL_HANDLE url, size_t* port); extern int ws_url_get_path(WS_URL_HANDLE url, const char** path, size_t* length); extern int ws_url_get_query(WS_URL_HANDLE url, const char** query, size_t* length); extern void ws_url_destroy(WS_URL_HANDLE url); ``` ### ws_url_create ```c extern WS_URL_HANDLE ws_url_create(const char* url); ``` **SRS_WS_URL_09_001: [** If `url` is NULL the function shall fail and return NULL **]** **SRS_WS_URL_09_002: [** Memory shall be allocated for an instance of WS_URL (aka `ws_url`) **]** **SRS_WS_URL_09_003: [** If `ws_url` failed to be allocated, the function shall return NULL **]** **SRS_WS_URL_09_024: [** `url` shall be copied into `ws_url->url` **]** **SRS_WS_URL_09_025: [** If `url` fails to be copied, the function shall free `ws_url` and return NULL **]** #### Parsing starts **SRS_WS_URL_09_004: [** If `url` starts with "ws://" (`protocol`), `ws_url->is_secure` shall be set to false **]** **SRS_WS_URL_09_005: [** If `url` starts with "wss://" (`protocol`), `ws_url->is_secure` shall be set to true **]** **SRS_WS_URL_09_024: [** If `protocol` cannot be identified in `url`, the function shall fail and return NULL **]** **SRS_WS_URL_09_006: [** The pointer to the token starting right after `protocol` (in the `url` string) shall be stored in `ws_url->host` **]** **SRS_WS_URL_09_007: [** If `ws_url->host` ends up being NULL, the function shall fail and return NULL **]** **SRS_WS_URL_09_008: [** The length from `ws_url->host` up to the first occurrence of either ":" (`port_delimiter`), "/" (`path_delimiter`), "?" (`query_delimiter`) or `\0` shall be stored in `ws_url->host_length` **]** **SRS_WS_URL_09_009: [** If `ws_url->host_length` ends up being zero, the function shall fail and return NULL **]** **SRS_WS_URL_09_010: [** If after `ws_url->host` the `port_delimiter` occurs (not preceeded by `path_delimiter` or `query_delimiter`) the number that follows shall be parsed and stored in `ws_url->port` **]** **SRS_WS_URL_09_011: [** If the port number fails to be parsed, the function shall fail and return NULL **]** **SRS_WS_URL_09_012: [** If after `ws_url->host` or the port number the `path_delimiter` occurs (not preceeded by `query_delimiter`) the following pointer address shall be stored in `ws_url->path` **]** **SRS_WS_URL_09_013: [** If the path component is present and `ws_url->path` ends up being NULL, the function shall fail and return NULL **]** **SRS_WS_URL_09_014: [** The length from `ws_url->path` up to the first occurrence of either `query_delimiter` or `\0` shall be stored in `ws_url->path_length` **]** **SRS_WS_URL_09_015: [** If the path component is present and `ws_url->path_length` ends up being zero, the function shall fail and return NULL **]** **SRS_WS_URL_09_016: [** Next if the `query_delimiter` occurs the following pointer address shall be stored in `ws_url->query` **]** **SRS_WS_URL_09_017: [** If the query component is present and `ws_url->query` ends up being NULL, the function shall fail and return NULL **]** **SRS_WS_URL_09_018: [** The length from `ws_url->query` up to `\0` shall be stored in `ws_url->query_length` **]** **SRS_WS_URL_09_019: [** If the query component is present and `ws_url->query_length` ends up being zero, the function shall fail and return NULL **]** **SRS_WS_URL_09_020: [** If any component cannot be parsed or is out of order, the function shall fail and return NULL **]** #### Finally **SRS_WS_URL_09_021: [** If any failure occurs, all memory allocated by the function shall be released before returning **]** ### ws_url_destroy ```c extern void ws_url_destroy(WS_URL_HANDLE url); ``` **SRS_WS_URL_09_022: [** If `url` is NULL, the function shall return without further action **]** **SRS_WS_URL_09_023: [** Otherwise, the memory allocated for `url` shall released **]** ### ws_url_is_secure ```c extern int ws_url_is_secure(WS_URL_HANDLE url, bool* is_secure); ``` **SRS_WS_URL_09_026: [** If `url` is NULL, the function shall return a non-zero value (failure) **]** **SRS_WS_URL_09_027: [** Otherwize the function shall set `is_secure` as `url->is_secure` **]** **SRS_WS_URL_09_028: [** If no errors occur function shall return zero (success) **]** ### ws_url_get_host ```c extern int ws_url_get_host(WS_URL_HANDLE url, const char** host, size_t* length); ``` **SRS_WS_URL_09_029: [** If `url` or `host` or `length` are NULL, the function shall return a non-zero value (failure) **]** **SRS_WS_URL_09_030: [** Otherwize the function shall set `host` to `url->host` and `length` to `url->host_length` **]** **SRS_WS_URL_09_031: [** If no errors occur function shall return zero (success) **]** ### ws_url_get_path ```c extern int ws_url_get_path(WS_URL_HANDLE url, const char** path, size_t* length); ``` **SRS_WS_URL_09_032: [** If `url` or `path` or `length` are NULL, the function shall return a non-zero value (failure) **]** **SRS_WS_URL_09_033: [** Otherwize the function shall set `path` to `url->path` and `length` to `url->path_length` **]** **SRS_WS_URL_09_034: [** If no errors occur function shall return zero (success) **]** ### ws_url_get_query ```c extern int ws_url_get_query(WS_URL_HANDLE url, const char** query, size_t* length); ``` **SRS_WS_URL_09_035: [** If `url` or `query` or `length` are NULL, the function shall return a non-zero value (failure) **]** **SRS_WS_URL_09_036: [** Otherwize the function shall set `query` to `url->query` and `length` to `url->query_length` **]** **SRS_WS_URL_09_037: [** If no errors occur function shall return zero (success) **]** ### ws_url_get_port ```c extern int ws_url_get_port(WS_URL_HANDLE url, size_t* port); ``` **SRS_WS_URL_09_038: [** If `url` or `port` are NULL, the function shall return a non-zero value (failure) **]** **SRS_WS_URL_09_039: [** Otherwize the function shall set `port` as `url->port` **]** **SRS_WS_URL_09_040: [** If no errors occur function shall return zero (success) **]**wsio_requirements.md000066400000000000000000000444151362133436400346370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc# wsio requirements ## Overview `wsio` is module that implements a concrete IO that implements the WebSockets protocol by using the uws library. ## References RFC6455 - The WebSocket Protocol. ## Exposed API ```c typedef struct WSIO_CONFIG_TAG { const char* hostname; int port; const char* resource_name; const char* protocol; bool use_ssl; } WSIO_CONFIG; extern const IO_INTERFACE_DESCRIPTION* wsio_get_interface_description(void); ``` ### wsio_create ```c CONCRETE_IO_HANDLE wsio_create(void* io_create_parameters); ``` `wsio_create` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_create` member. **SRS_WSIO_01_001: [** `wsio_create` shall create an instance of wsio and return a non-NULL handle to it. **]** **SRS_WSIO_01_065: [** If the argument `io_create_parameters` is NULL then `wsio_create` shall return NULL. **]** **SRS_WSIO_01_066: [** `io_create_parameters` shall be used as a `WSIO_CONFIG*` . **]** **SRS_WSIO_01_067: [** If any of the members `hostname`, `resource_name` or `protocol` is NULL in `WSIO_CONFIG` then `wsio_create` shall return NULL. **]** **SRS_WSIO_01_068: [** If allocating memory for the new wsio instance fails then `wsio_create` shall return NULL. **]** **SRS_WSIO_01_070: [** The underlying uws instance shall be created by calling `uws_client_create_with_io`. **]** **SRS_WSIO_01_071: [** The arguments for `uws_client_create_with_io` shall be: **]** **SRS_WSIO_01_185: [** - `underlying_io_interface` shall be set to the `underlying_io_interface` field in the `io_create_parameters` passed to `wsio_create`. **]** **SRS_WSIO_01_186: [** - `underlying_io_parameters` shall be set to the `underlying_io_parameters` field in the `io_create_parameters` passed to `wsio_create`. **]** **SRS_WSIO_01_072: [** - `hostname` set to the `hostname` field in the `io_create_parameters` passed to `wsio_create`. **]** **SRS_WSIO_01_130: [** - `port` set to the `port` field in the `io_create_parameters` passed to `wsio_create`. **]** **SRS_WSIO_01_128: [** - `resource_name` set to the `resource_name` field in the `io_create_parameters` passed to `wsio_create`. **]** **SRS_WSIO_01_129: [** - `protocols` shall be filled with only one structure, that shall have the `protocol` set to the value of the `protocol` field in the `io_create_parameters` passed to `wsio_create`. **]** **SRS_WSIO_01_075: [** If `uws_client_create_with_io` fails, then `wsio_create` shall fail and return NULL. **]** **SRS_WSIO_01_076: [** `wsio_create` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. **]** **SRS_WSIO_01_077: [** If `singlylinkedlist_create` fails then `wsio_create` shall fail and return NULL. **]** ### wsio_destroy ```c void wsio_destroy(CONCRETE_IO_HANDLE ws_io); ``` `wsio_destroy` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_destroy` member. **SRS_WSIO_01_078: [** `wsio_destroy` shall free all resources associated with the wsio instance. **]** **SRS_WSIO_01_079: [** If `ws_io` is NULL, `wsio_destroy` shall do nothing. **]** **SRS_WSIO_01_080: [** `wsio_destroy` shall destroy the uws instance created in `wsio_create` by calling `uws_client_destroy`. **]** **SRS_WSIO_01_081: [** `wsio_destroy` shall free the list used to track the pending send IOs by calling `singlylinkedlist_destroy`. **]** ### wsio_open ```c int wsio_open(CONCRETE_IO_HANDLE ws_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); ``` `wsio_open` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_open` member. **SRS_WSIO_01_082: [** `wsio_open` shall open the underlying uws instance by calling `uws_client_open_async` and providing the uws handle created in `wsio_create` as argument. **]** **SRS_WSIO_01_083: [** On success, `wsio_open` shall return 0. **]** **SRS_WSIO_01_132: [** If any of the arguments `ws_io`, `on_io_open_complete`, `on_bytes_received`, `on_io_error` is NULL, `wsio_open` shall fail and return a non-zero value. **]** **SRS_WSIO_01_165: [** `wsio_open` when CLOSING shall fail and return a non-zero value. **]** **SRS_WSIO_01_084: [** If opening the underlying uws instance fails then `wsio_open` shall fail and return a non-zero value. **]** **SRS_WSIO_01_131: [** `wsio_open` when already OPEN or OPENING shall fail and return a non-zero value. **]** ### wsio_close ```c int wsio_close(CONCRETE_IO_HANDLE ws_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); ``` `wsio_close` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_close` member. **SRS_WSIO_01_085: [** `wsio_close` shall close the websockets IO if an open action is either pending or has completed successfully (if the IO is open). **]** **SRS_WSIO_01_133: [** On success `wsio_close` shall return 0. **]** **SRS_WSIO_01_086: [** if `ws_io` is NULL, `wsio_close` shall return a non-zero value. **]** **SRS_WSIO_01_087: [** `wsio_close` shall call `uws_client_close_async` while passing as argument the IO handle created in `wsio_create`. **]** **SRS_WSIO_01_164: [** When `uws_client_close_async` fails, `wsio_close` shall call the `on_io_close_complete` callback and continue. **]** **SRS_WSIO_01_088: [** `wsio_close` when no open action has been issued shall fail and return a non-zero value. **]** **SRS_WSIO_01_089: [** `wsio_close` after a `wsio_close` shall fail and return a non-zero value. **]** **SRS_WSIO_01_090: [** The argument `on_io_close_complete` shall be optional, if NULL is passed by the caller then no close complete callback shall be triggered. **]** **SRS_WSIO_01_091: [** `wsio_close` shall obtain all the pending IO items by repetitively querying for the head of the pending IO list and freeing that head item. **]** **SRS_WSIO_01_092: [** Obtaining the head of the pending IO list shall be done by calling `singlylinkedlist_get_head_item`. **]** **SRS_WSIO_01_093: [** For each pending item the send complete callback shall be called with `IO_SEND_CANCELLED`.**\]** ### wsio_send ```c int wsio_send(CONCRETE_IO_HANDLE ws_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); ``` `wsio_send` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_send` member. **SRS_WSIO_01_095: [** `wsio_send` shall call `uws_client_send_frame_async`, passing the `buffer` and `size` arguments as they are: **]** **SRS_WSIO_01_098: [** On success, `wsio_send` shall return 0. **]** **SRS_WSIO_01_100: [** If any of the arguments `ws_io` or `buffer` are NULL, `wsio_send` shall fail and return a non-zero value. **]** **SRS_WSIO_01_099: [** If the wsio is not OPEN (open has not been called or is still in progress) then `wsio_send` shall fail and return a non-zero value. **]** **SRS_WSIO_01_102: [** An entry shall be queued in the singly linked list by calling `singlylinkedlist_add`. **]** **SRS_WSIO_01_103: [** The entry shall contain the `on_send_complete` callback and its context. **]** **SRS_WSIO_01_096: [** The frame type used shall be `WS_FRAME_TYPE_BINARY`. **]** **SRS_WSIO_01_097: [** The `is_final` argument shall be set to true. **]** **SRS_WSIO_01_101: [** If `size` is zero then `wsio_send` shall fail and return a non-zero value. **]** **SRS_WSIO_01_134: [** If allocating memory for the pending IO data fails, `wsio_send` shall fail and return a non-zero value. **]** **SRS_WSIO_01_104: [** If `singlylinkedlist_add` fails, `wsio_send` shall fail and return a non-zero value. **]** **SRS_WSIO_01_105: [** The argument `on_send_complete` shall be optional, if NULL is passed by the caller then no send complete callback shall be triggered. **]** ### wsio_dowork ```c void wsio_dowork(CONCRETE_IO_HANDLE ws_io); ``` `wsio_dowork` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_dowork` member. **SRS_WSIO_01_106: [** `wsio_dowork` shall call `uws_client_dowork` with the uws handle created in `wsio_create`. **]** **SRS_WSIO_01_107: [** If the `ws_io` argument is NULL, `wsio_dowork` shall do nothing. **]** **SRS_WSIO_01_108: [** If the IO is not yet open, `wsio_dowork` shall do nothing. **]** ### wsio_setoption ```c int wsio_setoption(CONCRETE_IO_HANDLE ws_io, const char* option_name, const void* value); ``` `wsio_setoption` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_setoption` member. **SRS_WSIO_01_109: [** If any of the arguments `ws_io` or `option_name` is NULL `wsio_setoption` shall return a non-zero value. **]** **SRS_WSIO_01_183: [** If the option name is `WSIOOptions` then `wsio_setoption` shall call `OptionHandler_FeedOptions` and pass to it the underlying IO handle and the `value` argument. **]** **SRS_WSIO_01_184: [** If `OptionHandler_FeedOptions` fails, `wsio_setoption` shall fail and return a non-zero value. **]** **SRS_WSIO_01_156: [** Otherwise all options shall be passed as they are to uws by calling `uws_client_set_option`. **]** **SRS_WSIO_01_158: [** On success, `wsio_setoption` shall return 0. **]** **SRS_WSIO_01_157: [** If `uws_client_set_option` fails, `wsio_setoption` shall fail and return a non-zero value. **]** ### wsio_retrieveoptions ```c OPTIONHANDLER_HANDLE wsio_retrieveoptions(CONCRETE_IO_HANDLE handle) ``` `wsio_retrieveoptions` is the implementation provided via `wsio_get_interface_description` for the `concrete_io_retrieveoptions` member. **SRS_WSIO_01_118: [** If parameter `handle` is `NULL` then `wsio_retrieveoptions` shall fail and return NULL. **]** **SRS_WSIO_01_119: [** `wsio_retrieveoptions` shall call `OptionHandler_Create` to produce an `OPTIONHANDLER_HANDLE` and on success return the new `OPTIONHANDLER_HANDLE` handle. **]** **SRS_WSIO_01_120: [** If `OptionHandler_Create` fails then `wsio_retrieveoptions` shall fail and return NULL. **]** **SRS_WSIO_01_178: [** `uws_client_retrieve_options` shall add to the option handler one option, whose name shall be `uWSCLientOptions` and the value shall be queried by calling `uws_client_retrieve_options`. **]** **SRS_WSIO_01_179: [** When calling `uws_client_retrieve_options` the uws client handle shall be passed to it. **]** **SRS_WSIO_01_180: [** If `uws_client_retrieve_options` fails, `uws_client_retrieve_options` shall fail and return NULL. **]** **SRS_WSIO_01_181: [** Adding the option shall be done by calling `OptionHandler_AddOption`. **]** **SRS_WSIO_01_182: [** If `OptionHandler_AddOption` fails, `uws_client_retrieve_options` shall fail and return NULL. **]** ### wsio_clone_option `wsio_clone_option` is the implementation provided to the option handler instance created as part of `wsio_retrieve_options`. ```c void* wsio_clone_option(const char* name, const void* value) ``` **SRS_WSIO_01_171: [** `wsio_clone_option` called with `name` being `WSIOOptions` shall return the same value. **]** **SRS_WSIO_01_173: [** `wsio_clone_option` called with any other option name than `WSIOOptions` shall return NULL. **]** **SRS_WSIO_01_174: [** If `wsio_clone_option` is called with NULL `name` or `value` it shall return NULL. **]** ### wsio_destroy_option `wsio_destroy_option` is the implementation provided to the option handler instance created as part of `wsio_retrieve_options`. ```c void wsio_destroy_option(const char* name, const void* value) ``` **SRS_WSIO_01_175: [** `wsio_destroy_option` called with the option `name` being `WSIOOptions` shall destroy the value by calling `OptionHandler_Destroy`. **]** **SRS_WSIO_01_176: [** If `wsio_destroy_option` is called with any other `name` it shall do nothing. **]** **SRS_WSIO_01_177: [** If `wsio_destroy_option` is called with NULL `name` or `value` it shall do nothing. **]** ### wsio_get_interface_description ```c const IO_INTERFACE_DESCRIPTION* wsio_get_interface_description(void); ``` **SRS_WSIO_01_064: [** wsio_get_interface_description shall return a pointer to an IO_INTERFACE_DESCRIPTION structure that contains pointers to the functions: wsio_retrieveoptions, wsio_create, wsio_destroy, wsio_open, wsio_close, wsio_send and wsio_dowork. **]** ### on_underlying_ws_error **SRS_WSIO_01_121: [** When `on_underlying_ws_error` is called while the IO is OPEN the wsio instance shall be set to ERROR and an error shall be indicated via the `on_io_error` callback passed to `wsio_open`. **]** **SRS_WSIO_01_123: [** When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. **]** **SRS_WSIO_01_122: [** When `on_underlying_ws_error` is called while the IO is OPENING, the `on_io_open_complete` callback passed to `wsio_open` shall be called with `IO_OPEN_ERROR`. **]** **SRS_WSIO_01_135: [** When `on_underlying_ws_error` is called with a NULL context, it shall do nothing. **]** ### on_underlying_ws_frame_received **SRS_WSIO_01_124: [** When `on_underlying_ws_frame_received` is called the bytes in the frame shall be indicated by calling the `on_bytes_received` callback passed to `wsio_open`. **]** **SRS_WSIO_01_125: [** When calling `on_bytes_received`, the `on_bytes_received_context` argument given in `wsio_open` shall be passed to the callback `on_bytes_received`. **]** **SRS_WSIO_01_126: [** If `on_underlying_ws_frame_received` is called while the IO is in any state other than OPEN, it shall do nothing. **]** **SRS_WSIO_01_150: [** If `on_underlying_ws_frame_received` is called with NULL context it shall do nothing. **]** **SRS_WSIO_01_151: [** If the WebSocket frame type is not binary then an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. **]** **SRS_WSIO_01_153: [** When `on_underlying_ws_frame_received` is called with zero `size`, no bytes shall be indicated up as received. **]** **SRS_WSIO_01_154: [** When `on_underlying_ws_frame_received` is called with a positive `size` and a NULL `buffer`, an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. **]** **SRS_WSIO_01_152: [** When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. **]** ### on_underlying_ws_open_complete **SRS_WSIO_01_136: [** When `on_underlying_ws_open_complete` is called with `WS_OPEN_OK` while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_OK`. **]** **SRS_WSIO_01_149: [** When `on_underlying_ws_open_complete` is called with `WS_OPEN_CANCELLED` while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_CANCELLED`. **]** **SRS_WSIO_01_137: [** When `on_underlying_ws_open_complete` is called with any other error code while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_ERROR`. **]** **SRS_WSIO_01_138: [** When `on_underlying_ws_open_complete` is called with a NULL context, it shall do nothing. **]** **SRS_WSIO_01_139: [** When `on_underlying_ws_open_complete` is called while in OPEN state it shall indicate an error by calling the `on_io_error` callback passed to `wsio_open` and switch to the ERROR state. **]** **SRS_WSIO_01_141: [** When `on_underlying_ws_open_complete` is called while in the ERROR state it shall indicate an error by calling the `on_io_error` callback passed to `wsio_open`. **]** **SRS_WSIO_01_140: [** When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. **]** **SRS_WSIO_01_142: [** When `on_underlying_ws_open_complete` is called while in the CLOSING state an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. **]** ### on_underlying_ws_send_frame_complete **SRS_WSIO_01_143: [** When `on_underlying_ws_send_frame_complete` is called after sending a WebSocket frame, the pending IO shall be removed from the list. **]** **SRS_WSIO_01_145: [** Removing it from the list shall be done by calling `singlylinkedlist_remove`. **]** **SRS_WSIO_01_144: [** Also the pending IO data shall be freed. **]** **SRS_WSIO_01_146: [** When `on_underlying_ws_send_frame_complete` is called with `WS_SEND_OK`, the callback `on_send_complete` shall be called with `IO_SEND_OK`. **]** **SRS_WSIO_01_147: [** When `on_underlying_ws_send_frame_complete` is called with `WS_SEND_CANCELLED`, the callback `on_send_complete` shall be called with `IO_SEND_CANCELLED`. **]** **SRS_WSIO_01_148: [** When `on_underlying_ws_send_frame_complete` is called with any other error code, the callback `on_send_complete` shall be called with `IO_SEND_ERROR`. **]** **SRS_WSIO_01_155: [** When `on_underlying_ws_send_frame_complete` is called with a NULL context it shall do nothing. **]** ### on_underlying_ws_close_complete **SRS_WSIO_01_159: [** When `on_underlying_ws_close_complete` while the IO is closing (after `wsio_close`), the close shall be indicated up by calling the `on_io_close_complete` callback passed to `wsio_close`. **]** **SRS_WSIO_01_163: [** When `on_io_close_complete` is called, the context passed to `wsio_close` shall be passed as argument to `on_io_close_complete`. **]** **SRS_WSIO_01_160: [** If NULL was passed to `wsio_close` no callback shall be called. **]** **SRS_WSIO_01_161: [** If the context passed to `on_underlying_ws_close_complete` is NULL, `on_underlying_ws_close_complete` shall do nothing. **]** ### on_underlying_ws_peer_closed **SRS_WSIO_01_166: [** When `on_underlying_ws_peer_closed` and the state of the IO is OPEN an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. **]** **SRS_WSIO_01_169: [** When `on_underlying_ws_peer_closed` and the state of the IO is CLOSING an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. **]** **SRS_WSIO_01_170: [** When `on_underlying_ws_peer_closed` and the state of the IO is OPENING an error shall be indicated by calling the `on_io_open_complete` callback passed to `wsio_open` with the error code `IO_OPEN_ERROR`. **]** **SRS_WSIO_01_168: [** The `close_code`, `extra_data` and `extra_data_length` arguments shall be ignored. **]** **SRS_WSIO_01_167: [** If `on_underlying_ws_peer_closed` is called with a NULL context it shall do nothing. **]** **SRS_WSIO_07_001: [** When `on_underlying_ws_peer_closed` and the state of the IO is NOT_OPEN an error will be raised and the io_state will remain as NOT_OPEN **]** azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdoc/x509_openssl.md000066400000000000000000000114611362133436400333750ustar00rootroot00000000000000x509_openssl ============= ## Overview x509_openssl provides several utility functions. These are: - a utility function that imports into a SSL context a pair of x509 certificate/private key - a utility function that imports from a null terminated string all the certificates in a SSL_CTX*. ## References [OpenSSL](https://www.openssl.org) ```c int x509_openssl_add_credentials(SSL_CTX* ssl_ctx, const char* x509certificate, const char* x509privatekey); int x509_openssl_add_certificates(SSL_CTX, ssl_ctx, const char* certificates); int x509_openssl_add_ecc_credentials(SSL_CTX* ssl_ctx, const char* ecc_alias_cert, const char* ecc_alias_key); ``` ### x509_openssl_add_credentials ```c int x509_openssl_add_credentials(SSL_CTX* ssl_ctx, const char* x509certificate, const char* x509privatekey); ``` x509_openssl_add_credentials loads a x509 certificate and a x509 private key into a SSL context. **SRS_X509_OPENSSL_02_001: [** If any argument is NULL then x509_openssl_add_credentials shall fail and return a non-zero value. **]** **SRS_X509_OPENSSL_02_002: [** x509_openssl_add_credentials shall use BIO_new_mem_buf to create a memory BIO from the x509 certificate. **]** **SRS_X509_OPENSSL_02_003: [** x509_openssl_add_credentials shall use PEM_read_bio_X509 to read the x509 certificate. **]** **SRS_X509_OPENSSL_02_004: [** x509_openssl_add_credentials shall use BIO_new_mem_buf to create a memory BIO from the x509 privatekey. **]** **SRS_X509_OPENSSL_02_005: [** x509_openssl_add_credentials shall use PEM_read_bio_RSAPrivateKey to read the x509 private key. **]** **SRS_X509_OPENSSL_02_006: [** x509_openssl_add_credentials shall use SSL_CTX_use_certificate to load the certicate into the SSL context. **]** **SRS_X509_OPENSSL_02_007: [** x509_openssl_add_credentials shall use SSL_CTX_use_RSAPrivateKey to load the private key into the SSL context. **]** **SRS_X509_OPENSSL_02_008: [** If no error occurs, then x509_openssl_add_credentials shall succeed and return 0. **]** **SRS_X509_OPENSSL_02_009: [** Otherwise x509_openssl_add_credentials shall fail and return a non-zero number. **]** ### x509_openssl_add_certificates ```c int x509_openssl_add_certificates(SSL_CTX* ssl_ctx, const char* certificates); ``` `x509_openssl_add_certificates` adds all the certificates in `certificates` to `ssl_ctx`. **SRS_X509_OPENSSL_02_010: [** If `ssl_ctx` is `NULL` then `x509_openssl_add_certificates` shall fail and return a non-zero value. **]** **SRS_X509_OPENSSL_02_011: [** If `certificates` is `NULL` then `x509_openssl_add_certificates` shall fail and return a non-zero value. **]** **SRS_X509_OPENSSL_02_012: [** `x509_openssl_add_certificates` shall get the memory BIO method function by calling `BIO_s_mem`. **]** **SRS_X509_OPENSSL_02_013: [** `x509_openssl_add_certificates` shall create a new memory BIO by calling `BIO_new`. **]** **SRS_X509_OPENSSL_02_014: [** `x509_openssl_add_certificates` shall load `certificates` into the memory BIO by a call to `BIO_puts`. **]** **SRS_X509_OPENSSL_02_015: [** `x509_openssl_add_certificates` shall retrieve each certificate by a call to `PEM_read_bio_X509`. **]** **SRS_X509_OPENSSL_02_016: [** `x509_openssl_add_certificates` shall add the certificate to the store by a call to `X509_STORE_add_cert`. **]** **SRS_X509_OPENSSL_02_017: [** If `X509_STORE_add_cert` returns with error and that error is `X509_R_CERT_ALREADY_IN_HASH_TABLE` then `x509_openssl_add_certificates` shall ignore it as the certificate is already in the store. **]** **SRS_X509_OPENSSL_02_018: [** In case of any failure `x509_openssl_add_certificates` shall fail and return a non-zero value. **]** **SRS_X509_OPENSSL_02_019: [** Otherwise, `x509_openssl_add_certificates` shall succeed and return 0. **]** ### x509_openssl_add_ecc_credentials ```c int x509_openssl_add_ecc_credentials(SSL_CTX* ssl_ctx, const char* ecc_alias_cert, const char* ecc_alias_key); ``` **SRS_X509_OPENSSL_07_001: [** If `ssl_ctx`, `ecc_alias_cert`, or `ecc_alias_key` are NULL, `x509_openssl_add_ecc_credentials` shall return a non-zero value. **]** **SRS_X509_OPENSSL_07_002: [** `x509_openssl_add_ecc_credentials` shall get the memory BIO method function. **]** **SRS_X509_OPENSSL_07_003: [** `x509_openssl_add_ecc_credentials` shall generate a EVP_PKEY by calling `PEM_read_bio_PrivateKey`. **]** **SRS_X509_OPENSSL_07_004: [** `x509_openssl_add_ecc_credentials` shall import the certification using by the EVP_PKEY. **]** **SRS_X509_OPENSSL_07_005: [** `x509_openssl_add_ecc_credentials` shall load the cert chain by calling PEM_read_bio_X509_AUX and SSL_CTX_use_certification. **]** **SRS_X509_OPENSSL_07_006: [** If successful `x509_openssl_add_ecc_credentials` shall to import each certificate in the cert chain. **]** **SRS_X509_OPENSSL_07_007: [** If any failure is encountered `x509_openssl_add_ecc_credentials` shall return a non-zero value. **]** x509_schannel.md000066400000000000000000000071361362133436400334320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocx509_schannel ============= ## Overview x509_schannel aims at building schannel objects required by either winhttp or by schannel for x509 authentication. The data structure to be build is a [PCCERT_CONTEXT](https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(WINCRYPT%2FPCCERT_CONTEXT) that can be used with `WinHttpSetOption` or with `SCHANNEL_CRED` structure of SCHANNEL. ## References [WinHttpSetOption function](https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(WINHTTP%2FWinHttpSetOption) - option `WINHTTP_OPTION_CLIENT_CERT_CONTEXT` [SCHANNEL_CRED](https://msdn.microsoft.com/query/dev14.query?appId=Dev14IDEF1&l=EN-US&k=k(SCHANNEL%2FSCHANNEL_CRED) - fields `cCreds` and `paCred` ```c X509_SCHANNEL_HANDLE x509_schannel_create(const char* x509certificate, const char* x509privatekey); void x509_schannel_destroy(X509_SCHANNEL_HANDLE, x509_schannel_handle); PCCERT_CONTEXT x509_schannel_get_certificate_context(X509_SCHANNEL_HANDLE x509_schannel_handle); ``` ### x509_schannel_create ```c X509_SCHANNEL_HANDLE x509_schannel_create(const char* x509certificate, const char* x509privatekey); ``` x509_schannel_create creates a handle wrapping a PCCERT_CONTEXT and other information. **SRS_X509_SCHANNEL_02_001: [** If `x509certificate` or `x509privatekey` are NULL then x509_schannel_create shall fail and return NULL. **]** **SRS_X509_SCHANNEL_02_002: [** `x509_schannel_create` shall convert the certificate to binary form by calling `CryptStringToBinaryA`. **]** **SRS_X509_SCHANNEL_02_003: [** `x509_schannel_create` shall convert the private key to binary form by calling `CryptStringToBinaryA`. **]** **SRS_X509_SCHANNEL_02_004: [** `x509_schannel_create` shall decode the private key by calling `CryptDecodeObjectEx`. **]** **SRS_X509_SCHANNEL_07_001: [** `x509_schannel_create` shall determine whether the certificate is of type RSA or ECC. **]** **SRS_X509_SCHANNEL_02_005: [** `x509_schannel_create` shall call `CryptAcquireContext`. **]** **SRS_X509_SCHANNEL_02_006: [** `x509_schannel_create` shall import the private key by calling `CryptImportKey`. **]** **SRS_X509_SCHANNEL_02_007: [** `x509_schannel_create` shall create a cerficate context by calling `CertCreateCertificateContext`. **]** **SRS_X509_SCHANNEL_02_008: [** `x509_schannel_create` shall call set the certificate private key by calling `CertSetCertificateContextProperty`. **]** **SRS_X509_SCHANNEL_02_009: [** If all the operations above succeed, then `x509_schannel_create` shall succeeds and return a non-NULL X509_SCHANNEL_HANDLE. **]** **SRS_X509_SCHANNEL_02_010: [** Otherwise, `x509_schannel_create` shall fail and return a NULL X509_SCHANNEL_HANDLE. **]** ### x509_schannel_destroy ```c void x509_schannel_destroy(X509_SCHANNEL_HANDLE x509_schannel_handle) ``` `x509_schannel_destroy` frees the system resources used by a `X509_SCHANNEL_HANDLE` **SRS_X509_SCHANNEL_02_011: [** If parameter `x509_schannel_handle` is NULL then `x509_schannel_destroy` shall do nothing. **]** **SRS_X509_SCHANNEL_02_012: [** Otherwise, `x509_schannel_destroy` shall free all used resources. **]** ### x509_schannel_get_certificate_context ```c PCCERT_CONTEXT x509_schannel_get_certificate_context(X509_SCHANNEL_HANDLE x509_schannel_handle) ``` x509_schannel_get_certificate_context returns the constructed certificate context (PCCERT_CONTEXT) **SRS_X509_SCHANNEL_02_013: [** If parameter `x509_schannel_handle` is NULL then x509_schannel_get_certificate_context shall return NULL. **]** **SRS_X509_SCHANNEL_02_014: [** Otherwise, `x509_schannel_get_certificate_context` shall return a non-NULL PCCERT_CONTEXT pointer. **]** xio_requirements.md000066400000000000000000000206651362133436400344560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/devdocxio requirements ================ ## Overview xio is module that implements an IO interface, abstracting from upper layers the functionality of simply sending or receiving a sequence of bytes. ## Exposed API ```c typedef struct XIO_INSTANCE_TAG* XIO_HANDLE; typedef void* CONCRETE_IO_HANDLE; typedef enum IO_SEND_RESULT_TAG { IO_SEND_OK, IO_SEND_ERROR, IO_SEND_CANCELLED } IO_SEND_RESULT; typedef enum IO_OPEN_RESULT_TAG { IO_OPEN_OK, IO_OPEN_ERROR, IO_OPEN_CANCELLED } IO_OPEN_RESULT; typedef void(*ON_BYTES_RECEIVED)(void* context, const unsigned char* buffer, size_t size); typedef void(*ON_SEND_COMPLETE)(void* context, IO_SEND_RESULT send_result); typedef void(*ON_IO_OPEN_COMPLETE)(void* context, IO_OPEN_RESULT open_result); typedef void(*ON_IO_CLOSE_COMPLETE)(void* context); typedef void(*ON_IO_ERROR)(void* context); typedef OPTIONHANDLER_HANDLE (*IO_RETRIEVEOPTIONS)(CONCRETE_IO_HANDLE concrete_io); typedef CONCRETE_IO_HANDLE(*IO_CREATE)(void* io_create_parameters); typedef void(*IO_DESTROY)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_OPEN)(CONCRETE_IO_HANDLE concrete_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); typedef int(*IO_CLOSE)(CONCRETE_IO_HANDLE concrete_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); typedef int(*IO_SEND)(CONCRETE_IO_HANDLE concrete_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); typedef void(*IO_DOWORK)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_SETOPTION)(CONCRETE_IO_HANDLE concrete_io, const char* optionName, const void* value); typedef struct IO_INTERFACE_DESCRIPTION_TAG { IO_RETRIEVEOPTIONS concrete_io_retrieveoptions; IO_CREATE concrete_io_create; IO_DESTROY concrete_io_destroy; IO_OPEN concrete_io_open; IO_CLOSE concrete_io_close; IO_SEND concrete_io_send; IO_DOWORK concrete_io_dowork; IO_SETOPTION concrete_io_setoption; } IO_INTERFACE_DESCRIPTION; extern XIO_HANDLE xio_create(const IO_INTERFACE_DESCRIPTION* io_interface_description, const void* io_create_parameters); extern void xio_destroy(XIO_HANDLE xio); extern int xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); extern int xio_close(XIO_HANDLE xio, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); extern int xio_send(XIO_HANDLE xio, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); extern void xio_dowork(XIO_HANDLE xio); extern int xio_setoption(XIO_HANDLE xio, const char* optionName, const void* value); ``` ### xio_create ```c extern XIO_HANDLE xio_create(const IO_INTERFACE_DESCRIPTION* io_interface_description, const void* io_create_parameters); ``` **SRS_XIO_01_001: [** xio_create shall return on success a non-NULL handle to a new IO interface. **]** **SRS_XIO_01_002: [** In order to instantiate the concrete IO implementation the function concrete_xio_create from the io_interface_description shall be called, passing the xio_create_parameters argument. **]** **SRS_XIO_01_016: [** If the underlying concrete_xio_create call fails, xio_create shall return NULL. **]** **SRS_XIO_01_003: [** If the argument io_interface_description is NULL, xio_create shall return NULL. **]** **SRS_XIO_01_004: [** If any io_interface_description member is NULL, xio_create shall return NULL. **]** **SRS_XIO_01_017: [** If allocating the memory needed for the IO interface fails then xio_create shall return NULL. **]** ### xio_destroy ```c extern void xio_destroy(XIO_HANDLE xio); ``` **SRS_XIO_01_005: [** xio_destroy shall free all resources associated with the IO handle. **]** **SRS_XIO_01_006: [** xio_destroy shall also call the concrete_xio_destroy function that is member of the io_interface_description argument passed to xio_create, while passing as argument to concrete_xio_destroy the result of the underlying concrete_xio_create handle that was called as part of the xio_create call. **]** **SRS_XIO_01_007: [** If the argument io is NULL, xio_destroy shall do nothing. **]** ### xio_open ```c extern int xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); ``` **SRS_XIO_01_019: [** xio_open shall call the specific concrete_xio_open function specified in xio_create, passing callback function and context arguments for three events: open completed, bytes received, and IO error. **]** **SRS_XIO_01_020: [** On success, xio_open shall return 0. **]** **SRS_XIO_01_021: [** If handle is NULL, xio_open shall return a non-zero value. **]** **SRS_XIO_01_022: [** If the underlying concrete_xio_open fails, xio_open shall return a non-zero value. **]** ### xio_close ```c extern int xio_close(XIO_HANDLE xio, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); ``` **SRS_XIO_01_023: [** xio_close shall call the specific concrete_xio_close function specified in xio_create. **]** **SRS_XIO_01_024: [** On success, xio_close shall return 0. **]** **SRS_XIO_01_025: [** If the argument io is NULL, xio_close shall return a non-zero value. **]** **SRS_XIO_01_026: [** If the underlying concrete_xio_close fails, xio_close shall return a non-zero value. **]** ### xio_send ```c extern int xio_send(XIO_HANDLE xio, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); ``` **SRS_XIO_01_008: [** xio_send shall pass the sequence of bytes pointed to by buffer to the concrete IO implementation specified in xio_create, by calling the concrete_xio_send function while passing down the buffer and size arguments to it. **]** **SRS_XIO_01_027: [** xio_send shall pass to the concrete_xio_send function the on_send_complete and callback_context arguments. **]** **SRS_XIO_01_009: [** On success, xio_send shall return 0. **]** **SRS_XIO_01_010: [** If the argument xio is NULL, xio_send shall return a non-zero value. **]** **SRS_XIO_01_015: [** If the underlying concrete_xio_send fails, xio_send shall return a non-zero value. **]** **SRS_XIO_01_011: [** No error check shall be performed on buffer and size. **]** ### xio_dowork ```c extern void xio_dowork(XIO_HANDLE xio); ``` **SRS_XIO_01_012: [** xio_dowork shall call the concrete IO implementation specified in xio_create, by calling the concrete_xio_dowork function. **]** **SRS_XIO_01_013: [** On success, xio_send shall return 0. **]** **SRS_XIO_01_014: [** If the underlying concrete_xio_dowork fails, xio_dowork shall return a non-zero value. **]** **SRS_XIO_01_018: [** When the io argument is NULL, xio_dowork shall do nothing. **]** ### xio_setoption ```c extern int xio_setoption(XIO_HANDLE xio, const char* optionName, const void* value); ``` **SRS_XIO_03_028: [** xio_setoption shall pass the optionName and value to the concrete IO implementation specified in xio_create by invoking the concrete_xio_setoption function. **]** **SRS_XIO_03_029: [** xio_setoption shall return 0 upon success. **]** **SRS_XIO_03_030: [** If the xio argument or the optionName argument is NULL, xio_setoption shall return a non-zero value. **]** **SRS_XIO_03_031: [** If the underlying concrete_xio_setoption fails, xio_setOption shall return a non-zero value. **]** ### xio_retrieveoptions ``` OPTIONHANDLER_HANDLE xio_retrieveoptions(XIO_HANDLE xio) ``` **SRS_XIO_02_001: [** If argument `xio` is `NULL` then `xio_retrieveoptions` shall fail and return `NULL`. **]** **SRS_XIO_02_002: [** `xio_retrieveoptions` shall create a `OPTIONHANDLER_HANDLE` by calling `OptionHandler_Create` passing `xio_setoption` as `setOption` argument and `xio_CloneOption` and `xio_DestroyOption` for `cloneOption` and `destroyOption`. **]** **SRS_XIO_02_003: [** `xio_retrieveoptions` shall retrieve the concrete handle's options by a call to `concrete_io_retrieveoptions`. **]** **SRS_XIO_02_004: [** `xio_retrieveoptions` shall add a hardcoded option named `concreteOptions` having the same content as the concrete handle's options. **]** **SRS_XIO_02_005: [** If any operation fails, then `xio_retrieveoptions` shall fail and return NULL. **]** **SRS_XIO_02_006: [** Otherwise, `xio_retrieveoptions` shall succeed and return a non-NULL handle. **]** azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/000077500000000000000000000000001362133436400301055ustar00rootroot00000000000000azure_c_shared_utility/000077500000000000000000000000001362133436400345675ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/incagenttime.h000066400000000000000000000034521362133436400367210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file agenttime.h * @brief Function prototypes for time related functions. * * @details These functions are implemented with C standard functions, * and therefore they are platform independent. But then a platform * can replace these functions with its own implementation as necessary. */ #ifndef AGENTTIME_H #define AGENTTIME_H #include #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /** @brief Get current calendar time. * * @details This function provides the same functionality as the * standard C @c time() function. */ MOCKABLE_FUNCTION(, time_t, get_time, time_t*, currentTime); /** @brief Get UTC in @c tm struct. * * @details This function provides the same functionality as the * standard C @c gmtime() function. */ MOCKABLE_FUNCTION(, struct tm*, get_gmtime, time_t*, currentTime); /** @brief Get current time representation of the given calendar time. * * @details This function provides the same functionality as the * standard C @c mktime() function. */ MOCKABLE_FUNCTION(, time_t, get_mktime, struct tm*, cal_time); /** @brief Gets a C-string representation of the given time. * * @details This function provides the same functionality as the * standard C @c ctime() function. */ MOCKABLE_FUNCTION(, char*, get_ctime, time_t*, timeToGet); /** @brief Gets the difference in seconds between @c stopTime and * @c startTime. * * @details This function provides the same functionality as the * standard C @c difftime() function. */ MOCKABLE_FUNCTION(, double, get_difftime, time_t, stopTime, time_t, startTime); #ifdef __cplusplus } #endif #endif // AGENTTIME_H base32.h000066400000000000000000000031701362133436400360200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef BASE32_H #define BASE32_H #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #include "azure_c_shared_utility/umock_c_prod.h" /** * @brief Encodes the BUFFER_HANDLE to a base 32 STRING_HANDLE * * @param input BUFFER_HANDLE of the unsigned char* to be encoded * * @return A base32 encoded STRING_HANDLE that will need to be deallocated */ MOCKABLE_FUNCTION(, STRING_HANDLE, Base32_Encode, BUFFER_HANDLE, input); /** * @brief Encodes the BUFFER_HANDLE to a base 32 char* * * @param source An unsigned char* to be encoded * @param size The lenght in bytes of the source variable * * @return A base32 encoded string that will need to be deallocated */ MOCKABLE_FUNCTION(, char*, Base32_Encode_Bytes, const unsigned char*, source, size_t, size); /** * @brief Decodes a base32 encoded STRING_HANDLE to a BUFFER_HANDLE * * @param handle STRING_HANDLE of a base32 encode string * * @return A BUFFER_HANDLE of the result of decoding the handle */ MOCKABLE_FUNCTION(, BUFFER_HANDLE, Base32_Decode, STRING_HANDLE, handle); /** * @brief Decodes a base32 encoded char* to a BUFFER_HANDLE * * @param source char* of a base32 encode string * * @return A BUFFER_HANDLE of the result of decoding the source */ MOCKABLE_FUNCTION(, BUFFER_HANDLE, Base32_Decode_String, const char*, source); #ifdef __cplusplus } #endif #endif /* BASE64_H */ base64.h000066400000000000000000000065761362133436400360420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file base64.h * @brief Prototypes for functions related to encoding/decoding * a @c buffer using standard base64 encoding. */ #ifndef BASE64_H #define BASE64_H #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #include "azure_c_shared_utility/umock_c_prod.h" /** * @brief Base64 encodes a buffer and returns the resulting string. * * @param input The buffer that needs to be base64 encoded. * * Base64_Encoder takes as a parameter a pointer to a BUFFER. If @p input is @c NULL then * @c Base64_Encoder returns @c NULL. The size of the BUFFER pointed to by @p input may * be zero. If when allocating memory to produce the encoding a failure occurs, then @c * Base64_Encoder returns @c NULL. Otherwise * @c Base64_Encoder returns a pointer to a STRING. That string contains the * base 64 encoding of the @p input. This encoding of @p input will not contain embedded * line feeds. * * @return A @c STRING_HANDLE containing the base64 encoding of @p input. */ MOCKABLE_FUNCTION(, STRING_HANDLE, Base64_Encoder, BUFFER_HANDLE, input); /** * @brief Base64 encodes the buffer pointed to by @p source and returns the resulting string. * * @param source The buffer that needs to be base64 encoded. * @param size The size. * * This function produces a @c STRING_HANDLE containing the base64 encoding of the * buffer pointed to by @p source, having the size as given by * @p size. If @p source is @c NULL then @c Base64_Encode_Bytes returns @c NULL * If @p source is not @c NULL and @p size is zero, then @c Base64_Encode_Bytes produces * an empty @c STRING_HANDLE. Otherwise, @c Base64_Encode_Bytes produces a * @c STRING_HANDLE containing the Base64 representation of the buffer. In case of * any errors, @c Base64_Encode_Bytes returns @c NULL.]. * * @return @c NULL in case an error occurs or a @c STRING_HANDLE containing the base64 encoding * of @p input. * */ MOCKABLE_FUNCTION(, STRING_HANDLE, Base64_Encode_Bytes, const unsigned char*, source, size_t, size); /** * @brief Base64 decodes the buffer pointed to by @p source and returns the resulting buffer. * * @param source A base64 encoded string buffer. * * This function decodes the string pointed at by @p source using base64 decoding and * returns the resulting buffer. If @p source is @c NULL then * @c Base64_Decoder returns NULL. If the string pointed to by @p source is zero * length then the handle returned refers to a zero length buffer. If there is any * memory allocation failure during the decode or if the source string has an invalid * length for a base 64 encoded string then @c Base64_Decoder returns @c NULL. * * @return A @c BUFFER_HANDLE pointing to a buffer containing the result of base64 decoding @p * source. */ MOCKABLE_FUNCTION(, BUFFER_HANDLE, Base64_Decoder, const char*, source); #ifdef __cplusplus } #endif #endif /* BASE64_H */ buffer_.h000066400000000000000000000035021362133436400363500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef BUFFER_H #define BUFFER_H #ifdef __cplusplus #include extern "C" { #else #include #include #endif #include "azure_c_shared_utility/umock_c_prod.h" typedef struct BUFFER_TAG* BUFFER_HANDLE; MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_new); MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_create, const unsigned char*, source, size_t, size); MOCKABLE_FUNCTION(, void, BUFFER_delete, BUFFER_HANDLE, handle); MOCKABLE_FUNCTION(, int, BUFFER_pre_build, BUFFER_HANDLE, handle, size_t, size); MOCKABLE_FUNCTION(, int, BUFFER_build, BUFFER_HANDLE, handle, const unsigned char*, source, size_t, size); MOCKABLE_FUNCTION(, int, BUFFER_append_build, BUFFER_HANDLE, handle, const unsigned char*, source, size_t, size); MOCKABLE_FUNCTION(, int, BUFFER_unbuild, BUFFER_HANDLE, handle); MOCKABLE_FUNCTION(, int, BUFFER_enlarge, BUFFER_HANDLE, handle, size_t, enlargeSize); MOCKABLE_FUNCTION(, int, BUFFER_shrink, BUFFER_HANDLE, handle, size_t, decreaseSize, bool, fromEnd); MOCKABLE_FUNCTION(, int, BUFFER_content, BUFFER_HANDLE, handle, const unsigned char**, content); MOCKABLE_FUNCTION(, int, BUFFER_size, BUFFER_HANDLE, handle, size_t*, size); MOCKABLE_FUNCTION(, int, BUFFER_append, BUFFER_HANDLE, handle1, BUFFER_HANDLE, handle2); MOCKABLE_FUNCTION(, int, BUFFER_prepend, BUFFER_HANDLE, handle1, BUFFER_HANDLE, handle2); MOCKABLE_FUNCTION(, int, BUFFER_fill, BUFFER_HANDLE, handle, unsigned char, fill_char); MOCKABLE_FUNCTION(, unsigned char*, BUFFER_u_char, BUFFER_HANDLE, handle); MOCKABLE_FUNCTION(, size_t, BUFFER_length, BUFFER_HANDLE, handle); MOCKABLE_FUNCTION(, BUFFER_HANDLE, BUFFER_clone, BUFFER_HANDLE, handle); #ifdef __cplusplus } #endif #endif /* BUFFER_H */ condition.h000066400000000000000000000040111362133436400367220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CONDITION_H #define CONDITION_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif typedef void* COND_HANDLE; #define COND_RESULT_VALUES \ COND_OK, \ COND_INVALID_ARG, \ COND_ERROR, \ COND_TIMEOUT \ /** * @brief Enumeration specifying the lock status. */ DEFINE_ENUM(COND_RESULT, COND_RESULT_VALUES); /** * @brief This API creates and returns a valid condition handle. * * @return A valid @c COND_HANDLE when successful or @c NULL otherwise. */ MOCKABLE_FUNCTION(, COND_HANDLE, Condition_Init); /** * @brief unblock all currently working condition. * * @param handle A valid handle to the lock. * * @return Returns @c COND_OK when the condition object has been * destroyed and @c COND_ERROR when an error occurs * and @c COND_TIMEOUT when the handle times out. */ MOCKABLE_FUNCTION(, COND_RESULT, Condition_Post, COND_HANDLE, handle); /** * @brief block on the condition handle unti the thread is signalled * or until the timeout_milliseconds is reached. * * @param handle A valid handle to the lock. * * @return Returns @c COND_OK when the condition object has been * destroyed and @c COND_ERROR when an error occurs * and @c COND_TIMEOUT when the handle times out. */ MOCKABLE_FUNCTION(, COND_RESULT, Condition_Wait, COND_HANDLE, handle, LOCK_HANDLE, lock, int, timeout_milliseconds); /** * @brief The condition instance is deinitialized. * * @param handle A valid handle to the condition. * * @return Returns @c COND_OK when the condition object has been * destroyed and @c COND_ERROR when an error occurs. */ MOCKABLE_FUNCTION(, void, Condition_Deinit, COND_HANDLE, handle); #ifdef __cplusplus } #endif #endif /* CONDITION_H */ connection_string_parser.h000066400000000000000000000017351362133436400420470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CONNECTION_STRING_PARSER_H #define CONNECTION_STRING_PARSER_H #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/strings.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, MAP_HANDLE, connectionstringparser_parse_from_char, const char*, connection_string); MOCKABLE_FUNCTION(, MAP_HANDLE, connectionstringparser_parse, STRING_HANDLE, connection_string); MOCKABLE_FUNCTION(, int, connectionstringparser_splitHostName_from_char, const char*, hostName, STRING_HANDLE, nameString, STRING_HANDLE, suffixString); MOCKABLE_FUNCTION(, int, connectionstringparser_splitHostName, STRING_HANDLE, hostNameString, STRING_HANDLE, nameString, STRING_HANDLE, suffixString); #ifdef __cplusplus } #endif #endif /* CONNECTION_STRING_PARSER_H */ consolelogger.h000066400000000000000000000013131362133436400376000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CONSOLELOGGER_H #define CONSOLELOGGER_H #include "azure_c_shared_utility/xlogging.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern void consolelogger_log(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...); #if (defined(_MSC_VER)) && (!(defined WINCE)) extern void consolelogger_log_with_GetLastError(const char* file, const char* func, int line, const char* format, ...); #endif #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CONSOLELOGGER_H */ const_defines.h000066400000000000000000000012571362133436400375700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CONST_DEFINES_H #define CONST_DEFINES_H // Used to remove GCC warning unused #ifdef __GNUC__ #define STATIC_VAR_UNUSED __attribute__ ((unused)) #else #define STATIC_VAR_UNUSED #endif #ifndef AZURE_UNREFERENCED_PARAMETER #define AZURE_UNREFERENCED_PARAMETER(param) (void)(param) #endif #ifdef _MSC_VER #define AZURE_DEPRECATED __declspec(deprecated) #elif defined(__GNUC__) | defined(__clang__) #define AZURE_DEPRECATED __attribute__((__deprecated__)) #else #define AZURE_DEPRECATED #endif #endif // CONST_DEFINES constbuffer.h000066400000000000000000000024341362133436400372630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CONSTBUFFER_H #define CONSTBUFFER_H #include "azure_c_shared_utility/buffer_.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #include "azure_c_shared_utility/umock_c_prod.h" /*this is the handle*/ typedef struct CONSTBUFFER_HANDLE_DATA_TAG* CONSTBUFFER_HANDLE; /*this is what is returned when the content of the buffer needs access*/ typedef struct CONSTBUFFER_TAG { const unsigned char* buffer; size_t size; } CONSTBUFFER; /*this creates a new constbuffer from a memory area*/ MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_Create, const unsigned char*, source, size_t, size); /*this creates a new constbuffer from an existing BUFFER_HANDLE*/ MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_CreateFromBuffer, BUFFER_HANDLE, buffer); MOCKABLE_FUNCTION(, CONSTBUFFER_HANDLE, CONSTBUFFER_Clone, CONSTBUFFER_HANDLE, constbufferHandle); MOCKABLE_FUNCTION(, const CONSTBUFFER*, CONSTBUFFER_GetContent, CONSTBUFFER_HANDLE, constbufferHandle); MOCKABLE_FUNCTION(, void, CONSTBUFFER_Destroy, CONSTBUFFER_HANDLE, constbufferHandle); #ifdef __cplusplus } #endif #endif /* CONSTBUFFER_H */ constmap.h000066400000000000000000000111271362133436400365660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file constmap.h * @brief ConstMap is a module that implements a read-only dictionary * of @c const char* keys to @c const char* values. */ #ifndef CONSTMAP_H #define CONSTMAP_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #define CONSTMAP_RESULT_VALUES \ CONSTMAP_OK, \ CONSTMAP_ERROR, \ CONSTMAP_INVALIDARG, \ CONSTMAP_KEYNOTFOUND /** @brief Enumeration specifying the status of calls to various APIs in this * module. */ DEFINE_ENUM(CONSTMAP_RESULT, CONSTMAP_RESULT_VALUES); typedef struct CONSTMAP_HANDLE_DATA_TAG* CONSTMAP_HANDLE; /** * @brief Creates a new read-only map from a map handle. * * @param sourceMap The map from which we will populate key,value * into the read-only map. * * @return A valid @c CONSTMAP_HANDLE or @c NULL in case an error occurs. */ MOCKABLE_FUNCTION(, CONSTMAP_HANDLE, ConstMap_Create, MAP_HANDLE, sourceMap); /** * @brief Destroy a read-only map. Deallocate memory associated with handle. * @param handle Handle to a read-only map. */ MOCKABLE_FUNCTION(, void, ConstMap_Destroy, CONSTMAP_HANDLE, handle); /** * @brief Clone a read-only map from another read-only map. * @param handle Handle to a read-only map. * @return A valid @c CONSTMAP_HANDLE or @c NULL in case an error occurs. */ MOCKABLE_FUNCTION(, CONSTMAP_HANDLE, ConstMap_Clone, CONSTMAP_HANDLE, handle); /** * @brief Create a map handle populated from the read-only map. * @param handle Handle to a read-only map. * @return A valid @c MAP_HANDLE or @c NULL in case an error occurs. * * The new MAP_HANDLE needs to be destroyed when it is no longer needed. */ MOCKABLE_FUNCTION(, MAP_HANDLE, ConstMap_CloneWriteable, CONSTMAP_HANDLE, handle); /** * @brief This function returns a true if the map contains a key * with the same value the parameter @p key. * * @param handle The handle to an existing map. * @param key The key that the caller wants checked. * * @return The function returns @c true if the key exists * in the map and @c false if key is not found or * parameters are invalid. */ MOCKABLE_FUNCTION(, bool, ConstMap_ContainsKey, CONSTMAP_HANDLE, handle, const char*, key); /** * @brief This function returns @c true if at least one pair * exists in the map where the entry's value is equal to the * parameter @c value. * * @param handle The handle to an existing map. * @param value The value that the caller wants checked. * * @return The function returns @c true if the value exists * in the map and @c false if value is not found or * parameters are invalid. */ MOCKABLE_FUNCTION(, bool, ConstMap_ContainsValue, CONSTMAP_HANDLE, handle, const char*, value); /** * @brief Retrieves the value of a stored key. * * @param handle The handle to an existing map. * @param key The key to be looked up in the map. * * @return Returns @c NULL in case the input arguments are @c NULL or if the * requested key is not found in the map. Returns a pointer to the * key's value otherwise. */ MOCKABLE_FUNCTION(, const char*, ConstMap_GetValue, CONSTMAP_HANDLE, handle, const char*, key); /** * @brief Retrieves the complete list of keys and values from the map * in @p values and @p keys. Also writes the size of the list * in @p count. * * @param handle The handle to an existing map. * @param keys The location where the list of keys is to be written. * @param values The location where the list of values is to be written. * @param count The number of stored keys and values is written at the * location indicated by this pointer. * * @return Returns @c CONSTMAP_OK if the keys and values are retrieved * and written successfully or an error code otherwise. */ MOCKABLE_FUNCTION(, CONSTMAP_RESULT, ConstMap_GetInternals, CONSTMAP_HANDLE, handle, const char*const**, keys, const char*const**, values, size_t*, count); #ifdef __cplusplus } #endif #endif /* CONSTMAP_H */ crt_abstractions.h000066400000000000000000000111671362133436400403120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CRT_ABSTRACTIONS_H #define CRT_ABSTRACTIONS_H #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include #include #include #include extern "C" { #else // __cplusplus #include #include #include #endif // __cplusplus #ifdef _MSC_VER #ifdef QUARKGALILEO #define HAS_STDBOOL #ifdef __cplusplus typedef bool _Bool; #else /*galileo apparently has _Bool and bool as built in types*/ #endif #endif // QUARKGALILEO #ifndef _WIN32_WCE #define HAS_STDBOOL #ifdef __cplusplus /*because C++ doesn't do anything about _Bool... */ #define _Bool bool #else // __cplusplus #include #endif // __cplusplus #else // _WIN32_WCE /* WINCE does not support bool as C datatype */ #define __bool_true_false_are_defined 1 #define HAS_STDBOOL #define _Bool bool #ifdef __cplusplus #define _CSTDBOOL_ #else // __cplusplus typedef unsigned char bool; #define false 0 #define true 1 #endif // __cplusplus #endif // _WIN32_WCE #else // _MSC_VER #if defined __STDC_VERSION__ #if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) /*C99 compiler or C11*/ #define HAS_STDBOOL #include #endif // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) #endif // __STDC_VERSION__ #endif // _MSC_VER #ifndef HAS_STDBOOL #ifdef __cplusplus #define _Bool bool #else // __cplusplus typedef unsigned char _Bool; typedef unsigned char bool; #define false 0 #define true 1 #endif // __cplusplus #endif // HAS_STDBOOL /* Codes_SRS_CRT_ABSTRACTIONS_99_001:[The module shall not redefine the secure functions implemented by Microsoft CRT.] */ /* Codes_SRS_CRT_ABSTRACTIONS_99_040 : [The module shall still compile when building on a Microsoft platform.] */ /* Codes_SRS_CRT_ABSTRACTIONS_99_002: [CRTAbstractions module shall expose the following API]*/ #if defined (_MSC_VER) || defined (MINGW_HAS_SECURE_API) #else // _MSC_VER || MINGW_HAS_SECURE_API /* Adding definitions from errno.h & crtdefs.h */ #if !defined (_TRUNCATE) #define _TRUNCATE ((size_t)-1) #endif /* !defined (_TRUNCATE) */ #if !defined STRUNCATE #define STRUNCATE 80 #endif /* !defined (STRUNCATE) */ extern int strcpy_s(char* dst, size_t dstSizeInBytes, const char* src); extern int strcat_s(char* dst, size_t dstSizeInBytes, const char* src); extern int strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t maxCount); extern int sprintf_s(char* dst, size_t dstSizeInBytes, const char* format, ...); #endif // _MSC_VER || MINGW_HAS_SECURE_API extern unsigned long long strtoull_s(const char* nptr, char** endPtr, int base); extern float strtof_s(const char* nptr, char** endPtr); extern long double strtold_s(const char* nptr, char** endPtr); #ifdef _MSC_VER #define stricmp _stricmp #endif // _MSC_VER MOCKABLE_FUNCTION(, int, mallocAndStrcpy_s, char**, destination, const char*, source); MOCKABLE_FUNCTION(, int, unsignedIntToString, char*, destination, size_t, destinationSize, unsigned int, value); MOCKABLE_FUNCTION(, int, size_tToString, char*, destination, size_t, destinationSize, size_t, value); /*following logic shall define the TOUPPER and ISDIGIT, we do that because the SDK is not happy with some Arduino implementation of it.*/ #define TOUPPER(c) ((((c)>='a') && ((c)<='z'))?(c)-'a'+'A':c) #define ISDIGIT(c) ((((c)>='0') && ((c)<='9'))?1:0) /*following logic shall define the ISNAN macro*/ /*if runing on Microsoft Visual C compiler, than ISNAN shall be _isnan*/ /*else if running on C99 or C11, ISNAN shall be isnan*/ /*else if running on C89 ... #error and inform user*/ #ifdef _MSC_VER #define ISNAN _isnan #else // _MSC_VER #if defined __STDC_VERSION__ #if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) /*C99 compiler or C11*/ #define ISNAN isnan #else // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) #error update this file to contain the latest C standard. #endif // ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) #else // __STDC_VERSION__ #ifdef __cplusplus /*C++ defines isnan... in C11*/ extern "C++" { #define ISNAN std::isnan } #else // __cplusplus #error unknown (or C89) compiler, provide ISNAN with the same meaning as isnan in C99 standard #endif // __cplusplus #endif // __STDC_VERSION__ #endif // _MSC_VER #ifdef __cplusplus } #endif // __cplusplus #endif /* CRT_ABSTRACTIONS_H */ doublylinkedlist.h000066400000000000000000000025671362133436400403330ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef DOUBLYLINKEDLIST_H #define DOUBLYLINKEDLIST_H #ifdef __cplusplus #include extern "C" { #else #include #endif #include #include "azure_c_shared_utility/umock_c_prod.h" typedef struct DLIST_ENTRY_TAG { struct DLIST_ENTRY_TAG *Flink; struct DLIST_ENTRY_TAG *Blink; } DLIST_ENTRY, *PDLIST_ENTRY; MOCKABLE_FUNCTION(, void, DList_InitializeListHead, PDLIST_ENTRY, listHead); MOCKABLE_FUNCTION(, int, DList_IsListEmpty, const PDLIST_ENTRY, listHead); MOCKABLE_FUNCTION(, void, DList_InsertTailList, PDLIST_ENTRY, listHead, PDLIST_ENTRY, listEntry); MOCKABLE_FUNCTION(, void, DList_InsertHeadList, PDLIST_ENTRY, listHead, PDLIST_ENTRY, listEntry); MOCKABLE_FUNCTION(, void, DList_AppendTailList, PDLIST_ENTRY, listHead, PDLIST_ENTRY, ListToAppend); MOCKABLE_FUNCTION(, int, DList_RemoveEntryList, PDLIST_ENTRY, listEntry); MOCKABLE_FUNCTION(, PDLIST_ENTRY, DList_RemoveHeadList, PDLIST_ENTRY, listHead); // // Calculate the address of the base of the structure given its type, and an // address of a field within the structure. // #define containingRecord(address, type, field) ((type *)((uintptr_t)(address) - offsetof(type,field))) #ifdef __cplusplus } #else #endif #endif /* DOUBLYLINKEDLIST_H */ envvariable.h000066400000000000000000000010221362133436400372310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef ENV_VARIABLE_H #define ENV_VARIABLE_H #include "azure_c_shared_utility/macro_utils.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #include "azure_c_shared_utility/umock_c_prod.h" MOCKABLE_FUNCTION(, const char*, environment_get_variable, const char*, variable_name); #ifdef __cplusplus } #endif #endif /* ENV_VARIABLE_H */ etwlogger.h000066400000000000000000000416271362133436400367510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility//**********************************************************************` //* This is an include file generated by Message Compiler. *` //* *` //* Copyright (c) Microsoft Corporation. All Rights Reserved. *` //**********************************************************************` #pragma once #include #include #include "evntprov.h" // // Initial Defs // #if !defined(ETW_INLINE) #define ETW_INLINE DECLSPEC_NOINLINE __inline #endif #if defined(__cplusplus) extern "C" { #endif // // Allow disabling of code generation // #ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION #if !defined(McGenDebug) #define McGenDebug(a,b) #endif #if !defined(MCGEN_TRACE_CONTEXT_DEF) #define MCGEN_TRACE_CONTEXT_DEF typedef struct _MCGEN_TRACE_CONTEXT { TRACEHANDLE RegistrationHandle; TRACEHANDLE Logger; ULONGLONG MatchAnyKeyword; ULONGLONG MatchAllKeyword; ULONG Flags; ULONG IsEnabled; UCHAR Level; UCHAR Reserve; USHORT EnableBitsCount; PULONG EnableBitMask; const ULONGLONG* EnableKeyWords; const UCHAR* EnableLevel; } MCGEN_TRACE_CONTEXT, *PMCGEN_TRACE_CONTEXT; #endif #if !defined(MCGEN_LEVEL_KEYWORD_ENABLED_DEF) #define MCGEN_LEVEL_KEYWORD_ENABLED_DEF FORCEINLINE BOOLEAN McGenLevelKeywordEnabled( _In_ PMCGEN_TRACE_CONTEXT EnableInfo, _In_ UCHAR Level, _In_ ULONGLONG Keyword ) { // // Check if the event Level is lower than the level at which // the channel is enabled. // If the event Level is 0 or the channel is enabled at level 0, // all levels are enabled. // if ((Level <= EnableInfo->Level) || // This also covers the case of Level == 0. (EnableInfo->Level == 0)) { // // Check if Keyword is enabled // if ((Keyword == (ULONGLONG)0) || ((Keyword & EnableInfo->MatchAnyKeyword) && ((Keyword & EnableInfo->MatchAllKeyword) == EnableInfo->MatchAllKeyword))) { return TRUE; } } return FALSE; } #endif #if !defined(MCGEN_EVENT_ENABLED_DEF) #define MCGEN_EVENT_ENABLED_DEF FORCEINLINE BOOLEAN McGenEventEnabled( _In_ PMCGEN_TRACE_CONTEXT EnableInfo, _In_ PCEVENT_DESCRIPTOR EventDescriptor ) { return McGenLevelKeywordEnabled(EnableInfo, EventDescriptor->Level, EventDescriptor->Keyword); } #endif // // EnableCheckMacro // #ifndef MCGEN_ENABLE_CHECK #define MCGEN_ENABLE_CHECK(Context, Descriptor) (Context.IsEnabled && McGenEventEnabled(&Context, &Descriptor)) #endif #if !defined(MCGEN_CONTROL_CALLBACK) #define MCGEN_CONTROL_CALLBACK DECLSPEC_NOINLINE __inline VOID __stdcall McGenControlCallbackV2( _In_ LPCGUID SourceId, _In_ ULONG ControlCode, _In_ UCHAR Level, _In_ ULONGLONG MatchAnyKeyword, _In_ ULONGLONG MatchAllKeyword, _In_opt_ PEVENT_FILTER_DESCRIPTOR FilterData, _Inout_opt_ PVOID CallbackContext ) /*++ Routine Description: This is the notification callback for Windows Vista and later. Arguments: SourceId - The GUID that identifies the session that enabled the provider. ControlCode - The parameter indicates whether the provider is being enabled or disabled. Level - The level at which the event is enabled. MatchAnyKeyword - The bitmask of keywords that the provider uses to determine the category of events that it writes. MatchAllKeyword - This bitmask additionally restricts the category of events that the provider writes. FilterData - The provider-defined data. CallbackContext - The context of the callback that is defined when the provider called EtwRegister to register itself. Remarks: ETW calls this function to notify provider of enable/disable --*/ { PMCGEN_TRACE_CONTEXT Ctx = (PMCGEN_TRACE_CONTEXT)CallbackContext; ULONG Ix; #ifndef MCGEN_PRIVATE_ENABLE_CALLBACK_V2 UNREFERENCED_PARAMETER(SourceId); UNREFERENCED_PARAMETER(FilterData); #endif if (Ctx == NULL) { return; } switch (ControlCode) { case EVENT_CONTROL_CODE_ENABLE_PROVIDER: Ctx->Level = Level; Ctx->MatchAnyKeyword = MatchAnyKeyword; Ctx->MatchAllKeyword = MatchAllKeyword; Ctx->IsEnabled = EVENT_CONTROL_CODE_ENABLE_PROVIDER; for (Ix = 0; Ix < Ctx->EnableBitsCount; Ix += 1) { if (McGenLevelKeywordEnabled(Ctx, Ctx->EnableLevel[Ix], Ctx->EnableKeyWords[Ix]) != FALSE) { Ctx->EnableBitMask[Ix >> 5] |= (1 << (Ix % 32)); } else { Ctx->EnableBitMask[Ix >> 5] &= ~(1 << (Ix % 32)); } } break; case EVENT_CONTROL_CODE_DISABLE_PROVIDER: Ctx->IsEnabled = EVENT_CONTROL_CODE_DISABLE_PROVIDER; Ctx->Level = 0; Ctx->MatchAnyKeyword = 0; Ctx->MatchAllKeyword = 0; if (Ctx->EnableBitsCount > 0) { RtlZeroMemory(Ctx->EnableBitMask, (((Ctx->EnableBitsCount - 1) / 32) + 1) * sizeof(ULONG)); } break; default: break; } #ifdef MCGEN_PRIVATE_ENABLE_CALLBACK_V2 // // Call user defined callback // MCGEN_PRIVATE_ENABLE_CALLBACK_V2( SourceId, ControlCode, Level, MatchAnyKeyword, MatchAllKeyword, FilterData, CallbackContext ); #endif return; } #endif #endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION //+ // Provider Microsoft-ServiceBus Event Count 4 //+ EXTERN_C __declspec(selectany) const GUID MicrosoftServiceBus = {0x4ccaa233, 0x6675, 0x4ec5, {0xb3, 0xa6, 0x1a, 0xa6, 0x8b, 0x7c, 0x8a, 0xe9}}; // // Channel // #define Debug 0x10 #define Operational 0x11 // // Opcodes // #define _loginfo 0xa #define _logerror 0xb #define _logdebug 0xc #define _loglasterror 0xd // // Tasks // #define Log 0x1 EXTERN_C __declspec(selectany) const GUID LogId = {0xf66f77b5, 0x170a, 0x41a5, {0x97, 0x04, 0xc0, 0xca, 0xea, 0xa3, 0x8f, 0x54}}; // // Keyword // #define _kw_loginfo 0x1 #define _kw_logerror 0x2 #define _kw_logdebug 0x4 #define _kw_loglasterror 0x8 // // Event Descriptors // EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR LogInfoEvent = {0x1, 0x0, 0x11, 0x4, 0xa, 0x1, 0x4000000000000001}; #define LogInfoEvent_value 0x1 EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR LogErrorEvent = {0x2, 0x0, 0x11, 0x2, 0xb, 0x1, 0x4000000000000002}; #define LogErrorEvent_value 0x2 EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR LogDebugEvent = {0x3, 0x0, 0x10, 0x4, 0xc, 0x1, 0x8000000000000004}; #define LogDebugEvent_value 0x3 EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR LogLastError = {0x4, 0x0, 0x11, 0x2, 0xd, 0x1, 0x4000000000000008}; #define LogLastError_value 0x4 // // Note on Generate Code from Manifest for Windows Vista and above // //Structures : are handled as a size and pointer pairs. The macro for the event will have an extra //parameter for the size in bytes of the structure. Make sure that your structures have no extra padding. // //Strings: There are several cases that can be described in the manifest. For array of variable length //strings, the generated code will take the count of characters for the whole array as an input parameter. // //SID No support for array of SIDs, the macro will take a pointer to the SID and use appropriate //GetLengthSid function to get the length. // // // Allow disabling of code generation // #ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION // // Globals // // // Event Enablement Bits // EXTERN_C __declspec(selectany) DECLSPEC_CACHEALIGN ULONG Microsoft_ServiceBusEnableBits[1]; EXTERN_C __declspec(selectany) const ULONGLONG Microsoft_ServiceBusKeywords[4] = {0x4000000000000001, 0x4000000000000002, 0x8000000000000004, 0x4000000000000008}; EXTERN_C __declspec(selectany) const UCHAR Microsoft_ServiceBusLevels[4] = {4, 2, 4, 2}; EXTERN_C __declspec(selectany) MCGEN_TRACE_CONTEXT MicrosoftServiceBus_Context = {0, 0, 0, 0, 0, 0, 0, 0, 4, Microsoft_ServiceBusEnableBits, Microsoft_ServiceBusKeywords, Microsoft_ServiceBusLevels}; EXTERN_C __declspec(selectany) REGHANDLE Microsoft_ServiceBusHandle = (REGHANDLE)0; #if !defined(McGenEventRegisterUnregister) #define McGenEventRegisterUnregister #pragma warning(push) #pragma warning(disable:6103) DECLSPEC_NOINLINE __inline ULONG __stdcall McGenEventRegister( _In_ LPCGUID ProviderId, _In_opt_ PENABLECALLBACK EnableCallback, _In_opt_ PVOID CallbackContext, _Inout_ PREGHANDLE RegHandle ) /*++ Routine Description: This function registers the provider with ETW USER mode. Arguments: ProviderId - Provider ID to be register with ETW. EnableCallback - Callback to be used. CallbackContext - Context for this provider. RegHandle - Pointer to registration handle. Remarks: If the handle != NULL will return ERROR_SUCCESS --*/ { ULONG Error; if (*RegHandle) { // // already registered // return ERROR_SUCCESS; } Error = EventRegister( ProviderId, EnableCallback, CallbackContext, RegHandle); return Error; } #pragma warning(pop) DECLSPEC_NOINLINE __inline ULONG __stdcall McGenEventUnregister(_Inout_ PREGHANDLE RegHandle) /*++ Routine Description: Unregister from ETW USER mode Arguments: RegHandle this is the pointer to the provider context Remarks: If provider has not been registered, RegHandle == NULL, return ERROR_SUCCESS --*/ { ULONG Error; if(!(*RegHandle)) { // // Provider has not registerd // return ERROR_SUCCESS; } Error = EventUnregister(*RegHandle); *RegHandle = (REGHANDLE)0; return Error; } #endif // // Register with ETW Vista + // #ifndef EventRegisterMicrosoft_ServiceBus #define EventRegisterMicrosoft_ServiceBus() McGenEventRegister(&MicrosoftServiceBus, McGenControlCallbackV2, &MicrosoftServiceBus_Context, &Microsoft_ServiceBusHandle) #endif // // UnRegister with ETW // #ifndef EventUnregisterMicrosoft_ServiceBus #define EventUnregisterMicrosoft_ServiceBus() McGenEventUnregister(&Microsoft_ServiceBusHandle) #endif // // Enablement check macro for LogInfoEvent // #define EventEnabledLogInfoEvent() ((Microsoft_ServiceBusEnableBits[0] & 0x00000001) != 0) // // Event Macro for LogInfoEvent // #define EventWriteLogInfoEvent(content)\ EventEnabledLogInfoEvent() ?\ Template_s(Microsoft_ServiceBusHandle, &LogInfoEvent, content)\ : ERROR_SUCCESS\ // // Enablement check macro for LogErrorEvent // #define EventEnabledLogErrorEvent() ((Microsoft_ServiceBusEnableBits[0] & 0x00000002) != 0) // // Event Macro for LogErrorEvent // #define EventWriteLogErrorEvent(content, file, time, function, line)\ EventEnabledLogErrorEvent() ?\ Template_ssysq(Microsoft_ServiceBusHandle, &LogErrorEvent, content, file, time, function, line)\ : ERROR_SUCCESS\ // // Enablement check macro for LogDebugEvent // #define EventEnabledLogDebugEvent() ((Microsoft_ServiceBusEnableBits[0] & 0x00000004) != 0) // // Event Macro for LogDebugEvent // #define EventWriteLogDebugEvent(content, file, time, function, line)\ EventEnabledLogDebugEvent() ?\ Template_ssysq(Microsoft_ServiceBusHandle, &LogDebugEvent, content, file, time, function, line)\ : ERROR_SUCCESS\ // // Enablement check macro for LogLastError // #define EventEnabledLogLastError() ((Microsoft_ServiceBusEnableBits[0] & 0x00000008) != 0) // // Event Macro for LogLastError // #define EventWriteLogLastError(content, file, time, function, line, getLastError)\ EventEnabledLogLastError() ?\ Template_ssysqs(Microsoft_ServiceBusHandle, &LogLastError, content, file, time, function, line, getLastError)\ : ERROR_SUCCESS\ #endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION // // Allow Diasabling of code generation // #ifndef MCGEN_DISABLE_PROVIDER_CODE_GENERATION // // Template Functions // // //Template from manifest : _template_log_info // #ifndef Template_s_def #define Template_s_def ETW_INLINE ULONG Template_s( _In_ REGHANDLE RegHandle, _In_ PCEVENT_DESCRIPTOR Descriptor, _In_opt_ LPCSTR _Arg0 ) { #define ARGUMENT_COUNT_s 1 EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_s]; EventDataDescCreate(&EventData[0], (_Arg0 != NULL) ? _Arg0 : "NULL", (_Arg0 != NULL) ? (ULONG)((strlen(_Arg0) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_s, EventData); } #endif // //Template from manifest : _template_log_error // #ifndef Template_ssysq_def #define Template_ssysq_def ETW_INLINE ULONG Template_ssysq( _In_ REGHANDLE RegHandle, _In_ PCEVENT_DESCRIPTOR Descriptor, _In_opt_ LPCSTR _Arg0, _In_opt_ LPCSTR _Arg1, _In_ const SYSTEMTIME* _Arg2, _In_opt_ LPCSTR _Arg3, _In_ const unsigned int _Arg4 ) { #define ARGUMENT_COUNT_ssysq 5 EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_ssysq]; EventDataDescCreate(&EventData[0], (_Arg0 != NULL) ? _Arg0 : "NULL", (_Arg0 != NULL) ? (ULONG)((strlen(_Arg0) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); EventDataDescCreate(&EventData[1], (_Arg1 != NULL) ? _Arg1 : "NULL", (_Arg1 != NULL) ? (ULONG)((strlen(_Arg1) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); EventDataDescCreate(&EventData[2], _Arg2, sizeof(SYSTEMTIME) ); EventDataDescCreate(&EventData[3], (_Arg3 != NULL) ? _Arg3 : "NULL", (_Arg3 != NULL) ? (ULONG)((strlen(_Arg3) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); EventDataDescCreate(&EventData[4], &_Arg4, sizeof(const unsigned int) ); return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_ssysq, EventData); } #endif // //Template from manifest : _template_log_last_error // #ifndef Template_ssysqs_def #define Template_ssysqs_def ETW_INLINE ULONG Template_ssysqs( _In_ REGHANDLE RegHandle, _In_ PCEVENT_DESCRIPTOR Descriptor, _In_opt_ LPCSTR _Arg0, _In_opt_ LPCSTR _Arg1, _In_ const SYSTEMTIME* _Arg2, _In_opt_ LPCSTR _Arg3, _In_ const unsigned int _Arg4, _In_opt_ LPCSTR _Arg5 ) { #define ARGUMENT_COUNT_ssysqs 6 EVENT_DATA_DESCRIPTOR EventData[ARGUMENT_COUNT_ssysqs]; EventDataDescCreate(&EventData[0], (_Arg0 != NULL) ? _Arg0 : "NULL", (_Arg0 != NULL) ? (ULONG)((strlen(_Arg0) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); EventDataDescCreate(&EventData[1], (_Arg1 != NULL) ? _Arg1 : "NULL", (_Arg1 != NULL) ? (ULONG)((strlen(_Arg1) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); EventDataDescCreate(&EventData[2], _Arg2, sizeof(SYSTEMTIME) ); EventDataDescCreate(&EventData[3], (_Arg3 != NULL) ? _Arg3 : "NULL", (_Arg3 != NULL) ? (ULONG)((strlen(_Arg3) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); EventDataDescCreate(&EventData[4], &_Arg4, sizeof(const unsigned int) ); EventDataDescCreate(&EventData[5], (_Arg5 != NULL) ? _Arg5 : "NULL", (_Arg5 != NULL) ? (ULONG)((strlen(_Arg5) + 1) * sizeof(CHAR)) : (ULONG)sizeof("NULL")); return EventWrite(RegHandle, Descriptor, ARGUMENT_COUNT_ssysqs, EventData); } #endif #endif // MCGEN_DISABLE_PROVIDER_CODE_GENERATION #if defined(__cplusplus) }; #endif #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_keyword__loginfo_message 0x10000001L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_Keyword__logerror_message 0x10000002L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_Keyword__logdebug_message 0x10000003L #define MSG_Microsoft_ServiceBus_Keyword__kw_loglasterror_message 0x10000004L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_opcode__loginfo_message 0x3000000AL #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_opcode__logerror_message 0x3000000BL #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_opcode__logdebug_message 0x3000000CL #define MSG_level_Error 0x50000002L #define MSG_level_Informational 0x50000004L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_task_Log_message 0x70000001L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_channel_Debug_message 0x90000001L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_channel_Operational_message 0x90000002L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_event_1_message 0xB0000001L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_event_2_message 0xB0000002L #define MSG_Microsoft_ServiceBus_MessagingStore_BlockStorage_event_3_message 0xB0000003L #define MSG_Microsoft_ServiceBus_event_4_message 0xB0000004L etwlogger_driver.h000066400000000000000000000013141362133436400403110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef ETWLOGGER_DRIVER_H #define ETWLOGGER_DRIVER_H #include "azure_c_shared_utility/xlogging.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern void etwlogger_log(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...); #if (defined(_MSC_VER)) && (!(defined WINCE)) extern void etwlogger_log_with_GetLastError(const char* file, const char* func, int line, const char* format, ...); #endif #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ETWLOGGER_DRIVER_H */ gb_rand.h000066400000000000000000000005571362133436400363430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef GB_RAND_H #define GB_RAND_H #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, int, gb_rand); #ifdef __cplusplus } #endif #endif /* GB_RAND_H */ gb_stdio.h000066400000000000000000000040431362133436400365330ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef GB_STDIO_H #define GB_STDIO_H /*this file, if included instead of has the following functionality: 1) if GB_STDIO_INTERCEPT is defined then a) some of the stdio.h symbols shall be redefined, for example: fopen => gb_fopen b) all "code" using the fopen will actually (because of the preprocessor) call to gb_fopen c) gb_fopen shall blindly call into fopen, thus realizing a passthrough reason is: unittesting. fopen is comes with the C Run Time and cannot be mocked (that is, in the global namespace cannot exist a function called fopen 2) if GB_STDIO_INTERCEPT is not defined then a) it shall include => no passthrough, just direct linking. */ #ifndef GB_STDIO_INTERCEPT #include #else /*source level intercepting of function calls*/ #define fopen fopen_never_called_never_implemented_always_forgotten #define fclose fclose_never_called_never_implemented_always_forgotten #define fseek fseek_never_called_never_implemented_always_forgotten #define ftell ftell_never_called_never_implemented_always_forgotten #define fprintf fprintf_never_called_never_implemented_always_forgotten #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #undef fopen #define fopen gb_fopen MOCKABLE_FUNCTION(, FILE*, gb_fopen, const char*, filename, const char*, mode); #undef fclose #define fclose gb_fclose MOCKABLE_FUNCTION(, int, fclose, FILE *, stream); #undef fseek #define fseek gb_fseek MOCKABLE_FUNCTION(, int, fseek, FILE *,stream, long int, offset, int, whence); #undef ftell #define ftell gb_ftell MOCKABLE_FUNCTION(, long int, ftell, FILE *, stream); #undef fprintf #define fprintf gb_fprintf extern int fprintf(FILE * stream, const char * format, ...); #ifdef __cplusplus } #endif #endif /*GB_STDIO_INTERCEPT*/ #endif /* GB_STDIO_H */ gb_time.h000066400000000000000000000033611362133436400363510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef GB_TIME_H #define GB_TIME_H /*this file, if included instead of has the following functionality: 1) if GB_TIME_INTERCEPT is defined then a) some of the time.h symbols shall be redefined, for example: time => gb_time b) all "code" using the time will actually (because of the preprocessor) call to gb_time c) gb_time shall blindly call into time, thus realizing a passthrough reason is: unittesting. time comes with the C Run Time and cannot be mocked (that is, in the global namespace cannot exist a function called time 2) if GB_TIME_INTERCEPT is not defined then a) it shall include => no passthrough, just direct linking. */ #ifndef GB_TIME_INTERCEPT #include #else /*source level intercepting of function calls*/ #define time time_never_called_never_implemented_always_forgotten #define localtime localtime_never_called_never_implemented_always_forgotten #define strftime strftime_never_called_never_implemented_always_forgotten #ifdef __cplusplus #include extern "C" { #else #include #endif #include "azure_c_shared_utility/umock_c_prod.h" #undef time #define time gb_time MOCKABLE_FUNCTION(, time_t, time, time_t *, timer); #undef localtime #define localtime gb_localtime MOCKABLE_FUNCTION(, struct tm *, localtime, const time_t *, timer); #undef strftime #define strftime gb_strftime MOCKABLE_FUNCTION(, size_t, strftime, char *, s, size_t, maxsize, const char *, format, const struct tm *, timeptr); #ifdef __cplusplus } #endif #endif /*GB_TIME_INTERCEPT*/ #endif /* GB_TIME_H */ gballoc.h000066400000000000000000000054151362133436400363500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef GBALLOC_H #define GBALLOC_H #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include #include extern "C" { #else #include #include #endif // GB_USE_CUSTOM_HEAP disables the implementations in gballoc.c and // requires that an external library implement the gballoc_malloc family // declared here. #if defined(GB_USE_CUSTOM_HEAP) void* gballoc_malloc(size_t size); void* gballoc_calloc(size_t nmemb, size_t size); void* gballoc_realloc(void* ptr, size_t size); void gballoc_free(void* ptr); #define malloc gballoc_malloc #define calloc gballoc_calloc #define realloc gballoc_realloc #define free gballoc_free /* all translation units that need memory measurement need to have GB_MEASURE_MEMORY_FOR_THIS defined */ /* GB_DEBUG_ALLOC is the switch that turns the measurement on/off, so that it is not on always */ #elif defined(GB_DEBUG_ALLOC) MOCKABLE_FUNCTION(, int, gballoc_init); MOCKABLE_FUNCTION(, void, gballoc_deinit); MOCKABLE_FUNCTION(, void*, gballoc_malloc, size_t, size); MOCKABLE_FUNCTION(, void*, gballoc_calloc, size_t, nmemb, size_t, size); MOCKABLE_FUNCTION(, void*, gballoc_realloc, void*, ptr, size_t, size); MOCKABLE_FUNCTION(, void, gballoc_free, void*, ptr); MOCKABLE_FUNCTION(, size_t, gballoc_getMaximumMemoryUsed); MOCKABLE_FUNCTION(, size_t, gballoc_getCurrentMemoryUsed); MOCKABLE_FUNCTION(, size_t, gballoc_getAllocationCount); MOCKABLE_FUNCTION(, void, gballoc_resetMetrics); /* if GB_MEASURE_MEMORY_FOR_THIS is defined then we want to redirect memory allocation functions to gballoc_xxx functions */ #ifdef GB_MEASURE_MEMORY_FOR_THIS /* Unfortunately this is still needed here for things to still compile when using _CRTDBG_MAP_ALLOC. That is because there is a rogue component (most likely CppUnitTest) including crtdbg. */ #if defined(_CRTDBG_MAP_ALLOC) && defined(_DEBUG) #undef _malloc_dbg #undef _calloc_dbg #undef _realloc_dbg #undef _free_dbg #define _malloc_dbg(size, ...) gballoc_malloc(size) #define _calloc_dbg(nmemb, size, ...) gballoc_calloc(nmemb, size) #define _realloc_dbg(ptr, size, ...) gballoc_realloc(ptr, size) #define _free_dbg(ptr, ...) gballoc_free(ptr) #else #define malloc gballoc_malloc #define calloc gballoc_calloc #define realloc gballoc_realloc #define free gballoc_free #endif #endif #else /* GB_DEBUG_ALLOC */ #define gballoc_init() 0 #define gballoc_deinit() ((void)0) #define gballoc_getMaximumMemoryUsed() SIZE_MAX #define gballoc_getCurrentMemoryUsed() SIZE_MAX #define gballoc_getAllocationCount() SIZE_MAX #define gballoc_resetMetrics() ((void)0) #endif /* GB_DEBUG_ALLOC */ #ifdef __cplusplus } #endif #endif /* GBALLOC_H */ gbnetwork.h000066400000000000000000000040101362133436400367350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef GBNETWORK_H #define GBNETWORK_H #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include #include #include extern "C" { #else #include #include #include #endif #ifdef WIN32 #include #else #include #endif /* all translation units that need network measurement need to have GB_MEASURE_NETWORK_FOR_THIS defined */ /* GB_DEBUG_NETWORK is the switch that turns the measurement on/off, so that it is not on always */ #if defined(GB_DEBUG_NETWORK) MOCKABLE_FUNCTION(, int, gbnetwork_init); MOCKABLE_FUNCTION(, void, gbnetwork_deinit); #ifdef WIN32 MOCKABLE_FUNCTION(, int, gbnetwork_send, SOCKET, sock, const char*, buf, int, len, int, flags); #else MOCKABLE_FUNCTION(, ssize_t, gbnetwork_send, int, sock, const void*, buf, size_t, len, int, flags); #endif #ifdef WIN32 MOCKABLE_FUNCTION(, int, gbnetwork_recv, SOCKET, sock, char*, buf, int, len, int, flags); #else MOCKABLE_FUNCTION(, ssize_t, gbnetwork_recv, int, sock, void*, buf, size_t, len, int, flags); #endif MOCKABLE_FUNCTION(, uint64_t, gbnetwork_getBytesSent); MOCKABLE_FUNCTION(, uint64_t, gbnetwork_getNumSends); MOCKABLE_FUNCTION(, uint64_t, gbnetwork_getBytesRecv); MOCKABLE_FUNCTION(, uint64_t, gbnetwork_getNumRecv); MOCKABLE_FUNCTION(, void, gbnetwork_resetMetrics); /* if GB_MEASURE_NETWORK_FOR_THIS is defined then we want to redirect network send functions to gbnetwork_xxx functions */ #ifdef GB_MEASURE_NETWORK_FOR_THIS #define send gbnetwork_send #define recv gbnetwork_recv #endif #else /* GB_DEBUG_NETWORK */ #define gbnetwork_init() 0 #define gbnetwork_deinit() ((void)0) #define gbnetwork_getBytesSent() 0 #define gbnetwork_getNumSends() 0 #define gbnetwork_getBytesRecv() 0 #define gbnetwork_getNumRecv() 0 #endif /* GB_DEBUG_NETWORK */ #ifdef __cplusplus } #endif #endif /* GBNETWORK_H */ hmac.h000066400000000000000000000010451362133436400356500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef HMAC_H #define HMAC_H #include "azure_c_shared_utility/sha.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, int, hmac, SHAversion, whichSha, const unsigned char *, text, int, text_len, const unsigned char *, key, int, key_len, uint8_t, digest[USHAMaxHashSize]); #ifdef __cplusplus } #endif #endif /* HMAC_H */ hmacsha256.h000066400000000000000000000015041362133436400366010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef HMACSHA256_H #define HMACSHA256_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif #define HMACSHA256_RESULT_VALUES \ HMACSHA256_OK, \ HMACSHA256_INVALID_ARG, \ HMACSHA256_ERROR DEFINE_ENUM(HMACSHA256_RESULT, HMACSHA256_RESULT_VALUES) MOCKABLE_FUNCTION(, HMACSHA256_RESULT, HMACSHA256_ComputeHash, const unsigned char*, key, size_t, keyLen, const unsigned char*, payload, size_t, payloadLen, BUFFER_HANDLE, hash); #ifdef __cplusplus } #endif #endif /* HMACSHA256_H */ http_proxy_io.h000066400000000000000000000013341362133436400376500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef HTTP_PROXY_IO_H #define HTTP_PROXY_IO_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct HTTP_PROXY_IO_CONFIG_TAG { const char* hostname; int port; const char* proxy_hostname; int proxy_port; const char* username; const char* password; } HTTP_PROXY_IO_CONFIG; MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, http_proxy_io_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* HTTP_PROXY_IO_H */ httpapi.h000066400000000000000000000217021362133436400364130ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file httpapi.h * @brief This module implements the standard HTTP API used by the C IoT client * library. * * @details For example, on the Windows platform the HTTP API code uses * WinHTTP and for Linux it uses curl and so forth. HTTPAPI must support * HTTPs (HTTP+SSL). */ #ifndef HTTPAPI_H #define HTTPAPI_H #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif typedef struct HTTP_HANDLE_DATA_TAG* HTTP_HANDLE; #define AMBIGUOUS_STATUS_CODE (300) #define HTTPAPI_RESULT_VALUES \ HTTPAPI_OK, \ HTTPAPI_INVALID_ARG, \ HTTPAPI_ERROR, \ HTTPAPI_OPEN_REQUEST_FAILED, \ HTTPAPI_SET_OPTION_FAILED, \ HTTPAPI_SEND_REQUEST_FAILED, \ HTTPAPI_RECEIVE_RESPONSE_FAILED, \ HTTPAPI_QUERY_HEADERS_FAILED, \ HTTPAPI_QUERY_DATA_AVAILABLE_FAILED, \ HTTPAPI_READ_DATA_FAILED, \ HTTPAPI_ALREADY_INIT, \ HTTPAPI_NOT_INIT, \ HTTPAPI_HTTP_HEADERS_FAILED, \ HTTPAPI_STRING_PROCESSING_ERROR, \ HTTPAPI_ALLOC_FAILED, \ HTTPAPI_INIT_FAILED, \ HTTPAPI_INSUFFICIENT_RESPONSE_BUFFER, \ HTTPAPI_SET_X509_FAILURE, \ HTTPAPI_SET_TIMEOUTS_FAILED \ /** @brief Enumeration specifying the possible return values for the APIs in * this module. */ DEFINE_ENUM(HTTPAPI_RESULT, HTTPAPI_RESULT_VALUES); #define HTTPAPI_REQUEST_TYPE_VALUES\ HTTPAPI_REQUEST_GET, \ HTTPAPI_REQUEST_POST, \ HTTPAPI_REQUEST_PUT, \ HTTPAPI_REQUEST_DELETE, \ HTTPAPI_REQUEST_PATCH, \ HTTPAPI_REQUEST_HEAD \ /** @brief Enumeration specifying the HTTP request verbs accepted by * the HTTPAPI module. */ DEFINE_ENUM(HTTPAPI_REQUEST_TYPE, HTTPAPI_REQUEST_TYPE_VALUES); #define MAX_HOSTNAME_LEN 65 #define MAX_USERNAME_LEN 65 #define MAX_PASSWORD_LEN 65 /** * @brief Global initialization for the HTTP API component. * * Platform specific implementations are expected to initialize * the underlying HTTP API stacks. * * @return @c HTTPAPI_OK if initialization is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_Init); /** @brief Free resources allocated in ::HTTPAPI_Init. */ MOCKABLE_FUNCTION(, void, HTTPAPI_Deinit); /** * @brief Creates an HTTPS connection to the host specified by the @p * hostName parameter. * * @param hostName Name of the host. * * This function returns a handle to the newly created connection. * You can use the handle in subsequent calls to execute specific * HTTP calls using ::HTTPAPI_ExecuteRequest. * * @return A @c HTTP_HANDLE to the newly created connection or @c NULL in * case an error occurs. */ MOCKABLE_FUNCTION(, HTTP_HANDLE, HTTPAPI_CreateConnection, const char*, hostName); /** * @brief Closes a connection created with ::HTTPAPI_CreateConnection. * * @param handle The handle to the HTTP connection created via ::HTTPAPI_CreateConnection. * * All resources allocated by ::HTTPAPI_CreateConnection should be * freed in ::HTTPAPI_CloseConnection. */ MOCKABLE_FUNCTION(, void, HTTPAPI_CloseConnection, HTTP_HANDLE, handle); /** * @brief Sends the HTTP request to the host and handles the response for * the HTTP call. * * @param handle The handle to the HTTP connection created * via ::HTTPAPI_CreateConnection. * @param requestType Specifies which HTTP method is used (GET, * POST, DELETE, PUT, PATCH). * @param relativePath Specifies the relative path of the URL * excluding the host name. * @param httpHeadersHandle Specifies a set of HTTP headers (name-value * pairs) to be added to the * HTTP request. The @p httpHeadersHandle * handle can be created and setup with * the proper name-value pairs by using the * HTTPHeaders APIs available in @c * HTTPHeaders.h. * @param content Specifies a pointer to the request body. * This value is optional and can be @c NULL. * @param contentLength Specifies the request body size (this is * typically added into the HTTP headers as * the Content-Length header). This value is * optional and can be 0. * @param statusCode This is an out parameter, where * ::HTTPAPI_ExecuteRequest returns the status * code from the HTTP response (200, 201, 400, * 401, etc.) * @param responseHeadersHandle This is an HTTP headers handle to which * ::HTTPAPI_ExecuteRequest must add all the * HTTP response headers so that the caller of * ::HTTPAPI_ExecuteRequest can inspect them. * You can manipulate @p responseHeadersHandle * by using the HTTPHeaders APIs available in * @c HTTPHeaders.h * @param responseContent This is a buffer that must be filled by * ::HTTPAPI_ExecuteRequest with the contents * of the HTTP response body. The buffer size * must be increased by the * ::HTTPAPI_ExecuteRequest implementation in * order to fit the response body. * ::HTTPAPI_ExecuteRequest must also handle * chunked transfer encoding for HTTP responses. * To manipulate the @p responseContent buffer, * use the APIs available in @c Strings.h. * * @return @c HTTPAPI_OK if the API call is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_ExecuteRequest, HTTP_HANDLE, handle, HTTPAPI_REQUEST_TYPE, requestType, const char*, relativePath, HTTP_HEADERS_HANDLE, httpHeadersHandle, const unsigned char*, content, size_t, contentLength, unsigned int*, statusCode, HTTP_HEADERS_HANDLE, responseHeadersHandle, BUFFER_HANDLE, responseContent); /** * @brief Sets the option named @p optionName bearing the value * @p value for the HTTP_HANDLE @p handle. * * @param handle The handle to the HTTP connection created via * ::HTTPAPI_CreateConnection. * @param optionName A @c NULL terminated string representing the name * of the option. * @param value A pointer to the value for the option. * * @return @c HTTPAPI_OK if initialization is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_SetOption, HTTP_HANDLE, handle, const char*, optionName, const void*, value); /** * @brief Clones the option named @p optionName bearing the value @p value * into the pointer @p savedValue. * * @param optionName A @c NULL terminated string representing the name of * the option * @param value A pointer to the value of the option. * @param savedValue This pointer receives the copy of the value of the * option. The copy needs to be free-able. * * @return @c HTTPAPI_OK if initialization is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, HTTPAPI_RESULT, HTTPAPI_CloneOption, const char*, optionName, const void*, value, const void**, savedValue); #ifdef __cplusplus } #endif #endif /* HTTPAPI_H */ httpapiex.h000066400000000000000000000107741362133436400367570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file httpapiex.h * @brief This is a utility module that provides HTTP requests with * build-in retry capabilities. * * @details HTTAPIEX is a utility module that provides HTTP requests with build-in * retry capability to an HTTP server. Features over "regular" HTTPAPI include: * - Optional parameters * - Implementation independent * - Retry mechanism * - Persistent options */ #ifndef HTTPAPIEX_H #define HTTPAPIEX_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/httpapi.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif typedef struct HTTPAPIEX_HANDLE_DATA_TAG* HTTPAPIEX_HANDLE; #define HTTPAPIEX_RESULT_VALUES \ HTTPAPIEX_OK, \ HTTPAPIEX_ERROR, \ HTTPAPIEX_INVALID_ARG, \ HTTPAPIEX_RECOVERYFAILED /*to be continued*/ /** @brief Enumeration specifying the status of calls to various APIs in this module. */ DEFINE_ENUM(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); /** * @brief Creates an @c HTTPAPIEX_HANDLE that can be used in further calls. * * @param hostName Pointer to a null-terminated string that contains the host name * of an HTTP server. * * If @p hostName is @c NULL then @c HTTPAPIEX_Create returns @c NULL. The @p * hostName value is saved and associated with the returned handle. If creating * the handle fails for any reason, then @c HTTAPIEX_Create returns @c NULL. * Otherwise, @c HTTPAPIEX_Create returns an @c HTTAPIEX_HANDLE suitable for * further calls to the module. * * @return An @c HTTAPIEX_HANDLE suitable for further calls to the module. */ MOCKABLE_FUNCTION(, HTTPAPIEX_HANDLE, HTTPAPIEX_Create, const char*, hostName); /** * @brief Tries to execute an HTTP request. * * @param handle A valid @c HTTPAPIEX_HANDLE value. * @param requestType A value from the ::HTTPAPI_REQUEST_TYPE enum. * @param relativePath Relative path to send the request to on the server. * @param requestHttpHeadersHandle Handle to the request HTTP headers. * @param requestContent The request content. * @param statusCode If non-null, the HTTP status code is written to this * pointer. * @param responseHttpHeadersHandle Handle to the response HTTP headers. * @param responseContent The response content. * * @c HTTPAPIEX_ExecuteRequest tries to execute an HTTP request of type @p * requestType, on the server's @p relativePath, pushing the request HTTP * headers @p requestHttpHeadersHandle, having the content of the request * as pointed to by @p requestContent. If successful, @c HTTAPIEX_ExecuteRequest * writes in the out @p parameter statusCode the HTTP status, populates the @p * responseHeadersHandle with the response headers and copies the response body * to @p responseContent. * * @return An @c HTTAPIEX_HANDLE suitable for further calls to the module. */ MOCKABLE_FUNCTION(, HTTPAPIEX_RESULT, HTTPAPIEX_ExecuteRequest, HTTPAPIEX_HANDLE, handle, HTTPAPI_REQUEST_TYPE, requestType, const char*, relativePath, HTTP_HEADERS_HANDLE, requestHttpHeadersHandle, BUFFER_HANDLE, requestContent, unsigned int*, statusCode, HTTP_HEADERS_HANDLE, responseHttpHeadersHandle, BUFFER_HANDLE, responseContent); /** * @brief Frees all resources used by the @c HTTPAPIEX_HANDLE object. * * @param handle The @c HTTPAPIEX_HANDLE object to be freed. */ MOCKABLE_FUNCTION(, void, HTTPAPIEX_Destroy, HTTPAPIEX_HANDLE, handle); /** * @brief Sets the option @p optionName to the value pointed to by @p value. * * @param handle The @c HTTPAPIEX_HANDLE representing this session. * @param optionName Name of the option. * @param value The value to be set for the option. * * @return An @c HTTPAPIEX_RESULT indicating the status of the call. */ MOCKABLE_FUNCTION(, HTTPAPIEX_RESULT, HTTPAPIEX_SetOption, HTTPAPIEX_HANDLE, handle, const char*, optionName, const void*, value); #ifdef __cplusplus } #endif #endif /* HTTPAPIEX_H */ httpapiexsas.h000066400000000000000000000024621362133436400374610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef HTTPAPIEX_SAS_H #define HTTPAPIEX_SAS_H #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/httpapiex.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif typedef struct HTTPAPIEX_SAS_STATE_TAG* HTTPAPIEX_SAS_HANDLE; MOCKABLE_FUNCTION(, HTTPAPIEX_SAS_HANDLE, HTTPAPIEX_SAS_Create, STRING_HANDLE, key, STRING_HANDLE, uriResource, STRING_HANDLE, keyName); MOCKABLE_FUNCTION(, HTTPAPIEX_SAS_HANDLE, HTTPAPIEX_SAS_Create_From_String, const char*, key, const char*, uriResource, const char*, keyName); MOCKABLE_FUNCTION(, void, HTTPAPIEX_SAS_Destroy, HTTPAPIEX_SAS_HANDLE, handle); MOCKABLE_FUNCTION(, HTTPAPIEX_RESULT, HTTPAPIEX_SAS_ExecuteRequest, HTTPAPIEX_SAS_HANDLE, sasHandle, HTTPAPIEX_HANDLE, handle, HTTPAPI_REQUEST_TYPE, requestType, const char*, relativePath, HTTP_HEADERS_HANDLE, requestHttpHeadersHandle, BUFFER_HANDLE, requestContent, unsigned int*, statusCode, HTTP_HEADERS_HANDLE, responseHeadersHandle, BUFFER_HANDLE, responseContent); #ifdef __cplusplus } #endif #endif /* HTTPAPIEX_SAS_H */ httpheaders.h000066400000000000000000000160741362133436400372630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file httpheaders.h * @brief This is a utility module that handles HTTP message-headers. * * @details An application would use ::HTTPHeaders_Alloc to create a new set of HTTP headers. * After getting the handle, the application would build in several headers by * consecutive calls to ::HTTPHeaders_AddHeaderNameValuePair. When the headers are * constructed, the application can retrieve the stored data by calling one of the * following functions: * - ::HTTPHeaders_FindHeaderValue - when the name of the header is known and it * wants to know the value of that header * - ::HTTPHeaders_GetHeaderCount - when the application needs to know the count * of all the headers * - ::HTTPHeaders_GetHeader - when the application needs to retrieve the * name + ": " + value string based on an index. */ #ifndef HTTPHEADERS_H #define HTTPHEADERS_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif /*Codes_SRS_HTTP_HEADERS_99_001:[ HttpHeaders shall have the following interface]*/ #define HTTP_HEADERS_RESULT_VALUES \ HTTP_HEADERS_OK, \ HTTP_HEADERS_INVALID_ARG, \ HTTP_HEADERS_ALLOC_FAILED, \ HTTP_HEADERS_INSUFFICIENT_BUFFER, \ HTTP_HEADERS_ERROR \ /** @brief Enumeration specifying the status of calls to various APIs in this module. */ DEFINE_ENUM(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT_VALUES); typedef struct HTTP_HEADERS_HANDLE_DATA_TAG* HTTP_HEADERS_HANDLE; /** * @brief Produces a @c HTTP_HANDLE that can later be used in subsequent calls to the module. * * This function returns @c NULL in case an error occurs. After successful execution * ::HTTPHeaders_GetHeaderCount will report @c 0 existing headers. * * @return A HTTP_HEADERS_HANDLE representing the newly created collection of HTTP headers. */ MOCKABLE_FUNCTION(, HTTP_HEADERS_HANDLE, HTTPHeaders_Alloc); /** * @brief De-allocates the data structures allocated by previous API calls to the same handle. * * @param httpHeadersHandle A valid @c HTTP_HEADERS_HANDLE value. */ MOCKABLE_FUNCTION(, void, HTTPHeaders_Free, HTTP_HEADERS_HANDLE, httpHeadersHandle); /** * @brief Adds a header record from the @p name and @p value parameters. * * @param httpHeadersHandle A valid @c HTTP_HEADERS_HANDLE value. * @param name The name of the HTTP header to add. It is invalid for * the name to include the ':' character or character codes * outside the range 33-126. * @param value The value to be assigned to the header. * * The function stores the @c name:value pair in such a way that when later * retrieved by a call to ::HTTPHeaders_GetHeader it will return a string * that is @c strcmp equal to @c name+": "+value. If the name already exists * in the collection of headers, the function concatenates the new value * after the existing value, separated by a comma and a space as in: * old-value+", "+new-value. * * @return Returns @c HTTP_HEADERS_OK when execution is successful or an error code from * the ::HTTPAPIEX_RESULT enum. */ MOCKABLE_FUNCTION(, HTTP_HEADERS_RESULT, HTTPHeaders_AddHeaderNameValuePair, HTTP_HEADERS_HANDLE, httpHeadersHandle, const char*, name, const char*, value); /** * @brief This API performs exactly the same as ::HTTPHeaders_AddHeaderNameValuePair * except that if the header name already exists then the already existing value * will be replaced as opposed to being concatenated to. * * @param httpHeadersHandle A valid @c HTTP_HEADERS_HANDLE value. * @param name The name of the HTTP header to add/replace. It is invalid for * the name to include the ':' character or character codes * outside the range 33-126. * @param value The value to be assigned to the header. * * @return Returns @c HTTP_HEADERS_OK when execution is successful or an error code from * the ::HTTPAPIEX_RESULT enum. */ MOCKABLE_FUNCTION(, HTTP_HEADERS_RESULT, HTTPHeaders_ReplaceHeaderNameValuePair, HTTP_HEADERS_HANDLE, httpHeadersHandle, const char*, name, const char*, value); /** * @brief Retrieves the value for a previously stored name. * * @param httpHeadersHandle A valid @c HTTP_HEADERS_HANDLE value. * @param name The name of the HTTP header to find. * * @return The return value points to a string that shall be @c strcmp equal * to the original stored string. */ MOCKABLE_FUNCTION(, const char*, HTTPHeaders_FindHeaderValue, HTTP_HEADERS_HANDLE, httpHeadersHandle, const char*, name); /** * @brief This API retrieves the number of stored headers. * * @param httpHeadersHandle A valid @c HTTP_HEADERS_HANDLE value. * @param headersCount If non-null, the API writes the number of * into the memory pointed at by this parameter. * * @return Returns @c HTTP_HEADERS_OK when execution is successful or * @c HTTP_HEADERS_ERROR when an error occurs. */ MOCKABLE_FUNCTION(, HTTP_HEADERS_RESULT, HTTPHeaders_GetHeaderCount, HTTP_HEADERS_HANDLE, httpHeadersHandle, size_t*, headersCount); /** * @brief This API retrieves the string name+": "+value for the header * element at the given @p index. * * @param handle A valid @c HTTP_HEADERS_HANDLE value. * @param index Zero-based index of the item in the * headers collection. * @param destination If non-null, the header value is written into a * new string a pointer to which is written into this * parameters. It is the caller's responsibility to free * this memory. * * @return Returns @c HTTP_HEADERS_OK when execution is successful or * @c HTTP_HEADERS_ERROR when an error occurs. */ MOCKABLE_FUNCTION(, HTTP_HEADERS_RESULT, HTTPHeaders_GetHeader, HTTP_HEADERS_HANDLE, handle, size_t, index, char**, destination); /** * @brief This API produces a clone of the @p handle parameter. * * @param handle A valid @c HTTP_HEADERS_HANDLE value. * * If @p handle is not @c NULL this function clones the content * of the handle to a new handle and returns it. * * @return A @c HTTP_HEADERS_HANDLE containing a cloned copy of the * contents of @p handle. */ MOCKABLE_FUNCTION(, HTTP_HEADERS_HANDLE, HTTPHeaders_Clone, HTTP_HEADERS_HANDLE, handle); #ifdef __cplusplus } #endif #endif /* HTTPHEADERS_H */ lock.h000066400000000000000000000044001362133436400356660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file lock.h * @brief A minimalistic platform agnostic lock abstraction for thread * synchronization. * @details The Lock component is implemented in order to achieve thread * synchronization, as we may have a requirement to consume locks * across different platforms. This component exposes some generic * APIs so that it can be extended for platform specific * implementations. */ #ifndef LOCK_H #define LOCK_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif typedef void* LOCK_HANDLE; #define LOCK_RESULT_VALUES \ LOCK_OK, \ LOCK_ERROR \ /** @brief Enumeration specifying the lock status. */ DEFINE_ENUM(LOCK_RESULT, LOCK_RESULT_VALUES); /** * @brief This API creates and returns a valid lock handle. * * @return A valid @c LOCK_HANDLE when successful or @c NULL otherwise. */ MOCKABLE_FUNCTION(, LOCK_HANDLE, Lock_Init); /** * @brief Acquires a lock on the given lock handle. Uses platform * specific mutex primitives in its implementation. * * @param handle A valid handle to the lock. * * @return Returns @c LOCK_OK when a lock has been acquired and * @c LOCK_ERROR when an error occurs. */ MOCKABLE_FUNCTION(, LOCK_RESULT, Lock, LOCK_HANDLE, handle); /** * @brief Releases the lock on the given lock handle. Uses platform * specific mutex primitives in its implementation. * * @param handle A valid handle to the lock. * * @return Returns @c LOCK_OK when the lock has been released and * @c LOCK_ERROR when an error occurs. */ MOCKABLE_FUNCTION(, LOCK_RESULT, Unlock, LOCK_HANDLE, handle); /** * @brief The lock instance is destroyed. * * @param handle A valid handle to the lock. * * @return Returns @c LOCK_OK when the lock object has been * destroyed and @c LOCK_ERROR when an error occurs. */ MOCKABLE_FUNCTION(, LOCK_RESULT, Lock_Deinit, LOCK_HANDLE, handle); #ifdef __cplusplus } #endif #endif /* LOCK_H */ macro_utils.h000066400000000000000000023702231362133436400372720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*THIS FILE IS GENERATED*/ /*DO NOT EDIT BY HAND!!!*/ /*instead edit macro_utils.tt here: http://www.github.com/azure/azure-macro-utils-c.git */ /*and then propagate the generated file to all the repos*/ /* !!! CAUTION!!! This file is copied to multiple places */ /* in https://github.com/Azure/azure-c-shared-utility.git, */ /* and all of these copies must be located and replaced. */ #ifndef MACRO_UTILS_H #define MACRO_UTILS_H #ifdef __cplusplus #include #else // __cplusplus #include #endif // __cplusplus #if (defined OPTIMIZE_RETURN_CODES) #define __FAILURE__ 1 #else #define __FAILURE__ __LINE__ #endif /*"pointer or NULL" macro - because when printf-ing arguments NULL is not valid for %s (section 7.1.4 of C11 standard) */ #define P_OR_NULL(p) (((p)!=NULL)?(p):"NULL") #define TOSTRING_(x) #x #define TOSTRING(x) TOSTRING_(x) #define IFCOMMA(N) C2(IFCOMMA_, N) #define IFCOMMA_0 #define IFCOMMA_2 #define IFCOMMA_4 , #define IFCOMMA_6 , #define IFCOMMA_8 , #define IFCOMMA_10 , #define IFCOMMA_12 , #define IFCOMMA_14 , #define IFCOMMA_16 , #define IFCOMMA_18 , #define IFCOMMA_20 , #define IFCOMMA_22 , #define IFCOMMA_24 , #define IFCOMMA_26 , #define IFCOMMA_28 , #define IFCOMMA_30 , #define IFCOMMA_32 , #define IFCOMMA_34 , #define IFCOMMA_36 , #define IFCOMMA_38 , #define IFCOMMA_40 , #define IFCOMMA_42 , #define IFCOMMA_44 , #define IFCOMMA_46 , #define IFCOMMA_48 , #define IFCOMMA_50 , #define IFCOMMA_52 , #define IFCOMMA_54 , #define IFCOMMA_56 , #define IFCOMMA_58 , #define IFCOMMA_60 , #define IFCOMMA_62 , #define IFCOMMA_64 , #define IFCOMMA_66 , #define IFCOMMA_68 , #define IFCOMMA_70 , #define IFCOMMA_72 , #define IFCOMMA_74 , #define IFCOMMA_76 , #define IFCOMMA_78 , #define IFCOMMA_80 , #define IFCOMMA_82 , #define IFCOMMA_84 , #define IFCOMMA_86 , #define IFCOMMA_88 , #define IFCOMMA_90 , #define IFCOMMA_92 , #define IFCOMMA_94 , #define IFCOMMA_96 , #define IFCOMMA_98 , #define IFCOMMA_100 , #define IFCOMMA_102 , #define IFCOMMA_104 , #define IFCOMMA_106 , #define IFCOMMA_108 , #define IFCOMMA_110 , #define IFCOMMA_112 , #define IFCOMMA_114 , #define IFCOMMA_116 , #define IFCOMMA_118 , #define IFCOMMA_120 , #define IFCOMMA_122 , #define IFCOMMA_124 , #define IFCOMMA_NOFIRST(N) C2(IFCOMMA_NOFIRST, N) #define IFCOMMA_NOFIRST1 #define IFCOMMA_NOFIRST2 , #define IFCOMMA_NOFIRST3 , #define IFCOMMA_NOFIRST4 , #define IFCOMMA_NOFIRST5 , #define IFCOMMA_NOFIRST6 , #define IFCOMMA_NOFIRST7 , #define IFCOMMA_NOFIRST8 , #define IFCOMMA_NOFIRST9 , #define IFCOMMA_NOFIRST10 , #define IFCOMMA_NOFIRST11 , #define IFCOMMA_NOFIRST12 , #define IFCOMMA_NOFIRST13 , #define IFCOMMA_NOFIRST14 , #define IFCOMMA_NOFIRST15 , #define IFCOMMA_NOFIRST16 , #define IFCOMMA_NOFIRST17 , #define IFCOMMA_NOFIRST18 , #define IFCOMMA_NOFIRST19 , #define IFCOMMA_NOFIRST20 , #define IFCOMMA_NOFIRST21 , #define IFCOMMA_NOFIRST22 , #define IFCOMMA_NOFIRST23 , #define IFCOMMA_NOFIRST24 , #define IFCOMMA_NOFIRST25 , #define IFCOMMA_NOFIRST26 , #define IFCOMMA_NOFIRST27 , #define IFCOMMA_NOFIRST28 , #define IFCOMMA_NOFIRST29 , #define IFCOMMA_NOFIRST30 , #define IFCOMMA_NOFIRST31 , #define IFCOMMA_NOFIRST32 , #define IFCOMMA_NOFIRST33 , #define IFCOMMA_NOFIRST34 , #define IFCOMMA_NOFIRST35 , #define IFCOMMA_NOFIRST36 , #define IFCOMMA_NOFIRST37 , #define IFCOMMA_NOFIRST38 , #define IFCOMMA_NOFIRST39 , #define IFCOMMA_NOFIRST40 , #define IFCOMMA_NOFIRST41 , #define IFCOMMA_NOFIRST42 , #define IFCOMMA_NOFIRST43 , #define IFCOMMA_NOFIRST44 , #define IFCOMMA_NOFIRST45 , #define IFCOMMA_NOFIRST46 , #define IFCOMMA_NOFIRST47 , #define IFCOMMA_NOFIRST48 , #define IFCOMMA_NOFIRST49 , #define IFCOMMA_NOFIRST50 , #define IFCOMMA_NOFIRST51 , #define IFCOMMA_NOFIRST52 , #define IFCOMMA_NOFIRST53 , #define IFCOMMA_NOFIRST54 , #define IFCOMMA_NOFIRST55 , #define IFCOMMA_NOFIRST56 , #define IFCOMMA_NOFIRST57 , #define IFCOMMA_NOFIRST58 , #define IFCOMMA_NOFIRST59 , #define IFCOMMA_NOFIRST60 , #define IFCOMMA_NOFIRST61 , #define IFCOMMA_NOFIRST62 , #define IFCOMMA_NOFIRST63 , #define IFCOMMA_NOFIRST64 , #define IFCOMMA_NOFIRST65 , #define IFCOMMA_NOFIRST66 , #define IFCOMMA_NOFIRST67 , #define IFCOMMA_NOFIRST68 , #define IFCOMMA_NOFIRST69 , #define IFCOMMA_NOFIRST70 , #define IFCOMMA_NOFIRST71 , #define IFCOMMA_NOFIRST72 , #define IFCOMMA_NOFIRST73 , #define IFCOMMA_NOFIRST74 , #define IFCOMMA_NOFIRST75 , #define IFCOMMA_NOFIRST76 , #define IFCOMMA_NOFIRST77 , #define IFCOMMA_NOFIRST78 , #define IFCOMMA_NOFIRST79 , #define IFCOMMA_NOFIRST80 , #define IFCOMMA_NOFIRST81 , #define IFCOMMA_NOFIRST82 , #define IFCOMMA_NOFIRST83 , #define IFCOMMA_NOFIRST84 , #define IFCOMMA_NOFIRST85 , #define IFCOMMA_NOFIRST86 , #define IFCOMMA_NOFIRST87 , #define IFCOMMA_NOFIRST88 , #define IFCOMMA_NOFIRST89 , #define IFCOMMA_NOFIRST90 , #define IFCOMMA_NOFIRST91 , #define IFCOMMA_NOFIRST92 , #define IFCOMMA_NOFIRST93 , #define IFCOMMA_NOFIRST94 , #define IFCOMMA_NOFIRST95 , #define IFCOMMA_NOFIRST96 , #define IFCOMMA_NOFIRST97 , #define IFCOMMA_NOFIRST98 , #define IFCOMMA_NOFIRST99 , #define IFCOMMA_NOFIRST100 , #define IFCOMMA_NOFIRST101 , #define IFCOMMA_NOFIRST102 , #define IFCOMMA_NOFIRST103 , #define IFCOMMA_NOFIRST104 , #define IFCOMMA_NOFIRST105 , #define IFCOMMA_NOFIRST106 , #define IFCOMMA_NOFIRST107 , #define IFCOMMA_NOFIRST108 , #define IFCOMMA_NOFIRST109 , #define IFCOMMA_NOFIRST110 , #define IFCOMMA_NOFIRST111 , #define IFCOMMA_NOFIRST112 , #define IFCOMMA_NOFIRST113 , #define IFCOMMA_NOFIRST114 , #define IFCOMMA_NOFIRST115 , #define IFCOMMA_NOFIRST116 , #define IFCOMMA_NOFIRST117 , #define IFCOMMA_NOFIRST118 , #define IFCOMMA_NOFIRST119 , #define IFCOMMA_NOFIRST120 , #define IFCOMMA_NOFIRST121 , #define IFCOMMA_NOFIRST122 , #define IFCOMMA_NOFIRST123 , #define IFCOMMA_NOFIRST124 , #define DEC(x) C2(DEC,x) #define DEC1024 1023 #define DEC1023 1022 #define DEC1022 1021 #define DEC1021 1020 #define DEC1020 1019 #define DEC1019 1018 #define DEC1018 1017 #define DEC1017 1016 #define DEC1016 1015 #define DEC1015 1014 #define DEC1014 1013 #define DEC1013 1012 #define DEC1012 1011 #define DEC1011 1010 #define DEC1010 1009 #define DEC1009 1008 #define DEC1008 1007 #define DEC1007 1006 #define DEC1006 1005 #define DEC1005 1004 #define DEC1004 1003 #define DEC1003 1002 #define DEC1002 1001 #define DEC1001 1000 #define DEC1000 999 #define DEC999 998 #define DEC998 997 #define DEC997 996 #define DEC996 995 #define DEC995 994 #define DEC994 993 #define DEC993 992 #define DEC992 991 #define DEC991 990 #define DEC990 989 #define DEC989 988 #define DEC988 987 #define DEC987 986 #define DEC986 985 #define DEC985 984 #define DEC984 983 #define DEC983 982 #define DEC982 981 #define DEC981 980 #define DEC980 979 #define DEC979 978 #define DEC978 977 #define DEC977 976 #define DEC976 975 #define DEC975 974 #define DEC974 973 #define DEC973 972 #define DEC972 971 #define DEC971 970 #define DEC970 969 #define DEC969 968 #define DEC968 967 #define DEC967 966 #define DEC966 965 #define DEC965 964 #define DEC964 963 #define DEC963 962 #define DEC962 961 #define DEC961 960 #define DEC960 959 #define DEC959 958 #define DEC958 957 #define DEC957 956 #define DEC956 955 #define DEC955 954 #define DEC954 953 #define DEC953 952 #define DEC952 951 #define DEC951 950 #define DEC950 949 #define DEC949 948 #define DEC948 947 #define DEC947 946 #define DEC946 945 #define DEC945 944 #define DEC944 943 #define DEC943 942 #define DEC942 941 #define DEC941 940 #define DEC940 939 #define DEC939 938 #define DEC938 937 #define DEC937 936 #define DEC936 935 #define DEC935 934 #define DEC934 933 #define DEC933 932 #define DEC932 931 #define DEC931 930 #define DEC930 929 #define DEC929 928 #define DEC928 927 #define DEC927 926 #define DEC926 925 #define DEC925 924 #define DEC924 923 #define DEC923 922 #define DEC922 921 #define DEC921 920 #define DEC920 919 #define DEC919 918 #define DEC918 917 #define DEC917 916 #define DEC916 915 #define DEC915 914 #define DEC914 913 #define DEC913 912 #define DEC912 911 #define DEC911 910 #define DEC910 909 #define DEC909 908 #define DEC908 907 #define DEC907 906 #define DEC906 905 #define DEC905 904 #define DEC904 903 #define DEC903 902 #define DEC902 901 #define DEC901 900 #define DEC900 899 #define DEC899 898 #define DEC898 897 #define DEC897 896 #define DEC896 895 #define DEC895 894 #define DEC894 893 #define DEC893 892 #define DEC892 891 #define DEC891 890 #define DEC890 889 #define DEC889 888 #define DEC888 887 #define DEC887 886 #define DEC886 885 #define DEC885 884 #define DEC884 883 #define DEC883 882 #define DEC882 881 #define DEC881 880 #define DEC880 879 #define DEC879 878 #define DEC878 877 #define DEC877 876 #define DEC876 875 #define DEC875 874 #define DEC874 873 #define DEC873 872 #define DEC872 871 #define DEC871 870 #define DEC870 869 #define DEC869 868 #define DEC868 867 #define DEC867 866 #define DEC866 865 #define DEC865 864 #define DEC864 863 #define DEC863 862 #define DEC862 861 #define DEC861 860 #define DEC860 859 #define DEC859 858 #define DEC858 857 #define DEC857 856 #define DEC856 855 #define DEC855 854 #define DEC854 853 #define DEC853 852 #define DEC852 851 #define DEC851 850 #define DEC850 849 #define DEC849 848 #define DEC848 847 #define DEC847 846 #define DEC846 845 #define DEC845 844 #define DEC844 843 #define DEC843 842 #define DEC842 841 #define DEC841 840 #define DEC840 839 #define DEC839 838 #define DEC838 837 #define DEC837 836 #define DEC836 835 #define DEC835 834 #define DEC834 833 #define DEC833 832 #define DEC832 831 #define DEC831 830 #define DEC830 829 #define DEC829 828 #define DEC828 827 #define DEC827 826 #define DEC826 825 #define DEC825 824 #define DEC824 823 #define DEC823 822 #define DEC822 821 #define DEC821 820 #define DEC820 819 #define DEC819 818 #define DEC818 817 #define DEC817 816 #define DEC816 815 #define DEC815 814 #define DEC814 813 #define DEC813 812 #define DEC812 811 #define DEC811 810 #define DEC810 809 #define DEC809 808 #define DEC808 807 #define DEC807 806 #define DEC806 805 #define DEC805 804 #define DEC804 803 #define DEC803 802 #define DEC802 801 #define DEC801 800 #define DEC800 799 #define DEC799 798 #define DEC798 797 #define DEC797 796 #define DEC796 795 #define DEC795 794 #define DEC794 793 #define DEC793 792 #define DEC792 791 #define DEC791 790 #define DEC790 789 #define DEC789 788 #define DEC788 787 #define DEC787 786 #define DEC786 785 #define DEC785 784 #define DEC784 783 #define DEC783 782 #define DEC782 781 #define DEC781 780 #define DEC780 779 #define DEC779 778 #define DEC778 777 #define DEC777 776 #define DEC776 775 #define DEC775 774 #define DEC774 773 #define DEC773 772 #define DEC772 771 #define DEC771 770 #define DEC770 769 #define DEC769 768 #define DEC768 767 #define DEC767 766 #define DEC766 765 #define DEC765 764 #define DEC764 763 #define DEC763 762 #define DEC762 761 #define DEC761 760 #define DEC760 759 #define DEC759 758 #define DEC758 757 #define DEC757 756 #define DEC756 755 #define DEC755 754 #define DEC754 753 #define DEC753 752 #define DEC752 751 #define DEC751 750 #define DEC750 749 #define DEC749 748 #define DEC748 747 #define DEC747 746 #define DEC746 745 #define DEC745 744 #define DEC744 743 #define DEC743 742 #define DEC742 741 #define DEC741 740 #define DEC740 739 #define DEC739 738 #define DEC738 737 #define DEC737 736 #define DEC736 735 #define DEC735 734 #define DEC734 733 #define DEC733 732 #define DEC732 731 #define DEC731 730 #define DEC730 729 #define DEC729 728 #define DEC728 727 #define DEC727 726 #define DEC726 725 #define DEC725 724 #define DEC724 723 #define DEC723 722 #define DEC722 721 #define DEC721 720 #define DEC720 719 #define DEC719 718 #define DEC718 717 #define DEC717 716 #define DEC716 715 #define DEC715 714 #define DEC714 713 #define DEC713 712 #define DEC712 711 #define DEC711 710 #define DEC710 709 #define DEC709 708 #define DEC708 707 #define DEC707 706 #define DEC706 705 #define DEC705 704 #define DEC704 703 #define DEC703 702 #define DEC702 701 #define DEC701 700 #define DEC700 699 #define DEC699 698 #define DEC698 697 #define DEC697 696 #define DEC696 695 #define DEC695 694 #define DEC694 693 #define DEC693 692 #define DEC692 691 #define DEC691 690 #define DEC690 689 #define DEC689 688 #define DEC688 687 #define DEC687 686 #define DEC686 685 #define DEC685 684 #define DEC684 683 #define DEC683 682 #define DEC682 681 #define DEC681 680 #define DEC680 679 #define DEC679 678 #define DEC678 677 #define DEC677 676 #define DEC676 675 #define DEC675 674 #define DEC674 673 #define DEC673 672 #define DEC672 671 #define DEC671 670 #define DEC670 669 #define DEC669 668 #define DEC668 667 #define DEC667 666 #define DEC666 665 #define DEC665 664 #define DEC664 663 #define DEC663 662 #define DEC662 661 #define DEC661 660 #define DEC660 659 #define DEC659 658 #define DEC658 657 #define DEC657 656 #define DEC656 655 #define DEC655 654 #define DEC654 653 #define DEC653 652 #define DEC652 651 #define DEC651 650 #define DEC650 649 #define DEC649 648 #define DEC648 647 #define DEC647 646 #define DEC646 645 #define DEC645 644 #define DEC644 643 #define DEC643 642 #define DEC642 641 #define DEC641 640 #define DEC640 639 #define DEC639 638 #define DEC638 637 #define DEC637 636 #define DEC636 635 #define DEC635 634 #define DEC634 633 #define DEC633 632 #define DEC632 631 #define DEC631 630 #define DEC630 629 #define DEC629 628 #define DEC628 627 #define DEC627 626 #define DEC626 625 #define DEC625 624 #define DEC624 623 #define DEC623 622 #define DEC622 621 #define DEC621 620 #define DEC620 619 #define DEC619 618 #define DEC618 617 #define DEC617 616 #define DEC616 615 #define DEC615 614 #define DEC614 613 #define DEC613 612 #define DEC612 611 #define DEC611 610 #define DEC610 609 #define DEC609 608 #define DEC608 607 #define DEC607 606 #define DEC606 605 #define DEC605 604 #define DEC604 603 #define DEC603 602 #define DEC602 601 #define DEC601 600 #define DEC600 599 #define DEC599 598 #define DEC598 597 #define DEC597 596 #define DEC596 595 #define DEC595 594 #define DEC594 593 #define DEC593 592 #define DEC592 591 #define DEC591 590 #define DEC590 589 #define DEC589 588 #define DEC588 587 #define DEC587 586 #define DEC586 585 #define DEC585 584 #define DEC584 583 #define DEC583 582 #define DEC582 581 #define DEC581 580 #define DEC580 579 #define DEC579 578 #define DEC578 577 #define DEC577 576 #define DEC576 575 #define DEC575 574 #define DEC574 573 #define DEC573 572 #define DEC572 571 #define DEC571 570 #define DEC570 569 #define DEC569 568 #define DEC568 567 #define DEC567 566 #define DEC566 565 #define DEC565 564 #define DEC564 563 #define DEC563 562 #define DEC562 561 #define DEC561 560 #define DEC560 559 #define DEC559 558 #define DEC558 557 #define DEC557 556 #define DEC556 555 #define DEC555 554 #define DEC554 553 #define DEC553 552 #define DEC552 551 #define DEC551 550 #define DEC550 549 #define DEC549 548 #define DEC548 547 #define DEC547 546 #define DEC546 545 #define DEC545 544 #define DEC544 543 #define DEC543 542 #define DEC542 541 #define DEC541 540 #define DEC540 539 #define DEC539 538 #define DEC538 537 #define DEC537 536 #define DEC536 535 #define DEC535 534 #define DEC534 533 #define DEC533 532 #define DEC532 531 #define DEC531 530 #define DEC530 529 #define DEC529 528 #define DEC528 527 #define DEC527 526 #define DEC526 525 #define DEC525 524 #define DEC524 523 #define DEC523 522 #define DEC522 521 #define DEC521 520 #define DEC520 519 #define DEC519 518 #define DEC518 517 #define DEC517 516 #define DEC516 515 #define DEC515 514 #define DEC514 513 #define DEC513 512 #define DEC512 511 #define DEC511 510 #define DEC510 509 #define DEC509 508 #define DEC508 507 #define DEC507 506 #define DEC506 505 #define DEC505 504 #define DEC504 503 #define DEC503 502 #define DEC502 501 #define DEC501 500 #define DEC500 499 #define DEC499 498 #define DEC498 497 #define DEC497 496 #define DEC496 495 #define DEC495 494 #define DEC494 493 #define DEC493 492 #define DEC492 491 #define DEC491 490 #define DEC490 489 #define DEC489 488 #define DEC488 487 #define DEC487 486 #define DEC486 485 #define DEC485 484 #define DEC484 483 #define DEC483 482 #define DEC482 481 #define DEC481 480 #define DEC480 479 #define DEC479 478 #define DEC478 477 #define DEC477 476 #define DEC476 475 #define DEC475 474 #define DEC474 473 #define DEC473 472 #define DEC472 471 #define DEC471 470 #define DEC470 469 #define DEC469 468 #define DEC468 467 #define DEC467 466 #define DEC466 465 #define DEC465 464 #define DEC464 463 #define DEC463 462 #define DEC462 461 #define DEC461 460 #define DEC460 459 #define DEC459 458 #define DEC458 457 #define DEC457 456 #define DEC456 455 #define DEC455 454 #define DEC454 453 #define DEC453 452 #define DEC452 451 #define DEC451 450 #define DEC450 449 #define DEC449 448 #define DEC448 447 #define DEC447 446 #define DEC446 445 #define DEC445 444 #define DEC444 443 #define DEC443 442 #define DEC442 441 #define DEC441 440 #define DEC440 439 #define DEC439 438 #define DEC438 437 #define DEC437 436 #define DEC436 435 #define DEC435 434 #define DEC434 433 #define DEC433 432 #define DEC432 431 #define DEC431 430 #define DEC430 429 #define DEC429 428 #define DEC428 427 #define DEC427 426 #define DEC426 425 #define DEC425 424 #define DEC424 423 #define DEC423 422 #define DEC422 421 #define DEC421 420 #define DEC420 419 #define DEC419 418 #define DEC418 417 #define DEC417 416 #define DEC416 415 #define DEC415 414 #define DEC414 413 #define DEC413 412 #define DEC412 411 #define DEC411 410 #define DEC410 409 #define DEC409 408 #define DEC408 407 #define DEC407 406 #define DEC406 405 #define DEC405 404 #define DEC404 403 #define DEC403 402 #define DEC402 401 #define DEC401 400 #define DEC400 399 #define DEC399 398 #define DEC398 397 #define DEC397 396 #define DEC396 395 #define DEC395 394 #define DEC394 393 #define DEC393 392 #define DEC392 391 #define DEC391 390 #define DEC390 389 #define DEC389 388 #define DEC388 387 #define DEC387 386 #define DEC386 385 #define DEC385 384 #define DEC384 383 #define DEC383 382 #define DEC382 381 #define DEC381 380 #define DEC380 379 #define DEC379 378 #define DEC378 377 #define DEC377 376 #define DEC376 375 #define DEC375 374 #define DEC374 373 #define DEC373 372 #define DEC372 371 #define DEC371 370 #define DEC370 369 #define DEC369 368 #define DEC368 367 #define DEC367 366 #define DEC366 365 #define DEC365 364 #define DEC364 363 #define DEC363 362 #define DEC362 361 #define DEC361 360 #define DEC360 359 #define DEC359 358 #define DEC358 357 #define DEC357 356 #define DEC356 355 #define DEC355 354 #define DEC354 353 #define DEC353 352 #define DEC352 351 #define DEC351 350 #define DEC350 349 #define DEC349 348 #define DEC348 347 #define DEC347 346 #define DEC346 345 #define DEC345 344 #define DEC344 343 #define DEC343 342 #define DEC342 341 #define DEC341 340 #define DEC340 339 #define DEC339 338 #define DEC338 337 #define DEC337 336 #define DEC336 335 #define DEC335 334 #define DEC334 333 #define DEC333 332 #define DEC332 331 #define DEC331 330 #define DEC330 329 #define DEC329 328 #define DEC328 327 #define DEC327 326 #define DEC326 325 #define DEC325 324 #define DEC324 323 #define DEC323 322 #define DEC322 321 #define DEC321 320 #define DEC320 319 #define DEC319 318 #define DEC318 317 #define DEC317 316 #define DEC316 315 #define DEC315 314 #define DEC314 313 #define DEC313 312 #define DEC312 311 #define DEC311 310 #define DEC310 309 #define DEC309 308 #define DEC308 307 #define DEC307 306 #define DEC306 305 #define DEC305 304 #define DEC304 303 #define DEC303 302 #define DEC302 301 #define DEC301 300 #define DEC300 299 #define DEC299 298 #define DEC298 297 #define DEC297 296 #define DEC296 295 #define DEC295 294 #define DEC294 293 #define DEC293 292 #define DEC292 291 #define DEC291 290 #define DEC290 289 #define DEC289 288 #define DEC288 287 #define DEC287 286 #define DEC286 285 #define DEC285 284 #define DEC284 283 #define DEC283 282 #define DEC282 281 #define DEC281 280 #define DEC280 279 #define DEC279 278 #define DEC278 277 #define DEC277 276 #define DEC276 275 #define DEC275 274 #define DEC274 273 #define DEC273 272 #define DEC272 271 #define DEC271 270 #define DEC270 269 #define DEC269 268 #define DEC268 267 #define DEC267 266 #define DEC266 265 #define DEC265 264 #define DEC264 263 #define DEC263 262 #define DEC262 261 #define DEC261 260 #define DEC260 259 #define DEC259 258 #define DEC258 257 #define DEC257 256 #define DEC256 255 #define DEC255 254 #define DEC254 253 #define DEC253 252 #define DEC252 251 #define DEC251 250 #define DEC250 249 #define DEC249 248 #define DEC248 247 #define DEC247 246 #define DEC246 245 #define DEC245 244 #define DEC244 243 #define DEC243 242 #define DEC242 241 #define DEC241 240 #define DEC240 239 #define DEC239 238 #define DEC238 237 #define DEC237 236 #define DEC236 235 #define DEC235 234 #define DEC234 233 #define DEC233 232 #define DEC232 231 #define DEC231 230 #define DEC230 229 #define DEC229 228 #define DEC228 227 #define DEC227 226 #define DEC226 225 #define DEC225 224 #define DEC224 223 #define DEC223 222 #define DEC222 221 #define DEC221 220 #define DEC220 219 #define DEC219 218 #define DEC218 217 #define DEC217 216 #define DEC216 215 #define DEC215 214 #define DEC214 213 #define DEC213 212 #define DEC212 211 #define DEC211 210 #define DEC210 209 #define DEC209 208 #define DEC208 207 #define DEC207 206 #define DEC206 205 #define DEC205 204 #define DEC204 203 #define DEC203 202 #define DEC202 201 #define DEC201 200 #define DEC200 199 #define DEC199 198 #define DEC198 197 #define DEC197 196 #define DEC196 195 #define DEC195 194 #define DEC194 193 #define DEC193 192 #define DEC192 191 #define DEC191 190 #define DEC190 189 #define DEC189 188 #define DEC188 187 #define DEC187 186 #define DEC186 185 #define DEC185 184 #define DEC184 183 #define DEC183 182 #define DEC182 181 #define DEC181 180 #define DEC180 179 #define DEC179 178 #define DEC178 177 #define DEC177 176 #define DEC176 175 #define DEC175 174 #define DEC174 173 #define DEC173 172 #define DEC172 171 #define DEC171 170 #define DEC170 169 #define DEC169 168 #define DEC168 167 #define DEC167 166 #define DEC166 165 #define DEC165 164 #define DEC164 163 #define DEC163 162 #define DEC162 161 #define DEC161 160 #define DEC160 159 #define DEC159 158 #define DEC158 157 #define DEC157 156 #define DEC156 155 #define DEC155 154 #define DEC154 153 #define DEC153 152 #define DEC152 151 #define DEC151 150 #define DEC150 149 #define DEC149 148 #define DEC148 147 #define DEC147 146 #define DEC146 145 #define DEC145 144 #define DEC144 143 #define DEC143 142 #define DEC142 141 #define DEC141 140 #define DEC140 139 #define DEC139 138 #define DEC138 137 #define DEC137 136 #define DEC136 135 #define DEC135 134 #define DEC134 133 #define DEC133 132 #define DEC132 131 #define DEC131 130 #define DEC130 129 #define DEC129 128 #define DEC128 127 #define DEC127 126 #define DEC126 125 #define DEC125 124 #define DEC124 123 #define DEC123 122 #define DEC122 121 #define DEC121 120 #define DEC120 119 #define DEC119 118 #define DEC118 117 #define DEC117 116 #define DEC116 115 #define DEC115 114 #define DEC114 113 #define DEC113 112 #define DEC112 111 #define DEC111 110 #define DEC110 109 #define DEC109 108 #define DEC108 107 #define DEC107 106 #define DEC106 105 #define DEC105 104 #define DEC104 103 #define DEC103 102 #define DEC102 101 #define DEC101 100 #define DEC100 99 #define DEC99 98 #define DEC98 97 #define DEC97 96 #define DEC96 95 #define DEC95 94 #define DEC94 93 #define DEC93 92 #define DEC92 91 #define DEC91 90 #define DEC90 89 #define DEC89 88 #define DEC88 87 #define DEC87 86 #define DEC86 85 #define DEC85 84 #define DEC84 83 #define DEC83 82 #define DEC82 81 #define DEC81 80 #define DEC80 79 #define DEC79 78 #define DEC78 77 #define DEC77 76 #define DEC76 75 #define DEC75 74 #define DEC74 73 #define DEC73 72 #define DEC72 71 #define DEC71 70 #define DEC70 69 #define DEC69 68 #define DEC68 67 #define DEC67 66 #define DEC66 65 #define DEC65 64 #define DEC64 63 #define DEC63 62 #define DEC62 61 #define DEC61 60 #define DEC60 59 #define DEC59 58 #define DEC58 57 #define DEC57 56 #define DEC56 55 #define DEC55 54 #define DEC54 53 #define DEC53 52 #define DEC52 51 #define DEC51 50 #define DEC50 49 #define DEC49 48 #define DEC48 47 #define DEC47 46 #define DEC46 45 #define DEC45 44 #define DEC44 43 #define DEC43 42 #define DEC42 41 #define DEC41 40 #define DEC40 39 #define DEC39 38 #define DEC38 37 #define DEC37 36 #define DEC36 35 #define DEC35 34 #define DEC34 33 #define DEC33 32 #define DEC32 31 #define DEC31 30 #define DEC30 29 #define DEC29 28 #define DEC28 27 #define DEC27 26 #define DEC26 25 #define DEC25 24 #define DEC24 23 #define DEC23 22 #define DEC22 21 #define DEC21 20 #define DEC20 19 #define DEC19 18 #define DEC18 17 #define DEC17 16 #define DEC16 15 #define DEC15 14 #define DEC14 13 #define DEC13 12 #define DEC12 11 #define DEC11 10 #define DEC10 9 #define DEC9 8 #define DEC8 7 #define DEC7 6 #define DEC6 5 #define DEC5 4 #define DEC4 3 #define DEC3 2 #define DEC2 1 #define DEC1 0 #define INC(x) C2(INC,x) #define INC1024 1025 #define INC1023 1024 #define INC1022 1023 #define INC1021 1022 #define INC1020 1021 #define INC1019 1020 #define INC1018 1019 #define INC1017 1018 #define INC1016 1017 #define INC1015 1016 #define INC1014 1015 #define INC1013 1014 #define INC1012 1013 #define INC1011 1012 #define INC1010 1011 #define INC1009 1010 #define INC1008 1009 #define INC1007 1008 #define INC1006 1007 #define INC1005 1006 #define INC1004 1005 #define INC1003 1004 #define INC1002 1003 #define INC1001 1002 #define INC1000 1001 #define INC999 1000 #define INC998 999 #define INC997 998 #define INC996 997 #define INC995 996 #define INC994 995 #define INC993 994 #define INC992 993 #define INC991 992 #define INC990 991 #define INC989 990 #define INC988 989 #define INC987 988 #define INC986 987 #define INC985 986 #define INC984 985 #define INC983 984 #define INC982 983 #define INC981 982 #define INC980 981 #define INC979 980 #define INC978 979 #define INC977 978 #define INC976 977 #define INC975 976 #define INC974 975 #define INC973 974 #define INC972 973 #define INC971 972 #define INC970 971 #define INC969 970 #define INC968 969 #define INC967 968 #define INC966 967 #define INC965 966 #define INC964 965 #define INC963 964 #define INC962 963 #define INC961 962 #define INC960 961 #define INC959 960 #define INC958 959 #define INC957 958 #define INC956 957 #define INC955 956 #define INC954 955 #define INC953 954 #define INC952 953 #define INC951 952 #define INC950 951 #define INC949 950 #define INC948 949 #define INC947 948 #define INC946 947 #define INC945 946 #define INC944 945 #define INC943 944 #define INC942 943 #define INC941 942 #define INC940 941 #define INC939 940 #define INC938 939 #define INC937 938 #define INC936 937 #define INC935 936 #define INC934 935 #define INC933 934 #define INC932 933 #define INC931 932 #define INC930 931 #define INC929 930 #define INC928 929 #define INC927 928 #define INC926 927 #define INC925 926 #define INC924 925 #define INC923 924 #define INC922 923 #define INC921 922 #define INC920 921 #define INC919 920 #define INC918 919 #define INC917 918 #define INC916 917 #define INC915 916 #define INC914 915 #define INC913 914 #define INC912 913 #define INC911 912 #define INC910 911 #define INC909 910 #define INC908 909 #define INC907 908 #define INC906 907 #define INC905 906 #define INC904 905 #define INC903 904 #define INC902 903 #define INC901 902 #define INC900 901 #define INC899 900 #define INC898 899 #define INC897 898 #define INC896 897 #define INC895 896 #define INC894 895 #define INC893 894 #define INC892 893 #define INC891 892 #define INC890 891 #define INC889 890 #define INC888 889 #define INC887 888 #define INC886 887 #define INC885 886 #define INC884 885 #define INC883 884 #define INC882 883 #define INC881 882 #define INC880 881 #define INC879 880 #define INC878 879 #define INC877 878 #define INC876 877 #define INC875 876 #define INC874 875 #define INC873 874 #define INC872 873 #define INC871 872 #define INC870 871 #define INC869 870 #define INC868 869 #define INC867 868 #define INC866 867 #define INC865 866 #define INC864 865 #define INC863 864 #define INC862 863 #define INC861 862 #define INC860 861 #define INC859 860 #define INC858 859 #define INC857 858 #define INC856 857 #define INC855 856 #define INC854 855 #define INC853 854 #define INC852 853 #define INC851 852 #define INC850 851 #define INC849 850 #define INC848 849 #define INC847 848 #define INC846 847 #define INC845 846 #define INC844 845 #define INC843 844 #define INC842 843 #define INC841 842 #define INC840 841 #define INC839 840 #define INC838 839 #define INC837 838 #define INC836 837 #define INC835 836 #define INC834 835 #define INC833 834 #define INC832 833 #define INC831 832 #define INC830 831 #define INC829 830 #define INC828 829 #define INC827 828 #define INC826 827 #define INC825 826 #define INC824 825 #define INC823 824 #define INC822 823 #define INC821 822 #define INC820 821 #define INC819 820 #define INC818 819 #define INC817 818 #define INC816 817 #define INC815 816 #define INC814 815 #define INC813 814 #define INC812 813 #define INC811 812 #define INC810 811 #define INC809 810 #define INC808 809 #define INC807 808 #define INC806 807 #define INC805 806 #define INC804 805 #define INC803 804 #define INC802 803 #define INC801 802 #define INC800 801 #define INC799 800 #define INC798 799 #define INC797 798 #define INC796 797 #define INC795 796 #define INC794 795 #define INC793 794 #define INC792 793 #define INC791 792 #define INC790 791 #define INC789 790 #define INC788 789 #define INC787 788 #define INC786 787 #define INC785 786 #define INC784 785 #define INC783 784 #define INC782 783 #define INC781 782 #define INC780 781 #define INC779 780 #define INC778 779 #define INC777 778 #define INC776 777 #define INC775 776 #define INC774 775 #define INC773 774 #define INC772 773 #define INC771 772 #define INC770 771 #define INC769 770 #define INC768 769 #define INC767 768 #define INC766 767 #define INC765 766 #define INC764 765 #define INC763 764 #define INC762 763 #define INC761 762 #define INC760 761 #define INC759 760 #define INC758 759 #define INC757 758 #define INC756 757 #define INC755 756 #define INC754 755 #define INC753 754 #define INC752 753 #define INC751 752 #define INC750 751 #define INC749 750 #define INC748 749 #define INC747 748 #define INC746 747 #define INC745 746 #define INC744 745 #define INC743 744 #define INC742 743 #define INC741 742 #define INC740 741 #define INC739 740 #define INC738 739 #define INC737 738 #define INC736 737 #define INC735 736 #define INC734 735 #define INC733 734 #define INC732 733 #define INC731 732 #define INC730 731 #define INC729 730 #define INC728 729 #define INC727 728 #define INC726 727 #define INC725 726 #define INC724 725 #define INC723 724 #define INC722 723 #define INC721 722 #define INC720 721 #define INC719 720 #define INC718 719 #define INC717 718 #define INC716 717 #define INC715 716 #define INC714 715 #define INC713 714 #define INC712 713 #define INC711 712 #define INC710 711 #define INC709 710 #define INC708 709 #define INC707 708 #define INC706 707 #define INC705 706 #define INC704 705 #define INC703 704 #define INC702 703 #define INC701 702 #define INC700 701 #define INC699 700 #define INC698 699 #define INC697 698 #define INC696 697 #define INC695 696 #define INC694 695 #define INC693 694 #define INC692 693 #define INC691 692 #define INC690 691 #define INC689 690 #define INC688 689 #define INC687 688 #define INC686 687 #define INC685 686 #define INC684 685 #define INC683 684 #define INC682 683 #define INC681 682 #define INC680 681 #define INC679 680 #define INC678 679 #define INC677 678 #define INC676 677 #define INC675 676 #define INC674 675 #define INC673 674 #define INC672 673 #define INC671 672 #define INC670 671 #define INC669 670 #define INC668 669 #define INC667 668 #define INC666 667 #define INC665 666 #define INC664 665 #define INC663 664 #define INC662 663 #define INC661 662 #define INC660 661 #define INC659 660 #define INC658 659 #define INC657 658 #define INC656 657 #define INC655 656 #define INC654 655 #define INC653 654 #define INC652 653 #define INC651 652 #define INC650 651 #define INC649 650 #define INC648 649 #define INC647 648 #define INC646 647 #define INC645 646 #define INC644 645 #define INC643 644 #define INC642 643 #define INC641 642 #define INC640 641 #define INC639 640 #define INC638 639 #define INC637 638 #define INC636 637 #define INC635 636 #define INC634 635 #define INC633 634 #define INC632 633 #define INC631 632 #define INC630 631 #define INC629 630 #define INC628 629 #define INC627 628 #define INC626 627 #define INC625 626 #define INC624 625 #define INC623 624 #define INC622 623 #define INC621 622 #define INC620 621 #define INC619 620 #define INC618 619 #define INC617 618 #define INC616 617 #define INC615 616 #define INC614 615 #define INC613 614 #define INC612 613 #define INC611 612 #define INC610 611 #define INC609 610 #define INC608 609 #define INC607 608 #define INC606 607 #define INC605 606 #define INC604 605 #define INC603 604 #define INC602 603 #define INC601 602 #define INC600 601 #define INC599 600 #define INC598 599 #define INC597 598 #define INC596 597 #define INC595 596 #define INC594 595 #define INC593 594 #define INC592 593 #define INC591 592 #define INC590 591 #define INC589 590 #define INC588 589 #define INC587 588 #define INC586 587 #define INC585 586 #define INC584 585 #define INC583 584 #define INC582 583 #define INC581 582 #define INC580 581 #define INC579 580 #define INC578 579 #define INC577 578 #define INC576 577 #define INC575 576 #define INC574 575 #define INC573 574 #define INC572 573 #define INC571 572 #define INC570 571 #define INC569 570 #define INC568 569 #define INC567 568 #define INC566 567 #define INC565 566 #define INC564 565 #define INC563 564 #define INC562 563 #define INC561 562 #define INC560 561 #define INC559 560 #define INC558 559 #define INC557 558 #define INC556 557 #define INC555 556 #define INC554 555 #define INC553 554 #define INC552 553 #define INC551 552 #define INC550 551 #define INC549 550 #define INC548 549 #define INC547 548 #define INC546 547 #define INC545 546 #define INC544 545 #define INC543 544 #define INC542 543 #define INC541 542 #define INC540 541 #define INC539 540 #define INC538 539 #define INC537 538 #define INC536 537 #define INC535 536 #define INC534 535 #define INC533 534 #define INC532 533 #define INC531 532 #define INC530 531 #define INC529 530 #define INC528 529 #define INC527 528 #define INC526 527 #define INC525 526 #define INC524 525 #define INC523 524 #define INC522 523 #define INC521 522 #define INC520 521 #define INC519 520 #define INC518 519 #define INC517 518 #define INC516 517 #define INC515 516 #define INC514 515 #define INC513 514 #define INC512 513 #define INC511 512 #define INC510 511 #define INC509 510 #define INC508 509 #define INC507 508 #define INC506 507 #define INC505 506 #define INC504 505 #define INC503 504 #define INC502 503 #define INC501 502 #define INC500 501 #define INC499 500 #define INC498 499 #define INC497 498 #define INC496 497 #define INC495 496 #define INC494 495 #define INC493 494 #define INC492 493 #define INC491 492 #define INC490 491 #define INC489 490 #define INC488 489 #define INC487 488 #define INC486 487 #define INC485 486 #define INC484 485 #define INC483 484 #define INC482 483 #define INC481 482 #define INC480 481 #define INC479 480 #define INC478 479 #define INC477 478 #define INC476 477 #define INC475 476 #define INC474 475 #define INC473 474 #define INC472 473 #define INC471 472 #define INC470 471 #define INC469 470 #define INC468 469 #define INC467 468 #define INC466 467 #define INC465 466 #define INC464 465 #define INC463 464 #define INC462 463 #define INC461 462 #define INC460 461 #define INC459 460 #define INC458 459 #define INC457 458 #define INC456 457 #define INC455 456 #define INC454 455 #define INC453 454 #define INC452 453 #define INC451 452 #define INC450 451 #define INC449 450 #define INC448 449 #define INC447 448 #define INC446 447 #define INC445 446 #define INC444 445 #define INC443 444 #define INC442 443 #define INC441 442 #define INC440 441 #define INC439 440 #define INC438 439 #define INC437 438 #define INC436 437 #define INC435 436 #define INC434 435 #define INC433 434 #define INC432 433 #define INC431 432 #define INC430 431 #define INC429 430 #define INC428 429 #define INC427 428 #define INC426 427 #define INC425 426 #define INC424 425 #define INC423 424 #define INC422 423 #define INC421 422 #define INC420 421 #define INC419 420 #define INC418 419 #define INC417 418 #define INC416 417 #define INC415 416 #define INC414 415 #define INC413 414 #define INC412 413 #define INC411 412 #define INC410 411 #define INC409 410 #define INC408 409 #define INC407 408 #define INC406 407 #define INC405 406 #define INC404 405 #define INC403 404 #define INC402 403 #define INC401 402 #define INC400 401 #define INC399 400 #define INC398 399 #define INC397 398 #define INC396 397 #define INC395 396 #define INC394 395 #define INC393 394 #define INC392 393 #define INC391 392 #define INC390 391 #define INC389 390 #define INC388 389 #define INC387 388 #define INC386 387 #define INC385 386 #define INC384 385 #define INC383 384 #define INC382 383 #define INC381 382 #define INC380 381 #define INC379 380 #define INC378 379 #define INC377 378 #define INC376 377 #define INC375 376 #define INC374 375 #define INC373 374 #define INC372 373 #define INC371 372 #define INC370 371 #define INC369 370 #define INC368 369 #define INC367 368 #define INC366 367 #define INC365 366 #define INC364 365 #define INC363 364 #define INC362 363 #define INC361 362 #define INC360 361 #define INC359 360 #define INC358 359 #define INC357 358 #define INC356 357 #define INC355 356 #define INC354 355 #define INC353 354 #define INC352 353 #define INC351 352 #define INC350 351 #define INC349 350 #define INC348 349 #define INC347 348 #define INC346 347 #define INC345 346 #define INC344 345 #define INC343 344 #define INC342 343 #define INC341 342 #define INC340 341 #define INC339 340 #define INC338 339 #define INC337 338 #define INC336 337 #define INC335 336 #define INC334 335 #define INC333 334 #define INC332 333 #define INC331 332 #define INC330 331 #define INC329 330 #define INC328 329 #define INC327 328 #define INC326 327 #define INC325 326 #define INC324 325 #define INC323 324 #define INC322 323 #define INC321 322 #define INC320 321 #define INC319 320 #define INC318 319 #define INC317 318 #define INC316 317 #define INC315 316 #define INC314 315 #define INC313 314 #define INC312 313 #define INC311 312 #define INC310 311 #define INC309 310 #define INC308 309 #define INC307 308 #define INC306 307 #define INC305 306 #define INC304 305 #define INC303 304 #define INC302 303 #define INC301 302 #define INC300 301 #define INC299 300 #define INC298 299 #define INC297 298 #define INC296 297 #define INC295 296 #define INC294 295 #define INC293 294 #define INC292 293 #define INC291 292 #define INC290 291 #define INC289 290 #define INC288 289 #define INC287 288 #define INC286 287 #define INC285 286 #define INC284 285 #define INC283 284 #define INC282 283 #define INC281 282 #define INC280 281 #define INC279 280 #define INC278 279 #define INC277 278 #define INC276 277 #define INC275 276 #define INC274 275 #define INC273 274 #define INC272 273 #define INC271 272 #define INC270 271 #define INC269 270 #define INC268 269 #define INC267 268 #define INC266 267 #define INC265 266 #define INC264 265 #define INC263 264 #define INC262 263 #define INC261 262 #define INC260 261 #define INC259 260 #define INC258 259 #define INC257 258 #define INC256 257 #define INC255 256 #define INC254 255 #define INC253 254 #define INC252 253 #define INC251 252 #define INC250 251 #define INC249 250 #define INC248 249 #define INC247 248 #define INC246 247 #define INC245 246 #define INC244 245 #define INC243 244 #define INC242 243 #define INC241 242 #define INC240 241 #define INC239 240 #define INC238 239 #define INC237 238 #define INC236 237 #define INC235 236 #define INC234 235 #define INC233 234 #define INC232 233 #define INC231 232 #define INC230 231 #define INC229 230 #define INC228 229 #define INC227 228 #define INC226 227 #define INC225 226 #define INC224 225 #define INC223 224 #define INC222 223 #define INC221 222 #define INC220 221 #define INC219 220 #define INC218 219 #define INC217 218 #define INC216 217 #define INC215 216 #define INC214 215 #define INC213 214 #define INC212 213 #define INC211 212 #define INC210 211 #define INC209 210 #define INC208 209 #define INC207 208 #define INC206 207 #define INC205 206 #define INC204 205 #define INC203 204 #define INC202 203 #define INC201 202 #define INC200 201 #define INC199 200 #define INC198 199 #define INC197 198 #define INC196 197 #define INC195 196 #define INC194 195 #define INC193 194 #define INC192 193 #define INC191 192 #define INC190 191 #define INC189 190 #define INC188 189 #define INC187 188 #define INC186 187 #define INC185 186 #define INC184 185 #define INC183 184 #define INC182 183 #define INC181 182 #define INC180 181 #define INC179 180 #define INC178 179 #define INC177 178 #define INC176 177 #define INC175 176 #define INC174 175 #define INC173 174 #define INC172 173 #define INC171 172 #define INC170 171 #define INC169 170 #define INC168 169 #define INC167 168 #define INC166 167 #define INC165 166 #define INC164 165 #define INC163 164 #define INC162 163 #define INC161 162 #define INC160 161 #define INC159 160 #define INC158 159 #define INC157 158 #define INC156 157 #define INC155 156 #define INC154 155 #define INC153 154 #define INC152 153 #define INC151 152 #define INC150 151 #define INC149 150 #define INC148 149 #define INC147 148 #define INC146 147 #define INC145 146 #define INC144 145 #define INC143 144 #define INC142 143 #define INC141 142 #define INC140 141 #define INC139 140 #define INC138 139 #define INC137 138 #define INC136 137 #define INC135 136 #define INC134 135 #define INC133 134 #define INC132 133 #define INC131 132 #define INC130 131 #define INC129 130 #define INC128 129 #define INC127 128 #define INC126 127 #define INC125 126 #define INC124 125 #define INC123 124 #define INC122 123 #define INC121 122 #define INC120 121 #define INC119 120 #define INC118 119 #define INC117 118 #define INC116 117 #define INC115 116 #define INC114 115 #define INC113 114 #define INC112 113 #define INC111 112 #define INC110 111 #define INC109 110 #define INC108 109 #define INC107 108 #define INC106 107 #define INC105 106 #define INC104 105 #define INC103 104 #define INC102 103 #define INC101 102 #define INC100 101 #define INC99 100 #define INC98 99 #define INC97 98 #define INC96 97 #define INC95 96 #define INC94 95 #define INC93 94 #define INC92 93 #define INC91 92 #define INC90 91 #define INC89 90 #define INC88 89 #define INC87 88 #define INC86 87 #define INC85 86 #define INC84 85 #define INC83 84 #define INC82 83 #define INC81 82 #define INC80 81 #define INC79 80 #define INC78 79 #define INC77 78 #define INC76 77 #define INC75 76 #define INC74 75 #define INC73 74 #define INC72 73 #define INC71 72 #define INC70 71 #define INC69 70 #define INC68 69 #define INC67 68 #define INC66 67 #define INC65 66 #define INC64 65 #define INC63 64 #define INC62 63 #define INC61 62 #define INC60 61 #define INC59 60 #define INC58 59 #define INC57 58 #define INC56 57 #define INC55 56 #define INC54 55 #define INC53 54 #define INC52 53 #define INC51 52 #define INC50 51 #define INC49 50 #define INC48 49 #define INC47 48 #define INC46 47 #define INC45 46 #define INC44 45 #define INC43 44 #define INC42 43 #define INC41 42 #define INC40 41 #define INC39 40 #define INC38 39 #define INC37 38 #define INC36 37 #define INC35 36 #define INC34 35 #define INC33 34 #define INC32 33 #define INC31 32 #define INC30 31 #define INC29 30 #define INC28 29 #define INC27 28 #define INC26 27 #define INC25 26 #define INC24 25 #define INC23 24 #define INC22 23 #define INC21 22 #define INC20 21 #define INC19 20 #define INC18 19 #define INC17 18 #define INC16 17 #define INC15 16 #define INC14 15 #define INC13 14 #define INC12 13 #define INC11 12 #define INC10 11 #define INC9 10 #define INC8 9 #define INC7 8 #define INC6 7 #define INC5 6 #define INC4 5 #define INC3 4 #define INC2 3 #define INC1 2 #define INC0 1 #define DIV2(x) C2(DIV2_,x) #define DIV2_1024 512 #define DIV2_1023 511 #define DIV2_1022 511 #define DIV2_1021 510 #define DIV2_1020 510 #define DIV2_1019 509 #define DIV2_1018 509 #define DIV2_1017 508 #define DIV2_1016 508 #define DIV2_1015 507 #define DIV2_1014 507 #define DIV2_1013 506 #define DIV2_1012 506 #define DIV2_1011 505 #define DIV2_1010 505 #define DIV2_1009 504 #define DIV2_1008 504 #define DIV2_1007 503 #define DIV2_1006 503 #define DIV2_1005 502 #define DIV2_1004 502 #define DIV2_1003 501 #define DIV2_1002 501 #define DIV2_1001 500 #define DIV2_1000 500 #define DIV2_999 499 #define DIV2_998 499 #define DIV2_997 498 #define DIV2_996 498 #define DIV2_995 497 #define DIV2_994 497 #define DIV2_993 496 #define DIV2_992 496 #define DIV2_991 495 #define DIV2_990 495 #define DIV2_989 494 #define DIV2_988 494 #define DIV2_987 493 #define DIV2_986 493 #define DIV2_985 492 #define DIV2_984 492 #define DIV2_983 491 #define DIV2_982 491 #define DIV2_981 490 #define DIV2_980 490 #define DIV2_979 489 #define DIV2_978 489 #define DIV2_977 488 #define DIV2_976 488 #define DIV2_975 487 #define DIV2_974 487 #define DIV2_973 486 #define DIV2_972 486 #define DIV2_971 485 #define DIV2_970 485 #define DIV2_969 484 #define DIV2_968 484 #define DIV2_967 483 #define DIV2_966 483 #define DIV2_965 482 #define DIV2_964 482 #define DIV2_963 481 #define DIV2_962 481 #define DIV2_961 480 #define DIV2_960 480 #define DIV2_959 479 #define DIV2_958 479 #define DIV2_957 478 #define DIV2_956 478 #define DIV2_955 477 #define DIV2_954 477 #define DIV2_953 476 #define DIV2_952 476 #define DIV2_951 475 #define DIV2_950 475 #define DIV2_949 474 #define DIV2_948 474 #define DIV2_947 473 #define DIV2_946 473 #define DIV2_945 472 #define DIV2_944 472 #define DIV2_943 471 #define DIV2_942 471 #define DIV2_941 470 #define DIV2_940 470 #define DIV2_939 469 #define DIV2_938 469 #define DIV2_937 468 #define DIV2_936 468 #define DIV2_935 467 #define DIV2_934 467 #define DIV2_933 466 #define DIV2_932 466 #define DIV2_931 465 #define DIV2_930 465 #define DIV2_929 464 #define DIV2_928 464 #define DIV2_927 463 #define DIV2_926 463 #define DIV2_925 462 #define DIV2_924 462 #define DIV2_923 461 #define DIV2_922 461 #define DIV2_921 460 #define DIV2_920 460 #define DIV2_919 459 #define DIV2_918 459 #define DIV2_917 458 #define DIV2_916 458 #define DIV2_915 457 #define DIV2_914 457 #define DIV2_913 456 #define DIV2_912 456 #define DIV2_911 455 #define DIV2_910 455 #define DIV2_909 454 #define DIV2_908 454 #define DIV2_907 453 #define DIV2_906 453 #define DIV2_905 452 #define DIV2_904 452 #define DIV2_903 451 #define DIV2_902 451 #define DIV2_901 450 #define DIV2_900 450 #define DIV2_899 449 #define DIV2_898 449 #define DIV2_897 448 #define DIV2_896 448 #define DIV2_895 447 #define DIV2_894 447 #define DIV2_893 446 #define DIV2_892 446 #define DIV2_891 445 #define DIV2_890 445 #define DIV2_889 444 #define DIV2_888 444 #define DIV2_887 443 #define DIV2_886 443 #define DIV2_885 442 #define DIV2_884 442 #define DIV2_883 441 #define DIV2_882 441 #define DIV2_881 440 #define DIV2_880 440 #define DIV2_879 439 #define DIV2_878 439 #define DIV2_877 438 #define DIV2_876 438 #define DIV2_875 437 #define DIV2_874 437 #define DIV2_873 436 #define DIV2_872 436 #define DIV2_871 435 #define DIV2_870 435 #define DIV2_869 434 #define DIV2_868 434 #define DIV2_867 433 #define DIV2_866 433 #define DIV2_865 432 #define DIV2_864 432 #define DIV2_863 431 #define DIV2_862 431 #define DIV2_861 430 #define DIV2_860 430 #define DIV2_859 429 #define DIV2_858 429 #define DIV2_857 428 #define DIV2_856 428 #define DIV2_855 427 #define DIV2_854 427 #define DIV2_853 426 #define DIV2_852 426 #define DIV2_851 425 #define DIV2_850 425 #define DIV2_849 424 #define DIV2_848 424 #define DIV2_847 423 #define DIV2_846 423 #define DIV2_845 422 #define DIV2_844 422 #define DIV2_843 421 #define DIV2_842 421 #define DIV2_841 420 #define DIV2_840 420 #define DIV2_839 419 #define DIV2_838 419 #define DIV2_837 418 #define DIV2_836 418 #define DIV2_835 417 #define DIV2_834 417 #define DIV2_833 416 #define DIV2_832 416 #define DIV2_831 415 #define DIV2_830 415 #define DIV2_829 414 #define DIV2_828 414 #define DIV2_827 413 #define DIV2_826 413 #define DIV2_825 412 #define DIV2_824 412 #define DIV2_823 411 #define DIV2_822 411 #define DIV2_821 410 #define DIV2_820 410 #define DIV2_819 409 #define DIV2_818 409 #define DIV2_817 408 #define DIV2_816 408 #define DIV2_815 407 #define DIV2_814 407 #define DIV2_813 406 #define DIV2_812 406 #define DIV2_811 405 #define DIV2_810 405 #define DIV2_809 404 #define DIV2_808 404 #define DIV2_807 403 #define DIV2_806 403 #define DIV2_805 402 #define DIV2_804 402 #define DIV2_803 401 #define DIV2_802 401 #define DIV2_801 400 #define DIV2_800 400 #define DIV2_799 399 #define DIV2_798 399 #define DIV2_797 398 #define DIV2_796 398 #define DIV2_795 397 #define DIV2_794 397 #define DIV2_793 396 #define DIV2_792 396 #define DIV2_791 395 #define DIV2_790 395 #define DIV2_789 394 #define DIV2_788 394 #define DIV2_787 393 #define DIV2_786 393 #define DIV2_785 392 #define DIV2_784 392 #define DIV2_783 391 #define DIV2_782 391 #define DIV2_781 390 #define DIV2_780 390 #define DIV2_779 389 #define DIV2_778 389 #define DIV2_777 388 #define DIV2_776 388 #define DIV2_775 387 #define DIV2_774 387 #define DIV2_773 386 #define DIV2_772 386 #define DIV2_771 385 #define DIV2_770 385 #define DIV2_769 384 #define DIV2_768 384 #define DIV2_767 383 #define DIV2_766 383 #define DIV2_765 382 #define DIV2_764 382 #define DIV2_763 381 #define DIV2_762 381 #define DIV2_761 380 #define DIV2_760 380 #define DIV2_759 379 #define DIV2_758 379 #define DIV2_757 378 #define DIV2_756 378 #define DIV2_755 377 #define DIV2_754 377 #define DIV2_753 376 #define DIV2_752 376 #define DIV2_751 375 #define DIV2_750 375 #define DIV2_749 374 #define DIV2_748 374 #define DIV2_747 373 #define DIV2_746 373 #define DIV2_745 372 #define DIV2_744 372 #define DIV2_743 371 #define DIV2_742 371 #define DIV2_741 370 #define DIV2_740 370 #define DIV2_739 369 #define DIV2_738 369 #define DIV2_737 368 #define DIV2_736 368 #define DIV2_735 367 #define DIV2_734 367 #define DIV2_733 366 #define DIV2_732 366 #define DIV2_731 365 #define DIV2_730 365 #define DIV2_729 364 #define DIV2_728 364 #define DIV2_727 363 #define DIV2_726 363 #define DIV2_725 362 #define DIV2_724 362 #define DIV2_723 361 #define DIV2_722 361 #define DIV2_721 360 #define DIV2_720 360 #define DIV2_719 359 #define DIV2_718 359 #define DIV2_717 358 #define DIV2_716 358 #define DIV2_715 357 #define DIV2_714 357 #define DIV2_713 356 #define DIV2_712 356 #define DIV2_711 355 #define DIV2_710 355 #define DIV2_709 354 #define DIV2_708 354 #define DIV2_707 353 #define DIV2_706 353 #define DIV2_705 352 #define DIV2_704 352 #define DIV2_703 351 #define DIV2_702 351 #define DIV2_701 350 #define DIV2_700 350 #define DIV2_699 349 #define DIV2_698 349 #define DIV2_697 348 #define DIV2_696 348 #define DIV2_695 347 #define DIV2_694 347 #define DIV2_693 346 #define DIV2_692 346 #define DIV2_691 345 #define DIV2_690 345 #define DIV2_689 344 #define DIV2_688 344 #define DIV2_687 343 #define DIV2_686 343 #define DIV2_685 342 #define DIV2_684 342 #define DIV2_683 341 #define DIV2_682 341 #define DIV2_681 340 #define DIV2_680 340 #define DIV2_679 339 #define DIV2_678 339 #define DIV2_677 338 #define DIV2_676 338 #define DIV2_675 337 #define DIV2_674 337 #define DIV2_673 336 #define DIV2_672 336 #define DIV2_671 335 #define DIV2_670 335 #define DIV2_669 334 #define DIV2_668 334 #define DIV2_667 333 #define DIV2_666 333 #define DIV2_665 332 #define DIV2_664 332 #define DIV2_663 331 #define DIV2_662 331 #define DIV2_661 330 #define DIV2_660 330 #define DIV2_659 329 #define DIV2_658 329 #define DIV2_657 328 #define DIV2_656 328 #define DIV2_655 327 #define DIV2_654 327 #define DIV2_653 326 #define DIV2_652 326 #define DIV2_651 325 #define DIV2_650 325 #define DIV2_649 324 #define DIV2_648 324 #define DIV2_647 323 #define DIV2_646 323 #define DIV2_645 322 #define DIV2_644 322 #define DIV2_643 321 #define DIV2_642 321 #define DIV2_641 320 #define DIV2_640 320 #define DIV2_639 319 #define DIV2_638 319 #define DIV2_637 318 #define DIV2_636 318 #define DIV2_635 317 #define DIV2_634 317 #define DIV2_633 316 #define DIV2_632 316 #define DIV2_631 315 #define DIV2_630 315 #define DIV2_629 314 #define DIV2_628 314 #define DIV2_627 313 #define DIV2_626 313 #define DIV2_625 312 #define DIV2_624 312 #define DIV2_623 311 #define DIV2_622 311 #define DIV2_621 310 #define DIV2_620 310 #define DIV2_619 309 #define DIV2_618 309 #define DIV2_617 308 #define DIV2_616 308 #define DIV2_615 307 #define DIV2_614 307 #define DIV2_613 306 #define DIV2_612 306 #define DIV2_611 305 #define DIV2_610 305 #define DIV2_609 304 #define DIV2_608 304 #define DIV2_607 303 #define DIV2_606 303 #define DIV2_605 302 #define DIV2_604 302 #define DIV2_603 301 #define DIV2_602 301 #define DIV2_601 300 #define DIV2_600 300 #define DIV2_599 299 #define DIV2_598 299 #define DIV2_597 298 #define DIV2_596 298 #define DIV2_595 297 #define DIV2_594 297 #define DIV2_593 296 #define DIV2_592 296 #define DIV2_591 295 #define DIV2_590 295 #define DIV2_589 294 #define DIV2_588 294 #define DIV2_587 293 #define DIV2_586 293 #define DIV2_585 292 #define DIV2_584 292 #define DIV2_583 291 #define DIV2_582 291 #define DIV2_581 290 #define DIV2_580 290 #define DIV2_579 289 #define DIV2_578 289 #define DIV2_577 288 #define DIV2_576 288 #define DIV2_575 287 #define DIV2_574 287 #define DIV2_573 286 #define DIV2_572 286 #define DIV2_571 285 #define DIV2_570 285 #define DIV2_569 284 #define DIV2_568 284 #define DIV2_567 283 #define DIV2_566 283 #define DIV2_565 282 #define DIV2_564 282 #define DIV2_563 281 #define DIV2_562 281 #define DIV2_561 280 #define DIV2_560 280 #define DIV2_559 279 #define DIV2_558 279 #define DIV2_557 278 #define DIV2_556 278 #define DIV2_555 277 #define DIV2_554 277 #define DIV2_553 276 #define DIV2_552 276 #define DIV2_551 275 #define DIV2_550 275 #define DIV2_549 274 #define DIV2_548 274 #define DIV2_547 273 #define DIV2_546 273 #define DIV2_545 272 #define DIV2_544 272 #define DIV2_543 271 #define DIV2_542 271 #define DIV2_541 270 #define DIV2_540 270 #define DIV2_539 269 #define DIV2_538 269 #define DIV2_537 268 #define DIV2_536 268 #define DIV2_535 267 #define DIV2_534 267 #define DIV2_533 266 #define DIV2_532 266 #define DIV2_531 265 #define DIV2_530 265 #define DIV2_529 264 #define DIV2_528 264 #define DIV2_527 263 #define DIV2_526 263 #define DIV2_525 262 #define DIV2_524 262 #define DIV2_523 261 #define DIV2_522 261 #define DIV2_521 260 #define DIV2_520 260 #define DIV2_519 259 #define DIV2_518 259 #define DIV2_517 258 #define DIV2_516 258 #define DIV2_515 257 #define DIV2_514 257 #define DIV2_513 256 #define DIV2_512 256 #define DIV2_511 255 #define DIV2_510 255 #define DIV2_509 254 #define DIV2_508 254 #define DIV2_507 253 #define DIV2_506 253 #define DIV2_505 252 #define DIV2_504 252 #define DIV2_503 251 #define DIV2_502 251 #define DIV2_501 250 #define DIV2_500 250 #define DIV2_499 249 #define DIV2_498 249 #define DIV2_497 248 #define DIV2_496 248 #define DIV2_495 247 #define DIV2_494 247 #define DIV2_493 246 #define DIV2_492 246 #define DIV2_491 245 #define DIV2_490 245 #define DIV2_489 244 #define DIV2_488 244 #define DIV2_487 243 #define DIV2_486 243 #define DIV2_485 242 #define DIV2_484 242 #define DIV2_483 241 #define DIV2_482 241 #define DIV2_481 240 #define DIV2_480 240 #define DIV2_479 239 #define DIV2_478 239 #define DIV2_477 238 #define DIV2_476 238 #define DIV2_475 237 #define DIV2_474 237 #define DIV2_473 236 #define DIV2_472 236 #define DIV2_471 235 #define DIV2_470 235 #define DIV2_469 234 #define DIV2_468 234 #define DIV2_467 233 #define DIV2_466 233 #define DIV2_465 232 #define DIV2_464 232 #define DIV2_463 231 #define DIV2_462 231 #define DIV2_461 230 #define DIV2_460 230 #define DIV2_459 229 #define DIV2_458 229 #define DIV2_457 228 #define DIV2_456 228 #define DIV2_455 227 #define DIV2_454 227 #define DIV2_453 226 #define DIV2_452 226 #define DIV2_451 225 #define DIV2_450 225 #define DIV2_449 224 #define DIV2_448 224 #define DIV2_447 223 #define DIV2_446 223 #define DIV2_445 222 #define DIV2_444 222 #define DIV2_443 221 #define DIV2_442 221 #define DIV2_441 220 #define DIV2_440 220 #define DIV2_439 219 #define DIV2_438 219 #define DIV2_437 218 #define DIV2_436 218 #define DIV2_435 217 #define DIV2_434 217 #define DIV2_433 216 #define DIV2_432 216 #define DIV2_431 215 #define DIV2_430 215 #define DIV2_429 214 #define DIV2_428 214 #define DIV2_427 213 #define DIV2_426 213 #define DIV2_425 212 #define DIV2_424 212 #define DIV2_423 211 #define DIV2_422 211 #define DIV2_421 210 #define DIV2_420 210 #define DIV2_419 209 #define DIV2_418 209 #define DIV2_417 208 #define DIV2_416 208 #define DIV2_415 207 #define DIV2_414 207 #define DIV2_413 206 #define DIV2_412 206 #define DIV2_411 205 #define DIV2_410 205 #define DIV2_409 204 #define DIV2_408 204 #define DIV2_407 203 #define DIV2_406 203 #define DIV2_405 202 #define DIV2_404 202 #define DIV2_403 201 #define DIV2_402 201 #define DIV2_401 200 #define DIV2_400 200 #define DIV2_399 199 #define DIV2_398 199 #define DIV2_397 198 #define DIV2_396 198 #define DIV2_395 197 #define DIV2_394 197 #define DIV2_393 196 #define DIV2_392 196 #define DIV2_391 195 #define DIV2_390 195 #define DIV2_389 194 #define DIV2_388 194 #define DIV2_387 193 #define DIV2_386 193 #define DIV2_385 192 #define DIV2_384 192 #define DIV2_383 191 #define DIV2_382 191 #define DIV2_381 190 #define DIV2_380 190 #define DIV2_379 189 #define DIV2_378 189 #define DIV2_377 188 #define DIV2_376 188 #define DIV2_375 187 #define DIV2_374 187 #define DIV2_373 186 #define DIV2_372 186 #define DIV2_371 185 #define DIV2_370 185 #define DIV2_369 184 #define DIV2_368 184 #define DIV2_367 183 #define DIV2_366 183 #define DIV2_365 182 #define DIV2_364 182 #define DIV2_363 181 #define DIV2_362 181 #define DIV2_361 180 #define DIV2_360 180 #define DIV2_359 179 #define DIV2_358 179 #define DIV2_357 178 #define DIV2_356 178 #define DIV2_355 177 #define DIV2_354 177 #define DIV2_353 176 #define DIV2_352 176 #define DIV2_351 175 #define DIV2_350 175 #define DIV2_349 174 #define DIV2_348 174 #define DIV2_347 173 #define DIV2_346 173 #define DIV2_345 172 #define DIV2_344 172 #define DIV2_343 171 #define DIV2_342 171 #define DIV2_341 170 #define DIV2_340 170 #define DIV2_339 169 #define DIV2_338 169 #define DIV2_337 168 #define DIV2_336 168 #define DIV2_335 167 #define DIV2_334 167 #define DIV2_333 166 #define DIV2_332 166 #define DIV2_331 165 #define DIV2_330 165 #define DIV2_329 164 #define DIV2_328 164 #define DIV2_327 163 #define DIV2_326 163 #define DIV2_325 162 #define DIV2_324 162 #define DIV2_323 161 #define DIV2_322 161 #define DIV2_321 160 #define DIV2_320 160 #define DIV2_319 159 #define DIV2_318 159 #define DIV2_317 158 #define DIV2_316 158 #define DIV2_315 157 #define DIV2_314 157 #define DIV2_313 156 #define DIV2_312 156 #define DIV2_311 155 #define DIV2_310 155 #define DIV2_309 154 #define DIV2_308 154 #define DIV2_307 153 #define DIV2_306 153 #define DIV2_305 152 #define DIV2_304 152 #define DIV2_303 151 #define DIV2_302 151 #define DIV2_301 150 #define DIV2_300 150 #define DIV2_299 149 #define DIV2_298 149 #define DIV2_297 148 #define DIV2_296 148 #define DIV2_295 147 #define DIV2_294 147 #define DIV2_293 146 #define DIV2_292 146 #define DIV2_291 145 #define DIV2_290 145 #define DIV2_289 144 #define DIV2_288 144 #define DIV2_287 143 #define DIV2_286 143 #define DIV2_285 142 #define DIV2_284 142 #define DIV2_283 141 #define DIV2_282 141 #define DIV2_281 140 #define DIV2_280 140 #define DIV2_279 139 #define DIV2_278 139 #define DIV2_277 138 #define DIV2_276 138 #define DIV2_275 137 #define DIV2_274 137 #define DIV2_273 136 #define DIV2_272 136 #define DIV2_271 135 #define DIV2_270 135 #define DIV2_269 134 #define DIV2_268 134 #define DIV2_267 133 #define DIV2_266 133 #define DIV2_265 132 #define DIV2_264 132 #define DIV2_263 131 #define DIV2_262 131 #define DIV2_261 130 #define DIV2_260 130 #define DIV2_259 129 #define DIV2_258 129 #define DIV2_257 128 #define DIV2_256 128 #define DIV2_255 127 #define DIV2_254 127 #define DIV2_253 126 #define DIV2_252 126 #define DIV2_251 125 #define DIV2_250 125 #define DIV2_249 124 #define DIV2_248 124 #define DIV2_247 123 #define DIV2_246 123 #define DIV2_245 122 #define DIV2_244 122 #define DIV2_243 121 #define DIV2_242 121 #define DIV2_241 120 #define DIV2_240 120 #define DIV2_239 119 #define DIV2_238 119 #define DIV2_237 118 #define DIV2_236 118 #define DIV2_235 117 #define DIV2_234 117 #define DIV2_233 116 #define DIV2_232 116 #define DIV2_231 115 #define DIV2_230 115 #define DIV2_229 114 #define DIV2_228 114 #define DIV2_227 113 #define DIV2_226 113 #define DIV2_225 112 #define DIV2_224 112 #define DIV2_223 111 #define DIV2_222 111 #define DIV2_221 110 #define DIV2_220 110 #define DIV2_219 109 #define DIV2_218 109 #define DIV2_217 108 #define DIV2_216 108 #define DIV2_215 107 #define DIV2_214 107 #define DIV2_213 106 #define DIV2_212 106 #define DIV2_211 105 #define DIV2_210 105 #define DIV2_209 104 #define DIV2_208 104 #define DIV2_207 103 #define DIV2_206 103 #define DIV2_205 102 #define DIV2_204 102 #define DIV2_203 101 #define DIV2_202 101 #define DIV2_201 100 #define DIV2_200 100 #define DIV2_199 99 #define DIV2_198 99 #define DIV2_197 98 #define DIV2_196 98 #define DIV2_195 97 #define DIV2_194 97 #define DIV2_193 96 #define DIV2_192 96 #define DIV2_191 95 #define DIV2_190 95 #define DIV2_189 94 #define DIV2_188 94 #define DIV2_187 93 #define DIV2_186 93 #define DIV2_185 92 #define DIV2_184 92 #define DIV2_183 91 #define DIV2_182 91 #define DIV2_181 90 #define DIV2_180 90 #define DIV2_179 89 #define DIV2_178 89 #define DIV2_177 88 #define DIV2_176 88 #define DIV2_175 87 #define DIV2_174 87 #define DIV2_173 86 #define DIV2_172 86 #define DIV2_171 85 #define DIV2_170 85 #define DIV2_169 84 #define DIV2_168 84 #define DIV2_167 83 #define DIV2_166 83 #define DIV2_165 82 #define DIV2_164 82 #define DIV2_163 81 #define DIV2_162 81 #define DIV2_161 80 #define DIV2_160 80 #define DIV2_159 79 #define DIV2_158 79 #define DIV2_157 78 #define DIV2_156 78 #define DIV2_155 77 #define DIV2_154 77 #define DIV2_153 76 #define DIV2_152 76 #define DIV2_151 75 #define DIV2_150 75 #define DIV2_149 74 #define DIV2_148 74 #define DIV2_147 73 #define DIV2_146 73 #define DIV2_145 72 #define DIV2_144 72 #define DIV2_143 71 #define DIV2_142 71 #define DIV2_141 70 #define DIV2_140 70 #define DIV2_139 69 #define DIV2_138 69 #define DIV2_137 68 #define DIV2_136 68 #define DIV2_135 67 #define DIV2_134 67 #define DIV2_133 66 #define DIV2_132 66 #define DIV2_131 65 #define DIV2_130 65 #define DIV2_129 64 #define DIV2_128 64 #define DIV2_127 63 #define DIV2_126 63 #define DIV2_125 62 #define DIV2_124 62 #define DIV2_123 61 #define DIV2_122 61 #define DIV2_121 60 #define DIV2_120 60 #define DIV2_119 59 #define DIV2_118 59 #define DIV2_117 58 #define DIV2_116 58 #define DIV2_115 57 #define DIV2_114 57 #define DIV2_113 56 #define DIV2_112 56 #define DIV2_111 55 #define DIV2_110 55 #define DIV2_109 54 #define DIV2_108 54 #define DIV2_107 53 #define DIV2_106 53 #define DIV2_105 52 #define DIV2_104 52 #define DIV2_103 51 #define DIV2_102 51 #define DIV2_101 50 #define DIV2_100 50 #define DIV2_99 49 #define DIV2_98 49 #define DIV2_97 48 #define DIV2_96 48 #define DIV2_95 47 #define DIV2_94 47 #define DIV2_93 46 #define DIV2_92 46 #define DIV2_91 45 #define DIV2_90 45 #define DIV2_89 44 #define DIV2_88 44 #define DIV2_87 43 #define DIV2_86 43 #define DIV2_85 42 #define DIV2_84 42 #define DIV2_83 41 #define DIV2_82 41 #define DIV2_81 40 #define DIV2_80 40 #define DIV2_79 39 #define DIV2_78 39 #define DIV2_77 38 #define DIV2_76 38 #define DIV2_75 37 #define DIV2_74 37 #define DIV2_73 36 #define DIV2_72 36 #define DIV2_71 35 #define DIV2_70 35 #define DIV2_69 34 #define DIV2_68 34 #define DIV2_67 33 #define DIV2_66 33 #define DIV2_65 32 #define DIV2_64 32 #define DIV2_63 31 #define DIV2_62 31 #define DIV2_61 30 #define DIV2_60 30 #define DIV2_59 29 #define DIV2_58 29 #define DIV2_57 28 #define DIV2_56 28 #define DIV2_55 27 #define DIV2_54 27 #define DIV2_53 26 #define DIV2_52 26 #define DIV2_51 25 #define DIV2_50 25 #define DIV2_49 24 #define DIV2_48 24 #define DIV2_47 23 #define DIV2_46 23 #define DIV2_45 22 #define DIV2_44 22 #define DIV2_43 21 #define DIV2_42 21 #define DIV2_41 20 #define DIV2_40 20 #define DIV2_39 19 #define DIV2_38 19 #define DIV2_37 18 #define DIV2_36 18 #define DIV2_35 17 #define DIV2_34 17 #define DIV2_33 16 #define DIV2_32 16 #define DIV2_31 15 #define DIV2_30 15 #define DIV2_29 14 #define DIV2_28 14 #define DIV2_27 13 #define DIV2_26 13 #define DIV2_25 12 #define DIV2_24 12 #define DIV2_23 11 #define DIV2_22 11 #define DIV2_21 10 #define DIV2_20 10 #define DIV2_19 9 #define DIV2_18 9 #define DIV2_17 8 #define DIV2_16 8 #define DIV2_15 7 #define DIV2_14 7 #define DIV2_13 6 #define DIV2_12 6 #define DIV2_11 5 #define DIV2_10 5 #define DIV2_9 4 #define DIV2_8 4 #define DIV2_7 3 #define DIV2_6 3 #define DIV2_5 2 #define DIV2_4 2 #define DIV2_3 1 #define DIV2_2 1 #define DIV2_1 0 #define DIV2_0 0 #define MOD2(x) C2(MOD2_,x) #define MOD2_1024 0 #define MOD2_1023 1 #define MOD2_1022 0 #define MOD2_1021 1 #define MOD2_1020 0 #define MOD2_1019 1 #define MOD2_1018 0 #define MOD2_1017 1 #define MOD2_1016 0 #define MOD2_1015 1 #define MOD2_1014 0 #define MOD2_1013 1 #define MOD2_1012 0 #define MOD2_1011 1 #define MOD2_1010 0 #define MOD2_1009 1 #define MOD2_1008 0 #define MOD2_1007 1 #define MOD2_1006 0 #define MOD2_1005 1 #define MOD2_1004 0 #define MOD2_1003 1 #define MOD2_1002 0 #define MOD2_1001 1 #define MOD2_1000 0 #define MOD2_999 1 #define MOD2_998 0 #define MOD2_997 1 #define MOD2_996 0 #define MOD2_995 1 #define MOD2_994 0 #define MOD2_993 1 #define MOD2_992 0 #define MOD2_991 1 #define MOD2_990 0 #define MOD2_989 1 #define MOD2_988 0 #define MOD2_987 1 #define MOD2_986 0 #define MOD2_985 1 #define MOD2_984 0 #define MOD2_983 1 #define MOD2_982 0 #define MOD2_981 1 #define MOD2_980 0 #define MOD2_979 1 #define MOD2_978 0 #define MOD2_977 1 #define MOD2_976 0 #define MOD2_975 1 #define MOD2_974 0 #define MOD2_973 1 #define MOD2_972 0 #define MOD2_971 1 #define MOD2_970 0 #define MOD2_969 1 #define MOD2_968 0 #define MOD2_967 1 #define MOD2_966 0 #define MOD2_965 1 #define MOD2_964 0 #define MOD2_963 1 #define MOD2_962 0 #define MOD2_961 1 #define MOD2_960 0 #define MOD2_959 1 #define MOD2_958 0 #define MOD2_957 1 #define MOD2_956 0 #define MOD2_955 1 #define MOD2_954 0 #define MOD2_953 1 #define MOD2_952 0 #define MOD2_951 1 #define MOD2_950 0 #define MOD2_949 1 #define MOD2_948 0 #define MOD2_947 1 #define MOD2_946 0 #define MOD2_945 1 #define MOD2_944 0 #define MOD2_943 1 #define MOD2_942 0 #define MOD2_941 1 #define MOD2_940 0 #define MOD2_939 1 #define MOD2_938 0 #define MOD2_937 1 #define MOD2_936 0 #define MOD2_935 1 #define MOD2_934 0 #define MOD2_933 1 #define MOD2_932 0 #define MOD2_931 1 #define MOD2_930 0 #define MOD2_929 1 #define MOD2_928 0 #define MOD2_927 1 #define MOD2_926 0 #define MOD2_925 1 #define MOD2_924 0 #define MOD2_923 1 #define MOD2_922 0 #define MOD2_921 1 #define MOD2_920 0 #define MOD2_919 1 #define MOD2_918 0 #define MOD2_917 1 #define MOD2_916 0 #define MOD2_915 1 #define MOD2_914 0 #define MOD2_913 1 #define MOD2_912 0 #define MOD2_911 1 #define MOD2_910 0 #define MOD2_909 1 #define MOD2_908 0 #define MOD2_907 1 #define MOD2_906 0 #define MOD2_905 1 #define MOD2_904 0 #define MOD2_903 1 #define MOD2_902 0 #define MOD2_901 1 #define MOD2_900 0 #define MOD2_899 1 #define MOD2_898 0 #define MOD2_897 1 #define MOD2_896 0 #define MOD2_895 1 #define MOD2_894 0 #define MOD2_893 1 #define MOD2_892 0 #define MOD2_891 1 #define MOD2_890 0 #define MOD2_889 1 #define MOD2_888 0 #define MOD2_887 1 #define MOD2_886 0 #define MOD2_885 1 #define MOD2_884 0 #define MOD2_883 1 #define MOD2_882 0 #define MOD2_881 1 #define MOD2_880 0 #define MOD2_879 1 #define MOD2_878 0 #define MOD2_877 1 #define MOD2_876 0 #define MOD2_875 1 #define MOD2_874 0 #define MOD2_873 1 #define MOD2_872 0 #define MOD2_871 1 #define MOD2_870 0 #define MOD2_869 1 #define MOD2_868 0 #define MOD2_867 1 #define MOD2_866 0 #define MOD2_865 1 #define MOD2_864 0 #define MOD2_863 1 #define MOD2_862 0 #define MOD2_861 1 #define MOD2_860 0 #define MOD2_859 1 #define MOD2_858 0 #define MOD2_857 1 #define MOD2_856 0 #define MOD2_855 1 #define MOD2_854 0 #define MOD2_853 1 #define MOD2_852 0 #define MOD2_851 1 #define MOD2_850 0 #define MOD2_849 1 #define MOD2_848 0 #define MOD2_847 1 #define MOD2_846 0 #define MOD2_845 1 #define MOD2_844 0 #define MOD2_843 1 #define MOD2_842 0 #define MOD2_841 1 #define MOD2_840 0 #define MOD2_839 1 #define MOD2_838 0 #define MOD2_837 1 #define MOD2_836 0 #define MOD2_835 1 #define MOD2_834 0 #define MOD2_833 1 #define MOD2_832 0 #define MOD2_831 1 #define MOD2_830 0 #define MOD2_829 1 #define MOD2_828 0 #define MOD2_827 1 #define MOD2_826 0 #define MOD2_825 1 #define MOD2_824 0 #define MOD2_823 1 #define MOD2_822 0 #define MOD2_821 1 #define MOD2_820 0 #define MOD2_819 1 #define MOD2_818 0 #define MOD2_817 1 #define MOD2_816 0 #define MOD2_815 1 #define MOD2_814 0 #define MOD2_813 1 #define MOD2_812 0 #define MOD2_811 1 #define MOD2_810 0 #define MOD2_809 1 #define MOD2_808 0 #define MOD2_807 1 #define MOD2_806 0 #define MOD2_805 1 #define MOD2_804 0 #define MOD2_803 1 #define MOD2_802 0 #define MOD2_801 1 #define MOD2_800 0 #define MOD2_799 1 #define MOD2_798 0 #define MOD2_797 1 #define MOD2_796 0 #define MOD2_795 1 #define MOD2_794 0 #define MOD2_793 1 #define MOD2_792 0 #define MOD2_791 1 #define MOD2_790 0 #define MOD2_789 1 #define MOD2_788 0 #define MOD2_787 1 #define MOD2_786 0 #define MOD2_785 1 #define MOD2_784 0 #define MOD2_783 1 #define MOD2_782 0 #define MOD2_781 1 #define MOD2_780 0 #define MOD2_779 1 #define MOD2_778 0 #define MOD2_777 1 #define MOD2_776 0 #define MOD2_775 1 #define MOD2_774 0 #define MOD2_773 1 #define MOD2_772 0 #define MOD2_771 1 #define MOD2_770 0 #define MOD2_769 1 #define MOD2_768 0 #define MOD2_767 1 #define MOD2_766 0 #define MOD2_765 1 #define MOD2_764 0 #define MOD2_763 1 #define MOD2_762 0 #define MOD2_761 1 #define MOD2_760 0 #define MOD2_759 1 #define MOD2_758 0 #define MOD2_757 1 #define MOD2_756 0 #define MOD2_755 1 #define MOD2_754 0 #define MOD2_753 1 #define MOD2_752 0 #define MOD2_751 1 #define MOD2_750 0 #define MOD2_749 1 #define MOD2_748 0 #define MOD2_747 1 #define MOD2_746 0 #define MOD2_745 1 #define MOD2_744 0 #define MOD2_743 1 #define MOD2_742 0 #define MOD2_741 1 #define MOD2_740 0 #define MOD2_739 1 #define MOD2_738 0 #define MOD2_737 1 #define MOD2_736 0 #define MOD2_735 1 #define MOD2_734 0 #define MOD2_733 1 #define MOD2_732 0 #define MOD2_731 1 #define MOD2_730 0 #define MOD2_729 1 #define MOD2_728 0 #define MOD2_727 1 #define MOD2_726 0 #define MOD2_725 1 #define MOD2_724 0 #define MOD2_723 1 #define MOD2_722 0 #define MOD2_721 1 #define MOD2_720 0 #define MOD2_719 1 #define MOD2_718 0 #define MOD2_717 1 #define MOD2_716 0 #define MOD2_715 1 #define MOD2_714 0 #define MOD2_713 1 #define MOD2_712 0 #define MOD2_711 1 #define MOD2_710 0 #define MOD2_709 1 #define MOD2_708 0 #define MOD2_707 1 #define MOD2_706 0 #define MOD2_705 1 #define MOD2_704 0 #define MOD2_703 1 #define MOD2_702 0 #define MOD2_701 1 #define MOD2_700 0 #define MOD2_699 1 #define MOD2_698 0 #define MOD2_697 1 #define MOD2_696 0 #define MOD2_695 1 #define MOD2_694 0 #define MOD2_693 1 #define MOD2_692 0 #define MOD2_691 1 #define MOD2_690 0 #define MOD2_689 1 #define MOD2_688 0 #define MOD2_687 1 #define MOD2_686 0 #define MOD2_685 1 #define MOD2_684 0 #define MOD2_683 1 #define MOD2_682 0 #define MOD2_681 1 #define MOD2_680 0 #define MOD2_679 1 #define MOD2_678 0 #define MOD2_677 1 #define MOD2_676 0 #define MOD2_675 1 #define MOD2_674 0 #define MOD2_673 1 #define MOD2_672 0 #define MOD2_671 1 #define MOD2_670 0 #define MOD2_669 1 #define MOD2_668 0 #define MOD2_667 1 #define MOD2_666 0 #define MOD2_665 1 #define MOD2_664 0 #define MOD2_663 1 #define MOD2_662 0 #define MOD2_661 1 #define MOD2_660 0 #define MOD2_659 1 #define MOD2_658 0 #define MOD2_657 1 #define MOD2_656 0 #define MOD2_655 1 #define MOD2_654 0 #define MOD2_653 1 #define MOD2_652 0 #define MOD2_651 1 #define MOD2_650 0 #define MOD2_649 1 #define MOD2_648 0 #define MOD2_647 1 #define MOD2_646 0 #define MOD2_645 1 #define MOD2_644 0 #define MOD2_643 1 #define MOD2_642 0 #define MOD2_641 1 #define MOD2_640 0 #define MOD2_639 1 #define MOD2_638 0 #define MOD2_637 1 #define MOD2_636 0 #define MOD2_635 1 #define MOD2_634 0 #define MOD2_633 1 #define MOD2_632 0 #define MOD2_631 1 #define MOD2_630 0 #define MOD2_629 1 #define MOD2_628 0 #define MOD2_627 1 #define MOD2_626 0 #define MOD2_625 1 #define MOD2_624 0 #define MOD2_623 1 #define MOD2_622 0 #define MOD2_621 1 #define MOD2_620 0 #define MOD2_619 1 #define MOD2_618 0 #define MOD2_617 1 #define MOD2_616 0 #define MOD2_615 1 #define MOD2_614 0 #define MOD2_613 1 #define MOD2_612 0 #define MOD2_611 1 #define MOD2_610 0 #define MOD2_609 1 #define MOD2_608 0 #define MOD2_607 1 #define MOD2_606 0 #define MOD2_605 1 #define MOD2_604 0 #define MOD2_603 1 #define MOD2_602 0 #define MOD2_601 1 #define MOD2_600 0 #define MOD2_599 1 #define MOD2_598 0 #define MOD2_597 1 #define MOD2_596 0 #define MOD2_595 1 #define MOD2_594 0 #define MOD2_593 1 #define MOD2_592 0 #define MOD2_591 1 #define MOD2_590 0 #define MOD2_589 1 #define MOD2_588 0 #define MOD2_587 1 #define MOD2_586 0 #define MOD2_585 1 #define MOD2_584 0 #define MOD2_583 1 #define MOD2_582 0 #define MOD2_581 1 #define MOD2_580 0 #define MOD2_579 1 #define MOD2_578 0 #define MOD2_577 1 #define MOD2_576 0 #define MOD2_575 1 #define MOD2_574 0 #define MOD2_573 1 #define MOD2_572 0 #define MOD2_571 1 #define MOD2_570 0 #define MOD2_569 1 #define MOD2_568 0 #define MOD2_567 1 #define MOD2_566 0 #define MOD2_565 1 #define MOD2_564 0 #define MOD2_563 1 #define MOD2_562 0 #define MOD2_561 1 #define MOD2_560 0 #define MOD2_559 1 #define MOD2_558 0 #define MOD2_557 1 #define MOD2_556 0 #define MOD2_555 1 #define MOD2_554 0 #define MOD2_553 1 #define MOD2_552 0 #define MOD2_551 1 #define MOD2_550 0 #define MOD2_549 1 #define MOD2_548 0 #define MOD2_547 1 #define MOD2_546 0 #define MOD2_545 1 #define MOD2_544 0 #define MOD2_543 1 #define MOD2_542 0 #define MOD2_541 1 #define MOD2_540 0 #define MOD2_539 1 #define MOD2_538 0 #define MOD2_537 1 #define MOD2_536 0 #define MOD2_535 1 #define MOD2_534 0 #define MOD2_533 1 #define MOD2_532 0 #define MOD2_531 1 #define MOD2_530 0 #define MOD2_529 1 #define MOD2_528 0 #define MOD2_527 1 #define MOD2_526 0 #define MOD2_525 1 #define MOD2_524 0 #define MOD2_523 1 #define MOD2_522 0 #define MOD2_521 1 #define MOD2_520 0 #define MOD2_519 1 #define MOD2_518 0 #define MOD2_517 1 #define MOD2_516 0 #define MOD2_515 1 #define MOD2_514 0 #define MOD2_513 1 #define MOD2_512 0 #define MOD2_511 1 #define MOD2_510 0 #define MOD2_509 1 #define MOD2_508 0 #define MOD2_507 1 #define MOD2_506 0 #define MOD2_505 1 #define MOD2_504 0 #define MOD2_503 1 #define MOD2_502 0 #define MOD2_501 1 #define MOD2_500 0 #define MOD2_499 1 #define MOD2_498 0 #define MOD2_497 1 #define MOD2_496 0 #define MOD2_495 1 #define MOD2_494 0 #define MOD2_493 1 #define MOD2_492 0 #define MOD2_491 1 #define MOD2_490 0 #define MOD2_489 1 #define MOD2_488 0 #define MOD2_487 1 #define MOD2_486 0 #define MOD2_485 1 #define MOD2_484 0 #define MOD2_483 1 #define MOD2_482 0 #define MOD2_481 1 #define MOD2_480 0 #define MOD2_479 1 #define MOD2_478 0 #define MOD2_477 1 #define MOD2_476 0 #define MOD2_475 1 #define MOD2_474 0 #define MOD2_473 1 #define MOD2_472 0 #define MOD2_471 1 #define MOD2_470 0 #define MOD2_469 1 #define MOD2_468 0 #define MOD2_467 1 #define MOD2_466 0 #define MOD2_465 1 #define MOD2_464 0 #define MOD2_463 1 #define MOD2_462 0 #define MOD2_461 1 #define MOD2_460 0 #define MOD2_459 1 #define MOD2_458 0 #define MOD2_457 1 #define MOD2_456 0 #define MOD2_455 1 #define MOD2_454 0 #define MOD2_453 1 #define MOD2_452 0 #define MOD2_451 1 #define MOD2_450 0 #define MOD2_449 1 #define MOD2_448 0 #define MOD2_447 1 #define MOD2_446 0 #define MOD2_445 1 #define MOD2_444 0 #define MOD2_443 1 #define MOD2_442 0 #define MOD2_441 1 #define MOD2_440 0 #define MOD2_439 1 #define MOD2_438 0 #define MOD2_437 1 #define MOD2_436 0 #define MOD2_435 1 #define MOD2_434 0 #define MOD2_433 1 #define MOD2_432 0 #define MOD2_431 1 #define MOD2_430 0 #define MOD2_429 1 #define MOD2_428 0 #define MOD2_427 1 #define MOD2_426 0 #define MOD2_425 1 #define MOD2_424 0 #define MOD2_423 1 #define MOD2_422 0 #define MOD2_421 1 #define MOD2_420 0 #define MOD2_419 1 #define MOD2_418 0 #define MOD2_417 1 #define MOD2_416 0 #define MOD2_415 1 #define MOD2_414 0 #define MOD2_413 1 #define MOD2_412 0 #define MOD2_411 1 #define MOD2_410 0 #define MOD2_409 1 #define MOD2_408 0 #define MOD2_407 1 #define MOD2_406 0 #define MOD2_405 1 #define MOD2_404 0 #define MOD2_403 1 #define MOD2_402 0 #define MOD2_401 1 #define MOD2_400 0 #define MOD2_399 1 #define MOD2_398 0 #define MOD2_397 1 #define MOD2_396 0 #define MOD2_395 1 #define MOD2_394 0 #define MOD2_393 1 #define MOD2_392 0 #define MOD2_391 1 #define MOD2_390 0 #define MOD2_389 1 #define MOD2_388 0 #define MOD2_387 1 #define MOD2_386 0 #define MOD2_385 1 #define MOD2_384 0 #define MOD2_383 1 #define MOD2_382 0 #define MOD2_381 1 #define MOD2_380 0 #define MOD2_379 1 #define MOD2_378 0 #define MOD2_377 1 #define MOD2_376 0 #define MOD2_375 1 #define MOD2_374 0 #define MOD2_373 1 #define MOD2_372 0 #define MOD2_371 1 #define MOD2_370 0 #define MOD2_369 1 #define MOD2_368 0 #define MOD2_367 1 #define MOD2_366 0 #define MOD2_365 1 #define MOD2_364 0 #define MOD2_363 1 #define MOD2_362 0 #define MOD2_361 1 #define MOD2_360 0 #define MOD2_359 1 #define MOD2_358 0 #define MOD2_357 1 #define MOD2_356 0 #define MOD2_355 1 #define MOD2_354 0 #define MOD2_353 1 #define MOD2_352 0 #define MOD2_351 1 #define MOD2_350 0 #define MOD2_349 1 #define MOD2_348 0 #define MOD2_347 1 #define MOD2_346 0 #define MOD2_345 1 #define MOD2_344 0 #define MOD2_343 1 #define MOD2_342 0 #define MOD2_341 1 #define MOD2_340 0 #define MOD2_339 1 #define MOD2_338 0 #define MOD2_337 1 #define MOD2_336 0 #define MOD2_335 1 #define MOD2_334 0 #define MOD2_333 1 #define MOD2_332 0 #define MOD2_331 1 #define MOD2_330 0 #define MOD2_329 1 #define MOD2_328 0 #define MOD2_327 1 #define MOD2_326 0 #define MOD2_325 1 #define MOD2_324 0 #define MOD2_323 1 #define MOD2_322 0 #define MOD2_321 1 #define MOD2_320 0 #define MOD2_319 1 #define MOD2_318 0 #define MOD2_317 1 #define MOD2_316 0 #define MOD2_315 1 #define MOD2_314 0 #define MOD2_313 1 #define MOD2_312 0 #define MOD2_311 1 #define MOD2_310 0 #define MOD2_309 1 #define MOD2_308 0 #define MOD2_307 1 #define MOD2_306 0 #define MOD2_305 1 #define MOD2_304 0 #define MOD2_303 1 #define MOD2_302 0 #define MOD2_301 1 #define MOD2_300 0 #define MOD2_299 1 #define MOD2_298 0 #define MOD2_297 1 #define MOD2_296 0 #define MOD2_295 1 #define MOD2_294 0 #define MOD2_293 1 #define MOD2_292 0 #define MOD2_291 1 #define MOD2_290 0 #define MOD2_289 1 #define MOD2_288 0 #define MOD2_287 1 #define MOD2_286 0 #define MOD2_285 1 #define MOD2_284 0 #define MOD2_283 1 #define MOD2_282 0 #define MOD2_281 1 #define MOD2_280 0 #define MOD2_279 1 #define MOD2_278 0 #define MOD2_277 1 #define MOD2_276 0 #define MOD2_275 1 #define MOD2_274 0 #define MOD2_273 1 #define MOD2_272 0 #define MOD2_271 1 #define MOD2_270 0 #define MOD2_269 1 #define MOD2_268 0 #define MOD2_267 1 #define MOD2_266 0 #define MOD2_265 1 #define MOD2_264 0 #define MOD2_263 1 #define MOD2_262 0 #define MOD2_261 1 #define MOD2_260 0 #define MOD2_259 1 #define MOD2_258 0 #define MOD2_257 1 #define MOD2_256 0 #define MOD2_255 1 #define MOD2_254 0 #define MOD2_253 1 #define MOD2_252 0 #define MOD2_251 1 #define MOD2_250 0 #define MOD2_249 1 #define MOD2_248 0 #define MOD2_247 1 #define MOD2_246 0 #define MOD2_245 1 #define MOD2_244 0 #define MOD2_243 1 #define MOD2_242 0 #define MOD2_241 1 #define MOD2_240 0 #define MOD2_239 1 #define MOD2_238 0 #define MOD2_237 1 #define MOD2_236 0 #define MOD2_235 1 #define MOD2_234 0 #define MOD2_233 1 #define MOD2_232 0 #define MOD2_231 1 #define MOD2_230 0 #define MOD2_229 1 #define MOD2_228 0 #define MOD2_227 1 #define MOD2_226 0 #define MOD2_225 1 #define MOD2_224 0 #define MOD2_223 1 #define MOD2_222 0 #define MOD2_221 1 #define MOD2_220 0 #define MOD2_219 1 #define MOD2_218 0 #define MOD2_217 1 #define MOD2_216 0 #define MOD2_215 1 #define MOD2_214 0 #define MOD2_213 1 #define MOD2_212 0 #define MOD2_211 1 #define MOD2_210 0 #define MOD2_209 1 #define MOD2_208 0 #define MOD2_207 1 #define MOD2_206 0 #define MOD2_205 1 #define MOD2_204 0 #define MOD2_203 1 #define MOD2_202 0 #define MOD2_201 1 #define MOD2_200 0 #define MOD2_199 1 #define MOD2_198 0 #define MOD2_197 1 #define MOD2_196 0 #define MOD2_195 1 #define MOD2_194 0 #define MOD2_193 1 #define MOD2_192 0 #define MOD2_191 1 #define MOD2_190 0 #define MOD2_189 1 #define MOD2_188 0 #define MOD2_187 1 #define MOD2_186 0 #define MOD2_185 1 #define MOD2_184 0 #define MOD2_183 1 #define MOD2_182 0 #define MOD2_181 1 #define MOD2_180 0 #define MOD2_179 1 #define MOD2_178 0 #define MOD2_177 1 #define MOD2_176 0 #define MOD2_175 1 #define MOD2_174 0 #define MOD2_173 1 #define MOD2_172 0 #define MOD2_171 1 #define MOD2_170 0 #define MOD2_169 1 #define MOD2_168 0 #define MOD2_167 1 #define MOD2_166 0 #define MOD2_165 1 #define MOD2_164 0 #define MOD2_163 1 #define MOD2_162 0 #define MOD2_161 1 #define MOD2_160 0 #define MOD2_159 1 #define MOD2_158 0 #define MOD2_157 1 #define MOD2_156 0 #define MOD2_155 1 #define MOD2_154 0 #define MOD2_153 1 #define MOD2_152 0 #define MOD2_151 1 #define MOD2_150 0 #define MOD2_149 1 #define MOD2_148 0 #define MOD2_147 1 #define MOD2_146 0 #define MOD2_145 1 #define MOD2_144 0 #define MOD2_143 1 #define MOD2_142 0 #define MOD2_141 1 #define MOD2_140 0 #define MOD2_139 1 #define MOD2_138 0 #define MOD2_137 1 #define MOD2_136 0 #define MOD2_135 1 #define MOD2_134 0 #define MOD2_133 1 #define MOD2_132 0 #define MOD2_131 1 #define MOD2_130 0 #define MOD2_129 1 #define MOD2_128 0 #define MOD2_127 1 #define MOD2_126 0 #define MOD2_125 1 #define MOD2_124 0 #define MOD2_123 1 #define MOD2_122 0 #define MOD2_121 1 #define MOD2_120 0 #define MOD2_119 1 #define MOD2_118 0 #define MOD2_117 1 #define MOD2_116 0 #define MOD2_115 1 #define MOD2_114 0 #define MOD2_113 1 #define MOD2_112 0 #define MOD2_111 1 #define MOD2_110 0 #define MOD2_109 1 #define MOD2_108 0 #define MOD2_107 1 #define MOD2_106 0 #define MOD2_105 1 #define MOD2_104 0 #define MOD2_103 1 #define MOD2_102 0 #define MOD2_101 1 #define MOD2_100 0 #define MOD2_99 1 #define MOD2_98 0 #define MOD2_97 1 #define MOD2_96 0 #define MOD2_95 1 #define MOD2_94 0 #define MOD2_93 1 #define MOD2_92 0 #define MOD2_91 1 #define MOD2_90 0 #define MOD2_89 1 #define MOD2_88 0 #define MOD2_87 1 #define MOD2_86 0 #define MOD2_85 1 #define MOD2_84 0 #define MOD2_83 1 #define MOD2_82 0 #define MOD2_81 1 #define MOD2_80 0 #define MOD2_79 1 #define MOD2_78 0 #define MOD2_77 1 #define MOD2_76 0 #define MOD2_75 1 #define MOD2_74 0 #define MOD2_73 1 #define MOD2_72 0 #define MOD2_71 1 #define MOD2_70 0 #define MOD2_69 1 #define MOD2_68 0 #define MOD2_67 1 #define MOD2_66 0 #define MOD2_65 1 #define MOD2_64 0 #define MOD2_63 1 #define MOD2_62 0 #define MOD2_61 1 #define MOD2_60 0 #define MOD2_59 1 #define MOD2_58 0 #define MOD2_57 1 #define MOD2_56 0 #define MOD2_55 1 #define MOD2_54 0 #define MOD2_53 1 #define MOD2_52 0 #define MOD2_51 1 #define MOD2_50 0 #define MOD2_49 1 #define MOD2_48 0 #define MOD2_47 1 #define MOD2_46 0 #define MOD2_45 1 #define MOD2_44 0 #define MOD2_43 1 #define MOD2_42 0 #define MOD2_41 1 #define MOD2_40 0 #define MOD2_39 1 #define MOD2_38 0 #define MOD2_37 1 #define MOD2_36 0 #define MOD2_35 1 #define MOD2_34 0 #define MOD2_33 1 #define MOD2_32 0 #define MOD2_31 1 #define MOD2_30 0 #define MOD2_29 1 #define MOD2_28 0 #define MOD2_27 1 #define MOD2_26 0 #define MOD2_25 1 #define MOD2_24 0 #define MOD2_23 1 #define MOD2_22 0 #define MOD2_21 1 #define MOD2_20 0 #define MOD2_19 1 #define MOD2_18 0 #define MOD2_17 1 #define MOD2_16 0 #define MOD2_15 1 #define MOD2_14 0 #define MOD2_13 1 #define MOD2_12 0 #define MOD2_11 1 #define MOD2_10 0 #define MOD2_9 1 #define MOD2_8 0 #define MOD2_7 1 #define MOD2_6 0 #define MOD2_5 1 #define MOD2_4 0 #define MOD2_3 1 #define MOD2_2 0 #define MOD2_1 1 #define MOD2_0 0 #define THE_NTH_ARG(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124, ... ) P124 #define _TRIGGER_PARENTHESIS_(...) , #define LPAREN ( #ifdef _MSC_VER #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0) #else #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG (__VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG(__VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0) #endif #define COUNT_ARG(...) C2(COUNT_ARG_, ISEMPTY(__VA_ARGS__))(__VA_ARGS__) #define COUNT_ARG_1(...) 0 #define COUNT_ARG_0(...) C1(COUNT_1_OR_MORE_ARG(__VA_ARGS__)) #define ISEMPTY(...) C5(DISPTACH_EMPTY_, MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__ ()), MORE_THAN_1_ARG(__VA_ARGS__), MORE_THAN_1_ARG(__VA_ARGS__ ()), MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__)) #define DISPTACH_EMPTY_1000 1 #define DISPTACH_EMPTY_0000 0 #define DISPTACH_EMPTY_1100 0 #define DISPTACH_EMPTY_1111 0 #define DISPTACH_EMPTY_1001 0 #define DISPTACH_EMPTY_1010 0 #define C2_(x,y) x##y #define C2(x,y) C2_(x,y) #define C3(x,y,z) C2(x, C2(y,z)) #define C4(x,y,z, u) C2(C2(x,y), C2(z,u)) #define C5(x,y,z,u, v) C2(C4(x,y, z, u), v) #define C1_(x) x #define C1(x) C1_(x) #define C2STRING(x,y) x y #define C3STRING(x,y,z) x y z #define C4STRING(x,y,z,u) x y z u #define C5STRING(x,y,z,u,v) x y z u v #define FOR_EACH_1_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P1) \ FOR_EACH_1_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_1_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(P1) \ FOR_EACH_1_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P1) \ FOR_EACH_1_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(P1) \ FOR_EACH_1_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P1) \ FOR_EACH_1_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(P1) \ FOR_EACH_1_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P1) \ FOR_EACH_1_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(P1) \ FOR_EACH_1_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P1) \ FOR_EACH_1_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(P1) \ FOR_EACH_1_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P1) \ FOR_EACH_1_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(P1) \ FOR_EACH_1_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P1) \ FOR_EACH_1_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(P1) \ FOR_EACH_1_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P1) \ FOR_EACH_1_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(P1) \ FOR_EACH_1_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P1) \ FOR_EACH_1_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(P1) \ FOR_EACH_1_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P1) \ FOR_EACH_1_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(P1) \ FOR_EACH_1_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P1) \ FOR_EACH_1_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(P1) \ FOR_EACH_1_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P1) \ FOR_EACH_1_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(P1) \ FOR_EACH_1_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P1) \ FOR_EACH_1_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(P1) \ FOR_EACH_1_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P1) \ FOR_EACH_1_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(P1) \ FOR_EACH_1_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P1) \ FOR_EACH_1_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(P1) \ FOR_EACH_1_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P1) \ FOR_EACH_1_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(P1) \ FOR_EACH_1_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P1) \ FOR_EACH_1_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(P1) \ FOR_EACH_1_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P1) \ FOR_EACH_1_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(P1) \ FOR_EACH_1_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P1) \ FOR_EACH_1_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(P1) \ FOR_EACH_1_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P1) \ FOR_EACH_1_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(P1) \ FOR_EACH_1_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P1) \ FOR_EACH_1_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(P1) \ FOR_EACH_1_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P1) \ FOR_EACH_1_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(P1) \ FOR_EACH_1_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P1) \ FOR_EACH_1_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(P1) \ FOR_EACH_1_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P1) \ FOR_EACH_1_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(P1) \ FOR_EACH_1_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P1) \ FOR_EACH_1_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(P1) \ FOR_EACH_1_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P1) \ FOR_EACH_1_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(P1) \ FOR_EACH_1_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P1) \ FOR_EACH_1_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(P1) \ FOR_EACH_1_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P1) \ FOR_EACH_1_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(P1) \ FOR_EACH_1_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P1) \ FOR_EACH_1_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(P1) \ FOR_EACH_1_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P1) \ FOR_EACH_1_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(P1) \ FOR_EACH_1_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P1) \ FOR_EACH_1_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(P1) \ FOR_EACH_1_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P1) \ FOR_EACH_1_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(P1) \ FOR_EACH_1_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P1) \ FOR_EACH_1_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(P1) \ FOR_EACH_1_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P1) \ FOR_EACH_1_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(P1) \ FOR_EACH_1_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P1) \ FOR_EACH_1_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(P1) \ FOR_EACH_1_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P1) \ FOR_EACH_1_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(P1) \ FOR_EACH_1_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P1) \ FOR_EACH_1_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(P1) \ FOR_EACH_1_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P1) \ FOR_EACH_1_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(P1) \ FOR_EACH_1_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P1) \ FOR_EACH_1_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(P1) \ FOR_EACH_1_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P1) \ FOR_EACH_1_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(P1) \ FOR_EACH_1_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P1) \ FOR_EACH_1_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(P1) \ FOR_EACH_1_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P1) \ FOR_EACH_1_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(P1) \ FOR_EACH_1_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P1) \ FOR_EACH_1_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(P1) \ FOR_EACH_1_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P1) \ FOR_EACH_1_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(P1) \ FOR_EACH_1_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P1) \ FOR_EACH_1_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(P1) \ FOR_EACH_1_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P1) \ FOR_EACH_1_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(P1) \ FOR_EACH_1_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P1) \ FOR_EACH_1_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(P1) \ FOR_EACH_1_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P1) \ FOR_EACH_1_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(P1) \ FOR_EACH_1_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P1) \ FOR_EACH_1_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(P1) \ FOR_EACH_1_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P1) \ FOR_EACH_1_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(P1) \ FOR_EACH_1_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P1) \ FOR_EACH_1_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(P1) \ FOR_EACH_1_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P1) \ FOR_EACH_1_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(P1) \ FOR_EACH_1_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P1) \ FOR_EACH_1_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(P1) \ FOR_EACH_1_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P1) \ FOR_EACH_1_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(P1) \ FOR_EACH_1_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P1) \ FOR_EACH_1_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(P1) \ FOR_EACH_1_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P1) \ FOR_EACH_1_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(P1) \ FOR_EACH_1_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P1) \ FOR_EACH_1_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(P1) \ FOR_EACH_1_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P1) \ FOR_EACH_1_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(P1) \ FOR_EACH_1_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P1) \ FOR_EACH_1_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(P1) \ FOR_EACH_1_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_6(X, P1, P2, P3, P4, P5, P6) \ X(P1) \ FOR_EACH_1_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_5(X, P1, P2, P3, P4, P5) \ X(P1) \ FOR_EACH_1_4(X, P2, P3, P4, P5) #define FOR_EACH_1_4(X, P1, P2, P3, P4) \ X(P1) \ FOR_EACH_1_3(X, P2, P3, P4) #define FOR_EACH_1_3(X, P1, P2, P3) \ X(P1) \ FOR_EACH_1_2(X, P2, P3) #define FOR_EACH_1_2(X, P1, P2) \ X(P1) \ FOR_EACH_1_1(X, P2) #define FOR_EACH_1_1(X, P1) \ X(P1) #ifdef _MSC_VER #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_1_KEEP_1_124(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_123(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_1_KEEP_1_123(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_122(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_KEEP_1_122(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_121(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_KEEP_1_121(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_120(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_KEEP_1_120(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_119(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_KEEP_1_119(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_118(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_KEEP_1_118(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_117(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_KEEP_1_117(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_116(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_KEEP_1_116(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_115(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_KEEP_1_115(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_114(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_KEEP_1_114(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_113(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_KEEP_1_113(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_112(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_KEEP_1_112(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_111(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_KEEP_1_111(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_110(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_KEEP_1_110(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_109(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_KEEP_1_109(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_108(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_KEEP_1_108(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_107(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_KEEP_1_107(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_106(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_KEEP_1_106(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_105(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_KEEP_1_105(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_104(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_KEEP_1_104(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_103(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_KEEP_1_103(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_102(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_KEEP_1_102(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_101(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_KEEP_1_101(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_100(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_KEEP_1_100(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_99(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_KEEP_1_99(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_98(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_KEEP_1_98(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_97(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_KEEP_1_97(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_96(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_KEEP_1_96(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_95(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_KEEP_1_95(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_94(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_KEEP_1_94(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_93(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_KEEP_1_93(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_92(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_KEEP_1_92(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_91(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_KEEP_1_91(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_90(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_KEEP_1_90(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_89(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_KEEP_1_89(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_88(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_KEEP_1_88(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_87(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_KEEP_1_87(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_86(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_KEEP_1_86(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_85(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_KEEP_1_85(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_84(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_KEEP_1_84(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_83(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_KEEP_1_83(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_82(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_KEEP_1_82(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_81(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_KEEP_1_81(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_80(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_KEEP_1_80(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_79(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_KEEP_1_79(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_78(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_KEEP_1_78(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_77(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_KEEP_1_77(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_76(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_KEEP_1_76(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_75(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_KEEP_1_75(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_74(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_KEEP_1_74(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_73(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_KEEP_1_73(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_72(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_KEEP_1_72(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_71(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_KEEP_1_71(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_70(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_KEEP_1_70(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_69(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_KEEP_1_69(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_68(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_KEEP_1_68(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_67(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_KEEP_1_67(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_66(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_KEEP_1_66(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_65(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_KEEP_1_65(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_64(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_KEEP_1_64(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_63(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_KEEP_1_63(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_62(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_KEEP_1_62(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_61(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_KEEP_1_61(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_60(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_KEEP_1_60(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_59(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_KEEP_1_59(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_58(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_KEEP_1_58(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_57(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_KEEP_1_57(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_56(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_KEEP_1_56(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_55(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_KEEP_1_55(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_54(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_KEEP_1_54(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_53(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_KEEP_1_53(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_52(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_KEEP_1_52(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_51(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_KEEP_1_51(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_50(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_KEEP_1_50(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_49(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_KEEP_1_49(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_48(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_KEEP_1_48(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_47(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_KEEP_1_47(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_46(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_KEEP_1_46(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_45(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_KEEP_1_45(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_44(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_KEEP_1_44(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_43(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_KEEP_1_43(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_42(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_KEEP_1_42(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_41(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_KEEP_1_41(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_40(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_KEEP_1_40(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_39(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_KEEP_1_39(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_38(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_KEEP_1_38(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_37(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_KEEP_1_37(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_36(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_KEEP_1_36(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_35(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_KEEP_1_35(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_34(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_KEEP_1_34(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_33(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_KEEP_1_33(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_32(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_KEEP_1_32(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_31(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_KEEP_1_31(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_30(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_KEEP_1_30(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_29(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_KEEP_1_29(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_28(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_KEEP_1_28(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_27(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_KEEP_1_27(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_26(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_KEEP_1_26(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_25(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_KEEP_1_25(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_24(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_KEEP_1_24(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_23(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_KEEP_1_23(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_22(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_KEEP_1_22(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_21(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_KEEP_1_21(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_20(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_KEEP_1_20(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_19(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_KEEP_1_19(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_18(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_KEEP_1_18(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_17(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_KEEP_1_17(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_16(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_KEEP_1_16(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_15(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_KEEP_1_15(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_14(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_KEEP_1_14(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_13(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_KEEP_1_13(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_12(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_KEEP_1_12(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_11(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_KEEP_1_11(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_10(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_KEEP_1_10(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_9(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_KEEP_1_9(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_8(X, keep, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_KEEP_1_8(X, keep, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_7(X, keep, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_KEEP_1_7(X, keep, P1, P2, P3, P4, P5, P6, P7) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_6(X, keep, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_KEEP_1_6(X, keep, P1, P2, P3, P4, P5, P6) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_5(X, keep, P2, P3, P4, P5, P6) #define FOR_EACH_1_KEEP_1_5(X, keep, P1, P2, P3, P4, P5) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_4(X, keep, P2, P3, P4, P5) #define FOR_EACH_1_KEEP_1_4(X, keep, P1, P2, P3, P4) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_3(X, keep, P2, P3, P4) #define FOR_EACH_1_KEEP_1_3(X, keep, P1, P2, P3) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_2(X, keep, P2, P3) #define FOR_EACH_1_KEEP_1_2(X, keep, P1, P2) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_1(X, keep, P2) #define FOR_EACH_1_KEEP_1_1(X, keep, P1) \ X(keep, P1) #ifdef _MSC_VER #define FOR_EACH_1_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_KEEP_1_124(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_122(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_KEEP_1_122(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_120(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_KEEP_1_120(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_118(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_KEEP_1_118(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_116(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_KEEP_1_116(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_114(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_KEEP_1_114(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_112(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_KEEP_1_112(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_110(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_KEEP_1_110(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_108(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_KEEP_1_108(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_106(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_KEEP_1_106(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_104(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_KEEP_1_104(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_102(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_KEEP_1_102(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_100(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_KEEP_1_100(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_98(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_KEEP_1_98(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_96(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_KEEP_1_96(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_94(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_KEEP_1_94(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_92(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_KEEP_1_92(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_90(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_KEEP_1_90(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_88(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_KEEP_1_88(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_86(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_KEEP_1_86(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_84(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_KEEP_1_84(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_82(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_KEEP_1_82(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_80(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_KEEP_1_80(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_78(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_KEEP_1_78(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_76(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_KEEP_1_76(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_74(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_KEEP_1_74(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_72(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_KEEP_1_72(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_70(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_KEEP_1_70(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_68(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_KEEP_1_68(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_66(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_KEEP_1_66(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_64(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_KEEP_1_64(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_62(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_KEEP_1_62(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_60(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_KEEP_1_60(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_58(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_KEEP_1_58(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_56(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_KEEP_1_56(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_54(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_KEEP_1_54(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_52(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_KEEP_1_52(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_50(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_KEEP_1_50(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_48(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_KEEP_1_48(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_46(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_KEEP_1_46(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_44(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_KEEP_1_44(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_42(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_KEEP_1_42(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_40(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_KEEP_1_40(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_38(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_KEEP_1_38(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_36(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_KEEP_1_36(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_34(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_KEEP_1_34(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_32(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_KEEP_1_32(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_30(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_KEEP_1_30(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_28(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_KEEP_1_28(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_26(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_KEEP_1_26(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_24(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_KEEP_1_24(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_22(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_KEEP_1_22(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_20(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_KEEP_1_20(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_18(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_KEEP_1_18(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_16(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_KEEP_1_16(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_14(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_KEEP_1_14(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_12(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_KEEP_1_12(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_10(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_KEEP_1_10(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_8(X, keep, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_KEEP_1_8(X, keep, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_6(X, keep, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_KEEP_1_6(X, keep, P1, P2, P3, P4, P5, P6) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_4(X, keep, P3, P4, P5, P6) #define FOR_EACH_2_KEEP_1_4(X, keep, P1, P2, P3, P4) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_2(X, keep, P3, P4) #define FOR_EACH_2_KEEP_1_1(...) #define FOR_EACH_2_KEEP_1_0(...) #define FOR_EACH_2_KEEP_1_2(X, keep, P1, P2) \ X(keep, P1, P2) \ #ifdef _MSC_VER #define FOR_EACH_2_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_KEEP_2_124(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_122(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_KEEP_2_122(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_120(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_KEEP_2_120(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_118(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_KEEP_2_118(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_116(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_KEEP_2_116(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_114(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_KEEP_2_114(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_112(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_KEEP_2_112(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_110(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_KEEP_2_110(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_108(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_KEEP_2_108(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_106(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_KEEP_2_106(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_104(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_KEEP_2_104(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_102(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_KEEP_2_102(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_100(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_KEEP_2_100(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_98(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_KEEP_2_98(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_96(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_KEEP_2_96(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_94(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_KEEP_2_94(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_92(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_KEEP_2_92(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_90(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_KEEP_2_90(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_88(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_KEEP_2_88(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_86(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_KEEP_2_86(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_84(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_KEEP_2_84(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_82(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_KEEP_2_82(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_80(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_KEEP_2_80(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_78(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_KEEP_2_78(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_76(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_KEEP_2_76(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_74(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_KEEP_2_74(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_72(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_KEEP_2_72(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_70(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_KEEP_2_70(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_68(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_KEEP_2_68(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_66(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_KEEP_2_66(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_64(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_KEEP_2_64(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_62(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_KEEP_2_62(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_60(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_KEEP_2_60(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_58(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_KEEP_2_58(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_56(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_KEEP_2_56(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_54(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_KEEP_2_54(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_52(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_KEEP_2_52(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_50(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_KEEP_2_50(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_48(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_KEEP_2_48(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_46(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_KEEP_2_46(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_44(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_KEEP_2_44(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_42(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_KEEP_2_42(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_40(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_KEEP_2_40(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_38(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_KEEP_2_38(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_36(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_KEEP_2_36(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_34(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_KEEP_2_34(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_32(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_KEEP_2_32(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_30(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_KEEP_2_30(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_28(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_KEEP_2_28(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_26(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_KEEP_2_26(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_24(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_KEEP_2_24(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_22(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_KEEP_2_22(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_20(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_KEEP_2_20(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_18(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_KEEP_2_18(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_16(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_KEEP_2_16(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_14(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_KEEP_2_14(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_12(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_KEEP_2_12(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_10(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_KEEP_2_10(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_8(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_KEEP_2_8(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_6(X, keep1, keep2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_KEEP_2_6(X, keep1, keep2, P1, P2, P3, P4, P5, P6) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_4(X, keep1, keep2, P3, P4, P5, P6) #define FOR_EACH_2_KEEP_2_4(X, keep1, keep2, P1, P2, P3, P4) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_2(X, keep1, keep2, P3, P4) #define FOR_EACH_2_KEEP_2_1(...) #define FOR_EACH_2_KEEP_2_0(...) #define FOR_EACH_2_KEEP_2_2(X, keep1, keep2, P1, P2) \ X(keep1, keep2, P1, P2) \ #ifdef _MSC_VER #define FOR_EACH_2_KEEP_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_2_, C2(DEC,C2(DEC,C1(COUNT_ARG(__VA_ARGS__))))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2_KEEP_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_2_, C2(DEC, C2(DEC,C1(COUNT_ARG(__VA_ARGS__))))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_0(...) #define FOR_EACH_2_2(X, P1, P2) \ X(P1, P2) #define FOR_EACH_2_4(X, P1, P2, P3, P4) \ X(P1, P2) \ FOR_EACH_2_2(X, P3, P4) #define FOR_EACH_2_6(X, P1, P2, P3, P4, P5, P6) \ X(P1, P2) \ FOR_EACH_2_4(X, P3, P4, P5, P6) #define FOR_EACH_2_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P1, P2) \ FOR_EACH_2_6(X, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P1, P2) \ FOR_EACH_2_8(X, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P1, P2) \ FOR_EACH_2_10(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P1, P2) \ FOR_EACH_2_12(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P1, P2) \ FOR_EACH_2_14(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P1, P2) \ FOR_EACH_2_16(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P1, P2) \ FOR_EACH_2_18(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P1, P2) \ FOR_EACH_2_20(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P1, P2) \ FOR_EACH_2_22(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P1, P2) \ FOR_EACH_2_24(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P1, P2) \ FOR_EACH_2_26(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P1, P2) \ FOR_EACH_2_28(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P1, P2) \ FOR_EACH_2_30(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P1, P2) \ FOR_EACH_2_32(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P1, P2) \ FOR_EACH_2_34(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P1, P2) \ FOR_EACH_2_36(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P1, P2) \ FOR_EACH_2_38(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P1, P2) \ FOR_EACH_2_40(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P1, P2) \ FOR_EACH_2_42(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P1, P2) \ FOR_EACH_2_44(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P1, P2) \ FOR_EACH_2_46(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P1, P2) \ FOR_EACH_2_48(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P1, P2) \ FOR_EACH_2_50(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P1, P2) \ FOR_EACH_2_52(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P1, P2) \ FOR_EACH_2_54(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P1, P2) \ FOR_EACH_2_56(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P1, P2) \ FOR_EACH_2_58(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P1, P2) \ FOR_EACH_2_60(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P1, P2) \ FOR_EACH_2_62(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P1, P2) \ FOR_EACH_2_64(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P1, P2) \ FOR_EACH_2_66(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P1, P2) \ FOR_EACH_2_68(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P1, P2) \ FOR_EACH_2_70(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P1, P2) \ FOR_EACH_2_72(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P1, P2) \ FOR_EACH_2_74(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P1, P2) \ FOR_EACH_2_76(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P1, P2) \ FOR_EACH_2_78(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P1, P2) \ FOR_EACH_2_80(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P1, P2) \ FOR_EACH_2_82(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P1, P2) \ FOR_EACH_2_84(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P1, P2) \ FOR_EACH_2_86(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P1, P2) \ FOR_EACH_2_88(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P1, P2) \ FOR_EACH_2_90(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P1, P2) \ FOR_EACH_2_92(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P1, P2) \ FOR_EACH_2_94(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P1, P2) \ FOR_EACH_2_96(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P1, P2) \ FOR_EACH_2_98(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P1, P2) \ FOR_EACH_2_100(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P1, P2) \ FOR_EACH_2_102(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P1, P2) \ FOR_EACH_2_104(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P1, P2) \ FOR_EACH_2_106(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P1, P2) \ FOR_EACH_2_108(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P1, P2) \ FOR_EACH_2_110(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P1, P2) \ FOR_EACH_2_112(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P1, P2) \ FOR_EACH_2_114(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P1, P2) \ FOR_EACH_2_116(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P1, P2) \ FOR_EACH_2_118(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P1, P2) \ FOR_EACH_2_120(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P1, P2) \ FOR_EACH_2_122(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_REVERSE_0(...) #define FOR_EACH_2_REVERSE_2(X, P1, P2) \ X(P1, P2) #define FOR_EACH_2_REVERSE_4(X, P1, P2, P3, P4) \ X(P3, P4) \ FOR_EACH_2_REVERSE_2(X, P1, P2) #define FOR_EACH_2_REVERSE_6(X, P1, P2, P3, P4, P5, P6) \ X(P5, P6) \ FOR_EACH_2_REVERSE_4(X, P1, P2, P3, P4) #define FOR_EACH_2_REVERSE_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P7, P8) \ FOR_EACH_2_REVERSE_6(X, P1, P2, P3, P4, P5, P6) #define FOR_EACH_2_REVERSE_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P9, P10) \ FOR_EACH_2_REVERSE_8(X, P1, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_REVERSE_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P11, P12) \ FOR_EACH_2_REVERSE_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_REVERSE_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P13, P14) \ FOR_EACH_2_REVERSE_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_REVERSE_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P15, P16) \ FOR_EACH_2_REVERSE_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_REVERSE_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P17, P18) \ FOR_EACH_2_REVERSE_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_REVERSE_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P19, P20) \ FOR_EACH_2_REVERSE_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_REVERSE_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P21, P22) \ FOR_EACH_2_REVERSE_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_REVERSE_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P23, P24) \ FOR_EACH_2_REVERSE_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_REVERSE_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P25, P26) \ FOR_EACH_2_REVERSE_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_REVERSE_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P27, P28) \ FOR_EACH_2_REVERSE_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_REVERSE_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P29, P30) \ FOR_EACH_2_REVERSE_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_REVERSE_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P31, P32) \ FOR_EACH_2_REVERSE_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_REVERSE_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P33, P34) \ FOR_EACH_2_REVERSE_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_REVERSE_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P35, P36) \ FOR_EACH_2_REVERSE_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_REVERSE_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P37, P38) \ FOR_EACH_2_REVERSE_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_REVERSE_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P39, P40) \ FOR_EACH_2_REVERSE_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_REVERSE_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P41, P42) \ FOR_EACH_2_REVERSE_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_REVERSE_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P43, P44) \ FOR_EACH_2_REVERSE_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_REVERSE_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P45, P46) \ FOR_EACH_2_REVERSE_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_REVERSE_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P47, P48) \ FOR_EACH_2_REVERSE_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_REVERSE_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P49, P50) \ FOR_EACH_2_REVERSE_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_REVERSE_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P51, P52) \ FOR_EACH_2_REVERSE_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_REVERSE_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P53, P54) \ FOR_EACH_2_REVERSE_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_REVERSE_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P55, P56) \ FOR_EACH_2_REVERSE_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_REVERSE_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P57, P58) \ FOR_EACH_2_REVERSE_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_REVERSE_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P59, P60) \ FOR_EACH_2_REVERSE_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_REVERSE_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P61, P62) \ FOR_EACH_2_REVERSE_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_REVERSE_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P63, P64) \ FOR_EACH_2_REVERSE_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_REVERSE_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P65, P66) \ FOR_EACH_2_REVERSE_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_REVERSE_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P67, P68) \ FOR_EACH_2_REVERSE_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_REVERSE_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P69, P70) \ FOR_EACH_2_REVERSE_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_REVERSE_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P71, P72) \ FOR_EACH_2_REVERSE_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_REVERSE_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P73, P74) \ FOR_EACH_2_REVERSE_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_REVERSE_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P75, P76) \ FOR_EACH_2_REVERSE_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_REVERSE_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P77, P78) \ FOR_EACH_2_REVERSE_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_REVERSE_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P79, P80) \ FOR_EACH_2_REVERSE_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_REVERSE_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P81, P82) \ FOR_EACH_2_REVERSE_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_REVERSE_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P83, P84) \ FOR_EACH_2_REVERSE_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_REVERSE_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P85, P86) \ FOR_EACH_2_REVERSE_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_REVERSE_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P87, P88) \ FOR_EACH_2_REVERSE_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_REVERSE_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P89, P90) \ FOR_EACH_2_REVERSE_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_REVERSE_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P91, P92) \ FOR_EACH_2_REVERSE_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_REVERSE_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P93, P94) \ FOR_EACH_2_REVERSE_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_REVERSE_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P95, P96) \ FOR_EACH_2_REVERSE_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_REVERSE_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P97, P98) \ FOR_EACH_2_REVERSE_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_REVERSE_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P99, P100) \ FOR_EACH_2_REVERSE_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_REVERSE_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P101, P102) \ FOR_EACH_2_REVERSE_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_REVERSE_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P103, P104) \ FOR_EACH_2_REVERSE_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_REVERSE_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P105, P106) \ FOR_EACH_2_REVERSE_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_REVERSE_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P107, P108) \ FOR_EACH_2_REVERSE_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_REVERSE_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P109, P110) \ FOR_EACH_2_REVERSE_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_REVERSE_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P111, P112) \ FOR_EACH_2_REVERSE_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_REVERSE_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P113, P114) \ FOR_EACH_2_REVERSE_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_REVERSE_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P115, P116) \ FOR_EACH_2_REVERSE_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_REVERSE_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P117, P118) \ FOR_EACH_2_REVERSE_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_REVERSE_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P119, P120) \ FOR_EACH_2_REVERSE_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_REVERSE_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P121, P122) \ FOR_EACH_2_REVERSE_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_REVERSE_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P123, P124) \ FOR_EACH_2_REVERSE_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_COUNTED_0(...) #define FOR_EACH_1_COUNTED_1(X, P1) \ X(1, P1) #define FOR_EACH_1_COUNTED_2(X, P1, P2) \ X(2, P1) \ FOR_EACH_1_COUNTED_1(X, P2) #define FOR_EACH_1_COUNTED_3(X, P1, P2, P3) \ X(3, P1) \ FOR_EACH_1_COUNTED_2(X, P2, P3) #define FOR_EACH_1_COUNTED_4(X, P1, P2, P3, P4) \ X(4, P1) \ FOR_EACH_1_COUNTED_3(X, P2, P3, P4) #define FOR_EACH_1_COUNTED_5(X, P1, P2, P3, P4, P5) \ X(5, P1) \ FOR_EACH_1_COUNTED_4(X, P2, P3, P4, P5) #define FOR_EACH_1_COUNTED_6(X, P1, P2, P3, P4, P5, P6) \ X(6, P1) \ FOR_EACH_1_COUNTED_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_COUNTED_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(7, P1) \ FOR_EACH_1_COUNTED_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_COUNTED_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(8, P1) \ FOR_EACH_1_COUNTED_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_COUNTED_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(9, P1) \ FOR_EACH_1_COUNTED_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_COUNTED_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(10, P1) \ FOR_EACH_1_COUNTED_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_COUNTED_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(11, P1) \ FOR_EACH_1_COUNTED_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_COUNTED_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(12, P1) \ FOR_EACH_1_COUNTED_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_COUNTED_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(13, P1) \ FOR_EACH_1_COUNTED_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_COUNTED_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(14, P1) \ FOR_EACH_1_COUNTED_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_COUNTED_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(15, P1) \ FOR_EACH_1_COUNTED_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_COUNTED_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(16, P1) \ FOR_EACH_1_COUNTED_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_COUNTED_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(17, P1) \ FOR_EACH_1_COUNTED_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_COUNTED_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(18, P1) \ FOR_EACH_1_COUNTED_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_COUNTED_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(19, P1) \ FOR_EACH_1_COUNTED_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_COUNTED_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(20, P1) \ FOR_EACH_1_COUNTED_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_COUNTED_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(21, P1) \ FOR_EACH_1_COUNTED_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_COUNTED_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(22, P1) \ FOR_EACH_1_COUNTED_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_COUNTED_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(23, P1) \ FOR_EACH_1_COUNTED_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_COUNTED_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(24, P1) \ FOR_EACH_1_COUNTED_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_COUNTED_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(25, P1) \ FOR_EACH_1_COUNTED_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_COUNTED_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(26, P1) \ FOR_EACH_1_COUNTED_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_COUNTED_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(27, P1) \ FOR_EACH_1_COUNTED_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_COUNTED_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(28, P1) \ FOR_EACH_1_COUNTED_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_COUNTED_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(29, P1) \ FOR_EACH_1_COUNTED_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_COUNTED_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(30, P1) \ FOR_EACH_1_COUNTED_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_COUNTED_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(31, P1) \ FOR_EACH_1_COUNTED_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_COUNTED_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(32, P1) \ FOR_EACH_1_COUNTED_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_COUNTED_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(33, P1) \ FOR_EACH_1_COUNTED_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_COUNTED_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(34, P1) \ FOR_EACH_1_COUNTED_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_COUNTED_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(35, P1) \ FOR_EACH_1_COUNTED_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_COUNTED_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(36, P1) \ FOR_EACH_1_COUNTED_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_COUNTED_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(37, P1) \ FOR_EACH_1_COUNTED_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_COUNTED_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(38, P1) \ FOR_EACH_1_COUNTED_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_COUNTED_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(39, P1) \ FOR_EACH_1_COUNTED_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_COUNTED_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(40, P1) \ FOR_EACH_1_COUNTED_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_COUNTED_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(41, P1) \ FOR_EACH_1_COUNTED_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_COUNTED_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(42, P1) \ FOR_EACH_1_COUNTED_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_COUNTED_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(43, P1) \ FOR_EACH_1_COUNTED_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_COUNTED_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(44, P1) \ FOR_EACH_1_COUNTED_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_COUNTED_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(45, P1) \ FOR_EACH_1_COUNTED_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_COUNTED_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(46, P1) \ FOR_EACH_1_COUNTED_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_COUNTED_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(47, P1) \ FOR_EACH_1_COUNTED_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_COUNTED_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(48, P1) \ FOR_EACH_1_COUNTED_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_COUNTED_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(49, P1) \ FOR_EACH_1_COUNTED_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_COUNTED_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(50, P1) \ FOR_EACH_1_COUNTED_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_COUNTED_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(51, P1) \ FOR_EACH_1_COUNTED_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_COUNTED_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(52, P1) \ FOR_EACH_1_COUNTED_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_COUNTED_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(53, P1) \ FOR_EACH_1_COUNTED_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_COUNTED_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(54, P1) \ FOR_EACH_1_COUNTED_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_COUNTED_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(55, P1) \ FOR_EACH_1_COUNTED_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_COUNTED_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(56, P1) \ FOR_EACH_1_COUNTED_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_COUNTED_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(57, P1) \ FOR_EACH_1_COUNTED_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_COUNTED_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(58, P1) \ FOR_EACH_1_COUNTED_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_COUNTED_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(59, P1) \ FOR_EACH_1_COUNTED_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_COUNTED_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(60, P1) \ FOR_EACH_1_COUNTED_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_COUNTED_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(61, P1) \ FOR_EACH_1_COUNTED_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_COUNTED_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(62, P1) \ FOR_EACH_1_COUNTED_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_COUNTED_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(63, P1) \ FOR_EACH_1_COUNTED_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_COUNTED_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(64, P1) \ FOR_EACH_1_COUNTED_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_COUNTED_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(65, P1) \ FOR_EACH_1_COUNTED_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_COUNTED_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(66, P1) \ FOR_EACH_1_COUNTED_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_COUNTED_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(67, P1) \ FOR_EACH_1_COUNTED_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_COUNTED_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(68, P1) \ FOR_EACH_1_COUNTED_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_COUNTED_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(69, P1) \ FOR_EACH_1_COUNTED_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_COUNTED_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(70, P1) \ FOR_EACH_1_COUNTED_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_COUNTED_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(71, P1) \ FOR_EACH_1_COUNTED_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_COUNTED_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(72, P1) \ FOR_EACH_1_COUNTED_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_COUNTED_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(73, P1) \ FOR_EACH_1_COUNTED_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_COUNTED_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(74, P1) \ FOR_EACH_1_COUNTED_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_COUNTED_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(75, P1) \ FOR_EACH_1_COUNTED_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_COUNTED_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(76, P1) \ FOR_EACH_1_COUNTED_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_COUNTED_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(77, P1) \ FOR_EACH_1_COUNTED_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_COUNTED_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(78, P1) \ FOR_EACH_1_COUNTED_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_COUNTED_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(79, P1) \ FOR_EACH_1_COUNTED_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_COUNTED_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(80, P1) \ FOR_EACH_1_COUNTED_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_COUNTED_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(81, P1) \ FOR_EACH_1_COUNTED_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_COUNTED_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(82, P1) \ FOR_EACH_1_COUNTED_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_COUNTED_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(83, P1) \ FOR_EACH_1_COUNTED_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_COUNTED_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(84, P1) \ FOR_EACH_1_COUNTED_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_COUNTED_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(85, P1) \ FOR_EACH_1_COUNTED_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_COUNTED_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(86, P1) \ FOR_EACH_1_COUNTED_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_COUNTED_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(87, P1) \ FOR_EACH_1_COUNTED_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_COUNTED_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(88, P1) \ FOR_EACH_1_COUNTED_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_COUNTED_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(89, P1) \ FOR_EACH_1_COUNTED_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_COUNTED_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(90, P1) \ FOR_EACH_1_COUNTED_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_COUNTED_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(91, P1) \ FOR_EACH_1_COUNTED_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_COUNTED_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(92, P1) \ FOR_EACH_1_COUNTED_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_COUNTED_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(93, P1) \ FOR_EACH_1_COUNTED_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_COUNTED_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(94, P1) \ FOR_EACH_1_COUNTED_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_COUNTED_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(95, P1) \ FOR_EACH_1_COUNTED_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_COUNTED_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(96, P1) \ FOR_EACH_1_COUNTED_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_COUNTED_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(97, P1) \ FOR_EACH_1_COUNTED_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_COUNTED_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(98, P1) \ FOR_EACH_1_COUNTED_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_COUNTED_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(99, P1) \ FOR_EACH_1_COUNTED_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_COUNTED_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(100, P1) \ FOR_EACH_1_COUNTED_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_COUNTED_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(101, P1) \ FOR_EACH_1_COUNTED_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_COUNTED_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(102, P1) \ FOR_EACH_1_COUNTED_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_COUNTED_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(103, P1) \ FOR_EACH_1_COUNTED_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_COUNTED_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(104, P1) \ FOR_EACH_1_COUNTED_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_COUNTED_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(105, P1) \ FOR_EACH_1_COUNTED_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_COUNTED_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(106, P1) \ FOR_EACH_1_COUNTED_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_COUNTED_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(107, P1) \ FOR_EACH_1_COUNTED_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_COUNTED_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(108, P1) \ FOR_EACH_1_COUNTED_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_COUNTED_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(109, P1) \ FOR_EACH_1_COUNTED_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_COUNTED_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(110, P1) \ FOR_EACH_1_COUNTED_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_COUNTED_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(111, P1) \ FOR_EACH_1_COUNTED_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_COUNTED_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(112, P1) \ FOR_EACH_1_COUNTED_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_COUNTED_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(113, P1) \ FOR_EACH_1_COUNTED_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_COUNTED_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(114, P1) \ FOR_EACH_1_COUNTED_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_COUNTED_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(115, P1) \ FOR_EACH_1_COUNTED_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_COUNTED_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(116, P1) \ FOR_EACH_1_COUNTED_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_COUNTED_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(117, P1) \ FOR_EACH_1_COUNTED_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_COUNTED_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(118, P1) \ FOR_EACH_1_COUNTED_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_COUNTED_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(119, P1) \ FOR_EACH_1_COUNTED_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_COUNTED_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(120, P1) \ FOR_EACH_1_COUNTED_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_COUNTED_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(121, P1) \ FOR_EACH_1_COUNTED_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_COUNTED_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(122, P1) \ FOR_EACH_1_COUNTED_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_COUNTED_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(123, P1) \ FOR_EACH_1_COUNTED_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_COUNTED_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(124, P1) \ FOR_EACH_1_COUNTED_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_COUNTED_0(...) #define FOR_EACH_2_COUNTED_2(X, P1, P2) \ X(2, P1, P2) #define FOR_EACH_2_COUNTED_4(X, P1, P2, P3, P4) \ X(4, P1, P2) \ FOR_EACH_2_COUNTED_2(X, P3, P4) #define FOR_EACH_2_COUNTED_6(X, P1, P2, P3, P4, P5, P6) \ X(6, P1, P2) \ FOR_EACH_2_COUNTED_4(X, P3, P4, P5, P6) #define FOR_EACH_2_COUNTED_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(8, P1, P2) \ FOR_EACH_2_COUNTED_6(X, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_COUNTED_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(10, P1, P2) \ FOR_EACH_2_COUNTED_8(X, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_COUNTED_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(12, P1, P2) \ FOR_EACH_2_COUNTED_10(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_COUNTED_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(14, P1, P2) \ FOR_EACH_2_COUNTED_12(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_COUNTED_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(16, P1, P2) \ FOR_EACH_2_COUNTED_14(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_COUNTED_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(18, P1, P2) \ FOR_EACH_2_COUNTED_16(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_COUNTED_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(20, P1, P2) \ FOR_EACH_2_COUNTED_18(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_COUNTED_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(22, P1, P2) \ FOR_EACH_2_COUNTED_20(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_COUNTED_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(24, P1, P2) \ FOR_EACH_2_COUNTED_22(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_COUNTED_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(26, P1, P2) \ FOR_EACH_2_COUNTED_24(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_COUNTED_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(28, P1, P2) \ FOR_EACH_2_COUNTED_26(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_COUNTED_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(30, P1, P2) \ FOR_EACH_2_COUNTED_28(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_COUNTED_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(32, P1, P2) \ FOR_EACH_2_COUNTED_30(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_COUNTED_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(34, P1, P2) \ FOR_EACH_2_COUNTED_32(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_COUNTED_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(36, P1, P2) \ FOR_EACH_2_COUNTED_34(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_COUNTED_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(38, P1, P2) \ FOR_EACH_2_COUNTED_36(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_COUNTED_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(40, P1, P2) \ FOR_EACH_2_COUNTED_38(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_COUNTED_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(42, P1, P2) \ FOR_EACH_2_COUNTED_40(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_COUNTED_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(44, P1, P2) \ FOR_EACH_2_COUNTED_42(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_COUNTED_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(46, P1, P2) \ FOR_EACH_2_COUNTED_44(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_COUNTED_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(48, P1, P2) \ FOR_EACH_2_COUNTED_46(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_COUNTED_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(50, P1, P2) \ FOR_EACH_2_COUNTED_48(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_COUNTED_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(52, P1, P2) \ FOR_EACH_2_COUNTED_50(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_COUNTED_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(54, P1, P2) \ FOR_EACH_2_COUNTED_52(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_COUNTED_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(56, P1, P2) \ FOR_EACH_2_COUNTED_54(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_COUNTED_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(58, P1, P2) \ FOR_EACH_2_COUNTED_56(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_COUNTED_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(60, P1, P2) \ FOR_EACH_2_COUNTED_58(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_COUNTED_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(62, P1, P2) \ FOR_EACH_2_COUNTED_60(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_COUNTED_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(64, P1, P2) \ FOR_EACH_2_COUNTED_62(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_COUNTED_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(66, P1, P2) \ FOR_EACH_2_COUNTED_64(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_COUNTED_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(68, P1, P2) \ FOR_EACH_2_COUNTED_66(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_COUNTED_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(70, P1, P2) \ FOR_EACH_2_COUNTED_68(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_COUNTED_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(72, P1, P2) \ FOR_EACH_2_COUNTED_70(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_COUNTED_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(74, P1, P2) \ FOR_EACH_2_COUNTED_72(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_COUNTED_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(76, P1, P2) \ FOR_EACH_2_COUNTED_74(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_COUNTED_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(78, P1, P2) \ FOR_EACH_2_COUNTED_76(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_COUNTED_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(80, P1, P2) \ FOR_EACH_2_COUNTED_78(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_COUNTED_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(82, P1, P2) \ FOR_EACH_2_COUNTED_80(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_COUNTED_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(84, P1, P2) \ FOR_EACH_2_COUNTED_82(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_COUNTED_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(86, P1, P2) \ FOR_EACH_2_COUNTED_84(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_COUNTED_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(88, P1, P2) \ FOR_EACH_2_COUNTED_86(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_COUNTED_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(90, P1, P2) \ FOR_EACH_2_COUNTED_88(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_COUNTED_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(92, P1, P2) \ FOR_EACH_2_COUNTED_90(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_COUNTED_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(94, P1, P2) \ FOR_EACH_2_COUNTED_92(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_COUNTED_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(96, P1, P2) \ FOR_EACH_2_COUNTED_94(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_COUNTED_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(98, P1, P2) \ FOR_EACH_2_COUNTED_96(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_COUNTED_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(100, P1, P2) \ FOR_EACH_2_COUNTED_98(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_COUNTED_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(102, P1, P2) \ FOR_EACH_2_COUNTED_100(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_COUNTED_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(104, P1, P2) \ FOR_EACH_2_COUNTED_102(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_COUNTED_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(106, P1, P2) \ FOR_EACH_2_COUNTED_104(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_COUNTED_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(108, P1, P2) \ FOR_EACH_2_COUNTED_106(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_COUNTED_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(110, P1, P2) \ FOR_EACH_2_COUNTED_108(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_COUNTED_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(112, P1, P2) \ FOR_EACH_2_COUNTED_110(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_COUNTED_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(114, P1, P2) \ FOR_EACH_2_COUNTED_112(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_COUNTED_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(116, P1, P2) \ FOR_EACH_2_COUNTED_114(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_COUNTED_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(118, P1, P2) \ FOR_EACH_2_COUNTED_116(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_COUNTED_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(120, P1, P2) \ FOR_EACH_2_COUNTED_118(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_COUNTED_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(122, P1, P2) \ FOR_EACH_2_COUNTED_120(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_COUNTED_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(124, P1, P2) \ FOR_EACH_2_COUNTED_122(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #ifdef _MSC_VER #define FOR_EACH_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) /*the COUNTED breed of FOR_EACH macro invokes a macro with 3 parameters: 1st being the count of invocation. For example. FOR_EACH_2_COUNTER(MACRO, a,b,c,d,e,f) will result in MACRO(6, a,b) MACRO(4, c,d) MACRO(2, e,f) This macro exists because we need a "stop condition" in outputting COMMA... when calling a function f(a,b,c,d) cannot be f(a,b,c,d,) <=doesn't compile (as opposed to enum definition) */ #define FOR_EACH_2_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) /*FOR_EACH_2_REVERSE acts just like FOR_EACH_2, but in reverse order. Example: FOR_EACH_2_REVERSE(X,a,b,c,d,e,f) => X(e,f) X(c,d) X (a, b) in this order */ #define FOR_EACH_2_REVERSE(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_REVERSE_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_2_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_2_REVERSE(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_REVERSE_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #ifdef _MSC_VER #define EXPAND_OR_C1(x) x #else #define EXPAND_OR_C1(...) __VA_ARGS__ #endif #define EXPAND_ARGS(...) __VA_ARGS__ #define EXPAND_TWICE(...) EXPAND_ARGS(__VA_ARGS__) #define DO_0(MACRO, ...) \ MACRO(0, __VA_ARGS__) #define DO_1(MACRO, ...) \ MACRO(1, __VA_ARGS__) \ DO_0(MACRO, __VA_ARGS__) #define DO_2(MACRO, ...) \ MACRO(2, __VA_ARGS__) \ DO_1(MACRO, __VA_ARGS__) #define DO_3(MACRO, ...) \ MACRO(3, __VA_ARGS__) \ DO_2(MACRO, __VA_ARGS__) #define DO_4(MACRO, ...) \ MACRO(4, __VA_ARGS__) \ DO_3(MACRO, __VA_ARGS__) #define DO_5(MACRO, ...) \ MACRO(5, __VA_ARGS__) \ DO_4(MACRO, __VA_ARGS__) #define DO_6(MACRO, ...) \ MACRO(6, __VA_ARGS__) \ DO_5(MACRO, __VA_ARGS__) #define DO_7(MACRO, ...) \ MACRO(7, __VA_ARGS__) \ DO_6(MACRO, __VA_ARGS__) #define DO_8(MACRO, ...) \ MACRO(8, __VA_ARGS__) \ DO_7(MACRO, __VA_ARGS__) #define DO_9(MACRO, ...) \ MACRO(9, __VA_ARGS__) \ DO_8(MACRO, __VA_ARGS__) #define DO_10(MACRO, ...) \ MACRO(10, __VA_ARGS__) \ DO_9(MACRO, __VA_ARGS__) #define DO_11(MACRO, ...) \ MACRO(11, __VA_ARGS__) \ DO_10(MACRO, __VA_ARGS__) #define DO_12(MACRO, ...) \ MACRO(12, __VA_ARGS__) \ DO_11(MACRO, __VA_ARGS__) #define DO_13(MACRO, ...) \ MACRO(13, __VA_ARGS__) \ DO_12(MACRO, __VA_ARGS__) #define DO_14(MACRO, ...) \ MACRO(14, __VA_ARGS__) \ DO_13(MACRO, __VA_ARGS__) #define DO_15(MACRO, ...) \ MACRO(15, __VA_ARGS__) \ DO_14(MACRO, __VA_ARGS__) #define DO_16(MACRO, ...) \ MACRO(16, __VA_ARGS__) \ DO_15(MACRO, __VA_ARGS__) #define DO_17(MACRO, ...) \ MACRO(17, __VA_ARGS__) \ DO_16(MACRO, __VA_ARGS__) #define DO_18(MACRO, ...) \ MACRO(18, __VA_ARGS__) \ DO_17(MACRO, __VA_ARGS__) #define DO_19(MACRO, ...) \ MACRO(19, __VA_ARGS__) \ DO_18(MACRO, __VA_ARGS__) #define DO_20(MACRO, ...) \ MACRO(20, __VA_ARGS__) \ DO_19(MACRO, __VA_ARGS__) #define DO_21(MACRO, ...) \ MACRO(21, __VA_ARGS__) \ DO_20(MACRO, __VA_ARGS__) #define DO_22(MACRO, ...) \ MACRO(22, __VA_ARGS__) \ DO_21(MACRO, __VA_ARGS__) #define DO_23(MACRO, ...) \ MACRO(23, __VA_ARGS__) \ DO_22(MACRO, __VA_ARGS__) #define DO_24(MACRO, ...) \ MACRO(24, __VA_ARGS__) \ DO_23(MACRO, __VA_ARGS__) #define DO_25(MACRO, ...) \ MACRO(25, __VA_ARGS__) \ DO_24(MACRO, __VA_ARGS__) #define DO_26(MACRO, ...) \ MACRO(26, __VA_ARGS__) \ DO_25(MACRO, __VA_ARGS__) #define DO_27(MACRO, ...) \ MACRO(27, __VA_ARGS__) \ DO_26(MACRO, __VA_ARGS__) #define DO_28(MACRO, ...) \ MACRO(28, __VA_ARGS__) \ DO_27(MACRO, __VA_ARGS__) #define DO_29(MACRO, ...) \ MACRO(29, __VA_ARGS__) \ DO_28(MACRO, __VA_ARGS__) #define DO_30(MACRO, ...) \ MACRO(30, __VA_ARGS__) \ DO_29(MACRO, __VA_ARGS__) #define DO_31(MACRO, ...) \ MACRO(31, __VA_ARGS__) \ DO_30(MACRO, __VA_ARGS__) #define DO_32(MACRO, ...) \ MACRO(32, __VA_ARGS__) \ DO_31(MACRO, __VA_ARGS__) #define DO_33(MACRO, ...) \ MACRO(33, __VA_ARGS__) \ DO_32(MACRO, __VA_ARGS__) #define DO_34(MACRO, ...) \ MACRO(34, __VA_ARGS__) \ DO_33(MACRO, __VA_ARGS__) #define DO_35(MACRO, ...) \ MACRO(35, __VA_ARGS__) \ DO_34(MACRO, __VA_ARGS__) #define DO_36(MACRO, ...) \ MACRO(36, __VA_ARGS__) \ DO_35(MACRO, __VA_ARGS__) #define DO_37(MACRO, ...) \ MACRO(37, __VA_ARGS__) \ DO_36(MACRO, __VA_ARGS__) #define DO_38(MACRO, ...) \ MACRO(38, __VA_ARGS__) \ DO_37(MACRO, __VA_ARGS__) #define DO_39(MACRO, ...) \ MACRO(39, __VA_ARGS__) \ DO_38(MACRO, __VA_ARGS__) #define DO_40(MACRO, ...) \ MACRO(40, __VA_ARGS__) \ DO_39(MACRO, __VA_ARGS__) #define DO_41(MACRO, ...) \ MACRO(41, __VA_ARGS__) \ DO_40(MACRO, __VA_ARGS__) #define DO_42(MACRO, ...) \ MACRO(42, __VA_ARGS__) \ DO_41(MACRO, __VA_ARGS__) #define DO_43(MACRO, ...) \ MACRO(43, __VA_ARGS__) \ DO_42(MACRO, __VA_ARGS__) #define DO_44(MACRO, ...) \ MACRO(44, __VA_ARGS__) \ DO_43(MACRO, __VA_ARGS__) #define DO_45(MACRO, ...) \ MACRO(45, __VA_ARGS__) \ DO_44(MACRO, __VA_ARGS__) #define DO_46(MACRO, ...) \ MACRO(46, __VA_ARGS__) \ DO_45(MACRO, __VA_ARGS__) #define DO_47(MACRO, ...) \ MACRO(47, __VA_ARGS__) \ DO_46(MACRO, __VA_ARGS__) #define DO_48(MACRO, ...) \ MACRO(48, __VA_ARGS__) \ DO_47(MACRO, __VA_ARGS__) #define DO_49(MACRO, ...) \ MACRO(49, __VA_ARGS__) \ DO_48(MACRO, __VA_ARGS__) #define DO_50(MACRO, ...) \ MACRO(50, __VA_ARGS__) \ DO_49(MACRO, __VA_ARGS__) #define DO_51(MACRO, ...) \ MACRO(51, __VA_ARGS__) \ DO_50(MACRO, __VA_ARGS__) #define DO_52(MACRO, ...) \ MACRO(52, __VA_ARGS__) \ DO_51(MACRO, __VA_ARGS__) #define DO_53(MACRO, ...) \ MACRO(53, __VA_ARGS__) \ DO_52(MACRO, __VA_ARGS__) #define DO_54(MACRO, ...) \ MACRO(54, __VA_ARGS__) \ DO_53(MACRO, __VA_ARGS__) #define DO_55(MACRO, ...) \ MACRO(55, __VA_ARGS__) \ DO_54(MACRO, __VA_ARGS__) #define DO_56(MACRO, ...) \ MACRO(56, __VA_ARGS__) \ DO_55(MACRO, __VA_ARGS__) #define DO_57(MACRO, ...) \ MACRO(57, __VA_ARGS__) \ DO_56(MACRO, __VA_ARGS__) #define DO_58(MACRO, ...) \ MACRO(58, __VA_ARGS__) \ DO_57(MACRO, __VA_ARGS__) #define DO_59(MACRO, ...) \ MACRO(59, __VA_ARGS__) \ DO_58(MACRO, __VA_ARGS__) #define DO_60(MACRO, ...) \ MACRO(60, __VA_ARGS__) \ DO_59(MACRO, __VA_ARGS__) #define DO_61(MACRO, ...) \ MACRO(61, __VA_ARGS__) \ DO_60(MACRO, __VA_ARGS__) #define DO_62(MACRO, ...) \ MACRO(62, __VA_ARGS__) \ DO_61(MACRO, __VA_ARGS__) #define DO_63(MACRO, ...) \ MACRO(63, __VA_ARGS__) \ DO_62(MACRO, __VA_ARGS__) #define DO_64(MACRO, ...) \ MACRO(64, __VA_ARGS__) \ DO_63(MACRO, __VA_ARGS__) #define DO_65(MACRO, ...) \ MACRO(65, __VA_ARGS__) \ DO_64(MACRO, __VA_ARGS__) #define DO_66(MACRO, ...) \ MACRO(66, __VA_ARGS__) \ DO_65(MACRO, __VA_ARGS__) #define DO_67(MACRO, ...) \ MACRO(67, __VA_ARGS__) \ DO_66(MACRO, __VA_ARGS__) #define DO_68(MACRO, ...) \ MACRO(68, __VA_ARGS__) \ DO_67(MACRO, __VA_ARGS__) #define DO_69(MACRO, ...) \ MACRO(69, __VA_ARGS__) \ DO_68(MACRO, __VA_ARGS__) #define DO_70(MACRO, ...) \ MACRO(70, __VA_ARGS__) \ DO_69(MACRO, __VA_ARGS__) #define DO_71(MACRO, ...) \ MACRO(71, __VA_ARGS__) \ DO_70(MACRO, __VA_ARGS__) #define DO_72(MACRO, ...) \ MACRO(72, __VA_ARGS__) \ DO_71(MACRO, __VA_ARGS__) #define DO_73(MACRO, ...) \ MACRO(73, __VA_ARGS__) \ DO_72(MACRO, __VA_ARGS__) #define DO_74(MACRO, ...) \ MACRO(74, __VA_ARGS__) \ DO_73(MACRO, __VA_ARGS__) #define DO_75(MACRO, ...) \ MACRO(75, __VA_ARGS__) \ DO_74(MACRO, __VA_ARGS__) #define DO_76(MACRO, ...) \ MACRO(76, __VA_ARGS__) \ DO_75(MACRO, __VA_ARGS__) #define DO_77(MACRO, ...) \ MACRO(77, __VA_ARGS__) \ DO_76(MACRO, __VA_ARGS__) #define DO_78(MACRO, ...) \ MACRO(78, __VA_ARGS__) \ DO_77(MACRO, __VA_ARGS__) #define DO_79(MACRO, ...) \ MACRO(79, __VA_ARGS__) \ DO_78(MACRO, __VA_ARGS__) #define DO_80(MACRO, ...) \ MACRO(80, __VA_ARGS__) \ DO_79(MACRO, __VA_ARGS__) #define DO_81(MACRO, ...) \ MACRO(81, __VA_ARGS__) \ DO_80(MACRO, __VA_ARGS__) #define DO_82(MACRO, ...) \ MACRO(82, __VA_ARGS__) \ DO_81(MACRO, __VA_ARGS__) #define DO_83(MACRO, ...) \ MACRO(83, __VA_ARGS__) \ DO_82(MACRO, __VA_ARGS__) #define DO_84(MACRO, ...) \ MACRO(84, __VA_ARGS__) \ DO_83(MACRO, __VA_ARGS__) #define DO_85(MACRO, ...) \ MACRO(85, __VA_ARGS__) \ DO_84(MACRO, __VA_ARGS__) #define DO_86(MACRO, ...) \ MACRO(86, __VA_ARGS__) \ DO_85(MACRO, __VA_ARGS__) #define DO_87(MACRO, ...) \ MACRO(87, __VA_ARGS__) \ DO_86(MACRO, __VA_ARGS__) #define DO_88(MACRO, ...) \ MACRO(88, __VA_ARGS__) \ DO_87(MACRO, __VA_ARGS__) #define DO_89(MACRO, ...) \ MACRO(89, __VA_ARGS__) \ DO_88(MACRO, __VA_ARGS__) #define DO_90(MACRO, ...) \ MACRO(90, __VA_ARGS__) \ DO_89(MACRO, __VA_ARGS__) #define DO_91(MACRO, ...) \ MACRO(91, __VA_ARGS__) \ DO_90(MACRO, __VA_ARGS__) #define DO_92(MACRO, ...) \ MACRO(92, __VA_ARGS__) \ DO_91(MACRO, __VA_ARGS__) #define DO_93(MACRO, ...) \ MACRO(93, __VA_ARGS__) \ DO_92(MACRO, __VA_ARGS__) #define DO_94(MACRO, ...) \ MACRO(94, __VA_ARGS__) \ DO_93(MACRO, __VA_ARGS__) #define DO_95(MACRO, ...) \ MACRO(95, __VA_ARGS__) \ DO_94(MACRO, __VA_ARGS__) #define DO_96(MACRO, ...) \ MACRO(96, __VA_ARGS__) \ DO_95(MACRO, __VA_ARGS__) #define DO_97(MACRO, ...) \ MACRO(97, __VA_ARGS__) \ DO_96(MACRO, __VA_ARGS__) #define DO_98(MACRO, ...) \ MACRO(98, __VA_ARGS__) \ DO_97(MACRO, __VA_ARGS__) #define DO_99(MACRO, ...) \ MACRO(99, __VA_ARGS__) \ DO_98(MACRO, __VA_ARGS__) #define DO_100(MACRO, ...) \ MACRO(100, __VA_ARGS__) \ DO_99(MACRO, __VA_ARGS__) #define DO_101(MACRO, ...) \ MACRO(101, __VA_ARGS__) \ DO_100(MACRO, __VA_ARGS__) #define DO_102(MACRO, ...) \ MACRO(102, __VA_ARGS__) \ DO_101(MACRO, __VA_ARGS__) #define DO_103(MACRO, ...) \ MACRO(103, __VA_ARGS__) \ DO_102(MACRO, __VA_ARGS__) #define DO_104(MACRO, ...) \ MACRO(104, __VA_ARGS__) \ DO_103(MACRO, __VA_ARGS__) #define DO_105(MACRO, ...) \ MACRO(105, __VA_ARGS__) \ DO_104(MACRO, __VA_ARGS__) #define DO_106(MACRO, ...) \ MACRO(106, __VA_ARGS__) \ DO_105(MACRO, __VA_ARGS__) #define DO_107(MACRO, ...) \ MACRO(107, __VA_ARGS__) \ DO_106(MACRO, __VA_ARGS__) #define DO_108(MACRO, ...) \ MACRO(108, __VA_ARGS__) \ DO_107(MACRO, __VA_ARGS__) #define DO_109(MACRO, ...) \ MACRO(109, __VA_ARGS__) \ DO_108(MACRO, __VA_ARGS__) #define DO_110(MACRO, ...) \ MACRO(110, __VA_ARGS__) \ DO_109(MACRO, __VA_ARGS__) #define DO_111(MACRO, ...) \ MACRO(111, __VA_ARGS__) \ DO_110(MACRO, __VA_ARGS__) #define DO_112(MACRO, ...) \ MACRO(112, __VA_ARGS__) \ DO_111(MACRO, __VA_ARGS__) #define DO_113(MACRO, ...) \ MACRO(113, __VA_ARGS__) \ DO_112(MACRO, __VA_ARGS__) #define DO_114(MACRO, ...) \ MACRO(114, __VA_ARGS__) \ DO_113(MACRO, __VA_ARGS__) #define DO_115(MACRO, ...) \ MACRO(115, __VA_ARGS__) \ DO_114(MACRO, __VA_ARGS__) #define DO_116(MACRO, ...) \ MACRO(116, __VA_ARGS__) \ DO_115(MACRO, __VA_ARGS__) #define DO_117(MACRO, ...) \ MACRO(117, __VA_ARGS__) \ DO_116(MACRO, __VA_ARGS__) #define DO_118(MACRO, ...) \ MACRO(118, __VA_ARGS__) \ DO_117(MACRO, __VA_ARGS__) #define DO_119(MACRO, ...) \ MACRO(119, __VA_ARGS__) \ DO_118(MACRO, __VA_ARGS__) #define DO_120(MACRO, ...) \ MACRO(120, __VA_ARGS__) \ DO_119(MACRO, __VA_ARGS__) #define DO_121(MACRO, ...) \ MACRO(121, __VA_ARGS__) \ DO_120(MACRO, __VA_ARGS__) #define DO_122(MACRO, ...) \ MACRO(122, __VA_ARGS__) \ DO_121(MACRO, __VA_ARGS__) #define DO_123(MACRO, ...) \ MACRO(123, __VA_ARGS__) \ DO_122(MACRO, __VA_ARGS__) #define DO_124(MACRO, ...) \ MACRO(124, __VA_ARGS__) \ DO_123(MACRO, __VA_ARGS__) #define DO_125(MACRO, ...) \ MACRO(125, __VA_ARGS__) \ DO_124(MACRO, __VA_ARGS__) #define DO_126(MACRO, ...) \ MACRO(126, __VA_ARGS__) \ DO_125(MACRO, __VA_ARGS__) #define DO_127(MACRO, ...) \ MACRO(127, __VA_ARGS__) \ DO_126(MACRO, __VA_ARGS__) #define DO_128(MACRO, ...) \ MACRO(128, __VA_ARGS__) \ DO_127(MACRO, __VA_ARGS__) #define DO_129(MACRO, ...) \ MACRO(129, __VA_ARGS__) \ DO_128(MACRO, __VA_ARGS__) #define DO_130(MACRO, ...) \ MACRO(130, __VA_ARGS__) \ DO_129(MACRO, __VA_ARGS__) #define DO_131(MACRO, ...) \ MACRO(131, __VA_ARGS__) \ DO_130(MACRO, __VA_ARGS__) #define DO_132(MACRO, ...) \ MACRO(132, __VA_ARGS__) \ DO_131(MACRO, __VA_ARGS__) #define DO_133(MACRO, ...) \ MACRO(133, __VA_ARGS__) \ DO_132(MACRO, __VA_ARGS__) #define DO_134(MACRO, ...) \ MACRO(134, __VA_ARGS__) \ DO_133(MACRO, __VA_ARGS__) #define DO_135(MACRO, ...) \ MACRO(135, __VA_ARGS__) \ DO_134(MACRO, __VA_ARGS__) #define DO_136(MACRO, ...) \ MACRO(136, __VA_ARGS__) \ DO_135(MACRO, __VA_ARGS__) #define DO_137(MACRO, ...) \ MACRO(137, __VA_ARGS__) \ DO_136(MACRO, __VA_ARGS__) #define DO_138(MACRO, ...) \ MACRO(138, __VA_ARGS__) \ DO_137(MACRO, __VA_ARGS__) #define DO_139(MACRO, ...) \ MACRO(139, __VA_ARGS__) \ DO_138(MACRO, __VA_ARGS__) #define DO_140(MACRO, ...) \ MACRO(140, __VA_ARGS__) \ DO_139(MACRO, __VA_ARGS__) #define DO_141(MACRO, ...) \ MACRO(141, __VA_ARGS__) \ DO_140(MACRO, __VA_ARGS__) #define DO_142(MACRO, ...) \ MACRO(142, __VA_ARGS__) \ DO_141(MACRO, __VA_ARGS__) #define DO_143(MACRO, ...) \ MACRO(143, __VA_ARGS__) \ DO_142(MACRO, __VA_ARGS__) #define DO_144(MACRO, ...) \ MACRO(144, __VA_ARGS__) \ DO_143(MACRO, __VA_ARGS__) #define DO_145(MACRO, ...) \ MACRO(145, __VA_ARGS__) \ DO_144(MACRO, __VA_ARGS__) #define DO_146(MACRO, ...) \ MACRO(146, __VA_ARGS__) \ DO_145(MACRO, __VA_ARGS__) #define DO_147(MACRO, ...) \ MACRO(147, __VA_ARGS__) \ DO_146(MACRO, __VA_ARGS__) #define DO_148(MACRO, ...) \ MACRO(148, __VA_ARGS__) \ DO_147(MACRO, __VA_ARGS__) #define DO_149(MACRO, ...) \ MACRO(149, __VA_ARGS__) \ DO_148(MACRO, __VA_ARGS__) #define DO_150(MACRO, ...) \ MACRO(150, __VA_ARGS__) \ DO_149(MACRO, __VA_ARGS__) #define DO_151(MACRO, ...) \ MACRO(151, __VA_ARGS__) \ DO_150(MACRO, __VA_ARGS__) #define DO_152(MACRO, ...) \ MACRO(152, __VA_ARGS__) \ DO_151(MACRO, __VA_ARGS__) #define DO_153(MACRO, ...) \ MACRO(153, __VA_ARGS__) \ DO_152(MACRO, __VA_ARGS__) #define DO_154(MACRO, ...) \ MACRO(154, __VA_ARGS__) \ DO_153(MACRO, __VA_ARGS__) #define DO_155(MACRO, ...) \ MACRO(155, __VA_ARGS__) \ DO_154(MACRO, __VA_ARGS__) #define DO_156(MACRO, ...) \ MACRO(156, __VA_ARGS__) \ DO_155(MACRO, __VA_ARGS__) #define DO_157(MACRO, ...) \ MACRO(157, __VA_ARGS__) \ DO_156(MACRO, __VA_ARGS__) #define DO_158(MACRO, ...) \ MACRO(158, __VA_ARGS__) \ DO_157(MACRO, __VA_ARGS__) #define DO_159(MACRO, ...) \ MACRO(159, __VA_ARGS__) \ DO_158(MACRO, __VA_ARGS__) #define DO_160(MACRO, ...) \ MACRO(160, __VA_ARGS__) \ DO_159(MACRO, __VA_ARGS__) #define DO_161(MACRO, ...) \ MACRO(161, __VA_ARGS__) \ DO_160(MACRO, __VA_ARGS__) #define DO_162(MACRO, ...) \ MACRO(162, __VA_ARGS__) \ DO_161(MACRO, __VA_ARGS__) #define DO_163(MACRO, ...) \ MACRO(163, __VA_ARGS__) \ DO_162(MACRO, __VA_ARGS__) #define DO_164(MACRO, ...) \ MACRO(164, __VA_ARGS__) \ DO_163(MACRO, __VA_ARGS__) #define DO_165(MACRO, ...) \ MACRO(165, __VA_ARGS__) \ DO_164(MACRO, __VA_ARGS__) #define DO_166(MACRO, ...) \ MACRO(166, __VA_ARGS__) \ DO_165(MACRO, __VA_ARGS__) #define DO_167(MACRO, ...) \ MACRO(167, __VA_ARGS__) \ DO_166(MACRO, __VA_ARGS__) #define DO_168(MACRO, ...) \ MACRO(168, __VA_ARGS__) \ DO_167(MACRO, __VA_ARGS__) #define DO_169(MACRO, ...) \ MACRO(169, __VA_ARGS__) \ DO_168(MACRO, __VA_ARGS__) #define DO_170(MACRO, ...) \ MACRO(170, __VA_ARGS__) \ DO_169(MACRO, __VA_ARGS__) #define DO_171(MACRO, ...) \ MACRO(171, __VA_ARGS__) \ DO_170(MACRO, __VA_ARGS__) #define DO_172(MACRO, ...) \ MACRO(172, __VA_ARGS__) \ DO_171(MACRO, __VA_ARGS__) #define DO_173(MACRO, ...) \ MACRO(173, __VA_ARGS__) \ DO_172(MACRO, __VA_ARGS__) #define DO_174(MACRO, ...) \ MACRO(174, __VA_ARGS__) \ DO_173(MACRO, __VA_ARGS__) #define DO_175(MACRO, ...) \ MACRO(175, __VA_ARGS__) \ DO_174(MACRO, __VA_ARGS__) #define DO_176(MACRO, ...) \ MACRO(176, __VA_ARGS__) \ DO_175(MACRO, __VA_ARGS__) #define DO_177(MACRO, ...) \ MACRO(177, __VA_ARGS__) \ DO_176(MACRO, __VA_ARGS__) #define DO_178(MACRO, ...) \ MACRO(178, __VA_ARGS__) \ DO_177(MACRO, __VA_ARGS__) #define DO_179(MACRO, ...) \ MACRO(179, __VA_ARGS__) \ DO_178(MACRO, __VA_ARGS__) #define DO_180(MACRO, ...) \ MACRO(180, __VA_ARGS__) \ DO_179(MACRO, __VA_ARGS__) #define DO_181(MACRO, ...) \ MACRO(181, __VA_ARGS__) \ DO_180(MACRO, __VA_ARGS__) #define DO_182(MACRO, ...) \ MACRO(182, __VA_ARGS__) \ DO_181(MACRO, __VA_ARGS__) #define DO_183(MACRO, ...) \ MACRO(183, __VA_ARGS__) \ DO_182(MACRO, __VA_ARGS__) #define DO_184(MACRO, ...) \ MACRO(184, __VA_ARGS__) \ DO_183(MACRO, __VA_ARGS__) #define DO_185(MACRO, ...) \ MACRO(185, __VA_ARGS__) \ DO_184(MACRO, __VA_ARGS__) #define DO_186(MACRO, ...) \ MACRO(186, __VA_ARGS__) \ DO_185(MACRO, __VA_ARGS__) #define DO_187(MACRO, ...) \ MACRO(187, __VA_ARGS__) \ DO_186(MACRO, __VA_ARGS__) #define DO_188(MACRO, ...) \ MACRO(188, __VA_ARGS__) \ DO_187(MACRO, __VA_ARGS__) #define DO_189(MACRO, ...) \ MACRO(189, __VA_ARGS__) \ DO_188(MACRO, __VA_ARGS__) #define DO_190(MACRO, ...) \ MACRO(190, __VA_ARGS__) \ DO_189(MACRO, __VA_ARGS__) #define DO_191(MACRO, ...) \ MACRO(191, __VA_ARGS__) \ DO_190(MACRO, __VA_ARGS__) #define DO_192(MACRO, ...) \ MACRO(192, __VA_ARGS__) \ DO_191(MACRO, __VA_ARGS__) #define DO_193(MACRO, ...) \ MACRO(193, __VA_ARGS__) \ DO_192(MACRO, __VA_ARGS__) #define DO_194(MACRO, ...) \ MACRO(194, __VA_ARGS__) \ DO_193(MACRO, __VA_ARGS__) #define DO_195(MACRO, ...) \ MACRO(195, __VA_ARGS__) \ DO_194(MACRO, __VA_ARGS__) #define DO_196(MACRO, ...) \ MACRO(196, __VA_ARGS__) \ DO_195(MACRO, __VA_ARGS__) #define DO_197(MACRO, ...) \ MACRO(197, __VA_ARGS__) \ DO_196(MACRO, __VA_ARGS__) #define DO_198(MACRO, ...) \ MACRO(198, __VA_ARGS__) \ DO_197(MACRO, __VA_ARGS__) #define DO_199(MACRO, ...) \ MACRO(199, __VA_ARGS__) \ DO_198(MACRO, __VA_ARGS__) #define DO_200(MACRO, ...) \ MACRO(200, __VA_ARGS__) \ DO_199(MACRO, __VA_ARGS__) #define DO_201(MACRO, ...) \ MACRO(201, __VA_ARGS__) \ DO_200(MACRO, __VA_ARGS__) #define DO_202(MACRO, ...) \ MACRO(202, __VA_ARGS__) \ DO_201(MACRO, __VA_ARGS__) #define DO_203(MACRO, ...) \ MACRO(203, __VA_ARGS__) \ DO_202(MACRO, __VA_ARGS__) #define DO_204(MACRO, ...) \ MACRO(204, __VA_ARGS__) \ DO_203(MACRO, __VA_ARGS__) #define DO_205(MACRO, ...) \ MACRO(205, __VA_ARGS__) \ DO_204(MACRO, __VA_ARGS__) #define DO_206(MACRO, ...) \ MACRO(206, __VA_ARGS__) \ DO_205(MACRO, __VA_ARGS__) #define DO_207(MACRO, ...) \ MACRO(207, __VA_ARGS__) \ DO_206(MACRO, __VA_ARGS__) #define DO_208(MACRO, ...) \ MACRO(208, __VA_ARGS__) \ DO_207(MACRO, __VA_ARGS__) #define DO_209(MACRO, ...) \ MACRO(209, __VA_ARGS__) \ DO_208(MACRO, __VA_ARGS__) #define DO_210(MACRO, ...) \ MACRO(210, __VA_ARGS__) \ DO_209(MACRO, __VA_ARGS__) #define DO_211(MACRO, ...) \ MACRO(211, __VA_ARGS__) \ DO_210(MACRO, __VA_ARGS__) #define DO_212(MACRO, ...) \ MACRO(212, __VA_ARGS__) \ DO_211(MACRO, __VA_ARGS__) #define DO_213(MACRO, ...) \ MACRO(213, __VA_ARGS__) \ DO_212(MACRO, __VA_ARGS__) #define DO_214(MACRO, ...) \ MACRO(214, __VA_ARGS__) \ DO_213(MACRO, __VA_ARGS__) #define DO_215(MACRO, ...) \ MACRO(215, __VA_ARGS__) \ DO_214(MACRO, __VA_ARGS__) #define DO_216(MACRO, ...) \ MACRO(216, __VA_ARGS__) \ DO_215(MACRO, __VA_ARGS__) #define DO_217(MACRO, ...) \ MACRO(217, __VA_ARGS__) \ DO_216(MACRO, __VA_ARGS__) #define DO_218(MACRO, ...) \ MACRO(218, __VA_ARGS__) \ DO_217(MACRO, __VA_ARGS__) #define DO_219(MACRO, ...) \ MACRO(219, __VA_ARGS__) \ DO_218(MACRO, __VA_ARGS__) #define DO_220(MACRO, ...) \ MACRO(220, __VA_ARGS__) \ DO_219(MACRO, __VA_ARGS__) #define DO_221(MACRO, ...) \ MACRO(221, __VA_ARGS__) \ DO_220(MACRO, __VA_ARGS__) #define DO_222(MACRO, ...) \ MACRO(222, __VA_ARGS__) \ DO_221(MACRO, __VA_ARGS__) #define DO_223(MACRO, ...) \ MACRO(223, __VA_ARGS__) \ DO_222(MACRO, __VA_ARGS__) #define DO_224(MACRO, ...) \ MACRO(224, __VA_ARGS__) \ DO_223(MACRO, __VA_ARGS__) #define DO_225(MACRO, ...) \ MACRO(225, __VA_ARGS__) \ DO_224(MACRO, __VA_ARGS__) #define DO_226(MACRO, ...) \ MACRO(226, __VA_ARGS__) \ DO_225(MACRO, __VA_ARGS__) #define DO_227(MACRO, ...) \ MACRO(227, __VA_ARGS__) \ DO_226(MACRO, __VA_ARGS__) #define DO_228(MACRO, ...) \ MACRO(228, __VA_ARGS__) \ DO_227(MACRO, __VA_ARGS__) #define DO_229(MACRO, ...) \ MACRO(229, __VA_ARGS__) \ DO_228(MACRO, __VA_ARGS__) #define DO_230(MACRO, ...) \ MACRO(230, __VA_ARGS__) \ DO_229(MACRO, __VA_ARGS__) #define DO_231(MACRO, ...) \ MACRO(231, __VA_ARGS__) \ DO_230(MACRO, __VA_ARGS__) #define DO_232(MACRO, ...) \ MACRO(232, __VA_ARGS__) \ DO_231(MACRO, __VA_ARGS__) #define DO_233(MACRO, ...) \ MACRO(233, __VA_ARGS__) \ DO_232(MACRO, __VA_ARGS__) #define DO_234(MACRO, ...) \ MACRO(234, __VA_ARGS__) \ DO_233(MACRO, __VA_ARGS__) #define DO_235(MACRO, ...) \ MACRO(235, __VA_ARGS__) \ DO_234(MACRO, __VA_ARGS__) #define DO_236(MACRO, ...) \ MACRO(236, __VA_ARGS__) \ DO_235(MACRO, __VA_ARGS__) #define DO_237(MACRO, ...) \ MACRO(237, __VA_ARGS__) \ DO_236(MACRO, __VA_ARGS__) #define DO_238(MACRO, ...) \ MACRO(238, __VA_ARGS__) \ DO_237(MACRO, __VA_ARGS__) #define DO_239(MACRO, ...) \ MACRO(239, __VA_ARGS__) \ DO_238(MACRO, __VA_ARGS__) #define DO_240(MACRO, ...) \ MACRO(240, __VA_ARGS__) \ DO_239(MACRO, __VA_ARGS__) #define DO_241(MACRO, ...) \ MACRO(241, __VA_ARGS__) \ DO_240(MACRO, __VA_ARGS__) #define DO_242(MACRO, ...) \ MACRO(242, __VA_ARGS__) \ DO_241(MACRO, __VA_ARGS__) #define DO_243(MACRO, ...) \ MACRO(243, __VA_ARGS__) \ DO_242(MACRO, __VA_ARGS__) #define DO_244(MACRO, ...) \ MACRO(244, __VA_ARGS__) \ DO_243(MACRO, __VA_ARGS__) #define DO_245(MACRO, ...) \ MACRO(245, __VA_ARGS__) \ DO_244(MACRO, __VA_ARGS__) #define DO_246(MACRO, ...) \ MACRO(246, __VA_ARGS__) \ DO_245(MACRO, __VA_ARGS__) #define DO_247(MACRO, ...) \ MACRO(247, __VA_ARGS__) \ DO_246(MACRO, __VA_ARGS__) #define DO_248(MACRO, ...) \ MACRO(248, __VA_ARGS__) \ DO_247(MACRO, __VA_ARGS__) #define DO_249(MACRO, ...) \ MACRO(249, __VA_ARGS__) \ DO_248(MACRO, __VA_ARGS__) #define DO_250(MACRO, ...) \ MACRO(250, __VA_ARGS__) \ DO_249(MACRO, __VA_ARGS__) #define DO_251(MACRO, ...) \ MACRO(251, __VA_ARGS__) \ DO_250(MACRO, __VA_ARGS__) #define DO_252(MACRO, ...) \ MACRO(252, __VA_ARGS__) \ DO_251(MACRO, __VA_ARGS__) #define DO_253(MACRO, ...) \ MACRO(253, __VA_ARGS__) \ DO_252(MACRO, __VA_ARGS__) #define DO_254(MACRO, ...) \ MACRO(254, __VA_ARGS__) \ DO_253(MACRO, __VA_ARGS__) #define DO_255(MACRO, ...) \ MACRO(255, __VA_ARGS__) \ DO_254(MACRO, __VA_ARGS__) #define DO_256(MACRO, ...) \ MACRO(256, __VA_ARGS__) \ DO_255(MACRO, __VA_ARGS__) #define DO_257(MACRO, ...) \ MACRO(257, __VA_ARGS__) \ DO_256(MACRO, __VA_ARGS__) #define DO_258(MACRO, ...) \ MACRO(258, __VA_ARGS__) \ DO_257(MACRO, __VA_ARGS__) #define DO_259(MACRO, ...) \ MACRO(259, __VA_ARGS__) \ DO_258(MACRO, __VA_ARGS__) #define DO_260(MACRO, ...) \ MACRO(260, __VA_ARGS__) \ DO_259(MACRO, __VA_ARGS__) #define DO_261(MACRO, ...) \ MACRO(261, __VA_ARGS__) \ DO_260(MACRO, __VA_ARGS__) #define DO_262(MACRO, ...) \ MACRO(262, __VA_ARGS__) \ DO_261(MACRO, __VA_ARGS__) #define DO_263(MACRO, ...) \ MACRO(263, __VA_ARGS__) \ DO_262(MACRO, __VA_ARGS__) #define DO_264(MACRO, ...) \ MACRO(264, __VA_ARGS__) \ DO_263(MACRO, __VA_ARGS__) #define DO_265(MACRO, ...) \ MACRO(265, __VA_ARGS__) \ DO_264(MACRO, __VA_ARGS__) #define DO_266(MACRO, ...) \ MACRO(266, __VA_ARGS__) \ DO_265(MACRO, __VA_ARGS__) #define DO_267(MACRO, ...) \ MACRO(267, __VA_ARGS__) \ DO_266(MACRO, __VA_ARGS__) #define DO_268(MACRO, ...) \ MACRO(268, __VA_ARGS__) \ DO_267(MACRO, __VA_ARGS__) #define DO_269(MACRO, ...) \ MACRO(269, __VA_ARGS__) \ DO_268(MACRO, __VA_ARGS__) #define DO_270(MACRO, ...) \ MACRO(270, __VA_ARGS__) \ DO_269(MACRO, __VA_ARGS__) #define DO_271(MACRO, ...) \ MACRO(271, __VA_ARGS__) \ DO_270(MACRO, __VA_ARGS__) #define DO_272(MACRO, ...) \ MACRO(272, __VA_ARGS__) \ DO_271(MACRO, __VA_ARGS__) #define DO_273(MACRO, ...) \ MACRO(273, __VA_ARGS__) \ DO_272(MACRO, __VA_ARGS__) #define DO_274(MACRO, ...) \ MACRO(274, __VA_ARGS__) \ DO_273(MACRO, __VA_ARGS__) #define DO_275(MACRO, ...) \ MACRO(275, __VA_ARGS__) \ DO_274(MACRO, __VA_ARGS__) #define DO_276(MACRO, ...) \ MACRO(276, __VA_ARGS__) \ DO_275(MACRO, __VA_ARGS__) #define DO_277(MACRO, ...) \ MACRO(277, __VA_ARGS__) \ DO_276(MACRO, __VA_ARGS__) #define DO_278(MACRO, ...) \ MACRO(278, __VA_ARGS__) \ DO_277(MACRO, __VA_ARGS__) #define DO_279(MACRO, ...) \ MACRO(279, __VA_ARGS__) \ DO_278(MACRO, __VA_ARGS__) #define DO_280(MACRO, ...) \ MACRO(280, __VA_ARGS__) \ DO_279(MACRO, __VA_ARGS__) #define DO_281(MACRO, ...) \ MACRO(281, __VA_ARGS__) \ DO_280(MACRO, __VA_ARGS__) #define DO_282(MACRO, ...) \ MACRO(282, __VA_ARGS__) \ DO_281(MACRO, __VA_ARGS__) #define DO_283(MACRO, ...) \ MACRO(283, __VA_ARGS__) \ DO_282(MACRO, __VA_ARGS__) #define DO_284(MACRO, ...) \ MACRO(284, __VA_ARGS__) \ DO_283(MACRO, __VA_ARGS__) #define DO_285(MACRO, ...) \ MACRO(285, __VA_ARGS__) \ DO_284(MACRO, __VA_ARGS__) #define DO_286(MACRO, ...) \ MACRO(286, __VA_ARGS__) \ DO_285(MACRO, __VA_ARGS__) #define DO_287(MACRO, ...) \ MACRO(287, __VA_ARGS__) \ DO_286(MACRO, __VA_ARGS__) #define DO_288(MACRO, ...) \ MACRO(288, __VA_ARGS__) \ DO_287(MACRO, __VA_ARGS__) #define DO_289(MACRO, ...) \ MACRO(289, __VA_ARGS__) \ DO_288(MACRO, __VA_ARGS__) #define DO_290(MACRO, ...) \ MACRO(290, __VA_ARGS__) \ DO_289(MACRO, __VA_ARGS__) #define DO_291(MACRO, ...) \ MACRO(291, __VA_ARGS__) \ DO_290(MACRO, __VA_ARGS__) #define DO_292(MACRO, ...) \ MACRO(292, __VA_ARGS__) \ DO_291(MACRO, __VA_ARGS__) #define DO_293(MACRO, ...) \ MACRO(293, __VA_ARGS__) \ DO_292(MACRO, __VA_ARGS__) #define DO_294(MACRO, ...) \ MACRO(294, __VA_ARGS__) \ DO_293(MACRO, __VA_ARGS__) #define DO_295(MACRO, ...) \ MACRO(295, __VA_ARGS__) \ DO_294(MACRO, __VA_ARGS__) #define DO_296(MACRO, ...) \ MACRO(296, __VA_ARGS__) \ DO_295(MACRO, __VA_ARGS__) #define DO_297(MACRO, ...) \ MACRO(297, __VA_ARGS__) \ DO_296(MACRO, __VA_ARGS__) #define DO_298(MACRO, ...) \ MACRO(298, __VA_ARGS__) \ DO_297(MACRO, __VA_ARGS__) #define DO_299(MACRO, ...) \ MACRO(299, __VA_ARGS__) \ DO_298(MACRO, __VA_ARGS__) #define DO_300(MACRO, ...) \ MACRO(300, __VA_ARGS__) \ DO_299(MACRO, __VA_ARGS__) #define DO_301(MACRO, ...) \ MACRO(301, __VA_ARGS__) \ DO_300(MACRO, __VA_ARGS__) #define DO_302(MACRO, ...) \ MACRO(302, __VA_ARGS__) \ DO_301(MACRO, __VA_ARGS__) #define DO_303(MACRO, ...) \ MACRO(303, __VA_ARGS__) \ DO_302(MACRO, __VA_ARGS__) #define DO_304(MACRO, ...) \ MACRO(304, __VA_ARGS__) \ DO_303(MACRO, __VA_ARGS__) #define DO_305(MACRO, ...) \ MACRO(305, __VA_ARGS__) \ DO_304(MACRO, __VA_ARGS__) #define DO_306(MACRO, ...) \ MACRO(306, __VA_ARGS__) \ DO_305(MACRO, __VA_ARGS__) #define DO_307(MACRO, ...) \ MACRO(307, __VA_ARGS__) \ DO_306(MACRO, __VA_ARGS__) #define DO_308(MACRO, ...) \ MACRO(308, __VA_ARGS__) \ DO_307(MACRO, __VA_ARGS__) #define DO_309(MACRO, ...) \ MACRO(309, __VA_ARGS__) \ DO_308(MACRO, __VA_ARGS__) #define DO_310(MACRO, ...) \ MACRO(310, __VA_ARGS__) \ DO_309(MACRO, __VA_ARGS__) #define DO_311(MACRO, ...) \ MACRO(311, __VA_ARGS__) \ DO_310(MACRO, __VA_ARGS__) #define DO_312(MACRO, ...) \ MACRO(312, __VA_ARGS__) \ DO_311(MACRO, __VA_ARGS__) #define DO_313(MACRO, ...) \ MACRO(313, __VA_ARGS__) \ DO_312(MACRO, __VA_ARGS__) #define DO_314(MACRO, ...) \ MACRO(314, __VA_ARGS__) \ DO_313(MACRO, __VA_ARGS__) #define DO_315(MACRO, ...) \ MACRO(315, __VA_ARGS__) \ DO_314(MACRO, __VA_ARGS__) #define DO_316(MACRO, ...) \ MACRO(316, __VA_ARGS__) \ DO_315(MACRO, __VA_ARGS__) #define DO_317(MACRO, ...) \ MACRO(317, __VA_ARGS__) \ DO_316(MACRO, __VA_ARGS__) #define DO_318(MACRO, ...) \ MACRO(318, __VA_ARGS__) \ DO_317(MACRO, __VA_ARGS__) #define DO_319(MACRO, ...) \ MACRO(319, __VA_ARGS__) \ DO_318(MACRO, __VA_ARGS__) #define DO_320(MACRO, ...) \ MACRO(320, __VA_ARGS__) \ DO_319(MACRO, __VA_ARGS__) #define DO_321(MACRO, ...) \ MACRO(321, __VA_ARGS__) \ DO_320(MACRO, __VA_ARGS__) #define DO_322(MACRO, ...) \ MACRO(322, __VA_ARGS__) \ DO_321(MACRO, __VA_ARGS__) #define DO_323(MACRO, ...) \ MACRO(323, __VA_ARGS__) \ DO_322(MACRO, __VA_ARGS__) #define DO_324(MACRO, ...) \ MACRO(324, __VA_ARGS__) \ DO_323(MACRO, __VA_ARGS__) #define DO_325(MACRO, ...) \ MACRO(325, __VA_ARGS__) \ DO_324(MACRO, __VA_ARGS__) #define DO_326(MACRO, ...) \ MACRO(326, __VA_ARGS__) \ DO_325(MACRO, __VA_ARGS__) #define DO_327(MACRO, ...) \ MACRO(327, __VA_ARGS__) \ DO_326(MACRO, __VA_ARGS__) #define DO_328(MACRO, ...) \ MACRO(328, __VA_ARGS__) \ DO_327(MACRO, __VA_ARGS__) #define DO_329(MACRO, ...) \ MACRO(329, __VA_ARGS__) \ DO_328(MACRO, __VA_ARGS__) #define DO_330(MACRO, ...) \ MACRO(330, __VA_ARGS__) \ DO_329(MACRO, __VA_ARGS__) #define DO_331(MACRO, ...) \ MACRO(331, __VA_ARGS__) \ DO_330(MACRO, __VA_ARGS__) #define DO_332(MACRO, ...) \ MACRO(332, __VA_ARGS__) \ DO_331(MACRO, __VA_ARGS__) #define DO_333(MACRO, ...) \ MACRO(333, __VA_ARGS__) \ DO_332(MACRO, __VA_ARGS__) #define DO_334(MACRO, ...) \ MACRO(334, __VA_ARGS__) \ DO_333(MACRO, __VA_ARGS__) #define DO_335(MACRO, ...) \ MACRO(335, __VA_ARGS__) \ DO_334(MACRO, __VA_ARGS__) #define DO_336(MACRO, ...) \ MACRO(336, __VA_ARGS__) \ DO_335(MACRO, __VA_ARGS__) #define DO_337(MACRO, ...) \ MACRO(337, __VA_ARGS__) \ DO_336(MACRO, __VA_ARGS__) #define DO_338(MACRO, ...) \ MACRO(338, __VA_ARGS__) \ DO_337(MACRO, __VA_ARGS__) #define DO_339(MACRO, ...) \ MACRO(339, __VA_ARGS__) \ DO_338(MACRO, __VA_ARGS__) #define DO_340(MACRO, ...) \ MACRO(340, __VA_ARGS__) \ DO_339(MACRO, __VA_ARGS__) #define DO_341(MACRO, ...) \ MACRO(341, __VA_ARGS__) \ DO_340(MACRO, __VA_ARGS__) #define DO_342(MACRO, ...) \ MACRO(342, __VA_ARGS__) \ DO_341(MACRO, __VA_ARGS__) #define DO_343(MACRO, ...) \ MACRO(343, __VA_ARGS__) \ DO_342(MACRO, __VA_ARGS__) #define DO_344(MACRO, ...) \ MACRO(344, __VA_ARGS__) \ DO_343(MACRO, __VA_ARGS__) #define DO_345(MACRO, ...) \ MACRO(345, __VA_ARGS__) \ DO_344(MACRO, __VA_ARGS__) #define DO_346(MACRO, ...) \ MACRO(346, __VA_ARGS__) \ DO_345(MACRO, __VA_ARGS__) #define DO_347(MACRO, ...) \ MACRO(347, __VA_ARGS__) \ DO_346(MACRO, __VA_ARGS__) #define DO_348(MACRO, ...) \ MACRO(348, __VA_ARGS__) \ DO_347(MACRO, __VA_ARGS__) #define DO_349(MACRO, ...) \ MACRO(349, __VA_ARGS__) \ DO_348(MACRO, __VA_ARGS__) #define DO_350(MACRO, ...) \ MACRO(350, __VA_ARGS__) \ DO_349(MACRO, __VA_ARGS__) #define DO_351(MACRO, ...) \ MACRO(351, __VA_ARGS__) \ DO_350(MACRO, __VA_ARGS__) #define DO_352(MACRO, ...) \ MACRO(352, __VA_ARGS__) \ DO_351(MACRO, __VA_ARGS__) #define DO_353(MACRO, ...) \ MACRO(353, __VA_ARGS__) \ DO_352(MACRO, __VA_ARGS__) #define DO_354(MACRO, ...) \ MACRO(354, __VA_ARGS__) \ DO_353(MACRO, __VA_ARGS__) #define DO_355(MACRO, ...) \ MACRO(355, __VA_ARGS__) \ DO_354(MACRO, __VA_ARGS__) #define DO_356(MACRO, ...) \ MACRO(356, __VA_ARGS__) \ DO_355(MACRO, __VA_ARGS__) #define DO_357(MACRO, ...) \ MACRO(357, __VA_ARGS__) \ DO_356(MACRO, __VA_ARGS__) #define DO_358(MACRO, ...) \ MACRO(358, __VA_ARGS__) \ DO_357(MACRO, __VA_ARGS__) #define DO_359(MACRO, ...) \ MACRO(359, __VA_ARGS__) \ DO_358(MACRO, __VA_ARGS__) #define DO_360(MACRO, ...) \ MACRO(360, __VA_ARGS__) \ DO_359(MACRO, __VA_ARGS__) #define DO_361(MACRO, ...) \ MACRO(361, __VA_ARGS__) \ DO_360(MACRO, __VA_ARGS__) #define DO_362(MACRO, ...) \ MACRO(362, __VA_ARGS__) \ DO_361(MACRO, __VA_ARGS__) #define DO_363(MACRO, ...) \ MACRO(363, __VA_ARGS__) \ DO_362(MACRO, __VA_ARGS__) #define DO_364(MACRO, ...) \ MACRO(364, __VA_ARGS__) \ DO_363(MACRO, __VA_ARGS__) #define DO_365(MACRO, ...) \ MACRO(365, __VA_ARGS__) \ DO_364(MACRO, __VA_ARGS__) #define DO_366(MACRO, ...) \ MACRO(366, __VA_ARGS__) \ DO_365(MACRO, __VA_ARGS__) #define DO_367(MACRO, ...) \ MACRO(367, __VA_ARGS__) \ DO_366(MACRO, __VA_ARGS__) #define DO_368(MACRO, ...) \ MACRO(368, __VA_ARGS__) \ DO_367(MACRO, __VA_ARGS__) #define DO_369(MACRO, ...) \ MACRO(369, __VA_ARGS__) \ DO_368(MACRO, __VA_ARGS__) #define DO_370(MACRO, ...) \ MACRO(370, __VA_ARGS__) \ DO_369(MACRO, __VA_ARGS__) #define DO_371(MACRO, ...) \ MACRO(371, __VA_ARGS__) \ DO_370(MACRO, __VA_ARGS__) #define DO_372(MACRO, ...) \ MACRO(372, __VA_ARGS__) \ DO_371(MACRO, __VA_ARGS__) #define DO_373(MACRO, ...) \ MACRO(373, __VA_ARGS__) \ DO_372(MACRO, __VA_ARGS__) #define DO_374(MACRO, ...) \ MACRO(374, __VA_ARGS__) \ DO_373(MACRO, __VA_ARGS__) #define DO_375(MACRO, ...) \ MACRO(375, __VA_ARGS__) \ DO_374(MACRO, __VA_ARGS__) #define DO_376(MACRO, ...) \ MACRO(376, __VA_ARGS__) \ DO_375(MACRO, __VA_ARGS__) #define DO_377(MACRO, ...) \ MACRO(377, __VA_ARGS__) \ DO_376(MACRO, __VA_ARGS__) #define DO_378(MACRO, ...) \ MACRO(378, __VA_ARGS__) \ DO_377(MACRO, __VA_ARGS__) #define DO_379(MACRO, ...) \ MACRO(379, __VA_ARGS__) \ DO_378(MACRO, __VA_ARGS__) #define DO_380(MACRO, ...) \ MACRO(380, __VA_ARGS__) \ DO_379(MACRO, __VA_ARGS__) #define DO_381(MACRO, ...) \ MACRO(381, __VA_ARGS__) \ DO_380(MACRO, __VA_ARGS__) #define DO_382(MACRO, ...) \ MACRO(382, __VA_ARGS__) \ DO_381(MACRO, __VA_ARGS__) #define DO_383(MACRO, ...) \ MACRO(383, __VA_ARGS__) \ DO_382(MACRO, __VA_ARGS__) #define DO_384(MACRO, ...) \ MACRO(384, __VA_ARGS__) \ DO_383(MACRO, __VA_ARGS__) #define DO_385(MACRO, ...) \ MACRO(385, __VA_ARGS__) \ DO_384(MACRO, __VA_ARGS__) #define DO_386(MACRO, ...) \ MACRO(386, __VA_ARGS__) \ DO_385(MACRO, __VA_ARGS__) #define DO_387(MACRO, ...) \ MACRO(387, __VA_ARGS__) \ DO_386(MACRO, __VA_ARGS__) #define DO_388(MACRO, ...) \ MACRO(388, __VA_ARGS__) \ DO_387(MACRO, __VA_ARGS__) #define DO_389(MACRO, ...) \ MACRO(389, __VA_ARGS__) \ DO_388(MACRO, __VA_ARGS__) #define DO_390(MACRO, ...) \ MACRO(390, __VA_ARGS__) \ DO_389(MACRO, __VA_ARGS__) #define DO_391(MACRO, ...) \ MACRO(391, __VA_ARGS__) \ DO_390(MACRO, __VA_ARGS__) #define DO_392(MACRO, ...) \ MACRO(392, __VA_ARGS__) \ DO_391(MACRO, __VA_ARGS__) #define DO_393(MACRO, ...) \ MACRO(393, __VA_ARGS__) \ DO_392(MACRO, __VA_ARGS__) #define DO_394(MACRO, ...) \ MACRO(394, __VA_ARGS__) \ DO_393(MACRO, __VA_ARGS__) #define DO_395(MACRO, ...) \ MACRO(395, __VA_ARGS__) \ DO_394(MACRO, __VA_ARGS__) #define DO_396(MACRO, ...) \ MACRO(396, __VA_ARGS__) \ DO_395(MACRO, __VA_ARGS__) #define DO_397(MACRO, ...) \ MACRO(397, __VA_ARGS__) \ DO_396(MACRO, __VA_ARGS__) #define DO_398(MACRO, ...) \ MACRO(398, __VA_ARGS__) \ DO_397(MACRO, __VA_ARGS__) #define DO_399(MACRO, ...) \ MACRO(399, __VA_ARGS__) \ DO_398(MACRO, __VA_ARGS__) #define DO_400(MACRO, ...) \ MACRO(400, __VA_ARGS__) \ DO_399(MACRO, __VA_ARGS__) #define DO_401(MACRO, ...) \ MACRO(401, __VA_ARGS__) \ DO_400(MACRO, __VA_ARGS__) #define DO_402(MACRO, ...) \ MACRO(402, __VA_ARGS__) \ DO_401(MACRO, __VA_ARGS__) #define DO_403(MACRO, ...) \ MACRO(403, __VA_ARGS__) \ DO_402(MACRO, __VA_ARGS__) #define DO_404(MACRO, ...) \ MACRO(404, __VA_ARGS__) \ DO_403(MACRO, __VA_ARGS__) #define DO_405(MACRO, ...) \ MACRO(405, __VA_ARGS__) \ DO_404(MACRO, __VA_ARGS__) #define DO_406(MACRO, ...) \ MACRO(406, __VA_ARGS__) \ DO_405(MACRO, __VA_ARGS__) #define DO_407(MACRO, ...) \ MACRO(407, __VA_ARGS__) \ DO_406(MACRO, __VA_ARGS__) #define DO_408(MACRO, ...) \ MACRO(408, __VA_ARGS__) \ DO_407(MACRO, __VA_ARGS__) #define DO_409(MACRO, ...) \ MACRO(409, __VA_ARGS__) \ DO_408(MACRO, __VA_ARGS__) #define DO_410(MACRO, ...) \ MACRO(410, __VA_ARGS__) \ DO_409(MACRO, __VA_ARGS__) #define DO_411(MACRO, ...) \ MACRO(411, __VA_ARGS__) \ DO_410(MACRO, __VA_ARGS__) #define DO_412(MACRO, ...) \ MACRO(412, __VA_ARGS__) \ DO_411(MACRO, __VA_ARGS__) #define DO_413(MACRO, ...) \ MACRO(413, __VA_ARGS__) \ DO_412(MACRO, __VA_ARGS__) #define DO_414(MACRO, ...) \ MACRO(414, __VA_ARGS__) \ DO_413(MACRO, __VA_ARGS__) #define DO_415(MACRO, ...) \ MACRO(415, __VA_ARGS__) \ DO_414(MACRO, __VA_ARGS__) #define DO_416(MACRO, ...) \ MACRO(416, __VA_ARGS__) \ DO_415(MACRO, __VA_ARGS__) #define DO_417(MACRO, ...) \ MACRO(417, __VA_ARGS__) \ DO_416(MACRO, __VA_ARGS__) #define DO_418(MACRO, ...) \ MACRO(418, __VA_ARGS__) \ DO_417(MACRO, __VA_ARGS__) #define DO_419(MACRO, ...) \ MACRO(419, __VA_ARGS__) \ DO_418(MACRO, __VA_ARGS__) #define DO_420(MACRO, ...) \ MACRO(420, __VA_ARGS__) \ DO_419(MACRO, __VA_ARGS__) #define DO_421(MACRO, ...) \ MACRO(421, __VA_ARGS__) \ DO_420(MACRO, __VA_ARGS__) #define DO_422(MACRO, ...) \ MACRO(422, __VA_ARGS__) \ DO_421(MACRO, __VA_ARGS__) #define DO_423(MACRO, ...) \ MACRO(423, __VA_ARGS__) \ DO_422(MACRO, __VA_ARGS__) #define DO_424(MACRO, ...) \ MACRO(424, __VA_ARGS__) \ DO_423(MACRO, __VA_ARGS__) #define DO_425(MACRO, ...) \ MACRO(425, __VA_ARGS__) \ DO_424(MACRO, __VA_ARGS__) #define DO_426(MACRO, ...) \ MACRO(426, __VA_ARGS__) \ DO_425(MACRO, __VA_ARGS__) #define DO_427(MACRO, ...) \ MACRO(427, __VA_ARGS__) \ DO_426(MACRO, __VA_ARGS__) #define DO_428(MACRO, ...) \ MACRO(428, __VA_ARGS__) \ DO_427(MACRO, __VA_ARGS__) #define DO_429(MACRO, ...) \ MACRO(429, __VA_ARGS__) \ DO_428(MACRO, __VA_ARGS__) #define DO_430(MACRO, ...) \ MACRO(430, __VA_ARGS__) \ DO_429(MACRO, __VA_ARGS__) #define DO_431(MACRO, ...) \ MACRO(431, __VA_ARGS__) \ DO_430(MACRO, __VA_ARGS__) #define DO_432(MACRO, ...) \ MACRO(432, __VA_ARGS__) \ DO_431(MACRO, __VA_ARGS__) #define DO_433(MACRO, ...) \ MACRO(433, __VA_ARGS__) \ DO_432(MACRO, __VA_ARGS__) #define DO_434(MACRO, ...) \ MACRO(434, __VA_ARGS__) \ DO_433(MACRO, __VA_ARGS__) #define DO_435(MACRO, ...) \ MACRO(435, __VA_ARGS__) \ DO_434(MACRO, __VA_ARGS__) #define DO_436(MACRO, ...) \ MACRO(436, __VA_ARGS__) \ DO_435(MACRO, __VA_ARGS__) #define DO_437(MACRO, ...) \ MACRO(437, __VA_ARGS__) \ DO_436(MACRO, __VA_ARGS__) #define DO_438(MACRO, ...) \ MACRO(438, __VA_ARGS__) \ DO_437(MACRO, __VA_ARGS__) #define DO_439(MACRO, ...) \ MACRO(439, __VA_ARGS__) \ DO_438(MACRO, __VA_ARGS__) #define DO_440(MACRO, ...) \ MACRO(440, __VA_ARGS__) \ DO_439(MACRO, __VA_ARGS__) #define DO_441(MACRO, ...) \ MACRO(441, __VA_ARGS__) \ DO_440(MACRO, __VA_ARGS__) #define DO_442(MACRO, ...) \ MACRO(442, __VA_ARGS__) \ DO_441(MACRO, __VA_ARGS__) #define DO_443(MACRO, ...) \ MACRO(443, __VA_ARGS__) \ DO_442(MACRO, __VA_ARGS__) #define DO_444(MACRO, ...) \ MACRO(444, __VA_ARGS__) \ DO_443(MACRO, __VA_ARGS__) #define DO_445(MACRO, ...) \ MACRO(445, __VA_ARGS__) \ DO_444(MACRO, __VA_ARGS__) #define DO_446(MACRO, ...) \ MACRO(446, __VA_ARGS__) \ DO_445(MACRO, __VA_ARGS__) #define DO_447(MACRO, ...) \ MACRO(447, __VA_ARGS__) \ DO_446(MACRO, __VA_ARGS__) #define DO_448(MACRO, ...) \ MACRO(448, __VA_ARGS__) \ DO_447(MACRO, __VA_ARGS__) #define DO_449(MACRO, ...) \ MACRO(449, __VA_ARGS__) \ DO_448(MACRO, __VA_ARGS__) #define DO_450(MACRO, ...) \ MACRO(450, __VA_ARGS__) \ DO_449(MACRO, __VA_ARGS__) #define DO_451(MACRO, ...) \ MACRO(451, __VA_ARGS__) \ DO_450(MACRO, __VA_ARGS__) #define DO_452(MACRO, ...) \ MACRO(452, __VA_ARGS__) \ DO_451(MACRO, __VA_ARGS__) #define DO_453(MACRO, ...) \ MACRO(453, __VA_ARGS__) \ DO_452(MACRO, __VA_ARGS__) #define DO_454(MACRO, ...) \ MACRO(454, __VA_ARGS__) \ DO_453(MACRO, __VA_ARGS__) #define DO_455(MACRO, ...) \ MACRO(455, __VA_ARGS__) \ DO_454(MACRO, __VA_ARGS__) #define DO_456(MACRO, ...) \ MACRO(456, __VA_ARGS__) \ DO_455(MACRO, __VA_ARGS__) #define DO_457(MACRO, ...) \ MACRO(457, __VA_ARGS__) \ DO_456(MACRO, __VA_ARGS__) #define DO_458(MACRO, ...) \ MACRO(458, __VA_ARGS__) \ DO_457(MACRO, __VA_ARGS__) #define DO_459(MACRO, ...) \ MACRO(459, __VA_ARGS__) \ DO_458(MACRO, __VA_ARGS__) #define DO_460(MACRO, ...) \ MACRO(460, __VA_ARGS__) \ DO_459(MACRO, __VA_ARGS__) #define DO_461(MACRO, ...) \ MACRO(461, __VA_ARGS__) \ DO_460(MACRO, __VA_ARGS__) #define DO_462(MACRO, ...) \ MACRO(462, __VA_ARGS__) \ DO_461(MACRO, __VA_ARGS__) #define DO_463(MACRO, ...) \ MACRO(463, __VA_ARGS__) \ DO_462(MACRO, __VA_ARGS__) #define DO_464(MACRO, ...) \ MACRO(464, __VA_ARGS__) \ DO_463(MACRO, __VA_ARGS__) #define DO_465(MACRO, ...) \ MACRO(465, __VA_ARGS__) \ DO_464(MACRO, __VA_ARGS__) #define DO_466(MACRO, ...) \ MACRO(466, __VA_ARGS__) \ DO_465(MACRO, __VA_ARGS__) #define DO_467(MACRO, ...) \ MACRO(467, __VA_ARGS__) \ DO_466(MACRO, __VA_ARGS__) #define DO_468(MACRO, ...) \ MACRO(468, __VA_ARGS__) \ DO_467(MACRO, __VA_ARGS__) #define DO_469(MACRO, ...) \ MACRO(469, __VA_ARGS__) \ DO_468(MACRO, __VA_ARGS__) #define DO_470(MACRO, ...) \ MACRO(470, __VA_ARGS__) \ DO_469(MACRO, __VA_ARGS__) #define DO_471(MACRO, ...) \ MACRO(471, __VA_ARGS__) \ DO_470(MACRO, __VA_ARGS__) #define DO_472(MACRO, ...) \ MACRO(472, __VA_ARGS__) \ DO_471(MACRO, __VA_ARGS__) #define DO_473(MACRO, ...) \ MACRO(473, __VA_ARGS__) \ DO_472(MACRO, __VA_ARGS__) #define DO_474(MACRO, ...) \ MACRO(474, __VA_ARGS__) \ DO_473(MACRO, __VA_ARGS__) #define DO_475(MACRO, ...) \ MACRO(475, __VA_ARGS__) \ DO_474(MACRO, __VA_ARGS__) #define DO_476(MACRO, ...) \ MACRO(476, __VA_ARGS__) \ DO_475(MACRO, __VA_ARGS__) #define DO_477(MACRO, ...) \ MACRO(477, __VA_ARGS__) \ DO_476(MACRO, __VA_ARGS__) #define DO_478(MACRO, ...) \ MACRO(478, __VA_ARGS__) \ DO_477(MACRO, __VA_ARGS__) #define DO_479(MACRO, ...) \ MACRO(479, __VA_ARGS__) \ DO_478(MACRO, __VA_ARGS__) #define DO_480(MACRO, ...) \ MACRO(480, __VA_ARGS__) \ DO_479(MACRO, __VA_ARGS__) #define DO_481(MACRO, ...) \ MACRO(481, __VA_ARGS__) \ DO_480(MACRO, __VA_ARGS__) #define DO_482(MACRO, ...) \ MACRO(482, __VA_ARGS__) \ DO_481(MACRO, __VA_ARGS__) #define DO_483(MACRO, ...) \ MACRO(483, __VA_ARGS__) \ DO_482(MACRO, __VA_ARGS__) #define DO_484(MACRO, ...) \ MACRO(484, __VA_ARGS__) \ DO_483(MACRO, __VA_ARGS__) #define DO_485(MACRO, ...) \ MACRO(485, __VA_ARGS__) \ DO_484(MACRO, __VA_ARGS__) #define DO_486(MACRO, ...) \ MACRO(486, __VA_ARGS__) \ DO_485(MACRO, __VA_ARGS__) #define DO_487(MACRO, ...) \ MACRO(487, __VA_ARGS__) \ DO_486(MACRO, __VA_ARGS__) #define DO_488(MACRO, ...) \ MACRO(488, __VA_ARGS__) \ DO_487(MACRO, __VA_ARGS__) #define DO_489(MACRO, ...) \ MACRO(489, __VA_ARGS__) \ DO_488(MACRO, __VA_ARGS__) #define DO_490(MACRO, ...) \ MACRO(490, __VA_ARGS__) \ DO_489(MACRO, __VA_ARGS__) #define DO_491(MACRO, ...) \ MACRO(491, __VA_ARGS__) \ DO_490(MACRO, __VA_ARGS__) #define DO_492(MACRO, ...) \ MACRO(492, __VA_ARGS__) \ DO_491(MACRO, __VA_ARGS__) #define DO_493(MACRO, ...) \ MACRO(493, __VA_ARGS__) \ DO_492(MACRO, __VA_ARGS__) #define DO_494(MACRO, ...) \ MACRO(494, __VA_ARGS__) \ DO_493(MACRO, __VA_ARGS__) #define DO_495(MACRO, ...) \ MACRO(495, __VA_ARGS__) \ DO_494(MACRO, __VA_ARGS__) #define DO_496(MACRO, ...) \ MACRO(496, __VA_ARGS__) \ DO_495(MACRO, __VA_ARGS__) #define DO_497(MACRO, ...) \ MACRO(497, __VA_ARGS__) \ DO_496(MACRO, __VA_ARGS__) #define DO_498(MACRO, ...) \ MACRO(498, __VA_ARGS__) \ DO_497(MACRO, __VA_ARGS__) #define DO_499(MACRO, ...) \ MACRO(499, __VA_ARGS__) \ DO_498(MACRO, __VA_ARGS__) #define DO_500(MACRO, ...) \ MACRO(500, __VA_ARGS__) \ DO_499(MACRO, __VA_ARGS__) #define DO_501(MACRO, ...) \ MACRO(501, __VA_ARGS__) \ DO_500(MACRO, __VA_ARGS__) #define DO_502(MACRO, ...) \ MACRO(502, __VA_ARGS__) \ DO_501(MACRO, __VA_ARGS__) #define DO_503(MACRO, ...) \ MACRO(503, __VA_ARGS__) \ DO_502(MACRO, __VA_ARGS__) #define DO_504(MACRO, ...) \ MACRO(504, __VA_ARGS__) \ DO_503(MACRO, __VA_ARGS__) #define DO_505(MACRO, ...) \ MACRO(505, __VA_ARGS__) \ DO_504(MACRO, __VA_ARGS__) #define DO_506(MACRO, ...) \ MACRO(506, __VA_ARGS__) \ DO_505(MACRO, __VA_ARGS__) #define DO_507(MACRO, ...) \ MACRO(507, __VA_ARGS__) \ DO_506(MACRO, __VA_ARGS__) #define DO_508(MACRO, ...) \ MACRO(508, __VA_ARGS__) \ DO_507(MACRO, __VA_ARGS__) #define DO_509(MACRO, ...) \ MACRO(509, __VA_ARGS__) \ DO_508(MACRO, __VA_ARGS__) #define DO_510(MACRO, ...) \ MACRO(510, __VA_ARGS__) \ DO_509(MACRO, __VA_ARGS__) #define DO_511(MACRO, ...) \ MACRO(511, __VA_ARGS__) \ DO_510(MACRO, __VA_ARGS__) #define DO_512(MACRO, ...) \ MACRO(512, __VA_ARGS__) \ DO_511(MACRO, __VA_ARGS__) #define DO_513(MACRO, ...) \ MACRO(513, __VA_ARGS__) \ DO_512(MACRO, __VA_ARGS__) #define DO_514(MACRO, ...) \ MACRO(514, __VA_ARGS__) \ DO_513(MACRO, __VA_ARGS__) #define DO_515(MACRO, ...) \ MACRO(515, __VA_ARGS__) \ DO_514(MACRO, __VA_ARGS__) #define DO_516(MACRO, ...) \ MACRO(516, __VA_ARGS__) \ DO_515(MACRO, __VA_ARGS__) #define DO_517(MACRO, ...) \ MACRO(517, __VA_ARGS__) \ DO_516(MACRO, __VA_ARGS__) #define DO_518(MACRO, ...) \ MACRO(518, __VA_ARGS__) \ DO_517(MACRO, __VA_ARGS__) #define DO_519(MACRO, ...) \ MACRO(519, __VA_ARGS__) \ DO_518(MACRO, __VA_ARGS__) #define DO_520(MACRO, ...) \ MACRO(520, __VA_ARGS__) \ DO_519(MACRO, __VA_ARGS__) #define DO_521(MACRO, ...) \ MACRO(521, __VA_ARGS__) \ DO_520(MACRO, __VA_ARGS__) #define DO_522(MACRO, ...) \ MACRO(522, __VA_ARGS__) \ DO_521(MACRO, __VA_ARGS__) #define DO_523(MACRO, ...) \ MACRO(523, __VA_ARGS__) \ DO_522(MACRO, __VA_ARGS__) #define DO_524(MACRO, ...) \ MACRO(524, __VA_ARGS__) \ DO_523(MACRO, __VA_ARGS__) #define DO_525(MACRO, ...) \ MACRO(525, __VA_ARGS__) \ DO_524(MACRO, __VA_ARGS__) #define DO_526(MACRO, ...) \ MACRO(526, __VA_ARGS__) \ DO_525(MACRO, __VA_ARGS__) #define DO_527(MACRO, ...) \ MACRO(527, __VA_ARGS__) \ DO_526(MACRO, __VA_ARGS__) #define DO_528(MACRO, ...) \ MACRO(528, __VA_ARGS__) \ DO_527(MACRO, __VA_ARGS__) #define DO_529(MACRO, ...) \ MACRO(529, __VA_ARGS__) \ DO_528(MACRO, __VA_ARGS__) #define DO_530(MACRO, ...) \ MACRO(530, __VA_ARGS__) \ DO_529(MACRO, __VA_ARGS__) #define DO_531(MACRO, ...) \ MACRO(531, __VA_ARGS__) \ DO_530(MACRO, __VA_ARGS__) #define DO_532(MACRO, ...) \ MACRO(532, __VA_ARGS__) \ DO_531(MACRO, __VA_ARGS__) #define DO_533(MACRO, ...) \ MACRO(533, __VA_ARGS__) \ DO_532(MACRO, __VA_ARGS__) #define DO_534(MACRO, ...) \ MACRO(534, __VA_ARGS__) \ DO_533(MACRO, __VA_ARGS__) #define DO_535(MACRO, ...) \ MACRO(535, __VA_ARGS__) \ DO_534(MACRO, __VA_ARGS__) #define DO_536(MACRO, ...) \ MACRO(536, __VA_ARGS__) \ DO_535(MACRO, __VA_ARGS__) #define DO_537(MACRO, ...) \ MACRO(537, __VA_ARGS__) \ DO_536(MACRO, __VA_ARGS__) #define DO_538(MACRO, ...) \ MACRO(538, __VA_ARGS__) \ DO_537(MACRO, __VA_ARGS__) #define DO_539(MACRO, ...) \ MACRO(539, __VA_ARGS__) \ DO_538(MACRO, __VA_ARGS__) #define DO_540(MACRO, ...) \ MACRO(540, __VA_ARGS__) \ DO_539(MACRO, __VA_ARGS__) #define DO_541(MACRO, ...) \ MACRO(541, __VA_ARGS__) \ DO_540(MACRO, __VA_ARGS__) #define DO_542(MACRO, ...) \ MACRO(542, __VA_ARGS__) \ DO_541(MACRO, __VA_ARGS__) #define DO_543(MACRO, ...) \ MACRO(543, __VA_ARGS__) \ DO_542(MACRO, __VA_ARGS__) #define DO_544(MACRO, ...) \ MACRO(544, __VA_ARGS__) \ DO_543(MACRO, __VA_ARGS__) #define DO_545(MACRO, ...) \ MACRO(545, __VA_ARGS__) \ DO_544(MACRO, __VA_ARGS__) #define DO_546(MACRO, ...) \ MACRO(546, __VA_ARGS__) \ DO_545(MACRO, __VA_ARGS__) #define DO_547(MACRO, ...) \ MACRO(547, __VA_ARGS__) \ DO_546(MACRO, __VA_ARGS__) #define DO_548(MACRO, ...) \ MACRO(548, __VA_ARGS__) \ DO_547(MACRO, __VA_ARGS__) #define DO_549(MACRO, ...) \ MACRO(549, __VA_ARGS__) \ DO_548(MACRO, __VA_ARGS__) #define DO_550(MACRO, ...) \ MACRO(550, __VA_ARGS__) \ DO_549(MACRO, __VA_ARGS__) #define DO_551(MACRO, ...) \ MACRO(551, __VA_ARGS__) \ DO_550(MACRO, __VA_ARGS__) #define DO_552(MACRO, ...) \ MACRO(552, __VA_ARGS__) \ DO_551(MACRO, __VA_ARGS__) #define DO_553(MACRO, ...) \ MACRO(553, __VA_ARGS__) \ DO_552(MACRO, __VA_ARGS__) #define DO_554(MACRO, ...) \ MACRO(554, __VA_ARGS__) \ DO_553(MACRO, __VA_ARGS__) #define DO_555(MACRO, ...) \ MACRO(555, __VA_ARGS__) \ DO_554(MACRO, __VA_ARGS__) #define DO_556(MACRO, ...) \ MACRO(556, __VA_ARGS__) \ DO_555(MACRO, __VA_ARGS__) #define DO_557(MACRO, ...) \ MACRO(557, __VA_ARGS__) \ DO_556(MACRO, __VA_ARGS__) #define DO_558(MACRO, ...) \ MACRO(558, __VA_ARGS__) \ DO_557(MACRO, __VA_ARGS__) #define DO_559(MACRO, ...) \ MACRO(559, __VA_ARGS__) \ DO_558(MACRO, __VA_ARGS__) #define DO_560(MACRO, ...) \ MACRO(560, __VA_ARGS__) \ DO_559(MACRO, __VA_ARGS__) #define DO_561(MACRO, ...) \ MACRO(561, __VA_ARGS__) \ DO_560(MACRO, __VA_ARGS__) #define DO_562(MACRO, ...) \ MACRO(562, __VA_ARGS__) \ DO_561(MACRO, __VA_ARGS__) #define DO_563(MACRO, ...) \ MACRO(563, __VA_ARGS__) \ DO_562(MACRO, __VA_ARGS__) #define DO_564(MACRO, ...) \ MACRO(564, __VA_ARGS__) \ DO_563(MACRO, __VA_ARGS__) #define DO_565(MACRO, ...) \ MACRO(565, __VA_ARGS__) \ DO_564(MACRO, __VA_ARGS__) #define DO_566(MACRO, ...) \ MACRO(566, __VA_ARGS__) \ DO_565(MACRO, __VA_ARGS__) #define DO_567(MACRO, ...) \ MACRO(567, __VA_ARGS__) \ DO_566(MACRO, __VA_ARGS__) #define DO_568(MACRO, ...) \ MACRO(568, __VA_ARGS__) \ DO_567(MACRO, __VA_ARGS__) #define DO_569(MACRO, ...) \ MACRO(569, __VA_ARGS__) \ DO_568(MACRO, __VA_ARGS__) #define DO_570(MACRO, ...) \ MACRO(570, __VA_ARGS__) \ DO_569(MACRO, __VA_ARGS__) #define DO_571(MACRO, ...) \ MACRO(571, __VA_ARGS__) \ DO_570(MACRO, __VA_ARGS__) #define DO_572(MACRO, ...) \ MACRO(572, __VA_ARGS__) \ DO_571(MACRO, __VA_ARGS__) #define DO_573(MACRO, ...) \ MACRO(573, __VA_ARGS__) \ DO_572(MACRO, __VA_ARGS__) #define DO_574(MACRO, ...) \ MACRO(574, __VA_ARGS__) \ DO_573(MACRO, __VA_ARGS__) #define DO_575(MACRO, ...) \ MACRO(575, __VA_ARGS__) \ DO_574(MACRO, __VA_ARGS__) #define DO_576(MACRO, ...) \ MACRO(576, __VA_ARGS__) \ DO_575(MACRO, __VA_ARGS__) #define DO_577(MACRO, ...) \ MACRO(577, __VA_ARGS__) \ DO_576(MACRO, __VA_ARGS__) #define DO_578(MACRO, ...) \ MACRO(578, __VA_ARGS__) \ DO_577(MACRO, __VA_ARGS__) #define DO_579(MACRO, ...) \ MACRO(579, __VA_ARGS__) \ DO_578(MACRO, __VA_ARGS__) #define DO_580(MACRO, ...) \ MACRO(580, __VA_ARGS__) \ DO_579(MACRO, __VA_ARGS__) #define DO_581(MACRO, ...) \ MACRO(581, __VA_ARGS__) \ DO_580(MACRO, __VA_ARGS__) #define DO_582(MACRO, ...) \ MACRO(582, __VA_ARGS__) \ DO_581(MACRO, __VA_ARGS__) #define DO_583(MACRO, ...) \ MACRO(583, __VA_ARGS__) \ DO_582(MACRO, __VA_ARGS__) #define DO_584(MACRO, ...) \ MACRO(584, __VA_ARGS__) \ DO_583(MACRO, __VA_ARGS__) #define DO_585(MACRO, ...) \ MACRO(585, __VA_ARGS__) \ DO_584(MACRO, __VA_ARGS__) #define DO_586(MACRO, ...) \ MACRO(586, __VA_ARGS__) \ DO_585(MACRO, __VA_ARGS__) #define DO_587(MACRO, ...) \ MACRO(587, __VA_ARGS__) \ DO_586(MACRO, __VA_ARGS__) #define DO_588(MACRO, ...) \ MACRO(588, __VA_ARGS__) \ DO_587(MACRO, __VA_ARGS__) #define DO_589(MACRO, ...) \ MACRO(589, __VA_ARGS__) \ DO_588(MACRO, __VA_ARGS__) #define DO_590(MACRO, ...) \ MACRO(590, __VA_ARGS__) \ DO_589(MACRO, __VA_ARGS__) #define DO_591(MACRO, ...) \ MACRO(591, __VA_ARGS__) \ DO_590(MACRO, __VA_ARGS__) #define DO_592(MACRO, ...) \ MACRO(592, __VA_ARGS__) \ DO_591(MACRO, __VA_ARGS__) #define DO_593(MACRO, ...) \ MACRO(593, __VA_ARGS__) \ DO_592(MACRO, __VA_ARGS__) #define DO_594(MACRO, ...) \ MACRO(594, __VA_ARGS__) \ DO_593(MACRO, __VA_ARGS__) #define DO_595(MACRO, ...) \ MACRO(595, __VA_ARGS__) \ DO_594(MACRO, __VA_ARGS__) #define DO_596(MACRO, ...) \ MACRO(596, __VA_ARGS__) \ DO_595(MACRO, __VA_ARGS__) #define DO_597(MACRO, ...) \ MACRO(597, __VA_ARGS__) \ DO_596(MACRO, __VA_ARGS__) #define DO_598(MACRO, ...) \ MACRO(598, __VA_ARGS__) \ DO_597(MACRO, __VA_ARGS__) #define DO_599(MACRO, ...) \ MACRO(599, __VA_ARGS__) \ DO_598(MACRO, __VA_ARGS__) #define DO_600(MACRO, ...) \ MACRO(600, __VA_ARGS__) \ DO_599(MACRO, __VA_ARGS__) #define DO_601(MACRO, ...) \ MACRO(601, __VA_ARGS__) \ DO_600(MACRO, __VA_ARGS__) #define DO_602(MACRO, ...) \ MACRO(602, __VA_ARGS__) \ DO_601(MACRO, __VA_ARGS__) #define DO_603(MACRO, ...) \ MACRO(603, __VA_ARGS__) \ DO_602(MACRO, __VA_ARGS__) #define DO_604(MACRO, ...) \ MACRO(604, __VA_ARGS__) \ DO_603(MACRO, __VA_ARGS__) #define DO_605(MACRO, ...) \ MACRO(605, __VA_ARGS__) \ DO_604(MACRO, __VA_ARGS__) #define DO_606(MACRO, ...) \ MACRO(606, __VA_ARGS__) \ DO_605(MACRO, __VA_ARGS__) #define DO_607(MACRO, ...) \ MACRO(607, __VA_ARGS__) \ DO_606(MACRO, __VA_ARGS__) #define DO_608(MACRO, ...) \ MACRO(608, __VA_ARGS__) \ DO_607(MACRO, __VA_ARGS__) #define DO_609(MACRO, ...) \ MACRO(609, __VA_ARGS__) \ DO_608(MACRO, __VA_ARGS__) #define DO_610(MACRO, ...) \ MACRO(610, __VA_ARGS__) \ DO_609(MACRO, __VA_ARGS__) #define DO_611(MACRO, ...) \ MACRO(611, __VA_ARGS__) \ DO_610(MACRO, __VA_ARGS__) #define DO_612(MACRO, ...) \ MACRO(612, __VA_ARGS__) \ DO_611(MACRO, __VA_ARGS__) #define DO_613(MACRO, ...) \ MACRO(613, __VA_ARGS__) \ DO_612(MACRO, __VA_ARGS__) #define DO_614(MACRO, ...) \ MACRO(614, __VA_ARGS__) \ DO_613(MACRO, __VA_ARGS__) #define DO_615(MACRO, ...) \ MACRO(615, __VA_ARGS__) \ DO_614(MACRO, __VA_ARGS__) #define DO_616(MACRO, ...) \ MACRO(616, __VA_ARGS__) \ DO_615(MACRO, __VA_ARGS__) #define DO_617(MACRO, ...) \ MACRO(617, __VA_ARGS__) \ DO_616(MACRO, __VA_ARGS__) #define DO_618(MACRO, ...) \ MACRO(618, __VA_ARGS__) \ DO_617(MACRO, __VA_ARGS__) #define DO_619(MACRO, ...) \ MACRO(619, __VA_ARGS__) \ DO_618(MACRO, __VA_ARGS__) #define DO_620(MACRO, ...) \ MACRO(620, __VA_ARGS__) \ DO_619(MACRO, __VA_ARGS__) #define DO_621(MACRO, ...) \ MACRO(621, __VA_ARGS__) \ DO_620(MACRO, __VA_ARGS__) #define DO_622(MACRO, ...) \ MACRO(622, __VA_ARGS__) \ DO_621(MACRO, __VA_ARGS__) #define DO_623(MACRO, ...) \ MACRO(623, __VA_ARGS__) \ DO_622(MACRO, __VA_ARGS__) #define DO_624(MACRO, ...) \ MACRO(624, __VA_ARGS__) \ DO_623(MACRO, __VA_ARGS__) #define DO_625(MACRO, ...) \ MACRO(625, __VA_ARGS__) \ DO_624(MACRO, __VA_ARGS__) #define DO_626(MACRO, ...) \ MACRO(626, __VA_ARGS__) \ DO_625(MACRO, __VA_ARGS__) #define DO_627(MACRO, ...) \ MACRO(627, __VA_ARGS__) \ DO_626(MACRO, __VA_ARGS__) #define DO_628(MACRO, ...) \ MACRO(628, __VA_ARGS__) \ DO_627(MACRO, __VA_ARGS__) #define DO_629(MACRO, ...) \ MACRO(629, __VA_ARGS__) \ DO_628(MACRO, __VA_ARGS__) #define DO_630(MACRO, ...) \ MACRO(630, __VA_ARGS__) \ DO_629(MACRO, __VA_ARGS__) #define DO_631(MACRO, ...) \ MACRO(631, __VA_ARGS__) \ DO_630(MACRO, __VA_ARGS__) #define DO_632(MACRO, ...) \ MACRO(632, __VA_ARGS__) \ DO_631(MACRO, __VA_ARGS__) #define DO_633(MACRO, ...) \ MACRO(633, __VA_ARGS__) \ DO_632(MACRO, __VA_ARGS__) #define DO_634(MACRO, ...) \ MACRO(634, __VA_ARGS__) \ DO_633(MACRO, __VA_ARGS__) #define DO_635(MACRO, ...) \ MACRO(635, __VA_ARGS__) \ DO_634(MACRO, __VA_ARGS__) #define DO_636(MACRO, ...) \ MACRO(636, __VA_ARGS__) \ DO_635(MACRO, __VA_ARGS__) #define DO_637(MACRO, ...) \ MACRO(637, __VA_ARGS__) \ DO_636(MACRO, __VA_ARGS__) #define DO_638(MACRO, ...) \ MACRO(638, __VA_ARGS__) \ DO_637(MACRO, __VA_ARGS__) #define DO_639(MACRO, ...) \ MACRO(639, __VA_ARGS__) \ DO_638(MACRO, __VA_ARGS__) #define DO_640(MACRO, ...) \ MACRO(640, __VA_ARGS__) \ DO_639(MACRO, __VA_ARGS__) #define DO_641(MACRO, ...) \ MACRO(641, __VA_ARGS__) \ DO_640(MACRO, __VA_ARGS__) #define DO_642(MACRO, ...) \ MACRO(642, __VA_ARGS__) \ DO_641(MACRO, __VA_ARGS__) #define DO_643(MACRO, ...) \ MACRO(643, __VA_ARGS__) \ DO_642(MACRO, __VA_ARGS__) #define DO_644(MACRO, ...) \ MACRO(644, __VA_ARGS__) \ DO_643(MACRO, __VA_ARGS__) #define DO_645(MACRO, ...) \ MACRO(645, __VA_ARGS__) \ DO_644(MACRO, __VA_ARGS__) #define DO_646(MACRO, ...) \ MACRO(646, __VA_ARGS__) \ DO_645(MACRO, __VA_ARGS__) #define DO_647(MACRO, ...) \ MACRO(647, __VA_ARGS__) \ DO_646(MACRO, __VA_ARGS__) #define DO_648(MACRO, ...) \ MACRO(648, __VA_ARGS__) \ DO_647(MACRO, __VA_ARGS__) #define DO_649(MACRO, ...) \ MACRO(649, __VA_ARGS__) \ DO_648(MACRO, __VA_ARGS__) #define DO_650(MACRO, ...) \ MACRO(650, __VA_ARGS__) \ DO_649(MACRO, __VA_ARGS__) #define DO_651(MACRO, ...) \ MACRO(651, __VA_ARGS__) \ DO_650(MACRO, __VA_ARGS__) #define DO_652(MACRO, ...) \ MACRO(652, __VA_ARGS__) \ DO_651(MACRO, __VA_ARGS__) #define DO_653(MACRO, ...) \ MACRO(653, __VA_ARGS__) \ DO_652(MACRO, __VA_ARGS__) #define DO_654(MACRO, ...) \ MACRO(654, __VA_ARGS__) \ DO_653(MACRO, __VA_ARGS__) #define DO_655(MACRO, ...) \ MACRO(655, __VA_ARGS__) \ DO_654(MACRO, __VA_ARGS__) #define DO_656(MACRO, ...) \ MACRO(656, __VA_ARGS__) \ DO_655(MACRO, __VA_ARGS__) #define DO_657(MACRO, ...) \ MACRO(657, __VA_ARGS__) \ DO_656(MACRO, __VA_ARGS__) #define DO_658(MACRO, ...) \ MACRO(658, __VA_ARGS__) \ DO_657(MACRO, __VA_ARGS__) #define DO_659(MACRO, ...) \ MACRO(659, __VA_ARGS__) \ DO_658(MACRO, __VA_ARGS__) #define DO_660(MACRO, ...) \ MACRO(660, __VA_ARGS__) \ DO_659(MACRO, __VA_ARGS__) #define DO_661(MACRO, ...) \ MACRO(661, __VA_ARGS__) \ DO_660(MACRO, __VA_ARGS__) #define DO_662(MACRO, ...) \ MACRO(662, __VA_ARGS__) \ DO_661(MACRO, __VA_ARGS__) #define DO_663(MACRO, ...) \ MACRO(663, __VA_ARGS__) \ DO_662(MACRO, __VA_ARGS__) #define DO_664(MACRO, ...) \ MACRO(664, __VA_ARGS__) \ DO_663(MACRO, __VA_ARGS__) #define DO_665(MACRO, ...) \ MACRO(665, __VA_ARGS__) \ DO_664(MACRO, __VA_ARGS__) #define DO_666(MACRO, ...) \ MACRO(666, __VA_ARGS__) \ DO_665(MACRO, __VA_ARGS__) #define DO_667(MACRO, ...) \ MACRO(667, __VA_ARGS__) \ DO_666(MACRO, __VA_ARGS__) #define DO_668(MACRO, ...) \ MACRO(668, __VA_ARGS__) \ DO_667(MACRO, __VA_ARGS__) #define DO_669(MACRO, ...) \ MACRO(669, __VA_ARGS__) \ DO_668(MACRO, __VA_ARGS__) #define DO_670(MACRO, ...) \ MACRO(670, __VA_ARGS__) \ DO_669(MACRO, __VA_ARGS__) #define DO_671(MACRO, ...) \ MACRO(671, __VA_ARGS__) \ DO_670(MACRO, __VA_ARGS__) #define DO_672(MACRO, ...) \ MACRO(672, __VA_ARGS__) \ DO_671(MACRO, __VA_ARGS__) #define DO_673(MACRO, ...) \ MACRO(673, __VA_ARGS__) \ DO_672(MACRO, __VA_ARGS__) #define DO_674(MACRO, ...) \ MACRO(674, __VA_ARGS__) \ DO_673(MACRO, __VA_ARGS__) #define DO_675(MACRO, ...) \ MACRO(675, __VA_ARGS__) \ DO_674(MACRO, __VA_ARGS__) #define DO_676(MACRO, ...) \ MACRO(676, __VA_ARGS__) \ DO_675(MACRO, __VA_ARGS__) #define DO_677(MACRO, ...) \ MACRO(677, __VA_ARGS__) \ DO_676(MACRO, __VA_ARGS__) #define DO_678(MACRO, ...) \ MACRO(678, __VA_ARGS__) \ DO_677(MACRO, __VA_ARGS__) #define DO_679(MACRO, ...) \ MACRO(679, __VA_ARGS__) \ DO_678(MACRO, __VA_ARGS__) #define DO_680(MACRO, ...) \ MACRO(680, __VA_ARGS__) \ DO_679(MACRO, __VA_ARGS__) #define DO_681(MACRO, ...) \ MACRO(681, __VA_ARGS__) \ DO_680(MACRO, __VA_ARGS__) #define DO_682(MACRO, ...) \ MACRO(682, __VA_ARGS__) \ DO_681(MACRO, __VA_ARGS__) #define DO_683(MACRO, ...) \ MACRO(683, __VA_ARGS__) \ DO_682(MACRO, __VA_ARGS__) #define DO_684(MACRO, ...) \ MACRO(684, __VA_ARGS__) \ DO_683(MACRO, __VA_ARGS__) #define DO_685(MACRO, ...) \ MACRO(685, __VA_ARGS__) \ DO_684(MACRO, __VA_ARGS__) #define DO_686(MACRO, ...) \ MACRO(686, __VA_ARGS__) \ DO_685(MACRO, __VA_ARGS__) #define DO_687(MACRO, ...) \ MACRO(687, __VA_ARGS__) \ DO_686(MACRO, __VA_ARGS__) #define DO_688(MACRO, ...) \ MACRO(688, __VA_ARGS__) \ DO_687(MACRO, __VA_ARGS__) #define DO_689(MACRO, ...) \ MACRO(689, __VA_ARGS__) \ DO_688(MACRO, __VA_ARGS__) #define DO_690(MACRO, ...) \ MACRO(690, __VA_ARGS__) \ DO_689(MACRO, __VA_ARGS__) #define DO_691(MACRO, ...) \ MACRO(691, __VA_ARGS__) \ DO_690(MACRO, __VA_ARGS__) #define DO_692(MACRO, ...) \ MACRO(692, __VA_ARGS__) \ DO_691(MACRO, __VA_ARGS__) #define DO_693(MACRO, ...) \ MACRO(693, __VA_ARGS__) \ DO_692(MACRO, __VA_ARGS__) #define DO_694(MACRO, ...) \ MACRO(694, __VA_ARGS__) \ DO_693(MACRO, __VA_ARGS__) #define DO_695(MACRO, ...) \ MACRO(695, __VA_ARGS__) \ DO_694(MACRO, __VA_ARGS__) #define DO_696(MACRO, ...) \ MACRO(696, __VA_ARGS__) \ DO_695(MACRO, __VA_ARGS__) #define DO_697(MACRO, ...) \ MACRO(697, __VA_ARGS__) \ DO_696(MACRO, __VA_ARGS__) #define DO_698(MACRO, ...) \ MACRO(698, __VA_ARGS__) \ DO_697(MACRO, __VA_ARGS__) #define DO_699(MACRO, ...) \ MACRO(699, __VA_ARGS__) \ DO_698(MACRO, __VA_ARGS__) #define DO_700(MACRO, ...) \ MACRO(700, __VA_ARGS__) \ DO_699(MACRO, __VA_ARGS__) #define DO_701(MACRO, ...) \ MACRO(701, __VA_ARGS__) \ DO_700(MACRO, __VA_ARGS__) #define DO_702(MACRO, ...) \ MACRO(702, __VA_ARGS__) \ DO_701(MACRO, __VA_ARGS__) #define DO_703(MACRO, ...) \ MACRO(703, __VA_ARGS__) \ DO_702(MACRO, __VA_ARGS__) #define DO_704(MACRO, ...) \ MACRO(704, __VA_ARGS__) \ DO_703(MACRO, __VA_ARGS__) #define DO_705(MACRO, ...) \ MACRO(705, __VA_ARGS__) \ DO_704(MACRO, __VA_ARGS__) #define DO_706(MACRO, ...) \ MACRO(706, __VA_ARGS__) \ DO_705(MACRO, __VA_ARGS__) #define DO_707(MACRO, ...) \ MACRO(707, __VA_ARGS__) \ DO_706(MACRO, __VA_ARGS__) #define DO_708(MACRO, ...) \ MACRO(708, __VA_ARGS__) \ DO_707(MACRO, __VA_ARGS__) #define DO_709(MACRO, ...) \ MACRO(709, __VA_ARGS__) \ DO_708(MACRO, __VA_ARGS__) #define DO_710(MACRO, ...) \ MACRO(710, __VA_ARGS__) \ DO_709(MACRO, __VA_ARGS__) #define DO_711(MACRO, ...) \ MACRO(711, __VA_ARGS__) \ DO_710(MACRO, __VA_ARGS__) #define DO_712(MACRO, ...) \ MACRO(712, __VA_ARGS__) \ DO_711(MACRO, __VA_ARGS__) #define DO_713(MACRO, ...) \ MACRO(713, __VA_ARGS__) \ DO_712(MACRO, __VA_ARGS__) #define DO_714(MACRO, ...) \ MACRO(714, __VA_ARGS__) \ DO_713(MACRO, __VA_ARGS__) #define DO_715(MACRO, ...) \ MACRO(715, __VA_ARGS__) \ DO_714(MACRO, __VA_ARGS__) #define DO_716(MACRO, ...) \ MACRO(716, __VA_ARGS__) \ DO_715(MACRO, __VA_ARGS__) #define DO_717(MACRO, ...) \ MACRO(717, __VA_ARGS__) \ DO_716(MACRO, __VA_ARGS__) #define DO_718(MACRO, ...) \ MACRO(718, __VA_ARGS__) \ DO_717(MACRO, __VA_ARGS__) #define DO_719(MACRO, ...) \ MACRO(719, __VA_ARGS__) \ DO_718(MACRO, __VA_ARGS__) #define DO_720(MACRO, ...) \ MACRO(720, __VA_ARGS__) \ DO_719(MACRO, __VA_ARGS__) #define DO_721(MACRO, ...) \ MACRO(721, __VA_ARGS__) \ DO_720(MACRO, __VA_ARGS__) #define DO_722(MACRO, ...) \ MACRO(722, __VA_ARGS__) \ DO_721(MACRO, __VA_ARGS__) #define DO_723(MACRO, ...) \ MACRO(723, __VA_ARGS__) \ DO_722(MACRO, __VA_ARGS__) #define DO_724(MACRO, ...) \ MACRO(724, __VA_ARGS__) \ DO_723(MACRO, __VA_ARGS__) #define DO_725(MACRO, ...) \ MACRO(725, __VA_ARGS__) \ DO_724(MACRO, __VA_ARGS__) #define DO_726(MACRO, ...) \ MACRO(726, __VA_ARGS__) \ DO_725(MACRO, __VA_ARGS__) #define DO_727(MACRO, ...) \ MACRO(727, __VA_ARGS__) \ DO_726(MACRO, __VA_ARGS__) #define DO_728(MACRO, ...) \ MACRO(728, __VA_ARGS__) \ DO_727(MACRO, __VA_ARGS__) #define DO_729(MACRO, ...) \ MACRO(729, __VA_ARGS__) \ DO_728(MACRO, __VA_ARGS__) #define DO_730(MACRO, ...) \ MACRO(730, __VA_ARGS__) \ DO_729(MACRO, __VA_ARGS__) #define DO_731(MACRO, ...) \ MACRO(731, __VA_ARGS__) \ DO_730(MACRO, __VA_ARGS__) #define DO_732(MACRO, ...) \ MACRO(732, __VA_ARGS__) \ DO_731(MACRO, __VA_ARGS__) #define DO_733(MACRO, ...) \ MACRO(733, __VA_ARGS__) \ DO_732(MACRO, __VA_ARGS__) #define DO_734(MACRO, ...) \ MACRO(734, __VA_ARGS__) \ DO_733(MACRO, __VA_ARGS__) #define DO_735(MACRO, ...) \ MACRO(735, __VA_ARGS__) \ DO_734(MACRO, __VA_ARGS__) #define DO_736(MACRO, ...) \ MACRO(736, __VA_ARGS__) \ DO_735(MACRO, __VA_ARGS__) #define DO_737(MACRO, ...) \ MACRO(737, __VA_ARGS__) \ DO_736(MACRO, __VA_ARGS__) #define DO_738(MACRO, ...) \ MACRO(738, __VA_ARGS__) \ DO_737(MACRO, __VA_ARGS__) #define DO_739(MACRO, ...) \ MACRO(739, __VA_ARGS__) \ DO_738(MACRO, __VA_ARGS__) #define DO_740(MACRO, ...) \ MACRO(740, __VA_ARGS__) \ DO_739(MACRO, __VA_ARGS__) #define DO_741(MACRO, ...) \ MACRO(741, __VA_ARGS__) \ DO_740(MACRO, __VA_ARGS__) #define DO_742(MACRO, ...) \ MACRO(742, __VA_ARGS__) \ DO_741(MACRO, __VA_ARGS__) #define DO_743(MACRO, ...) \ MACRO(743, __VA_ARGS__) \ DO_742(MACRO, __VA_ARGS__) #define DO_744(MACRO, ...) \ MACRO(744, __VA_ARGS__) \ DO_743(MACRO, __VA_ARGS__) #define DO_745(MACRO, ...) \ MACRO(745, __VA_ARGS__) \ DO_744(MACRO, __VA_ARGS__) #define DO_746(MACRO, ...) \ MACRO(746, __VA_ARGS__) \ DO_745(MACRO, __VA_ARGS__) #define DO_747(MACRO, ...) \ MACRO(747, __VA_ARGS__) \ DO_746(MACRO, __VA_ARGS__) #define DO_748(MACRO, ...) \ MACRO(748, __VA_ARGS__) \ DO_747(MACRO, __VA_ARGS__) #define DO_749(MACRO, ...) \ MACRO(749, __VA_ARGS__) \ DO_748(MACRO, __VA_ARGS__) #define DO_750(MACRO, ...) \ MACRO(750, __VA_ARGS__) \ DO_749(MACRO, __VA_ARGS__) #define DO_751(MACRO, ...) \ MACRO(751, __VA_ARGS__) \ DO_750(MACRO, __VA_ARGS__) #define DO_752(MACRO, ...) \ MACRO(752, __VA_ARGS__) \ DO_751(MACRO, __VA_ARGS__) #define DO_753(MACRO, ...) \ MACRO(753, __VA_ARGS__) \ DO_752(MACRO, __VA_ARGS__) #define DO_754(MACRO, ...) \ MACRO(754, __VA_ARGS__) \ DO_753(MACRO, __VA_ARGS__) #define DO_755(MACRO, ...) \ MACRO(755, __VA_ARGS__) \ DO_754(MACRO, __VA_ARGS__) #define DO_756(MACRO, ...) \ MACRO(756, __VA_ARGS__) \ DO_755(MACRO, __VA_ARGS__) #define DO_757(MACRO, ...) \ MACRO(757, __VA_ARGS__) \ DO_756(MACRO, __VA_ARGS__) #define DO_758(MACRO, ...) \ MACRO(758, __VA_ARGS__) \ DO_757(MACRO, __VA_ARGS__) #define DO_759(MACRO, ...) \ MACRO(759, __VA_ARGS__) \ DO_758(MACRO, __VA_ARGS__) #define DO_760(MACRO, ...) \ MACRO(760, __VA_ARGS__) \ DO_759(MACRO, __VA_ARGS__) #define DO_761(MACRO, ...) \ MACRO(761, __VA_ARGS__) \ DO_760(MACRO, __VA_ARGS__) #define DO_762(MACRO, ...) \ MACRO(762, __VA_ARGS__) \ DO_761(MACRO, __VA_ARGS__) #define DO_763(MACRO, ...) \ MACRO(763, __VA_ARGS__) \ DO_762(MACRO, __VA_ARGS__) #define DO_764(MACRO, ...) \ MACRO(764, __VA_ARGS__) \ DO_763(MACRO, __VA_ARGS__) #define DO_765(MACRO, ...) \ MACRO(765, __VA_ARGS__) \ DO_764(MACRO, __VA_ARGS__) #define DO_766(MACRO, ...) \ MACRO(766, __VA_ARGS__) \ DO_765(MACRO, __VA_ARGS__) #define DO_767(MACRO, ...) \ MACRO(767, __VA_ARGS__) \ DO_766(MACRO, __VA_ARGS__) #define DO_768(MACRO, ...) \ MACRO(768, __VA_ARGS__) \ DO_767(MACRO, __VA_ARGS__) #define DO_769(MACRO, ...) \ MACRO(769, __VA_ARGS__) \ DO_768(MACRO, __VA_ARGS__) #define DO_770(MACRO, ...) \ MACRO(770, __VA_ARGS__) \ DO_769(MACRO, __VA_ARGS__) #define DO_771(MACRO, ...) \ MACRO(771, __VA_ARGS__) \ DO_770(MACRO, __VA_ARGS__) #define DO_772(MACRO, ...) \ MACRO(772, __VA_ARGS__) \ DO_771(MACRO, __VA_ARGS__) #define DO_773(MACRO, ...) \ MACRO(773, __VA_ARGS__) \ DO_772(MACRO, __VA_ARGS__) #define DO_774(MACRO, ...) \ MACRO(774, __VA_ARGS__) \ DO_773(MACRO, __VA_ARGS__) #define DO_775(MACRO, ...) \ MACRO(775, __VA_ARGS__) \ DO_774(MACRO, __VA_ARGS__) #define DO_776(MACRO, ...) \ MACRO(776, __VA_ARGS__) \ DO_775(MACRO, __VA_ARGS__) #define DO_777(MACRO, ...) \ MACRO(777, __VA_ARGS__) \ DO_776(MACRO, __VA_ARGS__) #define DO_778(MACRO, ...) \ MACRO(778, __VA_ARGS__) \ DO_777(MACRO, __VA_ARGS__) #define DO_779(MACRO, ...) \ MACRO(779, __VA_ARGS__) \ DO_778(MACRO, __VA_ARGS__) #define DO_780(MACRO, ...) \ MACRO(780, __VA_ARGS__) \ DO_779(MACRO, __VA_ARGS__) #define DO_781(MACRO, ...) \ MACRO(781, __VA_ARGS__) \ DO_780(MACRO, __VA_ARGS__) #define DO_782(MACRO, ...) \ MACRO(782, __VA_ARGS__) \ DO_781(MACRO, __VA_ARGS__) #define DO_783(MACRO, ...) \ MACRO(783, __VA_ARGS__) \ DO_782(MACRO, __VA_ARGS__) #define DO_784(MACRO, ...) \ MACRO(784, __VA_ARGS__) \ DO_783(MACRO, __VA_ARGS__) #define DO_785(MACRO, ...) \ MACRO(785, __VA_ARGS__) \ DO_784(MACRO, __VA_ARGS__) #define DO_786(MACRO, ...) \ MACRO(786, __VA_ARGS__) \ DO_785(MACRO, __VA_ARGS__) #define DO_787(MACRO, ...) \ MACRO(787, __VA_ARGS__) \ DO_786(MACRO, __VA_ARGS__) #define DO_788(MACRO, ...) \ MACRO(788, __VA_ARGS__) \ DO_787(MACRO, __VA_ARGS__) #define DO_789(MACRO, ...) \ MACRO(789, __VA_ARGS__) \ DO_788(MACRO, __VA_ARGS__) #define DO_790(MACRO, ...) \ MACRO(790, __VA_ARGS__) \ DO_789(MACRO, __VA_ARGS__) #define DO_791(MACRO, ...) \ MACRO(791, __VA_ARGS__) \ DO_790(MACRO, __VA_ARGS__) #define DO_792(MACRO, ...) \ MACRO(792, __VA_ARGS__) \ DO_791(MACRO, __VA_ARGS__) #define DO_793(MACRO, ...) \ MACRO(793, __VA_ARGS__) \ DO_792(MACRO, __VA_ARGS__) #define DO_794(MACRO, ...) \ MACRO(794, __VA_ARGS__) \ DO_793(MACRO, __VA_ARGS__) #define DO_795(MACRO, ...) \ MACRO(795, __VA_ARGS__) \ DO_794(MACRO, __VA_ARGS__) #define DO_796(MACRO, ...) \ MACRO(796, __VA_ARGS__) \ DO_795(MACRO, __VA_ARGS__) #define DO_797(MACRO, ...) \ MACRO(797, __VA_ARGS__) \ DO_796(MACRO, __VA_ARGS__) #define DO_798(MACRO, ...) \ MACRO(798, __VA_ARGS__) \ DO_797(MACRO, __VA_ARGS__) #define DO_799(MACRO, ...) \ MACRO(799, __VA_ARGS__) \ DO_798(MACRO, __VA_ARGS__) #define DO_800(MACRO, ...) \ MACRO(800, __VA_ARGS__) \ DO_799(MACRO, __VA_ARGS__) #define DO_801(MACRO, ...) \ MACRO(801, __VA_ARGS__) \ DO_800(MACRO, __VA_ARGS__) #define DO_802(MACRO, ...) \ MACRO(802, __VA_ARGS__) \ DO_801(MACRO, __VA_ARGS__) #define DO_803(MACRO, ...) \ MACRO(803, __VA_ARGS__) \ DO_802(MACRO, __VA_ARGS__) #define DO_804(MACRO, ...) \ MACRO(804, __VA_ARGS__) \ DO_803(MACRO, __VA_ARGS__) #define DO_805(MACRO, ...) \ MACRO(805, __VA_ARGS__) \ DO_804(MACRO, __VA_ARGS__) #define DO_806(MACRO, ...) \ MACRO(806, __VA_ARGS__) \ DO_805(MACRO, __VA_ARGS__) #define DO_807(MACRO, ...) \ MACRO(807, __VA_ARGS__) \ DO_806(MACRO, __VA_ARGS__) #define DO_808(MACRO, ...) \ MACRO(808, __VA_ARGS__) \ DO_807(MACRO, __VA_ARGS__) #define DO_809(MACRO, ...) \ MACRO(809, __VA_ARGS__) \ DO_808(MACRO, __VA_ARGS__) #define DO_810(MACRO, ...) \ MACRO(810, __VA_ARGS__) \ DO_809(MACRO, __VA_ARGS__) #define DO_811(MACRO, ...) \ MACRO(811, __VA_ARGS__) \ DO_810(MACRO, __VA_ARGS__) #define DO_812(MACRO, ...) \ MACRO(812, __VA_ARGS__) \ DO_811(MACRO, __VA_ARGS__) #define DO_813(MACRO, ...) \ MACRO(813, __VA_ARGS__) \ DO_812(MACRO, __VA_ARGS__) #define DO_814(MACRO, ...) \ MACRO(814, __VA_ARGS__) \ DO_813(MACRO, __VA_ARGS__) #define DO_815(MACRO, ...) \ MACRO(815, __VA_ARGS__) \ DO_814(MACRO, __VA_ARGS__) #define DO_816(MACRO, ...) \ MACRO(816, __VA_ARGS__) \ DO_815(MACRO, __VA_ARGS__) #define DO_817(MACRO, ...) \ MACRO(817, __VA_ARGS__) \ DO_816(MACRO, __VA_ARGS__) #define DO_818(MACRO, ...) \ MACRO(818, __VA_ARGS__) \ DO_817(MACRO, __VA_ARGS__) #define DO_819(MACRO, ...) \ MACRO(819, __VA_ARGS__) \ DO_818(MACRO, __VA_ARGS__) #define DO_820(MACRO, ...) \ MACRO(820, __VA_ARGS__) \ DO_819(MACRO, __VA_ARGS__) #define DO_821(MACRO, ...) \ MACRO(821, __VA_ARGS__) \ DO_820(MACRO, __VA_ARGS__) #define DO_822(MACRO, ...) \ MACRO(822, __VA_ARGS__) \ DO_821(MACRO, __VA_ARGS__) #define DO_823(MACRO, ...) \ MACRO(823, __VA_ARGS__) \ DO_822(MACRO, __VA_ARGS__) #define DO_824(MACRO, ...) \ MACRO(824, __VA_ARGS__) \ DO_823(MACRO, __VA_ARGS__) #define DO_825(MACRO, ...) \ MACRO(825, __VA_ARGS__) \ DO_824(MACRO, __VA_ARGS__) #define DO_826(MACRO, ...) \ MACRO(826, __VA_ARGS__) \ DO_825(MACRO, __VA_ARGS__) #define DO_827(MACRO, ...) \ MACRO(827, __VA_ARGS__) \ DO_826(MACRO, __VA_ARGS__) #define DO_828(MACRO, ...) \ MACRO(828, __VA_ARGS__) \ DO_827(MACRO, __VA_ARGS__) #define DO_829(MACRO, ...) \ MACRO(829, __VA_ARGS__) \ DO_828(MACRO, __VA_ARGS__) #define DO_830(MACRO, ...) \ MACRO(830, __VA_ARGS__) \ DO_829(MACRO, __VA_ARGS__) #define DO_831(MACRO, ...) \ MACRO(831, __VA_ARGS__) \ DO_830(MACRO, __VA_ARGS__) #define DO_832(MACRO, ...) \ MACRO(832, __VA_ARGS__) \ DO_831(MACRO, __VA_ARGS__) #define DO_833(MACRO, ...) \ MACRO(833, __VA_ARGS__) \ DO_832(MACRO, __VA_ARGS__) #define DO_834(MACRO, ...) \ MACRO(834, __VA_ARGS__) \ DO_833(MACRO, __VA_ARGS__) #define DO_835(MACRO, ...) \ MACRO(835, __VA_ARGS__) \ DO_834(MACRO, __VA_ARGS__) #define DO_836(MACRO, ...) \ MACRO(836, __VA_ARGS__) \ DO_835(MACRO, __VA_ARGS__) #define DO_837(MACRO, ...) \ MACRO(837, __VA_ARGS__) \ DO_836(MACRO, __VA_ARGS__) #define DO_838(MACRO, ...) \ MACRO(838, __VA_ARGS__) \ DO_837(MACRO, __VA_ARGS__) #define DO_839(MACRO, ...) \ MACRO(839, __VA_ARGS__) \ DO_838(MACRO, __VA_ARGS__) #define DO_840(MACRO, ...) \ MACRO(840, __VA_ARGS__) \ DO_839(MACRO, __VA_ARGS__) #define DO_841(MACRO, ...) \ MACRO(841, __VA_ARGS__) \ DO_840(MACRO, __VA_ARGS__) #define DO_842(MACRO, ...) \ MACRO(842, __VA_ARGS__) \ DO_841(MACRO, __VA_ARGS__) #define DO_843(MACRO, ...) \ MACRO(843, __VA_ARGS__) \ DO_842(MACRO, __VA_ARGS__) #define DO_844(MACRO, ...) \ MACRO(844, __VA_ARGS__) \ DO_843(MACRO, __VA_ARGS__) #define DO_845(MACRO, ...) \ MACRO(845, __VA_ARGS__) \ DO_844(MACRO, __VA_ARGS__) #define DO_846(MACRO, ...) \ MACRO(846, __VA_ARGS__) \ DO_845(MACRO, __VA_ARGS__) #define DO_847(MACRO, ...) \ MACRO(847, __VA_ARGS__) \ DO_846(MACRO, __VA_ARGS__) #define DO_848(MACRO, ...) \ MACRO(848, __VA_ARGS__) \ DO_847(MACRO, __VA_ARGS__) #define DO_849(MACRO, ...) \ MACRO(849, __VA_ARGS__) \ DO_848(MACRO, __VA_ARGS__) #define DO_850(MACRO, ...) \ MACRO(850, __VA_ARGS__) \ DO_849(MACRO, __VA_ARGS__) #define DO_851(MACRO, ...) \ MACRO(851, __VA_ARGS__) \ DO_850(MACRO, __VA_ARGS__) #define DO_852(MACRO, ...) \ MACRO(852, __VA_ARGS__) \ DO_851(MACRO, __VA_ARGS__) #define DO_853(MACRO, ...) \ MACRO(853, __VA_ARGS__) \ DO_852(MACRO, __VA_ARGS__) #define DO_854(MACRO, ...) \ MACRO(854, __VA_ARGS__) \ DO_853(MACRO, __VA_ARGS__) #define DO_855(MACRO, ...) \ MACRO(855, __VA_ARGS__) \ DO_854(MACRO, __VA_ARGS__) #define DO_856(MACRO, ...) \ MACRO(856, __VA_ARGS__) \ DO_855(MACRO, __VA_ARGS__) #define DO_857(MACRO, ...) \ MACRO(857, __VA_ARGS__) \ DO_856(MACRO, __VA_ARGS__) #define DO_858(MACRO, ...) \ MACRO(858, __VA_ARGS__) \ DO_857(MACRO, __VA_ARGS__) #define DO_859(MACRO, ...) \ MACRO(859, __VA_ARGS__) \ DO_858(MACRO, __VA_ARGS__) #define DO_860(MACRO, ...) \ MACRO(860, __VA_ARGS__) \ DO_859(MACRO, __VA_ARGS__) #define DO_861(MACRO, ...) \ MACRO(861, __VA_ARGS__) \ DO_860(MACRO, __VA_ARGS__) #define DO_862(MACRO, ...) \ MACRO(862, __VA_ARGS__) \ DO_861(MACRO, __VA_ARGS__) #define DO_863(MACRO, ...) \ MACRO(863, __VA_ARGS__) \ DO_862(MACRO, __VA_ARGS__) #define DO_864(MACRO, ...) \ MACRO(864, __VA_ARGS__) \ DO_863(MACRO, __VA_ARGS__) #define DO_865(MACRO, ...) \ MACRO(865, __VA_ARGS__) \ DO_864(MACRO, __VA_ARGS__) #define DO_866(MACRO, ...) \ MACRO(866, __VA_ARGS__) \ DO_865(MACRO, __VA_ARGS__) #define DO_867(MACRO, ...) \ MACRO(867, __VA_ARGS__) \ DO_866(MACRO, __VA_ARGS__) #define DO_868(MACRO, ...) \ MACRO(868, __VA_ARGS__) \ DO_867(MACRO, __VA_ARGS__) #define DO_869(MACRO, ...) \ MACRO(869, __VA_ARGS__) \ DO_868(MACRO, __VA_ARGS__) #define DO_870(MACRO, ...) \ MACRO(870, __VA_ARGS__) \ DO_869(MACRO, __VA_ARGS__) #define DO_871(MACRO, ...) \ MACRO(871, __VA_ARGS__) \ DO_870(MACRO, __VA_ARGS__) #define DO_872(MACRO, ...) \ MACRO(872, __VA_ARGS__) \ DO_871(MACRO, __VA_ARGS__) #define DO_873(MACRO, ...) \ MACRO(873, __VA_ARGS__) \ DO_872(MACRO, __VA_ARGS__) #define DO_874(MACRO, ...) \ MACRO(874, __VA_ARGS__) \ DO_873(MACRO, __VA_ARGS__) #define DO_875(MACRO, ...) \ MACRO(875, __VA_ARGS__) \ DO_874(MACRO, __VA_ARGS__) #define DO_876(MACRO, ...) \ MACRO(876, __VA_ARGS__) \ DO_875(MACRO, __VA_ARGS__) #define DO_877(MACRO, ...) \ MACRO(877, __VA_ARGS__) \ DO_876(MACRO, __VA_ARGS__) #define DO_878(MACRO, ...) \ MACRO(878, __VA_ARGS__) \ DO_877(MACRO, __VA_ARGS__) #define DO_879(MACRO, ...) \ MACRO(879, __VA_ARGS__) \ DO_878(MACRO, __VA_ARGS__) #define DO_880(MACRO, ...) \ MACRO(880, __VA_ARGS__) \ DO_879(MACRO, __VA_ARGS__) #define DO_881(MACRO, ...) \ MACRO(881, __VA_ARGS__) \ DO_880(MACRO, __VA_ARGS__) #define DO_882(MACRO, ...) \ MACRO(882, __VA_ARGS__) \ DO_881(MACRO, __VA_ARGS__) #define DO_883(MACRO, ...) \ MACRO(883, __VA_ARGS__) \ DO_882(MACRO, __VA_ARGS__) #define DO_884(MACRO, ...) \ MACRO(884, __VA_ARGS__) \ DO_883(MACRO, __VA_ARGS__) #define DO_885(MACRO, ...) \ MACRO(885, __VA_ARGS__) \ DO_884(MACRO, __VA_ARGS__) #define DO_886(MACRO, ...) \ MACRO(886, __VA_ARGS__) \ DO_885(MACRO, __VA_ARGS__) #define DO_887(MACRO, ...) \ MACRO(887, __VA_ARGS__) \ DO_886(MACRO, __VA_ARGS__) #define DO_888(MACRO, ...) \ MACRO(888, __VA_ARGS__) \ DO_887(MACRO, __VA_ARGS__) #define DO_889(MACRO, ...) \ MACRO(889, __VA_ARGS__) \ DO_888(MACRO, __VA_ARGS__) #define DO_890(MACRO, ...) \ MACRO(890, __VA_ARGS__) \ DO_889(MACRO, __VA_ARGS__) #define DO_891(MACRO, ...) \ MACRO(891, __VA_ARGS__) \ DO_890(MACRO, __VA_ARGS__) #define DO_892(MACRO, ...) \ MACRO(892, __VA_ARGS__) \ DO_891(MACRO, __VA_ARGS__) #define DO_893(MACRO, ...) \ MACRO(893, __VA_ARGS__) \ DO_892(MACRO, __VA_ARGS__) #define DO_894(MACRO, ...) \ MACRO(894, __VA_ARGS__) \ DO_893(MACRO, __VA_ARGS__) #define DO_895(MACRO, ...) \ MACRO(895, __VA_ARGS__) \ DO_894(MACRO, __VA_ARGS__) #define DO_896(MACRO, ...) \ MACRO(896, __VA_ARGS__) \ DO_895(MACRO, __VA_ARGS__) #define DO_897(MACRO, ...) \ MACRO(897, __VA_ARGS__) \ DO_896(MACRO, __VA_ARGS__) #define DO_898(MACRO, ...) \ MACRO(898, __VA_ARGS__) \ DO_897(MACRO, __VA_ARGS__) #define DO_899(MACRO, ...) \ MACRO(899, __VA_ARGS__) \ DO_898(MACRO, __VA_ARGS__) #define DO_900(MACRO, ...) \ MACRO(900, __VA_ARGS__) \ DO_899(MACRO, __VA_ARGS__) #define DO_901(MACRO, ...) \ MACRO(901, __VA_ARGS__) \ DO_900(MACRO, __VA_ARGS__) #define DO_902(MACRO, ...) \ MACRO(902, __VA_ARGS__) \ DO_901(MACRO, __VA_ARGS__) #define DO_903(MACRO, ...) \ MACRO(903, __VA_ARGS__) \ DO_902(MACRO, __VA_ARGS__) #define DO_904(MACRO, ...) \ MACRO(904, __VA_ARGS__) \ DO_903(MACRO, __VA_ARGS__) #define DO_905(MACRO, ...) \ MACRO(905, __VA_ARGS__) \ DO_904(MACRO, __VA_ARGS__) #define DO_906(MACRO, ...) \ MACRO(906, __VA_ARGS__) \ DO_905(MACRO, __VA_ARGS__) #define DO_907(MACRO, ...) \ MACRO(907, __VA_ARGS__) \ DO_906(MACRO, __VA_ARGS__) #define DO_908(MACRO, ...) \ MACRO(908, __VA_ARGS__) \ DO_907(MACRO, __VA_ARGS__) #define DO_909(MACRO, ...) \ MACRO(909, __VA_ARGS__) \ DO_908(MACRO, __VA_ARGS__) #define DO_910(MACRO, ...) \ MACRO(910, __VA_ARGS__) \ DO_909(MACRO, __VA_ARGS__) #define DO_911(MACRO, ...) \ MACRO(911, __VA_ARGS__) \ DO_910(MACRO, __VA_ARGS__) #define DO_912(MACRO, ...) \ MACRO(912, __VA_ARGS__) \ DO_911(MACRO, __VA_ARGS__) #define DO_913(MACRO, ...) \ MACRO(913, __VA_ARGS__) \ DO_912(MACRO, __VA_ARGS__) #define DO_914(MACRO, ...) \ MACRO(914, __VA_ARGS__) \ DO_913(MACRO, __VA_ARGS__) #define DO_915(MACRO, ...) \ MACRO(915, __VA_ARGS__) \ DO_914(MACRO, __VA_ARGS__) #define DO_916(MACRO, ...) \ MACRO(916, __VA_ARGS__) \ DO_915(MACRO, __VA_ARGS__) #define DO_917(MACRO, ...) \ MACRO(917, __VA_ARGS__) \ DO_916(MACRO, __VA_ARGS__) #define DO_918(MACRO, ...) \ MACRO(918, __VA_ARGS__) \ DO_917(MACRO, __VA_ARGS__) #define DO_919(MACRO, ...) \ MACRO(919, __VA_ARGS__) \ DO_918(MACRO, __VA_ARGS__) #define DO_920(MACRO, ...) \ MACRO(920, __VA_ARGS__) \ DO_919(MACRO, __VA_ARGS__) #define DO_921(MACRO, ...) \ MACRO(921, __VA_ARGS__) \ DO_920(MACRO, __VA_ARGS__) #define DO_922(MACRO, ...) \ MACRO(922, __VA_ARGS__) \ DO_921(MACRO, __VA_ARGS__) #define DO_923(MACRO, ...) \ MACRO(923, __VA_ARGS__) \ DO_922(MACRO, __VA_ARGS__) #define DO_924(MACRO, ...) \ MACRO(924, __VA_ARGS__) \ DO_923(MACRO, __VA_ARGS__) #define DO_925(MACRO, ...) \ MACRO(925, __VA_ARGS__) \ DO_924(MACRO, __VA_ARGS__) #define DO_926(MACRO, ...) \ MACRO(926, __VA_ARGS__) \ DO_925(MACRO, __VA_ARGS__) #define DO_927(MACRO, ...) \ MACRO(927, __VA_ARGS__) \ DO_926(MACRO, __VA_ARGS__) #define DO_928(MACRO, ...) \ MACRO(928, __VA_ARGS__) \ DO_927(MACRO, __VA_ARGS__) #define DO_929(MACRO, ...) \ MACRO(929, __VA_ARGS__) \ DO_928(MACRO, __VA_ARGS__) #define DO_930(MACRO, ...) \ MACRO(930, __VA_ARGS__) \ DO_929(MACRO, __VA_ARGS__) #define DO_931(MACRO, ...) \ MACRO(931, __VA_ARGS__) \ DO_930(MACRO, __VA_ARGS__) #define DO_932(MACRO, ...) \ MACRO(932, __VA_ARGS__) \ DO_931(MACRO, __VA_ARGS__) #define DO_933(MACRO, ...) \ MACRO(933, __VA_ARGS__) \ DO_932(MACRO, __VA_ARGS__) #define DO_934(MACRO, ...) \ MACRO(934, __VA_ARGS__) \ DO_933(MACRO, __VA_ARGS__) #define DO_935(MACRO, ...) \ MACRO(935, __VA_ARGS__) \ DO_934(MACRO, __VA_ARGS__) #define DO_936(MACRO, ...) \ MACRO(936, __VA_ARGS__) \ DO_935(MACRO, __VA_ARGS__) #define DO_937(MACRO, ...) \ MACRO(937, __VA_ARGS__) \ DO_936(MACRO, __VA_ARGS__) #define DO_938(MACRO, ...) \ MACRO(938, __VA_ARGS__) \ DO_937(MACRO, __VA_ARGS__) #define DO_939(MACRO, ...) \ MACRO(939, __VA_ARGS__) \ DO_938(MACRO, __VA_ARGS__) #define DO_940(MACRO, ...) \ MACRO(940, __VA_ARGS__) \ DO_939(MACRO, __VA_ARGS__) #define DO_941(MACRO, ...) \ MACRO(941, __VA_ARGS__) \ DO_940(MACRO, __VA_ARGS__) #define DO_942(MACRO, ...) \ MACRO(942, __VA_ARGS__) \ DO_941(MACRO, __VA_ARGS__) #define DO_943(MACRO, ...) \ MACRO(943, __VA_ARGS__) \ DO_942(MACRO, __VA_ARGS__) #define DO_944(MACRO, ...) \ MACRO(944, __VA_ARGS__) \ DO_943(MACRO, __VA_ARGS__) #define DO_945(MACRO, ...) \ MACRO(945, __VA_ARGS__) \ DO_944(MACRO, __VA_ARGS__) #define DO_946(MACRO, ...) \ MACRO(946, __VA_ARGS__) \ DO_945(MACRO, __VA_ARGS__) #define DO_947(MACRO, ...) \ MACRO(947, __VA_ARGS__) \ DO_946(MACRO, __VA_ARGS__) #define DO_948(MACRO, ...) \ MACRO(948, __VA_ARGS__) \ DO_947(MACRO, __VA_ARGS__) #define DO_949(MACRO, ...) \ MACRO(949, __VA_ARGS__) \ DO_948(MACRO, __VA_ARGS__) #define DO_950(MACRO, ...) \ MACRO(950, __VA_ARGS__) \ DO_949(MACRO, __VA_ARGS__) #define DO_951(MACRO, ...) \ MACRO(951, __VA_ARGS__) \ DO_950(MACRO, __VA_ARGS__) #define DO_952(MACRO, ...) \ MACRO(952, __VA_ARGS__) \ DO_951(MACRO, __VA_ARGS__) #define DO_953(MACRO, ...) \ MACRO(953, __VA_ARGS__) \ DO_952(MACRO, __VA_ARGS__) #define DO_954(MACRO, ...) \ MACRO(954, __VA_ARGS__) \ DO_953(MACRO, __VA_ARGS__) #define DO_955(MACRO, ...) \ MACRO(955, __VA_ARGS__) \ DO_954(MACRO, __VA_ARGS__) #define DO_956(MACRO, ...) \ MACRO(956, __VA_ARGS__) \ DO_955(MACRO, __VA_ARGS__) #define DO_957(MACRO, ...) \ MACRO(957, __VA_ARGS__) \ DO_956(MACRO, __VA_ARGS__) #define DO_958(MACRO, ...) \ MACRO(958, __VA_ARGS__) \ DO_957(MACRO, __VA_ARGS__) #define DO_959(MACRO, ...) \ MACRO(959, __VA_ARGS__) \ DO_958(MACRO, __VA_ARGS__) #define DO_960(MACRO, ...) \ MACRO(960, __VA_ARGS__) \ DO_959(MACRO, __VA_ARGS__) #define DO_961(MACRO, ...) \ MACRO(961, __VA_ARGS__) \ DO_960(MACRO, __VA_ARGS__) #define DO_962(MACRO, ...) \ MACRO(962, __VA_ARGS__) \ DO_961(MACRO, __VA_ARGS__) #define DO_963(MACRO, ...) \ MACRO(963, __VA_ARGS__) \ DO_962(MACRO, __VA_ARGS__) #define DO_964(MACRO, ...) \ MACRO(964, __VA_ARGS__) \ DO_963(MACRO, __VA_ARGS__) #define DO_965(MACRO, ...) \ MACRO(965, __VA_ARGS__) \ DO_964(MACRO, __VA_ARGS__) #define DO_966(MACRO, ...) \ MACRO(966, __VA_ARGS__) \ DO_965(MACRO, __VA_ARGS__) #define DO_967(MACRO, ...) \ MACRO(967, __VA_ARGS__) \ DO_966(MACRO, __VA_ARGS__) #define DO_968(MACRO, ...) \ MACRO(968, __VA_ARGS__) \ DO_967(MACRO, __VA_ARGS__) #define DO_969(MACRO, ...) \ MACRO(969, __VA_ARGS__) \ DO_968(MACRO, __VA_ARGS__) #define DO_970(MACRO, ...) \ MACRO(970, __VA_ARGS__) \ DO_969(MACRO, __VA_ARGS__) #define DO_971(MACRO, ...) \ MACRO(971, __VA_ARGS__) \ DO_970(MACRO, __VA_ARGS__) #define DO_972(MACRO, ...) \ MACRO(972, __VA_ARGS__) \ DO_971(MACRO, __VA_ARGS__) #define DO_973(MACRO, ...) \ MACRO(973, __VA_ARGS__) \ DO_972(MACRO, __VA_ARGS__) #define DO_974(MACRO, ...) \ MACRO(974, __VA_ARGS__) \ DO_973(MACRO, __VA_ARGS__) #define DO_975(MACRO, ...) \ MACRO(975, __VA_ARGS__) \ DO_974(MACRO, __VA_ARGS__) #define DO_976(MACRO, ...) \ MACRO(976, __VA_ARGS__) \ DO_975(MACRO, __VA_ARGS__) #define DO_977(MACRO, ...) \ MACRO(977, __VA_ARGS__) \ DO_976(MACRO, __VA_ARGS__) #define DO_978(MACRO, ...) \ MACRO(978, __VA_ARGS__) \ DO_977(MACRO, __VA_ARGS__) #define DO_979(MACRO, ...) \ MACRO(979, __VA_ARGS__) \ DO_978(MACRO, __VA_ARGS__) #define DO_980(MACRO, ...) \ MACRO(980, __VA_ARGS__) \ DO_979(MACRO, __VA_ARGS__) #define DO_981(MACRO, ...) \ MACRO(981, __VA_ARGS__) \ DO_980(MACRO, __VA_ARGS__) #define DO_982(MACRO, ...) \ MACRO(982, __VA_ARGS__) \ DO_981(MACRO, __VA_ARGS__) #define DO_983(MACRO, ...) \ MACRO(983, __VA_ARGS__) \ DO_982(MACRO, __VA_ARGS__) #define DO_984(MACRO, ...) \ MACRO(984, __VA_ARGS__) \ DO_983(MACRO, __VA_ARGS__) #define DO_985(MACRO, ...) \ MACRO(985, __VA_ARGS__) \ DO_984(MACRO, __VA_ARGS__) #define DO_986(MACRO, ...) \ MACRO(986, __VA_ARGS__) \ DO_985(MACRO, __VA_ARGS__) #define DO_987(MACRO, ...) \ MACRO(987, __VA_ARGS__) \ DO_986(MACRO, __VA_ARGS__) #define DO_988(MACRO, ...) \ MACRO(988, __VA_ARGS__) \ DO_987(MACRO, __VA_ARGS__) #define DO_989(MACRO, ...) \ MACRO(989, __VA_ARGS__) \ DO_988(MACRO, __VA_ARGS__) #define DO_990(MACRO, ...) \ MACRO(990, __VA_ARGS__) \ DO_989(MACRO, __VA_ARGS__) #define DO_991(MACRO, ...) \ MACRO(991, __VA_ARGS__) \ DO_990(MACRO, __VA_ARGS__) #define DO_992(MACRO, ...) \ MACRO(992, __VA_ARGS__) \ DO_991(MACRO, __VA_ARGS__) #define DO_993(MACRO, ...) \ MACRO(993, __VA_ARGS__) \ DO_992(MACRO, __VA_ARGS__) #define DO_994(MACRO, ...) \ MACRO(994, __VA_ARGS__) \ DO_993(MACRO, __VA_ARGS__) #define DO_995(MACRO, ...) \ MACRO(995, __VA_ARGS__) \ DO_994(MACRO, __VA_ARGS__) #define DO_996(MACRO, ...) \ MACRO(996, __VA_ARGS__) \ DO_995(MACRO, __VA_ARGS__) #define DO_997(MACRO, ...) \ MACRO(997, __VA_ARGS__) \ DO_996(MACRO, __VA_ARGS__) #define DO_998(MACRO, ...) \ MACRO(998, __VA_ARGS__) \ DO_997(MACRO, __VA_ARGS__) #define DO_999(MACRO, ...) \ MACRO(999, __VA_ARGS__) \ DO_998(MACRO, __VA_ARGS__) #define DO_1000(MACRO, ...) \ MACRO(1000, __VA_ARGS__) \ DO_999(MACRO, __VA_ARGS__) #define DO_1001(MACRO, ...) \ MACRO(1001, __VA_ARGS__) \ DO_1000(MACRO, __VA_ARGS__) #define DO_1002(MACRO, ...) \ MACRO(1002, __VA_ARGS__) \ DO_1001(MACRO, __VA_ARGS__) #define DO_1003(MACRO, ...) \ MACRO(1003, __VA_ARGS__) \ DO_1002(MACRO, __VA_ARGS__) #define DO_1004(MACRO, ...) \ MACRO(1004, __VA_ARGS__) \ DO_1003(MACRO, __VA_ARGS__) #define DO_1005(MACRO, ...) \ MACRO(1005, __VA_ARGS__) \ DO_1004(MACRO, __VA_ARGS__) #define DO_1006(MACRO, ...) \ MACRO(1006, __VA_ARGS__) \ DO_1005(MACRO, __VA_ARGS__) #define DO_1007(MACRO, ...) \ MACRO(1007, __VA_ARGS__) \ DO_1006(MACRO, __VA_ARGS__) #define DO_1008(MACRO, ...) \ MACRO(1008, __VA_ARGS__) \ DO_1007(MACRO, __VA_ARGS__) #define DO_1009(MACRO, ...) \ MACRO(1009, __VA_ARGS__) \ DO_1008(MACRO, __VA_ARGS__) #define DO_1010(MACRO, ...) \ MACRO(1010, __VA_ARGS__) \ DO_1009(MACRO, __VA_ARGS__) #define DO_1011(MACRO, ...) \ MACRO(1011, __VA_ARGS__) \ DO_1010(MACRO, __VA_ARGS__) #define DO_1012(MACRO, ...) \ MACRO(1012, __VA_ARGS__) \ DO_1011(MACRO, __VA_ARGS__) #define DO_1013(MACRO, ...) \ MACRO(1013, __VA_ARGS__) \ DO_1012(MACRO, __VA_ARGS__) #define DO_1014(MACRO, ...) \ MACRO(1014, __VA_ARGS__) \ DO_1013(MACRO, __VA_ARGS__) #define DO_1015(MACRO, ...) \ MACRO(1015, __VA_ARGS__) \ DO_1014(MACRO, __VA_ARGS__) #define DO_1016(MACRO, ...) \ MACRO(1016, __VA_ARGS__) \ DO_1015(MACRO, __VA_ARGS__) #define DO_1017(MACRO, ...) \ MACRO(1017, __VA_ARGS__) \ DO_1016(MACRO, __VA_ARGS__) #define DO_1018(MACRO, ...) \ MACRO(1018, __VA_ARGS__) \ DO_1017(MACRO, __VA_ARGS__) #define DO_1019(MACRO, ...) \ MACRO(1019, __VA_ARGS__) \ DO_1018(MACRO, __VA_ARGS__) #define DO_1020(MACRO, ...) \ MACRO(1020, __VA_ARGS__) \ DO_1019(MACRO, __VA_ARGS__) #define DO_1021(MACRO, ...) \ MACRO(1021, __VA_ARGS__) \ DO_1020(MACRO, __VA_ARGS__) #define DO_1022(MACRO, ...) \ MACRO(1022, __VA_ARGS__) \ DO_1021(MACRO, __VA_ARGS__) #define DO_1023(MACRO, ...) \ MACRO(1023, __VA_ARGS__) \ DO_1022(MACRO, __VA_ARGS__) #define DO_1024(MACRO, ...) \ MACRO(1024, __VA_ARGS__) \ DO_1023(MACRO, __VA_ARGS__) #define DO(TIMES, MACRO, ...) C2(DO_, TIMES)(MACRO, __VA_ARGS__) /* we need some sort of macro that does: IF(0, "true", "false") => "false" IF(1, "true", "false") => "true" IF(X, "true", "false") => "true" */ #define INTERNALIF(x) INTERNALIF##x #define INTERNALIF0 #define ISZERO(x) COUNT_ARG(INTERNALIF(x)) #define IF(condition, trueBranch, falseBranch) C2(IF,ISZERO(condition))(trueBranch, falseBranch) #define IF0(trueBranch, falseBranch) falseBranch #define IF1(trueBranch, falseBranch) trueBranch #define DEFINE_ENUMERATION_CONSTANT(x) x, /*DEFINE_ENUM goes to header*/ #define DEFINE_ENUM(enumName, ...) typedef enum C2(enumName, _TAG) { FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; \ extern const char* C2(enumName,Strings)(enumName value); \ extern int C2(enumName, _FromString)(const char* enumAsString, enumName* destination); #define DEFINE_ENUMERATION_CONSTANT_AS_WIDESTRING(x) C2(L, TOSTRING(x)) , #define DEFINE_ENUMERATION_CONSTANT_AS_STRING(x) TOSTRING(x) , /*DEFINE_ENUM_STRINGS goes to .c*/ #define DEFINE_ENUM_STRINGS(enumName, ...) const char* C2(enumName, StringStorage)[COUNT_ARG(__VA_ARGS__)] = {FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__)}; \ const char* C2(enumName,Strings)(enumName value) \ { \ if((int)value<0 || (int)value>=COUNT_ARG(__VA_ARGS__)) \ { \ /*this is an error case*/ \ return NULL; \ } \ else \ { \ return C2(enumName, StringStorage)[value]; \ } \ } \ int C2(enumName, _FromString)(const char* enumAsString, enumName* destination) \ { \ if( \ (enumAsString==NULL) || (destination==NULL) \ ) \ { \ return __FAILURE__; \ } \ else \ { \ size_t i; \ for(i=0;i=COUNT_ARG(__VA_ARGS__)) \ { \ /*this is an error case*/ \ return NULL; \ } \ else \ { \ return C2(enumName, StringStorage)[value]; \ } \ } #else #define DEFINE_LOCAL_ENUM(enumName, ...) typedef enum C2(enumName, _TAG) { FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; #endif map.h000066400000000000000000000200461362133436400355170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file map.h * @brief Map is a module that implements a dictionary of @c STRING_HANDLE * keys to @c STRING_HANDLE values. */ #ifndef MAP_H #define MAP_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #define MAP_RESULT_VALUES \ MAP_OK, \ MAP_ERROR, \ MAP_INVALIDARG, \ MAP_KEYEXISTS, \ MAP_KEYNOTFOUND, \ MAP_FILTER_REJECT /** @brief Enumeration specifying the status of calls to various APIs in this * module. */ DEFINE_ENUM(MAP_RESULT, MAP_RESULT_VALUES); typedef struct MAP_HANDLE_DATA_TAG* MAP_HANDLE; typedef int (*MAP_FILTER_CALLBACK)(const char* mapProperty, const char* mapValue); /** * @brief Creates a new, empty map. * * @param mapFilterFunc A callback function supplied by the caller that is * invoked during calls to ::Map_Add and * ::Map_AddOrUpdate to provide the caller an * opportunity to indicate whether the new entry or * the update to an existing entry can be made or not. * The callback function can request that the operation * be canceled by returning a non-zero value from the * callback. * * @return A valid @c MAP_HANDLE or @c NULL in case an error occurs. */ MOCKABLE_FUNCTION(, MAP_HANDLE, Map_Create, MAP_FILTER_CALLBACK, mapFilterFunc); /** * @brief Release all resources associated with the map. * * @param handle The handle to an existing map. */ MOCKABLE_FUNCTION(, void, Map_Destroy, MAP_HANDLE, handle); /** * @brief Creates a copy of the map indicated by @p handle and returns a * handle to it. * * @param handle The handle to an existing map. * * @return A valid @c MAP_HANDLE to the cloned copy of the map or @c NULL * in case an error occurs. */ MOCKABLE_FUNCTION(, MAP_HANDLE, Map_Clone, MAP_HANDLE, handle); /** * @brief Adds a key/value pair to the map. * * @param handle The handle to an existing map. * @param key The @c key to be used for this map entry. * @param value The @c value to be associated with @p key. * * If a non-NULL pointer to a callback function was supplied * via the @c mapFilterFunc parameter when ::Map_Create was * called then that callback is invoked when a new entry is * added and if the callback returns a non-zero value then * the function cancels the add operation and returns * @c MAP_FILTER_REJECT. * * @return If any of the input parameters are @c NULL then this function * returns @c MAP_INVALID_ARG. If the key already exists in the * map then @c MAP_KEYEXISTS is returned. If the filter function * associated with the map rejects the entry then * @c MAP_FILTER_REJECT is returned. In case an error occurs when * the new key is added to the map the function returns @c MAP_ERROR. * If everything goes well then @c MAP_OK is returned. */ MOCKABLE_FUNCTION(, MAP_RESULT, Map_Add, MAP_HANDLE, handle, const char*, key, const char*, value); /** * @brief Adds/updates a key/value pair to the map. * * @param handle The handle to an existing map. * @param key The @c key to be used for this map entry. * @param value The @c value to be associated with @p key. * * This function behaves exactly like ::Map_Add except that if the key * already exists in the map then it overwrites the value with the * supplied value instead of returning an error. If a non-NULL pointer * to a callback function was supplied via the @c mapFilterFunc parameter * when ::Map_Create was called then that callback is invoked when a new * entry is added or when an existing entry is updated and if the * callback returns a non-zero value then the function cancels the * add/update operation and returns @c MAP_FILTER_REJECT. * * @return If any of the input parameters are @c NULL then this function * returns @c MAP_INVALID_ARG. If the filter function associated * with the map rejects the entry then @c MAP_FILTER_REJECT is * returned. In case an error occurs when the new key is * added/updated in the map the function returns @c MAP_ERROR. If * everything goes well then @c MAP_OK is returned. */ MOCKABLE_FUNCTION(, MAP_RESULT, Map_AddOrUpdate, MAP_HANDLE, handle, const char*, key, const char*, value); /** * @brief Removes a key and its associated value from the map. * * @param handle The handle to an existing map. * @param key The @c key of the item to be deleted. * * @return Returns @c MAP_OK if the key was deleted successfully or an * error code otherwise. */ MOCKABLE_FUNCTION(, MAP_RESULT, Map_Delete, MAP_HANDLE, handle, const char*, key); /** * @brief This function returns a boolean value in @p keyExists if the map * contains a key with the same value the parameter @p key. * * @param handle The handle to an existing map. * @param key The key that the caller wants checked. * @param keyExists The function writes @c true at the address pointed at * by this parameter if the key exists in the map and * @c false otherwise. * * @return Returns @c MAP_OK if the check was performed successfully or an * error code otherwise. */ MOCKABLE_FUNCTION(, MAP_RESULT, Map_ContainsKey, MAP_HANDLE, handle, const char*, key, bool*, keyExists); /** * @brief This function returns @c true in @p valueExists if at * least one pair exists in the map where the entry's * value is equal to the parameter @c value. * * @param handle The handle to an existing map. * @param value The value that the caller wants checked. * @param valueExists The function writes @c true at the address pointed at * by this parameter if the value exists in the map and * @c false otherwise. * * @return Returns @c MAP_OK if the check was performed successfully or an * error code otherwise. */ MOCKABLE_FUNCTION(, MAP_RESULT, Map_ContainsValue, MAP_HANDLE, handle, const char*, value, bool*, valueExists); /** * @brief Retrieves the value of a stored key. * * @param handle The handle to an existing map. * @param key The key to be looked up in the map. * * @return Returns @c NULL in case the input arguments are @c NULL or if the * requested key is not found in the map. Returns a pointer to the * key's value otherwise. */ MOCKABLE_FUNCTION(, const char*, Map_GetValueFromKey, MAP_HANDLE, handle, const char*, key); /** * @brief Retrieves the complete list of keys and values from the map * in @p values and @p keys. Also writes the size of the list * in @p count. * * @param handle The handle to an existing map. * @param keys The location where the list of keys is to be written. * @param values The location where the list of values is to be written. * @param count The number of stored keys and values is written at the * location indicated by this pointer. * * @return Returns @c MAP_OK if the keys and values are retrieved and written * successfully or an error code otherwise. */ MOCKABLE_FUNCTION(, MAP_RESULT, Map_GetInternals, MAP_HANDLE, handle, const char*const**, keys, const char*const**, values, size_t*, count); /*this API creates a JSON object from the content of the map*/ MOCKABLE_FUNCTION(, STRING_HANDLE, Map_ToJSON, MAP_HANDLE, handle); #ifdef __cplusplus } #endif #endif /* MAP_H */ optimize_size.h000066400000000000000000000010321362133436400376260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef OPTIMIZE_SIZE_H #define OPTIMIZE_SIZE_H #if (defined __MSP430FR5969__) #define OPTIMIZE_RETURN_CODES #define NO_VERBOSE_OUTPUT #ifdef DEBUG #define MINIMAL_LOGERROR #else #define NO_LOGGING #endif #endif #if (defined OPTIMIZE_RETURN_CODES) #define __FAILURE__ 1 #else #define __FAILURE__ __LINE__ #endif #endif // OPTIMIZE_SIZE_H optionhandler.h000066400000000000000000000041401362133436400376050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef OPTIONHANDLER_H #define OPTIONHANDLER_H #include "azure_c_shared_utility/macro_utils.h" #define OPTIONHANDLER_RESULT_VALUES \ OPTIONHANDLER_OK, \ OPTIONHANDLER_ERROR, \ OPTIONHANDLER_INVALIDARG DEFINE_ENUM(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES) #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "azure_c_shared_utility/umock_c_prod.h" typedef struct OPTIONHANDLER_HANDLE_DATA_TAG* OPTIONHANDLER_HANDLE; /*the following function pointer points to a function that produces a clone of the option specified by name and value (that is, a clone of void* value)*/ /*returns NULL if it failed to produce a clone, otherwise returns a non-NULL value*/ /*to be implemented by every module*/ typedef void* (*pfCloneOption)(const char* name, const void* value); /*the following function pointer points to a function that frees resources allocated for an option*/ /*to be implemented by every module*/ typedef void (*pfDestroyOption)(const char* name, const void* value); /*the following function pointer points to a function that sets an option for a module*/ /*to be implemented by every module*/ /*returns 0 if _SetOption succeeded, any other value is error, if the option is not intended for that module, returns 0*/ typedef int (*pfSetOption)(void* handle, const char* name, const void* value); MOCKABLE_FUNCTION(, OPTIONHANDLER_HANDLE, OptionHandler_Create, pfCloneOption, cloneOption, pfDestroyOption, destroyOption, pfSetOption, setOption); MOCKABLE_FUNCTION(, OPTIONHANDLER_HANDLE, OptionHandler_Clone, OPTIONHANDLER_HANDLE, handler); MOCKABLE_FUNCTION(, OPTIONHANDLER_RESULT, OptionHandler_AddOption, OPTIONHANDLER_HANDLE, handle, const char*, name, const void*, value); MOCKABLE_FUNCTION(, OPTIONHANDLER_RESULT, OptionHandler_FeedOptions, OPTIONHANDLER_HANDLE, handle, void*, destinationHandle); MOCKABLE_FUNCTION(, void, OptionHandler_Destroy, OPTIONHANDLER_HANDLE, handle); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /*OPTIONHANDLER*/ platform.h000066400000000000000000000012761362133436400365720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef PLATFORM_H #define PLATFORM_H #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ MOCKABLE_FUNCTION(, int, platform_init); MOCKABLE_FUNCTION(, void, platform_deinit); MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, platform_get_default_tlsio); MOCKABLE_FUNCTION(, STRING_HANDLE, platform_get_platform_info); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* PLATFORM_H */ refcount.h000066400000000000000000000116751362133436400365770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*this header contains macros for ref_counting a variable. There are no upper bound checks related to uint32_t overflow because we expect that bigger issues are in the system when more than 4 billion references exist to the same variable. In the case when such an overflow occurs, the object's ref count will reach zero (while still having 0xFFFFFFFF references) and likely the controlling code will take the decision to free the object's resources. Then, any of the 0xFFFFFFFF references will interact with deallocated memory / resources resulting in an undefined behavior. */ #ifndef REFCOUNT_H #define REFCOUNT_H #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/macro_utils.h" #ifdef __cplusplus #include #include extern "C" { #else #include #include #endif // Include the platform-specific file that defines atomic functionality #include "refcount_os.h" #define REFCOUNT_TYPE(type) \ struct C2(C2(REFCOUNT_, type), _TAG) #define REFCOUNT_SHORT_TYPE(type) \ C2(REFCOUNT_, type) #define REFCOUNT_TYPE_DECLARE_CREATE(type) C2(REFCOUNT_SHORT_TYPE(type), _Create) #define REFCOUNT_TYPE_DECLARE_CREATE_WITH_EXTRA_SIZE(type) C2(REFCOUNT_SHORT_TYPE(type), _Create_With_Extra_Size) #define REFCOUNT_TYPE_CREATE(type) C2(REFCOUNT_SHORT_TYPE(type), _Create)() #define REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE(type, size) C2(REFCOUNT_SHORT_TYPE(type), _Create_With_Extra_Size)(size) #define REFCOUNT_TYPE_DECLARE_DESTROY(type) C2(REFCOUNT_SHORT_TYPE(type), _Destroy) #define REFCOUNT_TYPE_DESTROY(type, var) C2(REFCOUNT_SHORT_TYPE(type), _Destroy)(var) /*this introduces a new refcount'd type based on another type */ /*and an initializer for that new type that also sets the ref count to 1. The type must not have a flexible array*/ /*the newly allocated memory shall be free'd by free()*/ /*and the ref counting is handled internally by the type in the _Create/ _Create_With_Extra_Size /_Clone /_Destroy functions */ /* Codes_SRS_REFCOUNT_01_005: [ `REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE` shall allocate memory for the type that is ref counted (`type`) plus extra memory enough to hold `size` bytes. ]*/ /* Codes_SRS_REFCOUNT_01_006: [ On success it shall return a non-NULL handle to the allocated ref counted type `type`. ]*/ /* Codes_SRS_REFCOUNT_01_007: [ If any error occurrs, `REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE` shall return NULL. ]*/ #define DEFINE_CREATE_WITH_EXTRA_SIZE(type) \ static type* REFCOUNT_TYPE_DECLARE_CREATE_WITH_EXTRA_SIZE(type)(size_t size) \ { \ REFCOUNT_TYPE(type)* ref_counted = (REFCOUNT_TYPE(type)*)malloc(sizeof(REFCOUNT_TYPE(type)) + size); \ type* result; \ if (ref_counted == NULL) \ { \ result = NULL; \ } \ else \ { \ result = &ref_counted->counted; \ INIT_REF(type, result); \ } \ return result; \ } \ /* Codes_SRS_REFCOUNT_01_002: [ `REFCOUNT_TYPE_CREATE` shall allocate memory for the type that is ref counted. ]*/ /* Codes_SRS_REFCOUNT_01_003: [ On success it shall return a non-NULL handle to the allocated ref counted type `type`. ]*/ /* Codes_SRS_REFCOUNT_01_004: [ If any error occurrs, `REFCOUNT_TYPE_CREATE` shall return NULL. ]*/ #define DEFINE_CREATE(type) \ static type* REFCOUNT_TYPE_DECLARE_CREATE(type) (void) \ { \ return REFCOUNT_TYPE_DECLARE_CREATE_WITH_EXTRA_SIZE(type)(0); \ } \ /* Codes_SRS_REFCOUNT_01_008: [ `REFCOUNT_TYPE_DESTROY` shall free the memory allocated by `REFCOUNT_TYPE_CREATE` or `REFCOUNT_TYPE_CREATE_WITH_EXTRA_MEMORY`. ]*/ /* Codes_SRS_REFCOUNT_01_009: [ If `counted_type` is NULL, `REFCOUNT_TYPE_DESTROY` shall return. ]*/ #define DEFINE_DESTROY(type) \ static void REFCOUNT_TYPE_DECLARE_DESTROY(type)(type* counted_type) \ { \ void* ref_counted = (void*)((unsigned char*)counted_type - offsetof(REFCOUNT_TYPE(type), counted)); \ free(ref_counted); \ } #define DEFINE_REFCOUNT_TYPE(type) \ REFCOUNT_TYPE(type) \ { \ COUNT_TYPE count; \ type counted; \ }; \ DEFINE_CREATE_WITH_EXTRA_SIZE(type) \ DEFINE_CREATE(type) \ DEFINE_DESTROY(type) \ #ifndef DEC_RETURN_ZERO #error refcount_os.h does not define DEC_RETURN_ZERO #endif // !DEC_RETURN_ZERO #ifndef INC_REF_VAR #error refcount_os.h does not define INC_REF_VAR #endif // !INC_REF #ifndef DEC_REF_VAR #error refcount_os.h does not define DEC_REF_VAR #endif // !DEC_REF #ifndef INIT_REF_VAR #error refcount_os.h does not define INIT_REF_VAR #endif // !INIT_REF #define INC_REF(type, var) INC_REF_VAR(((REFCOUNT_TYPE(type)*)((unsigned char*)var - offsetof(REFCOUNT_TYPE(type), counted)))->count) #define DEC_REF(type, var) DEC_REF_VAR(((REFCOUNT_TYPE(type)*)((unsigned char*)var - offsetof(REFCOUNT_TYPE(type), counted)))->count) #define INIT_REF(type, var) INIT_REF_VAR(((REFCOUNT_TYPE(type)*)((unsigned char*)var - offsetof(REFCOUNT_TYPE(type), counted)))->count) #ifdef __cplusplus } #endif #endif /*REFCOUNT_H*/ sastoken.h000066400000000000000000000013611362133436400365700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef SASTOKEN_H #define SASTOKEN_H #include "azure_c_shared_utility/strings.h" #include #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, bool, SASToken_Validate, STRING_HANDLE, sasToken); MOCKABLE_FUNCTION(, STRING_HANDLE, SASToken_Create, STRING_HANDLE, key, STRING_HANDLE, scope, STRING_HANDLE, keyName, size_t, expiry); MOCKABLE_FUNCTION(, STRING_HANDLE, SASToken_CreateString, const char*, key, const char*, scope, const char*, keyName, size_t, expiry); #ifdef __cplusplus } #endif #endif /* SASTOKEN_H */ sha-private.h000066400000000000000000000020261362133436400371630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*************************** sha-private.h ***************************/ /********************** See RFC 4634 for details *********************/ #ifndef _SHA_PRIVATE__H #define _SHA_PRIVATE__H /* * These definitions are defined in FIPS-180-2, section 4.1. * Ch() and Maj() are defined identically in sections 4.1.1, * 4.1.2 and 4.1.3. * * The definitions used in FIPS-180-2 are as follows: */ #ifndef USE_MODIFIED_MACROS #define SHA_Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z))) #define SHA_Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) #else /* USE_MODIFIED_MACROS */ /* * The following definitions are equivalent and potentially faster. */ #define SHA_Ch(x, y, z) (((x) & ((y) ^ (z))) ^ (z)) #define SHA_Maj(x, y, z) (((x) & ((y) | (z))) | ((y) & (z))) #endif /* USE_MODIFIED_MACROS */ #define SHA_Parity(x, y, z) ((x) ^ (y) ^ (z)) #endif /* _SHA_PRIVATE__H */ sha.h000066400000000000000000000234151362133436400355200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /**************************** sha.h ****************************/ /******************* See RFC 4634 for details ******************/ #ifndef _SHA_H_ #define _SHA_H_ #ifdef __cplusplus extern "C" { #endif /* * Description: * This file implements the Secure Hash Signature Standard * algorithms as defined in the National Institute of Standards * and Technology Federal Information Processing Standards * Publication (FIPS PUB) 180-1 published on April 17, 1995, 180-2 * published on August 1, 2002, and the FIPS PUB 180-2 Change * Notice published on February 28, 2004. * * A combined document showing all algorithms is available at * http://csrc.nist.gov/publications/fips/ * fips180-2/fips180-2withchangenotice.pdf * * The five hashes are defined in these sizes: * SHA-1 20 byte / 160 bit * SHA-224 28 byte / 224 bit * SHA-256 32 byte / 256 bit * SHA-384 48 byte / 384 bit * SHA-512 64 byte / 512 bit */ #include /* * If you do not have the ISO standard stdint.h header file, then you * must typedef the following: * name meaning * uint64_t unsigned 64 bit integer * uint32_t unsigned 32 bit integer * uint8_t unsigned 8 bit integer (i.e., unsigned char) * int_least16_t integer of >= 16 bits * */ #ifndef _SHA_enum_ #define _SHA_enum_ /* * All SHA functions return one of these values. */ enum { shaSuccess = 0, shaNull, /* Null pointer parameter */ shaInputTooLong, /* input data too long */ shaStateError, /* called Input after FinalBits or Result */ shaBadParam /* passed a bad parameter */ }; #endif /* _SHA_enum_ */ /* * These constants hold size information for each of the SHA * hashing operations */ enum { SHA1_Message_Block_Size = 64, SHA224_Message_Block_Size = 64, SHA256_Message_Block_Size = 64, SHA384_Message_Block_Size = 128, SHA512_Message_Block_Size = 128, USHA_Max_Message_Block_Size = SHA512_Message_Block_Size, SHA1HashSize = 20, SHA224HashSize = 28, SHA256HashSize = 32, SHA384HashSize = 48, SHA512HashSize = 64, USHAMaxHashSize = SHA512HashSize, SHA1HashSizeBits = 160, SHA224HashSizeBits = 224, SHA256HashSizeBits = 256, SHA384HashSizeBits = 384, SHA512HashSizeBits = 512, USHAMaxHashSizeBits = SHA512HashSizeBits }; /* * These constants are used in the USHA (unified sha) functions. */ typedef enum SHAversion { SHA1, SHA224, SHA256, SHA384, SHA512 } SHAversion; /* * This structure will hold context information for the SHA-1 * hashing operation. */ typedef struct SHA1Context { uint32_t Intermediate_Hash[SHA1HashSize/4]; /* Message Digest */ uint32_t Length_Low; /* Message length in bits */ uint32_t Length_High; /* Message length in bits */ int_least16_t Message_Block_Index; /* Message_Block array index */ /* 512-bit message blocks */ uint8_t Message_Block[SHA1_Message_Block_Size]; int Computed; /* Is the digest computed? */ int Corrupted; /* Is the digest corrupted? */ } SHA1Context; /* * This structure will hold context information for the SHA-256 * hashing operation. */ typedef struct SHA256Context { uint32_t Intermediate_Hash[SHA256HashSize/4]; /* Message Digest */ uint32_t Length_Low; /* Message length in bits */ uint32_t Length_High; /* Message length in bits */ int_least16_t Message_Block_Index; /* Message_Block array index */ /* 512-bit message blocks */ uint8_t Message_Block[SHA256_Message_Block_Size]; int Computed; /* Is the digest computed? */ int Corrupted; /* Is the digest corrupted? */ } SHA256Context; /* * This structure will hold context information for the SHA-512 * hashing operation. */ typedef struct SHA512Context { #ifdef USE_32BIT_ONLY uint32_t Intermediate_Hash[SHA512HashSize/4]; /* Message Digest */ uint32_t Length[4]; /* Message length in bits */ #else /* !USE_32BIT_ONLY */ uint64_t Intermediate_Hash[SHA512HashSize/8]; /* Message Digest */ uint64_t Length_Low, Length_High; /* Message length in bits */ #endif /* USE_32BIT_ONLY */ int_least16_t Message_Block_Index; /* Message_Block array index */ /* 1024-bit message blocks */ uint8_t Message_Block[SHA512_Message_Block_Size]; int Computed; /* Is the digest computed?*/ int Corrupted; /* Is the digest corrupted? */ } SHA512Context; /* * This structure will hold context information for the SHA-224 * hashing operation. It uses the SHA-256 structure for computation. */ typedef struct SHA256Context SHA224Context; /* * This structure will hold context information for the SHA-384 * hashing operation. It uses the SHA-512 structure for computation. */ typedef struct SHA512Context SHA384Context; /* * This structure holds context information for all SHA * hashing operations. */ typedef struct USHAContext { int whichSha; /* which SHA is being used */ union { SHA1Context sha1Context; SHA224Context sha224Context; SHA256Context sha256Context; SHA384Context sha384Context; SHA512Context sha512Context; } ctx; } USHAContext; /* * This structure will hold context information for the HMAC * keyed hashing operation. */ typedef struct HMACContext { int whichSha; /* which SHA is being used */ int hashSize; /* hash size of SHA being used */ int blockSize; /* block size of SHA being used */ USHAContext shaContext; /* SHA context */ unsigned char k_opad[USHA_Max_Message_Block_Size]; /* outer padding - key XORd with opad */ } HMACContext; /* * Function Prototypes */ /* SHA-1 */ extern int SHA1Reset(SHA1Context *); extern int SHA1Input(SHA1Context *, const uint8_t *bytes, unsigned int bytecount); extern int SHA1FinalBits(SHA1Context *, const uint8_t bits, unsigned int bitcount); extern int SHA1Result(SHA1Context *, uint8_t Message_Digest[SHA1HashSize]); /* SHA-224 */ extern int SHA224Reset(SHA224Context *); extern int SHA224Input(SHA224Context *, const uint8_t *bytes, unsigned int bytecount); extern int SHA224FinalBits(SHA224Context *, const uint8_t bits, unsigned int bitcount); extern int SHA224Result(SHA224Context *, uint8_t Message_Digest[SHA224HashSize]); /* SHA-256 */ extern int SHA256Reset(SHA256Context *); extern int SHA256Input(SHA256Context *, const uint8_t *bytes, unsigned int bytecount); extern int SHA256FinalBits(SHA256Context *, const uint8_t bits, unsigned int bitcount); extern int SHA256Result(SHA256Context *, uint8_t Message_Digest[SHA256HashSize]); /* SHA-384 */ extern int SHA384Reset(SHA384Context *); extern int SHA384Input(SHA384Context *, const uint8_t *bytes, unsigned int bytecount); extern int SHA384FinalBits(SHA384Context *, const uint8_t bits, unsigned int bitcount); extern int SHA384Result(SHA384Context *, uint8_t Message_Digest[SHA384HashSize]); /* SHA-512 */ extern int SHA512Reset(SHA512Context *); extern int SHA512Input(SHA512Context *, const uint8_t *bytes, unsigned int bytecount); extern int SHA512FinalBits(SHA512Context *, const uint8_t bits, unsigned int bitcount); extern int SHA512Result(SHA512Context *, uint8_t Message_Digest[SHA512HashSize]); /* Unified SHA functions, chosen by whichSha */ extern int USHAReset(USHAContext *, SHAversion whichSha); extern int USHAInput(USHAContext *, const uint8_t *bytes, unsigned int bytecount); extern int USHAFinalBits(USHAContext *, const uint8_t bits, unsigned int bitcount); extern int USHAResult(USHAContext *, uint8_t Message_Digest[USHAMaxHashSize]); extern int USHABlockSize(enum SHAversion whichSha); extern int USHAHashSize(enum SHAversion whichSha); extern int USHAHashSizeBits(enum SHAversion whichSha); /* * HMAC Keyed-Hashing for Message Authentication, RFC2104, * for all SHAs. * This interface allows a fixed-length text input to be used. */ extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */ const unsigned char *text, /* pointer to data stream */ int text_len, /* length of data stream */ const unsigned char *key, /* pointer to authentication key */ int key_len, /* length of authentication key */ uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */ /* * HMAC Keyed-Hashing for Message Authentication, RFC2104, * for all SHAs. * This interface allows any length of text input to be used. */ extern int hmacReset(HMACContext *ctx, enum SHAversion whichSha, const unsigned char *key, int key_len); extern int hmacInput(HMACContext *ctx, const unsigned char *text, int text_len); extern int hmacFinalBits(HMACContext *ctx, const uint8_t bits, unsigned int bitcount); extern int hmacResult(HMACContext *ctx, uint8_t digest[USHAMaxHashSize]); #ifdef __cplusplus } #endif #endif /* _SHA_H_ */ shared_util_options.h000066400000000000000000000046011362133436400410170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef SHARED_UTIL_OPTIONS_H #define SHARED_UTIL_OPTIONS_H #include "azure_c_shared_utility/const_defines.h" #ifdef __cplusplus extern "C" { #endif typedef struct HTTP_PROXY_OPTIONS_TAG { const char* host_address; int port; const char* username; const char* password; } HTTP_PROXY_OPTIONS; static STATIC_VAR_UNUSED const char* const OPTION_HTTP_PROXY = "proxy_data"; static STATIC_VAR_UNUSED const char* const OPTION_HTTP_TIMEOUT = "timeout"; static STATIC_VAR_UNUSED const char* const OPTION_TRUSTED_CERT = "TrustedCerts"; // Clients should not use OPTION_OPENSSL_CIPHER_SUITE except for very specialized scenarios. // They instead should rely on the underlying client TLS stack and service to negotiate an appropriate cipher. static STATIC_VAR_UNUSED const char* const OPTION_OPENSSL_CIPHER_SUITE = "CipherSuite"; static STATIC_VAR_UNUSED const char* const SU_OPTION_X509_CERT = "x509certificate"; static STATIC_VAR_UNUSED const char* const SU_OPTION_X509_PRIVATE_KEY = "x509privatekey"; static STATIC_VAR_UNUSED const char* const OPTION_X509_ECC_CERT = "x509EccCertificate"; static STATIC_VAR_UNUSED const char* const OPTION_X509_ECC_KEY = "x509EccAliasKey"; static STATIC_VAR_UNUSED const char* const OPTION_CURL_LOW_SPEED_LIMIT = "CURLOPT_LOW_SPEED_LIMIT"; static STATIC_VAR_UNUSED const char* const OPTION_CURL_LOW_SPEED_TIME = "CURLOPT_LOW_SPEED_TIME"; static STATIC_VAR_UNUSED const char* const OPTION_CURL_FRESH_CONNECT = "CURLOPT_FRESH_CONNECT"; static STATIC_VAR_UNUSED const char* const OPTION_CURL_FORBID_REUSE = "CURLOPT_FORBID_REUSE"; static STATIC_VAR_UNUSED const char* const OPTION_CURL_VERBOSE = "CURLOPT_VERBOSE"; static STATIC_VAR_UNUSED const char* const OPTION_NET_INT_MAC_ADDRESS = "net_interface_mac_address"; static STATIC_VAR_UNUSED const char* const OPTION_TLS_VERSION = "tls_version"; static STATIC_VAR_UNUSED const char* const OPTION_ADDRESS_TYPE = "ADDRESS_TYPE"; static STATIC_VAR_UNUSED const char* const OPTION_ADDRESS_TYPE_DOMAIN_SOCKET = "DOMAIN_SOCKET"; static STATIC_VAR_UNUSED const char* const OPTION_ADDRESS_TYPE_IP_SOCKET = "IP_SOCKET"; #ifdef __cplusplus } #endif #endif /* SHARED_UTIL_OPTIONS_H */ singlylinkedlist.h000066400000000000000000000070051362133436400403320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef SINGLYLINKEDLIST_H #define SINGLYLINKEDLIST_H #ifdef __cplusplus extern "C" { #else #include "stdbool.h" #endif /* __cplusplus */ #include "azure_c_shared_utility/umock_c_prod.h" typedef struct SINGLYLINKEDLIST_INSTANCE_TAG* SINGLYLINKEDLIST_HANDLE; typedef struct LIST_ITEM_INSTANCE_TAG* LIST_ITEM_HANDLE; /** * @brief Function passed to singlylinkedlist_find, which returns whichever first list item that matches it. * @param list_item Current list node being evaluated. * @param match_context Context passed to singlylinkedlist_find. * @returns True to indicate that the current list node is the one to be returned, or false to continue traversing the list. */ typedef bool (*LIST_MATCH_FUNCTION)(LIST_ITEM_HANDLE list_item, const void* match_context); /** * @brief Function passed to singlylinkedlist_remove_if, which is used to define if an item of the list should be removed or not. * @param item Value of the current list node being evaluated for removal. * @param match_context Context passed to singlylinkedlist_remove_if. * @param continue_processing Indicates if singlylinkedlist_remove_if shall continue iterating through the next nodes of the list or stop. * @returns True to indicate that the current list node shall be removed, or false to not to. */ typedef bool (*LIST_CONDITION_FUNCTION)(const void* item, const void* match_context, bool* continue_processing); /** * @brief Function passed to singlylinkedlist_foreach, which is called for the value of each node of the list. * @param item Value of the current list node being processed. * @param action_context Context passed to singlylinkedlist_foreach. * @param continue_processing Indicates if singlylinkedlist_foreach shall continue iterating through the next nodes of the list or stop. */ typedef void (*LIST_ACTION_FUNCTION)(const void* item, const void* action_context, bool* continue_processing); MOCKABLE_FUNCTION(, SINGLYLINKEDLIST_HANDLE, singlylinkedlist_create); MOCKABLE_FUNCTION(, void, singlylinkedlist_destroy, SINGLYLINKEDLIST_HANDLE, list); MOCKABLE_FUNCTION(, LIST_ITEM_HANDLE, singlylinkedlist_add, SINGLYLINKEDLIST_HANDLE, list, const void*, item); MOCKABLE_FUNCTION(, LIST_ITEM_HANDLE, singlylinkedlist_add_head, SINGLYLINKEDLIST_HANDLE, list, const void*, item); MOCKABLE_FUNCTION(, int, singlylinkedlist_remove, SINGLYLINKEDLIST_HANDLE, list, LIST_ITEM_HANDLE, item_handle); MOCKABLE_FUNCTION(, LIST_ITEM_HANDLE, singlylinkedlist_get_head_item, SINGLYLINKEDLIST_HANDLE, list); MOCKABLE_FUNCTION(, LIST_ITEM_HANDLE, singlylinkedlist_get_next_item, LIST_ITEM_HANDLE, item_handle); MOCKABLE_FUNCTION(, LIST_ITEM_HANDLE, singlylinkedlist_find, SINGLYLINKEDLIST_HANDLE, list, LIST_MATCH_FUNCTION, match_function, const void*, match_context); MOCKABLE_FUNCTION(, const void*, singlylinkedlist_item_get_value, LIST_ITEM_HANDLE, item_handle); MOCKABLE_FUNCTION(, int, singlylinkedlist_remove_if, SINGLYLINKEDLIST_HANDLE, list, LIST_CONDITION_FUNCTION, condition_function, const void*, match_context); MOCKABLE_FUNCTION(, int, singlylinkedlist_foreach, SINGLYLINKEDLIST_HANDLE, list, LIST_ACTION_FUNCTION, action_function, const void*, action_context); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* SINGLYLINKEDLIST_H */ socketio.h000066400000000000000000000032441362133436400365630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef SOCKETIO_H #define SOCKETIO_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ typedef struct SOCKETIO_CONFIG_TAG { const char* hostname; int port; void* accepted_socket; } SOCKETIO_CONFIG; #define RECEIVE_BYTES_VALUE 1024 MOCKABLE_FUNCTION(, CONCRETE_IO_HANDLE, socketio_create, void*, io_create_parameters); MOCKABLE_FUNCTION(, void, socketio_destroy, CONCRETE_IO_HANDLE, socket_io); MOCKABLE_FUNCTION(, int, socketio_open, CONCRETE_IO_HANDLE, socket_io, ON_IO_OPEN_COMPLETE, on_io_open_complete, void*, on_io_open_complete_context, ON_BYTES_RECEIVED, on_bytes_received, void*, on_bytes_received_context, ON_IO_ERROR, on_io_error, void*, on_io_error_context); MOCKABLE_FUNCTION(, int, socketio_close, CONCRETE_IO_HANDLE, socket_io, ON_IO_CLOSE_COMPLETE, on_io_close_complete, void*, callback_context); MOCKABLE_FUNCTION(, int, socketio_send, CONCRETE_IO_HANDLE, socket_io, const void*, buffer, size_t, size, ON_SEND_COMPLETE, on_send_complete, void*, callback_context); MOCKABLE_FUNCTION(, void, socketio_dowork, CONCRETE_IO_HANDLE, socket_io); MOCKABLE_FUNCTION(, int, socketio_setoption, CONCRETE_IO_HANDLE, socket_io, const char*, optionName, const void*, value); MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, socketio_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* SOCKETIO_H */ stdint_ce6.h000066400000000000000000000006621362133436400370060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; string_token.h000066400000000000000000000117721362133436400374560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STRING_TOKEN_H #define STRING_TOKEN_H #ifdef __cplusplus #include extern "C" { #else #include #include #endif #include "azure_c_shared_utility/umock_c_prod.h" typedef struct STRING_TOKEN_TAG* STRING_TOKEN_HANDLE; /* * @brief Tries to identify the first token defined in source up to its length using the delimiters provided. * @Remark If no delimiter is found, the entire source string becomes the resulting token. Empty tokens (when delimiters occur side-by-side) can also detected. * @param source The initial string to be tokenized. * @param length The length of the source string, not including the null-terminator. * @param delimiters Array with null-terminated strings to be used as token delimiters. * @param n_delims Number of elements in delimiters array. * @return A STRING_TOKEN_HANDLE if no failures occur (arguments, memory allocation), or NULL otherwise. */ MOCKABLE_FUNCTION(, STRING_TOKEN_HANDLE, StringToken_GetFirst, const char*, source, size_t, length, const char**, delimiters, size_t, n_delims); /* * @brief Tries to identify the next token defined in source up to its length using the delimiters provided. * @Remark After StringToken_GetFirst is initially called, StringToken_GetNext shall be called for obtaining the next tokens. * If no delimiter is found, the entire source string becomes the resulting token. * Empty tokens (when delimiters occur side-by-side) can also detected. * @param token The handle returned by StringToken_GetFirst. * @param delimiters Array with null-terminated strings to be used as token delimiters. * @param n_delims Number of elements in delimiters array. * @return True if a token could be identified, or false if the tokenizer already reached the end of the source string an no more tokens are available. */ MOCKABLE_FUNCTION(, bool, StringToken_GetNext, STRING_TOKEN_HANDLE, token, const char**, delimiters, size_t, n_delims); /* * @brief Gets the pointer to the beginning of the current token identified in the source string. * @param token The handle returned by StringToken_GetFirst. * @return The pointer to the token identified in the last successfull call to StringToken_GetFirst or StringToken_GetNext. * If the token string is empty (e.g., between two delimiters side-by-side or if a delimiter occurs at the end of the source string), * NULL is returned instead of an empty string. */ MOCKABLE_FUNCTION(, const char*, StringToken_GetValue, STRING_TOKEN_HANDLE, token); /* * @brief Gets the length of the current token identified in the source string. * @param token The handle returned by StringToken_GetFirst. * @return A non-zero value if the current token is not empty, zero otherwise. */ MOCKABLE_FUNCTION(, size_t, StringToken_GetLength, STRING_TOKEN_HANDLE, token); /* * @brief Gets a pointer to last delimiter identified (which defined the current token). * @param token The handle returned by StringToken_GetFirst. * @return If a delimiter was identified in the previous search, * the pointer returned is to the element in the delimiters array provided in the previous call to StringToken_GetFirst or StringToken_GetNext; * it returns NULL if no delimiter was found in the previous call to those functions. */ MOCKABLE_FUNCTION(, const char*, StringToken_GetDelimiter, STRING_TOKEN_HANDLE, token); /* * @brief Splits a string into an array with all the tokens identified using the delimiters provided. * @param source The string to be tokenized. * @param length The length of the source string, not including the null-terminator. * @param delimiters Array with null-terminated strings to be used as token delimiters. * @param n_delims Number of elements in delimiters array. * @param include_empty Indicates if empty strings shall be included (as NULL values) in the resulting array. * @param tokens If no failures occur, the resulting array with the split tokens (dynamically allocated). * @param token_count The number of elements in the tokens array. * @return Zero if no failures occur, or a non-zero value otherwise. */ MOCKABLE_FUNCTION(, int, StringToken_Split, const char*, source, size_t, length, const char**, delimiters, size_t, n_delims, bool, include_empty, char***, tokens, size_t*, token_count); /* * @brief Destroys the handle created when calling StringToken_GetFirst. * @param token The handle returned by StringToken_GetFirst. * @return Nothing */ MOCKABLE_FUNCTION(, void, StringToken_Destroy, STRING_TOKEN_HANDLE, token); #ifdef __cplusplus } #endif #endif /*STRING_TOKEN_H*/ string_tokenizer.h000066400000000000000000000015641362133436400403460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STRING_TOKENIZER_H #define STRING_TOKENIZER_H #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/string_tokenizer_types.h" #ifdef __cplusplus extern "C" { #else #endif MOCKABLE_FUNCTION(, STRING_TOKENIZER_HANDLE, STRING_TOKENIZER_create, STRING_HANDLE, handle); MOCKABLE_FUNCTION(, STRING_TOKENIZER_HANDLE, STRING_TOKENIZER_create_from_char, const char*, input); MOCKABLE_FUNCTION(, int, STRING_TOKENIZER_get_next_token, STRING_TOKENIZER_HANDLE, t, STRING_HANDLE, output, const char*, delimiters); MOCKABLE_FUNCTION(, void, STRING_TOKENIZER_destroy, STRING_TOKENIZER_HANDLE, t); #ifdef __cplusplus } #else #endif #endif /*STRING_TOKENIZER_H*/ string_tokenizer_types.h000066400000000000000000000004731362133436400415700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STRING_TOKENIZER_TYPES_H #define STRING_TOKENIZER_TYPES_H typedef struct STRING_TOKEN_TAG* STRING_TOKENIZER_HANDLE; #endif /*STRING_TOKENIZER_TYPES_H*/ strings.h000066400000000000000000000037441362133436400364410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STRINGS_H #define STRINGS_H #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/strings_types.h" #ifdef __cplusplus #include extern "C" { #else #include #endif MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_new); MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_clone, STRING_HANDLE, handle); MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_construct, const char*, psz); MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_construct_n, const char*, psz, size_t, n); MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_new_with_memory, const char*, memory); MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_new_quoted, const char*, source); MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_new_JSON, const char*, source); MOCKABLE_FUNCTION(, STRING_HANDLE, STRING_from_byte_array, const unsigned char*, source, size_t, size); MOCKABLE_FUNCTION(, void, STRING_delete, STRING_HANDLE, handle); MOCKABLE_FUNCTION(, int, STRING_concat, STRING_HANDLE, handle, const char*, s2); MOCKABLE_FUNCTION(, int, STRING_concat_with_STRING, STRING_HANDLE, s1, STRING_HANDLE, s2); MOCKABLE_FUNCTION(, int, STRING_quote, STRING_HANDLE, handle); MOCKABLE_FUNCTION(, int, STRING_copy, STRING_HANDLE, s1, const char*, s2); MOCKABLE_FUNCTION(, int, STRING_copy_n, STRING_HANDLE, s1, const char*, s2, size_t, n); MOCKABLE_FUNCTION(, const char*, STRING_c_str, STRING_HANDLE, handle); MOCKABLE_FUNCTION(, int, STRING_empty, STRING_HANDLE, handle); MOCKABLE_FUNCTION(, size_t, STRING_length, STRING_HANDLE, handle); MOCKABLE_FUNCTION(, int, STRING_compare, STRING_HANDLE, s1, STRING_HANDLE, s2); MOCKABLE_FUNCTION(, int, STRING_replace, STRING_HANDLE, handle, char, target, char, replace); extern STRING_HANDLE STRING_construct_sprintf(const char* format, ...); extern int STRING_sprintf(STRING_HANDLE s1, const char* format, ...); #ifdef __cplusplus } #endif #endif /*STRINGS_H*/ strings_types.h000066400000000000000000000004201362133436400376510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STRINGS_TYPES_H #define STRINGS_TYPES_H typedef struct STRING_TAG* STRING_HANDLE; #endif /*STRINGS_TYPES_H*/ tcpsocketconnection_c.h000066400000000000000000000026501362133436400413240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TCPSOCKETCONNECTION_C_H #define TCPSOCKETCONNECTION_C_H #ifdef __cplusplus extern "C" { #endif typedef void* TCPSOCKETCONNECTION_HANDLE; TCPSOCKETCONNECTION_HANDLE tcpsocketconnection_create(void); void tcpsocketconnection_set_blocking(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, bool blocking, unsigned int timeout); void tcpsocketconnection_destroy(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle); int tcpsocketconnection_connect(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, const char* host, const int port); bool tcpsocketconnection_is_connected(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle); void tcpsocketconnection_close(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle); int tcpsocketconnection_send(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, const char* data, int length); int tcpsocketconnection_send_all(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, const char* data, int length); int tcpsocketconnection_receive(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, char* data, int length); int tcpsocketconnection_receive_all(TCPSOCKETCONNECTION_HANDLE tcpSocketConnectionHandle, char* data, int length); #ifdef __cplusplus } #endif #endif /* TCPSOCKETCONNECTION_C_H */ threadapi.h000066400000000000000000000061641362133436400367100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file threadapi.h * @brief This module implements support for creating new threads, * terminating threads and sleeping threads. */ #ifndef THREADAPI_H #define THREADAPI_H #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif typedef int(*THREAD_START_FUNC)(void *); #define THREADAPI_RESULT_VALUES \ THREADAPI_OK, \ THREADAPI_INVALID_ARG, \ THREADAPI_NO_MEMORY, \ THREADAPI_ERROR /** @brief Enumeration specifying the possible return values for the APIs in * this module. */ DEFINE_ENUM(THREADAPI_RESULT, THREADAPI_RESULT_VALUES); typedef void* THREAD_HANDLE; /** * @brief Creates a thread with the entry point specified by the @p func * argument. * * @param threadHandle The handle to the new thread is returned in this * pointer. * @param func A function pointer that indicates the entry point * to the new thread. * @param arg A void pointer that must be passed to the function * pointed to by @p func. * * @return @c THREADAPI_OK if the API call is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, THREADAPI_RESULT, ThreadAPI_Create, THREAD_HANDLE*, threadHandle, THREAD_START_FUNC, func, void*, arg); /** * @brief Blocks the calling thread by waiting on the thread identified by * the @p threadHandle argument to complete. * * @param threadHandle The handle of the thread to wait for completion. * @param res The result returned by the thread which is passed * to the ::ThreadAPI_Exit function. * * When the @p threadHandle thread completes, all resources associated * with the thread must be released and the thread handle will no * longer be valid. * * @return @c THREADAPI_OK if the API call is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, THREADAPI_RESULT, ThreadAPI_Join, THREAD_HANDLE, threadHandle, int*, res); /** * @brief This function is called by a thread when the thread exits. * * @param res An integer that represents the exit status of the thread. * * This function is called by a thread when the thread exits in order * to return a result value to the caller of the ::ThreadAPI_Join * function. The @p res value must be copied into the @p res out * argument passed to the ::ThreadAPI_Join function. */ MOCKABLE_FUNCTION(, void, ThreadAPI_Exit, int, res); /** * @brief Sleeps the current thread for the given number of milliseconds. * * @param milliseconds The number of milliseconds to sleep. */ MOCKABLE_FUNCTION(, void, ThreadAPI_Sleep, unsigned int, milliseconds); #ifdef __cplusplus } #endif #endif /* THREADAPI_H */ tickcounter.h000066400000000000000000000016211362133436400372720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TICKCOUNTER_H #define TICKCOUNTER_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include #include "azure_c_shared_utility/umock_c_prod.h" #if _WIN32 typedef uint_fast64_t tickcounter_ms_t; // Use 64-bit because of QueryPerformanceCounter call #else typedef uint_fast32_t tickcounter_ms_t; #endif typedef struct TICK_COUNTER_INSTANCE_TAG* TICK_COUNTER_HANDLE; MOCKABLE_FUNCTION(, TICK_COUNTER_HANDLE, tickcounter_create); MOCKABLE_FUNCTION(, void, tickcounter_destroy, TICK_COUNTER_HANDLE, tick_counter); MOCKABLE_FUNCTION(, int, tickcounter_get_current_ms, TICK_COUNTER_HANDLE, tick_counter, tickcounter_ms_t*, current_ms); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TICKCOUNTER_H */ tls_config.h000066400000000000000000000003111362133436400370620ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility#ifndef __TLS_CONFIG_H__ #define __TLS_CONFIG_H__ // DEPRECATED: This file will be removed from the tree. // WolfSSL or mbedTLS //#define USE_WOLF_SSL #define USE_MBED_TLS #endif // __TLS_CONFIG_H__tlsio.h000066400000000000000000000010051362133436400360660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_H #define TLSIO_H #include "xio.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct TLSIO_CONFIG_TAG { const char* hostname; int port; const IO_INTERFACE_DESCRIPTION* underlying_io_interface; void* underlying_io_parameters; } TLSIO_CONFIG; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_H */ tlsio_cyclonessl.h000066400000000000000000000011021362133436400403220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_CYCLONESSL_H #define TLSIO_CYCLONESSL_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, tlsio_cyclonessl_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_CYCLONESSL_H */ tlsio_cyclonessl_socket.h000066400000000000000000000011751362133436400417040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_CYCLONESSL_SOCKET_H #define TLSIO_CYCLONESSL_SOCKET_H #include "tls.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ MOCKABLE_FUNCTION(, int, tlsio_cyclonessl_socket_create, const char*, hostname, unsigned int, port, TlsSocket*, new_socket); MOCKABLE_FUNCTION(, void, tlsio_cyclonessl_socket_destroy, TlsSocket, socket); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_CYCLONESSL_SOCKET_H */ tlsio_mbedtls.h000066400000000000000000000034211362133436400376040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_MBEDTLS_H #define TLSIO_MBEDTLS_H // DEPRECATED: the USE_MBED_TLS #define is deprecated. #ifdef USE_MBED_TLS #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/optionhandler.h" #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ // DEPRECATED: the functions below do not neet to be exposed. extern CONCRETE_IO_HANDLE tlsio_mbedtls_create(void* io_create_parameters); extern void tlsio_mbedtls_destroy(CONCRETE_IO_HANDLE tls_io); extern int tlsio_mbedtls_open(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); extern int tlsio_mbedtls_close(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); extern int tlsio_mbedtls_send(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); extern void tlsio_mbedtls_dowork(CONCRETE_IO_HANDLE tls_io); extern int tlsio_mbedtls_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value); extern OPTIONHANDLER_HANDLE tlsio_mbedtls_retrieveoptions(CONCRETE_IO_HANDLE handle); // DEPRECATED: the functions above do not neet to be exposed. extern const IO_INTERFACE_DESCRIPTION* tlsio_mbedtls_get_interface_description(void); #ifdef __cplusplus } #endif /* __cplusplus */ // DEPRECATED: the USE_MBED_TLS #define is deprecated. #endif /* USE_MBED_TLS */ #endif /* TLSIO_MBEDTLS_H */ tlsio_openssl.h000066400000000000000000000031321362133436400376340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_OPENSSL_H #define TLSIO_OPENSSL_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ MOCKABLE_FUNCTION(, int, tlsio_openssl_init); MOCKABLE_FUNCTION(, void, tlsio_openssl_deinit); MOCKABLE_FUNCTION(, CONCRETE_IO_HANDLE, tlsio_openssl_create, void*, io_create_parameters); MOCKABLE_FUNCTION(, void, tlsio_openssl_destroy, CONCRETE_IO_HANDLE, tls_io); MOCKABLE_FUNCTION(, int, tlsio_openssl_open, CONCRETE_IO_HANDLE, tls_io, ON_IO_OPEN_COMPLETE, on_io_open_complete, void*, on_io_open_complete_context, ON_BYTES_RECEIVED, on_bytes_received, void*, on_bytes_received_context, ON_IO_ERROR, on_io_error, void*, on_io_error_context); MOCKABLE_FUNCTION(, int, tlsio_openssl_close, CONCRETE_IO_HANDLE, tls_io, ON_IO_CLOSE_COMPLETE, on_io_close_complete, void*, callback_context); MOCKABLE_FUNCTION(, int, tlsio_openssl_send, CONCRETE_IO_HANDLE, tls_io, const void*, buffer, size_t, size, ON_SEND_COMPLETE, on_send_complete, void*, callback_context); MOCKABLE_FUNCTION(, void, tlsio_openssl_dowork, CONCRETE_IO_HANDLE, tls_io); MOCKABLE_FUNCTION(, int, tlsio_openssl_setoption, CONCRETE_IO_HANDLE, tls_io, const char*, optionName, const void*, value); MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, tlsio_openssl_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_OPENSSL_H */ tlsio_options.h000066400000000000000000000064041362133436400376510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // tlsio_options handles only the most commonly-used options for tlsio adapters. Options // not supported by this component may be handled in the tlsio adapter instead. #ifndef TLSIO_OPTIONS_H #define TLSIO_OPTIONS_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ // This enum identifies individual options typedef enum TLSIO_OPTION_BIT_TAG { TLSIO_OPTION_BIT_NONE = 0x00, TLSIO_OPTION_BIT_TRUSTED_CERTS = 0x01, TLSIO_OPTION_BIT_x509_RSA_CERT = 0x02, TLSIO_OPTION_BIT_x509_ECC_CERT = 0x04, } TLSIO_OPTION_BIT; typedef enum TLSIO_OPTIONS_x509_TYPE_TAG { TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED = TLSIO_OPTION_BIT_NONE, TLSIO_OPTIONS_x509_TYPE_RSA = TLSIO_OPTION_BIT_x509_RSA_CERT, TLSIO_OPTIONS_x509_TYPE_ECC = TLSIO_OPTION_BIT_x509_ECC_CERT } TLSIO_OPTIONS_x509_TYPE; typedef enum TLSIO_OPTIONS_RESULT_TAG { TLSIO_OPTIONS_RESULT_SUCCESS, TLSIO_OPTIONS_RESULT_NOT_HANDLED, TLSIO_OPTIONS_RESULT_ERROR } TLSIO_OPTIONS_RESULT; // This struct contains the commonly-used options which // are supported by tlsio_options. typedef struct TLSIO_OPTIONS_TAG { int supported_options; const char* trusted_certs; TLSIO_OPTIONS_x509_TYPE x509_type; const char* x509_cert; const char* x509_key; } TLSIO_OPTIONS; // Initialize the TLSIO_OPTIONS struct and specify which options are supported as a bit-or'ed // set of TLSIO_OPTION_BIT. For the x509 certs, only the *_CERT bit need be specified; the *_KEY // is understood to go with the cert. void tlsio_options_initialize(TLSIO_OPTIONS* options, int option_caps); // This should be called in the tlsio destructor void tlsio_options_release_resources(TLSIO_OPTIONS* options); // xio requires the implementation of four functions: xio_setoption, xio_retrieveoptions, // an anonymous clone_option, and an anonymous destroy_option. // The helper for xio_setoption TLSIO_OPTIONS_RESULT tlsio_options_set(TLSIO_OPTIONS* options, const char* optionName, const void* value); // Use this helper for xio_retrieveoptions if this helper covers all your tlsio options OPTIONHANDLER_HANDLE tlsio_options_retrieve_options(TLSIO_OPTIONS* options, pfSetOption setOption); // Use this helper for xio_retrieveoptions if your tlsio supports more options than this helper does OPTIONHANDLER_HANDLE tlsio_options_retrieve_options_ex(TLSIO_OPTIONS* options, pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption); // The helper for the anonymous clone_option -- needed only to support extra options TLSIO_OPTIONS_RESULT tlsio_options_clone_option(const char* name, const void* value, void** out_value); // The helper for the anonymous destroy_option -- needed only to support extra options TLSIO_OPTIONS_RESULT tlsio_options_destroy_option(const char* name, const void* value); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_OPTIONS_H */ tlsio_schannel.h000066400000000000000000000030051362133436400377430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_SCHANNEL_H #define TLSIO_SCHANNEL_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ MOCKABLE_FUNCTION(, CONCRETE_IO_HANDLE, tlsio_schannel_create, void*, io_create_parameters); MOCKABLE_FUNCTION(, void, tlsio_schannel_destroy, CONCRETE_IO_HANDLE, tls_io); MOCKABLE_FUNCTION(, int, tlsio_schannel_open, CONCRETE_IO_HANDLE, tls_io, ON_IO_OPEN_COMPLETE, on_io_open_complete, void*, on_io_open_complete_context, ON_BYTES_RECEIVED, on_bytes_received, void*, on_bytes_received_context, ON_IO_ERROR, on_io_error, void*, on_io_error_context); MOCKABLE_FUNCTION(, int, tlsio_schannel_close, CONCRETE_IO_HANDLE, tls_io, ON_IO_CLOSE_COMPLETE, on_io_close_complete, void*, callback_context); MOCKABLE_FUNCTION(, int, tlsio_schannel_send, CONCRETE_IO_HANDLE, tls_io, const void*, buffer, size_t, size, ON_SEND_COMPLETE, on_send_complete, void*, callback_context); MOCKABLE_FUNCTION(, void, tlsio_schannel_dowork, CONCRETE_IO_HANDLE, tls_io); MOCKABLE_FUNCTION(, int, tlsio_schannel_setoption, CONCRETE_IO_HANDLE, tls_io, const char*, optionName, const void*, value); MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, tlsio_schannel_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_SCHANNEL_H */ tlsio_wolfssl.h000066400000000000000000000032211362133436400376410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_WOLFSSL_H #define TLSIO_WOLFSSL_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/const_defines.h" #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ extern const char* const OPTION_WOLFSSL_SET_DEVICE_ID; MOCKABLE_FUNCTION(, CONCRETE_IO_HANDLE, tlsio_wolfssl_create, void*, io_create_parameters); MOCKABLE_FUNCTION(, void, tlsio_wolfssl_destroy, CONCRETE_IO_HANDLE, tls_io); MOCKABLE_FUNCTION(, int, tlsio_wolfssl_open, CONCRETE_IO_HANDLE, tls_io, ON_IO_OPEN_COMPLETE, on_io_open_complete, void*, on_io_open_complete_context, ON_BYTES_RECEIVED, on_bytes_received, void*, on_bytes_received_context, ON_IO_ERROR, on_io_error, void*, on_io_error_context); MOCKABLE_FUNCTION(, int, tlsio_wolfssl_close, CONCRETE_IO_HANDLE, tls_io, ON_IO_CLOSE_COMPLETE, on_io_close_complete, void*, callback_context); MOCKABLE_FUNCTION(, int, tlsio_wolfssl_send, CONCRETE_IO_HANDLE, tls_io, const void*, buffer, size_t, size, ON_SEND_COMPLETE, on_send_complete, void*, callback_context); MOCKABLE_FUNCTION(, void, tlsio_wolfssl_dowork, CONCRETE_IO_HANDLE, tls_io); MOCKABLE_FUNCTION(, int, tlsio_wolfssl_setoption, CONCRETE_IO_HANDLE, tls_io, const char*, optionName, const void*, value); MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, tlsio_wolfssl_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_WOLFSSL_H */ umock_c_prod.h000066400000000000000000000032071362133436400374060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #undef MOCKABLE_FUNCTION /* This header is meant to be included by production code headers, so that the MOCKABLE_FUNCTION gets enabled. */ /* If you are porting to a new platform and do not want to build the tests, but only the production code, simply make sure that this file is in the include path (either by copying it to your inc folder or by adjusting the include paths). */ #ifdef ENABLE_MOCKS /* Codes_SRS_UMOCK_C_LIB_01_001: [MOCKABLE_FUNCTION shall be used to wrap function definition allowing the user to declare a function that can be mocked.]*/ #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK(modifiers, result, function, __VA_ARGS__) #include "umock_c.h" #else #include "azure_c_shared_utility/macro_utils.h" #define UMOCK_C_PROD_ARG_IN_SIGNATURE(count, arg_type, arg_name) arg_type arg_name IFCOMMA(count) /* Codes_SRS_UMOCK_C_LIB_01_002: [The macro shall generate a function signature in case ENABLE_MOCKS is not defined.] */ /* Codes_SRS_UMOCK_C_LIB_01_005: [**If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function.] */ /* Codes_SRS_UMOCK_C_LIB_01_001: [MOCKABLE_FUNCTION shall be used to wrap function definition allowing the user to declare a function that can be mocked.]*/ #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ result modifiers function(IF(COUNT_ARG(__VA_ARGS__),,void) FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)); #endif uniqueid.h000066400000000000000000000013101362133436400365560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UNIQUEID_H #define UNIQUEID_H #include "azure_c_shared_utility/macro_utils.h" #ifdef __cplusplus #include extern "C" { #else #include #endif #include "azure_c_shared_utility/umock_c_prod.h" #define UNIQUEID_RESULT_VALUES \ UNIQUEID_OK, \ UNIQUEID_INVALID_ARG, \ UNIQUEID_ERROR DEFINE_ENUM(UNIQUEID_RESULT, UNIQUEID_RESULT_VALUES) MOCKABLE_FUNCTION(, UNIQUEID_RESULT, UniqueId_Generate, char*, uid, size_t, bufferSize); #ifdef __cplusplus } #endif #endif /* UNIQUEID_H */ urlencode.h000066400000000000000000000034121362133436400367200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef URLENCODE_H #define URLENCODE_H #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif /* @brief URL Encode (aka percent encode) a string. * Please note that while the URL encoder accepts the full range of 8-bit extended ASCII, * it has unpredictable behavior beyond the 7-bit ASCII standard. This function does NOT * guarantee correctness of output for characters outside this range. * * @param URL Encode can be done on a const char* or a STRING_HANDLE, use the appropriate * function depending on input type, they both behave the same way. * * @return Returns a STRING_HANDLE with the encoded string, or NULL on failure. */ MOCKABLE_FUNCTION(, STRING_HANDLE, URL_Encode, STRING_HANDLE, input); MOCKABLE_FUNCTION(, STRING_HANDLE, URL_EncodeString, const char*, textEncode); /* @brief URL Decode (aka percent decode) a string. * Please note that the URL decoder only supports decoding characters that fall within the * 7-bit ASCII range. It does NOT support 8-bit extended ASCII, and will fail if you try. * * @param URL Decode can be done on a const char* or a STRING_HANDLE, use the appropriate * function depending on input type, they both behave the same way. * * @return Returns a STRING_HANDLE with the decoded string, or NULL on failure. */ MOCKABLE_FUNCTION(, STRING_HANDLE, URL_Decode, STRING_HANDLE, input); MOCKABLE_FUNCTION(, STRING_HANDLE, URL_DecodeString, const char*, textDecode); #ifdef __cplusplus } #endif #endif /* URLENCODE_H */ utf8_checker.h000066400000000000000000000010261362133436400373110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UTF8_CHECKER_H #define UTF8_CHECKER_H #ifdef __cplusplus #include extern "C" { #else #include #include #endif #include "azure_c_shared_utility/umock_c_prod.h" MOCKABLE_FUNCTION(, bool, utf8_checker_is_valid_utf8, const unsigned char*, utf8_str, size_t, length); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* UTF8_CHECKER_H */ uuid.h000066400000000000000000000037571362133436400357220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UUID_H #define UUID_H #ifdef __cplusplus #include #include extern "C" { #else #include #include #include #endif /* __cplusplus */ #include "azure_c_shared_utility/umock_c_prod.h" typedef unsigned char UUID_T[16]; /* These 2 strings can be conveniently used directly in printf statements Notice that PRI_UUID has to be used like any other print format specifier, meaning it has to be preceded with % */ #define PRI_UUID "02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x" #define UUID_FORMAT_VALUES(uuid) \ (uuid)[0], (uuid)[1], (uuid)[2], (uuid)[3], (uuid)[4], (uuid)[5], (uuid)[6], (uuid)[7], \ (uuid)[8], (uuid)[9], (uuid)[10], (uuid)[11], (uuid)[12], (uuid)[13], (uuid)[14], (uuid)[15] \ /* @brief Generates a true UUID * @param uuid A pre-allocated buffer for the bytes of the generated UUID * @returns Zero if no failures occur, non-zero otherwise. */ MOCKABLE_FUNCTION(, int, UUID_generate, UUID_T*, uuid); /* @brief Gets the UUID value (byte sequence) of an well-formed UUID string. * @param uuid_string A null-terminated well-formed UUID string (e.g., "7f907d75-5e13-44cf-a1a3-19a01a2b4528"). * @param uuid Sequence of bytes representing an UUID. * @returns Zero if no failures occur, non-zero otherwise. */ MOCKABLE_FUNCTION(, int, UUID_from_string, const char*, uuid_string, UUID_T*, uuid); /* @brief Gets the string representation of the UUID value. * @param uuid Sequence of bytes representing an UUID. * @returns A null-terminated string representation of the UUID value provided (e.g., "7f907d75-5e13-44cf-a1a3-19a01a2b4528"). */ MOCKABLE_FUNCTION(, char*, UUID_to_string, const UUID_T*, uuid); #ifdef __cplusplus } #endif #endif /* UUID_H */ uws_client.h000066400000000000000000000164011362133436400371160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UWS_CLIENT_H #define UWS_CLIENT_H #include "xio.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/optionhandler.h" #ifdef __cplusplus #include #include extern "C" { #else #include #include #include #endif typedef struct UWS_CLIENT_INSTANCE_TAG* UWS_CLIENT_HANDLE; #define WS_SEND_FRAME_RESULT_VALUES \ WS_SEND_FRAME_OK, \ WS_SEND_FRAME_ERROR, \ WS_SEND_FRAME_CANCELLED DEFINE_ENUM(WS_SEND_FRAME_RESULT, WS_SEND_FRAME_RESULT_VALUES); #define WS_OPEN_RESULT_VALUES \ WS_OPEN_OK, \ WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED, \ WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED, \ WS_OPEN_ERROR_NOT_ENOUGH_MEMORY, \ WS_OPEN_ERROR_CANNOT_CONSTRUCT_UPGRADE_REQUEST, \ WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST, \ WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS, \ WS_OPEN_ERROR_CONSTRUCTING_UPGRADE_REQUEST, \ WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS, \ WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN, \ WS_OPEN_CANCELLED, \ WS_OPEN_ERROR_UNDERLYING_IO_ERROR, \ WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE, \ WS_OPEN_ERROR_BAD_RESPONSE_STATUS, \ WS_OPEN_ERROR_BASE64_ENCODE_FAILED DEFINE_ENUM(WS_OPEN_RESULT, WS_OPEN_RESULT_VALUES); #define WS_ERROR_VALUES \ WS_ERROR_NOT_ENOUGH_MEMORY, \ WS_ERROR_BAD_FRAME_RECEIVED, \ WS_ERROR_CANNOT_REMOVE_SENT_ITEM_FROM_LIST, \ WS_ERROR_UNDERLYING_IO_ERROR, \ WS_ERROR_CANNOT_CLOSE_UNDERLYING_IO DEFINE_ENUM(WS_ERROR, WS_ERROR_VALUES); #define WS_FRAME_TYPE_UNKNOWN 0x00 #define WS_FRAME_TYPE_TEXT 0x01 #define WS_FRAME_TYPE_BINARY 0x02 /* Codes_SRS_UWS_CLIENT_01_324: [ 1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled. ]*/ /* Codes_SRS_UWS_CLIENT_01_325: [ 1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page. ]*/ /* Codes_SRS_UWS_CLIENT_01_326: [ 1002 indicates that an endpoint is terminating the connection due to a protocol error. ]*/ /* Codes_SRS_UWS_CLIENT_01_327: [ 1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message). ]*/ /* Codes_SRS_UWS_CLIENT_01_328: [ Reserved. The specific meaning might be defined in the future. ]*/ /* Codes_SRS_UWS_CLIENT_01_329: [ 1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. ]*/ /* Codes_SRS_UWS_CLIENT_01_330: [ 1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. ]*/ /* Codes_SRS_UWS_CLIENT_01_331: [ 1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message). ]*/ /* Codes_SRS_UWS_CLIENT_01_332: [ 1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy. ]*/ /* Codes_SRS_UWS_CLIENT_01_333: [ 1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process. ]*/ /* Codes_SRS_UWS_CLIENT_01_334: [ 1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. ]*/ /* Codes_SRS_UWS_CLIENT_01_336: [ 1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request. ]*/ /* Codes_SRS_UWS_CLIENT_01_337: [ 1015 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. ]*/ /* */ #define CLOSE_NORMAL 1000 #define CLOSE_GOING_AWAY 1001 #define CLOSE_PROTOCOL_ERROR 1002 #define CLOSE_CANNOT_ACCEPT_DATA_TYPE 1003 #define CLOSE_UNDEFINED_1004 1004 #define CLOSE_RESERVED_1005 1005 #define CLOSE_RESERVED_1006 1006 #define CLOSE_INCONSISTENT_DATA_IN_MESSAGE 1007 #define CLOSE_POLICY_VIOLATION 1008 #define CLOSE_MESSAGE_TOO_BIG 1009 #define CLOSE_UNSUPPORTED_EXTENSION_LIST 1010 #define CLOSE_UNEXPECTED_CONDITION 1011 #define CLOSE_RESERVED_1015 1015 typedef void(*ON_WS_FRAME_RECEIVED)(void* context, unsigned char frame_type, const unsigned char* buffer, size_t size); typedef void(*ON_WS_SEND_FRAME_COMPLETE)(void* context, WS_SEND_FRAME_RESULT ws_send_frame_result); typedef void(*ON_WS_OPEN_COMPLETE)(void* context, WS_OPEN_RESULT ws_open_result); typedef void(*ON_WS_CLOSE_COMPLETE)(void* context); typedef void(*ON_WS_PEER_CLOSED)(void* context, uint16_t* close_code, const unsigned char* extra_data, size_t extra_data_length); typedef void(*ON_WS_ERROR)(void* context, WS_ERROR error_code); typedef struct WS_PROTOCOL_TAG { const char* protocol; } WS_PROTOCOL; MOCKABLE_FUNCTION(, UWS_CLIENT_HANDLE, uws_client_create, const char*, hostname, unsigned int, port, const char*, resource_name, bool, use_ssl, const WS_PROTOCOL*, protocols, size_t, protocol_count); MOCKABLE_FUNCTION(, UWS_CLIENT_HANDLE, uws_client_create_with_io, const IO_INTERFACE_DESCRIPTION*, io_interface, void*, io_create_parameters, const char*, hostname, unsigned int, port, const char*, resource_name, const WS_PROTOCOL*, protocols, size_t, protocol_count) MOCKABLE_FUNCTION(, void, uws_client_destroy, UWS_CLIENT_HANDLE, uws_client); MOCKABLE_FUNCTION(, int, uws_client_open_async, UWS_CLIENT_HANDLE, uws_client, ON_WS_OPEN_COMPLETE, on_ws_open_complete, void*, on_ws_open_complete_context, ON_WS_FRAME_RECEIVED, on_ws_frame_received, void*, on_ws_frame_received_context, ON_WS_PEER_CLOSED, on_ws_peer_closed, void*, on_ws_peer_closed_context, ON_WS_ERROR, on_ws_error, void*, on_ws_error_context); MOCKABLE_FUNCTION(, int, uws_client_close_async, UWS_CLIENT_HANDLE, uws_client, ON_WS_CLOSE_COMPLETE, on_ws_close_complete, void*, on_ws_close_complete_context); MOCKABLE_FUNCTION(, int, uws_client_close_handshake_async, UWS_CLIENT_HANDLE, uws_client, uint16_t, close_code, const char*, close_reason, ON_WS_CLOSE_COMPLETE, on_ws_close_complete, void*, on_ws_close_complete_context); MOCKABLE_FUNCTION(, int, uws_client_send_frame_async, UWS_CLIENT_HANDLE, uws_client, unsigned char, frame_type, const unsigned char*, buffer, size_t, size, bool, is_final, ON_WS_SEND_FRAME_COMPLETE, on_ws_send_frame_complete, void*, callback_context); MOCKABLE_FUNCTION(, void, uws_client_dowork, UWS_CLIENT_HANDLE, uws_client); MOCKABLE_FUNCTION(, int, uws_client_set_request_header, UWS_CLIENT_HANDLE, uws_client, const char*, name, const char*, value); MOCKABLE_FUNCTION(, int, uws_client_set_option, UWS_CLIENT_HANDLE, uws_client, const char*, option_name, const void*, value); MOCKABLE_FUNCTION(, OPTIONHANDLER_HANDLE, uws_client_retrieve_options, UWS_CLIENT_HANDLE, uws_client); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* UWS_CLIENT_H */ uws_frame_encoder.h000066400000000000000000000025571362133436400404400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UWS_FRAME_ENCODER_H #define UWS_FRAME_ENCODER_H #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/macro_utils.h" #ifdef __cplusplus #include extern "C" { #else #include #include #endif #define RESERVED_1 0x04 #define RESERVED_2 0x02 #define RESERVED_3 0x01 #define WS_FRAME_TYPE_VALUES \ WS_CONTINUATION_FRAME, \ WS_TEXT_FRAME, \ WS_BINARY_FRAME, \ WS_RESERVED_NON_CONTROL_FRAME_3, \ WS_RESERVED_NON_CONTROL_FRAME_4, \ WS_RESERVED_NON_CONTROL_FRAME_5, \ WS_RESERVED_NON_CONTROL_FRAME_6, \ WS_RESERVED_NON_CONTROL_FRAME_7, \ WS_CLOSE_FRAME, \ WS_PING_FRAME, \ WS_PONG_FRAME, \ WS_RESERVED_CONTROL_FRAME_B, \ WS_RESERVED_CONTROL_FRAME_C, \ WS_RESERVED_CONTROL_FRAME_D, \ WS_RESERVED_CONTROL_FRAME_E, \ WS_RESERVED_CONTROL_FRAME_F DEFINE_ENUM(WS_FRAME_TYPE, WS_FRAME_TYPE_VALUES); MOCKABLE_FUNCTION(, BUFFER_HANDLE, uws_frame_encoder_encode, WS_FRAME_TYPE, opcode, const unsigned char*, payload, size_t, length, bool, is_masked, bool, is_final, unsigned char, reserved); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* UWS_FRAME_ENCODER_H */ vector.h000066400000000000000000000026521362133436400362470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef VECTOR_H #define VECTOR_H #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/vector_types.h" #ifdef __cplusplus #include extern "C" { #else #include #include #endif /* creation */ MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_create, size_t, elementSize); MOCKABLE_FUNCTION(, VECTOR_HANDLE, VECTOR_move, VECTOR_HANDLE, handle); MOCKABLE_FUNCTION(, void, VECTOR_destroy, VECTOR_HANDLE, handle); /* insertion */ MOCKABLE_FUNCTION(, int, VECTOR_push_back, VECTOR_HANDLE, handle, const void*, elements, size_t, numElements); /* removal */ MOCKABLE_FUNCTION(, void, VECTOR_erase, VECTOR_HANDLE, handle, void*, elements, size_t, numElements); MOCKABLE_FUNCTION(, void, VECTOR_clear, VECTOR_HANDLE, handle); /* access */ MOCKABLE_FUNCTION(, void*, VECTOR_element, VECTOR_HANDLE, handle, size_t, index); MOCKABLE_FUNCTION(, void*, VECTOR_front, VECTOR_HANDLE, handle); MOCKABLE_FUNCTION(, void*, VECTOR_back, VECTOR_HANDLE, handle); MOCKABLE_FUNCTION(, void*, VECTOR_find_if, VECTOR_HANDLE, handle, PREDICATE_FUNCTION, pred, const void*, value); /* capacity */ MOCKABLE_FUNCTION(, size_t, VECTOR_size, VECTOR_HANDLE, handle); #ifdef __cplusplus } #endif #endif /* VECTOR_H */ vector_types.h000066400000000000000000000006721362133436400374730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef VECTOR_TYPES_H #define VECTOR_TYPES_H #ifdef __cplusplus extern "C" { #else #include #endif typedef struct VECTOR_TAG* VECTOR_HANDLE; typedef bool(*PREDICATE_FUNCTION)(const void* element, const void* value); #ifdef __cplusplus } #endif #endif /* VECTOR_TYPES_H */ vector_types_internal.h000066400000000000000000000006521362133436400413650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef VECTOR_TYPES_INTERNAL_H #define VECTOR_TYPES_INTERNAL_H #ifdef __cplusplus #include #else #include #endif typedef struct VECTOR_TAG { void* storage; size_t count; size_t elementSize; } VECTOR; #endif /* VECTOR_TYPES_INTERNAL_H */ windowsce/000077500000000000000000000000001362133436400365715ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utilitycstdbool000066400000000000000000000004421362133436400403250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility/windowsce// cstdbool standard header #pragma once #ifndef _CSTDBOOL_ #define _CSTDBOOL_ #include #include #endif /* _CSTDBOOL_ */ /* * Copyright (c) 1992-2013 by P.J. Plauger. ALL RIGHTS RESERVED. * Consult your license regarding permissions and restrictions. V6.40:0009 */ cstdint000066400000000000000000000003511362133436400401630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility/windowsce// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CSTDINT_H #define CSTDINT_H #include "stdint.h" #endif /* CSTDINT_H */ inttypes.h000066400000000000000000000006501362133436400406220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility/windowsce// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef INTTYPES_H #define INTTYPES_H #define PRId8 "hhd" #define PRId16 "hd" #define PRId32 "d" #define PRId64 "lld" #define PRIu8 "hhu" #define PRIu16 "hu" #define PRIu32 "u" #define PRIu64 "llu" #endif // INTTYPES_H stdbool.h000066400000000000000000000004211362133436400404050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility/windowsce#ifndef _WINCE_STDBOOL #define _WINCE_STDBOOL #define __bool_true_false_are_defined 1 #define HAS_STDBOOL #ifndef __cplusplus typedef unsigned char bool; typedef bool _Bool; #define false 0 #define true 1 #endif /* __cplusplus */ #endif /* _WINCE_STDBOOL */stdint.h000066400000000000000000000031741362133436400402540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility/windowsce// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STDINT_H #define STDINT_H typedef signed char int8_t; typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; typedef signed char int_least8_t; typedef short int_least16_t; typedef int int_least32_t; typedef long long int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned long long uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; typedef long long int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; typedef unsigned long long uint_fast64_t; #define INT8_MIN (-127i8 - 1) #define INT16_MIN (-32767i16 - 1) #define INT32_MIN (-2147483647i32 - 1) #define INT64_MIN (-9223372036854775807i64 - 1) #define INT8_MAX 127i8 #define INT16_MAX 32767i16 #define INT32_MAX 2147483647i32 #define INT64_MAX 9223372036854775807i64 #define UINT8_MAX 0xffui8 #define UINT16_MAX 0xffffui16 #define UINT32_MAX 0xffffffffui32 #define UINT64_MAX 0xffffffffffffffffui64 #endif /* STDINT_H */ ws_url.h000066400000000000000000000020261362133436400362530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef WS_URL_H #define WS_URL_H #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #include #endif typedef struct WS_URL_TAG* WS_URL_HANDLE; MOCKABLE_FUNCTION(, WS_URL_HANDLE, ws_url_create, const char*, url); MOCKABLE_FUNCTION(, int, ws_url_is_secure, WS_URL_HANDLE, url, bool*, is_secure); MOCKABLE_FUNCTION(, int, ws_url_get_host, WS_URL_HANDLE, url, const char**, host, size_t*, length); MOCKABLE_FUNCTION(, int, ws_url_get_port, WS_URL_HANDLE, url, size_t*, port); MOCKABLE_FUNCTION(, int, ws_url_get_path, WS_URL_HANDLE, url, const char**, path, size_t*, length); MOCKABLE_FUNCTION(, int, ws_url_get_query, WS_URL_HANDLE, url, const char**, query, size_t*, length); MOCKABLE_FUNCTION(, void, ws_url_destroy, WS_URL_HANDLE, url); #ifdef __cplusplus } #endif /* __cplusplus */ #endif // WS_URL_Hwsio.h000066400000000000000000000015071362133436400357240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef WSIO_H #define WSIO_H #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifdef __cplusplus extern "C" { #include #else #include #include #endif /* __cplusplus */ typedef struct WSIO_CONFIG_TAG { const IO_INTERFACE_DESCRIPTION* underlying_io_interface; void* underlying_io_parameters; const char* hostname; int port; const char* resource_name; const char* protocol; } WSIO_CONFIG; MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, wsio_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* WSIO_H */ x509_openssl.h000066400000000000000000000011131362133436400372040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef X509_OPENSSL_H #define X509_OPENSSL_H #include "openssl/ssl.h" #ifdef __cplusplus extern "C" { #endif #include "azure_c_shared_utility/umock_c_prod.h" MOCKABLE_FUNCTION(,int, x509_openssl_add_certificates, SSL_CTX*, ssl_ctx, const char*, certificates); MOCKABLE_FUNCTION(,int, x509_openssl_add_credentials, SSL_CTX*, ssl_ctx, const char*, x509certificate, const char*, x509privatekey); #ifdef __cplusplus } #endif #endif x509_schannel.h000066400000000000000000000013731362133436400373240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef X509_SCHANNEL_H #define X509_SCHANNEL_H #include "windows.h" #ifdef __cplusplus extern "C" { #else #endif #include "azure_c_shared_utility/umock_c_prod.h" typedef struct X509_SCHANNEL_HANDLE_DATA_TAG* X509_SCHANNEL_HANDLE; MOCKABLE_FUNCTION(, X509_SCHANNEL_HANDLE, x509_schannel_create, const char*, x509certificate, const char*, x509privatekey); MOCKABLE_FUNCTION(, void, x509_schannel_destroy, X509_SCHANNEL_HANDLE, x509_schannel_handle); MOCKABLE_FUNCTION(, PCCERT_CONTEXT, x509_schannel_get_certificate_context, X509_SCHANNEL_HANDLE, x509_schannel_handle); #ifdef __cplusplus } #endif #endif xio.h000066400000000000000000000065611362133436400355470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef XIO_H #define XIO_H #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/macro_utils.h" #ifdef __cplusplus #include extern "C" { #else #include #endif /* __cplusplus */ typedef struct XIO_INSTANCE_TAG* XIO_HANDLE; typedef void* CONCRETE_IO_HANDLE; #define IO_SEND_RESULT_VALUES \ IO_SEND_OK, \ IO_SEND_ERROR, \ IO_SEND_CANCELLED DEFINE_ENUM(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); #define IO_OPEN_RESULT_VALUES \ IO_OPEN_OK, \ IO_OPEN_ERROR, \ IO_OPEN_CANCELLED DEFINE_ENUM(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); typedef void(*ON_BYTES_RECEIVED)(void* context, const unsigned char* buffer, size_t size); typedef void(*ON_SEND_COMPLETE)(void* context, IO_SEND_RESULT send_result); typedef void(*ON_IO_OPEN_COMPLETE)(void* context, IO_OPEN_RESULT open_result); typedef void(*ON_IO_CLOSE_COMPLETE)(void* context); typedef void(*ON_IO_ERROR)(void* context); typedef OPTIONHANDLER_HANDLE (*IO_RETRIEVEOPTIONS)(CONCRETE_IO_HANDLE concrete_io); typedef CONCRETE_IO_HANDLE(*IO_CREATE)(void* io_create_parameters); typedef void(*IO_DESTROY)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_OPEN)(CONCRETE_IO_HANDLE concrete_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context); typedef int(*IO_CLOSE)(CONCRETE_IO_HANDLE concrete_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context); typedef int(*IO_SEND)(CONCRETE_IO_HANDLE concrete_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context); typedef void(*IO_DOWORK)(CONCRETE_IO_HANDLE concrete_io); typedef int(*IO_SETOPTION)(CONCRETE_IO_HANDLE concrete_io, const char* optionName, const void* value); typedef struct IO_INTERFACE_DESCRIPTION_TAG { IO_RETRIEVEOPTIONS concrete_io_retrieveoptions; IO_CREATE concrete_io_create; IO_DESTROY concrete_io_destroy; IO_OPEN concrete_io_open; IO_CLOSE concrete_io_close; IO_SEND concrete_io_send; IO_DOWORK concrete_io_dowork; IO_SETOPTION concrete_io_setoption; } IO_INTERFACE_DESCRIPTION; MOCKABLE_FUNCTION(, XIO_HANDLE, xio_create, const IO_INTERFACE_DESCRIPTION*, io_interface_description, const void*, io_create_parameters); MOCKABLE_FUNCTION(, void, xio_destroy, XIO_HANDLE, xio); MOCKABLE_FUNCTION(, int, xio_open, XIO_HANDLE, xio, ON_IO_OPEN_COMPLETE, on_io_open_complete, void*, on_io_open_complete_context, ON_BYTES_RECEIVED, on_bytes_received, void*, on_bytes_received_context, ON_IO_ERROR, on_io_error, void*, on_io_error_context); MOCKABLE_FUNCTION(, int, xio_close, XIO_HANDLE, xio, ON_IO_CLOSE_COMPLETE, on_io_close_complete, void*, callback_context); MOCKABLE_FUNCTION(, int, xio_send, XIO_HANDLE, xio, const void*, buffer, size_t, size, ON_SEND_COMPLETE, on_send_complete, void*, callback_context); MOCKABLE_FUNCTION(, void, xio_dowork, XIO_HANDLE, xio); MOCKABLE_FUNCTION(, int, xio_setoption, XIO_HANDLE, xio, const char*, optionName, const void*, value); MOCKABLE_FUNCTION(, OPTIONHANDLER_HANDLE, xio_retrieveoptions, XIO_HANDLE, xio); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* XIO_H */ xlogging.h000066400000000000000000000123421362133436400365600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc/azure_c_shared_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef XLOGGING_H #define XLOGGING_H #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/optimize_size.h" #if defined(ESP8266_RTOS) #include "c_types.h" #endif #if defined(ARDUINO_ARCH_ESP8266) #include "esp8266/azcpgmspace.h" #endif #ifdef __cplusplus /* Some compilers do not want to play by the standard, specifically ARM CC */ #ifdef MBED_BUILD_TIMESTAMP #include #else #include #endif extern "C" { #else #include #endif /* __cplusplus */ #ifdef TIZENRT #undef LOG_INFO #endif typedef enum LOG_CATEGORY_TAG { AZ_LOG_ERROR, AZ_LOG_INFO, AZ_LOG_TRACE } LOG_CATEGORY; #if defined _MSC_VER #define FUNC_NAME __FUNCDNAME__ #else #define FUNC_NAME __func__ #endif typedef void(*LOGGER_LOG)(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...); typedef void(*LOGGER_LOG_GETLASTERROR)(const char* file, const char* func, int line, const char* format, ...); #define TEMP_BUFFER_SIZE 1024 #define MESSAGE_BUFFER_SIZE 260 #define LOG_NONE 0x00 #define LOG_LINE 0x01 /*no logging is useful when time and fprintf are mocked*/ #ifdef NO_LOGGING #define LOG(...) #define LogInfo(...) #define LogBinary(...) #define LogError(...) #define xlogging_get_log_function() NULL #define xlogging_set_log_function(...) #define LogErrorWinHTTPWithGetLastErrorAsString(...) #define UNUSED(x) (void)(x) #elif (defined MINIMAL_LOGERROR) #define LOG(...) #define LogInfo(...) #define LogBinary(...) #define LogError(...) printf("error %s: line %d\n",__FILE__,__LINE__); #define xlogging_get_log_function() NULL #define xlogging_set_log_function(...) #define LogErrorWinHTTPWithGetLastErrorAsString(...) #define UNUSED(x) (void)(x) #elif defined(ESP8266_RTOS) #define LogInfo(FORMAT, ...) do { \ static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = FORMAT; \ printf(flash_str, ##__VA_ARGS__); \ printf("\n");\ } while((void)0,0) #define LogError LogInfo #define LOG(log_category, log_options, FORMAT, ...) { \ static const char flash_str[] ICACHE_RODATA_ATTR STORE_ATTR = (FORMAT); \ printf(flash_str, ##__VA_ARGS__); \ printf("\r\n"); \ } #else /* NOT ESP8266_RTOS */ // In order to make sure that the compiler evaluates the arguments and issues an error if they do not conform to printf // specifications, we call printf with the format and __VA_ARGS__ but the call is behind an if (0) so that it does // not actually get executed at runtime #if defined _MSC_VER // ignore warning C4127 #define LOG(log_category, log_options, format, ...) \ { \ __pragma(warning(suppress: 4127)) \ if (0) \ { \ (void)printf(format, __VA_ARGS__); \ } \ { \ LOGGER_LOG l = xlogging_get_log_function(); \ if (l != NULL) \ { \ l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, __VA_ARGS__); \ } \ } \ } #else #define LOG(log_category, log_options, format, ...) { LOGGER_LOG l = xlogging_get_log_function(); if (l != NULL) l(log_category, __FILE__, FUNC_NAME, __LINE__, log_options, format, ##__VA_ARGS__); } #endif #if defined _MSC_VER #define LogInfo(FORMAT, ...) do{LOG(AZ_LOG_INFO, LOG_LINE, FORMAT, __VA_ARGS__); }while((void)0,0) #else #define LogInfo(FORMAT, ...) do{LOG(AZ_LOG_INFO, LOG_LINE, FORMAT, ##__VA_ARGS__); }while((void)0,0) #endif #ifdef WIN32 extern void xlogging_LogErrorWinHTTPWithGetLastErrorAsStringFormatter(int errorMessageID); #endif #if defined _MSC_VER #if !defined(WINCE) extern void xlogging_set_log_function_GetLastError(LOGGER_LOG_GETLASTERROR log_function); extern LOGGER_LOG_GETLASTERROR xlogging_get_log_function_GetLastError(void); #define LogLastError(FORMAT, ...) do{ LOGGER_LOG_GETLASTERROR l = xlogging_get_log_function_GetLastError(); if(l!=NULL) l(__FILE__, FUNC_NAME, __LINE__, FORMAT, __VA_ARGS__); }while((void)0,0) #endif #define LogError(FORMAT, ...) do{ LOG(AZ_LOG_ERROR, LOG_LINE, FORMAT, __VA_ARGS__); }while((void)0,0) #define LogErrorWinHTTPWithGetLastErrorAsString(FORMAT, ...) do { \ int errorMessageID = GetLastError(); \ LogError(FORMAT, __VA_ARGS__); \ xlogging_LogErrorWinHTTPWithGetLastErrorAsStringFormatter(errorMessageID); \ } while((void)0,0) #else // _MSC_VER #define LogError(FORMAT, ...) do{ LOG(AZ_LOG_ERROR, LOG_LINE, FORMAT, ##__VA_ARGS__); }while((void)0,0) #ifdef WIN32 // Included when compiling on Windows but not with MSVC, e.g. with MinGW. #define LogErrorWinHTTPWithGetLastErrorAsString(FORMAT, ...) do { \ int errorMessageID = GetLastError(); \ LogError(FORMAT, ##__VA_ARGS__); \ xlogging_LogErrorWinHTTPWithGetLastErrorAsStringFormatter(errorMessageID); \ } while((void)0,0) #endif // WIN32 #endif // _MSC_VER extern void LogBinary(const char* comment, const void* data, size_t size); extern void xlogging_set_log_function(LOGGER_LOG log_function); extern LOGGER_LOG xlogging_get_log_function(void); #endif /* NOT ESP8266_RTOS */ #ifdef __cplusplus } // extern "C" #endif /* __cplusplus */ #endif /* XLOGGING_H */ azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins/000077500000000000000000000000001362133436400307755ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins/debian_c.sh000066400000000000000000000012301362133436400330510ustar00rootroot00000000000000#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. set -e build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake -Drun_valgrind:BOOL=ON $build_root -Drun_unittests:BOOL=ON make --jobs=$CORES #use doctored openssl export LD_LIBRARY_PATH=/usr/local/ssl/lib ctest -j $CORES --output-on-failure export LD_LIBRARY_PATH= popd inteledison_c.sh000077500000000000000000000103331362133436400340740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT # license. See LICENSE file in the project root for full license # information. # Tested on Ubuntu version 14.04 toolchain_root="/opt/poky-edison" install_root="$HOME" build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root # ----------------------------------------------------------------------------- # -- helper subroutines # ----------------------------------------------------------------------------- checkExists() { if hash $1 2>/dev/null; then return 1 else echo "$1" not found. Please make sure that "$1" is installed and available in the path. exit 1 fi } # ----------------------------------------------------------------------------- # -- setup Intel edison Tool chain for cross compilation on Ubuntu # -- This method is not called in this script and kept only for showing the set of instructions needed to setup the cross compilation tool chain. # -- Tool chain is already installed on the Jenkin slave. # -- In future, If slave changes ,run these commands manually on new slave to setup the tool chain. # ----------------------------------------------------------------------------- setupIntelEdisonToolChain() { mkdir IntelEdisonSdk cd IntelEdisonSdk wget http://downloadmirror.intel.com/25028/eng/edison-sdk-linux64-ww25.5-15.zip unzip edison-sdk-linux64-ww25.5-15.zip SdkInstallScript=$(ls | grep .sh) printf '\n' | ./$SdkInstallScript DirName=$toolchain_root/$(ls $toolchain_root) EnvFileName=$(DirName)/$(ls $DirName | grep environment) source $EnvFileName } # ----------------------------------------------------------------------------- # -- Check for environment pre-requisites. # -- This script requires that the following programs work: # -- curl build-essential(g++,gcc,make) cmake git # ----------------------------------------------------------------------------- checkExists curl checkExists g++ checkExists gcc checkExists make checkExists cmake checkExists git # ----------------------------------------------------------------------------- # -- Check for Intel Edison tool-chain (default directory). # ----------------------------------------------------------------------------- if [ ! -d $toolchain_root ]; then echo ---------- Intel Edison tool-chain absent ---------- exit 1 fi # ----------------------------------------------------------------------------- # -- Set environment variable # ----------------------------------------------------------------------------- DirName=$toolchain_root/$(ls $toolchain_root) cd $DirName cd $(ls -d */) cd core2-32-poky-linux export INTELEDISON_ROOT=$(pwd) # ----------------------------------------------------------------------------- # -- Create toolchain-inteledison.cmake # ----------------------------------------------------------------------------- echo ---------- Creating toolchain cmake file ---------- FILE="$build_root/build_all/linux/toolchain-inteledison.cmake" /bin/cat <$FILE INCLUDE(CMakeForceCompiler) SET(CMAKE_SYSTEM_NAME Linux) # this one is important SET(CMAKE_SYSTEM_VERSION 1) # this one not so much # this is the location of the amd64 toolchain targeting the Intel Edison SET(CMAKE_C_COMPILER ${INTELEDISON_ROOT}/../x86_64-pokysdk-linux/usr/libexec/i586-poky-linux/gcc/i586-poky-linux/4.9.1/gcc) # this is the file system root of the target SET(CMAKE_FIND_ROOT_PATH ${INTELEDISON_ROOT}) # search for programs in the build host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # for libraries and headers in the target directories SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) EOM build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake --toolchain-file toolchain-inteledison.cmake --no-mqtt -cl --sysroot=$INTELEDISON_ROOT -Drun_valgrind:BOOL=ON $build_root -Drun_unittests:BOOL=ON -Duse_wsio:BOOL=ON make --jobs=$CORES #use doctored openssl export LD_LIBRARY_PATH=/usr/local/ssl/lib ctest -j $CORES --output-on-failure export LD_LIBRARY_PATH= popd [ $? -eq 0 ] || exit $? azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins/linux_c.sh000077500000000000000000000012531362133436400327760ustar00rootroot00000000000000#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. set -e build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake -Drun_valgrind:BOOL=ON $build_root -Drun_unittests:BOOL=ON -Duse_wsio:BOOL=ON make --jobs=$CORES #use doctored openssl export LD_LIBRARY_PATH=/usr/local/ssl/lib ctest -j $CORES --output-on-failure export LD_LIBRARY_PATH= popd linux_c_gcc44.sh000077500000000000000000000010041362133436400336750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. set -e build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake $build_root -Drun_unittests:bool=ON make --jobs=$CORES popd linux_wolfssl.sh000077500000000000000000000012271362133436400341670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. set -e build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake $build_root -Drun_unittests:BOOL=ON -Duse_wolfssl:BOOL=ON make --jobs=$CORES #use doctored openssl export LD_LIBRARY_PATH=/usr/local/ssl/lib ctest -j $CORES --output-on-failure export LD_LIBRARY_PATH= popd azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins/mbed_c.cmd000066400000000000000000000006001362133436400326670ustar00rootroot00000000000000@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root%\build_all\mbed call build.cmd %* if errorlevel 1 goto :eof cd %build-root%osx_gcc_openssl.sh000077500000000000000000000011211362133436400344400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) build_folder=$build_root"/cmake" CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -DOPENSSL_ROOT_DIR:PATH=/usr/local/opt/openssl -Duse_openssl:bool=ON -Drun_unittests:bool=ON cmake --build . -- --jobs=$CORES ctest -C "debug" -V popd osx_xcode_native.sh000077500000000000000000000010251362133436400346140ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) build_folder=$build_root"/cmake" CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_unittests:bool=ON -G Xcode cmake --build . -- --jobs=$CORES ctest -C "debug" -V popd raspberrypi_c.sh000077500000000000000000000057571362133436400341370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT # license. See LICENSE file in the project root for full license # information. # Tested on RPi2 debian verion 7.8 install_root="/home/jenkins" build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root # ----------------------------------------------------------------------------- # -- helper subroutines # ----------------------------------------------------------------------------- checkExists() { if hash $1 2>/dev/null; then return 1 else echo "$1" not found. Please make sure that "$1" is installed and available in the path. exit 1 fi } # ----------------------------------------------------------------------------- # -- Check for environment pre-requisites. This script requires -- that # the following programs work: -- curl build-essential(g++,gcc,make) # cmake git # ----------------------------------------------------------------------------- checkExists curl checkExists g++ checkExists gcc checkExists make checkExists cmake checkExists git # ----------------------------------------------------------------------------- # -- Check for RPiTools directory. # ----------------------------------------------------------------------------- if [ ! -d "$install_root/RPiTools" ]; then echo ---------- Raspberry Pi tool-chain absent ---------- exit 1 fi # ----------------------------------------------------------------------------- # -- Set environment variable # ----------------------------------------------------------------------------- cd $install_root/RPiTools/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf export RPI_ROOT=$(pwd) # ----------------------------------------------------------------------------- # -- Create toolchain-rpi.cmake # ----------------------------------------------------------------------------- echo ---------- Creating toolchain cmake file ---------- FILE="$build_root/build_all/linux/toolchain-rpi.cmake" /bin/cat <$FILE INCLUDE(CMakeForceCompiler) SET(CMAKE_SYSTEM_NAME Linux) # this one is important SET(CMAKE_SYSTEM_VERSION 1) # this one not so much # this is the location of the amd64 toolchain targeting the Raspberry Pi SET(CMAKE_C_COMPILER ${RPI_ROOT}/../bin/arm-linux-gnueabihf-gcc) # this is the file system root of the target SET(CMAKE_FIND_ROOT_PATH ${RPI_ROOT}) # search for programs in the build host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # for libraries and headers in the target directories SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) EOM build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake -DCMAKE_TOOLCHAIN_FILE=$FILE -DcompileOption_C:STRING="--sysroot=$RPI_ROOT" $build_root -Duse_wsio:BOOL=ON make --jobs=$CORES [ $? -eq 0 ] || exit $? ubuntu1510_c.sh000077500000000000000000000010561362133436400334120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. set -e build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake -Drun_valgrind:BOOL=ON $build_root -Drun_unittests:BOOL=ON -Duse_wsio:BOOL=ON make --jobs=$CORES popd ubuntu1604_c.sh000077500000000000000000000011151362133436400334120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. set -e build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root build_folder=$build_root"/cmake/shared-util_linux" # Set the default cores CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake $build_root -Drun_unittests:BOOL=ON -Drun_valgrind:BOOL=ON make --jobs=$CORES ctest -j $CORES "debug" -c -V --output-on-failure popd ubuntu_clang.sh000077500000000000000000000007731362133436400337520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) build_folder=$build_root"/cmake" rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON -Drun_unittests:bool=ON cmake --build . -- --jobs=$(nproc) ctest -C "debug" -V -j $(nproc) --output-on-failure popd :azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins/windows_c.cmd000066400000000000000000000006031362133436400334550ustar00rootroot00000000000000@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root%\build_all\windows call build.cmd %* if errorlevel 1 goto :eof cd %build-root%windows_c_build_as_dynamic.cmd000066400000000000000000000011751362133436400367510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal @echo off set cmake_dir=dynamic_build set build-root=%~dp0.. @REM // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi if EXIST %build-root%\cmake\%cmake_dir% ( rmdir /s/q %build-root%\cmake\%cmake_dir% ) mkdir %build-root%\cmake\%cmake_dir% if errorlevel 1 goto :eof cd %build-root%\cmake\%cmake_dir% cmake -Dskip_samples=ON -Dbuild_as_dynamic=ON ..\.. if errorlevel 1 goto :eof cmake --build . -- /m if errorlevel 1 goto :eof windows_vs2008_c.cmd000066400000000000000000000035051362133436400344240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi @echo off set repo_root=%build-root%\.. rem // resolve to fully qualified path for %%i in ("%repo_root%") do set repo_root=%%~fi echo Build Root: %build-root% echo Repo Root: %repo_root% set CMAKE_DIR=cshared_win32 rem ----------------------------------------------------------------------------- rem -- build with CMAKE and run tests rem ----------------------------------------------------------------------------- echo CMAKE Output Path: %build-root%\cmake\%CMAKE_DIR% if EXIST %build-root%\cmake\%CMAKE_DIR% ( rmdir /s/q %build-root%\cmake\%CMAKE_DIR% rem no error checking ) echo %build-root%\cmake\%CMAKE_DIR% mkdir %build-root%\cmake\%CMAKE_DIR% rem no error checking pushd %build-root%\cmake\%CMAKE_DIR% echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:BOOL=ON -Duse_cppunittest:bool=OFF if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! call :_run-msbuild "Build" azure_c_shared_utility.sln if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ctest -C "debug" -V if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd goto :eof rem ----------------------------------------------------------------------------- rem -- subroutines rem ----------------------------------------------------------------------------- :_run-msbuild rem // optionally override configuration|platform setlocal EnableExtensions set build-target= if "%~1" neq "Build" set "build-target=/t:%~1" msbuild /m %build-target% "/p:Configuration=Debug;Platform=Win32" %2 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof echo done windowsce_c.cmd000066400000000000000000000006031362133436400337060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root%\build_all\windowsce call build.cmd if errorlevel 1 goto :eof cd %build-root% azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/000077500000000000000000000000001362133436400301105ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/README.md000066400000000000000000000030541362133436400313710ustar00rootroot00000000000000This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # azure-c-shared-utility/pal This directory and its subfolders contain files for adapting various devices and operating systems to the Azure C Shared Utility. ### Commonly used files The directories * [azure-c-shared-utility/pal](https://github.com/Azure/azure-c-shared-utility/tree/master/pal) and * [azure-c-shared-utility/pal/inc](https://github.com/Azure/azure-c-shared-utility/tree/master/pal/inc) contain common files used by multiple devices and operating systems. ### Specialized files The remainder of the directories under [azure-c-shared-utility/pal](https://github.com/Azure/azure-c-shared-utility/tree/master/pal) such as * [azure-c-shared-utility/pal/freertos](https://github.com/Azure/azure-c-shared-utility/tree/master/pal/freertos) * [azure-c-shared-utility/pal/lwip](https://github.com/Azure/azure-c-shared-utility/tree/master/pal/lwip) * [azure-c-shared-utility/pal/linux](https://github.com/Azure/azure-c-shared-utility/tree/master/pal/linux) contain files whose use specific to an operating system or other component. ### Porting to new devices Instructions for porting the Azure IoT C SDK to new devices are located [here](https://github.com/Azure/azure-c-shared-utility/blob/pal-porting/devdoc/porting_guide.md). azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/agenttime.c000066400000000000000000000011751362133436400322350ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/gballoc.h" #include #include "azure_c_shared_utility/agenttime.h" time_t get_time(time_t* p) { return time(p); } struct tm* get_gmtime(time_t* currentTime) { return gmtime(currentTime); } time_t get_mktime(struct tm* cal_time) { return mktime(cal_time); } char* get_ctime(time_t* timeToGet) { return ctime(timeToGet); } double get_difftime(time_t stopTime, time_t startTime) { return difftime(stopTime, startTime); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/dns_async.c000066400000000000000000000173251362133436400322450ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include // This file is OS-specific, and is identified by setting include directories // in the project #include "socket_async_os.h" #include "dns_async.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/xlogging.h" // EXTRACT_IPV4 pulls the uint32_t IPv4 address out of an addrinfo struct // This will not be needed for the asynchronous design #ifdef WIN32_NOT_USED //#define EXTRACT_IPV4(ptr) ((struct sockaddr_in *) ptr->ai_addr)->sin_addr.S_un.S_addr #else // The default definition handles lwIP. Please add comments for other systems tested. #define EXTRACT_IPV4(ptr) ((struct sockaddr_in *) ptr->ai_addr)->sin_addr.s_addr #endif typedef struct { char* hostname; uint32_t ip_v4; bool is_complete; bool is_failed; } DNS_ASYNC_INSTANCE; DNS_ASYNC_HANDLE dns_async_create(const char* hostname, DNS_ASYNC_OPTIONS* options) { /* Codes_SRS_DNS_ASYNC_30_012: [ The optional options parameter shall be ignored. ]*/ DNS_ASYNC_INSTANCE* result; (void)options; if (hostname == NULL) { /* Codes_SRS_DNS_ASYNC_30_011: [ If the hostname parameter is NULL, dns_async_create shall log an error and return NULL. ]*/ LogError("NULL hostname"); result = NULL; } else { result = malloc(sizeof(DNS_ASYNC_INSTANCE)); if (result == NULL) { /* Codes_SRS_DNS_ASYNC_30_014: [ On any failure, dns_async_create shall log an error and return NULL. ]*/ LogError("malloc instance failed"); result = NULL; } else { int ms_result; result->is_complete = false; result->is_failed = false; result->ip_v4 = 0; /* Codes_SRS_DNS_ASYNC_30_010: [ dns_async_create shall make a copy of the hostname parameter to allow immediate deletion by the caller. ]*/ ms_result = mallocAndStrcpy_s(&result->hostname, hostname); if (ms_result != 0) { /* Codes_SRS_DNS_ASYNC_30_014: [ On any failure, dns_async_create shall log an error and return NULL. ]*/ free(result); result = NULL; } } } return result; } /* Codes_SRS_DNS_ASYNC_30_021: [ dns_async_is_create_complete shall perform the asynchronous work of DNS lookup and log any errors. ]*/ bool dns_async_is_lookup_complete(DNS_ASYNC_HANDLE dns_in) { DNS_ASYNC_INSTANCE* dns = (DNS_ASYNC_INSTANCE*)dns_in; bool result; if (dns == NULL) { /* Codes_SRS_DNS_ASYNC_30_020: [ If the dns parameter is NULL, dns_async_is_create_complete shall log an error and return false. ]*/ LogError("NULL dns"); result = false; } else { if (dns->is_complete) { /* Codes_SRS_DNS_ASYNC_30_024: [ If dns_async_is_create_complete has previously returned true, dns_async_is_create_complete shall do nothing and return true. ]*/ result = true; } else { struct addrinfo *addrInfo = NULL; struct addrinfo *ptr = NULL; struct addrinfo hints; int getAddrResult; /* Codes_SRS_DNS_ASYNC_30_021: [ dns_async_is_create_complete shall perform the asynchronous work of DNS lookup and log any errors. ]*/ // Only make one attempt at lookup for this // synchronous implementation dns->is_complete = true; //-------------------------------- // Setup the hints address info structure // which is passed to the getaddrinfo() function memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; //-------------------------------- // Call getaddrinfo(). If the call succeeds, // the result variable will hold a linked list // of addrinfo structures containing response // information getAddrResult = getaddrinfo(dns->hostname, NULL, &hints, &addrInfo); if (getAddrResult == 0) { // If we find the AF_INET address, use it as the return value for (ptr = addrInfo; ptr != NULL; ptr = ptr->ai_next) { switch (ptr->ai_family) { case AF_INET: /* Codes_SRS_DNS_ASYNC_30_032: [ If dns_async_is_create_complete has returned true and the lookup process has succeeded, dns_async_get_ipv4 shall return the discovered IPv4 address. ]*/ dns->ip_v4 = EXTRACT_IPV4(ptr); break; } } /* Codes_SRS_DNS_ASYNC_30_033: [ If dns_async_is_create_complete has returned true and the lookup process has failed, dns_async_get_ipv4 shall return 0. ]*/ dns->is_failed = (dns->ip_v4 == 0); freeaddrinfo(addrInfo); } else { /* Codes_SRS_DNS_ASYNC_30_033: [ If dns_async_is_create_complete has returned true and the lookup process has failed, dns_async_get_ipv4 shall return 0. ]*/ LogInfo("Failed DNS lookup for %s: %d", dns->hostname, getAddrResult); dns->is_failed = true; } // This synchronous implementation is incapable of being incomplete, so SRS_DNS_ASYNC_30_023 does not ever happen /* Codes_SRS_DNS_ASYNC_30_023: [ If the DNS lookup process is not yet complete, dns_async_is_create_complete shall return false. ]*/ /* Codes_SRS_DNS_ASYNC_30_022: [ If the DNS lookup process has completed, dns_async_is_create_complete shall return true. ]*/ result = true; } } return result; } void dns_async_destroy(DNS_ASYNC_HANDLE dns_in) { DNS_ASYNC_INSTANCE* dns = (DNS_ASYNC_INSTANCE*)dns_in; if (dns == NULL) { /* Codes_SRS_DNS_ASYNC_30_050: [ If the dns parameter is NULL, dns_async_destroy shall log an error and do nothing. ]*/ LogError("NULL dns"); } else { /* Codes_SRS_DNS_ASYNC_30_051: [ dns_async_destroy shall delete all acquired resources and delete the DNS_ASYNC_HANDLE. ]*/ free(dns->hostname); free(dns); } } uint32_t dns_async_get_ipv4(DNS_ASYNC_HANDLE dns_in) { DNS_ASYNC_INSTANCE* dns = (DNS_ASYNC_INSTANCE*)dns_in; uint32_t result; if (dns == NULL) { /* Codes_SRS_DNS_ASYNC_30_030: [ If the dns parameter is NULL, dns_async_get_ipv4 shall log an error and return 0. ]*/ LogError("NULL dns"); result = 0; } else { if (dns->is_complete) { if (dns->is_failed) { /* Codes_SRS_DNS_ASYNC_30_033: [ If dns_async_is_create_complete has returned true and the lookup process has failed, dns_async_get_ipv4 shall return 0. ]*/ result = 0; } else { /* Codes_SRS_DNS_ASYNC_30_032: [ If dns_async_is_create_complete has returned true and the lookup process has succeeded, dns_async_get_ipv4 shall return the discovered IPv4 address. ]*/ result = dns->ip_v4; } } else { /* Codes_SRS_DNS_ASYNC_30_031: [ If dns_async_is_create_complete has not yet returned true, dns_async_get_ipv4 shall log an error and return 0. ]*/ LogError("dns_async_get_ipv4 when not complete"); result = 0; } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/freertos/000077500000000000000000000000001362133436400317415ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/freertos/lock.c000066400000000000000000000061601362133436400330400ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/xlogging.h" #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" LOCK_HANDLE Lock_Init(void) { /* Codes_SRS_LOCK_10_002: [Lock_Init on success shall return a valid lock handle which should be a non NULL value] */ /* Codes_SRS_LOCK_10_003: [Lock_Init on error shall return NULL ] */ // xSemaphoreCreateMutex is the obvious choice, but it returns a recursive // sync object, which we do not want for the lock adapter. SemaphoreHandle_t result = xSemaphoreCreateBinary(); if (result != NULL) { int gv = xSemaphoreGive(result); if (gv != pdTRUE) { LogError("xSemaphoreGive failed after create."); vSemaphoreDelete(result); result = NULL; } } else { LogError("xSemaphoreCreateBinary failed."); } return (LOCK_HANDLE)result; } LOCK_RESULT Lock_Deinit(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Lock_Deinit on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { /* Codes_SRS_LOCK_10_012: [Lock_Deinit frees the memory pointed by handle] */ vSemaphoreDelete((SemaphoreHandle_t)handle); result = LOCK_OK; } return result; } LOCK_RESULT Lock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Lock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { int rv = xSemaphoreTake((SemaphoreHandle_t)handle, portMAX_DELAY); switch (rv) { case pdTRUE: /* Codes_SRS_LOCK_10_005: [Lock on success shall return LOCK_OK] */ result = LOCK_OK; break; default: LogError("xSemaphoreTake failed."); /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ result = LOCK_ERROR; break; } } return result; } LOCK_RESULT Unlock(LOCK_HANDLE handle) { LOCK_RESULT result; if (handle == NULL) { /* Codes_SRS_LOCK_10_007: [Unlock on NULL handle passed returns LOCK_ERROR] */ LogError("Invalid argument; handle is NULL."); result = LOCK_ERROR; } else { int rv = xSemaphoreGive((SemaphoreHandle_t)handle); switch (rv) { case pdTRUE: /* Codes_SRS_LOCK_10_005: [Lock on success shall return LOCK_OK] */ result = LOCK_OK; break; default: LogError("xSemaphoreGive failed."); /* Codes_SRS_LOCK_10_006: [Lock on error shall return LOCK_ERROR] */ result = LOCK_ERROR; break; } } return result; } threadapi.c000066400000000000000000000033111362133436400337650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/freertos// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/xlogging.h" /*Codes_SRS_THREADAPI_FREERTOS_30_001: [ The threadapi_freertos shall implement the method ThreadAPI_Sleep defined in threadapi.h ]*/ #include "azure_c_shared_utility/threadapi.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" /*Codes_SRS_THREADAPI_FREERTOS_30_002: [ The ThreadAPI_Sleep shall receive a time in milliseconds. ]*/ /*Codes_SRS_THREADAPI_FREERTOS_30_003: [ The ThreadAPI_Sleep shall stop the thread for the specified time. ]*/ void ThreadAPI_Sleep(unsigned int milliseconds) { vTaskDelay((milliseconds * CONFIG_FREERTOS_HZ) / 1000); } /*Codes_SRS_THREADAPI_FREERTOS_30_004: [ FreeRTOS is not guaranteed to support threading, so ThreadAPI_Create shall return THREADAPI_ERROR. ]*/ THREADAPI_RESULT ThreadAPI_Create(THREAD_HANDLE* threadHandle, THREAD_START_FUNC func, void* arg) { (void)threadHandle; (void)func; (void)arg; LogError("FreeRTOS does not support multi-threading."); return THREADAPI_ERROR; } /*Codes_SRS_THREADAPI_FREERTOS_30_005: [ FreeRTOS is not guaranteed to support threading, so ThreadAPI_Join shall return THREADAPI_ERROR. ]*/ THREADAPI_RESULT ThreadAPI_Join(THREAD_HANDLE threadHandle, int* res) { (void)threadHandle; (void)res; LogError("FreeRTOS does not support multi-threading."); return THREADAPI_ERROR; } /*Codes_SRS_THREADAPI_FREERTOS_30_006: [ FreeRTOS is not guaranteed to support threading, so ThreadAPI_Exit shall do nothing. ]*/ void ThreadAPI_Exit(int res) { (void)res; LogError("FreeRTOS does not support multi-threading."); } tickcounter.c000066400000000000000000000114231362133436400343610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/freertos// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include #include /* Codes_SRS_TICKCOUNTER_FREERTOS_30_001: [ The tickcounter_freertos adapter shall use the following data types as defined in tickcounter.h. */ /* Codes_SRS_TICKCOUNTER_FREERTOS_30_002: [ The tickcounter_freertos adapter shall implement the API calls defined in tickcounter.h */ #include "azure_c_shared_utility/tickcounter.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" typedef struct TICK_COUNTER_INSTANCE_TAG { uint32_t original_tick_count; } TICK_COUNTER_INSTANCE; TICK_COUNTER_HANDLE tickcounter_create(void) { /* Codes_SRS_TICKCOUNTER_FREERTOS_30_003: [ `tickcounter_create` shall allocate and initialize an internally-defined TICK_COUNTER_INSTANCE structure and return its pointer on success.] */ TICK_COUNTER_INSTANCE* result = (TICK_COUNTER_INSTANCE*)malloc(sizeof(TICK_COUNTER_INSTANCE)); if (result == NULL) { /* Codes_SRS_TICKCOUNTER_FREERTOS_30_004: [ If allocation of the internally-defined TICK_COUNTER_INSTANCE structure fails, `tickcounter_create` shall return NULL.] */ LogError("Failed creating tick counter"); } else { // The FreeRTOS call xTaskGetTickCount has no failure path // Store the initial tick count in order to meet these two requirements: /* Codes_SRS_TICKCOUNTER_FREERTOS_30_009: [ tickcounter_get_current_ms shall set *current_ms to the number of milliseconds elapsed since the tickcounter_create call for the specified tick_counter and return 0 to indicate success in situations where the FreeRTOS call xTaskGetTickCount has not experienced overflow between the calls to tickcounter_create and tickcounter_get_current_ms. (In FreeRTOS this call has no failure case.) ] */ /* Codes_SRS_TICKCOUNTER_FREERTOS_30_010: [ tickcounter_get_current_ms shall set *current_ms to the number of milliseconds elapsed since the tickcounter_create call for the specified tick_counter and return 0 to indicate success in situations where the FreeRTOS call xTaskGetTickCount has experienced overflow between the calls to tickcounter_create and tickcounter_get_current_ms. (In FreeRTOS this call has no failure case.) ] */ result->original_tick_count = xTaskGetTickCount(); } return result; } void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter) { /* Codes_SRS_TICKCOUNTER_FREERTOS_30_006: [ If the tick_counter parameter is NULL, tickcounter_destroy shall do nothing. ] */ if (tick_counter != NULL) { /* Codes_SRS_TICKCOUNTER_FREERTOS_30_005: [ tickcounter_destroy shall delete the internally-defined TICK_COUNTER_INSTANCE structure specified by the tick_counter parameter. (This call has no failure case.) ] */ free(tick_counter); } } int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t * current_ms) { int result; if (tick_counter == NULL || current_ms == NULL) { /* Codes_SRS_TICKCOUNTER_FREERTOS_30_007: [ If the tick_counter parameter is NULL, tickcounter_get_current_ms shall return a non-zero value to indicate error. ] */ /* Codes_SRS_TICKCOUNTER_FREERTOS_30_008: [ If the current_ms parameter is NULL, tickcounter_get_current_ms shall return a non-zero value to indicate error. ] */ LogError("Invalid Arguments."); result = __FAILURE__; } else { /* Codes_SRS_TICKCOUNTER_FREERTOS_30_009: [ tickcounter_get_current_ms shall set *current_ms to the number of milliseconds elapsed since the tickcounter_create call for the specified tick_counter and return 0 to indicate success (In FreeRTOS this call has no failure case.) ] */ /* Codes_SRS_TICKCOUNTER_FREERTOS_30_010: [ If the FreeRTOS call xTaskGetTickCount experiences a single overflow between the calls to tickcounter_create and tickcounter_get_current_ms, the tickcounter_get_current_ms call shall still return the correct interval. ] */ *current_ms = (tickcounter_ms_t)( // Subtraction of two uint32_t's followed by a cast to uint32_t // ensures that the result remains valid until the real difference exceeds 32 bits. ((uint32_t)(xTaskGetTickCount() - tick_counter->original_tick_count)) // Now that overflow behavior is ensured it is safe to scale. CONFIG_FREERTOS_HZ is typically // equal to 1000 or less, so overflow won't happen until the 49.7 day limit // of this call's effective uint32_t return value. * 1000.0 / CONFIG_FREERTOS_HZ ); result = 0; } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/generic/000077500000000000000000000000001362133436400315245ustar00rootroot00000000000000refcount_os.h000066400000000000000000000013241362133436400341440ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/generic// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file gets included into refcount.h as a means of extending the behavior of // atomic increment, decrement, and test. // // The Azure IoT C SDK does not require thread-safe refcount operations, so // this file is appropriate for any device when using the Azure IoT C SDK. #ifndef REFCOUNT_OS_H__GENERIC #define REFCOUNT_OS_H__GENERIC #define COUNT_TYPE uint32_t #define DEC_RETURN_ZERO (0) #define INC_REF_VAR(count) ++(count) #define DEC_REF_VAR(count) --(count) #define INIT_REF_VAR(count) do { count = 1; } while((void)0,0) #endif // REFCOUNT_OS_H__GENERIC azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/inc/000077500000000000000000000000001362133436400306615ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/inc/dns_async.h000066400000000000000000000034711362133436400330200ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file ssl_socket.h * @brief Implements socket creation for TLSIO adapters. */ #ifndef AZURE_IOT_DNS_H #define AZURE_IOT_DNS_H #ifdef __cplusplus extern "C" { #endif #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/umock_c_prod.h" typedef void* DNS_ASYNC_HANDLE; // If options are added in future, DNS_ASYNC_OPTIONS will become a struct containing the options typedef void DNS_ASYNC_OPTIONS; /** * @brief Begin the process of an asynchronous DNS lookup. * * @param hostname The url of the host to look up. * * @return @c The newly created DNS_ASYNC_HANDLE. */ MOCKABLE_FUNCTION(, DNS_ASYNC_HANDLE, dns_async_create, const char*, hostname, DNS_ASYNC_OPTIONS*, options); /** * @brief Continue the lookup process and report its completion state. Must be polled repeatedly for completion. * * @param dns The DNS_ASYNC_HANDLE. * * @return @c A bool to indicate completion. */ MOCKABLE_FUNCTION(, bool, dns_async_is_lookup_complete, DNS_ASYNC_HANDLE, dns); /** * @brief Return the IPv4 of a completed lookup process. Call only after dns_async_is_lookup_complete indicates completion. * * @param dns The DNS_ASYNC_HANDLE. * * @return @c A uint32_t IPv4 address. 0 indicates failure or not finished. */ MOCKABLE_FUNCTION(, uint32_t, dns_async_get_ipv4, DNS_ASYNC_HANDLE, dns); /** * @brief Destroy the module. * * @param dns The DNS_ASYNC_HANDLE. */ MOCKABLE_FUNCTION(, void, dns_async_destroy, DNS_ASYNC_HANDLE, dns); #ifdef __cplusplus } #endif #endif /* AZURE_IOT_DNS_H */ azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/inc/sntp.h000066400000000000000000000026461362133436400320260ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file threadapi.h * @brief This module implements support for creating new threads, * terminating threads and sleeping threads. */ #ifndef AZURE_IOT_SNTP_H #define AZURE_IOT_SNTP_H #ifdef __cplusplus extern "C" { #endif #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/umock_c_prod.h" /** * @brief Set the url for the ntp server to be used. Must be called before * SNTP_Init. * * @param serverName The url of the ntp server to be used. The char array * passed in must remain valid between the SNTP_SetServerName and * the SNTP_Deinit calls. * * @return @c 0 if the API call is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, int, SNTP_SetServerName, const char*, serverName); /** * @brief Performs platform-specific sntp initialization, then loops until * system time has been set from the ntp server. * * * @return @c 0 if the API call is successful or an error * code in case it fails. */ MOCKABLE_FUNCTION(, int, SNTP_Init); /** * @brief This function is called by a thread when the thread exits. */ MOCKABLE_FUNCTION(, void, SNTP_Deinit); #ifdef __cplusplus } #endif #endif /* AZURE_IOT_SNTP_H */ azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/inc/socket_async.h000066400000000000000000000112461362133436400335230ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /** @file socket_async.h * @brief Abstracts non-blocking sockets. */ #ifndef AZURE_SOCKET_ASYNC_H #define AZURE_SOCKET_ASYNC_H #ifdef __cplusplus extern "C" { #endif #include #include #include "azure_c_shared_utility/macro_utils.h" #include "azure_c_shared_utility/umock_c_prod.h" // socket_async exposes asynchronous socket operations while hiding OS-specifics. Committing to // asynchronous operation also simplifies the interface compared to generic sockets. #define SOCKET_ASYNC_INVALID_SOCKET -1 typedef struct { // Keepalive is disabled by default at the TCP level. If keepalive is desired, it // is strongly recommended to use one of the higher level keepalive (ping) options rather // than the TCP level because the higher level options provide server connection status // in addition to keeping the connection open. int keep_alive; // < 0 for system defaults, >= 0 to use supplied keep_alive, idle, interval, and count int keep_idle; // seconds before first keepalive packet (ignored if keep_alive <= 0) int keep_interval; // seconds between keepalive packets (ignored if keep_alive <= 0) int keep_count; // number of times to try before declaring failure (ignored if keep_alive <= 0) // It is acceptable to extend this struct by adding members for future enhancement, // but existing members must not be altered to ensure back-compatibility. } SOCKET_ASYNC_OPTIONS; typedef SOCKET_ASYNC_OPTIONS* SOCKET_ASYNC_OPTIONS_HANDLE; typedef int SOCKET_ASYNC_HANDLE; /** * @brief Create a non-blocking socket that is correctly configured for asynchronous use. * * @param sock Receives the created SOCKET_ASYNC_HANDLE. * * @param host_ipv4 The IPv4 of the SSL server to be contacted. * * @param port The port of the SSL server to use. * * @param is_UDP True for UDP, false for TCP. * * @param options A pointer to SOCKET_ASYNC_OPTIONS used during socket_async_create * for TCP connections only. May be NULL. Ignored for UDP sockets. * Need only exist for the duration of the socket_async_create call. * * @return @c The created and configured SOCKET_ASYNC_HANDLE if the API call is successful * or SOCKET_ASYNC_INVALID_SOCKET in case it fails. Error logging is * performed by the underlying concrete implementation, so no * further error logging is necessary. */ MOCKABLE_FUNCTION(, SOCKET_ASYNC_HANDLE, socket_async_create, uint32_t, host_ipv4, uint16_t, port, bool, is_UDP, SOCKET_ASYNC_OPTIONS_HANDLE, options); /** * @brief Check whether a newly-created socket_async has completed its initial connection. * * @param sock The created SOCKET_ASYNC_HANDLE to check for connection completion. * * @param is_created Receives the completion state if successful, set to false on failure. * * @return @c 0 if the API call is successful. * __FAILURE__ means an unexpected error has occurred and the socket must be destroyed. */ MOCKABLE_FUNCTION(, int, socket_async_is_create_complete, SOCKET_ASYNC_HANDLE, sock, bool*, is_complete); /** * @brief Send a message on the specified socket. * * @param sock The socket to be used. * * @param buffer The buffer containing the message to transmit. * * @param size The number of bytes to transmit. * * @param sent_count Receives the number of bytes transmitted. The N == 0 * case means normal operation but the socket's outgoing buffer was full. * * @return @c 0 if successful. * __FAILURE__ means an unexpected error has occurred and the socket must be destroyed. */ MOCKABLE_FUNCTION(, int, socket_async_send, SOCKET_ASYNC_HANDLE, sock, const void*, buffer, size_t, size, size_t*, sent_count); /** * @brief Receive a message on the specified socket. * * @param sock The socket to be used. * * @param buffer The buffer containing the message to receive. * * @param size The buffer size in bytes. * * @param received_count Receives the number of bytes received into the buffer. * * @return @c 0 if successful. * __FAILURE__ means an unexpected error has occurred and the socket must be destroyed. */ MOCKABLE_FUNCTION(, int, socket_async_receive, SOCKET_ASYNC_HANDLE, sock, void*, buffer, size_t, size, size_t*, received_count); /** * @brief Close the socket returned by socket_async_create. * * @param sock The socket to be destroyed (closed, in standard socket terms). */ MOCKABLE_FUNCTION(, void, socket_async_destroy, SOCKET_ASYNC_HANDLE, sock); #ifdef __cplusplus } #endif #endif /* AZURE_SOCKET_ASYNC_H */ azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/ios-osx/000077500000000000000000000000001362133436400315115ustar00rootroot00000000000000platform_appleios.c000066400000000000000000000021561362133436400353220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/ios-osx// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/platform.h" #include #include #include #include "tlsio_appleios.h" int platform_init(void) { return 0; } const IO_INTERFACE_DESCRIPTION* platform_get_default_tlsio(void) { return tlsio_appleios_get_interface_description(); } STRING_HANDLE platform_get_platform_info(void) { STRING_HANDLE result; struct utsname nnn; if (uname(&nnn) == 0) { result = STRING_construct_sprintf("(%s; %s)", nnn.sysname, nnn.machine); if (result == NULL) { LogInfo("ERROR: Failed to create machine info string"); } } else { LogInfo("WARNING: failed to find machine info."); result = STRING_construct("iOS"); if (result == NULL) { LogInfo("ERROR: Failed to create machine info string"); } } return result; } void platform_deinit(void) { } tlsio_appleios.c000066400000000000000000001103521362133436400346260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/ios-osx// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include "tlsio_appleios.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/tlsio_options.h" #include #include #include #include typedef struct { unsigned char* bytes; size_t size; size_t unsent_size; ON_SEND_COMPLETE on_send_complete; void* callback_context; } PENDING_TRANSMISSION; #define MAX_VALID_PORT 0xffff const char WEBSOCKET_HEADER_START[] = "GET /$iothub/websocket"; const char WEBSOCKET_HEADER_NO_CERT_PARAM[] = "?iothub-no-client-cert=true"; const size_t WEBSOCKET_HEADER_START_SIZE = sizeof(WEBSOCKET_HEADER_START) - 1; const size_t WEBSOCKET_HEADER_NO_CERT_PARAM_SIZE = sizeof(WEBSOCKET_HEADER_NO_CERT_PARAM) - 1; // The TLSIO_RECEIVE_BUFFER_SIZE has very little effect on performance, and is kept small // to minimize memory consumption. #define TLSIO_RECEIVE_BUFFER_SIZE 64 typedef enum TLSIO_STATE_TAG { TLSIO_STATE_CLOSED, TLSIO_STATE_OPENING_WAITING_DNS, TLSIO_STATE_OPENING_WAITING_SOCKET, TLSIO_STATE_OPENING_WAITING_SSL, TLSIO_STATE_OPEN, TLSIO_STATE_ERROR, } TLSIO_STATE; bool is_an_opening_state(TLSIO_STATE state) { return state == TLSIO_STATE_OPENING_WAITING_DNS || state == TLSIO_STATE_OPENING_WAITING_SOCKET || state == TLSIO_STATE_OPENING_WAITING_SSL; } typedef struct TLS_IO_INSTANCE_TAG { ON_BYTES_RECEIVED on_bytes_received; ON_IO_ERROR on_io_error; ON_IO_OPEN_COMPLETE on_open_complete; void* on_bytes_received_context; void* on_io_error_context; void* on_open_complete_context; TLSIO_STATE tlsio_state; CFStringRef hostname; uint16_t port; bool no_messages_yet_sent; CFReadStreamRef sockRead; CFWriteStreamRef sockWrite; SINGLYLINKEDLIST_HANDLE pending_transmission_list; TLSIO_OPTIONS options; } TLS_IO_INSTANCE; /* Codes_SRS_TLSIO_30_005: [ The phrase "enter TLSIO_STATE_EXT_ERROR" means the adapter shall call the on_io_error function and pass the on_io_error_context that was supplied in tlsio_open_async. ]*/ static void enter_tlsio_error_state(TLS_IO_INSTANCE* tls_io_instance) { if (tls_io_instance->tlsio_state != TLSIO_STATE_ERROR) { tls_io_instance->tlsio_state = TLSIO_STATE_ERROR; tls_io_instance->on_io_error(tls_io_instance->on_io_error_context); } } /* Codes_SRS_TLSIO_30_005: [ When the adapter enters TLSIO_STATE_EXT_ERROR it shall call the on_io_error function and pass the on_io_error_context that were supplied in tlsio_open . ]*/ static void enter_open_error_state(TLS_IO_INSTANCE* tls_io_instance) { // save instance variables in case the framework destroys this object before we exit ON_IO_OPEN_COMPLETE on_open_complete = tls_io_instance->on_open_complete; void* on_open_complete_context = tls_io_instance->on_open_complete_context; enter_tlsio_error_state(tls_io_instance); on_open_complete(on_open_complete_context, IO_OPEN_ERROR); } // Return true if a message was available to remove static bool process_and_destroy_head_message(TLS_IO_INSTANCE* tls_io_instance, IO_SEND_RESULT send_result) { bool result; LIST_ITEM_HANDLE head_pending_io; if (send_result == IO_SEND_ERROR) { /* Codes_SRS_TLSIO_30_095: [ If the send process fails before sending all of the bytes in an enqueued message, the tlsio_dowork shall call the message's on_send_complete along with its associated callback_context and IO_SEND_ERROR. ]*/ enter_tlsio_error_state(tls_io_instance); } head_pending_io = singlylinkedlist_get_head_item(tls_io_instance->pending_transmission_list); if (head_pending_io != NULL) { PENDING_TRANSMISSION* head_message = (PENDING_TRANSMISSION*)singlylinkedlist_item_get_value(head_pending_io); if (singlylinkedlist_remove(tls_io_instance->pending_transmission_list, head_pending_io) != 0) { // This particular situation is a bizarre and unrecoverable internal error /* Codes_SRS_TLSIO_30_094: [ If the send process encounters an internal error or calls on_send_complete with IO_SEND_ERROR due to either failure or timeout, it shall also call on_io_error and pass in the associated on_io_error_context. ]*/ enter_tlsio_error_state(tls_io_instance); LogError("Failed to remove message from list"); } // on_send_complete is checked for NULL during PENDING_TRANSMISSION creation /* Codes_SRS_TLSIO_30_095: [ If the send process fails before sending all of the bytes in an enqueued message, the tlsio_dowork shall call the message's on_send_complete along with its associated callback_context and IO_SEND_ERROR. ]*/ head_message->on_send_complete(head_message->callback_context, send_result); free(head_message->bytes); free(head_message); result = true; } else { result = false; } return result; } static void internal_close(TLS_IO_INSTANCE* tls_io_instance) { /* Codes_SRS_TLSIO_30_009: [ The phrase "enter TLSIO_STATE_EXT_CLOSING" means the adapter shall iterate through any unsent messages in the queue and shall delete each message after calling its on_send_complete with the associated callback_context and IO_SEND_CANCELLED. ]*/ /* Codes_SRS_TLSIO_30_006: [ The phrase "enter TLSIO_STATE_EXT_CLOSED" means the adapter shall forcibly close any existing connections then call the on_io_close_complete function and pass the on_io_close_complete_context that was supplied in tlsio_close_async. ]*/ /* Codes_SRS_TLSIO_30_051: [ On success, if the underlying TLS does not support asynchronous closing, then the adapter shall enter TLSIO_STATE_EXT_CLOSED immediately after entering TLSIO_STATE_EX_CLOSING. ]*/ if (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN) { if (tls_io_instance->sockRead != NULL) { CFReadStreamClose(tls_io_instance->sockRead); } if (tls_io_instance->sockWrite != NULL) { CFWriteStreamClose(tls_io_instance->sockWrite); } } if (tls_io_instance->sockRead != NULL) { CFRelease(tls_io_instance->sockRead); tls_io_instance->sockRead = NULL; } // If the reader is NULL then the writer should be too but let's be thorough if (tls_io_instance->sockWrite != NULL) { CFRelease(tls_io_instance->sockWrite); tls_io_instance->sockWrite = NULL; } while (process_and_destroy_head_message(tls_io_instance, IO_SEND_CANCELLED)); // singlylinkedlist_destroy gets called in the main destroy tls_io_instance->on_bytes_received = NULL; tls_io_instance->on_io_error = NULL; tls_io_instance->on_bytes_received_context = NULL; tls_io_instance->on_io_error_context = NULL; tls_io_instance->tlsio_state = TLSIO_STATE_CLOSED; tls_io_instance->on_open_complete = NULL; tls_io_instance->on_open_complete_context = NULL; } static void tlsio_appleios_destroy(CONCRETE_IO_HANDLE tls_io) { if (tls_io == NULL) { /* Codes_SRS_TLSIO_30_020: [ If tlsio_handle is NULL, tlsio_destroy shall do nothing. ]*/ LogError("NULL tlsio"); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_CLOSED) { /* Codes_SRS_TLSIO_30_022: [ If the adapter is in any state other than TLSIO_STATE_EX_CLOSED when tlsio_destroy is called, the adapter shall enter TLSIO_STATE_EX_CLOSING and then enter TLSIO_STATE_EX_CLOSED before completing the destroy process. ]*/ LogError("tlsio_appleios_destroy called while not in TLSIO_STATE_CLOSED."); internal_close(tls_io_instance); } /* Codes_SRS_TLSIO_30_021: [ The tlsio_destroy shall release all allocated resources and then release tlsio_handle. ]*/ if (tls_io_instance->hostname != NULL) { CFRelease(tls_io_instance->hostname); } tlsio_options_release_resources(&tls_io_instance->options); if (tls_io_instance->pending_transmission_list != NULL) { /* Pending messages were cleared in internal_close */ singlylinkedlist_destroy(tls_io_instance->pending_transmission_list); } free(tls_io_instance); } } /* Codes_SRS_TLSIO_30_010: [ The tlsio_create shall allocate and initialize all necessary resources and return an instance of the tlsio_appleios_compact. ]*/ static CONCRETE_IO_HANDLE tlsio_appleios_create(void* io_create_parameters) { TLS_IO_INSTANCE* result; if (io_create_parameters == NULL) { /* Codes_SRS_TLSIO_30_013: [ If the io_create_parameters value is NULL, tlsio_create shall log an error and return NULL. ]*/ LogError("NULL tls_io_config"); result = NULL; } else { /* Codes_SRS_TLSIO_30_012: [ The tlsio_create shall receive the connection configuration as a TLSIO_CONFIG* in io_create_parameters. ]*/ TLSIO_CONFIG* tls_io_config = (TLSIO_CONFIG*)io_create_parameters; if (tls_io_config->hostname == NULL) { /* Codes_SRS_TLSIO_30_014: [ If the hostname member of io_create_parameters value is NULL, tlsio_create shall log an error and return NULL. ]*/ LogError("NULL tls_io_config->hostname"); result = NULL; } else { if (tls_io_config->port < 0 || tls_io_config->port > MAX_VALID_PORT) { /* Codes_SRS_TLSIO_30_015: [ If the port member of io_create_parameters value is less than 0 or greater than 0xffff, tlsio_create shall log an error and return NULL. ]*/ LogError("tls_io_config->port out of range"); result = NULL; } else { result = malloc(sizeof(TLS_IO_INSTANCE)); if (result == NULL) { /* Codes_SRS_TLSIO_30_011: [ If any resource allocation fails, tlsio_create shall return NULL. ]*/ LogError("malloc failed"); } else { memset(result, 0, sizeof(TLS_IO_INSTANCE)); result->port = (uint16_t)tls_io_config->port; result->tlsio_state = TLSIO_STATE_CLOSED; result->sockRead = NULL; result->sockWrite = NULL; result->hostname = NULL; result->pending_transmission_list = NULL; tlsio_options_initialize(&result->options, TLSIO_OPTION_BIT_NONE); /* Codes_SRS_TLSIO_30_016: [ tlsio_create shall make a copy of the hostname member of io_create_parameters to allow deletion of hostname immediately after the call. ]*/ if (NULL == (result->hostname = CFStringCreateWithCString(NULL, tls_io_config->hostname, kCFStringEncodingUTF8))) { /* Codes_SRS_TLSIO_30_011: [ If any resource allocation fails, tlsio_create shall return NULL. ]*/ LogError("CFStringCreateWithCString failed"); tlsio_appleios_destroy(result); result = NULL; } else { // Create the message queue result->pending_transmission_list = singlylinkedlist_create(); if (result->pending_transmission_list == NULL) { /* Codes_SRS_TLSIO_30_011: [ If any resource allocation fails, tlsio_create shall return NULL. ]*/ LogError("Failed singlylinkedlist_create"); tlsio_appleios_destroy(result); result = NULL; } } } } } } return (CONCRETE_IO_HANDLE)result; } static int tlsio_appleios_open_async(CONCRETE_IO_HANDLE tls_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; if (on_io_open_complete == NULL) { /* Codes_SRS_TLSIO_30_031: [ If the on_io_open_complete parameter is NULL, tlsio_open shall log an error and return FAILURE. ]*/ LogError("Required parameter on_io_open_complete is NULL"); result = __FAILURE__; } else { if (tls_io == NULL) { /* Codes_SRS_TLSIO_30_030: [ If the tlsio_handle parameter is NULL, tlsio_open shall log an error and return FAILURE. ]*/ result = __FAILURE__; LogError("NULL tlsio"); } else { if (on_bytes_received == NULL) { /* Codes_SRS_TLSIO_30_032: [ If the on_bytes_received parameter is NULL, tlsio_open shall log an error and return FAILURE. ]*/ LogError("Required parameter on_bytes_received is NULL"); result = __FAILURE__; } else { if (on_io_error == NULL) { /* Codes_SRS_TLSIO_30_033: [ If the on_io_error parameter is NULL, tlsio_open shall log an error and return FAILURE. ]*/ LogError("Required parameter on_io_error is NULL"); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_CLOSED) { /* Codes_SRS_TLSIO_30_037: [ If the adapter is in any state other than TLSIO_STATE_EXT_CLOSED when tlsio_open is called, it shall log an error, and return FAILURE. ]*/ LogError("Invalid tlsio_state. Expected state is TLSIO_STATE_CLOSED."); result = __FAILURE__; } else { tls_io_instance->no_messages_yet_sent = true; /* Codes_SRS_TLSIO_30_034: [ The tlsio_open shall store the provided on_bytes_received, on_bytes_received_context, on_io_error, on_io_error_context, on_io_open_complete, and on_io_open_complete_context parameters for later use as specified and tested per other line entries in this document. ]*/ tls_io_instance->on_bytes_received = on_bytes_received; tls_io_instance->on_bytes_received_context = on_bytes_received_context; tls_io_instance->on_io_error = on_io_error; tls_io_instance->on_io_error_context = on_io_error_context; tls_io_instance->on_open_complete = on_io_open_complete; tls_io_instance->on_open_complete_context = on_io_open_complete_context; /* Codes_SRS_TLSIO_30_035: [ On tlsio_open success the adapter shall enter TLSIO_STATE_EX_OPENING and return 0. ]*/ // All the real work happens in dowork tls_io_instance->tlsio_state = TLSIO_STATE_OPENING_WAITING_DNS; result = 0; } } } } /* Codes_SRS_TLSIO_30_039: [ On failure, tlsio_open_async shall not call on_io_open_complete. ]*/ } return result; } // This implementation does not have asynchronous close, but uses the _async name for consistencty with the spec static int tlsio_appleios_close_async(CONCRETE_IO_HANDLE tls_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result; if (tls_io == NULL) { /* Codes_SRS_TLSIO_30_050: [ If the tlsio_handle parameter is NULL, tlsio_appleios_close_async shall log an error and return FAILURE. ]*/ LogError("NULL tlsio"); result = __FAILURE__; } else { if (on_io_close_complete == NULL) { /* Codes_SRS_TLSIO_30_055: [ If the on_io_close_complete parameter is NULL, tlsio_appleios_close_async shall log an error and return FAILURE. ]*/ LogError("NULL on_io_close_complete"); result = __FAILURE__; } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN && tls_io_instance->tlsio_state != TLSIO_STATE_ERROR) { /* Codes_SRS_TLSIO_30_053: [ If the adapter is in any state other than TLSIO_STATE_EXT_OPEN or TLSIO_STATE_EXT_ERROR then tlsio_close_async shall log that tlsio_close_async has been called and then continue normally. ]*/ // LogInfo rather than LogError because this is an unusual but not erroneous situation LogInfo("tlsio_appleios_close has been called when in neither TLSIO_STATE_OPEN nor TLSIO_STATE_ERROR."); } if (is_an_opening_state(tls_io_instance->tlsio_state)) { /* Codes_SRS_TLSIO_30_057: [ On success, if the adapter is in TLSIO_STATE_EXT_OPENING, it shall call on_io_open_complete with the on_io_open_complete_context supplied in tlsio_open_async and IO_OPEN_CANCELLED. This callback shall be made before changing the internal state of the adapter. ]*/ tls_io_instance->on_open_complete(tls_io_instance->on_open_complete_context, IO_OPEN_CANCELLED); } // This adapter does not support asynchronous closing /* Codes_SRS_TLSIO_30_056: [ On success the adapter shall enter TLSIO_STATE_EX_CLOSING. ]*/ /* Codes_SRS_TLSIO_30_051: [ On success, if the underlying TLS does not support asynchronous closing, then the adapter shall enter TLSIO_STATE_EX_CLOSED immediately after entering TLSIO_STATE_EX_CLOSING. ]*/ /* Codes_SRS_TLSIO_30_052: [ On success tlsio_close shall return 0. ]*/ internal_close(tls_io_instance); on_io_close_complete(callback_context); result = 0; } } /* Codes_SRS_TLSIO_30_054: [ On failure, the adapter shall not call on_io_close_complete. ]*/ return result; } static void dowork_read(TLS_IO_INSTANCE* tls_io_instance) { // TRANSFER_BUFFER_SIZE is not very important because if the message is bigger // then the framework just calls dowork repeatedly until it gets everything. So // a bigger buffer would just use memory without buying anything. // Putting this buffer in a small function also allows it to exist on the stack // rather than adding to heap fragmentation. uint8_t buffer[TLSIO_RECEIVE_BUFFER_SIZE]; CFIndex rcv_bytes; if (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN) { CFStreamStatus read_status = CFReadStreamGetStatus(tls_io_instance->sockRead); if (read_status == kCFStreamStatusAtEnd) { enter_tlsio_error_state(tls_io_instance); } else { while (tls_io_instance->tlsio_state == TLSIO_STATE_OPEN && CFReadStreamHasBytesAvailable(tls_io_instance->sockRead)) { rcv_bytes = CFReadStreamRead(tls_io_instance->sockRead, buffer, (CFIndex)(sizeof(buffer))); if (rcv_bytes > 0) { // tls_io_instance->on_bytes_received was already checked for NULL // in the call to tlsio_appleios_open_async /* Codes_SRS_TLSIO_30_100: [ As long as the TLS connection is able to provide received data, tlsio_dowork shall repeatedly read this data and call on_bytes_received with the pointer to the buffer containing the data, the number of bytes received, and the on_bytes_received_context. ]*/ tls_io_instance->on_bytes_received(tls_io_instance->on_bytes_received_context, buffer, rcv_bytes); } else if (rcv_bytes < 0) { LogError("Communications error while reading"); enter_tlsio_error_state(tls_io_instance); } /* Codes_SRS_TLSIO_30_102: [ If the TLS connection receives no data then tlsio_dowork shall not call the on_bytes_received callback. ]*/ } } } } static void dowork_send(TLS_IO_INSTANCE* tls_io_instance) { LIST_ITEM_HANDLE first_pending_io = singlylinkedlist_get_head_item(tls_io_instance->pending_transmission_list); if (first_pending_io != NULL) { PENDING_TRANSMISSION* pending_message = (PENDING_TRANSMISSION*)singlylinkedlist_item_get_value(first_pending_io); uint8_t* buffer = ((uint8_t*)pending_message->bytes) + pending_message->size - pending_message->unsent_size; // Check to see if the socket will not block if (CFWriteStreamCanAcceptBytes(tls_io_instance->sockWrite)) { CFIndex write_result = CFWriteStreamWrite(tls_io_instance->sockWrite, buffer, pending_message->unsent_size); if (write_result >= 0) { pending_message->unsent_size -= write_result; if (pending_message->unsent_size == 0) { /* Codes_SRS_TLSIO_30_091: [ If tlsio_appleios_compact_dowork is able to send all the bytes in an enqueued message, it shall call the messages's on_send_complete along with its associated callback_context and IO_SEND_OK. ]*/ // The whole message has been sent successfully process_and_destroy_head_message(tls_io_instance, IO_SEND_OK); } else { /* Codes_SRS_TLSIO_30_093: [ If the TLS connection was not able to send an entire enqueued message at once, subsequent calls to tlsio_dowork shall continue to send the remaining bytes. ]*/ // Repeat the send on the next pass with the rest of the message // This empty else compiles to nothing but helps readability } } else { // The write returned non-success. It may be busy, or it may be broken CFErrorRef write_error = CFWriteStreamCopyError(tls_io_instance->sockWrite); if (write_error != NULL && CFErrorGetCode(write_error) != errSSLWouldBlock) { /* Codes_SRS_TLSIO_30_002: [ The phrase "destroy the failed message" means that the adapter shall remove the message from the queue and destroy it after calling the message's on_send_complete along with its associated callback_context and IO_SEND_ERROR. ]*/ /* Codes_SRS_TLSIO_30_005: [ When the adapter enters TLSIO_STATE_EXT_ERROR it shall call the on_io_error function and pass the on_io_error_context that were supplied in tlsio_open . ]*/ /* Codes_SRS_TLSIO_30_095: [ If the send process fails before sending all of the bytes in an enqueued message, tlsio_dowork shall destroy the failed message and enter TLSIO_STATE_EX_ERROR. ]*/ // This is an unexpected error, and we need to bail out. Probably lost internet connection. LogInfo("Hard error from CFWriteStreamWrite: %ld", CFErrorGetCode(write_error)); process_and_destroy_head_message(tls_io_instance, IO_SEND_ERROR); CFRelease(write_error); } else { // The errSSLWouldBlock is defined as a recoverable error and should just be retried LogInfo("errSSLWouldBlock on write"); } } } } else { /* Codes_SRS_TLSIO_30_096: [ If there are no enqueued messages available, tlsio_appleios_compact_dowork shall do nothing. ]*/ } } static void dowork_poll_dns(TLS_IO_INSTANCE* tls_io_instance) { // Sockets on iOS do DNS lookup during open - just change the status tls_io_instance->tlsio_state = TLSIO_STATE_OPENING_WAITING_SOCKET; } static void dowork_poll_socket(TLS_IO_INSTANCE* tls_io_instance) { // This will pretty much only fail if we run out of memory CFStreamCreatePairWithSocketToHost(NULL, tls_io_instance->hostname, tls_io_instance->port, &tls_io_instance->sockRead, &tls_io_instance->sockWrite); if (tls_io_instance->sockRead != NULL && tls_io_instance->sockWrite != NULL) { if (CFReadStreamSetProperty(tls_io_instance->sockRead, kCFStreamPropertySSLSettings, kCFStreamSocketSecurityLevelNegotiatedSSL)) { tls_io_instance->tlsio_state = TLSIO_STATE_OPENING_WAITING_SSL; } else { LogError("Failed to set socket properties"); enter_open_error_state(tls_io_instance); } } else { LogError("Unable to create socket pair"); enter_open_error_state(tls_io_instance); } } static void dowork_poll_open_ssl(TLS_IO_INSTANCE* tls_io_instance) { if (CFReadStreamOpen(tls_io_instance->sockRead) && CFWriteStreamOpen(tls_io_instance->sockWrite)) { /* Codes_SRS_TLSIO_30_080: [ The tlsio_dowork shall establish a TLS connection using the hostName and port provided during tlsio_open. ]*/ // Connect succeeded tls_io_instance->tlsio_state = TLSIO_STATE_OPEN; /* Codes_SRS_TLSIO_30_007: [ The phrase "enter TLSIO_STATE_EXT_OPEN" means the adapter shall call the on_io_open_complete function and pass IO_OPEN_OK and the on_io_open_complete_context that was supplied in tlsio_open . ]*/ /* Codes_SRS_TLSIO_30_083: [ If tlsio_dowork successfully opens the TLS connection it shall enter TLSIO_STATE_EX_OPEN. ]*/ tls_io_instance->on_open_complete(tls_io_instance->on_open_complete_context, IO_OPEN_OK); } else { CFErrorRef readError = CFReadStreamCopyError(tls_io_instance->sockRead); if (readError != NULL) { CFErrorRef writeError = CFWriteStreamCopyError(tls_io_instance->sockWrite); if (writeError != NULL) { LogInfo("Error opening streams - read error=%ld;write error=%ld", CFErrorGetCode(readError), CFErrorGetCode(writeError)); CFRelease(writeError); } else { LogInfo("Error opening streams - read error=%ld", CFErrorGetCode(readError)); } CFRelease(readError); } enter_open_error_state(tls_io_instance); } } static void tlsio_appleios_dowork(CONCRETE_IO_HANDLE tls_io) { if (tls_io == NULL) { /* Codes_SRS_TLSIO_30_070: [ If the tlsio_handle parameter is NULL, tlsio_dowork shall do nothing except log an error. ]*/ LogError("NULL tlsio"); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; // This switch statement handles all of the state transitions during the opening process switch (tls_io_instance->tlsio_state) { case TLSIO_STATE_CLOSED: /* Codes_SRS_TLSIO_30_075: [ If the adapter is in TLSIO_STATE_EXT_CLOSED then tlsio_dowork shall do nothing. ]*/ // Waiting to be opened, nothing to do break; case TLSIO_STATE_OPENING_WAITING_DNS: dowork_poll_dns(tls_io_instance); break; case TLSIO_STATE_OPENING_WAITING_SOCKET: dowork_poll_socket(tls_io_instance); break; case TLSIO_STATE_OPENING_WAITING_SSL: dowork_poll_open_ssl(tls_io_instance); break; case TLSIO_STATE_OPEN: dowork_read(tls_io_instance); dowork_send(tls_io_instance); break; case TLSIO_STATE_ERROR: /* Codes_SRS_TLSIO_30_071: [ If the adapter is in TLSIO_STATE_EXT_ERROR then tlsio_dowork shall do nothing. ]*/ // There's nothing valid to do here but wait to be retried break; default: LogError("Unexpected internal tlsio state"); break; } } } static int tlsio_appleios_setoption(CONCRETE_IO_HANDLE tls_io, const char* optionName, const void* value) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_30_120: [ If the tlsio_handle parameter is NULL, tlsio_appleios_setoption shall do nothing except log an error and return FAILURE. ]*/ int result; if (tls_io_instance == NULL) { LogError("NULL tlsio"); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_30_121: [ If the optionName parameter is NULL, tlsio_appleios_setoption shall do nothing except log an error and return FAILURE. ]*/ /* Codes_SRS_TLSIO_30_122: [ If the value parameter is NULL, tlsio_appleios_setoption shall do nothing except log an error and return FAILURE. ]*/ /* Codes_SRS_TLSIO_OPENSSL_COMPACT_30_520 [ The tlsio_setoption shall do nothing and return FAILURE. ]*/ TLSIO_OPTIONS_RESULT options_result = tlsio_options_set(&tls_io_instance->options, optionName, value); if (options_result != TLSIO_OPTIONS_RESULT_SUCCESS) { LogError("Failed tlsio_options_set"); result = __FAILURE__; } else { result = 0; } } return result; } static int tlsio_appleios_send_async(CONCRETE_IO_HANDLE tls_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if (on_send_complete == NULL || tls_io == NULL || buffer == NULL || size == 0 || on_send_complete == NULL) { /* Codes_SRS_TLSIO_30_062: [ If the on_send_complete is NULL, tlsio_appleios_compact_send shall log the error and return FAILURE. ]*/ result = __FAILURE__; LogError("Invalid parameter specified: tls_io: %p, buffer: %p, size: %zu, on_send_complete: %p", tls_io, buffer, size, on_send_complete); } else { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; if (tls_io_instance->tlsio_state != TLSIO_STATE_OPEN) { /* Codes_SRS_TLSIO_30_060: [ If the tlsio_handle parameter is NULL, tlsio_appleios_compact_send shall log an error and return FAILURE. ]*/ /* Codes_SRS_TLSIO_30_065: [ If tlsio_appleios_compact_open has not been called or the opening process has not been completed, tlsio_appleios_compact_send shall log an error and return FAILURE. ]*/ result = __FAILURE__; LogError("tlsio_appleios_send_async without a prior successful open"); } else { PENDING_TRANSMISSION* pending_transmission = (PENDING_TRANSMISSION*)malloc(sizeof(PENDING_TRANSMISSION)); if (pending_transmission == NULL) { /* Codes_SRS_TLSIO_30_064: [ If the supplied message cannot be enqueued for transmission, tlsio_appleios_compact_send shall log an error and return FAILURE. ]*/ result = __FAILURE__; LogError("malloc failed"); } else { // For AMQP and MQTT over websockets, the interaction of the IoT Hub and the // Apple TLS requires hacking the websocket upgrade header with a // "iothub-no-client-cert=true" parameter to avoid a TLS hang. bool add_no_cert_url_parameter = false; if (tls_io_instance->no_messages_yet_sent) { tls_io_instance->no_messages_yet_sent = false; if (strncmp((const char*)buffer, WEBSOCKET_HEADER_START, WEBSOCKET_HEADER_START_SIZE) == 0) { add_no_cert_url_parameter = true; size += WEBSOCKET_HEADER_NO_CERT_PARAM_SIZE; } } /* Codes_SRS_TLSIO_30_063: [ The tlsio_appleios_compact_send shall enqueue for transmission the on_send_complete, the callback_context, the size, and the contents of buffer. ]*/ if ((pending_transmission->bytes = (unsigned char*)malloc(size)) == NULL) { /* Codes_SRS_TLSIO_30_064: [ If the supplied message cannot be enqueued for transmission, tlsio_appleios_compact_send shall log an error and return FAILURE. ]*/ LogError("malloc failed"); free(pending_transmission); result = __FAILURE__; } else { pending_transmission->size = size; pending_transmission->unsent_size = size; pending_transmission->on_send_complete = on_send_complete; pending_transmission->callback_context = callback_context; if (add_no_cert_url_parameter) { // Insert the WEBSOCKET_HEADER_NO_CERT_PARAM after the url (void)memcpy(pending_transmission->bytes, WEBSOCKET_HEADER_START, WEBSOCKET_HEADER_START_SIZE); (void)memcpy(pending_transmission->bytes + WEBSOCKET_HEADER_START_SIZE, WEBSOCKET_HEADER_NO_CERT_PARAM, WEBSOCKET_HEADER_NO_CERT_PARAM_SIZE); (void)memcpy(pending_transmission->bytes + WEBSOCKET_HEADER_START_SIZE + WEBSOCKET_HEADER_NO_CERT_PARAM_SIZE, buffer + WEBSOCKET_HEADER_START_SIZE, size - WEBSOCKET_HEADER_START_SIZE - WEBSOCKET_HEADER_NO_CERT_PARAM_SIZE); } else { (void)memcpy(pending_transmission->bytes, buffer, size); } if (singlylinkedlist_add(tls_io_instance->pending_transmission_list, pending_transmission) == NULL) { /* Codes_SRS_TLSIO_30_064: [ If the supplied message cannot be enqueued for transmission, tlsio_appleios_compact_send shall log an error and return FAILURE. ]*/ LogError("Unable to add socket to pending list."); free(pending_transmission->bytes); free(pending_transmission); result = __FAILURE__; } else { /* Codes_SRS_TLSIO_30_063: [ On success, tlsio_send shall enqueue for transmission the on_send_complete , the callback_context , the size , and the contents of buffer and then return 0. ]*/ result = 0; dowork_send(tls_io_instance); } } } } /* Codes_SRS_TLSIO_30_066: [ On failure, on_send_complete shall not be called. ]*/ } return result; } /* Codes_SRS_TLSIO_APPLEIOS_COMPACT_30_560: [ The tlsio_retrieveoptions shall do nothing and return NULL. ]*/ static OPTIONHANDLER_HANDLE tlsio_appleios_retrieveoptions(CONCRETE_IO_HANDLE tls_io) { TLS_IO_INSTANCE* tls_io_instance = (TLS_IO_INSTANCE*)tls_io; /* Codes_SRS_TLSIO_30_160: [ If the tlsio_handle parameter is NULL, tlsio_appleios_retrieveoptions shall do nothing except log an error and return FAILURE. ]*/ OPTIONHANDLER_HANDLE result; if (tls_io_instance == NULL) { LogError("NULL tlsio"); result = NULL; } else { result = tlsio_options_retrieve_options(&tls_io_instance->options, tlsio_appleios_setoption); } return result; } /* Codes_SRS_TLSIO_30_008: [ The tlsio_get_interface_description shall return the VTable IO_INTERFACE_DESCRIPTION. ]*/ static const IO_INTERFACE_DESCRIPTION tlsio_appleios_interface_description = { tlsio_appleios_retrieveoptions, tlsio_appleios_create, tlsio_appleios_destroy, tlsio_appleios_open_async, tlsio_appleios_close_async, tlsio_appleios_send_async, tlsio_appleios_dowork, tlsio_appleios_setoption }; /* Codes_SRS_TLSIO_30_001: [ The tlsio_appleios_compact shall implement and export all the Concrete functions in the VTable IO_INTERFACE_DESCRIPTION defined in the xio.h. ]*/ const IO_INTERFACE_DESCRIPTION* tlsio_appleios_get_interface_description(void) { return &tlsio_appleios_interface_description; } const IO_INTERFACE_DESCRIPTION* socketio_get_interface_description(void) { return NULL; } tlsio_appleios.h000066400000000000000000000013551362133436400346350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/ios-osx// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TLSIO_APPLEIOS_H #define TLSIO_APPLEIOS_H #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/umock_c_prod.h" /** @brief Return the tlsio table of functions. * * @param void. * * @return The tlsio interface (IO_INTERFACE_DESCRIPTION). */ MOCKABLE_FUNCTION(, const IO_INTERFACE_DESCRIPTION*, tlsio_appleios_get_interface_description); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* TLSIO_APPLEIOS_H */ azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/linux/000077500000000000000000000000001362133436400312475ustar00rootroot00000000000000refcount_os.h000066400000000000000000000056361362133436400337010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/linux// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file gets included into refcount.h as a means of extending the behavior of // atomic increment, decrement, and test. #ifndef REFCOUNT_OS_H__LINUX #define REFCOUNT_OS_H__LINUX // This Linux-specific header offers 3 strategies: // REFCOUNT_ATOMIC_DONTCARE -- no atomicity guarantee // REFCOUNT_USE_STD_ATOMIC -- C11 atomicity // REFCOUNT_USE_GNU_C_ATOMIC -- GNU-specific atomicity #if defined(__GNUC__) #define REFCOUNT_USE_GNU_C_ATOMIC 1 #endif #if defined(__STDC_VERSION__) && (__STDC_VERSION__ == 201112) #define REFCOUNT_USE_STD_ATOMIC 1 #undef REFCOUNT_USE_GNU_C_ATOMIC #endif // This FREERTOS_ARCH_ESP8266 behavior is deprecated. Microcontrollers // using the Azure IoT C SDK should include the c-utility file // pal/generic/refcount_os.h instead of this one. #if defined(FREERTOS_ARCH_ESP8266) #define REFCOUNT_ATOMIC_DONTCARE 1 #undef REFCOUNT_USE_STD_ATOMIC #undef REFCOUNT_USE_GNU_C_ATOMIC #endif #if defined(REFCOUNT_ATOMIC_DONTCARE) #define COUNT_TYPE uint32_t #elif defined(REFCOUNT_USE_STD_ATOMIC) #define COUNT_TYPE _Atomic uint32_t #else // REFCOUNT_USE_GNU_C_ATOMIC #define COUNT_TYPE uint32_t #endif // defined(REFCOUNT_ATOMIC_DONTCARE) /*the following macros increment/decrement a ref count in an atomic way, depending on the platform*/ /*The following mechanisms are considered in this order REFCOUNT_ATOMIC_DONTCARE does not use atomic operations - will result in ++/-- used for increment/decrement. C11 - will result in #include - will use atomic_fetch_add/sub; - about the return value: "Atomically, the value pointed to by object immediately before the effects" gcc - will result in no include (for gcc these are intrinsics build in) - will use __sync_fetch_and_add/sub - about the return value: "... returns the value that had previously been in memory." (https://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/Atomic-Builtins.html#Atomic-Builtins) */ /*if macro DEC_REF returns DEC_RETURN_ZERO that means the ref count has reached zero.*/ #if defined(REFCOUNT_ATOMIC_DONTCARE) #define DEC_RETURN_ZERO (0) #define INC_REF_VAR(count) ++(count) #define DEC_REF_VAR(count) --(count) #define INIT_REF_VAR(count) do { count = 1; } while((void)0,0) #elif defined(REFCOUNT_USE_STD_ATOMIC) #include #define DEC_RETURN_ZERO (1) #define INC_REF_VAR(count) atomic_fetch_add(&(count), 1) #define DEC_REF_VAR(count) atomic_fetch_sub(&(count), 1) #define INIT_REF_VAR(count) atomic_store(&(count), 1) #elif defined(REFCOUNT_USE_GNU_C_ATOMIC) #define DEC_RETURN_ZERO (0) #define INC_REF_VAR(count) __sync_add_and_fetch(&(count), 1) #define DEC_REF_VAR(count) __sync_sub_and_fetch(&(count), 1) #define INIT_REF_VAR(count) do { count = 1; __sync_synchronize(); } while((void)0,0) #endif /*defined(REFCOUNT_USE_GNU_C_ATOMIC)*/ #endif // REFCOUNT_OS_H__LINUX socket_async_os.h000066400000000000000000000007641362133436400345360ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/linux// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. //This file pulls in OS-specific header files to allow compilation of socket_async.c under // most OS's except for Windows. // For Linux systems #include #include #include #include #include #include #include #include #include azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/lwip/000077500000000000000000000000001362133436400310635ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/lwip/sntp_lwip.c000066400000000000000000000041141362133436400332460ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/xlogging.h" /*Codes_SRS_SNTP_LWIP_30_001: [ The ntp_lwip shall implement the methods defined in sntp.h. ]*/ #include "sntp.h" #include "azure_c_shared_utility/threadapi.h" #include "azure_c_shared_utility/agenttime.h" #include "sntp_os.h" /*Codes_SRS_SNTP_LWIP_30_002: [ The serverName parameter shall be an NTP server URL which shall not be validated. ]*/ /*Codes_SRS_SNTP_LWIP_30_003: [ The SNTP_SetServerName shall set the NTP server to be used by ntp_lwip and return 0 to indicate success.]*/ // // SNTP_SetServerName must be called before `SNTP_Init`. // The character array pointed to by `serverName` parameter must persist // between calls to `SNTP_SetServerName` and `SNTP_Deinit` because the // char* is stored and no copy of the string is made. // // SNTP_SetServerName is a wrapper for the lwIP call `sntp_setservername` // and defers parameter validation to the lwIP library. // // Future implementations of this adapter may allow multiple calls to // SNTP_SetServerName in order to support multiple servers. // int SNTP_SetServerName(const char* serverName) { // Future implementations could easily allow multiple calls to SNTP_SetServerName // by incrementing the index supplied to sntp_setservername sntp_setservername(0, (char*)serverName); return 0; } /*Codes_SRS_SNTP_LWIP_30_004: [ SNTP_Init shall initialize the SNTP client, contact the NTP server to set system time, then return 0 to indicate success (lwIP has no failure path). ]*/ int SNTP_Init() { LogInfo("Initializing SNTP"); sntp_setoperatingmode(SNTP_OPMODE_POLL); sntp_init(); time_t ts = 0; // Before 1980 is uninitialized while (ts < 10 * 365 * 24 * 3600) { ThreadAPI_Sleep(1000); ts = get_time(NULL); } LogInfo("SNTP initialization complete"); return 0; } /*Codes_SRS_SNTP_LWIP_30_005: [ SNTP_Denit shall deinitialize the SNTP client. ]*/ void SNTP_Deinit() { sntp_stop(); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/lwip/sntp_os.h000066400000000000000000000007511362133436400327240ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. //This file pulls in OS-specific header files to allow compilation of socket_async.c under // most OS's except for Windows. // For ESP32 lwIP systems which use the ESP-IDF's non-standard lwIP include structure // Tested with: // ESP32 #ifndef LWIP_SNTP_OS_H #define LWIP_SNTP_OS_H #include "apps/sntp/sntp.h" #endif // LWIP_SNTP_OS_Hazure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/socket_async.c000066400000000000000000000361121362133436400327440ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include // This file is OS-specific, and is identified by setting include directories // in the project #include "socket_async_os.h" #include "socket_async.h" #include "azure_c_shared_utility/xlogging.h" static int get_socket_errno(int file_descriptor) { int sock_errno = 0; socklen_t optlen = sizeof(sock_errno); getsockopt(file_descriptor, SOL_SOCKET, SO_ERROR, &sock_errno, &optlen); return sock_errno; } SOCKET_ASYNC_HANDLE socket_async_create(uint32_t serverIPv4, uint16_t port, bool is_UDP, SOCKET_ASYNC_OPTIONS_HANDLE options) { SOCKET_ASYNC_HANDLE result; struct sockaddr_in sock_addr; /* Codes_SRS_SOCKET_ASYNC_30_013: [ The is_UDP parameter shall be true for a UDP connection, and false for TCP. ]*/ int sock = socket(AF_INET, is_UDP ? SOCK_DGRAM : SOCK_STREAM, 0); if (sock < 0) { /* Codes_SRS_SOCKET_ASYNC_30_010: [ If socket option creation fails, socket_async_create shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. ]*/ // An essentially impossible failure, not worth logging errno() LogError("create socket failed"); result = SOCKET_ASYNC_INVALID_SOCKET; } else { bool setopt_ok; int setopt_return; // None of the currently defined options apply to UDP /* Codes_SRS_SOCKET_ASYNC_30_015: [ If is_UDP is true, the optional options parameter shall be ignored. ]*/ if (!is_UDP) { if (options != NULL) { /* Codes_SRS_SOCKET_ASYNC_30_014: [ If the optional options parameter is non-NULL and is_UDP is false, and options->keep_alive is non-negative, socket_async_create shall set the socket options to the provided options values. ]*/ if (options->keep_alive >= 0) { int keepAlive = 1; //enable keepalive setopt_ok = 0 == (setopt_return = setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&keepAlive, sizeof(keepAlive))); setopt_ok = setopt_ok && 0 == (setopt_return = setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&(options->keep_idle), sizeof((options->keep_idle)))); setopt_ok = setopt_ok && 0 == (setopt_return = setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&(options->keep_interval), sizeof((options->keep_interval)))); setopt_ok = setopt_ok && 0 == (setopt_return = setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, (void *)&(options->keep_count), sizeof((options->keep_count)))); } else { /* Codes_SRS_SOCKET_ASYNC_30_015: [ If the optional options parameter is non-NULL and is_UDP is false, and options->keep_alive is negative, socket_async_create not set the socket keep-alive options. ]*/ // < 0 means use system defaults, so do nothing setopt_ok = true; setopt_return = 0; } } else { /* Codes_SRS_SOCKET_ASYNC_30_017: [ If the optional options parameter is NULL and is_UDP is false, socket_async_create shall disable TCP keep-alive. ]*/ int keepAlive = 0; //disable keepalive setopt_ok = 0 == setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&keepAlive, sizeof(keepAlive)); setopt_return = 0; } } else { setopt_ok = true; setopt_return = 0; } // NB: On full-sized (multi-process) systems it would be necessary to use the SO_REUSEADDR option to // grab the socket from any earlier (dying) invocations of the process and then deal with any // residual junk in the connection stream. This doesn't happen with embedded, so it doesn't need // to be defended against. if (!setopt_ok) { /* Codes_SRS_SOCKET_ASYNC_30_020: [ If socket option setting fails, socket_async_create shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. ]*/ // setsockopt has no real possibility of failing due to the way it's being used here, so there's no need // to spend memory trying to log the not-really-possible errno. LogError("setsockopt failed: %d", setopt_return); result = SOCKET_ASYNC_INVALID_SOCKET; } else { /* Codes_SRS_SOCKET_ASYNC_30_019: [ The socket returned shall be non-blocking. ]*/ // When supplied with either F_GETFL and F_SETFL parameters, the fcntl function // does simple bit flips which have no error path, so it is not necessary to // check for errors. (Source checked for linux and lwIP). int originalFlags = fcntl(sock, F_GETFL, 0); int bind_ret; (void)fcntl(sock, F_SETFL, originalFlags | O_NONBLOCK); memset(&sock_addr, 0, sizeof(sock_addr)); sock_addr.sin_family = AF_INET; sock_addr.sin_addr.s_addr = 0; sock_addr.sin_port = 0; // random local port bind_ret = bind(sock, (const struct sockaddr*)&sock_addr, sizeof(sock_addr)); if (bind_ret != 0) { /* Codes_SRS_SOCKET_ASYNC_30_021: [ If socket binding fails, socket_async_create shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. ]*/ LogError("bind socket failed: %d", get_socket_errno(sock)); result = SOCKET_ASYNC_INVALID_SOCKET; } else { int connect_ret; memset(&sock_addr, 0, sizeof(sock_addr)); sock_addr.sin_family = AF_INET; /* Codes_SRS_SOCKET_ASYNC_30_011: [ The host_ipv4 parameter shall be the 32-bit IP V4 of the target server. ]*/ sock_addr.sin_addr.s_addr = serverIPv4; /* Codes_SRS_SOCKET_ASYNC_30_012: [ The port parameter shall be the port number for the target server. ]*/ sock_addr.sin_port = htons(port); connect_ret = connect(sock, (const struct sockaddr*)&sock_addr, sizeof(sock_addr)); if (connect_ret == -1) { int sockErr = get_socket_errno(sock); if (sockErr != EINPROGRESS) { /* Codes_SRS_SOCKET_ASYNC_30_022: [ If socket connection fails, socket_async_create shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. ]*/ LogError("Socket connect failed, not EINPROGRESS: %d", sockErr); result = SOCKET_ASYNC_INVALID_SOCKET; } else { // This is the normally expected code path for our non-blocking socket /* Codes_SRS_SOCKET_ASYNC_30_018: [ On success, socket_async_create shall return the created and configured SOCKET_ASYNC_HANDLE. ]*/ result = sock; } } else { /* Codes_SRS_SOCKET_ASYNC_30_018: [ On success, socket_async_create shall return the created and configured SOCKET_ASYNC_HANDLE. ]*/ // This result would be a surprise because a non-blocking socket // returns EINPROGRESS. But it could happen if this thread got // blocked for a while by the system while the handshake proceeded, // or for a UDP socket. result = sock; } } } } return result; } int socket_async_is_create_complete(SOCKET_ASYNC_HANDLE sock, bool* is_complete) { int result; if (is_complete == NULL) { /* Codes_SRS_SOCKET_ASYNC_30_026: [ If the is_complete parameter is NULL, socket_async_is_create_complete shall log an error and return FAILURE. ]*/ LogError("is_complete is NULL"); result = __FAILURE__; } else { struct timeval tv; int select_ret; // Check if the socket is ready to perform a write. fd_set writeset; fd_set errset; FD_ZERO(&writeset); FD_ZERO(&errset); FD_SET(sock, &writeset); FD_SET(sock, &errset); tv.tv_sec = 0; tv.tv_sec = 0; select_ret = select(sock + 1, NULL, &writeset, &errset, &tv); if (select_ret < 0) { /* Codes_SRS_SOCKET_ASYNC_30_028: [ On failure, the is_complete value shall be set to false and socket_async_create shall return FAILURE. ]*/ LogError("Socket select failed: %d", get_socket_errno(sock)); result = __FAILURE__; } else { if (FD_ISSET(sock, &errset)) { /* Codes_SRS_SOCKET_ASYNC_30_028: [ On failure, the is_complete value shall be set to false and socket_async_create shall return FAILURE. ]*/ LogError("Socket select errset non-empty: %d", get_socket_errno(sock)); result = __FAILURE__; } else if (FD_ISSET(sock, &writeset)) { /* Codes_SRS_SOCKET_ASYNC_30_027: [ On success, the is_complete value shall be set to the completion state and socket_async_create shall return 0. ]*/ // Ready to read result = 0; *is_complete = true; } else { /* Codes_SRS_SOCKET_ASYNC_30_027: [ On success, the is_complete value shall be set to the completion state and socket_async_create shall return 0. ]*/ // Not ready yet result = 0; *is_complete = false; } } } return result; } int socket_async_send(SOCKET_ASYNC_HANDLE sock, const void* buffer, size_t size, size_t* sent_count) { int result; if (buffer == NULL) { /* Codes_SRS_SOCKET_ASYNC_30_033: [ If the buffer parameter is NULL, socket_async_send shall log the error return FAILURE. ]*/ LogError("buffer is NULL"); result = __FAILURE__; } else { if (sent_count == NULL) { /* Codes_SRS_SOCKET_ASYNC_30_034: [ If the sent_count parameter is NULL, socket_async_send shall log the error return FAILURE. ]*/ LogError("sent_count is NULL"); result = __FAILURE__; } else if (size == 0) { /* Codes_SRS_SOCKET_ASYNC_30_073: [ If the size parameter is 0, socket_async_send shall set sent_count to 0 and return 0. ]*/ // This behavior is not always defined by the underlying API, so we make it predictable here *sent_count = 0; result = 0; } else { ssize_t send_result = send(sock, buffer, size, 0); if (send_result < 0) { int sock_err = get_socket_errno(sock); if (sock_err == EAGAIN || sock_err == EWOULDBLOCK) { /* Codes_SRS_SOCKET_ASYNC_30_036: [ If the underlying socket is unable to accept any bytes for transmission because its buffer is full, socket_async_send shall return 0 and the sent_count parameter shall receive the value 0. ]*/ // Nothing sent, try again later *sent_count = 0; result = 0; } else { /* Codes_SRS_SOCKET_ASYNC_30_037: [ If socket_async_send fails unexpectedly, socket_async_send shall log the error return FAILURE. ]*/ // Something bad happened LogError("Unexpected send error: %d", sock_err); result = __FAILURE__; } } else { /* Codes_SRS_SOCKET_ASYNC_30_035: [ If the underlying socket accepts one or more bytes for transmission, socket_async_send shall return 0 and the sent_count parameter shall receive the number of bytes accepted for transmission. ]*/ // Sent at least part of the message result = 0; *sent_count = (size_t)send_result; } } } return result; } int socket_async_receive(SOCKET_ASYNC_HANDLE sock, void* buffer, size_t size, size_t* received_count) { int result; if (buffer == NULL) { /* Codes_SRS_SOCKET_ASYNC_30_052: [ If the buffer parameter is NULL, socket_async_receive shall log the error and return FAILURE. ]*/ LogError("buffer is NULL"); result = __FAILURE__; } else { if (received_count == NULL) { /* Codes_SRS_SOCKET_ASYNC_30_053: [ If the received_count parameter is NULL, socket_async_receive shall log the error and return FAILURE. ]*/ LogError("received_count is NULL"); result = __FAILURE__; } else if (size == 0) { /* Codes_SRS_SOCKET_ASYNC_30_072: [ If the size parameter is 0, socket_async_receive shall log an error and return FAILURE. ]*/ LogError("size is 0"); result = __FAILURE__; } else { ssize_t recv_result = recv(sock, buffer, size, 0); if (recv_result < 0) { int sock_err = get_socket_errno(sock); if (sock_err == EAGAIN || sock_err == EWOULDBLOCK) { /* Codes_SRS_SOCKET_ASYNC_30_055: [ If the underlying socket has no received bytes available, socket_async_receive shall return 0 and the received_count parameter shall receive the value 0. ]*/ // Nothing received, try again later *received_count = 0; result = 0; } else { /* Codes_SRS_SOCKET_ASYNC_30_056: [ If the underlying socket fails unexpectedly, socket_async_receive shall log the error and return FAILURE. ]*/ // Something bad happened LogError("Unexpected recv error: %d", sock_err); result = __FAILURE__; } } else { /* Codes_SRS_SOCKET_ASYNC_30_054: [ On success, the underlying socket shall set one or more received bytes into buffer, socket_async_receive shall return 0, and the received_count parameter shall receive the number of bytes received into buffer. ]*/ // Received some stuff *received_count = (size_t)recv_result; result = 0; } } } return result; } void socket_async_destroy(SOCKET_ASYNC_HANDLE sock) { /* Codes_SRS_SOCKET_ASYNC_30_071: [ socket_async_destroy shall call the underlying close method on the supplied socket. ]*/ close(sock); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/tickcounter.c000066400000000000000000000037621362133436400326160ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include #include #include "azure_c_shared_utility/tickcounter.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #define INVALID_TIME_VALUE (time_t)(-1) typedef struct TICK_COUNTER_INSTANCE_TAG { time_t init_time_value; tickcounter_ms_t current_ms; } TICK_COUNTER_INSTANCE; TICK_COUNTER_HANDLE tickcounter_create(void) { TICK_COUNTER_INSTANCE* result = (TICK_COUNTER_INSTANCE*)malloc(sizeof(TICK_COUNTER_INSTANCE)); if (result != NULL) { result->init_time_value = time(NULL); if (result->init_time_value == INVALID_TIME_VALUE) { LogError("tickcounter failed: time return INVALID_TIME."); free(result); result = NULL; } else { result->current_ms = 0; } } return result; } void tickcounter_destroy(TICK_COUNTER_HANDLE tick_counter) { if (tick_counter != NULL) { free(tick_counter); } } int tickcounter_get_current_ms(TICK_COUNTER_HANDLE tick_counter, tickcounter_ms_t * current_ms) { int result; if (tick_counter == NULL || current_ms == NULL) { LogError("tickcounter failed: Invalid Arguments."); result = __FAILURE__; } else { time_t time_value = time(NULL); if (time_value == INVALID_TIME_VALUE) { result = __FAILURE__; } else { TICK_COUNTER_INSTANCE* tick_counter_instance = (TICK_COUNTER_INSTANCE*)tick_counter; tick_counter_instance->current_ms = (tickcounter_ms_t)(difftime(time_value, tick_counter_instance->init_time_value) * 1000); *current_ms = tick_counter_instance->current_ms; result = 0; } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/tlsio_options.c000066400000000000000000000236761362133436400331770ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/tlsio_options.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" // Initialize the TLSIO_OPTIONS struct void tlsio_options_initialize(TLSIO_OPTIONS* options, int supported_options) { // Using static function rules, so 'options' is not checked for NULL // // The supported_options value does not need validation because undefined bits are // ignored, while any valid missing bits result in an "option not supported" error // that will show up in unit testing. options->supported_options = supported_options; options->trusted_certs = NULL; options->x509_type = TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED; options->x509_cert = NULL; options->x509_key = NULL; } static int set_and_validate_x509_type(TLSIO_OPTIONS* options, TLSIO_OPTIONS_x509_TYPE x509_type) { int result; if ((options->supported_options & x509_type) == 0) { // This case also rejects the nonsensical TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED LogError("Unsupported x509 type: %d", x509_type); result = __FAILURE__; } else if (options->x509_type == TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED) { // Initial type setting options->x509_type = x509_type; result = 0; } else if (options->x509_type != x509_type) { LogError("Supplied x509 type conflicts with previously set x509"); result = __FAILURE__; } else { // The types match okay result = 0; } return result; } void tlsio_options_release_resources(TLSIO_OPTIONS* options) { if (options != NULL) { free((void*)options->trusted_certs); free((void*)options->x509_cert); free((void*)options->x509_key); } else { LogError("NULL options"); } } static bool is_supported_string_option(const char* name) { return (strcmp(name, OPTION_TRUSTED_CERT) == 0) || (strcmp(name, OPTION_OPENSSL_CIPHER_SUITE) == 0) || (strcmp(name, SU_OPTION_X509_CERT) == 0) || (strcmp(name, SU_OPTION_X509_PRIVATE_KEY) == 0) || (strcmp(name, OPTION_X509_ECC_CERT) == 0) || (strcmp(name, OPTION_X509_ECC_KEY) == 0); } TLSIO_OPTIONS_RESULT tlsio_options_destroy_option(const char* name, const void* value) { TLSIO_OPTIONS_RESULT result; if (name == NULL || value == NULL) { LogError("NULL parameter: name: %p, value: %p", name, value); result = TLSIO_OPTIONS_RESULT_ERROR; } else if (is_supported_string_option(name)) { free((void*)value); result = TLSIO_OPTIONS_RESULT_SUCCESS; } else { result = TLSIO_OPTIONS_RESULT_NOT_HANDLED; } return result; } TLSIO_OPTIONS_RESULT tlsio_options_clone_option(const char* name, const void* value, void** out_value) { TLSIO_OPTIONS_RESULT result; if (name == NULL || value == NULL || out_value == NULL) { LogError("NULL parameter: name: %p, value: %p, out_value: %p", name, value, out_value); result = TLSIO_OPTIONS_RESULT_ERROR; } else if (is_supported_string_option(name)) { *out_value = NULL; if (mallocAndStrcpy_s((char**)out_value, value) != 0) { LogError("unable to mallocAndStrcpy_s option value"); result = TLSIO_OPTIONS_RESULT_ERROR; } else { result = TLSIO_OPTIONS_RESULT_SUCCESS; } } else { result = TLSIO_OPTIONS_RESULT_NOT_HANDLED; } return result; } TLSIO_OPTIONS_RESULT tlsio_options_set(TLSIO_OPTIONS* options, const char* optionName, const void* value) { TLSIO_OPTIONS_RESULT result; char* copied_value = NULL; if (options == NULL || optionName == NULL || value == NULL) { LogError("NULL parameter: options: %p, optionName: %p, value: %p", options, optionName, value); result = TLSIO_OPTIONS_RESULT_ERROR; } else if (!is_supported_string_option(optionName)) { result = TLSIO_OPTIONS_RESULT_NOT_HANDLED; } else if(mallocAndStrcpy_s(&copied_value, value) != 0) { LogError("unable to mallocAndStrcpy_s option value"); result = TLSIO_OPTIONS_RESULT_ERROR; } else if (strcmp(OPTION_TRUSTED_CERT, optionName) == 0) { if ((options->supported_options & TLSIO_OPTION_BIT_TRUSTED_CERTS) == 0) { LogError("Trusted certs option not supported"); result = TLSIO_OPTIONS_RESULT_ERROR; } else if (options->trusted_certs != NULL) { LogError("unable to set trusted cert option more than once"); result = TLSIO_OPTIONS_RESULT_ERROR; } else { options->trusted_certs = copied_value; result = TLSIO_OPTIONS_RESULT_SUCCESS; } } else if (strcmp(SU_OPTION_X509_CERT, optionName) == 0 || strcmp(OPTION_X509_ECC_CERT, optionName) == 0) { TLSIO_OPTIONS_x509_TYPE this_type = (strcmp(SU_OPTION_X509_CERT, optionName) == 0) ? TLSIO_OPTIONS_x509_TYPE_RSA : TLSIO_OPTIONS_x509_TYPE_ECC; if (options->x509_cert != NULL) { LogError("unable to set x509 cert more than once"); result = TLSIO_OPTIONS_RESULT_ERROR; } else if (set_and_validate_x509_type(options, this_type) != 0) { // Error logged by helper result = TLSIO_OPTIONS_RESULT_ERROR; } else { options->x509_cert = copied_value; result = TLSIO_OPTIONS_RESULT_SUCCESS; } } else if (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0 || strcmp(OPTION_X509_ECC_KEY, optionName) == 0) { TLSIO_OPTIONS_x509_TYPE this_type = (strcmp(SU_OPTION_X509_PRIVATE_KEY, optionName) == 0) ? TLSIO_OPTIONS_x509_TYPE_RSA : TLSIO_OPTIONS_x509_TYPE_ECC; if (options->x509_key != NULL) { LogError("unable to set x509 key more than once"); result = TLSIO_OPTIONS_RESULT_ERROR; } else if (set_and_validate_x509_type(options, this_type) != 0) { // Error logged by helper result = TLSIO_OPTIONS_RESULT_ERROR; } else { options->x509_key = copied_value; result = TLSIO_OPTIONS_RESULT_SUCCESS; } } else { // This is logically impossible due to earlier tests, so just quiet the compiler result = TLSIO_OPTIONS_RESULT_ERROR; } if (result != TLSIO_OPTIONS_RESULT_SUCCESS) { free(copied_value); } return result; } // A helper that works if the tlsio does not use any extra options static void* local_clone_option(const char* name, const void* value) { void* result = NULL; if (tlsio_options_clone_option(name, value, &result) != TLSIO_OPTIONS_RESULT_SUCCESS) { LogError("Unexpected local_clone_option failure"); } return result; } // A helper that works if the tlsio does not use any extra options void local_destroy_option(const char* name, const void* value) { if (tlsio_options_destroy_option(name, value) != TLSIO_OPTIONS_RESULT_SUCCESS) { LogError("Unexpected local_destroy_option failure"); } } OPTIONHANDLER_HANDLE tlsio_options_retrieve_options(TLSIO_OPTIONS* options, pfSetOption setOption) { return tlsio_options_retrieve_options_ex(options, local_clone_option, local_destroy_option, setOption); } OPTIONHANDLER_HANDLE tlsio_options_retrieve_options_ex(TLSIO_OPTIONS* options, pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { OPTIONHANDLER_HANDLE result; if (options == NULL || cloneOption == NULL || destroyOption == NULL || setOption == NULL) { LogError("Null parameter in options: %p, cloneOption: %p, destroyOption: %p, setOption: %p", options, cloneOption, destroyOption, setOption); result = NULL; } else { result = OptionHandler_Create(cloneOption, destroyOption, setOption); if (result == NULL) { LogError("OptionHandler_Create failed"); /*return as is*/ } else if ( (options->trusted_certs != NULL) && (OptionHandler_AddOption(result, OPTION_TRUSTED_CERT, options->trusted_certs) != OPTIONHANDLER_OK) ) { LogError("unable to save TrustedCerts option"); OptionHandler_Destroy(result); result = NULL; } else if (options->x509_type != TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED) { const char* x509_cert_option; const char* x509_key_option; if (options->x509_type == TLSIO_OPTIONS_x509_TYPE_ECC) { x509_cert_option = OPTION_X509_ECC_CERT; x509_key_option = OPTION_X509_ECC_KEY; } else { x509_cert_option = SU_OPTION_X509_CERT; x509_key_option = SU_OPTION_X509_PRIVATE_KEY; } if ( (options->x509_cert != NULL) && (OptionHandler_AddOption(result, x509_cert_option, options->x509_cert) != OPTIONHANDLER_OK) ) { LogError("unable to save x509 cert option"); OptionHandler_Destroy(result); result = NULL; } else if ( (options->x509_key != NULL) && (OptionHandler_AddOption(result, x509_key_option, options->x509_key) != OPTIONHANDLER_OK) ) { LogError("unable to save x509 key option"); OptionHandler_Destroy(result); result = NULL; } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/windows/000077500000000000000000000000001362133436400316025ustar00rootroot00000000000000refcount_os.h000066400000000000000000000014361362133436400342260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/windows// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file gets included into refcount.h as a means of extending the behavior of // atomic increment, decrement, and test. // The first phase defines COUNT_TYPE #ifndef REFCOUNT_OS_H__WINDOWS #define REFCOUNT_OS_H__WINDOWS #include "windows.h" // The Windows atomic operations work on LONG #define COUNT_TYPE LONG /*if macro DEC_REF returns DEC_RETURN_ZERO that means the ref count has reached zero.*/ #define DEC_RETURN_ZERO (0) #define INC_REF_VAR(count) InterlockedIncrement(&(count)) #define DEC_REF_VAR(count) InterlockedDecrement(&(count)) #define INIT_REF_VAR(count) InterlockedExchange(&(count), 1) #endif // REFCOUNT_OS_H__WINDOWS azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/000077500000000000000000000000001362133436400310005ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/CMakeLists.txt000066400000000000000000000010761362133436400335440ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) function(add_sample_directory whatIsBuilding) add_subdirectory(${whatIsBuilding}) set_target_properties(${whatIsBuilding} PROPERTIES FOLDER "C-Utility_Samples") endfunction() add_sample_directory(iot_c_utility) if (NOT ("${ARCHITECTURE}" STREQUAL "ARM")) add_sample_directory(socketio_connect) add_sample_directory(tlsio_connect) endif()azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/iot_c_utility/000077500000000000000000000000001362133436400336605ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000010761362133436400363450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/iot_c_utility#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(iot_c_utility_c_files iot_c_utility.c ) if (WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) ENDIF(WIN32) if (${use_http}) add_definitions(-DUSE_HTTP) endif() add_executable(iot_c_utility ${iot_c_utility_c_files}) target_link_libraries(iot_c_utility aziotsharedutil ) compileTargetAsC99(iot_c_utility) iot_c_utility.c000066400000000000000000000040041362133436400366230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/iot_c_utility// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdio.h" #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/http_proxy_io.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/sastoken.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/urlencode.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/httpapiex.h" #ifdef USE_HTTP static void test_http_proxy_io() { const IO_INTERFACE_DESCRIPTION* interface_desc = http_proxy_io_get_interface_description(); if (interface_desc == NULL) { LogError("Failed to create interface_desc.\n"); } } static void http_examples() { HTTPAPIEX_HANDLE handle = HTTPAPIEX_Create("www.bing.com"); if (handle == NULL) { LogError("Failed creating httpApiEx handle"); } else { HTTPAPIEX_Destroy(handle); } } #endif static void show_sastoken_example() { STRING_HANDLE sas_token = SASToken_CreateString("key", "scope", "name", 987654321); if (sas_token == NULL) { LogError("Failed to create SAS Token.\n"); } else { STRING_delete(sas_token); } } static void show_platform_info() { STRING_HANDLE platform_info = platform_get_platform_info(); if (platform_info != NULL) { (void)printf("%s\r\n", STRING_c_str(platform_info)); STRING_delete(platform_info); } } int main(int argc, char** argv) { (void)argc, (void)argv; if (platform_init() != 0) { LogError("Cannot initialize platform.\n"); } else { show_platform_info(); show_sastoken_example(); #ifdef USE_HTTP http_examples(); test_http_proxy_io(); #endif platform_deinit(); } return 0; } socketio_connect/000077500000000000000000000000001362133436400342525ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samplesCMakeLists.txt000066400000000000000000000014271362133436400370160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/socketio_connect#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(socketio_connect_c_files main.c ) IF(WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) ENDIF(WIN32) add_executable(socketio_connect ${socketio_connect_c_files}) target_link_libraries(socketio_connect aziotsharedutil ) if(${use_openssl} AND WIN32) file(COPY ${SSL_DLL} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CRYPTO_DLL} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) endif() set_target_properties(socketio_connect PROPERTIES FOLDER "azure_c_shared_utility_samples") compileTargetAsC99(socketio_connect)main.c000066400000000000000000000057131362133436400353500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/socketio_connect// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdio.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/platform.h" // A simple sample callback. static void on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } static void on_io_open_complete(void* context, IO_OPEN_RESULT open_result) { (void)context, (void)open_result; (void)printf("Open complete called\r\n"); if (open_result == IO_OPEN_OK) { XIO_HANDLE socketio = (XIO_HANDLE)context; const char to_send[] = "GET / HTTP/1.1\r\n" "Host: www.google.com\r\n" "\r\n"; (void)printf("Sending bytes ...\r\n"); if (xio_send(socketio, to_send, sizeof(to_send), on_send_complete, NULL) != 0) { (void)printf("Send failed\r\n"); } } else { (void)printf("Open error\r\n"); } } static void on_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { (void)context, (void)buffer; (void)printf("Received %zu bytes\r\n", size); } static void on_io_error(void* context) { (void)context; (void)printf("IO reported an error\r\n"); } int main(int argc, char** argv) { int result; (void)argc, (void)argv; if (platform_init() != 0) { (void)printf("Cannot initialize platform."); result = __FAILURE__; } else { const IO_INTERFACE_DESCRIPTION* socketio_interface = socketio_get_interface_description(); if (socketio_interface == NULL) { (void)printf("Error getting socketio interface description."); result = __FAILURE__; } else { SOCKETIO_CONFIG socketio_config; XIO_HANDLE socketio; socketio_config.hostname = "www.google.com"; socketio_config.port = 80; socketio = xio_create(socketio_interface, &socketio_config); if (socketio == NULL) { (void)printf("Error creating socket IO."); result = __FAILURE__; } else { if (xio_open(socketio, on_io_open_complete, socketio, on_io_bytes_received, socketio, on_io_error, socketio) != 0) { (void)printf("Error opening socket IO."); result = __FAILURE__; } else { unsigned char done = 0; while (!done) { xio_dowork(socketio); } result = 0; } xio_destroy(socketio); } } platform_deinit(); } return result; } mbed/000077500000000000000000000000001362133436400351615ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/socketio_connectCMakeLists.txt000066400000000000000000000005761362133436400377310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/socketio_connect/mbed#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(shared_util_base_path ../../..) set(mbed_project_base "socketio_connect" CACHE STRING "The item being built") include (${shared_util_base_path}/tools/mbed_build_scripts/mbedbldtemplate.txt) socketio_connect_filelist.txt000066400000000000000000000001111362133436400431370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/socketio_connect/mbedset(mbed_project_files ${CMAKE_CURRENT_SOURCE_DIR}/../main.c ) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/tlsio_connect/000077500000000000000000000000001362133436400336435ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000014021362133436400363210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/tlsio_connect#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. set(tlsio_connect_c_files main.c ) IF(WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) ENDIF(WIN32) add_executable(tlsio_connect ${tlsio_connect_c_files}) target_link_libraries(tlsio_connect aziotsharedutil ) if(${use_openssl} AND WIN32) file(COPY ${SSL_DLL} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${CRYPTO_DLL} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) endif() set_target_properties(tlsio_connect PROPERTIES FOLDER "azure_c_shared_utility_samples") compileTargetAsC99(tlsio_connect) main.c000066400000000000000000000055131362133436400346600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/tlsio_connect// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdio.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/platform.h" // A simple sample callback. static void on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } static void on_io_open_complete(void* context, IO_OPEN_RESULT open_result) { (void)context, (void)open_result; (void)printf("Open complete called\r\n"); if (open_result == IO_OPEN_OK) { XIO_HANDLE tlsio = (XIO_HANDLE)context; const char to_send[] = "GET / HTTP/1.1\r\n" "Host: www.google.com\r\n" "\r\n"; (void)printf("Sending bytes ...\r\n"); if (xio_send(tlsio, to_send, sizeof(to_send), on_send_complete, NULL) != 0) { (void)printf("Send failed\r\n"); } } else { (void)printf("Open error\r\n"); } } static void on_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { (void)context, (void)buffer; (void)printf("Received %zu bytes\r\n", size); } static void on_io_error(void* context) { (void)context; (void)printf("IO reported an error\r\n"); } int main(int argc, char** argv) { int result; (void)argc, (void)argv; if (platform_init() != 0) { (void)printf("Cannot initialize platform."); result = __FAILURE__; } else { const IO_INTERFACE_DESCRIPTION* tlsio_interface = platform_get_default_tlsio(); if (tlsio_interface == NULL) { (void)printf("Error getting tlsio interface description."); result = __FAILURE__; } else { TLSIO_CONFIG tlsio_config = { "www.google.com", 443, NULL, NULL}; XIO_HANDLE tlsio; tlsio = xio_create(tlsio_interface, &tlsio_config); if (tlsio == NULL) { (void)printf("Error creating TLS IO."); result = __FAILURE__; } else { if (xio_open(tlsio, on_io_open_complete, tlsio, on_io_bytes_received, tlsio, on_io_error, tlsio) != 0) { (void)printf("Error opening TLS IO."); result = __FAILURE__; } else { unsigned char done = 0; while (!done) { xio_dowork(tlsio); } result = 0; } xio_destroy(tlsio); } } platform_deinit(); } return result; } mbed/000077500000000000000000000000001362133436400344735ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/tlsio_connectCMakeLists.txt000066400000000000000000000005731362133436400372400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/tlsio_connect/mbed#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(shared_util_base_path ../../..) set(mbed_project_base "tlsio_connect" CACHE STRING "The item being built") include (${shared_util_base_path}/tools/mbed_build_scripts/mbedbldtemplate.txt) tlsio_connect_filelist.txt000066400000000000000000000001111362133436400417630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/samples/tlsio_connect/mbedset(mbed_project_files ${CMAKE_CURRENT_SOURCE_DIR}/../main.c ) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/000077500000000000000000000000001362133436400301235ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/README.md000066400000000000000000000022001362133436400313740ustar00rootroot00000000000000This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # azure-c-shared-utility/adapters This directory contains files for adapting specific devices to work with the Azure C Shared Utility. ### This location is deprecated The files in this directory will eventually be moved to new locations in the [azure-c-shared-utility/pal](https://github.com/Azure/azure-c-shared-utility/tree/master/pal) directory. ### Where did that file go? Files related to adapting the Azure IoT C SDK to specific devices are being moved to new locations within the [azure-c-shared-utility/pal](https://github.com/Azure/azure-c-shared-utility/tree/master/pal) directory and its subfolders. ### Porting to new devices Instructions for porting the Azure IoT C SDK to new devices are located [here](https://github.com/Azure/azure-c-shared-utility/blob/pal-porting/devdoc/porting_guide.md). aziotsharedutil.def000066400000000000000000000126651362133436400337510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/srcLIBRARY aziotsharedutil_dll EXPORTS BUFFER_append BUFFER_append_build BUFFER_build BUFFER_clone BUFFER_content BUFFER_create BUFFER_delete BUFFER_enlarge BUFFER_length BUFFER_new BUFFER_pre_build BUFFER_prepend BUFFER_shrink BUFFER_size BUFFER_u_char BUFFER_unbuild Base64_Decoder Base64_Encoder Base64_Encode_Bytes Base32_Decode Base32_Decode_String Base32_Encode Base32_Encode_Bytes COND_RESULTStringStorage COND_RESULTStrings COND_RESULT_FromString CONSTBUFFER_Clone CONSTBUFFER_Create CONSTBUFFER_CreateFromBuffer CONSTBUFFER_Destroy CONSTBUFFER_GetContent CONSTMAP_RESULTStringStorage CONSTMAP_RESULTStrings CONSTMAP_RESULT_FromString Condition_Deinit Condition_Init Condition_Post Condition_Wait ConstMap_Clone ConstMap_CloneWriteable ConstMap_ContainsKey ConstMap_ContainsValue ConstMap_Create ConstMap_Destroy ConstMap_GetInternals ConstMap_GetValue DList_AppendTailList DList_InitializeListHead DList_InsertHeadList DList_InsertTailList DList_IsListEmpty DList_RemoveEntryList DList_RemoveHeadList environment_get_variable HMACSHA256_ComputeHash Lock Lock_Deinit Lock_Init MAP_RESULTStringStorage MAP_RESULTStrings MAP_RESULT_FromString Map_Add Map_AddOrUpdate Map_Clone Map_ContainsKey Map_ContainsValue Map_Create Map_Delete Map_Destroy Map_GetInternals Map_GetValueFromKey Map_ToJSON OptionHandler_AddOption OptionHandler_Clone OptionHandler_Create OptionHandler_Destroy OptionHandler_FeedOptions SASToken_Create SASToken_CreateString SASToken_Validate SHA1FinalBits SHA1Input SHA1Reset SHA1Result SHA224FinalBits SHA224Input SHA224Reset SHA224Result SHA256FinalBits SHA256Input SHA256Reset SHA256Result SHA384FinalBits SHA384Input SHA384Reset SHA384Result SHA512FinalBits SHA512Input SHA512Reset SHA512Result STRING_TOKENIZER_create STRING_TOKENIZER_create_from_char STRING_TOKENIZER_destroy STRING_TOKENIZER_get_next_token STRING_c_str STRING_clone STRING_compare STRING_concat STRING_concat_with_STRING STRING_construct STRING_construct_n STRING_construct_sprintf STRING_copy STRING_copy_n STRING_delete STRING_empty STRING_from_byte_array STRING_length STRING_new STRING_new_JSON STRING_new_quoted STRING_new_with_memory STRING_quote STRING_sprintf STRING_replace THREADAPI_RESULTStringStorage THREADAPI_RESULTStrings THREADAPI_RESULT_FromString TLSIO_STATE_FromString TLSIO_STATEStrings ThreadAPI_Create ThreadAPI_Exit ThreadAPI_Join ThreadAPI_Sleep UNIQUEID_RESULTStringStorage UNIQUEID_RESULTStrings UNIQUEID_RESULT_FromString URL_Encode URL_EncodeString URL_Decode URL_DecodeString USHABlockSize USHAFinalBits USHAHashSize USHAHashSizeBits USHAInput USHAReset USHAResult UniqueId_Generate Unlock UUID_generate UUID_from_string UUID_to_string VECTOR_back VECTOR_clear VECTOR_create VECTOR_destroy VECTOR_element VECTOR_erase VECTOR_find_if VECTOR_front VECTOR_move VECTOR_push_back VECTOR_size connectionstringparser_parse connectionstringparser_parse_from_char connectionstringparser_splitHostName connectionstringparser_splitHostName_from_char consolelogger_log consolelogger_log_with_GetLastError gb_rand gballoc_calloc gballoc_deinit gballoc_free gballoc_getCurrentMemoryUsed gballoc_getMaximumMemoryUsed gballoc_init gballoc_malloc gballoc_realloc gbnetwork_init gbnetwork_deinit get_ctime get_difftime get_gmtime get_mktime get_time global_log_function hmac hmacFinalBits hmacInput hmacReset hmacResult http_proxy_io_get_interface_description mallocAndStrcpy_s platform_deinit platform_get_default_tlsio platform_get_platform_info platform_init singlylinkedlist_add singlylinkedlist_add_head singlylinkedlist_create singlylinkedlist_destroy singlylinkedlist_find singlylinkedlist_get_head_item singlylinkedlist_get_next_item singlylinkedlist_item_get_value singlylinkedlist_remove singlylinkedlist_remove_if singlylinkedlist_foreach size_tToString socketio_close socketio_create socketio_destroy socketio_dowork socketio_get_interface_description socketio_open socketio_send socketio_setoption tickcounter_create tickcounter_destroy tickcounter_get_current_ms tlsio_schannel_close tlsio_schannel_create tlsio_schannel_destroy tlsio_schannel_dowork tlsio_schannel_get_interface_description tlsio_schannel_open tlsio_schannel_send tlsio_schannel_setoption unsignedIntToString x509_schannel_create x509_schannel_destroy x509_schannel_get_certificate_context xio_close xio_create xio_destroy xio_dowork xio_open xio_retrieveoptions xio_send xio_setoption xlogging_get_log_function xlogging_get_log_function_GetLastError xlogging_set_log_function xlogging_set_log_function_GetLastError xlogging_LogErrorWinHTTPWithGetLastErrorAsStringFormatter aziotsharedutil_http.def000066400000000000000000000016121362133436400347760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src HTTPHeaders_AddHeaderNameValuePair HTTPHeaders_Alloc HTTPHeaders_Clone HTTPHeaders_FindHeaderValue HTTPHeaders_Free HTTPHeaders_GetHeader HTTPHeaders_GetHeaderCount HTTPHeaders_ReplaceHeaderNameValuePair HTTP_HEADERS_RESULTStringStorage HTTP_HEADERS_RESULTStrings HTTP_HEADERS_RESULT_FromString HTTPAPIEX_Create HTTPAPIEX_Destroy HTTPAPIEX_ExecuteRequest HTTPAPIEX_RESULTStringStorage HTTPAPIEX_RESULTStrings HTTPAPIEX_RESULT_FromString HTTPAPIEX_SAS_Create HTTPAPIEX_SAS_Create_From_String HTTPAPIEX_SAS_Destroy HTTPAPIEX_SAS_ExecuteRequest HTTPAPIEX_SetOption HTTPAPI_CloneOption HTTPAPI_CloseConnection HTTPAPI_CreateConnection HTTPAPI_Deinit HTTPAPI_ExecuteRequest HTTPAPI_Init HTTPAPI_RESULTStringStorage HTTPAPI_RESULTStrings HTTPAPI_RESULT_FromString HTTPAPI_SetOption aziotsharedutil_wsio.def000066400000000000000000000007741362133436400350100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src utf8_checker_is_valid_utf8 uws_client_close_async uws_client_close_handshake_async uws_client_create uws_client_create_with_io uws_client_destroy uws_client_dowork uws_client_open_async uws_client_retrieve_options uws_client_send_frame_async uws_client_set_option uws_frame_encoder_encode wsio_close wsio_create wsio_destroy wsio_dowork wsio_get_interface_description wsio_open wsio_retrieveoptions wsio_send wsio_setoption azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/base32.c000066400000000000000000000335351362133436400313570ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/base32.h" static const unsigned char BASE32_EQUAL_SIGN = 32; static const char BASE32_VALUES[] = "abcdefghijklmnopqrstuvwxyz234567="; #define TARGET_BLOCK_SIZE 5 #define INVALID_CHAR_POS 260 #define BASE32_INPUT_SIZE 8 #define ASCII_VALUE_MAX 0x80 static size_t base32_encoding_length(size_t src_len) { return (((src_len + TARGET_BLOCK_SIZE - 1) / TARGET_BLOCK_SIZE) * 8); } static size_t base32_decoding_length(size_t src_len) { return ((src_len*TARGET_BLOCK_SIZE) / 8); } static unsigned char convert_value_to_base32_char(unsigned char value) { unsigned char result; if (value >= 50 && value <= 55) { result = 0x1a+(value-50); } else if (value == 61) { result = 0x20; } else if ((value <= 49) || (value >= 56 && value <= 64)) { result = 0xFF; } else if (value >= 65 && value <= 90) { result = 0x00 + (value - 65); } else if (value >= 91 && value <= 96) { result = 0xFF; } else if (value >= 97 && value <= 123) { result = 0x00 + (value - 97); } else // value > 123 { result = 0xFF; } return result; } static char* base32_encode_impl(const unsigned char* source, size_t src_size) { char* result; // Allocate target buffer size_t output_len = base32_encoding_length(src_size); /* Codes_SRS_BASE32_07_009: [ base32_encode_impl shall allocate the buffer to the size of the encoding value. ] */ if ((result = (char*)malloc(output_len + 1)) == NULL) { LogError("Failure allocating output buffer"); } else { const unsigned char* iterator = source; size_t block_len = 0; size_t result_len = 0; unsigned char pos1 = 0; unsigned char pos2 = 0; unsigned char pos3 = 0; unsigned char pos4 = 0; unsigned char pos5 = 0; unsigned char pos6 = 0; unsigned char pos7 = 0; unsigned char pos8 = 0; memset(result, 0, output_len + 1); // Go through the source buffer sectioning off blocks of 5 /* Codes_SRS_BASE32_07_010: [ base32_encode_impl shall look through source and separate each block into 5 bit chunks ] */ while (src_size >= 1 && result != NULL) { pos1 = pos2 = pos3 = pos4 = pos5 = pos6 = pos7 = pos8 = 0; block_len = src_size > TARGET_BLOCK_SIZE ? TARGET_BLOCK_SIZE : src_size; // Fall through switch block to process the 5 (or smaller) block switch (block_len) { case 5: pos8 = (iterator[4] & 0x1f); pos7 = ((iterator[4] & 0xe0) >> 5); // fall through case 4: pos7 |= ((iterator[3] & 0x03) << 3); pos6 = ((iterator[3] & 0x7c) >> 2); pos5 = ((iterator[3] & 0x80) >> 7); // fall through case 3: pos5 |= ((iterator[2] & 0x0f) << 1); pos4 = ((iterator[2] & 0xf0) >> 4); // fall through case 2: pos4 |= ((iterator[1] & 0x01) << 4); pos3 = ((iterator[1] & 0x3e) >> 1); pos2 = ((iterator[1] & 0xc0) >> 6); // fall through case 1: pos2 |= ((iterator[0] & 0x07) << 2); pos1 = ((iterator[0] & 0xf8) >> 3); break; } // Move the iterator the block size iterator += block_len; // and decrement the src_size; src_size -= block_len; /* Codes_SRS_BASE32_07_012: [ If the src_size is not divisible by 8, base32_encode_impl shall pad the remaining places with =. ] */ switch (block_len) { case 1: pos3 = pos4 = 32; // fall through case 2: pos5 = 32; // fall through case 3: pos6 = pos7 = 32; // fall through case 4: pos8 = 32; // fall through case 5: break; } /* Codes_SRS_BASE32_07_011: [ base32_encode_impl shall then map the 5 bit chunks into one of the BASE32 values (a-z,2,3,4,5,6,7) values. ] */ result[result_len++] = BASE32_VALUES[pos1]; result[result_len++] = BASE32_VALUES[pos2]; result[result_len++] = BASE32_VALUES[pos3]; result[result_len++] = BASE32_VALUES[pos4]; result[result_len++] = BASE32_VALUES[pos5]; result[result_len++] = BASE32_VALUES[pos6]; result[result_len++] = BASE32_VALUES[pos7]; result[result_len++] = BASE32_VALUES[pos8]; } } return result; } static BUFFER_HANDLE base32_decode_impl(const char* source) { BUFFER_HANDLE result; size_t src_length = strlen(source); if (src_length % BASE32_INPUT_SIZE != 0) { /* Codes_SRS_BASE32_07_021: [ If the source length is not evenly divisible by 8, base32_decode_impl shall return NULL. ] */ LogError("Failure invalid input length %zu", src_length); result = NULL; } else { size_t dest_size = 0; unsigned char* temp_buffer; unsigned char* dest_buff; bool continue_processing = true; unsigned char input[8]; const char* iterator = source; /* Codes_SRS_BASE32_07_022: [ base32_decode_impl shall allocate a temp buffer to store the in process value. ] */ size_t allocation_len = base32_decoding_length(src_length); if ((temp_buffer = (unsigned char*)malloc(allocation_len)) == NULL) { /* Codes_SRS_BASE32_07_023: [ If an error is encountered, base32_decode_impl shall return NULL. ] */ LogError("Failure allocating buffer"); result = NULL; } else { dest_buff = temp_buffer; while (*iterator != '\0') { size_t index = 0; /* Codes_SRS_BASE32_07_024: [ base32_decode_impl shall loop through and collect 8 characters from the source variable. ] */ for (index = 0; index < BASE32_INPUT_SIZE; index++) { input[index] = *iterator; iterator++; if (input[index] >= ASCII_VALUE_MAX) { LogError("Failure source encoding"); continue_processing = false; break; } input[index] = convert_value_to_base32_char(input[index]); } if (!continue_processing) { result = NULL; break; } else if ((dest_size + TARGET_BLOCK_SIZE) > allocation_len) { LogError("Failure target length exceeded"); result = NULL; continue_processing = false; break; } else { // Codes_SRS_BASE32_07_025: [ base32_decode_impl shall group 5 bytes at a time into the temp buffer. ] *dest_buff++ = ((input[0] & 0x1f) << 3) | ((input[1] & 0x1c) >> 2); *dest_buff++ = ((input[1] & 0x03) << 6) | ((input[2] & 0x1f) << 1) | ((input[3] & 0x10) >> 4); *dest_buff++ = ((input[3] & 0x0f) << 4) | ((input[4] & 0x1e) >> 1); *dest_buff++ = ((input[4] & 0x01) << 7) | ((input[5] & 0x1f) << 2) | ((input[6] & 0x18) >> 3); *dest_buff++ = ((input[6] & 0x07) << 5) | (input[7] & 0x1f); dest_size += TARGET_BLOCK_SIZE; // If there is padding remove it // Because we are packing 5 bytes into an 8 byte variable we need to check every other // variable for padding if (input[7] == BASE32_EQUAL_SIGN) { --dest_size; if (input[5] == BASE32_EQUAL_SIGN) { --dest_size; if (input[4] == BASE32_EQUAL_SIGN) { --dest_size; if (input[2] == BASE32_EQUAL_SIGN) { --dest_size; } } } } } } if (!continue_processing) { result = NULL; } else { /* Codes_SRS_BASE32_07_026: [ Once base32_decode_impl is complete it shall create a BUFFER with the temp buffer. ] */ result = BUFFER_create(temp_buffer, dest_size); if (result == NULL) { LogError("Failure: BUFFER_create failed to create decoded buffer"); } } free(temp_buffer); } } return result; } BUFFER_HANDLE Base32_Decode(STRING_HANDLE handle) { BUFFER_HANDLE result; if (handle == NULL) { /* Codes_SRS_BASE32_07_016: [ If source is NULL Base32_Decoder shall return NULL. ] */ LogError("invalid parameter handle"); result = NULL; } else { const char* str_source = STRING_c_str(handle); if (str_source == NULL) { /* Codes_SRS_BASE32_07_027: [ If the string in source value is NULL, Base32_Decoder shall return NULL. ] */ LogError("NULL value specified in string"); result = NULL; } else { /* Codes_SRS_BASE32_07_018: [ Base32_Decoder shall call base32_decode_impl to decode the base64 value. ] */ result = base32_decode_impl(str_source); } } /* Codes_SRS_BASE32_07_017: [ On success Base32_Decoder shall return a BUFFER_HANDLE that contains the decoded bytes for source. ] */ return result; } BUFFER_HANDLE Base32_Decode_String(const char* source) { BUFFER_HANDLE result; if (source == NULL) { /* Codes_SRS_BASE32_07_008: [ If source is NULL Base32_Decoder_String shall return NULL. ] */ LogError("invalid parameter source=NULL"); result = NULL; } else { /* Codes_SRS_BASE32_07_020: [ Base32_Decoder_String shall call base32_decode_impl to decode the base64 value. ] */ result = base32_decode_impl(source); } /* Codes_SRS_BASE32_07_019: [ On success Base32_Decoder_String shall return a BUFFER_HANDLE that contains the decoded bytes for source. ] */ return result; } char* Base32_Encode_Bytes(const unsigned char* source, size_t size) { char* result; if (source == NULL) { /* Codes_SRS_BASE32_07_004: [ If source is NULL Base32_Encode shall return NULL. ] */ result = NULL; LogError("Failure: Invalid input parameter source"); } else if (size == 0) { /* Codes_SRS_BASE32_07_005: [ If size is 0 Base32_Encode shall return an empty string. ] */ result = malloc(1); strcpy(result, ""); } else { /* Codes_SRS_BASE32_07_007: [ Base32_Encode_Bytes shall call into base32_Encode_impl to encode the source data. ] */ result = base32_encode_impl(source, size); if (result == NULL) { /* Codes_SRS_BASE32_07_014: [ Upon failure Base32_Encode_Bytes shall return NULL. ] */ LogError("encoding of unsigned char failed."); } } /* Codes_SRS_BASE32_07_006: [ If successful Base32_Encode shall return the base32 value of input. ] */ return result; } STRING_HANDLE Base32_Encode(BUFFER_HANDLE source) { STRING_HANDLE result; if (source == NULL) { /* Codes_SRS_BASE32_07_001: [ If source is NULL Base32_Encode shall return NULL. ] */ result = NULL; LogError("Failure: Invalid input parameter"); } else { size_t input_len = BUFFER_length(source); const unsigned char* input_value = BUFFER_u_char(source); if (input_value == NULL || input_len == 0) { /* Codes_SRS_BASE32_07_015: [ If size is 0 Base32_Encode shall return an empty string. ] */ result = STRING_new(); if (result == NULL) { LogError("Failure constructing new string."); } } else { /* Codes_SRS_BASE32_07_003: [ Base32_Encode shall call into base32_Encode_impl to encode the source data. ] */ char* encoded = base32_encode_impl(input_value, input_len); if (encoded == NULL) { /* Codes_SRS_BASE32_07_014: [ Upon failure base32_Encode shall return NULL. ] */ LogError("base32 encode implementation failed."); result = NULL; } else { /* Codes_SRS_BASE32_07_012: [ base32_Encode shall wrap the base32_Encode_impl result into a STRING_HANDLE. ] */ result = STRING_construct(encoded); if (result == NULL) { /* Codes_SRS_BASE32_07_014: [ Upon failure base32_Encode shall return NULL. ] */ LogError("string construction failed."); } free(encoded); } } } /* Codes_SRS_BASE32_07_002: [ If successful Base32_Encode shall return the base32 value of source. ] */ return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/base64.c000066400000000000000000000272661362133436400313700ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include #include #include "azure_c_shared_utility/base64.h" #include "azure_c_shared_utility/xlogging.h" #define splitInt(intVal, bytePos) (char)((intVal >> (bytePos << 3)) & 0xFF) #define joinChars(a, b, c, d) (uint32_t)((uint32_t)a + ((uint32_t)b << 8) + ((uint32_t)c << 16) + ((uint32_t)d << 24)) static char base64char(unsigned char val) { char result; if (val < 26) { result = 'A' + (char)val; } else if (val < 52) { result = 'a' + ((char)val - 26); } else if (val < 62) { result = '0' + ((char)val - 52); } else if (val == 62) { result = '+'; } else { result = '/'; } return result; } static char base64b16(unsigned char val) { const uint32_t base64b16values[4] = { joinChars('A', 'E', 'I', 'M'), joinChars('Q', 'U', 'Y', 'c'), joinChars('g', 'k', 'o', 's'), joinChars('w', '0', '4', '8') }; return splitInt(base64b16values[val >> 2], (val & 0x03)); } static char base64b8(unsigned char val) { const uint32_t base64b8values = joinChars('A', 'Q', 'g', 'w'); return splitInt(base64b8values, val); } static int base64toValue(char base64character, unsigned char* value) { int result = 0; if (('A' <= base64character) && (base64character <= 'Z')) { *value = base64character - 'A'; } else if (('a' <= base64character) && (base64character <= 'z')) { *value = ('Z' - 'A') + 1 + (base64character - 'a'); } else if (('0' <= base64character) && (base64character <= '9')) { *value = ('Z' - 'A') + 1 + ('z' - 'a') + 1 + (base64character - '0'); } else if ('+' == base64character) { *value = 62; } else if ('/' == base64character) { *value = 63; } else { *value = 0; result = -1; } return result; } static size_t numberOfBase64Characters(const char* encodedString) { size_t length = 0; unsigned char junkChar; while (base64toValue(encodedString[length],&junkChar) != -1) { length++; } return length; } /*returns the count of original bytes before being base64 encoded*/ /*notice NO validation of the content of encodedString. Its length is validated to be a multiple of 4.*/ static size_t Base64decode_len(const char *encodedString) { size_t result; size_t sourceLength = strlen(encodedString); if (sourceLength == 0) { result = 0; } else { result = sourceLength / 4 * 3; if (encodedString[sourceLength - 1] == '=') { if (encodedString[sourceLength - 2] == '=') { result --; } result--; } } return result; } static void Base64decode(unsigned char *decodedString, const char *base64String) { size_t numberOfEncodedChars; size_t indexOfFirstEncodedChar; size_t decodedIndex; // // We can only operate on individual bytes. If we attempt to work // on anything larger we could get an alignment fault on some // architectures // numberOfEncodedChars = numberOfBase64Characters(base64String); indexOfFirstEncodedChar = 0; decodedIndex = 0; while (numberOfEncodedChars >= 4) { unsigned char c1; unsigned char c2; unsigned char c3; unsigned char c4; (void)base64toValue(base64String[indexOfFirstEncodedChar], &c1); (void)base64toValue(base64String[indexOfFirstEncodedChar + 1], &c2); (void)base64toValue(base64String[indexOfFirstEncodedChar + 2], &c3); (void)base64toValue(base64String[indexOfFirstEncodedChar + 3], &c4); decodedString[decodedIndex] = (c1 << 2) | (c2 >> 4); decodedIndex++; decodedString[decodedIndex] = ((c2 & 0x0f) << 4) | (c3 >> 2); decodedIndex++; decodedString[decodedIndex] = ((c3 & 0x03) << 6) | c4; decodedIndex++; numberOfEncodedChars -= 4; indexOfFirstEncodedChar += 4; } if (numberOfEncodedChars == 2) { unsigned char c1; unsigned char c2; (void)base64toValue(base64String[indexOfFirstEncodedChar], &c1); (void)base64toValue(base64String[indexOfFirstEncodedChar + 1], &c2); decodedString[decodedIndex] = (c1 << 2) | (c2 >> 4); } else if (numberOfEncodedChars == 3) { unsigned char c1; unsigned char c2; unsigned char c3; (void)base64toValue(base64String[indexOfFirstEncodedChar], &c1); (void)base64toValue(base64String[indexOfFirstEncodedChar + 1], &c2); (void)base64toValue(base64String[indexOfFirstEncodedChar + 2], &c3); decodedString[decodedIndex] = (c1 << 2) | (c2 >> 4); decodedIndex++; decodedString[decodedIndex] = ((c2 & 0x0f) << 4) | (c3 >> 2); } } BUFFER_HANDLE Base64_Decoder(const char* source) { BUFFER_HANDLE result; /*Codes_SRS_BASE64_06_008: [If source is NULL then Base64_Decode shall return NULL.]*/ if (source == NULL) { LogError("invalid parameter const char* source=%p", source); result = NULL; } else { if ((strlen(source) % 4) != 0) { /*Codes_SRS_BASE64_06_011: [If the source string has an invalid length for a base 64 encoded string then Base64_Decode shall return NULL.]*/ LogError("Invalid length Base64 string!"); result = NULL; } else { if ((result = BUFFER_new()) == NULL) { /*Codes_SRS_BASE64_06_010: [If there is any memory allocation failure during the decode then Base64_Decode shall return NULL.]*/ LogError("Could not create a buffer to decoding."); } else { size_t sizeOfOutputBuffer = Base64decode_len(source); /*Codes_SRS_BASE64_06_009: [If the string pointed to by source is zero length then the handle returned shall refer to a zero length buffer.]*/ if (sizeOfOutputBuffer > 0) { if (BUFFER_pre_build(result, sizeOfOutputBuffer) != 0) { /*Codes_SRS_BASE64_06_010: [If there is any memory allocation failure during the decode then Base64_Decode shall return NULL.]*/ LogError("Could not prebuild a buffer for base 64 decoding."); BUFFER_delete(result); result = NULL; } else { Base64decode(BUFFER_u_char(result), source); } } } } } return result; } static STRING_HANDLE Base64_Encode_Internal(const unsigned char* source, size_t size) { STRING_HANDLE result; size_t neededSize = 0; char* encoded; size_t currentPosition = 0; neededSize += (size == 0) ? (0) : ((((size - 1) / 3) + 1) * 4); neededSize += 1; /*+1 because \0 at the end of the string*/ /*Codes_SRS_BASE64_06_006: [If when allocating memory to produce the encoding a failure occurs then Base64_Encoder shall return NULL.]*/ encoded = (char*)malloc(neededSize); if (encoded == NULL) { result = NULL; LogError("Base64_Encoder:: Allocation failed."); } else { /*b0 b1(+1) b2(+2) 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 |----c1---| |----c2---| |----c3---| |----c4---| */ size_t destinationPosition = 0; while (size - currentPosition >= 3) { char c1 = base64char(source[currentPosition] >> 2); char c2 = base64char( ((source[currentPosition] & 3) << 4) | (source[currentPosition + 1] >> 4) ); char c3 = base64char( ((source[currentPosition + 1] & 0x0F) << 2) | ((source[currentPosition + 2] >> 6) & 3) ); char c4 = base64char( source[currentPosition + 2] & 0x3F ); currentPosition += 3; encoded[destinationPosition++] = c1; encoded[destinationPosition++] = c2; encoded[destinationPosition++] = c3; encoded[destinationPosition++] = c4; } if (size - currentPosition == 2) { char c1 = base64char(source[currentPosition] >> 2); char c2 = base64char( ((source[currentPosition] & 0x03) << 4) | (source[currentPosition + 1] >> 4) ); char c3 = base64b16(source[currentPosition + 1] & 0x0F); encoded[destinationPosition++] = c1; encoded[destinationPosition++] = c2; encoded[destinationPosition++] = c3; encoded[destinationPosition++] = '='; } else if (size - currentPosition == 1) { char c1 = base64char(source[currentPosition] >> 2); char c2 = base64b8(source[currentPosition] & 0x03); encoded[destinationPosition++] = c1; encoded[destinationPosition++] = c2; encoded[destinationPosition++] = '='; encoded[destinationPosition++] = '='; } /*null terminating the string*/ encoded[destinationPosition] = '\0'; /*Codes_SRS_BASE64_06_007: [Otherwise Base64_Encoder shall return a pointer to STRING, that string contains the base 64 encoding of input.]*/ result = STRING_new_with_memory(encoded); if (result == NULL) { free(encoded); LogError("Base64_Encoder:: Allocation failed for return value."); } } return result; } STRING_HANDLE Base64_Encode_Bytes(const unsigned char* source, size_t size) { STRING_HANDLE result; /*Codes_SRS_BASE64_02_001: [If source is NULL then Base64_Encode_Bytes shall return NULL.] */ if (source == NULL) { result = NULL; } /*Codes_SRS_BASE64_02_002: [If source is not NULL and size is zero, then Base64_Encode_Bytes shall produce an empty STRING_HANDLE.] */ else if (size == 0) { result = STRING_new(); /*empty string*/ } else { result = Base64_Encode_Internal(source, size); } return result; } STRING_HANDLE Base64_Encoder(BUFFER_HANDLE input) { STRING_HANDLE result; /*the following will happen*/ /*1. the "data" of the binary shall be "eaten" 3 characters at a time and produce 4 base64 encoded characters for as long as there are more than 3 characters still to process*/ /*2. the remaining characters (1 or 2) shall be encoded.*/ /*there's a level of assumption that 'a' corresponds to 0b000000 and that '_' corresponds to 0b111111*/ /*the encoding will use the optional [=] or [==] at the end of the encoded string, so that other less standard aware libraries can do their work*/ /*these are the bits of the 3 normal bytes to be encoded*/ /*Codes_SRS_BASE64_06_001: [If input is NULL then Base64_Encoder shall return NULL.]*/ if (input == NULL) { result = NULL; LogError("Base64_Encoder:: NULL input"); } else { size_t inputSize; const unsigned char* inputBinary; if ((BUFFER_content(input, &inputBinary) != 0) || (BUFFER_size(input, &inputSize) != 0)) { result = NULL; LogError("Base64_Encoder:: BUFFER_routines failure."); } else { result = Base64_Encode_Internal(inputBinary, inputSize); } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/buffer.c000066400000000000000000000533611362133436400315500ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" typedef struct BUFFER_TAG { unsigned char* buffer; size_t size; } BUFFER; /* Codes_SRS_BUFFER_07_001: [BUFFER_new shall allocate a BUFFER_HANDLE that will contain a NULL unsigned char*.] */ BUFFER_HANDLE BUFFER_new(void) { BUFFER* temp = (BUFFER*)malloc(sizeof(BUFFER)); /* Codes_SRS_BUFFER_07_002: [BUFFER_new shall return NULL on any error that occurs.] */ if (temp != NULL) { temp->buffer = NULL; temp->size = 0; } return (BUFFER_HANDLE)temp; } static int BUFFER_safemalloc(BUFFER* handleptr, size_t size) { int result; size_t sizetomalloc = size; if (size == 0) { sizetomalloc = 1; } handleptr->buffer = (unsigned char*)malloc(sizetomalloc); if (handleptr->buffer == NULL) { /*Codes_SRS_BUFFER_02_003: [If allocating memory fails, then BUFFER_create shall return NULL.]*/ LogError("Failure allocating data"); result = __FAILURE__; } else { // we still consider the real buffer size is 0 handleptr->size = size; result = 0; } return result; } BUFFER_HANDLE BUFFER_create(const unsigned char* source, size_t size) { BUFFER* result; /*Codes_SRS_BUFFER_02_001: [If source is NULL then BUFFER_create shall return NULL.]*/ if (source == NULL) { LogError("invalid parameter source: %p", source); result = NULL; } else { /*Codes_SRS_BUFFER_02_002: [Otherwise, BUFFER_create shall allocate memory to hold size bytes and shall copy from source size bytes into the newly allocated memory.] */ result = (BUFFER*)malloc(sizeof(BUFFER)); if (result == NULL) { /*Codes_SRS_BUFFER_02_003: [If allocating memory fails, then BUFFER_create shall return NULL.] */ /*fallthrough*/ LogError("Failure allocating BUFFER structure"); } else { /* Codes_SRS_BUFFER_02_005: [If size parameter is 0 then 1 byte of memory shall be allocated yet size of the buffer shall be set to 0.]*/ if (BUFFER_safemalloc(result, size) != 0) { LogError("unable to BUFFER_safemalloc "); free(result); result = NULL; } else { /*Codes_SRS_BUFFER_02_004: [Otherwise, BUFFER_create shall return a non-NULL handle.] */ (void)memcpy(result->buffer, source, size); } } } return (BUFFER_HANDLE)result; } /* Codes_SRS_BUFFER_07_003: [BUFFER_delete shall delete the data associated with the BUFFER_HANDLE along with the Buffer.] */ void BUFFER_delete(BUFFER_HANDLE handle) { /* Codes_SRS_BUFFER_07_004: [BUFFER_delete shall not delete any BUFFER_HANDLE that is NULL.] */ if (handle != NULL) { BUFFER* b = (BUFFER*)handle; if (b->buffer != NULL) { /* Codes_SRS_BUFFER_07_003: [BUFFER_delete shall delete the data associated with the BUFFER_HANDLE along with the Buffer.] */ free(b->buffer); } free(b); } } /*return 0 if the buffer was copied*/ /*else return different than zero*/ /* Codes_SRS_BUFFER_07_008: [BUFFER_build allocates size_t bytes, copies the unsigned char* into the buffer and returns zero on success.] */ int BUFFER_build(BUFFER_HANDLE handle, const unsigned char* source, size_t size) { int result; if (handle == NULL) { /* Codes_SRS_BUFFER_07_009: [BUFFER_build shall return nonzero if handle is NULL ] */ result = __FAILURE__; } /* Codes_SRS_BUFFER_01_002: [The size argument can be zero, in which case the underlying buffer held by the buffer instance shall be freed.] */ else if (size == 0) { /* Codes_SRS_BUFFER_01_003: [If size is zero, source can be NULL.] */ BUFFER* b = (BUFFER*)handle; free(b->buffer); b->buffer = NULL; b->size = 0; result = 0; } else { if (source == NULL) { /* Codes_SRS_BUFFER_01_001: [If size is positive and source is NULL, BUFFER_build shall return nonzero] */ result = __FAILURE__; } else { BUFFER* b = (BUFFER*)handle; /* Codes_SRS_BUFFER_07_011: [BUFFER_build shall overwrite previous contents if the buffer has been previously allocated.] */ unsigned char* newBuffer = (unsigned char*)realloc(b->buffer, size); if (newBuffer == NULL) { /* Codes_SRS_BUFFER_07_010: [BUFFER_build shall return nonzero if any error is encountered.] */ LogError("Failure reallocating buffer"); result = __FAILURE__; } else { b->buffer = newBuffer; b->size = size; /* Codes_SRS_BUFFER_01_002: [The size argument can be zero, in which case nothing shall be copied from source.] */ (void)memcpy(b->buffer, source, size); result = 0; } } } return result; } int BUFFER_append_build(BUFFER_HANDLE handle, const unsigned char* source, size_t size) { int result; if (handle == NULL || source == NULL || size == 0) { /* Codes_SRS_BUFFER_07_029: [ BUFFER_append_build shall return nonzero if handle or source are NULL or if size is 0. ] */ LogError("BUFFER_append_build failed invalid parameter handle: %p, source: %p, size: %lu", handle, source, (unsigned long)size); result = __FAILURE__; } else { if (handle->buffer == NULL) { /* Codes_SRS_BUFFER_07_030: [ if handle->buffer is NULL BUFFER_append_build shall allocate the a buffer of size bytes... ] */ if (BUFFER_safemalloc(handle, size) != 0) { /* Codes_SRS_BUFFER_07_035: [ If any error is encountered BUFFER_append_build shall return a non-null value. ] */ LogError("Failure with BUFFER_safemalloc"); result = __FAILURE__; } else { /* Codes_SRS_BUFFER_07_031: [ ... and copy the contents of source to handle->buffer. ] */ (void)memcpy(handle->buffer, source, size); /* Codes_SRS_BUFFER_07_034: [ On success BUFFER_append_build shall return 0 ] */ result = 0; } } else { /* Codes_SRS_BUFFER_07_032: [ if handle->buffer is not NULL BUFFER_append_build shall realloc the buffer to be the handle->size + size ] */ unsigned char* temp = (unsigned char*)realloc(handle->buffer, handle->size + size); if (temp == NULL) { /* Codes_SRS_BUFFER_07_035: [ If any error is encountered BUFFER_append_build shall return a non-null value. ] */ LogError("Failure reallocating temporary buffer"); result = __FAILURE__; } else { /* Codes_SRS_BUFFER_07_033: [ ... and copy the contents of source to the end of the buffer. ] */ handle->buffer = temp; // Append the BUFFER (void)memcpy(&handle->buffer[handle->size], source, size); handle->size += size; /* Codes_SRS_BUFFER_07_034: [ On success BUFFER_append_build shall return 0 ] */ result = 0; } } } return result; } /*return 0 if the buffer was pre-build(that is, had its space allocated)*/ /*else return different than zero*/ /* Codes_SRS_BUFFER_07_005: [BUFFER_pre_build allocates size_t bytes of BUFFER_HANDLE and returns zero on success.] */ int BUFFER_pre_build(BUFFER_HANDLE handle, size_t size) { int result; if (handle == NULL) { /* Codes_SRS_BUFFER_07_006: [If handle is NULL or size is 0 then BUFFER_pre_build shall return a nonzero value.] */ result = __FAILURE__; } else if (size == 0) { /* Codes_SRS_BUFFER_07_006: [If handle is NULL or size is 0 then BUFFER_pre_build shall return a nonzero value.] */ result = __FAILURE__; } else { BUFFER* b = (BUFFER*)handle; if (b->buffer != NULL) { /* Codes_SRS_BUFFER_07_007: [BUFFER_pre_build shall return nonzero if the buffer has been previously allocated and is not NULL.] */ LogError("Failure buffer data is NULL"); result = __FAILURE__; } else { if ((b->buffer = (unsigned char*)malloc(size)) == NULL) { /* Codes_SRS_BUFFER_07_013: [BUFFER_pre_build shall return nonzero if any error is encountered.] */ LogError("Failure allocating buffer"); result = __FAILURE__; } else { b->size = size; result = 0; } } } return result; } /* Codes_SRS_BUFFER_07_019: [BUFFER_content shall return the data contained within the BUFFER_HANDLE.] */ int BUFFER_content(BUFFER_HANDLE handle, const unsigned char** content) { int result; if ((handle == NULL) || (content == NULL)) { /* Codes_SRS_BUFFER_07_020: [If the handle and/or content*is NULL BUFFER_content shall return nonzero.] */ result = __FAILURE__; } else { BUFFER* b = (BUFFER*)handle; *content = b->buffer; result = 0; } return result; } /*return 0 if everything went ok and whatever was built in the buffer was unbuilt*/ /* Codes_SRS_BUFFER_07_012: [BUFFER_unbuild shall clear the underlying unsigned char* data associated with the BUFFER_HANDLE this will return zero on success.] */ extern int BUFFER_unbuild(BUFFER_HANDLE handle) { int result; if (handle == NULL) { /* Codes_SRS_BUFFER_07_014: [BUFFER_unbuild shall return a nonzero value if BUFFER_HANDLE is NULL.] */ result = __FAILURE__; } else { BUFFER* b = (BUFFER*)handle; if (b->buffer != NULL) { LogError("Failure buffer data is NULL"); free(b->buffer); b->buffer = NULL; b->size = 0; result = 0; } else { /* Codes_SRS_BUFFER_07_015: [BUFFER_unbuild shall return a nonzero value if the unsigned char* referenced by BUFFER_HANDLE is NULL.] */ result = __FAILURE__; } } return result; } /* Codes_SRS_BUFFER_07_016: [BUFFER_enlarge shall increase the size of the unsigned char* referenced by BUFFER_HANDLE.] */ int BUFFER_enlarge(BUFFER_HANDLE handle, size_t enlargeSize) { int result; if (handle == NULL) { /* Codes_SRS_BUFFER_07_017: [BUFFER_enlarge shall return a nonzero result if any parameters are NULL or zero.] */ LogError("Failure: handle is invalid."); result = __FAILURE__; } else if (enlargeSize == 0) { /* Codes_SRS_BUFFER_07_017: [BUFFER_enlarge shall return a nonzero result if any parameters are NULL or zero.] */ LogError("Failure: enlargeSize size is 0."); result = __FAILURE__; } else { BUFFER* b = (BUFFER*)handle; unsigned char* temp = (unsigned char*)realloc(b->buffer, b->size + enlargeSize); if (temp == NULL) { /* Codes_SRS_BUFFER_07_018: [BUFFER_enlarge shall return a nonzero result if any error is encountered.] */ LogError("Failure: allocating temp buffer."); result = __FAILURE__; } else { b->buffer = temp; b->size += enlargeSize; result = 0; } } return result; } int BUFFER_shrink(BUFFER_HANDLE handle, size_t decreaseSize, bool fromEnd) { int result; if (handle == NULL) { /* Codes_SRS_BUFFER_07_036: [ if handle is NULL, BUFFER_shrink shall return a non-null value ]*/ LogError("Failure: handle is invalid."); result = __FAILURE__; } else if (decreaseSize == 0) { /* Codes_SRS_BUFFER_07_037: [ If decreaseSize is equal zero, BUFFER_shrink shall return a non-null value ] */ LogError("Failure: decrease size is 0."); result = __FAILURE__; } else if (decreaseSize > handle->size) { /* Codes_SRS_BUFFER_07_038: [ If decreaseSize is less than the size of the buffer, BUFFER_shrink shall return a non-null value ] */ LogError("Failure: decrease size is less than buffer size."); result = __FAILURE__; } else { /* Codes_SRS_BUFFER_07_039: [ BUFFER_shrink shall allocate a temporary buffer of existing buffer size minus decreaseSize. ] */ size_t alloc_size = handle->size - decreaseSize; if (alloc_size == 0) { /* Codes_SRS_BUFFER_07_043: [ If the decreaseSize is equal the buffer size , BUFFER_shrink shall deallocate the buffer and set the size to zero. ] */ free(handle->buffer); handle->buffer = NULL; handle->size = 0; result = 0; } else { unsigned char* tmp = malloc(alloc_size); if (tmp == NULL) { /* Codes_SRS_BUFFER_07_042: [ If a failure is encountered, BUFFER_shrink shall return a non-null value ] */ LogError("Failure: allocating temp buffer."); result = __FAILURE__; } else { if (fromEnd) { /* Codes_SRS_BUFFER_07_040: [ if the fromEnd variable is true, BUFFER_shrink shall remove the end of the buffer of size decreaseSize. ] */ memcpy(tmp, handle->buffer, alloc_size); free(handle->buffer); handle->buffer = tmp; handle->size = alloc_size; result = 0; } else { /* Codes_SRS_BUFFER_07_041: [ if the fromEnd variable is false, BUFFER_shrink shall remove the beginning of the buffer of size decreaseSize. ] */ memcpy(tmp, handle->buffer + decreaseSize, alloc_size); free(handle->buffer); handle->buffer = tmp; handle->size = alloc_size; result = 0; } } } } return result; } /* Codes_SRS_BUFFER_07_021: [BUFFER_size shall place the size of the associated buffer in the size variable and return zero on success.] */ int BUFFER_size(BUFFER_HANDLE handle, size_t* size) { int result; if ((handle == NULL) || (size == NULL)) { /* Codes_SRS_BUFFER_07_022: [BUFFER_size shall return a nonzero value for any error that is encountered.] */ result = __FAILURE__; } else { BUFFER* b = (BUFFER*)handle; *size = b->size; result = 0; } return result; } /* Codes_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.] */ int BUFFER_append(BUFFER_HANDLE handle1, BUFFER_HANDLE handle2) { int result; if ( (handle1 == NULL) || (handle2 == NULL) || (handle1 == handle2) ) { /* Codes_SRS_BUFFER_07_023: [BUFFER_append shall return a nonzero upon any error that is encountered.] */ result = __FAILURE__; } else { BUFFER* b1 = (BUFFER*)handle1; BUFFER* b2 = (BUFFER*)handle2; if (b1->buffer == NULL) { /* Codes_SRS_BUFFER_07_023: [BUFFER_append shall return a nonzero upon any error that is encountered.] */ result = __FAILURE__; } else if (b2->buffer == NULL) { /* Codes_SRS_BUFFER_07_023: [BUFFER_append shall return a nonzero upon any error that is encountered.] */ result = __FAILURE__; } else { if (b2->size ==0) { // b2->size = 0, whatever b1->size is, do nothing result = 0; } else { // b2->size != 0, whatever b1->size is unsigned char* temp = (unsigned char*)realloc(b1->buffer, b1->size + b2->size); if (temp == NULL) { /* Codes_SRS_BUFFER_07_023: [BUFFER_append shall return a nonzero upon any error that is encountered.] */ LogError("Failure: allocating temp buffer."); result = __FAILURE__; } else { /* Codes_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.]*/ b1->buffer = temp; // Append the BUFFER (void)memcpy(&b1->buffer[b1->size], b2->buffer, b2->size); b1->size += b2->size; result = 0; } } } } return result; } int BUFFER_prepend(BUFFER_HANDLE handle1, BUFFER_HANDLE handle2) { int result; if ((handle1 == NULL) || (handle2 == NULL) || (handle1 == handle2)) { /* Codes_SRS_BUFFER_01_005: [ BUFFER_prepend shall return a non-zero upon value any error that is encountered. ]*/ result = __FAILURE__; } else { BUFFER* b1 = (BUFFER*)handle1; BUFFER* b2 = (BUFFER*)handle2; if (b1->buffer == NULL) { /* Codes_SRS_BUFFER_01_005: [ BUFFER_prepend shall return a non-zero upon value any error that is encountered. ]*/ result = __FAILURE__; } else if (b2->buffer == NULL) { /* Codes_SRS_BUFFER_01_005: [ BUFFER_prepend shall return a non-zero upon value any error that is encountered. ]*/ result = __FAILURE__; } else { //put b2 ahead of b1: [b2][b1], return b1 if (b2->size ==0) { // do nothing result = 0; } else { // b2->size != 0 unsigned char* temp = (unsigned char*)malloc(b1->size + b2->size); if (temp == NULL) { /* Codes_SRS_BUFFER_01_005: [ BUFFER_prepend shall return a non-zero upon value any error that is encountered. ]*/ LogError("Failure: allocating temp buffer."); result = __FAILURE__; } else { /* Codes_SRS_BUFFER_01_004: [ BUFFER_prepend concatenates handle1 onto handle2 without modifying handle1 and shall return zero on success. ]*/ // Append the BUFFER (void)memcpy(temp, b2->buffer, b2->size); // start from b1->size to append b1 (void)memcpy(&temp[b2->size], b1->buffer, b1->size); free(b1->buffer); b1->buffer = temp; b1->size += b2->size; result = 0; } } } } return result; } int BUFFER_fill(BUFFER_HANDLE handle, unsigned char fill_char) { int result; if (handle == NULL) { /* Codes_SRS_BUFFER_07_002: [ If handle is NULL BUFFER_fill shall return a non-zero value. ] */ LogError("Invalid parameter specified, handle == NULL."); result = __FAILURE__; } else { size_t index; /* Codes_SRS_BUFFER_07_001: [ BUFFER_fill shall fill the supplied BUFFER_HANDLE with the supplied fill character. ] */ BUFFER* buffer_data = (BUFFER*)handle; for (index = 0; index < buffer_data->size; index++) { buffer_data->buffer[index] = fill_char; } result = 0; } return result; } /* Codes_SRS_BUFFER_07_025: [BUFFER_u_char shall return a pointer to the underlying unsigned char*.] */ unsigned char* BUFFER_u_char(BUFFER_HANDLE handle) { BUFFER* handleData = (BUFFER*)handle; unsigned char* result; if (handle == NULL || handleData->size == 0) { /* Codes_SRS_BUFFER_07_026: [BUFFER_u_char shall return NULL for any error that is encountered.] */ /* Codes_SRS_BUFFER_07_029: [BUFFER_u_char shall return NULL if underlying buffer size is zero.] */ result = NULL; } else { result = handleData->buffer; } return result; } /* Codes_SRS_BUFFER_07_027: [BUFFER_length shall return the size of the underlying buffer.] */ size_t BUFFER_length(BUFFER_HANDLE handle) { size_t result; if (handle == NULL) { /* Codes_SRS_BUFFER_07_028: [BUFFER_length shall return zero for any error that is encountered.] */ result = 0; } else { BUFFER* b = (BUFFER*)handle; result = b->size; } return result; } BUFFER_HANDLE BUFFER_clone(BUFFER_HANDLE handle) { BUFFER_HANDLE result; if (handle == NULL) { result = NULL; } else { BUFFER* suppliedBuff = (BUFFER*)handle; BUFFER* b = (BUFFER*)malloc(sizeof(BUFFER)); if (b != NULL) { if (BUFFER_safemalloc(b, suppliedBuff->size) != 0) { free(b); LogError("Failure: allocating temp buffer."); result = NULL; } else { (void)memcpy(b->buffer, suppliedBuff->buffer, suppliedBuff->size); b->size = suppliedBuff->size; result = (BUFFER_HANDLE)b; } } else { result = NULL; } } return result; } connection_string_parser.c000066400000000000000000000322001362133436400353060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/connection_string_parser.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/string_tokenizer.h" #include #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" MAP_HANDLE connectionstringparser_parse_from_char(const char* connection_string) { MAP_HANDLE result; STRING_HANDLE connString = NULL; /* Codes_SRS_CONNECTIONSTRINGPARSER_21_020: [connectionstringparser_parse_from_char shall create a STRING_HANDLE from the connection_string passed in as argument and parse it using the connectionstringparser_parse.]*/ if ((connString = STRING_construct(connection_string)) == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_021: [If connectionstringparser_parse_from_char get error creating a STRING_HANDLE, it shall return NULL.]*/ LogError("Error constructing connection String"); result = NULL; } else { result = connectionstringparser_parse(connString); STRING_delete(connString); } return result; } /* Codes_SRS_CONNECTIONSTRINGPARSER_01_001: [connectionstringparser_parse shall parse all key value pairs from the connection_string passed in as argument and return a new map that holds the key/value pairs.] */ MAP_HANDLE connectionstringparser_parse(STRING_HANDLE connection_string) { MAP_HANDLE result; if (connection_string == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_002: [If connection_string is NULL then connectionstringparser_parse shall fail and return NULL.] */ result = NULL; LogError("NULL connection string passed to tokenizer."); } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_003: [connectionstringparser_parse shall create a STRING tokenizer to be used for parsing the connection string, by calling STRING_TOKENIZER_create.] */ /* Codes_SRS_CONNECTIONSTRINGPARSER_01_004: [connectionstringparser_parse shall start scanning at the beginning of the connection string.] */ STRING_TOKENIZER_HANDLE tokenizer = STRING_TOKENIZER_create(connection_string); if (tokenizer == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_015: [If STRING_TOKENIZER_create fails, connectionstringparser_parse shall fail and return NULL.] */ result = NULL; LogError("Error creating STRING tokenizer."); } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_016: [2 STRINGs shall be allocated in order to hold the to be parsed key and value tokens.] */ STRING_HANDLE token_key_string = STRING_new(); if (token_key_string == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_017: [If allocating the STRINGs fails connectionstringparser_parse shall fail and return NULL.] */ result = NULL; LogError("Error creating key token STRING."); } else { STRING_HANDLE token_value_string = STRING_new(); if (token_value_string == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_017: [If allocating the STRINGs fails connectionstringparser_parse shall fail and return NULL.] */ result = NULL; LogError("Error creating value token STRING."); } else { result = Map_Create(NULL); if (result == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_018: [If creating the result map fails, then connectionstringparser_parse shall return NULL.] */ LogError("Error creating Map."); } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_005: [The following actions shall be repeated until parsing is complete:] */ /* Codes_SRS_CONNECTIONSTRINGPARSER_01_006: [connectionstringparser_parse shall find a token (the key of the key/value pair) delimited by the `=` character, by calling STRING_TOKENIZER_get_next_token.] */ /* Codes_SRS_CONNECTIONSTRINGPARSER_01_007: [If STRING_TOKENIZER_get_next_token fails, parsing shall be considered complete.] */ while (STRING_TOKENIZER_get_next_token(tokenizer, token_key_string, "=") == 0) { bool is_error = false; /* Codes_SRS_CONNECTIONSTRINGPARSER_01_008: [connectionstringparser_parse shall find a token (the value of the key/value pair) delimited by the `;` character, by calling STRING_TOKENIZER_get_next_token.] */ if (STRING_TOKENIZER_get_next_token(tokenizer, token_value_string, ";") != 0) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_009: [If STRING_TOKENIZER_get_next_token fails, connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ is_error = true; LogError("Error reading value token from the connection string."); } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_011: [The C strings for the key and value shall be extracted from the previously parsed STRINGs by using STRING_c_str.] */ const char* token = STRING_c_str(token_key_string); /* Codes_SRS_CONNECTIONSTRINGPARSER_01_013: [If STRING_c_str fails then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ if ((token == NULL) || /* Codes_SRS_CONNECTIONSTRINGPARSER_01_019: [If the key length is zero then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ (strlen(token) == 0)) { is_error = true; LogError("The key token is NULL or empty."); } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_011: [The C strings for the key and value shall be extracted from the previously parsed STRINGs by using STRING_c_str.] */ const char* value = STRING_c_str(token_value_string); if (value == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_013: [If STRING_c_str fails then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ is_error = true; LogError("Could not get C string for value token."); } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_010: [The key and value shall be added to the result map by using Map_Add.] */ if (Map_Add(result, token, value) != 0) { /* Codes_SRS_CONNECTIONSTRINGPARSER_01_012: [If Map_Add fails connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ is_error = true; LogError("Could not add the key/value pair to the result map."); } } } } if (is_error) { LogError("Error parsing connection string."); Map_Destroy(result); result = NULL; break; } } } STRING_delete(token_value_string); } STRING_delete(token_key_string); } /* Codes_SRS_CONNECTIONSTRINGPARSER_01_014: [After the parsing is complete the previously allocated STRINGs and STRING tokenizer shall be freed by calling STRING_TOKENIZER_destroy.] */ STRING_TOKENIZER_destroy(tokenizer); } } return result; } /* Codes_SRS_CONNECTIONSTRINGPARSER_21_022: [connectionstringparser_splitHostName_from_char shall split the provided hostName in name and suffix.]*/ int connectionstringparser_splitHostName_from_char(const char* hostName, STRING_HANDLE nameString, STRING_HANDLE suffixString) { int result; const char* runHostName = hostName; if ((hostName == NULL) || ((*hostName) == '\0') || ((*hostName) == '.') || (nameString == NULL) || (suffixString == NULL)) { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_026: [If the hostName is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ /* Codes_SRS_CONNECTIONSTRINGPARSER_21_027: [If the hostName is an empty string, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ /* Codes_SRS_CONNECTIONSTRINGPARSER_21_028: [If the nameString is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ /* Codes_SRS_CONNECTIONSTRINGPARSER_21_029: [If the suffixString is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ /* Codes_SRS_CONNECTIONSTRINGPARSER_21_030: [If the hostName is not a valid host name, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ result = __FAILURE__; } else { while ((*runHostName) != '\0') { if ((*runHostName) == '.') { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_023: [connectionstringparser_splitHostName_from_char shall copy all characters, from the beginning of the hostName to the first `.` to the nameString.]*/ /* Codes_SRS_CONNECTIONSTRINGPARSER_21_024: [connectionstringparser_splitHostName_from_char shall copy all characters, from the first `.` to the end of the hostName, to the suffixString.]*/ runHostName++; break; } runHostName++; } if ((*runHostName) == '\0') { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_030: [If the hostName is not a valid host name, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ result = __FAILURE__; } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_023: [connectionstringparser_splitHostName_from_char shall copy all characters, from the beginning of the hostName to the first `.` to the nameString.]*/ if (STRING_copy_n(nameString, hostName, runHostName - hostName - 1) != 0) { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_031: [If connectionstringparser_splitHostName_from_char get error copying the name to the nameString, it shall return __FAILURE__.]*/ result = __FAILURE__; } /* Codes_SRS_CONNECTIONSTRINGPARSER_21_024: [connectionstringparser_splitHostName_from_char shall copy all characters, from the first `.` to the end of the hostName, to the suffixString.]*/ else if (STRING_copy(suffixString, runHostName) != 0) { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_032: [If connectionstringparser_splitHostName_from_char get error copying the suffix to the suffixString, it shall return __FAILURE__.]*/ result = __FAILURE__; } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_025: [If connectionstringparser_splitHostName_from_char get success splitting the hostName, it shall return 0.]*/ result = 0; } } } return result; } int connectionstringparser_splitHostName(STRING_HANDLE hostNameString, STRING_HANDLE nameString, STRING_HANDLE suffixString) { int result; if (hostNameString == NULL) { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_034: [If the hostNameString is NULL, connectionstringparser_splitHostName shall return __FAILURE__.]*/ result = __FAILURE__; } else { /* Codes_SRS_CONNECTIONSTRINGPARSER_21_033: [connectionstringparser_splitHostName shall convert the hostNameString to a connection_string passed in as argument, and call connectionstringparser_splitHostName_from_char.]*/ result = connectionstringparser_splitHostName_from_char(STRING_c_str(hostNameString), nameString, suffixString); } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/consolelogger.c000077500000000000000000000137411362133436400331420ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/consolelogger.h" #if (defined(_MSC_VER)) && (!(defined WINCE)) #include "windows.h" /*returns a string as if printed by vprintf*/ static char* vprintf_alloc(const char* format, va_list va) { char* result; int neededSize = vsnprintf(NULL, 0, format, va); if (neededSize < 0) { result = NULL; } else { result = (char*)malloc(neededSize + 1); if (result == NULL) { /*return as is*/ } else { if (vsnprintf(result, neededSize + 1, format, va) != neededSize) { free(result); result = NULL; } } } return result; } /*returns a string as if printed by printf*/ static char* printf_alloc(const char* format, ...) { char* result; va_list va; va_start(va, format); result = vprintf_alloc(format, va); va_end(va); return result; } /*returns NULL if it fails*/ static char* lastErrorToString(DWORD lastError) { char* result; if (lastError == 0) { result = printf_alloc(""); /*no error should appear*/ if (result == NULL) { (void)printf("failure in printf_alloc"); } else { /*return as is*/ } } else { char temp[MESSAGE_BUFFER_SIZE]; if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, lastError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), temp, MESSAGE_BUFFER_SIZE, NULL) == 0) { result = printf_alloc("GetLastError()=0X%x", lastError); if (result == NULL) { (void)printf("failure in printf_alloc\n"); /*return as is*/ } else { /*return as is*/ } } else { /*eliminate the \r or \n from the string*/ /*one replace of each is enough*/ char* whereAreThey; if ((whereAreThey = strchr(temp, '\r')) != NULL) { *whereAreThey = '\0'; } if ((whereAreThey = strchr(temp, '\n')) != NULL) { *whereAreThey = '\0'; } result = printf_alloc("GetLastError()==0X%x (%s)", lastError, temp); if (result == NULL) { (void)printf("failure in printf_alloc\n"); /*return as is*/ } else { /*return as is*/ } } } return result; } /*this function will use 1x printf (in the happy case) .*/ /*more than 1x printf / function call can mean intermingled LogErrors in a multithreaded env*/ /*the function will also attempt to produce some human readable strings for GetLastError*/ void consolelogger_log_with_GetLastError(const char* file, const char* func, int line, const char* format, ...) { DWORD lastError; char* lastErrorAsString; int lastErrorAsString_should_be_freed; time_t t; int systemMessage_should_be_freed; char* systemMessage; int userMessage_should_be_freed; char* userMessage; va_list args; va_start(args, format); /*this is what this case will do: 1. snip the last error 2. create a string with what that last error means 3. printf the system message (__FILE__, __LINE__ etc) + the last error + whatever the user wanted */ /*1. snip the last error*/ lastError = GetLastError(); /*2. create a string with what that last error means*/ lastErrorAsString = lastErrorToString(lastError); if (lastErrorAsString == NULL) { (void)printf("failure in lastErrorToString"); lastErrorAsString = ""; lastErrorAsString_should_be_freed = 0; } else { lastErrorAsString_should_be_freed = 1; } t = time(NULL); systemMessage = printf_alloc("Error: Time:%.24s File:%s Func:%s Line:%d %s", ctime(&t), file, func, line, lastErrorAsString); if (systemMessage == NULL) { systemMessage = ""; (void)printf("Error: [FAILED] Time:%.24s File : %s Func : %s Line : %d %s", ctime(&t), file, func, line, lastErrorAsString); systemMessage_should_be_freed = 0; } else { systemMessage_should_be_freed = 1; } userMessage = vprintf_alloc(format, args); if (userMessage == NULL) { (void)printf("[FAILED] "); (void)vprintf(format, args); (void)printf("\n"); userMessage_should_be_freed = 0; } else { /*3. printf the system message(__FILE__, __LINE__ etc) + the last error + whatever the user wanted*/ (void)printf("%s %s\n", systemMessage, userMessage); userMessage_should_be_freed = 1; } if (userMessage_should_be_freed == 1) { free(userMessage); } if (systemMessage_should_be_freed == 1) { free(systemMessage); } if (lastErrorAsString_should_be_freed == 1) { free(lastErrorAsString); } va_end(args); } #endif #if defined(__GNUC__) __attribute__ ((format (printf, 6, 7))) #endif void consolelogger_log(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...) { time_t t; va_list args; va_start(args, format); t = time(NULL); switch (log_category) { case AZ_LOG_INFO: (void)printf("Info: "); break; case AZ_LOG_ERROR: (void)printf("Error: Time:%.24s File:%s Func:%s Line:%d ", ctime(&t), file, func, line); break; default: break; } (void)vprintf(format, args); va_end(args); (void)log_category; if (options & LOG_LINE) { (void)printf("\r\n"); } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/constbuffer.c000066400000000000000000000120651362133436400326130ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/constbuffer.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/refcount.h" typedef struct CONSTBUFFER_HANDLE_DATA_TAG { CONSTBUFFER alias; COUNT_TYPE count; } CONSTBUFFER_HANDLE_DATA; static CONSTBUFFER_HANDLE CONSTBUFFER_Create_Internal(const unsigned char* source, size_t size) { CONSTBUFFER_HANDLE result; /*Codes_SRS_CONSTBUFFER_02_005: [The non-NULL handle returned by CONSTBUFFER_Create shall have its ref count set to "1".]*/ /*Codes_SRS_CONSTBUFFER_02_010: [The non-NULL handle returned by CONSTBUFFER_CreateFromBuffer shall have its ref count set to "1".]*/ result = (CONSTBUFFER_HANDLE)malloc(sizeof(CONSTBUFFER_HANDLE_DATA) + size); if (result == NULL) { /*Codes_SRS_CONSTBUFFER_02_003: [If creating the copy fails then CONSTBUFFER_Create shall return NULL.]*/ /*Codes_SRS_CONSTBUFFER_02_008: [If copying the content fails, then CONSTBUFFER_CreateFromBuffer shall fail and return NULL.] */ LogError("unable to malloc"); /*return as is*/ } else { INIT_REF_VAR(result->count); /*Codes_SRS_CONSTBUFFER_02_002: [Otherwise, CONSTBUFFER_Create shall create a copy of the memory area pointed to by source having size bytes.]*/ result->alias.size = size; if (size == 0) { result->alias.buffer = NULL; } else { unsigned char* temp = (void*)(result + 1); /*Codes_SRS_CONSTBUFFER_02_004: [Otherwise CONSTBUFFER_Create shall return a non-NULL handle.]*/ /*Codes_SRS_CONSTBUFFER_02_007: [Otherwise, CONSTBUFFER_CreateFromBuffer shall copy the content of buffer.]*/ /*Codes_SRS_CONSTBUFFER_02_009: [Otherwise, CONSTBUFFER_CreateFromBuffer shall return a non-NULL handle.]*/ (void)memcpy(temp, source, size); result->alias.buffer = temp; } } return result; } CONSTBUFFER_HANDLE CONSTBUFFER_Create(const unsigned char* source, size_t size) { CONSTBUFFER_HANDLE result; /*Codes_SRS_CONSTBUFFER_02_001: [If source is NULL and size is different than 0 then CONSTBUFFER_Create shall fail and return NULL.]*/ if ( (source == NULL) && (size != 0) ) { LogError("invalid arguments passes to CONSTBUFFER_Create"); result = NULL; } else { result = CONSTBUFFER_Create_Internal(source, size); } return result; } /*this creates a new constbuffer from an existing BUFFER_HANDLE*/ CONSTBUFFER_HANDLE CONSTBUFFER_CreateFromBuffer(BUFFER_HANDLE buffer) { CONSTBUFFER_HANDLE result; /*Codes_SRS_CONSTBUFFER_02_006: [If buffer is NULL then CONSTBUFFER_CreateFromBuffer shall fail and return NULL.]*/ if (buffer == NULL) { LogError("invalid arg passed to CONSTBUFFER_CreateFromBuffer"); result = NULL; } else { size_t length = BUFFER_length(buffer); unsigned char* rawBuffer = BUFFER_u_char(buffer); result = CONSTBUFFER_Create_Internal(rawBuffer, length); } return result; } CONSTBUFFER_HANDLE CONSTBUFFER_Clone(CONSTBUFFER_HANDLE constbufferHandle) { if (constbufferHandle == NULL) { /*Codes_SRS_CONSTBUFFER_02_013: [If constbufferHandle is NULL then CONSTBUFFER_Clone shall fail and return NULL.]*/ LogError("invalid arg"); } else { /*Codes_SRS_CONSTBUFFER_02_014: [Otherwise, CONSTBUFFER_Clone shall increment the reference count and return constbufferHandle.]*/ INC_REF_VAR(constbufferHandle->count); } return constbufferHandle; } const CONSTBUFFER* CONSTBUFFER_GetContent(CONSTBUFFER_HANDLE constbufferHandle) { const CONSTBUFFER* result; if (constbufferHandle == NULL) { /*Codes_SRS_CONSTBUFFER_02_011: [If constbufferHandle is NULL then CONSTBUFFER_GetContent shall return NULL.]*/ result = NULL; LogError("invalid arg"); } else { /*Codes_SRS_CONSTBUFFER_02_012: [Otherwise, CONSTBUFFER_GetContent shall return a const CONSTBUFFER* that matches byte by byte the original bytes used to created the const buffer and has the same length.]*/ result = &(constbufferHandle->alias); } return result; } void CONSTBUFFER_Destroy(CONSTBUFFER_HANDLE constbufferHandle) { /*Codes_SRS_CONSTBUFFER_02_015: [If constbufferHandle is NULL then CONSTBUFFER_Destroy shall do nothing.]*/ if (constbufferHandle != NULL) { /*Codes_SRS_CONSTBUFFER_02_016: [Otherwise, CONSTBUFFER_Destroy shall decrement the refcount on the constbufferHandle handle.]*/ if (DEC_REF_VAR(constbufferHandle->count) == DEC_RETURN_ZERO) { /*Codes_SRS_CONSTBUFFER_02_017: [If the refcount reaches zero, then CONSTBUFFER_Destroy shall deallocate all resources used by the CONSTBUFFER_HANDLE.]*/ free(constbufferHandle); } } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/constmap.c000066400000000000000000000203441362133436400321160ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/constmap.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/refcount.h" DEFINE_ENUM_STRINGS(CONSTMAP_RESULT, CONSTMAP_RESULT_VALUES); typedef struct CONSTMAP_HANDLE_DATA_TAG { MAP_HANDLE map; } CONSTMAP_HANDLE_DATA; DEFINE_REFCOUNT_TYPE(CONSTMAP_HANDLE_DATA); #define LOG_CONSTMAP_ERROR(result) LogError("result = %s", ENUM_TO_STRING(CONSTMAP_RESULT, (result))); CONSTMAP_HANDLE ConstMap_Create(MAP_HANDLE sourceMap) { CONSTMAP_HANDLE_DATA* result = REFCOUNT_TYPE_CREATE(CONSTMAP_HANDLE_DATA); if (result == NULL) { LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { /*Codes_SRS_CONSTMAP_17_048: [ConstMap_Create shall accept any non-NULL MAP_HANDLE as input.]*/ /*Codes_SRS_CONSTMAP_17_001: [ConstMap_Create shall create an immutable map, populated by the key, value pairs in the source map.]*/ result->map = Map_Clone(sourceMap); if (result->map == NULL) { LOG_CONSTMAP_ERROR(CONSTMAP_ERROR); REFCOUNT_TYPE_DESTROY(CONSTMAP_HANDLE_DATA, result); /*Codes_SRS_CONSTMAP_17_002: [If during creation there are any errors, then ConstMap_Create shall return NULL.]*/ result = NULL; } } /*Codes_SRS_CONSTMAP_17_003: [Otherwise, it shall return a non-NULL handle that can be used in subsequent calls.]*/ return (CONSTMAP_HANDLE)result; } void ConstMap_Destroy(CONSTMAP_HANDLE handle) { /*Codes_SRS_CONSTMAP_17_005: [If parameter handle is NULL then ConstMap_Destroy shall take no action.]*/ if (handle == NULL) { LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { /*Codes_SRS_CONSTMAP_17_049: [ConstMap_Destroy shall decrement the internal reference count of the immutable map.]*/ if (DEC_REF(CONSTMAP_HANDLE_DATA, handle) == DEC_RETURN_ZERO) { /*Codes_SRS_CONSTMAP_17_004: [If the reference count is zero, ConstMap_Destroy shall release all resources associated with the immutable map.]*/ Map_Destroy(((CONSTMAP_HANDLE_DATA *)handle)->map); REFCOUNT_TYPE_DESTROY(CONSTMAP_HANDLE_DATA, handle); } } } CONSTMAP_HANDLE ConstMap_Clone(CONSTMAP_HANDLE handle) { /*Codes_SRS_CONSTMAP_17_038: [ConstMap_Clone returns NULL if parameter handle is NULL.] */ if (handle == NULL) { LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { /*Codes_SRS_CONSTMAP_17_039: [ConstMap_Clone shall increase the internal reference count of the immutable map indicated by parameter handle]*/ /*Codes_SRS_CONSTMAP_17_050: [ConstMap_Clone shall return the non-NULL handle. ]*/ INC_REF(CONSTMAP_HANDLE_DATA, handle); } return (handle); } static CONSTMAP_RESULT ConstMap_ErrorConvert(MAP_RESULT mapResult) { CONSTMAP_RESULT result; switch (mapResult) { case MAP_OK: result = CONSTMAP_OK; break; case MAP_INVALIDARG: result = CONSTMAP_INVALIDARG; break; case MAP_KEYNOTFOUND: result = CONSTMAP_KEYNOTFOUND; break; default: result = CONSTMAP_ERROR; break; } return result; } MAP_HANDLE ConstMap_CloneWriteable(CONSTMAP_HANDLE handle) { MAP_HANDLE result = NULL; if (handle == NULL) { /*Codes_SRS_CONSTMAP_17_051: [ConstMap_CloneWriteable returns NULL if parameter handle is NULL. ]*/ LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { /*Codes_SRS_CONSTMAP_17_052: [ConstMap_CloneWriteable shall create a new, writeable map, populated by the key, value pairs in the parameter defined by handle.]*/ /*Codes_SRS_CONSTMAP_17_053: [If during cloning, any operation fails, then ConstMap_CloneWriteableap_Clone shall return NULL.]*/ /*Codes_SRS_CONSTMAP_17_054: [Otherwise, ConstMap_CloneWriteable shall return a non-NULL handle that can be used in subsequent calls.]*/ result = Map_Clone(((CONSTMAP_HANDLE_DATA *)handle)->map); } return result; } bool ConstMap_ContainsKey(CONSTMAP_HANDLE handle, const char* key ) { bool keyExists = false; if (handle == NULL) { /*Codes_SRS_CONSTMAP_17_024: [If parameter handle or key are NULL then ConstMap_ContainsKey shall return false.]*/ LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { if (key == NULL) { LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { /*Codes_SRS_CONSTMAP_17_025: [Otherwise if a key exists then ConstMap_ContainsKey shall return true.]*/ MAP_RESULT mapResult = Map_ContainsKey(((CONSTMAP_HANDLE_DATA *)handle)->map, key, &keyExists); if (mapResult != MAP_OK) { /*Codes_SRS_CONSTMAP_17_026: [If a key doesn't exist, then ConstMap_ContainsKey shall return false.]*/ keyExists = false; LOG_CONSTMAP_ERROR(ConstMap_ErrorConvert(mapResult)); } } } return keyExists; } bool ConstMap_ContainsValue(CONSTMAP_HANDLE handle, const char* value) { bool valueExists = false; if (handle == NULL) { /*Codes_SRS_CONSTMAP_17_027: [If parameter handle or value is NULL then ConstMap_ContainsValue shall return false.]*/ LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { if (value == NULL) { LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { /*Codes_SRS_CONSTMAP_17_028: [Otherwise, if a pair has its value equal to the parameter value, the ConstMap_ContainsValue shall return true.]*/ MAP_RESULT mapResult = Map_ContainsValue(((CONSTMAP_HANDLE_DATA *)handle)->map, value, &valueExists); if (mapResult != MAP_OK) { /*Codes_SRS_CONSTMAP_17_029: [Otherwise, if such a does not exist, then ConstMap_ContainsValue shall return false.]*/ LOG_CONSTMAP_ERROR(ConstMap_ErrorConvert(mapResult)); } } } return valueExists; } const char* ConstMap_GetValue(CONSTMAP_HANDLE handle, const char* key) { const char* value = NULL; if (handle == NULL) { /*Codes_SRS_CONSTMAP_17_040: [If parameter handle or key is NULL then ConstMap_GetValue returns NULL.]*/ LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { if (key == NULL) { /*Codes_SRS_CONSTMAP_17_040: [If parameter handle or key is NULL then ConstMap_GetValue returns NULL.]*/ LOG_CONSTMAP_ERROR(CONSTMAP_INVALIDARG); } else { /*Codes_SRS_CONSTMAP_17_041: [If the key is not found, then ConstMap_GetValue returns NULL.]*/ /*Codes_SRS_CONSTMAP_17_042: [Otherwise, ConstMap_GetValue returns the key's value.]*/ value = Map_GetValueFromKey(((CONSTMAP_HANDLE_DATA *)handle)->map, key); } } return value; } CONSTMAP_RESULT ConstMap_GetInternals(CONSTMAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count) { CONSTMAP_RESULT result; if (handle == NULL) { /*Codes_SRS_CONSTMAP_17_046: [If parameter handle, keys, values or count is NULL then ConstMap_GetInternals shall return CONSTMAP_INVALIDARG.]*/ result = CONSTMAP_INVALIDARG; LOG_CONSTMAP_ERROR(result); } else { /*Codes_SRS_CONSTMAP_17_043: [ConstMap_GetInternals shall produce in *keys a pointer to an array of const char* having all the keys stored so far by the map.] *Codes_SRS_CONSTMAP_17_044: [ConstMap_GetInternals shall produce in *values a pointer to an array of const char* having all the values stored so far by the map.] *Codes_SRS_CONSTMAP_17_045: [ ConstMap_GetInternals shall produce in *count the number of stored keys and values.] */ MAP_RESULT mapResult = Map_GetInternals(((CONSTMAP_HANDLE_DATA *)handle)->map, keys, values, count); result = ConstMap_ErrorConvert(mapResult); } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/crt_abstractions.c000066400000000000000000001051171362133436400336400ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define __STDC_WANT_LIB_EXT1__ 1 #include #include #include #include #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/crt_abstractions.h" // VS 2008 does not have INFINITY and all the nice goodies... #if defined (TIZENRT) || defined (WINCE) #define DEFINE_INFINITY 1 #else #if defined _MSC_VER #if _MSC_VER <= 1500 #define DEFINE_INFINITY 1 #endif #endif #endif #if defined DEFINE_INFINITY #pragma warning(disable:4756 4056) // warning C4756: overflow in constant arithmetic // These defines are missing in math.h for WEC2013 SDK #ifndef _HUGE_ENUF #define _HUGE_ENUF 1e+300 // _HUGE_ENUF*_HUGE_ENUF must overflow #endif #define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF)) #define HUGE_VALF ((float)INFINITY) #define HUGE_VALL ((long double)INFINITY) #define NAN ((float)(INFINITY * 0.0F)) #endif #if defined (_MSC_VER) || defined (MINGW_HAS_SECURE_API) #else /*Codes_SRS_CRT_ABSTRACTIONS_99_008: [strcat_s shall append the src to dst and terminates the resulting string with a null character.]*/ int strcat_s(char* dst, size_t dstSizeInBytes, const char* src) { int result; /*Codes_SRS_CRT_ABSTRACTIONS_99_004: [If dst is NULL or unterminated, the error code returned shall be EINVAL & dst shall not be modified.]*/ if (dst == NULL) { result = EINVAL; } /*Codes_SRS_CRT_ABSTRACTIONS_99_005: [If src is NULL, the error code returned shall be EINVAL and dst[0] shall be set to 0.]*/ else if (src == NULL) { dst[0] = '\0'; result = EINVAL; } else { /*Codes_SRS_CRT_ABSTRACTIONS_99_006: [If the dstSizeInBytes is 0 or smaller than the required size for dst & src, the error code returned shall be ERANGE & dst[0] set to 0.]*/ if (dstSizeInBytes == 0) { result = ERANGE; dst[0] = '\0'; } else { size_t dstStrLen = 0; size_t src_len = strlen(src); #ifdef __STDC_LIB_EXT1__ dstStrLen = strnlen_s(dst, dstSizeInBytes); #else size_t i; for(i=0; (i < dstSizeInBytes) && (dst[i]!= '\0'); i++) { } dstStrLen = i; #endif /*Codes_SRS_CRT_ABSTRACTIONS_99_004: [If dst is NULL or unterminated, the error code returned shall be EINVAL & dst shall not be modified.]*/ if (dstSizeInBytes == dstStrLen) /* this means the dst string is not terminated*/ { result = EINVAL; } // If we are instructed to write too much data to the buffer // return ERANGE else if ((src_len + dstStrLen) >= dstSizeInBytes) { dst[0] = '\0'; result = ERANGE; } else { // memcpy should at most copy the result of strlen(src) or there may be // some issues with copying unwanted memory size_t bytes_to_cpy = dstSizeInBytes - dstStrLen; if (bytes_to_cpy > src_len) { bytes_to_cpy = src_len; } /*Codes_SRS_CRT_ABSTRACTIONS_99_009: [The initial character of src shall overwrite the terminating null character of dst.]*/ if (memcpy(&dst[dstStrLen], src, bytes_to_cpy) == NULL) /*Codes_SRS_CRT_ABSTRACTIONS_99_006: [If the dstSizeInBytes is 0 or smaller than the required size for dst & src, the error code returned shall be ERANGE & dst[0] set to 0.]*/ { dst[0] = '\0'; result = ERANGE; } else { /*Codes_SRS_CRT_ABSTRACTIONS_99_003: [strcat_s shall return Zero upon success.]*/ dst[dstStrLen+bytes_to_cpy] = '\0'; result = 0; } } } } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_99_025: [strncpy_s shall copy the first N characters of src to dst, where N is the lesser of MaxCount and the length of src.]*/ int strncpy_s(char* dst, size_t dstSizeInBytes, const char* src, size_t maxCount) { int result; int truncationFlag = 0; /*Codes_SRS_CRT_ABSTRACTIONS_99_020: [If dst is NULL, the error code returned shall be EINVAL and dst shall not be modified.]*/ if (dst == NULL) { result = EINVAL; } /*Codes_SRS_CRT_ABSTRACTIONS_99_021: [If src is NULL, the error code returned shall be EINVAL and dst[0] shall be set to 0.]*/ else if (src == NULL) { dst[0] = '\0'; result = EINVAL; } /*Codes_SRS_CRT_ABSTRACTIONS_99_022: [If the dstSizeInBytes is 0, the error code returned shall be EINVAL and dst shall not be modified.]*/ else if (dstSizeInBytes == 0) { result = EINVAL; } else { size_t srcLength = strlen(src); if (maxCount != _TRUNCATE) { /*Codes_SRS_CRT_ABSTRACTIONS_99_041: [If those N characters will fit within dst (whose size is given as dstSizeInBytes) and still leave room for a null terminator, then those characters shall be copied and a terminating null is appended; otherwise, strDest[0] is set to the null character and ERANGE error code returned.]*/ if (srcLength > maxCount) { srcLength = maxCount; } /*Codes_SRS_CRT_ABSTRACTIONS_99_023: [If dst is not NULL & dstSizeInBytes is smaller than the required size for the src string, the error code returned shall be ERANGE and dst[0] shall be set to 0.]*/ if (srcLength + 1 > dstSizeInBytes) { dst[0] = '\0'; result = ERANGE; } else { (void)memcpy(dst, src, srcLength); dst[srcLength] = '\0'; /*Codes_SRS_CRT_ABSTRACTIONS_99_018: [strncpy_s shall return Zero upon success]*/ result = 0; } } /*Codes_SRS_CRT_ABSTRACTIONS_99_026: [If MaxCount is _TRUNCATE (defined as -1), then as much of src as will fit into dst shall be copied while still leaving room for the terminating null to be appended.]*/ else { if (srcLength + 1 > dstSizeInBytes ) { srcLength = dstSizeInBytes - 1; truncationFlag = 1; } (void)memcpy(dst, src, srcLength); dst[srcLength] = '\0'; result = 0; } } /*Codes_SRS_CRT_ABSTRACTIONS_99_019: [If truncation occurred as a result of the copy, the error code returned shall be STRUNCATE.]*/ if (truncationFlag == 1) { result = STRUNCATE; } return result; } /* Codes_SRS_CRT_ABSTRACTIONS_99_016: [strcpy_s shall copy the contents in the address of src, including the terminating null character, to the location that's specified by dst.]*/ int strcpy_s(char* dst, size_t dstSizeInBytes, const char* src) { int result; /* Codes_SRS_CRT_ABSTRACTIONS_99_012: [If dst is NULL, the error code returned shall be EINVAL & dst shall not be modified.]*/ if (dst == NULL) { result = EINVAL; } /* Codes_SRS_CRT_ABSTRACTIONS_99_013: [If src is NULL, the error code returned shall be EINVAL and dst[0] shall be set to 0.]*/ else if (src == NULL) { dst[0] = '\0'; result = EINVAL; } /* Codes_SRS_CRT_ABSTRACTIONS_99_014: [If the dstSizeInBytes is 0 or smaller than the required size for the src string, the error code returned shall be ERANGE & dst[0] set to 0.]*/ else if (dstSizeInBytes == 0) { dst[0] = '\0'; result = ERANGE; } else { size_t neededBuffer = strlen(src); /* Codes_SRS_CRT_ABSTRACTIONS_99_014: [If the dstSizeInBytes is 0 or smaller than the required size for the src string, the error code returned shall be ERANGE & dst[0] set to 0.]*/ if (neededBuffer + 1 > dstSizeInBytes) { dst[0] = '\0'; result = ERANGE; } else { (void)memcpy(dst, src, neededBuffer + 1); /*Codes_SRS_CRT_ABSTRACTIONS_99_011: [strcpy_s shall return Zero upon success]*/ result = 0; } } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_99_029: [The sprintf_s function shall format and store series of characters and values in dst. Each argument (if any) is converted and output according to the corresponding Format Specification in the format variable.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_99_031: [A null character is appended after the last character written.]*/ int sprintf_s(char* dst, size_t dstSizeInBytes, const char* format, ...) { int result; /*Codes_SRS_CRT_ABSTRACTIONS_99_028: [If dst or format is a null pointer, sprintf_s shall return -1 and set errno to EINVAL]*/ if ((dst == NULL) || (format == NULL)) { errno = EINVAL; result = -1; } else { /*Codes_SRS_CRT_ABSTRACTIONS_99_033: [sprintf_s shall check the format string for valid formatting characters. If the check fails, the function returns -1.]*/ #if defined _MSC_VER #error crt_abstractions is not provided for Microsoft Compilers #else /*not Microsoft compiler... */ #if defined (__STDC_VERSION__) || (__cplusplus) #if ( \ ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) || \ (defined __cplusplus) \ ) /*C99 compiler*/ va_list args; va_start(args, format); /*Codes_SRS_CRT_ABSTRACTIONS_99_027: [sprintf_s shall return the number of characters stored in dst upon success. This number shall not include the terminating null character.]*/ result = vsnprintf(dst, dstSizeInBytes, format, args); va_end(args); /*C99: Thus, the null-terminated output has been completely written if and only if the returned value is nonnegative and less than n*/ if (result < 0) { result = -1; } else if ((size_t)result >= dstSizeInBytes) { /*Codes_SRS_CRT_ABSTRACTIONS_99_034: [If the dst buffer is too small for the text being printed, then dst is set to an empty string and the function shall return -1.]*/ dst[0] = '\0'; result = -1; } else { /*do nothing, all is fine*/ } #else #error STDC_VERSION defined, but of unknown value; unable to sprinf_s, or provide own implementation #endif #else #error for STDC_VERSION undefined (assumed C89), provide own implementation of sprintf_s #endif #endif } return result; } #endif /* _MSC_VER || MINGW_HAS_SECURE_API */ /*Codes_SRS_CRT_ABSTRACTIONS_21_006: [The strtoull_s must use the letters from a(or A) through z(or Z) to represent the numbers between 10 to 35.]*/ /* returns the integer value that correspond to the character 'c'. If the character is invalid, it returns -1. */ #define DIGIT_VAL(c) (((c>='0') && (c<='9')) ? (c-'0') : ((c>='a') && (c<='z')) ? (c-'a'+10) : ((c>='A') && (c<='Z')) ? (c-'A'+10) : -1) #define IN_BASE_RANGE(d, b) ((d >= 0) && (d < b)) /*Codes_SRS_CRT_ABSTRACTIONS_21_010: [The white-space must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ #define IS_SPACE(c) (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') /*Codes_SRS_CRT_ABSTRACTIONS_21_001: [The strtoull_s must convert the initial portion of the string pointed to by nptr to unsigned long long int representation.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_002: [The strtoull_s must resembling an integer represented in some radix determined by the value of base.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_003: [The strtoull_s must return the integer that represents the value in the initial part of the string. If any.]*/ unsigned long long strtoull_s(const char* nptr, char** endptr, int base) { unsigned long long result = 0ULL; bool validStr = true; char* runner = (char*)nptr; bool isNegative = false; int digitVal; /*Codes_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_012: [If the subject sequence is empty or does not have the expected form, the strtoull_s must not perform any conversion; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_013: [If no conversion could be performed, the strtoull_s returns the value 0L.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_035: [If the nptr is NULL, the strtoull_s must **not** perform any conversion and must returns 0L; endptr must receive NULL, provided that endptr is not a NULL pointer.]*/ if (((base >= 2) || (base == 0)) && (base <= 36) && (runner != NULL)) { /*Codes_SRS_CRT_ABSTRACTIONS_21_011: [The valid sequence starts after the first non-white-space character, followed by an optional positive or negative sign, a number or a letter(depending of the base).]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_010: [The white-space must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ while (IS_SPACE(*runner)) { runner++; } if ((*runner) == '+') { runner++; } else if ((*runner) == '-') { /*Codes_SRS_CRT_ABSTRACTIONS_21_038: [If the subject sequence starts with a negative sign, the strtoull_s will convert it to the posive representation of the negative value.]*/ isNegative = true; runner++; } if ((*runner) == '0') { if ((*(runner+1) == 'x') || (*(runner+1) == 'X')) { /*Codes_SRS_CRT_ABSTRACTIONS_21_008: [If the base is 0 and '0x' or '0X' precedes the number, strtoull_s must convert to a hexadecimal (base 16).]*/ /* hexadecimal... */ if ((base == 0) || (base == 16)) { base = 16; runner += 2; } } else if((base == 0) || (base == 8)) { /*Codes_SRS_CRT_ABSTRACTIONS_21_009: [If the base is 0 and '0' precedes the number, strtoull_s must convert to an octal (base 8).]*/ /* octal... */ base = 8; runner++; } } if(base == 0) { /*Codes_SRS_CRT_ABSTRACTIONS_21_007: [If the base is 0 and no special chars precedes the number, strtoull_s must convert to a decimal (base 10).]*/ /* decimal... */ base = 10; } digitVal = DIGIT_VAL(*runner); if (validStr && IN_BASE_RANGE(digitVal, base)) { errno = 0; do { if (((ULLONG_MAX - digitVal) / base) < result) { /*Codes_SRS_CRT_ABSTRACTIONS_21_014: [If the correct value is outside the range, the strtoull_s returns the value ULLONG_MAX, and errno will receive the value ERANGE.]*/ /* overflow... */ result = ULLONG_MAX; errno = ERANGE; } else { result = result * base + digitVal; } runner++; digitVal = DIGIT_VAL(*runner); } while (IN_BASE_RANGE(digitVal, base)); } else { runner = (char*)nptr; } } /*Codes_SRS_CRT_ABSTRACTIONS_21_004: [The strtoull_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ if (endptr != NULL) { (*endptr) = (char*)runner; } /*Codes_SRS_CRT_ABSTRACTIONS_21_038: [If the subject sequence starts with a negative sign, the strtoull_s will convert it to the posive representation of the negative value.]*/ if (isNegative) { result = ULLONG_MAX - result + 1; } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_033: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtold_s must return the INFINITY value for long double.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_034: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtold_s must return 0.0 and points endptr to the first character after the 'NAN' sequence.]*/ static int substricmp(const char* nptr, const char* subsrt) { int result = 0; while (((*subsrt) != '\0') && (result == 0)) { result = TOUPPER(*nptr) - TOUPPER(*subsrt); nptr++; subsrt++; } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_033: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtold_s must return the INFINITY value for long double.]*/ static bool isInfinity(const char** endptr) { bool result = false; if (substricmp((*endptr), "INF") == 0) { (*endptr) += 3; result = true; if (substricmp((*endptr), "INITY") == 0) { (*endptr) += 5; } } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_034: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtold_s must return 0.0 and points endptr to the first character after the 'NAN' sequence.]*/ static bool isNaN(const char** endptr) { const char* runner = (*endptr); bool result = false; if (substricmp(runner, "NAN") == 0) { runner += 3; result = true; if ((*runner) == '(') { do { runner++; } while (((*runner) != '\0') && ((*runner) != ')')); if ((*runner) == ')') runner++; else result = false; } } if (result) (*endptr) = runner; return result; } #define FLOAT_STRING_TYPE_VALUES \ FST_INFINITY, \ FST_NAN, \ FST_NUMBER, \ FST_OVERFLOW, \ FST_ERROR DEFINE_ENUM(FLOAT_STRING_TYPE, FLOAT_STRING_TYPE_VALUES); static FLOAT_STRING_TYPE splitFloatString(const char* nptr, char** endptr, int *signal, double *fraction, int *exponential) { FLOAT_STRING_TYPE result = FST_ERROR; unsigned long long ullInteger = 0; unsigned long long ullFraction = 0; int integerSize = 0; int fractionSize = 0; char* startptr; (*endptr) = (char*)nptr; /*Codes_SRS_CRT_ABSTRACTIONS_21_018: [The white-space for strtof_s must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_028: [The white-space for strtold_s must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ while (IS_SPACE(**endptr)) { (*endptr)++; } /*Codes_SRS_CRT_ABSTRACTIONS_21_019: [The valid sequence for strtof_s starts after the first non-white - space character, followed by an optional positive or negative sign, a number, 'INF', or 'NAN' (ignoring case).]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_029: [The valid sequence for strtold_s starts after the first non-white - space character, followed by an optional positive or negative sign, a number, 'INF', or 'NAN' (ignoring case).]*/ (*signal) = +1; if ((**endptr) == '+') { (*endptr)++; } else if ((**endptr) == '-') { (*signal) = -1; (*endptr)++; } /*Codes_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_033: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtold_s must return the INFINITY value for long double.]*/ if (isInfinity((const char**)endptr)) { result = FST_INFINITY; } /*Codes_SRS_CRT_ABSTRACTIONS_21_034: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtold_s must return 0.0 and points endptr to the first character after the 'NAN' sequence.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ else if (isNaN((const char**)endptr)) { result = FST_NAN; } else if (IN_BASE_RANGE(DIGIT_VAL(**endptr), 10)) { result = FST_NUMBER; startptr = *endptr; /* integers will go to the fraction and exponential. */ ullInteger = strtoull_s(startptr, endptr, 10); integerSize = (int)((*endptr) - startptr); if ((ullInteger == ULLONG_MAX) && (errno != 0)) { result = FST_OVERFLOW; } /* get the real fraction part, if exist. */ if ((**endptr) == '.') { startptr = (*endptr) + 1; ullFraction = strtoull_s(startptr, endptr, 10); fractionSize = (int)((*endptr) - startptr); if ((ullFraction == ULLONG_MAX) && (errno != 0)) { result = FST_OVERFLOW; } } if (((**endptr) == 'e') || ((**endptr) == 'E')) { startptr = (*endptr) + 1; (*exponential) = (int)strtol(startptr, endptr, 10); if (((*exponential) < (DBL_MAX_10_EXP * (-1))) || ((*exponential) > DBL_MAX_10_EXP)) { result = FST_OVERFLOW; } } else { (*exponential) = 0; } if (result == FST_NUMBER) { /* Add ullInteger to ullFraction. */ ullFraction += (ullInteger * (unsigned long long)(pow(10, (double)fractionSize))); (*fraction) = ((double)ullFraction / (pow(10.0f, (double)(fractionSize + integerSize - 1)))); /* Unify rest of integerSize and fractionSize in the exponential. */ (*exponential) += integerSize - 1; } } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_21_015: [The strtof_s must convert the initial portion of the string pointed to by nptr to float representation.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ float strtof_s(const char* nptr, char** endptr) { int signal = 1; double fraction; int exponential; char* runner = (char*)nptr; double val; /*Codes_SRS_CRT_ABSTRACTIONS_21_021: [If no conversion could be performed, the strtof_s returns the value 0.0.]*/ float result = 0.0; /*Codes_SRS_CRT_ABSTRACTIONS_21_036: [**If the nptr is NULL, the strtof_s must not perform any conversion and must returns 0.0f; endptr must receive NULL, provided that endptr is not a NULL pointer.]*/ if (nptr != NULL) { switch (splitFloatString(nptr, &runner, &signal, &fraction, &exponential)) { case FST_INFINITY: /*Codes_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ result = INFINITY * (signal); errno = 0; break; case FST_NAN: /*Codes_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ result = NAN; break; case FST_NUMBER: val = fraction * pow(10.0, (double)exponential) * (double)signal; if ((val >= (FLT_MAX * (-1))) && (val <= FLT_MAX)) { /*Codes_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ result = (float)val; } else { /*Codes_SRS_CRT_ABSTRACTIONS_21_022: [If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE.]*/ result = HUGE_VALF * (signal); errno = ERANGE; } break; case FST_OVERFLOW: /*Codes_SRS_CRT_ABSTRACTIONS_21_022: [If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE.]*/ result = HUGE_VALF * (signal); errno = ERANGE; break; default: /*Codes_SRS_CRT_ABSTRACTIONS_21_020: [If the subject sequence is empty or does not have the expected form, the strtof_s must not perform any conversion and must returns 0.0f; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ runner = (char*)nptr; break; } } /*Codes_SRS_CRT_ABSTRACTIONS_21_017: [The strtof_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ if (endptr != NULL) { (*endptr) = runner; } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_21_025: [The strtold_s must convert the initial portion of the string pointed to by nptr to long double representation.]*/ /*Codes_SRS_CRT_ABSTRACTIONS_21_026: [The strtold_s must return the long double that represents the value in the initial part of the string. If any.]*/ long double strtold_s(const char* nptr, char** endptr) { int signal = 1; double fraction; int exponential; char* runner = (char*)nptr; /*Codes_SRS_CRT_ABSTRACTIONS_21_031: [If no conversion could be performed, the strtold_s returns the value 0.0.]*/ long double result = 0.0; /*Codes_SRS_CRT_ABSTRACTIONS_21_037: [If the nptr is NULL, the strtold_s must not perform any conversion and must returns 0.0; endptr must receive NULL, provided that endptr is not a NULL pointer.]*/ if (nptr != NULL) { switch (splitFloatString(nptr, &runner, &signal, &fraction, &exponential)) { case FST_INFINITY: /*Codes_SRS_CRT_ABSTRACTIONS_21_033: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtold_s must return the INFINITY value for long double.]*/ result = INFINITY * (signal); errno = 0; break; case FST_NAN: /*Codes_SRS_CRT_ABSTRACTIONS_21_034: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtold_s must return 0.0 and points endptr to the first character after the 'NAN' sequence.]*/ result = NAN; break; case FST_NUMBER: if ((exponential != DBL_MAX_10_EXP || (fraction <= 1.7976931348623158)) && (exponential != (DBL_MAX_10_EXP * (-1)) || (fraction <= 2.2250738585072014))) { /*Codes_SRS_CRT_ABSTRACTIONS_21_026: [The strtold_s must return the long double that represents the value in the initial part of the string. If any.]*/ result = fraction * pow(10.0, (double)exponential) * (double)signal; } else { /*Codes_SRS_CRT_ABSTRACTIONS_21_032: [If the correct value is outside the range, the strtold_s returns the value plus or minus HUGE_VALL, and errno will receive the value ERANGE.]*/ result = HUGE_VALF * (signal); errno = ERANGE; } break; case FST_OVERFLOW: /*Codes_SRS_CRT_ABSTRACTIONS_21_032: [If the correct value is outside the range, the strtold_s returns the value plus or minus HUGE_VALL, and errno will receive the value ERANGE.]*/ result = HUGE_VALF * (signal); errno = ERANGE; break; default: /*Codes_SRS_CRT_ABSTRACTIONS_21_030: [If the subject sequence is empty or does not have the expected form, the strtold_s must not perform any conversion and must returns 0.0; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ runner = (char*)nptr; break; } } /*Codes_SRS_CRT_ABSTRACTIONS_21_027: [The strtold_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ if (endptr != NULL) { (*endptr) = runner; } return result; } /*Codes_SRS_CRT_ABSTRACTIONS_99_038: [mallocAndstrcpy_s shall allocate memory for destination buffer to fit the string in the source parameter.]*/ int mallocAndStrcpy_s(char** destination, const char* source) { int result; int copied_result; /*Codes_SRS_CRT_ABSTRACTIONS_99_036: [destination parameter or source parameter is NULL, the error code returned shall be EINVAL and destination shall not be modified.]*/ if ((destination == NULL) || (source == NULL)) { /*If strDestination or strSource is a NULL pointer[...]these functions return EINVAL */ result = EINVAL; } else { size_t l = strlen(source); char* temp = (char*)malloc(l + 1); /*Codes_SRS_CRT_ABSTRACTIONS_99_037: [Upon failure to allocate memory for the destination, the function will return ENOMEM.]*/ if (temp == NULL) { result = ENOMEM; } else { *destination = temp; /*Codes_SRS_CRT_ABSTRACTIONS_99_039: [mallocAndstrcpy_s shall copy the contents in the address source, including the terminating null character into location specified by the destination pointer after the memory allocation.]*/ copied_result = strcpy_s(*destination, l + 1, source); if (copied_result < 0) /*strcpy_s error*/ { free(*destination); *destination = NULL; result = copied_result; } else { /*Codes_SRS_CRT_ABSTRACTIONS_99_035: [mallocAndstrcpy_s shall return Zero upon success]*/ result = 0; } } } return result; } /*takes "value" and transforms it into a decimal string*/ /*10 => "10"*/ /*return 0 when everything went ok*/ /*Codes_SRS_CRT_ABSTRACTIONS_02_001: [unsignedIntToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ int unsignedIntToString(char* destination, size_t destinationSize, unsigned int value) { int result; size_t pos; /*the below loop gets the number in reverse order*/ /*Codes_SRS_CRT_ABSTRACTIONS_02_003: [If destination is NULL then unsignedIntToString shall fail.] */ /*Codes_SRS_CRT_ABSTRACTIONS_02_002: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and unsignedIntToString shall fail.] */ if ( (destination == NULL) || (destinationSize < 2) /*because the smallest number is '0\0' which requires 2 characters*/ ) { result = __FAILURE__; } else { pos = 0; do { destination[pos++] = '0' + (value % 10); value /= 10; } while ((value > 0) && (pos < (destinationSize-1))); if (value == 0) { size_t w; destination[pos] = '\0'; /*all converted and they fit*/ for (w = 0; w <= (pos-1) >> 1; w++) { char temp; temp = destination[w]; destination[w] = destination[pos - 1 - w]; destination[pos -1 - w] = temp; } /*Codes_SRS_CRT_ABSTRACTIONS_02_004: [If the conversion has been successfull then unsignedIntToString shall return 0.] */ result = 0; } else { /*Codes_SRS_CRT_ABSTRACTIONS_02_002: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and unsignedIntToString shall fail.] */ result = __FAILURE__; } } return result; } /*takes "value" and transforms it into a decimal string*/ /*10 => "10"*/ /*return 0 when everything went ok*/ /*Codes_SRS_CRT_ABSTRACTIONS_02_001: [unsignedIntToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ int size_tToString(char* destination, size_t destinationSize, size_t value) { int result; size_t pos; /*the below loop gets the number in reverse order*/ /*Codes_SRS_CRT_ABSTRACTIONS_02_003: [If destination is NULL then unsignedIntToString shall fail.] */ /*Codes_SRS_CRT_ABSTRACTIONS_02_002: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and unsignedIntToString shall fail.] */ if ( (destination == NULL) || (destinationSize < 2) /*because the smallest number is '0\0' which requires 2 characters*/ ) { result = __FAILURE__; } else { pos = 0; do { destination[pos++] = '0' + (value % 10); value /= 10; } while ((value > 0) && (pos < (destinationSize - 1))); if (value == 0) { size_t w; destination[pos] = '\0'; /*all converted and they fit*/ for (w = 0; w <= (pos - 1) >> 1; w++) { char temp; temp = destination[w]; destination[w] = destination[pos - 1 - w]; destination[pos - 1 - w] = temp; } /*Codes_SRS_CRT_ABSTRACTIONS_02_004: [If the conversion has been successfull then unsignedIntToString shall return 0.] */ result = 0; } else { /*Codes_SRS_CRT_ABSTRACTIONS_02_002: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and unsignedIntToString shall fail.] */ result = __FAILURE__; } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/doublylinkedlist.c000066400000000000000000000062421362133436400336540ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/doublylinkedlist.h" void DList_InitializeListHead( PDLIST_ENTRY ListHead ) { /* Codes_SRS_DLIST_06_005: [DList_InitializeListHead will initialize the Flink & Blink to the address of the DLIST_ENTRY.] */ ListHead->Flink = ListHead->Blink = ListHead; return; } int DList_IsListEmpty( const PDLIST_ENTRY ListHead ) { /* Codes_SRS_DLIST_06_003: [DList_IsListEmpty shall return a non-zero value if there are no DLIST_ENTRY's on this list other than the list head.] */ /* Codes_SRS_DLIST_06_004: [DList_IsListEmpty shall return 0 if there is one or more items in the list.] */ return (ListHead->Flink == ListHead); } int DList_RemoveEntryList( PDLIST_ENTRY Entry ) { /* Codes_SRS_DLIST_06_008: [DList_RemoveEntryList shall remove a listEntry from whatever list it is properly part of.] */ /* Codes_SRS_DLIST_06_009: [The remaining list is properly formed.] */ /* Codes_SRS_DLIST_06_010: [DList_RemoveEntryList shall return non-zero if the remaining list is empty.] */ /* Codes_SRS_DLIST_06_011: [DList_RemoveEntryList shall return zero if the remaining list is NOT empty.] */ PDLIST_ENTRY Blink; PDLIST_ENTRY Flink; Flink = Entry->Flink; Blink = Entry->Blink; Blink->Flink = Flink; Flink->Blink = Blink; return (Flink == Blink); } PDLIST_ENTRY DList_RemoveHeadList( PDLIST_ENTRY ListHead ) { /* Codes_SRS_DLIST_06_012: [DList_RemoveHeadList removes the oldest entry from the list defined by the listHead parameter and returns a pointer to that entry.] */ /* Codes_SRS_DLIST_06_013: [DList_RemoveHeadList shall return listHead if that's the only item in the list.] */ PDLIST_ENTRY Flink; PDLIST_ENTRY Entry; Entry = ListHead->Flink; Flink = Entry->Flink; ListHead->Flink = Flink; Flink->Blink = ListHead; return Entry; } void DList_InsertTailList( PDLIST_ENTRY ListHead, PDLIST_ENTRY Entry ) { PDLIST_ENTRY Blink; /* Codes_SRS_DLIST_06_006: [DListInsertTailList shall place the DLIST_ENTRY at the end of the list defined by the listHead parameter.] */ Blink = ListHead->Blink; Entry->Flink = ListHead; Entry->Blink = Blink; Blink->Flink = Entry; ListHead->Blink = Entry; return; } void DList_AppendTailList( PDLIST_ENTRY ListHead, PDLIST_ENTRY ListToAppend ) { /* Codes_SRS_DLIST_06_007: [DList_AppendTailList shall place the list defined by listToAppend at the end of the list defined by the listHead parameter.] */ PDLIST_ENTRY ListEnd = ListHead->Blink; ListHead->Blink->Flink = ListToAppend; ListHead->Blink = ListToAppend->Blink; ListToAppend->Blink->Flink = ListHead; ListToAppend->Blink = ListEnd; return; } /*Codes_SRS_DLIST_02_002: [DList_InsertHeadList inserts a singular entry in the list having as head listHead after "head".]*/ void DList_InsertHeadList(PDLIST_ENTRY listHead, PDLIST_ENTRY entry) { entry->Blink = listHead; entry->Flink = listHead->Flink; listHead->Flink->Blink = entry; listHead->Flink = entry; } etw_provider_generate.cmd000066400000000000000000000014161362133436400351160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src@echo off REM this file generates the code needed for the ETW provider that acts as a logger REM following are hints about modifying the ETW provider REM 1) to change the provider, type ecmangen etwlogger.man in a Visual Studio developer command prompt. REM 2) to add the provider to the system, administrative privileges are needed. type "wevtutil im block_storage_etw.man /rf:"d:\etw01_folder\ETW01.exe" /mf:"d:\etw01_folder\ETW01.exe". It will not work without full path name. REM a) errors might be due to user rights on the .exe, make sure that LocalService account has access right to the file. REM 3) Event Viewer will list the ETW provider under "Application and Service Logs -> Microsoft-ServiceBus" mc -um -h ../inc/azure_c_shared_utility -r ../res -v etwlogger.manazure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/etwlogger.man000066400000000000000000000161151362133436400326230ustar00rootroot00000000000000 azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/etwlogger_driver.c000066400000000000000000000162201362133436400336420ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "windows.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/etwlogger.h" /*returns a string as if printed by vprintf*/ static char* vprintf_alloc(const char* format, va_list va) { char* result; int neededSize = vsnprintf(NULL, 0, format, va); if (neededSize < 0) { result = NULL; } else { result = (char*)malloc(neededSize + 1); if (result == NULL) { /*return as is*/ } else { if (vsnprintf(result, neededSize + 1, format, va) != neededSize) { free(result); result = NULL; } } } return result; } /*returns a string as if printed by printf*/ static char* printf_alloc(const char* format, ...) { char* result; va_list va; va_start(va, format); result = vprintf_alloc(format, va); va_end(va); return result; } /*returns NULL if it fails*/ static char* lastErrorToString(DWORD lastError) { char* result; if (lastError == 0) { result = printf_alloc(""); /*no error should appear*/ if (result == NULL) { (void)printf("failure in printf_alloc"); } else { /*return as is*/ } } else { char temp[MESSAGE_BUFFER_SIZE]; if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, lastError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), temp, MESSAGE_BUFFER_SIZE, NULL) == 0) { result = printf_alloc("GetLastError()=0X%x", lastError); if (result == NULL) { (void)printf("failure in printf_alloc\n"); /*return as is*/ } else { /*return as is*/ } } else { /*eliminate the \r or \n from the string*/ /*one replace of each is enough*/ char* whereAreThey; if ((whereAreThey = strchr(temp, '\r')) != NULL) { *whereAreThey = '\0'; } if ((whereAreThey = strchr(temp, '\n')) != NULL) { *whereAreThey = '\0'; } result = printf_alloc("GetLastError()==0X%x (%s)", lastError, temp); if (result == NULL) { (void)printf("failure in printf_alloc\n"); /*return as is*/ } else { /*return as is*/ } } } return result; } static int isETWLoggerInit = 0; static void lazyRegisterEventProvider(void) { /*lazily init the logger*/ if (isETWLoggerInit == 0) { if (EventRegisterMicrosoft_ServiceBus() != ERROR_SUCCESS) { /*go back to printf, maybe somebody notices*/ (void)printf("failure in EventRegisterMicrosoft_ServiceBus"); } else { /*should check if the provider is registered with the system... maybe at a later time*/ isETWLoggerInit = 1; /*and stays 1 until the process exits*/ /*sorry, no graceful exit with EventUnregisterMicrosoft_ServiceBus*/ LogInfo("EventRegisterMicrosoft_ServiceBus success"); /*selflogging that the log service has started*/ } } } /*the function will also attempt to produce some human readable strings for GetLastError*/ void etwlogger_log_with_GetLastError(const char* file, const char* func, int line, const char* format, ...) { DWORD lastError; char* lastErrorAsString; lastError = GetLastError(); /*needs to be done before lazRegistedEventProvider*/ lazyRegisterEventProvider(); va_list args; va_start(args, format); SYSTEMTIME t; GetSystemTime(&t); lastErrorAsString = lastErrorToString(lastError); if (lastErrorAsString == NULL) { char* userMessage = vprintf_alloc(format, args); if (userMessage == NULL) { if (EventWriteLogErrorEvent("unable to print user error or last error", file, &t, func, line) != ERROR_SUCCESS) { (void)printf("failure in EventWriteLogErrorEvent"); } } else { if (EventWriteLogErrorEvent(userMessage, file, &t, func, line) != ERROR_SUCCESS) { (void)printf("failure in EventWriteLogErrorEvent"); } free(userMessage); } } else { char* userMessage = vprintf_alloc(format, args); if (userMessage == NULL) { if (EventWriteLogErrorEvent(lastErrorAsString, file, &t, func, line) != ERROR_SUCCESS) { (void)printf("failure in EventWriteLogErrorEvent"); } } else { if (EventWriteLogLastError(userMessage, file, &t, func, line, lastErrorAsString) != ERROR_SUCCESS) { (void)printf("failure in EventWriteLogErrorEvent"); } free(userMessage); } free(lastErrorAsString); } va_end(args); } void etwlogger_log(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...) { (void)options; lazyRegisterEventProvider(); va_list args; va_start(args, format); char* text = vprintf_alloc(format, args); if (text == NULL) { switch (log_category) { case AZ_LOG_INFO: if (EventWriteLogInfoEvent("INTERNAL LOGGING ERROR: failed in vprintf_alloc") != ERROR_SUCCESS) { /*fallback on printf...*/ (void)printf("failed in EventWriteLogInfoEvent"); } break; case AZ_LOG_ERROR: { SYSTEMTIME t; GetSystemTime(&t); if (EventWriteLogErrorEvent("INTERNAL LOGGING ERROR: failed in vprintf_alloc", file, &t, func, line) != ERROR_SUCCESS) { /*fallback on printf...*/ (void)printf("failed in EventWriteLogErrorEvent"); } break; } default: break; } } else { switch (log_category) { case AZ_LOG_INFO: if (EventWriteLogInfoEvent(text) != ERROR_SUCCESS) { /*fallback on printf...*/ (void)printf("failed in EventWriteLogInfoEvent"); } break; case AZ_LOG_ERROR: { SYSTEMTIME t; GetSystemTime(&t); if (EventWriteLogErrorEvent(text, file, &t, func, line) != ERROR_SUCCESS) { /*fallback on printf...*/ (void)printf("failed in EventWriteLogErrorEvent"); } break; } default: break; } free(text); } va_end(args); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/etwxlogging.c000066400000000000000000000020011362133436400326160ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/xlogging.h" #include "windows.h" #include "azure_c_shared_utility/etwlogger_driver.h" #ifndef NO_LOGGING #ifdef WINCE #error not supported for WinCE. #endif #ifndef _MSC_VER #error only supported on Windows #endif static LOGGER_LOG global_log_function = etwlogger_log; void xlogging_set_log_function(LOGGER_LOG log_function) { global_log_function = log_function; } LOGGER_LOG xlogging_get_log_function(void) { return global_log_function; } LOGGER_LOG_GETLASTERROR global_log_function_GetLastError = etwlogger_log_with_GetLastError; void xlogging_set_log_function_GetLastError(LOGGER_LOG_GETLASTERROR log_function_GetLastError) { global_log_function_GetLastError = log_function_GetLastError; } LOGGER_LOG_GETLASTERROR xlogging_get_log_function_GetLastError(void) { return global_log_function_GetLastError; } #endif azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/gb_rand.c000066400000000000000000000005071362133436400316650ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "azure_c_shared_utility/gb_rand.h" /*this is rand*/ int gb_rand(void) { return rand(); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/gb_stdio.c000066400000000000000000000027121362133436400320630ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*depending if the symbol GB_STDIO_INTERCEPT is defined, this file does the following a) if GB_STDIO_INTERCEPT is NOT defined, then the file shall be empty (almost:) b) if GB_STDIO_INTERCEPT is defined, then the file shall call to the 'real' stdio.h functions from their gb_* synonyms*/ #ifdef _MSC_VER /* compiler warning C4206: nonstandard extension used: translation unit is empty */ /* linker warning 4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library */ const int avoid_warnings_B9EB480E_6AE7_43B3_9249_47993776BA7B = 0; #endif #ifdef GB_STDIO_INTERCEPT #ifdef __cplusplus #include #include #else #include #include #endif #include "azure_c_shared_utility/gb_stdio.h" /*this is fopen*/ FILE *gb_fopen(const char * filename, const char * mode) { return fopen(filename, mode); } int gb_fclose(FILE *stream) { return fclose(stream); } int gb_fseek(FILE *stream, long int offset, int whence) { return fseek(stream, offset, whence); } long int gb_ftell(FILE *stream) { return ftell(stream); } int fprintf(FILE * stream, const char * format, ...) { va_list args; va_start(args, format); vfprintf(stream, format, args); va_end(args); } #endif azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/gb_time.c000066400000000000000000000023621362133436400317000ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*depending if the symbol GB_TIME_INTERCEPT is defined, this file does the following a) if GB_TIME_INTERCEPT is NOT defined, then the file shall be empty (almost:) b) if GB_TIME_INTERCEPT is defined, then the file shall call to the 'real' time.h functions from their gb_* synonyms*/ #ifdef _MSC_VER /* compiler warning C4206: nonstandard extension used: translation unit is empty */ /* linker warning 4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library */ const int avoid_warnings_0CA668EF_F2C4_49A8_A30D_7257C67173A4 = 0; #endif #ifdef GB_TIME_INTERCEPT #ifdef __cplusplus #include #else #include #endif #include "azure_c_shared_utility/gb_time.h" /*this is time*/ time_t gb_time(time_t *timer); { return time(timer); } /*this is localtime*/ struct tm *gb_localtime(const time_t *timer) { return gb_localtime(timer); } size_t gb_strftime(char * s, size_t maxsize, const char * format, const struct tm * timeptr) { return strftime(s, maxsize, format, timeptr); } #endif azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/gballoc.c000077500000000000000000000365111362133436400317030ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #ifndef GB_USE_CUSTOM_HEAP #ifndef SIZE_MAX #define SIZE_MAX ((size_t)~(size_t)0) #endif typedef struct ALLOCATION_TAG { size_t size; void* ptr; void* next; } ALLOCATION; typedef enum GBALLOC_STATE_TAG { GBALLOC_STATE_INIT, GBALLOC_STATE_NOT_INIT } GBALLOC_STATE; static ALLOCATION* head = NULL; static size_t totalSize = 0; static size_t maxSize = 0; static size_t g_allocations = 0; static GBALLOC_STATE gballocState = GBALLOC_STATE_NOT_INIT; static LOCK_HANDLE gballocThreadSafeLock = NULL; int gballoc_init(void) { int result; if (gballocState != GBALLOC_STATE_NOT_INIT) { /* Codes_SRS_GBALLOC_01_025: [Init after Init shall fail and return a non-zero value.] */ result = __FAILURE__; } /* Codes_SRS_GBALLOC_01_026: [gballoc_Init shall create a lock handle that will be used to make the other gballoc APIs thread-safe.] */ else if ((gballocThreadSafeLock = Lock_Init()) == NULL) { /* Codes_SRS_GBALLOC_01_027: [If the Lock creation fails, gballoc_init shall return a non-zero value.]*/ result = __FAILURE__; } else { gballocState = GBALLOC_STATE_INIT; /* Codes_ SRS_GBALLOC_01_002: [Upon initialization the total memory used and maximum total memory used tracked by the module shall be set to 0.] */ totalSize = 0; maxSize = 0; g_allocations = 0; /* Codes_SRS_GBALLOC_01_024: [gballoc_init shall initialize the gballoc module and return 0 upon success.] */ result = 0; } return result; } void gballoc_deinit(void) { if (gballocState == GBALLOC_STATE_INIT) { /* Codes_SRS_GBALLOC_01_028: [gballoc_deinit shall free all resources allocated by gballoc_init.] */ (void)Lock_Deinit(gballocThreadSafeLock); } gballocState = GBALLOC_STATE_NOT_INIT; } void* gballoc_malloc(size_t size) { void* result; if (gballocState != GBALLOC_STATE_INIT) { /* Codes_SRS_GBALLOC_01_039: [If gballoc was not initialized gballoc_malloc shall simply call malloc without any memory tracking being performed.] */ result = malloc(size); } /* Codes_SRS_GBALLOC_01_030: [gballoc_malloc shall ensure thread safety by using the lock created by gballoc_Init.] */ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_01_048: [If acquiring the lock fails, gballoc_malloc shall return NULL.] */ LogError("Failed to get the Lock."); result = NULL; } else { ALLOCATION* allocation = (ALLOCATION*)malloc(sizeof(ALLOCATION)); if (allocation == NULL) { result = NULL; } else { /* Codes_SRS_GBALLOC_01_003: [gb_malloc shall call the C99 malloc function and return its result.] */ result = malloc(size); if (result == NULL) { /* Codes_SRS_GBALLOC_01_012: [When the underlying malloc call fails, gballoc_malloc shall return NULL and size should not be counted towards total memory used.] */ free(allocation); } else { /* Codes_SRS_GBALLOC_01_004: [If the underlying malloc call is successful, gb_malloc shall increment the total memory used with the amount indicated by size.] */ allocation->ptr = result; allocation->size = size; allocation->next = head; head = allocation; g_allocations++; totalSize += size; /* Codes_SRS_GBALLOC_01_011: [The maximum total memory used shall be the maximum of the total memory used at any point.] */ if (maxSize < totalSize) { maxSize = totalSize; } } } (void)Unlock(gballocThreadSafeLock); } return result; } void* gballoc_calloc(size_t nmemb, size_t size) { void* result; if (gballocState != GBALLOC_STATE_INIT) { /* Codes_SRS_GBALLOC_01_040: [If gballoc was not initialized gballoc_calloc shall simply call calloc without any memory tracking being performed.] */ result = calloc(nmemb, size); } /* Codes_SRS_GBALLOC_01_031: [gballoc_calloc shall ensure thread safety by using the lock created by gballoc_Init] */ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_01_046: [If acquiring the lock fails, gballoc_calloc shall return NULL.] */ LogError("Failed to get the Lock."); result = NULL; } else { ALLOCATION* allocation = (ALLOCATION*)malloc(sizeof(ALLOCATION)); if (allocation == NULL) { result = NULL; } else { /* Codes_SRS_GBALLOC_01_020: [gballoc_calloc shall call the C99 calloc function and return its result.] */ result = calloc(nmemb, size); if (result == NULL) { /* Codes_SRS_GBALLOC_01_022: [When the underlying calloc call fails, gballoc_calloc shall return NULL and size should not be counted towards total memory used.] */ free(allocation); } else { /* Codes_SRS_GBALLOC_01_021: [If the underlying calloc call is successful, gballoc_calloc shall increment the total memory used with nmemb*size.] */ allocation->ptr = result; allocation->size = nmemb * size; allocation->next = head; head = allocation; g_allocations++; totalSize += allocation->size; /* Codes_SRS_GBALLOC_01_011: [The maximum total memory used shall be the maximum of the total memory used at any point.] */ if (maxSize < totalSize) { maxSize = totalSize; } } } (void)Unlock(gballocThreadSafeLock); } return result; } void* gballoc_realloc(void* ptr, size_t size) { ALLOCATION* curr; void* result; ALLOCATION* allocation = NULL; if (gballocState != GBALLOC_STATE_INIT) { /* Codes_SRS_GBALLOC_01_041: [If gballoc was not initialized gballoc_realloc shall shall simply call realloc without any memory tracking being performed.] */ result = realloc(ptr, size); } /* Codes_SRS_GBALLOC_01_032: [gballoc_realloc shall ensure thread safety by using the lock created by gballoc_Init.] */ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_01_047: [If acquiring the lock fails, gballoc_realloc shall return NULL.] */ LogError("Failed to get the Lock."); result = NULL; } else { if (ptr == NULL) { /* Codes_SRS_GBALLOC_01_017: [When ptr is NULL, gballoc_realloc shall call the underlying realloc with ptr being NULL and the realloc result shall be tracked by gballoc.] */ allocation = (ALLOCATION*)malloc(sizeof(ALLOCATION)); } else { curr = head; while (curr != NULL) { if (curr->ptr == ptr) { allocation = curr; break; } else { curr = (ALLOCATION*)curr->next; } } } if (allocation == NULL) { /* Codes_SRS_GBALLOC_01_015: [When allocating memory used for tracking by gballoc_realloc fails, gballoc_realloc shall return NULL and no change should be made to the counted total memory usage.] */ /* Codes_SRS_GBALLOC_01_016: [When the ptr pointer cannot be found in the pointers tracked by gballoc, gballoc_realloc shall return NULL and the underlying realloc shall not be called.] */ result = NULL; } else { result = realloc(ptr, size); if (result == NULL) { /* Codes_SRS_GBALLOC_01_014: [When the underlying realloc call fails, gballoc_realloc shall return NULL and no change should be made to the counted total memory usage.] */ if (ptr == NULL) { free(allocation); } } else { if (ptr != NULL) { /* Codes_SRS_GBALLOC_01_006: [If the underlying realloc call is successful, gballoc_realloc shall look up the size associated with the pointer ptr and decrease the total memory used with that size.] */ allocation->ptr = result; totalSize -= allocation->size; allocation->size = size; } else { /* add block */ allocation->ptr = result; allocation->size = size; allocation->next = head; head = allocation; } /* Codes_SRS_GBALLOC_01_007: [If realloc is successful, gballoc_realloc shall also increment the total memory used value tracked by this module.] */ totalSize += size; g_allocations++; /* Codes_SRS_GBALLOC_01_011: [The maximum total memory used shall be the maximum of the total memory used at any point.] */ if (maxSize < totalSize) { maxSize = totalSize; } } } (void)Unlock(gballocThreadSafeLock); } return result; } void gballoc_free(void* ptr) { ALLOCATION* curr = head; ALLOCATION* prev = NULL; if (gballocState != GBALLOC_STATE_INIT) { /* Codes_SRS_GBALLOC_01_042: [If gballoc was not initialized gballoc_free shall shall simply call free.] */ free(ptr); } /* Codes_SRS_GBALLOC_01_033: [gballoc_free shall ensure thread safety by using the lock created by gballoc_Init.] */ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_01_049: [If acquiring the lock fails, gballoc_free shall do nothing.] */ LogError("Failed to get the Lock."); } else { /* Codes_SRS_GBALLOC_01_009: [gballoc_free shall also look up the size associated with the ptr pointer and decrease the total memory used with the associated size amount.] */ while (curr != NULL) { if (curr->ptr == ptr) { /* Codes_SRS_GBALLOC_01_008: [gballoc_free shall call the C99 free function.] */ free(ptr); totalSize -= curr->size; if (prev != NULL) { prev->next = curr->next; } else { head = (ALLOCATION*)curr->next; } free(curr); break; } prev = curr; curr = (ALLOCATION*)curr->next; } if ((curr == NULL) && (ptr != NULL)) { /* Codes_SRS_GBALLOC_01_019: [When the ptr pointer cannot be found in the pointers tracked by gballoc, gballoc_free shall not free any memory.] */ /* could not find the allocation */ LogError("Could not free allocation for address %p (not found)", ptr); } (void)Unlock(gballocThreadSafeLock); } } size_t gballoc_getMaximumMemoryUsed(void) { size_t result; /* Codes_SRS_GBALLOC_01_038: [If gballoc was not initialized gballoc_getMaximumMemoryUsed shall return MAX_INT_SIZE.] */ if (gballocState != GBALLOC_STATE_INIT) { LogError("gballoc is not initialized."); result = SIZE_MAX; } /* Codes_SRS_GBALLOC_01_034: [gballoc_getMaximumMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init.] */ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_01_050: [If the lock cannot be acquired, gballoc_getMaximumMemoryUsed shall return SIZE_MAX.] */ LogError("Failed to get the Lock."); result = SIZE_MAX; } else { /* Codes_SRS_GBALLOC_01_010: [gballoc_getMaximumMemoryUsed shall return the maximum amount of total memory used recorded since the module initialization.] */ result = maxSize; (void)Unlock(gballocThreadSafeLock); } return result; } size_t gballoc_getCurrentMemoryUsed(void) { size_t result; /* Codes_SRS_GBALLOC_01_044: [If gballoc was not initialized gballoc_getCurrentMemoryUsed shall return SIZE_MAX.] */ if (gballocState != GBALLOC_STATE_INIT) { LogError("gballoc is not initialized."); result = SIZE_MAX; } /* Codes_SRS_GBALLOC_01_036: [gballoc_getCurrentMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init.]*/ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_01_051: [If the lock cannot be acquired, gballoc_getCurrentMemoryUsed shall return SIZE_MAX.] */ LogError("Failed to get the Lock."); result = SIZE_MAX; } else { /*Codes_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ result = totalSize; (void)Unlock(gballocThreadSafeLock); } return result; } size_t gballoc_getAllocationCount(void) { size_t result; /* Codes_SRS_GBALLOC_07_001: [ If gballoc was not initialized gballoc_getAllocationCount shall return 0. ] */ if (gballocState != GBALLOC_STATE_INIT) { LogError("gballoc is not initialized."); result = 0; } /* Codes_SRS_GBALLOC_07_002: [ gballoc_getAllocationCount shall ensure thread safety by using the lock created by gballoc_Init ] */ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_07_003: [ If the lock cannot be acquired, gballoc_getAllocationCount shall return 0. ] */ LogError("Failed to get the Lock."); result = 0; } else { /* Codes_SRS_GBALLOC_07_004: [ gballoc_getAllocationCount shall return the currently number of allocations. ] */ result = g_allocations; (void)Unlock(gballocThreadSafeLock); } return result; } void gballoc_resetMetrics() { /* Codes_SRS_GBALLOC_07_005: [ If gballoc was not initialized gballoc_reset Metrics shall do nothing.] */ if (gballocState != GBALLOC_STATE_INIT) { LogError("gballoc is not initialized."); } /* Codes_SRS_GBALLOC_07_006: [ gballoc_resetMetrics shall ensure thread safety by using the lock created by gballoc_Init ]*/ else if (LOCK_OK != Lock(gballocThreadSafeLock)) { /* Codes_SRS_GBALLOC_07_007: [ If the lock cannot be acquired, gballoc_reset Metrics shall do nothing.] */ LogError("Failed to get the Lock."); } else { /* Codes_SRS_GBALLOC_07_008: [ gballoc_resetMetrics shall reset the total allocation size, max allocation size and number of allocation to zero. ] */ totalSize = 0; maxSize = 0; g_allocations = 0; (void)Unlock(gballocThreadSafeLock); } } #endif // GB_USE_CUSTOM_HEAP azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/gbnetwork.c000066400000000000000000000114761362133436400323020ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #ifdef WIN32 #include #else #include #endif #ifndef SIZE_MAX #define SIZE_MAX ((size_t)~(size_t)0) #endif typedef enum GBNETWORK_STATE_TAG { GBNETWORK_STATE_INIT, GBNETWORK_STATE_NOT_INIT } GBNETWORK_STATE; static GBNETWORK_STATE gbnetworkState = GBNETWORK_STATE_NOT_INIT; static uint64_t g_send_bytes = 0; static uint64_t g_send_number = 0; static uint64_t g_recv_bytes = 0; static uint64_t g_recv_number = 0; static LOCK_HANDLE gbnetworkThreadSafeLock = NULL; int gbnetwork_init(void) { int result; if (gbnetworkState != GBNETWORK_STATE_NOT_INIT) { result = __FAILURE__; } else if ((gbnetworkThreadSafeLock = Lock_Init()) == NULL) { result = __FAILURE__; } else { gbnetworkState = GBNETWORK_STATE_INIT; g_send_bytes = 0; g_send_number = 0; g_recv_bytes = 0; g_recv_number = 0; result = 0; } return result; } void gbnetwork_deinit(void) { if (gbnetworkState == GBNETWORK_STATE_INIT) { (void)Lock_Deinit(gbnetworkThreadSafeLock); } gbnetworkState = GBNETWORK_STATE_NOT_INIT; } void gbnetwork_resetMetrics() { if (gbnetworkState != GBNETWORK_STATE_INIT) { LogError("gbnetwork is not initialized."); } else if (LOCK_OK != Lock(gbnetworkThreadSafeLock)) { LogError("Failed to get the Lock."); } else { g_send_bytes = 0; g_send_number = 0; g_recv_bytes = 0; g_recv_number = 0; (void)Unlock(gbnetworkThreadSafeLock); } } #ifdef WIN32 int gbnetwork_send(SOCKET sock, const char* buf, int len, int flags) #else ssize_t gbnetwork_send(int sock, const void* buf, size_t len, int flags) #endif { if (gbnetworkState != GBNETWORK_STATE_INIT) { // Don't log here by design } else if (LOCK_OK != Lock(gbnetworkThreadSafeLock)) { LogError("Failed to get the Lock."); } else { g_send_number++; g_send_bytes += len; (void)Unlock(gbnetworkThreadSafeLock); } return send(sock, buf, len, flags); } #ifdef WIN32 int gbnetwork_recv(SOCKET sock, char* buf, int len, int flags) #else ssize_t gbnetwork_recv(int sock, void* buf, size_t len, int flags) #endif { #ifdef WIN32 int result; #else ssize_t result; #endif result = recv(sock, buf, len, flags); if (gbnetworkState != GBNETWORK_STATE_INIT) { // Don't log here by design } else if (LOCK_OK != Lock(gbnetworkThreadSafeLock)) { LogError("Failed to get the Lock."); } else { if (result > 0) { g_recv_bytes += result; g_recv_number++; } (void)Unlock(gbnetworkThreadSafeLock); } return result; } uint64_t gbnetwork_getBytesSent(void) { uint64_t result; if (gbnetworkState != GBNETWORK_STATE_INIT) { LogError("gbnetwork is not initialized."); result = 0; } else if (LOCK_OK != Lock(gbnetworkThreadSafeLock)) { LogError("Failed to get the Lock."); result = 0; } else { result = g_send_bytes; (void)Unlock(gbnetworkThreadSafeLock); } return result; } uint64_t gbnetwork_getNumSends(void) { uint64_t result; if (gbnetworkState != GBNETWORK_STATE_INIT) { LogError("gbnetwork is not initialized."); result = 0; } else if (LOCK_OK != Lock(gbnetworkThreadSafeLock)) { LogError("Failed to get the Lock."); result = 0; } else { result = g_send_number; (void)Unlock(gbnetworkThreadSafeLock); } return result; } uint64_t gbnetwork_getBytesRecv() { uint64_t result; if (gbnetworkState != GBNETWORK_STATE_INIT) { LogError("gbnetwork is not initialized."); result = 0; } else if (LOCK_OK != Lock(gbnetworkThreadSafeLock)) { LogError("Failed to get the Lock."); result = 0; } else { result = g_recv_bytes; (void)Unlock(gbnetworkThreadSafeLock); } return result; } uint64_t gbnetwork_getNumRecv() { uint64_t result; if (gbnetworkState != GBNETWORK_STATE_INIT) { LogError("gbnetwork is not initialized."); result = 0; } else if (LOCK_OK != Lock(gbnetworkThreadSafeLock)) { LogError("Failed to get the Lock."); result = 0; } else { result = g_recv_number; (void)Unlock(gbnetworkThreadSafeLock); } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/hmac.c000066400000000000000000000141131362133436400311770ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /**************************** hmac.c ****************************/ /******************** See RFC 4634 for details ******************/ /* * Description: * This file implements the HMAC algorithm (Keyed-Hashing for * Message Authentication, RFC2104), expressed in terms of the * various SHA algorithms. */ #include "azure_c_shared_utility/sha.h" /* * hmac * * Description: * This function will compute an HMAC message digest. * * Parameters: * whichSha: [in] * One of SHA1, SHA224, SHA256, SHA384, SHA512 * key: [in] * The secret shared key. * key_len: [in] * The length of the secret shared key. * message_array: [in] * An array of characters representing the message. * length: [in] * The length of the message in message_array * digest: [out] * Where the digest is returned. * NOTE: The length of the digest is determined by * the value of whichSha. * * Returns: * sha Error Code. * */ int hmac(SHAversion whichSha, const unsigned char *text, int text_len, const unsigned char *key, int key_len, uint8_t digest[USHAMaxHashSize]) { HMACContext ctx; return hmacReset(&ctx, whichSha, key, key_len) || hmacInput(&ctx, text, text_len) || hmacResult(&ctx, digest); } /* * hmacReset * * Description: * This function will initialize the hmacContext in preparation * for computing a new HMAC message digest. * * Parameters: * context: [in/out] * The context to reset. * whichSha: [in] * One of SHA1, SHA224, SHA256, SHA384, SHA512 * key: [in] * The secret shared key. * key_len: [in] * The length of the secret shared key. * * Returns: * sha Error Code. * */ int hmacReset(HMACContext *ctx, enum SHAversion whichSha, const unsigned char *key, int key_len) { int i, blocksize, hashsize; /* inner padding - key XORd with ipad */ unsigned char k_ipad[USHA_Max_Message_Block_Size]; /* temporary buffer when keylen > blocksize */ unsigned char tempkey[USHAMaxHashSize]; if (!ctx) return shaNull; blocksize = ctx->blockSize = USHABlockSize(whichSha); hashsize = ctx->hashSize = USHAHashSize(whichSha); ctx->whichSha = whichSha; /* * If key is longer than the hash blocksize, * reset it to key = HASH(key). */ if (key_len > blocksize) { USHAContext tctx; int err = USHAReset(&tctx, whichSha) || USHAInput(&tctx, key, key_len) || USHAResult(&tctx, tempkey); if (err != shaSuccess) return err; key = tempkey; key_len = hashsize; } /* * The HMAC transform looks like: * * SHA(K XOR opad, SHA(K XOR ipad, text)) * * where K is an n byte key. * ipad is the byte 0x36 repeated blocksize times * opad is the byte 0x5c repeated blocksize times * and text is the data being protected. */ /* store key into the pads, XOR'd with ipad and opad values */ for (i = 0; i < key_len; i++) { k_ipad[i] = key[i] ^ 0x36; ctx->k_opad[i] = key[i] ^ 0x5c; } /* remaining pad bytes are '\0' XOR'd with ipad and opad values */ for (; i < blocksize; i++) { k_ipad[i] = 0x36; ctx->k_opad[i] = 0x5c; } /* perform inner hash */ /* init context for 1st pass */ return USHAReset(&ctx->shaContext, whichSha) || /* and start with inner pad */ USHAInput(&ctx->shaContext, k_ipad, blocksize); } /* * hmacInput * * Description: * This function accepts an array of octets as the next portion * of the message. * * Parameters: * context: [in/out] * The HMAC context to update * message_array: [in] * An array of characters representing the next portion of * the message. * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ int hmacInput(HMACContext *ctx, const unsigned char *text, int text_len) { if (!ctx) return shaNull; /* then text of datagram */ return USHAInput(&ctx->shaContext, text, text_len); } /* * HMACFinalBits * * Description: * This function will add in any final bits of the message. * * Parameters: * context: [in/out] * The HMAC context to update * message_bits: [in] * The final bits of the message, in the upper portion of the * byte. (Use 0b###00000 instead of 0b00000### to input the * three bits ###.) * length: [in] * The number of bits in message_bits, between 1 and 7. * * Returns: * sha Error Code. */ int hmacFinalBits(HMACContext *ctx, const uint8_t bits, unsigned int bitcount) { if (!ctx) return shaNull; /* then final bits of datagram */ return USHAFinalBits(&ctx->shaContext, bits, bitcount); } /* * HMACResult * * Description: * This function will return the N-byte message digest into the * Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the Nth element. * * Parameters: * context: [in/out] * The context to use to calculate the HMAC hash. * digest: [out] * Where the digest is returned. * NOTE 2: The length of the hash is determined by the value of * whichSha that was passed to hmacReset(). * * Returns: * sha Error Code. * */ int hmacResult(HMACContext *ctx, uint8_t *digest) { if (!ctx) return shaNull; /* finish up 1st pass */ /* (Use digest here as a temporary buffer.) */ return USHAResult(&ctx->shaContext, digest) || /* perform outer SHA */ /* init context for 2nd pass */ USHAReset(&ctx->shaContext, (SHAversion)ctx->whichSha) || /* start with outer pad */ USHAInput(&ctx->shaContext, ctx->k_opad, ctx->blockSize) || /* then results of 1st hash */ USHAInput(&ctx->shaContext, digest, ctx->hashSize) || /* finish up 2nd pass */ USHAResult(&ctx->shaContext, digest); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/hmacsha256.c000066400000000000000000000017251362133436400321350ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/hmacsha256.h" #include "azure_c_shared_utility/hmac.h" #include "azure_c_shared_utility/buffer_.h" HMACSHA256_RESULT HMACSHA256_ComputeHash(const unsigned char* key, size_t keyLen, const unsigned char* payload, size_t payloadLen, BUFFER_HANDLE hash) { HMACSHA256_RESULT result; if (key == NULL || keyLen == 0 || payload == NULL || payloadLen == 0 || hash == NULL) { result = HMACSHA256_INVALID_ARG; } else { if ((BUFFER_enlarge(hash, 32) != 0) || (hmac(SHA256, payload, (int)payloadLen, key, (int)keyLen, BUFFER_u_char(hash) ) != 0)) { result = HMACSHA256_ERROR; } else { result = HMACSHA256_OK; } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/http_proxy_io.c000066400000000000000000001457341362133436400332140ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/http_proxy_io.h" #include "azure_c_shared_utility/base64.h" typedef enum HTTP_PROXY_IO_STATE_TAG { HTTP_PROXY_IO_STATE_CLOSED, HTTP_PROXY_IO_STATE_OPENING_UNDERLYING_IO, HTTP_PROXY_IO_STATE_WAITING_FOR_CONNECT_RESPONSE, HTTP_PROXY_IO_STATE_OPEN, HTTP_PROXY_IO_STATE_CLOSING, HTTP_PROXY_IO_STATE_ERROR } HTTP_PROXY_IO_STATE; typedef struct HTTP_PROXY_IO_INSTANCE_TAG { HTTP_PROXY_IO_STATE http_proxy_io_state; ON_BYTES_RECEIVED on_bytes_received; void* on_bytes_received_context; ON_IO_ERROR on_io_error; void* on_io_error_context; ON_IO_OPEN_COMPLETE on_io_open_complete; void* on_io_open_complete_context; ON_IO_CLOSE_COMPLETE on_io_close_complete; void* on_io_close_complete_context; char* hostname; int port; char* proxy_hostname; int proxy_port; char* username; char* password; XIO_HANDLE underlying_io; unsigned char* receive_buffer; size_t receive_buffer_size; } HTTP_PROXY_IO_INSTANCE; static CONCRETE_IO_HANDLE http_proxy_io_create(void* io_create_parameters) { HTTP_PROXY_IO_INSTANCE* result; if (io_create_parameters == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_002: [ If `io_create_parameters` is NULL, `http_proxy_io_create` shall fail and return NULL. ]*/ result = NULL; LogError("NULL io_create_parameters."); } else { /* Codes_SRS_HTTP_PROXY_IO_01_003: [ `io_create_parameters` shall be used as an `HTTP_PROXY_IO_CONFIG*`. ]*/ HTTP_PROXY_IO_CONFIG* http_proxy_io_config = (HTTP_PROXY_IO_CONFIG*)io_create_parameters; if ((http_proxy_io_config->hostname == NULL) || (http_proxy_io_config->proxy_hostname == NULL)) { /* Codes_SRS_HTTP_PROXY_IO_01_004: [ If the `hostname` or `proxy_hostname` member is NULL, then `http_proxy_io_create` shall fail and return NULL. ]*/ result = NULL; LogError("Bad arguments: hostname = %p, proxy_hostname = %p", http_proxy_io_config->hostname, http_proxy_io_config->proxy_hostname); } /* Codes_SRS_HTTP_PROXY_IO_01_095: [ If one of the fields `username` and `password` is non-NULL, then the other has to be also non-NULL, otherwise `http_proxy_io_create` shall fail and return NULL. ]*/ else if (((http_proxy_io_config->username == NULL) && (http_proxy_io_config->password != NULL)) || ((http_proxy_io_config->username != NULL) && (http_proxy_io_config->password == NULL))) { result = NULL; LogError("Bad arguments: username = %p, password = %p", http_proxy_io_config->username, http_proxy_io_config->password); } else { /* Codes_SRS_HTTP_PROXY_IO_01_001: [ `http_proxy_io_create` shall create a new instance of the HTTP proxy IO. ]*/ result = (HTTP_PROXY_IO_INSTANCE*)malloc(sizeof(HTTP_PROXY_IO_INSTANCE)); if (result == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_051: [ If allocating memory for the new instance fails, `http_proxy_io_create` shall fail and return NULL. ]*/ LogError("Failed allocating HTTP proxy IO instance."); } else { /* Codes_SRS_HTTP_PROXY_IO_01_005: [ `http_proxy_io_create` shall copy the `hostname`, `port`, `username` and `password` values for later use when the actual CONNECT is performed. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_006: [ `hostname` and `proxy_hostname`, `username` and `password` shall be copied by calling `mallocAndStrcpy_s`. ]*/ if (mallocAndStrcpy_s(&result->hostname, http_proxy_io_config->hostname) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_007: [ If `mallocAndStrcpy_s` fails then `http_proxy_io_create` shall fail and return NULL. ]*/ LogError("Failed to copy the hostname."); /* Codes_SRS_HTTP_PROXY_IO_01_008: [ When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. ]*/ free(result); result = NULL; } else { /* Codes_SRS_HTTP_PROXY_IO_01_006: [ `hostname` and `proxy_hostname`, `username` and `password` shall be copied by calling `mallocAndStrcpy_s`. ]*/ if (mallocAndStrcpy_s(&result->proxy_hostname, http_proxy_io_config->proxy_hostname) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_007: [ If `mallocAndStrcpy_s` fails then `http_proxy_io_create` shall fail and return NULL. ]*/ LogError("Failed to copy the proxy_hostname."); /* Codes_SRS_HTTP_PROXY_IO_01_008: [ When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. ]*/ free(result->hostname); free(result); result = NULL; } else { result->username = NULL; result->password = NULL; /* Codes_SRS_HTTP_PROXY_IO_01_006: [ `hostname` and `proxy_hostname`, `username` and `password` shall be copied by calling `mallocAndStrcpy_s`. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_094: [ `username` and `password` shall be optional. ]*/ if ((http_proxy_io_config->username != NULL) && (mallocAndStrcpy_s(&result->username, http_proxy_io_config->username) != 0)) { /* Codes_SRS_HTTP_PROXY_IO_01_007: [ If `mallocAndStrcpy_s` fails then `http_proxy_io_create` shall fail and return NULL. ]*/ LogError("Failed to copy the username."); /* Codes_SRS_HTTP_PROXY_IO_01_008: [ When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. ]*/ free(result->proxy_hostname); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_HTTP_PROXY_IO_01_006: [ `hostname` and `proxy_hostname`, `username` and `password` shall be copied by calling `mallocAndStrcpy_s`. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_094: [ `username` and `password` shall be optional. ]*/ if ((http_proxy_io_config->password != NULL) && (mallocAndStrcpy_s(&result->password, http_proxy_io_config->password) != 0)) { /* Codes_SRS_HTTP_PROXY_IO_01_007: [ If `mallocAndStrcpy_s` fails then `http_proxy_io_create` shall fail and return NULL. ]*/ LogError("Failed to copy the passowrd."); /* Codes_SRS_HTTP_PROXY_IO_01_008: [ When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. ]*/ free(result->username); free(result->proxy_hostname); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_HTTP_PROXY_IO_01_010: [ - `io_interface_description` shall be set to the result of `socketio_get_interface_description`. ]*/ const IO_INTERFACE_DESCRIPTION* underlying_io_interface = socketio_get_interface_description(); if (underlying_io_interface == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_050: [ If `socketio_get_interface_description` fails, `http_proxy_io_create` shall fail and return NULL. ]*/ LogError("Unable to get the socket IO interface description."); /* Codes_SRS_HTTP_PROXY_IO_01_008: [ When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. ]*/ free(result->password); free(result->username); free(result->proxy_hostname); free(result->hostname); free(result); result = NULL; } else { SOCKETIO_CONFIG socket_io_config; /* Codes_SRS_HTTP_PROXY_IO_01_011: [ - `xio_create_parameters` shall be set to a `SOCKETIO_CONFIG*` where `hostname` is set to the `proxy_hostname` member of `io_create_parameters` and `port` is set to the `proxy_port` member of `io_create_parameters`. ]*/ socket_io_config.hostname = http_proxy_io_config->proxy_hostname; socket_io_config.port = http_proxy_io_config->proxy_port; socket_io_config.accepted_socket = NULL; /* Codes_SRS_HTTP_PROXY_IO_01_009: [ `http_proxy_io_create` shall create a new socket IO by calling `xio_create` with the arguments: ]*/ result->underlying_io = xio_create(underlying_io_interface, &socket_io_config); if (result->underlying_io == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_012: [ If `xio_create` fails, `http_proxy_io_create` shall fail and return NULL. ]*/ LogError("Unable to create the underlying IO."); /* Codes_SRS_HTTP_PROXY_IO_01_008: [ When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. ]*/ free(result->password); free(result->username); free(result->proxy_hostname); free(result->hostname); free(result); result = NULL; } else { result->port = http_proxy_io_config->port; result->proxy_port = http_proxy_io_config->proxy_port; result->receive_buffer = NULL; result->receive_buffer_size = 0; result->http_proxy_io_state = HTTP_PROXY_IO_STATE_CLOSED; } } } } } } } } } return result; } static void http_proxy_io_destroy(CONCRETE_IO_HANDLE http_proxy_io) { if (http_proxy_io == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_014: [ If `http_proxy_io` is NULL, `http_proxy_io_destroy` shall do nothing. ]*/ LogError("NULL http_proxy_io."); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)http_proxy_io; /* Codes_SRS_HTTP_PROXY_IO_01_013: [ `http_proxy_io_destroy` shall free the HTTP proxy IO instance indicated by `http_proxy_io`. ]*/ if (http_proxy_io_instance->receive_buffer != NULL) { free(http_proxy_io_instance->receive_buffer); } /* Codes_SRS_HTTP_PROXY_IO_01_016: [ `http_proxy_io_destroy` shall destroy the underlying IO created in `http_proxy_io_create` by calling `xio_destroy`. ]*/ xio_destroy(http_proxy_io_instance->underlying_io); free(http_proxy_io_instance->hostname); free(http_proxy_io_instance->proxy_hostname); free(http_proxy_io_instance->username); free(http_proxy_io_instance->password); free(http_proxy_io_instance); } } static void indicate_open_complete_error_and_close(HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance) { http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_CLOSED; (void)xio_close(http_proxy_io_instance->underlying_io, NULL, NULL); http_proxy_io_instance->on_io_open_complete(http_proxy_io_instance->on_io_open_complete_context, IO_OPEN_ERROR); } // This callback usage needs to be either verified and commented or integrated into // the state machine. static void unchecked_on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } static void on_underlying_io_open_complete(void* context, IO_OPEN_RESULT open_result) { if (context == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_081: [ `on_underlying_io_open_complete` called with NULL context shall do nothing. ]*/ LogError("NULL context in on_underlying_io_open_complete"); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)context; switch (http_proxy_io_instance->http_proxy_io_state) { default: LogError("on_underlying_io_open_complete called in an unexpected state."); break; case HTTP_PROXY_IO_STATE_CLOSING: case HTTP_PROXY_IO_STATE_OPEN: /* Codes_SRS_HTTP_PROXY_IO_01_077: [ When `on_underlying_io_open_complete` is called in after OPEN has completed, the `on_io_error` callback shall be triggered passing the `on_io_error_context` argument as `context`. ]*/ http_proxy_io_instance->on_io_error(http_proxy_io_instance->on_io_error_context); break; case HTTP_PROXY_IO_STATE_WAITING_FOR_CONNECT_RESPONSE: /* Codes_SRS_HTTP_PROXY_IO_01_076: [ When `on_underlying_io_open_complete` is called while waiting for the CONNECT reply, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Open complete called again by underlying IO."); indicate_open_complete_error_and_close(http_proxy_io_instance); break; case HTTP_PROXY_IO_STATE_OPENING_UNDERLYING_IO: switch (open_result) { default: case IO_OPEN_ERROR: /* Codes_SRS_HTTP_PROXY_IO_01_078: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_ERROR`, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Underlying IO open failed"); indicate_open_complete_error_and_close(http_proxy_io_instance); break; case IO_OPEN_CANCELLED: /* Codes_SRS_HTTP_PROXY_IO_01_079: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_CANCELLED`, the `on_open_complete` callback shall be triggered with `IO_OPEN_CANCELLED`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Underlying IO open failed"); http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_CLOSED; (void)xio_close(http_proxy_io_instance->underlying_io, NULL, NULL); http_proxy_io_instance->on_io_open_complete(http_proxy_io_instance->on_io_open_complete_context, IO_OPEN_CANCELLED); break; case IO_OPEN_OK: { STRING_HANDLE encoded_auth_string; /* Codes_SRS_HTTP_PROXY_IO_01_057: [ When `on_underlying_io_open_complete` is called, the `http_proxy_io` shall send the CONNECT request constructed per RFC 2817: ]*/ http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_WAITING_FOR_CONNECT_RESPONSE; if (http_proxy_io_instance->username != NULL) { char* plain_auth_string_bytes; /* Codes_SRS_HTTP_PROXY_IO_01_060: [ - The value of `Proxy-Authorization` shall be the constructed according to RFC 2617. ]*/ int plain_auth_string_length = (int)(strlen(http_proxy_io_instance->username)+1); if (http_proxy_io_instance->password != NULL) { plain_auth_string_length += (int)strlen(http_proxy_io_instance->password); } if (plain_auth_string_length < 0) { /* Codes_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ encoded_auth_string = NULL; indicate_open_complete_error_and_close(http_proxy_io_instance); } else { plain_auth_string_bytes = (char*)malloc(plain_auth_string_length + 1); if (plain_auth_string_bytes == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ encoded_auth_string = NULL; indicate_open_complete_error_and_close(http_proxy_io_instance); } else { /* Codes_SRS_HTTP_PROXY_IO_01_091: [ To receive authorization, the client sends the userid and password, separated by a single colon (":") character, within a base64 [7] encoded string in the credentials. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_092: [ A client MAY preemptively send the corresponding Authorization header with requests for resources in that space without receipt of another challenge from the server. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_093: [ Userids might be case sensitive. ]*/ if (sprintf(plain_auth_string_bytes, "%s:%s", http_proxy_io_instance->username, (http_proxy_io_instance->password == NULL) ? "" : http_proxy_io_instance->password) < 0) { /* Codes_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ encoded_auth_string = NULL; indicate_open_complete_error_and_close(http_proxy_io_instance); } else { /* Codes_SRS_HTTP_PROXY_IO_01_061: [ Encoding to Base64 shall be done by calling `Base64_Encode_Bytes`. ]*/ encoded_auth_string = Base64_Encode_Bytes((const unsigned char*)plain_auth_string_bytes, plain_auth_string_length); if (encoded_auth_string == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Cannot Base64 encode auth string"); indicate_open_complete_error_and_close(http_proxy_io_instance); } } free(plain_auth_string_bytes); } } } else { encoded_auth_string = NULL; } if ((http_proxy_io_instance->username != NULL) && (encoded_auth_string == NULL)) { LogError("Cannot create authorization header"); } else { int connect_request_length; const char* auth_string_payload; /* Codes_SRS_HTTP_PROXY_IO_01_075: [ The Request-URI portion of the Request-Line is always an 'authority' as defined by URI Generic Syntax [2], which is to say the host name and port number destination of the requested connection separated by a colon: ]*/ const char request_format[] = "CONNECT %s:%d HTTP/1.1\r\nHost:%s:%d%s%s\r\n\r\n"; const char proxy_basic[] = "\r\nProxy-authorization: Basic "; if (http_proxy_io_instance->username != NULL) { auth_string_payload = STRING_c_str(encoded_auth_string); } else { auth_string_payload = ""; } /* Codes_SRS_HTTP_PROXY_IO_01_059: [ - If `username` and `password` have been specified in the arguments passed to `http_proxy_io_create`, then the header `Proxy-Authorization` shall be added to the request. ]*/ connect_request_length = (int)(strlen(request_format)+(strlen(http_proxy_io_instance->hostname)*2)+strlen(auth_string_payload)+10); if (http_proxy_io_instance->username != NULL) { connect_request_length += (int)strlen(proxy_basic); } if (connect_request_length < 0) { /* Codes_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Cannot encode the CONNECT request"); indicate_open_complete_error_and_close(http_proxy_io_instance); } else { char* connect_request = (char*)malloc(connect_request_length + 1); if (connect_request == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Cannot allocate memory for CONNECT request"); indicate_open_complete_error_and_close(http_proxy_io_instance); } else { /* Codes_SRS_HTTP_PROXY_IO_01_059: [ - If `username` and `password` have been specified in the arguments passed to `http_proxy_io_create`, then the header `Proxy-Authorization` shall be added to the request. ]*/ connect_request_length = sprintf(connect_request, request_format, http_proxy_io_instance->hostname, http_proxy_io_instance->port, http_proxy_io_instance->hostname, http_proxy_io_instance->port, (http_proxy_io_instance->username != NULL) ? proxy_basic : "", auth_string_payload); if (connect_request_length < 0) { /* Codes_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Cannot encode the CONNECT request"); indicate_open_complete_error_and_close(http_proxy_io_instance); } else { /* Codes_SRS_HTTP_PROXY_IO_01_063: [ The request shall be sent by calling `xio_send` and passing NULL as `on_send_complete` callback. ]*/ if (xio_send(http_proxy_io_instance->underlying_io, connect_request, connect_request_length, unchecked_on_send_complete, NULL) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_064: [ If `xio_send` fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Could not send CONNECT request"); indicate_open_complete_error_and_close(http_proxy_io_instance); } } free(connect_request); } } } if (encoded_auth_string != NULL) { STRING_delete(encoded_auth_string); } break; } } break; } } } static void on_underlying_io_error(void* context) { if (context == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_088: [ `on_underlying_io_error` called with NULL context shall do nothing. ]*/ LogError("NULL context in on_underlying_io_error"); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)context; switch (http_proxy_io_instance->http_proxy_io_state) { default: LogError("on_underlying_io_error in invalid state"); break; case HTTP_PROXY_IO_STATE_OPENING_UNDERLYING_IO: case HTTP_PROXY_IO_STATE_WAITING_FOR_CONNECT_RESPONSE: /* Codes_SRS_HTTP_PROXY_IO_01_087: [ If the `on_underlying_io_error` callback is called while OPENING, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ indicate_open_complete_error_and_close(http_proxy_io_instance); break; case HTTP_PROXY_IO_STATE_OPEN: /* Codes_SRS_HTTP_PROXY_IO_01_089: [ If the `on_underlying_io_error` callback is called while the IO is OPEN, the `on_io_error` callback shall be called with the `on_io_error_context` argument as `context`. ]*/ http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_ERROR; http_proxy_io_instance->on_io_error(http_proxy_io_instance->on_io_error_context); break; } } } static void on_underlying_io_close_complete(void* context) { if (context == NULL) { /* Cdoes_SRS_HTTP_PROXY_IO_01_084: [ `on_underlying_io_close_complete` called with NULL context shall do nothing. ]*/ LogError("NULL context in on_underlying_io_open_complete"); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)context; switch (http_proxy_io_instance->http_proxy_io_state) { default: LogError("on_underlying_io_close_complete called in an invalid state"); break; case HTTP_PROXY_IO_STATE_CLOSING: http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_CLOSED; /* Codes_SRS_HTTP_PROXY_IO_01_086: [ If the `on_io_close_complete` callback passed to `http_proxy_io_close` was NULL, no callback shall be triggered. ]*/ if (http_proxy_io_instance->on_io_close_complete != NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_083: [ `on_underlying_io_close_complete` while CLOSING shall call the `on_io_close_complete` callback, passing to it the `on_io_close_complete_context` as `context` argument. ]*/ http_proxy_io_instance->on_io_close_complete(http_proxy_io_instance->on_io_close_complete_context); } break; } } } /*the following function does the same as sscanf(pos2, "%d", &sec)*/ /*this function only exists because some of platforms do not have sscanf. */ static int ParseStringToDecimal(const char *src, int* dst) { int result; char* next; (*dst) = (int)strtol(src, &next, 0); if ((src == next) || ((((*dst) == INT_MAX) || ((*dst) == INT_MIN)) && (errno != 0))) { result = __LINE__; } else { result = 0; } return result; } /*the following function does the same as sscanf(buf, "HTTP/%*d.%*d %d %*[^\r\n]", &ret) */ /*this function only exists because some of platforms do not have sscanf. This is not a full implementation; it only works with well-defined HTTP response. */ static int ParseHttpResponse(const char* src, int* dst) { int result; static const char HTTPPrefix[] = "HTTP/"; bool fail; const char* runPrefix; if ((src == NULL) || (dst == NULL)) { result = __LINE__; } else { fail = false; runPrefix = HTTPPrefix; while ((*runPrefix) != '\0') { if ((*runPrefix) != (*src)) { fail = true; break; } src++; runPrefix++; } if (!fail) { while ((*src) != '.') { if ((*src) == '\0') { fail = true; break; } src++; } } if (!fail) { while ((*src) != ' ') { if ((*src) == '\0') { fail = true; break; } src++; } } if (fail) { result = __LINE__; } else { if (ParseStringToDecimal(src, dst) != 0) { result = __LINE__; } else { result = 0; } } } return result; } static void on_underlying_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { if (context == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_082: [ `on_underlying_io_bytes_received` called with NULL context shall do nothing. ]*/ LogError("NULL context in on_underlying_io_bytes_received"); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)context; switch (http_proxy_io_instance->http_proxy_io_state) { default: case HTTP_PROXY_IO_STATE_CLOSING: LogError("Bytes received in invalid state"); break; case HTTP_PROXY_IO_STATE_OPENING_UNDERLYING_IO: /* Codes_SRS_HTTP_PROXY_IO_01_080: [ If `on_underlying_io_bytes_received` is called while the underlying IO is being opened, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Bytes received while opening underlying IO"); indicate_open_complete_error_and_close(http_proxy_io_instance); break; case HTTP_PROXY_IO_STATE_WAITING_FOR_CONNECT_RESPONSE: { /* Codes_SRS_HTTP_PROXY_IO_01_065: [ When bytes are received and the response to the CONNECT request was not yet received, the bytes shall be accumulated until a double new-line is detected. ]*/ unsigned char* new_receive_buffer = (unsigned char*)realloc(http_proxy_io_instance->receive_buffer, http_proxy_io_instance->receive_buffer_size + size + 1); if (new_receive_buffer == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_067: [ If allocating memory for the buffered bytes fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Cannot allocate memory for received data"); indicate_open_complete_error_and_close(http_proxy_io_instance); } else { http_proxy_io_instance->receive_buffer = new_receive_buffer; memcpy(http_proxy_io_instance->receive_buffer + http_proxy_io_instance->receive_buffer_size, buffer, size); http_proxy_io_instance->receive_buffer_size += size; } if (http_proxy_io_instance->receive_buffer_size >= 4) { const char* request_end_ptr; http_proxy_io_instance->receive_buffer[http_proxy_io_instance->receive_buffer_size] = 0; /* Codes_SRS_HTTP_PROXY_IO_01_066: [ When a double new-line is detected the response shall be parsed in order to extract the status code. ]*/ if ((http_proxy_io_instance->receive_buffer_size >= 4) && ((request_end_ptr = strstr((const char*)http_proxy_io_instance->receive_buffer, "\r\n\r\n")) != NULL)) { int status_code; /* This part should really be done with the HTTPAPI, but that has to be done as a separate step as the HTTPAPI has to expose somehow the underlying IO and currently this would be a too big of a change. */ if (ParseHttpResponse((const char*)http_proxy_io_instance->receive_buffer, &status_code) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_068: [ If parsing the CONNECT response fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Cannot decode HTTP response"); indicate_open_complete_error_and_close(http_proxy_io_instance); } /* Codes_SRS_HTTP_PROXY_IO_01_069: [ Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_090: [ Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. ]*/ else if ((status_code < 200) || (status_code > 299)) { /* Codes_SRS_HTTP_PROXY_IO_01_071: [ If the status code is not successful, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ LogError("Bad status (%d) received in CONNECT response", status_code); indicate_open_complete_error_and_close(http_proxy_io_instance); } else { size_t length_remaining = http_proxy_io_instance->receive_buffer + http_proxy_io_instance->receive_buffer_size - ((const unsigned char *)request_end_ptr + 4); /* Codes_SRS_HTTP_PROXY_IO_01_073: [ Once a success status code was parsed, the IO shall be OPEN. ]*/ http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_OPEN; /* Codes_SRS_HTTP_PROXY_IO_01_070: [ When a success status code is parsed, the `on_open_complete` callback shall be triggered with `IO_OPEN_OK`, passing also the `on_open_complete_context` argument as `context`. ]*/ http_proxy_io_instance->on_io_open_complete(http_proxy_io_instance->on_io_open_complete_context, IO_OPEN_OK); if (length_remaining > 0) { /* Codes_SRS_HTTP_PROXY_IO_01_072: [ Any bytes that are extra (not consumed by the CONNECT response), shall be indicated as received by calling the `on_bytes_received` callback and passing the `on_bytes_received_context` as context argument. ]*/ http_proxy_io_instance->on_bytes_received(http_proxy_io_instance->on_bytes_received_context, (const unsigned char*)request_end_ptr + 4, length_remaining); } } } } break; } case HTTP_PROXY_IO_STATE_OPEN: /* Codes_SRS_HTTP_PROXY_IO_01_074: [ If `on_underlying_io_bytes_received` is called while OPEN, all bytes shall be indicated as received by calling the `on_bytes_received` callback and passing the `on_bytes_received_context` as context argument. ]*/ http_proxy_io_instance->on_bytes_received(http_proxy_io_instance->on_bytes_received_context, buffer, size); break; } } } static int http_proxy_io_open(CONCRETE_IO_HANDLE http_proxy_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; /* Codes_SRS_HTTP_PROXY_IO_01_051: [ The arguments `on_io_open_complete_context`, `on_bytes_received_context` and `on_io_error_context` shall be allowed to be NULL. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_018: [ If any of the arguments `http_proxy_io`, `on_io_open_complete`, `on_bytes_received` or `on_io_error` are NULL then `http_proxy_io_open` shall return a non-zero value. ]*/ if ((http_proxy_io == NULL) || (on_io_open_complete == NULL) || (on_bytes_received == NULL) || (on_io_error == NULL)) { LogError("Bad arguments: http_proxy_io = %p, on_io_open_complete = %p, on_bytes_received = %p, on_io_error_context = %p.", http_proxy_io, on_io_open_complete, on_bytes_received, on_io_error); result = __LINE__; } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)http_proxy_io; if (http_proxy_io_instance->http_proxy_io_state != HTTP_PROXY_IO_STATE_CLOSED) { LogError("Invalid tlsio_state. Expected state is HTTP_PROXY_IO_STATE_CLOSED."); result = __LINE__; } else { http_proxy_io_instance->on_bytes_received = on_bytes_received; http_proxy_io_instance->on_bytes_received_context = on_bytes_received_context; http_proxy_io_instance->on_io_error = on_io_error; http_proxy_io_instance->on_io_error_context = on_io_error_context; http_proxy_io_instance->on_io_open_complete = on_io_open_complete; http_proxy_io_instance->on_io_open_complete_context = on_io_open_complete_context; http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_OPENING_UNDERLYING_IO; /* Codes_SRS_HTTP_PROXY_IO_01_019: [ `http_proxy_io_open` shall open the underlying IO by calling `xio_open` on the underlying IO handle created in `http_proxy_io_create`, while passing to it the callbacks `on_underlying_io_open_complete`, `on_underlying_io_bytes_received` and `on_underlying_io_error`. ]*/ if (xio_open(http_proxy_io_instance->underlying_io, on_underlying_io_open_complete, http_proxy_io_instance, on_underlying_io_bytes_received, http_proxy_io_instance, on_underlying_io_error, http_proxy_io_instance) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_020: [ If `xio_open` fails, then `http_proxy_io_open` shall return a non-zero value. ]*/ http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_CLOSED; LogError("Cannot open the underlying IO."); result = __LINE__; } else { /* Codes_SRS_HTTP_PROXY_IO_01_017: [ `http_proxy_io_open` shall open the HTTP proxy IO and on success it shall return 0. ]*/ result = 0; } } } return result; } static int http_proxy_io_close(CONCRETE_IO_HANDLE http_proxy_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) { int result = 0; /* Codes_SRS_HTTP_PROXY_IO_01_052: [ `on_io_close_complete_context` shall be allowed to be NULL. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_028: [ `on_io_close_complete` shall be allowed to be NULL. ]*/ if (http_proxy_io == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_023: [ If the argument `http_proxy_io` is NULL, `http_proxy_io_close` shall fail and return a non-zero value. ]*/ result = __LINE__; LogError("NULL http_proxy_io."); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)http_proxy_io; /* Codes_SRS_HTTP_PROXY_IO_01_027: [ If `http_proxy_io_close` is called when not open, `http_proxy_io_close` shall fail and return a non-zero value. ]*/ if ((http_proxy_io_instance->http_proxy_io_state == HTTP_PROXY_IO_STATE_CLOSED) || /* Codes_SRS_HTTP_PROXY_IO_01_054: [ `http_proxy_io_close` while OPENING shall fail and return a non-zero value. ]*/ (http_proxy_io_instance->http_proxy_io_state == HTTP_PROXY_IO_STATE_CLOSING)) { result = __LINE__; LogError("Invalid tlsio_state. Expected state is HTTP_PROXY_IO_STATE_OPEN."); } else if ((http_proxy_io_instance->http_proxy_io_state == HTTP_PROXY_IO_STATE_OPENING_UNDERLYING_IO) || (http_proxy_io_instance->http_proxy_io_state == HTTP_PROXY_IO_STATE_WAITING_FOR_CONNECT_RESPONSE)) { /* Codes_SRS_HTTP_PROXY_IO_01_053: [ `http_proxy_io_close` while OPENING shall trigger the `on_io_open_complete` callback with `IO_OPEN_CANCELLED`. ]*/ http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_CLOSED; (void)xio_close(http_proxy_io_instance->underlying_io, NULL, NULL); http_proxy_io_instance->on_io_open_complete(http_proxy_io_instance->on_io_open_complete_context, IO_OPEN_CANCELLED); /* Codes_SRS_HTTP_PROXY_IO_01_022: [ `http_proxy_io_close` shall close the HTTP proxy IO and on success it shall return 0. ]*/ result = 0; } else { HTTP_PROXY_IO_STATE previous_state = http_proxy_io_instance->http_proxy_io_state; http_proxy_io_instance->http_proxy_io_state = HTTP_PROXY_IO_STATE_CLOSING; /* Codes_SRS_HTTP_PROXY_IO_01_026: [ The `on_io_close_complete` and `on_io_close_complete_context` arguments shall be saved for later use. ]*/ http_proxy_io_instance->on_io_close_complete = on_io_close_complete; http_proxy_io_instance->on_io_close_complete_context = on_io_close_complete_context; /* Codes_SRS_HTTP_PROXY_IO_01_024: [ `http_proxy_io_close` shall close the underlying IO by calling `xio_close` on the IO handle create in `http_proxy_io_create`, while passing to it the `on_underlying_io_close_complete` callback. ]*/ if (xio_close(http_proxy_io_instance->underlying_io, on_underlying_io_close_complete, http_proxy_io_instance) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_025: [ If `xio_close` fails, `http_proxy_io_close` shall fail and return a non-zero value. ]*/ result = __LINE__; http_proxy_io_instance->http_proxy_io_state = previous_state; LogError("Cannot close underlying IO."); } else { /* Codes_SRS_HTTP_PROXY_IO_01_022: [ `http_proxy_io_close` shall close the HTTP proxy IO and on success it shall return 0. ]*/ result = 0; } } } return result; } static int http_proxy_io_send(CONCRETE_IO_HANDLE http_proxy_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* on_send_complete_context) { int result; /* Codes_SRS_HTTP_PROXY_IO_01_032: [ `on_send_complete` shall be allowed to be NULL. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_030: [ If any of the arguments `http_proxy_io` or `buffer` is NULL, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ if ((http_proxy_io == NULL) || (buffer == NULL) || /* Codes_SRS_HTTP_PROXY_IO_01_031: [ If `size` is 0, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ (size == 0)) { result = __LINE__; LogError("Bad arguments: http_proxy_io = %p, buffer = %p.", http_proxy_io, buffer); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)http_proxy_io; /* Codes_SRS_HTTP_PROXY_IO_01_034: [ If `http_proxy_io_send` is called when the IO is not open, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_035: [ If the IO is in an error state (an error was reported through the `on_io_error` callback), `http_proxy_io_send` shall fail and return a non-zero value. ]*/ if (http_proxy_io_instance->http_proxy_io_state != HTTP_PROXY_IO_STATE_OPEN) { result = __LINE__; LogError("Invalid HTTP proxy IO state. Expected state is HTTP_PROXY_IO_STATE_OPEN."); } else { /* Codes_SRS_HTTP_PROXY_IO_01_033: [ `http_proxy_io_send` shall send the bytes by calling `xio_send` on the underlying IO created in `http_proxy_io_create` and passing `buffer` and `size` as arguments. ]*/ if (xio_send(http_proxy_io_instance->underlying_io, buffer, size, on_send_complete, on_send_complete_context) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_055: [ If `xio_send` fails, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ result = __LINE__; LogError("Underlying xio_send failed."); } else { /* Codes_SRS_HTTP_PROXY_IO_01_029: [ `http_proxy_io_send` shall send the `size` bytes pointed to by `buffer` and on success it shall return 0. ]*/ result = 0; } } } return result; } static void http_proxy_io_dowork(CONCRETE_IO_HANDLE http_proxy_io) { if (http_proxy_io == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_038: [ If the `http_proxy_io` argument is NULL, `http_proxy_io_dowork` shall do nothing. ]*/ LogError("NULL http_proxy_io."); } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)http_proxy_io; if (http_proxy_io_instance->http_proxy_io_state != HTTP_PROXY_IO_STATE_CLOSED) { /* Codes_SRS_HTTP_PROXY_IO_01_037: [ `http_proxy_io_dowork` shall call `xio_dowork` on the underlying IO created in `http_proxy_io_create`. ]*/ xio_dowork(http_proxy_io_instance->underlying_io); } } } static int http_proxy_io_set_option(CONCRETE_IO_HANDLE http_proxy_io, const char* option_name, const void* value) { int result; if ((http_proxy_io == NULL) || (option_name == NULL)) { /* Codes_SRS_HTTP_PROXY_IO_01_040: [ If any of the arguments `http_proxy_io` or `option_name` is NULL, `http_proxy_io_set_option` shall return a non-zero value. ]*/ LogError("Bad arguments: http_proxy_io = %p, option_name = %p", http_proxy_io, option_name); result = __LINE__; } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)http_proxy_io; /* Codes_SRS_HTTP_PROXY_IO_01_045: [ None. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_043: [ If the `option_name` argument indicates an option that is not handled by `http_proxy_io_set_option`, then `xio_setoption` shall be called on the underlying IO created in `http_proxy_io_create`, passing the option name and value to it. ]*/ /* Codes_SRS_HTTP_PROXY_IO_01_056: [ The `value` argument shall be allowed to be NULL. ]*/ if (xio_setoption(http_proxy_io_instance->underlying_io, option_name, value) != 0) { /* Codes_SRS_HTTP_PROXY_IO_01_044: [ if `xio_setoption` fails, `http_proxy_io_set_option` shall return a non-zero value. ]*/ LogError("Unrecognized option"); result = __LINE__; } else { /* Codes_SRS_HTTP_PROXY_IO_01_042: [ If the option was handled by `http_proxy_io_set_option` or the underlying IO, then `http_proxy_io_set_option` shall return 0. ]*/ result = 0; } } return result; } static OPTIONHANDLER_HANDLE http_proxy_io_retrieve_options(CONCRETE_IO_HANDLE http_proxy_io) { OPTIONHANDLER_HANDLE result; if (http_proxy_io == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_047: [ If the parameter `http_proxy_io` is NULL then `http_proxy_io_retrieve_options` shall fail and return NULL. ]*/ LogError("invalid parameter detected: CONCRETE_IO_HANDLE handle=%p", http_proxy_io); result = NULL; } else { HTTP_PROXY_IO_INSTANCE* http_proxy_io_instance = (HTTP_PROXY_IO_INSTANCE*)http_proxy_io; /* Codes_SRS_HTTP_PROXY_IO_01_046: [ `http_proxy_io_retrieve_options` shall return an `OPTIONHANDLER_HANDLE` obtained by calling `xio_retrieveoptions` on the underlying IO created in `http_proxy_io_create`. ]*/ result = xio_retrieveoptions(http_proxy_io_instance->underlying_io); if (result == NULL) { /* Codes_SRS_HTTP_PROXY_IO_01_048: [ If `xio_retrieveoptions` fails, `http_proxy_io_retrieve_options` shall return NULL. ]*/ LogError("unable to create option handler"); } } return result; } static const IO_INTERFACE_DESCRIPTION http_proxy_io_interface_description = { http_proxy_io_retrieve_options, http_proxy_io_create, http_proxy_io_destroy, http_proxy_io_open, http_proxy_io_close, http_proxy_io_send, http_proxy_io_dowork, http_proxy_io_set_option }; const IO_INTERFACE_DESCRIPTION* http_proxy_io_get_interface_description(void) { /* Codes_SRS_HTTP_PROXY_IO_01_049: [ `http_proxy_io_get_interface_description` shall return a pointer to an `IO_INTERFACE_DESCRIPTION` structure that contains pointers to the functions: `http_proxy_io_retrieve_options`, `http_proxy_io_retrieve_create`, `http_proxy_io_destroy`, `http_proxy_io_open`, `http_proxy_io_close`, `http_proxy_io_send` and `http_proxy_io_dowork`. ]*/ return &http_proxy_io_interface_description; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/http_proxy_stub.c000066400000000000000000000072461362133436400335550ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/http_proxy_io.h" static CONCRETE_IO_HANDLE http_proxy_stub_create(void* io_create_parameters) { CONCRETE_IO_HANDLE result; (void)io_create_parameters; result = NULL; return result; } static void http_proxy_stub_destroy(CONCRETE_IO_HANDLE http_proxy_io) { (void)http_proxy_io; LogError("Function %s is a stub and should never be called", __FUNCTION__); } static int http_proxy_stub_open(CONCRETE_IO_HANDLE http_proxy_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; (void)http_proxy_io; (void)on_io_open_complete; (void)on_io_open_complete_context; (void)on_bytes_received; (void)on_bytes_received_context; (void)on_io_error; (void)on_io_error_context; LogError("Function %s is a stub and should never be called", __FUNCTION__); result = __FAILURE__; return result; } static int http_proxy_stub_close(CONCRETE_IO_HANDLE http_proxy_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) { int result; (void)http_proxy_io; (void)on_io_close_complete; (void)on_io_close_complete_context; LogError("Function %s is a stub and should never be called", __FUNCTION__); result = __FAILURE__; return result; } static int http_proxy_stub_send(CONCRETE_IO_HANDLE http_proxy_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* on_send_complete_context) { int result; (void)http_proxy_io; (void)buffer; (void)size; (void)on_send_complete; (void)on_send_complete_context; LogError("Function %s is a stub and should never be called", __FUNCTION__); result = __FAILURE__; return result; } static void http_proxy_stub_dowork(CONCRETE_IO_HANDLE http_proxy_io) { (void)http_proxy_io; LogError("Function %s is a stub and should never be called", __FUNCTION__); } static int http_proxy_stub_set_option(CONCRETE_IO_HANDLE http_proxy_io, const char* option_name, const void* value) { int result; (void)http_proxy_io; (void)option_name; (void)value; LogError("Function %s is a stub and should never be called", __FUNCTION__); result = __FAILURE__; return result; } static OPTIONHANDLER_HANDLE http_proxy_stub_retrieve_options(CONCRETE_IO_HANDLE http_proxy_io) { OPTIONHANDLER_HANDLE result; (void)http_proxy_io; LogError("Function %s is a stub and should never be called", __FUNCTION__); result = NULL; return result; } static const IO_INTERFACE_DESCRIPTION http_proxy_stub_interface_description = { http_proxy_stub_retrieve_options, http_proxy_stub_create, http_proxy_stub_destroy, http_proxy_stub_open, http_proxy_stub_close, http_proxy_stub_send, http_proxy_stub_dowork, http_proxy_stub_set_option }; const IO_INTERFACE_DESCRIPTION* http_proxy_io_get_interface_description(void) { /* Codes_SRS_HTTP_PROXY_IO_01_049: [ `http_proxy_io_get_interface_description` shall return a pointer to an `IO_INTERFACE_DESCRIPTION` structure that contains pointers to the functions: `http_proxy_io_retrieve_options`, `http_proxy_io_retrieve_create`, `http_proxy_io_destroy`, `http_proxy_io_open`, `http_proxy_io_close`, `http_proxy_io_send` and `http_proxy_io_dowork`. ]*/ return &http_proxy_stub_interface_description; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/httpapiex.c000066400000000000000000000677111362133436400323110ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/httpapiex.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/vector.h" typedef struct HTTPAPIEX_SAVED_OPTION_TAG { const char* optionName; const void* value; }HTTPAPIEX_SAVED_OPTION; typedef struct HTTPAPIEX_HANDLE_DATA_TAG { STRING_HANDLE hostName; int k; HTTP_HANDLE httpHandle; VECTOR_HANDLE savedOptions; }HTTPAPIEX_HANDLE_DATA; DEFINE_ENUM_STRINGS(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); #define LOG_HTTAPIEX_ERROR() LogError("error code = %s", ENUM_TO_STRING(HTTPAPIEX_RESULT, result)) HTTPAPIEX_HANDLE HTTPAPIEX_Create(const char* hostName) { HTTPAPIEX_HANDLE result; /*Codes_SRS_HTTPAPIEX_02_001: [If parameter hostName is NULL then HTTPAPIEX_Create shall return NULL.]*/ if (hostName == NULL) { LogError("invalid (NULL) parameter"); result = NULL; } else { /*Codes_SRS_HTTPAPIEX_02_005: [If creating the handle fails for any reason, then HTTAPIEX_Create shall return NULL.] */ HTTPAPIEX_HANDLE_DATA* handleData = (HTTPAPIEX_HANDLE_DATA*)malloc(sizeof(HTTPAPIEX_HANDLE_DATA)); if (handleData == NULL) { LogError("malloc failed."); result = NULL; } else { /*Codes_SRS_HTTPAPIEX_02_002: [Parameter hostName shall be saved.]*/ handleData->hostName = STRING_construct(hostName); if (handleData->hostName == NULL) { free(handleData); LogError("unable to STRING_construct"); result = NULL; } else { /*Codes_SRS_HTTPAPIEX_02_004: [Otherwise, HTTPAPIEX_Create shall return a HTTAPIEX_HANDLE suitable for further calls to the module.] */ handleData->savedOptions = VECTOR_create(sizeof(HTTPAPIEX_SAVED_OPTION)); if (handleData->savedOptions == NULL) { STRING_delete(handleData->hostName); free(handleData); result = NULL; } else { handleData->k = -1; handleData->httpHandle = NULL; result = handleData; } } } } return result; } /*this function builds the default request http headers if none are specified*/ /*returns 0 if no error*/ /*any other code is error*/ static int buildRequestHttpHeadersHandle(HTTPAPIEX_HANDLE_DATA *handleData, BUFFER_HANDLE requestContent, HTTP_HEADERS_HANDLE originalRequestHttpHeadersHandle, bool* isOriginalRequestHttpHeadersHandle, HTTP_HEADERS_HANDLE* toBeUsedRequestHttpHeadersHandle) { int result; if (originalRequestHttpHeadersHandle != NULL) { *toBeUsedRequestHttpHeadersHandle = originalRequestHttpHeadersHandle; *isOriginalRequestHttpHeadersHandle = true; } else { /*Codes_SRS_HTTPAPIEX_02_009: [If parameter requestHttpHeadersHandle is NULL then HTTPAPIEX_ExecuteRequest shall allocate a temporary internal instance of HTTPHEADERS, shall add to that instance the following headers Host:{hostname} - as it was indicated by the call to HTTPAPIEX_Create API call Content-Length:the size of the requestContent parameter, and use this instance to all the subsequent calls to HTTPAPI_ExecuteRequest as parameter httpHeadersHandle.] */ *isOriginalRequestHttpHeadersHandle = false; *toBeUsedRequestHttpHeadersHandle = HTTPHeaders_Alloc(); } if (*toBeUsedRequestHttpHeadersHandle == NULL) { result = __FAILURE__; LogError("unable to HTTPHeaders_Alloc"); } else { char temp[22] = { 0 }; (void)size_tToString(temp, 22, BUFFER_length(requestContent)); /*cannot fail, MAX_uint64 has 19 digits*/ /*Codes_SRS_HTTPAPIEX_02_011: [If parameter requestHttpHeadersHandle is not NULL then HTTPAPIEX_ExecuteRequest shall create or update the following headers of the request: Host:{hostname} Content-Length:the size of the requestContent parameter, and shall use the so constructed HTTPHEADERS object to all calls to HTTPAPI_ExecuteRequest as parameter httpHeadersHandle.] */ /*Codes_SRS_HTTPAPIEX_02_009: [If parameter requestHttpHeadersHandle is NULL then HTTPAPIEX_ExecuteRequest shall allocate a temporary internal instance of HTTPHEADERS, shall add to that instance the following headers Host:{hostname} - as it was indicated by the call to HTTPAPIEX_Create API call Content-Length:the size of the requestContent parameter, and use this instance to all the subsequent calls to HTTPAPI_ExecuteRequest as parameter httpHeadersHandle.] */ if (!( (HTTPHeaders_ReplaceHeaderNameValuePair(*toBeUsedRequestHttpHeadersHandle, "Host", STRING_c_str(handleData->hostName)) == HTTP_HEADERS_OK) && (HTTPHeaders_ReplaceHeaderNameValuePair(*toBeUsedRequestHttpHeadersHandle, "Content-Length", temp) == HTTP_HEADERS_OK) )) { if (! *isOriginalRequestHttpHeadersHandle) { HTTPHeaders_Free(*toBeUsedRequestHttpHeadersHandle); } *toBeUsedRequestHttpHeadersHandle = NULL; result = __FAILURE__; } else { result = 0; } } return result; } static int buildResponseHttpHeadersHandle(HTTP_HEADERS_HANDLE originalResponsetHttpHeadersHandle, bool* isOriginalResponseHttpHeadersHandle, HTTP_HEADERS_HANDLE* toBeUsedResponsetHttpHeadersHandle) { int result; if (originalResponsetHttpHeadersHandle == NULL) { if ((*toBeUsedResponsetHttpHeadersHandle = HTTPHeaders_Alloc()) == NULL) { result = __FAILURE__; } else { *isOriginalResponseHttpHeadersHandle = false; result = 0; } } else { *isOriginalResponseHttpHeadersHandle = true; *toBeUsedResponsetHttpHeadersHandle = originalResponsetHttpHeadersHandle; result = 0; } return result; } static int buildBufferIfNotExist(BUFFER_HANDLE originalRequestContent, bool* isOriginalRequestContent, BUFFER_HANDLE* toBeUsedRequestContent) { int result; if (originalRequestContent == NULL) { *toBeUsedRequestContent = BUFFER_new(); if (*toBeUsedRequestContent == NULL) { result = __FAILURE__; } else { *isOriginalRequestContent = false; result = 0; } } else { *isOriginalRequestContent = true; *toBeUsedRequestContent = originalRequestContent; result = 0; } return result; } static unsigned int dummyStatusCode; static int buildAllRequests(HTTPAPIEX_HANDLE_DATA* handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeadersHandle, BUFFER_HANDLE requestContent, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHttpHeadersHandle, BUFFER_HANDLE responseContent, const char** toBeUsedRelativePath, HTTP_HEADERS_HANDLE *toBeUsedRequestHttpHeadersHandle, bool *isOriginalRequestHttpHeadersHandle, BUFFER_HANDLE *toBeUsedRequestContent, bool *isOriginalRequestContent, unsigned int** toBeUsedStatusCode, HTTP_HEADERS_HANDLE *toBeUsedResponseHttpHeadersHandle, bool *isOriginalResponseHttpHeadersHandle, BUFFER_HANDLE *toBeUsedResponseContent, bool *isOriginalResponseContent) { int result; (void)requestType; /*Codes_SRS_HTTPAPIEX_02_013: [If requestContent is NULL then HTTPAPIEX_ExecuteRequest shall behave as if a buffer of zero size would have been used, that is, it shall call HTTPAPI_ExecuteRequest with parameter content = NULL and contentLength = 0.]*/ /*Codes_SRS_HTTPAPIEX_02_014: [If requestContent is not NULL then its content and its size shall be used for parameters content and contentLength of HTTPAPI_ExecuteRequest.] */ if (buildBufferIfNotExist(requestContent, isOriginalRequestContent, toBeUsedRequestContent) != 0) { LogError("unable to build the request content"); result = __FAILURE__; } else { if (buildRequestHttpHeadersHandle(handle, *toBeUsedRequestContent, requestHttpHeadersHandle, isOriginalRequestHttpHeadersHandle, toBeUsedRequestHttpHeadersHandle) != 0) { /*Codes_SRS_HTTPAPIEX_02_010: [If any of the operations in SRS_HTTAPIEX_02_009 fails, then HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_ERROR.] */ if (*isOriginalRequestContent == false) { BUFFER_delete(*toBeUsedRequestContent); } LogError("unable to build the request http headers handle"); result = __FAILURE__; } else { /*Codes_SRS_HTTPAPIEX_02_008: [If parameter relativePath is NULL then HTTPAPIEX_INVALID_ARG shall not assume a relative path - that is, it will assume an empty path ("").] */ if (relativePath == NULL) { *toBeUsedRelativePath = ""; } else { *toBeUsedRelativePath = relativePath; } /*Codes_SRS_HTTPAPIEX_02_015: [If statusCode is NULL then HTTPAPIEX_ExecuteRequest shall not write in statusCode the HTTP status code, and it will use a temporary internal int for parameter statusCode to the calls of HTTPAPI_ExecuteRequest.] */ if (statusCode == NULL) { /*Codes_SRS_HTTPAPIEX_02_016: [If statusCode is not NULL then If statusCode is NULL then HTTPAPIEX_ExecuteRequest shall use it for parameter statusCode to the calls of HTTPAPI_ExecuteRequest.] */ *toBeUsedStatusCode = &dummyStatusCode; } else { *toBeUsedStatusCode = statusCode; } /*Codes_SRS_HTTPAPIEX_02_017: [If responseHeaders handle is NULL then HTTPAPIEX_ExecuteRequest shall create a temporary internal instance of HTTPHEADERS object and use that for responseHeaders parameter of HTTPAPI_ExecuteRequest call.] */ /*Codes_SRS_HTTPAPIEX_02_019: [If responseHeaders is not NULL, then then HTTPAPIEX_ExecuteRequest shall use that object as parameter responseHeaders of HTTPAPI_ExecuteRequest call.] */ if (buildResponseHttpHeadersHandle(responseHttpHeadersHandle, isOriginalResponseHttpHeadersHandle, toBeUsedResponseHttpHeadersHandle) != 0) { /*Codes_SRS_HTTPAPIEX_02_018: [If creating the temporary http headers in SRS_HTTPAPIEX_02_017 fails then HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_ERROR.] */ if (*isOriginalRequestContent == false) { BUFFER_delete(*toBeUsedRequestContent); } if (*isOriginalRequestHttpHeadersHandle == false) { HTTPHeaders_Free(*toBeUsedRequestHttpHeadersHandle); } LogError("unable to build response content"); result = __FAILURE__; } else { /*Codes_SRS_HTTPAPIEX_02_020: [If responseContent is NULL then HTTPAPIEX_ExecuteRequest shall create a temporary internal BUFFER object and use that as parameter responseContent of HTTPAPI_ExecuteRequest call.] */ /*Codes_SRS_HTTPAPIEX_02_022: [If responseContent is not NULL then HTTPAPIEX_ExecuteRequest use that as parameter responseContent of HTTPAPI_ExecuteRequest call.] */ if (buildBufferIfNotExist(responseContent, isOriginalResponseContent, toBeUsedResponseContent) != 0) { /*Codes_SRS_HTTPAPIEX_02_021: [If creating the BUFFER_HANDLE in SRS_HTTPAPIEX_02_020 fails, then HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_ERROR.] */ if (*isOriginalRequestContent == false) { BUFFER_delete(*toBeUsedRequestContent); } if (*isOriginalRequestHttpHeadersHandle == false) { HTTPHeaders_Free(*toBeUsedRequestHttpHeadersHandle); } if (*isOriginalResponseHttpHeadersHandle == false) { HTTPHeaders_Free(*toBeUsedResponseHttpHeadersHandle); } LogError("unable to build response content"); result = __FAILURE__; } else { result = 0; } } } } return result; } HTTPAPIEX_RESULT HTTPAPIEX_ExecuteRequest(HTTPAPIEX_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeadersHandle, BUFFER_HANDLE requestContent, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHttpHeadersHandle, BUFFER_HANDLE responseContent) { HTTPAPIEX_RESULT result; /*Codes_SRS_HTTPAPIEX_02_006: [If parameter handle is NULL then HTTPAPIEX_ExecuteRequest shall fail and return HTTPAPIEX_INVALID_ARG.]*/ if (handle == NULL) { result = HTTPAPIEX_INVALID_ARG; LOG_HTTAPIEX_ERROR(); } else { /*Codes_SRS_HTTPAPIEX_02_007: [If parameter requestType does not indicate a valid request, HTTPAPIEX_ExecuteRequest shall fail and return HTTPAPIEX_INVALID_ARG.] */ if (requestType >= COUNT_ARG(HTTPAPI_REQUEST_TYPE_VALUES)) { result = HTTPAPIEX_INVALID_ARG; LOG_HTTAPIEX_ERROR(); } else { HTTPAPIEX_HANDLE_DATA *handleData = (HTTPAPIEX_HANDLE_DATA *)handle; /*call to buildAll*/ const char* toBeUsedRelativePath; HTTP_HEADERS_HANDLE toBeUsedRequestHttpHeadersHandle; bool isOriginalRequestHttpHeadersHandle; BUFFER_HANDLE toBeUsedRequestContent; bool isOriginalRequestContent; unsigned int* toBeUsedStatusCode; HTTP_HEADERS_HANDLE toBeUsedResponseHttpHeadersHandle; bool isOriginalResponseHttpHeadersHandle; BUFFER_HANDLE toBeUsedResponseContent; bool isOriginalResponseContent; if (buildAllRequests(handleData, requestType, relativePath, requestHttpHeadersHandle, requestContent, statusCode, responseHttpHeadersHandle, responseContent, &toBeUsedRelativePath, &toBeUsedRequestHttpHeadersHandle, &isOriginalRequestHttpHeadersHandle, &toBeUsedRequestContent, &isOriginalRequestContent, &toBeUsedStatusCode, &toBeUsedResponseHttpHeadersHandle, &isOriginalResponseHttpHeadersHandle, &toBeUsedResponseContent, &isOriginalResponseContent) != 0) { result = HTTPAPIEX_ERROR; LOG_HTTAPIEX_ERROR(); } else { /*Codes_SRS_HTTPAPIEX_02_023: [HTTPAPIEX_ExecuteRequest shall try to execute the HTTP call by ensuring the following API call sequence is respected:]*/ /*Codes_SRS_HTTPAPIEX_02_024: [If any point in the sequence fails, HTTPAPIEX_ExecuteRequest shall attempt to recover by going back to the previous step and retrying that step.]*/ /*Codes_SRS_HTTPAPIEX_02_025: [If the first step fails, then the sequence fails.]*/ /*Codes_SRS_HTTPAPIEX_02_026: [A step shall be retried at most once.]*/ /*Codes_SRS_HTTPAPIEX_02_027: [If a step has been retried then all subsequent steps shall be retried too.]*/ bool st[3] = { false, false, false }; /*the three levels of possible failure in resilient send: HTTAPI_Init, HTTPAPI_CreateConnection, HTTPAPI_ExecuteRequest*/ if (handleData->k == -1) { handleData->k = 0; } do { bool goOn; if (handleData->k > 2) { /* error */ break; } if (st[handleData->k] == true) /*already been tried*/ { goOn = false; } else { switch (handleData->k) { case 0: { if (HTTPAPI_Init() != HTTPAPI_OK) { goOn = false; } else { goOn = true; } break; } case 1: { if ((handleData->httpHandle = HTTPAPI_CreateConnection(STRING_c_str(handleData->hostName))) == NULL) { goOn = false; } else { size_t i; size_t vectorSize = VECTOR_size(handleData->savedOptions); for (i = 0; i < vectorSize; i++) { /*Codes_SRS_HTTPAPIEX_02_035: [HTTPAPIEX_ExecuteRequest shall pass all the saved options (see HTTPAPIEX_SetOption) to the newly create HTTPAPI_HANDLE in step 2 by calling HTTPAPI_SetOption.]*/ /*Codes_SRS_HTTPAPIEX_02_036: [If setting the option fails, then the failure shall be ignored.] */ HTTPAPIEX_SAVED_OPTION* option = (HTTPAPIEX_SAVED_OPTION*)VECTOR_element(handleData->savedOptions, i); if (HTTPAPI_SetOption(handleData->httpHandle, option->optionName, option->value) != HTTPAPI_OK) { LogError("HTTPAPI_SetOption failed when called for option %s", option->optionName); } } goOn = true; } break; } case 2: { size_t length = BUFFER_length(toBeUsedRequestContent); unsigned char* buffer = BUFFER_u_char(toBeUsedRequestContent); if (HTTPAPI_ExecuteRequest(handleData->httpHandle, requestType, toBeUsedRelativePath, toBeUsedRequestHttpHeadersHandle, buffer, length, toBeUsedStatusCode, toBeUsedResponseHttpHeadersHandle, toBeUsedResponseContent) != HTTPAPI_OK) { goOn = false; } else { goOn = true; } break; } default: { /*serious error*/ goOn = false; break; } } } if (goOn) { if (handleData->k == 2) { /*Codes_SRS_HTTPAPIEX_02_028: [HTTPAPIEX_ExecuteRequest shall return HTTPAPIEX_OK when a call to HTTPAPI_ExecuteRequest has been completed successfully.]*/ result = HTTPAPIEX_OK; goto out; } else { st[handleData->k] = true; handleData->k++; st[handleData->k] = false; } } else { st[handleData->k] = false; handleData->k--; switch (handleData->k) { case 0: { HTTPAPI_Deinit(); break; } case 1: { HTTPAPI_CloseConnection(handleData->httpHandle); handleData->httpHandle = NULL; break; } case 2: { break; } default: { break; } } } } while (handleData->k >= 0); /*Codes_SRS_HTTPAPIEX_02_029: [Otherwise, HTTAPIEX_ExecuteRequest shall return HTTPAPIEX_RECOVERYFAILED.] */ result = HTTPAPIEX_RECOVERYFAILED; LogError("unable to recover sending to a working state"); out:; /*in all cases, unbuild the temporaries*/ if (isOriginalRequestContent == false) { BUFFER_delete(toBeUsedRequestContent); } if (isOriginalRequestHttpHeadersHandle == false) { HTTPHeaders_Free(toBeUsedRequestHttpHeadersHandle); } if (isOriginalResponseContent == false) { BUFFER_delete(toBeUsedResponseContent); } if (isOriginalResponseHttpHeadersHandle == false) { HTTPHeaders_Free(toBeUsedResponseHttpHeadersHandle); } } } } return result; } void HTTPAPIEX_Destroy(HTTPAPIEX_HANDLE handle) { if (handle != NULL) { /*Codes_SRS_HTTPAPIEX_02_042: [HTTPAPIEX_Destroy shall free all the resources used by HTTAPIEX_HANDLE.]*/ size_t i; size_t vectorSize; HTTPAPIEX_HANDLE_DATA* handleData = (HTTPAPIEX_HANDLE_DATA*)handle; if (handleData->k == 2) { HTTPAPI_CloseConnection(handleData->httpHandle); HTTPAPI_Deinit(); } STRING_delete(handleData->hostName); vectorSize = VECTOR_size(handleData->savedOptions); for (i = 0; i < vectorSize; i++) { HTTPAPIEX_SAVED_OPTION* savedOption = (HTTPAPIEX_SAVED_OPTION*)VECTOR_element(handleData->savedOptions, i); free((void*)savedOption->optionName); free((void*)savedOption->value); } VECTOR_destroy(handleData->savedOptions); free(handle); } else { /*Codes_SRS_HTTPAPIEX_02_043: [If parameter handle is NULL then HTTPAPIEX_Destroy shall take no action.] */ } } static bool sameName(const void* element, const void* value) { return (strcmp(((HTTPAPIEX_SAVED_OPTION*)element)->optionName, (const char*)value) == 0) ? true : false; } /*return 0 on success, any other value is error*/ /*obs: value is already cloned at the time of calling this function */ static int createOrUpdateOption(HTTPAPIEX_HANDLE_DATA* handleData, const char* optionName, const void* value) { /*this function is called after the option value has been saved (cloned)*/ int result; /*decide bwtween update or create*/ HTTPAPIEX_SAVED_OPTION* whereIsIt = (HTTPAPIEX_SAVED_OPTION*)VECTOR_find_if(handleData->savedOptions, sameName, optionName); if (whereIsIt != NULL) { free((void*)(whereIsIt->value)); whereIsIt->value = value; result = 0; } else { HTTPAPIEX_SAVED_OPTION newOption; if (mallocAndStrcpy_s((char**)&(newOption.optionName), optionName) != 0) { free((void*)value); result = __FAILURE__; } else { newOption.value = value; if (VECTOR_push_back(handleData->savedOptions, &newOption, 1) != 0) { LogError("unable to VECTOR_push_back"); free((void*)newOption.optionName); free((void*)value); result = __FAILURE__; } else { result = 0; } } } return result; } HTTPAPIEX_RESULT HTTPAPIEX_SetOption(HTTPAPIEX_HANDLE handle, const char* optionName, const void* value) { HTTPAPIEX_RESULT result; /*Codes_SRS_HTTPAPIEX_02_032: [If parameter handle is NULL then HTTPAPIEX_SetOption shall return HTTPAPIEX_INVALID_ARG.] */ /*Codes_SRS_HTTPAPIEX_02_033: [If parameter optionName is NULL then HTTPAPIEX_SetOption shall return HTTPAPIEX_INVALID_ARG.] */ /*Codes_SRS_HTTPAPIEX_02_034: [If parameter value is NULL then HTTPAPIEX_SetOption shall return HTTPAPIEX_INVALID_ARG.] */ if ( (handle == NULL) || (optionName == NULL) || (value == NULL) ) { result = HTTPAPIEX_INVALID_ARG; LOG_HTTAPIEX_ERROR(); } else { const void* savedOption; HTTPAPI_RESULT saveOptionResult; /*Codes_SRS_HTTPAPIEX_02_037: [HTTPAPIEX_SetOption shall attempt to save the value of the option by calling HTTPAPI_CloneOption passing optionName and value, irrespective of the existence of a HTTPAPI_HANDLE] */ saveOptionResult = HTTPAPI_CloneOption(optionName, value, &savedOption); if(saveOptionResult == HTTPAPI_INVALID_ARG) { /*Codes_SRS_HTTPAPIEX_02_038: [If HTTPAPI_CloneOption returns HTTPAPI_INVALID_ARG then HTTPAPIEX shall return HTTPAPIEX_INVALID_ARG.] */ result = HTTPAPIEX_INVALID_ARG; LOG_HTTAPIEX_ERROR(); } else if (saveOptionResult != HTTPAPI_OK) { /*Codes_SRS_HTTPAPIEX_02_040: [For all other return values of HTTPAPI_SetOption, HTTPIAPIEX_SetOption shall return HTTPAPIEX_ERROR.] */ result = HTTPAPIEX_ERROR; LOG_HTTAPIEX_ERROR(); } else { HTTPAPIEX_HANDLE_DATA* handleData = (HTTPAPIEX_HANDLE_DATA*)handle; /*Codes_SRS_HTTPAPIEX_02_039: [If HTTPAPI_CloneOption returns HTTPAPI_OK then HTTPAPIEX_SetOption shall create or update the pair optionName/value.]*/ if (createOrUpdateOption(handleData, optionName, savedOption) != 0) { /*Codes_SRS_HTTPAPIEX_02_041: [If creating or updating the pair optionName/value fails then shall return HTTPAPIEX_ERROR.] */ result = HTTPAPIEX_ERROR; LOG_HTTAPIEX_ERROR(); } else { /*Codes_SRS_HTTPAPIEX_02_031: [If HTTPAPI_HANDLE exists then HTTPAPIEX_SetOption shall call HTTPAPI_SetOption passing the same optionName and value and shall return a value conforming to the below table:] */ if (handleData->httpHandle != NULL) { HTTPAPI_RESULT HTTPAPI_result = HTTPAPI_SetOption(handleData->httpHandle, optionName, value); if (HTTPAPI_result == HTTPAPI_OK) { result = HTTPAPIEX_OK; } else if (HTTPAPI_result == HTTPAPI_INVALID_ARG) { result = HTTPAPIEX_INVALID_ARG; LOG_HTTAPIEX_ERROR(); } else { result = HTTPAPIEX_ERROR; LOG_HTTAPIEX_ERROR(); } } else { result = HTTPAPIEX_OK; } } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/httpapiexsas.c000066400000000000000000000211621362133436400330060ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include #include #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/sastoken.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/httpapiex.h" #include "azure_c_shared_utility/httpapiexsas.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" typedef struct HTTPAPIEX_SAS_STATE_TAG { char* key; char* uriResource; char* keyName; } HTTPAPIEX_SAS_STATE; static HTTPAPIEX_SAS_STATE* construct_httpex_sas(const char* key, const char* uriResource, const char* keyName) { HTTPAPIEX_SAS_STATE* result; result = (HTTPAPIEX_SAS_STATE*)malloc(sizeof(HTTPAPIEX_SAS_STATE)); if (result == NULL) { LogError("Failure allocating HTTPAPIEX_SAS_Create."); } else { (void)memset(result, 0, sizeof(HTTPAPIEX_SAS_STATE)); if (mallocAndStrcpy_s(&result->key, key) != 0) { /*Codes_SRS_HTTPAPIEXSAS_06_004: [If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL.]*/ LogError("Failure allocating sas key."); HTTPAPIEX_SAS_Destroy(result); result = NULL; } else if (mallocAndStrcpy_s(&result->uriResource, uriResource) != 0) { /*Codes_SRS_HTTPAPIEXSAS_06_004: [If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL.]*/ LogError("Failure allocating sas uriResource."); HTTPAPIEX_SAS_Destroy(result); result = NULL; } else if (keyName != NULL && mallocAndStrcpy_s(&result->keyName, keyName) != 0) { /*Codes_SRS_HTTPAPIEXSAS_06_004: [If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL.]*/ LogError("Failure allocating sas keyName."); HTTPAPIEX_SAS_Destroy(result); result = NULL; } } return result; } HTTPAPIEX_SAS_HANDLE HTTPAPIEX_SAS_Create_From_String(const char* key, const char* uriResource, const char* keyName) { HTTPAPIEX_SAS_HANDLE result = NULL; if (key == NULL || uriResource == NULL) { /* Codes_SRS_HTTPAPIEXSAS_07_001: [ If the parameter key or uriResource is NULL then HTTPAPIEX_SAS_Create_From_String shall return NULL. ] */ LogError("Invalid parameter key: %p, uriResource: %p", key, uriResource); result = NULL; } else { /* Codes_SRS_HTTPAPIEXSAS_07_002: [ If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create_From_String shall return NULL. ] */ result = construct_httpex_sas(key, uriResource, keyName); } /* Codes_SRS_HTTPAPIEXSAS_07_003: [ HTTPAPIEX_SAS_Create_From_String shall create a new instance of HTTPAPIEX_SAS and return a non-NULL handle to it ] */ return result; } HTTPAPIEX_SAS_HANDLE HTTPAPIEX_SAS_Create(STRING_HANDLE key, STRING_HANDLE uriResource, STRING_HANDLE keyName) { HTTPAPIEX_SAS_HANDLE result = NULL; if (key == NULL) { /*Codes_SRS_HTTPAPIEXSAS_06_001: [If the parameter key is NULL then HTTPAPIEX_SAS_Create shall return NULL.]*/ LogError("No key passed to HTTPAPIEX_SAS_Create."); } else if (uriResource == NULL) { /*Codes_SRS_HTTPAPIEXSAS_06_002: [If the parameter uriResource is NULL then HTTPAPIEX_SAS_Create shall return NULL.]*/ LogError("No uri resource passed to HTTPAPIEX_SAS_Create."); } else { /*Codes_SRS_HTTPAPIEXSAS_06_003: [The parameter keyName for HTTPAPIEX_SAS_Create is optional and can be NULL.]*/ /*Codes_SRS_HTTPAPIEXSAS_01_001: [ HTTPAPIEX_SAS_Create shall create a new instance of HTTPAPIEX_SAS and return a non-NULL handle to it. ]*/ result = construct_httpex_sas(STRING_c_str(key), STRING_c_str(uriResource), STRING_c_str(keyName) ); } return result; } void HTTPAPIEX_SAS_Destroy(HTTPAPIEX_SAS_HANDLE handle) { /*Codes_SRS_HTTPAPIEXSAS_06_005: [If the parameter handle is NULL then HTTAPIEX_SAS_Destroy shall do nothing and return.]*/ if (handle) { HTTPAPIEX_SAS_STATE* state = (HTTPAPIEX_SAS_STATE*)handle; /*Codes_SRS_HTTPAPIEXSAS_06_006: [HTTAPIEX_SAS_Destroy shall deallocate any structures denoted by the parameter handle.]*/ if (state->key) { free(state->key); } if (state->uriResource) { free(state->uriResource); } if (state->keyName) { free(state->keyName); } free(state); } } HTTPAPIEX_RESULT HTTPAPIEX_SAS_ExecuteRequest(HTTPAPIEX_SAS_HANDLE sasHandle, HTTPAPIEX_HANDLE handle, HTTPAPI_REQUEST_TYPE requestType, const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeadersHandle, BUFFER_HANDLE requestContent, unsigned int* statusCode, HTTP_HEADERS_HANDLE responseHeadersHandle, BUFFER_HANDLE responseContent) { /*Codes_SRS_HTTPAPIEXSAS_06_007: [If the parameter sasHandle is NULL then HTTPAPIEX_SAS_ExecuteRequest shall simply invoke HTTPAPIEX_ExecuteRequest with the remaining parameters (following sasHandle) as its arguments and shall return immediately with the result of that call as the result of HTTPAPIEX_SAS_ExecuteRequest.]*/ if (sasHandle != NULL) { /*Codes_SRS_HTTPAPIEXSAS_06_008: [if the parameter requestHttpHeadersHandle is NULL then fallthrough.]*/ if (requestHttpHeadersHandle != NULL) { /*Codes_SRS_HTTPAPIEXSAS_06_009: [HTTPHeaders_FindHeaderValue shall be invoked with the requestHttpHeadersHandle as its first argument and the string "Authorization" as its second argument.]*/ /*Codes_SRS_HTTPAPIEXSAS_06_010: [If the return result of the invocation of HTTPHeaders_FindHeaderValue is NULL then fallthrough.]*/ if (HTTPHeaders_FindHeaderValue(requestHttpHeadersHandle, "Authorization") != NULL) { HTTPAPIEX_SAS_STATE* state = (HTTPAPIEX_SAS_STATE*)sasHandle; /*Codes_SRS_HTTPAPIEXSAS_06_018: [A value of type time_t that shall be known as currentTime is obtained from calling get_time.]*/ time_t currentTime = get_time(NULL); /*Codes_SRS_HTTPAPIEXSAS_06_019: [If the value of currentTime is (time_t)-1 is then fallthrough.]*/ if (currentTime == (time_t)-1) { LogError("Time does not appear to be working."); } else { /*Codes_SRS_HTTPAPIEXSAS_06_011: [SASToken_Create shall be invoked.]*/ /*Codes_SRS_HTTPAPIEXSAS_06_012: [If the return result of SASToken_Create is NULL then fallthrough.]*/ size_t expiry = (size_t)(difftime(currentTime, 0) + 3600); STRING_HANDLE newSASToken = SASToken_CreateString(state->key, state->uriResource, state->keyName, expiry); if (newSASToken != NULL) { /*Codes_SRS_HTTPAPIEXSAS_06_013: [HTTPHeaders_ReplaceHeaderNameValuePair shall be invoked with "Authorization" as its second argument and STRING_c_str (newSASToken) as its third argument.]*/ if (HTTPHeaders_ReplaceHeaderNameValuePair(requestHttpHeadersHandle, "Authorization", STRING_c_str(newSASToken)) != HTTP_HEADERS_OK) { /*Codes_SRS_HTTPAPIEXSAS_06_014: [If the result of the invocation of HTTPHeaders_ReplaceHeaderNameValuePair is NOT HTTP_HEADERS_OK then fallthrough.]*/ LogError("Unable to replace the old SAS Token."); } /*Codes_SRS_HTTPAPIEXSAS_06_015: [STRING_delete(newSASToken) will be invoked.]*/ STRING_delete(newSASToken); } else { LogError("Unable to create a new SAS token."); } } } } } /*Codes_SRS_HTTPAPIEXSAS_06_016: [HTTPAPIEX_ExecuteRequest with the remaining parameters (following sasHandle) as its arguments will be invoked and the result of that call is the result of HTTPAPIEX_SAS_ExecuteRequest.]*/ return HTTPAPIEX_ExecuteRequest(handle,requestType,relativePath,requestHttpHeadersHandle,requestContent,statusCode,responseHeadersHandle,responseContent); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/httpheaders.c000066400000000000000000000361051362133436400326070ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/httpheaders.h" #include #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/xlogging.h" DEFINE_ENUM_STRINGS(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT_VALUES); typedef struct HTTP_HEADERS_HANDLE_DATA_TAG { MAP_HANDLE headers; } HTTP_HEADERS_HANDLE_DATA; HTTP_HEADERS_HANDLE HTTPHeaders_Alloc(void) { /*Codes_SRS_HTTP_HEADERS_99_002:[ This API shall produce a HTTP_HANDLE that can later be used in subsequent calls to the module.]*/ HTTP_HEADERS_HANDLE_DATA* result; result = (HTTP_HEADERS_HANDLE_DATA*)malloc(sizeof(HTTP_HEADERS_HANDLE_DATA)); if (result == NULL) { LogError("malloc failed"); } else { /*Codes_SRS_HTTP_HEADERS_99_004:[ After a successful init, HTTPHeaders_GetHeaderCount shall report 0 existing headers.]*/ result->headers = Map_Create(NULL); if (result->headers == NULL) { LogError("Map_Create failed"); free(result); result = NULL; } else { /*all is fine*/ } } /*Codes_SRS_HTTP_HEADERS_99_003:[ The function shall return NULL when the function cannot execute properly]*/ return (HTTP_HEADERS_HANDLE)result; } /*Codes_SRS_HTTP_HEADERS_99_005:[ Calling this API shall de-allocate the data structures allocated by previous API calls to the same handle.]*/ void HTTPHeaders_Free(HTTP_HEADERS_HANDLE handle) { /*Codes_SRS_HTTP_HEADERS_02_001: [If httpHeadersHandle is NULL then HTTPHeaders_Free shall perform no action.] */ if (handle == NULL) { /*do nothing*/ } else { /*Codes_SRS_HTTP_HEADERS_99_005:[ Calling this API shall de-allocate the data structures allocated by previous API calls to the same handle.]*/ HTTP_HEADERS_HANDLE_DATA* handleData = (HTTP_HEADERS_HANDLE_DATA*)handle; Map_Destroy(handleData->headers); free(handleData); } } /*Codes_SRS_HTTP_HEADERS_99_012:[ Calling this API shall record a header from name and value parameters.]*/ static HTTP_HEADERS_RESULT headers_ReplaceHeaderNameValuePair(HTTP_HEADERS_HANDLE handle, const char* name, const char* value, bool replace) { HTTP_HEADERS_RESULT result; /*Codes_SRS_HTTP_HEADERS_99_014:[ The function shall return when the handle is not valid or when name parameter is NULL or when value parameter is NULL.]*/ if ( (handle == NULL) || (name == NULL) || (value == NULL) ) { result = HTTP_HEADERS_INVALID_ARG; LogError("invalid arg (NULL) , result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { /*Codes_SRS_HTTP_HEADERS_99_036:[ If name contains the characters outside character codes 33 to 126 then the return value shall be HTTP_HEADERS_INVALID_ARG]*/ /*Codes_SRS_HTTP_HEADERS_99_031:[ If name contains the character ":" then the return value shall be HTTP_HEADERS_INVALID_ARG.]*/ size_t i; size_t nameLen = strlen(name); for (i = 0; i < nameLen; i++) { if ((name[i] < 33) || (126 < name[i]) || (name[i] == ':')) { break; } } if (i < nameLen) { result = HTTP_HEADERS_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { HTTP_HEADERS_HANDLE_DATA* handleData = (HTTP_HEADERS_HANDLE_DATA*)handle; const char* existingValue = Map_GetValueFromKey(handleData->headers, name); /*eat up the whitespaces from value, as per RFC 2616, chapter 4.2 "The field value MAY be preceded by any amount of LWS, though a single SP is preferred."*/ /*Codes_SRS_HTTP_HEADERS_02_002: [The LWS from the beginning of the value shall not be stored.] */ while ((value[0] == ' ') || (value[0] == '\t') || (value[0] == '\r') || (value[0] == '\n')) { value++; } if (!replace && (existingValue != NULL)) { size_t existingValueLen = strlen(existingValue); size_t valueLen = strlen(value); char* newValue = (char*)malloc(sizeof(char) * (existingValueLen + /*COMMA_AND_SPACE_LENGTH*/ 2 + valueLen + /*EOL*/ 1)); if (newValue == NULL) { /*Codes_SRS_HTTP_HEADERS_99_015:[ The function shall return HTTP_HEADERS_ALLOC_FAILED when an internal request to allocate memory fails.]*/ result = HTTP_HEADERS_ALLOC_FAILED; LogError("failed to malloc , result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { char* runNewValue; /*Codes_SRS_HTTP_HEADERS_99_017:[ If the name already exists in the collection of headers, the function shall concatenate the new value after the existing value, separated by a comma and a space as in: old-value+", "+new-value.]*/ (void)memcpy(newValue, existingValue, existingValueLen); runNewValue = newValue + existingValueLen; (*runNewValue++) = ','; (*runNewValue++) = ' '; (void)memcpy(runNewValue, value, valueLen + /*EOL*/ 1); /*Codes_SRS_HTTP_HEADERS_99_016:[ The function shall store the name:value pair in such a way that when later retrieved by a call to GetHeader it will return a string that shall strcmp equal to the name+": "+value.]*/ if (Map_AddOrUpdate(handleData->headers, name, newValue) != MAP_OK) { /*Codes_SRS_HTTP_HEADERS_99_015:[ The function shall return HTTP_HEADERS_ALLOC_FAILED when an internal request to allocate memory fails.]*/ result = HTTP_HEADERS_ERROR; LogError("failed to Map_AddOrUpdate, result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { /*Codes_SRS_HTTP_HEADERS_99_013:[ The function shall return HTTP_HEADERS_OK when execution is successful.]*/ result = HTTP_HEADERS_OK; } free(newValue); } } else { /*Codes_SRS_HTTP_HEADERS_99_016:[ The function shall store the name:value pair in such a way that when later retrieved by a call to GetHeader it will return a string that shall strcmp equal to the name+": "+value.]*/ if (Map_AddOrUpdate(handleData->headers, name, value) != MAP_OK) { /*Codes_SRS_HTTP_HEADERS_99_015:[ The function shall return HTTP_HEADERS_ALLOC_FAILED when an internal request to allocate memory fails.]*/ result = HTTP_HEADERS_ALLOC_FAILED; LogError("failed to Map_AddOrUpdate, result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { result = HTTP_HEADERS_OK; } } } } return result; } HTTP_HEADERS_RESULT HTTPHeaders_AddHeaderNameValuePair(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name, const char* value) { return headers_ReplaceHeaderNameValuePair(httpHeadersHandle, name, value, false); } /* Codes_SRS_HTTP_HEADERS_06_001: [This API will perform exactly as HTTPHeaders_AddHeaderNameValuePair except that if the header name already exists the already existing value will be replaced as opposed to concatenated to.] */ HTTP_HEADERS_RESULT HTTPHeaders_ReplaceHeaderNameValuePair(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name, const char* value) { return headers_ReplaceHeaderNameValuePair(httpHeadersHandle, name, value, true); } const char* HTTPHeaders_FindHeaderValue(HTTP_HEADERS_HANDLE httpHeadersHandle, const char* name) { const char* result; /*Codes_SRS_HTTP_HEADERS_99_022:[ The return value shall be NULL if name parameter is NULL or if httpHeadersHandle is NULL]*/ if ( (httpHeadersHandle == NULL) || (name == NULL) ) { result = NULL; } else { /*Codes_SRS_HTTP_HEADERS_99_018:[ Calling this API shall retrieve the value for a previously stored name.]*/ /*Codes_SRS_HTTP_HEADERS_99_020:[ The return value shall be different than NULL when the name matches the name of a previously stored name:value pair.] */ /*Codes_SRS_HTTP_HEADERS_99_021:[ In this case the return value shall point to a string that shall strcmp equal to the original stored string.]*/ HTTP_HEADERS_HANDLE_DATA* handleData = (HTTP_HEADERS_HANDLE_DATA*)httpHeadersHandle; result = Map_GetValueFromKey(handleData->headers, name); } return result; } HTTP_HEADERS_RESULT HTTPHeaders_GetHeaderCount(HTTP_HEADERS_HANDLE handle, size_t* headerCount) { HTTP_HEADERS_RESULT result; /*Codes_SRS_HTTP_HEADERS_99_024:[ The function shall return HTTP_HEADERS_INVALID_ARG when an invalid handle is passed.]*/ /*Codes_SRS_HTTP_HEADERS_99_025:[ The function shall return HTTP_HEADERS_INVALID_ARG when headersCount is NULL.]*/ if ((handle == NULL) || (headerCount == NULL)) { result = HTTP_HEADERS_INVALID_ARG; LogError("(result = %s)", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { HTTP_HEADERS_HANDLE_DATA *handleData = (HTTP_HEADERS_HANDLE_DATA *)handle; const char*const* keys; const char*const* values; /*Codes_SRS_HTTP_HEADERS_99_023:[ Calling this API shall provide the number of stored headers.]*/ if (Map_GetInternals(handleData->headers, &keys, &values, headerCount) != MAP_OK) { /*Codes_SRS_HTTP_HEADERS_99_037:[ The function shall return HTTP_HEADERS_ERROR when an internal error occurs.]*/ result = HTTP_HEADERS_ERROR; LogError("Map_GetInternals failed, result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { /*Codes_SRS_HTTP_HEADERS_99_026:[ The function shall write in *headersCount the number of currently stored headers and shall return HTTP_HEADERS_OK]*/ result = HTTP_HEADERS_OK; } } return result; } /*produces a string in *destination that is equal to name: value*/ HTTP_HEADERS_RESULT HTTPHeaders_GetHeader(HTTP_HEADERS_HANDLE handle, size_t index, char** destination) { HTTP_HEADERS_RESULT result = HTTP_HEADERS_OK; /*Codes_SRS_HTTP_HEADERS_99_028:[ The function shall return NULL if the handle is invalid.]*/ /*Codes_SRS_HTTP_HEADERS_99_032:[ The function shall return HTTP_HEADERS_INVALID_ARG if the destination is NULL]*/ if ( (handle == NULL) || (destination == NULL) ) { result = HTTP_HEADERS_INVALID_ARG; LogError("invalid arg (NULL), result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } /*Codes_SRS_HTTP_HEADERS_99_029:[ The function shall return HTTP_HEADERS_INVALID_ARG if index is not valid (for example, out of range) for the currently stored headers.]*/ else { HTTP_HEADERS_HANDLE_DATA* handleData = (HTTP_HEADERS_HANDLE_DATA*)handle; const char*const* keys; const char*const* values; size_t headerCount; if (Map_GetInternals(handleData->headers, &keys, &values, &headerCount) != MAP_OK) { /*Codes_SRS_HTTP_HEADERS_99_034:[ The function shall return HTTP_HEADERS_ERROR when an internal error occurs]*/ result = HTTP_HEADERS_ERROR; LogError("Map_GetInternals failed, result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { /*Codes_SRS_HTTP_HEADERS_99_029:[ The function shall return HTTP_HEADERS_INVALID_ARG if index is not valid (for example, out of range) for the currently stored headers.]*/ if (index >= headerCount) { result = HTTP_HEADERS_INVALID_ARG; LogError("index out of bounds, result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { size_t keyLen = strlen(keys[index]); size_t valueLen = strlen(values[index]); *destination = (char*)malloc(sizeof(char) * (keyLen + /*COLON_AND_SPACE_LENGTH*/ 2 + valueLen + /*EOL*/ 1)); if (*destination == NULL) { /*Codes_SRS_HTTP_HEADERS_99_034:[ The function shall return HTTP_HEADERS_ERROR when an internal error occurs]*/ result = HTTP_HEADERS_ERROR; LogError("unable to malloc, result= %s", ENUM_TO_STRING(HTTP_HEADERS_RESULT, result)); } else { /*Codes_SRS_HTTP_HEADERS_99_016:[ The function shall store the name:value pair in such a way that when later retrieved by a call to GetHeader it will return a string that shall strcmp equal to the name+": "+value.]*/ /*Codes_SRS_HTTP_HEADERS_99_027:[ Calling this API shall produce the string value+": "+pair) for the index header in the *destination parameter.]*/ char* runDestination = (*destination); (void)memcpy(runDestination, keys[index], keyLen); runDestination += keyLen; (*runDestination++) = ':'; (*runDestination++) = ' '; (void)memcpy(runDestination, values[index], valueLen + /*EOL*/ 1); /*Codes_SRS_HTTP_HEADERS_99_035:[ The function shall return HTTP_HEADERS_OK when the function executed without error.]*/ result = HTTP_HEADERS_OK; } } } } return result; } HTTP_HEADERS_HANDLE HTTPHeaders_Clone(HTTP_HEADERS_HANDLE handle) { HTTP_HEADERS_HANDLE_DATA* result; /*Codes_SRS_HTTP_HEADERS_02_003: [If handle is NULL then HTTPHeaders_Clone shall return NULL.] */ if (handle == NULL) { result = NULL; } else { /*Codes_SRS_HTTP_HEADERS_02_004: [Otherwise HTTPHeaders_Clone shall clone the content of handle to a new handle.] */ result = (HTTP_HEADERS_HANDLE_DATA*)malloc(sizeof(HTTP_HEADERS_HANDLE_DATA)); if (result == NULL) { /*Codes_SRS_HTTP_HEADERS_02_005: [If cloning fails for any reason, then HTTPHeaders_Clone shall return NULL.] */ } else { HTTP_HEADERS_HANDLE_DATA* handleData = handle; result->headers = Map_Clone(handleData->headers); if (result->headers == NULL) { /*Codes_SRS_HTTP_HEADERS_02_005: [If cloning fails for any reason, then HTTPHeaders_Clone shall return NULL.] */ free(result); result = NULL; } else { /*all is fine*/ } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/map.c000066400000000000000000000550101362133436400310450ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/strings.h" DEFINE_ENUM_STRINGS(MAP_RESULT, MAP_RESULT_VALUES); typedef struct MAP_HANDLE_DATA_TAG { char** keys; char** values; size_t count; MAP_FILTER_CALLBACK mapFilterCallback; }MAP_HANDLE_DATA; #define LOG_MAP_ERROR LogError("result = %s", ENUM_TO_STRING(MAP_RESULT, result)); MAP_HANDLE Map_Create(MAP_FILTER_CALLBACK mapFilterFunc) { /*Codes_SRS_MAP_02_001: [Map_Create shall create a new, empty map.]*/ MAP_HANDLE_DATA* result = (MAP_HANDLE_DATA*)malloc(sizeof(MAP_HANDLE_DATA)); /*Codes_SRS_MAP_02_002: [If during creation there are any error, then Map_Create shall return NULL.]*/ if (result != NULL) { /*Codes_SRS_MAP_02_003: [Otherwise, it shall return a non-NULL handle that can be used in subsequent calls.] */ result->keys = NULL; result->values = NULL; result->count = 0; result->mapFilterCallback = mapFilterFunc; } return (MAP_HANDLE)result; } void Map_Destroy(MAP_HANDLE handle) { /*Codes_SRS_MAP_02_005: [If parameter handle is NULL then Map_Destroy shall take no action.] */ if (handle != NULL) { /*Codes_SRS_MAP_02_004: [Map_Destroy shall release all resources associated with the map.] */ MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA*)handle; size_t i; for (i = 0; i < handleData->count; i++) { free(handleData->keys[i]); free(handleData->values[i]); } free(handleData->keys); free(handleData->values); free(handleData); } } /*makes a copy of a vector of const char*, having size "size". source cannot be NULL*/ /*returns NULL if it fails*/ static char** Map_CloneVector(const char*const * source, size_t count) { char** result; result = (char**)malloc(count *sizeof(char*)); if (result == NULL) { /*do nothing, just return it (NULL)*/ } else { size_t i; for (i = 0; i < count; i++) { if (mallocAndStrcpy_s(result + i, source[i]) != 0) { break; } } if (i == count) { /*it is all good, proceed to return result*/ } else { size_t j; for (j = 0; j < i; j++) { free(result[j]); } free(result); result = NULL; } } return result; } /*Codes_SRS_MAP_02_039: [Map_Clone shall make a copy of the map indicated by parameter handle and return a non-NULL handle to it.]*/ MAP_HANDLE Map_Clone(MAP_HANDLE handle) { MAP_HANDLE_DATA* result; if (handle == NULL) { /*Codes_SRS_MAP_02_038: [Map_Clone returns NULL if parameter handle is NULL.]*/ result = NULL; LogError("invalid arg to Map_Clone (NULL)"); } else { MAP_HANDLE_DATA * handleData = (MAP_HANDLE_DATA *)handle; result = (MAP_HANDLE_DATA*)malloc(sizeof(MAP_HANDLE_DATA)); if (result == NULL) { /*Codes_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ /*do nothing, proceed to return it, this is an error case*/ LogError("unable to malloc"); } else { if (handleData->count == 0) { result->count = 0; result->keys = NULL; result->values = NULL; result->mapFilterCallback = NULL; } else { result->mapFilterCallback = handleData->mapFilterCallback; result->count = handleData->count; if( (result->keys = Map_CloneVector((const char* const*)handleData->keys, handleData->count))==NULL) { /*Codes_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ LogError("unable to clone keys"); free(result); result = NULL; } else if ((result->values = Map_CloneVector((const char* const*)handleData->values, handleData->count)) == NULL) { size_t i; /*Codes_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ LogError("unable to clone values"); for (i = 0; i < result->count; i++) { free(result->keys[i]); } free(result->keys); free(result); result = NULL; } else { /*all fine, return it*/ } } } } return (MAP_HANDLE)result; } static int Map_IncreaseStorageKeysValues(MAP_HANDLE_DATA* handleData) { int result; char** newKeys = (char**)realloc(handleData->keys, (handleData->count + 1) * sizeof(char*)); if (newKeys == NULL) { LogError("realloc error"); result = __FAILURE__; } else { char** newValues; handleData->keys = newKeys; handleData->keys[handleData->count] = NULL; newValues = (char**)realloc(handleData->values, (handleData->count + 1) * sizeof(char*)); if (newValues == NULL) { LogError("realloc error"); if (handleData->count == 0) /*avoiding an implementation defined behavior */ { free(handleData->keys); handleData->keys = NULL; } else { char** undoneKeys = (char**)realloc(handleData->keys, (handleData->count) * sizeof(char*)); if (undoneKeys == NULL) { LogError("CATASTROPHIC error, unable to undo through realloc to a smaller size"); } else { handleData->keys = undoneKeys; } } result = __FAILURE__; } else { handleData->values = newValues; handleData->values[handleData->count] = NULL; handleData->count++; result = 0; } } return result; } static void Map_DecreaseStorageKeysValues(MAP_HANDLE_DATA* handleData) { if (handleData->count == 1) { free(handleData->keys); handleData->keys = NULL; free(handleData->values); handleData->values = NULL; handleData->count = 0; handleData->mapFilterCallback = NULL; } else { /*certainly > 1...*/ char** undoneValues; char** undoneKeys = (char**)realloc(handleData->keys, sizeof(char*)* (handleData->count - 1)); if (undoneKeys == NULL) { LogError("CATASTROPHIC error, unable to undo through realloc to a smaller size"); } else { handleData->keys = undoneKeys; } undoneValues = (char**)realloc(handleData->values, sizeof(char*)* (handleData->count - 1)); if (undoneValues == NULL) { LogError("CATASTROPHIC error, unable to undo through realloc to a smaller size"); } else { handleData->values = undoneValues; } handleData->count--; } } static char** findKey(MAP_HANDLE_DATA* handleData, const char* key) { char** result; if (handleData->keys == NULL) { result = NULL; } else { size_t i; result = NULL; for (i = 0; i < handleData->count; i++) { if (strcmp(handleData->keys[i], key) == 0) { result = handleData->keys + i; break; } } } return result; } static char** findValue(MAP_HANDLE_DATA* handleData, const char* value) { char** result; if (handleData->values == NULL) { result = NULL; } else { size_t i; result = NULL; for (i = 0; i < handleData->count; i++) { if (strcmp(handleData->values[i], value) == 0) { result = handleData->values + i; break; } } } return result; } static int insertNewKeyValue(MAP_HANDLE_DATA* handleData, const char* key, const char* value) { int result; if (Map_IncreaseStorageKeysValues(handleData) != 0) /*this increases handleData->count*/ { result = __FAILURE__; } else { if (mallocAndStrcpy_s(&(handleData->keys[handleData->count - 1]), key) != 0) { Map_DecreaseStorageKeysValues(handleData); LogError("unable to mallocAndStrcpy_s"); result = __FAILURE__; } else { if (mallocAndStrcpy_s(&(handleData->values[handleData->count - 1]), value) != 0) { free(handleData->keys[handleData->count - 1]); Map_DecreaseStorageKeysValues(handleData); LogError("unable to mallocAndStrcpy_s"); result = __FAILURE__; } else { result = 0; } } } return result; } MAP_RESULT Map_Add(MAP_HANDLE handle, const char* key, const char* value) { MAP_RESULT result; /*Codes_SRS_MAP_02_006: [If parameter handle is NULL then Map_Add shall return MAP_INVALID_ARG.] */ /*Codes_SRS_MAP_02_007: [If parameter key is NULL then Map_Add shall return MAP_INVALID_ARG.]*/ /*Codes_SRS_MAP_02_008: [If parameter value is NULL then Map_Add shall return MAP_INVALID_ARG.] */ if ( (handle == NULL) || (key == NULL) || (value == NULL) ) { result = MAP_INVALIDARG; LOG_MAP_ERROR; } else { MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA*)handle; /*Codes_SRS_MAP_02_009: [If the key already exists, then Map_Add shall return MAP_KEYEXISTS.] */ if (findKey(handleData, key) != NULL) { result = MAP_KEYEXISTS; } else { /* Codes_SRS_MAP_07_009: [If the mapFilterCallback function is not NULL, then the return value will be check and if it is not zero then Map_Add shall return MAP_FILTER_REJECT.] */ if ( (handleData->mapFilterCallback != NULL) && (handleData->mapFilterCallback(key, value) != 0) ) { result = MAP_FILTER_REJECT; } else { /*Codes_SRS_MAP_02_010: [Otherwise, Map_Add shall add the pair to the map.] */ if (insertNewKeyValue(handleData, key, value) != 0) { /*Codes_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ result = MAP_ERROR; LOG_MAP_ERROR; } else { /*Codes_SRS_MAP_02_012: [Otherwise, Map_Add shall return MAP_OK.] */ result = MAP_OK; } } } } return result; } MAP_RESULT Map_AddOrUpdate(MAP_HANDLE handle, const char* key, const char* value) { MAP_RESULT result; /*Codes_SRS_MAP_02_013: [If parameter handle is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG.]*/ /*Codes_SRS_MAP_02_014: [If parameter key is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG.]*/ /*Codes_SRS_MAP_02_015: [If parameter value is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG.] */ if ( (handle == NULL) || (key == NULL) || (value == NULL) ) { result = MAP_INVALIDARG; LOG_MAP_ERROR; } else { MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA*)handle; /* Codes_SRS_MAP_07_008: [If the mapFilterCallback function is not NULL, then the return value will be check and if it is not zero then Map_AddOrUpdate shall return MAP_FILTER_REJECT.] */ if (handleData->mapFilterCallback != NULL && handleData->mapFilterCallback(key, value) != 0) { result = MAP_FILTER_REJECT; } else { char** whereIsIt = findKey(handleData, key); if (whereIsIt == NULL) { /*Codes_SRS_MAP_02_017: [Otherwise, Map_AddOrUpdate shall add the pair to the map.]*/ if (insertNewKeyValue(handleData, key, value) != 0) { result = MAP_ERROR; LOG_MAP_ERROR; } else { result = MAP_OK; } } else { /*Codes_SRS_MAP_02_016: [If the key already exists, then Map_AddOrUpdate shall overwrite the value of the existing key with parameter value.]*/ size_t index = whereIsIt - handleData->keys; size_t valueLength = strlen(value); /*try to realloc value of this key*/ char* newValue = (char*)realloc(handleData->values[index],valueLength + 1); if (newValue == NULL) { result = MAP_ERROR; LOG_MAP_ERROR; } else { (void)memcpy(newValue, value, valueLength + 1); handleData->values[index] = newValue; /*Codes_SRS_MAP_02_019: [Otherwise, Map_AddOrUpdate shall return MAP_OK.] */ result = MAP_OK; } } } } return result; } MAP_RESULT Map_Delete(MAP_HANDLE handle, const char* key) { MAP_RESULT result; /*Codes_SRS_MAP_02_020: [If parameter handle is NULL then Map_Delete shall return MAP_INVALIDARG.]*/ /*Codes_SRS_MAP_02_021: [If parameter key is NULL then Map_Delete shall return MAP_INVALIDARG.]*/ if ( (handle == NULL) || (key == NULL) ) { result = MAP_INVALIDARG; LOG_MAP_ERROR; } else { MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA*)handle; char** whereIsIt = findKey(handleData,key); if (whereIsIt == NULL) { /*Codes_SRS_MAP_02_022: [If key does not exist then Map_Delete shall return MAP_KEYNOTFOUND.]*/ result = MAP_KEYNOTFOUND; } else { /*Codes_SRS_MAP_02_023: [Otherwise, Map_Delete shall remove the key and its associated value from the map and return MAP_OK.]*/ size_t index = whereIsIt - handleData->keys; free(handleData->keys[index]); free(handleData->values[index]); memmove(handleData->keys + index, handleData->keys + index + 1, (handleData->count - index - 1)*sizeof(char*)); /*if order doesn't matter... then this can be optimized*/ memmove(handleData->values + index, handleData->values + index + 1, (handleData->count - index - 1)*sizeof(char*)); Map_DecreaseStorageKeysValues(handleData); result = MAP_OK; } } return result; } MAP_RESULT Map_ContainsKey(MAP_HANDLE handle, const char* key, bool* keyExists) { MAP_RESULT result; /*Codes_SRS_MAP_02_024: [If parameter handle, key or keyExists are NULL then Map_ContainsKey shall return MAP_INVALIDARG.]*/ if ( (handle ==NULL) || (key == NULL) || (keyExists == NULL) ) { result = MAP_INVALIDARG; LOG_MAP_ERROR; } else { MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA*)handle; /*Codes_SRS_MAP_02_025: [Otherwise if a key exists then Map_ContainsKey shall return MAP_OK and shall write in keyExists "true".]*/ /*Codes_SRS_MAP_02_026: [If a key doesn't exist, then Map_ContainsKey shall return MAP_OK and write in keyExists "false".] */ *keyExists = (findKey(handleData, key) != NULL) ? true: false; result = MAP_OK; } return result; } MAP_RESULT Map_ContainsValue(MAP_HANDLE handle, const char* value, bool* valueExists) { MAP_RESULT result; /*Codes_SRS_MAP_02_027: [If parameter handle, value or valueExists is NULL then Map_ContainsValue shall return MAP_INVALIDARG.] */ if ( (handle == NULL) || (value == NULL) || (valueExists == NULL) ) { result = MAP_INVALIDARG; LOG_MAP_ERROR; } else { MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA*)handle; /*Codes_SRS_MAP_02_028: [Otherwise, if a pair has its value equal to the parameter value, the Map_ContainsValue shall return MAP_OK and shall write in valueExists "true".]*/ /*Codes_SRS_MAP_02_029: [Otherwise, if such a does not exist, then Map_ContainsValue shall return MAP_OK and shall write in valueExists "false".] */ *valueExists = (findValue(handleData, value) != NULL) ? true : false; result = MAP_OK; } return result; } const char* Map_GetValueFromKey(MAP_HANDLE handle, const char* key) { const char* result; /*Codes_SRS_MAP_02_040: [If parameter handle or key is NULL then Map_GetValueFromKey returns NULL.]*/ if ( (handle == NULL) || (key == NULL) ) { result = NULL; LogError("invalid parameter to Map_GetValueFromKey"); } else { MAP_HANDLE_DATA * handleData = (MAP_HANDLE_DATA *)handle; char** whereIsIt = findKey(handleData, key); if(whereIsIt == NULL) { /*Codes_SRS_MAP_02_041: [If the key is not found, then Map_GetValueFromKey returns NULL.]*/ result = NULL; } else { /*Codes_SRS_MAP_02_042: [Otherwise, Map_GetValueFromKey returns the key's value.] */ size_t index = whereIsIt - handleData->keys; result = handleData->values[index]; } } return result; } MAP_RESULT Map_GetInternals(MAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count) { MAP_RESULT result; /*Codes_SRS_MAP_02_046: [If parameter handle, keys, values or count is NULL then Map_GetInternals shall return MAP_INVALIDARG.] */ if ( (handle == NULL) || (keys == NULL) || (values == NULL) || (count == NULL) ) { result = MAP_INVALIDARG; LOG_MAP_ERROR; } else { /*Codes_SRS_MAP_02_043: [Map_GetInternals shall produce in *keys an pointer to an array of const char* having all the keys stored so far by the map.]*/ /*Codes_SRS_MAP_02_044: [Map_GetInternals shall produce in *values a pointer to an array of const char* having all the values stored so far by the map.]*/ /*Codes_SRS_MAP_02_045: [ Map_GetInternals shall produce in *count the number of stored keys and values.]*/ MAP_HANDLE_DATA * handleData = (MAP_HANDLE_DATA *)handle; *keys =(const char* const*)(handleData->keys); *values = (const char* const*)(handleData->values); *count = handleData->count; result = MAP_OK; } return result; } STRING_HANDLE Map_ToJSON(MAP_HANDLE handle) { STRING_HANDLE result; /*Codes_SRS_MAP_02_052: [If parameter handle is NULL then Map_ToJSON shall return NULL.] */ if (handle == NULL) { result = NULL; LogError("invalid arg (NULL)"); } else { /*Codes_SRS_MAP_02_048: [Map_ToJSON shall produce a STRING_HANDLE representing the content of the MAP.] */ result = STRING_construct("{"); if (result == NULL) { LogError("STRING_construct failed"); } else { size_t i; MAP_HANDLE_DATA* handleData = (MAP_HANDLE_DATA *)handle; /*Codes_SRS_MAP_02_049: [If the MAP is empty, then Map_ToJSON shall produce the string "{}".*/ bool breakFor = false; /*used to break out of for*/ for (i = 0; (i < handleData->count) && (!breakFor); i++) { /*add one entry to the JSON*/ /*Codes_SRS_MAP_02_050: [If the map has properties then Map_ToJSON shall produce the following string:{"name1":"value1", "name2":"value2" ...}]*/ STRING_HANDLE key = STRING_new_JSON(handleData->keys[i]); if (key == NULL) { LogError("STRING_new_JSON failed"); STRING_delete(result); result = NULL; breakFor = true; } else { STRING_HANDLE value = STRING_new_JSON(handleData->values[i]); if (value == NULL) { LogError("STRING_new_JSON failed"); STRING_delete(result); result = NULL; breakFor = true; } else { if (!( ((i>0) ? (STRING_concat(result, ",") == 0) : 1) && (STRING_concat_with_STRING(result, key) == 0) && (STRING_concat(result, ":") == 0) && (STRING_concat_with_STRING(result, value) == 0) )) { LogError("failed to build the JSON"); STRING_delete(result); result = NULL; breakFor = true; } else { /*all nice, go to the next element in the map*/ } STRING_delete(value); } STRING_delete(key); } } if (breakFor) { LogError("error happened during JSON string builder"); } else { if (STRING_concat(result, "}") != 0) { LogError("failed to build the JSON"); STRING_delete(result); result = NULL; } else { /*return as is, JSON has been build*/ } } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/optionhandler.c000066400000000000000000000242521362133436400331420ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/vector.h" typedef struct OPTION_TAG { const char* name; void* storage; }OPTION; typedef struct OPTIONHANDLER_HANDLE_DATA_TAG { pfCloneOption cloneOption; pfDestroyOption destroyOption; pfSetOption setOption; VECTOR_HANDLE storage; }OPTIONHANDLER_HANDLE_DATA; static OPTIONHANDLER_HANDLE CreateInternal(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { OPTIONHANDLER_HANDLE result; result = (OPTIONHANDLER_HANDLE_DATA*)malloc(sizeof(OPTIONHANDLER_HANDLE_DATA)); if (result == NULL) { /*Codes_SRS_OPTIONHANDLER_02_004: [ Otherwise, OptionHandler_Create shall fail and return NULL. ]*/ LogError("unable to malloc"); /*return as is*/ } else { /*Codes_SRS_OPTIONHANDLER_02_002: [ OptionHandler_Create shall create an empty VECTOR that will hold pairs of const char* and void*. ]*/ result->storage = VECTOR_create(sizeof(OPTION)); if (result->storage == NULL) { /*Codes_SRS_OPTIONHANDLER_02_004: [ Otherwise, OptionHandler_Create shall fail and return NULL. ]*/ LogError("unable to VECTOR_create"); free(result); result = NULL; } else { /*Codes_SRS_OPTIONHANDLER_02_003: [ If all the operations succeed then OptionHandler_Create shall succeed and return a non-NULL handle. ]*/ result->cloneOption = cloneOption; result->destroyOption = destroyOption; result->setOption = setOption; /*return as is*/ } } return result; } static OPTIONHANDLER_RESULT AddOptionInternal(OPTIONHANDLER_HANDLE handle, const char* name, const void* value) { OPTIONHANDLER_RESULT result; const char* cloneOfName; if (mallocAndStrcpy_s((char**)&cloneOfName, name) != 0) { /*Codes_SRS_OPTIONHANDLER_02_009: [ Otherwise, OptionHandler_AddProperty shall succeed and return OPTIONHANDLER_ERROR. ]*/ LogError("unable to clone name"); result = OPTIONHANDLER_ERROR; } else { /*Codes_SRS_OPTIONHANDLER_02_006: [ OptionHandler_AddProperty shall call pfCloneOption passing name and value. ]*/ void* cloneOfValue = handle->cloneOption(name, value); if (cloneOfValue == NULL) { /*Codes_SRS_OPTIONHANDLER_02_009: [ Otherwise, OptionHandler_AddProperty shall succeed and return OPTIONHANDLER_ERROR. ]*/ LogError("unable to clone value"); free((void*)cloneOfName); result = OPTIONHANDLER_ERROR; } else { OPTION temp; temp.name = cloneOfName; temp.storage = cloneOfValue; /*Codes_SRS_OPTIONHANDLER_02_007: [ OptionHandler_AddProperty shall use VECTOR APIs to save the name and the newly created clone of value. ]*/ if (VECTOR_push_back(handle->storage, &temp, 1) != 0) { /*Codes_SRS_OPTIONHANDLER_02_009: [ Otherwise, OptionHandler_AddProperty shall succeed and return OPTIONHANDLER_ERROR. ]*/ LogError("unable to VECTOR_push_back"); handle->destroyOption(name, cloneOfValue); free((void*)cloneOfName); result = OPTIONHANDLER_ERROR; } else { /*Codes_SRS_OPTIONHANDLER_02_008: [ If all the operations succed then OptionHandler_AddProperty shall succeed and return OPTIONHANDLER_OK. ]*/ result = OPTIONHANDLER_OK; } } } return result; } static void DestroyInternal(OPTIONHANDLER_HANDLE handle) { /*Codes_SRS_OPTIONHANDLER_02_016: [ Otherwise, OptionHandler_Destroy shall free all used resources. ]*/ size_t nOptions = VECTOR_size(handle->storage), i; for (i = 0; i < nOptions; i++) { OPTION* option = (OPTION*)VECTOR_element(handle->storage, i); handle->destroyOption(option->name, option->storage); free((void*)option->name); } VECTOR_destroy(handle->storage); free(handle); } OPTIONHANDLER_HANDLE OptionHandler_Create(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { /*Codes_SRS_OPTIONHANDLER_02_001: [ OptionHandler_Create shall fail and retun NULL if any parameters are NULL. ]*/ OPTIONHANDLER_HANDLE_DATA* result; if ( (cloneOption == NULL) || (destroyOption == NULL) || (setOption == NULL) ) { LogError("invalid parameter = pfCloneOption cloneOption=%p, pfDestroyOption destroyOption=%p, pfSetOption setOption=%p", cloneOption, destroyOption, setOption); result = NULL; } else { result = CreateInternal(cloneOption, destroyOption, setOption); } return result; } OPTIONHANDLER_HANDLE OptionHandler_Clone(OPTIONHANDLER_HANDLE handler) { OPTIONHANDLER_HANDLE_DATA* result; if (handler == NULL) { /* Codes_SRS_OPTIONHANDLER_01_010: [ If `handler` is NULL, OptionHandler_Clone shall fail and return NULL. ]*/ LogError("NULL argument: handler"); result = NULL; } else { /* Codes_SRS_OPTIONHANDLER_01_001: [ `OptionHandler_Clone` shall clone an existing option handler instance. ]*/ /* Codes_SRS_OPTIONHANDLER_01_002: [ On success it shall return a non-NULL handle. ]*/ /* Codes_SRS_OPTIONHANDLER_01_003: [ `OptionHandler_Clone` shall allocate memory for the new option handler instance. ]*/ result = CreateInternal(handler->cloneOption, handler->destroyOption, handler->setOption); if (result == NULL) { /* Codes_SRS_OPTIONHANDLER_01_004: [ If allocating memory fails, `OptionHandler_Clone` shall return NULL. ]*/ LogError("unable to create option handler"); } else { /* Codes_SRS_OPTIONHANDLER_01_005: [ `OptionHandler_Clone` shall iterate through all the options stored by the option handler to be cloned by using VECTOR's iteration mechanism. ]*/ size_t option_count = VECTOR_size(handler->storage); size_t i; for (i = 0; i < option_count; i++) { OPTION* option = (OPTION*)VECTOR_element(handler->storage, i); /* Codes_SRS_OPTIONHANDLER_01_006: [ For each option the option name shall be cloned by calling `mallocAndStrcpy_s`. ]*/ /* Codes_SRS_OPTIONHANDLER_01_007: [ For each option the value shall be cloned by using the cloning function associated with the source option handler `handler`. ]*/ if (AddOptionInternal(result, option->name, option->storage) != OPTIONHANDLER_OK) { /* Codes_SRS_OPTIONHANDLER_01_008: [ If cloning one of the option names fails, `OptionHandler_Clone` shall return NULL. ]*/ /* Codes_SRS_OPTIONHANDLER_01_009: [ If cloning one of the option values fails, `OptionHandler_Clone` shall return NULL. ]*/ LogError("Error cloning option %s", option->name); break; } } if (i < option_count) { DestroyInternal(result); result = NULL; } } } return result; } OPTIONHANDLER_RESULT OptionHandler_AddOption(OPTIONHANDLER_HANDLE handle, const char* name, const void* value) { OPTIONHANDLER_RESULT result; /*Codes_SRS_OPTIONHANDLER_02_001: [ OptionHandler_Create shall fail and retun NULL if any parameters are NULL. ]*/ if ( (handle == NULL) || (name == NULL) || (value == NULL) ) { LogError("invalid arguments: OPTIONHANDLER_HANDLE handle=%p, const char* name=%p, void* value=%p", handle, name, value); result= OPTIONHANDLER_INVALIDARG; } else { result = AddOptionInternal(handle, name, value); } return result; } OPTIONHANDLER_RESULT OptionHandler_FeedOptions(OPTIONHANDLER_HANDLE handle, void* destinationHandle) { OPTIONHANDLER_RESULT result; /*Codes_SRS_OPTIONHANDLER_02_010: [ OptionHandler_FeedOptions shall fail and return OPTIONHANDLER_INVALIDARG if any argument is NULL. ]*/ if ( (handle == NULL) || (destinationHandle == NULL) ) { LogError("invalid arguments OPTIONHANDLER_HANDLE handle=%p, void* destinationHandle=%p", handle, destinationHandle); result = OPTIONHANDLER_INVALIDARG; } else { /*Codes_SRS_OPTIONHANDLER_02_011: [ Otherwise, OptionHandler_FeedOptions shall use VECTOR's iteration mechanisms to retrieve pairs of name, value (const char* and void*). ]*/ size_t nOptions = VECTOR_size(handle->storage), i; for (i = 0;i < nOptions;i++) { OPTION* option = (OPTION*)VECTOR_element(handle->storage, i); /*Codes_SRS_OPTIONHANDLER_02_012: [ OptionHandler_FeedOptions shall call for every pair of name,value setOption passing destinationHandle, name and value. ]*/ if (handle->setOption(destinationHandle, option->name, option->storage) != 0) { LogError("failure while trying to _SetOption"); break; } } if (i == nOptions) { /*Codes_SRS_OPTIONHANDLER_02_014: [ Otherwise, OptionHandler_FeedOptions shall fail and return OPTIONHANDLER_ERROR. ]*/ result = OPTIONHANDLER_OK; } else { /*Codes_SRS_OPTIONHANDLER_02_013: [ If all the operations succeed then OptionHandler_FeedOptions shall succeed and return OPTIONHANDLER_OK. ]*/ result = OPTIONHANDLER_ERROR; } } return result; } void OptionHandler_Destroy(OPTIONHANDLER_HANDLE handle) { /*Codes_SRS_OPTIONHANDLER_02_015: [ OptionHandler_Destroy shall do nothing if parameter handle is NULL. ]*/ if (handle == NULL) { LogError("invalid argument OPTIONHANDLER_HANDLE handle=%p", handle); } else { DestroyInternal(handle); } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/sastoken.c000066400000000000000000000352711362133436400321260ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/sastoken.h" #include "azure_c_shared_utility/urlencode.h" #include "azure_c_shared_utility/hmacsha256.h" #include "azure_c_shared_utility/base64.h" #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" static double getExpiryValue(const char* expiryASCII) { double value = 0; size_t i = 0; for (i = 0; expiryASCII[i] != '\0'; i++) { if (expiryASCII[i] >= '0' && expiryASCII[i] <= '9') { value = value * 10 + (expiryASCII[i] - '0'); } else { value = 0; break; } } return value; } bool SASToken_Validate(STRING_HANDLE sasToken) { bool result; /*Codes_SRS_SASTOKEN_25_025: [**SASToken_Validate shall get the SASToken value by invoking STRING_c_str on the handle.**]***/ const char* sasTokenArray = STRING_c_str(sasToken); /* Codes_SRS_SASTOKEN_25_024: [**If handle is NULL then SASToken_Validate shall return false.**] */ /* Codes_SRS_SASTOKEN_25_026: [**If STRING_c_str on handle return NULL then SASToken_Validate shall return false.**] */ if (sasToken == NULL || sasTokenArray == NULL) { result = false; } else { int seStart = -1, seStop = -1; int srStart = -1, srStop = -1; int sigStart = -1, sigStop = -1; int tokenLength = (int)STRING_length(sasToken); int i; for (i = 0; i < tokenLength; i++) { if (sasTokenArray[i] == 's' && sasTokenArray[i + 1] == 'e' && sasTokenArray[i + 2] == '=') // Look for se= { seStart = i + 3; if (srStart > 0 && srStop < 0) { if (sasTokenArray[i - 1] != '&' && sasTokenArray[i - 1] == ' ') // look for either & or space srStop = i - 1; else if (sasTokenArray[i - 1] == '&') srStop = i - 2; else seStart = -1; // as the format is not either "&se=" or " se=" } else if (sigStart > 0 && sigStop < 0) { if (sasTokenArray[i - 1] != '&' && sasTokenArray[i - 1] == ' ') sigStop = i - 1; else if (sasTokenArray[i - 1] == '&') sigStop = i - 2; else seStart = -1; } } else if (sasTokenArray[i] == 's' && sasTokenArray[i + 1] == 'r' && sasTokenArray[i + 2] == '=') // Look for sr= { srStart = i + 3; if (seStart > 0 && seStop < 0) { if (sasTokenArray[i - 1] != '&' && sasTokenArray[i - 1] == ' ') seStop = i - 1; else if (sasTokenArray[i - 1] == '&') seStop = i - 2; else srStart = -1; } else if (sigStart > 0 && sigStop < 0) { if (sasTokenArray[i - 1] != '&' && sasTokenArray[i - 1] == ' ') sigStop = i - 1; else if (sasTokenArray[i - 1] == '&') sigStop = i - 2; else srStart = -1; } } else if (sasTokenArray[i] == 's' && sasTokenArray[i + 1] == 'i' && sasTokenArray[i + 2] == 'g' && sasTokenArray[i + 3] == '=') // Look for sig= { sigStart = i + 4; if (srStart > 0 && srStop < 0) { if (sasTokenArray[i - 1] != '&' && sasTokenArray[i - 1] == ' ') srStop = i - 1; else if (sasTokenArray[i - 1] == '&') srStop = i - 2; else sigStart = -1; } else if (seStart > 0 && seStop < 0) { if (sasTokenArray[i - 1] != '&' && sasTokenArray[i - 1] == ' ') seStop = i - 1; else if (sasTokenArray[i - 1] == '&') seStop = i - 2; else sigStart = -1; } } } /*Codes_SRS_SASTOKEN_25_027: [**If SASTOKEN does not obey the SASToken format then SASToken_Validate shall return false.**]***/ /*Codes_SRS_SASTOKEN_25_028: [**SASToken_validate shall check for the presence of sr, se and sig from the token and return false if not found**]***/ if (seStart < 0 || srStart < 0 || sigStart < 0) { result = false; } else { if (seStop < 0) { seStop = tokenLength; } else if (srStop < 0) { srStop = tokenLength; } else if (sigStop < 0) { sigStop = tokenLength; } if ((seStop <= seStart) || (srStop <= srStart) || (sigStop <= sigStart)) { result = false; } else { char* expiryASCII = (char*)malloc(seStop - seStart + 1); /*Codes_SRS_SASTOKEN_25_031: [**If malloc fails during validation then SASToken_Validate shall return false.**]***/ if (expiryASCII == NULL) { result = false; } else { double expiry; // Add the Null terminator here memset(expiryASCII, 0, seStop - seStart + 1); for (i = seStart; i < seStop; i++) { // The se contains the expiration values, if a & token is encountered then // the se field is complete. if (sasTokenArray[i] == '&') { break; } expiryASCII[i - seStart] = sasTokenArray[i]; } expiry = getExpiryValue(expiryASCII); /*Codes_SRS_SASTOKEN_25_029: [**SASToken_validate shall check for expiry time from token and if token has expired then would return false **]***/ if (expiry <= 0) { result = false; } else { double secSinceEpoch = get_difftime(get_time(NULL), (time_t)0); if (expiry < secSinceEpoch) { /*Codes_SRS_SASTOKEN_25_029: [**SASToken_validate shall check for expiry time from token and if token has expired then would return false **]***/ result = false; } else { /*Codes_SRS_SASTOKEN_25_030: [**SASToken_validate shall return true only if the format is obeyed and the token has not yet expired **]***/ result = true; } } free(expiryASCII); } } } } return result; } static STRING_HANDLE construct_sas_token(const char* key, const char* scope, const char* keyname, size_t expiry) { STRING_HANDLE result; char tokenExpirationTime[32] = { 0 }; BUFFER_HANDLE decodedKey; /*Codes_SRS_SASTOKEN_06_029: [The key parameter is decoded from base64.]*/ if ((decodedKey = Base64_Decoder(key)) == NULL) { /*Codes_SRS_SASTOKEN_06_030: [If there is an error in the decoding then SASToken_Create shall return NULL.]*/ LogError("Unable to decode the key for generating the SAS."); result = NULL; } else { /*Codes_SRS_SASTOKEN_06_026: [If the conversion to string form fails for any reason then SASToken_Create shall return NULL.]*/ if (size_tToString(tokenExpirationTime, sizeof(tokenExpirationTime), expiry) != 0) { LogError("For some reason converting seconds to a string failed. No SAS can be generated."); result = NULL; } else { STRING_HANDLE toBeHashed = NULL; BUFFER_HANDLE hash = NULL; if (((hash = BUFFER_new()) == NULL) || ((toBeHashed = STRING_new()) == NULL) || ((result = STRING_new()) == NULL)) { LogError("Unable to allocate memory to prepare SAS token."); result = NULL; } else { /*Codes_SRS_SASTOKEN_06_009: [The scope is the basis for creating a STRING_HANDLE.]*/ /*Codes_SRS_SASTOKEN_06_010: [A "\n" is appended to that string.]*/ /*Codes_SRS_SASTOKEN_06_011: [tokenExpirationTime is appended to that string.]*/ if ((STRING_concat(toBeHashed, scope) != 0) || (STRING_concat(toBeHashed, "\n") != 0) || (STRING_concat(toBeHashed, tokenExpirationTime) != 0)) { LogError("Unable to build the input to the HMAC to prepare SAS token."); STRING_delete(result); result = NULL; } else { STRING_HANDLE base64Signature = NULL; STRING_HANDLE urlEncodedSignature = NULL; size_t inLen = STRING_length(toBeHashed); const unsigned char* inBuf = (const unsigned char*)STRING_c_str(toBeHashed); size_t outLen = BUFFER_length(decodedKey); unsigned char* outBuf = BUFFER_u_char(decodedKey); /*Codes_SRS_SASTOKEN_06_013: [If an error is returned from the HMAC256 function then NULL is returned from SASToken_Create.]*/ /*Codes_SRS_SASTOKEN_06_012: [An HMAC256 hash is calculated using the decodedKey, over toBeHashed.]*/ /*Codes_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Codes_SRS_SASTOKEN_06_015: [The hash is base 64 encoded.]*/ /*Codes_SRS_SASTOKEN_06_028: [base64Signature shall be url encoded.]*/ /*Codes_SRS_SASTOKEN_06_016: [The string "SharedAccessSignature sr=" is the first part of the result of SASToken_Create.]*/ /*Codes_SRS_SASTOKEN_06_017: [The scope parameter is appended to result.]*/ /*Codes_SRS_SASTOKEN_06_018: [The string "&sig=" is appended to result.]*/ /*Codes_SRS_SASTOKEN_06_019: [The string urlEncodedSignature shall be appended to result.]*/ /*Codes_SRS_SASTOKEN_06_020: [The string "&se=" shall be appended to result.]*/ /*Codes_SRS_SASTOKEN_06_021: [tokenExpirationTime is appended to result.]*/ /*Codes_SRS_SASTOKEN_06_022: [If keyName is non-NULL, the string "&skn=" is appended to result.]*/ /*Codes_SRS_SASTOKEN_06_023: [If keyName is non-NULL, the argument keyName is appended to result.]*/ if ((HMACSHA256_ComputeHash(outBuf, outLen, inBuf, inLen, hash) != HMACSHA256_OK) || ((base64Signature = Base64_Encoder(hash)) == NULL) || ((urlEncodedSignature = URL_Encode(base64Signature)) == NULL) || (STRING_copy(result, "SharedAccessSignature sr=") != 0) || (STRING_concat(result, scope) != 0) || (STRING_concat(result, "&sig=") != 0) || (STRING_concat_with_STRING(result, urlEncodedSignature) != 0) || (STRING_concat(result, "&se=") != 0) || (STRING_concat(result, tokenExpirationTime) != 0) || ((keyname != NULL) && (STRING_concat(result, "&skn=") != 0)) || ((keyname != NULL) && (STRING_concat(result, keyname) != 0))) { LogError("Unable to build the SAS token."); STRING_delete(result); result = NULL; } else { /* everything OK */ } STRING_delete(base64Signature); STRING_delete(urlEncodedSignature); } } STRING_delete(toBeHashed); BUFFER_delete(hash); } BUFFER_delete(decodedKey); } return result; } STRING_HANDLE SASToken_Create(STRING_HANDLE key, STRING_HANDLE scope, STRING_HANDLE keyName, size_t expiry) { STRING_HANDLE result; /*Codes_SRS_SASTOKEN_06_001: [If key is NULL then SASToken_Create shall return NULL.]*/ /*Codes_SRS_SASTOKEN_06_003: [If scope is NULL then SASToken_Create shall return NULL.]*/ /*Codes_SRS_SASTOKEN_06_007: [keyName is optional and can be set to NULL.]*/ if ((key == NULL) || (scope == NULL)) { LogError("Invalid Parameter to SASToken_Create. handle key: %p, handle scope: %p, handle keyName: %p", key, scope, keyName); result = NULL; } else { const char* string_key = STRING_c_str(key); const char* string_scope = STRING_c_str(scope); const char* string_name = STRING_c_str(keyName); result = construct_sas_token(string_key, string_scope, string_name, expiry); } return result; } STRING_HANDLE SASToken_CreateString(const char* key, const char* scope, const char* keyName, size_t expiry) { STRING_HANDLE result; /*Codes_SRS_SASTOKEN_06_001: [If key is NULL then SASToken_Create shall return NULL.]*/ /*Codes_SRS_SASTOKEN_06_003: [If scope is NULL then SASToken_Create shall return NULL.]*/ /*Codes_SRS_SASTOKEN_06_007: [keyName is optional and can be set to NULL.]*/ if ((key == NULL) || (scope == NULL)) { LogError("Invalid Parameter to SASToken_Create. handle key: %p, handle scope: %p, handle keyName: %p", key, scope, keyName); result = NULL; } else { result = construct_sas_token(key, scope, keyName, expiry); } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/sha1.c000066400000000000000000000311451362133436400311270ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /**************************** sha1.c ****************************/ /******************** See RFC 4634 for details ******************/ /* * Description: * This file implements the Secure Hash Signature Standard * algorithms as defined in the National Institute of Standards * and Technology Federal Information Processing Standards * Publication (FIPS PUB) 180-1 published on April 17, 1995, 180-2 * published on August 1, 2002, and the FIPS PUB 180-2 Change * Notice published on February 28, 2004. * * A combined document showing all algorithms is available at * http://csrc.nist.gov/publications/fips/ * fips180-2/fips180-2withchangenotice.pdf * * The SHA-1 algorithm produces a 160-bit message digest for a * given data stream. It should take about 2**n steps to find a * message with the same digest as a given message and * 2**(n/2) to find any two messages with the same digest, * when n is the digest size in bits. Therefore, this * algorithm can serve as a means of providing a * "fingerprint" for a message. * * Portability Issues: * SHA-1 is defined in terms of 32-bit "words". This code * uses (included via "sha.h") to define 32 and 8 * bit unsigned integer types. If your C compiler does not * support 32 bit unsigned integers, this code is not * appropriate. * * Caveats: * SHA-1 is designed to work with messages less than 2^64 bits * long. This implementation uses SHA1Input() to hash the bits * that are a multiple of the size of an 8-bit character, and then * uses SHA1FinalBits() to hash the final few bits of the input. */ #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/sha.h" #include "azure_c_shared_utility/sha-private.h" /* * Define the SHA1 circular left shift macro */ #define SHA1_ROTL(bits,word) \ (((word) << (bits)) | ((word) >> (32-(bits)))) /* * add "length" to the length */ #define SHA1AddLength(context, length) \ (addTemp = (context)->Length_Low, \ (context)->Corrupted = \ (((context)->Length_Low += (length)) < addTemp) && \ (++(context)->Length_High == 0) ? 1 : 0) /* Local Function Prototypes */ static void SHA1Finalize(SHA1Context *context, uint8_t Pad_Byte); static void SHA1PadMessage(SHA1Context *, uint8_t Pad_Byte); static void SHA1ProcessMessageBlock(SHA1Context *); /* * SHA1Reset * * Description: * This function will initialize the SHA1Context in preparation * for computing a new SHA1 message digest. * * Parameters: * context: [in/out] * The context to reset. * * Returns: * sha Error Code. * */ int SHA1Reset(SHA1Context *context) { if (!context) return shaNull; context->Length_Low = 0; context->Length_High = 0; context->Message_Block_Index = 0; /* Initial Hash Values: FIPS-180-2 section 5.3.1 */ context->Intermediate_Hash[0] = 0x67452301; context->Intermediate_Hash[1] = 0xEFCDAB89; context->Intermediate_Hash[2] = 0x98BADCFE; context->Intermediate_Hash[3] = 0x10325476; context->Intermediate_Hash[4] = 0xC3D2E1F0; context->Computed = 0; context->Corrupted = 0; return shaSuccess; } /* * SHA1Input * * Description: * This function accepts an array of octets as the next portion * of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_array: [in] * An array of characters representing the next portion of * the message. * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ int SHA1Input(SHA1Context *context, const uint8_t *message_array, unsigned length) { uint32_t addTemp; if (!length) return shaSuccess; if (!context || !message_array) return shaNull; if (context->Computed) { context->Corrupted = shaStateError; return shaStateError; } if (context->Corrupted) return context->Corrupted; while (length-- && !context->Corrupted) { context->Message_Block[context->Message_Block_Index++] = (*message_array & 0xFF); if (!SHA1AddLength(context, 8) && (context->Message_Block_Index == SHA1_Message_Block_Size)) SHA1ProcessMessageBlock(context); message_array++; } return shaSuccess; } /* * SHA1FinalBits * * Description: * This function will add in any final bits of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_bits: [in] * The final bits of the message, in the upper portion of the * byte. (Use 0b###00000 instead of 0b00000### to input the * three bits ###.) * length: [in] * The number of bits in message_bits, between 1 and 7. * * Returns: * sha Error Code. */ int SHA1FinalBits(SHA1Context *context, const uint8_t message_bits, unsigned int length) { uint32_t addTemp; uint8_t masks[8] = { /* 0 0b00000000 */ 0x00, /* 1 0b10000000 */ 0x80, /* 2 0b11000000 */ 0xC0, /* 3 0b11100000 */ 0xE0, /* 4 0b11110000 */ 0xF0, /* 5 0b11111000 */ 0xF8, /* 6 0b11111100 */ 0xFC, /* 7 0b11111110 */ 0xFE }; uint8_t markbit[8] = { /* 0 0b10000000 */ 0x80, /* 1 0b01000000 */ 0x40, /* 2 0b00100000 */ 0x20, /* 3 0b00010000 */ 0x10, /* 4 0b00001000 */ 0x08, /* 5 0b00000100 */ 0x04, /* 6 0b00000010 */ 0x02, /* 7 0b00000001 */ 0x01 }; if (!length) return shaSuccess; if (!context) return shaNull; if (context->Computed || (length >= 8) || (length == 0)) { context->Corrupted = shaStateError; return shaStateError; } if (context->Corrupted) return context->Corrupted; SHA1AddLength(context, length); SHA1Finalize(context, (uint8_t)((message_bits & masks[length]) | markbit[length])); return shaSuccess; } /* * SHA1Result * * Description: * This function will return the 160-bit message digest into the * Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 19th element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA-1 hash. * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. * */ int SHA1Result(SHA1Context *context, uint8_t Message_Digest[SHA1HashSize]) { int i; if (!context || !Message_Digest) return shaNull; if (context->Corrupted) return context->Corrupted; if (!context->Computed) SHA1Finalize(context, 0x80); for (i = 0; i < SHA1HashSize; ++i) Message_Digest[i] = (uint8_t)(context->Intermediate_Hash[i >> 2] >> 8 * (3 - (i & 0x03))); return shaSuccess; } /* * SHA1Finalize * * Description: * This helper function finishes off the digest calculations. * * Parameters: * context: [in/out] * The SHA context to update * Pad_Byte: [in] * The last byte to add to the digest before the 0-padding * and length. This will contain the last bits of the message * followed by another single bit. If the message was an * exact multiple of 8-bits long, Pad_Byte will be 0x80. * * Returns: * sha Error Code. * */ static void SHA1Finalize(SHA1Context *context, uint8_t Pad_Byte) { int i; SHA1PadMessage(context, Pad_Byte); /* message may be sensitive, clear it out */ for (i = 0; i < SHA1_Message_Block_Size; ++i) context->Message_Block[i] = 0; context->Length_Low = 0; /* and clear length */ context->Length_High = 0; context->Computed = 1; } /* * SHA1PadMessage * * Description: * According to the standard, the message must be padded to an * even 512 bits. The first padding bit must be a '1'. The last * 64 bits represent the length of the original message. All bits * in between should be 0. This helper function will pad the * message according to those rules by filling the Message_Block * array accordingly. When it returns, it can be assumed that the * message digest has been computed. * * Parameters: * context: [in/out] * The context to pad * Pad_Byte: [in] * The last byte to add to the digest before the 0-padding * and length. This will contain the last bits of the message * followed by another single bit. If the message was an * exact multiple of 8-bits long, Pad_Byte will be 0x80. * * Returns: * Nothing. */ static void SHA1PadMessage(SHA1Context *context, uint8_t Pad_Byte) { /* * Check to see if the current message block is too small to hold * the initial padding bits and length. If so, we will pad the * block, process it, and then continue padding into a second * block. */ if (context->Message_Block_Index >= (SHA1_Message_Block_Size - 8)) { context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < SHA1_Message_Block_Size) context->Message_Block[context->Message_Block_Index++] = 0; SHA1ProcessMessageBlock(context); } else context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < (SHA1_Message_Block_Size - 8)) context->Message_Block[context->Message_Block_Index++] = 0; /* * Store the message length as the last 8 octets */ context->Message_Block[56] = (uint8_t)(context->Length_High >> 24); context->Message_Block[57] = (uint8_t)(context->Length_High >> 16); context->Message_Block[58] = (uint8_t)(context->Length_High >> 8); context->Message_Block[59] = (uint8_t)(context->Length_High); context->Message_Block[60] = (uint8_t)(context->Length_Low >> 24); context->Message_Block[61] = (uint8_t)(context->Length_Low >> 16); context->Message_Block[62] = (uint8_t)(context->Length_Low >> 8); context->Message_Block[63] = (uint8_t)(context->Length_Low); SHA1ProcessMessageBlock(context); } /* * SHA1ProcessMessageBlock * * Description: * This helper function will process the next 512 bits of the * message stored in the Message_Block array. * * Parameters: * None. * * Returns: * Nothing. * * Comments: * Many of the variable names in this code, especially the * single character names, were used because those were the * names used in the publication. */ static void SHA1ProcessMessageBlock(SHA1Context *context) { /* Constants defined in FIPS-180-2, section 4.2.1 */ const uint32_t K[4] = { 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 }; int t; /* Loop counter */ uint32_t temp; /* Temporary word value */ uint32_t W[80]; /* Word sequence */ uint32_t A, B, C, D, E; /* Word buffers */ /* * Initialize the first 16 words in the array W */ for (t = 0; t < 16; t++) { W[t] = ((uint32_t)context->Message_Block[t * 4]) << 24; W[t] |= ((uint32_t)context->Message_Block[t * 4 + 1]) << 16; W[t] |= ((uint32_t)context->Message_Block[t * 4 + 2]) << 8; W[t] |= ((uint32_t)context->Message_Block[t * 4 + 3]); } for (t = 16; t < 80; t++) W[t] = SHA1_ROTL(1, W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16]); A = context->Intermediate_Hash[0]; B = context->Intermediate_Hash[1]; C = context->Intermediate_Hash[2]; D = context->Intermediate_Hash[3]; E = context->Intermediate_Hash[4]; for (t = 0; t < 20; t++) { temp = SHA1_ROTL(5, A) + SHA_Ch(B, C, D) + E + W[t] + K[0]; E = D; D = C; C = SHA1_ROTL(30, B); B = A; A = temp; } for (t = 20; t < 40; t++) { temp = SHA1_ROTL(5, A) + SHA_Parity(B, C, D) + E + W[t] + K[1]; E = D; D = C; C = SHA1_ROTL(30, B); B = A; A = temp; } for (t = 40; t < 60; t++) { temp = SHA1_ROTL(5, A) + SHA_Maj(B, C, D) + E + W[t] + K[2]; E = D; D = C; C = SHA1_ROTL(30, B); B = A; A = temp; } for (t = 60; t < 80; t++) { temp = SHA1_ROTL(5, A) + SHA_Parity(B, C, D) + E + W[t] + K[3]; E = D; D = C; C = SHA1_ROTL(30, B); B = A; A = temp; } context->Intermediate_Hash[0] += A; context->Intermediate_Hash[1] += B; context->Intermediate_Hash[2] += C; context->Intermediate_Hash[3] += D; context->Intermediate_Hash[4] += E; context->Message_Block_Index = 0; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/sha224.c000066400000000000000000000432541362133436400313020ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*************************** sha224-256.c ***************************/ /********************* See RFC 4634 for details *********************/ /* * Description: * This file implements the Secure Hash Signature Standard * algorithms as defined in the National Institute of Standards * and Technology Federal Information Processing Standards * Publication (FIPS PUB) 180-1 published on April 17, 1995, 180-2 * published on August 1, 2002, and the FIPS PUB 180-2 Change * Notice published on February 28, 2004. * * A combined document showing all algorithms is available at * http://csrc.nist.gov/publications/fips/ * fips180-2/fips180-2withchangenotice.pdf * * The SHA-224 and SHA-256 algorithms produce 224-bit and 256-bit * message digests for a given data stream. It should take about * 2**n steps to find a message with the same digest as a given * message and 2**(n/2) to find any two messages with the same * digest, when n is the digest size in bits. Therefore, this * algorithm can serve as a means of providing a * "fingerprint" for a message. * * Portability Issues: * SHA-224 and SHA-256 are defined in terms of 32-bit "words". * This code uses (included via "sha.h") to define 32 * and 8 bit unsigned integer types. If your C compiler does not * support 32 bit unsigned integers, this code is not * appropriate. * * Caveats: * SHA-224 and SHA-256 are designed to work with messages less * than 2^64 bits long. This implementation uses SHA224/256Input() * to hash the bits that are a multiple of the size of an 8-bit * character, and then uses SHA224/256FinalBits() to hash the * final few bits of the input. */ #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/sha.h" #include "azure_c_shared_utility/sha-private.h" /* Define the SHA shift, rotate left and rotate right macro */ #define SHA256_SHR(bits,word) ((word) >> (bits)) #define SHA256_ROTL(bits,word) \ (((word) << (bits)) | ((word) >> (32-(bits)))) #define SHA256_ROTR(bits,word) \ (((word) >> (bits)) | ((word) << (32-(bits)))) /* Define the SHA SIGMA and sigma macros */ #define SHA256_SIGMA0(word) \ (SHA256_ROTR( 2,word) ^ SHA256_ROTR(13,word) ^ SHA256_ROTR(22,word)) #define SHA256_SIGMA1(word) \ (SHA256_ROTR( 6,word) ^ SHA256_ROTR(11,word) ^ SHA256_ROTR(25,word)) #define SHA256_sigma0(word) \ (SHA256_ROTR( 7,word) ^ SHA256_ROTR(18,word) ^ SHA256_SHR( 3,word)) #define SHA256_sigma1(word) \ (SHA256_ROTR(17,word) ^ SHA256_ROTR(19,word) ^ SHA256_SHR(10,word)) /* * add "length" to the length */ #define SHA224_256AddLength(context, length) \ (addTemp = (context)->Length_Low, (context)->Corrupted = \ (((context)->Length_Low += (length)) < addTemp) && \ (++(context)->Length_High == 0) ? 1 : 0) /* Local Function Prototypes */ static void SHA224_256Finalize(SHA256Context *context, uint8_t Pad_Byte); static void SHA224_256PadMessage(SHA256Context *context, uint8_t Pad_Byte); static void SHA224_256ProcessMessageBlock(SHA256Context *context); static int SHA224_256Reset(SHA256Context *context, uint32_t *H0); static int SHA224_256ResultN(SHA256Context *context, uint8_t Message_Digest[], int HashSize); /* Initial Hash Values: FIPS-180-2 Change Notice 1 */ static uint32_t SHA224_H0[SHA256HashSize / 4] = { 0xC1059ED8, 0x367CD507, 0x3070DD17, 0xF70E5939, 0xFFC00B31, 0x68581511, 0x64F98FA7, 0xBEFA4FA4 }; /* Initial Hash Values: FIPS-180-2 section 5.3.2 */ static uint32_t SHA256_H0[SHA256HashSize / 4] = { 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 }; /* * SHA224Reset * * Description: * This function will initialize the SHA384Context in preparation * for computing a new SHA224 message digest. * * Parameters: * context: [in/out] * The context to reset. * * Returns: * sha Error Code. */ int SHA224Reset(SHA224Context *context) { return SHA224_256Reset(context, SHA224_H0); } /* * SHA224Input * * Description: * This function accepts an array of octets as the next portion * of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_array: [in] * An array of characters representing the next portion of * the message. * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ int SHA224Input(SHA224Context *context, const uint8_t *message_array, unsigned int length) { return SHA256Input(context, message_array, length); } /* * SHA224FinalBits * * Description: * This function will add in any final bits of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_bits: [in] * The final bits of the message, in the upper portion of the * byte. (Use 0b###00000 instead of 0b00000### to input the * three bits ###.) * length: [in] * The number of bits in message_bits, between 1 and 7. * * Returns: * sha Error Code. */ int SHA224FinalBits(SHA224Context *context, const uint8_t message_bits, unsigned int length) { return SHA256FinalBits(context, message_bits, length); } /* * SHA224Result * * Description: * This function will return the 224-bit message * digest into the Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 28th element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA hash. * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. */ int SHA224Result(SHA224Context *context, uint8_t Message_Digest[SHA224HashSize]) { return SHA224_256ResultN(context, Message_Digest, SHA224HashSize); } /* * SHA256Reset * * Description: * This function will initialize the SHA256Context in preparation * for computing a new SHA256 message digest. * * Parameters: * context: [in/out] * The context to reset. * * Returns: * sha Error Code. */ int SHA256Reset(SHA256Context *context) { return SHA224_256Reset(context, SHA256_H0); } /* * SHA256Input * * Description: * This function accepts an array of octets as the next portion * of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_array: [in] * An array of characters representing the next portion of * the message. * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. */ int SHA256Input(SHA256Context *context, const uint8_t *message_array, unsigned int length) { uint32_t addTemp; if (!length) return shaSuccess; if (!context || !message_array) return shaNull; if (context->Computed) { context->Corrupted = shaStateError; return shaStateError; } if (context->Corrupted) return context->Corrupted; while (length-- && !context->Corrupted) { context->Message_Block[context->Message_Block_Index++] = (*message_array & 0xFF); if (!SHA224_256AddLength(context, 8) && (context->Message_Block_Index == SHA256_Message_Block_Size)) SHA224_256ProcessMessageBlock(context); message_array++; } return shaSuccess; } /* * SHA256FinalBits * * Description: * This function will add in any final bits of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_bits: [in] * The final bits of the message, in the upper portion of the * byte. (Use 0b###00000 instead of 0b00000### to input the * three bits ###.) * length: [in] * The number of bits in message_bits, between 1 and 7. * * Returns: * sha Error Code. */ int SHA256FinalBits(SHA256Context *context, const uint8_t message_bits, unsigned int length) { uint32_t addTemp; uint8_t masks[8] = { /* 0 0b00000000 */ 0x00, /* 1 0b10000000 */ 0x80, /* 2 0b11000000 */ 0xC0, /* 3 0b11100000 */ 0xE0, /* 4 0b11110000 */ 0xF0, /* 5 0b11111000 */ 0xF8, /* 6 0b11111100 */ 0xFC, /* 7 0b11111110 */ 0xFE }; uint8_t markbit[8] = { /* 0 0b10000000 */ 0x80, /* 1 0b01000000 */ 0x40, /* 2 0b00100000 */ 0x20, /* 3 0b00010000 */ 0x10, /* 4 0b00001000 */ 0x08, /* 5 0b00000100 */ 0x04, /* 6 0b00000010 */ 0x02, /* 7 0b00000001 */ 0x01 }; if (!length) return shaSuccess; if (!context) return shaNull; if ((context->Computed) || (length >= 8) || (length == 0)) { context->Corrupted = shaStateError; return shaStateError; } if (context->Corrupted) return context->Corrupted; SHA224_256AddLength(context, length); SHA224_256Finalize(context, (uint8_t) ((message_bits & masks[length]) | markbit[length])); return shaSuccess; } /* * SHA256Result * * Description: * This function will return the 256-bit message * digest into the Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 32nd element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA hash. * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. */ int SHA256Result(SHA256Context *context, uint8_t Message_Digest[]) { return SHA224_256ResultN(context, Message_Digest, SHA256HashSize); } /* * SHA224_256Finalize * * Description: * This helper function finishes off the digest calculations. * * Parameters: * context: [in/out] * The SHA context to update * Pad_Byte: [in] * The last byte to add to the digest before the 0-padding * and length. This will contain the last bits of the message * followed by another single bit. If the message was an * exact multiple of 8-bits long, Pad_Byte will be 0x80. * * Returns: * sha Error Code. */ static void SHA224_256Finalize(SHA256Context *context, uint8_t Pad_Byte) { int i; SHA224_256PadMessage(context, Pad_Byte); /* message may be sensitive, so clear it out */ for (i = 0; i < SHA256_Message_Block_Size; ++i) context->Message_Block[i] = 0; context->Length_Low = 0; /* and clear length */ context->Length_High = 0; context->Computed = 1; } /* * SHA224_256PadMessage * * Description: * According to the standard, the message must be padded to an * even 512 bits. The first padding bit must be a '1'. The * last 64 bits represent the length of the original message. * All bits in between should be 0. This helper function will pad * the message according to those rules by filling the * Message_Block array accordingly. When it returns, it can be * assumed that the message digest has been computed. * * Parameters: * context: [in/out] * The context to pad * Pad_Byte: [in] * The last byte to add to the digest before the 0-padding * and length. This will contain the last bits of the message * followed by another single bit. If the message was an * exact multiple of 8-bits long, Pad_Byte will be 0x80. * * Returns: * Nothing. */ static void SHA224_256PadMessage(SHA256Context *context, uint8_t Pad_Byte) { /* * Check to see if the current message block is too small to hold * the initial padding bits and length. If so, we will pad the * block, process it, and then continue padding into a second * block. */ if (context->Message_Block_Index >= (SHA256_Message_Block_Size - 8)) { context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < SHA256_Message_Block_Size) context->Message_Block[context->Message_Block_Index++] = 0; SHA224_256ProcessMessageBlock(context); } else context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < (SHA256_Message_Block_Size - 8)) context->Message_Block[context->Message_Block_Index++] = 0; /* * Store the message length as the last 8 octets */ context->Message_Block[56] = (uint8_t)(context->Length_High >> 24); context->Message_Block[57] = (uint8_t)(context->Length_High >> 16); context->Message_Block[58] = (uint8_t)(context->Length_High >> 8); context->Message_Block[59] = (uint8_t)(context->Length_High); context->Message_Block[60] = (uint8_t)(context->Length_Low >> 24); context->Message_Block[61] = (uint8_t)(context->Length_Low >> 16); context->Message_Block[62] = (uint8_t)(context->Length_Low >> 8); context->Message_Block[63] = (uint8_t)(context->Length_Low); SHA224_256ProcessMessageBlock(context); } /* * SHA224_256ProcessMessageBlock * * Description: * This function will process the next 512 bits of the message * stored in the Message_Block array. * * Parameters: * context: [in/out] * The SHA context to update * * Returns: * Nothing. * * Comments: * Many of the variable names in this code, especially the * single character names, were used because those were the * names used in the publication. */ static void SHA224_256ProcessMessageBlock(SHA256Context *context) { /* Constants defined in FIPS-180-2, section 4.2.2 */ static const uint32_t K[64] = { 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 }; int t, t4; /* Loop counter */ uint32_t temp1, temp2; /* Temporary word value */ uint32_t W[64]; /* Word sequence */ uint32_t A, B, C, D, E, F, G, H; /* Word buffers */ /* * Initialize the first 16 words in the array W */ for (t = t4 = 0; t < 16; t++, t4 += 4) W[t] = (((uint32_t)context->Message_Block[t4]) << 24) | (((uint32_t)context->Message_Block[t4 + 1]) << 16) | (((uint32_t)context->Message_Block[t4 + 2]) << 8) | (((uint32_t)context->Message_Block[t4 + 3])); for (t = 16; t < 64; t++) W[t] = SHA256_sigma1(W[t - 2]) + W[t - 7] + SHA256_sigma0(W[t - 15]) + W[t - 16]; A = context->Intermediate_Hash[0]; B = context->Intermediate_Hash[1]; C = context->Intermediate_Hash[2]; D = context->Intermediate_Hash[3]; E = context->Intermediate_Hash[4]; F = context->Intermediate_Hash[5]; G = context->Intermediate_Hash[6]; H = context->Intermediate_Hash[7]; for (t = 0; t < 64; t++) { temp1 = H + SHA256_SIGMA1(E) + SHA_Ch(E, F, G) + K[t] + W[t]; temp2 = SHA256_SIGMA0(A) + SHA_Maj(A, B, C); H = G; G = F; F = E; E = D + temp1; D = C; C = B; B = A; A = temp1 + temp2; } context->Intermediate_Hash[0] += A; context->Intermediate_Hash[1] += B; context->Intermediate_Hash[2] += C; context->Intermediate_Hash[3] += D; context->Intermediate_Hash[4] += E; context->Intermediate_Hash[5] += F; context->Intermediate_Hash[6] += G; context->Intermediate_Hash[7] += H; context->Message_Block_Index = 0; } /* * SHA224_256Reset * * Description: * This helper function will initialize the SHA256Context in * preparation for computing a new SHA256 message digest. * * Parameters: * context: [in/out] * The context to reset. * H0 * The initial hash value to use. * * Returns: * sha Error Code. */ static int SHA224_256Reset(SHA256Context *context, uint32_t *H0) { if (!context) return shaNull; context->Length_Low = 0; context->Length_High = 0; context->Message_Block_Index = 0; context->Intermediate_Hash[0] = H0[0]; context->Intermediate_Hash[1] = H0[1]; context->Intermediate_Hash[2] = H0[2]; context->Intermediate_Hash[3] = H0[3]; context->Intermediate_Hash[4] = H0[4]; context->Intermediate_Hash[5] = H0[5]; context->Intermediate_Hash[6] = H0[6]; context->Intermediate_Hash[7] = H0[7]; context->Computed = 0; context->Corrupted = 0; return shaSuccess; } /* * SHA224_256ResultN * * Description: * This helper function will return the 224-bit or 256-bit message * digest into the Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 28th/32nd element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA hash. * Message_Digest: [out] * Where the digest is returned. * HashSize: [in] * The size of the hash, either 28 or 32. * * Returns: * sha Error Code. */ static int SHA224_256ResultN(SHA256Context *context, uint8_t Message_Digest[], int HashSize) { int i; if (!context || !Message_Digest) return shaNull; if (context->Corrupted) return context->Corrupted; if (!context->Computed) SHA224_256Finalize(context, 0x80); for (i = 0; i < HashSize; ++i) Message_Digest[i] = (uint8_t) (context->Intermediate_Hash[i >> 2] >> 8 * (3 - (i & 0x03))); return shaSuccess; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/sha384-512.c000066400000000000000000001111271362133436400316110ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*************************** sha384-512.c ***************************/ /********************* See RFC 4634 for details *********************/ /* * Description: * This file implements the Secure Hash Signature Standard * algorithms as defined in the National Institute of Standards * and Technology Federal Information Processing Standards * Publication (FIPS PUB) 180-1 published on April 17, 1995, 180-2 * published on August 1, 2002, and the FIPS PUB 180-2 Change * Notice published on February 28, 2004. * * A combined document showing all algorithms is available at * http://csrc.nist.gov/publications/fips/ * fips180-2/fips180-2withchangenotice.pdf * * The SHA-384 and SHA-512 algorithms produce 384-bit and 512-bit * message digests for a given data stream. It should take about * 2**n steps to find a message with the same digest as a given * message and 2**(n/2) to find any two messages with the same * digest, when n is the digest size in bits. Therefore, this * algorithm can serve as a means of providing a * "fingerprint" for a message. * * Portability Issues: * SHA-384 and SHA-512 are defined in terms of 64-bit "words", * but if USE_32BIT_ONLY is #defined, this code is implemented in * terms of 32-bit "words". This code uses (included * via "sha.h") to define the 64, 32 and 8 bit unsigned integer * types. If your C compiler does not support 64 bit unsigned * integers, and you do not #define USE_32BIT_ONLY, this code is * not appropriate. * * Caveats: * SHA-384 and SHA-512 are designed to work with messages less * than 2^128 bits long. This implementation uses * SHA384/512Input() to hash the bits that are a multiple of the * size of an 8-bit character, and then uses SHA384/256FinalBits() * to hash the final few bits of the input. * */ #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/sha.h" #include "azure_c_shared_utility/sha-private.h" #ifdef USE_32BIT_ONLY #error IoTHubClient does not support USE_32BIT_ONLY flag /* * Define 64-bit arithmetic in terms of 32-bit arithmetic. * Each 64-bit number is represented in a 2-word array. * All macros are defined such that the result is the last parameter. */ /* * Define shift, rotate left and rotate right functions */ #define SHA512_SHR(bits, word, ret) ( \ /* (((uint64_t)((word))) >> (bits)) */ \ (ret)[0] = (((bits) < 32) && ((bits) >= 0)) ? \ ((word)[0] >> (bits)) : 0, \ (ret)[1] = ((bits) > 32) ? ((word)[0] >> ((bits) - 32)) : \ ((bits) == 32) ? (word)[0] : \ ((bits) >= 0) ? \ (((word)[0] << (32 - (bits))) | \ ((word)[1] >> (bits))) : 0 ) #define SHA512_SHL(bits, word, ret) ( \ /* (((uint64_t)(word)) << (bits)) */ \ (ret)[0] = ((bits) > 32) ? ((word)[1] << ((bits) - 32)) : \ ((bits) == 32) ? (word)[1] : \ ((bits) >= 0) ? \ (((word)[0] << (bits)) | \ ((word)[1] >> (32 - (bits)))) : \ 0, \ (ret)[1] = (((bits) < 32) && ((bits) >= 0)) ? \ ((word)[1] << (bits)) : 0) /* * Define 64-bit OR */ #define SHA512_OR(word1, word2, ret) ( \ (ret)[0] = (word1)[0] | (word2)[0], \ (ret)[1] = (word1)[1] | (word2)[1] ) /* * Define 64-bit XOR */ #define SHA512_XOR(word1, word2, ret) ( \ (ret)[0] = (word1)[0] ^ (word2)[0], \ (ret)[1] = (word1)[1] ^ (word2)[1] ) /* * Define 64-bit AND */ #define SHA512_AND(word1, word2, ret) ( \ (ret)[0] = (word1)[0] & (word2)[0], \ (ret)[1] = (word1)[1] & (word2)[1] ) /* * Define 64-bit TILDA */ #define SHA512_TILDA(word, ret) \ ( (ret)[0] = ~(word)[0], (ret)[1] = ~(word)[1] ) /* * Define 64-bit ADD */ #define SHA512_ADD(word1, word2, ret) ( \ (ret)[1] = (word1)[1], (ret)[1] += (word2)[1], \ (ret)[0] = (word1)[0] + (word2)[0] + ((ret)[1] < (word1)[1]) ) /* * Add the 4word value in word2 to word1. */ static uint32_t ADDTO4_temp, ADDTO4_temp2; #define SHA512_ADDTO4(word1, word2) ( \ ADDTO4_temp = (word1)[3], \ (word1)[3] += (word2)[3], \ ADDTO4_temp2 = (word1)[2], \ (word1)[2] += (word2)[2] + ((word1)[3] < ADDTO4_temp), \ ADDTO4_temp = (word1)[1], \ (word1)[1] += (word2)[1] + ((word1)[2] < ADDTO4_temp2), \ (word1)[0] += (word2)[0] + ((word1)[1] < ADDTO4_temp)) /* * Add the 2word value in word2 to word1. */ static uint32_t ADDTO2_temp; #define SHA512_ADDTO2(word1, word2) ( \ ADDTO2_temp = (word1)[1], \ (word1)[1] += (word2)[1], \ (word1)[0] += (word2)[0] + ((word1)[1] < ADDTO2_temp) ) /* * SHA rotate ((word >> bits) | (word << (64-bits))) */ static uint32_t ROTR_temp1[2], ROTR_temp2[2]; #define SHA512_ROTR(bits, word, ret) ( \ SHA512_SHR((bits), (word), ROTR_temp1), \ SHA512_SHL(64-(bits), (word), ROTR_temp2), \ SHA512_OR(ROTR_temp1, ROTR_temp2, (ret)) ) /* * Define the SHA SIGMA and sigma macros * SHA512_ROTR(28,word) ^ SHA512_ROTR(34,word) ^ SHA512_ROTR(39,word) */ static uint32_t SIGMA0_temp1[2], SIGMA0_temp2[2], SIGMA0_temp3[2], SIGMA0_temp4[2]; #define SHA512_SIGMA0(word, ret) ( \ SHA512_ROTR(28, (word), SIGMA0_temp1), \ SHA512_ROTR(34, (word), SIGMA0_temp2), \ SHA512_ROTR(39, (word), SIGMA0_temp3), \ SHA512_XOR(SIGMA0_temp2, SIGMA0_temp3, SIGMA0_temp4), \ SHA512_XOR(SIGMA0_temp1, SIGMA0_temp4, (ret)) ) /* * SHA512_ROTR(14,word) ^ SHA512_ROTR(18,word) ^ SHA512_ROTR(41,word) */ static uint32_t SIGMA1_temp1[2], SIGMA1_temp2[2], SIGMA1_temp3[2], SIGMA1_temp4[2]; #define SHA512_SIGMA1(word, ret) ( \ SHA512_ROTR(14, (word), SIGMA1_temp1), \ SHA512_ROTR(18, (word), SIGMA1_temp2), \ SHA512_ROTR(41, (word), SIGMA1_temp3), \ SHA512_XOR(SIGMA1_temp2, SIGMA1_temp3, SIGMA1_temp4), \ SHA512_XOR(SIGMA1_temp1, SIGMA1_temp4, (ret)) ) /* * (SHA512_ROTR( 1,word) ^ SHA512_ROTR( 8,word) ^ SHA512_SHR( 7,word)) */ static uint32_t sigma0_temp1[2], sigma0_temp2[2], sigma0_temp3[2], sigma0_temp4[2]; #define SHA512_sigma0(word, ret) ( \ SHA512_ROTR( 1, (word), sigma0_temp1), \ SHA512_ROTR( 8, (word), sigma0_temp2), \ SHA512_SHR( 7, (word), sigma0_temp3), \ SHA512_XOR(sigma0_temp2, sigma0_temp3, sigma0_temp4), \ SHA512_XOR(sigma0_temp1, sigma0_temp4, (ret)) ) /* * (SHA512_ROTR(19,word) ^ SHA512_ROTR(61,word) ^ SHA512_SHR( 6,word)) */ static uint32_t sigma1_temp1[2], sigma1_temp2[2], sigma1_temp3[2], sigma1_temp4[2]; #define SHA512_sigma1(word, ret) ( \ SHA512_ROTR(19, (word), sigma1_temp1), \ SHA512_ROTR(61, (word), sigma1_temp2), \ SHA512_SHR( 6, (word), sigma1_temp3), \ SHA512_XOR(sigma1_temp2, sigma1_temp3, sigma1_temp4), \ SHA512_XOR(sigma1_temp1, sigma1_temp4, (ret)) ) #undef SHA_Ch #undef SHA_Maj #ifndef USE_MODIFIED_MACROS /* * These definitions are the ones used in FIPS-180-2, section 4.1.3 * Ch(x,y,z) ((x & y) ^ (~x & z)) */ static uint32_t Ch_temp1[2], Ch_temp2[2], Ch_temp3[2]; #define SHA_Ch(x, y, z, ret) ( \ SHA512_AND(x, y, Ch_temp1), \ SHA512_TILDA(x, Ch_temp2), \ SHA512_AND(Ch_temp2, z, Ch_temp3), \ SHA512_XOR(Ch_temp1, Ch_temp3, (ret)) ) /* * Maj(x,y,z) (((x)&(y)) ^ ((x)&(z)) ^ ((y)&(z))) */ static uint32_t Maj_temp1[2], Maj_temp2[2], Maj_temp3[2], Maj_temp4[2]; #define SHA_Maj(x, y, z, ret) ( \ SHA512_AND(x, y, Maj_temp1), \ SHA512_AND(x, z, Maj_temp2), \ SHA512_AND(y, z, Maj_temp3), \ SHA512_XOR(Maj_temp2, Maj_temp3, Maj_temp4), \ SHA512_XOR(Maj_temp1, Maj_temp4, (ret)) ) #else /* !USE_32BIT_ONLY */ /* * These definitions are potentially faster equivalents for the ones * used in FIPS-180-2, section 4.1.3. * ((x & y) ^ (~x & z)) becomes * ((x & (y ^ z)) ^ z) */ #define SHA_Ch(x, y, z, ret) ( \ (ret)[0] = (((x)[0] & ((y)[0] ^ (z)[0])) ^ (z)[0]), \ (ret)[1] = (((x)[1] & ((y)[1] ^ (z)[1])) ^ (z)[1]) ) /* * ((x & y) ^ (x & z) ^ (y & z)) becomes * ((x & (y | z)) | (y & z)) */ #define SHA_Maj(x, y, z, ret) ( \ ret[0] = (((x)[0] & ((y)[0] | (z)[0])) | ((y)[0] & (z)[0])), \ ret[1] = (((x)[1] & ((y)[1] | (z)[1])) | ((y)[1] & (z)[1])) ) #endif /* USE_MODIFIED_MACROS */ /* * add "length" to the length */ static uint32_t addTemp[4] = { 0, 0, 0, 0 }; #define SHA384_512AddLength(context, length) ( \ addTemp[3] = (length), SHA512_ADDTO4((context)->Length, addTemp), \ (context)->Corrupted = (((context)->Length[3] == 0) && \ ((context)->Length[2] == 0) && ((context)->Length[1] == 0) && \ ((context)->Length[0] < 8)) ? 1 : 0 ) /* Local Function Prototypes */ static void SHA384_512Finalize(SHA512Context *context, uint8_t Pad_Byte); static void SHA384_512PadMessage(SHA512Context *context, uint8_t Pad_Byte); static void SHA384_512ProcessMessageBlock(SHA512Context *context); static int SHA384_512Reset(SHA512Context *context, uint32_t H0[]); static int SHA384_512ResultN(SHA512Context *context, uint8_t Message_Digest[], int HashSize); /* Initial Hash Values: FIPS-180-2 sections 5.3.3 and 5.3.4 */ static uint32_t SHA384_H0[SHA512HashSize / 4] = { 0xCBBB9D5D, 0xC1059ED8, 0x629A292A, 0x367CD507, 0x9159015A, 0x3070DD17, 0x152FECD8, 0xF70E5939, 0x67332667, 0xFFC00B31, 0x8EB44A87, 0x68581511, 0xDB0C2E0D, 0x64F98FA7, 0x47B5481D, 0xBEFA4FA4 }; static uint32_t SHA512_H0[SHA512HashSize / 4] = { 0x6A09E667, 0xF3BCC908, 0xBB67AE85, 0x84CAA73B, 0x3C6EF372, 0xFE94F82B, 0xA54FF53A, 0x5F1D36F1, 0x510E527F, 0xADE682D1, 0x9B05688C, 0x2B3E6C1F, 0x1F83D9AB, 0xFB41BD6B, 0x5BE0CD19, 0x137E2179 }; #else /* !USE_32BIT_ONLY */ /* Define the SHA shift, rotate left and rotate right macro */ #define SHA512_SHR(bits,word) (((uint64_t)(word)) >> (bits)) #define SHA512_ROTR(bits,word) ((((uint64_t)(word)) >> (bits)) | \ (((uint64_t)(word)) << (64-(bits)))) /* Define the SHA SIGMA and sigma macros */ #define SHA512_SIGMA0(word) \ (SHA512_ROTR(28,word) ^ SHA512_ROTR(34,word) ^ SHA512_ROTR(39,word)) #define SHA512_SIGMA1(word) \ (SHA512_ROTR(14,word) ^ SHA512_ROTR(18,word) ^ SHA512_ROTR(41,word)) #define SHA512_sigma0(word) \ (SHA512_ROTR( 1,word) ^ SHA512_ROTR( 8,word) ^ SHA512_SHR( 7,word)) #define SHA512_sigma1(word) \ (SHA512_ROTR(19,word) ^ SHA512_ROTR(61,word) ^ SHA512_SHR( 6,word)) /* * add "length" to the length */ #define SHA384_512AddLength(context, length) \ (addTemp = context->Length_Low, context->Corrupted = \ ((context->Length_Low += length) < addTemp) && \ (++context->Length_High == 0) ? 1 : 0) /* Local Function Prototypes */ static void SHA384_512Finalize(SHA512Context *context, uint8_t Pad_Byte); static void SHA384_512PadMessage(SHA512Context *context, uint8_t Pad_Byte); static void SHA384_512ProcessMessageBlock(SHA512Context *context); static int SHA384_512Reset(SHA512Context *context, uint64_t H0[]); static int SHA384_512ResultN(SHA512Context *context, uint8_t Message_Digest[], int HashSize); /* Initial Hash Values: FIPS-180-2 sections 5.3.3 and 5.3.4 */ static uint64_t SHA384_H0[] = { 0xCBBB9D5DC1059ED8ull, 0x629A292A367CD507ull, 0x9159015A3070DD17ull, 0x152FECD8F70E5939ull, 0x67332667FFC00B31ull, 0x8EB44A8768581511ull, 0xDB0C2E0D64F98FA7ull, 0x47B5481DBEFA4FA4ull }; static uint64_t SHA512_H0[] = { 0x6A09E667F3BCC908ull, 0xBB67AE8584CAA73Bull, 0x3C6EF372FE94F82Bull, 0xA54FF53A5F1D36F1ull, 0x510E527FADE682D1ull, 0x9B05688C2B3E6C1Full, 0x1F83D9ABFB41BD6Bull, 0x5BE0CD19137E2179ull }; #endif /* USE_32BIT_ONLY */ /* * SHA384Reset * * Description: * This function will initialize the SHA384Context in preparation * for computing a new SHA384 message digest. * * Parameters: * context: [in/out] * The context to reset. * * Returns: * sha Error Code. * */ int SHA384Reset(SHA384Context *context) { return SHA384_512Reset(context, SHA384_H0); } /* * SHA384Input * * Description: * This function accepts an array of octets as the next portion * of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_array: [in] * An array of characters representing the next portion of * the message. * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ int SHA384Input(SHA384Context *context, const uint8_t *message_array, unsigned int length) { return SHA512Input(context, message_array, length); } /* * SHA384FinalBits * * Description: * This function will add in any final bits of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_bits: [in] * The final bits of the message, in the upper portion of the * byte. (Use 0b###00000 instead of 0b00000### to input the * three bits ###.) * length: [in] * The number of bits in message_bits, between 1 and 7. * * Returns: * sha Error Code. * */ int SHA384FinalBits(SHA384Context *context, const uint8_t message_bits, unsigned int length) { return SHA512FinalBits(context, message_bits, length); } /* * SHA384Result * * Description: * This function will return the 384-bit message * digest into the Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 48th element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA hash. * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. * */ int SHA384Result(SHA384Context *context, uint8_t Message_Digest[SHA384HashSize]) { return SHA384_512ResultN(context, Message_Digest, SHA384HashSize); } /* * SHA512Reset * * Description: * This function will initialize the SHA512Context in preparation * for computing a new SHA512 message digest. * * Parameters: * context: [in/out] * The context to reset. * * Returns: * sha Error Code. * */ int SHA512Reset(SHA512Context *context) { return SHA384_512Reset(context, SHA512_H0); } /* * SHA512Input * * Description: * This function accepts an array of octets as the next portion * of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_array: [in] * An array of characters representing the next portion of * the message. * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ int SHA512Input(SHA512Context *context, const uint8_t *message_array, unsigned int length) { uint64_t addTemp; if (!length) return shaSuccess; if (!context || !message_array) return shaNull; if (context->Computed) { context->Corrupted = shaStateError; return shaStateError; } if (context->Corrupted) return context->Corrupted; while (length-- && !context->Corrupted) { context->Message_Block[context->Message_Block_Index++] = (*message_array & 0xFF); if (!SHA384_512AddLength(context, 8) && (context->Message_Block_Index == SHA512_Message_Block_Size)) SHA384_512ProcessMessageBlock(context); message_array++; } return shaSuccess; } /* * SHA512FinalBits * * Description: * This function will add in any final bits of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_bits: [in] * The final bits of the message, in the upper portion of the * byte. (Use 0b###00000 instead of 0b00000### to input the * three bits ###.) * length: [in] * The number of bits in message_bits, between 1 and 7. * * Returns: * sha Error Code. * */ int SHA512FinalBits(SHA512Context *context, const uint8_t message_bits, unsigned int length) { uint64_t addTemp; uint8_t masks[8] = { /* 0 0b00000000 */ 0x00, /* 1 0b10000000 */ 0x80, /* 2 0b11000000 */ 0xC0, /* 3 0b11100000 */ 0xE0, /* 4 0b11110000 */ 0xF0, /* 5 0b11111000 */ 0xF8, /* 6 0b11111100 */ 0xFC, /* 7 0b11111110 */ 0xFE }; uint8_t markbit[8] = { /* 0 0b10000000 */ 0x80, /* 1 0b01000000 */ 0x40, /* 2 0b00100000 */ 0x20, /* 3 0b00010000 */ 0x10, /* 4 0b00001000 */ 0x08, /* 5 0b00000100 */ 0x04, /* 6 0b00000010 */ 0x02, /* 7 0b00000001 */ 0x01 }; if (!length) return shaSuccess; if (!context) return shaNull; if ((context->Computed) || (length >= 8) || (length == 0)) { context->Corrupted = shaStateError; return shaStateError; } if (context->Corrupted) return context->Corrupted; SHA384_512AddLength(context, length); SHA384_512Finalize(context, (uint8_t) ((message_bits & masks[length]) | markbit[length])); return shaSuccess; } /* * SHA384_512Finalize * * Description: * This helper function finishes off the digest calculations. * * Parameters: * context: [in/out] * The SHA context to update * Pad_Byte: [in] * The last byte to add to the digest before the 0-padding * and length. This will contain the last bits of the message * followed by another single bit. If the message was an * exact multiple of 8-bits long, Pad_Byte will be 0x80. * * Returns: * sha Error Code. * */ static void SHA384_512Finalize(SHA512Context *context, uint8_t Pad_Byte) { int_least16_t i; SHA384_512PadMessage(context, Pad_Byte); /* message may be sensitive, clear it out */ for (i = 0; i < SHA512_Message_Block_Size; ++i) context->Message_Block[i] = 0; #ifdef USE_32BIT_ONLY /* and clear length */ context->Length[0] = context->Length[1] = 0; context->Length[2] = context->Length[3] = 0; #else /* !USE_32BIT_ONLY */ context->Length_Low = 0; context->Length_High = 0; #endif /* USE_32BIT_ONLY */ context->Computed = 1; } /* * SHA512Result * * Description: * This function will return the 512-bit message * digest into the Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 64th element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA hash. * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. * */ int SHA512Result(SHA512Context *context, uint8_t Message_Digest[SHA512HashSize]) { return SHA384_512ResultN(context, Message_Digest, SHA512HashSize); } /* * SHA384_512PadMessage * * Description: * According to the standard, the message must be padded to an * even 1024 bits. The first padding bit must be a '1'. The * last 128 bits represent the length of the original message. * All bits in between should be 0. This helper function will * pad the message according to those rules by filling the * Message_Block array accordingly. When it returns, it can be * assumed that the message digest has been computed. * * Parameters: * context: [in/out] * The context to pad * Pad_Byte: [in] * The last byte to add to the digest before the 0-padding * and length. This will contain the last bits of the message * followed by another single bit. If the message was an * exact multiple of 8-bits long, Pad_Byte will be 0x80. * * Returns: * Nothing. * */ static void SHA384_512PadMessage(SHA512Context *context, uint8_t Pad_Byte) { /* * Check to see if the current message block is too small to hold * the initial padding bits and length. If so, we will pad the * block, process it, and then continue padding into a second * block. */ if (context->Message_Block_Index >= (SHA512_Message_Block_Size - 16)) { context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < SHA512_Message_Block_Size) context->Message_Block[context->Message_Block_Index++] = 0; SHA384_512ProcessMessageBlock(context); } else context->Message_Block[context->Message_Block_Index++] = Pad_Byte; while (context->Message_Block_Index < (SHA512_Message_Block_Size - 16)) context->Message_Block[context->Message_Block_Index++] = 0; /* * Store the message length as the last 16 octets */ #ifdef USE_32BIT_ONLY context->Message_Block[112] = (uint8_t)(context->Length[0] >> 24); context->Message_Block[113] = (uint8_t)(context->Length[0] >> 16); context->Message_Block[114] = (uint8_t)(context->Length[0] >> 8); context->Message_Block[115] = (uint8_t)(context->Length[0]); context->Message_Block[116] = (uint8_t)(context->Length[1] >> 24); context->Message_Block[117] = (uint8_t)(context->Length[1] >> 16); context->Message_Block[118] = (uint8_t)(context->Length[1] >> 8); context->Message_Block[119] = (uint8_t)(context->Length[1]); context->Message_Block[120] = (uint8_t)(context->Length[2] >> 24); context->Message_Block[121] = (uint8_t)(context->Length[2] >> 16); context->Message_Block[122] = (uint8_t)(context->Length[2] >> 8); context->Message_Block[123] = (uint8_t)(context->Length[2]); context->Message_Block[124] = (uint8_t)(context->Length[3] >> 24); context->Message_Block[125] = (uint8_t)(context->Length[3] >> 16); context->Message_Block[126] = (uint8_t)(context->Length[3] >> 8); context->Message_Block[127] = (uint8_t)(context->Length[3]); #else /* !USE_32BIT_ONLY */ context->Message_Block[112] = (uint8_t)(context->Length_High >> 56); context->Message_Block[113] = (uint8_t)(context->Length_High >> 48); context->Message_Block[114] = (uint8_t)(context->Length_High >> 40); context->Message_Block[115] = (uint8_t)(context->Length_High >> 32); context->Message_Block[116] = (uint8_t)(context->Length_High >> 24); context->Message_Block[117] = (uint8_t)(context->Length_High >> 16); context->Message_Block[118] = (uint8_t)(context->Length_High >> 8); context->Message_Block[119] = (uint8_t)(context->Length_High); context->Message_Block[120] = (uint8_t)(context->Length_Low >> 56); context->Message_Block[121] = (uint8_t)(context->Length_Low >> 48); context->Message_Block[122] = (uint8_t)(context->Length_Low >> 40); context->Message_Block[123] = (uint8_t)(context->Length_Low >> 32); context->Message_Block[124] = (uint8_t)(context->Length_Low >> 24); context->Message_Block[125] = (uint8_t)(context->Length_Low >> 16); context->Message_Block[126] = (uint8_t)(context->Length_Low >> 8); context->Message_Block[127] = (uint8_t)(context->Length_Low); #endif /* USE_32BIT_ONLY */ SHA384_512ProcessMessageBlock(context); } /* * SHA384_512ProcessMessageBlock * * Description: * This helper function will process the next 1024 bits of the * message stored in the Message_Block array. * * Parameters: * context: [in/out] * The SHA context to update * * Returns: * Nothing. * * Comments: * Many of the variable names in this code, especially the * single character names, were used because those were the * names used in the publication. * * */ static void SHA384_512ProcessMessageBlock(SHA512Context *context) { /* Constants defined in FIPS-180-2, section 4.2.3 */ #ifdef USE_32BIT_ONLY static const uint32_t K[80 * 2] = { 0x428A2F98, 0xD728AE22, 0x71374491, 0x23EF65CD, 0xB5C0FBCF, 0xEC4D3B2F, 0xE9B5DBA5, 0x8189DBBC, 0x3956C25B, 0xF348B538, 0x59F111F1, 0xB605D019, 0x923F82A4, 0xAF194F9B, 0xAB1C5ED5, 0xDA6D8118, 0xD807AA98, 0xA3030242, 0x12835B01, 0x45706FBE, 0x243185BE, 0x4EE4B28C, 0x550C7DC3, 0xD5FFB4E2, 0x72BE5D74, 0xF27B896F, 0x80DEB1FE, 0x3B1696B1, 0x9BDC06A7, 0x25C71235, 0xC19BF174, 0xCF692694, 0xE49B69C1, 0x9EF14AD2, 0xEFBE4786, 0x384F25E3, 0x0FC19DC6, 0x8B8CD5B5, 0x240CA1CC, 0x77AC9C65, 0x2DE92C6F, 0x592B0275, 0x4A7484AA, 0x6EA6E483, 0x5CB0A9DC, 0xBD41FBD4, 0x76F988DA, 0x831153B5, 0x983E5152, 0xEE66DFAB, 0xA831C66D, 0x2DB43210, 0xB00327C8, 0x98FB213F, 0xBF597FC7, 0xBEEF0EE4, 0xC6E00BF3, 0x3DA88FC2, 0xD5A79147, 0x930AA725, 0x06CA6351, 0xE003826F, 0x14292967, 0x0A0E6E70, 0x27B70A85, 0x46D22FFC, 0x2E1B2138, 0x5C26C926, 0x4D2C6DFC, 0x5AC42AED, 0x53380D13, 0x9D95B3DF, 0x650A7354, 0x8BAF63DE, 0x766A0ABB, 0x3C77B2A8, 0x81C2C92E, 0x47EDAEE6, 0x92722C85, 0x1482353B, 0xA2BFE8A1, 0x4CF10364, 0xA81A664B, 0xBC423001, 0xC24B8B70, 0xD0F89791, 0xC76C51A3, 0x0654BE30, 0xD192E819, 0xD6EF5218, 0xD6990624, 0x5565A910, 0xF40E3585, 0x5771202A, 0x106AA070, 0x32BBD1B8, 0x19A4C116, 0xB8D2D0C8, 0x1E376C08, 0x5141AB53, 0x2748774C, 0xDF8EEB99, 0x34B0BCB5, 0xE19B48A8, 0x391C0CB3, 0xC5C95A63, 0x4ED8AA4A, 0xE3418ACB, 0x5B9CCA4F, 0x7763E373, 0x682E6FF3, 0xD6B2B8A3, 0x748F82EE, 0x5DEFB2FC, 0x78A5636F, 0x43172F60, 0x84C87814, 0xA1F0AB72, 0x8CC70208, 0x1A6439EC, 0x90BEFFFA, 0x23631E28, 0xA4506CEB, 0xDE82BDE9, 0xBEF9A3F7, 0xB2C67915, 0xC67178F2, 0xE372532B, 0xCA273ECE, 0xEA26619C, 0xD186B8C7, 0x21C0C207, 0xEADA7DD6, 0xCDE0EB1E, 0xF57D4F7F, 0xEE6ED178, 0x06F067AA, 0x72176FBA, 0x0A637DC5, 0xA2C898A6, 0x113F9804, 0xBEF90DAE, 0x1B710B35, 0x131C471B, 0x28DB77F5, 0x23047D84, 0x32CAAB7B, 0x40C72493, 0x3C9EBE0A, 0x15C9BEBC, 0x431D67C4, 0x9C100D4C, 0x4CC5D4BE, 0xCB3E42B6, 0x597F299C, 0xFC657E2A, 0x5FCB6FAB, 0x3AD6FAEC, 0x6C44198C, 0x4A475817 }; int t, t2, t8; /* Loop counter */ uint32_t temp1[2], temp2[2], /* Temporary word values */ temp3[2], temp4[2], temp5[2]; uint32_t W[2 * 80]; /* Word sequence */ uint32_t A[2], B[2], C[2], D[2], /* Word buffers */ E[2], F[2], G[2], H[2]; /* Initialize the first 16 words in the array W */ for (t = t2 = t8 = 0; t < 16; t++, t8 += 8) { W[t2++] = ((((uint32_t)context->Message_Block[t8])) << 24) | ((((uint32_t)context->Message_Block[t8 + 1])) << 16) | ((((uint32_t)context->Message_Block[t8 + 2])) << 8) | ((((uint32_t)context->Message_Block[t8 + 3]))); W[t2++] = ((((uint32_t)context->Message_Block[t8 + 4])) << 24) | ((((uint32_t)context->Message_Block[t8 + 5])) << 16) | ((((uint32_t)context->Message_Block[t8 + 6])) << 8) | ((((uint32_t)context->Message_Block[t8 + 7]))); } for (t = 16; t < 80; t++, t2 += 2) { /* W[t] = SHA512_sigma1(W[t-2]) + W[t-7] + SHA512_sigma0(W[t-15]) + W[t-16]; */ uint32_t *Wt2 = &W[t2 - 2 * 2]; uint32_t *Wt7 = &W[t2 - 7 * 2]; uint32_t *Wt15 = &W[t2 - 15 * 2]; uint32_t *Wt16 = &W[t2 - 16 * 2]; SHA512_sigma1(Wt2, temp1); SHA512_ADD(temp1, Wt7, temp2); SHA512_sigma0(Wt15, temp1); SHA512_ADD(temp1, Wt16, temp3); SHA512_ADD(temp2, temp3, &W[t2]); } A[0] = context->Intermediate_Hash[0]; A[1] = context->Intermediate_Hash[1]; B[0] = context->Intermediate_Hash[2]; B[1] = context->Intermediate_Hash[3]; C[0] = context->Intermediate_Hash[4]; C[1] = context->Intermediate_Hash[5]; D[0] = context->Intermediate_Hash[6]; D[1] = context->Intermediate_Hash[7]; E[0] = context->Intermediate_Hash[8]; E[1] = context->Intermediate_Hash[9]; F[0] = context->Intermediate_Hash[10]; F[1] = context->Intermediate_Hash[11]; G[0] = context->Intermediate_Hash[12]; G[1] = context->Intermediate_Hash[13]; H[0] = context->Intermediate_Hash[14]; H[1] = context->Intermediate_Hash[15]; for (t = t2 = 0; t < 80; t++, t2 += 2) { /* * temp1 = H + SHA512_SIGMA1(E) + SHA_Ch(E,F,G) + K[t] + W[t]; */ SHA512_SIGMA1(E, temp1); SHA512_ADD(H, temp1, temp2); SHA_Ch(E, F, G, temp3); SHA512_ADD(temp2, temp3, temp4); SHA512_ADD(&K[t2], &W[t2], temp5); SHA512_ADD(temp4, temp5, temp1); /* * temp2 = SHA512_SIGMA0(A) + SHA_Maj(A,B,C); */ SHA512_SIGMA0(A, temp3); SHA_Maj(A, B, C, temp4); SHA512_ADD(temp3, temp4, temp2); H[0] = G[0]; H[1] = G[1]; G[0] = F[0]; G[1] = F[1]; F[0] = E[0]; F[1] = E[1]; SHA512_ADD(D, temp1, E); D[0] = C[0]; D[1] = C[1]; C[0] = B[0]; C[1] = B[1]; B[0] = A[0]; B[1] = A[1]; SHA512_ADD(temp1, temp2, A); } SHA512_ADDTO2(&context->Intermediate_Hash[0], A); SHA512_ADDTO2(&context->Intermediate_Hash[2], B); SHA512_ADDTO2(&context->Intermediate_Hash[4], C); SHA512_ADDTO2(&context->Intermediate_Hash[6], D); SHA512_ADDTO2(&context->Intermediate_Hash[8], E); SHA512_ADDTO2(&context->Intermediate_Hash[10], F); SHA512_ADDTO2(&context->Intermediate_Hash[12], G); SHA512_ADDTO2(&context->Intermediate_Hash[14], H); #else /* !USE_32BIT_ONLY */ static const uint64_t K[80] = { 0x428A2F98D728AE22ull, 0x7137449123EF65CDull, 0xB5C0FBCFEC4D3B2Full, 0xE9B5DBA58189DBBCull, 0x3956C25BF348B538ull, 0x59F111F1B605D019ull, 0x923F82A4AF194F9Bull, 0xAB1C5ED5DA6D8118ull, 0xD807AA98A3030242ull, 0x12835B0145706FBEull, 0x243185BE4EE4B28Cull, 0x550C7DC3D5FFB4E2ull, 0x72BE5D74F27B896Full, 0x80DEB1FE3B1696B1ull, 0x9BDC06A725C71235ull, 0xC19BF174CF692694ull, 0xE49B69C19EF14AD2ull, 0xEFBE4786384F25E3ull, 0x0FC19DC68B8CD5B5ull, 0x240CA1CC77AC9C65ull, 0x2DE92C6F592B0275ull, 0x4A7484AA6EA6E483ull, 0x5CB0A9DCBD41FBD4ull, 0x76F988DA831153B5ull, 0x983E5152EE66DFABull, 0xA831C66D2DB43210ull, 0xB00327C898FB213Full, 0xBF597FC7BEEF0EE4ull, 0xC6E00BF33DA88FC2ull, 0xD5A79147930AA725ull, 0x06CA6351E003826Full, 0x142929670A0E6E70ull, 0x27B70A8546D22FFCull, 0x2E1B21385C26C926ull, 0x4D2C6DFC5AC42AEDull, 0x53380D139D95B3DFull, 0x650A73548BAF63DEull, 0x766A0ABB3C77B2A8ull, 0x81C2C92E47EDAEE6ull, 0x92722C851482353Bull, 0xA2BFE8A14CF10364ull, 0xA81A664BBC423001ull, 0xC24B8B70D0F89791ull, 0xC76C51A30654BE30ull, 0xD192E819D6EF5218ull, 0xD69906245565A910ull, 0xF40E35855771202Aull, 0x106AA07032BBD1B8ull, 0x19A4C116B8D2D0C8ull, 0x1E376C085141AB53ull, 0x2748774CDF8EEB99ull, 0x34B0BCB5E19B48A8ull, 0x391C0CB3C5C95A63ull, 0x4ED8AA4AE3418ACBull, 0x5B9CCA4F7763E373ull, 0x682E6FF3D6B2B8A3ull, 0x748F82EE5DEFB2FCull, 0x78A5636F43172F60ull, 0x84C87814A1F0AB72ull, 0x8CC702081A6439ECull, 0x90BEFFFA23631E28ull, 0xA4506CEBDE82BDE9ull, 0xBEF9A3F7B2C67915ull, 0xC67178F2E372532Bull, 0xCA273ECEEA26619Cull, 0xD186B8C721C0C207ull, 0xEADA7DD6CDE0EB1Eull, 0xF57D4F7FEE6ED178ull, 0x06F067AA72176FBAull, 0x0A637DC5A2C898A6ull, 0x113F9804BEF90DAEull, 0x1B710B35131C471Bull, 0x28DB77F523047D84ull, 0x32CAAB7B40C72493ull, 0x3C9EBE0A15C9BEBCull, 0x431D67C49C100D4Cull, 0x4CC5D4BECB3E42B6ull, 0x597F299CFC657E2Aull, 0x5FCB6FAB3AD6FAECull, 0x6C44198C4A475817ull }; int t, t8; /* Loop counter */ uint64_t temp1, temp2; /* Temporary word value */ uint64_t W[80]; /* Word sequence */ uint64_t A, B, C, D, E, F, G, H; /* Word buffers */ /* * Initialize the first 16 words in the array W */ for (t = t8 = 0; t < 16; t++, t8 += 8) W[t] = ((uint64_t)(context->Message_Block[t8]) << 56) | ((uint64_t)(context->Message_Block[t8 + 1]) << 48) | ((uint64_t)(context->Message_Block[t8 + 2]) << 40) | ((uint64_t)(context->Message_Block[t8 + 3]) << 32) | ((uint64_t)(context->Message_Block[t8 + 4]) << 24) | ((uint64_t)(context->Message_Block[t8 + 5]) << 16) | ((uint64_t)(context->Message_Block[t8 + 6]) << 8) | ((uint64_t)(context->Message_Block[t8 + 7])); for (t = 16; t < 80; t++) W[t] = SHA512_sigma1(W[t - 2]) + W[t - 7] + SHA512_sigma0(W[t - 15]) + W[t - 16]; A = context->Intermediate_Hash[0]; B = context->Intermediate_Hash[1]; C = context->Intermediate_Hash[2]; D = context->Intermediate_Hash[3]; E = context->Intermediate_Hash[4]; F = context->Intermediate_Hash[5]; G = context->Intermediate_Hash[6]; H = context->Intermediate_Hash[7]; for (t = 0; t < 80; t++) { temp1 = H + SHA512_SIGMA1(E) + SHA_Ch(E, F, G) + K[t] + W[t]; temp2 = SHA512_SIGMA0(A) + SHA_Maj(A, B, C); H = G; G = F; F = E; E = D + temp1; D = C; C = B; B = A; A = temp1 + temp2; } context->Intermediate_Hash[0] += A; context->Intermediate_Hash[1] += B; context->Intermediate_Hash[2] += C; context->Intermediate_Hash[3] += D; context->Intermediate_Hash[4] += E; context->Intermediate_Hash[5] += F; context->Intermediate_Hash[6] += G; context->Intermediate_Hash[7] += H; #endif /* USE_32BIT_ONLY */ context->Message_Block_Index = 0; } /* * SHA384_512Reset * * Description: * This helper function will initialize the SHA512Context in * preparation for computing a new SHA384 or SHA512 message * digest. * * Parameters: * context: [in/out] * The context to reset. * H0 * The initial hash value to use. * * Returns: * sha Error Code. * */ #ifdef USE_32BIT_ONLY static int SHA384_512Reset(SHA512Context *context, uint32_t H0[]) #else /* !USE_32BIT_ONLY */ static int SHA384_512Reset(SHA512Context *context, uint64_t H0[]) #endif /* USE_32BIT_ONLY */ { int i; if (!context) return shaNull; context->Message_Block_Index = 0; #ifdef USE_32BIT_ONLY context->Length[0] = context->Length[1] = 0; context->Length[2] = context->Length[3] = 0; for (i = 0; i < SHA512HashSize / 4; i++) context->Intermediate_Hash[i] = H0[i]; #else /* !USE_32BIT_ONLY */ context->Length_High = context->Length_Low = 0; for (i = 0; i < SHA512HashSize / 8; i++) context->Intermediate_Hash[i] = H0[i]; #endif /* USE_32BIT_ONLY */ context->Computed = 0; context->Corrupted = 0; return shaSuccess; } /* * SHA384_512ResultN * * Description: * This helper function will return the 384-bit or 512-bit message * digest into the Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 48th/64th element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA hash. * Message_Digest: [out] * Where the digest is returned. * HashSize: [in] * The size of the hash, either 48 or 64. * * Returns: * sha Error Code. * */ static int SHA384_512ResultN(SHA512Context *context, uint8_t Message_Digest[], int HashSize) { int i; #ifdef USE_32BIT_ONLY int i2; #endif /* USE_32BIT_ONLY */ if (!context || !Message_Digest) return shaNull; if (context->Corrupted) return context->Corrupted; if (!context->Computed) SHA384_512Finalize(context, 0x80); #ifdef USE_32BIT_ONLY for (i = i2 = 0; i < HashSize;) { Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2] >> 24); Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2] >> 16); Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2] >> 8); Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2++]); Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2] >> 24); Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2] >> 16); Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2] >> 8); Message_Digest[i++] = (uint8_t)(context->Intermediate_Hash[i2++]); } #else /* !USE_32BIT_ONLY */ for (i = 0; i < HashSize; ++i) Message_Digest[i] = (uint8_t) (context->Intermediate_Hash[i >> 3] >> 8 * (7 - (i % 8))); #endif /* USE_32BIT_ONLY */ return shaSuccess; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/singlylinkedlist.c000066400000000000000000000336111362133436400336630ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" typedef struct LIST_ITEM_INSTANCE_TAG { const void* item; void* next; } LIST_ITEM_INSTANCE; typedef struct SINGLYLINKEDLIST_INSTANCE_TAG { LIST_ITEM_INSTANCE* head; LIST_ITEM_INSTANCE* tail; } LIST_INSTANCE; SINGLYLINKEDLIST_HANDLE singlylinkedlist_create(void) { LIST_INSTANCE* result; /* Codes_SRS_LIST_01_001: [singlylinkedlist_create shall create a new list and return a non-NULL handle on success.] */ result = (LIST_INSTANCE*)malloc(sizeof(LIST_INSTANCE)); if (result != NULL) { /* Codes_SRS_LIST_01_002: [If any error occurs during the list creation, singlylinkedlist_create shall return NULL.] */ result->head = NULL; result->tail = NULL; } return result; } void singlylinkedlist_destroy(SINGLYLINKEDLIST_HANDLE list) { /* Codes_SRS_LIST_01_004: [If the list argument is NULL, no freeing of resources shall occur.] */ if (list != NULL) { LIST_INSTANCE* list_instance = (LIST_INSTANCE*)list; while (list_instance->head != NULL) { LIST_ITEM_INSTANCE* current_item = list_instance->head; list_instance->head = (LIST_ITEM_INSTANCE*)current_item->next; free(current_item); } /* Codes_SRS_LIST_01_003: [singlylinkedlist_destroy shall free all resources associated with the list identified by the handle argument.] */ free(list_instance); } } LIST_ITEM_HANDLE singlylinkedlist_add(SINGLYLINKEDLIST_HANDLE list, const void* item) { LIST_ITEM_INSTANCE* result; /* Codes_SRS_LIST_01_006: [If any of the arguments is NULL, singlylinkedlist_add shall not add the item to the list and return NULL.] */ if ((list == NULL) || (item == NULL)) { LogError("Invalid argument (list=%p, item=%p)", list, item); result = NULL; } else { LIST_INSTANCE* list_instance = (LIST_INSTANCE*)list; result = (LIST_ITEM_INSTANCE*)malloc(sizeof(LIST_ITEM_INSTANCE)); if (result == NULL) { /* Codes_SRS_LIST_01_007: [If allocating the new list node fails, singlylinkedlist_add shall return NULL.] */ /*return as is*/ } else { /* Codes_SRS_LIST_01_005: [singlylinkedlist_add shall add one item to the tail of the list and on success it shall return a handle to the added item.] */ result->next = NULL; result->item = item; if (list_instance->head == NULL) { list_instance->head = result; list_instance->tail = result; } else { list_instance->tail->next = result; list_instance->tail = result; } } } return result; } int singlylinkedlist_remove(SINGLYLINKEDLIST_HANDLE list, LIST_ITEM_HANDLE item) { int result; /* Codes_SRS_LIST_01_024: [If any of the arguments list or item_handle is NULL, singlylinkedlist_remove shall fail and return a non-zero value.] */ if ((list == NULL) || (item == NULL)) { LogError("Invalid argument (list=%p, item=%p)", list, item); result = __FAILURE__; } else { LIST_INSTANCE* list_instance = (LIST_INSTANCE*)list; LIST_ITEM_INSTANCE* current_item = list_instance->head; LIST_ITEM_INSTANCE* previous_item = NULL; while (current_item != NULL) { if (current_item == item) { if (previous_item != NULL) { previous_item->next = current_item->next; } else { list_instance->head = (LIST_ITEM_INSTANCE*)current_item->next; } if (current_item == list_instance->tail) { list_instance->tail = previous_item; } free(current_item); break; } previous_item = current_item; current_item = (LIST_ITEM_INSTANCE*)current_item->next; } if (current_item == NULL) { /* Codes_SRS_LIST_01_025: [If the item item_handle is not found in the list, then singlylinkedlist_remove shall fail and return a non-zero value.] */ result = __FAILURE__; } else { /* Codes_SRS_LIST_01_023: [singlylinkedlist_remove shall remove a list item from the list and on success it shall return 0.] */ result = 0; } } return result; } LIST_ITEM_HANDLE singlylinkedlist_get_head_item(SINGLYLINKEDLIST_HANDLE list) { LIST_ITEM_HANDLE result; if (list == NULL) { /* Codes_SRS_LIST_01_009: [If the list argument is NULL, singlylinkedlist_get_head_item shall return NULL.] */ LogError("Invalid argument (list=NULL)"); result = NULL; } else { LIST_INSTANCE* list_instance = (LIST_INSTANCE*)list; /* Codes_SRS_LIST_01_008: [singlylinkedlist_get_head_item shall return the head of the list.] */ /* Codes_SRS_LIST_01_010: [If the list is empty, singlylinkedlist_get_head_item_shall_return NULL.] */ result = list_instance->head; } return result; } LIST_ITEM_HANDLE singlylinkedlist_get_next_item(LIST_ITEM_HANDLE item_handle) { LIST_ITEM_HANDLE result; if (item_handle == NULL) { LogError("Invalid argument (list is NULL)"); /* Codes_SRS_LIST_01_019: [If item_handle is NULL then singlylinkedlist_get_next_item shall return NULL.] */ result = NULL; } else { /* Codes_SRS_LIST_01_018: [singlylinkedlist_get_next_item shall return the next item in the list following the item item_handle.] */ result = (LIST_ITEM_HANDLE)((LIST_ITEM_INSTANCE*)item_handle)->next; } return result; } const void* singlylinkedlist_item_get_value(LIST_ITEM_HANDLE item_handle) { const void* result; if (item_handle == NULL) { LogError("Invalid argument (item_handle is NULL)"); /* Codes_SRS_LIST_01_021: [If item_handle is NULL, singlylinkedlist_item_get_value shall return NULL.] */ result = NULL; } else { /* Codes_SRS_LIST_01_020: [singlylinkedlist_item_get_value shall return the value associated with the list item identified by the item_handle argument.] */ result = ((LIST_ITEM_INSTANCE*)item_handle)->item; } return result; } LIST_ITEM_HANDLE singlylinkedlist_find(SINGLYLINKEDLIST_HANDLE list, LIST_MATCH_FUNCTION match_function, const void* match_context) { LIST_ITEM_HANDLE result; if ((list == NULL) || (match_function == NULL)) { LogError("Invalid argument (list=%p, match_function=%p)", list, match_function); /* Codes_SRS_LIST_01_012: [If the list or the match_function argument is NULL, singlylinkedlist_find shall return NULL.] */ result = NULL; } else { LIST_INSTANCE* list_instance = (LIST_INSTANCE*)list; LIST_ITEM_INSTANCE* current = list_instance->head; /* Codes_SRS_LIST_01_011: [singlylinkedlist_find shall iterate through all items in a list and return the first one that satisfies a certain match function.] */ while (current != NULL) { /* Codes_SRS_LIST_01_014: [list find shall determine whether an item satisfies the match criteria by invoking the match function for each item in the list until a matching item is found.] */ /* Codes_SRS_LIST_01_013: [The match_function shall get as arguments the list item being attempted to be matched and the match_context as is.] */ if (match_function((LIST_ITEM_HANDLE)current, match_context) == true) { /* Codes_SRS_LIST_01_017: [If the match function returns true, singlylinkedlist_find shall consider that item as matching.] */ break; } /* Codes_SRS_LIST_01_016: [If the match function returns false, singlylinkedlist_find shall consider that item as not matching.] */ current = (LIST_ITEM_INSTANCE*)current->next; } if (current == NULL) { /* Codes_SRS_LIST_01_015: [If the list is empty, singlylinkedlist_find shall return NULL.] */ result = NULL; } else { result = current; } } return result; } int singlylinkedlist_remove_if(SINGLYLINKEDLIST_HANDLE list, LIST_CONDITION_FUNCTION condition_function, const void* match_context) { int result; /* Codes_SRS_LIST_09_001: [ If the list or the condition_function argument is NULL, singlylinkedlist_remove_if shall return non-zero value. ] */ if ((list == NULL) || (condition_function == NULL)) { LogError("Invalid argument (list=%p, condition_function=%p)", list, condition_function); result = __FAILURE__; } else { LIST_INSTANCE* list_instance = (LIST_INSTANCE*)list; LIST_ITEM_INSTANCE* current_item = list_instance->head; LIST_ITEM_INSTANCE* next_item = NULL; LIST_ITEM_INSTANCE* previous_item = NULL; /* Codes_SRS_LIST_09_002: [ singlylinkedlist_remove_if shall iterate through all items in a list and remove all that satisfies a certain condition function. ] */ while (current_item != NULL) { bool continue_processing = false; next_item = (LIST_ITEM_INSTANCE*)current_item->next; /* Codes_SRS_LIST_09_003: [ singlylinkedlist_remove_if shall determine whether an item satisfies the condition criteria by invoking the condition function for that item. ] */ /* Codes_SRS_LIST_09_004: [ If the condition function returns true, singlylinkedlist_find shall consider that item as to be removed. ] */ if (condition_function(current_item->item, match_context, &continue_processing) == true) { if (previous_item != NULL) { previous_item->next = next_item; } else { list_instance->head = next_item; } if (current_item == list_instance->tail) { list_instance->tail = previous_item; } free(current_item); } /* Codes_SRS_LIST_09_005: [ If the condition function returns false, singlylinkedlist_find shall consider that item as not to be removed. ] */ else { previous_item = current_item; } /* Codes_SRS_LIST_09_006: [ If the condition function returns continue_processing as false, singlylinkedlist_remove_if shall stop iterating through the list and return. ] */ if (continue_processing == false) { break; } current_item = next_item; } /* Codes_SRS_LIST_09_007: [ If no errors occur, singlylinkedlist_remove_if shall return zero. ] */ result = 0; } return result; } int singlylinkedlist_foreach(SINGLYLINKEDLIST_HANDLE list, LIST_ACTION_FUNCTION action_function, const void* action_context) { int result; /* Codes_SRS_LIST_09_008: [ If the list or the action_function argument is NULL, singlylinkedlist_foreach shall return non-zero value. ] */ if ((list == NULL) || (action_function == NULL)) { LogError("Invalid argument (list=%p, action_function=%p)", list, action_function); result = __FAILURE__; } else { LIST_INSTANCE* list_instance = (LIST_INSTANCE*)list; LIST_ITEM_INSTANCE* list_item = list_instance->head; while (list_item != NULL) { bool continue_processing = false; /* Codes_SRS_LIST_09_009: [ singlylinkedlist_foreach shall iterate through all items in a list and invoke action_function for each one of them. ] */ action_function(list_item->item, action_context, &continue_processing); /* Codes_SRS_LIST_09_010: [ If the condition function returns continue_processing as false, singlylinkedlist_foreach shall stop iterating through the list and return. ] */ if (continue_processing == false) { break; } list_item = (LIST_ITEM_INSTANCE*)list_item->next; } /* Codes_SRS_LIST_09_011: [ If no errors occur, singlylinkedlist_foreach shall return zero. ] */ result = 0; } return result; } LIST_ITEM_HANDLE singlylinkedlist_add_head(SINGLYLINKEDLIST_HANDLE list, const void* item) { LIST_ITEM_HANDLE result; /* Codes_SRS_LIST_02_001: [ If list is NULL then singlylinkedlist_add_head shall fail and return NULL. ]*/ if (list == NULL) { LogError("Invalid argument SINGLYLINKEDLIST_HANDLE list=%p", list); result = NULL; } else { result = malloc(sizeof(LIST_ITEM_INSTANCE)); if (result == NULL) { /*Codes_SRS_LIST_02_003: [ If there are any failures then singlylinkedlist_add_head shall fail and return NULL. ]*/ LogError("failure in malloc"); /*return as is*/ } else { /*Codes_SRS_LIST_02_002: [ singlylinkedlist_add_head shall insert item at head, succeed and return a non-NULL value. ]*/ result->item = item; if (list->head == NULL) { result->next = NULL; list->head = result; list->tail = result; } else { result->next = list->head; list->head = result; } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/string_token.c000066400000000000000000000335561362133436400330110ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/string_token.h" typedef struct STRING_TOKEN_TAG { const char* source; size_t length; const char* token_start; const char* delimiter_start; const char* delimiter; } STRING_TOKEN; static size_t* get_delimiters_lengths(const char** delimiters, size_t n_delims) { size_t* result; if ((result = malloc(sizeof(size_t) * n_delims)) == NULL) { LogError("Failed to allocate array for delimiters lengths"); } else { size_t i; for (i = 0; i < n_delims; i++) { if (delimiters[i] == NULL) { // Codes_SRS_STRING_TOKENIZER_09_002: [ If any of the strings in `delimiters` are NULL, the function shall return NULL ] LogError("Invalid argument (delimiter %lu is NULL)", (unsigned long)i); free(result); result = NULL; break; } else { result[i] = strlen(delimiters[i]); } } } return result; } static int get_next_token(STRING_TOKEN* token, const char** delimiters, size_t n_delims) { int result; if (token->token_start != NULL && token->delimiter_start == NULL) { // The parser reached the end of the input string. result = __FAILURE__; } else { size_t* delimiters_lengths; if ((delimiters_lengths = get_delimiters_lengths(delimiters, n_delims)) == NULL) { LogError("Failed to get delimiters lengths"); result = __FAILURE__; } else { const char* new_token_start; const char* current_pos; const char* stop_pos = (char*)token->source + token->length; size_t j; // iterator for the delimiters. if (token->delimiter_start == NULL) { // Codes_SRS_STRING_TOKENIZER_09_005: [ The source string shall be split in a token starting from the beginning of `source` up to occurrence of any one of the `demiliters`, whichever occurs first in the order provided ] new_token_start = (char*)token->source; } else { // Codes_SRS_STRING_TOKENIZER_09_010: [ The next token shall be selected starting from the position in `source` right after the previous delimiter up to occurrence of any one of `demiliters`, whichever occurs first in the order provided ] new_token_start = token->delimiter_start + strlen(token->delimiter); } current_pos = new_token_start; result = 0; while (current_pos < stop_pos) { for (j = 0; j < n_delims; j++) { if (*current_pos == *delimiters[j]) { size_t k; for (k = 1; k < delimiters_lengths[j] && (current_pos + k) < stop_pos; k++) { if (*(current_pos + k) != *(delimiters[j] + k)) { break; } } if (k == delimiters_lengths[j]) { token->delimiter_start = current_pos; token->delimiter = delimiters[j]; if (token->delimiter_start == token->source) { // Delimiter occurs in the beginning of the source string. token->token_start = NULL; } else { token->token_start = new_token_start; } goto SCAN_COMPLETED; } } } current_pos++; } // Codes_SRS_STRING_TOKENIZER_09_006: [ If the source string does not have any of the `demiliters`, the resulting token shall be the entire `source` string ] // Codes_SRS_STRING_TOKENIZER_09_011: [ If the source string, starting right after the position of the last delimiter found, does not have any of the `demiliters`, the resulting token shall be the entire remaining of the `source` string ] if (current_pos == stop_pos) { token->token_start = new_token_start; token->delimiter_start = NULL; // Codes_SRS_STRING_TOKENIZER_09_019: [ If the current token extends to the end of `source`, the function shall return NULL ] token->delimiter = NULL; } SCAN_COMPLETED: free(delimiters_lengths); } } return result; } STRING_TOKEN_HANDLE StringToken_GetFirst(const char* source, size_t length, const char** delimiters, size_t n_delims) { STRING_TOKEN* result; // Codes_SRS_STRING_TOKENIZER_09_001: [ If `source` or `delimiters` are NULL, or `n_delims` is zero, the function shall return NULL ] if (source == NULL || delimiters == NULL || n_delims == 0) { LogError("Invalid argument (source=%p, delimiters=%p, n_delims=%lu)", source, delimiters, (unsigned long)n_delims); result = NULL; } else { // Codes_SRS_STRING_TOKENIZER_09_003: [ A STRING_TOKEN structure shall be allocated to hold the token parameters ] if ((result = (STRING_TOKEN*)malloc(sizeof(STRING_TOKEN))) == NULL) { // Codes_SRS_STRING_TOKENIZER_09_004: [ If the STRING_TOKEN structure fails to be allocated, the function shall return NULL ] LogError("Failed allocating STRING_TOKEN"); } else { (void)memset(result, 0, sizeof(STRING_TOKEN)); result->source = source; result->length = length; if (get_next_token(result, delimiters, n_delims) != 0) { LogError("Failed to get first token"); // Codes_SRS_STRING_TOKENIZER_09_007: [ If any failure occurs, all memory allocated by this function shall be released ] free(result); result = NULL; } } } return result; } bool StringToken_GetNext(STRING_TOKEN_HANDLE token, const char** delimiters, size_t n_delims) { bool result; // Codes_SRS_STRING_TOKENIZER_09_008: [ If `token` or `delimiters` are NULL, or `n_delims` is zero, the function shall return false ] if (token == NULL || delimiters == NULL || n_delims == 0) { LogError("Invalid argument (token=%p, delimiters=%p, n_delims=%lu)", token, delimiters, (unsigned long)n_delims); result = false; } else if (get_next_token(token, delimiters, n_delims) != 0) { // Codes_SRS_STRING_TOKENIZER_09_009: [ If the previous token already extended to the end of `source`, the function shall return false ] result = false; } else { // Codes_SRS_STRING_TOKENIZER_09_012: [ If a token was identified, the function shall return true ] result = true; } return result; } const char* StringToken_GetValue(STRING_TOKEN_HANDLE token) { const char* result; // Codes_SRS_STRING_TOKENIZER_09_013: [ If `token` is NULL the function shall return NULL ] if (token == NULL) { LogError("Invalig argument (token is NULL)"); result = NULL; } // Beyond the length of the source string. else if (token->token_start == (token->source + token->length)) { result = NULL; } // Two delimiters side by side (empty token). else if (token->token_start == token->delimiter_start) { result = NULL; } else { // Codes_SRS_STRING_TOKENIZER_09_014: [ The function shall return the pointer to the position in `source` where the current token starts. ] result = token->token_start; } return result; } size_t StringToken_GetLength(STRING_TOKEN_HANDLE token) { size_t result; // Codes_SRS_STRING_TOKENIZER_09_015: [ If `token` is NULL the function shall return zero ] if (token == NULL) { LogError("Invalig argument (token is NULL)"); result = 0; } // Codes_SRS_STRING_TOKENIZER_09_016: [ The function shall return the length of the current token ] else if (token->token_start == NULL) { result = 0; } else if (token->delimiter_start == NULL) { result = token->source + token->length - token->token_start; } else { result = token->delimiter_start - token->token_start; } return result; } const char* StringToken_GetDelimiter(STRING_TOKEN_HANDLE token) { const char* result; if (token == NULL) { // Codes_SRS_STRING_TOKENIZER_09_017: [ If `token` is NULL the function shall return NULL ] LogError("Invalig argument (token is NULL)"); result = NULL; } else { // Codes_SRS_STRING_TOKENIZER_09_018: [ The function shall return a pointer to the delimiter that defined the current token, as passed to the previous call to `StringToken_GetNext()` or `StringToken_GetFirst()` ] result = token->delimiter; } return result; } int StringToken_Split(const char* source, size_t length, const char** delimiters, size_t n_delims, bool include_empty, char*** tokens, size_t* token_count) { int result; // Codes_SRS_STRING_TOKENIZER_09_022: [ If `source`, `delimiters`, `token` or `token_count` are NULL, or `n_delims` is zero the function shall return a non-zero value ] if (source == NULL || delimiters == NULL || n_delims == 0 || tokens == NULL || token_count == NULL) { LogError("Invalid argument (source=%p, delimiters=%p, n_delims=%lu, tokens=%p, token_count=%p)", source, delimiters, (unsigned long)n_delims, tokens, token_count); result = __FAILURE__; } else { STRING_TOKEN_HANDLE tokenizer; // Codes_SRS_STRING_TOKENIZER_09_023: [ `source` (up to `length`) shall be split into individual tokens separated by any of `delimiters` ] tokenizer = StringToken_GetFirst(source, length, delimiters, n_delims); *token_count = 0; *tokens = NULL; // Codes_SRS_STRING_TOKENIZER_09_027: [ If no failures occur the function shall return zero ] result = 0; if (tokenizer != NULL) { do { const char* tokenValue; size_t tokenLength; tokenValue = StringToken_GetValue(tokenizer); tokenLength = StringToken_GetLength(tokenizer); if ((tokenValue != NULL && tokenLength == 0) || (tokenValue == NULL && tokenLength > 0)) { LogError("Unexpected token value (%p) or length (%lu)", tokenValue, (unsigned long)tokenLength); result = __FAILURE__; break; } // Codes_SRS_STRING_TOKENIZER_09_024: [ All NULL tokens shall be ommited if `include_empty` is not TRUE ] else if (tokenValue != NULL || include_empty) { // Codes_SRS_STRING_TOKENIZER_09_025: [ The tokens shall be stored in `tokens`, and their count stored in `token_count` ] *token_count = (*token_count) + 1; if ((*tokens = (char**)realloc(*tokens, sizeof(char*) * (*token_count))) == NULL) { // Codes_SRS_STRING_TOKENIZER_09_026: [ If any failures splitting or storing the tokens occur the function shall return a non-zero value ] LogError("Failed re-allocating the token array"); *token_count = 0; result = __FAILURE__; break; } else if (tokenLength == 0) { (*tokens)[(*token_count) - 1] = NULL; } else if (((*tokens)[(*token_count) - 1] = (char*)malloc(sizeof(char) * (tokenLength + 1))) == NULL) { // Codes_SRS_STRING_TOKENIZER_09_026: [ If any failures splitting or storing the tokens occur the function shall return a non-zero value ] LogError("Failed copying token into array"); *token_count = (*token_count) - 1; result = __FAILURE__; break; } else { (void)memcpy((*tokens)[(*token_count) - 1], tokenValue, tokenLength); (*tokens)[(*token_count) - 1][tokenLength] = '\0'; } } } while (StringToken_GetNext(tokenizer, delimiters, n_delims)); StringToken_Destroy(tokenizer); if (result != 0) { while ((*token_count) > 0) { *token_count = (*token_count) - 1; free((*tokens)[*token_count]); } free(*tokens); } } } return result; } void StringToken_Destroy(STRING_TOKEN_HANDLE token) { if (token == NULL) { // Codes_SRS_STRING_TOKENIZER_09_020: [ If `token` is NULL the function shall return ] LogError("Invalig argument (token is NULL)"); } else { // Codes_SRS_STRING_TOKENIZER_09_021: [ Otherwise the memory allocated for STRING_TOKEN shall be released ] free(token); } }azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/string_tokenizer.c000066400000000000000000000210021362133436400336620ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include #include "azure_c_shared_utility/string_tokenizer.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/crt_abstractions.h" typedef struct STRING_TOKEN_TAG { const char* inputString; const char* currentPos; size_t sizeOfinputString; } STRING_TOKEN; STRING_TOKENIZER_HANDLE STRING_TOKENIZER_create(STRING_HANDLE handle) { STRING_TOKENIZER_HANDLE result; /* Codes_SRS_STRING_04_001: [STRING_TOKENIZER_create shall return an NULL STRING_TOKENIZER_HANDLE if parameter handle is NULL] */ if (handle == NULL) { LogError("Invalid Argument. Handle cannot be NULL."); result = NULL; } else { /* Codes_SRS_STRING_04_002: [STRING_TOKENIZER_create shall allocate a new STRING_TOKENIZER_HANDLE having the content of the STRING_HANDLE copied and current position pointing at the beginning of the string] */ result = STRING_TOKENIZER_create_from_char(STRING_c_str(handle)); } return result; } extern STRING_TOKENIZER_HANDLE STRING_TOKENIZER_create_from_char(const char* input) { STRING_TOKEN *result; char* inputStringToMalloc; /* Codes_SRS_STRING_07_001: [STRING_TOKENIZER_create shall return an NULL STRING_TOKENIZER_HANDLE if parameter input is NULL] */ if (input == NULL) { LogError("Invalid Argument. Handle cannot be NULL."); result = NULL; } /* Codes_SRS_STRING_07_002: [STRING_TOKENIZER_create shall allocate a new STRING_TOKENIZER_HANDLE having the content of the STRING_HANDLE copied and current position pointing at the beginning of the string] */ else if ((result = (STRING_TOKEN*)malloc(sizeof(STRING_TOKEN))) == NULL) { LogError("Memory Allocation failed. Cannot allocate STRING_TOKENIZER."); } else if ((mallocAndStrcpy_s(&inputStringToMalloc, input)) != 0) { LogError("Memory Allocation Failed. Cannot allocate and copy string Content."); free(result); result = NULL; } else { result->inputString = inputStringToMalloc; result->currentPos = result->inputString; //Current Pos will point to the initial position of Token. result->sizeOfinputString = strlen(result->inputString); //Calculate Size of Current String } return (STRING_TOKENIZER_HANDLE)result; } int STRING_TOKENIZER_get_next_token(STRING_TOKENIZER_HANDLE tokenizer, STRING_HANDLE output, const char* delimiters) { int result; /* Codes_SRS_STRING_04_004: [STRING_TOKENIZER_get_next_token shall return a nonzero value if any of the 3 parameters is NULL] */ if (tokenizer == NULL || output == NULL || delimiters == NULL) { result = __FAILURE__; } else { STRING_TOKEN* token = (STRING_TOKEN*)tokenizer; /* Codes_SRS_STRING_04_011: [Each subsequent call to STRING_TOKENIZER_get_next_token starts searching from the saved position on t and behaves as described above.] */ size_t remainingInputStringSize = token->sizeOfinputString - (token->currentPos - token->inputString); size_t delimitterSize = strlen(delimiters); /* First Check if we reached the end of the string*/ /* Codes_SRS_STRING_TOKENIZER_04_014: [STRING_TOKENIZER_get_next_token shall return nonzero value if t contains an empty string.] */ if (remainingInputStringSize == 0) { result = __FAILURE__; } else if (delimitterSize == 0) { LogError("Empty delimiters parameter."); result = __FAILURE__; } else { size_t i; /* Codes_SRS_STRING_04_005: [STRING_TOKENIZER_get_next_token searches the string inside STRING_TOKENIZER_HANDLE for the first character that is NOT contained in the current delimiter] */ for (i = 0; i < remainingInputStringSize; i++) { size_t j; bool foundDelimitter = false; for (j = 0; j < delimitterSize; j++) { if (token->currentPos[i] == delimiters[j]) { foundDelimitter = true; break; } } /* Codes_SRS_STRING_04_007: [If such a character is found, STRING_TOKENIZER_get_next_token consider it as the start of a token.] */ if (!foundDelimitter) { break; } } /* Codes_SRS_STRING_04_006: [If no such character is found, then STRING_TOKENIZER_get_next_token shall return a nonzero Value (You've reach the end of the string or the string consists with only delimiters).] */ //At this point update Current Pos to the character of the last token found or end of String. token->currentPos += i; //Update the remainingInputStringSize remainingInputStringSize -= i; /* Codes_SRS_STRING_04_006: [If no such character is found, then STRING_TOKENIZER_get_next_token shall return a nonzero Value (You've reach the end of the string or the string consists with only delimiters).] */ if (remainingInputStringSize == 0) { result = __FAILURE__; } else { bool foundDelimitter = false; const char* endOfTokenPosition=NULL; size_t amountOfCharactersToCopy; size_t j; //At this point the Current Pos is pointing to a character that is point to a nonDelimiter. So, now search for a Delimiter, till the end of the String. /*Codes_SRS_STRING_04_008: [STRING_TOKENIZER_get_next_token than searches from the start of a token for a character that is contained in the delimiters string.] */ /* Codes_SRS_STRING_04_009: [If no such character is found, STRING_TOKENIZER_get_next_token extends the current token to the end of the string inside t, copies the token to output and returns 0.] */ /* Codes_SRS_STRING_04_010: [If such a character is found, STRING_TOKENIZER_get_next_token consider it the end of the token and copy it's content to output, updates the current position inside t to the next character and returns 0.] */ for (j = 0; j < delimitterSize; j++) { if ((endOfTokenPosition = strchr(token->currentPos, delimiters[j])) != NULL) { foundDelimitter = true; break; } } //If token not found, than update the EndOfToken to the end of the inputString; if (endOfTokenPosition == NULL) { amountOfCharactersToCopy = remainingInputStringSize; } else { amountOfCharactersToCopy = endOfTokenPosition - token->currentPos; } //copy here the string to output. if (STRING_copy_n(output, token->currentPos, amountOfCharactersToCopy) != 0) { LogError("Problem copying token to output String."); result = __FAILURE__; } else { //Update the Current position. //Check if end of String reached so, currentPos points to the end of String. if (foundDelimitter) { token->currentPos += amountOfCharactersToCopy + 1; } else { token->currentPos += amountOfCharactersToCopy; } result = 0; //Result will be on the output. } } } } return result; } /* Codes_SRS_STRING_TOKENIZER_04_012: [STRING_TOKENIZER_destroy shall free the memory allocated by the STRING_TOKENIZER_create ] */ void STRING_TOKENIZER_destroy(STRING_TOKENIZER_HANDLE t) { /* Codes_SRS_STRING_TOKENIZER_04_013: [When the t argument is NULL, then STRING_TOKENIZER_destroy shall not attempt to free] */ if (t != NULL) { STRING_TOKEN* value = (STRING_TOKEN*)t; free((char*)value->inputString); value->inputString = NULL; free(value); } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/strings.c000077500000000000000000000724301362133436400317710ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // // PUT NO INCLUDES BEFORE HERE // #include #include "azure_c_shared_utility/gballoc.h" #include #include #include #include // // PUT NO CLIENT LIBRARY INCLUDES BEFORE HERE // #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" static const char hexToASCII[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; typedef struct STRING_TAG { char* s; } STRING; /*this function will allocate a new string with just '\0' in it*/ /*return NULL if it fails*/ /* Codes_SRS_STRING_07_001: [STRING_new shall allocate a new STRING_HANDLE pointing to an empty string.] */ STRING_HANDLE STRING_new(void) { STRING* result; if ((result = (STRING*)malloc(sizeof(STRING))) != NULL) { if ((result->s = (char*)malloc(1)) != NULL) { result->s[0] = '\0'; } else { /* Codes_SRS_STRING_07_002: [STRING_new shall return an NULL STRING_HANDLE on any error that is encountered.] */ LogError("Failure allocating in STRING_new."); free(result); result = NULL; } } return (STRING_HANDLE)result; } /*Codes_SRS_STRING_02_001: [STRING_clone shall produce a new string having the same content as the handle string.*/ STRING_HANDLE STRING_clone(STRING_HANDLE handle) { STRING* result; /*Codes_SRS_STRING_02_002: [If parameter handle is NULL then STRING_clone shall return NULL.]*/ if (handle == NULL) { result = NULL; } else { /*Codes_SRS_STRING_02_003: [If STRING_clone fails for any reason, it shall return NULL.] */ if ((result = (STRING*)malloc(sizeof(STRING))) != NULL) { STRING* source = (STRING*)handle; /*Codes_SRS_STRING_02_003: [If STRING_clone fails for any reason, it shall return NULL.] */ size_t sourceLen = strlen(source->s); if ((result->s = (char*)malloc(sourceLen + 1)) == NULL) { LogError("Failure allocating clone value."); free(result); result = NULL; } else { (void)memcpy(result->s, source->s, sourceLen + 1); } } else { /*not much to do, result is NULL from malloc*/ } } return (STRING_HANDLE)result; } /* Codes_SRS_STRING_07_003: [STRING_construct shall allocate a new string with the value of the specified const char*.] */ STRING_HANDLE STRING_construct(const char* psz) { STRING_HANDLE result; if (psz == NULL) { /* Codes_SRS_STRING_07_005: [If the supplied const char* is NULL STRING_construct shall return a NULL value.] */ result = NULL; } else { STRING* str; if ((str = (STRING*)malloc(sizeof(STRING))) != NULL) { size_t nLen = strlen(psz) + 1; if ((str->s = (char*)malloc(nLen)) != NULL) { (void)memcpy(str->s, psz, nLen); result = (STRING_HANDLE)str; } /* Codes_SRS_STRING_07_032: [STRING_construct encounters any error it shall return a NULL value.] */ else { LogError("Failure allocating constructed value."); free(str); result = NULL; } } else { /* Codes_SRS_STRING_07_032: [STRING_construct encounters any error it shall return a NULL value.] */ LogError("Failure allocating value."); result = NULL; } } return result; } #if defined(__GNUC__) __attribute__ ((format (printf, 1, 2))) #endif STRING_HANDLE STRING_construct_sprintf(const char* format, ...) { STRING* result; #ifdef STRINGS_C_SPRINTF_BUFFER_SIZE size_t maxBufSize = STRINGS_C_SPRINTF_BUFFER_SIZE; char buf[STRINGS_C_SPRINTF_BUFFER_SIZE]; #else size_t maxBufSize = 0; char* buf = NULL; #endif if (format != NULL) { va_list arg_list; int length; va_start(arg_list, format); /* Codes_SRS_STRING_07_041: [STRING_construct_sprintf shall determine the size of the resulting string and allocate the necessary memory.] */ length = vsnprintf(buf, maxBufSize, format, arg_list); va_end(arg_list); if (length > 0) { result = (STRING*)malloc(sizeof(STRING)); if (result != NULL) { result->s = (char*)malloc(length+1); if (result->s != NULL) { va_start(arg_list, format); if (vsnprintf(result->s, length+1, format, arg_list) < 0) { /* Codes_SRS_STRING_07_040: [If any error is encountered STRING_construct_sprintf shall return NULL.] */ free(result->s); free(result); result = NULL; LogError("Failure: vsnprintf formatting failed."); } va_end(arg_list); } else { /* Codes_SRS_STRING_07_040: [If any error is encountered STRING_construct_sprintf shall return NULL.] */ free(result); result = NULL; LogError("Failure: allocation sprintf value failed."); } } else { LogError("Failure: allocation failed."); } } else if (length == 0) { result = (STRING*)STRING_new(); } else { /* Codes_SRS_STRING_07_039: [If the parameter format is NULL then STRING_construct_sprintf shall return NULL.] */ result = NULL; LogError("Failure: vsnprintf return 0 length"); } } else { LogError("Failure: invalid argument."); result = NULL; } /* Codes_SRS_STRING_07_045: [STRING_construct_sprintf shall allocate a new string with the value of the specified printf formated const char. ] */ return (STRING_HANDLE)result; } /*this function will return a new STRING with the memory for the actual string passed in as a parameter.*/ /*return NULL if it fails.*/ /* The supplied memory must have been allocated with malloc! */ /* Codes_SRS_STRING_07_006: [STRING_new_with_memory shall return a STRING_HANDLE by using the supplied char* memory.] */ STRING_HANDLE STRING_new_with_memory(const char* memory) { STRING* result; if (memory == NULL) { /* Codes_SRS_STRING_07_007: [STRING_new_with_memory shall return a NULL STRING_HANDLE if the supplied char* is NULL.] */ result = NULL; } else { if ((result = (STRING*)malloc(sizeof(STRING))) != NULL) { result->s = (char*)memory; } else { LogError("Failure: allocating memory string"); } } return (STRING_HANDLE)result; } /* Codes_SRS_STRING_07_008: [STRING_new_quoted shall return a valid STRING_HANDLE Copying the supplied const char* value surrounded by quotes.] */ STRING_HANDLE STRING_new_quoted(const char* source) { STRING* result; if (source == NULL) { /* Codes_SRS_STRING_07_009: [STRING_new_quoted shall return a NULL STRING_HANDLE if the supplied const char* is NULL.] */ result = NULL; } else if ((result = (STRING*)malloc(sizeof(STRING))) != NULL) { size_t sourceLength = strlen(source); if ((result->s = (char*)malloc(sourceLength + 3)) != NULL) { result->s[0] = '"'; (void)memcpy(result->s + 1, source, sourceLength); result->s[sourceLength + 1] = '"'; result->s[sourceLength + 2] = '\0'; } else { /* Codes_SRS_STRING_07_031: [STRING_new_quoted shall return a NULL STRING_HANDLE if any error is encountered.] */ LogError("Failure allocating quoted string value."); free(result); result = NULL; } } return (STRING_HANDLE)result; } /*this function takes a regular const char* and turns in into "this is a\"JSON\" strings\u0008" (starting and ending quote included)*/ /*the newly created handle needs to be disposed of with STRING_delete*/ /*returns NULL if there are errors*/ STRING_HANDLE STRING_new_JSON(const char* source) { STRING* result; if (source == NULL) { /*Codes_SRS_STRING_02_011: [If source is NULL then STRING_new_JSON shall return NULL.] */ result = NULL; LogError("invalid arg (NULL)"); } else { size_t i; size_t nControlCharacters = 0; /*counts how many characters are to be expanded from 1 character to \uxxxx (6 characters)*/ size_t nEscapeCharacters = 0; size_t vlen = strlen(source); for (i = 0; i < vlen; i++) { /*Codes_SRS_STRING_02_014: [If any character has the value outside [1...127] then STRING_new_JSON shall fail and return NULL.] */ if ((unsigned char)source[i] >= 128) /*this be a UNICODE character begin*/ { break; } else { if (source[i] <= 0x1F) { nControlCharacters++; } else if ( (source[i] == '"') || (source[i] == '\\') || (source[i] == '/') ) { nEscapeCharacters++; } } } if (i < vlen) { result = NULL; LogError("invalid character in input string"); } else { if ((result = (STRING*)malloc(sizeof(STRING))) == NULL) { /*Codes_SRS_STRING_02_021: [If the complete JSON representation cannot be produced, then STRING_new_JSON shall fail and return NULL.] */ LogError("malloc json failure"); } else if ((result->s = (char*)malloc(vlen + 5 * nControlCharacters + nEscapeCharacters + 3)) == NULL) { /*Codes_SRS_STRING_02_021: [If the complete JSON representation cannot be produced, then STRING_new_JSON shall fail and return NULL.] */ free(result); result = NULL; LogError("malloc failed"); } else { size_t pos = 0; /*Codes_SRS_STRING_02_012: [The string shall begin with the quote character.] */ result->s[pos++] = '"'; for (i = 0; i < vlen; i++) { if (source[i] <= 0x1F) { /*Codes_SRS_STRING_02_019: [If the character code is less than 0x20 then it shall be represented as \u00xx, where xx is the hex representation of the character code.]*/ result->s[pos++] = '\\'; result->s[pos++] = 'u'; result->s[pos++] = '0'; result->s[pos++] = '0'; result->s[pos++] = hexToASCII[(source[i] & 0xF0) >> 4]; /*high nibble*/ result->s[pos++] = hexToASCII[source[i] & 0x0F]; /*low nibble*/ } else if (source[i] == '"') { /*Codes_SRS_STRING_02_016: [If the character is " (quote) then it shall be repsented as \".] */ result->s[pos++] = '\\'; result->s[pos++] = '"'; } else if (source[i] == '\\') { /*Codes_SRS_STRING_02_017: [If the character is \ (backslash) then it shall represented as \\.] */ result->s[pos++] = '\\'; result->s[pos++] = '\\'; } else if (source[i] == '/') { /*Codes_SRS_STRING_02_018: [If the character is / (slash) then it shall be represented as \/.] */ result->s[pos++] = '\\'; result->s[pos++] = '/'; } else { /*Codes_SRS_STRING_02_013: [The string shall copy the characters of source "as they are" (until the '\0' character) with the following exceptions:] */ result->s[pos++] = source[i]; } } /*Codes_SRS_STRING_02_020: [The string shall end with " (quote).] */ result->s[pos++] = '"'; /*zero terminating it*/ result->s[pos] = '\0'; } } } return (STRING_HANDLE)result; } /*this function will concatenate to the string s1 the string s2, resulting in s1+s2*/ /*returns 0 if success*/ /*any other error code is failure*/ /* Codes_SRS_STRING_07_012: [STRING_concat shall concatenate the given STRING_HANDLE and the const char* value and place the value in the handle.] */ int STRING_concat(STRING_HANDLE handle, const char* s2) { int result; if ((handle == NULL) || (s2 == NULL)) { /* Codes_SRS_STRING_07_013: [STRING_concat shall return a nonzero number if an error is encountered.] */ result = __FAILURE__; } else { STRING* s1 = (STRING*)handle; size_t s1Length = strlen(s1->s); size_t s2Length = strlen(s2); char* temp = (char*)realloc(s1->s, s1Length + s2Length + 1); if (temp == NULL) { /* Codes_SRS_STRING_07_013: [STRING_concat shall return a nonzero number if an error is encountered.] */ LogError("Failure reallocating value."); result = __FAILURE__; } else { s1->s = temp; (void)memcpy(s1->s + s1Length, s2, s2Length + 1); result = 0; } } return result; } /*this function will concatenate to the string s1 the string s2, resulting in s1+s2*/ /*returns 0 if success*/ /*any other error code is failure*/ /* Codes_SRS_STRING_07_034: [String_Concat_with_STRING shall concatenate a given STRING_HANDLE variable with a source STRING_HANDLE.] */ int STRING_concat_with_STRING(STRING_HANDLE s1, STRING_HANDLE s2) { int result; if ((s1 == NULL) || (s2 == NULL)) { /* Codes_SRS_STRING_07_035: [String_Concat_with_STRING shall return a nonzero number if an error is encountered.] */ LogError("Invalid argument specified"); result = __FAILURE__; } else { STRING* dest = (STRING*)s1; STRING* src = (STRING*)s2; size_t s1Length = strlen(dest->s); size_t s2Length = strlen(src->s); char* temp = (char*)realloc(dest->s, s1Length + s2Length + 1); if (temp == NULL) { /* Codes_SRS_STRING_07_035: [String_Concat_with_STRING shall return a nonzero number if an error is encountered.] */ LogError("Failure reallocating value"); result = __FAILURE__; } else { dest->s = temp; /* Codes_SRS_STRING_07_034: [String_Concat_with_STRING shall concatenate a given STRING_HANDLE variable with a source STRING_HANDLE.] */ (void)memcpy(dest->s + s1Length, src->s, s2Length + 1); result = 0; } } return result; } /*this function will copy the string from s2 to s1*/ /*returns 0 if success*/ /*any other error code is failure*/ /* Codes_SRS_STRING_07_016: [STRING_copy shall copy the const char* into the supplied STRING_HANDLE.] */ int STRING_copy(STRING_HANDLE handle, const char* s2) { int result; if ((handle == NULL) || (s2 == NULL)) { /* Codes_SRS_STRING_07_017: [STRING_copy shall return a nonzero value if any of the supplied parameters are NULL.] */ result = __FAILURE__; } else { STRING* s1 = (STRING*)handle; /* Codes_SRS_STRING_07_026: [If the underlying char* refered to by s1 handle is equal to char* s2 than STRING_copy shall be a noop and return 0.] */ if (s1->s != s2) { size_t s2Length = strlen(s2); char* temp = (char*)realloc(s1->s, s2Length + 1); if (temp == NULL) { LogError("Failure reallocating value."); /* Codes_SRS_STRING_07_027: [STRING_copy shall return a nonzero value if any error is encountered.] */ result = __FAILURE__; } else { s1->s = temp; memmove(s1->s, s2, s2Length + 1); result = 0; } } else { /* Codes_SRS_STRING_07_033: [If overlapping pointer address is given to STRING_copy the behavior is undefined.] */ result = 0; } } return result; } /*this function will copy n chars from s2 to the string s1, resulting in n chars only from s2 being stored in s1.*/ /*returns 0 if success*/ /*any other error code is failure*/ /* Codes_SRS_STRING_07_018: [STRING_copy_n shall copy the number of characters in const char* or the size_t whichever is lesser.] */ int STRING_copy_n(STRING_HANDLE handle, const char* s2, size_t n) { int result; if ((handle == NULL) || (s2 == NULL)) { /* Codes_SRS_STRING_07_019: [STRING_copy_n shall return a nonzero value if STRING_HANDLE or const char* is NULL.] */ result = __FAILURE__; } else { STRING* s1 = (STRING*)handle; size_t s2Length = strlen(s2); char* temp; if (s2Length > n) { s2Length = n; } temp = (char*)realloc(s1->s, s2Length + 1); if (temp == NULL) { LogError("Failure reallocating value."); /* Codes_SRS_STRING_07_028: [STRING_copy_n shall return a nonzero value if any error is encountered.] */ result = __FAILURE__; } else { s1->s = temp; (void)memcpy(s1->s, s2, s2Length); s1->s[s2Length] = 0; result = 0; } } return result; } #if defined(__GNUC__) __attribute__ ((format (printf, 2, 3))) #endif int STRING_sprintf(STRING_HANDLE handle, const char* format, ...) { int result; #ifdef STRINGS_C_SPRINTF_BUFFER_SIZE size_t maxBufSize = STRINGS_C_SPRINTF_BUFFER_SIZE; char buf[STRINGS_C_SPRINTF_BUFFER_SIZE]; #else size_t maxBufSize = 0; char* buf = NULL; #endif if (handle == NULL || format == NULL) { /* Codes_SRS_STRING_07_042: [if the parameters s1 or format are NULL then STRING_sprintf shall return non zero value.] */ LogError("Invalid arg (NULL)"); result = __FAILURE__; } else { va_list arg_list; int s2Length; va_start(arg_list, format); s2Length = vsnprintf(buf, maxBufSize, format, arg_list); va_end(arg_list); if (s2Length < 0) { /* Codes_SRS_STRING_07_043: [If any error is encountered STRING_sprintf shall return a non zero value.] */ LogError("Failure vsnprintf return < 0"); result = __FAILURE__; } else if (s2Length == 0) { // Don't need to reallocate and nothing should be added result = 0; } else { STRING* s1 = (STRING*)handle; char* temp; size_t s1Length = strlen(s1->s); temp = (char*)realloc(s1->s, s1Length + s2Length + 1); if (temp != NULL) { s1->s = temp; va_start(arg_list, format); if (vsnprintf(s1->s + s1Length, s1Length + s2Length + 1, format, arg_list) < 0) { /* Codes_SRS_STRING_07_043: [If any error is encountered STRING_sprintf shall return a non zero value.] */ LogError("Failure vsnprintf formatting error"); s1->s[s1Length] = '\0'; result = __FAILURE__; } else { /* Codes_SRS_STRING_07_044: [On success STRING_sprintf shall return 0.]*/ result = 0; } va_end(arg_list); } else { /* Codes_SRS_STRING_07_043: [If any error is encountered STRING_sprintf shall return a non zero value.] */ LogError("Failure unable to reallocate memory"); result = __FAILURE__; } } } return result; } /*this function will quote the string passed as argument string =>"string"*/ /*returns 0 if success*/ /*doesn't change the string otherwise*/ /*any other error code is failure*/ /* Codes_SRS_STRING_07_014: [STRING_quote shall "quote" the supplied STRING_HANDLE and return 0 on success.] */ int STRING_quote(STRING_HANDLE handle) { int result; if (handle == NULL) { /* Codes_SRS_STRING_07_015: [STRING_quote shall return a nonzero value if any of the supplied parameters are NULL.] */ result = __FAILURE__; } else { STRING* s1 = (STRING*)handle; size_t s1Length = strlen(s1->s); char* temp = (char*)realloc(s1->s, s1Length + 2 + 1);/*2 because 2 quotes, 1 because '\0'*/ if (temp == NULL) { LogError("Failure reallocating value."); /* Codes_SRS_STRING_07_029: [STRING_quote shall return a nonzero value if any error is encountered.] */ result = __FAILURE__; } else { s1->s = temp; memmove(s1->s + 1, s1->s, s1Length); s1->s[0] = '"'; s1->s[s1Length + 1] = '"'; s1->s[s1Length + 2] = '\0'; result = 0; } } return result; } /*this function will revert a string to an empty state*/ /*Returns 0 if the revert was succesful*/ /* Codes_SRS_STRING_07_022: [STRING_empty shall revert the STRING_HANDLE to an empty state.] */ int STRING_empty(STRING_HANDLE handle) { int result; if (handle == NULL) { /* Codes_SRS_STRING_07_023: [STRING_empty shall return a nonzero value if the STRING_HANDLE is NULL.] */ result = __FAILURE__; } else { STRING* s1 = (STRING*)handle; char* temp = (char*)realloc(s1->s, 1); if (temp == NULL) { LogError("Failure reallocating value."); /* Codes_SRS_STRING_07_030: [STRING_empty shall return a nonzero value if the STRING_HANDLE is NULL.] */ result = __FAILURE__; } else { s1->s = temp; s1->s[0] = '\0'; result = 0; } } return result; } /*this function will deallocate a string constructed by str_new*/ /* Codes_SRS_STRING_07_010: [STRING_delete will free the memory allocated by the STRING_HANDLE.] */ void STRING_delete(STRING_HANDLE handle) { /* Codes_SRS_STRING_07_011: [STRING_delete will not attempt to free anything with a NULL STRING_HANDLE.] */ if (handle != NULL) { STRING* value = (STRING*)handle; free(value->s); value->s = NULL; free(value); } } /* Codes_SRS_STRING_07_020: [STRING_c_str shall return the const char* associated with the given STRING_HANDLE.] */ const char* STRING_c_str(STRING_HANDLE handle) { const char* result; if (handle != NULL) { result = ((STRING*)handle)->s; } else { /* Codes_SRS_STRING_07_021: [STRING_c_str shall return NULL if the STRING_HANDLE is NULL.] */ result = NULL; } return result; } /* Codes_SRS_STRING_07_024: [STRING_length shall return the length of the underlying char* for the given handle] */ size_t STRING_length(STRING_HANDLE handle) { size_t result = 0; /* Codes_SRS_STRING_07_025: [STRING_length shall return zero if the given handle is NULL.] */ if (handle != NULL) { STRING* value = (STRING*)handle; result = strlen(value->s); } return result; } /*Codes_SRS_STRING_02_007: [STRING_construct_n shall construct a STRING_HANDLE from first "n" characters of the string pointed to by psz parameter.]*/ STRING_HANDLE STRING_construct_n(const char* psz, size_t n) { STRING_HANDLE result; /*Codes_SRS_STRING_02_008: [If psz is NULL then STRING_construct_n shall return NULL.] */ if (psz == NULL) { result = NULL; LogError("invalid arg (NULL)"); } else { size_t len = strlen(psz); /*Codes_SRS_STRING_02_009: [If n is bigger than the size of the string psz, then STRING_construct_n shall return NULL.] */ if (n > len) { result = NULL; LogError("invalig arg (n is bigger than the size of the string)"); } else { STRING* str; if ((str = (STRING*)malloc(sizeof(STRING))) != NULL) { if ((str->s = (char*)malloc(len + 1)) != NULL) { (void)memcpy(str->s, psz, n); str->s[n] = '\0'; result = (STRING_HANDLE)str; } /* Codes_SRS_STRING_02_010: [In all other error cases, STRING_construct_n shall return NULL.] */ else { LogError("Failure allocating value."); free(str); result = NULL; } } else { /* Codes_SRS_STRING_02_010: [In all other error cases, STRING_construct_n shall return NULL.] */ result = NULL; } } } return result; } /* Codes_SRS_STRING_07_034: [STRING_compare returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string s2.] */ int STRING_compare(STRING_HANDLE s1, STRING_HANDLE s2) { int result; if (s1 == NULL && s2 == NULL) { /* Codes_SRS_STRING_07_035: [If h1 and h2 are both NULL then STRING_compare shall return 0.]*/ result = 0; } else if (s1 == NULL) { /* Codes_SRS_STRING_07_036: [If h1 is NULL and h2 is nonNULL then STRING_compare shall return 1.]*/ result = 1; } else if (s2 == NULL) { /* Codes_SRS_STRING_07_037: [If h2 is NULL and h1 is nonNULL then STRING_compare shall return -1.] */ result = -1; } else { /* Codes_SRS_STRING_07_038: [STRING_compare shall compare the char s variable using the strcmp function.] */ STRING* value1 = (STRING*)s1; STRING* value2 = (STRING*)s2; result = strcmp(value1->s, value2->s); } return result; } STRING_HANDLE STRING_from_byte_array(const unsigned char* source, size_t size) { STRING* result; /*Codes_SRS_STRING_02_022: [ If source is NULL and size > 0 then STRING_from_BUFFER shall fail and return NULL. ]*/ if ((source == NULL) && (size > 0)) { LogError("invalid parameter (NULL)"); result = NULL; } else { /*Codes_SRS_STRING_02_023: [ Otherwise, STRING_from_BUFFER shall build a string that has the same content (byte-by-byte) as source and return a non-NULL handle. ]*/ result = (STRING*)malloc(sizeof(STRING)); if (result == NULL) { /*Codes_SRS_STRING_02_024: [ If building the string fails, then STRING_from_BUFFER shall fail and return NULL. ]*/ LogError("oom - unable to malloc"); /*return as is*/ } else { /*Codes_SRS_STRING_02_023: [ Otherwise, STRING_from_BUFFER shall build a string that has the same content (byte-by-byte) as source and return a non-NULL handle. ]*/ result->s = (char*)malloc(size + 1); if (result->s == NULL) { /*Codes_SRS_STRING_02_024: [ If building the string fails, then STRING_from_BUFFER shall fail and return NULL. ]*/ LogError("oom - unable to malloc"); free(result); result = NULL; } else { (void)memcpy(result->s, source, size); result->s[size] = '\0'; /*all is fine*/ } } } return (STRING_HANDLE)result; } int STRING_replace(STRING_HANDLE handle, char target, char replace) { int result; if (handle == NULL) { /* Codes_SRS_STRING_07_046: [ If handle is NULL STRING_replace shall return a non-zero value. ] */ result = __FAILURE__; } else if (target == replace) { /* Codes_SRS_STRING_07_048: [ If target and replace are equal STRING_replace, shall do nothing shall return zero. ] */ result = 0; } else { size_t length; size_t index; /* Codes_SRS_STRING_07_047: [ STRING_replace shall replace all instances of target with replace. ] */ STRING* str_value = (STRING*)handle; length = strlen(str_value->s); for (index = 0; index < length; index++) { if (str_value->s[index] == target) { str_value->s[index] = replace; } } /* Codes_SRS_STRING_07_049: [ On success STRING_replace shall return zero. ] */ result = 0; } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/urlencode.c000066400000000000000000000226021362133436400322510ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/urlencode.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/crt_abstractions.h" #define NIBBLE_TO_STRING(c) (char)((c) < 10 ? (c) + '0' : (c) - 10 + 'a') #define NIBBLE_FROM_STRING(c) (char)(ISDIGIT(c) ? (c) - '0' : TOUPPER(c) + 10 - 'A') #define IS_HEXDIGIT(c) ( \ ((c >= '0') && (c <= '9')) || \ ((c >= 'A') && (c <= 'F')) || \ ((c >= 'a') && (c <= 'f')) \ ) #define IS_PRINTABLE(c) ( \ (c == 0) || \ (c == '!') || \ (c == '(') || (c == ')') || (c == '*') || \ (c == '-') || (c == '.') || \ ((c >= '0') && (c <= '9')) || \ ((c >= 'A') && (c <= 'Z')) || \ (c == '_') || \ ((c >= 'a') && (c <= 'z')) \ ) /*The below macros are to be called on the big nibble of a hex value*/ #define IS_IN_ASCII_RANGE(c) ( \ (c >= '0') && (c <= '7') \ ) #define IS_IN_EXTENDED_ASCII_RANGE(c) ( \ ((c >= '8') && (c <= '9')) || \ ((c >= 'A') && (c <= 'F')) || \ ((c >= 'a') && (c <= 'f')) \ ) #define IS_IN_CONTINUATION_BYTE_RANGE(c) ( \ (c == '8') || (c == '9') || \ (c == 'A') || (c == 'B') || \ (c == 'a') || (c == 'b') \ ) #define IS_IN_LEADING_BYTE_RANGE(c) ( \ ((c >= 'C') && (c <= 'F')) || \ ((c >= 'c') && (c <= 'f')) \ ) #define IS_IN_UNSUPPORTED_LEADING_BYTE_RANGE(c) ( \ ((c >= 'D') && (c <= 'F')) || \ ((c >= 'd') && (c <= 'f')) \ ) static size_t URL_PrintableChar(unsigned char charVal, char* buffer) { size_t size; if (IS_PRINTABLE(charVal)) { buffer[0] = (char)charVal; size = 1; } else { char bigNibbleStr; char littleNibbleStr; unsigned char bigNibbleVal = charVal >> 4; unsigned char littleNibbleVal = charVal & 0x0F; if (bigNibbleVal >= 0x0C) { bigNibbleVal -= 0x04; } bigNibbleStr = NIBBLE_TO_STRING(bigNibbleVal); littleNibbleStr = NIBBLE_TO_STRING(littleNibbleVal); buffer[0] = '%'; if (charVal < 0x80) { buffer[1] = bigNibbleStr; buffer[2] = littleNibbleStr; size = 3; } else { buffer[1] = 'c'; buffer[3] = '%'; buffer[4] = bigNibbleStr; buffer[5] = littleNibbleStr; if (charVal < 0xC0) { buffer[2] = '2'; } else { buffer[2] = '3'; } size = 6; } } return size; } static size_t calculateDecodedStringSize(const char* encodedString, size_t len) { size_t decodedSize = 0; if (encodedString == NULL) { LogError("Null encoded string"); } else if (len == 0) { decodedSize = 1; //for null terminator } else { size_t remaining_len = len; size_t next_step = 0; size_t i = 0; while (i < len) { //percent encoded character if (encodedString[i] == '%') { if (remaining_len < 3 || !IS_HEXDIGIT(encodedString[i+1]) || !IS_HEXDIGIT(encodedString[i+2])) { LogError("Incomplete or invalid percent encoding"); break; } else if (!IS_IN_ASCII_RANGE(encodedString[i+1])) { LogError("Out of range of characters accepted by this decoder"); break; } else { decodedSize++; next_step = 3; } } else if (!IS_PRINTABLE(encodedString[i])) { LogError("Unprintable value in encoded string"); break; } //safe character else { decodedSize++; next_step = 1; } i += next_step; remaining_len -= next_step; } if (encodedString[i] != '\0') //i.e. broke out of above loop due to error { decodedSize = 0; } else { decodedSize++; //add space for the null terminator } } return decodedSize; } static unsigned char charFromNibbles(char bigNibbleStr, char littleNibbleStr) { unsigned char bigNibbleVal = NIBBLE_FROM_STRING(bigNibbleStr); unsigned char littleNibbleVal = NIBBLE_FROM_STRING(littleNibbleStr); return bigNibbleVal << 4 | littleNibbleVal; } static void createDecodedString(const char* input, size_t input_size, char* output) { /* Note that there is no danger of reckless indexing here, as calculateDecodedStringSize() has already checked lengths of strings to ensure the formatting is always correct*/ size_t i = 0; while (i <= input_size) //the <= instead of < ensures the '\0' will be copied { if (input[i] != '%') { *output++ = input[i]; i++; } else { *output++ = charFromNibbles(input[i+1], input[i+2]); i += 3; } } } static size_t URL_PrintableCharSize(unsigned char charVal) { size_t size; if (IS_PRINTABLE(charVal)) { size = 1; } else { if (charVal < 0x80) { size = 3; } else { size = 6; } } return size; } static STRING_HANDLE encode_url_data(const char* text) { STRING_HANDLE result; size_t lengthOfResult = 0; char* encodedURL; unsigned char currentUnsignedChar; const char* iterator = text; /*Codes_SRS_URL_ENCODE_06_003: [If input is a zero length string then URL_Encode will return a zero length string.]*/ do { currentUnsignedChar = (unsigned char)(*iterator++); lengthOfResult += URL_PrintableCharSize(currentUnsignedChar); } while (currentUnsignedChar != 0); if ((encodedURL = (char*)malloc(lengthOfResult)) == NULL) { /*Codes_SRS_URL_ENCODE_06_002: [If an error occurs during the encoding of input then URL_Encode will return NULL.]*/ result = NULL; LogError("URL_Encode:: MALLOC failure on encode."); } else { size_t currentEncodePosition = 0; iterator = text;; do { currentUnsignedChar = (unsigned char)(*iterator++); currentEncodePosition += URL_PrintableChar(currentUnsignedChar, &encodedURL[currentEncodePosition]); } while (currentUnsignedChar != 0); result = STRING_new_with_memory(encodedURL); if (result == NULL) { LogError("URL_Encode:: MALLOC failure on encode."); free(encodedURL); } } return result; } STRING_HANDLE URL_EncodeString(const char* textEncode) { STRING_HANDLE result; if (textEncode == NULL) { result = NULL; } else { result = encode_url_data(textEncode); } return result; } STRING_HANDLE URL_Encode(STRING_HANDLE input) { STRING_HANDLE result; if (input == NULL) { /*Codes_SRS_URL_ENCODE_06_001: [If input is NULL then URL_Encode will return NULL.]*/ result = NULL; LogError("URL_Encode:: NULL input"); } else { result = encode_url_data(STRING_c_str(input)); } return result; } STRING_HANDLE URL_DecodeString(const char* textDecode) { STRING_HANDLE result; if (textDecode == NULL) { result = NULL; } else { STRING_HANDLE tempString = STRING_construct(textDecode); if (tempString == NULL) { result = NULL; } else { result = URL_Decode(tempString); STRING_delete(tempString); } } return result; } STRING_HANDLE URL_Decode(STRING_HANDLE input) { STRING_HANDLE result; if (input == NULL) { LogError("URL_Decode:: NULL input"); result = NULL; } else { size_t decodedStringSize; char* decodedString; const char* inputString = STRING_c_str(input); size_t inputLen = strlen(inputString); if ((decodedStringSize = calculateDecodedStringSize(inputString, inputLen)) == 0) { LogError("URL_Decode:: Invalid input string"); result = NULL; } else if ((decodedString = (char*)malloc(decodedStringSize)) == NULL) { LogError("URL_Decode:: MALLOC failure on decode."); result = NULL; } else { createDecodedString(inputString, inputLen, decodedString); result = STRING_new_with_memory(decodedString); if (result == NULL) { LogError("URL_Decode:: MALLOC failure on decode"); free(decodedString); } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/usha.c000066400000000000000000000146111362133436400312320ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /**************************** usha.c ****************************/ /******************** See RFC 4634 for details ******************/ /* * Description: * This file implements a unified interface to the SHA algorithms. */ #include "azure_c_shared_utility/sha.h" /* * USHAReset * * Description: * This function will initialize the SHA Context in preparation * for computing a new SHA message digest. * * Parameters: * context: [in/out] * The context to reset. * whichSha: [in] * Selects which SHA reset to call * * Returns: * sha Error Code. * */ int USHAReset(USHAContext *ctx, enum SHAversion whichSha) { if (ctx) { ctx->whichSha = whichSha; switch (whichSha) { case SHA1: return SHA1Reset((SHA1Context*)&ctx->ctx); case SHA224: return SHA224Reset((SHA224Context*)&ctx->ctx); case SHA256: return SHA256Reset((SHA256Context*)&ctx->ctx); case SHA384: return SHA384Reset((SHA384Context*)&ctx->ctx); case SHA512: return SHA512Reset((SHA512Context*)&ctx->ctx); default: return shaBadParam; } } else { return shaNull; } } /* * USHAInput * * Description: * This function accepts an array of octets as the next portion * of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_array: [in] * An array of characters representing the next portion of * the message. * length: [in] * The length of the message in message_array * * Returns: * sha Error Code. * */ int USHAInput(USHAContext *ctx, const uint8_t *bytes, unsigned int bytecount) { if (ctx) { switch (ctx->whichSha) { case SHA1: return SHA1Input((SHA1Context*)&ctx->ctx, bytes, bytecount); case SHA224: return SHA224Input((SHA224Context*)&ctx->ctx, bytes, bytecount); case SHA256: return SHA256Input((SHA256Context*)&ctx->ctx, bytes, bytecount); case SHA384: return SHA384Input((SHA384Context*)&ctx->ctx, bytes, bytecount); case SHA512: return SHA512Input((SHA512Context*)&ctx->ctx, bytes, bytecount); default: return shaBadParam; } } else { return shaNull; } } /* * USHAFinalBits * * Description: * This function will add in any final bits of the message. * * Parameters: * context: [in/out] * The SHA context to update * message_bits: [in] * The final bits of the message, in the upper portion of the * byte. (Use 0b###00000 instead of 0b00000### to input the * three bits ###.) * length: [in] * The number of bits in message_bits, between 1 and 7. * * Returns: * sha Error Code. */ int USHAFinalBits(USHAContext *ctx, const uint8_t bits, unsigned int bitcount) { if (ctx) { switch (ctx->whichSha) { case SHA1: return SHA1FinalBits((SHA1Context*)&ctx->ctx, bits, bitcount); case SHA224: return SHA224FinalBits((SHA224Context*)&ctx->ctx, bits, bitcount); case SHA256: return SHA256FinalBits((SHA256Context*)&ctx->ctx, bits, bitcount); case SHA384: return SHA384FinalBits((SHA384Context*)&ctx->ctx, bits, bitcount); case SHA512: return SHA512FinalBits((SHA512Context*)&ctx->ctx, bits, bitcount); default: return shaBadParam; } } else { return shaNull; } } /* * USHAResult * * Description: * This function will return the 160-bit message digest into the * Message_Digest array provided by the caller. * NOTE: The first octet of hash is stored in the 0th element, * the last octet of hash in the 19th element. * * Parameters: * context: [in/out] * The context to use to calculate the SHA-1 hash. * Message_Digest: [out] * Where the digest is returned. * * Returns: * sha Error Code. * */ int USHAResult(USHAContext *ctx, uint8_t Message_Digest[USHAMaxHashSize]) { if (ctx) { switch (ctx->whichSha) { case SHA1: return SHA1Result((SHA1Context*)&ctx->ctx, Message_Digest); case SHA224: return SHA224Result((SHA224Context*)&ctx->ctx, Message_Digest); case SHA256: return SHA256Result((SHA256Context*)&ctx->ctx, Message_Digest); case SHA384: return SHA384Result((SHA384Context*)&ctx->ctx, Message_Digest); case SHA512: return SHA512Result((SHA512Context*)&ctx->ctx, Message_Digest); default: return shaBadParam; } } else { return shaNull; } } /* * USHABlockSize * * Description: * This function will return the blocksize for the given SHA * algorithm. * * Parameters: * whichSha: * which SHA algorithm to query * * Returns: * block size * */ int USHABlockSize(enum SHAversion whichSha) { switch (whichSha) { case SHA1: return SHA1_Message_Block_Size; case SHA224: return SHA224_Message_Block_Size; case SHA256: return SHA256_Message_Block_Size; case SHA384: return SHA384_Message_Block_Size; default: case SHA512: return SHA512_Message_Block_Size; } } /* * USHAHashSize * * Description: * This function will return the hashsize for the given SHA * algorithm. * * Parameters: * whichSha: * which SHA algorithm to query * * Returns: * hash size * */ int USHAHashSize(enum SHAversion whichSha) { switch (whichSha) { case SHA1: return SHA1HashSize; case SHA224: return SHA224HashSize; case SHA256: return SHA256HashSize; case SHA384: return SHA384HashSize; default: case SHA512: return SHA512HashSize; } } /* * USHAHashSizeBits * * Description: * This function will return the hashsize for the given SHA * algorithm, expressed in bits. * * Parameters: * whichSha: * which SHA algorithm to query * * Returns: * hash size in bits * */ int USHAHashSizeBits(enum SHAversion whichSha) { switch (whichSha) { case SHA1: return SHA1HashSizeBits; case SHA224: return SHA224HashSizeBits; case SHA256: return SHA256HashSizeBits; case SHA384: return SHA384HashSizeBits; default: case SHA512: return SHA512HashSizeBits; } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/utf8_checker.c000066400000000000000000000133431362133436400326450ustar00rootroot00000000000000 // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #include #endif #include "azure_c_shared_utility/utf8_checker.h" bool utf8_checker_is_valid_utf8(const unsigned char* utf8_str, size_t length) { bool result; if (utf8_str == NULL) { /* Codes_SRS_UTF8_CHECKER_01_002: [ If `utf8_checker_is_valid_utf8` is called with NULL `utf8_str` it shall return false. ]*/ result = false; } else { size_t pos = 0; /* Codes_SRS_UTF8_CHECKER_01_003: [ If `length` is 0, `utf8_checker_is_valid_utf8` shall consider `utf8_str` to be valid UTF-8 and return true. ]*/ result = true; while ((result == true) && (pos < length)) { /* Codes_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ if ((utf8_str[pos] >> 3) == 0x1E) { /* 4 bytes */ /* Codes_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ uint32_t code_point = (utf8_str[pos] & 0x07); pos++; if ((pos < length) && ((utf8_str[pos] >> 6) == 0x02)) { code_point <<= 6; code_point += utf8_str[pos] & 0x3F; pos++; if ((pos < length) && ((utf8_str[pos] >> 6) == 0x02)) { code_point <<= 6; code_point += utf8_str[pos] & 0x3F; pos++; if ((pos < length) && ((utf8_str[pos] >> 6) == 0x02)) { code_point <<= 6; code_point += utf8_str[pos] & 0x3F; if (code_point <= 0xFFFF) { result = false; } else { /* Codes_SRS_UTF8_CHECKER_01_005: [ On success it shall return true. ]*/ result = true; pos++; } } else { result = false; } } else { result = false; } } else { result = false; } } else if ((utf8_str[pos] >> 4) == 0x0E) { /* 3 bytes */ /* Codes_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ uint32_t code_point = (utf8_str[pos] & 0x0F); pos++; if ((pos < length) && ((utf8_str[pos] >> 6) == 0x02)) { code_point <<= 6; code_point += utf8_str[pos] & 0x3F; pos++; if ((pos < length) && ((utf8_str[pos] >> 6) == 0x02)) { code_point <<= 6; code_point += utf8_str[pos] & 0x3F; if (code_point <= 0x7FF) { result = false; } else { /* Codes_SRS_UTF8_CHECKER_01_005: [ On success it shall return true. ]*/ result = true; pos++; } } else { result = false; } } else { result = false; } } else if ((utf8_str[pos] >> 5) == 0x06) { /* 2 bytes */ /* Codes_SRS_UTF8_CHECKER_01_007: [ 00000yyy yyxxxxxx 110yyyyy 10xxxxxx ]*/ uint32_t code_point = (utf8_str[pos] & 0x1F); pos++; if ((pos < length) && ((utf8_str[pos] >> 6) == 0x02)) { code_point <<= 6; code_point += utf8_str[pos] & 0x3F; if (code_point <= 0x7F) { result = false; } else { /* Codes_SRS_UTF8_CHECKER_01_005: [ On success it shall return true. ]*/ result = true; pos++; } } else { result = false; } } else if ((utf8_str[pos] >> 7) == 0x00) { /* 1 byte */ /* Codes_SRS_UTF8_CHECKER_01_006: [ 00000000 0xxxxxxx 0xxxxxxx ]*/ /* Codes_SRS_UTF8_CHECKER_01_005: [ On success it shall return true. ]*/ result = true; pos++; } else { /* error */ result = false; } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/uuid.c000066400000000000000000000136731362133436400312470ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/uuid.h" #include "azure_c_shared_utility/uniqueid.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #define UUID_STRING_LENGTH 36 #define UUID_STRING_SIZE (UUID_STRING_LENGTH + 1) #define __SUCCESS__ 0 #define UUID_FORMAT_STRING "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x" int UUID_from_string(const char* uuid_string, UUID_T* uuid) { int result; // Codes_SRS_UUID_09_007: [ If `uuid_string` or `uuid` are NULL, UUID_from_string shall return a non-zero value ] if (uuid_string == NULL || uuid == NULL) { LogError("Invalid argument (uuid_string=%p, uuid=%p)", uuid_string, uuid); result = __FAILURE__; } else { size_t uuid_string_length = strlen(uuid_string); if (uuid_string_length != UUID_STRING_LENGTH) { LogError("Unexpected size for an UUID string (%lu)", (unsigned long)uuid_string_length); result = __FAILURE__; } else { // Codes_SRS_UUID_09_008: [ Each pair of digits in `uuid_string`, excluding dashes, shall be read as a single HEX value and saved on the respective position in `uuid` ] size_t i, j; unsigned char* uuid_bytes; uuid_bytes = (unsigned char*)uuid; // Codes_SRS_UUID_09_010: [ If no failures occur, UUID_from_string shall return zero ] result = __SUCCESS__; for (i = 0, j = 0; i < uuid_string_length; ) { if (uuid_string[i] == '-') { i++; } else { char double_hex_digit[3] = { 0, 0, 0 }; (void)memcpy(double_hex_digit, uuid_string + i, 2); if (sscanf(double_hex_digit, "%02hhx", uuid_bytes + j) != 1) { // Codes_SRS_UUID_09_009: [ If `uuid` fails to be generated, UUID_from_string shall return a non-zero value ] LogError("Failed decoding UUID string (%lu)", (unsigned long)i); result = __FAILURE__; break; } else { i += 2; j++; } } } } } return result; } char* UUID_to_string(const UUID_T* uuid) { char* result; // Codes_SRS_UUID_09_011: [ If `uuid` is NULL, UUID_to_string shall return a non-zero value ] if (uuid == NULL) { LogError("Invalid argument (uuid is NULL)"); result = NULL; } // Codes_SRS_UUID_09_012: [ UUID_to_string shall allocate a valid UUID string (`uuid_string`) as per RFC 4122 ] else if ((result = (char*)malloc(sizeof(char) * UUID_STRING_SIZE)) == NULL) { // Codes_SRS_UUID_09_013: [ If `uuid_string` fails to be allocated, UUID_to_string shall return NULL ] LogError("Failed allocating UUID string"); } else { unsigned char* uuid_bytes; int number_of_chars_written; uuid_bytes = (unsigned char*)uuid; // Codes_SRS_UUID_09_014: [ Each character in `uuid` shall be written in the respective positions of `uuid_string` as a 2-digit HEX value ] number_of_chars_written = sprintf(result, "%" PRI_UUID, UUID_FORMAT_VALUES(uuid_bytes)); if (number_of_chars_written != UUID_STRING_LENGTH) { // Tests_SRS_UUID_09_015: [ If `uuid_string` fails to be set, UUID_to_string shall return NULL ] LogError("Failed encoding UUID string"); free(result); result = NULL; } } // Codes_SRS_UUID_09_016: [ If no failures occur, UUID_to_string shall return `uuid_string` ] return result; } int UUID_generate(UUID_T* uuid) { int result; // Codes_SRS_UUID_09_001: [ If `uuid` is NULL, UUID_generate shall return a non-zero value ] if (uuid == NULL) { LogError("Invalid argument (uuid is NULL)"); result = __FAILURE__; } else { char* uuid_string; if ((uuid_string = (char*)malloc(sizeof(char) * UUID_STRING_SIZE)) == NULL) { // Codes_SRS_UUID_09_003: [ If the UUID string fails to be obtained, UUID_generate shall fail and return a non-zero value ] LogError("Failed allocating UUID string"); result = __FAILURE__; } else { (void)memset(uuid_string, 0, sizeof(char) * UUID_STRING_SIZE); // Codes_SRS_UUID_09_002: [ UUID_generate shall obtain an UUID string from UniqueId_Generate ] if (UniqueId_Generate(uuid_string, UUID_STRING_SIZE) != UNIQUEID_OK) { // Codes_SRS_UUID_09_003: [ If the UUID string fails to be obtained, UUID_generate shall fail and return a non-zero value ] LogError("Failed generating UUID"); result = __FAILURE__; } // Codes_SRS_UUID_09_004: [ The UUID string shall be parsed into an UUID_T type (16 unsigned char array) and filled in `uuid` ] else if (UUID_from_string(uuid_string, uuid) != 0) { // Codes_SRS_UUID_09_005: [ If `uuid` fails to be set, UUID_generate shall fail and return a non-zero value ] LogError("Failed parsing UUID string"); result = __FAILURE__; } else { // Codes_SRS_UUID_09_006: [ If no failures occur, UUID_generate shall return zero ] result = __SUCCESS__; } free(uuid_string); } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/uws_client.c000066400000000000000000003737761362133436400324720ustar00rootroot00000000000000 // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/uws_client.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/uws_frame_encoder.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/utf8_checker.h" #include "azure_c_shared_utility/gb_rand.h" #include "azure_c_shared_utility/base64.h" #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/map.h" static const char* UWS_CLIENT_OPTIONS = "uWSClientOptions"; static const char* HTTP_HEADER_KEY_VALUE_SEPARATOR = ": "; static const size_t HTTP_HEADER_KEY_VALUE_SEPARATOR_LENGTH = 2; static const char* HTTP_HEADER_TERMINATOR = "\r\n"; static const size_t HTTP_HEADER_TERMINATOR_LENGTH = 2; /* Requirements not needed as they are optional: Codes_SRS_UWS_CLIENT_01_254: [ If an endpoint receives a Ping frame and has not yet sent Pong frame(s) in response to previous Ping frame(s), the endpoint MAY elect to send a Pong frame for only the most recently processed Ping frame. ] Codes_SRS_UWS_CLIENT_01_255: [ A Pong frame MAY be sent unsolicited. ] Codes_SRS_UWS_CLIENT_01_256: [ A response to an unsolicited Pong frame is not expected. ] */ /* Requirements satisfied by the underlying TLS/socket stack Codes_SRS_UWS_CLIENT_01_362: [ To achieve reasonable levels of protection, clients should use only Strong TLS algorithms. ] Codes_SRS_UWS_CLIENT_01_289: [ An endpoint SHOULD use a method that cleanly closes the TCP connection, as well as the TLS session, if applicable, discarding any trailing bytes that may have been received. ] Codes_SRS_UWS_CLIENT_01_078: [ Otherwise, all further communication on this channel MUST run through the encrypted tunnel [RFC5246]. ] Codes_SRS_UWS_CLIENT_01_141: [ masking is done whether or not the WebSocket Protocol is running over TLS. ] */ /* Requirements satisfied by the way the APIs are designed: Codes_SRS_UWS_CLIENT_01_211: [One implication of this is that in absence of extensions, senders and receivers must not depend on the presence of specific frame boundaries.] */ typedef enum UWS_STATE_TAG { UWS_STATE_CLOSED, UWS_STATE_OPENING_UNDERLYING_IO, UWS_STATE_WAITING_FOR_UPGRADE_RESPONSE, UWS_STATE_OPEN, UWS_STATE_CLOSING_WAITING_FOR_CLOSE, UWS_STATE_CLOSING_SENDING_CLOSE, UWS_STATE_CLOSING_UNDERLYING_IO, UWS_STATE_ERROR } UWS_STATE; typedef struct WS_INSTANCE_PROTOCOL_TAG { char* protocol; } WS_INSTANCE_PROTOCOL; typedef struct WS_PENDING_SEND_TAG { ON_WS_SEND_FRAME_COMPLETE on_ws_send_frame_complete; void* context; UWS_CLIENT_HANDLE uws_client; } WS_PENDING_SEND; typedef struct UWS_CLIENT_INSTANCE_TAG { SINGLYLINKEDLIST_HANDLE pending_sends; XIO_HANDLE underlying_io; char* hostname; char* resource_name; WS_INSTANCE_PROTOCOL* protocols; size_t protocol_count; int port; MAP_HANDLE request_headers; UWS_STATE uws_state; ON_WS_OPEN_COMPLETE on_ws_open_complete; void* on_ws_open_complete_context; ON_WS_FRAME_RECEIVED on_ws_frame_received; void* on_ws_frame_received_context; ON_WS_PEER_CLOSED on_ws_peer_closed; void* on_ws_peer_closed_context; ON_WS_ERROR on_ws_error; void* on_ws_error_context; ON_WS_CLOSE_COMPLETE on_ws_close_complete; void* on_ws_close_complete_context; unsigned char* stream_buffer; size_t stream_buffer_count; unsigned char* fragment_buffer; size_t fragment_buffer_count; unsigned char fragmented_frame_type; } UWS_CLIENT_INSTANCE; /* Codes_SRS_UWS_CLIENT_01_360: [ Connection confidentiality and integrity is provided by running the WebSocket Protocol over TLS (wss URIs). ]*/ /* Codes_SRS_UWS_CLIENT_01_361: [ WebSocket implementations MUST support TLS and SHOULD employ it when communicating with their peers. ]*/ /* Codes_SRS_UWS_CLIENT_01_063: [ A client will need to supply a /host/, /port/, /resource name/, and a /secure/ flag, which are the components of a WebSocket URI as discussed in Section 3, along with a list of /protocols/ and /extensions/ to be used. ]*/ UWS_CLIENT_HANDLE uws_client_create(const char* hostname, unsigned int port, const char* resource_name, bool use_ssl, const WS_PROTOCOL* protocols, size_t protocol_count) { UWS_CLIENT_HANDLE result; /* Codes_SRS_UWS_CLIENT_01_002: [ If any of the arguments `hostname` and `resource_name` is NULL then `uws_client_create` shall return NULL. ]*/ if ((hostname == NULL) || (resource_name == NULL) || /* Codes_SRS_UWS_CLIENT_01_411: [ If `protocol_count` is non zero and `protocols` is NULL then `uws_client_create` shall fail and return NULL. ]*/ ((protocols == NULL) && (protocol_count > 0))) { LogError("Invalid arguments: hostname = %p, resource_name = %p, protocols = %p, protocol_count = %zu", hostname, resource_name, protocols, protocol_count); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_412: [ If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create` shall fail and return NULL. ]*/ size_t i; for (i = 0; i < protocol_count; i++) { if (protocols[i].protocol == NULL) { break; } } if (i < protocol_count) { LogError("Protocol index %zu has NULL name", i); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_001: [`uws_client_create` shall create an instance of uws and return a non-NULL handle to it.]*/ result = (UWS_CLIENT_HANDLE)malloc(sizeof(UWS_CLIENT_INSTANCE)); if (result == NULL) { /* Codes_SRS_UWS_CLIENT_01_003: [ If allocating memory for the new uws instance fails then `uws_client_create` shall return NULL. ]*/ LogError("Could not allocate uWS instance"); } else { (void)memset(result, 0, sizeof(UWS_CLIENT_INSTANCE)); /* Codes_SRS_UWS_CLIENT_01_004: [ The argument `hostname` shall be copied for later use. ]*/ if (mallocAndStrcpy_s(&result->hostname, hostname) != 0) { /* Codes_SRS_UWS_CLIENT_01_392: [ If allocating memory for the copy of the `hostname` argument fails, then `uws_client_create` shall return NULL. ]*/ LogError("Could not copy hostname."); free(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_404: [ The argument `resource_name` shall be copied for later use. ]*/ if (mallocAndStrcpy_s(&result->resource_name, resource_name) != 0) { /* Codes_SRS_UWS_CLIENT_01_405: [ If allocating memory for the copy of the `resource` argument fails, then `uws_client_create` shall return NULL. ]*/ LogError("Could not copy resource."); free(result->hostname); free(result); result = NULL; } else if ((result->request_headers = Map_Create(NULL)) == NULL) { LogError("Failed allocating MAP for request headers"); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_017: [ `uws_client_create` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. ]*/ result->pending_sends = singlylinkedlist_create(); if (result->pending_sends == NULL) { /* Codes_SRS_UWS_CLIENT_01_018: [ If `singlylinkedlist_create` fails then `uws_client_create` shall fail and return NULL. ]*/ LogError("Could not allocate pending send frames list"); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { if (use_ssl == true) { TLSIO_CONFIG tlsio_config; /* Codes_SRS_UWS_CLIENT_01_006: [ If `use_ssl` is true then `uws_client_create` shall obtain the interface used to create a tlsio instance by calling `platform_get_default_tlsio`. ]*/ /* Codes_SRS_UWS_CLIENT_01_076: [ If /secure/ is true, the client MUST perform a TLS handshake over the connection after opening the connection and before sending the handshake data [RFC2818]. ]*/ const IO_INTERFACE_DESCRIPTION* tlsio_interface = platform_get_default_tlsio(); if (tlsio_interface == NULL) { /* Codes_SRS_UWS_CLIENT_01_007: [ If obtaining the underlying IO interface fails, then `uws_client_create` shall fail and return NULL. ]*/ LogError("NULL TLSIO interface description"); result->underlying_io = NULL; } else { SOCKETIO_CONFIG socketio_config; /* Codes_SRS_UWS_CLIENT_01_013: [ The create arguments for the tls IO (when `use_ssl` is 1) shall have: ]*/ /* Codes_SRS_UWS_CLIENT_01_014: [ - `hostname` set to the `hostname` argument passed to `uws_client_create`. ]*/ /* Codes_SRS_UWS_CLIENT_01_015: [ - `port` set to the `port` argument passed to `uws_client_create`. ]*/ socketio_config.hostname = hostname; socketio_config.port = port; socketio_config.accepted_socket = NULL; tlsio_config.hostname = hostname; tlsio_config.port = port; tlsio_config.underlying_io_interface = socketio_get_interface_description(); tlsio_config.underlying_io_parameters = &socketio_config; result->underlying_io = xio_create(tlsio_interface, &tlsio_config); if (result->underlying_io == NULL) { LogError("Cannot create underlying TLS IO."); } } } else { SOCKETIO_CONFIG socketio_config; /* Codes_SRS_UWS_CLIENT_01_005: [ If `use_ssl` is false then `uws_client_create` shall obtain the interface used to create a socketio instance by calling `socketio_get_interface_description`. ]*/ const IO_INTERFACE_DESCRIPTION* socketio_interface = socketio_get_interface_description(); if (socketio_interface == NULL) { /* Codes_SRS_UWS_CLIENT_01_007: [ If obtaining the underlying IO interface fails, then `uws_client_create` shall fail and return NULL. ]*/ LogError("NULL socketio interface description"); result->underlying_io = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_010: [ The create arguments for the socket IO (when `use_ssl` is 0) shall have: ]*/ /* Codes_SRS_UWS_CLIENT_01_011: [ - `hostname` set to the `hostname` argument passed to `uws_client_create`. ]*/ /* Codes_SRS_UWS_CLIENT_01_012: [ - `port` set to the `port` argument passed to `uws_client_create`. ]*/ socketio_config.hostname = hostname; socketio_config.port = port; socketio_config.accepted_socket = NULL; /* Codes_SRS_UWS_CLIENT_01_008: [ The obtained interface shall be used to create the IO used as underlying IO by the newly created uws instance. ]*/ /* Codes_SRS_UWS_CLIENT_01_009: [ The underlying IO shall be created by calling `xio_create`. ]*/ result->underlying_io = xio_create(socketio_interface, &socketio_config); if (result->underlying_io == NULL) { LogError("Cannot create underlying socket IO."); } } } if (result->underlying_io == NULL) { /* Codes_SRS_UWS_CLIENT_01_016: [ If `xio_create` fails, then `uws_client_create` shall fail and return NULL. ]*/ singlylinkedlist_destroy(result->pending_sends); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { result->uws_state = UWS_STATE_CLOSED; /* Codes_SRS_UWS_CLIENT_01_403: [ The argument `port` shall be copied for later use. ]*/ result->port = port; result->fragmented_frame_type = WS_FRAME_TYPE_UNKNOWN; result->protocol_count = protocol_count; /* Codes_SRS_UWS_CLIENT_01_410: [ The `protocols` argument shall be allowed to be NULL, in which case no protocol is to be specified by the client in the upgrade request. ]*/ if (protocols == NULL) { result->protocols = NULL; } else { result->protocols = (WS_INSTANCE_PROTOCOL*)malloc(sizeof(WS_INSTANCE_PROTOCOL) * protocol_count); if (result->protocols == NULL) { /* Codes_SRS_UWS_CLIENT_01_414: [ If allocating memory for the copied protocol information fails then `uws_client_create` shall fail and return NULL. ]*/ LogError("Cannot allocate memory for the protocols array."); xio_destroy(result->underlying_io); singlylinkedlist_destroy(result->pending_sends); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_413: [ The protocol information indicated by `protocols` and `protocol_count` shall be copied for later use (for constructing the upgrade request). ]*/ for (i = 0; i < protocol_count; i++) { if (mallocAndStrcpy_s(&result->protocols[i].protocol, protocols[i].protocol) != 0) { /* Codes_SRS_UWS_CLIENT_01_414: [ If allocating memory for the copied protocol information fails then `uws_client_create` shall fail and return NULL. ]*/ LogError("Cannot allocate memory for the protocol index %u.", (unsigned int)i); break; } } if (i < protocol_count) { size_t j; for (j = 0; j < i; j++) { free(result->protocols[j].protocol); } free(result->protocols); xio_destroy(result->underlying_io); singlylinkedlist_destroy(result->pending_sends); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { result->protocol_count = protocol_count; } } } } } } } } } } return result; } UWS_CLIENT_HANDLE uws_client_create_with_io(const IO_INTERFACE_DESCRIPTION* io_interface, void* io_create_parameters, const char* hostname, unsigned int port, const char* resource_name, const WS_PROTOCOL* protocols, size_t protocol_count) { UWS_CLIENT_HANDLE result; /* Codes_SRS_UWS_CLIENT_01_516: [ If any of the arguments `io_interface`, `hostname` and `resource_name` is NULL then `uws_client_create_with_io` shall return NULL. ]*/ if ((hostname == NULL) || (io_interface == NULL) || (resource_name == NULL) || /* Codes_SRS_UWS_CLIENT_01_525: [ If `protocol_count` is non zero and `protocols` is NULL then `uws_client_create_with_io` shall fail and return NULL. ]*/ ((protocols == NULL) && (protocol_count > 0))) { LogError("Invalid arguments: io_interface = %p, resource_name = %p, protocols = %p, protocol_count = %zu", io_interface, resource_name, protocols, protocol_count); result = NULL; } else { size_t i; for (i = 0; i < protocol_count; i++) { if (protocols[i].protocol == NULL) { break; } } if (i < protocol_count) { /* Codes_SRS_UWS_CLIENT_01_526: [ If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create_with_io` shall fail and return NULL. ]*/ LogError("Protocol index %zu has NULL name", i); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_515: [ `uws_client_create_with_io` shall create an instance of uws and return a non-NULL handle to it. ]*/ result = (UWS_CLIENT_HANDLE)malloc(sizeof(UWS_CLIENT_INSTANCE)); if (result == NULL) { /* Codes_SRS_UWS_CLIENT_01_517: [ If allocating memory for the new uws instance fails then `uws_client_create_with_io` shall return NULL. ]*/ LogError("Could not allocate uWS instance"); } else { memset(result, 0, sizeof(UWS_CLIENT_INSTANCE)); /* Codes_SRS_UWS_CLIENT_01_518: [ The argument `hostname` shall be copied for later use. ]*/ if (mallocAndStrcpy_s(&result->hostname, hostname) != 0) { /* Codes_SRS_UWS_CLIENT_01_519: [ If allocating memory for the copy of the `hostname` argument fails, then `uws_client_create` shall return NULL. ]*/ LogError("Could not copy hostname."); free(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_523: [ The argument `resource_name` shall be copied for later use. ]*/ if (mallocAndStrcpy_s(&result->resource_name, resource_name) != 0) { /* Codes_SRS_UWS_CLIENT_01_529: [ If allocating memory for the copy of the `resource_name` argument fails, then `uws_client_create_with_io` shall return NULL. ]*/ LogError("Could not copy resource."); free(result->hostname); free(result); result = NULL; } else if ((result->request_headers = Map_Create(NULL)) == NULL) { LogError("Failed allocating MAP for request headers"); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_530: [ `uws_client_create_with_io` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. ]*/ result->pending_sends = singlylinkedlist_create(); if (result->pending_sends == NULL) { /* Codes_SRS_UWS_CLIENT_01_531: [ If `singlylinkedlist_create` fails then `uws_client_create_with_io` shall fail and return NULL. ]*/ LogError("Could not allocate pending send frames list"); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_521: [ The underlying IO shall be created by calling `xio_create`, while passing as arguments the `io_interface` and `io_create_parameters` argument values. ]*/ result->underlying_io = xio_create(io_interface, io_create_parameters); if (result->underlying_io == NULL) { /* Codes_SRS_UWS_CLIENT_01_522: [ If `xio_create` fails, then `uws_client_create_with_io` shall fail and return NULL. ]*/ LogError("Cannot create underlying IO."); singlylinkedlist_destroy(result->pending_sends); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { result->uws_state = UWS_STATE_CLOSED; /* Codes_SRS_UWS_CLIENT_01_520: [ The argument `port` shall be copied for later use. ]*/ result->port = port; result->fragmented_frame_type = WS_FRAME_TYPE_UNKNOWN; result->protocol_count = protocol_count; /* Codes_SRS_UWS_CLIENT_01_524: [ The `protocols` argument shall be allowed to be NULL, in which case no protocol is to be specified by the client in the upgrade request. ]*/ if (protocols == NULL) { result->protocols = NULL; } else { result->protocols = (WS_INSTANCE_PROTOCOL*)malloc(sizeof(WS_INSTANCE_PROTOCOL) * protocol_count); if (result->protocols == NULL) { /* Codes_SRS_UWS_CLIENT_01_414: [ If allocating memory for the copied protocol information fails then `uws_client_create` shall fail and return NULL. ]*/ LogError("Cannot allocate memory for the protocols array."); xio_destroy(result->underlying_io); singlylinkedlist_destroy(result->pending_sends); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_527: [ The protocol information indicated by `protocols` and `protocol_count` shall be copied for later use (for constructing the upgrade request). ]*/ for (i = 0; i < protocol_count; i++) { if (mallocAndStrcpy_s(&result->protocols[i].protocol, protocols[i].protocol) != 0) { /* Codes_SRS_UWS_CLIENT_01_528: [ If allocating memory for the copied protocol information fails then `uws_client_create_with_io` shall fail and return NULL. ]*/ LogError("Cannot allocate memory for the protocol index %u.", (unsigned int)i); break; } } if (i < protocol_count) { size_t j; for (j = 0; j < i; j++) { free(result->protocols[j].protocol); } free(result->protocols); xio_destroy(result->underlying_io); singlylinkedlist_destroy(result->pending_sends); Map_Destroy(result->request_headers); free(result->resource_name); free(result->hostname); free(result); result = NULL; } else { result->protocol_count = protocol_count; } } } } } } } } } } return result; } void uws_client_destroy(UWS_CLIENT_HANDLE uws_client) { /* Codes_SRS_UWS_CLIENT_01_020: [ If `uws_client` is NULL, `uws_client_destroy` shall do nothing. ]*/ if (uws_client == NULL) { LogError("NULL uws handle"); } else { free(uws_client->stream_buffer); free(uws_client->fragment_buffer); /* Codes_SRS_UWS_CLIENT_01_021: [ `uws_client_destroy` shall perform a close action if the uws instance has already been open. ]*/ switch (uws_client->uws_state) { default: break; case UWS_STATE_OPEN: case UWS_STATE_ERROR: uws_client_close_async(uws_client, NULL, NULL); break; } if (uws_client->protocol_count > 0) { size_t i; /* Codes_SRS_UWS_CLIENT_01_437: [ `uws_client_destroy` shall free the protocols array allocated in `uws_client_create`. ]*/ for (i = 0; i < uws_client->protocol_count; i++) { free(uws_client->protocols[i].protocol); } free(uws_client->protocols); } /* Codes_SRS_UWS_CLIENT_01_019: [ `uws_client_destroy` shall free all resources associated with the uws instance. ]*/ /* Codes_SRS_UWS_CLIENT_01_023: [ `uws_client_destroy` shall ensure the underlying IO created in `uws_client_open_async` is destroyed by calling `xio_destroy`. ]*/ if (uws_client->underlying_io != NULL) { xio_destroy(uws_client->underlying_io); uws_client->underlying_io = NULL; } /* Codes_SRS_UWS_CLIENT_01_024: [ `uws_client_destroy` shall free the list used to track the pending sends by calling `singlylinkedlist_destroy`. ]*/ singlylinkedlist_destroy(uws_client->pending_sends); free(uws_client->resource_name); free(uws_client->hostname); Map_Destroy(uws_client->request_headers); free(uws_client); } } static void indicate_ws_open_complete_error(UWS_CLIENT_INSTANCE* uws_client, WS_OPEN_RESULT ws_open_result) { /* Codes_SRS_UWS_CLIENT_01_409: [ After any error is indicated by `on_ws_open_complete`, a subsequent `uws_client_open_async` shall be possible. ]*/ uws_client->uws_state = UWS_STATE_CLOSED; uws_client->on_ws_open_complete(uws_client->on_ws_open_complete_context, ws_open_result); } static void indicate_ws_open_complete_error_and_close(UWS_CLIENT_INSTANCE* uws_client, WS_OPEN_RESULT ws_open_result) { (void)xio_close(uws_client->underlying_io, NULL, NULL); indicate_ws_open_complete_error(uws_client, ws_open_result); } static void indicate_ws_error(UWS_CLIENT_INSTANCE* uws_client, WS_ERROR error_code) { uws_client->uws_state = UWS_STATE_ERROR; uws_client->on_ws_error(uws_client->on_ws_error_context, error_code); } static void indicate_ws_close_complete(UWS_CLIENT_INSTANCE* uws_client) { uws_client->uws_state = UWS_STATE_CLOSED; /* Codes_SRS_UWS_CLIENT_01_496: [ If the close was initiated by the peer no `on_ws_close_complete` shall be called. ]*/ if (uws_client->on_ws_close_complete != NULL) { /* Codes_SRS_UWS_CLIENT_01_491: [ When calling `on_ws_close_complete` callback, the `on_ws_close_complete_context` argument shall be passed to it. ]*/ uws_client->on_ws_close_complete(uws_client->on_ws_close_complete_context); } } // This callback usage needs to be either verified and commented or integrated into // the state machine. static void unchecked_on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } static int send_close_frame(UWS_CLIENT_INSTANCE* uws_client, unsigned int close_error_code) { unsigned char* close_frame; unsigned char close_frame_payload[2]; size_t close_frame_length; int result; BUFFER_HANDLE close_frame_buffer; close_frame_payload[0] = (unsigned char)(close_error_code >> 8); close_frame_payload[1] = (unsigned char)(close_error_code & 0xFF); /* Codes_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ close_frame_buffer = uws_frame_encoder_encode(WS_CLOSE_FRAME, close_frame_payload, sizeof(close_frame_payload), true, true, 0); if (close_frame_buffer == NULL) { LogError("Encoding of CLOSE failed."); result = __FAILURE__; } else { close_frame = BUFFER_u_char(close_frame_buffer); close_frame_length = BUFFER_length(close_frame_buffer); /* Codes_SRS_UWS_CLIENT_01_471: [ The callback `on_underlying_io_close_sent` shall be passed as argument to `xio_send`. ]*/ if (xio_send(uws_client->underlying_io, close_frame, close_frame_length, unchecked_on_send_complete, NULL) != 0) { LogError("Sending CLOSE frame failed."); result = __FAILURE__; } else { result = 0; } BUFFER_delete(close_frame_buffer); } return result; } static void indicate_ws_error_and_close(UWS_CLIENT_INSTANCE* uws_client, WS_ERROR error_code, unsigned int close_error_code) { uws_client->uws_state = UWS_STATE_ERROR; (void)send_close_frame(uws_client, close_error_code); uws_client->on_ws_error(uws_client->on_ws_error_context, error_code); } static char* get_request_headers(MAP_HANDLE headers) { char* result; const char* const* keys; const char* const* values; size_t count; if (Map_GetInternals(headers, &keys, &values, &count) != MAP_OK) { LogError("Failed getting the request headers"); result = NULL; } else { size_t length = 0; size_t i; for (i = 0; i < count; i++) { // 4 = 2 (": ") + 2 ("\r\n") length += strlen(keys[i]) + strlen(values[i]) + 4; } if ((result = (char*)malloc(sizeof(char) * (length + 1))) == NULL) { LogError("Failed allocating string for request headers"); result = NULL; } else { size_t position = 0; for (i = 0; i < count; i++) { size_t key_length = strlen(keys[i]); size_t value_length = strlen(values[i]); (void)memcpy(result + position, keys[i], key_length); position += key_length; (void)memcpy(result + position, HTTP_HEADER_KEY_VALUE_SEPARATOR, HTTP_HEADER_KEY_VALUE_SEPARATOR_LENGTH); position += HTTP_HEADER_KEY_VALUE_SEPARATOR_LENGTH; (void)memcpy(result + position, values[i], value_length); position += value_length; (void)memcpy(result + position, HTTP_HEADER_TERMINATOR, HTTP_HEADER_TERMINATOR_LENGTH); position += HTTP_HEADER_TERMINATOR_LENGTH; } result[position] = '\0'; } } return result; } static void on_underlying_io_open_complete(void* context, IO_OPEN_RESULT open_result) { UWS_CLIENT_HANDLE uws_client = (UWS_CLIENT_HANDLE)context; /* Codes_SRS_UWS_CLIENT_01_401: [ If `on_underlying_io_open_complete` is called with a NULL context, `on_underlying_io_open_complete` shall do nothing. ]*/ if (uws_client == NULL) { LogError("NULL context"); } else { switch (uws_client->uws_state) { default: case UWS_STATE_WAITING_FOR_UPGRADE_RESPONSE: /* Codes_SRS_UWS_CLIENT_01_407: [ When `on_underlying_io_open_complete` is called when the uws instance has send the upgrade request but it is waiting for the response, an error shall be reported to the user by calling the `on_ws_open_complete` with `WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS`. ]*/ LogError("underlying on_io_open_complete was called again after upgrade request was sent."); indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS); break; case UWS_STATE_OPENING_UNDERLYING_IO: switch (open_result) { default: case IO_OPEN_ERROR: /* Codes_SRS_UWS_CLIENT_01_369: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_ERROR` while uws is OPENING (`uws_client_open_async` was called), uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED`. ]*/ indicate_ws_open_complete_error(uws_client, WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED); break; case IO_OPEN_CANCELLED: /* Codes_SRS_UWS_CLIENT_01_402: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_CANCELLED` while uws is OPENING (`uws_client_open_async` was called), uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED`. ]*/ indicate_ws_open_complete_error(uws_client, WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED); break; case IO_OPEN_OK: { int upgrade_request_length; char* upgrade_request; size_t i; unsigned char nonce[16]; STRING_HANDLE base64_nonce; char* request_headers = NULL; /* Codes_SRS_UWS_CLIENT_01_089: [ The value of this header field MUST be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see Section 4 of [RFC4648]). ]*/ /* Codes_SRS_UWS_CLIENT_01_090: [ The nonce MUST be selected randomly for each connection. ]*/ for (i = 0; i < sizeof(nonce); i++) { nonce[i] = (unsigned char)gb_rand(); } /* Codes_SRS_UWS_CLIENT_01_497: [ The nonce needed for the upgrade request shall be Base64 encoded with `Base64_Encode_Bytes`. ]*/ base64_nonce = Base64_Encode_Bytes(nonce, sizeof(nonce)); if (base64_nonce == NULL) { /* Codes_SRS_UWS_CLIENT_01_498: [ If Base64 encoding the nonce for the upgrade request fails, then the uws client shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BASE64_ENCODE_FAILED`. ]*/ LogError("Cannot construct the WebSocket upgrade request"); indicate_ws_open_complete_error(uws_client, WS_OPEN_ERROR_BASE64_ENCODE_FAILED); } else if ((request_headers = get_request_headers(uws_client->request_headers)) == NULL) { LogError("Cannot construct the WebSocket request headers"); indicate_ws_open_complete_error(uws_client, WS_OPEN_ERROR_CONSTRUCTING_UPGRADE_REQUEST); } else { /* Codes_SRS_UWS_CLIENT_01_371: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_OK` while uws is OPENING (`uws_client_open_async` was called), uws shall prepare the WebSockets upgrade request. ]*/ /* Codes_SRS_UWS_CLIENT_01_081: [ The handshake consists of an HTTP Upgrade request, along with a list of required and optional header fields. ]*/ /* Codes_SRS_UWS_CLIENT_01_082: [ The handshake MUST be a valid HTTP request as specified by [RFC2616]. ]*/ /* Codes_SRS_UWS_CLIENT_01_083: [ The method of the request MUST be GET, and the HTTP version MUST be at least 1.1. ]*/ /* Codes_SRS_UWS_CLIENT_01_084: [ The "Request-URI" part of the request MUST match the /resource name/ defined in Section 3 (a relative URI) or be an absolute http/https URI that, when parsed, has a /resource name/, /host/, and /port/ that match the corresponding ws/wss URI. ]*/ /* Codes_SRS_UWS_CLIENT_01_085: [ The request MUST contain a |Host| header field whose value contains /host/ plus optionally ":" followed by /port/ (when not using the default port). ]*/ /* Codes_SRS_UWS_CLIENT_01_086: [ The request MUST contain an |Upgrade| header field whose value MUST include the "websocket" keyword. ]*/ /* Codes_SRS_UWS_CLIENT_01_087: [ The request MUST contain a |Connection| header field whose value MUST include the "Upgrade" token. ]*/ /* Codes_SRS_UWS_CLIENT_01_088: [ The request MUST include a header field with the name |Sec-WebSocket-Key|. ]*/ /* Codes_SRS_UWS_CLIENT_01_094: [ The request MUST include a header field with the name |Sec-WebSocket-Version|. ]*/ /* Codes_SRS_UWS_CLIENT_01_095: [ The value of this header field MUST be 13. ]*/ /* Codes_SRS_UWS_CLIENT_01_096: [ The request MAY include a header field with the name |Sec-WebSocket-Protocol|. ]*/ /* Codes_SRS_UWS_CLIENT_01_100: [ The request MAY include a header field with the name |Sec-WebSocket-Extensions|. ]*/ /* Codes_SRS_UWS_CLIENT_01_101: [ The request MAY include any other header fields, for example, cookies [RFC6265] and/or authentication-related header fields such as the |Authorization| header field [RFC2616], which are processed according to documents that define them. ] */ const char upgrade_request_format[] = "GET %s HTTP/1.1\r\n" "Host: %s:%d\r\n" "Upgrade: websocket\r\n" "Connection: Upgrade\r\n" "Sec-WebSocket-Key: %s\r\n" "Sec-WebSocket-Protocol: %s\r\n" "Sec-WebSocket-Version: 13\r\n" "%s" "\r\n"; const char* base64_nonce_chars = STRING_c_str(base64_nonce); upgrade_request_length = (int)(strlen(upgrade_request_format) + strlen(uws_client->resource_name)+strlen(uws_client->hostname) + strlen(base64_nonce_chars) + strlen(uws_client->protocols[0].protocol) + strlen(request_headers) + 5); if (upgrade_request_length < 0) { /* Codes_SRS_UWS_CLIENT_01_408: [ If constructing of the WebSocket upgrade request fails, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_CONSTRUCTING_UPGRADE_REQUEST`. ]*/ LogError("Cannot construct the WebSocket upgrade request"); indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_CONSTRUCTING_UPGRADE_REQUEST); } else { upgrade_request = (char*)malloc(upgrade_request_length + 1); if (upgrade_request == NULL) { /* Codes_SRS_UWS_CLIENT_01_406: [ If not enough memory can be allocated to construct the WebSocket upgrade request, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. ]*/ LogError("Cannot allocate memory for the WebSocket upgrade request"); indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_NOT_ENOUGH_MEMORY); } else { upgrade_request_length = sprintf(upgrade_request, upgrade_request_format, uws_client->resource_name, uws_client->hostname, uws_client->port, base64_nonce_chars, uws_client->protocols[0].protocol, request_headers); /* No need to have any send complete here, as we are monitoring the received bytes */ /* Codes_SRS_UWS_CLIENT_01_372: [ Once prepared the WebSocket upgrade request shall be sent by calling `xio_send`. ]*/ /* Codes_SRS_UWS_CLIENT_01_080: [ Once a connection to the server has been established (including a connection via a proxy or over a TLS-encrypted tunnel), the client MUST send an opening handshake to the server. ]*/ if (xio_send(uws_client->underlying_io, upgrade_request, upgrade_request_length, unchecked_on_send_complete, NULL) != 0) { /* Codes_SRS_UWS_CLIENT_01_373: [ If `xio_send` fails then uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST`. ]*/ LogError("Cannot send upgrade request"); indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST); } else { /* Codes_SRS_UWS_CLIENT_01_102: [ Once the client's opening handshake has been sent, the client MUST wait for a response from the server before sending any further data. ]*/ uws_client->uws_state = UWS_STATE_WAITING_FOR_UPGRADE_RESPONSE; } free(upgrade_request); } } STRING_delete(base64_nonce); free(request_headers); } break; } } } } } static void consume_stream_buffer_bytes(UWS_CLIENT_INSTANCE* uws_client, size_t consumed_bytes) { if (consumed_bytes < uws_client->stream_buffer_count) { (void)memmove(uws_client->stream_buffer, uws_client->stream_buffer + consumed_bytes, uws_client->stream_buffer_count - consumed_bytes); } uws_client->stream_buffer_count -= consumed_bytes; } static void on_underlying_io_close_complete(void* context) { if (context == NULL) { /* Codes_SRS_UWS_CLIENT_01_477: [ When `on_underlying_io_close_complete` is called with a NULL context, it shall do nothing. ]*/ LogError("NULL context for on_underlying_io_close_complete"); } else { UWS_CLIENT_HANDLE uws_client = (UWS_CLIENT_HANDLE)context; if (uws_client->uws_state == UWS_STATE_CLOSING_UNDERLYING_IO) { /* Codes_SRS_UWS_CLIENT_01_475: [ When `on_underlying_io_close_complete` is called while closing the underlying IO a subsequent `uws_client_open_async` shall succeed. ]*/ indicate_ws_close_complete(uws_client); uws_client->uws_state = UWS_STATE_CLOSED; } } } static void on_underlying_io_close_sent(void* context, IO_SEND_RESULT io_send_result) { if (context == NULL) { /* Codes_SRS_UWS_CLIENT_01_489: [ When `on_underlying_io_close_sent` is called with NULL context, it shall do nothing. ] */ LogError("NULL context in "); } else { UWS_CLIENT_INSTANCE* uws_client = (UWS_CLIENT_HANDLE)context; switch (io_send_result) { case IO_SEND_OK: case IO_SEND_CANCELLED: if (uws_client->uws_state == UWS_STATE_CLOSING_SENDING_CLOSE) { uws_client->uws_state = UWS_STATE_CLOSING_UNDERLYING_IO; /* Codes_SRS_UWS_CLIENT_01_490: [ When `on_underlying_io_close_sent` is called while the uws client is CLOSING, `on_underlying_io_close_sent` shall close the underlying IO by calling `xio_close`. ]*/ if (xio_close(uws_client->underlying_io, on_underlying_io_close_complete, uws_client) != 0) { /* Codes_SRS_UWS_CLIENT_01_496: [ If the close was initiated by the peer no `on_ws_close_complete` shall be called. ]*/ indicate_ws_close_complete(uws_client); } } case IO_SEND_ERROR: break; } } } /*the following function does the same as sscanf(pos2, "%d", &sec)*/ /*this function only exists because some of platforms do not have sscanf. */ static int ParseStringToDecimal(const char *src, int* dst) { int result; char* next; (*dst) = (int)strtol(src, &next, 0); if ((src == next) || ((((*dst) == INT_MAX) || ((*dst) == INT_MIN)) && (errno != 0))) { result = __FAILURE__; } else { result = 0; } return result; } /*the following function does the same as sscanf(buf, "HTTP/%*d.%*d %d %*[^\r\n]", &ret) */ /*this function only exists because some of platforms do not have sscanf. This is not a full implementation; it only works with well-defined HTTP response. */ static int ParseHttpResponse(const char* src, int* dst) { int result; static const char HTTPPrefix[] = "HTTP/"; bool fail; const char* runPrefix; if ((src == NULL) || (dst == NULL)) { result = __FAILURE__; } else { fail = false; runPrefix = HTTPPrefix; while ((*runPrefix) != '\0') { if ((*runPrefix) != (*src)) { fail = true; break; } src++; runPrefix++; } if (!fail) { while ((*src) != '.') { if ((*src) == '\0') { fail = true; break; } src++; } } if (!fail) { while ((*src) != ' ') { if ((*src) == '\0') { fail = true; break; } src++; } } if (fail) { result = __FAILURE__; } else { if (ParseStringToDecimal(src, dst) != 0) { result = __FAILURE__; } else { result = 0; } } } return result; } static int process_frame_fragment(UWS_CLIENT_INSTANCE *uws_client, size_t length, size_t needed_bytes) { int result; unsigned char *new_fragment_bytes = (unsigned char *)realloc(uws_client->fragment_buffer, uws_client->fragment_buffer_count + length); if (new_fragment_bytes == NULL) { /* Codes_SRS_UWS_CLIENT_01_379: [ If allocating memory for accumulating the bytes fails, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. ]*/ LogError("Cannot allocate memory for received data"); indicate_ws_error(uws_client, WS_ERROR_NOT_ENOUGH_MEMORY); result = __FAILURE__; } else { uws_client->fragment_buffer = new_fragment_bytes; (void)memcpy(uws_client->fragment_buffer + uws_client->fragment_buffer_count, uws_client->stream_buffer + needed_bytes - length, length); uws_client->fragment_buffer_count += length; result = 0; } return result; } static void on_underlying_io_bytes_received(void* context, const unsigned char* buffer, size_t size) { /* Codes_SRS_UWS_CLIENT_01_415: [ If called with a NULL `context` argument, `on_underlying_io_bytes_received` shall do nothing. ]*/ if (context != NULL) { UWS_CLIENT_HANDLE uws_client = (UWS_CLIENT_HANDLE)context; if ((buffer == NULL) || (size == 0)) { /* Codes_SRS_UWS_CLIENT_01_416: [ If called with NULL `buffer` or zero `size` and the state of the iws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS`. ]*/ indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS); } else { unsigned char decode_stream = 1; switch (uws_client->uws_state) { default: case UWS_STATE_CLOSED: decode_stream = 0; break; case UWS_STATE_OPENING_UNDERLYING_IO: /* Codes_SRS_UWS_CLIENT_01_417: [ When `on_underlying_io_bytes_received` is called while OPENING but before the `on_underlying_io_open_complete` has been called, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN`. ]*/ indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN); decode_stream = 0; break; case UWS_STATE_WAITING_FOR_UPGRADE_RESPONSE: { /* Codes_SRS_UWS_CLIENT_01_378: [ When `on_underlying_io_bytes_received` is called while the uws is OPENING, the received bytes shall be accumulated in order to attempt parsing the WebSocket Upgrade response. ]*/ unsigned char* new_received_bytes = (unsigned char*)realloc(uws_client->stream_buffer, uws_client->stream_buffer_count + size + 1); if (new_received_bytes == NULL) { /* Codes_SRS_UWS_CLIENT_01_379: [ If allocating memory for accumulating the bytes fails, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. ]*/ indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_NOT_ENOUGH_MEMORY); decode_stream = 0; } else { uws_client->stream_buffer = new_received_bytes; (void)memcpy(uws_client->stream_buffer + uws_client->stream_buffer_count, buffer, size); uws_client->stream_buffer_count += size; decode_stream = 1; } break; } case UWS_STATE_OPEN: case UWS_STATE_CLOSING_WAITING_FOR_CLOSE: { /* Codes_SRS_UWS_CLIENT_01_385: [ If the state of the uws instance is OPEN, the received bytes shall be used for decoding WebSocket frames. ]*/ unsigned char* new_received_bytes = (unsigned char*)realloc(uws_client->stream_buffer, uws_client->stream_buffer_count + size + 1); if (new_received_bytes == NULL) { /* Codes_SRS_UWS_CLIENT_01_418: [ If allocating memory for the bytes accumulated for decoding WebSocket frames fails, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_NOT_ENOUGH_MEMORY`. ]*/ LogError("Cannot allocate memory for received data"); indicate_ws_error(uws_client, WS_ERROR_NOT_ENOUGH_MEMORY); decode_stream = 0; } else { uws_client->stream_buffer = new_received_bytes; (void)memcpy(uws_client->stream_buffer + uws_client->stream_buffer_count, buffer, size); uws_client->stream_buffer_count += size; decode_stream = 1; } break; } } while (decode_stream) { decode_stream = 0; switch (uws_client->uws_state) { default: case UWS_STATE_CLOSED: break; case UWS_STATE_OPENING_UNDERLYING_IO: /* Codes_SRS_UWS_CLIENT_01_417: [ When `on_underlying_io_bytes_received` is called while OPENING but before the `on_underlying_io_open_complete` has been called, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN`. ]*/ indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN); break; case UWS_STATE_WAITING_FOR_UPGRADE_RESPONSE: { const char* request_end_ptr; /* Make sure it is zero terminated */ uws_client->stream_buffer[uws_client->stream_buffer_count] = '\0'; /* Codes_SRS_UWS_CLIENT_01_380: [ If an WebSocket Upgrade request can be parsed from the accumulated bytes, the status shall be read from the WebSocket upgrade response. ]*/ /* Codes_SRS_UWS_CLIENT_01_381: [ If the status is 101, uws shall be considered OPEN and this shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `IO_OPEN_OK`. ]*/ if ((uws_client->stream_buffer_count >= 4) && ((request_end_ptr = strstr((const char*)uws_client->stream_buffer, "\r\n\r\n")) != NULL)) { int status_code; /* This part should really be done with the HTTPAPI, but that has to be done as a separate step as the HTTPAPI has to expose somehow the underlying IO and currently this would be a too big of a change. */ /* Codes_SRS_UWS_CLIENT_01_382: [ If a negative status is decoded from the WebSocket upgrade request, an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_RESPONSE_STATUS`. ]*/ /* Codes_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ if (ParseHttpResponse((const char*)uws_client->stream_buffer, &status_code) != 0) { /* Codes_SRS_UWS_CLIENT_01_383: [ If the WebSocket upgrade request cannot be decoded an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE`. ]*/ LogError("Cannot decode HTTP response"); indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE); } else if (status_code != 101) { /* Codes_SRS_UWS_CLIENT_01_382: [ If a negative status is decoded from the WebSocket upgrade request, an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_RESPONSE_STATUS`. ]*/ LogError("Bad status (%d) received in WebSocket Upgrade response", status_code); indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_BAD_RESPONSE_STATUS); } else { /* Codes_SRS_UWS_CLIENT_01_384: [ Any extra bytes that are left unconsumed after decoding a succesfull WebSocket upgrade response shall be used for decoding WebSocket frames ]*/ consume_stream_buffer_bytes(uws_client, request_end_ptr - (char*)uws_client->stream_buffer + 4); /* Codes_SRS_UWS_CLIENT_01_381: [ If the status is 101, uws shall be considered OPEN and this shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `IO_OPEN_OK`. ]*/ uws_client->uws_state = UWS_STATE_OPEN; /* Codes_SRS_UWS_CLIENT_01_065: [ When the client is to _Establish a WebSocket Connection_ given a set of (/host/, /port/, /resource name/, and /secure/ flag), along with a list of /protocols/ and /extensions/ to be used, and an /origin/ in the case of web browsers, it MUST open a connection, send an opening handshake, and read the server's handshake in response. ]*/ /* Codes_SRS_UWS_CLIENT_01_115: [ If the server's response is validated as provided for above, it is said that _The WebSocket Connection is Established_ and that the WebSocket Connection is in the OPEN state. ]*/ uws_client->on_ws_open_complete(uws_client->on_ws_open_complete_context, WS_OPEN_OK); decode_stream = 1; } } break; } case UWS_STATE_OPEN: case UWS_STATE_CLOSING_WAITING_FOR_CLOSE: { size_t needed_bytes = 2; size_t length; /* Codes_SRS_UWS_CLIENT_01_277: [ To receive WebSocket data, an endpoint listens on the underlying network connection. ]*/ /* Codes_SRS_UWS_CLIENT_01_278: [ Incoming data MUST be parsed as WebSocket frames as defined in Section 5.2. ]*/ if (uws_client->stream_buffer_count >= needed_bytes) { unsigned char has_error = 0; /* Codes_SRS_UWS_CLIENT_01_160: [ Defines whether the "Payload data" is masked. ]*/ if ((uws_client->stream_buffer[1] & 0x80) != 0) { /* Codes_SRS_UWS_CLIENT_01_144: [ A client MUST close a connection if it detects a masked frame. ]*/ /* Codes_SRS_UWS_CLIENT_01_145: [ In this case, it MAY use the status code 1002 (protocol error) as defined in Section 7.4.1. (These rules might be relaxed in a future specification.) ]*/ LogError("Masked frame detected by WebSocket client"); indicate_ws_error_and_close(uws_client, WS_ERROR_BAD_FRAME_RECEIVED, 1002); } /* Codes_SRS_UWS_CLIENT_01_163: [ The length of the "Payload data", in bytes: ]*/ /* Codes_SRS_UWS_CLIENT_01_164: [ if 0-125, that is the payload length. ]*/ length = uws_client->stream_buffer[1]; if (length == 126) { /* Codes_SRS_UWS_CLIENT_01_165: [ If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. ]*/ needed_bytes += 2; if (uws_client->stream_buffer_count >= needed_bytes) { /* Codes_SRS_UWS_CLIENT_01_167: [ Multibyte length quantities are expressed in network byte order. ]*/ length = ((size_t)(uws_client->stream_buffer[2]) << 8) + (size_t)uws_client->stream_buffer[3]; if (length < 126) { /* Codes_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ LogError("Bad frame: received a %u length on the 16 bit length", (unsigned int)length); /* Codes_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); has_error = 1; } else { needed_bytes += (size_t)length; } } } else if (length == 127) { /* Codes_SRS_UWS_CLIENT_01_166: [ If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. ]*/ needed_bytes += 8; if (uws_client->stream_buffer_count >= needed_bytes) { if ((uws_client->stream_buffer[2] & 0x80) != 0) { LogError("Bad frame: received a 64 bit length frame with the highest bit set"); /* Codes_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); has_error = 1; } else { /* Codes_SRS_UWS_CLIENT_01_167: [ Multibyte length quantities are expressed in network byte order. ]*/ length = (size_t)(((uint64_t)(uws_client->stream_buffer[2]) << 56) + (((uint64_t)uws_client->stream_buffer[3]) << 48) + (((uint64_t)uws_client->stream_buffer[4]) << 40) + (((uint64_t)uws_client->stream_buffer[5]) << 32) + (((uint64_t)uws_client->stream_buffer[6]) << 24) + (((uint64_t)uws_client->stream_buffer[7]) << 16) + (((uint64_t)uws_client->stream_buffer[8]) << 8) + (uint64_t)(uws_client->stream_buffer[9])); if (length < 65536) { /* Codes_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ LogError("Bad frame: received a %u length on the 64 bit length", (unsigned int)length); /* Codes_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); has_error = 1; } else { needed_bytes += length; } } } } else { needed_bytes += length; } if ((has_error == 0) && (uws_client->stream_buffer_count >= needed_bytes)) { unsigned char opcode = uws_client->stream_buffer[0] & 0xF; /* Codes_SRS_UWS_CLIENT_01_147: [ Indicates that this is the final fragment in a message. ]*/ bool is_final = (uws_client->stream_buffer[0] & 0x80) != 0; switch (opcode) { default: break; /* Codes_SRS_UWS_CLIENT_01_152: [* * %x0 denotes a continuation frame *]*/ case (unsigned char)WS_CONTINUATION_FRAME: { /* Codes_SRS_UWS_CLIENT_01_213: [ A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. ]*/ /* Codes_SRS_UWS_CLIENT_01_216: [ Message fragments MUST be delivered to the recipient in the order sent by the sender. ]*/ /* Codes_SRS_UWS_CLIENT_01_219: [ A sender MAY create fragments of any size for non-control messages. ]*/ if (process_frame_fragment(uws_client, length, needed_bytes) != 0) { break; } if (is_final) { /* Codes_SRS_UWS_CLIENT_01_225: [ As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. ]*/ if (uws_client->fragmented_frame_type == WS_FRAME_TYPE_UNKNOWN) { LogError("Continuation fragment received without initial fragment specifying frame data type"); indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); decode_stream = 1; break; } uws_client->on_ws_frame_received(uws_client->on_ws_frame_received_context, uws_client->fragmented_frame_type, uws_client->fragment_buffer, uws_client->fragment_buffer_count); uws_client->fragment_buffer_count = 0; uws_client->fragmented_frame_type = WS_FRAME_TYPE_UNKNOWN; } decode_stream = 1; break; } /* Codes_SRS_UWS_CLIENT_01_153: [ * %x1 denotes a text frame ]*/ /* Codes_SRS_UWS_CLIENT_01_258: [** Currently defined opcodes for data frames include 0x1 (Text), 0x2 (Binary). ]*/ case (unsigned char)WS_TEXT_FRAME: { /* Codes_SRS_UWS_CLIENT_01_386: [ When a WebSocket data frame is decoded succesfully it shall be indicated via the callback `on_ws_frame_received`. ]*/ /* Codes_SRS_UWS_CLIENT_01_169: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ /* Codes_SRS_UWS_CLIENT_01_173: [ The "Payload data" is defined as "Extension data" concatenated with "Application data". ]*/ /* Codes_SRS_UWS_CLIENT_01_280: [ Upon receiving a data frame (Section 5.6), the endpoint MUST note the /type/ of the data as defined by the opcode (frame-opcode) from Section 5.2. ]*/ /* Codes_SRS_UWS_CLIENT_01_281: [ The "Application data" from this frame is defined as the /data/ of the message. ]*/ /* Codes_SRS_UWS_CLIENT_01_282: [ If the frame comprises an unfragmented message (Section 5.4), it is said that _A WebSocket Message Has Been Received_ with type /type/ and data /data/. ]*/ if (is_final) { uws_client->on_ws_frame_received(uws_client->on_ws_frame_received_context, WS_FRAME_TYPE_TEXT, uws_client->stream_buffer + needed_bytes - length, length); } else { /* Codes_SRS_UWS_CLIENT_01_217: [ The fragments of one message MUST NOT be interleaved between the fragments of another message unless an extension has been negotiated that can interpret the interleaving. ]*/ if (uws_client->fragmented_frame_type != WS_FRAME_TYPE_UNKNOWN) { LogError("Fragmented frame received interleaved between the fragments of another message"); indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); decode_stream = 1; break; } /* Codes_SRS_UWS_CLIENT_01_213: [ A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. ]*/ /* Codes_SRS_UWS_CLIENT_01_216: [ Message fragments MUST be delivered to the recipient in the order sent by the sender. ]*/ /* Codes_SRS_UWS_CLIENT_01_219: [ A sender MAY create fragments of any size for non-control messages. ]*/ if (process_frame_fragment(uws_client, length, needed_bytes) != 0) { break; } /* Codes_SRS_UWS_CLIENT_01_225: [ As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. ]*/ /* Codes_SRS_UWS_CLIENT_01_226: [ Since control frames cannot be fragmented, the type for all fragments in a message MUST be either text, binary, or one of the reserved opcodes. ]*/ uws_client->fragmented_frame_type = WS_FRAME_TYPE_TEXT; } decode_stream = 1; break; } /* Codes_SRS_UWS_CLIENT_01_154: [ * %x2 denotes a binary frame ]*/ case (unsigned char)WS_BINARY_FRAME: { /* Codes_SRS_UWS_CLIENT_01_386: [ When a WebSocket data frame is decoded succesfully it shall be indicated via the callback `on_ws_frame_received`. ]*/ /* Codes_SRS_UWS_CLIENT_01_169: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ /* Codes_SRS_UWS_CLIENT_01_173: [ The "Payload data" is defined as "Extension data" concatenated with "Application data". ]*/ /* Codes_SRS_UWS_CLIENT_01_264: [ The "Payload data" is arbitrary binary data whose interpretation is solely up to the application layer. ]*/ /* Codes_SRS_UWS_CLIENT_01_280: [ Upon receiving a data frame (Section 5.6), the endpoint MUST note the /type/ of the data as defined by the opcode (frame-opcode) from Section 5.2. ]*/ /* Codes_SRS_UWS_CLIENT_01_281: [ The "Application data" from this frame is defined as the /data/ of the message. ]*/ /* Codes_SRS_UWS_CLIENT_01_282: [ If the frame comprises an unfragmented message (Section 5.4), it is said that _A WebSocket Message Has Been Received_ with type /type/ and data /data/. ]*/ if (is_final) { uws_client->on_ws_frame_received(uws_client->on_ws_frame_received_context, WS_FRAME_TYPE_BINARY, uws_client->stream_buffer + needed_bytes - length, length); } else { /* Codes_SRS_UWS_CLIENT_01_217: [ The fragments of one message MUST NOT be interleaved between the fragments of another message unless an extension has been negotiated that can interpret the interleaving. ]*/ if (uws_client->fragmented_frame_type != WS_FRAME_TYPE_UNKNOWN) { LogError("Fragmented frame received interleaved between the fragments of another message"); indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); decode_stream = 1; break; } /* Codes_SRS_UWS_CLIENT_01_213: [ A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. ]*/ /* Codes_SRS_UWS_CLIENT_01_216: [ Message fragments MUST be delivered to the recipient in the order sent by the sender. ]*/ /* Codes_SRS_UWS_CLIENT_01_219: [ A sender MAY create fragments of any size for non-control messages. ]*/ if (process_frame_fragment(uws_client, length, needed_bytes) != 0) { break; } /* Codes_SRS_UWS_CLIENT_01_225: [ As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. ]*/ /* Codes_SRS_UWS_CLIENT_01_226: [ Since control frames cannot be fragmented, the type for all fragments in a message MUST be either text, binary, or one of the reserved opcodes. ]*/ uws_client->fragmented_frame_type = WS_FRAME_TYPE_BINARY; } decode_stream = 1; break; } /* Codes_SRS_UWS_CLIENT_01_156: [ * %x8 denotes a connection close ]*/ /* Codes_SRS_UWS_CLIENT_01_234: [ The Close frame contains an opcode of 0x8. ]*/ /* Codes_SRS_UWS_CLIENT_01_214: [ Control frames (see Section 5.5) MAY be injected in the middle of a fragmented message. ]*/ case (unsigned char)WS_CLOSE_FRAME: { uint16_t close_code; uint16_t* close_code_ptr; const unsigned char* data_ptr = uws_client->stream_buffer + needed_bytes - length; const unsigned char* extra_data_ptr; size_t extra_data_length; unsigned char* close_frame_bytes; size_t close_frame_length; bool utf8_error = false; /* Codes_SRS_UWS_CLIENT_01_215: [ Control frames themselves MUST NOT be fragmented. ]*/ if (!is_final) { LogError("Fragmented control frame received."); indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); break; } /* Codes_SRS_UWS_CLIENT_01_235: [ The Close frame MAY contain a body (the "Application data" portion of the frame) that indicates a reason for closing, such as an endpoint shutting down, an endpoint having received a frame too large, or an endpoint having received a frame that does not conform to the format expected by the endpoint. ]*/ if (length >= 2) { /* Codes_SRS_UWS_CLIENT_01_236: [ If there is a body, the first two bytes of the body MUST be a 2-byte unsigned integer (in network byte order) representing a status code with value /code/ defined in Section 7.4. ]*/ close_code = (data_ptr[0] << 8) + data_ptr[1]; /* Codes_SRS_UWS_CLIENT_01_461: [ The argument `close_code` shall be set to point to the code extracted from the CLOSE frame. ]*/ close_code_ptr = &close_code; } else { /* Codes_SRS_UWS_CLIENT_01_462: [ If no code can be extracted then `close_code` shall be NULL. ]*/ close_code_ptr = NULL; } if (length > 2) { /* Codes_SRS_UWS_CLIENT_01_463: [ The extra bytes (besides the close code) shall be passed to the `on_ws_peer_closed` callback by using `extra_data` and `extra_data_length`. ]*/ extra_data_ptr = data_ptr + 2; extra_data_length = length - 2; /* Codes_SRS_UWS_CLIENT_01_238: [ As the data is not guaranteed to be human readable, clients MUST NOT show it to end users. ]*/ /* Codes_SRS_UWS_CLIENT_01_237: [ Following the 2-byte integer, the body MAY contain UTF-8-encoded data with value /reason/, the interpretation of which is not defined by this specification. ]*/ if (utf8_checker_is_valid_utf8(extra_data_ptr, extra_data_length) != true) { LogError("Reason in CLOSE frame is not UTF-8."); extra_data_ptr = NULL; extra_data_length = 0; utf8_error = true; } } else { extra_data_ptr = NULL; extra_data_length = 0; } if (utf8_error) { uws_client->uws_state = UWS_STATE_CLOSING_UNDERLYING_IO; if (xio_close(uws_client->underlying_io, on_underlying_io_close_complete, uws_client) != 0) { LogError("Could not close underlying IO"); indicate_ws_error(uws_client, WS_ERROR_CANNOT_CLOSE_UNDERLYING_IO); uws_client->uws_state = UWS_STATE_CLOSED; } } else { BUFFER_HANDLE close_frame_buffer; if (uws_client->uws_state == UWS_STATE_CLOSING_WAITING_FOR_CLOSE) { uws_client->uws_state = UWS_STATE_CLOSING_UNDERLYING_IO; if (xio_close(uws_client->underlying_io, on_underlying_io_close_complete, uws_client) != 0) { indicate_ws_close_complete(uws_client); uws_client->uws_state = UWS_STATE_CLOSED; } } else { /* Codes_SRS_UWS_CLIENT_01_296: [ Upon either sending or receiving a Close control frame, it is said that _The WebSocket Closing Handshake is Started_ and that the WebSocket connection is in the CLOSING state. ]*/ /* Codes_SRS_UWS_CLIENT_01_240: [ The application MUST NOT send any more data frames after sending a Close frame. ]*/ uws_client->uws_state = UWS_STATE_CLOSING_SENDING_CLOSE; } /* Codes_SRS_UWS_CLIENT_01_241: [ If an endpoint receives a Close frame and did not previously send a Close frame, the endpoint MUST send a Close frame in response. ]*/ /* Codes_SRS_UWS_CLIENT_01_242: [ It SHOULD do so as soon as practical. ]*/ /* Codes_SRS_UWS_CLIENT_01_239: [ Close frames sent from client to server must be masked as per Section 5.3. ]*/ /* Codes_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ close_frame_buffer = uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0); if (close_frame_buffer == NULL) { LogError("Cannot encode the response CLOSE frame"); /* Codes_SRS_UWS_CLIENT_01_288: [ To _Close the WebSocket Connection_, an endpoint closes the underlying TCP connection. ]*/ /* Codes_SRS_UWS_CLIENT_01_290: [ An endpoint MAY close the connection via any means available when necessary, such as when under attack. ]*/ uws_client->uws_state = UWS_STATE_CLOSING_UNDERLYING_IO; if (xio_close(uws_client->underlying_io, on_underlying_io_close_complete, uws_client) != 0) { indicate_ws_error(uws_client, WS_ERROR_CANNOT_CLOSE_UNDERLYING_IO); uws_client->uws_state = UWS_STATE_CLOSED; } } else { close_frame_bytes = BUFFER_u_char(close_frame_buffer); close_frame_length = BUFFER_length(close_frame_buffer); if (xio_send(uws_client->underlying_io, close_frame_bytes, close_frame_length, on_underlying_io_close_sent, uws_client) != 0) { LogError("Cannot send the response CLOSE frame"); /* Codes_SRS_UWS_CLIENT_01_288: [ To _Close the WebSocket Connection_, an endpoint closes the underlying TCP connection. ]*/ /* Codes_SRS_UWS_CLIENT_01_290: [ An endpoint MAY close the connection via any means available when necessary, such as when under attack. ]*/ uws_client->uws_state = UWS_STATE_CLOSING_UNDERLYING_IO; if (xio_close(uws_client->underlying_io, on_underlying_io_close_complete, uws_client) != 0) { indicate_ws_error(uws_client, WS_ERROR_CANNOT_CLOSE_UNDERLYING_IO); uws_client->uws_state = UWS_STATE_CLOSED; } } BUFFER_delete(close_frame_buffer); } } /* Codes_SRS_UWS_CLIENT_01_460: [ When a CLOSE frame is received the callback `on_ws_peer_closed` passed to `uws_client_open_async` shall be called, while passing to it the argument `on_ws_peer_closed_context`. ]*/ uws_client->on_ws_peer_closed(uws_client->on_ws_peer_closed_context, close_code_ptr, extra_data_ptr, extra_data_length); break; } /* Codes_SRS_UWS_CLIENT_01_157: [ * %x9 denotes a ping ]*/ /* Codes_SRS_UWS_CLIENT_01_247: [ The Ping frame contains an opcode of 0x9. ]*/ /* Codes_SRS_UWS_CLIENT_01_251: [ An endpoint MAY send a Ping frame any time after the connection is established and before the connection is closed. ]*/ /* Codes_SRS_UWS_CLIENT_01_214: [ Control frames (see Section 5.5) MAY be injected in the middle of a fragmented message. ]*/ case (unsigned char)WS_PING_FRAME: { /* Codes_SRS_UWS_CLIENT_01_249: [ Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in response ]*/ /* Codes_SRS_UWS_CLIENT_01_250: [ It SHOULD respond with Pong frame as soon as is practical. ]*/ unsigned char* pong_frame; size_t pong_frame_length; BUFFER_HANDLE pong_frame_buffer; /* Codes_SRS_UWS_CLIENT_01_215: [ Control frames themselves MUST NOT be fragmented. ]*/ if (!is_final) { LogError("Fragmented control frame received."); indicate_ws_error(uws_client, WS_ERROR_BAD_FRAME_RECEIVED); break; } /* Codes_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ pong_frame_buffer = uws_frame_encoder_encode(WS_PONG_FRAME, uws_client->stream_buffer + needed_bytes - length, length, true, true, 0); if (pong_frame_buffer == NULL) { LogError("Encoding of PONG failed."); } else { /* Codes_SRS_UWS_CLIENT_01_248: [ A Ping frame MAY include "Application data". ]*/ pong_frame = BUFFER_u_char(pong_frame_buffer); pong_frame_length = BUFFER_length(pong_frame_buffer); if (xio_send(uws_client->underlying_io, pong_frame, pong_frame_length, unchecked_on_send_complete, NULL) != 0) { LogError("Sending PONG frame failed."); } BUFFER_delete(pong_frame_buffer); } break; } /* Codes_SRS_UWS_CLIENT_01_252: [ The Pong frame contains an opcode of 0xA. ]*/ case (unsigned char)WS_PONG_FRAME: break; } consume_stream_buffer_bytes(uws_client, needed_bytes); } } break; } } } } } } static void on_underlying_io_error(void* context) { UWS_CLIENT_HANDLE uws_client = (UWS_CLIENT_HANDLE)context; switch (uws_client->uws_state) { default: break; case UWS_STATE_CLOSING_WAITING_FOR_CLOSE: case UWS_STATE_CLOSING_SENDING_CLOSE: case UWS_STATE_CLOSING_UNDERLYING_IO: /* Codes_SRS_UWS_CLIENT_01_500: [ The callback `on_ws_close_complete` shall be called, while passing the `on_ws_close_complete_context` argument to it. ]*/ /* Codes_SRS_UWS_CLIENT_01_377: [ When `on_underlying_io_error` is called while the uws instance is CLOSING the underlying IO shall be closed by calling `xio_close`. ]*/ (void)xio_close(uws_client->underlying_io, NULL, NULL); /* Codes_SRS_UWS_CLIENT_01_499: [ If the CLOSE was due to the peer closing, the callback `on_ws_close_complete` shall not be called. ]*/ indicate_ws_close_complete(uws_client); break; case UWS_STATE_OPENING_UNDERLYING_IO: case UWS_STATE_WAITING_FOR_UPGRADE_RESPONSE: /* Codes_SRS_UWS_CLIENT_01_375: [ When `on_underlying_io_error` is called while uws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_ERROR`. ]*/ /* Codes_SRS_UWS_CLIENT_01_077: [ If this fails (e.g., the server's certificate could not be verified), then the client MUST _Fail the WebSocket Connection_ and abort the connection. ]*/ indicate_ws_open_complete_error_and_close(uws_client, WS_OPEN_ERROR_UNDERLYING_IO_ERROR); break; case UWS_STATE_OPEN: /* Codes_SRS_UWS_CLIENT_01_376: [ When `on_underlying_io_error` is called while the uws instance is OPEN, an error shall be reported to the user by calling the `on_ws_error` callback that was passed to `uws_client_open_async` with the argument `WS_ERROR_UNDERLYING_IO_ERROR`. ]*/ /* Codes_SRS_UWS_CLIENT_01_318: [ Servers MAY close the WebSocket connection whenever desired. ]*/ /* Codes_SRS_UWS_CLIENT_01_269: [ If at any point the state of the WebSocket connection changes, the endpoint MUST abort the following steps. ]*/ indicate_ws_error(uws_client, WS_ERROR_UNDERLYING_IO_ERROR); break; } } int uws_client_open_async(UWS_CLIENT_HANDLE uws_client, ON_WS_OPEN_COMPLETE on_ws_open_complete, void* on_ws_open_complete_context, ON_WS_FRAME_RECEIVED on_ws_frame_received, void* on_ws_frame_received_context, ON_WS_PEER_CLOSED on_ws_peer_closed, void* on_ws_peer_closed_context, ON_WS_ERROR on_ws_error, void* on_ws_error_context) { int result; /* Codes_SRS_UWS_CLIENT_01_393: [ The context arguments for the callbacks shall be allowed to be NULL. ]*/ if ((uws_client == NULL) || (on_ws_open_complete == NULL) || (on_ws_frame_received == NULL) || (on_ws_peer_closed == NULL) || (on_ws_error == NULL)) { /* Codes_SRS_UWS_CLIENT_01_027: [ If `uws_client`, `on_ws_open_complete`, `on_ws_frame_received`, `on_ws_peer_closed` or `on_ws_error` is NULL, `uws_client_open_async` shall fail and return a non-zero value. ]*/ LogError("Invalid arguments: uws=%p, on_ws_open_complete=%p, on_ws_frame_received=%p, on_ws_error=%p", uws_client, on_ws_open_complete, on_ws_frame_received, on_ws_error); result = __FAILURE__; } else { if (uws_client->uws_state != UWS_STATE_CLOSED) { /* Codes_SRS_UWS_CLIENT_01_400: [ `uws_client_open_async` while CLOSING shall fail and return a non-zero value. ]*/ /* Codes_SRS_UWS_CLIENT_01_394: [ `uws_client_open_async` while the uws instance is already OPEN or OPENING shall fail and return a non-zero value. ]*/ LogError("Invalid uWS state while trying to open: %d", (int)uws_client->uws_state); result = __FAILURE__; } else { uws_client->uws_state = UWS_STATE_OPENING_UNDERLYING_IO; uws_client->stream_buffer_count = 0; uws_client->fragment_buffer_count = 0; uws_client->fragmented_frame_type = WS_FRAME_TYPE_UNKNOWN; uws_client->on_ws_open_complete = on_ws_open_complete; uws_client->on_ws_open_complete_context = on_ws_open_complete_context; uws_client->on_ws_frame_received = on_ws_frame_received; uws_client->on_ws_frame_received_context = on_ws_frame_received_context; uws_client->on_ws_peer_closed = on_ws_peer_closed; uws_client->on_ws_peer_closed_context = on_ws_peer_closed_context; uws_client->on_ws_error = on_ws_error; uws_client->on_ws_error_context = on_ws_error_context; /* Codes_SRS_UWS_CLIENT_01_025: [ `uws_client_open_async` shall open the underlying IO by calling `xio_open` and providing the IO handle created in `uws_client_create` as argument. ]*/ /* Codes_SRS_UWS_CLIENT_01_367: [ The callbacks `on_underlying_io_open_complete`, `on_underlying_io_bytes_received` and `on_underlying_io_error` shall be passed as arguments to `xio_open`. ]*/ /* Codes_SRS_UWS_CLIENT_01_061: [ To _Establish a WebSocket Connection_, a client opens a connection and sends a handshake as defined in this section. ]*/ if (xio_open(uws_client->underlying_io, on_underlying_io_open_complete, uws_client, on_underlying_io_bytes_received, uws_client, on_underlying_io_error, uws_client) != 0) { /* Codes_SRS_UWS_CLIENT_01_028: [ If opening the underlying IO fails then `uws_client_open_async` shall fail and return a non-zero value. ]*/ /* Codes_SRS_UWS_CLIENT_01_075: [ If the connection could not be opened, either because a direct connection failed or because any proxy used returned an error, then the client MUST _Fail the WebSocket Connection_ and abort the connection attempt. ]*/ LogError("Opening the underlying IO failed"); uws_client->uws_state = UWS_STATE_CLOSED; result = __FAILURE__; } else { /* Codes_SRS_UWS_CLIENT_01_026: [ On success, `uws_client_open_async` shall return 0. ]*/ result = 0; } } } return result; } static int complete_send_frame(WS_PENDING_SEND* ws_pending_send, LIST_ITEM_HANDLE pending_send_frame_item, WS_SEND_FRAME_RESULT ws_send_frame_result) { int result; UWS_CLIENT_INSTANCE* uws_client = ws_pending_send->uws_client; /* Codes_SRS_UWS_CLIENT_01_432: [ The indicated sent frame shall be removed from the list by calling `singlylinkedlist_remove`. ]*/ if (singlylinkedlist_remove(uws_client->pending_sends, pending_send_frame_item) != 0) { LogError("Failed removing item from list"); result = __FAILURE__; } else { if (ws_pending_send->on_ws_send_frame_complete != NULL) { /* Codes_SRS_UWS_CLIENT_01_037: [ When indicating pending send frames as cancelled the callback context passed to the `on_ws_send_frame_complete` callback shall be the context given to `uws_client_send_frame_async`. ]*/ ws_pending_send->on_ws_send_frame_complete(ws_pending_send->context, ws_send_frame_result); } /* Codes_SRS_UWS_CLIENT_01_434: [ The memory associated with the sent frame shall be freed. ]*/ free(ws_pending_send); result = 0; } return result; } /* Codes_SRS_UWS_CLIENT_01_029: [ `uws_client_close_async` shall close the uws instance connection if an open action is either pending or has completed successfully (if the IO is open). ]*/ /* Codes_SRS_UWS_CLIENT_01_317: [ Clients SHOULD NOT close the WebSocket connection arbitrarily. ]*/ int uws_client_close_async(UWS_CLIENT_HANDLE uws_client, ON_WS_CLOSE_COMPLETE on_ws_close_complete, void* on_ws_close_complete_context) { int result; /* Codes_SRS_UWS_CLIENT_01_397: [ The `on_ws_close_complete` argument shall be allowed to be NULL, in which case no callback shall be called when the close is complete. ]*/ /* Codes_SRS_UWS_CLIENT_01_398: [ `on_ws_close_complete_context` shall also be allows to be NULL. ]*/ if (uws_client == NULL) { /* Codes_SRS_UWS_CLIENT_01_030: [ if `uws_client` is NULL, `uws_client_close_async` shall return a non-zero value. ]*/ LogError("NULL uWS handle."); result = __FAILURE__; } else { if ((uws_client->uws_state == UWS_STATE_CLOSED) || (uws_client->uws_state == UWS_STATE_CLOSING_SENDING_CLOSE) || (uws_client->uws_state == UWS_STATE_CLOSING_WAITING_FOR_CLOSE) || (uws_client->uws_state == UWS_STATE_CLOSING_UNDERLYING_IO)) { /* Codes_SRS_UWS_CLIENT_01_032: [ `uws_client_close_async` when no open action has been issued shall fail and return a non-zero value. ]*/ LogError("close has been called when already CLOSED"); result = __FAILURE__; } else { /* Codes_SRS_UWS_CLIENT_01_399: [ `on_ws_close_complete` and `on_ws_close_complete_context` shall be saved and the callback `on_ws_close_complete` shall be triggered when the close is complete. ]*/ uws_client->on_ws_close_complete = on_ws_close_complete; uws_client->on_ws_close_complete_context = on_ws_close_complete_context; uws_client->uws_state = UWS_STATE_CLOSING_UNDERLYING_IO; /* Codes_SRS_UWS_CLIENT_01_031: [ `uws_client_close_async` shall close the connection by calling `xio_close` while passing as argument the IO handle created in `uws_client_create`. ]*/ /* Codes_SRS_UWS_CLIENT_01_368: [ The callback `on_underlying_io_close` shall be passed as argument to `xio_close`. ]*/ if (xio_close(uws_client->underlying_io, (on_ws_close_complete == NULL) ? NULL : on_underlying_io_close_complete, (on_ws_close_complete == NULL) ? NULL : uws_client) != 0) { /* Codes_SRS_UWS_CLIENT_01_395: [ If `xio_close` fails, `uws_client_close_async` shall fail and return a non-zero value. ]*/ LogError("Closing the underlying IO failed."); result = __FAILURE__; } else { /* Codes_SRS_UWS_CLIENT_01_034: [ `uws_client_close_async` shall obtain all the pending send frames by repetitively querying for the head of the pending IO list and freeing that head item. ]*/ LIST_ITEM_HANDLE first_pending_send; /* Codes_SRS_UWS_CLIENT_01_035: [ Obtaining the head of the pending send frames list shall be done by calling `singlylinkedlist_get_head_item`. ]*/ while ((first_pending_send = singlylinkedlist_get_head_item(uws_client->pending_sends)) != NULL) { WS_PENDING_SEND* ws_pending_send = (WS_PENDING_SEND*)singlylinkedlist_item_get_value(first_pending_send); /* Codes_SRS_UWS_CLIENT_01_036: [ For each pending send frame the send complete callback shall be called with `UWS_SEND_FRAME_CANCELLED`. ]*/ complete_send_frame(ws_pending_send, first_pending_send, WS_SEND_FRAME_CANCELLED); } /* Codes_SRS_UWS_CLIENT_01_396: [ On success `uws_client_close_async` shall return 0. ]*/ result = 0; } } } return result; } /* Codes_SRS_UWS_CLIENT_01_317: [ Clients SHOULD NOT close the WebSocket connection arbitrarily. ]*/ int uws_client_close_handshake_async(UWS_CLIENT_HANDLE uws_client, uint16_t close_code, const char* close_reason, ON_WS_CLOSE_COMPLETE on_ws_close_complete, void* on_ws_close_complete_context) { int result; if (uws_client == NULL) { /* Codes_SRS_UWS_CLIENT_01_467: [ if `uws_client` is NULL, `uws_client_close_handshake_async` shall return a non-zero value. ]*/ LogError("NULL uws_client"); result = __FAILURE__; } else { if ((uws_client->uws_state == UWS_STATE_CLOSED) || /* Codes_SRS_UWS_CLIENT_01_474: [ `uws_client_close_handshake_async` when already CLOSING shall fail and return a non-zero value. ]*/ (uws_client->uws_state == UWS_STATE_CLOSING_WAITING_FOR_CLOSE) || (uws_client->uws_state == UWS_STATE_CLOSING_SENDING_CLOSE) || (uws_client->uws_state == UWS_STATE_CLOSING_UNDERLYING_IO)) { /* Codes_SRS_UWS_CLIENT_01_473: [ `uws_client_close_handshake_async` when no open action has been issued shall fail and return a non-zero value. ]*/ LogError("uws_client_close_handshake_async has been called when already CLOSED"); result = __FAILURE__; } else { (void)close_reason; /* Codes_SRS_UWS_CLIENT_01_468: [ `on_ws_close_complete` and `on_ws_close_complete_context` shall be saved and the callback `on_ws_close_complete` shall be triggered when the close is complete. ]*/ /* Codes_SRS_UWS_CLIENT_01_469: [ The `on_ws_close_complete` argument shall be allowed to be NULL, in which case no callback shall be called when the close is complete. ]*/ /* Codes_SRS_UWS_CLIENT_01_470: [ `on_ws_close_complete_context` shall also be allowed to be NULL. ]*/ uws_client->on_ws_close_complete = on_ws_close_complete; uws_client->on_ws_close_complete_context = on_ws_close_complete_context; uws_client->uws_state = UWS_STATE_CLOSING_WAITING_FOR_CLOSE; /* Codes_SRS_UWS_CLIENT_01_465: [ `uws_client_close_handshake_async` shall initiate the close handshake by sending a close frame to the peer. ]*/ if (send_close_frame(uws_client, close_code) != 0) { /* Codes_SRS_UWS_CLIENT_01_472: [ If `xio_send` fails, `uws_client_close_handshake_async` shall fail and return a non-zero value. ]*/ LogError("Sending CLOSE frame failed"); result = __FAILURE__; } else { LIST_ITEM_HANDLE first_pending_send; while ((first_pending_send = singlylinkedlist_get_head_item(uws_client->pending_sends)) != NULL) { WS_PENDING_SEND* ws_pending_send = (WS_PENDING_SEND*)singlylinkedlist_item_get_value(first_pending_send); complete_send_frame(ws_pending_send, first_pending_send, WS_SEND_FRAME_CANCELLED); } /* Codes_SRS_UWS_CLIENT_01_466: [ On success `uws_client_close_handshake_async` shall return 0. ]*/ result = 0; } } } return result; } static void on_underlying_io_send_complete(void* context, IO_SEND_RESULT send_result) { if (context == NULL) { /* Codes_SRS_UWS_CLIENT_01_435: [ When `on_underlying_io_send_complete` is called with a NULL `context`, it shall do nothing. ]*/ LogError("on_underlying_io_send_complete called with NULL context"); } else { LIST_ITEM_HANDLE ws_pending_send_list_item = (LIST_ITEM_HANDLE)context; WS_PENDING_SEND* ws_pending_send = (WS_PENDING_SEND*)singlylinkedlist_item_get_value(ws_pending_send_list_item); if (ws_pending_send != NULL) { UWS_CLIENT_HANDLE uws_client = ws_pending_send->uws_client; WS_SEND_FRAME_RESULT ws_send_frame_result; switch (send_result) { /* Codes_SRS_UWS_CLIENT_01_436: [ When `on_underlying_io_send_complete` is called with any other error code, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_ERROR`. ]*/ default: case IO_SEND_ERROR: /* Codes_SRS_UWS_CLIENT_01_390: [ When `on_underlying_io_send_complete` is called with `IO_SEND_ERROR` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_ERROR`. ]*/ ws_send_frame_result = WS_SEND_FRAME_ERROR; break; case IO_SEND_OK: /* Codes_SRS_UWS_CLIENT_01_389: [ When `on_underlying_io_send_complete` is called with `IO_SEND_OK` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_OK`. ]*/ ws_send_frame_result = WS_SEND_FRAME_OK; break; case IO_SEND_CANCELLED: /* Codes_SRS_UWS_CLIENT_01_391: [ When `on_underlying_io_send_complete` is called with `IO_SEND_CANCELLED` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_CANCELLED`. ]*/ ws_send_frame_result = WS_SEND_FRAME_CANCELLED; break; } if (complete_send_frame(ws_pending_send, ws_pending_send_list_item, ws_send_frame_result) != 0) { /* Codes_SRS_UWS_CLIENT_01_433: [ If `singlylinkedlist_remove` fails an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_CANNOT_REMOVE_SENT_ITEM_FROM_LIST`. ]*/ indicate_ws_error(uws_client, WS_ERROR_CANNOT_REMOVE_SENT_ITEM_FROM_LIST); } } else { LogError("Failing getting singlylinkedlist_item_get_value on_underlying_io_send_complete"); } } } static bool find_list_node(LIST_ITEM_HANDLE list_item, const void* match_context) { return list_item == (LIST_ITEM_HANDLE)match_context; } int uws_client_send_frame_async(UWS_CLIENT_HANDLE uws_client, unsigned char frame_type, const unsigned char* buffer, size_t size, bool is_final, ON_WS_SEND_FRAME_COMPLETE on_ws_send_frame_complete, void* on_ws_send_frame_complete_context) { int result; if (uws_client == NULL) { /* Codes_SRS_UWS_CLIENT_01_044: [ If any the arguments `uws_client` is NULL, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ LogError("NULL uws handle."); result = __FAILURE__; } else if ((buffer == NULL) && (size > 0)) { /* Codes_SRS_UWS_CLIENT_01_045: [ If `size` is non-zero and `buffer` is NULL then `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ LogError("NULL buffer with %u size.", (unsigned int)size); result = __FAILURE__; } /* Codes_SRS_UWS_CLIENT_01_146: [ A data frame MAY be transmitted by either the client or the server at any time after opening handshake completion and before that endpoint has sent a Close frame (Section 5.5.1). ]*/ /* Codes_SRS_UWS_CLIENT_01_268: [ The endpoint MUST ensure the WebSocket connection is in the OPEN state ]*/ else if (uws_client->uws_state != UWS_STATE_OPEN) { /* Codes_SRS_UWS_CLIENT_01_043: [ If the uws instance is not OPEN (open has not been called or is still in progress) then `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ LogError("uws not in OPEN state."); result = __FAILURE__; } else { WS_PENDING_SEND* ws_pending_send = (WS_PENDING_SEND*)malloc(sizeof(WS_PENDING_SEND)); if (ws_pending_send == NULL) { /* Codes_SRS_UWS_CLIENT_01_047: [ If allocating memory for the newly queued item fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ LogError("Cannot allocate memory for frame to be sent."); result = __FAILURE__; } else { BUFFER_HANDLE non_control_frame_buffer; /* Codes_SRS_UWS_CLIENT_01_425: [ Encoding shall be done by calling `uws_frame_encoder_encode` and passing to it the `buffer` and `size` argument for payload, the `is_final` flag and setting `is_masked` to true. ]*/ /* Codes_SRS_UWS_CLIENT_01_270: [ An endpoint MUST encapsulate the /data/ in a WebSocket frame as defined in Section 5.2. ]*/ /* Codes_SRS_UWS_CLIENT_01_272: [ The opcode (frame-opcode) of the first frame containing the data MUST be set to the appropriate value from Section 5.2 for data that is to be interpreted by the recipient as text or binary data. ]*/ /* Codes_SRS_UWS_CLIENT_01_274: [ If the data is being sent by the client, the frame(s) MUST be masked as defined in Section 5.3. ]*/ non_control_frame_buffer = uws_frame_encoder_encode((WS_FRAME_TYPE)frame_type, buffer, size, true, is_final, 0); if (non_control_frame_buffer == NULL) { /* Codes_SRS_UWS_CLIENT_01_426: [ If `uws_frame_encoder_encode` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ LogError("Failed encoding WebSocket frame"); free(ws_pending_send); result = __FAILURE__; } else { const unsigned char* encoded_frame; size_t encoded_frame_length; LIST_ITEM_HANDLE new_pending_send_list_item; /* Codes_SRS_UWS_CLIENT_01_428: [ The encoded frame buffer memory shall be obtained by calling `BUFFER_u_char` on the encode buffer. ]*/ encoded_frame = BUFFER_u_char(non_control_frame_buffer); /* Codes_SRS_UWS_CLIENT_01_429: [ The encoded frame size shall be obtained by calling `BUFFER_length` on the encode buffer. ]*/ encoded_frame_length = BUFFER_length(non_control_frame_buffer); /* Codes_SRS_UWS_CLIENT_01_038: [ `uws_client_send_frame_async` shall create and queue a structure that contains: ]*/ /* Codes_SRS_UWS_CLIENT_01_050: [ The argument `on_ws_send_frame_complete` shall be optional, if NULL is passed by the caller then no send complete callback shall be triggered. ]*/ /* Codes_SRS_UWS_CLIENT_01_040: [ - the send complete callback `on_ws_send_frame_complete` ]*/ /* Codes_SRS_UWS_CLIENT_01_041: [ - the send complete callback context `on_ws_send_frame_complete_context` ]*/ ws_pending_send->on_ws_send_frame_complete = on_ws_send_frame_complete; ws_pending_send->context = on_ws_send_frame_complete_context; ws_pending_send->uws_client = uws_client; /* Codes_SRS_UWS_CLIENT_01_048: [ Queueing shall be done by calling `singlylinkedlist_add`. ]*/ new_pending_send_list_item = singlylinkedlist_add(uws_client->pending_sends, ws_pending_send); if (new_pending_send_list_item == NULL) { /* Codes_SRS_UWS_CLIENT_01_049: [ If `singlylinkedlist_add` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ LogError("Could not allocate memory for pending frames"); free(ws_pending_send); result = __FAILURE__; } else { /* Codes_SRS_UWS_CLIENT_01_431: [ Once encoded the frame shall be sent by using `xio_send` with the following arguments: ]*/ /* Codes_SRS_UWS_CLIENT_01_053: [ - the io handle shall be the underlyiong IO handle created in `uws_client_create`. ]*/ /* Codes_SRS_UWS_CLIENT_01_054: [ - the `buffer` argument shall point to the complete websocket frame to be sent. ]*/ /* Codes_SRS_UWS_CLIENT_01_055: [ - the `size` argument shall indicate the websocket frame length. ]*/ /* Codes_SRS_UWS_CLIENT_01_056: [ - the `send_complete` callback shall be the `on_underlying_io_send_complete` function. ]*/ /* Codes_SRS_UWS_CLIENT_01_057: [ - the `send_complete_context` argument shall identify the pending send. ]*/ /* Codes_SRS_UWS_CLIENT_01_276: [ The frame(s) that have been formed MUST be transmitted over the underlying network connection. ]*/ if (xio_send(uws_client->underlying_io, encoded_frame, encoded_frame_length, on_underlying_io_send_complete, new_pending_send_list_item) != 0) { /* Codes_SRS_UWS_CLIENT_01_058: [ If `xio_send` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ LogError("Could not send bytes through the underlying IO"); /* Codes_SRS_UWS_CLIENT_09_001: [ If `xio_send` fails and the message is still queued, it shall be de-queued and destroyed. ] */ if (singlylinkedlist_find(uws_client->pending_sends, find_list_node, new_pending_send_list_item) != NULL) { // Guards against double free in case the underlying I/O invoked 'on_underlying_io_send_complete' within xio_send. (void)singlylinkedlist_remove(uws_client->pending_sends, new_pending_send_list_item); free(ws_pending_send); } result = __FAILURE__; } else { /* Codes_SRS_UWS_CLIENT_01_042: [ On success, `uws_client_send_frame_async` shall return 0. ]*/ result = 0; } } BUFFER_delete(non_control_frame_buffer); } } } return result; } void uws_client_dowork(UWS_CLIENT_HANDLE uws_client) { if (uws_client == NULL) { /* Codes_SRS_UWS_CLIENT_01_059: [ If the `uws_client` argument is NULL, `uws_client_dowork` shall do nothing. ]*/ LogError("NULL uws handle."); } else { /* Codes_SRS_UWS_CLIENT_01_060: [ If the IO is not yet open, `uws_client_dowork` shall do nothing. ]*/ if (uws_client->uws_state != UWS_STATE_CLOSED) { /* Codes_SRS_UWS_CLIENT_01_430: [ `uws_client_dowork` shall call `xio_dowork` with the IO handle argument set to the underlying IO created in `uws_client_create`. ]*/ xio_dowork(uws_client->underlying_io); } } } int uws_client_set_option(UWS_CLIENT_HANDLE uws_client, const char* option_name, const void* value) { int result; if ( (uws_client == NULL) || (option_name == NULL) ) { /* Codes_SRS_UWS_CLIENT_01_440: [ If any of the arguments `uws_client` or `option_name` is NULL `uws_client_set_option` shall return a non-zero value. ]*/ LogError("invalid parameter (NULL) passed to uws_client_set_option"); result = __FAILURE__; } else { if (strcmp(UWS_CLIENT_OPTIONS, option_name) == 0) { /* Codes_SRS_UWS_CLIENT_01_510: [ If the option name is `uWSClientOptions` then `uws_client_set_option` shall call `OptionHandler_FeedOptions` and pass to it the underlying IO handle and the `value` argument. ]*/ if (OptionHandler_FeedOptions((OPTIONHANDLER_HANDLE)value, uws_client->underlying_io) != OPTIONHANDLER_OK) { /* Codes_SRS_UWS_CLIENT_01_511: [ If `OptionHandler_FeedOptions` fails, `uws_client_set_option` shall fail and return a non-zero value. ]*/ LogError("OptionHandler_FeedOptions failed"); result = __FAILURE__; } else { /* Codes_SRS_UWS_CLIENT_01_442: [ On success, `uws_client_set_option` shall return 0. ]*/ result = 0; } } else { /* Codes_SRS_UWS_CLIENT_01_441: [ Otherwise all options shall be passed as they are to the underlying IO by calling `xio_setoption`. ]*/ if (xio_setoption(uws_client->underlying_io, option_name, value) != 0) { /* Codes_SRS_UWS_CLIENT_01_443: [ If `xio_setoption` fails, `uws_client_set_option` shall fail and return a non-zero value. ]*/ LogError("xio_setoption failed."); result = __FAILURE__; } else { /* Codes_SRS_UWS_CLIENT_01_442: [ On success, `uws_client_set_option` shall return 0. ]*/ result = 0; } } } return result; } static void* uws_client_clone_option(const char* name, const void* value) { void* result; if ( (name == NULL) || (value == NULL) ) { /* Codes_SRS_UWS_CLIENT_01_506: [ If `uws_client_clone_option` is called with NULL `name` or `value` it shall return NULL. ]*/ LogError("invalid argument detected: const char* name=%p, const void* value=%p", name, value); result = NULL; } else { if (strcmp(name, UWS_CLIENT_OPTIONS) == 0) { /* Codes_SRS_UWS_CLIENT_01_507: [ `uws_client_clone_option` called with `name` being `uWSClientOptions` shall return the same value. ]*/ result = (void*)value; } else { /* Codes_SRS_UWS_CLIENT_01_512: [ `uws_client_clone_option` called with any other option name than `uWSClientOptions` shall return NULL. ]*/ LogError("unknown option: %s", name); result = NULL; } } return result; } static void uws_client_destroy_option(const char* name, const void* value) { if ( (name == NULL) || (value == NULL) ) { /* Codes_SRS_UWS_CLIENT_01_509: [ If `uws_client_destroy_option` is called with NULL `name` or `value` it shall do nothing. ]*/ LogError("invalid argument detected: const char* name=%p, const void* value=%p", name, value); } else { if (strcmp(name, UWS_CLIENT_OPTIONS) == 0) { /* Codes_SRS_UWS_CLIENT_01_508: [ `uws_client_destroy_option` called with the option `name` being `uWSClientOptions` shall destroy the value by calling `OptionHandler_Destroy`. ]*/ OptionHandler_Destroy((OPTIONHANDLER_HANDLE)value); } else { /* Codes_SRS_UWS_CLIENT_01_513: [ If `uws_client_destroy_option` is called with any other `name` it shall do nothing. ]*/ LogError("unknown option: %s", name); } } } OPTIONHANDLER_HANDLE uws_client_retrieve_options(UWS_CLIENT_HANDLE uws_client) { OPTIONHANDLER_HANDLE result; if (uws_client == NULL) { /* Codes_SRS_UWS_CLIENT_01_444: [ If parameter `uws_client` is `NULL` then `uws_client_retrieve_options` shall fail and return NULL. ]*/ LogError("NULL uws handle."); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_445: [ `uws_client_retrieve_options` shall call `OptionHandler_Create` to produce an `OPTIONHANDLER_HANDLE` and on success return the new `OPTIONHANDLER_HANDLE` handle. ]*/ result = OptionHandler_Create(uws_client_clone_option, uws_client_destroy_option, (pfSetOption)uws_client_set_option); if (result == NULL) { /* Codes_SRS_UWS_CLIENT_01_446: [ If `OptionHandler_Create` fails then `uws_client_retrieve_options` shall fail and return NULL. ]*/ LogError("OptionHandler_Create failed"); } else { /* Codes_SRS_UWS_CLIENT_01_502: [ When calling `xio_retrieveoptions` the underlying IO handle shall be passed to it. ]*/ OPTIONHANDLER_HANDLE underlying_io_options = xio_retrieveoptions(uws_client->underlying_io); if (underlying_io_options == NULL) { /* Codes_SRS_UWS_CLIENT_01_503: [ If `xio_retrieveoptions` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ LogError("unable to concrete_io_retrieveoptions"); OptionHandler_Destroy(result); result = NULL; } else { /* Codes_SRS_UWS_CLIENT_01_501: [ `uws_client_retrieve_options` shall add to the option handler one option, whose name shall be `uWSClientOptions` and the value shall be queried by calling `xio_retrieveoptions`. ]*/ /* Codes_SRS_UWS_CLIENT_01_504: [ Adding the option shall be done by calling `OptionHandler_AddOption`. ]*/ if (OptionHandler_AddOption(result, UWS_CLIENT_OPTIONS, underlying_io_options) != OPTIONHANDLER_OK) { /* Codes_SRS_UWS_CLIENT_01_505: [ If `OptionHandler_AddOption` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ LogError("OptionHandler_AddOption failed"); OptionHandler_Destroy(underlying_io_options); OptionHandler_Destroy(result); result = NULL; } } } } return result; } int uws_client_set_request_header(UWS_CLIENT_HANDLE uws_client, const char* name, const char* value) { int result; if (uws_client == NULL || name == NULL || value == NULL) { // Codes_SRS_UWS_CLIENT_09_002: [ If any of the arguments `uws_client` or `name` or `value` is NULL `uws_client_set_request_header` shall fail and return a non-zero value. ] LogError("invalid parameter (uws_client=%p, name=%p, value=%p)", uws_client, name, value); result = __FAILURE__; } // Codes_SRS_UWS_CLIENT_09_003: [ A copy of `name` and `value` shall be stored for later sending in the request message. ] else if (Map_AddOrUpdate(uws_client->request_headers, name, value) != MAP_OK) { // Codes_SRS_UWS_CLIENT_09_004: [ If `name` or `value` fail to be stored the function shall fail and return a non-zero value. ] LogError("Failed adding request header %s", name); result = __FAILURE__; } else { // Codes_SRS_UWS_CLIENT_09_005: [ If no failures occur the function shall return zero. ] result = 0; } return result; } uws_frame_encoder.c000066400000000000000000000264511362133436400337070ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/gb_rand.h" #include "azure_c_shared_utility/uws_frame_encoder.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/uniqueid.h" BUFFER_HANDLE uws_frame_encoder_encode(WS_FRAME_TYPE opcode, const unsigned char* payload, size_t length, bool is_masked, bool is_final, unsigned char reserved) { BUFFER_HANDLE result; if (reserved > 7) { /* Codes_SRS_UWS_FRAME_ENCODER_01_052: [ If `reserved` has any bits set except the lowest 3 then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ LogError("Bad reserved value: 0x%02x", reserved); result = NULL; } else if (opcode > 0x0F) { /* Codes_SRS_UWS_FRAME_ENCODER_01_006: [ If an unknown opcode is received, the receiving endpoint MUST _Fail the WebSocket Connection_. ]*/ LogError("Invalid opcode: 0x%02x", opcode); result = NULL; } else if ((length > 0) && (payload == NULL)) { /* Codes_SRS_UWS_FRAME_ENCODER_01_054: [ If `length` is greater than 0 and payload is NULL, then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ LogError("Invalid arguments: NULL payload and length=%u", (unsigned int)length); result = NULL; } else { size_t needed_bytes = 2; size_t header_bytes; /* Codes_SRS_UWS_FRAME_ENCODER_01_044: [ On success `uws_frame_encoder_encode` shall return a non-NULL handle to the result buffer. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_048: [ The newly created buffer shall be created by calling `BUFFER_new`. ]*/ result = BUFFER_new(); if (result == NULL) { /* Codes_SRS_UWS_FRAME_ENCODER_01_049: [ If `BUFFER_new` fails then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ LogError("Cannot create new buffer"); } else { /* Codes_SRS_UWS_FRAME_ENCODER_01_001: [ `uws_frame_encoder_encode` shall encode the information given in `opcode`, `payload`, `length`, `is_masked`, `is_final` and `reserved` according to the RFC6455 into a new buffer.]*/ if (length > 65535) { needed_bytes += 8; } else if (length > 125) { needed_bytes += 2; } if (is_masked) { needed_bytes += 4; } header_bytes = needed_bytes; needed_bytes += length; /* Codes_SRS_UWS_FRAME_ENCODER_01_046: [ The result buffer shall be resized accordingly using `BUFFER_enlarge`. ]*/ if (BUFFER_enlarge(result, needed_bytes) != 0) { /* Codes_SRS_UWS_FRAME_ENCODER_01_047: [ If `BUFFER_enlarge` fails then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ LogError("Cannot allocate memory for encoded frame"); BUFFER_delete(result); result = NULL; } else { /* Codes_SRS_UWS_FRAME_ENCODER_01_050: [ The allocated memory shall be accessed by calling `BUFFER_u_char`. ]*/ unsigned char* buffer = BUFFER_u_char(result); if (buffer == NULL) { /* Codes_SRS_UWS_FRAME_ENCODER_01_051: [ If `BUFFER_u_char` fails then `uws_frame_encoder_encode` shall fail and return a NULL. ]*/ LogError("Cannot get encoded buffer pointer"); BUFFER_delete(result); result = NULL; } else { /* Codes_SRS_UWS_FRAME_ENCODER_01_007: [ * %x0 denotes a continuation frame ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_008: [ * %x1 denotes a text frame ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_009: [ * %x2 denotes a binary frame ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_010: [ * %x3-7 are reserved for further non-control frames ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_011: [ * %x8 denotes a connection close ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_012: [ * %x9 denotes a ping ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_013: [ * %xA denotes a pong ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_014: [ * %xB-F are reserved for further control frames ]*/ buffer[0] = (unsigned char)opcode; /* Codes_SRS_UWS_FRAME_ENCODER_01_002: [ Indicates that this is the final fragment in a message. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_003: [ The first fragment MAY also be the final fragment. ]*/ if (is_final) { buffer[0] |= 0x80; } /* Codes_SRS_UWS_FRAME_ENCODER_01_004: [ MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. ]*/ buffer[0] |= reserved << 4; /* Codes_SRS_UWS_FRAME_ENCODER_01_022: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_018: [ The length of the "Payload data", in bytes: ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_023: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_042: [ The payload length, indicated in the framing as frame-payload-length, does NOT include the length of the masking key. ]*/ if (length > 65535) { /* Codes_SRS_UWS_FRAME_ENCODER_01_020: [ If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. ]*/ buffer[1] = 127; /* Codes_SRS_UWS_FRAME_ENCODER_01_021: [ Multibyte length quantities are expressed in network byte order. ]*/ buffer[2] = (unsigned char)((uint64_t)length >> 56) & 0xFF; buffer[3] = (unsigned char)((uint64_t)length >> 48) & 0xFF; buffer[4] = (unsigned char)((uint64_t)length >> 40) & 0xFF; buffer[5] = (unsigned char)((uint64_t)length >> 32) & 0xFF; buffer[6] = (unsigned char)((uint64_t)length >> 24) & 0xFF; buffer[7] = (unsigned char)((uint64_t)length >> 16) & 0xFF; buffer[8] = (unsigned char)((uint64_t)length >> 8) & 0xFF; buffer[9] = (unsigned char)(length & 0xFF); } else if (length > 125) { /* Codes_SRS_UWS_FRAME_ENCODER_01_019: [ If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. ]*/ buffer[1] = 126; /* Codes_SRS_UWS_FRAME_ENCODER_01_021: [ Multibyte length quantities are expressed in network byte order. ]*/ buffer[2] = (unsigned char)(length >> 8); buffer[3] = (unsigned char)(length & 0xFF); } else { /* Codes_SRS_UWS_FRAME_ENCODER_01_043: [ if 0-125, that is the payload length. ]*/ buffer[1] = (unsigned char)length; } if (is_masked) { /* Codes_SRS_UWS_FRAME_ENCODER_01_015: [ Defines whether the "Payload data" is masked. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_033: [ A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. ]*/ buffer[1] |= 0x80; /* Codes_SRS_UWS_FRAME_ENCODER_01_053: [ In order to obtain a 32 bit value for masking, `gb_rand` shall be used 4 times (for each byte). ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_016: [ If set to 1, a masking key is present in masking-key, and this is used to unmask the "Payload data" as per Section 5.3. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_026: [ This field is present if the mask bit is set to 1 and is absent if the mask bit is set to 0. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_034: [ The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_036: [ The masking key is a 32-bit value chosen at random by the client. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_037: [ When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_038: [ The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. ]*/ buffer[header_bytes - 4] = (unsigned char)gb_rand(); buffer[header_bytes - 3] = (unsigned char)gb_rand(); buffer[header_bytes - 2] = (unsigned char)gb_rand(); buffer[header_bytes - 1] = (unsigned char)gb_rand(); } if (length > 0) { if (is_masked) { size_t i; /* Codes_SRS_UWS_FRAME_ENCODER_01_035: [ It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_039: [ To convert masked data into unmasked data, or vice versa, the following algorithm is applied. ]*/ /* Codes_SRS_UWS_FRAME_ENCODER_01_040: [ The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. ]*/ for (i = 0; i < length; i++) { /* Codes_SRS_UWS_FRAME_ENCODER_01_041: [ Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): ]*/ buffer[header_bytes + i] = ((unsigned char*)payload)[i] ^ buffer[header_bytes - 4 + (i % 4)]; } } else { (void)memcpy(buffer + header_bytes, payload, length); } } } } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/vector.c000066400000000000000000000266141362133436400316020ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/vector.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/vector_types_internal.h" VECTOR_HANDLE VECTOR_create(size_t elementSize) { VECTOR_HANDLE result; /* Codes_SRS_VECTOR_10_002: [VECTOR_create shall fail and return NULL if elementsize is 0.] */ if (elementSize == 0) { LogError("invalid elementSize(%zd).", elementSize); result = NULL; } else { result = (VECTOR*)malloc(sizeof(VECTOR)); /* Codes_SRS_VECTOR_10_002 : [VECTOR_create shall fail and return NULL if malloc fails.] */ if (result == NULL) { LogError("malloc failed."); } else { /* Codes_SRS_VECTOR_10_001: [VECTOR_create shall allocate a VECTOR_HANDLE that will contain an empty vector.The size of each element is given with the parameter elementSize.] */ result->storage = NULL; result->count = 0; result->elementSize = elementSize; } } return result; } void VECTOR_destroy(VECTOR_HANDLE handle) { /* Codes_SRS_VECTOR_10_009: [VECTOR_destroy shall return if the given handle is NULL.] */ if (handle == NULL) { LogError("invalid argument handle(NULL)."); } else { /* Codes_SRS_VECTOR_10_008: [VECTOR_destroy shall free the given handle and its internal storage.] */ free(handle->storage); free(handle); } } VECTOR_HANDLE VECTOR_move(VECTOR_HANDLE handle) { VECTOR_HANDLE result; if (handle == NULL) { /* Codes_SRS_VECTOR_10_005: [VECTOR_move shall fail and return NULL if the given handle is NULL.] */ LogError("invalid argument - handle(NULL)."); result = NULL; } else { result = (VECTOR*)malloc(sizeof(VECTOR)); if (result == NULL) { /* Codes_SRS_VECTOR_10_006: [VECTOR_move shall fail and return NULL if malloc fails.] */ LogError("malloc failed."); } else { /* Codes_SRS_VECTOR_10_004: [VECTOR_move shall allocate a VECTOR_HANDLE and move the data to it from the given handle.] */ result->count = handle->count; result->elementSize = handle->elementSize; result->storage = handle->storage; handle->storage = NULL; handle->count = 0; } } return result; } /* insertion */ int VECTOR_push_back(VECTOR_HANDLE handle, const void* elements, size_t numElements) { int result; if (handle == NULL || elements == NULL || numElements == 0) { /* Codes_SRS_VECTOR_10_011: [VECTOR_push_back shall fail and return non-zero if `handle` is NULL.] */ /* Codes_SRS_VECTOR_10_034: [VECTOR_push_back shall fail and return non-zero if `elements` is NULL.] */ /* Codes_SRS_VECTOR_10_035: [VECTOR_push_back shall fail and return non-zero if `numElements` is 0.] */ LogError("invalid argument - handle(%p), elements(%p), numElements(%zd).", handle, elements, numElements); result = __FAILURE__; } else { size_t curSize = handle->elementSize * handle->count; size_t appendSize = handle->elementSize * numElements; void* temp = realloc(handle->storage, curSize + appendSize); if (temp == NULL) { /* Codes_SRS_VECTOR_10_012: [VECTOR_push_back shall fail and return non-zero if memory allocation fails.] */ LogError("realloc failed."); result = __FAILURE__; } else { /* Codes_SRS_VECTOR_10_013: [VECTOR_push_back shall append the given elements and return 0 indicating success.] */ (void)memcpy((unsigned char*)temp + curSize, elements, appendSize); handle->storage = temp; handle->count += numElements; result = 0; } } return result; } /* removal */ void VECTOR_erase(VECTOR_HANDLE handle, void* elements, size_t numElements) { if (handle == NULL || elements == NULL || numElements == 0) { /* Codes_SRS_VECTOR_10_015: [VECTOR_erase shall return if `handle` is NULL.] */ /* Codes_SRS_VECTOR_10_038: [VECTOR_erase shall return if `elements` is NULL.] */ /* Codes_SRS_VECTOR_10_039: [VECTOR_erase shall return if `numElements` is 0.] */ LogError("invalid argument - handle(%p), elements(%p), numElements(%zd).", handle, elements, numElements); } else { if (elements < handle->storage) { /* Codes_SRS_VECTOR_10_040: [VECTOR_erase shall return if `elements` is out of bound.] */ LogError("invalid argument elements(%p) is not a member of this object.", elements); } else { ptrdiff_t diff = ((unsigned char*)elements) - ((unsigned char*)handle->storage); if ((diff % handle->elementSize) != 0) { /* Codes_SRS_VECTOR_10_041: [VECTOR_erase shall return if elements is misaligned.] */ LogError("invalid argument - elements(%p) is misaligned", elements); } else { /* Compute the arguments needed for memmove. */ unsigned char* src = (unsigned char*)elements + (handle->elementSize * numElements); unsigned char* srcEnd = (unsigned char*)handle->storage + (handle->elementSize * handle->count); if (src > srcEnd) { /* Codes_SRS_VECTOR_10_040: [VECTOR_erase shall return if `elements` is out of bound.] */ LogError("invalid argument - numElements(%zd) is out of bound.", numElements); } else { /* Codes_SRS_VECTOR_10_014: [VECTOR_erase shall remove the 'numElements' starting at 'elements' and reduce its internal storage.] */ handle->count -= numElements; if (handle->count == 0) { free(handle->storage); handle->storage = NULL; } else { void* tmp; (void)memmove(elements, src, srcEnd - src); tmp = realloc(handle->storage, (handle->elementSize * handle->count)); if (tmp == NULL) { LogInfo("realloc failed. Keeping original internal storage pointer."); } else { handle->storage = tmp; } } } } } } } void VECTOR_clear(VECTOR_HANDLE handle) { /* Codes_SRS_VECTOR_10_017: [VECTOR_clear shall if the object is NULL or empty.] */ if (handle == NULL) { LogError("invalid argument handle(NULL)."); } else { /* Codes_SRS_VECTOR_10_016: [VECTOR_clear shall remove all elements from the object and release internal storage.] */ free(handle->storage); handle->storage = NULL; handle->count = 0; } } /* access */ void* VECTOR_element(VECTOR_HANDLE handle, size_t index) { void* result; if (handle == NULL) { /* Codes_SRS_VECTOR_10_019: [VECTOR_element shall fail and return NULL if handle is NULL.] */ LogError("invalid argument handle(NULL)."); result = NULL; } else { if (index >= handle->count) { /* Codes_SRS_VECTOR_10_020: [VECTOR_element shall fail and return NULL if the given index is out of range.] */ LogError("invalid argument - index(%zd); should be >= 0 and < %zd.", index, handle->count); result = NULL; } else { /* Codes_SRS_VECTOR_10_018: [VECTOR_element shall return the element at the given index.] */ result = (unsigned char*)handle->storage + (handle->elementSize * index); } } return result; } void* VECTOR_front(VECTOR_HANDLE handle) { void* result; if (handle == NULL) { /* Codes_SRS_VECTOR_10_022: [VECTOR_front shall fail and return NULL if handle is NULL.] */ LogError("invalid argument handle (NULL)."); result = NULL; } else { if (handle->count == 0) { /* Codes_SRS_VECTOR_10_028: [VECTOR_front shall return NULL if the vector is empty.] */ LogError("vector is empty."); result = NULL; } else { /* Codes_SRS_VECTOR_10_021: [VECTOR_front shall return a pointer to the element at index 0.] */ result = handle->storage; } } return result; } void* VECTOR_back(VECTOR_HANDLE handle) { void* result; if (handle == NULL) { /* Codes_SRS_VECTOR_10_024: [VECTOR_back shall fail and return NULL if handle is NULL.] */ LogError("invalid argument handle (NULL)."); result = NULL; } else { if (handle->count == 0) { /* Codes_SRS_VECTOR_10_029: [VECTOR_back shall return NULL if the vector is empty.] */ LogError("vector is empty."); result = NULL; } else { /* Codes_SRS_VECTOR_10_023: [VECTOR_front shall return the last element of the vector.] */ result = (unsigned char*)handle->storage + (handle->elementSize * (handle->count - 1)); } } return result; } void* VECTOR_find_if(VECTOR_HANDLE handle, PREDICATE_FUNCTION pred, const void* value) { void* result; if (handle == NULL || pred == NULL) { /* Codes_SRS_VECTOR_10_030: [VECTOR_find_if shall fail and return NULL if `handle` is NULL.] */ /* Codes_SRS_VECTOR_10_036: [VECTOR_find_if shall fail and return NULL if `pred` is NULL.] */ LogError("invalid argument - handle(%p), pred(%p)", handle, pred); result = NULL; } else { size_t i; for (i = 0; i < handle->count; ++i) { if (true == pred((unsigned char*)handle->storage + (handle->elementSize * i), value)) { /* Codes_SRS_VECTOR_10_031: [VECTOR_find_if shall return the first element in the vector that matches `pred`.] */ break; } } if (i == handle->count) { /* Codes_SRS_VECTOR_10_032: [VECTOR_find_if shall return NULL if no matching element is found.] */ result = NULL; } else { /* Codes_SRS_VECTOR_10_031: [VECTOR_find_if shall return the first element in the vector that matches `pred`.]*/ result = (unsigned char*)handle->storage + (handle->elementSize * i); } } return result; } /* capacity */ size_t VECTOR_size(VECTOR_HANDLE handle) { size_t result; if (handle == NULL) { /* Codes_SRS_VECTOR_10_026: [**VECTOR_size shall return 0 if the given handle is NULL.] */ LogError("invalid argument handle(NULL)."); result = 0; } else { /* Codes_SRS_VECTOR_10_025: [VECTOR_size shall return the number of elements stored with the given handle.] */ result = handle->count; } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/ws_url.c000066400000000000000000000336661362133436400316200ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/ws_url.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/string_token.h" #define WS_PROTOCOL "ws://" #define WSS_PROTOCOL "wss://" #define MIN_URL_PARSABLE_LENGTH 7 typedef struct WS_URL_TAG { char* url; bool is_secure; const char* host; size_t host_length; size_t port; const char* path; size_t path_length; const char* query; size_t query_length; } WS_URL; static int parse_ws_url(const char* url, WS_URL* ws_url) { int result = 0; size_t url_length = strlen(url); if (url_length < MIN_URL_PARSABLE_LENGTH) { LogError("Invalid url (unexpected length)"); result = __FAILURE__; } // Codes_SRS_WS_URL_09_004: [ If `url` starts with "ws://" (`protocol`), `ws_url->is_secure` shall be set to false ] if (strncmp(url, WS_PROTOCOL, 5) == 0) { ws_url->is_secure = false; } // Codes_SRS_WS_URL_09_005: [ If `url` starts with "wss://" (`protocol`), `ws_url->is_secure` shall be set to true ] else if (strncmp(url, WSS_PROTOCOL, 6) == 0) { ws_url->is_secure = true; } else { // Codes_SRS_WS_URL_09_024: [ If `protocol` cannot be identified in `url`, the function shall fail and return NULL ] LogError("Url protocol prefix not recognized"); result = __FAILURE__; } if (result == 0) { size_t host_begin; const char* port_delimiter = ":"; const char* path_delimiter = "/"; const char* query_delimiter = "?"; const char* delimiters1[3]; const char* delimiters2[1]; size_t delimiter_count = 3; const char** current_delimiters = delimiters1; const char* previous_delimiter = NULL; bool host_parsed = false; bool port_parsed = false; bool path_parsed = false; bool query_parsed = false; STRING_TOKEN_HANDLE token; delimiters1[0] = port_delimiter; delimiters1[1] = path_delimiter; delimiters1[2] = query_delimiter; delimiters2[0] = query_delimiter; host_begin = (ws_url->is_secure ? 6 : 5); token = StringToken_GetFirst(url + host_begin, url_length - host_begin, current_delimiters, delimiter_count); if (token == NULL) { LogError("Failed getting first url token"); result = __FAILURE__; } else { do { const char* current_delimiter = (char*)StringToken_GetDelimiter(token); if (previous_delimiter == NULL && !host_parsed && !port_parsed && !path_parsed && !query_parsed) { // Codes_SRS_WS_URL_09_006: [ The pointer to the token starting right after `protocol` (in the `url` string) shall be stored in `ws_url->host` ] ws_url->host = (char*)StringToken_GetValue(token); // Codes_SRS_WS_URL_09_008: [ The length from `ws_url->host` up to the first occurrence of either ":" (`port_delimiter`), "/" (`path_delimiter`), "?" (`query_delimiter`) or `\0` shall be stored in `ws_url->host_length` ] ws_url->host_length = StringToken_GetLength(token); // Codes_SRS_WS_URL_09_007: [ If `ws_url->host` ends up being NULL, the function shall fail and return NULL ] // Codes_SRS_WS_URL_09_009: [ If `ws_url->host_length` ends up being zero, the function shall fail and return NULL ] if (ws_url->host == NULL || ws_url->host_length == 0) { LogError("Failed parsing websocket url host"); result = __FAILURE__; break; } else { host_parsed = true; } } // Codes_SRS_WS_URL_09_010: [ If after `ws_url->host` the `port_delimiter` occurs (not preceeded by `path_delimiter` or `query_delimiter`) the number that follows shall be parsed and stored in `ws_url->port` ] else if (previous_delimiter == port_delimiter && host_parsed && !port_parsed && !path_parsed && !query_parsed) { const char* port = StringToken_GetValue(token); size_t port_length = StringToken_GetLength(token); // Codes_SRS_WS_URL_09_011: [ If the port number fails to be parsed, the function shall fail and return NULL ] if (port == NULL || port_length == 0) { LogError("Failed parsing websocket url port"); result = __FAILURE__; break; } else { char port_copy[10]; (void)memset(port_copy, 0, sizeof(char) * 10); (void)memcpy(port_copy, port, port_length); ws_url->port = (size_t)atoi(port_copy); port_parsed = true; } } // Codes_SRS_WS_URL_09_012: [ If after `ws_url->host` or the port number the `path_delimiter` occurs (not preceeded by `query_delimiter`) the following pointer address shall be stored in `ws_url->path` ] else if (previous_delimiter == path_delimiter && host_parsed && !path_parsed && !query_parsed) { ws_url->path = (char*)StringToken_GetValue(token); // Codes_SRS_WS_URL_09_014: [ The length from `ws_url->path` up to the first occurrence of either `query_delimiter` or `\0` shall be stored in `ws_url->path_length` ] ws_url->path_length = StringToken_GetLength(token); // Codes_SRS_WS_URL_09_013: [ If the path component is present and `ws_url->path` ends up being NULL, the function shall fail and return NULL ] // Codes_SRS_WS_URL_09_015: [ If the path component is present and `ws_url->path_length` ends up being zero, the function shall fail and return NULL ] if (ws_url->path == NULL || ws_url->path_length == 0) { LogError("Failed parsing websocket url path"); result = __FAILURE__; break; } else { path_parsed = true; } } // Codes_SRS_WS_URL_09_016: [ Next if the `query_delimiter` occurs the following pointer address shall be stored in `ws_url->query` ] else if (previous_delimiter == query_delimiter && current_delimiter == NULL && host_parsed && !query_parsed) { ws_url->query = (char*)StringToken_GetValue(token); // Codes_SRS_WS_URL_09_018: [ The length from `ws_url->query` up to `\0` shall be stored in `ws_url->query_length` ] ws_url->query_length = StringToken_GetLength(token); // Codes_SRS_WS_URL_09_017: [ If the query component is present and `ws_url->query` ends up being NULL, the function shall fail and return NULL ] // Codes_SRS_WS_URL_09_019: [ If the query component is present and `ws_url->query_length` ends up being zero, the function shall fail and return NULL ] if (ws_url->query == NULL || ws_url->query_length == 0) { LogError("Failed parsing websocket url query"); result = __FAILURE__; break; } else { query_parsed = true; } } else { LogError("Failed parsing websocket url (format not recognized)"); result = __FAILURE__; break; } if (current_delimiter == path_delimiter) { current_delimiters = delimiters2; delimiter_count = 1; } previous_delimiter = current_delimiter; } while (StringToken_GetNext(token, current_delimiters, delimiter_count)); StringToken_Destroy(token); } } return result; } void ws_url_destroy(WS_URL_HANDLE url) { // Codes_SRS_WS_URL_09_022: [ If `url` is NULL, the function shall return without further action ] if (url != NULL) { // Codes_SRS_WS_URL_09_023: [ Otherwise, the memory allocated for `url` shall released ] free(url->url); free(url); } } WS_URL_HANDLE ws_url_create(const char* url) { WS_URL* result; // Codes_SRS_WS_URL_09_001: [ If `url` is NULL the function shall fail and return NULL ] if (url == NULL) { LogError("Invalid argument (url is NULL)"); result = NULL; } // Codes_SRS_WS_URL_09_002: [ Memory shall be allocated for an instance of WS_URL (aka `ws_url`) ] else if ((result = malloc(sizeof(WS_URL))) == NULL) { // Codes_SRS_WS_URL_09_003: [ If `ws_url` failed to be allocated, the function shall return NULL ] LogError("Failed to allocate the websockets url"); } else { memset(result, 0, sizeof(WS_URL)); // Codes_SRS_WS_URL_09_024: [ `url` shall be copied into `ws_url->url` ] if (mallocAndStrcpy_s(&result->url, url) != 0) { // Codes_SRS_WS_URL_09_025: [ If `url` fails to be copied, the function shall free `ws_url` and return NULL ] LogError("Failed copying the source url"); ws_url_destroy(result); result = NULL; } else if (parse_ws_url(result->url, result) != 0) { // Codes_SRS_WS_URL_09_020: [ If any component cannot be parsed or is out of order, the function shall fail and return NULL ] // Codes_SRS_WS_URL_09_021: [ If any failure occurs, all memory allocated by the function shall be released before returning ] LogError("Failed parsing the websockets url"); ws_url_destroy(result); result = NULL; } } return result; } int ws_url_is_secure(WS_URL_HANDLE url, bool* is_secure) { int result; // Codes_SRS_WS_URL_09_026: [ If `url` is NULL, the function shall return a non-zero value (failure) ] if (url == NULL || is_secure == NULL) { LogError("Invalid argument (url=%p, is_secure=%p)", url, is_secure); result = __FAILURE__; } else { // Codes_SRS_WS_URL_09_027: [ Otherwize the function shall set `is_secure` as `url->is_secure` ] *is_secure = url->is_secure; // Codes_SRS_WS_URL_09_028: [ If no errors occur function shall return zero (success) ] result = 0; } return result; } int ws_url_get_host(WS_URL_HANDLE url, const char** host, size_t* length) { int result; // Codes_SRS_WS_URL_09_029: [ If `url` or `host` or `length` are NULL, the function shall return a non-zero value (failure) ] if (url == NULL || host == NULL || length == NULL) { LogError("Invalid argument (url=%p, host=%p, length=%p)", url, host, length); result = __FAILURE__; } else { // Codes_SRS_WS_URL_09_030: [ Otherwize the function shall set `host` to `url->host` and `length` to `url->host_length` ] *host = url->host; *length = url->host_length; // Codes_SRS_WS_URL_09_031: [ If no errors occur function shall return zero (success) ] result = 0; } return result; } int ws_url_get_port(WS_URL_HANDLE url, size_t* port) { int result; // Codes_SRS_WS_URL_09_038: [ If `url` or `port` are NULL, the function shall return a non-zero value (failure) ] if (url == NULL || port == NULL) { LogError("Invalid argument (url=%p, port=%p)", url, port); result = __FAILURE__; } else { // Codes_SRS_WS_URL_09_039: [ Otherwize the function shall set `port` as `url->port` ] *port = url->port; // Codes_SRS_WS_URL_09_040: [ If no errors occur function shall return zero (success) ] result = 0; } return result; } int ws_url_get_path(WS_URL_HANDLE url, const char** path, size_t* length) { int result; // Codes_SRS_WS_URL_09_032: [ If `url` or `path` or `length` are NULL, the function shall return a non-zero value (failure) ] if (url == NULL || path == NULL || length == NULL) { LogError("Invalid argument (url=%p, path=%p, length=%p)", url, path, length); result = __FAILURE__; } else { // Codes_SRS_WS_URL_09_033: [ Otherwize the function shall set `path` to `url->path` and `length` to `url->path_length` ] *path = url->path; *length = url->path_length; // Codes_SRS_WS_URL_09_034: [ If no errors occur function shall return zero (success) ] result = 0; } return result; } int ws_url_get_query(WS_URL_HANDLE url, const char** query, size_t* length) { int result; // Codes_SRS_WS_URL_09_035: [ If `url` or `query` or `length` are NULL, the function shall return a non-zero value (failure) ] if (url == NULL || query == NULL || length == NULL) { LogError("Invalid argument (url=%p, query=%p, length=%p)", url, query, length); result = __FAILURE__; } else { // Codes_SRS_WS_URL_09_036: [ Otherwize the function shall set `query` to `url->query` and `length` to `url->query_length` ] *query = url->query; *length = url->query_length; // Codes_SRS_WS_URL_09_037: [ If no errors occur function shall return zero (success) ] result = 0; } return result; }azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/wsio.c000066400000000000000000001102111362133436400312440ustar00rootroot00000000000000 // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/wsio.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/uws_client.h" #include "azure_c_shared_utility/optimize_size.h" static const char* WSIO_OPTIONS = "WSIOOptions"; typedef enum IO_STATE_TAG { IO_STATE_NOT_OPEN, IO_STATE_OPENING, IO_STATE_OPEN, IO_STATE_CLOSING, IO_STATE_ERROR } IO_STATE; typedef struct PENDING_IO_TAG { ON_SEND_COMPLETE on_send_complete; void* callback_context; void* wsio; } PENDING_IO; typedef struct WSIO_INSTANCE_TAG { ON_BYTES_RECEIVED on_bytes_received; void* on_bytes_received_context; ON_IO_OPEN_COMPLETE on_io_open_complete; void* on_io_open_complete_context; ON_IO_ERROR on_io_error; void* on_io_error_context; ON_IO_CLOSE_COMPLETE on_io_close_complete; void* on_io_close_complete_context; IO_STATE io_state; SINGLYLINKEDLIST_HANDLE pending_io_list; UWS_CLIENT_HANDLE uws; } WSIO_INSTANCE; static void indicate_error(WSIO_INSTANCE* wsio_instance) { wsio_instance->io_state = IO_STATE_ERROR; wsio_instance->on_io_error(wsio_instance->on_io_error_context); } static void indicate_open_complete(WSIO_INSTANCE* ws_io_instance, IO_OPEN_RESULT open_result) { ws_io_instance->on_io_open_complete(ws_io_instance->on_io_open_complete_context, open_result); } static void complete_send_item(LIST_ITEM_HANDLE pending_io_list_item, IO_SEND_RESULT io_send_result) { PENDING_IO* pending_io = (PENDING_IO*)singlylinkedlist_item_get_value(pending_io_list_item); WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)pending_io->wsio; /* Codes_SRS_WSIO_01_145: [ Removing it from the list shall be done by calling `singlylinkedlist_remove`. ]*/ if (singlylinkedlist_remove(wsio_instance->pending_io_list, pending_io_list_item) != 0) { LogError("Failed removing pending IO from linked list."); } /* Codes_SRS_WSIO_01_105: [ The argument `on_send_complete` shall be optional, if NULL is passed by the caller then no send complete callback shall be triggered. ]*/ if (pending_io->on_send_complete != NULL) { pending_io->on_send_complete(pending_io->callback_context, io_send_result); } /* Codes_SRS_WSIO_01_144: [ Also the pending IO data shall be freed. ]*/ free(pending_io); } static void on_underlying_ws_send_frame_complete(void* context, WS_SEND_FRAME_RESULT ws_send_frame_result) { if (context == NULL) { LogError("NULL context for on_underlying_ws_send_frame_complete"); } else { IO_SEND_RESULT io_send_result; LIST_ITEM_HANDLE list_item_handle = (LIST_ITEM_HANDLE)context; /* Codes_SRS_WSIO_01_143: [ When `on_underlying_ws_send_frame_complete` is called after sending a WebSocket frame, the pending IO shall be removed from the list. ]*/ switch (ws_send_frame_result) { default: /* Codes_SRS_WSIO_01_148: [ When `on_underlying_ws_send_frame_complete` is called with any other error code, the callback `on_send_complete` shall be called with `IO_SEND_ERROR`. ]*/ LogError("Frame send error with result %d", (int)ws_send_frame_result); io_send_result = IO_SEND_ERROR; break; case WS_SEND_FRAME_OK: /* Codes_SRS_WSIO_01_146: [ When `on_underlying_ws_send_frame_complete` is called with `WS_SEND_OK`, the callback `on_send_complete` shall be called with `IO_SEND_OK`. ]*/ io_send_result = IO_SEND_OK; break; case WS_SEND_FRAME_CANCELLED: /* Codes_SRS_WSIO_01_147: [ When `on_underlying_ws_send_frame_complete` is called with `WS_SEND_CANCELLED`, the callback `on_send_complete` shall be called with `IO_SEND_CANCELLED`. ]*/ io_send_result = IO_SEND_CANCELLED; break; } complete_send_item(list_item_handle, io_send_result); } } static void on_underlying_ws_close_complete(void* context) { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)context; if (wsio_instance == NULL) { /* Codes_SRS_WSIO_01_161: [ If the context passed to `on_underlying_ws_close_complete` is NULL, `on_underlying_ws_close_complete` shall do nothing. ]*/ LogError("NULL context passed to on_underlying_ws_close_complete"); } else { wsio_instance->io_state = IO_STATE_NOT_OPEN; /* Codes_SRS_WSIO_01_160: [ If NULL was passed to `wsio_close` no callback shall be called. ]*/ if (wsio_instance->on_io_close_complete != NULL) { /* Codes_SRS_WSIO_01_159: [ When `on_underlying_ws_close_complete` while the IO is closing (after `wsio_close`), the close shall be indicated up by calling the `on_io_close_complete` callback passed to `wsio_close`. ]*/ /* Codes_SRS_WSIO_01_163: [ When `on_io_close_complete` is called, the context passed to `wsio_close` shall be passed as argument to `on_io_close_complete`. ]*/ wsio_instance->on_io_close_complete(wsio_instance->on_io_close_complete_context); } } } static int internal_close(WSIO_INSTANCE* wsio_instance, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) { int result; /* Codes_SRS_WSIO_01_089: [ `wsio_close` after a `wsio_close` shall fail and return a non-zero value. ]*/ /* Codes_SRS_WSIO_01_088: [ `wsio_close` when no open action has been issued shall fail and return a non-zero value. ]*/ if (wsio_instance->io_state == IO_STATE_NOT_OPEN) { LogError("wsio_close when not open."); result = __FAILURE__; } else { if (wsio_instance->io_state == IO_STATE_OPENING) { wsio_instance->io_state = IO_STATE_NOT_OPEN; indicate_open_complete(wsio_instance, IO_OPEN_CANCELLED); result = 0; } else if (wsio_instance->io_state == IO_STATE_CLOSING) { LogError("Already closing"); result = __FAILURE__; } else { LIST_ITEM_HANDLE first_pending_io; wsio_instance->io_state = IO_STATE_CLOSING; wsio_instance->on_io_close_complete = on_io_close_complete; wsio_instance->on_io_close_complete_context = on_io_close_complete_context; /* Codes_SRS_WSIO_01_087: [ `wsio_close` shall call `uws_client_close_async` while passing as argument the IO handle created in `wsio_create`. ]*/ if (uws_client_close_async(wsio_instance->uws, on_underlying_ws_close_complete, wsio_instance) != 0) { /* Codes_SRS_WSIO_01_164: [ When uws_client_close_async fails, wsio_close shall call the on_io_close_complete callback and continue. ] */ if (wsio_instance->on_io_close_complete != NULL) { wsio_instance->on_io_close_complete(wsio_instance->on_io_close_complete_context); } } /* Codes_SRS_WSIO_01_085: [ `wsio_close` shall close the websockets IO if an open action is either pending or has completed successfully (if the IO is open). ]*/ /* Codes_SRS_WSIO_01_091: [ `wsio_close` shall obtain all the pending IO items by repetitively querying for the head of the pending IO list and freeing that head item. ]*/ /* Codes_SRS_WSIO_01_092: [ Obtaining the head of the pending IO list shall be done by calling `singlylinkedlist_get_head_item`. ]*/ while ((first_pending_io = singlylinkedlist_get_head_item(wsio_instance->pending_io_list)) != NULL) { complete_send_item(first_pending_io, IO_SEND_CANCELLED); } /* Codes_SRS_WSIO_01_133: [ On success `wsio_close` shall return 0. ]*/ result = 0; wsio_instance->io_state = IO_STATE_NOT_OPEN; } } return result; } CONCRETE_IO_HANDLE wsio_create(void* io_create_parameters) { /* Codes_SRS_WSIO_01_066: [ `io_create_parameters` shall be used as a `WSIO_CONFIG*` . ]*/ WSIO_CONFIG* ws_io_config = (WSIO_CONFIG*)io_create_parameters; WSIO_INSTANCE* result; /* Codes_SRS_WSIO_01_065: [ If the argument `io_create_parameters` is NULL then `wsio_create` shall return NULL. ]*/ if ((ws_io_config == NULL) || /* Codes_SRS_WSIO_01_067: [ If any of the members `hostname`, `resource_name` or `protocol` is NULL in `WSIO_CONFIG` then `wsio_create` shall return NULL. ]*/ (ws_io_config->hostname == NULL) || (ws_io_config->resource_name == NULL) || (ws_io_config->protocol == NULL)) { LogError("NULL io_create_parameters."); result = NULL; } else { /* Codes_SRS_WSIO_01_001: [`wsio_create` shall create an instance of wsio and return a non-NULL handle to it.] */ result = (WSIO_INSTANCE*)malloc(sizeof(WSIO_INSTANCE)); if (result == NULL) { /* Codes_SRS_WSIO_01_068: [ If allocating memory for the new wsio instance fails then `wsio_create` shall return NULL. ]*/ LogError("Cannot allocate memory for the new WSIO instance."); } else { WS_PROTOCOL protocols; protocols.protocol = ws_io_config->protocol; result->on_bytes_received = NULL; result->on_bytes_received_context = NULL; result->on_io_open_complete = NULL; result->on_io_open_complete_context = NULL; result->on_io_error = NULL; result->on_io_error_context = NULL; result->on_io_close_complete = NULL; result->on_io_close_complete_context = NULL; /* Codes_SRS_WSIO_01_070: [ The underlying uws instance shall be created by calling `uws_client_create_with_io`. ]*/ /* Codes_SRS_WSIO_01_071: [ The arguments for `uws_client_create_with_io` shall be: ]*/ /* Codes_SRS_WSIO_01_185: [ - `underlying_io_interface` shall be set to the `underlying_io_interface` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Codes_SRS_WSIO_01_186: [ - `underlying_io_parameters` shall be set to the `underlying_io_parameters` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Codes_SRS_WSIO_01_072: [ - `hostname` set to the `hostname` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Codes_SRS_WSIO_01_130: [ - `port` set to the `port` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Codes_SRS_WSIO_01_128: [ - `resource_name` set to the `resource_name` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Codes_SRS_WSIO_01_129: [ - `protocols` shall be filled with only one structure, that shall have the `protocol` set to the value of the `protocol` field in the `io_create_parameters` passed to `wsio_create`. ]*/ result->uws = uws_client_create_with_io(ws_io_config->underlying_io_interface, ws_io_config->underlying_io_parameters, ws_io_config->hostname, ws_io_config->port, ws_io_config->resource_name, &protocols, 1); if (result->uws == NULL) { /* Codes_SRS_WSIO_01_075: [ If `uws_client_create_with_io` fails, then `wsio_create` shall fail and return NULL. ]*/ LogError("Cannot create uws instance."); free(result); result = NULL; } else { /* Codes_SRS_WSIO_01_076: [ `wsio_create` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. ]*/ result->pending_io_list = singlylinkedlist_create(); if (result->pending_io_list == NULL) { /* Codes_SRS_WSIO_01_077: [ If `singlylinkedlist_create` fails then `wsio_create` shall fail and return NULL. ]*/ LogError("Cannot create singly linked list."); uws_client_destroy(result->uws); free(result); result = NULL; } else { result->io_state = IO_STATE_NOT_OPEN; } } } } return result; } void wsio_destroy(CONCRETE_IO_HANDLE ws_io) { /* Codes_SRS_WSIO_01_079: [ If `ws_io` is NULL, `wsio_destroy` shall do nothing. ]*/ if (ws_io == NULL) { LogError("NULL handle"); } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)ws_io; if (wsio_instance->io_state != IO_STATE_NOT_OPEN) { internal_close(wsio_instance, NULL, NULL); } /* Codes_SRS_WSIO_01_078: [ `wsio_destroy` shall free all resources associated with the wsio instance. ]*/ /* Codes_SRS_WSIO_01_080: [ `wsio_destroy` shall destroy the uws instance created in `wsio_create` by calling `uws_client_destroy`. ]*/ uws_client_destroy(wsio_instance->uws); /* Codes_SRS_WSIO_01_081: [ `wsio_destroy` shall free the list used to track the pending send IOs by calling `singlylinkedlist_destroy`. ]*/ singlylinkedlist_destroy(wsio_instance->pending_io_list); free(ws_io); } } static void on_underlying_ws_open_complete(void* context, WS_OPEN_RESULT open_result) { if (context == NULL) { /* Codes_SRS_WSIO_01_138: [ When `on_underlying_ws_open_complete` is called with a NULL context, it shall do nothing. ]*/ LogError("NULL context in on_underlying_ws_open_complete"); } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)context; switch (wsio_instance->io_state) { default: /* Codes_SRS_WSIO_01_142: [ When `on_underlying_ws_open_complete` is called while in the CLOSING state an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ case IO_STATE_CLOSING: /* Codes_SRS_WSIO_01_141: [ When `on_underlying_ws_open_complete` is called while in the ERROR state it shall indicate an error by calling the `on_io_error` callback passed to `wsio_open`. ]*/ case IO_STATE_ERROR: /* Codes_SRS_WSIO_01_139: [ When `on_underlying_ws_open_complete` is called while in OPEN state it shall indicate an error by calling the `on_io_error` callback passed to `wsio_open` and switch to the ERROR state. ]*/ case IO_STATE_OPEN: /* Codes_SRS_WSIO_01_140: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ indicate_error(wsio_instance); break; case IO_STATE_OPENING: wsio_instance->io_state = IO_STATE_OPEN; switch (open_result) { default: /* Codes_SRS_WSIO_01_137: [ When `on_underlying_ws_open_complete` is called with any other error code while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_ERROR`. ]*/ wsio_instance->io_state = IO_STATE_NOT_OPEN; indicate_open_complete(wsio_instance, IO_OPEN_ERROR); break; case WS_OPEN_CANCELLED: /* Codes_SRS_WSIO_01_149: [ When `on_underlying_ws_open_complete` is called with `WS_OPEN_CANCELLED` while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_CANCELLED`. ]*/ wsio_instance->io_state = IO_STATE_NOT_OPEN; indicate_open_complete(wsio_instance, IO_OPEN_CANCELLED); break; case WS_OPEN_OK: /* Codes_SRS_WSIO_01_136: [ When `on_underlying_ws_open_complete` is called with `WS_OPEN_OK` while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_OK`. ]*/ wsio_instance->io_state = IO_STATE_OPEN; indicate_open_complete(wsio_instance, IO_OPEN_OK); break; } break; } } } static void on_underlying_ws_frame_received(void* context, unsigned char frame_type, const unsigned char* buffer, size_t size) { if (context == NULL) { /* Codes_SRS_WSIO_01_150: [ If `on_underlying_ws_frame_received` is called with NULL context it shall do nothing. ]*/ LogError("NULL context for on_underlying_ws_frame_received"); } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)context; if (wsio_instance->io_state != IO_STATE_OPEN) { /* Codes_SRS_WSIO_01_126: [ If `on_underlying_ws_frame_received` is called while the IO is in any state other than OPEN, it shall do nothing. ]*/ LogError("on_underlying_ws_frame_received called in a bad state."); } else { if (frame_type != WS_FRAME_TYPE_BINARY) { /* Codes_SRS_WSIO_01_151: [ If the WebSocket frame type is not binary then an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ LogError("Invalid non binary WebSocket frame received."); /* Codes_SRS_WSIO_01_152: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ indicate_error(wsio_instance); } else { /* Codes_SRS_WSIO_01_153: [ When `on_underlying_ws_frame_received` is called with zero `size`, no bytes shall be indicated up as received. ]*/ if (size > 0) { if (buffer == NULL) { /* Codes_SRS_WSIO_01_154: [ When `on_underlying_ws_frame_received` is called with a positive `size` and a NULL `buffer`, an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ LogError("NULL buffer received for Websocket frame with positive payload length."); indicate_error(wsio_instance); } else { /* Codes_SRS_WSIO_01_124: [ When `on_underlying_ws_frame_received` is called the bytes in the frame shall be indicated by calling the `on_bytes_received` callback passed to `wsio_open`. ]*/ /* Codes_SRS_WSIO_01_125: [ When calling `on_bytes_received`, the `on_bytes_received_context` argument given in `wsio_open` shall be passed to the callback `on_bytes_received`. ]*/ wsio_instance->on_bytes_received(wsio_instance->on_bytes_received_context, buffer, size); } } } } } } static void on_underlying_ws_peer_closed(void* context, uint16_t* close_code, const unsigned char* extra_data, size_t extra_data_length) { /* Codes_SRS_WSIO_01_168: [ The `close_code`, `extra_data` and `extra_data_length` arguments shall be ignored. ]*/ (void)close_code; (void)extra_data; (void)extra_data_length; if (context == NULL) { /* Codes_SRS_WSIO_01_167: [ If `on_underlying_ws_peer_closed` is called with a NULL context it shall do nothing. ]*/ LogError("NULL context for on_underlying_ws_peer_closed"); } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)context; switch (wsio_instance->io_state) { default: /* Codes_SRS_WSIO_01_166: [ When `on_underlying_ws_peer_closed` and the state of the IO is OPEN an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ case IO_STATE_OPEN: /* Codes_SRS_WSIO_01_169: [ When `on_underlying_ws_peer_closed` and the state of the IO is CLOSING an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ case IO_STATE_CLOSING: indicate_error(wsio_instance); break; case IO_STATE_NOT_OPEN: // Codes_SRS_WSIO_07_001: [When `on_underlying_ws_peer_closed` and the state of the IO is NOT_OPEN an error will be raised and the io_state will remain as NOT_OPEN] indicate_error(wsio_instance); wsio_instance->io_state = IO_STATE_NOT_OPEN; break; case IO_STATE_OPENING: /* Codes_SRS_WSIO_01_170: [ When `on_underlying_ws_peer_closed` and the state of the IO is OPENING an error shall be indicated by calling the `on_io_open_complete` callback passed to `wsio_open` with the error code `IO_OPEN_ERROR`. ]*/ wsio_instance->io_state = IO_STATE_NOT_OPEN; indicate_open_complete(wsio_instance, IO_OPEN_ERROR); break; } } } static void on_underlying_ws_error(void* context, WS_ERROR ws_error) { (void)ws_error; /* Don't have much to do with the error here */ LogError("on_underlying_ws_error called with error code %d", (int)ws_error); if (context == NULL) { /* Codes_SRS_WSIO_01_135: [ When `on_underlying_ws_error` is called with a NULL context, it shall do nothing. ]*/ LogError("NULL context in on_underlying_ws_error"); } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)context; if (wsio_instance->io_state == IO_STATE_OPENING) { /* Codes_SRS_WSIO_01_123: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ wsio_instance->on_io_open_complete(wsio_instance->on_io_open_complete_context, IO_OPEN_ERROR); wsio_instance->io_state = IO_STATE_NOT_OPEN; } else { /* Codes_SRS_WSIO_01_123: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ wsio_instance->on_io_error(wsio_instance->on_io_error_context); } } } int wsio_open(CONCRETE_IO_HANDLE ws_io, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result = 0; if ((ws_io == NULL) || (on_io_open_complete == NULL) || (on_bytes_received == NULL) || (on_io_error == NULL)) { /* Codes_SRS_WSIO_01_132: [ If any of the arguments `ws_io`, `on_io_open_complete`, `on_bytes_received`, `on_io_error` is NULL, `wsio_open` shall fail and return a non-zero value. ]*/ LogError("Bad arguments: ws_io=%p, on_io_open_complete=%p, on_bytes_received=%p, on_io_error=%p", ws_io, on_io_open_complete, on_bytes_received, on_io_error); result = __FAILURE__; } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)ws_io; if (wsio_instance->io_state != IO_STATE_NOT_OPEN) { /* Codes_SRS_WSIO_01_165: [ `wsio_open` when CLOSING shall fail and return a non-zero value. ]*/ /* Codes_SRS_WSIO_01_131: [ `wsio_open` when already OPEN or OPENING shall fail and return a non-zero value. ]*/ LogError("wsio has already been opened current state: %d", wsio_instance->io_state); result = __FAILURE__; } else { wsio_instance->on_bytes_received = on_bytes_received; wsio_instance->on_bytes_received_context = on_bytes_received_context; wsio_instance->on_io_open_complete = on_io_open_complete; wsio_instance->on_io_open_complete_context = on_io_open_complete_context; wsio_instance->on_io_error = on_io_error; wsio_instance->on_io_error_context = on_io_error_context; wsio_instance->io_state = IO_STATE_OPENING; /* Codes_SRS_WSIO_01_082: [ `wsio_open` shall open the underlying uws instance by calling `uws_client_open_async` and providing the uws handle created in `wsio_create` as argument. ] */ if (uws_client_open_async(wsio_instance->uws, on_underlying_ws_open_complete, wsio_instance, on_underlying_ws_frame_received, wsio_instance, on_underlying_ws_peer_closed, wsio_instance, on_underlying_ws_error, wsio_instance) != 0) { /* Codes_SRS_WSIO_01_084: [ If opening the underlying uws instance fails then `wsio_open` shall fail and return a non-zero value. ]*/ LogError("Opening the uws instance failed."); wsio_instance->io_state = IO_STATE_NOT_OPEN; result = __FAILURE__; } else { /* Codes_SRS_WSIO_01_083: [ On success, `wsio_open` shall return 0. ]*/ result = 0; } } } return result; } int wsio_close(CONCRETE_IO_HANDLE ws_io, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) { int result = 0; if (ws_io == NULL) { /* Codes_SRS_WSIO_01_086: [ if `ws_io` is NULL, `wsio_close` shall return a non-zero value. ]*/ LogError("NULL handle"); result = __FAILURE__; } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)ws_io; if (internal_close(wsio_instance, on_io_close_complete, on_io_close_complete_context) != 0) { result = __FAILURE__; } else { result = 0; } } return result; } int wsio_send(CONCRETE_IO_HANDLE ws_io, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; /* Codes_SRS_WSIO_01_100: [ If any of the arguments `ws_io` or `buffer` are NULL, `wsio_send` shall fail and return a non-zero value. ]*/ if ((ws_io == NULL) || (buffer == NULL) || /* Codes_SRS_WSIO_01_101: [ If `size` is zero then `wsio_send` shall fail and return a non-zero value. ]*/ (size == 0)) { LogError("Bad arguments: ws_io=%p, buffer=%p, size=%u", ws_io, buffer, (unsigned int)size); result = __FAILURE__; } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)ws_io; if (wsio_instance->io_state != IO_STATE_OPEN) { /* Codes_SRS_WSIO_01_099: [ If the wsio is not OPEN (open has not been called or is still in progress) then `wsio_send` shall fail and return a non-zero value. ]*/ LogError("Attempting to send when not open"); result = __FAILURE__; } else { LIST_ITEM_HANDLE new_item; PENDING_IO* pending_socket_io = (PENDING_IO*)malloc(sizeof(PENDING_IO)); if (pending_socket_io == NULL) { /* Codes_SRS_WSIO_01_134: [ If allocating memory for the pending IO data fails, `wsio_send` shall fail and return a non-zero value. ]*/ result = __FAILURE__; } else { /* Codes_SRS_WSIO_01_103: [ The entry shall contain the `on_send_complete` callback and its context. ]*/ pending_socket_io->on_send_complete = on_send_complete; pending_socket_io->callback_context = callback_context; pending_socket_io->wsio = wsio_instance; /* Codes_SRS_WSIO_01_102: [ An entry shall be queued in the singly linked list by calling `singlylinkedlist_add`. ]*/ if ((new_item = singlylinkedlist_add(wsio_instance->pending_io_list, pending_socket_io)) == NULL) { /* Codes_SRS_WSIO_01_104: [ If `singlylinkedlist_add` fails, `wsio_send` shall fail and return a non-zero value. ]*/ free(pending_socket_io); result = __FAILURE__; } else { /* Codes_SRS_WSIO_01_095: [ `wsio_send` shall call `uws_client_send_frame_async`, passing the `buffer` and `size` arguments as they are: ]*/ /* Codes_SRS_WSIO_01_097: [ The `is_final` argument shall be set to true. ]*/ /* Codes_SRS_WSIO_01_096: [ The frame type used shall be `WS_FRAME_TYPE_BINARY`. ]*/ if (uws_client_send_frame_async(wsio_instance->uws, WS_FRAME_TYPE_BINARY, (const unsigned char*)buffer, size, true, on_underlying_ws_send_frame_complete, new_item) != 0) { if (singlylinkedlist_remove(wsio_instance->pending_io_list, new_item) != 0) { LogError("Failed removing pending IO from linked list."); } free(pending_socket_io); result = __FAILURE__; } else { /* Codes_SRS_WSIO_01_098: [ On success, `wsio_send` shall return 0. ]*/ result = 0; } } } } } return result; } void wsio_dowork(CONCRETE_IO_HANDLE ws_io) { if (ws_io == NULL) { /* Codes_SRS_WSIO_01_107: [ If the `ws_io` argument is NULL, `wsio_dowork` shall do nothing. ]*/ LogError("NULL handle"); } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)ws_io; /* Codes_SRS_WSIO_01_108: [ If the IO is not yet open, `wsio_dowork` shall do nothing. ]*/ if (wsio_instance->io_state != IO_STATE_NOT_OPEN) { /* Codes_SRS_WSIO_01_106: [ `wsio_dowork` shall call `uws_client_dowork` with the uws handle created in `wsio_create`. ]*/ uws_client_dowork(wsio_instance->uws); } } } int wsio_setoption(CONCRETE_IO_HANDLE ws_io, const char* optionName, const void* value) { int result; if ( /* Codes_SRS_WSIO_01_109: [ If any of the arguments `ws_io` or `option_name` is NULL `wsio_setoption` shall return a non-zero value. ]*/ (ws_io == NULL) || (optionName == NULL) ) { LogError("Bad parameters: ws_io=%p, optionName=%p", ws_io, optionName); result = __FAILURE__; } else { WSIO_INSTANCE* wsio_instance = (WSIO_INSTANCE*)ws_io; if (strcmp(WSIO_OPTIONS, optionName) == 0) { /* Codes_SRS_WSIO_01_183: [ If the option name is `WSIOOptions` then `wsio_setoption` shall call `OptionHandler_FeedOptions` and pass to it the underlying IO handle and the `value` argument. ]*/ if (OptionHandler_FeedOptions((OPTIONHANDLER_HANDLE)value, wsio_instance->uws) != OPTIONHANDLER_OK) { /* Codes_SRS_WSIO_01_184: [ If `OptionHandler_FeedOptions` fails, `wsio_setoption` shall fail and return a non-zero value. ]*/ LogError("unable to OptionHandler_FeedOptions"); result = __FAILURE__; } else { /* Codes_SRS_WSIO_01_158: [ On success, `wsio_setoption` shall return 0. ]*/ result = 0; } } else { /* Codes_SRS_WSIO_01_156: [ Otherwise all options shall be passed as they are to uws by calling `uws_client_set_option`. ]*/ if (uws_client_set_option(wsio_instance->uws, optionName, value) != 0) { /* Codes_SRS_WSIO_01_157: [ If `uws_client_set_option` fails, `wsio_setoption` shall fail and return a non-zero value. ]*/ LogError("Setting the option %s failed", optionName); result = __FAILURE__; } else { /* Codes_SRS_WSIO_01_158: [ On success, `wsio_setoption` shall return 0. ]*/ result = 0; } } } return result; } static void* wsio_clone_option(const char* name, const void* value) { void *result; if ( (name == NULL) || (value == NULL) ) { /* Codes_SRS_WSIO_01_174: [ If `wsio_clone_option` is called with NULL `name` or `value` it shall return NULL. ]*/ LogError("invalid argument detected: const char* name=%p, const void* value=%p", name, value); result = NULL; } else { if (strcmp(name, WSIO_OPTIONS) == 0) { /* Codes_SRS_WSIO_01_171: [** `wsio_clone_option` called with `name` being `WSIOOptions` shall return the same value. ]*/ result = (void*)value; } else { /* Codes_SRS_WSIO_01_173: [ `wsio_clone_option` called with any other option name than `WSIOOptions` shall return NULL. ]*/ LogError("unknown option: %s", name); result = NULL; } } return result; } static void wsio_destroy_option(const char* name, const void* value) { if ( (name == NULL) || (value == NULL) ) { /* Codes_SRS_WSIO_01_177: [ If `wsio_destroy_option` is called with NULL `name` or `value` it shall do nothing. ]*/ LogError("Bad arguments: const char* name=%p, const void* value=%p", name, value); } else { if (strcmp(name, WSIO_OPTIONS) == 0) { /* Codes_SRS_WSIO_01_175: [ `wsio_destroy_option` called with the option `name` being `WSIOOptions` shall destroy the value by calling `OptionHandler_Destroy`. ]*/ OptionHandler_Destroy((OPTIONHANDLER_HANDLE)value); } else { /* Codes_SRS_WSIO_01_176: [ If `wsio_destroy_option` is called with any other `name` it shall do nothing. ]*/ LogError("unknown option: %s", name); } } } OPTIONHANDLER_HANDLE wsio_retrieveoptions(CONCRETE_IO_HANDLE handle) { OPTIONHANDLER_HANDLE result; if (handle == NULL) { /* Codes_SRS_WSIO_01_118: [ If parameter `handle` is `NULL` then `wsio_retrieveoptions` shall fail and return NULL. ]*/ LogError("parameter handle is NULL"); result = NULL; } else { WSIO_INSTANCE* wsio = (WSIO_INSTANCE*)handle; /* Codes_SRS_WSIO_01_119: [ `wsio_retrieveoptions` shall call `OptionHandler_Create` to produce an `OPTIONHANDLER_HANDLE` and on success return the new `OPTIONHANDLER_HANDLE` handle. ]*/ result = OptionHandler_Create(wsio_clone_option, wsio_destroy_option, wsio_setoption); if (result == NULL) { /* Codes_SRS_WSIO_01_120: [ If `OptionHandler_Create` fails then `wsio_retrieveoptions` shall fail and return NULL. ]*/ LogError("OptionHandler_Create failed"); } else { /* Codes_SRS_WSIO_01_179: [ When calling `uws_client_retrieve_options` the uws client handle shall be passed to it. ]*/ /* Codes_SRS_WSIO_01_178: [ `uws_client_retrieve_options` shall add to the option handler one option, whose name shall be `uWSCLientOptions` and the value shall be queried by calling `uws_client_retrieve_options`. ]*/ OPTIONHANDLER_HANDLE concreteOptions = uws_client_retrieve_options(wsio->uws); if (concreteOptions == NULL) { /* Codes_SRS_WSIO_01_180: [ If `uws_client_retrieve_options` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ LogError("unable to concrete_io_retrieveoptions"); OptionHandler_Destroy(result); result = NULL; } else { /* Codes_SRS_WSIO_01_181: [ Adding the option shall be done by calling `OptionHandler_AddOption`. ]*/ if (OptionHandler_AddOption(result, WSIO_OPTIONS, concreteOptions) != OPTIONHANDLER_OK) { /* Codes_SRS_WSIO_01_182: [ If `OptionHandler_AddOption` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ LogError("unable to OptionHandler_AddOption"); OptionHandler_Destroy(concreteOptions); OptionHandler_Destroy(result); result = NULL; } } } } return result; } static const IO_INTERFACE_DESCRIPTION ws_io_interface_description = { wsio_retrieveoptions, wsio_create, wsio_destroy, wsio_open, wsio_close, wsio_send, wsio_dowork, wsio_setoption }; const IO_INTERFACE_DESCRIPTION* wsio_get_interface_description(void) { return &ws_io_interface_description; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/xio.c000066400000000000000000000266351362133436400311020ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/xlogging.h" static const char* CONCRETE_OPTIONS = "concreteOptions"; typedef struct XIO_INSTANCE_TAG { const IO_INTERFACE_DESCRIPTION* io_interface_description; CONCRETE_IO_HANDLE concrete_xio_handle; } XIO_INSTANCE; XIO_HANDLE xio_create(const IO_INTERFACE_DESCRIPTION* io_interface_description, const void* xio_create_parameters) { XIO_INSTANCE* xio_instance; /* Codes_SRS_XIO_01_003: [If the argument io_interface_description is NULL, xio_create shall return NULL.] */ if ((io_interface_description == NULL) || /* Codes_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ (io_interface_description->concrete_io_retrieveoptions == NULL) || (io_interface_description->concrete_io_create == NULL) || (io_interface_description->concrete_io_destroy == NULL) || (io_interface_description->concrete_io_open == NULL) || (io_interface_description->concrete_io_close == NULL) || (io_interface_description->concrete_io_send == NULL) || (io_interface_description->concrete_io_dowork == NULL) || (io_interface_description->concrete_io_setoption == NULL)) { xio_instance = NULL; } else { xio_instance = (XIO_INSTANCE*)malloc(sizeof(XIO_INSTANCE)); /* Codes_SRS_XIO_01_017: [If allocating the memory needed for the IO interface fails then xio_create shall return NULL.] */ if (xio_instance != NULL) { /* Codes_SRS_XIO_01_001: [xio_create shall return on success a non-NULL handle to a new IO interface.] */ xio_instance->io_interface_description = io_interface_description; /* Codes_SRS_XIO_01_002: [In order to instantiate the concrete IO implementation the function concrete_io_create from the io_interface_description shall be called, passing the xio_create_parameters argument.] */ xio_instance->concrete_xio_handle = xio_instance->io_interface_description->concrete_io_create((void*)xio_create_parameters); /* Codes_SRS_XIO_01_016: [If the underlying concrete_io_create call fails, xio_create shall return NULL.] */ if (xio_instance->concrete_xio_handle == NULL) { free(xio_instance); xio_instance = NULL; } } } return (XIO_HANDLE)xio_instance; } void xio_destroy(XIO_HANDLE xio) { /* Codes_SRS_XIO_01_007: [If the argument io is NULL, xio_destroy shall do nothing.] */ if (xio != NULL) { XIO_INSTANCE* xio_instance = (XIO_INSTANCE*)xio; /* Codes_SRS_XIO_01_006: [xio_destroy shall also call the concrete_io_destroy function that is member of the io_interface_description argument passed to xio_create, while passing as argument to concrete_io_destroy the result of the underlying concrete_io_create handle that was called as part of the xio_create call.] */ xio_instance->io_interface_description->concrete_io_destroy(xio_instance->concrete_xio_handle); /* Codes_SRS_XIO_01_005: [xio_destroy shall free all resources associated with the IO handle.] */ free(xio_instance); } } int xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; if (xio == NULL) { /* Codes_SRS_XIO_01_021: [If handle is NULL, xio_open shall return a non-zero value.] */ result = __FAILURE__; } else { XIO_INSTANCE* xio_instance = (XIO_INSTANCE*)xio; /* Codes_SRS_XIO_01_019: [xio_open shall call the specific concrete_xio_open function specified in xio_create, passing callback function and context arguments for three events: open completed, bytes received, and IO error.] */ if (xio_instance->io_interface_description->concrete_io_open(xio_instance->concrete_xio_handle, on_io_open_complete, on_io_open_complete_context, on_bytes_received, on_bytes_received_context, on_io_error, on_io_error_context) != 0) { /* Codes_SRS_XIO_01_022: [If the underlying concrete_io_open fails, xio_open shall return a non-zero value.] */ result = __FAILURE__; } else { /* Codes_SRS_XIO_01_020: [On success, xio_open shall return 0.] */ result = 0; } } return result; } int xio_close(XIO_HANDLE xio, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { int result; if (xio == NULL) { /* Codes_SRS_XIO_01_025: [If handle is NULL, xio_close shall return a non-zero value.] */ result = __FAILURE__; } else { XIO_INSTANCE* xio_instance = (XIO_INSTANCE*)xio; /* Codes_SRS_XIO_01_023: [xio_close shall call the specific concrete_io_close function specified in xio_create.] */ if (xio_instance->io_interface_description->concrete_io_close(xio_instance->concrete_xio_handle, on_io_close_complete, callback_context) != 0) { /* Codes_SRS_XIO_01_026: [If the underlying concrete_io_close fails, xio_close shall return a non-zero value.] */ result = __FAILURE__; } else { /* Codes_SRS_XIO_01_024: [On success, xio_close shall return 0.] */ result = 0; } } return result; } int xio_send(XIO_HANDLE xio, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; /* Codes_SRS_XIO_01_011: [No error check shall be performed on buffer and size.] */ /* Codes_SRS_XIO_01_010: [If handle is NULL, xio_send shall return a non-zero value.] */ if (xio == NULL) { result = __FAILURE__; } else { XIO_INSTANCE* xio_instance = (XIO_INSTANCE*)xio; /* Codes_SRS_XIO_01_008: [xio_send shall pass the sequence of bytes pointed to by buffer to the concrete IO implementation specified in xio_create, by calling the concrete_io_send function while passing down the buffer and size arguments to it.] */ /* Codes_SRS_XIO_01_009: [On success, xio_send shall return 0.] */ /* Codes_SRS_XIO_01_015: [If the underlying concrete_io_send fails, xio_send shall return a non-zero value.] */ /* Codes_SRS_XIO_01_027: [xio_send shall pass to the concrete_io_send function the on_send_complete and callback_context arguments.] */ result = xio_instance->io_interface_description->concrete_io_send(xio_instance->concrete_xio_handle, buffer, size, on_send_complete, callback_context); } return result; } void xio_dowork(XIO_HANDLE xio) { /* Codes_SRS_XIO_01_018: [When the handle argument is NULL, xio_dowork shall do nothing.] */ if (xio != NULL) { XIO_INSTANCE* xio_instance = (XIO_INSTANCE*)xio; /* Codes_SRS_XIO_01_012: [xio_dowork shall call the concrete XIO implementation specified in xio_create, by calling the concrete_io_dowork function.] */ xio_instance->io_interface_description->concrete_io_dowork(xio_instance->concrete_xio_handle); } } int xio_setoption(XIO_HANDLE xio, const char* optionName, const void* value) { int result; /* Codes_SRS_XIO_03_030: [If the xio argument or the optionName argument is NULL, xio_setoption shall return a non-zero value.] */ if (xio == NULL || optionName == NULL) { result = __FAILURE__; } else { XIO_INSTANCE* xio_instance = (XIO_INSTANCE*)xio; if (strcmp(CONCRETE_OPTIONS, optionName) == 0) { /*then value is a pointer to OPTIONHANDLER_HANDLE*/ if (OptionHandler_FeedOptions((OPTIONHANDLER_HANDLE)value, xio_instance->concrete_xio_handle) != OPTIONHANDLER_OK) { LogError("unable to OptionHandler_FeedOptions"); result = __FAILURE__; } else { result = 0; } } else /*passthrough*/ { /* Codes_SRS_XIO_003_028: [xio_setoption shall pass the optionName and value to the concrete IO implementation specified in xio_create by invoking the concrete_xio_setoption function.] */ /* Codes_SRS_XIO_03_029: [xio_setoption shall return 0 upon success.] */ /* Codes_SRS_XIO_03_031: [If the underlying concrete_xio_setoption fails, xio_setOption shall return a non-zero value.] */ result = xio_instance->io_interface_description->concrete_io_setoption(xio_instance->concrete_xio_handle, optionName, value); } } return result; } static void* xio_CloneOption(const char* name, const void* value) { void *result; if ( (name == NULL) || (value == NULL) ) { LogError("invalid argument detected: const char* name=%p, const void* value=%p", name, value); result = NULL; } else { if (strcmp(name, CONCRETE_OPTIONS) == 0) { result = (void*)value; } else { LogError("unknown option: %s", name); result = NULL; } } return result; } static void xio_DestroyOption(const char* name, const void* value) { if ( (name == NULL) || (value == NULL) ) { LogError("invalid argument detected: const char* name=%p, const void* value=%p", name, value); } else { if (strcmp(name, CONCRETE_OPTIONS) == 0) { OptionHandler_Destroy((OPTIONHANDLER_HANDLE)value); } else { LogError("unknown option: %s", name); } } } OPTIONHANDLER_HANDLE xio_retrieveoptions(XIO_HANDLE xio) { OPTIONHANDLER_HANDLE result; if (xio == NULL) { LogError("invalid argument detected: XIO_HANDLE xio=%p", xio); result = NULL; } else { XIO_INSTANCE* xio_instance = (XIO_INSTANCE*)xio; /*xio_retrieveoptions shall return a OPTIONHANDLER_HANDLE that has 1 option called "underlyingOptions" which is of type OPTIONHANDLER_HANDLE*/ result = OptionHandler_Create(xio_CloneOption, xio_DestroyOption, (pfSetOption)xio_setoption); if (result == NULL) { LogError("unable to OptionHandler_Create"); /*return as is*/ } else { OPTIONHANDLER_HANDLE concreteOptions = xio_instance->io_interface_description->concrete_io_retrieveoptions(xio_instance->concrete_xio_handle); if (concreteOptions == NULL) { LogError("unable to concrete_io_retrieveoptions"); OptionHandler_Destroy(result); result = NULL; } else { if (OptionHandler_AddOption(result, CONCRETE_OPTIONS, concreteOptions) != OPTIONHANDLER_OK) { LogError("unable to OptionHandler_AddOption"); OptionHandler_Destroy(concreteOptions); OptionHandler_Destroy(result); result = NULL; } else { /*all is fine*/ } } } } return result; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/src/xlogging.c000066400000000000000000000121551362133436400321110ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/consolelogger.h" #ifndef NO_LOGGING #ifdef WIN32 #include "windows.h" #endif // WIN32 #ifdef WINCE #include void consolelogger_log(LOG_CATEGORY log_category, const char* file, const char* func, int line, unsigned int options, const char* format, ...) { va_list args; va_start(args, format); time_t t = time(NULL); switch (log_category) { case AZ_LOG_INFO: (void)printf("Info: "); break; case AZ_LOG_ERROR: (void)printf("Error: Time:%.24s File:%s Func:%s Line:%d ", ctime(&t), file, func, line); break; default: break; } (void)vprintf(format, args); va_end(args); (void)log_category; if (options & LOG_LINE) { (void)printf("\r\n"); } } #endif // WINCE LOGGER_LOG global_log_function = consolelogger_log; void xlogging_set_log_function(LOGGER_LOG log_function) { global_log_function = log_function; } LOGGER_LOG xlogging_get_log_function(void) { return global_log_function; } #if (defined(_MSC_VER)) && (!(defined WINCE)) LOGGER_LOG_GETLASTERROR global_log_function_GetLastError = consolelogger_log_with_GetLastError; void xlogging_set_log_function_GetLastError(LOGGER_LOG_GETLASTERROR log_function_GetLastError) { global_log_function_GetLastError = log_function_GetLastError; } LOGGER_LOG_GETLASTERROR xlogging_get_log_function_GetLastError(void) { return global_log_function_GetLastError; } #endif /* Print up to 16 bytes per line. */ #define LINE_SIZE 16 /* Return the printable char for the provided value. */ #define PRINTABLE(c) ((c >= ' ') && (c <= '~')) ? (char)c : '.' /* Convert the lower nibble of the provided byte to a hexadecimal printable char. */ #define HEX_STR(c) (((c) & 0xF) < 0xA) ? (char)(((c) & 0xF) + '0') : (char)(((c) & 0xF) - 0xA + 'A') void LogBinary(const char* comment, const void* data, size_t size) { char charBuf[LINE_SIZE + 1]; char hexBuf[LINE_SIZE * 3 + 1]; size_t countbuf = 0; size_t i = 0; const unsigned char* bufAsChar = (const unsigned char*)data; const unsigned char* startPos = bufAsChar; LOG(AZ_LOG_TRACE, LOG_LINE, "%s %zu bytes", comment, size); /* Print the whole buffer. */ for (i = 0; i < size; i++) { /* Store the printable value of the char in the charBuf to print. */ charBuf[countbuf] = PRINTABLE(*bufAsChar); /* Convert the high nibble to a printable hexadecimal value. */ hexBuf[countbuf * 3] = HEX_STR(*bufAsChar >> 4); /* Convert the low nibble to a printable hexadecimal value. */ hexBuf[countbuf * 3 + 1] = HEX_STR(*bufAsChar); hexBuf[countbuf * 3 + 2] = ' '; countbuf++; bufAsChar++; /* If the line is full, print it to start another one. */ if (countbuf == LINE_SIZE) { charBuf[countbuf] = '\0'; hexBuf[countbuf * 3] = '\0'; LOG(AZ_LOG_TRACE, LOG_LINE, "%p: %s %s", startPos, hexBuf, charBuf); countbuf = 0; startPos = bufAsChar; } } /* If the last line does not fit the line size. */ if (countbuf > 0) { /* Close the charBuf string. */ charBuf[countbuf] = '\0'; /* Fill the hexBuf with spaces to keep the charBuf alignment. */ while ((countbuf++) < LINE_SIZE - 1) { hexBuf[countbuf * 3] = ' '; hexBuf[countbuf * 3 + 1] = ' '; hexBuf[countbuf * 3 + 2] = ' '; } hexBuf[countbuf * 3] = '\0'; /* Print the last line. */ LOG(AZ_LOG_TRACE, LOG_LINE, "%p: %s %s", startPos, hexBuf, charBuf); } } #ifdef WIN32 #ifdef WINCE void xlogging_LogErrorWinHTTPWithGetLastErrorAsStringFormatter(int errorMessageID) { (void)errorMessageID; } #else // WINCE void xlogging_LogErrorWinHTTPWithGetLastErrorAsStringFormatter(int errorMessageID) { char messageBuffer[MESSAGE_BUFFER_SIZE]; if (errorMessageID == 0) { LogError("GetLastError() returned 0. Make sure you are calling this right after the code that failed. "); } else { int size = FormatMessage(FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_IGNORE_INSERTS, GetModuleHandle("WinHttp"), errorMessageID, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), messageBuffer, MESSAGE_BUFFER_SIZE, NULL); if (size == 0) { size = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorMessageID, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), messageBuffer, MESSAGE_BUFFER_SIZE, NULL); if (size == 0) { LogError("GetLastError Code: %d. ", errorMessageID); } else { LogError("GetLastError: %s.", messageBuffer); } } else { LogError("GetLastError: %s.", messageBuffer); } } } #endif // WINCE #endif // WIN32 #endif // NO_LOGGING azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/000077500000000000000000000000001362133436400304765ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/CMakeLists.txt000066400000000000000000000051331362133436400332400ustar00rootroot00000000000000#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. usePermissiveRulesForSamplesAndTests() #this is CMakeLists.txt for the folder tests of C shared utility set(SHARED_UTIL_REAL_TEST_FOLDER ${CMAKE_CURRENT_LIST_DIR}/real_test_files CACHE INTERNAL "this is what needs to be included when doing test sources" FORCE) add_subdirectory(agenttime_ut) add_subdirectory(base32_ut) add_subdirectory(base64_ut) add_subdirectory(buffer_ut) if(${use_condition}) add_subdirectory(condition_ut) endif() add_subdirectory(constbuffer_ut) add_subdirectory(constmap_ut) add_subdirectory(crtabstractions_ut) add_subdirectory(doublylinkedlist_ut) add_subdirectory(gballoc_ut) add_subdirectory(gballoc_without_init_ut) add_subdirectory(hmacsha256_ut) if(${use_http}) add_subdirectory(httpapiex_ut) add_subdirectory(httpapiexsas_ut) add_subdirectory(httpheaders_ut) add_subdirectory(httpapicompact_ut) endif() add_subdirectory(singlylinkedlist_ut) add_subdirectory(lock_ut) add_subdirectory(map_ut) add_subdirectory(refcount_ut) add_subdirectory(sastoken_ut) add_subdirectory(connectionstringparser_ut) if(WIN32) add_subdirectory(socketio_win32_ut) add_subdirectory(x509_schannel_ut) add_subdirectory(platform_win32_ut) else() add_subdirectory(socketio_berkeley_ut) endif() #normally, with proper include paths, the below tests can be run under windows too. if(${use_openssl}) add_subdirectory(x509_openssl_ut) endif() add_subdirectory(string_tokenizer_ut) add_subdirectory(string_token_ut) add_subdirectory(strings_ut) add_subdirectory(tickcounter_ut) add_subdirectory(tlsio_options_ut) add_subdirectory(uniqueid_ut) add_subdirectory(uuid_ut) add_subdirectory(urlencode_ut) add_subdirectory(vector_ut) add_subdirectory(xio_ut) add_subdirectory(optionhandler_ut) if(use_wolfssl) add_subdirectory(tlsio_wolfssl_ut) endif() if(use_wsio) add_subdirectory(uws_client_ut) add_subdirectory(uws_frame_encoder_ut) add_subdirectory(wsio_ut) add_subdirectory(ws_url_ut) endif() #Add adapters tests add_subdirectory(tickcounter_freertos_ut) if(use_cyclonessl AND WIN32) add_subdirectory(tlsio_cyclonessl_ut) add_subdirectory(tlsio_cyclonessl_socket_bsd_ut) endif() if(use_mbedtls) add_subdirectory(tlsio_mbedtls_ut) endif() add_subdirectory(utf8_checker_ut) add_subdirectory(http_proxy_io_ut) if(NOT DEFINED MACOSX) add_subdirectory(tlsio_esp8266_ut) add_subdirectory(socket_async_ut) add_subdirectory(dns_async_ut) endif() #Add template as reference for new tests add_subdirectory(template_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/agenttime_ut/000077500000000000000000000000001362133436400331635ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007641362133436400356530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/agenttime_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName agenttime_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../pal/agenttime.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) agenttime_ut.c000066400000000000000000000043111362133436400357340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/agenttime_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/agenttime.h" static TEST_MUTEX_HANDLE g_testByTest; time_t my_time64(time_t * _Time) { (void)_Time; return (int64_t)-1; } struct tm* my_gmtime64(time_t* _Time) { (void)_Time; return NULL; } struct tm* my_localtime64(time_t * _Time) { (void)_Time; return NULL; } time_t my_mktime64(struct tm* _Time) { (void)_Time; return (int64_t)-1; } BEGIN_TEST_SUITE(agenttime_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(TestClassCleanup) { TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } TEST_FUNCTION(get_time_succeed) { ///act time_t t; time_t result = get_time(&t); ///assert ASSERT_ARE_EQUAL(int, (int)result, (int)t); } TEST_FUNCTION(get_gmtime_success) { ///act time_t now; struct tm* p; now = get_time(NULL); p = get_gmtime(&now); ///assert ASSERT_IS_NOT_NULL(p); } TEST_FUNCTION(get_difftime_success) { time_t now, sometimeAfterNow; double diff; now = get_time(NULL); sometimeAfterNow = now + 42; /*whatever this is*/ ///act diff = get_difftime(sometimeAfterNow, now); ///assert ASSERT_ARE_EQUAL(double, difftime(sometimeAfterNow, now), diff); } END_TEST_SUITE(agenttime_unittests) main.c000066400000000000000000000005021362133436400341710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/agenttime_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(agenttime_unittests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base32_ut/000077500000000000000000000000001362133436400322655ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007661362133436400347570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base32_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName base32_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/base32.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) base32_ut.c000066400000000000000000000437031362133436400341500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base32_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_stdint.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/base32.h" DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } static STRING_HANDLE TEST_STRING_HANDLE = (STRING_HANDLE)0x11; static TEST_MUTEX_HANDLE g_testByTest; typedef struct TEST_BASE32_VALUE_TAG { size_t input_len; const unsigned char* input_data; const char* base32_data; } TEST_BASE32_VALUE; static const TEST_BASE32_VALUE test_val_len[] = { { 1, (const unsigned char*)"\x01", "ae======" }, { 1, (const unsigned char*)"\x02", "ai======" }, { 1, (const unsigned char*)"\x03", "am======" }, { 1, (const unsigned char*)"\x04", "aq======" }, { 1, (const unsigned char*)"\x05", "au======" }, { 1, (const unsigned char*)"\x06", "ay======" }, { 1, (const unsigned char*)"\x07", "a4======" }, { 1, (const unsigned char*)"\x08", "ba======" }, { 1, (const unsigned char*)"\x09", "be======" }, { 1, (const unsigned char*)"\x0A", "bi======" }, { 1, (const unsigned char*)"\x84", "qq======" }, { 2, (const unsigned char*)"\x0b\x09", "bmeq====" }, { 2, (const unsigned char*)"\x10\x20", "caqa====" }, { 2, (const unsigned char*)"\x22\x99", "ekmq====" }, { 2, (const unsigned char*)"\xFF\xFF", "777q====" }, { 3, (const unsigned char*)"\x01\x10\x11", "aeibc===" }, { 3, (const unsigned char*)"\x0A\x00\x0a", "biaau===" }, { 3, (const unsigned char*)"\x99\xCC\xDD", "thgn2===" }, { 4, (const unsigned char*)"\x00\x00\x00\x00", "aaaaaaa=" }, { 4, (const unsigned char*)"\x01\x02\x03\x04", "aebagba=" }, { 4, (const unsigned char*)"\xDD\xDD\xDD\xDD", "3xo53xi=" }, { 5, (const unsigned char*)"\x01\x02\x03\x04\x05", "aebagbaf" }, { 5, (const unsigned char*)"\x0a\x0b\x0c\x0d\x0e", "bifqydio" }, { 6, (const unsigned char*)"\x66\x6f\x6f\x62\x61\x72", "mzxw6ytboi======" }, { 6, (const unsigned char*)"\x0f\xff\x0e\xee\x0d\xdd", "b77q53qn3u======" }, { 9, (const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00", "aaaaaaaaaaaaaaa=" }, { 9, (const unsigned char*)"\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", "a4eascqlbqgq4dy=" }, { 10, (const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", "aaaaaaaaaaaaaaaa" }, { 10, (const unsigned char*)"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", "7777777777777777" }, { 11, (const unsigned char*)"\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11", "a4eascqlbqgq4dyqce======" }, { 11, (const unsigned char*)"\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99\x99", "tgmztgmztgmztgmzte======" }, { 14, (const unsigned char*)"\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd", "3xo53xo53xo53xo53xo53xi=" }, { 14, (const unsigned char*)"\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa", "vkvkvkvkvkvkvkvkvkvkvkq=" }, { 15, (const unsigned char*)"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", "aebagbafaydqqcikbmga2dqp" }, { 16, (const unsigned char*)"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10", "aebagbafaydqqcikbmga2dqpca======" }, { 17, (const unsigned char*)"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11", "aebagbafaydqqcikbmga2dqpcaiq====" }, { 32, (const unsigned char*)"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20", "aebagbafaydqqcikbmga2dqpcaireeyuculbogazdinryhi6d4qa====" }, }; static STRING_HANDLE my_STRING_new(void) { return TEST_STRING_HANDLE; } static BUFFER_HANDLE my_BUFFER_create(const unsigned char* source, size_t size) { BUFFER_HANDLE result = (BUFFER_HANDLE)my_gballoc_malloc(size); memcpy(result, source, size); return result; } static unsigned char* my_BUFFER_u_char(BUFFER_HANDLE handle) { TEST_BASE32_VALUE* target = (TEST_BASE32_VALUE*)handle; return (unsigned char*)target->input_data; } static size_t my_BUFFER_length(BUFFER_HANDLE handle) { TEST_BASE32_VALUE* target = (TEST_BASE32_VALUE*)handle; return target->input_len; } static void my_BUFFER_delete(BUFFER_HANDLE handle) { my_gballoc_free((void*)handle); } static STRING_HANDLE my_STRING_construct(const char* psz) { char* temp = (char*)my_gballoc_malloc(strlen(psz) + 1); ASSERT_IS_NOT_NULL(temp); (void)memcpy(temp, psz, strlen(psz) + 1); return (STRING_HANDLE)temp; } const char* my_STRING_c_str(STRING_HANDLE handle) { return (const char*)handle; } static void my_STRING_delete(STRING_HANDLE h) { my_gballoc_free((void*)h); } BEGIN_TEST_SUITE(base32_ut) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_stdint_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(STRING_new, my_STRING_new); REGISTER_GLOBAL_MOCK_HOOK(STRING_construct, my_STRING_construct); REGISTER_GLOBAL_MOCK_HOOK(STRING_c_str, my_STRING_c_str); REGISTER_GLOBAL_MOCK_HOOK(STRING_delete, my_STRING_delete); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_create, my_BUFFER_create); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_delete, my_BUFFER_delete); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_length, my_BUFFER_length); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_u_char, my_BUFFER_u_char); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_BASE32_07_004: [ If source is NULL Base32_Encode shall return NULL. ] */ TEST_FUNCTION(Base32_Encode_Bytes_source_NULL) { char* result; //arrange //act result = Base32_Encode_Bytes(NULL, 10); //assert ASSERT_IS_NULL(result); //cleanup } /* Tests_SRS_BASE32_07_005: [ If size is 0 Base32_Encode shall return an empty string. ] */ TEST_FUNCTION(Base32_Encode_Bytes_len_is_0_success) { char* result; //arrange //act result = Base32_Encode_Bytes((const unsigned char*)"", 0); //assert ASSERT_ARE_EQUAL(char_ptr, "", result); //cleanup free(result); } /* Tests_SRS_BASE32_07_006: [ If successful Base32_Encode shall return the base32 value of input. ] */ /* Tests_SRS_BASE32_07_007: [ Base32_Encode_Bytes shall call into Base32_Encode_impl to encode the source data. ] */ /* Tests_SRS_BASE32_07_009: [ base32_encode_impl shall allocate the buffer to the size of the encoding value. ] */ /* Tests_SRS_BASE32_07_010: [ base32_encode_impl shall look through source and separate each block into 5 bit chunks ] */ /* Tests_SRS_BASE32_07_011: [ base32_encode_impl shall then map the 5 bit chunks into one of the BASE32 values (a-z,2,3,4,5,6,7) values. ] */ /* Tests_SRS_BASE32_07_012: [ If the src_size is not divisible by 8, base32_encode_impl shall pad the remaining places with =. ] */ TEST_FUNCTION(Base32_Encode_Bytes_success) { char* result; size_t index; size_t num_elements = sizeof(test_val_len)/sizeof(test_val_len[0]); //arrange //act for (index = 0; index < num_elements; index++) { char tmp_msg[64]; sprintf(tmp_msg, "Base32_Encode_Bytes failure in test %zu", index); result = Base32_Encode_Bytes(test_val_len[index].input_data, test_val_len[index].input_len); //assert ASSERT_ARE_EQUAL(char_ptr, test_val_len[index].base32_data, result, tmp_msg); //cleanup free(result); } } /* Tests_SRS_BASE32_07_001: [ If source is NULL Base32_Encode shall return NULL. ] */ TEST_FUNCTION(Base32_Encode_source_failed) { STRING_HANDLE result; //arrange //act result = Base32_Encode(NULL); //assert ASSERT_IS_NULL(result); } /* Tests_SRS_BASE32_07_015: [ If size is 0 Base32_Encode shall return an empty string. ] */ TEST_FUNCTION(Base32_Encode_source_len_0_failed) { STRING_HANDLE result; BUFFER_HANDLE input_buff; //arrange TEST_BASE32_VALUE zero_length; zero_length.base32_data = NULL; zero_length.input_len = 0; zero_length.input_data = NULL; input_buff = (BUFFER_HANDLE)&zero_length; //act result = Base32_Encode(input_buff); //assert ASSERT_IS_TRUE(TEST_STRING_HANDLE == result); } /* Tests_SRS_BASE32_07_002: [ If successful Base32_Encode shall return the base32 value of source. ] */ /* Tests_SRS_BASE32_07_003: [ Base32_Encode shall call into Base32_Encode_impl to encode the source data. ] */ /* Tests_SRS_BASE32_07_012: [ Base32_Encode shall wrap the Base32_Encode_impl result into a STRING_HANDLE. ] */ /* Tests_SRS_BASE32_07_009: [ base32_encode_impl shall allocate the buffer to the size of the encoding value. ] */ /* Tests_SRS_BASE32_07_010: [ base32_encode_impl shall look through source and separate each block into 5 bit chunks ] */ /* Tests_SRS_BASE32_07_011: [ base32_encode_impl shall then map the 5 bit chunks into one of the BASE32 values (a-z,2,3,4,5,6,7) values. ] */ /* Tests_SRS_BASE32_07_012: [ If the src_size is not divisible by 8, base32_encode_impl shall pad the remaining places with =. ] */ TEST_FUNCTION(Base32_Encode_success) { STRING_HANDLE result; size_t index; size_t num_elements = sizeof(test_val_len) / sizeof(test_val_len[0]); //arrange //act for (index = 0; index < num_elements; index++) { BUFFER_HANDLE input_buff; char tmp_msg[64]; sprintf(tmp_msg, "Base32_Encode failure in test %zu", index); input_buff = (BUFFER_HANDLE)&test_val_len[index]; result = Base32_Encode(input_buff); //assert ASSERT_ARE_EQUAL(char_ptr, test_val_len[index].base32_data, (const char*)result, tmp_msg); //cleanup my_STRING_delete(result); } } /* Tests_SRS_BASE32_07_002: [ If successful Base32_Encode shall return the base32 value of source. ] */ /* Tests_SRS_BASE32_07_003: [ Base32_Encode shall call into Base32_Encode_impl to encode the source data. ] */ /* Tests_SRS_BASE32_07_012: [ Base32_Encode shall wrap the Base32_Encode_impl result into a STRING_HANDLE. ] */ /* Tests_SRS_BASE32_07_009: [ base32_encode_impl shall allocate the buffer to the size of the encoding value. ] */ /* Tests_SRS_BASE32_07_010: [ base32_encode_impl shall look through source and separate each block into 5 bit chunks ] */ /* Tests_SRS_BASE32_07_011: [ base32_encode_impl shall then map the 5 bit chunks into one of the BASE32 values (a-z,2,3,4,5,6,7) values. ] */ /* Tests_SRS_BASE32_07_012: [ If the src_size is not divisible by 8, base32_encode_impl shall pad the remaining places with =. ] */ TEST_FUNCTION(Base32_Encode_with_mocks_success) { STRING_HANDLE result; //arrange BUFFER_HANDLE input_buff = (BUFFER_HANDLE)&test_val_len[0]; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(BUFFER_length(input_buff)); STRICT_EXPECTED_CALL(BUFFER_u_char(input_buff)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(STRING_construct(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act result = Base32_Encode(input_buff); //assert ASSERT_ARE_EQUAL(char_ptr, test_val_len[0].base32_data, (const char*)result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup my_STRING_delete(result); } /* Codes_SRS_BASE32_07_008: [ If source is NULL Base32_Decode_String shall return NULL. ] */ TEST_FUNCTION(Base32_Decode_String_source_NULL_fail) { //arrange BUFFER_HANDLE result; //act result = Base32_Decode_String(NULL); //assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } /* Codes_SRS_BASE32_07_021: [ If the source length is not evenly divisible by 8, base32_decode_impl shall return NULL. ] */ TEST_FUNCTION(Base32_Decode_String_invalid_source_fail) { //arrange BUFFER_HANDLE result; //act result = Base32_Decode_String("invalid_string"); //assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(result); } TEST_FUNCTION(Base32_Decode_String_success) { //arrange BUFFER_HANDLE result; size_t index; size_t num_elements = sizeof(test_val_len) / sizeof(test_val_len[0]); //act for (index = 0; index < num_elements; index++) { char tmp_msg[64]; result = Base32_Decode_String(test_val_len[index].base32_data); sprintf(tmp_msg, "Base32_Decode failure in test %zu", index); //assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(int, 0, memcmp(test_val_len[index].input_data, result, test_val_len[index].input_len), tmp_msg); //cleanup BUFFER_delete(result); } } /* Codes_SRS_BASE32_07_020: [ Base32_Decode_String shall call base32_decode_impl to decode the base64 value. ] */ /* Codes_SRS_BASE32_07_019: [ On success Base32_Decode_String shall return a BUFFER_HANDLE that contains the decoded bytes for source. ] */ TEST_FUNCTION(Base32_Decode_String_with_mocks_success) { //arrange BUFFER_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(BUFFER_create(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act result = Base32_Decode_String(test_val_len[0].base32_data); //assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(result); } /* Codes_SRS_BASE32_07_016: [ If source is NULL Base32_Decode shall return NULL. ] */ TEST_FUNCTION(Base32_Decode_source_NULL_fail) { //arrange BUFFER_HANDLE result; //act result = Base32_Decode(NULL); //assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } /* Codes_SRS_BASE32_07_017: [ On success Base32_Decode shall return a BUFFER_HANDLE that contains the decoded bytes for source. ] */ /* Codes_SRS_BASE32_07_018: [ Base32_Decode shall call base32_decode_impl to decode the base64 value. ] */ TEST_FUNCTION(Base32_Decode_succees) { //arrange BUFFER_HANDLE result; STRING_HANDLE input = STRING_construct(test_val_len[22].base32_data); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(BUFFER_create(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act result = Base32_Decode(input); //assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(int, 0, memcmp(test_val_len[22].input_data, result, test_val_len[22].input_len)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(result); STRING_delete(input); } /* Codes_SRS_BASE32_07_027: [ If the string in source value is NULL, Base32_Decode shall return NULL. ] */ TEST_FUNCTION(Base32_Decode_STRING_c_str_NULL_fail) { //arrange BUFFER_HANDLE result; STRING_HANDLE input = STRING_construct(test_val_len[22].base32_data); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(NULL); //act result = Base32_Decode(input); //assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup STRING_delete(input); } END_TEST_SUITE(base32_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base32_ut/main.c000066400000000000000000000004701362133436400333560ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(base32_ut, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base64_ut/000077500000000000000000000000001362133436400322725ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000010251362133436400347510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base64_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName base64_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/base64.c ../../src/strings.c ../../src/buffer.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) base64_ut.c000066400000000000000000003024521362133436400341610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base64_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } static void my_gballoc_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/base64.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" static const struct { size_t inputLength; const unsigned char* inputData; const char* expectedOutput; } testVector_BINARY_with_equal_signs[] = { {1,(const unsigned char*)"\x00", "AA==" }, {1,(const unsigned char*)"\x01", "AQ==" }, {1,(const unsigned char*)"\x02", "Ag==" }, {1,(const unsigned char*)"\x03", "Aw==" }, {1,(const unsigned char*)"\x04", "BA==" }, {1,(const unsigned char*)"\x05", "BQ==" }, {1,(const unsigned char*)"\x06", "Bg==" }, {1,(const unsigned char*)"\x07", "Bw==" }, {1,(const unsigned char*)"\x08", "CA==" }, {1,(const unsigned char*)"\x09", "CQ==" }, {1,(const unsigned char*)"\x0a", "Cg==" }, {1,(const unsigned char*)"\x0b", "Cw==" }, {1,(const unsigned char*)"\x0c", "DA==" }, {1,(const unsigned char*)"\x0d", "DQ==" }, {1,(const unsigned char*)"\x0e", "Dg==" }, {1,(const unsigned char*)"\x0f", "Dw==" }, {1,(const unsigned char*)"\x10", "EA==" }, {1,(const unsigned char*)"\x11", "EQ==" }, {1,(const unsigned char*)"\x12", "Eg==" }, {1,(const unsigned char*)"\x13", "Ew==" }, {1,(const unsigned char*)"\x14", "FA==" }, {1,(const unsigned char*)"\x15", "FQ==" }, {1,(const unsigned char*)"\x16", "Fg==" }, {1,(const unsigned char*)"\x17", "Fw==" }, {1,(const unsigned char*)"\x18", "GA==" }, {1,(const unsigned char*)"\x19", "GQ==" }, {1,(const unsigned char*)"\x1a", "Gg==" }, {1,(const unsigned char*)"\x1b", "Gw==" }, {1,(const unsigned char*)"\x1c", "HA==" }, {1,(const unsigned char*)"\x1d", "HQ==" }, {1,(const unsigned char*)"\x1e", "Hg==" }, {1,(const unsigned char*)"\x1f", "Hw==" }, {1,(const unsigned char*)"\x20", "IA==" }, {1,(const unsigned char*)"\x21", "IQ==" }, {1,(const unsigned char*)"\x22", "Ig==" }, {1,(const unsigned char*)"\x23", "Iw==" }, {1,(const unsigned char*)"\x24", "JA==" }, {1,(const unsigned char*)"\x25", "JQ==" }, {1,(const unsigned char*)"\x26", "Jg==" }, {1,(const unsigned char*)"\x27", "Jw==" }, {1,(const unsigned char*)"\x28", "KA==" }, {1,(const unsigned char*)"\x29", "KQ==" }, {1,(const unsigned char*)"\x2a", "Kg==" }, {1,(const unsigned char*)"\x2b", "Kw==" }, {1,(const unsigned char*)"\x2c", "LA==" }, {1,(const unsigned char*)"\x2d", "LQ==" }, {1,(const unsigned char*)"\x2e", "Lg==" }, {1,(const unsigned char*)"\x2f", "Lw==" }, {1,(const unsigned char*)"\x30", "MA==" }, {1,(const unsigned char*)"\x31", "MQ==" }, {1,(const unsigned char*)"\x32", "Mg==" }, {1,(const unsigned char*)"\x33", "Mw==" }, {1,(const unsigned char*)"\x34", "NA==" }, {1,(const unsigned char*)"\x35", "NQ==" }, {1,(const unsigned char*)"\x36", "Ng==" }, {1,(const unsigned char*)"\x37", "Nw==" }, {1,(const unsigned char*)"\x38", "OA==" }, {1,(const unsigned char*)"\x39", "OQ==" }, {1,(const unsigned char*)"\x3a", "Og==" }, {1,(const unsigned char*)"\x3b", "Ow==" }, {1,(const unsigned char*)"\x3c", "PA==" }, {1,(const unsigned char*)"\x3d", "PQ==" }, {1,(const unsigned char*)"\x3e", "Pg==" }, {1,(const unsigned char*)"\x3f", "Pw==" }, {1,(const unsigned char*)"\x40", "QA==" }, {1,(const unsigned char*)"\x41", "QQ==" }, {1,(const unsigned char*)"\x42", "Qg==" }, {1,(const unsigned char*)"\x43", "Qw==" }, {1,(const unsigned char*)"\x44", "RA==" }, {1,(const unsigned char*)"\x45", "RQ==" }, {1,(const unsigned char*)"\x46", "Rg==" }, {1,(const unsigned char*)"\x47", "Rw==" }, {1,(const unsigned char*)"\x48", "SA==" }, {1,(const unsigned char*)"\x49", "SQ==" }, {1,(const unsigned char*)"\x4a", "Sg==" }, {1,(const unsigned char*)"\x4b", "Sw==" }, {1,(const unsigned char*)"\x4c", "TA==" }, {1,(const unsigned char*)"\x4d", "TQ==" }, {1,(const unsigned char*)"\x4e", "Tg==" }, {1,(const unsigned char*)"\x4f", "Tw==" }, {1,(const unsigned char*)"\x50", "UA==" }, {1,(const unsigned char*)"\x51", "UQ==" }, {1,(const unsigned char*)"\x52", "Ug==" }, {1,(const unsigned char*)"\x53", "Uw==" }, {1,(const unsigned char*)"\x54", "VA==" }, {1,(const unsigned char*)"\x55", "VQ==" }, {1,(const unsigned char*)"\x56", "Vg==" }, {1,(const unsigned char*)"\x57", "Vw==" }, {1,(const unsigned char*)"\x58", "WA==" }, {1,(const unsigned char*)"\x59", "WQ==" }, {1,(const unsigned char*)"\x5a", "Wg==" }, {1,(const unsigned char*)"\x5b", "Ww==" }, {1,(const unsigned char*)"\x5c", "XA==" }, {1,(const unsigned char*)"\x5d", "XQ==" }, {1,(const unsigned char*)"\x5e", "Xg==" }, {1,(const unsigned char*)"\x5f", "Xw==" }, {1,(const unsigned char*)"\x60", "YA==" }, {1,(const unsigned char*)"\x61", "YQ==" }, {1,(const unsigned char*)"\x62", "Yg==" }, {1,(const unsigned char*)"\x63", "Yw==" }, {1,(const unsigned char*)"\x64", "ZA==" }, {1,(const unsigned char*)"\x65", "ZQ==" }, {1,(const unsigned char*)"\x66", "Zg==" }, {1,(const unsigned char*)"\x67", "Zw==" }, {1,(const unsigned char*)"\x68", "aA==" }, {1,(const unsigned char*)"\x69", "aQ==" }, {1,(const unsigned char*)"\x6a", "ag==" }, {1,(const unsigned char*)"\x6b", "aw==" }, {1,(const unsigned char*)"\x6c", "bA==" }, {1,(const unsigned char*)"\x6d", "bQ==" }, {1,(const unsigned char*)"\x6e", "bg==" }, {1,(const unsigned char*)"\x6f", "bw==" }, {1,(const unsigned char*)"\x70", "cA==" }, {1,(const unsigned char*)"\x71", "cQ==" }, {1,(const unsigned char*)"\x72", "cg==" }, {1,(const unsigned char*)"\x73", "cw==" }, {1,(const unsigned char*)"\x74", "dA==" }, {1,(const unsigned char*)"\x75", "dQ==" }, {1,(const unsigned char*)"\x76", "dg==" }, {1,(const unsigned char*)"\x77", "dw==" }, {1,(const unsigned char*)"\x78", "eA==" }, {1,(const unsigned char*)"\x79", "eQ==" }, {1,(const unsigned char*)"\x7a", "eg==" }, {1,(const unsigned char*)"\x7b", "ew==" }, {1,(const unsigned char*)"\x7c", "fA==" }, {1,(const unsigned char*)"\x7d", "fQ==" }, {1,(const unsigned char*)"\x7e", "fg==" }, {1,(const unsigned char*)"\x7f", "fw==" }, {1,(const unsigned char*)"\x80", "gA==" }, {1,(const unsigned char*)"\x81", "gQ==" }, {1,(const unsigned char*)"\x82", "gg==" }, {1,(const unsigned char*)"\x83", "gw==" }, {1,(const unsigned char*)"\x84", "hA==" }, {1,(const unsigned char*)"\x85", "hQ==" }, {1,(const unsigned char*)"\x86", "hg==" }, {1,(const unsigned char*)"\x87", "hw==" }, {1,(const unsigned char*)"\x88", "iA==" }, {1,(const unsigned char*)"\x89", "iQ==" }, {1,(const unsigned char*)"\x8a", "ig==" }, {1,(const unsigned char*)"\x8b", "iw==" }, {1,(const unsigned char*)"\x8c", "jA==" }, {1,(const unsigned char*)"\x8d", "jQ==" }, {1,(const unsigned char*)"\x8e", "jg==" }, {1,(const unsigned char*)"\x8f", "jw==" }, {1,(const unsigned char*)"\x90", "kA==" }, {1,(const unsigned char*)"\x91", "kQ==" }, {1,(const unsigned char*)"\x92", "kg==" }, {1,(const unsigned char*)"\x93", "kw==" }, {1,(const unsigned char*)"\x94", "lA==" }, {1,(const unsigned char*)"\x95", "lQ==" }, {1,(const unsigned char*)"\x96", "lg==" }, {1,(const unsigned char*)"\x97", "lw==" }, {1,(const unsigned char*)"\x98", "mA==" }, {1,(const unsigned char*)"\x99", "mQ==" }, {1,(const unsigned char*)"\x9a", "mg==" }, {1,(const unsigned char*)"\x9b", "mw==" }, {1,(const unsigned char*)"\x9c", "nA==" }, {1,(const unsigned char*)"\x9d", "nQ==" }, {1,(const unsigned char*)"\x9e", "ng==" }, {1,(const unsigned char*)"\x9f", "nw==" }, {1,(const unsigned char*)"\xa0", "oA==" }, {1,(const unsigned char*)"\xa1", "oQ==" }, {1,(const unsigned char*)"\xa2", "og==" }, {1,(const unsigned char*)"\xa3", "ow==" }, {1,(const unsigned char*)"\xa4", "pA==" }, {1,(const unsigned char*)"\xa5", "pQ==" }, {1,(const unsigned char*)"\xa6", "pg==" }, {1,(const unsigned char*)"\xa7", "pw==" }, {1,(const unsigned char*)"\xa8", "qA==" }, {1,(const unsigned char*)"\xa9", "qQ==" }, {1,(const unsigned char*)"\xaa", "qg==" }, {1,(const unsigned char*)"\xab", "qw==" }, {1,(const unsigned char*)"\xac", "rA==" }, {1,(const unsigned char*)"\xad", "rQ==" }, {1,(const unsigned char*)"\xae", "rg==" }, {1,(const unsigned char*)"\xaf", "rw==" }, {1,(const unsigned char*)"\xb0", "sA==" }, {1,(const unsigned char*)"\xb1", "sQ==" }, {1,(const unsigned char*)"\xb2", "sg==" }, {1,(const unsigned char*)"\xb3", "sw==" }, {1,(const unsigned char*)"\xb4", "tA==" }, {1,(const unsigned char*)"\xb5", "tQ==" }, {1,(const unsigned char*)"\xb6", "tg==" }, {1,(const unsigned char*)"\xb7", "tw==" }, {1,(const unsigned char*)"\xb8", "uA==" }, {1,(const unsigned char*)"\xb9", "uQ==" }, {1,(const unsigned char*)"\xba", "ug==" }, {1,(const unsigned char*)"\xbb", "uw==" }, {1,(const unsigned char*)"\xbc", "vA==" }, {1,(const unsigned char*)"\xbd", "vQ==" }, {1,(const unsigned char*)"\xbe", "vg==" }, {1,(const unsigned char*)"\xbf", "vw==" }, {1,(const unsigned char*)"\xc0", "wA==" }, {1,(const unsigned char*)"\xc1", "wQ==" }, {1,(const unsigned char*)"\xc2", "wg==" }, {1,(const unsigned char*)"\xc3", "ww==" }, {1,(const unsigned char*)"\xc4", "xA==" }, {1,(const unsigned char*)"\xc5", "xQ==" }, {1,(const unsigned char*)"\xc6", "xg==" }, {1,(const unsigned char*)"\xc7", "xw==" }, {1,(const unsigned char*)"\xc8", "yA==" }, {1,(const unsigned char*)"\xc9", "yQ==" }, {1,(const unsigned char*)"\xca", "yg==" }, {1,(const unsigned char*)"\xcb", "yw==" }, {1,(const unsigned char*)"\xcc", "zA==" }, {1,(const unsigned char*)"\xcd", "zQ==" }, {1,(const unsigned char*)"\xce", "zg==" }, {1,(const unsigned char*)"\xcf", "zw==" }, {1,(const unsigned char*)"\xd0", "0A==" }, {1,(const unsigned char*)"\xd1", "0Q==" }, {1,(const unsigned char*)"\xd2", "0g==" }, {1,(const unsigned char*)"\xd3", "0w==" }, {1,(const unsigned char*)"\xd4", "1A==" }, {1,(const unsigned char*)"\xd5", "1Q==" }, {1,(const unsigned char*)"\xd6", "1g==" }, {1,(const unsigned char*)"\xd7", "1w==" }, {1,(const unsigned char*)"\xd8", "2A==" }, {1,(const unsigned char*)"\xd9", "2Q==" }, {1,(const unsigned char*)"\xda", "2g==" }, {1,(const unsigned char*)"\xdb", "2w==" }, {1,(const unsigned char*)"\xdc", "3A==" }, {1,(const unsigned char*)"\xdd", "3Q==" }, {1,(const unsigned char*)"\xde", "3g==" }, {1,(const unsigned char*)"\xdf", "3w==" }, {1,(const unsigned char*)"\xe0", "4A==" }, {1,(const unsigned char*)"\xe1", "4Q==" }, {1,(const unsigned char*)"\xe2", "4g==" }, {1,(const unsigned char*)"\xe3", "4w==" }, {1,(const unsigned char*)"\xe4", "5A==" }, {1,(const unsigned char*)"\xe5", "5Q==" }, {1,(const unsigned char*)"\xe6", "5g==" }, {1,(const unsigned char*)"\xe7", "5w==" }, {1,(const unsigned char*)"\xe8", "6A==" }, {1,(const unsigned char*)"\xe9", "6Q==" }, {1,(const unsigned char*)"\xea", "6g==" }, {1,(const unsigned char*)"\xeb", "6w==" }, {1,(const unsigned char*)"\xec", "7A==" }, {1,(const unsigned char*)"\xed", "7Q==" }, {1,(const unsigned char*)"\xee", "7g==" }, {1,(const unsigned char*)"\xef", "7w==" }, {1,(const unsigned char*)"\xf0", "8A==" }, {1,(const unsigned char*)"\xf1", "8Q==" }, {1,(const unsigned char*)"\xf2", "8g==" }, {1,(const unsigned char*)"\xf3", "8w==" }, {1,(const unsigned char*)"\xf4", "9A==" }, {1,(const unsigned char*)"\xf5", "9Q==" }, {1,(const unsigned char*)"\xf6", "9g==" }, {1,(const unsigned char*)"\xf7", "9w==" }, {1,(const unsigned char*)"\xf8", "+A==" }, {1,(const unsigned char*)"\xf9", "+Q==" }, {1,(const unsigned char*)"\xfa", "+g==" }, {1,(const unsigned char*)"\xfb", "+w==" }, {1,(const unsigned char*)"\xfc", "/A==" }, {1,(const unsigned char*)"\xfd", "/Q==" }, {1,(const unsigned char*)"\xfe", "/g==" }, {1,(const unsigned char*)"\xff", "/w==" }, {2,(const unsigned char*)"\x00\x00", "AAA=" }, {2,(const unsigned char*)"\x00\x11", "ABE=" }, {2,(const unsigned char*)"\x00\x22", "ACI=" }, {2,(const unsigned char*)"\x00\x33", "ADM=" }, {2,(const unsigned char*)"\x00\x44", "AEQ=" }, {2,(const unsigned char*)"\x00\x55", "AFU=" }, {2,(const unsigned char*)"\x00\x66", "AGY=" }, {2,(const unsigned char*)"\x00\x77", "AHc=" }, {2,(const unsigned char*)"\x00\x88", "AIg=" }, {2,(const unsigned char*)"\x00\x99", "AJk=" }, {2,(const unsigned char*)"\x00\xaa", "AKo=" }, {2,(const unsigned char*)"\x00\xbb", "ALs=" }, {2,(const unsigned char*)"\x00\xcc", "AMw=" }, {2,(const unsigned char*)"\x00\xdd", "AN0=" }, {2,(const unsigned char*)"\x00\xee", "AO4=" }, {2,(const unsigned char*)"\x00\xff", "AP8=" }, {2,(const unsigned char*)"\x11\x00", "EQA=" }, {2,(const unsigned char*)"\x11\x11", "ERE=" }, {2,(const unsigned char*)"\x11\x22", "ESI=" }, {2,(const unsigned char*)"\x11\x33", "ETM=" }, {2,(const unsigned char*)"\x11\x44", "EUQ=" }, {2,(const unsigned char*)"\x11\x55", "EVU=" }, {2,(const unsigned char*)"\x11\x66", "EWY=" }, {2,(const unsigned char*)"\x11\x77", "EXc=" }, {2,(const unsigned char*)"\x11\x88", "EYg=" }, {2,(const unsigned char*)"\x11\x99", "EZk=" }, {2,(const unsigned char*)"\x11\xaa", "Eao=" }, {2,(const unsigned char*)"\x11\xbb", "Ebs=" }, {2,(const unsigned char*)"\x11\xcc", "Ecw=" }, {2,(const unsigned char*)"\x11\xdd", "Ed0=" }, {2,(const unsigned char*)"\x11\xee", "Ee4=" }, {2,(const unsigned char*)"\x11\xff", "Ef8=" }, {2,(const unsigned char*)"\x22\x00", "IgA=" }, {2,(const unsigned char*)"\x22\x11", "IhE=" }, {2,(const unsigned char*)"\x22\x22", "IiI=" }, {2,(const unsigned char*)"\x22\x33", "IjM=" }, {2,(const unsigned char*)"\x22\x44", "IkQ=" }, {2,(const unsigned char*)"\x22\x55", "IlU=" }, {2,(const unsigned char*)"\x22\x66", "ImY=" }, {2,(const unsigned char*)"\x22\x77", "Inc=" }, {2,(const unsigned char*)"\x22\x88", "Iog=" }, {2,(const unsigned char*)"\x22\x99", "Ipk=" }, {2,(const unsigned char*)"\x22\xaa", "Iqo=" }, {2,(const unsigned char*)"\x22\xbb", "Irs=" }, {2,(const unsigned char*)"\x22\xcc", "Isw=" }, {2,(const unsigned char*)"\x22\xdd", "It0=" }, {2,(const unsigned char*)"\x22\xee", "Iu4=" }, {2,(const unsigned char*)"\x22\xff", "Iv8=" }, {2,(const unsigned char*)"\x33\x00", "MwA=" }, {2,(const unsigned char*)"\x33\x11", "MxE=" }, {2,(const unsigned char*)"\x33\x22", "MyI=" }, {2,(const unsigned char*)"\x33\x33", "MzM=" }, {2,(const unsigned char*)"\x33\x44", "M0Q=" }, {2,(const unsigned char*)"\x33\x55", "M1U=" }, {2,(const unsigned char*)"\x33\x66", "M2Y=" }, {2,(const unsigned char*)"\x33\x77", "M3c=" }, {2,(const unsigned char*)"\x33\x88", "M4g=" }, {2,(const unsigned char*)"\x33\x99", "M5k=" }, {2,(const unsigned char*)"\x33\xaa", "M6o=" }, {2,(const unsigned char*)"\x33\xbb", "M7s=" }, {2,(const unsigned char*)"\x33\xcc", "M8w=" }, {2,(const unsigned char*)"\x33\xdd", "M90=" }, {2,(const unsigned char*)"\x33\xee", "M+4=" }, {2,(const unsigned char*)"\x33\xff", "M/8=" }, {2,(const unsigned char*)"\x44\x00", "RAA=" }, {2,(const unsigned char*)"\x44\x11", "RBE=" }, {2,(const unsigned char*)"\x44\x22", "RCI=" }, {2,(const unsigned char*)"\x44\x33", "RDM=" }, {2,(const unsigned char*)"\x44\x44", "REQ=" }, {2,(const unsigned char*)"\x44\x55", "RFU=" }, {2,(const unsigned char*)"\x44\x66", "RGY=" }, {2,(const unsigned char*)"\x44\x77", "RHc=" }, {2,(const unsigned char*)"\x44\x88", "RIg=" }, {2,(const unsigned char*)"\x44\x99", "RJk=" }, {2,(const unsigned char*)"\x44\xaa", "RKo=" }, {2,(const unsigned char*)"\x44\xbb", "RLs=" }, {2,(const unsigned char*)"\x44\xcc", "RMw=" }, {2,(const unsigned char*)"\x44\xdd", "RN0=" }, {2,(const unsigned char*)"\x44\xee", "RO4=" }, {2,(const unsigned char*)"\x44\xff", "RP8=" }, {2,(const unsigned char*)"\x55\x00", "VQA=" }, {2,(const unsigned char*)"\x55\x11", "VRE=" }, {2,(const unsigned char*)"\x55\x22", "VSI=" }, {2,(const unsigned char*)"\x55\x33", "VTM=" }, {2,(const unsigned char*)"\x55\x44", "VUQ=" }, {2,(const unsigned char*)"\x55\x55", "VVU=" }, {2,(const unsigned char*)"\x55\x66", "VWY=" }, {2,(const unsigned char*)"\x55\x77", "VXc=" }, {2,(const unsigned char*)"\x55\x88", "VYg=" }, {2,(const unsigned char*)"\x55\x99", "VZk=" }, {2,(const unsigned char*)"\x55\xaa", "Vao=" }, {2,(const unsigned char*)"\x55\xbb", "Vbs=" }, {2,(const unsigned char*)"\x55\xcc", "Vcw=" }, {2,(const unsigned char*)"\x55\xdd", "Vd0=" }, {2,(const unsigned char*)"\x55\xee", "Ve4=" }, {2,(const unsigned char*)"\x55\xff", "Vf8=" }, {2,(const unsigned char*)"\x66\x00", "ZgA=" }, {2,(const unsigned char*)"\x66\x11", "ZhE=" }, {2,(const unsigned char*)"\x66\x22", "ZiI=" }, {2,(const unsigned char*)"\x66\x33", "ZjM=" }, {2,(const unsigned char*)"\x66\x44", "ZkQ=" }, {2,(const unsigned char*)"\x66\x55", "ZlU=" }, {2,(const unsigned char*)"\x66\x66", "ZmY=" }, {2,(const unsigned char*)"\x66\x77", "Znc=" }, {2,(const unsigned char*)"\x66\x88", "Zog=" }, {2,(const unsigned char*)"\x66\x99", "Zpk=" }, {2,(const unsigned char*)"\x66\xaa", "Zqo=" }, {2,(const unsigned char*)"\x66\xbb", "Zrs=" }, {2,(const unsigned char*)"\x66\xcc", "Zsw=" }, {2,(const unsigned char*)"\x66\xdd", "Zt0=" }, {2,(const unsigned char*)"\x66\xee", "Zu4=" }, {2,(const unsigned char*)"\x66\xff", "Zv8=" }, {2,(const unsigned char*)"\x77\x00", "dwA=" }, {2,(const unsigned char*)"\x77\x11", "dxE=" }, {2,(const unsigned char*)"\x77\x22", "dyI=" }, {2,(const unsigned char*)"\x77\x33", "dzM=" }, {2,(const unsigned char*)"\x77\x44", "d0Q=" }, {2,(const unsigned char*)"\x77\x55", "d1U=" }, {2,(const unsigned char*)"\x77\x66", "d2Y=" }, {2,(const unsigned char*)"\x77\x77", "d3c=" }, {2,(const unsigned char*)"\x77\x88", "d4g=" }, {2,(const unsigned char*)"\x77\x99", "d5k=" }, {2,(const unsigned char*)"\x77\xaa", "d6o=" }, {2,(const unsigned char*)"\x77\xbb", "d7s=" }, {2,(const unsigned char*)"\x77\xcc", "d8w=" }, {2,(const unsigned char*)"\x77\xdd", "d90=" }, {2,(const unsigned char*)"\x77\xee", "d+4=" }, {2,(const unsigned char*)"\x77\xff", "d/8=" }, {2,(const unsigned char*)"\x88\x00", "iAA=" }, {2,(const unsigned char*)"\x88\x11", "iBE=" }, {2,(const unsigned char*)"\x88\x22", "iCI=" }, {2,(const unsigned char*)"\x88\x33", "iDM=" }, {2,(const unsigned char*)"\x88\x44", "iEQ=" }, {2,(const unsigned char*)"\x88\x55", "iFU=" }, {2,(const unsigned char*)"\x88\x66", "iGY=" }, {2,(const unsigned char*)"\x88\x77", "iHc=" }, {2,(const unsigned char*)"\x88\x88", "iIg=" }, {2,(const unsigned char*)"\x88\x99", "iJk=" }, {2,(const unsigned char*)"\x88\xaa", "iKo=" }, {2,(const unsigned char*)"\x88\xbb", "iLs=" }, {2,(const unsigned char*)"\x88\xcc", "iMw=" }, {2,(const unsigned char*)"\x88\xdd", "iN0=" }, {2,(const unsigned char*)"\x88\xee", "iO4=" }, {2,(const unsigned char*)"\x88\xff", "iP8=" }, {2,(const unsigned char*)"\x99\x00", "mQA=" }, {2,(const unsigned char*)"\x99\x11", "mRE=" }, {2,(const unsigned char*)"\x99\x22", "mSI=" }, {2,(const unsigned char*)"\x99\x33", "mTM=" }, {2,(const unsigned char*)"\x99\x44", "mUQ=" }, {2,(const unsigned char*)"\x99\x55", "mVU=" }, {2,(const unsigned char*)"\x99\x66", "mWY=" }, {2,(const unsigned char*)"\x99\x77", "mXc=" }, {2,(const unsigned char*)"\x99\x88", "mYg=" }, {2,(const unsigned char*)"\x99\x99", "mZk=" }, {2,(const unsigned char*)"\x99\xaa", "mao=" }, {2,(const unsigned char*)"\x99\xbb", "mbs=" }, {2,(const unsigned char*)"\x99\xcc", "mcw=" }, {2,(const unsigned char*)"\x99\xdd", "md0=" }, {2,(const unsigned char*)"\x99\xee", "me4=" }, {2,(const unsigned char*)"\x99\xff", "mf8=" }, {2,(const unsigned char*)"\xaa\x00", "qgA=" }, {2,(const unsigned char*)"\xaa\x11", "qhE=" }, {2,(const unsigned char*)"\xaa\x22", "qiI=" }, {2,(const unsigned char*)"\xaa\x33", "qjM=" }, {2,(const unsigned char*)"\xaa\x44", "qkQ=" }, {2,(const unsigned char*)"\xaa\x55", "qlU=" }, {2,(const unsigned char*)"\xaa\x66", "qmY=" }, {2,(const unsigned char*)"\xaa\x77", "qnc=" }, {2,(const unsigned char*)"\xaa\x88", "qog=" }, {2,(const unsigned char*)"\xaa\x99", "qpk=" }, {2,(const unsigned char*)"\xaa\xaa", "qqo=" }, {2,(const unsigned char*)"\xaa\xbb", "qrs=" }, {2,(const unsigned char*)"\xaa\xcc", "qsw=" }, {2,(const unsigned char*)"\xaa\xdd", "qt0=" }, {2,(const unsigned char*)"\xaa\xee", "qu4=" }, {2,(const unsigned char*)"\xaa\xff", "qv8=" }, {2,(const unsigned char*)"\xbb\x00", "uwA=" }, {2,(const unsigned char*)"\xbb\x11", "uxE=" }, {2,(const unsigned char*)"\xbb\x22", "uyI=" }, {2,(const unsigned char*)"\xbb\x33", "uzM=" }, {2,(const unsigned char*)"\xbb\x44", "u0Q=" }, {2,(const unsigned char*)"\xbb\x55", "u1U=" }, {2,(const unsigned char*)"\xbb\x66", "u2Y=" }, {2,(const unsigned char*)"\xbb\x77", "u3c=" }, {2,(const unsigned char*)"\xbb\x88", "u4g=" }, {2,(const unsigned char*)"\xbb\x99", "u5k=" }, {2,(const unsigned char*)"\xbb\xaa", "u6o=" }, {2,(const unsigned char*)"\xbb\xbb", "u7s=" }, {2,(const unsigned char*)"\xbb\xcc", "u8w=" }, {2,(const unsigned char*)"\xbb\xdd", "u90=" }, {2,(const unsigned char*)"\xbb\xee", "u+4=" }, {2,(const unsigned char*)"\xbb\xff", "u/8=" }, {2,(const unsigned char*)"\xcc\x00", "zAA=" }, {2,(const unsigned char*)"\xcc\x11", "zBE=" }, {2,(const unsigned char*)"\xcc\x22", "zCI=" }, {2,(const unsigned char*)"\xcc\x33", "zDM=" }, {2,(const unsigned char*)"\xcc\x44", "zEQ=" }, {2,(const unsigned char*)"\xcc\x55", "zFU=" }, {2,(const unsigned char*)"\xcc\x66", "zGY=" }, {2,(const unsigned char*)"\xcc\x77", "zHc=" }, {2,(const unsigned char*)"\xcc\x88", "zIg=" }, {2,(const unsigned char*)"\xcc\x99", "zJk=" }, {2,(const unsigned char*)"\xcc\xaa", "zKo=" }, {2,(const unsigned char*)"\xcc\xbb", "zLs=" }, {2,(const unsigned char*)"\xcc\xcc", "zMw=" }, {2,(const unsigned char*)"\xcc\xdd", "zN0=" }, {2,(const unsigned char*)"\xcc\xee", "zO4=" }, {2,(const unsigned char*)"\xcc\xff", "zP8=" }, {2,(const unsigned char*)"\xdd\x00", "3QA=" }, {2,(const unsigned char*)"\xdd\x11", "3RE=" }, {2,(const unsigned char*)"\xdd\x22", "3SI=" }, {2,(const unsigned char*)"\xdd\x33", "3TM=" }, {2,(const unsigned char*)"\xdd\x44", "3UQ=" }, {2,(const unsigned char*)"\xdd\x55", "3VU=" }, {2,(const unsigned char*)"\xdd\x66", "3WY=" }, {2,(const unsigned char*)"\xdd\x77", "3Xc=" }, {2,(const unsigned char*)"\xdd\x88", "3Yg=" }, {2,(const unsigned char*)"\xdd\x99", "3Zk=" }, {2,(const unsigned char*)"\xdd\xaa", "3ao=" }, {2,(const unsigned char*)"\xdd\xbb", "3bs=" }, {2,(const unsigned char*)"\xdd\xcc", "3cw=" }, {2,(const unsigned char*)"\xdd\xdd", "3d0=" }, {2,(const unsigned char*)"\xdd\xee", "3e4=" }, {2,(const unsigned char*)"\xdd\xff", "3f8=" }, {2,(const unsigned char*)"\xee\x00", "7gA=" }, {2,(const unsigned char*)"\xee\x11", "7hE=" }, {2,(const unsigned char*)"\xee\x22", "7iI=" }, {2,(const unsigned char*)"\xee\x33", "7jM=" }, {2,(const unsigned char*)"\xee\x44", "7kQ=" }, {2,(const unsigned char*)"\xee\x55", "7lU=" }, {2,(const unsigned char*)"\xee\x66", "7mY=" }, {2,(const unsigned char*)"\xee\x77", "7nc=" }, {2,(const unsigned char*)"\xee\x88", "7og=" }, {2,(const unsigned char*)"\xee\x99", "7pk=" }, {2,(const unsigned char*)"\xee\xaa", "7qo=" }, {2,(const unsigned char*)"\xee\xbb", "7rs=" }, {2,(const unsigned char*)"\xee\xcc", "7sw=" }, {2,(const unsigned char*)"\xee\xdd", "7t0=" }, {2,(const unsigned char*)"\xee\xee", "7u4=" }, {2,(const unsigned char*)"\xee\xff", "7v8=" }, {2,(const unsigned char*)"\xff\x00", "/wA=" }, {2,(const unsigned char*)"\xff\x11", "/xE=" }, {2,(const unsigned char*)"\xff\x22", "/yI=" }, {2,(const unsigned char*)"\xff\x33", "/zM=" }, {2,(const unsigned char*)"\xff\x44", "/0Q=" }, {2,(const unsigned char*)"\xff\x55", "/1U=" }, {2,(const unsigned char*)"\xff\x66", "/2Y=" }, {2,(const unsigned char*)"\xff\x77", "/3c=" }, {2,(const unsigned char*)"\xff\x88", "/4g=" }, {2,(const unsigned char*)"\xff\x99", "/5k=" }, {2,(const unsigned char*)"\xff\xaa", "/6o=" }, {2,(const unsigned char*)"\xff\xbb", "/7s=" }, {2,(const unsigned char*)"\xff\xcc", "/8w=" }, {2,(const unsigned char*)"\xff\xdd", "/90=" }, {2,(const unsigned char*)"\xff\xee", "/+4=" }, {2,(const unsigned char*)"\xff\xff", "//8=" }, {3,(const unsigned char*)"\x00\x00\x00", "AAAA" }, {3,(const unsigned char*)"\x00\x00\x2f", "AAAv" }, {3,(const unsigned char*)"\x00\x00\x5e", "AABe" }, {3,(const unsigned char*)"\x00\x00\x8d", "AACN" }, {3,(const unsigned char*)"\x00\x00\xbc", "AAC8" }, {3,(const unsigned char*)"\x00\x00\xeb", "AADr" }, {3,(const unsigned char*)"\x00\x2f\x00", "AC8A" }, {3,(const unsigned char*)"\x00\x2f\x2f", "AC8v" }, {3,(const unsigned char*)"\x00\x2f\x5e", "AC9e" }, {3,(const unsigned char*)"\x00\x2f\x8d", "AC+N" }, {3,(const unsigned char*)"\x00\x2f\xbc", "AC+8" }, {3,(const unsigned char*)"\x00\x2f\xeb", "AC/r" }, {3,(const unsigned char*)"\x00\x5e\x00", "AF4A" }, {3,(const unsigned char*)"\x00\x5e\x2f", "AF4v" }, {3,(const unsigned char*)"\x00\x5e\x5e", "AF5e" }, {3,(const unsigned char*)"\x00\x5e\x8d", "AF6N" }, {3,(const unsigned char*)"\x00\x5e\xbc", "AF68" }, {3,(const unsigned char*)"\x00\x5e\xeb", "AF7r" }, {3,(const unsigned char*)"\x00\x8d\x00", "AI0A" }, {3,(const unsigned char*)"\x00\x8d\x2f", "AI0v" }, {3,(const unsigned char*)"\x00\x8d\x5e", "AI1e" }, {3,(const unsigned char*)"\x00\x8d\x8d", "AI2N" }, {3,(const unsigned char*)"\x00\x8d\xbc", "AI28" }, {3,(const unsigned char*)"\x00\x8d\xeb", "AI3r" }, {3,(const unsigned char*)"\x00\xbc\x00", "ALwA" }, {3,(const unsigned char*)"\x00\xbc\x2f", "ALwv" }, {3,(const unsigned char*)"\x00\xbc\x5e", "ALxe" }, {3,(const unsigned char*)"\x00\xbc\x8d", "ALyN" }, {3,(const unsigned char*)"\x00\xbc\xbc", "ALy8" }, {3,(const unsigned char*)"\x00\xbc\xeb", "ALzr" }, {3,(const unsigned char*)"\x00\xeb\x00", "AOsA" }, {3,(const unsigned char*)"\x00\xeb\x2f", "AOsv" }, {3,(const unsigned char*)"\x00\xeb\x5e", "AOte" }, {3,(const unsigned char*)"\x00\xeb\x8d", "AOuN" }, {3,(const unsigned char*)"\x00\xeb\xbc", "AOu8" }, {3,(const unsigned char*)"\x00\xeb\xeb", "AOvr" }, {3,(const unsigned char*)"\x2f\x00\x00", "LwAA" }, {3,(const unsigned char*)"\x2f\x00\x2f", "LwAv" }, {3,(const unsigned char*)"\x2f\x00\x5e", "LwBe" }, {3,(const unsigned char*)"\x2f\x00\x8d", "LwCN" }, {3,(const unsigned char*)"\x2f\x00\xbc", "LwC8" }, {3,(const unsigned char*)"\x2f\x00\xeb", "LwDr" }, {3,(const unsigned char*)"\x2f\x2f\x00", "Ly8A" }, {3,(const unsigned char*)"\x2f\x2f\x2f", "Ly8v" }, {3,(const unsigned char*)"\x2f\x2f\x5e", "Ly9e" }, {3,(const unsigned char*)"\x2f\x2f\x8d", "Ly+N" }, {3,(const unsigned char*)"\x2f\x2f\xbc", "Ly+8" }, {3,(const unsigned char*)"\x2f\x2f\xeb", "Ly/r" }, {3,(const unsigned char*)"\x2f\x5e\x00", "L14A" }, {3,(const unsigned char*)"\x2f\x5e\x2f", "L14v" }, {3,(const unsigned char*)"\x2f\x5e\x5e", "L15e" }, {3,(const unsigned char*)"\x2f\x5e\x8d", "L16N" }, {3,(const unsigned char*)"\x2f\x5e\xbc", "L168" }, {3,(const unsigned char*)"\x2f\x5e\xeb", "L17r" }, {3,(const unsigned char*)"\x2f\x8d\x00", "L40A" }, {3,(const unsigned char*)"\x2f\x8d\x2f", "L40v" }, {3,(const unsigned char*)"\x2f\x8d\x5e", "L41e" }, {3,(const unsigned char*)"\x2f\x8d\x8d", "L42N" }, {3,(const unsigned char*)"\x2f\x8d\xbc", "L428" }, {3,(const unsigned char*)"\x2f\x8d\xeb", "L43r" }, {3,(const unsigned char*)"\x2f\xbc\x00", "L7wA" }, {3,(const unsigned char*)"\x2f\xbc\x2f", "L7wv" }, {3,(const unsigned char*)"\x2f\xbc\x5e", "L7xe" }, {3,(const unsigned char*)"\x2f\xbc\x8d", "L7yN" }, {3,(const unsigned char*)"\x2f\xbc\xbc", "L7y8" }, {3,(const unsigned char*)"\x2f\xbc\xeb", "L7zr" }, {3,(const unsigned char*)"\x2f\xeb\x00", "L+sA" }, {3,(const unsigned char*)"\x2f\xeb\x2f", "L+sv" }, {3,(const unsigned char*)"\x2f\xeb\x5e", "L+te" }, {3,(const unsigned char*)"\x2f\xeb\x8d", "L+uN" }, {3,(const unsigned char*)"\x2f\xeb\xbc", "L+u8" }, {3,(const unsigned char*)"\x2f\xeb\xeb", "L+vr" }, {3,(const unsigned char*)"\x5e\x00\x00", "XgAA" }, {3,(const unsigned char*)"\x5e\x00\x2f", "XgAv" }, {3,(const unsigned char*)"\x5e\x00\x5e", "XgBe" }, {3,(const unsigned char*)"\x5e\x00\x8d", "XgCN" }, {3,(const unsigned char*)"\x5e\x00\xbc", "XgC8" }, {3,(const unsigned char*)"\x5e\x00\xeb", "XgDr" }, {3,(const unsigned char*)"\x5e\x2f\x00", "Xi8A" }, {3,(const unsigned char*)"\x5e\x2f\x2f", "Xi8v" }, {3,(const unsigned char*)"\x5e\x2f\x5e", "Xi9e" }, {3,(const unsigned char*)"\x5e\x2f\x8d", "Xi+N" }, {3,(const unsigned char*)"\x5e\x2f\xbc", "Xi+8" }, {3,(const unsigned char*)"\x5e\x2f\xeb", "Xi/r" }, {3,(const unsigned char*)"\x5e\x5e\x00", "Xl4A" }, {3,(const unsigned char*)"\x5e\x5e\x2f", "Xl4v" }, {3,(const unsigned char*)"\x5e\x5e\x5e", "Xl5e" }, {3,(const unsigned char*)"\x5e\x5e\x8d", "Xl6N" }, {3,(const unsigned char*)"\x5e\x5e\xbc", "Xl68" }, {3,(const unsigned char*)"\x5e\x5e\xeb", "Xl7r" }, {3,(const unsigned char*)"\x5e\x8d\x00", "Xo0A" }, {3,(const unsigned char*)"\x5e\x8d\x2f", "Xo0v" }, {3,(const unsigned char*)"\x5e\x8d\x5e", "Xo1e" }, {3,(const unsigned char*)"\x5e\x8d\x8d", "Xo2N" }, {3,(const unsigned char*)"\x5e\x8d\xbc", "Xo28" }, {3,(const unsigned char*)"\x5e\x8d\xeb", "Xo3r" }, {3,(const unsigned char*)"\x5e\xbc\x00", "XrwA" }, {3,(const unsigned char*)"\x5e\xbc\x2f", "Xrwv" }, {3,(const unsigned char*)"\x5e\xbc\x5e", "Xrxe" }, {3,(const unsigned char*)"\x5e\xbc\x8d", "XryN" }, {3,(const unsigned char*)"\x5e\xbc\xbc", "Xry8" }, {3,(const unsigned char*)"\x5e\xbc\xeb", "Xrzr" }, {3,(const unsigned char*)"\x5e\xeb\x00", "XusA" }, {3,(const unsigned char*)"\x5e\xeb\x2f", "Xusv" }, {3,(const unsigned char*)"\x5e\xeb\x5e", "Xute" }, {3,(const unsigned char*)"\x5e\xeb\x8d", "XuuN" }, {3,(const unsigned char*)"\x5e\xeb\xbc", "Xuu8" }, {3,(const unsigned char*)"\x5e\xeb\xeb", "Xuvr" }, {3,(const unsigned char*)"\x8d\x00\x00", "jQAA" }, {3,(const unsigned char*)"\x8d\x00\x2f", "jQAv" }, {3,(const unsigned char*)"\x8d\x00\x5e", "jQBe" }, {3,(const unsigned char*)"\x8d\x00\x8d", "jQCN" }, {3,(const unsigned char*)"\x8d\x00\xbc", "jQC8" }, {3,(const unsigned char*)"\x8d\x00\xeb", "jQDr" }, {3,(const unsigned char*)"\x8d\x2f\x00", "jS8A" }, {3,(const unsigned char*)"\x8d\x2f\x2f", "jS8v" }, {3,(const unsigned char*)"\x8d\x2f\x5e", "jS9e" }, {3,(const unsigned char*)"\x8d\x2f\x8d", "jS+N" }, {3,(const unsigned char*)"\x8d\x2f\xbc", "jS+8" }, {3,(const unsigned char*)"\x8d\x2f\xeb", "jS/r" }, {3,(const unsigned char*)"\x8d\x5e\x00", "jV4A" }, {3,(const unsigned char*)"\x8d\x5e\x2f", "jV4v" }, {3,(const unsigned char*)"\x8d\x5e\x5e", "jV5e" }, {3,(const unsigned char*)"\x8d\x5e\x8d", "jV6N" }, {3,(const unsigned char*)"\x8d\x5e\xbc", "jV68" }, {3,(const unsigned char*)"\x8d\x5e\xeb", "jV7r" }, {3,(const unsigned char*)"\x8d\x8d\x00", "jY0A" }, {3,(const unsigned char*)"\x8d\x8d\x2f", "jY0v" }, {3,(const unsigned char*)"\x8d\x8d\x5e", "jY1e" }, {3,(const unsigned char*)"\x8d\x8d\x8d", "jY2N" }, {3,(const unsigned char*)"\x8d\x8d\xbc", "jY28" }, {3,(const unsigned char*)"\x8d\x8d\xeb", "jY3r" }, {3,(const unsigned char*)"\x8d\xbc\x00", "jbwA" }, {3,(const unsigned char*)"\x8d\xbc\x2f", "jbwv" }, {3,(const unsigned char*)"\x8d\xbc\x5e", "jbxe" }, {3,(const unsigned char*)"\x8d\xbc\x8d", "jbyN" }, {3,(const unsigned char*)"\x8d\xbc\xbc", "jby8" }, {3,(const unsigned char*)"\x8d\xbc\xeb", "jbzr" }, {3,(const unsigned char*)"\x8d\xeb\x00", "jesA" }, {3,(const unsigned char*)"\x8d\xeb\x2f", "jesv" }, {3,(const unsigned char*)"\x8d\xeb\x5e", "jete" }, {3,(const unsigned char*)"\x8d\xeb\x8d", "jeuN" }, {3,(const unsigned char*)"\x8d\xeb\xbc", "jeu8" }, {3,(const unsigned char*)"\x8d\xeb\xeb", "jevr" }, {3,(const unsigned char*)"\xbc\x00\x00", "vAAA" }, {3,(const unsigned char*)"\xbc\x00\x2f", "vAAv" }, {3,(const unsigned char*)"\xbc\x00\x5e", "vABe" }, {3,(const unsigned char*)"\xbc\x00\x8d", "vACN" }, {3,(const unsigned char*)"\xbc\x00\xbc", "vAC8" }, {3,(const unsigned char*)"\xbc\x00\xeb", "vADr" }, {3,(const unsigned char*)"\xbc\x2f\x00", "vC8A" }, {3,(const unsigned char*)"\xbc\x2f\x2f", "vC8v" }, {3,(const unsigned char*)"\xbc\x2f\x5e", "vC9e" }, {3,(const unsigned char*)"\xbc\x2f\x8d", "vC+N" }, {3,(const unsigned char*)"\xbc\x2f\xbc", "vC+8" }, {3,(const unsigned char*)"\xbc\x2f\xeb", "vC/r" }, {3,(const unsigned char*)"\xbc\x5e\x00", "vF4A" }, {3,(const unsigned char*)"\xbc\x5e\x2f", "vF4v" }, {3,(const unsigned char*)"\xbc\x5e\x5e", "vF5e" }, {3,(const unsigned char*)"\xbc\x5e\x8d", "vF6N" }, {3,(const unsigned char*)"\xbc\x5e\xbc", "vF68" }, {3,(const unsigned char*)"\xbc\x5e\xeb", "vF7r" }, {3,(const unsigned char*)"\xbc\x8d\x00", "vI0A" }, {3,(const unsigned char*)"\xbc\x8d\x2f", "vI0v" }, {3,(const unsigned char*)"\xbc\x8d\x5e", "vI1e" }, {3,(const unsigned char*)"\xbc\x8d\x8d", "vI2N" }, {3,(const unsigned char*)"\xbc\x8d\xbc", "vI28" }, {3,(const unsigned char*)"\xbc\x8d\xeb", "vI3r" }, {3,(const unsigned char*)"\xbc\xbc\x00", "vLwA" }, {3,(const unsigned char*)"\xbc\xbc\x2f", "vLwv" }, {3,(const unsigned char*)"\xbc\xbc\x5e", "vLxe" }, {3,(const unsigned char*)"\xbc\xbc\x8d", "vLyN" }, {3,(const unsigned char*)"\xbc\xbc\xbc", "vLy8" }, {3,(const unsigned char*)"\xbc\xbc\xeb", "vLzr" }, {3,(const unsigned char*)"\xbc\xeb\x00", "vOsA" }, {3,(const unsigned char*)"\xbc\xeb\x2f", "vOsv" }, {3,(const unsigned char*)"\xbc\xeb\x5e", "vOte" }, {3,(const unsigned char*)"\xbc\xeb\x8d", "vOuN" }, {3,(const unsigned char*)"\xbc\xeb\xbc", "vOu8" }, {3,(const unsigned char*)"\xbc\xeb\xeb", "vOvr" }, {3,(const unsigned char*)"\xeb\x00\x00", "6wAA" }, {3,(const unsigned char*)"\xeb\x00\x2f", "6wAv" }, {3,(const unsigned char*)"\xeb\x00\x5e", "6wBe" }, {3,(const unsigned char*)"\xeb\x00\x8d", "6wCN" }, {3,(const unsigned char*)"\xeb\x00\xbc", "6wC8" }, {3,(const unsigned char*)"\xeb\x00\xeb", "6wDr" }, {3,(const unsigned char*)"\xeb\x2f\x00", "6y8A" }, {3,(const unsigned char*)"\xeb\x2f\x2f", "6y8v" }, {3,(const unsigned char*)"\xeb\x2f\x5e", "6y9e" }, {3,(const unsigned char*)"\xeb\x2f\x8d", "6y+N" }, {3,(const unsigned char*)"\xeb\x2f\xbc", "6y+8" }, {3,(const unsigned char*)"\xeb\x2f\xeb", "6y/r" }, {3,(const unsigned char*)"\xeb\x5e\x00", "614A" }, {3,(const unsigned char*)"\xeb\x5e\x2f", "614v" }, {3,(const unsigned char*)"\xeb\x5e\x5e", "615e" }, {3,(const unsigned char*)"\xeb\x5e\x8d", "616N" }, {3,(const unsigned char*)"\xeb\x5e\xbc", "6168" }, {3,(const unsigned char*)"\xeb\x5e\xeb", "617r" }, {3,(const unsigned char*)"\xeb\x8d\x00", "640A" }, {3,(const unsigned char*)"\xeb\x8d\x2f", "640v" }, {3,(const unsigned char*)"\xeb\x8d\x5e", "641e" }, {3,(const unsigned char*)"\xeb\x8d\x8d", "642N" }, {3,(const unsigned char*)"\xeb\x8d\xbc", "6428" }, {3,(const unsigned char*)"\xeb\x8d\xeb", "643r" }, {3,(const unsigned char*)"\xeb\xbc\x00", "67wA" }, {3,(const unsigned char*)"\xeb\xbc\x2f", "67wv" }, {3,(const unsigned char*)"\xeb\xbc\x5e", "67xe" }, {3,(const unsigned char*)"\xeb\xbc\x8d", "67yN" }, {3,(const unsigned char*)"\xeb\xbc\xbc", "67y8" }, {3,(const unsigned char*)"\xeb\xbc\xeb", "67zr" }, {3,(const unsigned char*)"\xeb\xeb\x00", "6+sA" }, {3,(const unsigned char*)"\xeb\xeb\x2f", "6+sv" }, {3,(const unsigned char*)"\xeb\xeb\x5e", "6+te" }, {3,(const unsigned char*)"\xeb\xeb\x8d", "6+uN" }, {3,(const unsigned char*)"\xeb\xeb\xbc", "6+u8" }, {3,(const unsigned char*)"\xeb\xeb\xeb", "6+vr" }, {4,(const unsigned char*)"\x00\x00\x00\x00", "AAAAAA==" }, {4,(const unsigned char*)"\x00\x00\x00\x55", "AAAAVQ==" }, {4,(const unsigned char*)"\x00\x00\x00\xaa", "AAAAqg==" }, {4,(const unsigned char*)"\x00\x00\x00\xff", "AAAA/w==" }, {4,(const unsigned char*)"\x00\x00\x55\x00", "AABVAA==" }, {4,(const unsigned char*)"\x00\x00\x55\x55", "AABVVQ==" }, {4,(const unsigned char*)"\x00\x00\x55\xaa", "AABVqg==" }, {4,(const unsigned char*)"\x00\x00\x55\xff", "AABV/w==" }, {4,(const unsigned char*)"\x00\x00\xaa\x00", "AACqAA==" }, {4,(const unsigned char*)"\x00\x00\xaa\x55", "AACqVQ==" }, {4,(const unsigned char*)"\x00\x00\xaa\xaa", "AACqqg==" }, {4,(const unsigned char*)"\x00\x00\xaa\xff", "AACq/w==" }, {4,(const unsigned char*)"\x00\x00\xff\x00", "AAD/AA==" }, {4,(const unsigned char*)"\x00\x00\xff\x55", "AAD/VQ==" }, {4,(const unsigned char*)"\x00\x00\xff\xaa", "AAD/qg==" }, {4,(const unsigned char*)"\x00\x00\xff\xff", "AAD//w==" }, {4,(const unsigned char*)"\x00\x55\x00\x00", "AFUAAA==" }, {4,(const unsigned char*)"\x00\x55\x00\x55", "AFUAVQ==" }, {4,(const unsigned char*)"\x00\x55\x00\xaa", "AFUAqg==" }, {4,(const unsigned char*)"\x00\x55\x00\xff", "AFUA/w==" }, {4,(const unsigned char*)"\x00\x55\x55\x00", "AFVVAA==" }, {4,(const unsigned char*)"\x00\x55\x55\x55", "AFVVVQ==" }, {4,(const unsigned char*)"\x00\x55\x55\xaa", "AFVVqg==" }, {4,(const unsigned char*)"\x00\x55\x55\xff", "AFVV/w==" }, {4,(const unsigned char*)"\x00\x55\xaa\x00", "AFWqAA==" }, {4,(const unsigned char*)"\x00\x55\xaa\x55", "AFWqVQ==" }, {4,(const unsigned char*)"\x00\x55\xaa\xaa", "AFWqqg==" }, {4,(const unsigned char*)"\x00\x55\xaa\xff", "AFWq/w==" }, {4,(const unsigned char*)"\x00\x55\xff\x00", "AFX/AA==" }, {4,(const unsigned char*)"\x00\x55\xff\x55", "AFX/VQ==" }, {4,(const unsigned char*)"\x00\x55\xff\xaa", "AFX/qg==" }, {4,(const unsigned char*)"\x00\x55\xff\xff", "AFX//w==" }, {4,(const unsigned char*)"\x00\xaa\x00\x00", "AKoAAA==" }, {4,(const unsigned char*)"\x00\xaa\x00\x55", "AKoAVQ==" }, {4,(const unsigned char*)"\x00\xaa\x00\xaa", "AKoAqg==" }, {4,(const unsigned char*)"\x00\xaa\x00\xff", "AKoA/w==" }, {4,(const unsigned char*)"\x00\xaa\x55\x00", "AKpVAA==" }, {4,(const unsigned char*)"\x00\xaa\x55\x55", "AKpVVQ==" }, {4,(const unsigned char*)"\x00\xaa\x55\xaa", "AKpVqg==" }, {4,(const unsigned char*)"\x00\xaa\x55\xff", "AKpV/w==" }, {4,(const unsigned char*)"\x00\xaa\xaa\x00", "AKqqAA==" }, {4,(const unsigned char*)"\x00\xaa\xaa\x55", "AKqqVQ==" }, {4,(const unsigned char*)"\x00\xaa\xaa\xaa", "AKqqqg==" }, {4,(const unsigned char*)"\x00\xaa\xaa\xff", "AKqq/w==" }, {4,(const unsigned char*)"\x00\xaa\xff\x00", "AKr/AA==" }, {4,(const unsigned char*)"\x00\xaa\xff\x55", "AKr/VQ==" }, {4,(const unsigned char*)"\x00\xaa\xff\xaa", "AKr/qg==" }, {4,(const unsigned char*)"\x00\xaa\xff\xff", "AKr//w==" }, {4,(const unsigned char*)"\x00\xff\x00\x00", "AP8AAA==" }, {4,(const unsigned char*)"\x00\xff\x00\x55", "AP8AVQ==" }, {4,(const unsigned char*)"\x00\xff\x00\xaa", "AP8Aqg==" }, {4,(const unsigned char*)"\x00\xff\x00\xff", "AP8A/w==" }, {4,(const unsigned char*)"\x00\xff\x55\x00", "AP9VAA==" }, {4,(const unsigned char*)"\x00\xff\x55\x55", "AP9VVQ==" }, {4,(const unsigned char*)"\x00\xff\x55\xaa", "AP9Vqg==" }, {4,(const unsigned char*)"\x00\xff\x55\xff", "AP9V/w==" }, {4,(const unsigned char*)"\x00\xff\xaa\x00", "AP+qAA==" }, {4,(const unsigned char*)"\x00\xff\xaa\x55", "AP+qVQ==" }, {4,(const unsigned char*)"\x00\xff\xaa\xaa", "AP+qqg==" }, {4,(const unsigned char*)"\x00\xff\xaa\xff", "AP+q/w==" }, {4,(const unsigned char*)"\x00\xff\xff\x00", "AP//AA==" }, {4,(const unsigned char*)"\x00\xff\xff\x55", "AP//VQ==" }, {4,(const unsigned char*)"\x00\xff\xff\xaa", "AP//qg==" }, {4,(const unsigned char*)"\x00\xff\xff\xff", "AP///w==" }, {4,(const unsigned char*)"\x55\x00\x00\x00", "VQAAAA==" }, {4,(const unsigned char*)"\x55\x00\x00\x55", "VQAAVQ==" }, {4,(const unsigned char*)"\x55\x00\x00\xaa", "VQAAqg==" }, {4,(const unsigned char*)"\x55\x00\x00\xff", "VQAA/w==" }, {4,(const unsigned char*)"\x55\x00\x55\x00", "VQBVAA==" }, {4,(const unsigned char*)"\x55\x00\x55\x55", "VQBVVQ==" }, {4,(const unsigned char*)"\x55\x00\x55\xaa", "VQBVqg==" }, {4,(const unsigned char*)"\x55\x00\x55\xff", "VQBV/w==" }, {4,(const unsigned char*)"\x55\x00\xaa\x00", "VQCqAA==" }, {4,(const unsigned char*)"\x55\x00\xaa\x55", "VQCqVQ==" }, {4,(const unsigned char*)"\x55\x00\xaa\xaa", "VQCqqg==" }, {4,(const unsigned char*)"\x55\x00\xaa\xff", "VQCq/w==" }, {4,(const unsigned char*)"\x55\x00\xff\x00", "VQD/AA==" }, {4,(const unsigned char*)"\x55\x00\xff\x55", "VQD/VQ==" }, {4,(const unsigned char*)"\x55\x00\xff\xaa", "VQD/qg==" }, {4,(const unsigned char*)"\x55\x00\xff\xff", "VQD//w==" }, {4,(const unsigned char*)"\x55\x55\x00\x00", "VVUAAA==" }, {4,(const unsigned char*)"\x55\x55\x00\x55", "VVUAVQ==" }, {4,(const unsigned char*)"\x55\x55\x00\xaa", "VVUAqg==" }, {4,(const unsigned char*)"\x55\x55\x00\xff", "VVUA/w==" }, {4,(const unsigned char*)"\x55\x55\x55\x00", "VVVVAA==" }, {4,(const unsigned char*)"\x55\x55\x55\x55", "VVVVVQ==" }, {4,(const unsigned char*)"\x55\x55\x55\xaa", "VVVVqg==" }, {4,(const unsigned char*)"\x55\x55\x55\xff", "VVVV/w==" }, {4,(const unsigned char*)"\x55\x55\xaa\x00", "VVWqAA==" }, {4,(const unsigned char*)"\x55\x55\xaa\x55", "VVWqVQ==" }, {4,(const unsigned char*)"\x55\x55\xaa\xaa", "VVWqqg==" }, {4,(const unsigned char*)"\x55\x55\xaa\xff", "VVWq/w==" }, {4,(const unsigned char*)"\x55\x55\xff\x00", "VVX/AA==" }, {4,(const unsigned char*)"\x55\x55\xff\x55", "VVX/VQ==" }, {4,(const unsigned char*)"\x55\x55\xff\xaa", "VVX/qg==" }, {4,(const unsigned char*)"\x55\x55\xff\xff", "VVX//w==" }, {4,(const unsigned char*)"\x55\xaa\x00\x00", "VaoAAA==" }, {4,(const unsigned char*)"\x55\xaa\x00\x55", "VaoAVQ==" }, {4,(const unsigned char*)"\x55\xaa\x00\xaa", "VaoAqg==" }, {4,(const unsigned char*)"\x55\xaa\x00\xff", "VaoA/w==" }, {4,(const unsigned char*)"\x55\xaa\x55\x00", "VapVAA==" }, {4,(const unsigned char*)"\x55\xaa\x55\x55", "VapVVQ==" }, {4,(const unsigned char*)"\x55\xaa\x55\xaa", "VapVqg==" }, {4,(const unsigned char*)"\x55\xaa\x55\xff", "VapV/w==" }, {4,(const unsigned char*)"\x55\xaa\xaa\x00", "VaqqAA==" }, {4,(const unsigned char*)"\x55\xaa\xaa\x55", "VaqqVQ==" }, {4,(const unsigned char*)"\x55\xaa\xaa\xaa", "Vaqqqg==" }, {4,(const unsigned char*)"\x55\xaa\xaa\xff", "Vaqq/w==" }, {4,(const unsigned char*)"\x55\xaa\xff\x00", "Var/AA==" }, {4,(const unsigned char*)"\x55\xaa\xff\x55", "Var/VQ==" }, {4,(const unsigned char*)"\x55\xaa\xff\xaa", "Var/qg==" }, {4,(const unsigned char*)"\x55\xaa\xff\xff", "Var//w==" }, {4,(const unsigned char*)"\x55\xff\x00\x00", "Vf8AAA==" }, {4,(const unsigned char*)"\x55\xff\x00\x55", "Vf8AVQ==" }, {4,(const unsigned char*)"\x55\xff\x00\xaa", "Vf8Aqg==" }, {4,(const unsigned char*)"\x55\xff\x00\xff", "Vf8A/w==" }, {4,(const unsigned char*)"\x55\xff\x55\x00", "Vf9VAA==" }, {4,(const unsigned char*)"\x55\xff\x55\x55", "Vf9VVQ==" }, {4,(const unsigned char*)"\x55\xff\x55\xaa", "Vf9Vqg==" }, {4,(const unsigned char*)"\x55\xff\x55\xff", "Vf9V/w==" }, {4,(const unsigned char*)"\x55\xff\xaa\x00", "Vf+qAA==" }, {4,(const unsigned char*)"\x55\xff\xaa\x55", "Vf+qVQ==" }, {4,(const unsigned char*)"\x55\xff\xaa\xaa", "Vf+qqg==" }, {4,(const unsigned char*)"\x55\xff\xaa\xff", "Vf+q/w==" }, {4,(const unsigned char*)"\x55\xff\xff\x00", "Vf//AA==" }, {4,(const unsigned char*)"\x55\xff\xff\x55", "Vf//VQ==" }, {4,(const unsigned char*)"\x55\xff\xff\xaa", "Vf//qg==" }, {4,(const unsigned char*)"\x55\xff\xff\xff", "Vf///w==" }, {4,(const unsigned char*)"\xaa\x00\x00\x00", "qgAAAA==" }, {4,(const unsigned char*)"\xaa\x00\x00\x55", "qgAAVQ==" }, {4,(const unsigned char*)"\xaa\x00\x00\xaa", "qgAAqg==" }, {4,(const unsigned char*)"\xaa\x00\x00\xff", "qgAA/w==" }, {4,(const unsigned char*)"\xaa\x00\x55\x00", "qgBVAA==" }, {4,(const unsigned char*)"\xaa\x00\x55\x55", "qgBVVQ==" }, {4,(const unsigned char*)"\xaa\x00\x55\xaa", "qgBVqg==" }, {4,(const unsigned char*)"\xaa\x00\x55\xff", "qgBV/w==" }, {4,(const unsigned char*)"\xaa\x00\xaa\x00", "qgCqAA==" }, {4,(const unsigned char*)"\xaa\x00\xaa\x55", "qgCqVQ==" }, {4,(const unsigned char*)"\xaa\x00\xaa\xaa", "qgCqqg==" }, {4,(const unsigned char*)"\xaa\x00\xaa\xff", "qgCq/w==" }, {4,(const unsigned char*)"\xaa\x00\xff\x00", "qgD/AA==" }, {4,(const unsigned char*)"\xaa\x00\xff\x55", "qgD/VQ==" }, {4,(const unsigned char*)"\xaa\x00\xff\xaa", "qgD/qg==" }, {4,(const unsigned char*)"\xaa\x00\xff\xff", "qgD//w==" }, {4,(const unsigned char*)"\xaa\x55\x00\x00", "qlUAAA==" }, {4,(const unsigned char*)"\xaa\x55\x00\x55", "qlUAVQ==" }, {4,(const unsigned char*)"\xaa\x55\x00\xaa", "qlUAqg==" }, {4,(const unsigned char*)"\xaa\x55\x00\xff", "qlUA/w==" }, {4,(const unsigned char*)"\xaa\x55\x55\x00", "qlVVAA==" }, {4,(const unsigned char*)"\xaa\x55\x55\x55", "qlVVVQ==" }, {4,(const unsigned char*)"\xaa\x55\x55\xaa", "qlVVqg==" }, {4,(const unsigned char*)"\xaa\x55\x55\xff", "qlVV/w==" }, {4,(const unsigned char*)"\xaa\x55\xaa\x00", "qlWqAA==" }, {4,(const unsigned char*)"\xaa\x55\xaa\x55", "qlWqVQ==" }, {4,(const unsigned char*)"\xaa\x55\xaa\xaa", "qlWqqg==" }, {4,(const unsigned char*)"\xaa\x55\xaa\xff", "qlWq/w==" }, {4,(const unsigned char*)"\xaa\x55\xff\x00", "qlX/AA==" }, {4,(const unsigned char*)"\xaa\x55\xff\x55", "qlX/VQ==" }, {4,(const unsigned char*)"\xaa\x55\xff\xaa", "qlX/qg==" }, {4,(const unsigned char*)"\xaa\x55\xff\xff", "qlX//w==" }, {4,(const unsigned char*)"\xaa\xaa\x00\x00", "qqoAAA==" }, {4,(const unsigned char*)"\xaa\xaa\x00\x55", "qqoAVQ==" }, {4,(const unsigned char*)"\xaa\xaa\x00\xaa", "qqoAqg==" }, {4,(const unsigned char*)"\xaa\xaa\x00\xff", "qqoA/w==" }, {4,(const unsigned char*)"\xaa\xaa\x55\x00", "qqpVAA==" }, {4,(const unsigned char*)"\xaa\xaa\x55\x55", "qqpVVQ==" }, {4,(const unsigned char*)"\xaa\xaa\x55\xaa", "qqpVqg==" }, {4,(const unsigned char*)"\xaa\xaa\x55\xff", "qqpV/w==" }, {4,(const unsigned char*)"\xaa\xaa\xaa\x00", "qqqqAA==" }, {4,(const unsigned char*)"\xaa\xaa\xaa\x55", "qqqqVQ==" }, {4,(const unsigned char*)"\xaa\xaa\xaa\xaa", "qqqqqg==" }, {4,(const unsigned char*)"\xaa\xaa\xaa\xff", "qqqq/w==" }, {4,(const unsigned char*)"\xaa\xaa\xff\x00", "qqr/AA==" }, {4,(const unsigned char*)"\xaa\xaa\xff\x55", "qqr/VQ==" }, {4,(const unsigned char*)"\xaa\xaa\xff\xaa", "qqr/qg==" }, {4,(const unsigned char*)"\xaa\xaa\xff\xff", "qqr//w==" }, {4,(const unsigned char*)"\xaa\xff\x00\x00", "qv8AAA==" }, {4,(const unsigned char*)"\xaa\xff\x00\x55", "qv8AVQ==" }, {4,(const unsigned char*)"\xaa\xff\x00\xaa", "qv8Aqg==" }, {4,(const unsigned char*)"\xaa\xff\x00\xff", "qv8A/w==" }, {4,(const unsigned char*)"\xaa\xff\x55\x00", "qv9VAA==" }, {4,(const unsigned char*)"\xaa\xff\x55\x55", "qv9VVQ==" }, {4,(const unsigned char*)"\xaa\xff\x55\xaa", "qv9Vqg==" }, {4,(const unsigned char*)"\xaa\xff\x55\xff", "qv9V/w==" }, {4,(const unsigned char*)"\xaa\xff\xaa\x00", "qv+qAA==" }, {4,(const unsigned char*)"\xaa\xff\xaa\x55", "qv+qVQ==" }, {4,(const unsigned char*)"\xaa\xff\xaa\xaa", "qv+qqg==" }, {4,(const unsigned char*)"\xaa\xff\xaa\xff", "qv+q/w==" }, {4,(const unsigned char*)"\xaa\xff\xff\x00", "qv//AA==" }, {4,(const unsigned char*)"\xaa\xff\xff\x55", "qv//VQ==" }, {4,(const unsigned char*)"\xaa\xff\xff\xaa", "qv//qg==" }, {4,(const unsigned char*)"\xaa\xff\xff\xff", "qv///w==" }, {4,(const unsigned char*)"\xff\x00\x00\x00", "/wAAAA==" }, {4,(const unsigned char*)"\xff\x00\x00\x55", "/wAAVQ==" }, {4,(const unsigned char*)"\xff\x00\x00\xaa", "/wAAqg==" }, {4,(const unsigned char*)"\xff\x00\x00\xff", "/wAA/w==" }, {4,(const unsigned char*)"\xff\x00\x55\x00", "/wBVAA==" }, {4,(const unsigned char*)"\xff\x00\x55\x55", "/wBVVQ==" }, {4,(const unsigned char*)"\xff\x00\x55\xaa", "/wBVqg==" }, {4,(const unsigned char*)"\xff\x00\x55\xff", "/wBV/w==" }, {4,(const unsigned char*)"\xff\x00\xaa\x00", "/wCqAA==" }, {4,(const unsigned char*)"\xff\x00\xaa\x55", "/wCqVQ==" }, {4,(const unsigned char*)"\xff\x00\xaa\xaa", "/wCqqg==" }, {4,(const unsigned char*)"\xff\x00\xaa\xff", "/wCq/w==" }, {4,(const unsigned char*)"\xff\x00\xff\x00", "/wD/AA==" }, {4,(const unsigned char*)"\xff\x00\xff\x55", "/wD/VQ==" }, {4,(const unsigned char*)"\xff\x00\xff\xaa", "/wD/qg==" }, {4,(const unsigned char*)"\xff\x00\xff\xff", "/wD//w==" }, {4,(const unsigned char*)"\xff\x55\x00\x00", "/1UAAA==" }, {4,(const unsigned char*)"\xff\x55\x00\x55", "/1UAVQ==" }, {4,(const unsigned char*)"\xff\x55\x00\xaa", "/1UAqg==" }, {4,(const unsigned char*)"\xff\x55\x00\xff", "/1UA/w==" }, {4,(const unsigned char*)"\xff\x55\x55\x00", "/1VVAA==" }, {4,(const unsigned char*)"\xff\x55\x55\x55", "/1VVVQ==" }, {4,(const unsigned char*)"\xff\x55\x55\xaa", "/1VVqg==" }, {4,(const unsigned char*)"\xff\x55\x55\xff", "/1VV/w==" }, {4,(const unsigned char*)"\xff\x55\xaa\x00", "/1WqAA==" }, {4,(const unsigned char*)"\xff\x55\xaa\x55", "/1WqVQ==" }, {4,(const unsigned char*)"\xff\x55\xaa\xaa", "/1Wqqg==" }, {4,(const unsigned char*)"\xff\x55\xaa\xff", "/1Wq/w==" }, {4,(const unsigned char*)"\xff\x55\xff\x00", "/1X/AA==" }, {4,(const unsigned char*)"\xff\x55\xff\x55", "/1X/VQ==" }, {4,(const unsigned char*)"\xff\x55\xff\xaa", "/1X/qg==" }, {4,(const unsigned char*)"\xff\x55\xff\xff", "/1X//w==" }, {4,(const unsigned char*)"\xff\xaa\x00\x00", "/6oAAA==" }, {4,(const unsigned char*)"\xff\xaa\x00\x55", "/6oAVQ==" }, {4,(const unsigned char*)"\xff\xaa\x00\xaa", "/6oAqg==" }, {4,(const unsigned char*)"\xff\xaa\x00\xff", "/6oA/w==" }, {4,(const unsigned char*)"\xff\xaa\x55\x00", "/6pVAA==" }, {4,(const unsigned char*)"\xff\xaa\x55\x55", "/6pVVQ==" }, {4,(const unsigned char*)"\xff\xaa\x55\xaa", "/6pVqg==" }, {4,(const unsigned char*)"\xff\xaa\x55\xff", "/6pV/w==" }, {4,(const unsigned char*)"\xff\xaa\xaa\x00", "/6qqAA==" }, {4,(const unsigned char*)"\xff\xaa\xaa\x55", "/6qqVQ==" }, {4,(const unsigned char*)"\xff\xaa\xaa\xaa", "/6qqqg==" }, {4,(const unsigned char*)"\xff\xaa\xaa\xff", "/6qq/w==" }, {4,(const unsigned char*)"\xff\xaa\xff\x00", "/6r/AA==" }, {4,(const unsigned char*)"\xff\xaa\xff\x55", "/6r/VQ==" }, {4,(const unsigned char*)"\xff\xaa\xff\xaa", "/6r/qg==" }, {4,(const unsigned char*)"\xff\xaa\xff\xff", "/6r//w==" }, {4,(const unsigned char*)"\xff\xff\x00\x00", "//8AAA==" }, {4,(const unsigned char*)"\xff\xff\x00\x55", "//8AVQ==" }, {4,(const unsigned char*)"\xff\xff\x00\xaa", "//8Aqg==" }, {4,(const unsigned char*)"\xff\xff\x00\xff", "//8A/w==" }, {4,(const unsigned char*)"\xff\xff\x55\x00", "//9VAA==" }, {4,(const unsigned char*)"\xff\xff\x55\x55", "//9VVQ==" }, {4,(const unsigned char*)"\xff\xff\x55\xaa", "//9Vqg==" }, {4,(const unsigned char*)"\xff\xff\x55\xff", "//9V/w==" }, {4,(const unsigned char*)"\xff\xff\xaa\x00", "//+qAA==" }, {4,(const unsigned char*)"\xff\xff\xaa\x55", "//+qVQ==" }, {4,(const unsigned char*)"\xff\xff\xaa\xaa", "//+qqg==" }, {4,(const unsigned char*)"\xff\xff\xaa\xff", "//+q/w==" }, {4,(const unsigned char*)"\xff\xff\xff\x00", "////AA==" }, {4,(const unsigned char*)"\xff\xff\xff\x55", "////VQ==" }, {4,(const unsigned char*)"\xff\xff\xff\xaa", "////qg==" }, {4,(const unsigned char*)"\xff\xff\xff\xff", "/////w==" }, {5,(const unsigned char*)"\x00\x00\x00\x00\x00", "AAAAAAA=" }, {5,(const unsigned char*)"\x00\x00\x00\x00\x7e", "AAAAAH4=" }, {5,(const unsigned char*)"\x00\x00\x00\x00\xfc", "AAAAAPw=" }, {5,(const unsigned char*)"\x00\x00\x00\x7e\x00", "AAAAfgA=" }, {5,(const unsigned char*)"\x00\x00\x00\x7e\x7e", "AAAAfn4=" }, {5,(const unsigned char*)"\x00\x00\x00\x7e\xfc", "AAAAfvw=" }, {5,(const unsigned char*)"\x00\x00\x00\xfc\x00", "AAAA/AA=" }, {5,(const unsigned char*)"\x00\x00\x00\xfc\x7e", "AAAA/H4=" }, {5,(const unsigned char*)"\x00\x00\x00\xfc\xfc", "AAAA/Pw=" }, {5,(const unsigned char*)"\x00\x00\x7e\x00\x00", "AAB+AAA=" }, {5,(const unsigned char*)"\x00\x00\x7e\x00\x7e", "AAB+AH4=" }, {5,(const unsigned char*)"\x00\x00\x7e\x00\xfc", "AAB+APw=" }, {5,(const unsigned char*)"\x00\x00\x7e\x7e\x00", "AAB+fgA=" }, {5,(const unsigned char*)"\x00\x00\x7e\x7e\x7e", "AAB+fn4=" }, {5,(const unsigned char*)"\x00\x00\x7e\x7e\xfc", "AAB+fvw=" }, {5,(const unsigned char*)"\x00\x00\x7e\xfc\x00", "AAB+/AA=" }, {5,(const unsigned char*)"\x00\x00\x7e\xfc\x7e", "AAB+/H4=" }, {5,(const unsigned char*)"\x00\x00\x7e\xfc\xfc", "AAB+/Pw=" }, {5,(const unsigned char*)"\x00\x00\xfc\x00\x00", "AAD8AAA=" }, {5,(const unsigned char*)"\x00\x00\xfc\x00\x7e", "AAD8AH4=" }, {5,(const unsigned char*)"\x00\x00\xfc\x00\xfc", "AAD8APw=" }, {5,(const unsigned char*)"\x00\x00\xfc\x7e\x00", "AAD8fgA=" }, {5,(const unsigned char*)"\x00\x00\xfc\x7e\x7e", "AAD8fn4=" }, {5,(const unsigned char*)"\x00\x00\xfc\x7e\xfc", "AAD8fvw=" }, {5,(const unsigned char*)"\x00\x00\xfc\xfc\x00", "AAD8/AA=" }, {5,(const unsigned char*)"\x00\x00\xfc\xfc\x7e", "AAD8/H4=" }, {5,(const unsigned char*)"\x00\x00\xfc\xfc\xfc", "AAD8/Pw=" }, {5,(const unsigned char*)"\x00\x7e\x00\x00\x00", "AH4AAAA=" }, {5,(const unsigned char*)"\x00\x7e\x00\x00\x7e", "AH4AAH4=" }, {5,(const unsigned char*)"\x00\x7e\x00\x00\xfc", "AH4AAPw=" }, {5,(const unsigned char*)"\x00\x7e\x00\x7e\x00", "AH4AfgA=" }, {5,(const unsigned char*)"\x00\x7e\x00\x7e\x7e", "AH4Afn4=" }, {5,(const unsigned char*)"\x00\x7e\x00\x7e\xfc", "AH4Afvw=" }, {5,(const unsigned char*)"\x00\x7e\x00\xfc\x00", "AH4A/AA=" }, {5,(const unsigned char*)"\x00\x7e\x00\xfc\x7e", "AH4A/H4=" }, {5,(const unsigned char*)"\x00\x7e\x00\xfc\xfc", "AH4A/Pw=" }, {5,(const unsigned char*)"\x00\x7e\x7e\x00\x00", "AH5+AAA=" }, {5,(const unsigned char*)"\x00\x7e\x7e\x00\x7e", "AH5+AH4=" }, {5,(const unsigned char*)"\x00\x7e\x7e\x00\xfc", "AH5+APw=" }, {5,(const unsigned char*)"\x00\x7e\x7e\x7e\x00", "AH5+fgA=" }, {5,(const unsigned char*)"\x00\x7e\x7e\x7e\x7e", "AH5+fn4=" }, {5,(const unsigned char*)"\x00\x7e\x7e\x7e\xfc", "AH5+fvw=" }, {5,(const unsigned char*)"\x00\x7e\x7e\xfc\x00", "AH5+/AA=" }, {5,(const unsigned char*)"\x00\x7e\x7e\xfc\x7e", "AH5+/H4=" }, {5,(const unsigned char*)"\x00\x7e\x7e\xfc\xfc", "AH5+/Pw=" }, {5,(const unsigned char*)"\x00\x7e\xfc\x00\x00", "AH78AAA=" }, {5,(const unsigned char*)"\x00\x7e\xfc\x00\x7e", "AH78AH4=" }, {5,(const unsigned char*)"\x00\x7e\xfc\x00\xfc", "AH78APw=" }, {5,(const unsigned char*)"\x00\x7e\xfc\x7e\x00", "AH78fgA=" }, {5,(const unsigned char*)"\x00\x7e\xfc\x7e\x7e", "AH78fn4=" }, {5,(const unsigned char*)"\x00\x7e\xfc\x7e\xfc", "AH78fvw=" }, {5,(const unsigned char*)"\x00\x7e\xfc\xfc\x00", "AH78/AA=" }, {5,(const unsigned char*)"\x00\x7e\xfc\xfc\x7e", "AH78/H4=" }, {5,(const unsigned char*)"\x00\x7e\xfc\xfc\xfc", "AH78/Pw=" }, {5,(const unsigned char*)"\x00\xfc\x00\x00\x00", "APwAAAA=" }, {5,(const unsigned char*)"\x00\xfc\x00\x00\x7e", "APwAAH4=" }, {5,(const unsigned char*)"\x00\xfc\x00\x00\xfc", "APwAAPw=" }, {5,(const unsigned char*)"\x00\xfc\x00\x7e\x00", "APwAfgA=" }, {5,(const unsigned char*)"\x00\xfc\x00\x7e\x7e", "APwAfn4=" }, {5,(const unsigned char*)"\x00\xfc\x00\x7e\xfc", "APwAfvw=" }, {5,(const unsigned char*)"\x00\xfc\x00\xfc\x00", "APwA/AA=" }, {5,(const unsigned char*)"\x00\xfc\x00\xfc\x7e", "APwA/H4=" }, {5,(const unsigned char*)"\x00\xfc\x00\xfc\xfc", "APwA/Pw=" }, {5,(const unsigned char*)"\x00\xfc\x7e\x00\x00", "APx+AAA=" }, {5,(const unsigned char*)"\x00\xfc\x7e\x00\x7e", "APx+AH4=" }, {5,(const unsigned char*)"\x00\xfc\x7e\x00\xfc", "APx+APw=" }, {5,(const unsigned char*)"\x00\xfc\x7e\x7e\x00", "APx+fgA=" }, {5,(const unsigned char*)"\x00\xfc\x7e\x7e\x7e", "APx+fn4=" }, {5,(const unsigned char*)"\x00\xfc\x7e\x7e\xfc", "APx+fvw=" }, {5,(const unsigned char*)"\x00\xfc\x7e\xfc\x00", "APx+/AA=" }, {5,(const unsigned char*)"\x00\xfc\x7e\xfc\x7e", "APx+/H4=" }, {5,(const unsigned char*)"\x00\xfc\x7e\xfc\xfc", "APx+/Pw=" }, {5,(const unsigned char*)"\x00\xfc\xfc\x00\x00", "APz8AAA=" }, {5,(const unsigned char*)"\x00\xfc\xfc\x00\x7e", "APz8AH4=" }, {5,(const unsigned char*)"\x00\xfc\xfc\x00\xfc", "APz8APw=" }, {5,(const unsigned char*)"\x00\xfc\xfc\x7e\x00", "APz8fgA=" }, {5,(const unsigned char*)"\x00\xfc\xfc\x7e\x7e", "APz8fn4=" }, {5,(const unsigned char*)"\x00\xfc\xfc\x7e\xfc", "APz8fvw=" }, {5,(const unsigned char*)"\x00\xfc\xfc\xfc\x00", "APz8/AA=" }, {5,(const unsigned char*)"\x00\xfc\xfc\xfc\x7e", "APz8/H4=" }, {5,(const unsigned char*)"\x00\xfc\xfc\xfc\xfc", "APz8/Pw=" }, {5,(const unsigned char*)"\x7e\x00\x00\x00\x00", "fgAAAAA=" }, {5,(const unsigned char*)"\x7e\x00\x00\x00\x7e", "fgAAAH4=" }, {5,(const unsigned char*)"\x7e\x00\x00\x00\xfc", "fgAAAPw=" }, {5,(const unsigned char*)"\x7e\x00\x00\x7e\x00", "fgAAfgA=" }, {5,(const unsigned char*)"\x7e\x00\x00\x7e\x7e", "fgAAfn4=" }, {5,(const unsigned char*)"\x7e\x00\x00\x7e\xfc", "fgAAfvw=" }, {5,(const unsigned char*)"\x7e\x00\x00\xfc\x00", "fgAA/AA=" }, {5,(const unsigned char*)"\x7e\x00\x00\xfc\x7e", "fgAA/H4=" }, {5,(const unsigned char*)"\x7e\x00\x00\xfc\xfc", "fgAA/Pw=" }, {5,(const unsigned char*)"\x7e\x00\x7e\x00\x00", "fgB+AAA=" }, {5,(const unsigned char*)"\x7e\x00\x7e\x00\x7e", "fgB+AH4=" }, {5,(const unsigned char*)"\x7e\x00\x7e\x00\xfc", "fgB+APw=" }, {5,(const unsigned char*)"\x7e\x00\x7e\x7e\x00", "fgB+fgA=" }, {5,(const unsigned char*)"\x7e\x00\x7e\x7e\x7e", "fgB+fn4=" }, {5,(const unsigned char*)"\x7e\x00\x7e\x7e\xfc", "fgB+fvw=" }, {5,(const unsigned char*)"\x7e\x00\x7e\xfc\x00", "fgB+/AA=" }, {5,(const unsigned char*)"\x7e\x00\x7e\xfc\x7e", "fgB+/H4=" }, {5,(const unsigned char*)"\x7e\x00\x7e\xfc\xfc", "fgB+/Pw=" }, {5,(const unsigned char*)"\x7e\x00\xfc\x00\x00", "fgD8AAA=" }, {5,(const unsigned char*)"\x7e\x00\xfc\x00\x7e", "fgD8AH4=" }, {5,(const unsigned char*)"\x7e\x00\xfc\x00\xfc", "fgD8APw=" }, {5,(const unsigned char*)"\x7e\x00\xfc\x7e\x00", "fgD8fgA=" }, {5,(const unsigned char*)"\x7e\x00\xfc\x7e\x7e", "fgD8fn4=" }, {5,(const unsigned char*)"\x7e\x00\xfc\x7e\xfc", "fgD8fvw=" }, {5,(const unsigned char*)"\x7e\x00\xfc\xfc\x00", "fgD8/AA=" }, {5,(const unsigned char*)"\x7e\x00\xfc\xfc\x7e", "fgD8/H4=" }, {5,(const unsigned char*)"\x7e\x00\xfc\xfc\xfc", "fgD8/Pw=" }, {5,(const unsigned char*)"\x7e\x7e\x00\x00\x00", "fn4AAAA=" }, {5,(const unsigned char*)"\x7e\x7e\x00\x00\x7e", "fn4AAH4=" }, {5,(const unsigned char*)"\x7e\x7e\x00\x00\xfc", "fn4AAPw=" }, {5,(const unsigned char*)"\x7e\x7e\x00\x7e\x00", "fn4AfgA=" }, {5,(const unsigned char*)"\x7e\x7e\x00\x7e\x7e", "fn4Afn4=" }, {5,(const unsigned char*)"\x7e\x7e\x00\x7e\xfc", "fn4Afvw=" }, {5,(const unsigned char*)"\x7e\x7e\x00\xfc\x00", "fn4A/AA=" }, {5,(const unsigned char*)"\x7e\x7e\x00\xfc\x7e", "fn4A/H4=" }, {5,(const unsigned char*)"\x7e\x7e\x00\xfc\xfc", "fn4A/Pw=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\x00\x00", "fn5+AAA=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\x00\x7e", "fn5+AH4=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\x00\xfc", "fn5+APw=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\x7e\x00", "fn5+fgA=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\x7e\x7e", "fn5+fn4=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\x7e\xfc", "fn5+fvw=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\xfc\x00", "fn5+/AA=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\xfc\x7e", "fn5+/H4=" }, {5,(const unsigned char*)"\x7e\x7e\x7e\xfc\xfc", "fn5+/Pw=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\x00\x00", "fn78AAA=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\x00\x7e", "fn78AH4=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\x00\xfc", "fn78APw=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\x7e\x00", "fn78fgA=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\x7e\x7e", "fn78fn4=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\x7e\xfc", "fn78fvw=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\xfc\x00", "fn78/AA=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\xfc\x7e", "fn78/H4=" }, {5,(const unsigned char*)"\x7e\x7e\xfc\xfc\xfc", "fn78/Pw=" }, {5,(const unsigned char*)"\x7e\xfc\x00\x00\x00", "fvwAAAA=" }, {5,(const unsigned char*)"\x7e\xfc\x00\x00\x7e", "fvwAAH4=" }, {5,(const unsigned char*)"\x7e\xfc\x00\x00\xfc", "fvwAAPw=" }, {5,(const unsigned char*)"\x7e\xfc\x00\x7e\x00", "fvwAfgA=" }, {5,(const unsigned char*)"\x7e\xfc\x00\x7e\x7e", "fvwAfn4=" }, {5,(const unsigned char*)"\x7e\xfc\x00\x7e\xfc", "fvwAfvw=" }, {5,(const unsigned char*)"\x7e\xfc\x00\xfc\x00", "fvwA/AA=" }, {5,(const unsigned char*)"\x7e\xfc\x00\xfc\x7e", "fvwA/H4=" }, {5,(const unsigned char*)"\x7e\xfc\x00\xfc\xfc", "fvwA/Pw=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\x00\x00", "fvx+AAA=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\x00\x7e", "fvx+AH4=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\x00\xfc", "fvx+APw=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\x7e\x00", "fvx+fgA=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\x7e\x7e", "fvx+fn4=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\x7e\xfc", "fvx+fvw=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\xfc\x00", "fvx+/AA=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\xfc\x7e", "fvx+/H4=" }, {5,(const unsigned char*)"\x7e\xfc\x7e\xfc\xfc", "fvx+/Pw=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\x00\x00", "fvz8AAA=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\x00\x7e", "fvz8AH4=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\x00\xfc", "fvz8APw=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\x7e\x00", "fvz8fgA=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\x7e\x7e", "fvz8fn4=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\x7e\xfc", "fvz8fvw=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\xfc\x00", "fvz8/AA=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\xfc\x7e", "fvz8/H4=" }, {5,(const unsigned char*)"\x7e\xfc\xfc\xfc\xfc", "fvz8/Pw=" }, {5,(const unsigned char*)"\xfc\x00\x00\x00\x00", "/AAAAAA=" }, {5,(const unsigned char*)"\xfc\x00\x00\x00\x7e", "/AAAAH4=" }, {5,(const unsigned char*)"\xfc\x00\x00\x00\xfc", "/AAAAPw=" }, {5,(const unsigned char*)"\xfc\x00\x00\x7e\x00", "/AAAfgA=" }, {5,(const unsigned char*)"\xfc\x00\x00\x7e\x7e", "/AAAfn4=" }, {5,(const unsigned char*)"\xfc\x00\x00\x7e\xfc", "/AAAfvw=" }, {5,(const unsigned char*)"\xfc\x00\x00\xfc\x00", "/AAA/AA=" }, {5,(const unsigned char*)"\xfc\x00\x00\xfc\x7e", "/AAA/H4=" }, {5,(const unsigned char*)"\xfc\x00\x00\xfc\xfc", "/AAA/Pw=" }, {5,(const unsigned char*)"\xfc\x00\x7e\x00\x00", "/AB+AAA=" }, {5,(const unsigned char*)"\xfc\x00\x7e\x00\x7e", "/AB+AH4=" }, {5,(const unsigned char*)"\xfc\x00\x7e\x00\xfc", "/AB+APw=" }, {5,(const unsigned char*)"\xfc\x00\x7e\x7e\x00", "/AB+fgA=" }, {5,(const unsigned char*)"\xfc\x00\x7e\x7e\x7e", "/AB+fn4=" }, {5,(const unsigned char*)"\xfc\x00\x7e\x7e\xfc", "/AB+fvw=" }, {5,(const unsigned char*)"\xfc\x00\x7e\xfc\x00", "/AB+/AA=" }, {5,(const unsigned char*)"\xfc\x00\x7e\xfc\x7e", "/AB+/H4=" }, {5,(const unsigned char*)"\xfc\x00\x7e\xfc\xfc", "/AB+/Pw=" }, {5,(const unsigned char*)"\xfc\x00\xfc\x00\x00", "/AD8AAA=" }, {5,(const unsigned char*)"\xfc\x00\xfc\x00\x7e", "/AD8AH4=" }, {5,(const unsigned char*)"\xfc\x00\xfc\x00\xfc", "/AD8APw=" }, {5,(const unsigned char*)"\xfc\x00\xfc\x7e\x00", "/AD8fgA=" }, {5,(const unsigned char*)"\xfc\x00\xfc\x7e\x7e", "/AD8fn4=" }, {5,(const unsigned char*)"\xfc\x00\xfc\x7e\xfc", "/AD8fvw=" }, {5,(const unsigned char*)"\xfc\x00\xfc\xfc\x00", "/AD8/AA=" }, {5,(const unsigned char*)"\xfc\x00\xfc\xfc\x7e", "/AD8/H4=" }, {5,(const unsigned char*)"\xfc\x00\xfc\xfc\xfc", "/AD8/Pw=" }, {5,(const unsigned char*)"\xfc\x7e\x00\x00\x00", "/H4AAAA=" }, {5,(const unsigned char*)"\xfc\x7e\x00\x00\x7e", "/H4AAH4=" }, {5,(const unsigned char*)"\xfc\x7e\x00\x00\xfc", "/H4AAPw=" }, {5,(const unsigned char*)"\xfc\x7e\x00\x7e\x00", "/H4AfgA=" }, {5,(const unsigned char*)"\xfc\x7e\x00\x7e\x7e", "/H4Afn4=" }, {5,(const unsigned char*)"\xfc\x7e\x00\x7e\xfc", "/H4Afvw=" }, {5,(const unsigned char*)"\xfc\x7e\x00\xfc\x00", "/H4A/AA=" }, {5,(const unsigned char*)"\xfc\x7e\x00\xfc\x7e", "/H4A/H4=" }, {5,(const unsigned char*)"\xfc\x7e\x00\xfc\xfc", "/H4A/Pw=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\x00\x00", "/H5+AAA=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\x00\x7e", "/H5+AH4=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\x00\xfc", "/H5+APw=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\x7e\x00", "/H5+fgA=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\x7e\x7e", "/H5+fn4=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\x7e\xfc", "/H5+fvw=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\xfc\x00", "/H5+/AA=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\xfc\x7e", "/H5+/H4=" }, {5,(const unsigned char*)"\xfc\x7e\x7e\xfc\xfc", "/H5+/Pw=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\x00\x00", "/H78AAA=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\x00\x7e", "/H78AH4=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\x00\xfc", "/H78APw=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\x7e\x00", "/H78fgA=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\x7e\x7e", "/H78fn4=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\x7e\xfc", "/H78fvw=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\xfc\x00", "/H78/AA=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\xfc\x7e", "/H78/H4=" }, {5,(const unsigned char*)"\xfc\x7e\xfc\xfc\xfc", "/H78/Pw=" }, {5,(const unsigned char*)"\xfc\xfc\x00\x00\x00", "/PwAAAA=" }, {5,(const unsigned char*)"\xfc\xfc\x00\x00\x7e", "/PwAAH4=" }, {5,(const unsigned char*)"\xfc\xfc\x00\x00\xfc", "/PwAAPw=" }, {5,(const unsigned char*)"\xfc\xfc\x00\x7e\x00", "/PwAfgA=" }, {5,(const unsigned char*)"\xfc\xfc\x00\x7e\x7e", "/PwAfn4=" }, {5,(const unsigned char*)"\xfc\xfc\x00\x7e\xfc", "/PwAfvw=" }, {5,(const unsigned char*)"\xfc\xfc\x00\xfc\x00", "/PwA/AA=" }, {5,(const unsigned char*)"\xfc\xfc\x00\xfc\x7e", "/PwA/H4=" }, {5,(const unsigned char*)"\xfc\xfc\x00\xfc\xfc", "/PwA/Pw=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\x00\x00", "/Px+AAA=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\x00\x7e", "/Px+AH4=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\x00\xfc", "/Px+APw=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\x7e\x00", "/Px+fgA=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\x7e\x7e", "/Px+fn4=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\x7e\xfc", "/Px+fvw=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\xfc\x00", "/Px+/AA=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\xfc\x7e", "/Px+/H4=" }, {5,(const unsigned char*)"\xfc\xfc\x7e\xfc\xfc", "/Px+/Pw=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\x00\x00", "/Pz8AAA=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\x00\x7e", "/Pz8AH4=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\x00\xfc", "/Pz8APw=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\x7e\x00", "/Pz8fgA=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\x7e\x7e", "/Pz8fn4=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\x7e\xfc", "/Pz8fvw=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\xfc\x00", "/Pz8/AA=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\xfc\x7e", "/Pz8/H4=" }, {5,(const unsigned char*)"\xfc\xfc\xfc\xfc\xfc", "/Pz8/Pw=" }, {6,(const unsigned char*)"\x00\x00\x00\x00\x00\x00", "AAAAAAAA" }, {6,(const unsigned char*)"\x00\x00\x00\x00\x00\xa8", "AAAAAACo" }, {6,(const unsigned char*)"\x00\x00\x00\x00\xa8\x00", "AAAAAKgA" }, {6,(const unsigned char*)"\x00\x00\x00\x00\xa8\xa8", "AAAAAKio" }, {6,(const unsigned char*)"\x00\x00\x00\xa8\x00\x00", "AAAAqAAA" }, {6,(const unsigned char*)"\x00\x00\x00\xa8\x00\xa8", "AAAAqACo" }, {6,(const unsigned char*)"\x00\x00\x00\xa8\xa8\x00", "AAAAqKgA" }, {6,(const unsigned char*)"\x00\x00\x00\xa8\xa8\xa8", "AAAAqKio" }, {6,(const unsigned char*)"\x00\x00\xa8\x00\x00\x00", "AACoAAAA" }, {6,(const unsigned char*)"\x00\x00\xa8\x00\x00\xa8", "AACoAACo" }, {6,(const unsigned char*)"\x00\x00\xa8\x00\xa8\x00", "AACoAKgA" }, {6,(const unsigned char*)"\x00\x00\xa8\x00\xa8\xa8", "AACoAKio" }, {6,(const unsigned char*)"\x00\x00\xa8\xa8\x00\x00", "AACoqAAA" }, {6,(const unsigned char*)"\x00\x00\xa8\xa8\x00\xa8", "AACoqACo" }, {6,(const unsigned char*)"\x00\x00\xa8\xa8\xa8\x00", "AACoqKgA" }, {6,(const unsigned char*)"\x00\x00\xa8\xa8\xa8\xa8", "AACoqKio" }, {6,(const unsigned char*)"\x00\xa8\x00\x00\x00\x00", "AKgAAAAA" }, {6,(const unsigned char*)"\x00\xa8\x00\x00\x00\xa8", "AKgAAACo" }, {6,(const unsigned char*)"\x00\xa8\x00\x00\xa8\x00", "AKgAAKgA" }, {6,(const unsigned char*)"\x00\xa8\x00\x00\xa8\xa8", "AKgAAKio" }, {6,(const unsigned char*)"\x00\xa8\x00\xa8\x00\x00", "AKgAqAAA" }, {6,(const unsigned char*)"\x00\xa8\x00\xa8\x00\xa8", "AKgAqACo" }, {6,(const unsigned char*)"\x00\xa8\x00\xa8\xa8\x00", "AKgAqKgA" }, {6,(const unsigned char*)"\x00\xa8\x00\xa8\xa8\xa8", "AKgAqKio" }, {6,(const unsigned char*)"\x00\xa8\xa8\x00\x00\x00", "AKioAAAA" }, {6,(const unsigned char*)"\x00\xa8\xa8\x00\x00\xa8", "AKioAACo" }, {6,(const unsigned char*)"\x00\xa8\xa8\x00\xa8\x00", "AKioAKgA" }, {6,(const unsigned char*)"\x00\xa8\xa8\x00\xa8\xa8", "AKioAKio" }, {6,(const unsigned char*)"\x00\xa8\xa8\xa8\x00\x00", "AKioqAAA" }, {6,(const unsigned char*)"\x00\xa8\xa8\xa8\x00\xa8", "AKioqACo" }, {6,(const unsigned char*)"\x00\xa8\xa8\xa8\xa8\x00", "AKioqKgA" }, {6,(const unsigned char*)"\x00\xa8\xa8\xa8\xa8\xa8", "AKioqKio" }, {6,(const unsigned char*)"\xa8\x00\x00\x00\x00\x00", "qAAAAAAA" }, {6,(const unsigned char*)"\xa8\x00\x00\x00\x00\xa8", "qAAAAACo" }, {6,(const unsigned char*)"\xa8\x00\x00\x00\xa8\x00", "qAAAAKgA" }, {6,(const unsigned char*)"\xa8\x00\x00\x00\xa8\xa8", "qAAAAKio" }, {6,(const unsigned char*)"\xa8\x00\x00\xa8\x00\x00", "qAAAqAAA" }, {6,(const unsigned char*)"\xa8\x00\x00\xa8\x00\xa8", "qAAAqACo" }, {6,(const unsigned char*)"\xa8\x00\x00\xa8\xa8\x00", "qAAAqKgA" }, {6,(const unsigned char*)"\xa8\x00\x00\xa8\xa8\xa8", "qAAAqKio" }, {6,(const unsigned char*)"\xa8\x00\xa8\x00\x00\x00", "qACoAAAA" }, {6,(const unsigned char*)"\xa8\x00\xa8\x00\x00\xa8", "qACoAACo" }, {6,(const unsigned char*)"\xa8\x00\xa8\x00\xa8\x00", "qACoAKgA" }, {6,(const unsigned char*)"\xa8\x00\xa8\x00\xa8\xa8", "qACoAKio" }, {6,(const unsigned char*)"\xa8\x00\xa8\xa8\x00\x00", "qACoqAAA" }, {6,(const unsigned char*)"\xa8\x00\xa8\xa8\x00\xa8", "qACoqACo" }, {6,(const unsigned char*)"\xa8\x00\xa8\xa8\xa8\x00", "qACoqKgA" }, {6,(const unsigned char*)"\xa8\x00\xa8\xa8\xa8\xa8", "qACoqKio" }, {6,(const unsigned char*)"\xa8\xa8\x00\x00\x00\x00", "qKgAAAAA" }, {6,(const unsigned char*)"\xa8\xa8\x00\x00\x00\xa8", "qKgAAACo" }, {6,(const unsigned char*)"\xa8\xa8\x00\x00\xa8\x00", "qKgAAKgA" }, {6,(const unsigned char*)"\xa8\xa8\x00\x00\xa8\xa8", "qKgAAKio" }, {6,(const unsigned char*)"\xa8\xa8\x00\xa8\x00\x00", "qKgAqAAA" }, {6,(const unsigned char*)"\xa8\xa8\x00\xa8\x00\xa8", "qKgAqACo" }, {6,(const unsigned char*)"\xa8\xa8\x00\xa8\xa8\x00", "qKgAqKgA" }, {6,(const unsigned char*)"\xa8\xa8\x00\xa8\xa8\xa8", "qKgAqKio" }, {6,(const unsigned char*)"\xa8\xa8\xa8\x00\x00\x00", "qKioAAAA" }, {6,(const unsigned char*)"\xa8\xa8\xa8\x00\x00\xa8", "qKioAACo" }, {6,(const unsigned char*)"\xa8\xa8\xa8\x00\xa8\x00", "qKioAKgA" }, {6,(const unsigned char*)"\xa8\xa8\xa8\x00\xa8\xa8", "qKioAKio" }, {6,(const unsigned char*)"\xa8\xa8\xa8\xa8\x00\x00", "qKioqAAA" }, {6,(const unsigned char*)"\xa8\xa8\xa8\xa8\x00\xa8", "qKioqACo" }, {6,(const unsigned char*)"\xa8\xa8\xa8\xa8\xa8\x00", "qKioqKgA" }, {6,(const unsigned char*)"\xa8\xa8\xa8\xa8\xa8\xa8", "qKioqKio" }, {7,(const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00", "AAAAAAAAAA==" }, {7,(const unsigned char*)"\x00\x00\x00\x00\x00\x00\xd3", "AAAAAAAA0w==" }, {7,(const unsigned char*)"\x00\x00\x00\x00\x00\xd3\x00", "AAAAAADTAA==" }, {7,(const unsigned char*)"\x00\x00\x00\x00\x00\xd3\xd3", "AAAAAADT0w==" }, {7,(const unsigned char*)"\x00\x00\x00\x00\xd3\x00\x00", "AAAAANMAAA==" }, {7,(const unsigned char*)"\x00\x00\x00\x00\xd3\x00\xd3", "AAAAANMA0w==" }, {7,(const unsigned char*)"\x00\x00\x00\x00\xd3\xd3\x00", "AAAAANPTAA==" }, {7,(const unsigned char*)"\x00\x00\x00\x00\xd3\xd3\xd3", "AAAAANPT0w==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\x00\x00\x00", "AAAA0wAAAA==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\x00\x00\xd3", "AAAA0wAA0w==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\x00\xd3\x00", "AAAA0wDTAA==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\x00\xd3\xd3", "AAAA0wDT0w==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\xd3\x00\x00", "AAAA09MAAA==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\xd3\x00\xd3", "AAAA09MA0w==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\xd3\xd3\x00", "AAAA09PTAA==" }, {7,(const unsigned char*)"\x00\x00\x00\xd3\xd3\xd3\xd3", "AAAA09PT0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\x00\x00\x00", "AADTAAAAAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\x00\x00\xd3", "AADTAAAA0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\x00\xd3\x00", "AADTAADTAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\x00\xd3\xd3", "AADTAADT0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\xd3\x00\x00", "AADTANMAAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\xd3\x00\xd3", "AADTANMA0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\xd3\xd3\x00", "AADTANPTAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\x00\xd3\xd3\xd3", "AADTANPT0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\x00\x00\x00", "AADT0wAAAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\x00\x00\xd3", "AADT0wAA0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\x00\xd3\x00", "AADT0wDTAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\x00\xd3\xd3", "AADT0wDT0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\xd3\x00\x00", "AADT09MAAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\xd3\x00\xd3", "AADT09MA0w==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\xd3\xd3\x00", "AADT09PTAA==" }, {7,(const unsigned char*)"\x00\x00\xd3\xd3\xd3\xd3\xd3", "AADT09PT0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\x00\x00\x00", "ANMAAAAAAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\x00\x00\xd3", "ANMAAAAA0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\x00\xd3\x00", "ANMAAADTAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\x00\xd3\xd3", "ANMAAADT0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\xd3\x00\x00", "ANMAANMAAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\xd3\x00\xd3", "ANMAANMA0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\xd3\xd3\x00", "ANMAANPTAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\x00\xd3\xd3\xd3", "ANMAANPT0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\x00\x00\x00", "ANMA0wAAAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\x00\x00\xd3", "ANMA0wAA0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\x00\xd3\x00", "ANMA0wDTAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\x00\xd3\xd3", "ANMA0wDT0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\xd3\x00\x00", "ANMA09MAAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\xd3\x00\xd3", "ANMA09MA0w==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\xd3\xd3\x00", "ANMA09PTAA==" }, {7,(const unsigned char*)"\x00\xd3\x00\xd3\xd3\xd3\xd3", "ANMA09PT0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\x00\x00\x00", "ANPTAAAAAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\x00\x00\xd3", "ANPTAAAA0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\x00\xd3\x00", "ANPTAADTAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\x00\xd3\xd3", "ANPTAADT0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\xd3\x00\x00", "ANPTANMAAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\xd3\x00\xd3", "ANPTANMA0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\xd3\xd3\x00", "ANPTANPTAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\x00\xd3\xd3\xd3", "ANPTANPT0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\x00\x00\x00", "ANPT0wAAAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\x00\x00\xd3", "ANPT0wAA0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\x00\xd3\x00", "ANPT0wDTAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\x00\xd3\xd3", "ANPT0wDT0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\xd3\x00\x00", "ANPT09MAAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\xd3\x00\xd3", "ANPT09MA0w==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\xd3\xd3\x00", "ANPT09PTAA==" }, {7,(const unsigned char*)"\x00\xd3\xd3\xd3\xd3\xd3\xd3", "ANPT09PT0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\x00\x00\x00", "0wAAAAAAAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\x00\x00\xd3", "0wAAAAAA0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\x00\xd3\x00", "0wAAAADTAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\x00\xd3\xd3", "0wAAAADT0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\xd3\x00\x00", "0wAAANMAAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\xd3\x00\xd3", "0wAAANMA0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\xd3\xd3\x00", "0wAAANPTAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\x00\xd3\xd3\xd3", "0wAAANPT0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\x00\x00\x00", "0wAA0wAAAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\x00\x00\xd3", "0wAA0wAA0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\x00\xd3\x00", "0wAA0wDTAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\x00\xd3\xd3", "0wAA0wDT0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\xd3\x00\x00", "0wAA09MAAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\xd3\x00\xd3", "0wAA09MA0w==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\xd3\xd3\x00", "0wAA09PTAA==" }, {7,(const unsigned char*)"\xd3\x00\x00\xd3\xd3\xd3\xd3", "0wAA09PT0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\x00\x00\x00", "0wDTAAAAAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\x00\x00\xd3", "0wDTAAAA0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\x00\xd3\x00", "0wDTAADTAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\x00\xd3\xd3", "0wDTAADT0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\xd3\x00\x00", "0wDTANMAAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\xd3\x00\xd3", "0wDTANMA0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\xd3\xd3\x00", "0wDTANPTAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\x00\xd3\xd3\xd3", "0wDTANPT0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\x00\x00\x00", "0wDT0wAAAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\x00\x00\xd3", "0wDT0wAA0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\x00\xd3\x00", "0wDT0wDTAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\x00\xd3\xd3", "0wDT0wDT0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\xd3\x00\x00", "0wDT09MAAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\xd3\x00\xd3", "0wDT09MA0w==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\xd3\xd3\x00", "0wDT09PTAA==" }, {7,(const unsigned char*)"\xd3\x00\xd3\xd3\xd3\xd3\xd3", "0wDT09PT0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\x00\x00\x00", "09MAAAAAAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\x00\x00\xd3", "09MAAAAA0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\x00\xd3\x00", "09MAAADTAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\x00\xd3\xd3", "09MAAADT0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\xd3\x00\x00", "09MAANMAAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\xd3\x00\xd3", "09MAANMA0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\xd3\xd3\x00", "09MAANPTAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\x00\xd3\xd3\xd3", "09MAANPT0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\x00\x00\x00", "09MA0wAAAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\x00\x00\xd3", "09MA0wAA0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\x00\xd3\x00", "09MA0wDTAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\x00\xd3\xd3", "09MA0wDT0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\xd3\x00\x00", "09MA09MAAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\xd3\x00\xd3", "09MA09MA0w==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\xd3\xd3\x00", "09MA09PTAA==" }, {7,(const unsigned char*)"\xd3\xd3\x00\xd3\xd3\xd3\xd3", "09MA09PT0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\x00\x00\x00", "09PTAAAAAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\x00\x00\xd3", "09PTAAAA0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\x00\xd3\x00", "09PTAADTAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\x00\xd3\xd3", "09PTAADT0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\xd3\x00\x00", "09PTANMAAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\xd3\x00\xd3", "09PTANMA0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\xd3\xd3\x00", "09PTANPTAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\x00\xd3\xd3\xd3", "09PTANPT0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\x00\x00\x00", "09PT0wAAAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\x00\x00\xd3", "09PT0wAA0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\x00\xd3\x00", "09PT0wDTAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\x00\xd3\xd3", "09PT0wDT0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\xd3\x00\x00", "09PT09MAAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\xd3\x00\xd3", "09PT09MA0w==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\xd3\xd3\x00", "09PT09PTAA==" }, {7,(const unsigned char*)"\xd3\xd3\xd3\xd3\xd3\xd3\xd3", "09PT09PT0w==" }, {8,(const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00", "AAAAAAAAAAA=" }, {9,(const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00", "AAAAAAAAAAAA" }, {10,(const unsigned char*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", "AAAAAAAAAAAAAA==" }, }; static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(base64_unittests) TEST_SUITE_INITIALIZE(TestSuiteInitialize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(f) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /*Tests_SRS_BASE64_06_001: [If input is NULL then Base64_Encoder shall return NULL.]*/ TEST_FUNCTION(Base64_Encode_bad_input) { //arrange STRING_HANDLE result; //act result = Base64_Encoder(NULL); //assert ASSERT_IS_NULL( result); } /*Tests_SRS_BASE64_06_007: [Otherwise Base64_Encoder shall return a pointer to STRING, that string contains the base 64 encoding of inpuit.]*/ TEST_FUNCTION(Base64_Encode_simple_good) { //arrange BUFFER_HANDLE input = BUFFER_new(); STRING_HANDLE result; //act result = Base64_Encoder(input); //assert ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(size_t, (size_t)0, strlen(STRING_c_str(result))); // Cleanup STRING_delete(result); BUFFER_delete(input); } TEST_FUNCTION(Base64_Encode_one_char_encode) { //arrange BUFFER_HANDLE input = BUFFER_new(); STRING_HANDLE result; const char* oneCharacter = "a"; BUFFER_build(input, (unsigned char*)oneCharacter,strlen(oneCharacter)); //act result = Base64_Encoder(input); //assert ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, "YQ==", STRING_c_str(result)); // Cleanup STRING_delete(result); BUFFER_delete(input); } TEST_FUNCTION(Base64_Encode_leviathan_succeeds) { //arrange BUFFER_HANDLE input = BUFFER_new(); STRING_HANDLE result; const char* leviathan = "any carnal pleasure."; BUFFER_build(input, (unsigned char*)leviathan, strlen(leviathan)); //act result = Base64_Encoder(input); //assert ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, "YW55IGNhcm5hbCBwbGVhc3VyZS4=", STRING_c_str(result)); // Cleanup STRING_delete(result); BUFFER_delete(input); } TEST_FUNCTION(Base64_Encode_exhaustive_succeeds) { ///arrange size_t i; for (i = 0; i < sizeof(testVector_BINARY_with_equal_signs) / sizeof(testVector_BINARY_with_equal_signs[0]); i++) { ///arrange BUFFER_HANDLE input = BUFFER_new(); STRING_HANDLE result; ASSERT_ARE_EQUAL(int, 0, BUFFER_build(input, testVector_BINARY_with_equal_signs[i].inputData, testVector_BINARY_with_equal_signs[i].inputLength)); ///act result = Base64_Encoder(input); ///assert ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, testVector_BINARY_with_equal_signs[i].expectedOutput, STRING_c_str(result)); ///cleanup BUFFER_delete(input); STRING_delete(result); } } /*Tests_SRS_BASE64_02_001: [If source is NULL then Base64_Encode_Bytes shall return NULL.] */ TEST_FUNCTION(Base64_Encode_Bytes_with_NULL_source_returns_NULL) { ///arrange ///act STRING_HANDLE result = Base64_Encode_Bytes(NULL, 3); ///assert ASSERT_IS_NULL(result); ///cleanup } /*Tests_SRS_BASE64_02_002: [If source is not NULL and size is zero, then Base64_Encode_Bytes shall produce an empty STRING_HANDLE.]*/ TEST_FUNCTION(Base64_Encode_Bytes_with_zero_size_returns_empty_string) { ///arrange ///act STRING_HANDLE result = Base64_Encode_Bytes((const unsigned char*)"a", 0); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, STRING_length(result)); ///cleanup STRING_delete(result); } /*Tests_SRS_BASE64_02_003: [Otherwise, Base64_Encode_Bytes shall produce a STRING_HANDLE containing the Base64 representation of the buffer.] */ TEST_FUNCTION(Base64_Encode_Bytes_exhaustive_succeeds) { ///arrange size_t i; for (i = 0; i < sizeof(testVector_BINARY_with_equal_signs) / sizeof(testVector_BINARY_with_equal_signs[0]); i++) { ///arrange STRING_HANDLE result; ///act result = Base64_Encode_Bytes(testVector_BINARY_with_equal_signs[i].inputData, testVector_BINARY_with_equal_signs[i].inputLength); ///assert ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, testVector_BINARY_with_equal_signs[i].expectedOutput, STRING_c_str(result)); ///cleanup STRING_delete(result); } } TEST_FUNCTION(Base64_Decoder_exhaustive_succeeds) { size_t i; for (i = 0; i < sizeof(testVector_BINARY_with_equal_signs) / sizeof(testVector_BINARY_with_equal_signs[0]); i++) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder(testVector_BINARY_with_equal_signs[i].expectedOutput); ///assert ASSERT_ARE_EQUAL(size_t, testVector_BINARY_with_equal_signs[i].inputLength, BUFFER_length(result)); ASSERT_ARE_EQUAL(int, (int)0, memcmp(BUFFER_u_char(result), testVector_BINARY_with_equal_signs[i].inputData, BUFFER_length(result))); ///Cleanup BUFFER_delete(result); } } /*Tests_SRS_BASE64_06_008: [If source is NULL then Base64_Decoder shall return NULL.]*/ TEST_FUNCTION(Base64_Decoder_null_return_null) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder(NULL); ///assert ASSERT_IS_NULL(result); } /*Tests_SRS_BASE64_06_009: [If the string pointed to by source is zero length then the handle returned shall refer to a zero length buffer.]*/ TEST_FUNCTION(Base64_Decoder_zero_length_returns_zero_length) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder(""); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, BUFFER_length(result)); ///Cleanup BUFFER_delete(result); } /*Tests_SRS_BASE64_06_011: [If the source string has an invalid length for a base 64 encoded string then Base64_Decoder shall return NULL.]*/ TEST_FUNCTION(Base64_Decoder_invalid_length_fails_1) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder("1"); ///assert ASSERT_IS_NULL(result); } /*Tests_SRS_BASE64_06_011: [If the source string has an invalid length for a base 64 encoded string then Base64_Decoder shall return NULL.]*/ TEST_FUNCTION(Base64_Decoder_invalid_length_fails_2) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder("12"); ///assert ASSERT_IS_NULL(result); } /*Tests_SRS_BASE64_06_011: [If the source string has an invalid length for a base 64 encoded string then Base64_Decoder shall return NULL.]*/ TEST_FUNCTION(Base64_Decoder_invalid_length_fails_3) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder("123"); ///assert ASSERT_IS_NULL(result); } /*Tests_SRS_BASE64_06_011: [If the source string has an invalid length for a base 64 encoded string then Base64_Decoder shall return NULL.]*/ TEST_FUNCTION(Base64_Decoder_invalid_length_fails_4) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder("12345"); ///assert ASSERT_IS_NULL(result); } /*Tests_SRS_BASE64_06_011: [If the source string has an invalid length for a base 64 encoded string then Base64_Decoder shall return NULL.]*/ TEST_FUNCTION(Base64_Decoder_invalid_length_fails_5) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder("123456"); ASSERT_IS_NULL(result); } /*Tests_SRS_BASE64_06_011: [If the source string has an invalid length for a base 64 encoded string then Base64_Decoder shall return NULL.]*/ TEST_FUNCTION(Base64_Decoder_invalid_length_fails_6) { ///Arrange BUFFER_HANDLE result; ///act result = Base64_Decoder("1234567"); ///assert ASSERT_IS_NULL(result); } END_TEST_SUITE(base64_unittests); azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/base64_ut/main.c000066400000000000000000000004771362133436400333720ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(base64_unittests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/buffer_ut/000077500000000000000000000000001362133436400324575ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007551362133436400351470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/buffer_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName buffer_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/buffer.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99)buffer_ut.c000066400000000000000000001525761362133436400345450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/buffer_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "umock_c.h" #include "azure_c_shared_utility/buffer_.h" #include "testrunnerswitcher.h" static size_t currentmalloc_call = 0; static size_t whenShallmalloc_fail = 0; static size_t currentrealloc_call = 0; static size_t whenShallrealloc_fail = 0; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void* my_gballoc_realloc(void* ptr, size_t size) { void* result; currentrealloc_call++; if (whenShallrealloc_fail > 0) { if (currentrealloc_call == whenShallrealloc_fail) { result = NULL; } else { result = realloc(ptr, size); } } else { result = realloc(ptr, size); } return result; } void my_gballoc_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #define ALLOCATION_SIZE 16 #define TOTAL_ALLOCATION_SIZE 32 #define BUFFER_TEST1_SIZE 5 #define BUFFER_TEST2_SIZE 6 static const unsigned char BUFFER_Test1[] = {0x01,0x02,0x03,0x04,0x05}; static const unsigned char BUFFER_Test2[] = {0x06,0x07,0x08,0x09,0x10,0x11}; static const unsigned char BUFFER_TEST_VALUE[] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x10,0x11,0x12,0x13,0x14,0x15,0x16}; static const unsigned char ADDITIONAL_BUFFER[] = {0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26}; static const unsigned char TOTAL_BUFFER[] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26}; static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(Buffer_UnitTests) TEST_SUITE_INITIALIZE(setsBufferTempSize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(f) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; currentrealloc_call = 0; whenShallrealloc_fail = 0; } TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_BUFFER_07_001: [BUFFER_new shall allocate a BUFFER_HANDLE that will contain a NULL unsigned char*.] */ TEST_FUNCTION(BUFFER_new_Succeed) { ///arrange BUFFER_HANDLE g_hBuffer; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act g_hBuffer = BUFFER_new(); ///assert ASSERT_IS_NOT_NULL(g_hBuffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* BUFFER_delete Tests BEGIN */ /* Tests_SRS_BUFFER_07_003: [BUFFER_delete shall delete the data associated with the BUFFER_HANDLE.] */ TEST_FUNCTION(BUFFER_delete_Succeed) { ///arrange BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act BUFFER_delete(g_hBuffer); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup //none } /* Tests_SRS_BUFFER_07_003: [BUFFER_delete shall delete the data associated with the BUFFER_HANDLE.] */ TEST_FUNCTION(BUFFER_delete_Alloc_Succeed) { ///arrange BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act BUFFER_delete(g_hBuffer); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup //none } /* Tests_SRS_BUFFER_07_004: [BUFFER_delete shall not delete any BUFFER_HANDLE that is NULL.] */ TEST_FUNCTION(BUFFER_delete_NULL_HANDLE_Succeed) { ///arrange ///act BUFFER_delete(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* BUFFER_pre_Build Tests BEGIN */ /* Tests_SRS_BUFFER_07_005: [BUFFER_pre_build allocates size_t bytes of BUFFER_HANDLE and returns zero on success.] */ TEST_FUNCTION(BUFFER_pre_build_Succeed) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(ALLOCATION_SIZE)); ///act nResult = BUFFER_pre_build(g_hBuffer, ALLOCATION_SIZE); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(size_t, BUFFER_length(g_hBuffer), ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_006: [If handle is NULL or size is 0 then BUFFER_pre_build shall return a nonzero value.] */ /* Tests_SRS_BUFFER_07_013: [BUFFER_pre_build shall return nonzero if any error is encountered.] */ TEST_FUNCTION(BUFFER_pre_build_HANDLE_NULL_Fail) { ///arrange ///act int nResult = BUFFER_pre_build(NULL, ALLOCATION_SIZE); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup //none } /* Tests_SRS_BUFFER_07_006: [If handle is NULL or size is 0 then BUFFER_pre_build shall return a nonzero value.] */ TEST_FUNCTION(BUFFER_pre_Size_Zero_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); umock_c_reset_all_calls(); ///act nResult = BUFFER_pre_build(g_hBuffer, 0); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_013: [BUFFER_pre_build shall return nonzero if any error is encountered.] */ TEST_FUNCTION(BUFFER_pre_build_HANDLE_NULL_Size_Zero_Fail) { ///arrange ///act int nResult = BUFFER_pre_build(NULL, 0); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_BUFFER_07_007: [BUFFER_pre_build shall return nonzero if the buffer has been previously allocated and is not NULL.] */ /* Tests_SRS_BUFFER_07_013: [BUFFER_pre_build shall return nonzero if any error is encountered.] */ TEST_FUNCTION(BUFFER_pre_build_Multiple_Alloc_Fail) { ///arrange BUFFER_HANDLE g_hBuffer; int nResult; g_hBuffer = BUFFER_new(); nResult = BUFFER_pre_build(g_hBuffer, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_pre_build(g_hBuffer, ALLOCATION_SIZE); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_008: [BUFFER_build allocates size_t bytes, copies the unsigned char* into the buffer and returns zero on success.] */ TEST_FUNCTION(BUFFER_build_Succeed) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, ALLOCATION_SIZE)) .IgnoreArgument(1); ///act g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); ///assert ASSERT_ARE_EQUAL(size_t, BUFFER_length(g_hBuffer), ALLOCATION_SIZE); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(g_hBuffer), BUFFER_TEST_VALUE, ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_009: [BUFFER_build shall return nonzero if handle is NULL ] */ TEST_FUNCTION(BUFFER_build_NULL_HANDLE_Fail) { ///arrange ///act int nResult = BUFFER_build(NULL, BUFFER_TEST_VALUE, ALLOCATION_SIZE); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_BUFFER_01_001: [If size is positive and source is NULL, BUFFER_build shall return nonzero] */ TEST_FUNCTION(BUFFER_build_Content_NULL_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); umock_c_reset_all_calls(); ///act nResult = BUFFER_build(g_hBuffer, NULL, ALLOCATION_SIZE); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_01_002: [The size argument can be zero, in which case the underlying buffer held by the buffer instance shall be freed.] */ TEST_FUNCTION(BUFFER_build_Size_Zero_non_NULL_buffer_Succeeds) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, 0); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_01_002: [The size argument can be zero, in which case the underlying buffer held by the buffer instance shall be freed.] */ TEST_FUNCTION(BUFFER_build_Size_Zero_NULL_buffer_Succeeds) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act nResult = BUFFER_build(g_hBuffer, NULL, 0); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_029: [ BUFFER_append_build shall return nonzero if handle or source are NULL or if size is 0. ] */ TEST_FUNCTION(BUFFER_append_build_handle_NULL_fail) { ///arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); umock_c_reset_all_calls(); ///act nResult = BUFFER_append_build(NULL, BUFFER_Test1, BUFFER_TEST1_SIZE); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_029: [ BUFFER_append_build shall return nonzero if handle or source are NULL or if size is 0. ] */ TEST_FUNCTION(BUFFER_append_build_buffer_NULL_buffer_fail) { ///arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); umock_c_reset_all_calls(); ///act nResult = BUFFER_append_build(hBuffer, NULL, BUFFER_TEST1_SIZE); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_029: [ BUFFER_append_build shall return nonzero if handle or source are NULL or if size is 0. ] */ TEST_FUNCTION(BUFFER_append_build_Size_Zero_NULL_buffer_fail) { ///arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); umock_c_reset_all_calls(); ///act nResult = BUFFER_append_build(hBuffer, BUFFER_Test1, 0); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_030: [ if handle->buffer is NULL BUFFER_append_build shall allocate the a buffer of size bytes... ] */ /* Tests_SRS_BUFFER_07_031: [ ... and copy the contents of source to handle->buffer. ] */ /* Tests_SRS_BUFFER_07_034: [ On success BUFFER_append_build shall return 0 ] */ TEST_FUNCTION(BUFFER_append_build_buffer_NULL_succeed) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); //act nResult = BUFFER_append_build(hBuffer, BUFFER_Test1, BUFFER_TEST1_SIZE); //assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hBuffer), BUFFER_Test1, BUFFER_TEST1_SIZE)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_035: [ If any error is encountered BUFFER_append_build shall return a non-null value. ] */ TEST_FUNCTION(BUFFER_append_build_buffer_NULL_fail) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).SetReturn(NULL); //act nResult = BUFFER_append_build(hBuffer, BUFFER_Test1, BUFFER_TEST1_SIZE); //assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_032: [ if handle->buffer is not NULL BUFFER_append_build shall realloc the buffer to be the handle->size + size ] */ /* Tests_SRS_BUFFER_07_033: [ ... and copy the contents of source to the end of the buffer. ] */ /* Tests_SRS_BUFFER_07_034: [ On success BUFFER_append_build shall return 0 ] */ TEST_FUNCTION(BUFFER_append_build_succeed) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_create(BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); //act nResult = BUFFER_append_build(hBuffer, ADDITIONAL_BUFFER, ALLOCATION_SIZE); //assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(size_t, BUFFER_length(hBuffer), TOTAL_ALLOCATION_SIZE); ASSERT_ARE_EQUAL(int, memcmp(BUFFER_u_char(hBuffer), TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE), 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_035: [ If any error is encountered BUFFER_append_build shall return a non-null value. ] */ TEST_FUNCTION(BUFFER_append_build_fail) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_create(BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)).SetReturn(NULL); //act nResult = BUFFER_append_build(hBuffer, ADDITIONAL_BUFFER, ALLOCATION_SIZE); //assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_011: [BUFFER_build shall overwrite previous contents if the buffer has been previously allocated.] */ TEST_FUNCTION(BUFFER_build_when_the_buffer_is_already_allocated_and_the_same_amount_of_bytes_is_needed_succeeds) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, ALLOCATION_SIZE)) .IgnoreArgument(1); ///act nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_011: [BUFFER_build shall overwrite previous contents if the buffer has been previously allocated.] */ TEST_FUNCTION(BUFFER_build_when_the_buffer_is_already_allocated_and_more_bytes_are_needed_succeeds) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, ALLOCATION_SIZE)) .IgnoreArgument(1); ///act nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_011: [BUFFER_build shall overwrite previous contents if the buffer has been previously allocated.] */ TEST_FUNCTION(BUFFER_build_when_the_buffer_is_already_allocated_and_less_bytes_are_needed_succeeds) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, ALLOCATION_SIZE - 1)) .IgnoreArgument(1); ///act nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE - 1); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* BUFFER_unbuild Tests BEGIN */ /* Tests_SRS_BUFFER_07_012: [BUFFER_unbuild shall clear the underlying unsigned char* data associated with the BUFFER_HANDLE this will return zero on success.] */ TEST_FUNCTION(BUFFER_unbuild_Succeed) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act nResult = BUFFER_unbuild(g_hBuffer); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_014: [BUFFER_unbuild shall return a nonzero value if BUFFER_HANDLE is NULL.] */ TEST_FUNCTION(BUFFER_unbuild_HANDLE_NULL_Fail) { ///arrange ///act int nResult = BUFFER_unbuild(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_BUFFER_07_015: [BUFFER_unbuild shall return a nonzero value if the unsigned char* referenced by BUFFER_HANDLE is NULL.] */ TEST_FUNCTION(BUFFER_unbuild_Multiple_Alloc_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); nResult = BUFFER_unbuild(g_hBuffer); umock_c_reset_all_calls(); ///act nResult = BUFFER_unbuild(g_hBuffer); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* BUFFER_enlarge Tests BEGIN */ /* Tests_SRS_BUFFER_07_016: [BUFFER_enlarge shall increase the size of the unsigned char* referenced by BUFFER_HANDLE.] */ TEST_FUNCTION(BUFFER_enlarge_Succeed) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * ALLOCATION_SIZE)) .IgnoreArgument(1); ///act nResult = BUFFER_enlarge(g_hBuffer, ALLOCATION_SIZE); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(size_t, BUFFER_length(g_hBuffer), TOTAL_ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_017: [BUFFER_enlarge shall return a nonzero result if any parameters are NULL or zero.] */ /* Tests_SRS_BUFFER_07_018: [BUFFER_enlarge shall return a nonzero result if any error is encountered.] */ TEST_FUNCTION(BUFFER_enlarge_NULL_HANDLE_Fail) { ///arrange ///act int nResult = BUFFER_enlarge(NULL, ALLOCATION_SIZE); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_BUFFER_07_036: [ if handle is NULL, BUFFER_shrink shall return a non-null value ]*/ TEST_FUNCTION(BUFFER_shrink_handle_NULL_fail) { //arrange int result; //act result = BUFFER_shrink(NULL, ALLOCATION_SIZE, true); //assert ASSERT_ARE_NOT_EQUAL(int, result, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } /* Tests_SRS_BUFFER_07_037: [ If decreaseSize is equal zero, BUFFER_shrink shall return a non-null value ] */ TEST_FUNCTION(BUFFER_shrink_decrease_size_0_fail) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); nResult = BUFFER_build(hBuffer, TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE); umock_c_reset_all_calls(); //act nResult = BUFFER_shrink(hBuffer, 0, true); //assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hBuffer), TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_length(hBuffer), TOTAL_ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_038: [ If decreaseSize is less than the size of the buffer, BUFFER_shrink shall return a non-null value ] */ TEST_FUNCTION(BUFFER_shrink_decrease_size_less_than_len_succeed) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); nResult = BUFFER_build(hBuffer, TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE); umock_c_reset_all_calls(); //act nResult = BUFFER_shrink(hBuffer, TOTAL_ALLOCATION_SIZE+1, true); //assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hBuffer), TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_length(hBuffer), TOTAL_ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_042: [ If a failure is encountered, BUFFER_shrink shall return a non-null value ] */ TEST_FUNCTION(BUFFER_shrink_malloc_fail) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); nResult = BUFFER_build(hBuffer, TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(TOTAL_ALLOCATION_SIZE - ALLOCATION_SIZE)).SetReturn(NULL); //act nResult = BUFFER_shrink(hBuffer, ALLOCATION_SIZE, true); //assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hBuffer), TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_length(hBuffer), TOTAL_ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_039: [ BUFFER_shrink shall allocate a temporary buffer of existing buffer size minus decreaseSize. ] */ /* Tests_SRS_BUFFER_07_040: [ if the fromEnd variable is true, BUFFER_shrink shall remove the end of the buffer of size decreaseSize. ] */ TEST_FUNCTION(BUFFER_shrink_from_end_succeed) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); nResult = BUFFER_build(hBuffer, TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(TOTAL_ALLOCATION_SIZE-ALLOCATION_SIZE)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act nResult = BUFFER_shrink(hBuffer, ALLOCATION_SIZE, true); //assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hBuffer), BUFFER_Test1, BUFFER_TEST1_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_length(hBuffer), ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_039: [ BUFFER_shrink shall allocate a temporary buffer of existing buffer size minus decreaseSize. ] */ /* Tests_SRS_BUFFER_07_040: [ if the fromEnd variable is true, BUFFER_shrink shall remove the end of the buffer of size decreaseSize. ] */ /* Tests_SRS_BUFFER_07_043: [ If the decreaseSize is equal the buffer size , BUFFER_shrink shall deallocate the buffer and set the size to zero. ] */ TEST_FUNCTION(BUFFER_shrink_all_buffer_succeed) { //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); nResult = BUFFER_build(hBuffer, TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act nResult = BUFFER_shrink(hBuffer, TOTAL_ALLOCATION_SIZE, true); //assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_IS_NULL(BUFFER_u_char(hBuffer)); ASSERT_ARE_EQUAL(size_t, BUFFER_length(hBuffer), 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_039: [ BUFFER_shrink shall allocate a temporary buffer of existing buffer size minus decreaseSize. ] */ /* Tests_SRS_BUFFER_07_041: [ if the fromEnd variable is false, BUFFER_shrink shall remove the beginning of the buffer of size decreaseSize. ] */ TEST_FUNCTION(BUFFER_shrink_from_beginning_succeed) { const unsigned char TEST_TOTAL_BUFFER[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26 }; //arrange int nResult; BUFFER_HANDLE hBuffer; hBuffer = BUFFER_new(); nResult = BUFFER_build(hBuffer, TEST_TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(TOTAL_ALLOCATION_SIZE-ALLOCATION_SIZE)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act nResult = BUFFER_shrink(hBuffer, ALLOCATION_SIZE, false); //assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hBuffer), ADDITIONAL_BUFFER, ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_length(hBuffer), ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(hBuffer); } /* Tests_SRS_BUFFER_07_017: [BUFFER_enlarge shall return a nonzero result if any parameters are NULL or zero.] */ /* Tests_SRS_BUFFER_07_018: [BUFFER_enlarge shall return a nonzero result if any error is encountered.] */ TEST_FUNCTION(BUFFER_enlarge_Size_Zero_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_enlarge(g_hBuffer, 0); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* BUFFER_content Tests BEGIN */ /* Tests_SRS_BUFFER_07_019: [BUFFER_content shall return the data contained within the BUFFER_HANDLE.] */ TEST_FUNCTION(BUFFER_content_Succeed) { ///arrange int nResult; const unsigned char* content; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act content = NULL; nResult = BUFFER_content(g_hBuffer, &content); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(content, BUFFER_TEST_VALUE, ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_020: [If the handle and/or content*is NULL BUFFER_content shall return nonzero.] */ TEST_FUNCTION(BUFFER_content_HANDLE_NULL_Fail) { ///arrange ///act const unsigned char* content = NULL; int nResult = BUFFER_content(NULL, &content); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_IS_NULL(content); ///cleanup } /* Tests_SRS_BUFFER_07_020: [If the handle and/or content*is NULL BUFFER_content shall return nonzero.] */ TEST_FUNCTION(BUFFER_content_Char_NULL_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_content(g_hBuffer, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* BUFFER_size Tests BEGIN */ /* Tests_SRS_BUFFER_07_021: [BUFFER_size shall place the size of the associated buffer in the size variable and return zero on success.] */ TEST_FUNCTION(BUFFER_size_Succeed) { ///arrange int nResult; size_t size; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act size = 0; nResult = BUFFER_size(g_hBuffer, &size); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(size_t, size, ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_022: [BUFFER_size shall return a nonzero value for any error that is encountered.] */ TEST_FUNCTION(BUFFER_size_HANDLE_NULL_Fail) { ///arrange ///act size_t size = 0; int nResult = BUFFER_size(NULL, &size); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_BUFFER_07_022: [BUFFER_size shall return a nonzero value for any error that is encountered.] */ TEST_FUNCTION(BUFFER_size_Size_t_NULL_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_size(g_hBuffer, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* BUFFER_append Tests BEGIN */ /* Tests_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.] */ TEST_FUNCTION(BUFFER_append_Succeed) { ///arrange int nResult; BUFFER_HANDLE hAppend; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); hAppend = BUFFER_new(); nResult = BUFFER_build(hAppend, ADDITIONAL_BUFFER, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, ALLOCATION_SIZE + ALLOCATION_SIZE)) .IgnoreArgument(1); ///act nResult = BUFFER_append(g_hBuffer, hAppend); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(g_hBuffer), TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hAppend), ADDITIONAL_BUFFER, ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(hAppend); BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_023: [BUFFER_append shall return a nonzero upon any error that is encountered.] */ TEST_FUNCTION(BUFFER_append_HANDLE_NULL_Fail) { ///arrange int nResult; BUFFER_HANDLE hAppend = BUFFER_new(); nResult = BUFFER_build(hAppend, ADDITIONAL_BUFFER, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_append(NULL, hAppend); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(hAppend); } /* Tests_SRS_BUFFER_07_023: [BUFFER_append shall return a nonzero upon any error that is encountered.] */ TEST_FUNCTION(BUFFER_append_APPEND_HANDLE_NULL_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_append(g_hBuffer, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.] */ TEST_FUNCTION(BUFFER_append_HANDLE2_SIZE_ZERO_SUCCEED) { ///arrange int nResult; size_t howBig; BUFFER_HANDLE handle1 = BUFFER_create(BUFFER_Test1, BUFFER_TEST1_SIZE); BUFFER_HANDLE handle2 = BUFFER_create(BUFFER_Test2, 0); // umock_c_reset_all_calls(); ///act nResult = BUFFER_append(handle1, handle2); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); howBig = BUFFER_length(handle1); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(handle1), BUFFER_Test1, BUFFER_TEST1_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_TEST1_SIZE, howBig); //ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(handle1); BUFFER_delete(handle2); } /* Tests_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.] */ TEST_FUNCTION(BUFFER_append_HANDLE1_SIZE_ZERO_SUCCEED) { ///arrange int nResult; size_t howBig; BUFFER_HANDLE handle1 = BUFFER_create(BUFFER_Test1, 0); BUFFER_HANDLE handle2 = BUFFER_create(BUFFER_Test2, BUFFER_TEST2_SIZE); // umock_c_reset_all_calls(); ///act nResult = BUFFER_append(handle1, handle2); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); howBig = BUFFER_length(handle1); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(handle1), BUFFER_Test2, BUFFER_TEST2_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_TEST2_SIZE, howBig); //ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(handle1); BUFFER_delete(handle2); } /* Tests_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.] */ TEST_FUNCTION(BUFFER_prepend_HANDLE1_SIZE_ZERO_SUCCEED) { ///arrange int nResult; size_t howBig; BUFFER_HANDLE handle1 = BUFFER_create(BUFFER_Test1, 0); BUFFER_HANDLE handle2 = BUFFER_create(BUFFER_Test2, BUFFER_TEST2_SIZE); // umock_c_reset_all_calls(); ///act nResult = BUFFER_prepend(handle1, handle2); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); howBig = BUFFER_length(handle1); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(handle1), BUFFER_Test2, BUFFER_TEST2_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_TEST2_SIZE, howBig); //ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(handle1); BUFFER_delete(handle2); } /* Tests_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.] */ TEST_FUNCTION(BUFFER_prepend_HANDLE2_SIZE_ZERO_SUCCEED) { ///arrange int nResult; size_t howBig; BUFFER_HANDLE handle1 = BUFFER_create(BUFFER_Test1, BUFFER_TEST1_SIZE); BUFFER_HANDLE handle2 = BUFFER_create(BUFFER_Test2, 0); // umock_c_reset_all_calls(); ///act nResult = BUFFER_prepend(handle1, handle2); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); howBig = BUFFER_length(handle1); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(handle1), BUFFER_Test1, BUFFER_TEST1_SIZE)); ASSERT_ARE_EQUAL(size_t, BUFFER_TEST1_SIZE, howBig); //ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(handle1); BUFFER_delete(handle2); } /* Tests_SRS_BUFFER_01_005: [ BUFFER_prepend shall return a non-zero upon value any error that is encountered. ]*/ TEST_FUNCTION(BUFFER_prepend_APPEND_HANDLE1_NULL_Fail) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_prepend(g_hBuffer, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_01_005: [ BUFFER_prepend shall return a non-zero upon value any error that is encountered. ]*/ TEST_FUNCTION(BUFFER_prepend_APPEND_HANDLE2_NULL_Fail) { ///arrange int nResult; BUFFER_HANDLE hAppend = BUFFER_new(); nResult = BUFFER_build(hAppend, ADDITIONAL_BUFFER, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act nResult = BUFFER_prepend(NULL, hAppend); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(hAppend); } /* Tests_SRS_BUFFER_07_024: [BUFFER_append concatenates b2 onto b1 without modifying b2 and shall return zero on success.] */ TEST_FUNCTION(BUFFER_prepend_Succeed) { ///arrange int nResult; BUFFER_HANDLE g_hBuffer; BUFFER_HANDLE hAppend; g_hBuffer = BUFFER_new(); nResult = BUFFER_build(g_hBuffer, ADDITIONAL_BUFFER, ALLOCATION_SIZE); hAppend = BUFFER_new(); nResult = BUFFER_build(hAppend, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(ALLOCATION_SIZE + ALLOCATION_SIZE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act nResult = BUFFER_prepend(g_hBuffer, hAppend); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(g_hBuffer), TOTAL_BUFFER, TOTAL_ALLOCATION_SIZE)); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hAppend), BUFFER_TEST_VALUE, ALLOCATION_SIZE)); //TOTAL_BUFFER ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(hAppend); BUFFER_delete(g_hBuffer); } /* BUFFER_u_char */ /* Tests_SRS_BUFFER_07_025: [BUFFER_u_char shall return a pointer to the underlying unsigned char*.] */ TEST_FUNCTION(BUFFER_U_CHAR_Succeed) { ///arrange BUFFER_HANDLE g_hBuffer; unsigned char* u; g_hBuffer = BUFFER_new(); (void)BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act u = BUFFER_u_char(g_hBuffer); ///assert ASSERT_ARE_EQUAL(int, 0, memcmp(u, BUFFER_TEST_VALUE, ALLOCATION_SIZE) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_026: [BUFFER_u_char shall return NULL for any error that is encountered.] */ TEST_FUNCTION(BUFFER_U_CHAR_HANDLE_NULL_Fail) { ///arrange ///act ASSERT_IS_NULL(BUFFER_u_char(NULL)); /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_BUFFER_07_029: [BUFFER_u_char shall return NULL if underlying buffer size is zero.] */ TEST_FUNCTION(BUFFER_U_CHAR_HANDLE_SIZE_ZERO_Fail) { ///arrange unsigned char c = 'c'; BUFFER_HANDLE g_hBuffer = BUFFER_create(&c, 0); umock_c_reset_all_calls(); ///act ASSERT_IS_NULL(BUFFER_u_char(g_hBuffer)); /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); /// cleanup BUFFER_delete(g_hBuffer); } /* BUFFER_length */ /* Tests_SRS_BUFFER_07_027: [BUFFER_length shall return the size of the underlying buffer.] */ TEST_FUNCTION(BUFFER_length_Succeed) { ///arrange BUFFER_HANDLE g_hBuffer; size_t l; g_hBuffer = BUFFER_new(); (void)BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); ///act l = BUFFER_length(g_hBuffer); ///assert ASSERT_ARE_EQUAL(size_t, l, ALLOCATION_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); } /* Tests_SRS_BUFFER_07_028: [BUFFER_length shall return zero for any error that is encountered.] */ TEST_FUNCTION(BUFFER_length_HANDLE_NULL_Succeed) { ///arrange ///act size_t size = BUFFER_length(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, size, 0); } TEST_FUNCTION(BUFFER_Clone_Succeed) { ///arrange BUFFER_HANDLE g_hBuffer; BUFFER_HANDLE hclone; g_hBuffer = BUFFER_new(); (void)BUFFER_build(g_hBuffer, BUFFER_TEST_VALUE, ALLOCATION_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_malloc(ALLOCATION_SIZE)); ///act hclone = BUFFER_clone(g_hBuffer); ///assert ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hclone), BUFFER_TEST_VALUE, ALLOCATION_SIZE) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(g_hBuffer); BUFFER_delete(hclone); } TEST_FUNCTION(BUFFER_Clone_HANDLE_NULL_Fail) { ///arrange ///act BUFFER_HANDLE result = BUFFER_clone(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /*Tests_SRS_BUFFER_02_001: [If source is NULL then BUFFER_create shall return NULL.] */ TEST_FUNCTION(BUFFER_create_with_NULL_source_fails) { ///arrange ///act BUFFER_HANDLE res = BUFFER_create(NULL, 0); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(res); ///cleanup } /*Tests_SRS_BUFFER_02_002: [Otherwise, BUFFER_create shall allocate memory to hold size bytes and shall copy from source size bytes into the newly allocated memory.] */ /*Tests_SRS_BUFFER_02_004: [Otherwise, BUFFER_create shall return a non-NULL handle*/ TEST_FUNCTION(BUFFER_create_happy_path) { ///arrange BUFFER_HANDLE res; const unsigned char* data; size_t howBig; char c = '3'; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(1)); ///act res = BUFFER_create((const unsigned char*)&c, 1); ///assert ASSERT_IS_NOT_NULL(res); howBig = BUFFER_length(res); ASSERT_ARE_EQUAL(size_t, 1, howBig); data = BUFFER_u_char(res); ASSERT_ARE_EQUAL(uint8_t, '3', data[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(res); } /*Tests_SRS_BUFFER_02_002: [Otherwise, BUFFER_create shall allocate memory to hold size bytes and shall copy from source size bytes into the newly allocated memory.] */ /* Tests_SRS_BUFFER_02_005: [If size parameter is 0 then 1 byte of memory shall be allocated yet size of the buffer shall be set to 0.]*/ TEST_FUNCTION(BUFFER_create_ZERO_SIZE_SUCCEED) { ///arrange size_t howBig; BUFFER_HANDLE res; const unsigned char* data; char c = '3'; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(1)); ///act res = BUFFER_create((const unsigned char*)&c, 0); ///assert ASSERT_IS_NOT_NULL(res); howBig = BUFFER_length(res); data = BUFFER_u_char(res); ASSERT_IS_NULL(data); ASSERT_ARE_EQUAL(size_t, 0, howBig); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(res); } /*Tests_SRS_BUFFER_02_003: [If allocating memory fails, then BUFFER_create shall return NULL.] */ TEST_FUNCTION(BUFFER_create_fails_when_gballoc_fails_1) { ///arrange char c = '3'; BUFFER_HANDLE res; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(1)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); whenShallmalloc_fail = 2; ///act res = BUFFER_create((const unsigned char*)&c, 1); ///assert ASSERT_IS_NULL(res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(res); } /*Tests_SRS_BUFFER_02_003: [If allocating memory fails, then BUFFER_create shall return NULL.] */ TEST_FUNCTION(BUFFER_create_fails_when_gballoc_fails_2) { ///arrange char c = '3'; BUFFER_HANDLE res; whenShallmalloc_fail = 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act res = BUFFER_create((const unsigned char*)&c, 1); ///assert ASSERT_IS_NULL(res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup BUFFER_delete(res); } /* BUFFER_fill */ /* Tests_SRS_BUFFER_07_001: [ BUFFER_fill shall fill the supplied BUFFER_HANDLE with the supplied fill character. ] */ TEST_FUNCTION(BUFFER_fill_succeed) { int result; char* expected; char* actual; //arrange BUFFER_HANDLE buffer = BUFFER_new(); const unsigned char RESULT_BUFFER[] = { '@', '@', '@', '@', '@' }; (void)BUFFER_build(buffer, BUFFER_Test1, BUFFER_TEST1_SIZE); umock_c_reset_all_calls(); //act result = BUFFER_fill(buffer, '@'); expected = umockc_stringify_buffer(RESULT_BUFFER, BUFFER_TEST1_SIZE); actual = umockc_stringify_buffer(BUFFER_u_char(buffer), BUFFER_length(buffer)); //assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, expected, actual); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(buffer); my_gballoc_free(expected); my_gballoc_free(actual); } /* Tests_SRS_BUFFER_07_002: [ If handle is NULL BUFFER_fill shall return a non-zero value. ] */ TEST_FUNCTION(BUFFER_fill_handle_NULL_fail) { int result; //arrange umock_c_reset_all_calls(); //act result = BUFFER_fill(NULL, '@'); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } /* Tests_SRS_BUFFER_07_001: [ BUFFER_fill shall fill the supplied BUFFER_HANDLE with the supplied fill character. ] */ TEST_FUNCTION(BUFFER_fill_empty_buffer_succeed) { int result; //arrange BUFFER_HANDLE buffer = BUFFER_new(); umock_c_reset_all_calls(); //act result = BUFFER_fill(buffer, '@'); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup BUFFER_delete(buffer); } END_TEST_SUITE(Buffer_UnitTests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/buffer_ut/main.c000066400000000000000000000005041362133436400335460ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(Buffer_UnitTests, failedTestCount); return (int)failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/condition_ut/000077500000000000000000000000001362133436400331745ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000013641362133436400356610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/condition_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName condition_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ${CONDITION_C_FILE} ${LOCK_C_FILE} ${THREAD_C_FILE} ) if(UNIX) # linux & apple set(${theseTestsName}_c_files ${${theseTestsName}_c_files} ../../adapters/linux_time.c ) endif() set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") if(WIN32) else() target_link_libraries(${theseTestsName}_exe pthread) endif() compile_c_test_artifacts_as(${theseTestsName} C99) condition_ut.c000066400000000000000000000224261362133436400357650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/condition_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/condition.h" #include "azure_c_shared_utility/lock.h" #include "azure_c_shared_utility/threadapi.h" #define ENABLE_MOCKS #include "umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, void*, gballoc_malloc, size_t, size); MOCKABLE_FUNCTION(, void, gballoc_free, void*, ptr); #ifdef __cplusplus } #endif #include "umock_c.h" #define GBALLOC_H void* real_gballoc_malloc(size_t size); void* real_gballoc_calloc(size_t nmemb, size_t size); void* real_gballoc_realloc(void* ptr, size_t size); void real_gballoc_free(void* ptr); #define TEST_LOCK_HANDLE (LOCK_HANDLE)0x4443 #define TEST_TIME ((double)3600) #define TEST_TIME_T ((time_t)TEST_TIME) #define CONDITION_WAIT_MS 2000 static TEST_MUTEX_HANDLE g_testByTest; static bool malloc_will_fail = false; TEST_DEFINE_ENUM_TYPE(COND_RESULT, COND_RESULT_VALUES) #ifdef __cplusplus extern "C" { #endif void* my_gballoc_malloc(size_t size) { void* result = NULL; if (malloc_will_fail == false) { result = real_gballoc_malloc(size); } return result; } void my_gballoc_free(void* ptr) { real_gballoc_free(ptr); } #ifdef __cplusplus } #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } COND_RESULT Condition_Handle_ToString(COND_HANDLE handle) { COND_RESULT result = COND_OK; if (handle == NULL) { result = COND_ERROR; } return result; } BEGIN_TEST_SUITE(Condition_UnitTests) TEST_SUITE_INITIALIZE(a) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(b) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(f) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); malloc_will_fail = false; } TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } // Tests_SRS_CONDITION_18_002: [ Condition_Init shall create and return a CONDITION_HANDLE ] TEST_FUNCTION(Condition_Init_Success) { //arrange COND_HANDLE handle = NULL; EXPECTED_CALL(gballoc_malloc(4)); EXPECTED_CALL(gballoc_free(0)); //act handle = Condition_Init(); //assert ASSERT_IS_NOT_NULL(handle); //free Condition_Deinit(handle); } // Tests_SRS_CONDITION_18_001: [ Condition_Post shall return COND_INVALID_ARG if handle is NULL ] TEST_FUNCTION(Condition_Post_Handle_NULL_Failure) { //arrange COND_RESULT result; //act result = Condition_Post(NULL); //assert ASSERT_ARE_EQUAL(COND_RESULT, COND_INVALID_ARG, result); //free } // Tests_SRS_CONDITION_18_003: [ Condition_Post shall return COND_OK if it succcessfully posts the condition ] TEST_FUNCTION(Condition_Post_Handle_Succeed) { //arrange COND_HANDLE handle = NULL; COND_RESULT result; EXPECTED_CALL(gballoc_malloc(4)); EXPECTED_CALL(gballoc_free(0)); handle = Condition_Init(); //act result = Condition_Post(handle); //assert ASSERT_ARE_EQUAL(COND_RESULT, COND_OK, result); //free Condition_Deinit(handle); } // Tests_SRS_CONDITION_18_004: [ Condition_Wait shall return COND_INVALID_ARG if handle is NULL ] TEST_FUNCTION(Condition_Wait_Handle_NULL_Fail) { //arrange COND_RESULT result; LOCK_HANDLE lock; lock = Lock_Init(); //act result = Condition_Wait(NULL, lock, 0); //assert ASSERT_ARE_EQUAL(COND_RESULT, COND_INVALID_ARG, result); //free Lock_Deinit(lock); } // Tests_SRS_CONDITION_18_005: [ Condition_Wait shall return COND_INVALID_ARG if lock is NULL and timeout_milliseconds is 0 ] TEST_FUNCTION(Condition_Wait_LOCK_NULL_Fail) { //arrange COND_HANDLE handle = NULL; COND_RESULT result; EXPECTED_CALL(gballoc_malloc(4)); EXPECTED_CALL(gballoc_free(0)); handle = Condition_Init(); //act result = Condition_Wait(handle, NULL, 0); //assert ASSERT_ARE_EQUAL(COND_RESULT, COND_INVALID_ARG, result); //free Condition_Deinit(handle); } // Tests_SRS_CONDITION_18_006: [ Condition_Wait shall return COND_INVALID_ARG if lock is NULL and timeout_milliseconds is not 0. ] TEST_FUNCTION(Condition_Wait_LOCK_NULL_Ms_Fail) { //arrange COND_HANDLE handle = NULL; COND_RESULT result; EXPECTED_CALL(gballoc_malloc(4)); EXPECTED_CALL(gballoc_free(0)); handle = Condition_Init(); //act result = Condition_Wait(handle, NULL, CONDITION_WAIT_MS); //assert ASSERT_ARE_EQUAL(COND_RESULT, COND_INVALID_ARG, result); //free Condition_Deinit(handle); } // Tests_SRS_CONDITION_18_007: [ Condition_Deinit will not fail if handle is NULL ] TEST_FUNCTION(Condition_Deinit_Fail) { //arrange COND_HANDLE handle = NULL; //act //assert //free Condition_Deinit(handle); } // Tests_SRS_CONDITION_18_008: [ Condition_Init shall return NULL if it fails to allocate the CONDITION_HANDLE ] TEST_FUNCTION(Condition_Init_allocation_fail) { // arrange COND_HANDLE handle = NULL; malloc_will_fail = true; EXPECTED_CALL(gballoc_malloc(4)); // act handle = Condition_Init(); //assert ASSERT_IS_NULL(handle); //free } // Tests_SRS_CONDITION_18_009: [ Condition_Deinit will deallocate handle if it is not NULL ] TEST_FUNCTION(Condition_Deinit_deallocates_handle) { // arrange COND_HANDLE handle = NULL; handle = Condition_Init(); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(NULL)); // act Condition_Deinit(handle); // assert } typedef struct _tagLockAndConfition { LOCK_HANDLE lock; COND_HANDLE condition; } LockAndCondition; static int trigger_thread_proc(void *h) { LockAndCondition *m = (LockAndCondition*)h; ThreadAPI_Sleep(50); Lock(m->lock); Condition_Post(m->condition); Unlock(m->lock); return 0; } THREAD_HANDLE trigger_after_50_ms(COND_HANDLE handle) { THREAD_HANDLE th = NULL; ThreadAPI_Create(&th, trigger_thread_proc, handle); return th; } // Tests_SRS_CONDITION_18_010: [ Condition_Wait shall return COND_OK if the condition is triggered and timeout_milliseconds is 0 ] TEST_FUNCTION(Condition_Wait_ok_on_trigger_and_zero_timeout) { // arrange LockAndCondition m; THREAD_HANDLE th; COND_RESULT result; m.condition = Condition_Init(); m.lock = Lock_Init(); // act th = trigger_after_50_ms(&m); Lock(m.lock); result = Condition_Wait(m.condition, m.lock, 0); ThreadAPI_Join(th, NULL); Unlock(m.lock); // assert ASSERT_ARE_EQUAL(COND_RESULT, COND_OK, result); Lock_Deinit(m.lock); Condition_Deinit(m.condition); umock_c_reset_all_calls(); } // Tests_SRS_CONDITION_18_011: [Condition_wait shall return COND_TIMEOUT if the condition is NOT triggered and timeout_milliseconds is not 0] TEST_FUNCTION(Condition_Wait_timeout_when_not_triggered) { // arrange LockAndCondition m; COND_RESULT result; m.condition = Condition_Init(); m.lock = Lock_Init(); // act Lock(m.lock); result = Condition_Wait(m.condition, m.lock, 150); Unlock(m.lock); // assert ASSERT_ARE_EQUAL(COND_RESULT, COND_TIMEOUT, result); Lock_Deinit(m.lock); Condition_Deinit(m.condition); } // Tests_SRS_CONDITION_18_012: [ Condition_Wait shall return COND_OK if the condition is triggered and timeout_milliseconds is not 0 ] // Tests_SRS_CONDITION_18_013: [ Condition_Wait shall accept relative timeouts ] TEST_FUNCTION(Condition_Wait_ok_on_trigger_with_timeout) { // arrange LockAndCondition m; COND_RESULT result; THREAD_HANDLE th; m.condition = Condition_Init(); m.lock = Lock_Init(); // act th = trigger_after_50_ms(&m); Lock(m.lock); result = Condition_Wait(m.condition, m.lock, 1000); Unlock(m.lock); ThreadAPI_Join(th, NULL); // assert ASSERT_ARE_EQUAL(COND_RESULT, COND_OK, result); Lock_Deinit(m.lock); Condition_Deinit(m.condition); umock_c_reset_all_calls(); } END_TEST_SUITE(Condition_UnitTests); /*if malloc is defined as gballoc_malloc at this moment, there'd be serious trouble*/ #define Lock(x) (LOCK_OK + gballocState - gballocState) /*compiler warning about constant in if condition*/ #define Unlock(x) (LOCK_OK + gballocState - gballocState) #define Lock_Init() (LOCK_HANDLE)0x42 #define Lock_Deinit(x) (LOCK_OK + gballocState - gballocState) #define gballoc_malloc real_gballoc_malloc #define gballoc_realloc real_gballoc_realloc #define gballoc_calloc real_gballoc_calloc #define gballoc_free real_gballoc_free #include "gballoc.c" #undef Lock #undef Unlock #undef Lock_Init #undef Lock_Deinit main.c000066400000000000000000000005021362133436400342020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/condition_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(Condition_UnitTests, failedTestCount); return failedTestCount; } connectionstringparser_ut/000077500000000000000000000000001362133436400357325ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000015711362133436400404760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/connectionstringparser_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName connectionstringparser_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) include_directories(${SHARED_UTIL_REAL_TEST_FOLDER}) set(${theseTestsName}_c_files ../real_test_files/real_map.c ../real_test_files/real_string_tokenizer.c ../real_test_files/real_strings.c ${SHARED_UTIL_SRC_FOLDER}/crt_abstractions.c ${SHARED_UTIL_SRC_FOLDER}/connection_string_parser.c ) set(${theseTestsName}_h_files ../real_test_files/real_map.h ../real_test_files/real_string_tokenizer.h ../real_test_files/real_strings.h ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) connectionstringparser_ut.c000066400000000000000000001331501362133436400434140ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/connectionstringparser_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* s) { free(s); } void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } #include "azure_c_shared_utility/crt_abstractions.h" #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_bool.h" #include "umocktypes_stdint.h" #include "umock_c_negative_tests.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/string_tokenizer.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/connection_string_parser.h" #include "real_map.h" #include "real_string_tokenizer.h" #include "real_strings.h" IMPLEMENT_UMOCK_C_ENUM_TYPE(MAP_RESULT, MAP_RESULT_VALUES); static TEST_MUTEX_HANDLE g_testByTest; static const char* TEST_STRING_PAIR = "key1=value1"; STRING_HANDLE TEST_STRING_HANDLE_PAIR; static const char* TEST_STRING_KEY = "key1="; STRING_HANDLE TEST_STRING_HANDLE_KEY; static const char* TEST_STRING_2_PAIR = "key1=value1;key2=value2"; STRING_HANDLE TEST_STRING_HANDLE_2_PAIR; static const char* TEST_STRING_2_PAIR_SEMICOLON = "key1=value1;key2=value2;"; STRING_HANDLE TEST_STRING_HANDLE_2_PAIR_SEMICOLON; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(connectionstringparser_ut) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_stdint_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_TYPE(MAP_RESULT, MAP_RESULT); REGISTER_UMOCK_ALIAS_TYPE(STRING_TOKENIZER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(MAP_FILTER_CALLBACK, void*); REGISTER_UMOCK_ALIAS_TYPE(MAP_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_STRING_GLOBAL_MOCK_HOOK; REGISTER_STRING_TOKENIZER_GLOBAL_MOCK_HOOK; REGISTER_MAP_GLOBAL_MOCK_HOOK; TEST_STRING_HANDLE_PAIR = STRING_construct(TEST_STRING_PAIR); TEST_STRING_HANDLE_KEY = STRING_construct(TEST_STRING_KEY); TEST_STRING_HANDLE_2_PAIR = STRING_construct(TEST_STRING_2_PAIR); TEST_STRING_HANDLE_2_PAIR_SEMICOLON = STRING_construct(TEST_STRING_2_PAIR_SEMICOLON); } TEST_SUITE_CLEANUP(TestClassCleanup) { STRING_delete(TEST_STRING_HANDLE_PAIR); STRING_delete(TEST_STRING_HANDLE_KEY); STRING_delete(TEST_STRING_HANDLE_2_PAIR); STRING_delete(TEST_STRING_HANDLE_2_PAIR_SEMICOLON); umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* connectionstringparser_parse */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_001: [connectionstringparser_parse shall parse all key value pairs from the connection_string passed in as argument and return a new map that holds the key/value pairs.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_003: [connectionstringparser_parse shall create a STRING tokenizer to be used for parsing the connection string, by calling STRING_TOKENIZER_create.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_004: [connectionstringparser_parse shall start scanning at the beginning of the connection string.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_016: [2 STRINGs shall be allocated in order to hold the to be parsed key and value tokens.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_005: [The following actions shall be repeated until parsing is complete:] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_006: [connectionstringparser_parse shall find a token (the key of the key/value pair) delimited by the "=" character, by calling STRING_TOKENIZER_get_next_token.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_007: [If STRING_TOKENIZER_get_next_token fails, parsing shall be considered complete.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_014: [After the parsing is complete the previously allocated STRINGs and STRING tokenizer shall be freed by calling STRING_TOKENIZER_destroy.] */ TEST_FUNCTION(connectionstringparser_parse_with_an_empty_string_yields_an_empty_map) { // arrange MAP_HANDLE result; STRING_HANDLE connectionString = STRING_new(); STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(connectionString); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(connectionString)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(connectionString); // assert ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup STRING_delete(connectionString); Map_Destroy(result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_002: [If connection_string is NULL then connectionstringparser_parse shall fail and return NULL.] */ TEST_FUNCTION(connectionstringparser_parse_with_NULL_connection_string_fails) { // arrange // act MAP_HANDLE result = connectionstringparser_parse(NULL); // assert ASSERT_ARE_EQUAL(void_ptr, NULL, result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_015: [If STRING_TOKENIZER_create fails, connectionstringparser_parse shall fail and return NULL.] */ TEST_FUNCTION(when_creating_the_string_tokenizer_fails_then_connectionstringparser_fails) { // arrange MAP_HANDLE result; STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)) .SetReturn((STRING_TOKENIZER_HANDLE)NULL); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(void_ptr, NULL, result); // cleanup } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_017: [If allocating the STRINGs fails connectionstringparser_parse shall fail and return NULL.] */ TEST_FUNCTION(when_allocating_the_key_token_string_fails_then_connectionstringparser_fails) { // arrange MAP_HANDLE result; STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()).SetReturn((STRING_HANDLE)NULL); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_017: [If allocating the STRINGs fails connectionstringparser_parse shall fail and return NULL.] */ TEST_FUNCTION(when_allocating_the_value_token_string_fails_then_connectionstringparser_fails) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()).SetReturn((STRING_HANDLE)NULL); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_018: [If creating the result map fails, then connectionstringparser_parse shall return NULL.] */ TEST_FUNCTION(when_allocating_the_result_map_fails_then_connectionstringparser_fails) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn((MAP_HANDLE)NULL); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_001: [connectionstringparser_parse shall parse all key value pairs from the connection_string passed in as argument and return a new map that holds the key/value pairs.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_003: [connectionstringparser_parse shall create a STRING tokenizer to be used for parsing the connection string, by calling STRING_TOKENIZER_create.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_004: [connectionstringparser_parse shall start scanning at the beginning of the connection string.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_016: [2 STRINGs shall be allocated in order to hold the to be parsed key and value tokens.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_005: [The following actions shall be repeated until parsing is complete:] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_006: [connectionstringparser_parse shall find a token (the key of the key/value pair) delimited by the "=" character, by calling STRING_TOKENIZER_get_next_token.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_007: [If STRING_TOKENIZER_get_next_token fails, parsing shall be considered complete.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_014: [After the parsing is complete the previously allocated STRINGs and STRING tokenizer shall be freed by calling STRING_TOKENIZER_destroy.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_008: [connectionstringparser_parse shall find a token (the value of the key/value pair) delimited by the ";" character, by calling STRING_TOKENIZER_get_next_token.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_010: [The key and value shall be added to the result map by using Map_Add.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_011: [The C strings for the key and value shall be extracted from the previously parsed STRINGs by using STRING_c_str.] */ TEST_FUNCTION(connectionstringparser_parse_with_a_key_value_pair_adds_it_to_the_result_map) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_PAIR, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_PAIR +5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)); STRICT_EXPECTED_CALL(STRING_c_str(value)); STRICT_EXPECTED_CALL(Map_Add(IGNORED_PTR_ARG, "key1", "value1")).IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(5)); STRICT_EXPECTED_CALL(gballoc_malloc(7)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_EQUAL(char_ptr, "value1", Map_GetValueFromKey(result, "key1")); // cleanup Map_Destroy(result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_009: [If STRING_TOKENIZER_get_next_token fails, connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ TEST_FUNCTION(when_getting_the_value_token_fails_then_connectionstringparser_parse_fails) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_KEY); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_KEY)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_KEY, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(Map_Destroy(map)); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_KEY); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, NULL, result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_019: [If the key length is zero then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ TEST_FUNCTION(when_the_key_is_zero_length_then_connectionstringparser_parse_fails) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)); STRICT_EXPECTED_CALL(STRING_c_str(TEST_STRING_HANDLE_PAIR)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreAllArguments(); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, key, "=")).IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_PAIR, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, value, ";")).IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_PAIR + 5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)).SetReturn(""); STRICT_EXPECTED_CALL(Map_Destroy(map)); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(IGNORED_PTR_ARG)).IgnoreArgument(1); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, NULL, result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_012: [If Map_Add fails connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ TEST_FUNCTION(when_adding_the_key_value_pair_to_the_map_fails_then_connectionstringparser_parse_fails) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_PAIR, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_PAIR + 5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)); STRICT_EXPECTED_CALL(STRING_c_str(value)); STRICT_EXPECTED_CALL(Map_Add(map, "key1", "value1")).SetReturn((MAP_RESULT)MAP_INVALIDARG); STRICT_EXPECTED_CALL(Map_Destroy(map)); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, NULL, result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_013: [If STRING_c_str fails then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ TEST_FUNCTION(when_getting_the_C_string_for_the_key_fails_then_connectionstringparser_parse_fails) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)); STRICT_EXPECTED_CALL(STRING_c_str(TEST_STRING_HANDLE_PAIR)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreAllArguments(); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, key, "=")).IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_PAIR, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, value, ";")).IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_PAIR + 5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)).SetReturn(NULL); STRICT_EXPECTED_CALL(Map_Destroy(map)); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(IGNORED_PTR_ARG)).IgnoreArgument(1); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, NULL, result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_013: [If STRING_c_str fails then connectionstringparser_parse shall fail and return NULL (freeing the allocated result map).] */ TEST_FUNCTION(when_getting_the_C_string_for_the_value_fails_then_connectionstringparser_parse_fails) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_PAIR)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_PAIR, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_PAIR + 5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)); STRICT_EXPECTED_CALL(STRING_c_str(value)).SetReturn((const char*)NULL); STRICT_EXPECTED_CALL(Map_Destroy(map)); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_PAIR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, NULL, result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_001: [connectionstringparser_parse shall parse all key value pairs from the connection_string passed in as argument and return a new map that holds the key/value pairs.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_003: [connectionstringparser_parse shall create a STRING tokenizer to be used for parsing the connection string, by calling STRING_TOKENIZER_create.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_004: [connectionstringparser_parse shall start scanning at the beginning of the connection string.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_016: [2 STRINGs shall be allocated in order to hold the to be parsed key and value tokens.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_005: [The following actions shall be repeated until parsing is complete:] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_006: [connectionstringparser_parse shall find a token (the key of the key/value pair) delimited by the "=" character, by calling STRING_TOKENIZER_get_next_token.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_007: [If STRING_TOKENIZER_get_next_token fails, parsing shall be considered complete.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_014: [After the parsing is complete the previously allocated STRINGs and STRING tokenizer shall be freed by calling STRING_TOKENIZER_destroy.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_008: [connectionstringparser_parse shall find a token (the value of the key/value pair) delimited by the ";" character, by calling STRING_TOKENIZER_get_next_token.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_010: [The key and value shall be added to the result map by using Map_Add.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_011: [The C strings for the key and value shall be extracted from the previously parsed STRINGs by using STRING_c_str.] */ TEST_FUNCTION(connectionstringparser_parse_with_2_key_value_pairs_adds_them_to_the_result_map) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_2_PAIR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_2_PAIR)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); // 1st kvp STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_2_PAIR, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_2_PAIR + 5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)); STRICT_EXPECTED_CALL(STRING_c_str(value)); STRICT_EXPECTED_CALL(Map_Add(map, "key1", "value1")); STRICT_EXPECTED_CALL(gballoc_malloc(5)); STRICT_EXPECTED_CALL(gballoc_malloc(7)); // 2st kvp STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, (TEST_STRING_2_PAIR + 12), 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_2_PAIR + 17), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)); STRICT_EXPECTED_CALL(STRING_c_str(value)); STRICT_EXPECTED_CALL(Map_Add(map, "key2", "value2")); STRICT_EXPECTED_CALL(gballoc_malloc(5)); STRICT_EXPECTED_CALL(gballoc_malloc(7)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_2_PAIR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, map, result); ASSERT_ARE_EQUAL(char_ptr, "value1", Map_GetValueFromKey(result, "key1")); ASSERT_ARE_EQUAL(char_ptr, "value2", Map_GetValueFromKey(result, "key2")); // cleanup Map_Destroy(result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_01_001: [connectionstringparser_parse shall parse all key value pairs from the connection_string passed in as argument and return a new map that holds the key/value pairs.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_003: [connectionstringparser_parse shall create a STRING tokenizer to be used for parsing the connection string, by calling STRING_TOKENIZER_create.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_004: [connectionstringparser_parse shall start scanning at the beginning of the connection string.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_016: [2 STRINGs shall be allocated in order to hold the to be parsed key and value tokens.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_005: [The following actions shall be repeated until parsing is complete:] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_006: [connectionstringparser_parse shall find a token (the key of the key/value pair) delimited by the "=" character, by calling STRING_TOKENIZER_get_next_token.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_007: [If STRING_TOKENIZER_get_next_token fails, parsing shall be considered complete.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_014: [After the parsing is complete the previously allocated STRINGs and STRING tokenizer shall be freed by calling STRING_TOKENIZER_destroy.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_008: [connectionstringparser_parse shall find a token (the value of the key/value pair) delimited by the ";" character, by calling STRING_TOKENIZER_get_next_token.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_010: [The key and value shall be added to the result map by using Map_Add.] */ /* Tests_SRS_CONNECTIONSTRINGPARSER_01_011: [The C strings for the key and value shall be extracted from the previously parsed STRINGs by using STRING_c_str.] */ TEST_FUNCTION(connectionstringparser_parse_with_2_key_value_pairs_ended_with_semicolon_adds_them_to_the_result_map) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_2_PAIR_SEMICOLON); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(TEST_STRING_HANDLE_2_PAIR_SEMICOLON)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); // 1st kvp STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, TEST_STRING_2_PAIR_SEMICOLON, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_2_PAIR_SEMICOLON + 5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)); STRICT_EXPECTED_CALL(STRING_c_str(value)); STRICT_EXPECTED_CALL(Map_Add(map, "key1", "value1")); STRICT_EXPECTED_CALL(gballoc_malloc(5)); STRICT_EXPECTED_CALL(gballoc_malloc(7)); // 2st kvp STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(key, (TEST_STRING_2_PAIR_SEMICOLON + 12), 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, value, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(value, (TEST_STRING_2_PAIR_SEMICOLON + 17), 6)); STRICT_EXPECTED_CALL(STRING_c_str(key)); STRICT_EXPECTED_CALL(STRING_c_str(value)); STRICT_EXPECTED_CALL(Map_Add(map, "key2", "value2")); STRICT_EXPECTED_CALL(gballoc_malloc(5)); STRICT_EXPECTED_CALL(gballoc_malloc(7)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(tokens, key, "=")); STRICT_EXPECTED_CALL(STRING_delete(value)); STRICT_EXPECTED_CALL(STRING_delete(key)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(tokens)); // act result = connectionstringparser_parse(TEST_STRING_HANDLE_2_PAIR_SEMICOLON); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, map, result); ASSERT_ARE_EQUAL(char_ptr, "value1", Map_GetValueFromKey(result, "key1")); ASSERT_ARE_EQUAL(char_ptr, "value2", Map_GetValueFromKey(result, "key2")); // cleanup Map_Destroy(result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_020: [connectionstringparser_parse_from_char shall create a STRING_HANDLE from the connection_string passed in as argument and parse it using the connectionstringparser_parse.]*/ TEST_FUNCTION(connectionstringparser_parse_from_char_with_2_key_value_pairs_ended_with_semicolon_adds_them_to_the_result_map) { // arrange MAP_HANDLE result; STRING_HANDLE key = STRING_new(); STRING_HANDLE value = STRING_new(); MAP_HANDLE map = Map_Create(NULL); STRING_TOKENIZER_HANDLE tokens = STRING_TOKENIZER_create(TEST_STRING_HANDLE_2_PAIR_SEMICOLON); STRING_HANDLE test_string_val = STRING_construct(TEST_STRING_2_PAIR_SEMICOLON); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct(TEST_STRING_2_PAIR_SEMICOLON)).SetReturn(test_string_val); STRICT_EXPECTED_CALL(STRING_TOKENIZER_create(IGNORED_PTR_ARG)).SetReturn(tokens); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(key); STRICT_EXPECTED_CALL(STRING_new()) .SetReturn(value); STRICT_EXPECTED_CALL(Map_Create(NULL)).SetReturn(map); // 1st kvp STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, IGNORED_PTR_ARG, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(IGNORED_PTR_ARG, TEST_STRING_2_PAIR_SEMICOLON, 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, IGNORED_PTR_ARG, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(IGNORED_PTR_ARG, (TEST_STRING_2_PAIR_SEMICOLON + 5), 6)); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(Map_Add(IGNORED_PTR_ARG, "key1", "value1")); STRICT_EXPECTED_CALL(gballoc_malloc(5)); STRICT_EXPECTED_CALL(gballoc_malloc(7)); // 2st kvp STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, IGNORED_PTR_ARG, "=")); STRICT_EXPECTED_CALL(STRING_copy_n(IGNORED_PTR_ARG, (TEST_STRING_2_PAIR_SEMICOLON + 12), 4)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, IGNORED_PTR_ARG, ";")); STRICT_EXPECTED_CALL(STRING_copy_n(IGNORED_PTR_ARG, (TEST_STRING_2_PAIR_SEMICOLON + 17), 6)); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(Map_Add(IGNORED_PTR_ARG, "key2", "value2")); STRICT_EXPECTED_CALL(gballoc_malloc(5)); STRICT_EXPECTED_CALL(gballoc_malloc(7)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_get_next_token(IGNORED_PTR_ARG, IGNORED_PTR_ARG, "=")); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_TOKENIZER_destroy(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)); // act result = connectionstringparser_parse_from_char(TEST_STRING_2_PAIR_SEMICOLON); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(void_ptr, map, result); ASSERT_ARE_EQUAL(char_ptr, "value1", Map_GetValueFromKey(result, "key1")); ASSERT_ARE_EQUAL(char_ptr, "value2", Map_GetValueFromKey(result, "key2")); // cleanup Map_Destroy(result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_021: [If connectionstringparser_parse_from_char get error creating a STRING_HANDLE, it shall return NULL.]*/ TEST_FUNCTION(connectionstringparser_parse_from_char_with_NULL_connection_string_fails) { // arrange // act MAP_HANDLE result = connectionstringparser_parse_from_char(NULL); // assert ASSERT_ARE_EQUAL(void_ptr, NULL, result); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_022: [connectionstringparser_splitHostName_from_char shall split the provided hostName in name and suffix.]*/ /* Tests_SRS_CONNECTIONSTRINGPARSER_21_023: [connectionstringparser_splitHostName_from_char shall copy all characters, from the beginning of the hostName to the first `.` to the nameString.]*/ /* Tests_SRS_CONNECTIONSTRINGPARSER_21_024: [connectionstringparser_splitHostName_from_char shall copy all characters, from the first `.` to the end of the hostName, to the suffixString.]*/ /* Tests_SRS_CONNECTIONSTRINGPARSER_21_025: [If connectionstringparser_splitHostName_from_char get success splitting the hostName, it shall return 0.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_with_success) { // arrange int result; const char* hostName = "abc.bcd.efg"; const char* startSuffix = hostName + 4; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_copy_n(nameString, hostName, 3)); STRICT_EXPECTED_CALL(STRING_copy(suffixString, startSuffix)); // act result = connectionstringparser_splitHostName_from_char(hostName, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "abc", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "bcd.efg", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_026: [If the hostName is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_with_NULL_hostName_failed) { // arrange int result; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); // act result = connectionstringparser_splitHostName_from_char(NULL, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_027: [If the hostName is an empty string, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_with_empty_hostName_failed) { // arrange int result; const char* hostName = ""; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); // act result = connectionstringparser_splitHostName_from_char(hostName, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_028: [If the nameString is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_with_NULL_nameString_failed) { // arrange int result; const char* hostName = "abc.bcd.efg"; STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); // act result = connectionstringparser_splitHostName_from_char(hostName, NULL, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_029: [If the suffixString is NULL, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_with_NULL_suffixString_failed) { // arrange int result; const char* hostName = "abc.bcd.efg"; STRING_HANDLE nameString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); umock_c_reset_all_calls(); // act result = connectionstringparser_splitHostName_from_char(hostName, nameString, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(nameString)); // cleanup STRING_delete(nameString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_030: [If the hostName is not a valid host name, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_with_empty_name_failed) { // arrange int result; const char* hostName = ".bcd.efg"; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); // act result = connectionstringparser_splitHostName_from_char(hostName, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_030: [If the hostName is not a valid host name, connectionstringparser_splitHostName_from_char shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_with_empty_suffix_failed) { // arrange int result; const char* hostName = "abc."; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); // act result = connectionstringparser_splitHostName_from_char(hostName, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_031: [If connectionstringparser_splitHostName_from_char get error copying the name to the nameString, it shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_error_on_nameString_copy_failed) { // arrange int result; const char* hostName = "abc.bcd.efg"; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_copy_n(nameString, hostName, 3)).SetReturn(10); // act result = connectionstringparser_splitHostName_from_char(hostName, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_032: [If connectionstringparser_splitHostName_from_char get error copying the suffix to the suffixString, it shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_from_char_error_on_suffixString_copy_failed) { // arrange int result; const char* hostName = "abc.bcd.efg"; const char* startSuffix = hostName + 4; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_copy_n(nameString, hostName, 3)); STRICT_EXPECTED_CALL(STRING_copy(suffixString, startSuffix)).SetReturn(10); // act result = connectionstringparser_splitHostName_from_char(hostName, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "abc", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_033: [connectionstringparser_splitHostName shall convert the hostNameString to a connection_string passed in as argument, and call connectionstringparser_splitHostName_from_char.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_with_success) { // arrange int result; const char* hostName; const char* startSuffix; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); STRING_HANDLE hostNameString = STRING_construct("abc.bcd.efg"); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, hostNameString); hostName = STRING_c_str(hostNameString); startSuffix = hostName + 4; ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(hostNameString)); STRICT_EXPECTED_CALL(STRING_copy_n(nameString, hostName, 3)); STRICT_EXPECTED_CALL(STRING_copy(suffixString, startSuffix)); // act result = connectionstringparser_splitHostName(hostNameString, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "abc", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "bcd.efg", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); STRING_delete(hostNameString); } /* Tests_SRS_CONNECTIONSTRINGPARSER_21_034: [If the hostNameString is NULL, connectionstringparser_splitHostName shall return __FAILURE__.]*/ TEST_FUNCTION(connectionstringparser_splitHostName_with_NULL_hostName_failed) { // arrange int result; STRING_HANDLE nameString = STRING_new(); STRING_HANDLE suffixString = STRING_new(); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, nameString); ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, suffixString); umock_c_reset_all_calls(); // act result = connectionstringparser_splitHostName(NULL, nameString, suffixString); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(nameString)); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(suffixString)); // cleanup STRING_delete(nameString); STRING_delete(suffixString); } END_TEST_SUITE(connectionstringparser_ut) main.c000066400000000000000000000005101362133436400370160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/connectionstringparser_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(connectionstringparser_ut, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constbuffer_ut/000077500000000000000000000000001362133436400335265ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007701362133436400362130ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constbuffer_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName constbuffer_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/constbuffer.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C11) constbuffer_ut.c000066400000000000000000000410351362133436400366460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constbuffer_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" void* my_gballoc_malloc(size_t size) { return malloc(size); } void my_gballoc_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "umock_c.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/constbuffer.h" static TEST_MUTEX_HANDLE g_testByTest; static const char* buffer1 = "le buffer no 1"; static const char* buffer2 = NULL; static const char* buffer3 = "three"; #define BUFFER1_HANDLE (BUFFER_HANDLE)1 #define BUFFER1_u_char ((unsigned char*)buffer1) #define BUFFER1_length strlen(buffer1) #define BUFFER2_HANDLE (BUFFER_HANDLE)2 #define BUFFER2_u_char ((unsigned char*)buffer2) #define BUFFER2_length ((size_t)0) #define BUFFER3_HANDLE (BUFFER_HANDLE)3 #define BUFFER3_u_char ((unsigned char*)buffer3) #define BUFFER3_length ((size_t)0) unsigned char* my_BUFFER_u_char(BUFFER_HANDLE handle) { unsigned char* result; if (handle == BUFFER1_HANDLE) { result = BUFFER1_u_char; } else { result = NULL; ASSERT_FAIL("who am I?"); } return result; } size_t my_BUFFER_length(BUFFER_HANDLE handle) { size_t result; if (handle == BUFFER1_HANDLE) { result = BUFFER1_length; } else { result = 0; ASSERT_FAIL("who am I?"); } return result; } DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(constbuffer_unittests) TEST_SUITE_INITIALIZE(setsBufferTempSize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_u_char, my_BUFFER_u_char); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_length, my_BUFFER_length); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(f) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /*Tests_SRS_CONSTBUFFER_02_001: [If source is NULL and size is different than 0 then CONSTBUFFER_Create shall fail and return NULL.]*/ TEST_FUNCTION(CONSTBUFFER_Create_with_invalid_args_fails) { ///arrange ///act CONSTBUFFER_HANDLE handle = CONSTBUFFER_Create(NULL, 1); ///assert ASSERT_IS_NULL(handle); ///cleanup } /*Tests_SRS_CONSTBUFFER_02_002: [Otherwise, CONSTBUFFER_Create shall create a copy of the memory area pointed to by source having size bytes.]*/ /*Tests_SRS_CONSTBUFFER_02_004: [Otherwise CONSTBUFFER_Create shall return a non-NULL handle.]*/ TEST_FUNCTION(CONSTBUFFER_Create_succeeds) { ///arrange CONSTBUFFER_HANDLE handle; const CONSTBUFFER* content; ///act STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); handle = CONSTBUFFER_Create(BUFFER1_u_char, BUFFER1_length); ///assert ASSERT_IS_NOT_NULL(handle); /*testing the "copy"*/ content = CONSTBUFFER_GetContent(handle); ASSERT_ARE_EQUAL(size_t, BUFFER1_length, content->size); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER1_u_char, content->buffer, BUFFER1_length)); /*testing that it is a copy and not a pointer assignment*/ ASSERT_ARE_NOT_EQUAL(void_ptr, BUFFER1_u_char, content->buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_009: [Otherwise, CONSTBUFFER_CreateFromBuffer shall return a non-NULL handle.]*/ /*Tests_SRS_CONSTBUFFER_02_007: [Otherwise, CONSTBUFFER_CreateFromBuffer shall copy the content of buffer.]*/ TEST_FUNCTION(CONSTBUFFER_CreateFromBuffer_succeeds) { ///arrange CONSTBUFFER_HANDLE handle; const CONSTBUFFER* content; ///act STRICT_EXPECTED_CALL(BUFFER_length(BUFFER1_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_u_char(BUFFER1_HANDLE)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); handle = CONSTBUFFER_CreateFromBuffer(BUFFER1_HANDLE); ///assert ASSERT_IS_NOT_NULL(handle); /*testing the "copy"*/ content = CONSTBUFFER_GetContent(handle); ASSERT_ARE_EQUAL(size_t, BUFFER1_length, content->size); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER1_u_char, content->buffer, BUFFER1_length)); /*testing that it is a copy and not a pointer assignment*/ ASSERT_ARE_NOT_EQUAL(void_ptr, BUFFER1_u_char, content->buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_008: [If copying the content fails, then CONSTBUFFER_CreateFromBuffer shall fail and return NULL.]*/ TEST_FUNCTION(CONSTBUFFER_CreateFromBuffer_fails_when_malloc_fails) { ///arrange CONSTBUFFER_HANDLE handle; ///act STRICT_EXPECTED_CALL(BUFFER_length(BUFFER1_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_u_char(BUFFER1_HANDLE)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); handle = CONSTBUFFER_CreateFromBuffer(BUFFER1_HANDLE); ///assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_006: [If buffer is NULL then CONSTBUFFER_CreateFromBuffer shall fail and return NULL.]*/ TEST_FUNCTION(CONSTBUFFER_CreateFromBuffer_with_NULL_fails) { ///arrange ///act CONSTBUFFER_HANDLE handle = CONSTBUFFER_CreateFromBuffer(NULL); ///assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_010: [The non-NULL handle returned by CONSTBUFFER_CreateFromBuffer shall have its ref count set to "1".]*/ /*Tests_SRS_CONSTBUFFER_02_005: [The non-NULL handle returned by CONSTBUFFER_Create shall have its ref count set to "1".]*/ /*Tests_SRS_CONSTBUFFER_02_017: [If the refcount reaches zero, then CONSTBUFFER_Destroy shall deallocate all resources used by the CONSTBUFFER_HANDLE.]*/ TEST_FUNCTION(CONSTBUFFER_CreateFromBuffer_is_ref_counted_1) { ///arrange CONSTBUFFER_HANDLE handle = CONSTBUFFER_CreateFromBuffer(BUFFER1_HANDLE); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); CONSTBUFFER_Destroy(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_CONSTBUFFER_02_003: [If creating the copy fails then CONSTBUFFER_Create shall return NULL.]*/ TEST_FUNCTION(CONSTBUFFER_Create_fails_when_malloc_fails) { ///arrange CONSTBUFFER_HANDLE handle; ///act STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); handle = CONSTBUFFER_Create(BUFFER1_u_char, BUFFER1_length); ///assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_CONSTBUFFER_02_005: [The non-NULL handle returned by CONSTBUFFER_Create shall have its ref count set to "1".]*/ /*Tests_SRS_CONSTBUFFER_02_017: [If the refcount reaches zero, then CONSTBUFFER_Destroy shall deallocate all resources used by the CONSTBUFFER_HANDLE.]*/ TEST_FUNCTION(CONSTBUFFER_Create_is_ref_counted_1) { ///arrange CONSTBUFFER_HANDLE handle = CONSTBUFFER_Create(BUFFER1_u_char, BUFFER1_length); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); CONSTBUFFER_Destroy(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_CONSTBUFFER_02_002: [Otherwise, CONSTBUFFER_Create shall create a copy of the memory area pointed to by source having size bytes.]*/ TEST_FUNCTION(CONSTBUFFER_Create_from_0_size_succeeds_1) { ///arrange CONSTBUFFER_HANDLE handle; const CONSTBUFFER* content; ///act STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); handle = CONSTBUFFER_Create(BUFFER2_u_char, BUFFER2_length); ///assert ASSERT_IS_NOT_NULL(handle); /*testing the "copy"*/ content = CONSTBUFFER_GetContent(handle); ASSERT_ARE_EQUAL(size_t, BUFFER2_length, content->size); /*testing that it is a copy and not a pointer assignment*/ ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_002: [Otherwise, CONSTBUFFER_Create shall create a copy of the memory area pointed to by source having size bytes.]*/ /*Tests_SRS_CONSTBUFFER_02_009: [Otherwise, CONSTBUFFER_CreateFromBuffer shall return a non-NULL handle.]*/ TEST_FUNCTION(CONSTBUFFER_Create_from_0_size_succeeds_2) { ///arrange CONSTBUFFER_HANDLE handle; const CONSTBUFFER* content; ///act STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); handle = CONSTBUFFER_Create(BUFFER3_u_char, BUFFER3_length); ///assert ASSERT_IS_NOT_NULL(handle); /*testing the "copy"*/ content = CONSTBUFFER_GetContent(handle); ASSERT_ARE_EQUAL(size_t, BUFFER3_length, content->size); /*testing that it is a copy and not a pointer assignment*/ ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_011: [If constbufferHandle is NULL then CONSTBUFFER_GetContent shall return NULL.]*/ TEST_FUNCTION(CONSTBUFFER_GetContent_with_NULL_returns_NULL) { ///arrange ///act const CONSTBUFFER* content = CONSTBUFFER_GetContent(NULL); ///assert ASSERT_IS_NULL(content); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_CONSTBUFFER_02_012: [Otherwise, CONSTBUFFER_GetContent shall return a const CONSTBUFFER* that matches byte by byte the original bytes used to created the const buffer and has the same length.]*/ TEST_FUNCTION(CONSTBUFFER_GetContent_succeeds_1) { ///arrange CONSTBUFFER_HANDLE handle; const CONSTBUFFER* content; handle = CONSTBUFFER_Create(BUFFER1_u_char, BUFFER1_length); umock_c_reset_all_calls(); ///act content = CONSTBUFFER_GetContent(handle); ///assert ASSERT_IS_NOT_NULL(content); /*testing the "copy"*/ ASSERT_ARE_EQUAL(size_t, BUFFER1_length, content->size); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER1_u_char, content->buffer, BUFFER1_length)); /*testing that it is a copy and not a pointer assignment*/ ASSERT_ARE_NOT_EQUAL(void_ptr, BUFFER1_u_char, content->buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_012: [Otherwise, CONSTBUFFER_GetContent shall return a const CONSTBUFFER* that matches byte by byte the original bytes used to created the const buffer and has the same length.]*/ TEST_FUNCTION(CONSTBUFFER_GetContent_succeeds_2) { ///arrange CONSTBUFFER_HANDLE handle; const CONSTBUFFER* content; handle = CONSTBUFFER_Create(NULL, 0); umock_c_reset_all_calls(); ///act content = CONSTBUFFER_GetContent(handle); ///assert ASSERT_IS_NOT_NULL(content); /*testing the "copy"*/ ASSERT_ARE_EQUAL(size_t, 0, content->size); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_013: [If constbufferHandle is NULL then CONSTBUFFER_Clone shall fail and return NULL.]*/ TEST_FUNCTION(CONSTBUFFER_Clone_with_NULL_returns_NULL) { ///arrange ///act CONSTBUFFER_HANDLE handle = CONSTBUFFER_Clone(NULL); ///assert ASSERT_IS_NULL(handle); ///cleanup } /*Tests_SRS_CONSTBUFFER_02_014: [Otherwise, CONSTBUFFER_Clone shall increment the reference count and return constbufferHandle.]*/ TEST_FUNCTION(CONSTBUFFER_Clone_increments_ref_count_1) { ///arrange CONSTBUFFER_HANDLE clone; CONSTBUFFER_HANDLE handle = CONSTBUFFER_Create(BUFFER1_u_char, BUFFER1_length); umock_c_reset_all_calls(); ///act clone = CONSTBUFFER_Clone(handle); ///assert ASSERT_ARE_EQUAL(void_ptr, handle, clone); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); CONSTBUFFER_Destroy(clone); } /*Tests_SRS_CONSTBUFFER_02_014: [Otherwise, CONSTBUFFER_Clone shall increment the reference count and return constbufferHandle.]*/ /*Tests_SRS_CONSTBUFFER_02_016: [Otherwise, CONSTBUFFER_Destroy shall decrement the refcount on the constbufferHandle handle.]*/ /*Tests_SRS_CONSTBUFFER_02_017: [If the refcount reaches zero, then CONSTBUFFER_Destroy shall deallocate all resources used by the CONSTBUFFER_HANDLE.]*/ TEST_FUNCTION(CONSTBUFFER_Clone_increments_ref_count_2) { ///arrange CONSTBUFFER_HANDLE handle = CONSTBUFFER_Create(BUFFER1_u_char, BUFFER1_length); CONSTBUFFER_HANDLE clone = CONSTBUFFER_Clone(handle); umock_c_reset_all_calls(); ///act CONSTBUFFER_Destroy(clone); /*only a dec_Ref is expected here, so no effects*/ ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup CONSTBUFFER_Destroy(handle); } /*Tests_SRS_CONSTBUFFER_02_014: [Otherwise, CONSTBUFFER_Clone shall increment the reference count and return constbufferHandle.]*/ /*Tests_SRS_CONSTBUFFER_02_016: [Otherwise, CONSTBUFFER_Destroy shall decrement the refcount on the constbufferHandle handle.]*/ /*Tests_SRS_CONSTBUFFER_02_017: [If the refcount reaches zero, then CONSTBUFFER_Destroy shall deallocate all resources used by the CONSTBUFFER_HANDLE.]*/ TEST_FUNCTION(CONSTBUFFER_Clone_increments_ref_count_3) { ///arrange CONSTBUFFER_HANDLE handle = CONSTBUFFER_Create(BUFFER1_u_char, BUFFER1_length); CONSTBUFFER_HANDLE clone = CONSTBUFFER_Clone(handle); CONSTBUFFER_Destroy(handle); /*only a dec_Ref is expected here, so no effects*/ umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); CONSTBUFFER_Destroy(clone); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_CONSTBUFFER_02_015: [If constbufferHandle is NULL then CONSTBUFFER_Destroy shall do nothing.]*/ TEST_FUNCTION(CONSTBUFFER_Destroy_with_NULL_argument_does_nothing) { ///arrange ///act CONSTBUFFER_Destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } END_TEST_SUITE(constbuffer_unittests) main.c000066400000000000000000000005111362133436400345340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constbuffer_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(constbuffer_unittests, failedTestCount); return (int)failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constmap_ut/000077500000000000000000000000001362133436400330325ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007621362133436400355200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constmap_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName constmap_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/constmap.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) constmap_ut.c000066400000000000000000000642431362133436400354640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constmap_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" static size_t currentmalloc_call; static size_t whenShallmalloc_fail; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void my_gballoc_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "umock_c.h" #include "umocktypes_charptr.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/constmap.h" static TEST_MUTEX_HANDLE g_testByTest; TEST_DEFINE_ENUM_TYPE(CONSTMAP_RESULT, CONSTMAP_RESULT_VALUES); #define VALID_MAP_HANDLE (MAP_HANDLE)0xDEAF #define VALID_CONST_CHAR_POINTER (const char*const*)0xDADA #define VALID_MAP_CLONE1 (MAP_HANDLE)0xDEDE #define VALID_MAP_CLONE2 (MAP_HANDLE)0xDEDD #define INVALID_MAP_HANDLE (MAP_HANDLE)0xDEAD #define INVALID_CLONE_HANDLE (MAP_HANDLE)0xDEAE #define VALID_KV_COUNT (size_t)100 #define VALID_VALUE "value" static MAP_RESULT currentMapResult; MAP_HANDLE my_Map_Clone(MAP_HANDLE sourceMap) { MAP_HANDLE result; if (sourceMap == VALID_MAP_HANDLE) { result = VALID_MAP_CLONE1; } else if (sourceMap == VALID_MAP_CLONE1) { result = VALID_MAP_CLONE2; } else if (sourceMap == INVALID_CLONE_HANDLE) { result = INVALID_MAP_HANDLE; } else { result = NULL; } return result; } MAP_RESULT my_Map_ContainsKey(MAP_HANDLE handle, const char* key, bool* keyExists) { MAP_RESULT result = currentMapResult; (void)handle, (void)key; if (result == MAP_OK) { *keyExists = true; } return result; } MAP_RESULT my_Map_ContainsValue(MAP_HANDLE handle, const char* value, bool* valueExists) { MAP_RESULT result = currentMapResult; (void)handle, (void)value; if (result == MAP_OK) { *valueExists = true; } return result; } const char* my_Map_GetValueFromKey(MAP_HANDLE sourceMap, const char* key) { const char* result; (void)key, (void)sourceMap; if (currentMapResult == MAP_OK) { result = VALID_VALUE; } else { result = NULL; } return result; } MAP_RESULT my_Map_GetInternals(MAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count) { MAP_RESULT result = currentMapResult; (void)handle; *keys = VALID_CONST_CHAR_POINTER; *values = VALID_CONST_CHAR_POINTER; *count = VALID_KV_COUNT; return result; } DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(constmap_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(CONSTMAP_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(MAP_HANDLE, void*); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(Map_Clone, my_Map_Clone); REGISTER_GLOBAL_MOCK_HOOK(Map_ContainsKey, my_Map_ContainsKey); REGISTER_GLOBAL_MOCK_HOOK(Map_ContainsValue, my_Map_ContainsValue); REGISTER_GLOBAL_MOCK_HOOK(Map_GetValueFromKey, my_Map_GetValueFromKey); REGISTER_GLOBAL_MOCK_HOOK(Map_GetInternals, my_Map_GetInternals); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } currentmalloc_call = 0; whenShallmalloc_fail = 0; currentMapResult = MAP_OK; umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /*Tests_SRS_CONSTMAP_17_001: [ConstMap_Create shall create an immutable map, populated by the key, value pairs in the source map.]*/ /*Tests_SRS_CONSTMAP_17_048: [ConstMap_Create shall accept any non-NULL MAP_HANDLE as input.]*/ /*Tests_SRS_CONSTMAP_17_003: [Otherwise, it shall return a non-NULL handle that can be used in subsequent calls.]*/ /*Tests_SRS_CONSTMAP_17_004: [If the reference count is zero, ConstMap_Destroy shall release all resources associated with the immutable map.]*/ TEST_FUNCTION(ConstMap_Create_Destroy_Success) { // Arrange MAP_HANDLE sourceMap; CONSTMAP_HANDLE aHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_Clone(VALID_MAP_HANDLE)); STRICT_EXPECTED_CALL(Map_Destroy(VALID_MAP_CLONE1)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); sourceMap = VALID_MAP_HANDLE; ///Act aHandle = ConstMap_Create(sourceMap); ASSERT_IS_NOT_NULL(aHandle); ConstMap_Destroy(aHandle); ///Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution } /* Tests_SRS_CONSTMAP_17_002: [If during creation there are any errors, then ConstMap_Create shall return NULL.]*/ TEST_FUNCTION(ConstMap_Create_Malloc_Failed) { // Arrange MAP_HANDLE sourceMap; CONSTMAP_HANDLE aHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); whenShallmalloc_fail = 1; sourceMap = VALID_MAP_HANDLE; ///Act aHandle = ConstMap_Create(sourceMap); ///Assert ASSERT_IS_NULL(aHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution } /*Tests_SRS_CONSTMAP_17_002: [If during creation there are any errors, then ConstMap_Create shall return NULL.] */ TEST_FUNCTION(ConstMap_Clone_Map_Failed) { // Arrange MAP_HANDLE sourceMap; CONSTMAP_HANDLE aHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_Clone(INVALID_MAP_HANDLE)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); sourceMap = INVALID_MAP_HANDLE; ///Act aHandle = ConstMap_Create(sourceMap); ///Assert ASSERT_IS_NULL(aHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution } /*Tests_SRS_CONSTMAP_17_039: [ConstMap_Clone shall increase the internal reference count of the immutable map indicated by parameter handle] */ TEST_FUNCTION(ConstMap_Clone_Destroy_Success) { // Arrange MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); CONSTMAP_HANDLE aClone = ConstMap_Clone(aHandle); umock_c_reset_all_calls(); ///Act ConstMap_Destroy(aClone); ///Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } /*Tests_SRS_CONSTMAP_17_005: [If parameter handle is NULL then ConstMap_Destroy shall take no action.]*/ TEST_FUNCTION(ConstMap_Destroy_Null) { ///Arrange CONSTMAP_HANDLE handle = NULL; ///Act ConstMap_Destroy(handle); ///Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///Ablution } /*Tests_SRS_CONSTMAP_17_039: [ConstMap_Clone shall increase the internal reference count of the immutable map indicated by parameter handle]*/ /*Tests_SRS_CONSTMAP_17_050: [ConstMap_Clone shall return the non-NULL handle. ]*/ TEST_FUNCTION(ConstMap_Clone_Success) { // Arrange CONSTMAP_HANDLE aClone; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); ///Act aClone = ConstMap_Clone(aHandle); ///Assert ASSERT_ARE_EQUAL(void_ptr, aHandle, aClone); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aClone); ConstMap_Destroy(aHandle); } /*Tests_SRS_CONSTMAP_17_038: [ConstMap_Clone returns NULL if parameter handle is NULL.] */ TEST_FUNCTION(ConstMap_Clone_Null) { // Arrange CONSTMAP_HANDLE aHandle = NULL; ///Act CONSTMAP_HANDLE aClone = ConstMap_Clone(aHandle); ///Assert ASSERT_IS_NULL(aClone); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution } /*Tests_SRS_CONSTMAP_17_052: [ConstMap_CloneWriteable shall create a new, writeable map, populated by the key, value pairs in the parameter defined by handle.]*/ /*Tests_SRS_CONSTMAP_17_054: [Otherwise, ConstMap_CloneWriteable shall return a non-NULL handle that can be used in subsequent calls.]*/ TEST_FUNCTION(ConstMap_CloneWritable_Success) { // Arrange MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); MAP_HANDLE newMap = NULL; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_Clone(VALID_MAP_CLONE1)).IgnoreArgument(1); //Act newMap = ConstMap_CloneWriteable(aHandle); //Assert ASSERT_ARE_EQUAL(void_ptr, VALID_MAP_CLONE2, newMap); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); Map_Destroy(sourceMap); Map_Destroy(newMap); } /*Tests_SRS_CONSTMAP_17_053: [If during cloning, any operation fails, then ConstMap_CloneWriteableap_Clone shall return NULL.]*/ TEST_FUNCTION(ConstMap_CloneWritable_Fail) { // Arrange MAP_HANDLE sourceMap = INVALID_CLONE_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); MAP_HANDLE newMap = NULL; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_Clone(INVALID_MAP_HANDLE)).IgnoreArgument(1); //Act newMap = ConstMap_CloneWriteable(aHandle); //Assert ASSERT_IS_NULL(newMap); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); Map_Destroy(sourceMap); } /*Tests_SRS_CONSTMAP_17_051: [ConstMap_CloneWriteable returns NULL if parameter handle is NULL. ]*/ TEST_FUNCTION(ConstMap_CloneWritable_NULL) { // Arrange MAP_HANDLE newMap = NULL; //Act newMap = ConstMap_CloneWriteable(NULL); //Assert ASSERT_IS_NULL(newMap); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution } /*Tests_SRS_CONSTMAP_17_025: [Otherwise if a key exists then ConstMap_ContainsKey shall return true.]*/ TEST_FUNCTION(ConstMap_ContainsKey_Success) { // Arrange const char * key = "aKey"; bool keyExists; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map STRICT_EXPECTED_CALL(Map_ContainsKey(IGNORED_PTR_ARG, key, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); ///Act keyExists = ConstMap_ContainsKey(aHandle, key); ///Assert ASSERT_IS_TRUE(keyExists); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } /*Tests_SRS_CONSTMAP_17_024: [If parameter handle or key are NULL then ConstMap_ContainsKey shall return false.]*/ TEST_FUNCTION(ConstMap_ContainsKey_Null) { // Arrange const char * key1 = "aKey"; const char * key2 = NULL; bool keyExists1; bool keyExists2; CONSTMAP_HANDLE aHandle1 = NULL; CONSTMAP_HANDLE aHandle2; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; aHandle2 = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); ///Act // NULL Handle keyExists1 = ConstMap_ContainsKey(aHandle1, key1); // NULL key keyExists2 = ConstMap_ContainsKey(aHandle2, key2); ///Assert ASSERT_IS_FALSE(keyExists1); ASSERT_IS_FALSE(keyExists2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle2); } /*Tests_SRS_CONSTMAP_17_026: [If a key doesn't exist, then ConstMap_ContainsKey shall return false.]*/ TEST_FUNCTION(ConstMap_ContainsKey_Failures) { // Arrange MAP_RESULT mapErrorList[] = { MAP_ERROR, MAP_INVALIDARG, MAP_KEYEXISTS, MAP_KEYNOTFOUND, MAP_FILTER_REJECT }; size_t errors = sizeof(mapErrorList) / sizeof(MAP_RESULT); size_t e; const char * key = "aKey"; bool keyExists; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map_ContainsKey (match with mapErrorList size) STRICT_EXPECTED_CALL(Map_ContainsKey(IGNORED_PTR_ARG, key, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsKey(IGNORED_PTR_ARG, key, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsKey(IGNORED_PTR_ARG, key, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsKey(IGNORED_PTR_ARG, key, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsKey(IGNORED_PTR_ARG, key, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); ///Act for (e = 0; e < errors; e++) { currentMapResult = mapErrorList[e]; keyExists = ConstMap_ContainsKey(aHandle, key); ASSERT_IS_FALSE(keyExists); } ///Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } /*Tests_SRS_CONSTMAP_17_028: [Otherwise, if a pair has its value equal to the parameter value, the ConstMap_ContainsValue shall return true.]*/ TEST_FUNCTION(ConstMap_ContainsValue_Success) { // Arrange const char * value = "aValue"; bool valueExists; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map STRICT_EXPECTED_CALL(Map_ContainsValue(IGNORED_PTR_ARG, value, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); ///Act valueExists = ConstMap_ContainsValue(aHandle, value); ///Assert ASSERT_IS_TRUE(valueExists); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } /*Tests_SRS_CONSTMAP_17_027: [If parameter handle or value is NULL then ConstMap_ContainsValue shall return false.]*/ TEST_FUNCTION(ConstMap_ContainsValue_Null) { // Arrange const char * value1 = "aValue"; bool valueExists1; const char * value2 = NULL; bool valueExists2; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle1 = NULL; CONSTMAP_HANDLE aHandle2 = NULL; aHandle2 = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); ///Act valueExists1 = ConstMap_ContainsValue(aHandle1, value1); valueExists2 = ConstMap_ContainsValue(aHandle2, value2); ///Assert ASSERT_IS_FALSE(valueExists1); ASSERT_IS_FALSE(valueExists2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle2); } /* Tests_SRS_CONSTMAP_17_029: [Otherwise, if such a does not exist, then ConstMap_ContainsValue shall return false.]*/ TEST_FUNCTION(ConstMap_ContainsValue_Failures) { // Arrange MAP_RESULT mapErrorList[] = { MAP_ERROR, MAP_INVALIDARG, MAP_KEYEXISTS, MAP_KEYNOTFOUND, MAP_FILTER_REJECT }; size_t errors = sizeof(mapErrorList) / sizeof(MAP_RESULT); size_t e; const char * value = "aValue"; bool valueExists; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map_ContainsValue (match with mapErrorList size) STRICT_EXPECTED_CALL(Map_ContainsValue(IGNORED_PTR_ARG, value, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsValue(IGNORED_PTR_ARG, value, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsValue(IGNORED_PTR_ARG, value, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsValue(IGNORED_PTR_ARG, value, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Map_ContainsValue(IGNORED_PTR_ARG, value, IGNORED_PTR_ARG)) .IgnoreArgument(1).IgnoreArgument(3); ///Act for (e = 0; e < errors; e++) { currentMapResult = mapErrorList[e]; valueExists = ConstMap_ContainsValue(aHandle, value); ASSERT_IS_FALSE(valueExists); } ///Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } /* Tests_SRS_CONSTMAP_17_042: [Otherwise, ConstMap_GetValue returns the key's value.]*/ TEST_FUNCTION(ConstMap_GetValue_Success) { // Arrange const char * key = "aKey"; const char * value; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, key)) .IgnoreArgument(1); ///Act value = ConstMap_GetValue(aHandle, key); ///Assert ASSERT_ARE_EQUAL(char_ptr, VALID_VALUE, value); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } TEST_FUNCTION(ConstMap_GetValue_Null) { // Arrange const char * key1 = "aKey"; const char * value1; CONSTMAP_HANDLE aHandle1 = NULL; const char * key2 = NULL; const char * value2; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle2 = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); ///Act value1 = ConstMap_GetValue(aHandle1, key1); value2 = ConstMap_GetValue(aHandle2, key2); ///Assert ASSERT_IS_NULL(value1); ASSERT_IS_NULL(value2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle2); } /*Tests_SRS_CONSTMAP_17_040: [If parameter handle or key is NULL then ConstMap_GetValue returns NULL.] */ /*Tests_SRS_CONSTMAP_17_041: [If the key is not found, then ConstMap_GetValue returns NULL.]*/ TEST_FUNCTION(ConstMap_GetValue_Failures) { // Arrange MAP_RESULT mapErrorList[] = { MAP_ERROR, MAP_INVALIDARG, MAP_KEYEXISTS, MAP_KEYNOTFOUND, MAP_FILTER_REJECT }; size_t errors = sizeof(mapErrorList) / sizeof(MAP_RESULT); size_t e; const char * key = "aKey"; const char * value; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map_ContainsKey (match with mapErrorList size) STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, key)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, key)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, key)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, key)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, key)) .IgnoreArgument(1); ///Act // Errors from Map_GetValueFromKey for (e = 0; e < errors; e++) { currentMapResult = mapErrorList[e]; value = ConstMap_GetValue(aHandle, key); ASSERT_IS_NULL(value); } ///Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } /*Tests_SRS_CONSTMAP_17_043: [ConstMap_GetInternals shall produce in *keys a pointer to an array of const char* having all the keys stored so far by the map.] */ /*Tests_SRS_CONSTMAP_17_044: [ConstMap_GetInternals shall produce in *values a pointer to an array of const char* having all the values stored so far by the map.] */ /*Tests_SRS_CONSTMAP_17_045: [ ConstMap_GetInternals shall produce in *count the number of stored keys and values.]*/ TEST_FUNCTION(ConstMap_GetInternals_Success) { // Arrange CONSTMAP_RESULT result; const char*const* keys; const char*const* values; size_t count; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, &keys, &values, &count)) .IgnoreArgument(1); ///Act result = ConstMap_GetInternals(aHandle, &keys, &values, &count); ///Assert ASSERT_ARE_EQUAL(CONSTMAP_RESULT, CONSTMAP_OK, result); ASSERT_ARE_EQUAL(void_ptr, VALID_CONST_CHAR_POINTER, keys); ASSERT_ARE_EQUAL(void_ptr, VALID_CONST_CHAR_POINTER, values); ASSERT_ARE_EQUAL(size_t, VALID_KV_COUNT, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } /*Tests_SRS_CONSTMAP_17_046: [If parameter handle, keys, values or count is NULL then ConstMap_GetInternals shall return CONSTMAP_INVALIDARG.]*/ TEST_FUNCTION(ConstMap_GetInternals_Null) { // Arrange const char*const* keys; const char*const* values; size_t count; CONSTMAP_HANDLE aHandle = NULL; ///Act CONSTMAP_RESULT result = ConstMap_GetInternals(aHandle, &keys, &values, &count); ///Assert ASSERT_ARE_EQUAL(CONSTMAP_RESULT, CONSTMAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution } TEST_FUNCTION(ConstMap_GetInternals_Failures) { // Arrange MAP_RESULT mapErrorList[] = { MAP_ERROR, MAP_INVALIDARG, MAP_KEYEXISTS, MAP_KEYNOTFOUND, MAP_FILTER_REJECT }; size_t errors = sizeof(mapErrorList) / sizeof(MAP_RESULT); CONSTMAP_RESULT constErrorList[] = { CONSTMAP_ERROR, CONSTMAP_INVALIDARG, CONSTMAP_ERROR, CONSTMAP_KEYNOTFOUND, CONSTMAP_ERROR }; size_t e; const char*const* keys; const char*const* values; size_t count; MAP_HANDLE sourceMap = VALID_MAP_HANDLE; CONSTMAP_HANDLE aHandle = ConstMap_Create(sourceMap); umock_c_reset_all_calls(); // Call to Map_GetInternals (match with mapErrorList size) STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, &keys, &values, &count)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, &keys, &values, &count)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, &keys, &values, &count)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, &keys, &values, &count)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, &keys, &values, &count)) .IgnoreArgument(1); ///Act for (e = 0; e < errors; e++) { CONSTMAP_RESULT result; currentMapResult = mapErrorList[e]; result = ConstMap_GetInternals(aHandle, &keys, &values, &count); ASSERT_ARE_EQUAL(CONSTMAP_RESULT, constErrorList[e], result); } ///Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Ablution ConstMap_Destroy(aHandle); } END_TEST_SUITE(constmap_unittests) main.c000066400000000000000000000005011362133436400340370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/constmap_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(constmap_unittests, failedTestCount); return failedTestCount; } crtabstractions_ut/000077500000000000000000000000001362133436400343345ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000010031362133436400370660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/crtabstractions_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName crt_abstractions_ut) set(${theseTestsName}_test_files crtabstractions_ut.c ) set(${theseTestsName}_c_files ../../src/crt_abstractions.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) crtabstractions_ut.c000066400000000000000000002575171362133436400404360ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/crtabstractions_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #include #else #include #include #include #include #endif #include "testrunnerswitcher.h" // VS 2008 does not have INFINITY and all the nice goodies... #if defined (TIZENRT) || defined (WINCE) #define DEFINE_INFINITY 1 #else #if defined _MSC_VER #if _MSC_VER <= 1500 #define DEFINE_INFINITY 1 #endif #endif #endif #if defined DEFINE_INFINITY #pragma warning(disable:4756 4056) // warning C4756: overflow in constant arithmetic // These defines are missing in math.h for WEC2013 SDK #ifndef _HUGE_ENUF #define _HUGE_ENUF 1e+300 // _HUGE_ENUF*_HUGE_ENUF must overflow #endif #define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF)) #define HUGE_VALF ((float)INFINITY) #define HUGE_VALL ((long double)INFINITY) #define NAN ((float)(INFINITY * 0.0F)) #define isnan _isnan #endif void* real_malloc(size_t size) { return malloc(size); } void* real_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void real_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/crt_abstractions.h" #include #if defined _MSC_VER #include "crtdbg.h" static _invalid_parameter_handler oldInvalidParameterHandler; static int oldReportType; static void my_invalid_parameter_handler( const wchar_t * expression, const wchar_t * function, const wchar_t * file, unsigned int line, uintptr_t pReserved ) { (void)expression; (void)function; (void)file; (void)line; (void)pReserved; /*do nothing*/ } /* The below defines are because on Windows platform, the secure version of the CRT functions will invoke WATSON if no invalid parameter handler provided by the user */ #define HOOK_INVALID_PARAMETER_HANDLER() {oldInvalidParameterHandler = _set_invalid_parameter_handler(my_invalid_parameter_handler);oldReportType=_CrtSetReportMode(_CRT_ASSERT, 0);} #define UNHOOK_INVALID_PARAMETER_HANDLER() {(void)_CrtSetReportMode(_CRT_ASSERT, oldReportType); (void)_set_invalid_parameter_handler(oldInvalidParameterHandler);} #else /* _MSC_VER */ #define HOOK_INVALID_PARAMETER_HANDLER() do{}while(0) #define UNHOOK_INVALID_PARAMETER_HANDLER() do{}while(0) #endif /* _MSC_VER */ static const unsigned int interestingUnsignedIntNumbersToBeConverted[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 32, 43, 54, 65, 76, 87, 98, 123, 1234, 12341, UINT_MAX / 2, UINT_MAX -1, UINT_MAX, 42, 0x42 }; #ifndef SIZE_MAX #define SIZE_MAX ((size_t)~(size_t)0) #endif static const size_t interestingSize_tNumbersToBeConverted[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 21, 32, 43, 54, 65, 76, 87, 98, 123, 1234, 12341, SIZE_MAX / 2, SIZE_MAX -1, SIZE_MAX, 42, 0x42 }; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(CRTAbstractions_UnitTests) TEST_SUITE_INITIALIZE(a) { umock_c_init(on_umock_c_error); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, real_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, real_free); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, real_realloc); } TEST_SUITE_CLEANUP(b) { umock_c_deinit(); } /* strcat_s */ // Tests_SRS_CRT_ABSTRACTIONS_99_008: [strcat_s shall append the src to dst and terminates the resulting string with a null character.] // Tests_SRS_CRT_ABSTRACTIONS_99_009: [The initial character of src shall overwrite the terminating null character of dst.] // Tests_SRS_CRT_ABSTRACTIONS_99_003: [strcat_s shall return Zero upon success.] TEST_FUNCTION(strcat_s_Appends_Source_To_Destination) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; // act result = strcat_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "DestinationSource", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strcat_s_Appends_Empty_Source_To_Destination) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = ""; int result; // act result = strcat_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "Destination", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strcat_s_Appends_Source_To_Empty_Destination) { // arrange char dstString[128] = ""; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; // act result = strcat_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "Source", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strcat_s_Appends_Empty_Source_To_Empty_Destination) { // arrange char dstString[128] = ""; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = ""; int result; // act result = strcat_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "", dstString); ASSERT_ARE_EQUAL(int, 0, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_004: [If dst is NULL or unterminated, the error code returned shall be EINVAL & dst shall not be modified.] TEST_FUNCTION(strcat_s_With_NULL_Destination_Fails) { // arrange char* dstString = NULL; size_t sizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = strcat_s(dstString, sizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_IS_NULL(dstString); ASSERT_ARE_EQUAL(int, EINVAL, result); } TEST_FUNCTION(strcat_s_With_Unterminated_Destination_Fails) { // arrange size_t i; char dstString[128]; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; for (i = 0; i < dstSizeInBytes; i++) { dstString[i] = 'z'; } // act HOOK_INVALID_PARAMETER_HANDLER(); result = strcat_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert #ifndef _MSC_VER /* MSDN claims that content of destination buffer is not modified, but that is not true. Filing bug. */ for (size_t i = 0; i < dstSizeInBytes; i++) { ASSERT_ARE_EQUAL(char, 'z', dstString[i]); } #endif ASSERT_ARE_EQUAL(int, EINVAL, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_005: [If src is NULL, the error code returned shall be EINVAL and dst[0] shall be set to 0.] TEST_FUNCTION(strcat_s_With_NULL_Source_Fails) { // arrange char dstString[128] = "Source"; size_t dstSizeInBytes = sizeof(dstString); char* srcString = NULL; int result; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = strcat_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char,'\0', dstString[0]); ASSERT_ARE_EQUAL(int, EINVAL, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_006: [If the dstSizeInBytes is 0 or smaller than the required size for dst & src, the error code returned shall be ERANGE & dst[0] set to 0.] TEST_FUNCTION(strcat_s_With_dstSizeInBytes_Equals_Zero_Fails) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; // act dstSizeInBytes = 0; HOOK_INVALID_PARAMETER_HANDLER(); result = strcat_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert #ifdef _MSC_VER /*MSDN Claims that destination buffer would be set to empty & ERANGE is the error, but not the case. Filing bug.*/ ASSERT_ARE_EQUAL(char_ptr, "Destination", dstString); ASSERT_ARE_EQUAL(int, EINVAL, result); #else ASSERT_ARE_EQUAL(char, '\0', dstString[0]); ASSERT_ARE_EQUAL(int, ERANGE, result); #endif } TEST_FUNCTION(strcat_s_With_dstSizeInBytes_Smaller_Than_dst_and_src_Fails) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; // act HOOK_INVALID_PARAMETER_HANDLER(); dstSizeInBytes = strlen(dstString) + (strlen(srcString) - 3); result = strcat_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char,'\0', dstString[0]); ASSERT_ARE_EQUAL(int, ERANGE, result); } /* strcpy_s */ // Tests_SRS_CRT_ABSTRACTIONS_99_016: [strcpy_s shall copy the contents in the address of src, including the terminating null character, to the location that's specified by dst.] // Tests_SRS_CRT_ABSTRACTIONS_99_011 : [strcpy_s shall return Zero upon success] TEST_FUNCTION(strcpy_s_copies_Source_into_Destination) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result = 0; // act result = strcpy_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "Source", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strcpy_s_copies_Empty_Source_into_Destination) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = ""; int result = 0; // act result = strcpy_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strcpy_s_copies_Source_into_Empty_Destination) { // arrange char dstString[128] = ""; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result = 0; // act result = strcpy_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "Source", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strcpy_s_copies_Empty_Source_into_Empty_Destination) { // arrange char dstString[128] = ""; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = ""; int result = 0; // act result = strcpy_s(dstString, dstSizeInBytes, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "", dstString); ASSERT_ARE_EQUAL(int, 0, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_012 : [If dst is NULL, the error code returned shall be EINVAL & dst shall not be modified.] TEST_FUNCTION(strcpy_s_With_NULL_Destination_Fails) { // arrange char* dstString = NULL; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result = 0; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = strcpy_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char_ptr, NULL, dstString); ASSERT_ARE_EQUAL(int, EINVAL, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_013 : [If src is NULL, the error code returned shall be EINVAL and dst[0] shall be set to 0.] TEST_FUNCTION(strcpy_s_With_NULL_Source_Fails) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char* srcString = NULL; int result = 0; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = strcpy_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char,'\0', dstString[0]); ASSERT_ARE_EQUAL(int, EINVAL, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_014 : [If the dstSizeInBytes is 0 or smaller than the required size for the src string, the error code returned shall be ERANGE & dst[0] set to 0.] TEST_FUNCTION(strcpy_s_With_dstSizeInBytes_Equals_Zero_Fails) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; // act dstSizeInBytes = 0; HOOK_INVALID_PARAMETER_HANDLER(); result = strcpy_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert #ifdef _MSC_VER /*MSDN Claims that destination buffer would be set to empty & ERANGE is the error, but not the case. Filing bug.*/ ASSERT_ARE_EQUAL(char_ptr, "Destination", dstString); ASSERT_ARE_EQUAL(int, EINVAL, result); #else ASSERT_ARE_EQUAL(char, '\0', dstString[0]); ASSERT_ARE_EQUAL(int, ERANGE, result); #endif } TEST_FUNCTION(strcpy_s_With_dstSizeInBytes_Smaller_Than_source_Fails) { // arrange char dstString[128] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; int result; // act HOOK_INVALID_PARAMETER_HANDLER(); dstSizeInBytes = sizeof(srcString) - 2; result = strcpy_s(dstString, dstSizeInBytes, srcString); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char,'\0', dstString[0]); ASSERT_ARE_EQUAL(int, ERANGE, result); } /* strncpy_s */ // Tests_SRS_CRT_ABSTRACTIONS_99_025 : [strncpy_s shall copy the first N characters of src to dst, where N is the lesser of MaxCount and the length of src.] // Tests_SRS_CRT_ABSTRACTIONS_99_041 : [If those N characters will fit within dst(whose size is given as dstSizeInBytes) and still leave room for a null terminator, then those characters shall be copied and a terminating null is appended; otherwise, strDest[0] is set to the null character and ERANGE error code returned per requirement below.] // Tests_SRS_CRT_ABSTRACTIONS_99_018: [strncpy_s shall return Zero upon success] TEST_FUNCTION(strncpy_s_copies_N_chars_of_source_to_destination_where_maxCount_equals_source_Length) { // arrange char dstString[] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount); // assert ASSERT_ARE_EQUAL(char_ptr, "Source", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strncpy_s_copies_N_chars_of_source_to_destination_where_maxCount_is_larger_than_Source_Length) { // arrange char dstString[] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount+5); // assert ASSERT_ARE_EQUAL(char_ptr, "Source", dstString); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(strncpy_s_copies_N_chars_of_source_to_destination_where_maxCount_is_less_than_source_length) { // arrange char dstString[] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount - 3); // assert ASSERT_ARE_EQUAL(char_ptr, "Sour", dstString); ASSERT_ARE_EQUAL(int, 0, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_026 : [If MaxCount is _TRUNCATE(defined as - 1), then as much of src as will fit into dst shall be copied while still leaving room for the terminating null to be appended.] TEST_FUNCTION(strncpy_s_with_maxCount_set_to_TRUNCATE_and_destination_fits_source) { // arrange char dstString[] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act maxCount = _TRUNCATE; result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount); // assert ASSERT_ARE_EQUAL(char_ptr, "Source", dstString); ASSERT_ARE_EQUAL(int, 0, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_026 : [If MaxCount is _TRUNCATE(defined as - 1), then as much of src as will fit into dst shall be copied while still leaving room for the terminating null to be appended.] // Tests_SRS_CRT_ABSTRACTIONS_99_019: [If truncation occurred as a result of the copy, the error code returned shall be STRUNCATE .] TEST_FUNCTION(strncpy_s_with_maxCount_set_to_TRUNCATE_and_destination_is_smaller_than_source) { // arrange char dstString[] = "Dest"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act maxCount = _TRUNCATE; result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount); // assert ASSERT_ARE_EQUAL(char_ptr, "Sour", dstString); ASSERT_ARE_EQUAL(int, STRUNCATE, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_020 : [If dst is NULL, the error code returned shall be EINVAL and dst shall not be modified.] TEST_FUNCTION(strncpy_s_fails_with_destination_set_to_NULL) { // arrange char* dstString = NULL; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_IS_NULL(dstString); ASSERT_ARE_EQUAL(int, EINVAL, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_021: [If src is NULL, the error code returned shall be EINVAL and dst[0] shall be set to 0.] TEST_FUNCTION(strncpy_s_fails_with_source_set_to_NULL) { // arrange char dstString[] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char* srcString = NULL; size_t maxCount = sizeof(srcString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char,'\0', dstString[0]); ASSERT_ARE_EQUAL(int, EINVAL, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_022: [If the dstSizeInBytes is 0, the error code returned shall be EINVAL and dst shall not be modified.] TEST_FUNCTION(strncpy_s_fails_with_dstSizeInBytes_set_to_Zero) { // arrange char dstString[] = "Destination"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); dstSizeInBytes = 0; result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char_ptr, "Destination", dstString); ASSERT_ARE_EQUAL(int, EINVAL, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_023 : [If dst is not NULL & dstSizeInBytes is smaller than the required size for the src string, the error code returned shall be ERANGE and dst[0] shall be set to 0.] TEST_FUNCTION(strncpy_s_dstSizeInBytes_is_smaller_than_the_required_size_for_source) { // arrange char dstString[] = "Dest"; size_t dstSizeInBytes = sizeof(dstString); char srcString[] = "Source"; size_t maxCount = sizeof(srcString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); result = strncpy_s(dstString, dstSizeInBytes, srcString, maxCount); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char,'\0', dstString[0]); ASSERT_ARE_EQUAL(int, ERANGE, result); } /* sprintf_s */ // Tests_SRS_CRT_ABSTRACTIONS_99_029: [The sprintf_s function shall format and store series of characters and values in dst.Each argument(if any) is converted and output according to the corresponding Format Specification in the format variable.] // Tests_SRS_CRT_ABSTRACTIONS_99_031: [A null character is appended after the last character written.] // Tests_SRS_CRT_ABSTRACTIONS_99_027: [sprintf_s shall return the number of characters stored in dst upon success. This number shall not include the terminating null character.] TEST_FUNCTION(sprintf_s_formats_and_stores_chars_and_values_in_destination) { // arrange char dstString[1024]; size_t dstSizeInBytes = sizeof(dstString); char expected_string[] = "sprintf_s: 123, hello, Z, 1.5"; int expected_string_size = (int)(sizeof(expected_string)); int result; // act result = sprintf_s(dstString, dstSizeInBytes, "sprintf_s: %d, %s, %c, %3.1f", 123, "hello", 'Z', 1.5f); // assert ASSERT_ARE_EQUAL(char_ptr, expected_string, dstString); ASSERT_ARE_EQUAL(int, expected_string_size -1, result); } // Tests_SRS_CRT_ABSTRACTIONS_99_028: [If dst or format is a null pointer, sprintf_s shall return -1.] TEST_FUNCTION(sprintf_s_fails_with_dst_set_to_null) { // arrange char* dstString = NULL; size_t dstSizeInBytes = sizeof(dstString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = sprintf_s(dstString, dstSizeInBytes, "sprintf_s: %d, %s, %c, %3.1f", 123, "hello", 'Z', 1.5f); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(int, EINVAL, errno); } TEST_FUNCTION(sprintf_s_fails_with_format_set_to_null) { // arrange char dstString[1024]; size_t dstSizeInBytes = sizeof(dstString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); #ifdef _MSC_VER #pragma warning(suppress: 6387) /* This is test code, explictly calling with NULL argument */ #endif result = sprintf_s(dstString, dstSizeInBytes, NULL); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(int, EINVAL, errno); } // Tests_SRS_CRT_ABSTRACTIONS_99_034 : [If the dst buffer is too small for the text being printed, then dst is set to an empty string and the function shall return -1.] TEST_FUNCTION(sprintf_s_fails_with_dst_too_small) { // arrange char dstString[5]; size_t dstSizeInBytes = sizeof(dstString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); result = sprintf_s(dstString, dstSizeInBytes, "sprintf_s: %d, %s, %c, %3.1f", 123, "hello", 'Z', 1.5f); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char_ptr, "", dstString); ASSERT_ARE_EQUAL(int, -1, result); } TEST_FUNCTION(sprintf_s_fails_with_dst_buffer_size_not_fitting_null_char) { // arrange char dstString[5]; size_t dstSizeInBytes = sizeof(dstString); int result; // act HOOK_INVALID_PARAMETER_HANDLER(); result = sprintf_s(dstString, dstSizeInBytes, "12345"); UNHOOK_INVALID_PARAMETER_HANDLER(); // assert ASSERT_ARE_EQUAL(char_ptr, "", dstString); ASSERT_ARE_EQUAL(int, -1, result); } /* strtoull_s */ /*Tests_SRS_CRT_ABSTRACTIONS_21_014: [If the correct value is outside the range, the strtoull_s returns the value ULLONG_MAX, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtoull_s_decimal_base_max_ull_64bit_success) { // arrange const char* subjectStr = "18446744073709551615"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = ULLONG_MAX; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "18446744073709551615", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_014: [If the correct value is outside the range, the strtoull_s returns the value ULLONG_MAX, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtoull_s_hexadecimal_base_max_ull_128bit_success) { // arrange const char* subjectStr = "0xffffffffffffffffffffffffffffffff"; char* endptr; int base = 16; unsigned long long result; size_t ull_size = sizeof(unsigned long long); unsigned long long expectedResult = ULLONG_MAX; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); if (ull_size == 128) { uint64_t upperResult = (uint64_t)((result >> 63) / 2); uint64_t lowerResult = (uint64_t)(result & ULLONG_MAX); ASSERT_ARE_EQUAL(uint64_t, expectedResult, upperResult); ASSERT_ARE_EQUAL(uint64_t, expectedResult, lowerResult); } else { ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); } } /*Tests_SRS_CRT_ABSTRACTIONS_21_038: [If the subject sequence starts with a negative sign, the strtoull_s will convert it to the posive representation of the negative value.]*/ TEST_FUNCTION(strtoull_s_negative_nanber_decimal_base_ull_success) { // arrange const char* subjectStr = "-5"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = (uint64_t)(-5); char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "-5", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_014: [If the correct value is outside the range, the strtoull_s returns the value ULLONG_MAX, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtoull_s_decimal_base_overflow_max_ull_fail) { // arrange const char* subjectStr = "18446744073709551616"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = ULLONG_MAX; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); ASSERT_ARE_EQUAL(char_ptr, "18446744073709551616", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_014: [If the correct value is outside the range, the strtoull_s returns the value ULLONG_MAX, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtoull_s_hexadecimal_base_overflow_max_ull_fail) { // arrange const char* subjectStr = "0xFFFFFFFFFFFFFFFFF"; char* endptr; int base = 16; uint64_t result; uint64_t expectedResult = ULLONG_MAX; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); ASSERT_ARE_EQUAL(char_ptr, "0xFFFFFFFFFFFFFFFFF", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_001: [The strtoull_s must convert the initial portion of the string pointed to by nptr to uint64_t int representation.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_002: [The strtoull_s must resembling an integer represented in some radix determined by the value of base.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_003: [The strtoull_s must return the integer that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtoull_s_decimal_base_success) { // arrange const char* subjectStr = "123456"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "123456", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_011: [The valid sequence starts after the first non-white-space character, followed by an optional positive or negative sign, a number or a letter(depending of the base).]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_010: [The white-space must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ TEST_FUNCTION(strtoull_s_decimal_base_with_spaces_success) { // arrange const char* subjectStr = " 123456"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, " 123456", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_010: [The white-space must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ TEST_FUNCTION(strtoull_s_decimal_base_with_tab_success) { // arrange const char* subjectStr = " \t 123456"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, " \t 123456", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_011: [The valid sequence starts after the first non-white-space character, followed by an optional positive or negative sign, a number or a letter(depending of the base).]*/ TEST_FUNCTION(strtoull_s_decimal_base_with_plus_signal_success) { // arrange const char* subjectStr = " +123456"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, " +123456", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_038: [If the subject sequence starts with a negative sign, the strtoull_s will convert it to the posive representation of the negative value.]*/ TEST_FUNCTION(strtoull_s_decimal_base_with_minus_sign_fail) { // arrange const char* subjectStr = " -123456"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = (uint64_t)(-123456); char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, " -123456", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_004: [The strtoull_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ TEST_FUNCTION(strtoull_s_decimal_base_follow_by_spaces_success) { // arrange const char* subjectStr = "123456 "; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + 6; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "123456 ", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_004: [The strtoull_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ TEST_FUNCTION(strtoull_s_decimal_base_follow_by_spaces_and_number_success) { // arrange const char* subjectStr = "123456 789"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + 6; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "123456 789", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_004: [The strtoull_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ TEST_FUNCTION(strtoull_s_decimal_base_follow_by_percent_success) { // arrange const char* subjectStr = "123456%%"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + 6; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "123456%%", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_004: [The strtoull_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ TEST_FUNCTION(strtoull_s_decimal_base_follow_by_string_success) { // arrange const char* subjectStr = "123456abc"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + 6; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "123456abc", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_hexadecimal_base_uppercase_success) { // arrange const char* subjectStr = "1E240"; char* endptr; int base = 16; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "1E240", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_hexadecimal_base_lowercase_success) { // arrange const char* subjectStr = "1e240"; char* endptr; int base = 16; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "1e240", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_008: [If the base is 0 and '0x' or '0X' precedes the number, strtoull_s must convert to a hexadecimal (base 16).]*/ TEST_FUNCTION(strtoull_s_0x_hexadecimal_base_uppercase_success) { // arrange const char* subjectStr = "0X1e240"; char* endptr; int base = 16; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "0X1e240", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_008: [If the base is 0 and '0x' or '0X' precedes the number, strtoull_s must convert to a hexadecimal (base 16).]*/ TEST_FUNCTION(strtoull_s_0x_hexadecimal_base_lowercase_success) { // arrange const char* subjectStr = "0x1e240"; char* endptr; int base = 16; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "0x1e240", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_0x_hexadecimal_base_out_of_base_range_character_fail) { // arrange const char* subjectStr = "0xje240"; char* endptr; int base = 16; uint64_t result; uint64_t expectedResult = 0ULL; char* expectedEndptr = (char*)subjectStr; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "0xje240", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_008: [If the base is 0 and '0x' or '0X' precedes the number, strtoull_s must convert to a hexadecimal (base 16).]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_009: [If the base is 0 and '0' precedes the number, strtoull_s must convert to an octal (base 8).]*/ TEST_FUNCTION(strtoull_s_0x_hexadecimal_with_base_8_character_success) { // arrange const char* subjectStr = "0x1e240"; char* endptr; int base = 8; uint64_t result; uint64_t expectedResult = 0ULL; char* expectedEndptr = (char*)subjectStr + 1; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "0x1e240", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_008: [If the base is 0 and '0x' or '0X' precedes the number, strtoull_s must convert to a hexadecimal (base 16).]*/ TEST_FUNCTION(strtoull_s_0_base_with_0x_hexadecimal_success) { // arrange const char* subjectStr = "0x1e240"; char* endptr; int base = 0; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "0x1e240", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_octal_base_success) { // arrange const char* subjectStr = "361100"; char* endptr; int base = 8; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "361100", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_binary_base_success) { // arrange const char* subjectStr = "11110001001000000"; char* endptr; int base = 2; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "11110001001000000", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_36_base_success) { // arrange const char* subjectStr = "hello"; char* endptr; int base = 36; uint64_t result; uint64_t expectedResult = (uint64_t)((17*1679616)+(14*46656)+(21*1296)+(21*36)+(24)); char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "hello", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_36_base_looks_like_hexadecimal_with_0x_success) { // arrange const char* subjectStr = "0x1"; char* endptr; int base = 36; uint64_t result; uint64_t expectedResult = (uint64_t)((33 * 36) + (1)); char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "0x1", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_009: [If the base is 0 and '0' precedes the number, strtoull_s must convert to an octal (base 8).]*/ TEST_FUNCTION(strtoull_s_0_base_with_actal_success) { // arrange const char* subjectStr = "0361100"; char* endptr; int base = 0; uint64_t result; uint64_t expectedResult = 123456ULL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "0361100", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_base_out_of_the_range_underflow_fail) { // arrange const char* subjectStr = "10"; char* endptr; int base = 1; uint64_t result; uint64_t expectedResult = 0ULL; char* expectedEndptr = (char*)subjectStr; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_005: [The strtoull_s must convert number using base 2 to 36.]*/ TEST_FUNCTION(strtoull_s_base_out_of_the_range_overflow_fail) { // arrange const char* subjectStr = "10"; char* endptr; int base = 37; uint64_t result; uint64_t expectedResult = 0ULL; char* expectedEndptr = (char*)subjectStr; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_013: [If no conversion could be performed, the strtoull_s returns the value 0L.]*/ TEST_FUNCTION(strtoull_s_invalid_string_blahblah_fail) { // arrange const char* subjectStr = "blahblah"; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 0ULL; char* expectedEndptr = (char*)subjectStr; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "blahblah", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_013: [If no conversion could be performed, the strtoull_s returns the value 0L.]*/ TEST_FUNCTION(strtoull_s_empty_string_fail) { // arrange const char* subjectStr = ""; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 0ULL; char* expectedEndptr = (char*)subjectStr; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(char_ptr, "", subjectStr); ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_013: [If no conversion could be performed, the strtoull_s returns the value 0L.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_035: [If the nptr is NULL, the strtoull_s must not perform any conversion and must returns 0L; endptr must receive NULL, provided that endptr is not a NULL pointer.]*/ TEST_FUNCTION(strtoull_s_null_ptr_to_string_fail) { // arrange const char* subjectStr = NULL; char* endptr; int base = 10; uint64_t result; uint64_t expectedResult = 0ULL; char* expectedEndptr = (char*)subjectStr; // act result = strtoull_s(subjectStr, &endptr, base); // assert ASSERT_ARE_EQUAL(uint64_t, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /* strtof_s */ /*Tests_SRS_CRT_ABSTRACTIONS_21_015: [The strtof_s must convert the initial portion of the string pointed to by nptr to float representation.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_019: [The valid sequence for strtof_s starts after the first non-white - space character, followed by an optional positive or negative sign, a number, 'INF', or 'NAN' (ignoring case).]*/ TEST_FUNCTION(strtof_s_exponential_number_success) { // arrange const char* subjectStr = "1.0e5"; char* endptr; float result; float expectedResult = 1.0e5; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "1.0e5", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_uppercase_exponential_number_success) { // arrange const char* subjectStr = "1.98E5"; char* endptr; float result; float expectedResult = 1.98E5; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "1.98E5", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_float_without_exponential_number_success) { // arrange const char* subjectStr = "1234.5678910"; char* endptr; float result; float expectedResult = 1234.5678910f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "1234.5678910", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_integer_number_success) { // arrange const char* subjectStr = "12345678910"; char* endptr; float result; float expectedResult = 12345678910.0f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "12345678910", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_only_fraction_number_success) { // arrange const char* subjectStr = "0.12345678910"; char* endptr; float result; float expectedResult = 0.12345678910f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "0.12345678910", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_0_with_exponential_number_success) { // arrange const char* subjectStr = "0.0e10"; char* endptr; float result; float expectedResult = 0.0f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "0.0e10", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_float_positive_number_success) { // arrange const char* subjectStr = "42.42"; char* endptr; float result; float expectedResult = 42.42f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "42.42", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_float_negative_number_success) { // arrange const char* subjectStr = "-42.42"; char* endptr; float result; float expectedResult = -42.42f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "-42.42", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_018: [The white-space for strtof_s must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ TEST_FUNCTION(strtof_s_exponential_number_with_spaces_before_the_number_success) { // arrange const char* subjectStr = "\r\n1.0e5"; char* endptr; float result; float expectedResult = 1.0e5; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "\r\n1.0e5", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_018: [The white-space for strtof_s must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_017: [The strtof_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ TEST_FUNCTION(strtof_s_exponential_number_with_characters_after_the_number_success) { // arrange const char* subjectStr = "1.0e5 123"; char* endptr; float result; float expectedResult = 1.0e5; char* expectedEndptr = (char*)subjectStr + 5; // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "1.0e5 123", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_016: [The strtof_s must return the float that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtof_s_min_positive_value_success) { // arrange const char* subjectStr = "1.175494351e-38"; char* endptr; float result; float expectedResult = FLT_MIN; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "1.175494351e-38", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_022: [If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtof_s_min_negative_value_success) { // arrange const char* subjectStr = "-3.402823466e+38"; char* endptr; float result; float expectedResult = -3.402823466e+38f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "-3.402823466e+38", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_022: [If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtof_s_overflow_max_positive_value_fail) { // arrange const char* subjectStr = "3.402823467e+38"; char* endptr; float result; float expectedResult = HUGE_VALF; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); ASSERT_ARE_EQUAL(char_ptr, "3.402823467e+38", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_022: [If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtof_s_overflow_in_the_integer_part_value_fail) { // arrange const char* subjectStr = "18446744073709551616"; char* endptr; float result; float expectedResult = HUGE_VALF; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); ASSERT_ARE_EQUAL(char_ptr, "18446744073709551616", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_022: [If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtof_s_big_integer_part_value_success) { // arrange const char* subjectStr = "184467440737095516"; char* endptr; float result; float expectedResult = 184467440737095516.0f; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "184467440737095516", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_022: [If the correct value is outside the range, the strtof_s returns the value plus or minus HUGE_VALF, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtof_s_exponential_number_overflow_max_positive_value_fail) { // arrange const char* subjectStr = "1.0e39"; char* endptr; float result; float expectedResult = HUGE_VALF; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); ASSERT_ARE_EQUAL(char_ptr, "1.0e39", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ TEST_FUNCTION(strtof_s_short_infinity_uppercase_success) { // arrange const char* subjectStr = "INF"; char* endptr; float result; float expectedResult = INFINITY; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "INF", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ TEST_FUNCTION(strtof_s_short_negative_infinity_uppercase_success) { // arrange const char* subjectStr = "-INF"; char* endptr; float result; float expectedResult = -INFINITY; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "-INF", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ TEST_FUNCTION(strtof_s_long_infinity_uppercase_success) { // arrange const char* subjectStr = "INFINITY"; char* endptr; float result; float expectedResult = INFINITY; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "INFINITY", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_023: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtof_s must return the INFINITY value for float.]*/ TEST_FUNCTION(strtof_s_long_infinity_mixedcase_success) { // arrange const char* subjectStr = "InFINiTY"; char* endptr; float result; float expectedResult = INFINITY; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "InFINiTY", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ TEST_FUNCTION(strtof_s_short_nan_uppercase_success) { // arrange const char* subjectStr = "NAN"; char* endptr; float result; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "NAN", subjectStr); ASSERT_IS_TRUE(isnan(result)); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ TEST_FUNCTION(strtof_s_long_nan_uppercase_success) { // arrange const char* subjectStr = "NAN(1234)"; char* endptr; float result; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "NAN(1234)", subjectStr); ASSERT_IS_TRUE(isnan(result)); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ TEST_FUNCTION(strtof_s_long_nan_mixedcase_success) { // arrange const char* subjectStr = "NaN(1234)"; char* endptr; float result; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "NaN(1234)", subjectStr); ASSERT_IS_TRUE(isnan(result)); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_024: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtof_s must return 0.0f and points endptr to the first character after the 'NAN' sequence.]*/ TEST_FUNCTION(strtof_s_long_nan_withou_close_parenthesis_fail) { // arrange const char* subjectStr = "NaN(1234"; char* endptr; float result; float expectedResult = 0.0f; char* expectedEndptr = (char*)subjectStr; // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "NaN(1234", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_020: [If the subject sequence is empty or does not have the expected form, the strtof_s must not perform any conversion and must returns 0.0f; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_021: [If no conversion could be performed, the strtof_s returns the value 0.0f.]*/ TEST_FUNCTION(strtof_s_empty_string_success) { // arrange const char* subjectStr = ""; char* endptr; float result; float expectedResult = 0.0f; char* expectedEndptr = (char*)subjectStr; // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_036: [**If the nptr is NULL, the strtof_s must not perform any conversion and must returns 0.0f; endptr must receive NULL, provided that endptr is not a NULL pointer.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_021: [If no conversion could be performed, the strtof_s returns the value 0.0f.]*/ TEST_FUNCTION(strtof_s_string_to_null_pointer_success) { // arrange const char* subjectStr = NULL; char* endptr; float result; float expectedResult = 0.0f; char* expectedEndptr = NULL; // act result = strtof_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, NULL, subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_020: [If the subject sequence is empty or does not have the expected form, the strtof_s must not perform any conversion and must returns 0.0f; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ TEST_FUNCTION(strtof_s_valid_conversion_with_return_string_null_pointer_success) { // arrange const char* subjectStr = "1.0e5"; float result; float expectedResult = 1.0e5; // act result = strtof_s(subjectStr, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, "1.0e5", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); } /*Tests_SRS_CRT_ABSTRACTIONS_21_020: [If the subject sequence is empty or does not have the expected form, the strtof_s must not perform any conversion and must returns 0.0f; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_021: [If no conversion could be performed, the strtof_s returns the value 0.0f.]*/ TEST_FUNCTION(strtof_s_invalid_conversion_with_return_string_null_pointer_success) { // arrange const char* subjectStr = "blahblah"; float result; float expectedResult = 0.0f; // act result = strtof_s(subjectStr, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, "blahblah", subjectStr); ASSERT_ARE_EQUAL(float, expectedResult, result); } /* strtold_s */ /*Tests_SRS_CRT_ABSTRACTIONS_21_025: [The strtold_s must convert the initial portion of the string pointed to by nptr to long double representation.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_026: [The strtold_s must return the long double that represents the value in the initial part of the string. If any.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_029: [The valid sequence for strtold_s starts after the first non-white - space character, followed by an optional positive or negative sign, a number, 'INF', or 'NAN' (ignoring case).]*/ TEST_FUNCTION(strtold_s_exponential_number_success) { // arrange const char* subjectStr = "1.0e5"; char* endptr; long double result; double expectedResult = 1.0e5; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "1.0e5", subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_028: [The white-space for strtold_s must be one of the characters ' ', '\f', '\n', '\r', '\t', '\v'.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_027: [The strtold_s must return in endptr a final string of one or more unrecognized characters, including the terminating null character of the input string.]*/ TEST_FUNCTION(strtold_s_exponential_number_with_characters_after_the_number_success) { // arrange const char* subjectStr = "1.0e5 123"; char* endptr; long double result; long double expectedResult = 1.0e5; char* expectedEndptr = (char*)subjectStr + 5; // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "1.0e5 123", subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_026: [The strtold_s must return the long double that represents the value in the initial part of the string. If any.]*/ TEST_FUNCTION(strtold_s_min_positive_value_success) { // arrange const char* subjectStr = "2.225073858507201e-308"; char* endptr; long double result; long double significant; long double maxExpectedSignificant = 2.225073858507202; long double minExpectedSignificant = 2.225073858507200; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); significant = result*1e308; // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "2.225073858507201e-308", subjectStr); ASSERT_IS_TRUE((significant >= minExpectedSignificant) && (significant <= maxExpectedSignificant)); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_032: [If the correct value is outside the range, the strtold_s returns the value plus or minus HUGE_VALL, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtold_s_max_positive_exponential_number_success) { // arrange const char* subjectStr = "1.797693134862315e+308"; char* endptr; long double result; long double significant; long double maxExpectedSignificant = 1.797693134862316; long double minExpectedSignificant = 1.797693134862314; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); significant = result*1e-308; // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "1.797693134862315e+308", subjectStr); ASSERT_IS_TRUE((significant >= minExpectedSignificant) && (significant <= maxExpectedSignificant)); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_032: [If the correct value is outside the range, the strtold_s returns the value plus or minus HUGE_VALL, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtold_s_min_negative_value_success) { // arrange const char* subjectStr = "-1.797693134862315e+308"; char* endptr; long double result; long double significant; long double maxExpectedSignificant = -1.797693134862314; long double minExpectedSignificant = -1.797693134862316; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); significant = result*1e-308; // assert ASSERT_ARE_EQUAL(int, 0, errno); ASSERT_ARE_EQUAL(char_ptr, "-1.797693134862315e+308", subjectStr); ASSERT_IS_TRUE((significant >= minExpectedSignificant) && (significant <= maxExpectedSignificant)); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_032: [If the correct value is outside the range, the strtold_s returns the value plus or minus HUGE_VALL, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtold_s_overflow_max_positive_value_fail) { // arrange const char* subjectStr = "1.8e+308"; char* endptr; long double result; long double expectedResult = HUGE_VALL; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); ASSERT_ARE_EQUAL(char_ptr, "1.8e+308", subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_032: [If the correct value is outside the range, the strtold_s returns the value plus or minus HUGE_VALL, and errno will receive the value ERANGE.]*/ TEST_FUNCTION(strtold_s_exponential_number_overflow_max_positive_value_fail) { // arrange const char* subjectStr = "1.0e309"; char* endptr; long double result; long double expectedResult = HUGE_VALF; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(int, ERANGE, errno); ASSERT_ARE_EQUAL(char_ptr, "1.0e309", subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_033: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtold_s must return the INFINITY value for long double.]*/ TEST_FUNCTION(strtold_s_short_infinity_uppercase_success) { // arrange const char* subjectStr = "INF"; char* endptr; long double result; long double expectedResult = INFINITY; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "INF", subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_033: [If the string is 'INF' of 'INFINITY' (ignoring case), the strtold_s must return the INFINITY value for long double.]*/ TEST_FUNCTION(strtold_s_short_negative_infinity_uppercase_success) { // arrange const char* subjectStr = "-INF"; char* endptr; long double result; long double expectedResult = -INFINITY; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "-INF", subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_034: [If the string is 'NAN' or 'NAN(...)' (ignoring case), the strtold_s must return 0.0 and points endptr to the first character after the 'NAN' sequence.]*/ TEST_FUNCTION(strtold_s_long_nan_mixedcase_success) { // arrange const char* subjectStr = "NaN(1234)"; char* endptr; long double result; char* expectedEndptr = (char*)subjectStr + strlen(subjectStr); // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "NaN(1234)", subjectStr); ASSERT_IS_TRUE(isnan((double)result)); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_030: [If the subject sequence is empty or does not have the expected form, the strtold_s must not perform any conversion and must returns 0.0; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_031: [If no conversion could be performed, the strtold_s returns the value 0.0.]*/ TEST_FUNCTION(strtold_s_empty_string_success) { // arrange const char* subjectStr = ""; char* endptr; long double result; long double expectedResult = 0.0; char* expectedEndptr = (char*)subjectStr; // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, "", subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_030: [If the subject sequence is empty or does not have the expected form, the strtold_s must not perform any conversion and must returns 0.0; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_031: [If no conversion could be performed, the strtold_s returns the value 0.0.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_037: [If the nptr is NULL, the strtold_s must not perform any conversion and must returns 0.0; endptr must receive NULL, provided that endptr is not a NULL pointer.]*/ TEST_FUNCTION(strtold_s_string_to_null_pointer_success) { // arrange const char* subjectStr = NULL; char* endptr; long double result; long double expectedResult = 0.0; char* expectedEndptr = NULL; // act result = strtold_s(subjectStr, &endptr); // assert ASSERT_ARE_EQUAL(char_ptr, NULL, subjectStr); ASSERT_IS_TRUE(expectedResult == result); ASSERT_ARE_EQUAL(void_ptr, expectedEndptr, endptr); } /*Tests_SRS_CRT_ABSTRACTIONS_21_030: [If the subject sequence is empty or does not have the expected form, the strtold_s must not perform any conversion and must returns 0.0; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ TEST_FUNCTION(strtold_s_valid_conversion_with_return_string_null_pointer_success) { // arrange const char* subjectStr = "1.0e5"; long double result; long double expectedResult = 1.0e5; // act result = strtold_s(subjectStr, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, "1.0e5", subjectStr); ASSERT_IS_TRUE(expectedResult == result); } /*Tests_SRS_CRT_ABSTRACTIONS_21_030: [If the subject sequence is empty or does not have the expected form, the strtold_s must not perform any conversion and must returns 0.0; the value of nptr is stored in the object pointed to by endptr, provided that endptr is not a NULL pointer.]*/ /*Tests_SRS_CRT_ABSTRACTIONS_21_031: [If no conversion could be performed, the strtold_s returns the value 0.0.]*/ TEST_FUNCTION(strtold_s_invalid_conversion_with_return_string_null_pointer_success) { // arrange const char* subjectStr = "blahblah"; long double result; long double expectedResult = 0.0; // act result = strtold_s(subjectStr, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, "blahblah", subjectStr); ASSERT_IS_TRUE(expectedResult == result); } /* mallocAndStrcpy_s */ // Tests_SRS_CRT_ABSTRACTIONS_99_038 : [mallocAndstrcpy_s shall allocate memory for destination buffer to fit the string in the source parameter.] // Tests_SRS_CRT_ABSTRACTIONS_99_039 : [mallocAndstrcpy_s shall copy the contents in the address source, including the terminating null character into location specified by the destination pointer after the memory allocation.] // Tests_SRS_CRT_ABSTRACTIONS_99_035: [mallocAndstrcpy_s shall return Zero upon success] TEST_FUNCTION(mallocAndStrcpy_s_copies_source_string_into_allocated_memory) { // arrange char* destString = NULL; char srcString[] = "Source"; int result; // act result = mallocAndStrcpy_s(&destString, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, destString, srcString); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup free(destString); } // Tests_SRS_CRT_ABSTRACTIONS_99_036: [destination parameter or source parameter is NULL, the error code returned shall be EINVAL and destination shall not be modified.] TEST_FUNCTION(mallocAndStrcpy_s_fails_with_destination_pointer_set_to_null) { // arrange char** destPointer = NULL; char srcString[] = "Source"; int result; // act result = mallocAndStrcpy_s(destPointer, srcString); // assert ASSERT_ARE_EQUAL(int, EINVAL, result); } TEST_FUNCTION(mallocAndStrcpy_s_fails_with_source_set_to_null) { // arrange char* destString = (char*)("Destination"); char* srcString = NULL; int result; // act result = mallocAndStrcpy_s(&destString, srcString); // assert ASSERT_ARE_EQUAL(char_ptr, "Destination", destString); ASSERT_ARE_EQUAL(int, EINVAL, result); } /*http://vstfrd:8080/Azure/RD/_workitems/edit/3216760*/ #if 0 // Tests_SRS_CRT_ABSTRACTIONS_99_037: [Upon failure to allocate memory for the destination, the function will return ENOMEM.] TEST_FUNCTION(mallocAndStrcpy_s_fails_upon_failure_to_allocate_memory) { // arrange char* destString = NULL; char* srcString = "Source"; int result; mallocSize = 0; // act #ifdef _CRTDBG_MAP_ALLOC HOOK_FUNCTION(_malloc_dbg, malloc_null); result = mallocAndStrcpy_s(&destString, srcString); UNHOOK_FUNCTION(_malloc_dbg, malloc_null); #else HOOK_FUNCTION(malloc, malloc_null); result = mallocAndStrcpy_s(&destString, srcString); UNHOOK_FUNCTION(malloc, malloc_null); #endif // assert ASSERT_ARE_EQUAL(int, ENOMEM, result); ASSERT_ARE_EQUAL(size_t,strlen(srcString)+1, mallocSize); } #endif /*Tests_SRS_CRT_ABSTRACTIONS_02_003: [If destination is NULL then unsignedIntToString shall fail.] */ TEST_FUNCTION(unsignedIntToString_fails_when_destination_is_NULL) { // arrange // act int result = unsignedIntToString(NULL, 100, 43); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /*Tests_SRS_CRT_ABSTRACTIONS_02_002: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and unsignedIntToString shall fail.] */ TEST_FUNCTION(unsignedIntToString_fails_when_destination_is_not_sufficient_for_1_digit) { // arrange char destination[1000]; unsigned int toBeConverted = 1; size_t destinationSize = 1; ///act int result = unsignedIntToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /*Tests_SRS_CRT_ABSTRACTIONS_02_002: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and unsignedIntToString shall fail.] */ TEST_FUNCTION(unsignedIntToString_fails_when_destination_is_not_sufficient_for_more_than_1_digit) { // arrange char destination[1000]; unsigned int toBeConverted = 1; /*7 would not be a right starting digit*/ size_t destinationSize = 1; while (toBeConverted <= (UINT_MAX / 10)) { ///arrange int result; destinationSize++; toBeConverted *= 10; ///act result = unsignedIntToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } } /*Tests_SRS_CRT_ABSTRACTIONS_02_001: [unsignedIntToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ TEST_FUNCTION(unsignedIntToString_succeeds_1_digit) { // arrange char destination[1000]; unsigned int toBeConverted = 2; size_t destinationSize = 2; ///act int result = unsignedIntToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "2", destination); } /*Tests_SRS_CRT_ABSTRACTIONS_02_001: [unsignedIntToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ /*Tests_SRS_CRT_ABSTRACTIONS_02_004: [If the conversion has been successfull then unsignedIntToString shall return 0.] */ TEST_FUNCTION(unsignedIntToString_succeeds_for_interesting_numbers) { // arrange char destination[1000]; size_t i; for (i = 0; i (UINT_MAX / 10)) { ASSERT_FAIL("string produced was too big... "); } else { valueFromString *= 10; valueFromString += (destination[pos] - '0'); } pos++; } if (interestingUnsignedIntNumbersToBeConverted[i] != valueFromString) { ASSERT_FAIL("unexpected value"); } } } /*Tests_SRS_CRT_ABSTRACTIONS_02_001: [unsignedIntToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ /*Tests_SRS_CRT_ABSTRACTIONS_02_004: [If the conversion has been successfull then unsignedIntToString shall return 0.] */ TEST_FUNCTION(unsignedIntToString_succeeds_for_space_just_about_right) { // arrange char destination[1000]; unsigned int toBeConverted = 1; /*7 would not be a right starting digit*/ size_t destinationSize = 2; while (toBeConverted <= (UINT_MAX / 10)) { ///arrange int result; unsigned int valueFromString = 0; size_t pos = 0; destinationSize++; toBeConverted *= 10; ///act result = unsignedIntToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_EQUAL(int, 0, result); while (destination[pos] != '\0') { if (valueFromString > (UINT_MAX / 10)) { ASSERT_FAIL("string produced was too big... "); } else { valueFromString *= 10; valueFromString += (destination[pos] - '0'); } pos++; } if (toBeConverted != valueFromString) { ASSERT_FAIL("unexpected value"); } } } /*Tests_SRS_CRT_ABSTRACTIONS_02_007: [If destination is NULL then size_tToString shall fail.] */ TEST_FUNCTION(size_tToString_fails_when_destination_is_NULL) { // arrange // act int result = size_tToString(NULL, 100, 43); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /*Tests_SRS_CRT_ABSTRACTIONS_02_006: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and size_tToString shall fail.] */ TEST_FUNCTION(size_tToString_fails_when_destination_is_not_sufficient_for_1_digit) { // arrange char destination[1000]; size_t toBeConverted = 1; size_t destinationSize = 1; ///act int result = size_tToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /*Tests_SRS_CRT_ABSTRACTIONS_02_006: [If the conversion fails for any reason (for example, insufficient buffer space), a non-zero return value shall be supplied and size_tToString shall fail.] */ TEST_FUNCTION(size_tToString_fails_when_destination_is_not_sufficient_for_more_than_1_digit) { // arrange char destination[1000]; size_t toBeConverted = 1; /*7 would not be a right starting digit*/ size_t destinationSize = 1; while (toBeConverted <= (UINT_MAX / 10)) { ///arrange int result; destinationSize++; toBeConverted *= 10; ///act result = size_tToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } } /*Tests_SRS_CRT_ABSTRACTIONS_02_001: [size_tToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ TEST_FUNCTION(size_tToString_succeeds_1_digit) { // arrange char destination[1000]; size_t toBeConverted = 2; size_t destinationSize = 2; ///act int result = size_tToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "2", destination); } /*Tests_SRS_CRT_ABSTRACTIONS_02_001: [size_tToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ /*Tests_SRS_CRT_ABSTRACTIONS_02_004: [If the conversion has been successfull then size_tToString shall return 0.] */ TEST_FUNCTION(size_tToString_succeeds_for_interesting_numbers) { // arrange char destination[1000]; size_t i; for (i = 0; i (SIZE_MAX / 10)) { ASSERT_FAIL("string produced was too big... "); } else { valueFromString *= 10; valueFromString += (destination[pos] - '0'); } pos++; } if (interestingSize_tNumbersToBeConverted[i] != valueFromString) { ASSERT_FAIL("unexpected value"); } } } /*Tests_SRS_CRT_ABSTRACTIONS_02_001: [size_tToString shall convert the parameter value to its decimal representation as a string in the buffer indicated by parameter destination having the size indicated by parameter destinationSize.] */ /*Tests_SRS_CRT_ABSTRACTIONS_02_004: [If the conversion has been successfull then size_tToString shall return 0.] */ TEST_FUNCTION(size_tToString_succeeds_for_space_just_about_right) { // arrange char destination[1000]; size_t toBeConverted = 1; /*7 would not be a right starting digit*/ size_t destinationSize = 2; while (toBeConverted <= (SIZE_MAX / 10)) { ///arrange int result; size_t valueFromString = 0; size_t pos = 0; destinationSize++; toBeConverted *= 10; ///act result = size_tToString(destination, destinationSize, toBeConverted); ///assert ASSERT_ARE_EQUAL(int, 0, result); while (destination[pos] != '\0') { if (valueFromString > (SIZE_MAX / 10)) { ASSERT_FAIL("string produced was too big... "); } else { valueFromString *= 10; valueFromString += (destination[pos] - '0'); } pos++; } if (toBeConverted != valueFromString) { ASSERT_FAIL("unexpected value"); } } } END_TEST_SUITE(CRTAbstractions_UnitTests) main.c000066400000000000000000000005101362133436400354200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/crtabstractions_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(CRTAbstractions_UnitTests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/dns_async_ut/000077500000000000000000000000001362133436400331675ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000012651362133436400356540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/dns_async_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName dns_async_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../pal/dns_async.c ../../src/crt_abstractions.c ) set(${theseTestsName}_h_files ) include_directories(.) include_directories(../../pal/inc) if(WIN32) include_directories(./win32_fake_linux) else() include_directories(../../pal/linux) endif() build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) dns_async_ut.c000066400000000000000000000331121362133436400357450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/dns_async_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #ifdef __cplusplus #include #else #include #include #endif /** * Include the C standards here. */ #ifdef __cplusplus #include #include #else #include #include #endif #include "dns_async.h" /** * The gballoc.h will replace the malloc, free, and realloc by the my_gballoc functions, in this case, * if you define these mock functions after include the gballoc.h, you will create an infinity recursion, * so, places the my_gballoc functions before the #include "azure_c_shared_utility/gballoc.h" */ void* my_gballoc_malloc(size_t size) { return malloc(size); } void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void my_gballoc_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "socket_async_os.h" #include "azure_c_shared_utility/gballoc.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, int, getaddrinfo, const char*, node, const char*, service, const struct addrinfo*, hints, struct addrinfo**, res); #ifdef __cplusplus } #endif #undef ENABLE_MOCKS void freeaddrinfo(struct addrinfo* ai) { (void)ai; } #define GETADDRINFO_SUCCESS 0 #define GETADDRINFO_FAIL -1 #define FAKE_GOOD_IP_ADDR 444 struct sockaddr_in fake_good_addr; struct addrinfo fake_addrinfo; int my_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) { (void)node; (void)service; (void)hints; fake_addrinfo.ai_next = NULL; fake_addrinfo.ai_family = AF_INET; fake_addrinfo.ai_addr = (struct sockaddr*)(&fake_good_addr); ((struct sockaddr_in *) fake_addrinfo.ai_addr)->sin_addr.s_addr = FAKE_GOOD_IP_ADDR; *res = &fake_addrinfo; return 0; } /** * Include the test tools. */ #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_bool.h" #include "umocktypes_stdint.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } /** * This is necessary for the test suite, just keep as is. */ static TEST_MUTEX_HANDLE g_testByTest; BEGIN_TEST_SUITE(dns_async_ut) /** * This is the place where we initialize the test system. Replace the test name to associate the test * suite with your test cases. * It is called once, before start the tests. */ TEST_SUITE_INITIALIZE(a) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_bool_register_types(); ASSERT_ARE_EQUAL(int, 0, result); umocktypes_stdint_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_RETURNS(getaddrinfo, GETADDRINFO_SUCCESS, GETADDRINFO_FAIL); REGISTER_GLOBAL_MOCK_HOOK(getaddrinfo, my_getaddrinfo); } /** * The test suite will call this function to cleanup your machine. * It is called only once, after all tests is done. */ TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } /** * The test suite will call this function to prepare the machine for the new test. * It is called before execute each test. */ TEST_FUNCTION_INITIALIZE(initialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); } /** * The test suite will call this function to cleanup your machine for the next test. * It is called after execute each test. */ TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_DNS_ASYNC_30_022: [ If the DNS lookup process has completed, dns_async_is_create_complete shall return true. ]*/ /* Tests_SRS_DNS_ASYNC_30_032: [ If dns_async_is_create_complete has returned true and the lookup process has succeeded, dns_async_get_ipv4 shall return the discovered IPv4 address. ]*/ /* Tests_SRS_DNS_ASYNC_30_024: [ If dns_async_is_create_complete has previously returned true, dns_async_is_create_complete shall do nothing and return true. ]*/ TEST_FUNCTION(dns_async__is_complete_repeated_call__succeeds) { ///arrange DNS_ASYNC_HANDLE dns = dns_async_create("fake.com", NULL); // We're calling this twice bool result = dns_async_is_lookup_complete(dns); uint32_t ipv4 = dns_async_get_ipv4(dns); ASSERT_ARE_EQUAL(uint32_t, FAKE_GOOD_IP_ADDR, ipv4, "Unexpected IP"); ASSERT_IS_TRUE(result, "Unexpected non-completion"); umock_c_reset_all_calls(); ///act result = dns_async_is_lookup_complete(dns); ipv4 = dns_async_get_ipv4(dns); ///assert ASSERT_IS_TRUE(result, "Unexpected non-completion"); ASSERT_ARE_EQUAL(uint32_t, FAKE_GOOD_IP_ADDR, ipv4, "Unexpected IP"); // Verify it didn't do anything ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup dns_async_destroy(dns); } /* Tests_SRS_DNS_ASYNC_30_023: [ If the DNS lookup process is not yet complete, dns_async_is_create_complete shall return false. ]*/ TEST_FUNCTION(dns_async__is_complete_waiting__succeeds) { // This condition cannot be tested with the blocking immplementation of dns_async because the module never waits. } /* Tests_SRS_DNS_ASYNC_30_022: [ If the DNS lookup process has completed, dns_async_is_create_complete shall return true. ]*/ TEST_FUNCTION(dns_async__is_complete_yes__succeeds) { ///arrange bool result; DNS_ASYNC_HANDLE dns = dns_async_create("fake.com", NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); ///act result = dns_async_is_lookup_complete(dns); ///assert ASSERT_IS_TRUE(result, "Unexpected non-completion"); ///cleanup dns_async_destroy(dns); } /* Tests_SRS_DNS_ASYNC_30_032: [ If dns_async_is_create_complete has returned true and the lookup process has succeeded, dns_async_get_ipv4 shall return the discovered IPv4 address. ]*/ TEST_FUNCTION(dns_async__dns_async_get_ipv4__succeeds) { ///arrange bool result; uint32_t ipv4; DNS_ASYNC_HANDLE dns = dns_async_create("fake.com", NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); result = dns_async_is_lookup_complete(dns); ASSERT_IS_TRUE(result, "Unexpected non-completion"); ///act ipv4 = dns_async_get_ipv4(dns); ///assert ASSERT_ARE_EQUAL(uint32_t, FAKE_GOOD_IP_ADDR, ipv4, "Unexpected IP"); ///cleanup dns_async_destroy(dns); } /* Tests_SRS_DNS_ASYNC_30_022: [ If the DNS lookup process has completed, dns_async_is_create_complete shall return true. ]*/ TEST_FUNCTION(dns_async__is_complete_yes_after_failure__fails) { ///arrange bool result; DNS_ASYNC_HANDLE dns = dns_async_create("fake.com", NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(GETADDRINFO_FAIL); ///act result = dns_async_is_lookup_complete(dns); ///assert ASSERT_IS_TRUE(result, "Unexpected non-completion"); ///cleanup dns_async_destroy(dns); } /* Tests_SRS_DNS_ASYNC_30_033: [ If dns_async_is_create_complete has returned true and the lookup process has failed, dns_async_get_ipv4 shall return 0. ]*/ TEST_FUNCTION(dns_async__async_get_ipv4__fails) { ///arrange bool result; uint32_t ipv4; DNS_ASYNC_HANDLE dns = dns_async_create("fake.com", NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(GETADDRINFO_FAIL); result = dns_async_is_lookup_complete(dns); ASSERT_IS_TRUE(result, "Unexpected non-completion"); ///act ipv4 = dns_async_get_ipv4(dns); ///assert ASSERT_ARE_EQUAL(uint32_t, 0, ipv4, "Unexpected non-zero IP"); ///cleanup dns_async_destroy(dns); } /* Tests_SRS_DNS_ASYNC_30_020: [ If the dns parameter is NULL, dns_async_is_create_complete shall log an error and return false. ]*/ TEST_FUNCTION(dns_async__is_complete_parameter_validation__fails) { ///arrange ///act bool result = dns_async_is_lookup_complete(NULL); ///assert ASSERT_IS_FALSE(result, "Unexpected non-zero IPv4"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_DNS_ASYNC_30_031: [ If dns_async_is_create_complete has not yet returned true, dns_async_get_ipv4 shall log an error and return 0. ]*/ TEST_FUNCTION(dns_async__get_ipv4_too_early__fails) { ///arrange DNS_ASYNC_HANDLE dns = dns_async_create("fake.com", NULL); ///act uint32_t result = dns_async_get_ipv4(dns); ///assert ASSERT_ARE_EQUAL(uint32_t, 0, result, "Unexpected non-zero IPv4"); ///cleanup dns_async_destroy(dns); } /* Tests_SRS_DNS_ASYNC_30_030: [ If the dns parameter is NULL, dns_async_get_ipv4 shall log an error and return 0. ]*/ TEST_FUNCTION(dns_async__get_ipv4_parameter_validation__fails) { ///arrange ///act uint32_t result = dns_async_get_ipv4(NULL); ///assert ASSERT_ARE_EQUAL(uint32_t, 0, result, "Unexpected non-zero IPv4"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_DNS_ASYNC_30_050: [ If the dns parameter is NULL, dns_async_destroy shall log an error and do nothing. ]*/ TEST_FUNCTION(dns_async__destroy_parameter_validation__fails) { ///arrange ///act dns_async_destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_DNS_ASYNC_30_051: [ dns_async_destroy shall delete all acquired resources and delete the DNS_ASYNC_HANDLE. ]*/ TEST_FUNCTION(dns_async__destroy__success) { ///arrange DNS_ASYNC_HANDLE result = dns_async_create("fake.com", NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_NUM_ARG)); // copy hostname STRICT_EXPECTED_CALL(gballoc_free(IGNORED_NUM_ARG)); // instance ///act dns_async_destroy(result); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_DNS_ASYNC_30_014: [ On any failure, dns_async_create shall log an error and return NULL. ]*/ TEST_FUNCTION(dns_async__create__success) { ///arrange DNS_ASYNC_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // copy hostname STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // instance ///act result = dns_async_create("fake.com", NULL); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup dns_async_destroy(result); } /* Tests_SRS_DNS_ASYNC_30_014: [ On any failure, dns_async_create shall log an error and return NULL. ]*/ TEST_FUNCTION(dns_async__create_unhappy_paths__fails) { ///arrange unsigned int i; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // copy hostname STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // instance umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { DNS_ASYNC_HANDLE result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act result = dns_async_create("fake.com", NULL); ///assert ASSERT_IS_NULL(result); } ///cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_DNS_ASYNC_30_011: [ If the hostname parameter is NULL, dns_async_create shall log an error and return NULL. ]*/ TEST_FUNCTION(dns_async__create_parameter_validation__fails) { ///arrange ///act DNS_ASYNC_HANDLE result = dns_async_create(NULL, NULL); ///assert ASSERT_IS_NULL(result, "Unexpected success with NULL hostname"); } END_TEST_SUITE(dns_async_ut) main.c000066400000000000000000000005701362133436400342020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/dns_async_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; /** * Identify the test suite to run here. */ RUN_TEST_SUITE(dns_async_ut, failedTestCount); return failedTestCount; } win32_fake_linux/000077500000000000000000000000001362133436400362575ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/dns_async_utreadme.txt000066400000000000000000000001771362133436400402620ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/dns_async_ut/win32_fake_linuxThis file is a convenience for debugging socket_async.c under Windows, and does not need to normally be part of the SDK build. socket_async_os.h000066400000000000000000000033431362133436400416210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/dns_async_ut/win32_fake_linux #ifndef TEST_SOCKET_H #define TEST_SOCKET_H // This file enables testing of these Linux-oriented unit tests under Windows. It is not // strictly necessary, but is convenient to have. #ifdef __cplusplus extern "C" { #include #include #endif #include #include #include #define AF_INET 2 #define SOCK_STREAM 1 #define IPPROTO_TCP 6 #define htons(x) x struct in_addr { uint32_t s_addr; /* address in network byte order */ }; struct sockaddr_in { uint8_t sin_family; /* address family: AF_INET */ uint16_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ }; struct sockaddr { uint8_t sin_family; /* address family: AF_INET */ uint16_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ }; struct addrinfo { int ai_flags; // AI_PASSIVE, AI_CANONNAME, etc. int ai_family; // AF_INET, AF_INET6, AF_UNSPEC int ai_socktype; // SOCK_STREAM, SOCK_DGRAM int ai_protocol; // use 0 for "any" size_t ai_addrlen; // size of ai_addr in bytes struct sockaddr *ai_addr; // struct sockaddr_in or _in6 char *ai_canonname; // full canonical hostname struct addrinfo *ai_next; // linked list, next node }; int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res); void freeaddrinfo(struct addrinfo* ai); #ifdef __cplusplus } #endif #endif /* TEST_SOCKET_H */ doublylinkedlist_ut/000077500000000000000000000000001362133436400345105ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000010021362133436400372410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/doublylinkedlist_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName doublylinkedlist_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/doublylinkedlist.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) doublylinkedlist_ut.c000066400000000000000000000406221362133436400407510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/doublylinkedlist_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "azure_c_shared_utility/doublylinkedlist.h" #include "testrunnerswitcher.h" typedef struct simpleItem_tag { unsigned char index; DLIST_ENTRY link; } simpleItem,*pSimpleItem; static simpleItem simp1 = { 1, { NULL, NULL } }; static simpleItem simp2 = { 2, { NULL, NULL } }; static simpleItem simp3 = { 3, { NULL, NULL } }; static simpleItem simp4 = { 4, { NULL, NULL } }; static simpleItem simp5 = { 5, { NULL, NULL } }; static TEST_MUTEX_HANDLE g_testByTest; BEGIN_TEST_SUITE(doublylinkedlist_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(TestClassCleanup) { TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_DLIST_06_005: [DList_InitializeListHead will initialize the Flink & Blink to the address of the DLIST_ENTRY.] */ TEST_FUNCTION(DList_InitializeListHead_with_a_list_head_points_Flink_and_Blink_to_its_address) { // arrange DLIST_ENTRY head = { 0 }; // act DList_InitializeListHead(&head); // assert ASSERT_ARE_EQUAL(void_ptr, &head, head.Flink); ASSERT_ARE_EQUAL(void_ptr, &head, head.Blink); } /* Tests_SRS_DLIST_06_003: [DList_IsListEmpty shall return a non-zero value if there are no DLIST_ENTRY's on this list other than the list head.] */ TEST_FUNCTION(DList_IsListEmpty_with_a_list_head_only_returns_empty) { // arrange DLIST_ENTRY local = { 0 }; int result; DList_InitializeListHead(&local); // act result = DList_IsListEmpty(&local); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_DLIST_06_004: [DList_IsListEmpty shall return 0 if there is one or more items in the list.]*/ TEST_FUNCTION(DList_IsListEmpty_with_a_list_head_and_items_returns_empty) { // arrange DLIST_ENTRY head = { 0 }; int result; DList_InitializeListHead(&head); DList_InsertTailList(&head, &(simp1.link)); // act result = DList_IsListEmpty(&head); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_DLIST_06_006: [DListInsertTailList shall place the DLIST_ENTRY at the end of the list defined by the listHead parameter.] */ TEST_FUNCTION(DList_InsertTailList_with_a_list_head_inserts_1st_item_at_the_end_of_the_list) { // arrange DLIST_ENTRY head = { 0 }; DList_InitializeListHead(&head); // act DList_InsertTailList(&head, &(simp1.link)); // assert ASSERT_ARE_EQUAL(void_ptr, head.Flink, &(simp1.link)); ASSERT_ARE_EQUAL(void_ptr, head.Blink, &(simp1.link)); } /* Tests_SRS_DLIST_06_006: [DListInsertTailList shall place the DLIST_ENTRY at the end of the list defined by the listHead parameter.] */ TEST_FUNCTION(DList_InsertTailList_with_a_list_head_inserts_2nd_item_at_the_end_of_the_list) { // arrange DLIST_ENTRY head = { 0 }; DList_InitializeListHead(&head); DList_InsertTailList(&head, &(simp1.link)); // act DList_InsertTailList(&head, &(simp2.link)); // assert ASSERT_ARE_EQUAL(void_ptr, head.Flink, &(simp1.link)); ASSERT_ARE_EQUAL(void_ptr, simp1.link.Flink, &(simp2.link)); ASSERT_ARE_EQUAL(void_ptr, simp2.link.Flink, &head); ASSERT_ARE_EQUAL(void_ptr, head.Blink, &(simp2.link)); ASSERT_ARE_EQUAL(void_ptr, simp1.link.Blink, &head); ASSERT_ARE_EQUAL(void_ptr, simp2.link.Blink, &(simp1.link)); } /* Tests_SRS_DLIST_06_007: [DList_AppendTailList shall place the list defined by ListToAppend at the end of the list defined by the listHead parameter.] */ TEST_FUNCTION(DList_AppendTailList_adds_listToAppend_after_listHead) { // arrange DLIST_ENTRY listHead = { 0 }; PDLIST_ENTRY currentEntry; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp1.link)); DList_InitializeListHead(&simp2.link); DList_InsertTailList(&simp2.link, &simp4.link); DList_InsertTailList(&simp2.link, &simp5.link); // act DList_AppendTailList(&listHead, &simp2.link); // assert // Go forwards ASSERT_ARE_EQUAL(int, 0, DList_IsListEmpty(&listHead)); currentEntry = listHead.Flink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp1.link); ASSERT_ARE_EQUAL(short, (short)1, containingRecord(currentEntry, simpleItem, link)->index); currentEntry = currentEntry->Flink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp2.link); ASSERT_ARE_EQUAL(short, (short)2, containingRecord(currentEntry, simpleItem, link)->index); currentEntry = currentEntry->Flink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp4.link); ASSERT_ARE_EQUAL(short, (short)4, containingRecord(currentEntry, simpleItem, link)->index); currentEntry = currentEntry->Flink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp5.link); ASSERT_ARE_EQUAL(short, (short)5, containingRecord(currentEntry, simpleItem, link)->index); currentEntry = currentEntry->Flink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &listHead); // Now back currentEntry = listHead.Blink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp5.link); ASSERT_ARE_EQUAL(short, (short)5, containingRecord(currentEntry, simpleItem, link)->index); #ifdef _MSC_VER #pragma warning(suppress: 6011) /* test code, should crash if this is truly NULL */ #endif currentEntry = currentEntry->Blink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp4.link); ASSERT_ARE_EQUAL(short, (short)4, containingRecord(currentEntry, simpleItem, link)->index); currentEntry = currentEntry->Blink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp2.link); ASSERT_ARE_EQUAL(short, (short)2, containingRecord(currentEntry, simpleItem, link)->index); currentEntry = currentEntry->Blink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &simp1.link); ASSERT_ARE_EQUAL(short, (short)1, containingRecord(currentEntry, simpleItem, link)->index); currentEntry = currentEntry->Blink; ASSERT_ARE_EQUAL(void_ptr, currentEntry, &listHead); } /* Tests_SRS_DLIST_06_010: [DList_RemoveEntryList shall return non-zero if the remaining list is empty.] */ TEST_FUNCTION(DList_RemoveEntryList_with_head_only_in_list_shall_return_non_zero) { // arrange DLIST_ENTRY listHead = { 0 }; int resultOfRemove; DList_InitializeListHead(&listHead); // act resultOfRemove = DList_RemoveEntryList(&listHead); // assert ASSERT_ARE_NOT_EQUAL(int, 0, resultOfRemove); } /* Tests_SRS_DLIST_06_008: [DList_RemoveEntryList shall remove a listEntry from whatever list it is properly part of.] */ /* Tests_SRS_DLIST_06_010: [DList_RemoveEntryList shall return non-zero if the remaining list is empty.] */ /* Tests_SRS_DLIST_06_009: [The remaining list is properly formed.] */ TEST_FUNCTION(DList_RemoveEntryList_with_one_element_and_removing_that_one_element_shall_return_non_zero) { // arrange DLIST_ENTRY listHead = { 0 }; int resultOfRemove; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp1.link)); // act resultOfRemove = DList_RemoveEntryList(&(simp1.link)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, resultOfRemove); ASSERT_ARE_EQUAL(void_ptr, &listHead, listHead.Blink); ASSERT_ARE_EQUAL(void_ptr, &listHead, listHead.Flink); } /* Tests_SRS_DLIST_06_008: [DList_RemoveEntryList shall remove a listEntry from whatever list it is properly part of.] */ /* Tests_SRS_DLIST_06_010: [DList_RemoveEntryList shall return non-zero if the remaining list is empty.] */ TEST_FUNCTION(DList_RemoveEntryList_with_one_element_and_removing_the_head_shall_return_non_zero) { // arrange DLIST_ENTRY listHead = { 0 }; int resultOfRemove; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp1.link)); // act resultOfRemove = DList_RemoveEntryList(&listHead); // assert ASSERT_ARE_NOT_EQUAL(int, 0, resultOfRemove); ASSERT_ARE_EQUAL(void_ptr, &(simp1.link), simp1.link.Blink); ASSERT_ARE_EQUAL(void_ptr, &(simp1.link), simp1.link.Flink); } /* Tests_SRS_DLIST_06_008: [DList_RemoveEntryList shall remove a listEntry from whatever list it is properly part of.] */ /* Tests_SRS_DLIST_06_009: [The remaining list is properly formed.] */ /* Tests_SRS_DLIST_06_010: [DList_RemoveEntryList shall return non-zero if the remaining list is empty.] */ /* Tests_SRS_DLIST_06_011: [DList_RemoveEntryList shall return zero if the remaining list is NOT empty.] */ TEST_FUNCTION(DList_RemoveEntryList_with_three_elements_and_removing_the_first_return_zero) { // arrange DLIST_ENTRY listHead = { 0 }; int resultOfRemove; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp1.link)); DList_InsertTailList(&listHead, &(simp2.link)); DList_InsertTailList(&listHead, &(simp3.link)); // act resultOfRemove = DList_RemoveEntryList(&(simp1.link)); // assert ASSERT_ARE_EQUAL(int, 0, resultOfRemove); ASSERT_ARE_EQUAL(void_ptr, listHead.Flink, &(simp2.link)); ASSERT_ARE_EQUAL(void_ptr, simp2.link.Flink, &(simp3.link)); ASSERT_ARE_EQUAL(void_ptr, simp3.link.Flink, &listHead); ASSERT_ARE_EQUAL(void_ptr, listHead.Blink, &(simp3.link)); ASSERT_ARE_EQUAL(void_ptr, simp3.link.Blink, &(simp2.link)); ASSERT_ARE_EQUAL(void_ptr, simp2.link.Blink, &(listHead)); } /* Tests_SRS_DLIST_06_008: [DList_RemoveEntryList shall remove a listEntry from whatever list it is properly part of.] */ /* Tests_SRS_DLIST_06_009: [The remaining list is properly formed.] */ /* Tests_SRS_DLIST_06_010: [DList_RemoveEntryList shall return non-zero if the remaining list is empty.] */ /* Tests_SRS_DLIST_06_011: [DList_RemoveEntryList shall return zero if the remaining list is NOT empty.] */ TEST_FUNCTION(DList_RemoveEntryList_with_three_elements_and_removing_the_last_return_zero) { // arrange DLIST_ENTRY listHead = { 0 }; int resultOfRemove; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp1.link)); DList_InsertTailList(&listHead, &(simp2.link)); DList_InsertTailList(&listHead, &(simp3.link)); // act resultOfRemove = DList_RemoveEntryList(&(simp3.link)); // assert ASSERT_ARE_EQUAL(int, 0, resultOfRemove); ASSERT_ARE_EQUAL(void_ptr, listHead.Flink, &(simp1.link)); ASSERT_ARE_EQUAL(void_ptr, simp1.link.Flink, &(simp2.link)); ASSERT_ARE_EQUAL(void_ptr, simp2.link.Flink, &listHead); ASSERT_ARE_EQUAL(void_ptr, listHead.Blink, &(simp2.link)); ASSERT_ARE_EQUAL(void_ptr, simp2.link.Blink, &(simp1.link)); ASSERT_ARE_EQUAL(void_ptr, simp1.link.Blink, &(listHead)); } /* Tests_SRS_DLIST_06_008: [DList_RemoveEntryList shall remove a listEntry from whatever list it is properly part of.] */ /* Tests_SRS_DLIST_06_009: [The remaining list is properly formed.] */ /* Tests_SRS_DLIST_06_010: [DList_RemoveEntryList shall return non-zero if the remaining list is empty.] */ /* Tests_SRS_DLIST_06_011: [DList_RemoveEntryList shall return zero if the remaining list is NOT empty.] */ TEST_FUNCTION(DList_RemoveEntryList_with_three_elements_and_removing_the_middle_return_zero) { // arrange DLIST_ENTRY listHead = { 0 }; int resultOfRemove; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp1.link)); DList_InsertTailList(&listHead, &(simp2.link)); DList_InsertTailList(&listHead, &(simp3.link)); // act resultOfRemove = DList_RemoveEntryList(&(simp2.link)); // assert ASSERT_ARE_EQUAL(int, 0, resultOfRemove); ASSERT_ARE_EQUAL(void_ptr, listHead.Flink, &(simp1.link)); ASSERT_ARE_EQUAL(void_ptr, simp1.link.Flink, &(simp3.link)); ASSERT_ARE_EQUAL(void_ptr, simp3.link.Flink, &listHead); ASSERT_ARE_EQUAL(void_ptr, listHead.Blink, &(simp3.link)); ASSERT_ARE_EQUAL(void_ptr, simp3.link.Blink, &(simp1.link)); ASSERT_ARE_EQUAL(void_ptr, simp1.link.Blink, &(listHead)); } /* Tests_SRS_DLIST_06_013: [DList_RemoveHeadList shall return listHead if that's the only item in the list.] */ TEST_FUNCTION(DList_RemoveHeadList_with_only_head_shall_return_the_head) { // arrange DLIST_ENTRY head = { 0 }; PDLIST_ENTRY returnedEntry; DList_InitializeListHead(&head); // act returnedEntry = DList_RemoveHeadList(&head); // assert ASSERT_ARE_EQUAL(void_ptr, &head, returnedEntry); } /* Tests_SRS_DLIST_06_012: [DList_RemoveHeadList removes the oldest entry from the list defined by the listHead parameter and returns a pointer to that entry.] */ TEST_FUNCTION(DList_RemoveHeadList_with_one_entry_returns_entry) { // arrange DLIST_ENTRY listHead = { 0 }; PDLIST_ENTRY returnedEntry; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp1.link)); // act returnedEntry = DList_RemoveHeadList(&listHead); // assert ASSERT_ARE_NOT_EQUAL(int, 0, DList_IsListEmpty(&listHead)); ASSERT_ARE_EQUAL(void_ptr, &(simp1.link), returnedEntry); } /* Tests_SRS_DLIST_06_012: [DList_RemoveHeadList removes the oldest entry from the list defined by the listHead parameter and returns a pointer to that entry.] */ TEST_FUNCTION(DList_RemoveHeadList_with_two_entries_returns_first_entry) { // arrange DLIST_ENTRY listHead = { 0 }; PDLIST_ENTRY returnedEntry; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &(simp2.link)); DList_InsertTailList(&listHead, &(simp1.link)); // act returnedEntry = DList_RemoveHeadList(&listHead); // assert ASSERT_ARE_EQUAL(int, 0, DList_IsListEmpty(&listHead)); ASSERT_ARE_EQUAL(void_ptr, &(simp2.link), returnedEntry); } /*Tests_SRS_DLIST_02_002: [DList_InsertHeadList inserts a singular entry in the list having as head listHead after "head".]*/ TEST_FUNCTION(DList_InsertHeadList_with_empty_list_succeeds) { ///arrange DLIST_ENTRY listHead; DLIST_ENTRY toBeInserted; DList_InitializeListHead(&listHead); ///act DList_InsertHeadList(&listHead, &toBeInserted); ///assert ASSERT_ARE_EQUAL(void_ptr, listHead.Flink, &toBeInserted); ASSERT_ARE_EQUAL(void_ptr, listHead.Blink, &toBeInserted); ASSERT_ARE_EQUAL(void_ptr, toBeInserted.Flink , &listHead); ASSERT_ARE_EQUAL(void_ptr, toBeInserted.Blink, &listHead); } /*Tests_SRS_DLIST_02_002: [DList_InsertHeadList inserts a singular entry in the list having as head listHead after "head".]*/ TEST_FUNCTION(DList_InsertHeadList_with_1_item_in_list_succeeds) { ///arrange DLIST_ENTRY listHead; DLIST_ENTRY existingInList; DLIST_ENTRY toBeInserted; DList_InitializeListHead(&listHead); DList_InsertTailList(&listHead, &existingInList); /*would be same as insertHead when it is the first item... */ ///act DList_InsertHeadList(&listHead, &toBeInserted); ///assert ASSERT_ARE_EQUAL(void_ptr, listHead.Flink, &toBeInserted); ASSERT_ARE_EQUAL(void_ptr, listHead.Blink, &existingInList); ASSERT_ARE_EQUAL(void_ptr, existingInList.Flink, &listHead); ASSERT_ARE_EQUAL(void_ptr, existingInList.Blink, &toBeInserted); ASSERT_ARE_EQUAL(void_ptr, toBeInserted.Flink, &existingInList); ASSERT_ARE_EQUAL(void_ptr, toBeInserted.Blink, &listHead); } END_TEST_SUITE(doublylinkedlist_unittests) main.c000066400000000000000000000005111362133436400355750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/doublylinkedlist_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(doublylinkedlist_unittests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_ut/000077500000000000000000000000001362133436400326115ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007601362133436400352750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName gballoc_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files gballoc_undertest.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) gballoc_undertest.c000066400000000000000000000007761362133436400364100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #define malloc mock_malloc #define calloc mock_calloc #define realloc mock_realloc #define free mock_free extern void* mock_malloc(size_t size); extern void* mock_calloc(size_t nmemb, size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #undef _CRTDBG_MAP_ALLOC #include "../src/gballoc.c" gballoc_ut.c000066400000000000000000001630551362133436400350230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #if defined(GB_MEASURE_MEMORY_FOR_THIS) #undef GB_MEASURE_MEMORY_FOR_THIS #endif #ifdef __cplusplus #include #else #include #endif #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/gballoc.h" #include "testrunnerswitcher.h" #include "azure_c_shared_utility/lock.h" #ifndef SIZE_MAX #define SIZE_MAX ((size_t)~(size_t)0) #endif static TEST_MUTEX_HANDLE g_testByTest; static void* TEST_ALLOC_PTR1 = (void*)0x4242; static void* TEST_ALLOC_PTR2 = (void*)0x4243; static void* TEST_REALLOC_PTR = (void*)0x4245; #define OVERHEAD_SIZE 4096 static const LOCK_HANDLE TEST_LOCK_HANDLE = (LOCK_HANDLE)0x4244; #define ENABLE_MOCKS #include "umock_c.h" #include "umock_c_prod.h" IMPLEMENT_UMOCK_C_ENUM_TYPE(LOCK_RESULT, LOCK_RESULT_VALUES); #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, void*, mock_malloc, size_t, size); MOCKABLE_FUNCTION(, void*, mock_calloc, size_t, nmemb, size_t, size); MOCKABLE_FUNCTION(, void*, mock_realloc, void*, ptr, size_t, size); MOCKABLE_FUNCTION(, void, mock_free, void*, ptr); MOCKABLE_FUNCTION(, LOCK_HANDLE, Lock_Init); MOCKABLE_FUNCTION(, LOCK_RESULT, Lock_Deinit, LOCK_HANDLE, handle); MOCKABLE_FUNCTION(, LOCK_RESULT, Lock, LOCK_HANDLE, handle); MOCKABLE_FUNCTION(, LOCK_RESULT, Unlock, LOCK_HANDLE, handle); #ifdef __cplusplus } #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(GBAlloc_UnitTests) TEST_SUITE_INITIALIZE(TestClassInitialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); result = umock_c_init(on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(LOCK_HANDLE, void*); REGISTER_TYPE(LOCK_RESULT, LOCK_RESULT); REGISTER_GLOBAL_MOCK_RETURN(mock_malloc, TEST_ALLOC_PTR1); REGISTER_GLOBAL_MOCK_RETURN(mock_realloc, TEST_ALLOC_PTR1); REGISTER_GLOBAL_MOCK_RETURN(mock_calloc, TEST_ALLOC_PTR1); REGISTER_GLOBAL_MOCK_RETURN(Lock_Init, TEST_LOCK_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(Lock, LOCK_OK); REGISTER_GLOBAL_MOCK_RETURN(Unlock, LOCK_OK); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { gballoc_deinit(); TEST_MUTEX_RELEASE(g_testByTest); } /* gballoc_init */ /* Tests_SRS_GBALLOC_01_002: [Upon initialization the total memory used and maximum total memory used tracked by the module shall be set to 0.] */ TEST_FUNCTION(gballoc_init_resets_memory_used) { //arrange void* allocation; gballoc_init(); allocation = malloc(OVERHEAD_SIZE); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); gballoc_free(gballoc_malloc(1)); gballoc_deinit(); // act gballoc_init(); // assert ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getCurrentMemoryUsed()); ///cleanup free(allocation); } /* Tests_SRS_GBALLOC_01_024: [gballoc_init shall initialize the gballoc module and return 0 upon success.] */ /* Tests_SRS_GBALLOC_01_026: [gballoc_Init shall create a lock handle that will be used to make the other gballoc APIs thread-safe.] */ TEST_FUNCTION(when_gballoc_init_calls_lock_init_and_it_succeeds_then_gballoc_init_succeeds) { // arrange int result; STRICT_EXPECTED_CALL(Lock_Init()); // act result = gballoc_init(); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_027: [If the Lock creation fails, gballoc_init shall return a non-zero value.] */ TEST_FUNCTION(when_lock_init_fails_gballoc_init_fails) { // arrange int result; STRICT_EXPECTED_CALL(Lock_Init()) .SetReturn((LOCK_HANDLE)NULL); // act result = gballoc_init(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_025: [Init after Init shall fail and return a non-zero value.] */ TEST_FUNCTION(gballoc_init_after_gballoc_init_fails) { // arrange int result; STRICT_EXPECTED_CALL(Lock_Init()); gballoc_init(); //act result = gballoc_init(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_deinit */ /* Tests_SRS_GBALLOC_01_028: [gballoc_deinit shall free all resources allocated by gballoc_init.] */ TEST_FUNCTION(gballoc_deinit_frees_the_lock_when_the_module_was_initialized) { // arrange gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock_Deinit(TEST_LOCK_HANDLE)); // act gballoc_deinit(); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_029: [if gballoc is not initialized gballoc_deinit shall do nothing.] */ TEST_FUNCTION(gballoc_deinit_after_gballoc_deinit_doesnot_free_lock) { //arrange // act gballoc_deinit(); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_malloc */ /* Tests_SRS_GBALLOC_01_048: [If acquiring the lock fails, gballoc_malloc shall return NULL.] */ TEST_FUNCTION(when_acquiring_the_lock_fails_gballoc_malloc_fails) { // arrange void* result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act result = gballoc_malloc(1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_003: [gballoc_malloc shall call the C99 malloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_004: [If the underlying malloc call is successful, gballoc_malloc shall increment the total memory used with the amount indicated by size.] */ /* Tests_SRS_GBALLOC_01_030: [gballoc_malloc shall ensure thread safety by using the lock created by gballoc_Init.] */ TEST_FUNCTION(gballoc_malloc_with_0_Size_Calls_Underlying_malloc) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_malloc(0)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_malloc(0); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_003: [gballoc_malloc shall call the C99 malloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_004: [If the underlying malloc call is successful, gballoc_malloc shall increment the total memory used with the amount indicated by size.] */ TEST_FUNCTION(gballoc_malloc_with_1_Size_Calls_Underlying_malloc_And_Increases_Max_Used) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_malloc(1); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 1, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_012: [When the underlying malloc call fails, gballoc_malloc shall return NULL and size should not be counted towards total memory used.] */ TEST_FUNCTION(When_malloc_Fails_Then_gballoc_malloc_fails_too) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_malloc(1)) .SetReturn((void*)NULL); STRICT_EXPECTED_CALL(mock_free(allocation)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_malloc(1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup free(allocation); } /* Tests_SRS_GBALLOC_01_013: [When gballoc_malloc fails allocating memory for its internal use, gballoc_malloc shall return NULL.] */ TEST_FUNCTION(When_allocating_memory_for_tracking_information_fails_Then_gballoc_malloc_fails_too) { // arrange void* result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn((void*)NULL); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_malloc(1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); } /* Tests_SRS_GBALLOC_01_039: [If gballoc was not initialized gballoc_malloc shall simply call malloc without any memory tracking being performed.] */ TEST_FUNCTION(gballoc_malloc_after_deinit_calls_crt_malloc) { // arrange void* result; STRICT_EXPECTED_CALL(mock_malloc(1)); //act result = gballoc_malloc(1); //assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_calloc */ /* Tests_SRS_GBALLOC_01_046: [If acquiring the lock fails, gballoc_calloc shall return NULL.] */ TEST_FUNCTION(when_acquiring_the_lock_fails_gballoc_calloc_fails) { // arrange void* result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act result = gballoc_calloc(1,1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_020: [gballoc_calloc shall call the C99 calloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_021: [If the underlying calloc call is successful, gballoc_calloc shall increment the total memory used with nmemb*size.] */ /* Tests_SRS_GBALLOC_01_031: [gballoc_calloc shall ensure thread safety by using the lock created by gballoc_Init] */ TEST_FUNCTION(gballoc_calloc_with_0_Size_And_ItemCount_Calls_Underlying_calloc) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_calloc(0, 0)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_calloc(0, 0); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_020: [gballoc_calloc shall call the C99 calloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_021: [If the underlying calloc call is successful, gballoc_calloc shall increment the total memory used with nmemb*size.] */ TEST_FUNCTION(gballoc_calloc_with_1_Item_Of_1_Size_Calls_Underlying_malloc_And_Increases_Max_Used) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_calloc(1, 1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_calloc(1, 1); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 1, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_020: [gballoc_calloc shall call the C99 calloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_021: [If the underlying calloc call is successful, gballoc_calloc shall increment the total memory used with nmemb*size.] */ TEST_FUNCTION(gballoc_calloc_with_1_Item_Of_0_Size_Calls_Underlying_malloc_And_Does_Not_Increase_Max_Used) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_calloc(1, 0)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_calloc(1, 0); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_020: [gballoc_calloc shall call the C99 calloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_021: [If the underlying calloc call is successful, gballoc_calloc shall increment the total memory used with nmemb*size.] */ TEST_FUNCTION(gballoc_calloc_with_0_Items_Of_1_Size_Calls_Underlying_malloc_And_Does_Not_Increase_Max_Used) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_calloc(0, 1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_calloc(0, 1); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_020: [gballoc_calloc shall call the C99 calloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_021: [If the underlying calloc call is successful, gballoc_calloc shall increment the total memory used with nmemb*size.] */ TEST_FUNCTION(gballoc_calloc_with_42_Items_Of_2_Size_Calls_Underlying_malloc_And_Increases_Max_Size) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_calloc(42, 2)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_calloc(42, 2); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 84, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_022: [When the underlying calloc call fails, gballoc_calloc shall return NULL and size should not be counted towards total memory used.] */ TEST_FUNCTION(When_calloc_Fails_Then_gballoc_calloc_fails_too) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_calloc(1, 1)) .SetReturn((void*)NULL); STRICT_EXPECTED_CALL(mock_free(allocation)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_calloc(1, 1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup free(allocation); } /* Tests_SRS_GBALLOC_01_023: [When gballoc_calloc fails allocating memory for its internal use, gballoc_calloc shall return NULL.] */ TEST_FUNCTION(When_allocating_memory_for_tracking_information_fails_Then_gballoc_calloc_fails_too) { // arrange void* result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn((void*)NULL); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_calloc(1, 1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); } /* Tests_SRS_GBALLOC_01_040: [If gballoc was not initialized gballoc_calloc shall simply call calloc without any memory tracking being performed.] */ TEST_FUNCTION(gballoc_calloc_after_deinit_calls_crt_calloc) { // arrange void* result; STRICT_EXPECTED_CALL(mock_calloc(1, 1)); // act result = gballoc_calloc(1, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(result); } /* gballoc_realloc */ /* Tests_SRS_GBALLOC_01_047: [If acquiring the lock fails, gballoc_realloc shall return NULL.]*/ TEST_FUNCTION(when_acquiring_the_lock_fails_gballoc_realloc_fails) { // arrange void* result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act result = gballoc_realloc(NULL, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_GBALLOC_01_041: [If gballoc was not initialized gballoc_realloc shall shall simply call realloc without any memory tracking being performed.] */ TEST_FUNCTION(gballoc_realloc_after_deinit_fails) { // arrange void* result; STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); // act result = gballoc_realloc(NULL, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(result); } /* Tests_SRS_GBALLOC_01_005: [gballoc_realloc shall call the C99 realloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_017: [When ptr is NULL, gballoc_realloc shall call the underlying realloc with ptr being NULL and the realloc result shall be tracked by gballoc.] */ /* Tests_SRS_GBALLOC_01_032: [gballoc_realloc shall ensure thread safety by using the lock created by gballoc_Init.] */ TEST_FUNCTION(gballoc_realloc_with_NULL_Arg_And_0_Size_Calls_Underlying_realloc) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 0)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_realloc(NULL, 0); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_005: [gballoc_realloc shall call the C99 realloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_017: [When ptr is NULL, gballoc_realloc shall call the underlying realloc with ptr being NULL and the realloc result shall be tracked by gballoc.] */ TEST_FUNCTION(gballoc_realloc_with_NULL_Arg_And_1_Size_Calls_Underlying_realloc) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_realloc(NULL, 1); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 1, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_005: [gballoc_realloc shall call the C99 realloc function and return its result.] */ /* Tests_SRS_GBALLOC_01_006: [If the underlying realloc call is successful, gballoc_realloc shall look up the size associated with the pointer ptr and decrease the total memory used with that size.] */ TEST_FUNCTION(gballoc_realloc_with_Previous_1_Byte_Block_Ptr_And_2_Size_Calls_Underlying_realloc_And_Increases_Max_Used_Memory) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(mock_realloc(TEST_ALLOC_PTR1, 2)) .SetReturn(TEST_ALLOC_PTR2); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); result = gballoc_realloc(NULL, 1); // act result = gballoc_realloc(result, 2); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_ALLOC_PTR2, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 2, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result); free(allocation); } /* Tests_SRS_GBALLOC_01_014: [When the underlying realloc call fails, gballoc_realloc shall return NULL and no change should be made to the counted total memory usage.] */ TEST_FUNCTION(When_realloc_fails_then_gballoc_realloc_Fails_Too_And_No_Change_Is_Made_To_Memory_Counters) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(mock_realloc(TEST_ALLOC_PTR1, 2)) .SetReturn((void*)NULL); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); result = gballoc_realloc(NULL, 1); // act result = gballoc_realloc(result, 2); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 1, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(TEST_ALLOC_PTR1); free(allocation); } /* Tests_SRS_GBALLOC_01_015: [When allocating memory used for tracking by gballoc_realloc fails, gballoc_realloc shall return NULL and no change should be made to the counted total memory usage.] */ TEST_FUNCTION(When_Allocating_Memory_For_tracking_fails_gballoc_realloc_fails) { // arrange void* result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn((void*)NULL); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_realloc(NULL, 1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); } /* Tests_SRS_GBALLOC_01_016: [When the ptr pointer cannot be found in the pointers tracked by gballoc, gballoc_realloc shall return NULL and the underlying realloc shall not be called.] */ TEST_FUNCTION(When_The_Pointer_Is_Not_Tracked_gballoc_realloc_Returns_NULL) { // arrange void* result1; void* result2; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); result1 = gballoc_realloc(NULL, 1); // act result2 = gballoc_realloc(TEST_REALLOC_PTR, 2); // assert ASSERT_IS_NULL(result2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 1, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(result1); free(allocation); } /* Tests_SRS_GBALLOC_01_014: [When the underlying realloc call fails, gballoc_realloc shall return NULL and no change should be made to the counted total memory usage.] */ TEST_FUNCTION(When_ptr_is_null_and_the_underlying_realloc_fails_then_the_memory_used_for_tracking_is_freed) { // arrange void* result; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)) .SetReturn((void*)NULL); STRICT_EXPECTED_CALL(mock_free(allocation)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_realloc(NULL, 1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, gballoc_getMaximumMemoryUsed()); // cleanup free(allocation); } /* gballoc_free */ /* Tests_SRS_GBALLOC_01_042: [If gballoc was not initialized gballoc_free shall shall simply call free.] */ TEST_FUNCTION(gballoc_free_after_deinit_calls_crt_free) { // arrange STRICT_EXPECTED_CALL(mock_free((void*)0x4242)); // act gballoc_free((void*)0x4242); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_049: [If acquiring the lock fails, gballoc_free shall do nothing.] */ TEST_FUNCTION(when_acquiring_the_lock_fails_then_gballoc_free_does_nothing) { // arrange void* block; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); block = gballoc_realloc(NULL, 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act gballoc_free(block); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup gballoc_free(block); free(allocation); } /* Tests_SRS_GBALLOC_01_008: [gballoc_free shall call the C99 free function.] */ /* Tests_SRS_GBALLOC_01_009: [gballoc_free shall also look up the size associated with the ptr pointer and decrease the total memory used with the associated size amount.] */ /* Tests_SRS_GBALLOC_01_010: [gballoc_getMaximumMemoryUsed shall return the maximum amount of total memory used recorded since the module initialization.] */ /* Tests_SRS_GBALLOC_01_011: [The maximum total memory used shall be the maximum of the total memory used at any point.] */ /* Tests_SRS_GBALLOC_01_033: [gballoc_free shall ensure thread safety by using the lock created by gballoc_Init.] */ TEST_FUNCTION(gballoc_free_calls_the_underlying_free) { // arrange void* block; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); /* This is the call to the underlying malloc with the size we want to allocate */ STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); block = gballoc_realloc(NULL, 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(mock_free(TEST_ALLOC_PTR1)); STRICT_EXPECTED_CALL(mock_free(allocation)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act gballoc_free(block); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 1, gballoc_getMaximumMemoryUsed()); // cleanup free(allocation); } /* Tests_SRS_GBALLOC_01_008: [gballoc_free shall call the C99 free function.] */ /* Tests_SRS_GBALLOC_01_009: [gballoc_free shall also look up the size associated with the ptr pointer and decrease the total memory used with the associated size amount.] */ /* Tests_SRS_GBALLOC_01_010: [gballoc_getMaximumMemoryUsed shall return the maximum amount of total memory used recorded since the module initialization.] */ /* Tests_SRS_GBALLOC_01_010: [gballoc_getMaximumMemoryUsed shall return the maximum amount of total memory used recorded since the module initialization.] */ /* Tests_SRS_GBALLOC_01_011: [The maximum total memory used shall be the maximum of the total memory used at any point.] */ TEST_FUNCTION(gballoc_malloc_free_2_times_with_1_byte_yields_1_byte_as_max) { // arrange void* block; void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); block = gballoc_realloc(NULL, 1); gballoc_free(block); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); block = gballoc_realloc(NULL, 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(mock_free(TEST_ALLOC_PTR1)); STRICT_EXPECTED_CALL(mock_free(allocation)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act gballoc_free(block); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 1, gballoc_getMaximumMemoryUsed()); // cleanup free(allocation); } /* Tests_SRS_GBALLOC_01_019:[When the ptr pointer cannot be found in the pointers tracked by gballoc, gballoc_free shall not free any memory.] */ TEST_FUNCTION(gballoc_free_with_an_untracked_pointer_does_not_alter_total_memory_used) { // arrange void* allocation; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); /* don't quite like this, but I'm unsure I want to invest more in this memory counting */ STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); gballoc_realloc(NULL, 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act gballoc_free(TEST_REALLOC_PTR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); gballoc_realloc(TEST_ALLOC_PTR1, 2); ASSERT_ARE_EQUAL(size_t, 2, gballoc_getMaximumMemoryUsed()); // cleanup gballoc_free(TEST_ALLOC_PTR1); free(allocation); } /* gballoc_getMaximumMemoryUsed */ /* Tests_SRS_GBALLOC_01_034: [gballoc_getMaximumMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init.] */ TEST_FUNCTION(when_gballoc_getMaximumMemoryUsed_called_It_Shall_Lock_And_Unlock) { // arrange gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act (void)gballoc_getMaximumMemoryUsed(); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_050: [If the lock cannot be acquired, gballoc_getMaximumMemoryUsed shall return SIZE_MAX.] */ TEST_FUNCTION(when_acquiring_the_lock_fails_then_gballoc_getMaximumMemoryUsed_fails) { // arrange size_t result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act result = gballoc_getMaximumMemoryUsed(); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, SIZE_MAX, result); } /* Tests_SRS_GBALLOC_01_038: [If gballoc was not initialized gballoc_getMaximumMemoryUsed shall return MAX_INT_SIZE.] */ TEST_FUNCTION(gballoc_getMaximumMemoryUsed_after_deinit_fails) { // arrange // act size_t result = gballoc_getMaximumMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, SIZE_MAX, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_getCurrentMemoryUsed */ /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_returns_1) { // arrange void* allocation; void* toBeFreed; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(mock_malloc(1)); toBeFreed = gballoc_malloc(1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed); free(allocation); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_2x3_byte_calloc_returns_6) { // arrange void* allocation; void* toBeFreed; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); toBeFreed = gballoc_calloc(2, 3); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 6, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed); free(allocation); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_and_3_bytes_realloc_returns_3) { // arrange void* allocation; void* toBeFreed; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed = gballoc_malloc(1); toBeFreed = gballoc_realloc(toBeFreed, 3); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 3, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed); free(allocation); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_and_free_returns_0) { // arrange void* allocation; void* toBeFreed; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed = gballoc_malloc(1); gballoc_free(toBeFreed); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup free(allocation); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_2x3_byte_calloc_and_free_returns_0) { // arrange void* allocation; void* toBeFreed; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed = gballoc_calloc(2, 3); gballoc_free(toBeFreed); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup free(allocation); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_realloc_and_free_returns_0) { // arrange void* allocation; void* toBeFreed; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed = gballoc_malloc(1); toBeFreed = gballoc_realloc(toBeFreed, 3); gballoc_free(toBeFreed); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup free(allocation); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_and_1_byte_malloc_returns_2) { // arrange void* allocation1; void* allocation2; void* toBeFreed1; void* toBeFreed2; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation1 = malloc(OVERHEAD_SIZE); allocation2 = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation1); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation2); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed1 = gballoc_malloc(1); toBeFreed2 = gballoc_malloc(1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 2, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed1); gballoc_free(toBeFreed2); free(allocation1); free(allocation2); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_and_1_byte_malloc_and_3_realloc_returns_4) { // arrange void* allocation1; void* allocation2; void* toBeFreed1; void* toBeFreed2; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation1 = malloc(OVERHEAD_SIZE); allocation2 = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation1); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation2); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed1 = gballoc_malloc(1); toBeFreed2 = gballoc_malloc(1); toBeFreed2 = gballoc_realloc(toBeFreed2, 3); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 4, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed1); gballoc_free(toBeFreed2); free(allocation1); free(allocation2); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_and_6_byte_calloc_returns_7) { // arrange void* allocation1; void* allocation2; void* toBeFreed1; void* toBeFreed2; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation1 = malloc(OVERHEAD_SIZE); allocation2 = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation1); STRICT_EXPECTED_CALL(mock_malloc(1)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation2); STRICT_EXPECTED_CALL(mock_calloc(2, 3)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed1 = gballoc_malloc(1); toBeFreed2 = gballoc_calloc(2, 3); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 7, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed1); gballoc_free(toBeFreed2); free(allocation1); free(allocation2); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_and_6_byte_calloc_and_free_returns_6) { // arrange void* allocation1; void* allocation2; void* toBeFreed1; void* toBeFreed2; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation1 = malloc(OVERHEAD_SIZE); allocation2 = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation1); STRICT_EXPECTED_CALL(mock_malloc(1)) .SetReturn((char*)allocation1 + OVERHEAD_SIZE / 2); /*somewhere in the middle of allocation*/ STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation2); STRICT_EXPECTED_CALL(mock_calloc(2, 3)) .SetReturn((char*)allocation2 + OVERHEAD_SIZE / 2); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed1 = gballoc_malloc(1); toBeFreed2 = gballoc_calloc(2, 3); gballoc_free(toBeFreed1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 6, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed2); free(allocation1); free(allocation2); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /*Tests_SRS_GBALLOC_02_001: [gballoc_getCurrentMemoryUsed shall return the currently used memory size.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_1_byte_malloc_and_1_byte_malloc_and_3_realloc_and_free_returns_3) { // arrange void* allocation1; void* allocation2; void* toBeFreed1; void* toBeFreed2; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation1 = malloc(OVERHEAD_SIZE); allocation2 = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation1); STRICT_EXPECTED_CALL(mock_malloc(1)) .SetReturn((char*)allocation1 + OVERHEAD_SIZE / 2); /*somewhere in the middle of allocation*/ STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation2); STRICT_EXPECTED_CALL(mock_realloc(IGNORED_PTR_ARG, 3)) .IgnoreArgument(1) .SetReturn((char*)allocation2 + OVERHEAD_SIZE / 2); /*somewhere in the middle of allocation*/ STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); toBeFreed1 = gballoc_malloc(1); toBeFreed2 = gballoc_malloc(1); toBeFreed2 = gballoc_realloc(toBeFreed2, 3); gballoc_free(toBeFreed1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 3, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup gballoc_free(toBeFreed2); free(allocation1); free(allocation2); umock_c_reset_all_calls(); //this is just for mathematics, not for functionality } /* Tests_SRS_GBALLOC_01_036: [gballoc_getCurrentMemoryUsed shall ensure thread safety by using the lock created by gballoc_Init.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_locks_and_unlocks) { // assert size_t result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_044: [If gballoc was not initialized gballoc_getCurrentMemoryUsed shall return SIZE_MAX.] */ TEST_FUNCTION(gballoc_getCurrentMemoryUsed_after_deinit_fails) { // arrange // act size_t result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, SIZE_MAX, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_01_051: [If the lock cannot be acquired, gballoc_getCurrentMemoryUsed shall return SIZE_MAX.] */ TEST_FUNCTION(when_acquiring_the_lock_fails_gballoc_getCurrentMemoryUsed_fails) { // arrange size_t result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, SIZE_MAX, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_07_001: [ If gballoc was not initialized gballoc_getAllocationCount shall return SIZE_MAX. ] */ TEST_FUNCTION(gballoc_getAllocationCount_without_init_fail) { // arrange size_t result; // act result = gballoc_getAllocationCount(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_07_003: [ If the lock cannot be acquired, gballoc_getAllocationCount shall return SIZE_MAX. ] */ TEST_FUNCTION(gballoc_getAllocationCount_lock_fail) { // arrange size_t result; gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act result = gballoc_getAllocationCount(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_07_004: [ gballoc_getAllocationCount shall return the currently number of allocations. ] */ /* Tests_SRS_GBALLOC_07_002: [ gballoc_getAllocationCount shall ensure thread safety by using the lock created by gballoc_Init ] */ TEST_FUNCTION(gballoc_getAllocationCount_success) { // arrange void* allocation; void* toBeFreed; size_t result; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(mock_malloc(1)); toBeFreed = gballoc_malloc(1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act result = gballoc_getAllocationCount(); // assert ASSERT_ARE_EQUAL(size_t, 1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Cleanup gballoc_free(toBeFreed); free(allocation); } TEST_FUNCTION(gballoc_resetMetrics_without_init_fail) { // arrange // act gballoc_resetMetrics(); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_07_003: [ If the lock cannot be acquired, gballoc_getAllocationCount shall return SIZE_MAX. ] */ TEST_FUNCTION(gballoc_resetMetrics_lock_fail) { // arrange gballoc_init(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)) .SetReturn(LOCK_ERROR); // act gballoc_resetMetrics(); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_GBALLOC_07_004: [ gballoc_getAllocationCount shall return the currently number of allocations. ] */ /* Tests_SRS_GBALLOC_07_002: [ gballoc_getAllocationCount shall ensure thread safety by using the lock created by gballoc_Init ] */ TEST_FUNCTION(gballoc_resetMetrics_success) { // arrange void* allocation; void* toBeFreed; size_t mem_used; size_t alloc_count; gballoc_init(); umock_c_reset_all_calls(); allocation = malloc(OVERHEAD_SIZE); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); EXPECTED_CALL(mock_malloc(0)) .SetReturn(allocation); STRICT_EXPECTED_CALL(mock_malloc(1)); toBeFreed = gballoc_malloc(1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); alloc_count = gballoc_getAllocationCount(); ASSERT_ARE_EQUAL(size_t, 1, alloc_count); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Lock(TEST_LOCK_HANDLE)); STRICT_EXPECTED_CALL(Unlock(TEST_LOCK_HANDLE)); // act gballoc_resetMetrics(); mem_used = gballoc_getCurrentMemoryUsed(); alloc_count = gballoc_getAllocationCount(); // assert ASSERT_ARE_EQUAL(size_t, 0, mem_used); ASSERT_ARE_EQUAL(size_t, 0, alloc_count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Cleanup gballoc_free(toBeFreed); free(allocation); } END_TEST_SUITE(GBAlloc_UnitTests) main.c000066400000000000000000000005001362133436400336150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(GBAlloc_UnitTests, failedTestCount); return failedTestCount; } gballoc_without_init_ut/000077500000000000000000000000001362133436400353405ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000007751362133436400401110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_without_init_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName gballoc_without_init_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files gballoc_undertest.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) gballoc_undertest.c000066400000000000000000000007761362133436400412160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_without_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #define malloc mock_malloc #define calloc mock_calloc #define realloc mock_realloc #define free mock_free extern void* mock_malloc(size_t size); extern void* mock_calloc(size_t nmemb, size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #undef _CRTDBG_MAP_ALLOC #include "../src/gballoc.c" gballoc_without_init_ut.c000066400000000000000000000140501362133436400424250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_without_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #if defined(GB_MEASURE_MEMORY_FOR_THIS) #undef GB_MEASURE_MEMORY_FOR_THIS #endif #ifdef __cplusplus #include #else #include #endif #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/gballoc.h" #include "testrunnerswitcher.h" #include "azure_c_shared_utility/lock.h" #ifndef SIZE_MAX #define SIZE_MAX ((size_t)~(size_t)0) #endif static TEST_MUTEX_HANDLE g_testByTest; static void* TEST_ALLOC_PTR1 = (void*)0x4242; static const LOCK_HANDLE TEST_LOCK_HANDLE = (LOCK_HANDLE)0x4244; #define ENABLE_MOCKS #include "umock_c.h" #include "umock_c_prod.h" //TEST_DEFINE_ENUM_TYPE(LOCK_RESULT, LOCK_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(LOCK_RESULT, LOCK_RESULT_VALUES); #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, void*, mock_malloc, size_t, size); MOCKABLE_FUNCTION(, void*, mock_calloc, size_t, nmemb, size_t, size); MOCKABLE_FUNCTION(, void*, mock_realloc, void*, ptr, size_t, size); MOCKABLE_FUNCTION(, void, mock_free, void*, ptr); MOCKABLE_FUNCTION(, LOCK_HANDLE, Lock_Init); MOCKABLE_FUNCTION(, LOCK_RESULT, Lock_Deinit, LOCK_HANDLE, handle); MOCKABLE_FUNCTION(, LOCK_RESULT, Lock, LOCK_HANDLE, handle); MOCKABLE_FUNCTION(, LOCK_RESULT, Unlock, LOCK_HANDLE, handle); #ifdef __cplusplus } #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(GBAlloc_For_Init_UnitTests) TEST_SUITE_INITIALIZE(TestClassInitialize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(LOCK_HANDLE, void*); REGISTER_TYPE(LOCK_RESULT, LOCK_RESULT); REGISTER_GLOBAL_MOCK_RETURN(mock_malloc, TEST_ALLOC_PTR1); REGISTER_GLOBAL_MOCK_RETURN(mock_realloc, TEST_ALLOC_PTR1); REGISTER_GLOBAL_MOCK_RETURN(mock_calloc, TEST_ALLOC_PTR1); REGISTER_GLOBAL_MOCK_RETURN(Lock_Init, TEST_LOCK_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(Lock, LOCK_OK); REGISTER_GLOBAL_MOCK_RETURN(Unlock, LOCK_OK); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* gballoc_deinit */ /* Tests_SRS_GBALLOC_01_029: [if gballoc is not initialized gballoc_deinit shall do nothing.] */ TEST_FUNCTION(when_gballoc_is_not_initialized_gballoc_deinit_doesnot_free_lock) { //arrange // act gballoc_deinit(); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_malloc */ /* Tests_SRS_GBALLOC_01_039: [If gballoc was not initialized gballoc_malloc shall simply call malloc without any memory tracking being performed.] */ TEST_FUNCTION(when_gballoc_is_not_initialized_gballoc_malloc_calls_crt_malloc) { // arrange void* result; STRICT_EXPECTED_CALL(mock_malloc(1)); //act result = gballoc_malloc(1); //assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_calloc */ /* Tests_SRS_GBALLOC_01_040: [If gballoc was not initialized gballoc_calloc shall simply call calloc without any memory tracking being performed.] */ TEST_FUNCTION(when_gballoc_is_not_initialized_then_gballoc_calloc_calls_crt_calloc) { // arrange void* result; STRICT_EXPECTED_CALL(mock_calloc(1, 1)); // act result = gballoc_calloc(1, 1); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_realloc */ /* Tests_SRS_GBALLOC_01_041: [If gballoc was not initialized gballoc_realloc shall shall simply call realloc without any memory tracking being performed.] */ TEST_FUNCTION(when_gballoc_is_not_initialized_then_gballoc_realloc_calls_crt_realloc) { // arrange void* result; STRICT_EXPECTED_CALL(mock_realloc(NULL, 1)); // act result = gballoc_realloc(NULL, 1); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_free */ /* Tests_SRS_GBALLOC_01_042: [If gballoc was not initialized gballoc_free shall shall simply call free.] */ TEST_FUNCTION(when_gballoc_is_not_initialized_then_gballoc_free_does_nothing) { // arrange STRICT_EXPECTED_CALL(mock_free((void*)0x4242)); // act gballoc_free((void*)0x4242); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_getMaximumMemoryUsed */ /* Tests_SRS_GBALLOC_01_038: [If gballoc was not initialized gballoc_getMaximumMemoryUsed shall return MAX_INT_SIZE.] */ TEST_FUNCTION(without_gballoc_being_initialized_gballoc_getMaximumMemoryUsed_fails) { // arrange // act size_t result = gballoc_getMaximumMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, SIZE_MAX, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* gballoc_getCurrentMemoryUsed */ /* Tests_SRS_GBALLOC_01_044: [If gballoc was not initialized gballoc_getCurrentMemoryUsed shall return SIZE_MAX.] */ TEST_FUNCTION(without_gballoc_being_initialized_gballoc_getCurrentMemoryUsed_fails) { // arrange // act size_t result = gballoc_getCurrentMemoryUsed(); // assert ASSERT_ARE_EQUAL(size_t, SIZE_MAX, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } END_TEST_SUITE(GBAlloc_For_Init_UnitTests) main.c000066400000000000000000000005111362133436400364250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/gballoc_without_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(GBAlloc_For_Init_UnitTests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/hmacsha256_ut/000077500000000000000000000000001362133436400330475ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000011461362133436400355320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/hmacsha256_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName hmacsha256_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/hmacsha256.c ../../src/hmac.c ../../src/usha.c ../../src/sha1.c ../../src/sha224.c ../../src/sha384-512.c ../../src/buffer.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) hmacsha256_ut.c000066400000000000000000000107411362133436400355100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/hmacsha256_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" void* real_malloc(size_t size) { return malloc(size); } void* real_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void real_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/strings.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/hmacsha256.h" static TEST_MUTEX_HANDLE g_testByTest; TEST_DEFINE_ENUM_TYPE(HMACSHA256_RESULT, HMACSHA256_RESULT_VALUES); static BUFFER_HANDLE hash; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(HMACSHA256_UnitTests) TEST_SUITE_INITIALIZE(TestClassInitialize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, real_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, real_free); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, real_realloc); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); hash = BUFFER_new(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { BUFFER_delete(hash); TEST_MUTEX_RELEASE(g_testByTest); } /* HMACSHA256_ComputeHash */ TEST_FUNCTION(HMACSHA256_ComputeHash_With_NULL_Key_Fails) { // arrange static const unsigned char key[] = "key"; static const unsigned char buffer[] = "testPayload"; // act HMACSHA256_RESULT result = HMACSHA256_ComputeHash(NULL, sizeof(key) - 1, buffer, sizeof(buffer) - 1, hash); // assert ASSERT_ARE_EQUAL(HMACSHA256_RESULT, HMACSHA256_INVALID_ARG, result); } TEST_FUNCTION(HMACSHA256_ComputeHash_With_Zero_Key_Buffer_Size_Fails) { // arrange static const unsigned char key[] = "key"; static const unsigned char buffer[] = "testPayload"; // act HMACSHA256_RESULT result = HMACSHA256_ComputeHash(key, 0, buffer, sizeof(buffer) - 1, hash); // assert ASSERT_ARE_EQUAL(HMACSHA256_RESULT, HMACSHA256_INVALID_ARG, result); } TEST_FUNCTION(HMACSHA256_ComputeHash_With_NULL_Payload_Fails) { // arrange static const unsigned char key[] = "key"; static const unsigned char buffer[] = "testPayload"; // act HMACSHA256_RESULT result = HMACSHA256_ComputeHash(key, sizeof(key) - 1, NULL, sizeof(buffer) - 1, hash); // assert ASSERT_ARE_EQUAL(HMACSHA256_RESULT, HMACSHA256_INVALID_ARG, result); } TEST_FUNCTION(HMACSHA256_ComputeHash_With_Zero_Payload_Buffer_Size_Fails) { // arrange static const unsigned char key[] = "key"; static const unsigned char buffer[] = "testPayload"; // act HMACSHA256_RESULT result = HMACSHA256_ComputeHash(key, sizeof(key) - 1, buffer, 0, hash); // assert ASSERT_ARE_EQUAL(HMACSHA256_RESULT, HMACSHA256_INVALID_ARG, result); } TEST_FUNCTION(HMACSHA256_ComputeHash_With_NULL_Hash_Fails) { // arrange static const unsigned char key[] = "key"; static const unsigned char buffer[] = "testPayload"; // act HMACSHA256_RESULT result = HMACSHA256_ComputeHash(key, sizeof(key) - 1, buffer, sizeof(buffer) - 1, NULL); // assert ASSERT_ARE_EQUAL(HMACSHA256_RESULT, HMACSHA256_INVALID_ARG, result); } TEST_FUNCTION(HMACSHA256_ComputeHash_Succeeds) { // arrange static const unsigned char key[] = "key"; static const unsigned char buffer[] = "testPayload"; unsigned char expectedHash[32] = { 108, 7, 130, 47, 104, 233, 39, 188, 126, 122, 134, 187, 63, 19, 52, 120, 172, 7, 43, 25, 133, 60, 92, 217, 59, 59, 69, 116, 85, 104, 55, 224 }; // act HMACSHA256_RESULT result = HMACSHA256_ComputeHash(key, sizeof(key) - 1, buffer, sizeof(buffer) - 1, hash); // assert ASSERT_ARE_EQUAL(HMACSHA256_RESULT, HMACSHA256_OK, result); ASSERT_ARE_EQUAL(int, 0, memcmp(BUFFER_u_char(hash), expectedHash, 8)); } END_TEST_SUITE(HMACSHA256_UnitTests) main.c000066400000000000000000000005031362133436400340560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/hmacsha256_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(HMACSHA256_UnitTests, failedTestCount); return failedTestCount; } http_proxy_io_ut/000077500000000000000000000000001362133436400340365ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000011401362133436400365720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/http_proxy_io_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName http_proxy_io_ut) include_directories(${SHARED_UTIL_REAL_TEST_FOLDER}) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/http_proxy_io.c ../real_test_files/real_crt_abstractions.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) http_proxy_io_ut.c000066400000000000000000004137211362133436400376310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/http_proxy_io_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" static TEST_MUTEX_HANDLE g_testByTest; #if defined _MSC_VER #pragma warning(disable: 4054) /* MSC incorrectly fires this */ #endif #ifdef __cplusplus extern "C" { #endif void* real_malloc(size_t size) { return malloc(size); } void* real_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void real_free(void* ptr) { free(ptr); } int real_mallocAndStrcpy_s(char** destination, const char* source); #ifdef __cplusplus } #endif #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/base64.h" IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); #define TEST_OPTION_HANDLER (OPTIONHANDLER_HANDLE)0x4244 #define TEST_SOCKETIO_INTERFACE_DESCRIPTION (const IO_INTERFACE_DESCRIPTION*)0x4242 #define TEST_IO_HANDLE (XIO_HANDLE)0x4243 #define TEST_STRING_HANDLE (STRING_HANDLE)0x4244 MOCK_FUNCTION_WITH_CODE(, void, test_on_io_open_complete, void*, context, IO_OPEN_RESULT, open_result) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_bytes_received, void*, context, const unsigned char*, buffer, size_t, size) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_error, void*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_close_complete, void*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_send_complete, void*, context, IO_SEND_RESULT, send_result) MOCK_FUNCTION_END(); #undef ENABLE_MOCKS static char* umocktypes_stringify_const_SOCKETIO_CONFIG_ptr(const SOCKETIO_CONFIG** value) { char* result = NULL; char temp_buffer[1024]; int length; length = sprintf(temp_buffer, "{ hostname = %s, port = %d, accepted_socket = %p }", (*value)->hostname, (*value)->port, (*value)->accepted_socket); if (length > 0) { result = (char*)real_malloc(strlen(temp_buffer) + 1); if (result != NULL) { (void)memcpy(result, temp_buffer, strlen(temp_buffer) + 1); } } return result; } static int umocktypes_are_equal_const_SOCKETIO_CONFIG_ptr(const SOCKETIO_CONFIG** left, const SOCKETIO_CONFIG** right) { int result; if ((left == NULL) || (right == NULL)) { result = -1; } else { result = (*left)->port == (*right)->port; result = result && ((*left)->accepted_socket == (*right)->accepted_socket); if ((*right)->hostname == NULL) { result = result && ((*left)->hostname == (*right)->hostname); } else { result = result && (strcmp((*left)->hostname, (*right)->hostname) == 0); } } return result; } static int copy_string(char** destination, const char* source) { int result; if (source == NULL) { *destination = NULL; result = 0; } else { size_t length = strlen(source); *destination = (char*)real_malloc(length + 1); if (*destination == NULL) { result = __LINE__; } else { (void)memcpy(*destination, source, length + 1); result = 0; } } return result; } static int umocktypes_copy_const_SOCKETIO_CONFIG_ptr(SOCKETIO_CONFIG** destination, const SOCKETIO_CONFIG** source) { int result; *destination = (SOCKETIO_CONFIG*)real_malloc(sizeof(SOCKETIO_CONFIG)); if (*destination == NULL) { result = __LINE__; } else { if (copy_string((char**)&(*destination)->hostname, (*source)->hostname) != 0) { result = __LINE__; } else { (*destination)->port = (*source)->port; (*destination)->accepted_socket = (*source)->accepted_socket; result = 0; } } return result; } static void umocktypes_free_const_SOCKETIO_CONFIG_ptr(SOCKETIO_CONFIG** value) { real_free((void*)(*value)->hostname); real_free(*value); } #include "azure_c_shared_utility/http_proxy_io.h" #ifdef __cplusplus extern "C" { #endif pfCloneOption tlsio_cyclonessl_clone_option; pfDestroyOption tlsio_cyclonessl_destroy_option; OPTIONHANDLER_HANDLE my_OptionHandler_Create(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { (void)setOption; tlsio_cyclonessl_clone_option = cloneOption; tlsio_cyclonessl_destroy_option = destroyOption; return TEST_OPTION_HANDLER; } static ON_IO_OPEN_COMPLETE g_on_io_open_complete; static void* g_on_io_open_complete_context; static ON_SEND_COMPLETE g_on_io_send_complete; static void* g_on_io_send_complete_context; static ON_BYTES_RECEIVED g_on_bytes_received; static void* g_on_bytes_received_context; static ON_IO_ERROR g_on_io_error; static void* g_on_io_error_context; static ON_IO_CLOSE_COMPLETE g_on_io_close_complete; static void* g_on_io_close_complete_context; static int my_xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { (void)xio; g_on_io_open_complete = on_io_open_complete; g_on_io_open_complete_context = on_io_open_complete_context; g_on_bytes_received = on_bytes_received; g_on_bytes_received_context = on_bytes_received_context; g_on_io_error = on_io_error; g_on_io_error_context = on_io_error_context; return 0; } static int my_xio_close(XIO_HANDLE xio, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { (void)xio; g_on_io_close_complete = on_io_close_complete; g_on_io_close_complete_context = callback_context; return 0; } static const char connect_response[] = "HTTP/1.1 200\r\n\r\n"; static const HTTP_PROXY_IO_CONFIG default_http_proxy_io_config = { "test_host", 443, "a_proxy", 4444, "test_user", "shhhh" }; static const HTTP_PROXY_IO_CONFIG http_proxy_io_config_no_username = { "test_host", 443, "a_proxy", 4444, NULL, NULL }; static const HTTP_PROXY_IO_CONFIG http_proxy_io_config_with_username = { "another_test_host", 445, "another_proxy", 8888, "le_user", "le_password" }; static const HTTP_PROXY_IO_CONFIG http_proxy_io_config_with_username_cased = { "another_test_host", 445, "another_proxy", 8888, "lE_uSeR", "lE_pAsSwOrD" }; static const SOCKETIO_CONFIG socketio_config = { "a_proxy", 4444, NULL }; #ifdef __cplusplus } #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(http_proxy_io_unittests) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); result = umock_c_init(on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, real_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, real_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, real_free); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, real_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_Create, my_OptionHandler_Create); REGISTER_GLOBAL_MOCK_HOOK(xio_open, my_xio_open); REGISTER_GLOBAL_MOCK_HOOK(xio_close, my_xio_close); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_Create, TEST_OPTION_HANDLER); REGISTER_GLOBAL_MOCK_RETURN(socketio_get_interface_description, TEST_SOCKETIO_INTERFACE_DESCRIPTION); REGISTER_GLOBAL_MOCK_RETURN(xio_create, TEST_IO_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(xio_retrieveoptions, TEST_OPTION_HANDLER); REGISTER_GLOBAL_MOCK_RETURN(Base64_Encode_Bytes, TEST_STRING_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(STRING_c_str, "test_str"); REGISTER_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT); REGISTER_TYPE(IO_SEND_RESULT, IO_SEND_RESULT); REGISTER_TYPE(const SOCKETIO_CONFIG*, const_SOCKETIO_CONFIG_ptr); REGISTER_UMOCK_ALIAS_TYPE(pfCloneOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfDestroyOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfSetOption, void*); REGISTER_UMOCK_ALIAS_TYPE(OPTIONHANDLER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(SOCKETIO_CONFIG*, const SOCKETIO_CONFIG*); REGISTER_UMOCK_ALIAS_TYPE(XIO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_OPEN_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_ERROR, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_CLOSE_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_SEND_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(xio_create, xio_destroy); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { umock_c_negative_tests_deinit(); TEST_MUTEX_RELEASE(g_testByTest); } /* http_proxy_io_create */ /* Tests_SRS_HTTP_PROXY_IO_01_001: [ `http_proxy_io_create` shall create a new instance of the HTTP proxy IO. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_003: [ `io_create_parameters` shall be used as an `HTTP_PROXY_IO_CONFIG*`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_005: [ `http_proxy_io_create` shall copy the `hostname`, `port`, `username` and `password` values for later use when the actual CONNECT is performed. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_006: [ `hostname` and `proxy_hostname`, `username` and `password` shall be copied by calling `mallocAndStrcpy_s`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_009: [ `http_proxy_io_create` shall create a new socket IO by calling `xio_create` with the arguments: ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_010: [ - `io_interface_description` shall be set to the result of `socketio_get_interface_description`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_011: [ - `xio_create_parameters` shall be set to a `SOCKETIO_CONFIG*` where `hostname` is set to the `proxy_hostname` member of `io_create_parameters` and `port` is set to the `proxy_port` member of `io_create_parameters`. ]*/ TEST_FUNCTION(http_proxy_io_create_succeeds) { // arrange HTTP_PROXY_IO_CONFIG http_proxy_io_config; CONCRETE_IO_HANDLE http_io; http_proxy_io_config.hostname = "test_host"; http_proxy_io_config.port = 443; http_proxy_io_config.proxy_hostname = "a_proxy"; http_proxy_io_config.proxy_port = 4444; http_proxy_io_config.username = "test_user"; http_proxy_io_config.password = "shhhh"; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "a_proxy")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_user")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "shhhh")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKETIO_INTERFACE_DESCRIPTION, &socketio_config)) .ValidateArgumentValue_io_create_parameters_AsType(UMOCK_TYPE(SOCKETIO_CONFIG*)); // act http_io = http_proxy_io_get_interface_description()->concrete_io_create(&http_proxy_io_config); // assert ASSERT_IS_NOT_NULL(http_io); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_094: [ `username` and `password` shall be optional. ]*/ TEST_FUNCTION(http_proxy_io_create_with_NULL_username_and_password_succeeds) { // arrange HTTP_PROXY_IO_CONFIG http_proxy_io_config; CONCRETE_IO_HANDLE http_io; http_proxy_io_config.hostname = "test_host"; http_proxy_io_config.port = 443; http_proxy_io_config.proxy_hostname = "a_proxy"; http_proxy_io_config.proxy_port = 4444; http_proxy_io_config.username = NULL; http_proxy_io_config.password = NULL; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "a_proxy")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKETIO_INTERFACE_DESCRIPTION, &socketio_config)) .ValidateArgumentValue_io_create_parameters_AsType(UMOCK_TYPE(SOCKETIO_CONFIG*)); // act http_io = http_proxy_io_get_interface_description()->concrete_io_create(&http_proxy_io_config); // assert ASSERT_IS_NOT_NULL(http_io); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_095: [ If one of the fields `username` and `password` is non-NULL, then the other has to be also non-NULL, otherwise `http_proxy_io_create` shall fail and return NULL. ]*/ TEST_FUNCTION(http_proxy_io_create_with_NULL_username_and_non_NULL_password_fails) { // arrange HTTP_PROXY_IO_CONFIG http_proxy_io_config; CONCRETE_IO_HANDLE http_io; http_proxy_io_config.hostname = "test_host"; http_proxy_io_config.port = 443; http_proxy_io_config.proxy_hostname = "a_proxy"; http_proxy_io_config.proxy_port = 4444; http_proxy_io_config.username = NULL; http_proxy_io_config.password = "a"; // act http_io = http_proxy_io_get_interface_description()->concrete_io_create(&http_proxy_io_config); // assert ASSERT_IS_NULL(http_io); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_095: [ If one of the fields `username` and `password` is non-NULL, then the other has to be also non-NULL, otherwise `http_proxy_io_create` shall fail and return NULL. ]*/ TEST_FUNCTION(http_proxy_io_create_with_non_NULL_username_and_NULL_password_fails) { // arrange HTTP_PROXY_IO_CONFIG http_proxy_io_config; CONCRETE_IO_HANDLE http_io; http_proxy_io_config.hostname = "test_host"; http_proxy_io_config.port = 443; http_proxy_io_config.proxy_hostname = "a_proxy"; http_proxy_io_config.proxy_port = 4444; http_proxy_io_config.username = "a"; http_proxy_io_config.password = NULL; // act http_io = http_proxy_io_get_interface_description()->concrete_io_create(&http_proxy_io_config); // assert ASSERT_IS_NULL(http_io); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_002: [ If `io_create_parameters` is NULL, `http_proxy_io_create` shall fail and return NULL. ]*/ TEST_FUNCTION(http_proxy_io_create_with_NULL_fails) { // arrange CONCRETE_IO_HANDLE http_io; // act http_io = http_proxy_io_get_interface_description()->concrete_io_create(NULL); // assert ASSERT_IS_NULL(http_io); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_004: [ If the `hostname` or `proxy_hostname` member is NULL, then `http_proxy_io_create` shall fail and return NULL. ]*/ TEST_FUNCTION(http_proxy_io_create_with_NULL_hostname_fails) { // arrange HTTP_PROXY_IO_CONFIG http_proxy_io_config; CONCRETE_IO_HANDLE http_io; http_proxy_io_config.hostname = NULL; http_proxy_io_config.port = 443; http_proxy_io_config.proxy_hostname = "a_proxy"; http_proxy_io_config.proxy_port = 4444; http_proxy_io_config.username = "test_user"; http_proxy_io_config.password = "shhhh"; // act http_io = http_proxy_io_get_interface_description()->concrete_io_create(&http_proxy_io_config); // assert ASSERT_IS_NULL(http_io); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_004: [ If the `hostname` or `proxy_hostname` member is NULL, then `http_proxy_io_create` shall fail and return NULL. ]*/ TEST_FUNCTION(http_proxy_io_create_with_NULL_proxy_hostname_fails) { // arrange HTTP_PROXY_IO_CONFIG http_proxy_io_config; CONCRETE_IO_HANDLE http_io; http_proxy_io_config.hostname = "a_hostname"; http_proxy_io_config.port = 443; http_proxy_io_config.proxy_hostname = NULL; http_proxy_io_config.proxy_port = 4444; http_proxy_io_config.username = "test_user"; http_proxy_io_config.password = "shhhh"; // act http_io = http_proxy_io_get_interface_description()->concrete_io_create(&http_proxy_io_config); // assert ASSERT_IS_NULL(http_io); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_051: [ If allocating memory for the new instance fails, `http_proxy_io_create` shall fail and return NULL. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_007: [ If `mallocAndStrcpy_s` fails then `http_proxy_io_create` shall fail and return NULL. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_050: [ If `socketio_get_interface_description` fails, `http_proxy_io_create` shall fail and return NULL. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_012: [ If `xio_create` fails, `http_proxy_io_create` shall fail and return NULL. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_008: [ When `http_proxy_io_create` fails, all allocated resources up to that point shall be freed. ]*/ TEST_FUNCTION(when_a_call_made_by_http_proxy_io_create_fails_then_http_proxy_io_create_fails) { // arrange size_t i; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetFailReturn(NULL); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination() .SetFailReturn(1); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "a_proxy")) .IgnoreArgument_destination() .SetFailReturn(1); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_user")) .IgnoreArgument_destination() .SetFailReturn(1); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "shhhh")) .IgnoreArgument_destination() .SetFailReturn(1); STRICT_EXPECTED_CALL(socketio_get_interface_description()) .SetFailReturn(NULL); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKETIO_INTERFACE_DESCRIPTION, &socketio_config)) .ValidateArgumentValue_io_create_parameters_AsType(UMOCK_TYPE(SOCKETIO_CONFIG*)) .SetFailReturn(NULL); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count() - 1; i++) { char temp_str[128]; CONCRETE_IO_HANDLE http_io; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); (void)sprintf(temp_str, "On failed call %zu", i); // act http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); // assert ASSERT_IS_NULL(http_io, temp_str); } } /* http_proxy_io_destroy */ /* Tests_SRS_HTTP_PROXY_IO_01_013: [ `http_proxy_io_destroy` shall free the HTTP proxy IO instance indicated by `http_proxy_io`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_016: [ `http_proxy_io_destroy` shall destroy the underlying IO created in `http_proxy_io_create` by calling `xio_destroy`. ]*/ TEST_FUNCTION(http_proxy_io_destroy_frees_the_resources) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_014: [ If `http_proxy_io` is NULL, `http_proxy_io_destroy` shall do nothing. ]*/ TEST_FUNCTION(http_proxy_io_destroy_with_NULL_does_nothing) { // arrange // act http_proxy_io_get_interface_description()->concrete_io_destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* http_proxy_io_open */ /* Tests_SRS_HTTP_PROXY_IO_01_017: [ `http_proxy_io_open` shall open the HTTP proxy IO and on success it shall return 0. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_019: [ `http_proxy_io_open` shall open the underlying IO by calling `xio_open` on the underlying IO handle created in `http_proxy_io_create`, while passing to it the callbacks `on_underlying_io_open_complete`, `on_underlying_io_bytes_received` and `on_underlying_io_error`. ]*/ TEST_FUNCTION(http_proxy_io_open_opens_the_underlying_IO) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, http_io, test_on_bytes_received, http_io, test_on_io_error, http_io); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_020: [ If `xio_open` fails, then `http_proxy_io_open` shall return a non-zero value. ]*/ TEST_FUNCTION(when_the_underlying_xio_open_fails_http_proxy_io_open_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context() .SetReturn(1); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, http_io, test_on_bytes_received, http_io, test_on_io_error, http_io); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_018: [ If any of the arguments `http_proxy_io`, `on_io_open_complete`, `on_bytes_received` or `on_io_error` are NULL then `http_proxy_io_open` shall return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_open_with_NULL_open_complete_callback_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, NULL, http_io, test_on_bytes_received, http_io, test_on_io_error, http_io); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_018: [ If any of the arguments `http_proxy_io`, `on_io_open_complete`, `on_bytes_received` or `on_io_error` are NULL then `http_proxy_io_open` shall return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_open_with_NULL_bytes_received_callback_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, http_io, NULL, http_io, test_on_io_error, http_io); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_018: [ If any of the arguments `http_proxy_io`, `on_io_open_complete`, `on_bytes_received` or `on_io_error` are NULL then `http_proxy_io_open` shall return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_open_with_NULL_on_io_error_callback_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, http_io, test_on_bytes_received, http_io, NULL, http_io); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_018: [ If any of the arguments `http_proxy_io`, `on_io_open_complete`, `on_bytes_received` or `on_io_error` are NULL then `http_proxy_io_open` shall return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_open_with_NULL_handle_fails) { // arrange int result; // act result = http_proxy_io_get_interface_description()->concrete_io_open(NULL, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_021: [ If `http_proxy_io_open` is called while the IO was already open, `http_proxy_io_open` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_open_after_open_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_051: [ The arguments `on_io_open_complete_context`, `on_bytes_received_context` and `on_io_error_context` shall be allowed to be NULL. ]*/ TEST_FUNCTION(http_proxy_io_open_with_NULL_contexts_is_allowed) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, NULL, test_on_bytes_received, NULL, test_on_io_error, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* http_proxy_io_close */ /* Tests_SRS_HTTP_PROXY_IO_01_022: [ `http_proxy_io_close` shall close the HTTP proxy IO and on success it shall return 0. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_024: [ `http_proxy_io_close` shall close the underlying IO by calling `xio_close` on the IO handle create in `http_proxy_io_create`, while passing to it the `on_underlying_io_close_complete` callback. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_026: [ The `on_io_close_complete` and `on_io_close_complete_context` arguments shall be saved for later use. ]*/ TEST_FUNCTION(http_proxy_io_close_closes_the_IO) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_023: [ If the argument `http_proxy_io` is NULL, `http_proxy_io_close` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_close_with_NULL_handle_fails) { // arrange int result; // act result = http_proxy_io_get_interface_description()->concrete_io_close(NULL, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_025: [ If `xio_close` fails, `http_proxy_io_close` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_xio_close_fails_http_proxy_io_close_also_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context() .SetReturn(1); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_027: [ If `http_proxy_io_close` is called when not open, `http_proxy_io_close` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_close_when_not_open_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_027: [ If `http_proxy_io_close` is called when not open, `http_proxy_io_close` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_close_when_already_closed_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4245); g_on_io_close_complete(g_on_io_close_complete_context); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_028: [ `on_io_close_complete` shall be allowed to be NULL. ]*/ TEST_FUNCTION(http_proxy_io_close_with_NULL_close_complete_callback_is_allowed) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, NULL, (void*)0x4245); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_052: [ `on_io_close_complete_context` shall be allowed to be NULL. ]*/ TEST_FUNCTION(http_proxy_io_close_with_NULL_close_complete_callback_context_is_allowed) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_053: [ `http_proxy_io_close` while OPENING shall trigger the `on_io_open_complete` callback with `IO_OPEN_CANCELLED`. ]*/ TEST_FUNCTION(http_proxy_io_close_while_opening_indicates_open_as_cancelled) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_CANCELLED)); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_053: [ `http_proxy_io_close` while OPENING shall trigger the `on_io_open_complete` callback with `IO_OPEN_CANCELLED`. ]*/ TEST_FUNCTION(http_proxy_io_close_while_opening_waiting_for_reply_indicates_open_as_cancelled) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_CANCELLED)); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_054: [ `http_proxy_io_close` while OPENING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_close_while_closing_indicates_open_as_cancelled) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4242); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* http_proxy_io_send */ /* Tests_SRS_HTTP_PROXY_IO_01_029: [ `http_proxy_io_send` shall send the `size` bytes pointed to by `buffer` and on success it shall return 0. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_033: [ `http_proxy_io_send` shall send the bytes by calling `xio_send` on the underlying IO created in `http_proxy_io_create` and passing `buffer` and `size` as arguments. ]*/ TEST_FUNCTION(http_proxy_io_send_calls_send_on_the_underlying_IO) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(test_buffer), test_on_send_complete, (void*)0x4247)) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4247); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_030: [ If any of the arguments `http_proxy_io` or `buffer` is NULL, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_with_NULL_handle_fails) { // arrange int result; unsigned char test_buffer[] = { 0x42 }; // act result = http_proxy_io_get_interface_description()->concrete_io_send(NULL, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_030: [ If any of the arguments `http_proxy_io` or `buffer` is NULL, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_with_NULL_buffer_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, NULL, 1, test_on_send_complete, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_031: [ If `size` is 0, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_with_zero_size_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, 0, test_on_send_complete, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_032: [ `on_send_complete` shall be allowed to be NULL. ]*/ TEST_FUNCTION(http_proxy_io_send_with_NULL_send_complete_callback_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(test_buffer), NULL, (void*)0x4247)) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), NULL, (void*)0x4247); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_034: [ If `http_proxy_io_send` is called when the IO is not open, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_when_waiting_for_connect_reply_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), NULL, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_034: [ If `http_proxy_io_send` is called when the IO is not open, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_when_opening_underlying_IO_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), NULL, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_034: [ If `http_proxy_io_send` is called when the IO is not open, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_when_open_not_called_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), NULL, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_034: [ If `http_proxy_io_send` is called when the IO is not open, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_when_closing_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4247); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), NULL, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_035: [ If the IO is in an error state (an error was reported through the `on_io_error` callback), `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_send_when_IO_is_in_error_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); g_on_io_error(g_on_io_error_context); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), NULL, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_055: [ If `xio_send` fails, `http_proxy_io_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_xio_send_fails_http_proxy_io_send_also_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; unsigned char test_buffer[] = { 0x42 }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(test_buffer), NULL, (void*)0x4247)) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)) .SetReturn(1); // act result = http_proxy_io_get_interface_description()->concrete_io_send(http_io, test_buffer, sizeof(test_buffer), NULL, (void*)0x4247); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* http_proxy_io_dowork */ /* Tests_SRS_HTTP_PROXY_IO_01_037: [ `http_proxy_io_dowork` shall call `xio_dowork` on the underlying IO created in `http_proxy_io_create`. ]*/ TEST_FUNCTION(http_proxy_io_dowork_calls_the_underlying_IO_dowork) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_dowork(TEST_IO_HANDLE)); // act http_proxy_io_get_interface_description()->concrete_io_dowork(http_io); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_038: [ If the `http_proxy_io` argument is NULL, `http_proxy_io_dowork` shall do nothing. ]*/ TEST_FUNCTION(http_proxy_io_dowork_with_NULL_handle_does_nothing) { // arrange // act http_proxy_io_get_interface_description()->concrete_io_dowork(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_039: [ If the IO is not open (no open has been called or the IO has been closed) then `http_proxy_io_dowork` shall do nothing. ]*/ TEST_FUNCTION(http_proxy_io_dowork_when_not_open_does_nothing) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); // act http_proxy_io_get_interface_description()->concrete_io_dowork(http_io); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_039: [ If the IO is not open (no open has been called or the IO has been closed) then `http_proxy_io_dowork` shall do nothing. ]*/ TEST_FUNCTION(http_proxy_io_dowork_when_closed_does_nothing) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, NULL, NULL); g_on_io_close_complete(g_on_io_close_complete_context); umock_c_reset_all_calls(); // act http_proxy_io_get_interface_description()->concrete_io_dowork(http_io); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* http_proxy_io_set_option */ /* Tests_SRS_HTTP_PROXY_IO_01_040: [ If any of the arguments `http_proxy_io` or `option_name` is NULL, `http_proxy_io_set_option` shall return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_set_option_with_NULL_option_name_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); // act result = http_proxy_io_get_interface_description()->concrete_io_setoption(http_io, NULL, "test"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_040: [ If any of the arguments `http_proxy_io` or `option_name` is NULL, `http_proxy_io_set_option` shall return a non-zero value. ]*/ TEST_FUNCTION(http_proxy_io_set_option_with_NULL_handle_fails) { // arrange int result; // act result = http_proxy_io_get_interface_description()->concrete_io_setoption(NULL, "option_1", "test"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_042: [ If the option was handled by `http_proxy_io_set_option` or the underlying IO, then `http_proxy_io_set_option` shall return 0. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_043: [ If the `option_name` argument indicates an option that is not handled by `http_proxy_io_set_option`, then `xio_setoption` shall be called on the underlying IO created in `http_proxy_io_create`, passing the option name and value to it. ]*/ TEST_FUNCTION(when_the_underlying_IO_handles_the_option_http_proxy_io_set_option_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_setoption(TEST_IO_HANDLE, "option_1", "test")) .ValidateArgumentValue_value_AsType(UMOCK_TYPE(char*)); // act result = http_proxy_io_get_interface_description()->concrete_io_setoption(http_io, "option_1", "test"); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_044: [ if `xio_setoption` fails, `http_proxy_io_set_option` shall return a non-zero value. ]*/ TEST_FUNCTION(when_the_underlying_xio_setoption_fails_http_proxy_io_set_option_also_fails) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_setoption(TEST_IO_HANDLE, "option_1", "test")) .ValidateArgumentValue_value_AsType(UMOCK_TYPE(char*)) .SetReturn(1); // act result = http_proxy_io_get_interface_description()->concrete_io_setoption(http_io, "option_1", "test"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_056: [ The `value` argument shall be allowed to be NULL. ]*/ TEST_FUNCTION(http_proxy_io_set_option_with_NULL_value_is_allowed) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_setoption(TEST_IO_HANDLE, "option_2", NULL)) .ValidateArgumentValue_value_AsType(UMOCK_TYPE(char*)); // act result = http_proxy_io_get_interface_description()->concrete_io_setoption(http_io, "option_2", NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* http_proxy_io_retrieve_options */ /* Tests_SRS_HTTP_PROXY_IO_01_046: [ `http_proxy_io_retrieve_options` shall return an `OPTIONHANDLER_HANDLE` obtained by calling `xio_retrieveoptions` on the underlying IO created in `http_proxy_io_create`. ]*/ TEST_FUNCTION(http_proxy_io_retrieve_options_calls_the_underlying_retrieve_options) { // arrange CONCRETE_IO_HANDLE http_io; OPTIONHANDLER_HANDLE result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_retrieveoptions(TEST_IO_HANDLE)); // act result = http_proxy_io_get_interface_description()->concrete_io_retrieveoptions(http_io); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_OPTION_HANDLER, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_047: [ If the parameter `http_proxy_io` is NULL then `http_proxy_io_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(http_proxy_io_retrieve_options_with_NULL_handle_fails) { // arrange OPTIONHANDLER_HANDLE result; // act result = http_proxy_io_get_interface_description()->concrete_io_retrieveoptions(NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTP_PROXY_IO_01_048: [ If `xio_retrieveoptions` fails, `http_proxy_io_retrieve_options` shall return NULL. ]*/ TEST_FUNCTION(when_xio_retrieveoptions_fails_then_http_proxy_io_retrieve_options_fails) { // arrange CONCRETE_IO_HANDLE http_io; OPTIONHANDLER_HANDLE result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&default_http_proxy_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_retrieveoptions(TEST_IO_HANDLE)) .SetReturn(NULL); // act result = http_proxy_io_get_interface_description()->concrete_io_retrieveoptions(http_io); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* http_proxy_io_get_interface_description */ /* Tests_SRS_HTTP_PROXY_IO_01_049: [ `http_proxy_io_get_interface_description` shall return a pointer to an `IO_INTERFACE_DESCRIPTION` structure that contains pointers to the functions: `http_proxy_io_retrieve_options`, `http_proxy_io_retrieve_create`, `http_proxy_io_destroy`, `http_proxy_io_open`, `http_proxy_io_close`, `http_proxy_io_send` and `http_proxy_io_dowork`. ]*/ TEST_FUNCTION(http_proxy_io_get_interface_description_returns_a_structure_with_non_NULL_members) { // arrange const IO_INTERFACE_DESCRIPTION* io_interface; // act io_interface = http_proxy_io_get_interface_description(); // assert ASSERT_IS_NOT_NULL(io_interface); ASSERT_IS_NOT_NULL(io_interface->concrete_io_create); ASSERT_IS_NOT_NULL(io_interface->concrete_io_destroy); ASSERT_IS_NOT_NULL(io_interface->concrete_io_open); ASSERT_IS_NOT_NULL(io_interface->concrete_io_close); ASSERT_IS_NOT_NULL(io_interface->concrete_io_send); ASSERT_IS_NOT_NULL(io_interface->concrete_io_setoption); ASSERT_IS_NOT_NULL(io_interface->concrete_io_retrieveoptions); } /* on_underlying_io_open_complete */ /* Tests_SRS_HTTP_PROXY_IO_01_081: [ `on_underlying_io_open_complete` called with NULL context shall do nothing. ]*/ TEST_FUNCTION(underlying_io_open_complete_with_NULL_does_nothing) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_no_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); // act g_on_io_open_complete(NULL, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_057: [ When `on_underlying_io_open_complete` is called, the `http_proxy_io` shall send the CONNECT request constructed per RFC 2817: ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_075: [ The Request-URI portion of the Request-Line is always an 'authority' as defined by URI Generic Syntax [2], which is to say the host name and port number destination of the requested connection separated by a colon: ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_063: [ The request shall be sent by calling `xio_send` and passing NULL as `on_send_complete` callback. ]*/ TEST_FUNCTION(when_the_underlying_io_open_complete_is_called_the_CONNECT_request_is_sent) { // arrange CONCRETE_IO_HANDLE http_io; const char connect_request[] = "CONNECT test_host:443 HTTP/1.1\r\nHost:test_host:443\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_no_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(connect_request) - 1, IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, connect_request, sizeof(connect_request) - 1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_064: [ If `xio_send` fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_xio_send_fails_on_open_complete_is_triggered_with_IO_OPEN_ERROR) { // arrange CONCRETE_IO_HANDLE http_io; const char connect_request[] = "CONNECT test_host:443 HTTP/1.1\r\nHost:test_host:443\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_no_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(connect_request) - 1, IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, connect_request, sizeof(connect_request) - 1) .SetReturn(1); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_017: [ `http_proxy_io_open` shall open the HTTP proxy IO and on success it shall return 0. ]*/ TEST_FUNCTION(http_proxy_io_open_after_CONNECT_request_send_error_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; const char connect_request[] = "CONNECT test_host:443 HTTP/1.1\r\nHost:test_host:443\r\n\r\n"; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_no_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(connect_request) - 1, IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, connect_request, sizeof(connect_request) - 1) .SetReturn(1); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_connect_request_fails_on_open_complete_is_triggered_with_IO_OPEN_ERROR) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_no_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_017: [ `http_proxy_io_open` shall open the HTTP proxy IO and on success it shall return 0. ]*/ TEST_FUNCTION(http_proxy_io_open_after_CONNECT_request_allocation_error_error_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_no_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_059: [ - If `username` and `password` have been specified in the arguments passed to `http_proxy_io_create`, then the header `Proxy-Authorization` shall be added to the request. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_061: [ Encoding to Base64 shall be done by calling `Base64_Encode_Bytes`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_060: [ - The value of `Proxy-Authorization` shall be the constructed according to RFC 2617. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_091: [ To receive authorization, the client sends the userid and password, separated by a single colon (":") character, within a base64 [7] encoded string in the credentials. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_092: [ A client MAY preemptively send the corresponding Authorization header with requests for resources in that space without receipt of another challenge from the server. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_093: [ Userids might be case sensitive. ]*/ TEST_FUNCTION(when_the_underlying_io_open_complete_is_called_the_CONNECT_request_with_auth_is_sent) { // arrange CONCRETE_IO_HANDLE http_io; const char connect_request[] = "CONNECT another_test_host:445 HTTP/1.1\r\nHost:another_test_host:445\r\nProxy-authorization: Basic __encoded_base64__\r\n\r\n"; const char plain_auth_string[] = "le_user:le_password"; const char base64encoded[] = "__encoded_base64__"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // auth STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_NUM_ARG, sizeof(plain_auth_string) - 1)) .ValidateArgumentBuffer(1, plain_auth_string, sizeof(plain_auth_string) - 1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // auth STRICT_EXPECTED_CALL(STRING_c_str(TEST_STRING_HANDLE)) .SetReturn(base64encoded); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(connect_request) - 1, IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, connect_request, sizeof(connect_request) - 1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(TEST_STRING_HANDLE)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_059: [ - If `username` and `password` have been specified in the arguments passed to `http_proxy_io_create`, then the header `Proxy-Authorization` shall be added to the request. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_061: [ Encoding to Base64 shall be done by calling `Base64_Encode_Bytes`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_060: [ - The value of `Proxy-Authorization` shall be the constructed according to RFC 2617. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_091: [ To receive authorization, the client sends the userid and password, separated by a single colon (":") character, within a base64 [7] encoded string in the credentials. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_092: [ A client MAY preemptively send the corresponding Authorization header with requests for resources in that space without receipt of another challenge from the server. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_093: [ Userids might be case sensitive. ]*/ TEST_FUNCTION(when_the_underlying_io_open_complete_is_called_the_CONNECT_request_with_auth_is_sent_cased) { // arrange CONCRETE_IO_HANDLE http_io; const char connect_request[] = "CONNECT another_test_host:445 HTTP/1.1\r\nHost:another_test_host:445\r\nProxy-authorization: Basic __encoded_base64__\r\n\r\n"; const char plain_auth_string[] = "lE_uSeR:lE_pAsSwOrD"; const char base64encoded[] = "__encoded_base64__"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username_cased); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // auth STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_NUM_ARG, sizeof(plain_auth_string) - 1)) .ValidateArgumentBuffer(1, plain_auth_string, sizeof(plain_auth_string) - 1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // auth STRICT_EXPECTED_CALL(STRING_c_str(TEST_STRING_HANDLE)) .SetReturn(base64encoded); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(connect_request) - 1, IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, connect_request, sizeof(connect_request) - 1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(TEST_STRING_HANDLE)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_Base64_Encode_Bytes_fails_on_open_complete_is_triggered_with_IO_OPEN_ERROR) { // arrange CONCRETE_IO_HANDLE http_io; const char plain_auth_string[] = "le_user:le_password"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // auth STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_NUM_ARG, sizeof(plain_auth_string) - 1)) .ValidateArgumentBuffer(1, plain_auth_string, sizeof(plain_auth_string) - 1) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // auth // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(after_Base64_Encode_Bytes_fails_http_proxy_io_open_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; const char plain_auth_string[] = "le_user:le_password"; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // auth STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_NUM_ARG, sizeof(plain_auth_string) - 1)) .ValidateArgumentBuffer(1, plain_auth_string, sizeof(plain_auth_string) - 1) .SetReturn(NULL); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_plain_auth_string_fails_on_open_complete_is_triggered_with_IO_OPEN_ERROR) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); // auth STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_062: [ If any failure is encountered while constructing the request, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(after_allocating_memory_for_the_plain_auth_string_fails_http_proxy_io_open_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); // auth g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_078: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_ERROR`, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_with_error_yields_an_error) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_ERROR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_078: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_ERROR`, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(after_on_underlying_io_open_complete_with_error_http_proxy_io_open_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_ERROR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_079: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_CANCELLED`, the `on_open_complete` callback shall be triggered with `IO_OPEN_CANCELLED`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_with_cancelled_yields_an_error) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_CANCELLED)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_CANCELLED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_079: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_CANCELLED`, the `on_open_complete` callback shall be triggered with `IO_OPEN_CANCELLED`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(after_on_underlying_io_open_complete_with_cancelled_http_proxy_io_open_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_CANCELLED); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_076: [ When `on_underlying_io_open_complete` is called while waiting for the CONNECT reply, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_on_underlying_io_open_complete_is_called_when_waiting_for_connect_reply_an_error_is_indicated) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_076: [ When `on_underlying_io_open_complete` is called while waiting for the CONNECT reply, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(after_on_underlying_io_open_complete_is_called_when_waiting_for_connect_reply_http_proxy_io_open_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_077: [ When `on_underlying_io_open_complete` is called in after OPEN has completed, the `on_io_error` callback shall be triggered passing the `on_io_error_context` argument as `context`. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_in_OPEN_indicates_an_error) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_077: [ When `on_underlying_io_open_complete` is called in after OPEN has completed, the `on_io_error` callback shall be triggered passing the `on_io_error_context` argument as `context`. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_in_CLOSING_indicates_an_error) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_io_open_complete_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4246); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* on_underlying_io_bytes_received */ /* Tests_SRS_HTTP_PROXY_IO_01_065: [ When bytes are received and the response to the CONNECT request was not yet received, the bytes shall be accumulated until a double new-line is detected. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_1_byte_buffers_the_received_bytes) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_065: [ When bytes are received and the response to the CONNECT request was not yet received, the bytes shall be accumulated until a double new-line is detected. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_2_times_1_byte_buffers_the_received_bytes) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response + 1, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_066: [ When a double new-line is detected the response shall be parsed in order to extract the status code. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_069: [ Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_070: [ When a success status code is parsed, the `on_open_complete` callback shall be triggered with `IO_OPEN_OK`, passing also the `on_open_complete_context` argument as `context`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_073: [ Once a success status code was parsed, the IO shall be OPEN. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_good_reply_indicates_OPEN_OK) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_066: [ When a double new-line is detected the response shall be parsed in order to extract the status code. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_good_reply_in_2_chunks_indicates_OPEN_OK) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 2); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response + sizeof(connect_response) - 2, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_067: [ If allocating memory for the buffered bytes fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_allocating_memory_for_cached_data_in_on_underlying_io_bytes_an_error_is_triggered) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_066: [ When a double new-line is detected the response shall be parsed in order to extract the status code. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_069: [ Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_070: [ When a success status code is parsed, the `on_open_complete` callback shall be triggered with `IO_OPEN_OK`, passing also the `on_open_complete_context` argument as `context`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_073: [ Once a success status code was parsed, the IO shall be OPEN. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_good_reply_status_code_201_indicates_OPEN_OK) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_201[] = "HTTP/1.1 201\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_201, sizeof(connect_response_201) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_066: [ When a double new-line is detected the response shall be parsed in order to extract the status code. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_069: [ Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_070: [ When a success status code is parsed, the `on_open_complete` callback shall be triggered with `IO_OPEN_OK`, passing also the `on_open_complete_context` argument as `context`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_073: [ Once a success status code was parsed, the IO shall be OPEN. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_good_reply_status_code_299_indicates_OPEN_OK) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_299[] = "HTTP/1.1 299\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_299, sizeof(connect_response_299) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_066: [ When a double new-line is detected the response shall be parsed in order to extract the status code. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_069: [ Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_070: [ When a success status code is parsed, the `on_open_complete` callback shall be triggered with `IO_OPEN_OK`, passing also the `on_open_complete_context` argument as `context`. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_073: [ Once a success status code was parsed, the IO shall be OPEN. ]*/ /* Tests_SRS_HTTP_PROXY_IO_01_090: [ Any successful (2xx) response to a CONNECT request indicates that the proxy has established a connection to the requested host and port, and has switched to tunneling the current connection to that server connection. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_good_reply_status_code_200_and_some_text_indicates_OPEN_OK) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_200[] = "HTTP/1.1 200 Blah blah\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_200, sizeof(connect_response_200) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_071: [ If the status code is not successful, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_199_code_indicates_an_error) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_199[] = "HTTP/1.1 199\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_199, sizeof(connect_response_199) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_071: [ If the status code is not successful, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_300_code_indicates_an_error) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_300[] = "HTTP/1.1 300\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_300, sizeof(connect_response_300) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_071: [ If the status code is not successful, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(after_a_bad_status_code_http_proxy_io_open_succeeds) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_300[] = "HTTP/1.1 300\r\n\r\n"; int result; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_300, sizeof(connect_response_300) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_072: [ Any bytes that are extra (not consumed by the CONNECT response), shall be indicated as received by calling the `on_bytes_received` callback and passing the `on_bytes_received_context` as context argument. ]*/ TEST_FUNCTION(one_extra_byte_gets_indicated_as_received) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_with_byte[] = "HTTP/1.1 200\r\n\r\nA"; static const unsigned char expected_bytes[] = { 'A' }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); STRICT_EXPECTED_CALL(test_on_bytes_received((void*)0x4243, IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentBuffer(2, expected_bytes, sizeof(expected_bytes)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_with_byte, sizeof(connect_response_with_byte) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_072: [ Any bytes that are extra (not consumed by the CONNECT response), shall be indicated as received by calling the `on_bytes_received` callback and passing the `on_bytes_received_context` as context argument. ]*/ TEST_FUNCTION(three_extra_byte_get_indicated_as_received) { // arrange CONCRETE_IO_HANDLE http_io; static const char connect_response_with_byte[] = "HTTP/1.1 200\r\n\r\nABC"; static const unsigned char expected_bytes[] = { 'A', 'B', 'C' }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); STRICT_EXPECTED_CALL(test_on_bytes_received((void*)0x4243, IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentBuffer(2, expected_bytes, sizeof(expected_bytes)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response_with_byte, sizeof(connect_response_with_byte) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_074: [ If `on_underlying_io_bytes_received` is called while OPEN, all bytes shall be indicated as received by calling the `on_bytes_received` callback and passing the `on_bytes_received_context` as context argument. ]*/ TEST_FUNCTION(bytes_indicated_as_received_in_OPEN_get_bubbled_up) { // arrange CONCRETE_IO_HANDLE http_io; static const unsigned char expected_bytes[] = { 'A', 'B', 'C' }; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_bytes_received((void*)0x4243, IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentBuffer(2, expected_bytes, sizeof(expected_bytes)); // act g_on_bytes_received(g_on_bytes_received_context, expected_bytes, sizeof(expected_bytes)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_080: [ If `on_underlying_io_bytes_received` is called while the underlying IO is being opened, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(if_bytes_are_indicated_as_received_while_opening_the_underlying_IO_an_error_is_indicated_in_the_open_complete_callback) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_068: [ If parsing the CONNECT response fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(a_bad_reply_triggers_an_error_in_open_complete_callback) { // arrange CONCRETE_IO_HANDLE http_io; static const char bad_reply[] = "HTTP/1.1 \r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)bad_reply, sizeof(bad_reply) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_068: [ If parsing the CONNECT response fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(a_bad_reply_malformed_char_triggers_an_error_in_open_complete_callback) { // arrange CONCRETE_IO_HANDLE http_io; static const char bad_reply[] = "HYTP/1.1 200\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)bad_reply, sizeof(bad_reply) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_068: [ If parsing the CONNECT response fails, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(a_bad_reply_only_one_char_triggers_an_error_in_open_complete_callback) { // arrange CONCRETE_IO_HANDLE http_io; static const char bad_reply[] = "H\r\n\r\n"; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)bad_reply, sizeof(bad_reply) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_082: [ `on_underlying_io_bytes_received` called with NULL context shall do nothing. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_NULL_does_nothing) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); // act g_on_bytes_received(NULL, (const unsigned char*)connect_response, sizeof(connect_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* on_underlying_io_close_complete */ /* Tests_SRS_HTTP_PROXY_IO_01_083: [ `on_underlying_io_close_complete` while CLOSING shall call the `on_io_close_complete` callback, passing to it the `on_io_close_complete_context` as `context` argument. ]*/ TEST_FUNCTION(on_underlying_io_close_complete_in_CLOSING_triggers_the_close_complete_callback) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_close_complete((void*)0x4245)); // act g_on_io_close_complete(g_on_io_close_complete_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_084: [ `on_underlying_io_close_complete` called with NULL context shall do nothing. ]*/ TEST_FUNCTION(on_underlying_io_close_complete_in_OPEN_does_nothing) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act g_on_io_close_complete(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_086: [ If the `on_io_close_complete` callback passed to `http_proxy_io_close` was NULL, no callback shall be triggered. ]*/ TEST_FUNCTION(on_underlying_io_close_complete_in_CLOSING_with_NULL_callback_does_not_trigger_any_callback) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); (void)http_proxy_io_get_interface_description()->concrete_io_close(http_io, NULL, (void*)0x4245); umock_c_reset_all_calls(); // act g_on_io_close_complete(g_on_io_close_complete_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* on_underlying_io_error */ /* Tests_SRS_HTTP_PROXY_IO_01_088: [ `on_underlying_io_error` called with NULL context shall do nothing. ]*/ TEST_FUNCTION(on_underlying_io_error_with_NULL_handle_does_nothing) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); // act g_on_io_error(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_089: [ If the `on_underlying_io_error` callback is called while the IO is OPEN, the `on_io_error` callback shall be called with the `on_io_error_context` argument as `context`. ]*/ TEST_FUNCTION(when_on_underlying_io_error_is_called_in_OPEN_the_error_is_indicated_up) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)connect_response, sizeof(connect_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_087: [ If the `on_underlying_io_error` callback is called while OPENING, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_on_underlying_io_error_is_called_while_waiting_for_CONNECT_response_the_error_is_indicated_via_open_complete) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } /* Tests_SRS_HTTP_PROXY_IO_01_087: [ If the `on_underlying_io_error` callback is called while OPENING, the `on_open_complete` callback shall be triggered with `IO_OPEN_ERROR`, passing also the `on_open_complete_context` argument as `context`. ]*/ TEST_FUNCTION(when_on_underlying_io_error_is_called_while_waiting_for_underlying_IO_to_open_the_error_is_indicated_via_open_complete) { // arrange CONCRETE_IO_HANDLE http_io; http_io = http_proxy_io_get_interface_description()->concrete_io_create((void*)&http_proxy_io_config_with_username); (void)http_proxy_io_get_interface_description()->concrete_io_open(http_io, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup http_proxy_io_get_interface_description()->concrete_io_destroy(http_io); } END_TEST_SUITE(http_proxy_io_unittests) main.c000066400000000000000000000005061362133436400351270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/http_proxy_io_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(http_proxy_io_unittests, failedTestCount); return failedTestCount; } httpapicompact_ut/000077500000000000000000000000001362133436400341475ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000011621362133436400367070ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpapicompact_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(NOT ${use_http}) message(FATAL_ERROR "httpapi_compact_ut being generated without HTTP support") endif() set(theseTestsName httpapi_compact_ut) set(${theseTestsName}_test_files httpapicompact_ut.c ) set(${theseTestsName}_c_files ../../adapters/httpapi_compact.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) httpapicompact_ut.c000066400000000000000000005153331362133436400400550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpapicompact_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif static int currentmalloc_call = 0; static int whenShallmalloc_fail = 0; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call >= whenShallmalloc_fail) { currentmalloc_call--; result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void* my_gballoc_realloc(void* ptr, size_t size) { void* newptr = realloc(ptr, size); if (ptr == NULL) { currentmalloc_call++; } return newptr; } void my_gballoc_free(void* ptr) { currentmalloc_call--; free(ptr); } #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "azure_c_shared_utility/macro_utils.h" #define MAX_RECEIVE_BUFFER_SIZES 3 #define HUGE_RELATIVE_PATH_SIZE 10000 #define TEST_CREATE_CONNECTION_HOST_NAME (const char*)"https://test.azure-devices.net" #define TEST_EXECUTE_REQUEST_RELATIVE_PATH (const char*)"/devices/Huzzah_w_DHT22/messages/events?api-version=2016-11-14" #define TEST_EXECUTE_REQUEST_CONTENT (const unsigned char*)"{\"ObjectType\":\"DeviceInfo\", \"Version\":\"1.0\", \"IsSimulatedDevice\":false, \"DeviceProperties\":{\"DeviceID\":\"Huzzah_w_DHT22\", \"HubEnabledState\":true}, \"Commands\":[{ \"Name\":\"SetHumidity\", \"Parameters\":[{\"Name\":\"humidity\",\"Type\":\"int\"}]},{ \"Name\":\"SetTemperature\", \"Parameters\":[{\"Name\":\"temperature\",\"Type\":\"int\"}]}]}" #define TEST_EXECUTE_REQUEST_CONTENT_LENGTH (size_t)320 #define TEST_SETOPTIONS_CERTIFICATE (const unsigned char*)"blah!blah!blah!" #define TEST_SETOPTIONS_X509CLIENTCERT (const unsigned char*)"ADMITONE" #define TEST_SETOPTIONS_X509PRIVATEKEY (const unsigned char*)"SPEAKFRIENDANDENTER" #define TEST_GET_HEADER_HEAD_COUNT (size_t)2 #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/threadapi.h" #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/buffer_.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/httpapi.h" #include "azure_c_shared_utility/shared_util_options.h" static bool current_xioCreate_must_fail = false; XIO_HANDLE my_xio_create(const IO_INTERFACE_DESCRIPTION* io_interface_description, const void* xio_create_parameters) { XIO_HANDLE result; (void)io_interface_description; (void)xio_create_parameters; if (current_xioCreate_must_fail) { result = NULL; } else { result = (XIO_HANDLE)malloc(sizeof(XIO_HANDLE)); } return result; } void my_xio_destroy(XIO_HANDLE xio) { if (xio != NULL) { free(xio); } } static int xio_setoption_shallReturn; int my_xio_setoption(XIO_HANDLE xio, const char* optionName, const void* value) { int result; if ((xio == NULL) || (optionName == NULL) || (value == NULL)) { result = __FAILURE__; } else { result = xio_setoption_shallReturn; } return result; } static int xio_open_shallReturn; static int xio_close_shallReturn; static const int* xio_send_shallReturn; static int xio_send_shallReturn_counter; static char xio_send_transmited_buffer[1024]; static int xio_send_transmited_buffer_target = 0; typedef enum xio_dowork_job_tag { XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_CLOSE, XIO_DOWORK_JOB_ERROR, XIO_DOWORK_JOB_END } xio_dowork_job; static const int xio_send_0[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; static const int xio_send_e[4] = { 123, 123, 123, 123 }; static const int xio_send_0_e[4] = { 0, 123, 0, 0 }; static const int xio_send_00_e[4] = { 0, 0, 123, 0 }; static const int xio_send_7x0[7] = { 0, 0, 0, 0, 0, 0, 0 }; static const int xio_send_6x0_e[7] = { 0, 0, 0, 0, 0, 0, 123 }; static const xio_dowork_job doworkjob_end[1] = { XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_oe[2] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_4none_oe[6] = { XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_4none_ee[6] = { XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_ERROR, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_o_3none_ee[6] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_NONE, XIO_DOWORK_JOB_ERROR, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_oee[3] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_ERROR, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_ose[3] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_ee[2] = { XIO_DOWORK_JOB_ERROR, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_o_re[3] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_o_rce[8] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_CLOSE, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_o_rc_error[9] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_CLOSE, XIO_DOWORK_JOB_ERROR, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_o_rre[4] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_END }; static const xio_dowork_job doworkjob_o_sre[15] = { XIO_DOWORK_JOB_OPEN, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_SEND, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_RECEIVED, XIO_DOWORK_JOB_CLOSE, XIO_DOWORK_JOB_END }; static const IO_OPEN_RESULT openresult_ok[1] = { IO_OPEN_OK }; static const IO_OPEN_RESULT openresult_error[1] = { IO_OPEN_ERROR }; static const IO_SEND_RESULT sendresult_error[1] = { IO_SEND_ERROR }; static const IO_SEND_RESULT sendresult_o_3error[4] = { IO_SEND_OK, IO_SEND_ERROR, IO_SEND_ERROR, IO_SEND_ERROR }; static const IO_SEND_RESULT sendresult_7ok[7] = { IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_OK }; static const IO_SEND_RESULT sendresult_6ok_error[7] = { IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_OK, IO_SEND_ERROR }; static const xio_dowork_job* DoworkJobs = (const xio_dowork_job*)doworkjob_end; static const IO_OPEN_RESULT* DoworkJobsOpenResult; static int SkipDoworkJobsOpenResult; static const IO_SEND_RESULT* DoworkJobsSendResult; static int SkipDoworkJobsSendResult; static bool DoworkJobsCloseSuccess; static int SkipDoworkJobsCloseResult; static bool call_on_io_close_complete_in_xio_close; static ON_IO_OPEN_COMPLETE my_on_io_open_complete; static void* my_on_io_open_complete_context; static ON_IO_CLOSE_COMPLETE my_on_io_close_complete; static void* my_on_io_close_complete_context; static ON_SEND_COMPLETE my_on_send_complete; static void* my_on_send_complete_context; static bool call_on_send_complete_in_xio_send; static ON_BYTES_RECEIVED my_on_bytes_received; static void* my_on_bytes_received_context; static const unsigned char* DoworkJobsReceivedBuffer; static size_t DoworkJobsReceivedBuffer_size[MAX_RECEIVE_BUFFER_SIZES]; static int DoworkJobsReceivedBuffer_counter; static ON_IO_ERROR my_on_io_error; static void* my_on_io_error_context; int my_xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { int result; if ((xio == NULL) || (on_io_open_complete == NULL) || (on_io_open_complete_context == NULL) || (on_bytes_received == NULL) || (on_bytes_received_context == NULL) || (on_io_error == NULL) || (on_io_error_context == NULL)) { result = __FAILURE__; } else { my_on_io_open_complete = on_io_open_complete; my_on_io_open_complete_context = on_io_open_complete_context; my_on_bytes_received = on_bytes_received; my_on_bytes_received_context = on_bytes_received_context; my_on_io_error = on_io_error; my_on_io_error_context = on_io_error_context; result = xio_open_shallReturn; } if (result == 0) { xio_dowork(xio); } return result; } int my_xio_close(XIO_HANDLE xio, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* on_io_close_complete_context) { int result; if ((xio == NULL) || (on_io_close_complete == NULL) || (on_io_close_complete_context == NULL)) { result = __FAILURE__; } else { my_on_io_close_complete = on_io_close_complete; my_on_io_close_complete_context = on_io_close_complete_context; result = xio_close_shallReturn; if (call_on_io_close_complete_in_xio_close) { my_on_io_close_complete(my_on_io_close_complete_context); } } return result; } int my_xio_send(XIO_HANDLE xio, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { int result; if ((xio == NULL) || (buffer == NULL) || (size == 0)) { result = __FAILURE__; if (call_on_send_complete_in_xio_send) { on_send_complete(callback_context, IO_SEND_ERROR); } } else { my_on_send_complete = on_send_complete; my_on_send_complete_context = callback_context; if (xio_send_transmited_buffer_target > 0) { xio_send_transmited_buffer_target--; if (xio_send_transmited_buffer_target == 0) { (void)memcpy(xio_send_transmited_buffer, buffer, size); } } result = xio_send_shallReturn[xio_send_shallReturn_counter]; xio_send_shallReturn_counter++; if (call_on_send_complete_in_xio_send) { on_send_complete(callback_context, IO_SEND_OK); } } return result; } void my_xio_dowork(XIO_HANDLE xio) { if (xio != NULL) { switch (*DoworkJobs) { case XIO_DOWORK_JOB_NONE: DoworkJobs++; break; case XIO_DOWORK_JOB_OPEN: if ((SkipDoworkJobsOpenResult--) <= 0) { if (my_on_io_open_complete != NULL) { my_on_io_open_complete(my_on_io_open_complete_context, (*DoworkJobsOpenResult)); } DoworkJobs++; DoworkJobsOpenResult++; SkipDoworkJobsOpenResult = 0; } break; case XIO_DOWORK_JOB_SEND: if ((SkipDoworkJobsSendResult--) <= 0) { if (my_on_send_complete != NULL) { my_on_send_complete(my_on_send_complete_context, (*DoworkJobsSendResult)); } DoworkJobs++; DoworkJobsSendResult++; SkipDoworkJobsSendResult = 0; } break; case XIO_DOWORK_JOB_RECEIVED: if (my_on_bytes_received != NULL) { my_on_bytes_received(my_on_bytes_received_context, DoworkJobsReceivedBuffer, DoworkJobsReceivedBuffer_size[DoworkJobsReceivedBuffer_counter]); } DoworkJobs++; if (DoworkJobsReceivedBuffer_counter < MAX_RECEIVE_BUFFER_SIZES-1) { DoworkJobsReceivedBuffer_counter++; } break; case XIO_DOWORK_JOB_CLOSE: if ((SkipDoworkJobsCloseResult--) <= 0) { if(DoworkJobsCloseSuccess) { my_on_io_close_complete(my_on_io_close_complete_context); } DoworkJobs++; SkipDoworkJobsCloseResult = 0; } break; case XIO_DOWORK_JOB_ERROR: if (my_on_io_error != NULL) { my_on_io_error(my_on_io_error_context); } DoworkJobs++; break; default: break; } } } HTTP_HEADERS_HANDLE my_HTTPHeaders_Alloc(void) { return (HTTP_HEADERS_HANDLE)malloc(1); } void my_HTTPHeaders_Free(HTTP_HEADERS_HANDLE handle) { free(handle); } static BUFFER_HANDLE TestBufferHandle; BUFFER_HANDLE my_BUFFER_new(void) { return (BUFFER_HANDLE)malloc(1); } void my_BUFFER_delete(BUFFER_HANDLE handle) { free(handle); } static HTTP_HEADERS_RESULT HTTPHeaders_GetHeaderCount_shallReturn; HTTP_HEADERS_RESULT my_HTTPHeaders_GetHeaderCount(HTTP_HEADERS_HANDLE handle, size_t* headerCount) { HTTP_HEADERS_RESULT result; if (handle == NULL) { result = HTTP_HEADERS_ERROR; } else { (*headerCount) = TEST_GET_HEADER_HEAD_COUNT; result = HTTPHeaders_GetHeaderCount_shallReturn; } return result; } static HTTP_HEADERS_RESULT HTTPHeaders_GetHeader_shallReturn; HTTP_HEADERS_RESULT my_HTTPHeaders_GetHeader(HTTP_HEADERS_HANDLE handle, size_t index, char** destination) { HTTP_HEADERS_RESULT result; if ((handle == NULL) || (destination == NULL) || (index > TEST_GET_HEADER_HEAD_COUNT)) { result = HTTP_HEADERS_INVALID_ARG; } else { *destination = (char*)malloc(11 * sizeof(char)); strcpy(*destination, "0123456789"); result = HTTPHeaders_GetHeaderCount_shallReturn; } return result; } static const IO_INTERFACE_DESCRIPTION default_tlsio = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; const IO_INTERFACE_DESCRIPTION* my_platform_get_default_tlsio(void) { return &default_tlsio; } static void createHttpObjects(HTTP_HEADERS_HANDLE* requestHttpHeaders, HTTP_HEADERS_HANDLE* responseHttpHeaders) { STRICT_EXPECTED_CALL(HTTPHeaders_Alloc()); STRICT_EXPECTED_CALL(gballoc_malloc(1)); STRICT_EXPECTED_CALL(HTTPHeaders_Alloc()); STRICT_EXPECTED_CALL(gballoc_malloc(1)); /*assumed to never fail*/ *requestHttpHeaders = HTTPHeaders_Alloc(); *responseHttpHeaders = HTTPHeaders_Alloc(); if ( (*requestHttpHeaders == NULL) || (*responseHttpHeaders == NULL) ) { ASSERT_FAIL("unable to build test prerequisites"); } } static void destroyHttpObjects(HTTP_HEADERS_HANDLE* requestHttpHeaders, HTTP_HEADERS_HANDLE* responseHttpHeaders) { STRICT_EXPECTED_CALL(HTTPHeaders_Free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(HTTPHeaders_Free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); HTTPHeaders_Free(*requestHttpHeaders); *requestHttpHeaders = NULL; HTTPHeaders_Free(*responseHttpHeaders); *responseHttpHeaders = NULL; } static HTTP_HANDLE createHttpConnection(void) { xio_open_shallReturn = 0; xio_send_shallReturn_counter = 0; xio_send_shallReturn = (const int*)xio_send_0; my_on_io_open_complete = NULL; my_on_io_open_complete_context = NULL; my_on_io_close_complete = NULL; my_on_io_close_complete_context = NULL; my_on_send_complete = NULL; my_on_send_complete_context = NULL; my_on_bytes_received = NULL; my_on_bytes_received_context = NULL; my_on_io_error = NULL; my_on_io_error_context = NULL; HTTPHeaders_GetHeaderCount_shallReturn = HTTP_HEADERS_OK; xio_setoption_shallReturn = 0; current_xioCreate_must_fail = false; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(platform_get_default_tlsio()); STRICT_EXPECTED_CALL(xio_create(&default_tlsio, IGNORED_PTR_ARG)).IgnoreArgument(2); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); HTTPAPI_Init(); return HTTPAPI_CreateConnection(TEST_CREATE_CONNECTION_HOST_NAME); /* currentmalloc_call += 2 */ } static void setHttpCertificate(HTTP_HANDLE httpHandle) { STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); /*Tests_SRS_HTTPAPI_COMPACT_21_056: [ The HTTPAPI_SetOption shall change the HTTP options. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_057: [ The HTTPAPI_SetOption shall receive a handle that identiry the HTTP connection. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_058: [ The HTTPAPI_SetOption shall receive the option as a pair optionName/value. ]*/ HTTPAPI_SetOption(httpHandle, "TrustedCerts", TEST_SETOPTIONS_CERTIFICATE); /* currentmalloc_call += 1 */ } static void setHttpx509ClientCertificateAndKey(HTTP_HANDLE httpHandle) { STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); /*Tests_SRS_HTTPAPI_COMPACT_21_056: [ The HTTPAPI_SetOption shall change the HTTP options. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_057: [ The HTTPAPI_SetOption shall receive a handle that identiry the HTTP connection. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_058: [ The HTTPAPI_SetOption shall receive the option as a pair optionName/value. ]*/ HTTPAPI_SetOption(httpHandle, SU_OPTION_X509_CERT, TEST_SETOPTIONS_X509CLIENTCERT); /* currentmalloc_call += 1 */ HTTPAPI_SetOption(httpHandle, SU_OPTION_X509_PRIVATE_KEY, TEST_SETOPTIONS_X509PRIVATEKEY); /* currentmalloc_call += 1 */ } static void setupAllCallBeforeOpenHTTPsequence(HTTP_HEADERS_HANDLE requestHttpHeaders, int numberOfDoWork, bool useClientCert) { int i; STRICT_EXPECTED_CALL(HTTPHeaders_GetHeaderCount(requestHttpHeaders, IGNORED_PTR_ARG)) .IgnoreArgument(2); STRICT_EXPECTED_CALL(xio_setoption(IGNORED_PTR_ARG, "TrustedCerts", TEST_SETOPTIONS_CERTIFICATE)) .IgnoreArgument(1) .IgnoreArgument(3); if (useClientCert == true) { STRICT_EXPECTED_CALL(xio_setoption(IGNORED_PTR_ARG, SU_OPTION_X509_CERT, TEST_SETOPTIONS_X509CLIENTCERT)) .IgnoreArgument(1) .IgnoreArgument(3); STRICT_EXPECTED_CALL(xio_setoption(IGNORED_PTR_ARG, SU_OPTION_X509_PRIVATE_KEY, TEST_SETOPTIONS_X509PRIVATEKEY)) .IgnoreArgument(1) .IgnoreArgument(3); } STRICT_EXPECTED_CALL(xio_open(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); for (i = 0; i < numberOfDoWork; i++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); if (i > 0) { STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } } } #define TEST_RECEIVED_ANSWER (const unsigned char*)"HTTP/111.222 433 555\r\ncontent-length:10\r\ntransfer-encoding:\r\n\r\n0123456789\r\n\r\n" static void setupAllCallBeforeReceiveHTTPsequenceWithSuccess() { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, DoworkJobsReceivedBuffer_size[0])).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_AddHeaderNameValuePair(IGNORED_PTR_ARG, "content-length", "10")).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_AddHeaderNameValuePair(IGNORED_PTR_ARG, "transfer-encoding", "")).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); } static void setupAllCallBeforeSendHTTPsequenceWithSuccess(HTTP_HEADERS_HANDLE requestHttpHeaders) { STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); } #define TEST_HEAD_RECEIVED_ANSWER (const unsigned char*)"HTTP/111.222 433 555\r\ncontent-length:10\r\ntransfer-encoding:\r\n\r\n" static void setupAllCallBeforeReceiveHTTPHeadsequenceWithSuccess() { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, DoworkJobsReceivedBuffer_size[0])); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(HTTPHeaders_AddHeaderNameValuePair(IGNORED_PTR_ARG, "content-length", "10")); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(HTTPHeaders_AddHeaderNameValuePair(IGNORED_PTR_ARG, "transfer-encoding", "")); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); } static const IO_OPEN_RESULT* DoworkJobsOpenResult_ReceiveHead = (const IO_OPEN_RESULT*)openresult_ok; static const IO_SEND_RESULT* DoworkJobsSendResult_ReceiveHead = (const IO_SEND_RESULT*) sendresult_7ok; static void PrepareReceiveHead(HTTP_HEADERS_HANDLE requestHttpHeaders, size_t bufferSize[], int doworkReduction[], int countSizes) { int countBuffer; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); for (countBuffer = 0; countBuffer < countSizes; countBuffer++) { int countChar; if (countBuffer > 0) { STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, bufferSize[countBuffer])).IgnoreArgument(1); for (countChar = 0; countChar < doworkReduction[countBuffer]; countChar++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); } STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); } HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; } IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT_VALUES); static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(httpapicompact_ut) TEST_SUITE_INITIALIZE(setsBufferTempSize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); TestBufferHandle = BUFFER_new(); ASSERT_IS_NULL(TestBufferHandle); REGISTER_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT); REGISTER_UMOCK_ALIAS_TYPE(HTTP_HEADERS_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(XIO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_SEND_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_CLOSE_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_OPEN_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_ERROR, void*); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(xio_create, my_xio_create); REGISTER_GLOBAL_MOCK_HOOK(xio_destroy, my_xio_destroy); REGISTER_GLOBAL_MOCK_HOOK(xio_setoption, my_xio_setoption); REGISTER_GLOBAL_MOCK_HOOK(xio_open, my_xio_open); REGISTER_GLOBAL_MOCK_HOOK(xio_close, my_xio_close); REGISTER_GLOBAL_MOCK_HOOK(xio_send, my_xio_send); REGISTER_GLOBAL_MOCK_HOOK(xio_dowork, my_xio_dowork); REGISTER_GLOBAL_MOCK_RETURN(HTTPHeaders_AddHeaderNameValuePair, HTTP_HEADERS_OK); REGISTER_GLOBAL_MOCK_HOOK(HTTPHeaders_Alloc, my_HTTPHeaders_Alloc); REGISTER_GLOBAL_MOCK_HOOK(HTTPHeaders_Free, my_HTTPHeaders_Free); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_new, my_BUFFER_new); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_delete, my_BUFFER_delete); REGISTER_GLOBAL_MOCK_HOOK(HTTPHeaders_GetHeaderCount, my_HTTPHeaders_GetHeaderCount); REGISTER_GLOBAL_MOCK_HOOK(HTTPHeaders_GetHeader, my_HTTPHeaders_GetHeader); REGISTER_GLOBAL_MOCK_HOOK(platform_get_default_tlsio, my_platform_get_default_tlsio); } TEST_SUITE_CLEANUP(TestClassCleanup) { BUFFER_delete(TestBufferHandle); umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(f) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; xio_send_transmited_buffer[0] = '\0'; call_on_send_complete_in_xio_send = true; SkipDoworkJobsOpenResult = 0; SkipDoworkJobsCloseResult = 0; SkipDoworkJobsSendResult = 0; xio_close_shallReturn = 0; DoworkJobsCloseSuccess = true; call_on_io_close_complete_in_xio_close = true; } TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* HTTPAPI_Init */ /*Tests_SRS_HTTPAPI_COMPACT_21_001: [ The httpapi_compact shall implement the methods defined by the `httpapi.h`. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_002: [ The httpapi_compact shall support the http requests. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_003: [ The httpapi_compact shall return error codes defined by HTTPAPI_RESULT. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_004: [ The HTTPAPI_Init shall allocate all memory to control the http protocol. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_007: [ If there is not enough memory to control the http protocol, the HTTPAPI_Init shall return HTTPAPI_ALLOC_FAILED. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_006: [ If HTTPAPI_Init succeed allocating all the needed memory, it shall return HTTPAPI_OK. ]*/ TEST_FUNCTION(HTTPAPI_Init__always_return_HTTPAPI_OK_Succeed) { /// arrange int result; /// act result = HTTPAPI_Init(); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); /// cleanup //none } /* HTTPAPI_Deinit */ /*Tests_SRS_HTTPAPI_COMPACT_21_009: [ The HTTPAPI_Init shall release all memory allocated by the httpapi_compact. ]*/ TEST_FUNCTION(HTTPAPI_Deinit__just_call_Succeed) { /// arrange HTTPAPI_Init(); /// act HTTPAPI_Deinit(); /// assert //none /// cleanup //none } /* HTTPAPI_CreateConnection */ /*Tests_SRS_HTTPAPI_COMPACT_21_014: [ If the hostName is NULL, the HTTPAPI_CreateConnection shall return NULL as the handle. ]*/ TEST_FUNCTION(HTTPAPI_CreateConnection__hostName_NULL_Failed) { /// arrange HTTP_HANDLE httpHandle; HTTPAPI_Init(); current_xioCreate_must_fail = false; /// act httpHandle = HTTPAPI_CreateConnection(NULL); /* currentmalloc_call += 0 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); ASSERT_IS_NULL(httpHandle); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_015: [ If the hostName is empty, the HTTPAPI_CreateConnection shall return NULL as the handle. ]*/ TEST_FUNCTION(HTTPAPI_CreateConnection__empty_hostName_Failed) { /// arrange const char* hostName = ""; HTTP_HANDLE httpHandle; HTTPAPI_Init(); current_xioCreate_must_fail = false; /// act httpHandle = HTTPAPI_CreateConnection(hostName); /* currentmalloc_call += 0 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); ASSERT_IS_NULL(httpHandle); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_011: [ The HTTPAPI_CreateConnection shall create an http connection to the host specified by the hostName parameter. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_012: [ The HTTPAPI_CreateConnection shall return a non-NULL handle on success. ]*/ TEST_FUNCTION(HTTPAPI_CreateConnection__valid_hostName_Succeed) { /// arrange HTTP_HANDLE httpHandle; HTTPAPI_Init(); current_xioCreate_must_fail = false; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(platform_get_default_tlsio()); STRICT_EXPECTED_CALL(xio_create(&default_tlsio, IGNORED_PTR_ARG)).IgnoreArgument(2); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); /// act httpHandle = HTTPAPI_CreateConnection(TEST_CREATE_CONNECTION_HOST_NAME); /* currentmalloc_call += 2 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); ASSERT_IS_NOT_NULL(httpHandle); /// cleanup HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_013: [ If there is not enough memory to control the http connection, the HTTPAPI_CreateConnection shall return NULL as the handle. ]*/ TEST_FUNCTION(HTTPAPI_CreateConnection__no_enough_memory_failed) { /// arrange HTTP_HANDLE httpHandle; current_xioCreate_must_fail = false; whenShallmalloc_fail = 1; HTTPAPI_Init(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); /// act httpHandle = HTTPAPI_CreateConnection(TEST_CREATE_CONNECTION_HOST_NAME); /* currentmalloc_call += 2 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); ASSERT_IS_NULL(httpHandle); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_016: [ If the HTTPAPI_CreateConnection failed to create the connection, it shall return NULL as the handle. ]*/ TEST_FUNCTION(HTTPAPI_CreateConnection__create_xio_connection_failed) { /// arrange HTTP_HANDLE httpHandle; current_xioCreate_must_fail = true; HTTPAPI_Init(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(platform_get_default_tlsio()); STRICT_EXPECTED_CALL(xio_create(&default_tlsio, IGNORED_PTR_ARG)).IgnoreArgument(2); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_NUM_ARG)).IgnoreArgument(1); /// act httpHandle = HTTPAPI_CreateConnection(TEST_CREATE_CONNECTION_HOST_NAME); /* currentmalloc_call += 2 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); ASSERT_IS_NULL(httpHandle); /// cleanup HTTPAPI_Deinit(); } /* HTTPAPI_CloseConnection */ /*Tests_SRS_HTTPAPI_COMPACT_21_017: [ The HTTPAPI_CloseConnection shall close the connection previously created in HTTPAPI_ExecuteRequest. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_076: [ After close the connection, The HTTPAPI_CloseConnection shall destroy the connection previously created in HTTPAPI_CreateConnection. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__valid_hostName_Succeed) { /// arrange HTTP_HANDLE httpHandle = createHttpConnection(); STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_020: [ If the connection handle is NULL, the HTTPAPI_CloseConnection shall not do anything. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__handle_NULL_Succeed) { /// arrange HTTP_HANDLE httpHandle = NULL; HTTPAPI_Init(); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 0 */ /// assert ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_018: [ If there is a certificate associated to this connection, the HTTPAPI_CloseConnection shall free all allocated memory for the certificate. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__free_certificate_memory_succeed) { /// arrange HTTP_HANDLE httpHandle = createHttpConnection(); setHttpCertificate(httpHandle); STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_06_001: [ If there is a x509 client certificate associated to this connection, the HTTAPI_CloseConnection shall free all allocated memory for the certificate. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_06_002: [ If there is a x509 client private key associated to this connection, then HTTP_CloseConnection shall free all the allocated memory for the private key. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__free_x509client_memory_succeed) { /// arrange HTTP_HANDLE httpHandle = createHttpConnection(); setHttpx509ClientCertificateAndKey(httpHandle); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) // From the xio destroy .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) // the cert .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) // the key .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) // the instance. .IgnoreArgument(1); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_087: [ If the xio return anything different than 0, the HTTPAPI_CloseConnection shall destroy the connection anyway. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__return_LINE_failed) { /// arrange HTTP_HANDLE httpHandle = createHttpConnection(); xio_close_shallReturn = __FAILURE__; DoworkJobsCloseSuccess = true; SkipDoworkJobsCloseResult = 0; call_on_io_close_complete_in_xio_close = true; STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_084: [ The HTTPAPI_CloseConnection shall wait, at least, 10 seconds for the SSL close process. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_086: [ The HTTPAPI_CloseConnection shall wait, at least, 100 milliseconds between retries. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__close_on_dowork_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_close_shallReturn = 0; DoworkJobsCloseSuccess = true; SkipDoworkJobsCloseResult = 0; call_on_io_close_complete_in_xio_close = false; STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_084: [ The HTTPAPI_CloseConnection shall wait, at least, 10 seconds for the SSL close process. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__close_on_dowork_retry_n_succeed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_close_shallReturn = 0; DoworkJobsCloseSuccess = true; SkipDoworkJobsCloseResult = 90; call_on_io_close_complete_in_xio_close = false; STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); for (i = 0; i < SkipDoworkJobsCloseResult; i++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_084: [ The HTTPAPI_CloseConnection shall wait, at least, 10 seconds for the SSL close process. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__close_on_dowork_retry_n_failed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rc_error; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_close_shallReturn = 0; DoworkJobsCloseSuccess = false; SkipDoworkJobsCloseResult = 90; call_on_io_close_complete_in_xio_close = false; STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); for (i = 0; i < SkipDoworkJobsCloseResult + 1; i++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_085: [ If the HTTPAPI_CloseConnection retries 10 seconds to close the connection without success, it shall destroy the connection anyway. ]*/ TEST_FUNCTION(HTTPAPI_CloseConnection__close_timeout_failed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_close_shallReturn = 0; DoworkJobsCloseSuccess = true; SkipDoworkJobsCloseResult = 101; call_on_io_close_complete_in_xio_close = false; STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); for (i = 0; i < SkipDoworkJobsCloseResult; i++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); /// act HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /* HTTPAPI_ExecuteRequest */ /*Tests_SRS_HTTPAPI_COMPACT_21_034: [ If there is no previous connection, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__NULL_handle_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /// act result = HTTPAPI_ExecuteRequest( (HTTP_HANDLE)NULL, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_037: [ If the request type is unknown, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__invalid_request_type_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /// act result = HTTPAPI_ExecuteRequest( httpHandle, (HTTPAPI_REQUEST_TYPE)COUNT_ARG(HTTPAPI_REQUEST_TYPE_VALUES), TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 4, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_039: [ If the relativePath is NULL or invalid, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__NULL_relative_path_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, NULL, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 4, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_041: [ If the httpHeadersHandle is NULL or invalid, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__NULL_http_headers_handle_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, (HTTP_HEADERS_HANDLE)NULL, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 4, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_041: [ If the httpHeadersHandle is NULL or invalid, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__invalid_http_headers_handle_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); HTTPHeaders_GetHeaderCount_shallReturn = HTTP_HEADERS_INVALID_ARG; STRICT_EXPECTED_CALL(HTTPHeaders_GetHeaderCount(requestHttpHeaders, IGNORED_PTR_ARG)) .IgnoreArgument(2); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 4, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_054: [ If Http header maker cannot provide the number of headers, the HTTPAPI_ExecuteRequest shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__http_headers_handle_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); HTTPHeaders_GetHeaderCount_shallReturn = HTTP_HEADERS_ERROR; STRICT_EXPECTED_CALL(HTTPHeaders_GetHeaderCount(requestHttpHeaders, IGNORED_PTR_ARG)) .IgnoreArgument(2); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 4, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_023: [ If the transport failed setting the Certificate, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__certificate_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); xio_setoption_shallReturn = __FAILURE__; STRICT_EXPECTED_CALL(HTTPHeaders_GetHeaderCount(requestHttpHeaders, IGNORED_PTR_ARG)) .IgnoreArgument(2); STRICT_EXPECTED_CALL(xio_setoption(IGNORED_PTR_ARG, "TrustedCerts", TEST_SETOPTIONS_CERTIFICATE)) .IgnoreArgument(1) .IgnoreArgument(3); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SET_OPTION_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_06_005: [ If the transport failed setting the client certificate, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__x509client_certificate_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); HTTPAPI_SetOption(httpHandle, SU_OPTION_X509_CERT, TEST_SETOPTIONS_X509CLIENTCERT); /* currentmalloc_call += 1 */ xio_setoption_shallReturn = __FAILURE__; STRICT_EXPECTED_CALL(HTTPHeaders_GetHeaderCount(requestHttpHeaders, IGNORED_PTR_ARG)) .IgnoreArgument(2); STRICT_EXPECTED_CALL(xio_setoption(IGNORED_PTR_ARG, SU_OPTION_X509_CERT, TEST_SETOPTIONS_X509CLIENTCERT)) .IgnoreArgument(1) .IgnoreArgument(3); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SET_OPTION_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_06_006: [ If the transport failed setting the client certificate private key, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_SET_OPTION_FAILED. ] */ TEST_FUNCTION(HTTPAPI_ExecuteRequest__x509client_privatekey_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); HTTPAPI_SetOption(httpHandle, SU_OPTION_X509_PRIVATE_KEY, TEST_SETOPTIONS_X509PRIVATEKEY); /* currentmalloc_call += 1 */ xio_setoption_shallReturn = __FAILURE__; STRICT_EXPECTED_CALL(HTTPHeaders_GetHeaderCount(requestHttpHeaders, IGNORED_PTR_ARG)) .IgnoreArgument(2); STRICT_EXPECTED_CALL(xio_setoption(IGNORED_PTR_ARG, SU_OPTION_X509_PRIVATE_KEY, TEST_SETOPTIONS_X509PRIVATEKEY)) .IgnoreArgument(1) .IgnoreArgument(3); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SET_OPTION_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_052: [ If any memory allocation get fail, the HTTPAPI_ExecuteRequest shall return HTTPAPI_ALLOC_FAILED. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_062: [ If any memory allocation get fail, the HTTPAPI_SetOption shall return HTTPAPI_ALLOC_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__certificate_out_of_memory_failed) { /// arrange HTTPAPI_RESULT result; HTTP_HANDLE httpHandle = createHttpConnection(); xio_setoption_shallReturn = 0; whenShallmalloc_fail = 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); /// act result = HTTPAPI_SetOption(httpHandle, "TrustedCerts", TEST_SETOPTIONS_CERTIFICATE); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_ALLOC_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_064: [ If the HTTPAPI_SetOption get success setting the option, it shall return HTTPAPI_OK. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__certificate_succeed) { /// arrange HTTPAPI_RESULT result; HTTP_HANDLE httpHandle = createHttpConnection(); xio_setoption_shallReturn = 0; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); /// act result = HTTPAPI_SetOption(httpHandle, "TrustedCerts", TEST_SETOPTIONS_CERTIFICATE); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 3, currentmalloc_call); /// cleanup HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_059: [ If the handle is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__certificate_NULL_handle_failed) { /// arrange HTTPAPI_RESULT result; /// act result = HTTPAPI_SetOption(NULL, "TrustedCerts", TEST_SETOPTIONS_CERTIFICATE); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); /// cleanup } /*Tests_SRS_HTTPAPI_COMPACT_21_060: [ If the optionName is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__certificate_NULL_optionName_failed) { /// arrange HTTPAPI_RESULT result; HTTP_HANDLE httpHandle = createHttpConnection(); xio_setoption_shallReturn = 0; /// act result = HTTPAPI_SetOption(httpHandle, NULL, TEST_SETOPTIONS_CERTIFICATE); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_063: [ If the HTTP do not support the optionName, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__certificate_invalid_optionName_failed) { /// arrange HTTPAPI_RESULT result; HTTP_HANDLE httpHandle = createHttpConnection(); xio_setoption_shallReturn = 0; /// act result = HTTPAPI_SetOption(httpHandle, "InvalidOptionName", TEST_SETOPTIONS_CERTIFICATE); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_061: [ If the value is NULL, the HTTPAPI_SetOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__certificate_NULL_value_failed) { /// arrange HTTPAPI_RESULT result; HTTP_HANDLE httpHandle = createHttpConnection(); xio_setoption_shallReturn = 0; /// act result = HTTPAPI_SetOption(httpHandle, "TrustedCerts", NULL); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 2, currentmalloc_call); /// cleanup HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 2 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_052: [ If any memory allocation get fail, the HTTPAPI_ExecuteRequest shall return HTTPAPI_ALLOC_FAILED. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_070: [ If any memory allocation get fail, the HTTPAPI_CloneOption shall return HTTPAPI_ALLOC_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__clone_certificate_out_of_memory_failed) { /// arrange HTTPAPI_RESULT result; unsigned char* cloneCertificate; whenShallmalloc_fail = 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); /// act result = HTTPAPI_CloneOption("TrustedCerts", TEST_SETOPTIONS_CERTIFICATE, (const void**)&cloneCertificate); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_ALLOC_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup } /*Tests_SRS_HTTPAPI_COMPACT_21_065: [ The HTTPAPI_CloneOption shall provide the means to clone the HTTP option. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_066: [ The HTTPAPI_CloneOption shall return a clone of the value identified by the optionName. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_072: [ If the HTTPAPI_CloneOption get success setting the option, it shall return HTTPAPI_OK. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__clone_certificate_succeed) { /// arrange HTTPAPI_RESULT result; unsigned char* cloneCertificate; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); /// act result = HTTPAPI_CloneOption("TrustedCerts", TEST_SETOPTIONS_CERTIFICATE, (const void**)&cloneCertificate); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(char_ptr, (char*)TEST_SETOPTIONS_CERTIFICATE, (char*)cloneCertificate); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 1, currentmalloc_call); /// cleanup free((void*)cloneCertificate); } /*Tests_SRS_HTTPAPI_COMPACT_21_067: [ If the optionName is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__clone_certificate_NULL_optionName_failed) { /// arrange HTTPAPI_RESULT result; unsigned char* cloneCertificate; /// act result = HTTPAPI_CloneOption(NULL, TEST_SETOPTIONS_CERTIFICATE, (const void**)&cloneCertificate); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup } /*Tests_SRS_HTTPAPI_COMPACT_21_068: [ If the value is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__clone_certificate_NULL_value_failed) { /// arrange HTTPAPI_RESULT result; unsigned char* cloneCertificate; /// act result = HTTPAPI_CloneOption("TrustedCerts", NULL, (const void**)&cloneCertificate); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup } /*Tests_SRS_HTTPAPI_COMPACT_21_069: [ If the savedValue is NULL, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__clone_certificate_NULL_savadValue_failed) { /// arrange HTTPAPI_RESULT result; /// act result = HTTPAPI_CloneOption("TrustedCerts", TEST_SETOPTIONS_CERTIFICATE, NULL); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup } /*Tests_SRS_HTTPAPI_COMPACT_21_071: [ If the HTTP do not support the optionName, the HTTPAPI_CloneOption shall return HTTPAPI_INVALID_ARG. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__clone_certificate_invalid_optionName_failed) { /// arrange HTTPAPI_RESULT result; unsigned char* cloneCertificate; /// act result = HTTPAPI_CloneOption("InvalidOptionName", TEST_SETOPTIONS_CERTIFICATE, (const void**)&cloneCertificate); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_INVALID_ARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, currentmalloc_call); /// cleanup } /*Tests_SRS_HTTPAPI_COMPACT_21_025: [ If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__xoi_open_returns_LINE_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); xio_open_shallReturn = __FAILURE__; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 0, false); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OPEN_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_025: [ If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_io_open_complete_with_error_on_openning_failed) { /// arrange HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle; unsigned int statusCode; createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); httpHandle = createHttpConnection(); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_error; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OPEN_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_025: [ If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_io_open_complete_with_error_on_working_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*) doworkjob_4none_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_error; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 5, false); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OPEN_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_077: [ The HTTPAPI_ExecuteRequest shall wait, at least, 10 seconds for the SSL open process. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_078: [ If the HTTPAPI_ExecuteRequest cannot open the connection in 10 seconds, it shall fail and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_io_open_complete_with_error_after_n_retry_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_4none_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_error; SkipDoworkJobsOpenResult = 5; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, SkipDoworkJobsOpenResult+5, false); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OPEN_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_077: [ The HTTPAPI_ExecuteRequest shall wait, at least, 10 seconds for the SSL open process. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_078: [ If the HTTPAPI_ExecuteRequest cannot open the connection in 10 seconds, it shall fail and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_io_open_complete_with_timeout_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_4none_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; SkipDoworkJobsOpenResult = 98; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, SkipDoworkJobsOpenResult + 4, false); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OPEN_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_025: [ If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_io_error_on_openning_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_ee; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OPEN_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_025: [ If the open process failed, the HTTPAPI_ExecuteRequest shall not send any request and return HTTPAPI_OPEN_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_io_error_on_working_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_4none_ee; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 5, false); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OPEN_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_027: [ If the HTTPAPI_ExecuteRequest cannot create a buffer to send the request, it shall not send any request and return HTTPAPI_STRING_PROCESSING_ERROR. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__huge_relative_path_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); size_t i; char hugeRelativePath[HUGE_RELATIVE_PATH_SIZE]; createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); DoworkJobs = (const xio_dowork_job*)doworkjob_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; setHttpCertificate(httpHandle); setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); for (i = 0; i < HUGE_RELATIVE_PATH_SIZE; i++) { hugeRelativePath[i] = 'a'; } hugeRelativePath[HUGE_RELATIVE_PATH_SIZE - 1] = '\0'; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, hugeRelativePath, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_STRING_PROCESSING_ERROR, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_026: [ If the open process succeed, the HTTPAPI_ExecuteRequest shall send the request message to the host. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_024: [ The HTTPAPI_ExecuteRequest shall open the transport connection with the host to send the request. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_022: [ If a Certificate was provided, the HTTPAPI_ExecuteRequest shall set this option on the transport layer. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_06_003: [ If the x509 client certificate is provided, the HTTPAPI_ExecuteRequest shall set this option on the transport layer. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_06_004: [ If the x509 client certificate private key is provided, the HTTPAPI_ExecuteRequest shall set this optionon the transport layer. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_028: [ If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_SEND_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__io_send_header_return_error_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); DoworkJobs = (const xio_dowork_job*)doworkjob_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; setHttpCertificate(httpHandle); setHttpx509ClientCertificateAndKey(httpHandle); setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, true); xio_send_shallReturn = (const int*)xio_send_e; STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SEND_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 7, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_028: [ If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_SEND_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_send_header_complete_with_success_before_error_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; DoworkJobsSendResult = (const IO_SEND_RESULT*)sendresult_o_3error; xio_send_shallReturn = (const int*)xio_send_0_e; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SEND_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_028: [ If the HTTPAPI_ExecuteRequest cannot send the request header, it shall return HTTPAPI_SEND_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_send_header_complete_with_2_success_before_error_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; DoworkJobsSendResult = (const IO_SEND_RESULT*)sendresult_o_3error; xio_send_shallReturn = (const int*)xio_send_00_e; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SEND_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_079: [ The HTTPAPI_ExecuteRequest shall wait, at least, 20 seconds to send a buffer using the SSL connection. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_080: [ If the HTTPAPI_ExecuteRequest retries to send the message for 20 seconds without success, it shall fail and return HTTPAPI_SEND_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_send_header_complete_timeout_failed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_ose; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; DoworkJobsSendResult = (const IO_SEND_RESULT*)sendresult_o_3error; xio_send_shallReturn = (const int*)xio_send_00_e; call_on_send_complete_in_xio_send = false; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); SkipDoworkJobsSendResult = 200; for (i = 0; i < SkipDoworkJobsSendResult; i++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SEND_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_079: [ The HTTPAPI_ExecuteRequest shall wait, at least, 20 seconds to send a buffer using the SSL connection. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_080: [ If the HTTPAPI_ExecuteRequest retries to send the message for 20 seconds without success, it shall fail and return HTTPAPI_SEND_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_send_header_complete_retry_n_and_failed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_ose; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; DoworkJobsSendResult = (const IO_SEND_RESULT*)sendresult_error; xio_send_shallReturn = (const int*)xio_send_00_e; call_on_send_complete_in_xio_send = false; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); SkipDoworkJobsSendResult = 10; for (i = 0; i < SkipDoworkJobsSendResult; i++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SEND_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_029: [ If the HTTPAPI_ExecuteRequest cannot send the buffer with the request, it shall return HTTPAPI_SEND_REQUEST_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_send_buffer_complete_with_error_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_oe; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; DoworkJobsSendResult = (const IO_SEND_RESULT*)sendresult_6ok_error; xio_send_shallReturn = (const int*)xio_send_6x0_e; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_SEND_REQUEST_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_030: [ At the end of the transmission, the HTTPAPI_ExecuteRequest shall receive the response from the host. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_read_header_failed_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobs = (const xio_dowork_job*)doworkjob_oee; DoworkJobsOpenResult = (const IO_OPEN_RESULT*)openresult_ok; DoworkJobsSendResult = (const IO_SEND_RESULT*)sendresult_7ok; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_READ_DATA_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_read_NULL_header_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = NULL; DoworkJobsReceivedBuffer_size[0] = 10; DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_READ_DATA_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_055: [ If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_read_not_HTTP_header_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTPS/111.222 433 555\r\n"; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, DoworkJobsReceivedBuffer_size[0])).IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_RECEIVE_RESPONSE_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_055: [ If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_read_wrong_URL_header_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; int doworkReduction[1] = { 0 }; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111222 433 555\r\n"; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; PrepareReceiveHead(requestHttpHeaders, DoworkJobsReceivedBuffer_size, doworkReduction, 1); DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_RECEIVE_RESPONSE_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_055: [ If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_read_header_with_no_statusCode_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; int doworkReduction[1] = { 0 }; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111.222\r\n"; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; PrepareReceiveHead(requestHttpHeaders, DoworkJobsReceivedBuffer_size, doworkReduction, 1); DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_RECEIVE_RESPONSE_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_055: [ If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_read_header_incomplete_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; int doworkReduction[1] = { 0 }; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111\r\n"; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; PrepareReceiveHead(requestHttpHeaders, DoworkJobsReceivedBuffer_size, doworkReduction, 1); DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_RECEIVE_RESPONSE_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_055: [ If the HTTPAPI_ExecuteRequest cannot parser the received message, it shall return HTTPAPI_RECEIVE_RESPONSE_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__on_read_multi_header_with_size_0_and_error_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; int doworkReduction[2] = { 0, 0 }; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111\r\n"; DoworkJobsReceivedBuffer_size[0] = 0; DoworkJobsReceivedBuffer_size[1] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; PrepareReceiveHead(requestHttpHeaders, DoworkJobsReceivedBuffer_size, doworkReduction, 2); DoworkJobs = (const xio_dowork_job*)doworkjob_o_rre; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_RECEIVE_RESPONSE_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__read_huge_header_failed) { /// arrange HTTP_HANDLE httpHandle; unsigned int statusCode; HTTPAPI_RESULT result; int doworkReduction[1] = { 0 }; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; size_t i; unsigned char hugeBuffer[3000] = "HTTP/111."; createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); for (i = strlen((const char*)hugeBuffer); i < 3000; i++) { hugeBuffer[i] = 'a'; } hugeBuffer[2995] = '\r'; hugeBuffer[2996] = '\n'; hugeBuffer[2997] = '\r'; hugeBuffer[2998] = '\n'; hugeBuffer[2999] = '\0'; httpHandle = createHttpConnection(); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)hugeBuffer; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; PrepareReceiveHead(requestHttpHeaders, DoworkJobsReceivedBuffer_size, doworkReduction, 1); DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_READ_DATA_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_032: [ If the HTTPAPI_ExecuteRequest cannot read the message with the request result, it shall return HTTPAPI_READ_DATA_FAILED. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__content_length_without_value_failed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; int doworkReduction[1] = { 1 }; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111.222 433 555\r\ncontent-length:\r\n\r\n"; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); PrepareReceiveHead(requestHttpHeaders, DoworkJobsReceivedBuffer_size, doworkReduction, 1); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_READ_DATA_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_031: [ After receive the response, the HTTPAPI_ExecuteRequest shall close the transport connection with the host. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_033: [ If the whole process succeed, the HTTPAPI_ExecuteRequest shall retur HTTPAPI_OK. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_021: [ The HTTPAPI_ExecuteRequest shall execute the http communtication with the provided host, sending a request and reciving the response. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_040: [ The request shall contain the http header provided in httpHeadersHandle parameter. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_042: [ The request can contain the a content message, provided in content parameter. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_046: [ The HTTPAPI_ExecuteRequest shall return the http status reported by the host in the received response. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_047: [ The HTTPAPI_ExecuteRequest shall report the status in the statusCode parameter. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_050: [ If there is a content in the response, the HTTPAPI_ExecuteRequest shall copy it in the responseContent buffer. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_073: [ The message received by the HTTPAPI_ExecuteRequest shall starts with a valid header. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_074: [ After the header, the message received by the HTTPAPI_ExecuteRequest can contain addition information about the content. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_053: [ The HTTPAPI_ExecuteRequest shall produce a set of http header to send to the host. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_077: [ The HTTPAPI_ExecuteRequest shall wait, at least, 10 seconds for the SSL open process. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_retry_open_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; SkipDoworkJobsOpenResult = 97; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, SkipDoworkJobsOpenResult + 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_079: [ The HTTPAPI_ExecuteRequest shall wait, at least, 20 seconds to send a buffer using the SSL connection. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_retry_send_succeed) { /// arrange unsigned int statusCode; int i; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_sre; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; call_on_send_complete_in_xio_send = false; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); SkipDoworkJobsSendResult = 199; for (i = 0; i < SkipDoworkJobsSendResult+1; i++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); } STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_035: [ The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_036: [ The request type shall be provided in the parameter requestType. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_get_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 1; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); xio_send_transmited_buffer[3] = '\0'; ASSERT_ARE_EQUAL(char_ptr, "GET", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_035: [ The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_post_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 1; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_POST, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); xio_send_transmited_buffer[4] = '\0'; ASSERT_ARE_EQUAL(char_ptr, "POST", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_035: [ The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_put_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 1; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_PUT, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); xio_send_transmited_buffer[3] = '\0'; ASSERT_ARE_EQUAL(char_ptr, "PUT", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_035: [ The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_delete_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 1; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_DELETE, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); xio_send_transmited_buffer[6] = '\0'; ASSERT_ARE_EQUAL(char_ptr, "DELETE", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_035: [ The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_patch_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 1; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_PATCH, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); xio_send_transmited_buffer[5] = '\0'; ASSERT_ARE_EQUAL(char_ptr, "PATCH", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_035: [ The HTTPAPI_ExecuteRequest shall execute resquest for types `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_head_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPHeadsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 1; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_HEAD, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); xio_send_transmited_buffer[4] = '\0'; ASSERT_ARE_EQUAL(char_ptr, "HEAD", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_038: [ The HTTPAPI_ExecuteRequest shall execute the resquest for the path in relativePath parameter. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_relative_path_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 1; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); xio_send_transmited_buffer[66] = '\0'; ASSERT_ARE_EQUAL(char_ptr, TEST_EXECUTE_REQUEST_RELATIVE_PATH, &(xio_send_transmited_buffer[4])); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_043: [ If the content is NULL, the HTTPAPI_ExecuteRequest shall send the request without content. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_044: [ If the content is not NULL, the number of bytes in the content shall be provided in contentLength parameter. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_075: [ The message received by the HTTPAPI_ExecuteRequest can contain a body with the message content. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_with_content_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 7; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, (const char*)TEST_EXECUTE_REQUEST_CONTENT, xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_043: [ If the content is NULL, the HTTPAPI_ExecuteRequest shall send the request without content. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_NULL_content_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 7; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, NULL, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, (const char*)"", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_045: [ If the contentLength is lower than one, the HTTPAPI_ExecuteRequest shall send the request without content. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_content_size_0_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 7; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, 0, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, (const char*)"", xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_048: [ If the statusCode is NULL, the HTTPAPI_ExecuteRequest shall report not report any status. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_no_statusCode_succeed) { /// arrange HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, NULL, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_049: [ If responseHeadersHandle is provide, the HTTPAPI_ExecuteRequest shall prepare a Response Header usign the HTTPHeaders_AddHeaderNameValuePair. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_no_responseHeadersHandle_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_GetHeader(requestHttpHeaders, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_send(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, DoworkJobsReceivedBuffer_size[0])).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, NULL, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_051: [ If the responseContent is NULL, the HTTPAPI_ExecuteRequest shall ignore any content in the response. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_responseContent_NULL_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, NULL); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_081: [ The HTTPAPI_ExecuteRequest shall try to read the message with the response up to 20 seconds. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_with_truncated_content_failed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111.222 433 555\r\ncontent-length:10\r\ntransfer-encoding:\r\n\r\n0123"; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, DoworkJobsReceivedBuffer_size[0])).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_AddHeaderNameValuePair(IGNORED_PTR_ARG, "content-length", "10")).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_AddHeaderNameValuePair(IGNORED_PTR_ARG, "transfer-encoding", "")).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); for (i = 0; i < 200; i++) { STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); } STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_READ_DATA_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_081: [ The HTTPAPI_ExecuteRequest shall try to read the message with the response up to 20 seconds. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_with_truncated_parameter_failed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111.222 433 555\r\ncontent-length:10\r\ntransfer-enc"; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, DoworkJobsReceivedBuffer_size[0])).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_AddHeaderNameValuePair(IGNORED_PTR_ARG, "content-length", "10")).IgnoreArgument(1); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); for (i = 0; i < 200; i++) { STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); } HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_READ_DATA_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_21_081: [ The HTTPAPI_ExecuteRequest shall try to read the message with the response up to 20 seconds. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_082: [ If the HTTPAPI_ExecuteRequest retries 20 seconds to receive the message without success, it shall fail and return HTTPAPI_READ_DATA_FAILED. ]*/ /*Tests_SRS_HTTPAPI_COMPACT_21_083: [ The HTTPAPI_ExecuteRequest shall wait, at least, 100 milliseconds between retries. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__Execute_request_with_truncated_header_failed) { /// arrange int i; unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = (const unsigned char*)"HTTP/111.222 "; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_re; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_NUM_ARG, DoworkJobsReceivedBuffer_size[0])).IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); for (i = 0; i < 200; i++) { STRICT_EXPECTED_CALL(ThreadAPI_Sleep(100)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_NUM_ARG)) .IgnoreArgument(1); } HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_GET, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_READ_DATA_FAILED, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } /*Tests_SRS_HTTPAPI_COMPACT_42_088: [ The message received by the HTTPAPI_ExecuteRequest should not contain http body. ]*/ TEST_FUNCTION(HTTPAPI_ExecuteRequest__request_with_no_content_succeed) { /// arrange unsigned int statusCode; HTTPAPI_RESULT result; HTTP_HEADERS_HANDLE requestHttpHeaders; HTTP_HEADERS_HANDLE responseHttpHeaders; HTTP_HANDLE httpHandle = createHttpConnection(); createHttpObjects(&requestHttpHeaders, &responseHttpHeaders); setHttpCertificate(httpHandle); DoworkJobsReceivedBuffer = TEST_HEAD_RECEIVED_ANSWER; DoworkJobsReceivedBuffer_size[0] = strlen((const char*)DoworkJobsReceivedBuffer); DoworkJobsReceivedBuffer_counter = 0; DoworkJobs = (const xio_dowork_job*)doworkjob_o_rce; DoworkJobsOpenResult = DoworkJobsOpenResult_ReceiveHead; DoworkJobsSendResult = DoworkJobsSendResult_ReceiveHead; setupAllCallBeforeOpenHTTPsequence(requestHttpHeaders, 1, false); setupAllCallBeforeSendHTTPsequenceWithSuccess(requestHttpHeaders); setupAllCallBeforeReceiveHTTPHeadsequenceWithSuccess(); HTTPHeaders_GetHeader_shallReturn = HTTP_HEADERS_OK; xio_send_transmited_buffer_target = 7; /// act result = HTTPAPI_ExecuteRequest( httpHandle, HTTPAPI_REQUEST_HEAD, TEST_EXECUTE_REQUEST_RELATIVE_PATH, requestHttpHeaders, TEST_EXECUTE_REQUEST_CONTENT, TEST_EXECUTE_REQUEST_CONTENT_LENGTH, &statusCode, responseHttpHeaders, TestBufferHandle); /// assert ASSERT_ARE_EQUAL(int, HTTPAPI_OK, result); ASSERT_ARE_EQUAL(int, 433, statusCode); ASSERT_ARE_EQUAL(char_ptr, (const char*)TEST_EXECUTE_REQUEST_CONTENT, xio_send_transmited_buffer); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 5, currentmalloc_call); /// cleanup destroyHttpObjects(&requestHttpHeaders, &responseHttpHeaders); /* currentmalloc_call -= 2 */ HTTPAPI_CloseConnection(httpHandle); /* currentmalloc_call -= 3 */ HTTPAPI_Deinit(); } END_TEST_SUITE(httpapicompact_ut) main.c000066400000000000000000000005001362133436400352320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpapicompact_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(httpapicompact_ut, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpapiex_ut/000077500000000000000000000000001362133436400332145ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000013361362133436400357000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpapiex_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(NOT ${use_http}) message(FATAL_ERROR "httpapiex_ut being generated without HTTP support") endif() set(theseTestsName httpapiex_ut ) include_directories(${SHARED_UTIL_REAL_TEST_FOLDER}) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/httpapiex.c ../real_test_files/real_vector.c ../real_test_files/real_crt_abstractions.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) httpapiex_ut.c000066400000000000000000004142041362133436400360240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpapiex_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif static size_t currentmalloc_call = 0; static size_t whenShallmalloc_fail = 0; static size_t currentrealloc_call = 0; static size_t whenShallrealloc_fail = 0; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void* my_gballoc_realloc(void* ptr, size_t size) { void* result; currentrealloc_call++; if (whenShallrealloc_fail > 0) { if (currentrealloc_call == whenShallrealloc_fail) { result = NULL; } else { result = realloc(ptr, size); } } else { result = realloc(ptr, size); } return result; } void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "azure_c_shared_utility/macro_utils.h" #include "umock_c.h" #include "umocktypes_charptr.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/vector.h" #include "azure_c_shared_utility/map.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/httpapi.h" static size_t currentHTTPAPI_SaveOption_call; static size_t whenShallHTTPAPI_SaveOption_fail; static size_t currentBUFFER_content_call; static size_t whenShallBUFFER_content_fail; static size_t currentBUFFER_size_call; static size_t whenShallBUFFER_size_fail; #define N_MAX_FAILS 5 static size_t currentHTTPAPI_CreateConnection_call; static size_t whenShallHTTPAPI_CreateConnection_fail[N_MAX_FAILS]; static size_t currentHTTPAPI_Init_call; static size_t whenShallHTTPAPI_Init_fail[N_MAX_FAILS]; static size_t HTTPAPI_Init_calls; STRING_HANDLE my_STRING_construct(const char* psz) { (void)psz; return (STRING_HANDLE)malloc(1); } void my_STRING_delete(STRING_HANDLE handle) { free(handle); } HTTP_HEADERS_HANDLE my_HTTPHeaders_Alloc(void) { return (HTTP_HEADERS_HANDLE)malloc(1); } void my_HTTPHeaders_Free(HTTP_HEADERS_HANDLE handle) { free(handle); } BUFFER_HANDLE my_BUFFER_new(void) { return (BUFFER_HANDLE)malloc(1); } void my_BUFFER_delete(BUFFER_HANDLE handle) { free(handle); } HTTPAPI_RESULT my_HTTPAPI_Init(void) { HTTPAPI_RESULT result2; size_t i; currentHTTPAPI_Init_call++; for (i = 0; i < N_MAX_FAILS; i++) { if (whenShallHTTPAPI_Init_fail[i] > 0) { if (currentHTTPAPI_Init_call == whenShallHTTPAPI_Init_fail[i]) { break; } } } if (i == N_MAX_FAILS) { HTTPAPI_Init_calls++; result2 = HTTPAPI_OK; } else { result2 = HTTPAPI_ERROR; } return result2; } void my_HTTPAPI_Deinit(void) { HTTPAPI_Init_calls--; } HTTP_HANDLE my_HTTPAPI_CreateConnection(const char* hostName) { HTTP_HANDLE result2; size_t i; (void)hostName; currentHTTPAPI_CreateConnection_call++; for (i = 0; i < N_MAX_FAILS; i++) { if (whenShallHTTPAPI_CreateConnection_fail[i] > 0) { if (currentHTTPAPI_CreateConnection_call == whenShallHTTPAPI_CreateConnection_fail[i]) { result2 = (HTTP_HANDLE)NULL; break; } } } if (i == N_MAX_FAILS) { result2 = (HTTP_HANDLE)malloc(1); } else { result2 = NULL; } return result2; } void my_HTTPAPI_CloseConnection(HTTP_HANDLE handle) { free(handle); } HTTPAPI_RESULT my_HTTPAPI_CloneOption(const char* optionName, const void* value, const void** savedValue) { HTTPAPI_RESULT result2; currentHTTPAPI_SaveOption_call++; if (currentHTTPAPI_SaveOption_call == whenShallHTTPAPI_SaveOption_fail) { result2 = HTTPAPI_ERROR; } else { result2 = HTTPAPI_OK; if (strcmp("someOption", optionName) == 0) { char* temp; temp = (char *)malloc(strlen((const char*)value) + 1); strcpy(temp, (const char*)value); *savedValue = temp; } else if (strcmp("someOption1", optionName) == 0) { char* temp; temp = (char *)malloc(strlen((const char*)value) + 1); strcpy(temp, (const char*)value); *savedValue = temp; } else if (strcmp("someOption2", optionName) == 0) { char* temp; temp = (char *)malloc(strlen((const char*)value) + 1); strcpy(temp, (const char*)value); *savedValue = temp; } else { result2 = HTTPAPI_INVALID_ARG; } } return result2; } #ifdef __cplusplus extern "C" { #endif VECTOR_HANDLE real_VECTOR_create(size_t elementSize); VECTOR_HANDLE real_VECTOR_move(VECTOR_HANDLE handle); void real_VECTOR_destroy(VECTOR_HANDLE handle); /* insertion */ int real_VECTOR_push_back(VECTOR_HANDLE handle, const void* elements, size_t numElements); /* removal */ void real_VECTOR_erase(VECTOR_HANDLE handle, void* elements, size_t numElements); void real_VECTOR_clear(VECTOR_HANDLE handle); /* access */ void* real_VECTOR_element(const VECTOR_HANDLE handle, size_t index); void* real_VECTOR_front(const VECTOR_HANDLE handle); void* real_VECTOR_back(const VECTOR_HANDLE handle); void* real_VECTOR_find_if(const VECTOR_HANDLE handle, PREDICATE_FUNCTION pred, const void* value); /* capacity */ size_t real_VECTOR_size(const VECTOR_HANDLE handle); int real_mallocAndStrcpy_s(char** destination, const char* source); int real_size_tToString(char* destination, size_t destinationSize, size_t value); #ifdef __cplusplus } #endif #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/httpapiex.h" IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTPAPI_RESULT, HTTPAPI_RESULT_VALUES); TEST_DEFINE_ENUM_TYPE(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTPAPI_REQUEST_TYPE, HTTPAPI_REQUEST_TYPE_VALUES); #define TEST_HOSTNAME "aaa" #define TEST_RELATIVE_PATH "nothing/to/see/here/devices" #define TEST_REQUEST_HTTP_HEADERS (HTTP_HEADERS_HANDLE) 0x42 #define TEST_REQUEST_BODY (BUFFER_HANDLE) 0x43 #define TEST_RESPONSE_HTTP_HEADERS (HTTP_HEADERS_HANDLE) 0x45 #define TEST_RESPONSE_BODY (BUFFER_HANDLE) 0x46 #define TEST_HTTP_HEADERS_HANDLE (HTTP_HEADERS_HANDLE) 0x47 #define TEST_BUFFER_REQ_BODY (BUFFER_HANDLE) 0x48 #define TEST_BUFFER_RESP_BODY (BUFFER_HANDLE) 0x49 unsigned char* TEST_BUFFER = (unsigned char*)"333333"; #define TEST_BUFFER_SIZE 6 static TEST_MUTEX_HANDLE g_testByTest; static void createHttpObjects(HTTP_HEADERS_HANDLE* requestHttpHeaders, HTTP_HEADERS_HANDLE* responseHttpHeaders) { /*assumed to never fail*/ *requestHttpHeaders = HTTPHeaders_Alloc(); *responseHttpHeaders = HTTPHeaders_Alloc(); if ( (*requestHttpHeaders == NULL) || (*responseHttpHeaders == NULL) ) { ASSERT_FAIL("unable to build test prerequisites"); } } static void destroyHttpObjects(HTTP_HEADERS_HANDLE* requestHttpHeaders, HTTP_HEADERS_HANDLE* responseHttpHeaders) { HTTPHeaders_Free(*requestHttpHeaders); *requestHttpHeaders = NULL; HTTPHeaders_Free(*responseHttpHeaders); *responseHttpHeaders = NULL; } /*this function takes care of setting expected call for httpapiex_executerequest assuming all the parameters are non-null*/ static void setupAllCallBeforeHTTPsequence(void) { /*this is building the host and content-length for the http request headers*/ STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .IgnoreArgument(1).SetReturn(TEST_BUFFER_SIZE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, IGNORED_NUM_ARG, TEST_BUFFER_SIZE)) .IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_ReplaceHeaderNameValuePair(IGNORED_PTR_ARG, "Host", TEST_HOSTNAME)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_ReplaceHeaderNameValuePair(IGNORED_PTR_ARG, "Content-Length", TOSTRING(TEST_BUFFER_SIZE))) .IgnoreArgument(1); } static void setupAllCallForHTTPsequence(const char* relativePath, HTTP_HEADERS_HANDLE requestHttpHeaders, BUFFER_HANDLE requestHttpBody, HTTP_HEADERS_HANDLE responseHttpHeaders, BUFFER_HANDLE responseHttpBody) { size_t requestHttpBodyLength = TEST_BUFFER_SIZE; const unsigned char* requestHttpBodyContent = TEST_BUFFER; STRICT_EXPECTED_CALL(HTTPAPI_Init()); /*this is getting the hostname for the HTTAPI_connect call)*/ STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPAPI_CreateConnection(TEST_HOSTNAME)); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) /*this is passing the options*/ /*there are none saved in the regular sequences*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(BUFFER_length(requestHttpBody)) .SetReturn(TEST_BUFFER_SIZE); STRICT_EXPECTED_CALL(BUFFER_u_char(requestHttpBody)) .SetReturn(TEST_BUFFER); /*this is getting the buffer content and buffer length to pass to httpapi_executerequest*/ STRICT_EXPECTED_CALL(HTTPAPI_ExecuteRequest( IGNORED_PTR_ARG, HTTPAPI_REQUEST_PATCH, relativePath, requestHttpHeaders, requestHttpBodyContent, requestHttpBodyLength, IGNORED_PTR_ARG, responseHttpHeaders, responseHttpBody)) .ValidateArgumentBuffer(5, TEST_BUFFER, TEST_BUFFER_SIZE) .IgnoreArgument(1) .IgnoreArgument(7) ; } /*every time HttpApi_Execute request is executed several things will be auto-aupdated by the code*/ /*request headers to match the content-length, host to match hostname*/ static void prepareHTTPAPIEX_ExecuteRequest(unsigned int *asGivenByHttpApi, HTTP_HEADERS_HANDLE requestHttpHeaders, HTTP_HEADERS_HANDLE responseHttpHeaders, BUFFER_HANDLE responseHttpBody, HTTPAPI_RESULT resultToBeUsed) { /*this is building the host and content-length for the http request headers, this happens every time*/ STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .IgnoreArgument(1).SetReturn(TEST_BUFFER_SIZE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, IGNORED_NUM_ARG, TEST_BUFFER_SIZE)) .IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_ReplaceHeaderNameValuePair(IGNORED_PTR_ARG, "Host", TEST_HOSTNAME)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(HTTPHeaders_ReplaceHeaderNameValuePair(IGNORED_PTR_ARG, "Content-Length", TOSTRING(TEST_BUFFER_SIZE))) .IgnoreArgument(1); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .IgnoreArgument(1).SetReturn(TEST_BUFFER_SIZE); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .IgnoreArgument(1).SetReturn(TEST_BUFFER); STRICT_EXPECTED_CALL(HTTPAPI_ExecuteRequest( IGNORED_PTR_ARG, HTTPAPI_REQUEST_PATCH, TEST_RELATIVE_PATH, requestHttpHeaders, IGNORED_PTR_ARG, TEST_BUFFER_SIZE, IGNORED_PTR_ARG, responseHttpHeaders, responseHttpBody)) .IgnoreArgument(1) .IgnoreArgument(4) .IgnoreArgument(5) .IgnoreArgument(7) .ValidateArgumentBuffer(5, TEST_BUFFER, TEST_BUFFER_SIZE) .CopyOutArgumentBuffer(7, asGivenByHttpApi, sizeof(*asGivenByHttpApi)) .SetReturn(resultToBeUsed); } DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(httpapiex_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_TYPE(HTTPAPI_RESULT, HTTPAPI_RESULT); REGISTER_TYPE(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT); REGISTER_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT); REGISTER_TYPE(HTTPAPI_REQUEST_TYPE, HTTPAPI_REQUEST_TYPE); REGISTER_UMOCK_ALIAS_TYPE(VECTOR_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(const VECTOR_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(PREDICATE_FUNCTION, void*); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(HTTP_HEADERS_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(HTTP_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(const unsigned char*, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(STRING_construct, my_STRING_construct); REGISTER_GLOBAL_MOCK_HOOK(STRING_delete, my_STRING_delete); REGISTER_GLOBAL_MOCK_RETURN(STRING_c_str, TEST_HOSTNAME); REGISTER_GLOBAL_MOCK_HOOK(HTTPHeaders_Alloc, my_HTTPHeaders_Alloc); REGISTER_GLOBAL_MOCK_HOOK(HTTPHeaders_Free, my_HTTPHeaders_Free); REGISTER_GLOBAL_MOCK_RETURN(HTTPHeaders_AddHeaderNameValuePair, HTTP_HEADERS_OK); REGISTER_GLOBAL_MOCK_RETURN(HTTPHeaders_ReplaceHeaderNameValuePair, HTTP_HEADERS_OK); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_new, my_BUFFER_new); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_delete, my_BUFFER_delete); REGISTER_GLOBAL_MOCK_RETURN(BUFFER_u_char, TEST_BUFFER); REGISTER_GLOBAL_MOCK_RETURN(BUFFER_length, TEST_BUFFER_SIZE); REGISTER_GLOBAL_MOCK_HOOK(HTTPAPI_Init, my_HTTPAPI_Init); REGISTER_GLOBAL_MOCK_HOOK(HTTPAPI_Deinit, my_HTTPAPI_Deinit); REGISTER_GLOBAL_MOCK_HOOK(HTTPAPI_CreateConnection, my_HTTPAPI_CreateConnection); REGISTER_GLOBAL_MOCK_HOOK(HTTPAPI_CloseConnection, my_HTTPAPI_CloseConnection); REGISTER_GLOBAL_MOCK_RETURN(HTTPAPI_ExecuteRequest, HTTPAPI_OK); REGISTER_GLOBAL_MOCK_RETURN(HTTPAPI_SetOption, HTTPAPI_OK); REGISTER_GLOBAL_MOCK_HOOK(HTTPAPI_CloneOption, my_HTTPAPI_CloneOption); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_create, real_VECTOR_create); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_move, real_VECTOR_move); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_destroy, real_VECTOR_destroy); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_push_back, real_VECTOR_push_back); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_erase, real_VECTOR_erase); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_clear, real_VECTOR_clear); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_element, real_VECTOR_element); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_front, real_VECTOR_front); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_back, real_VECTOR_back); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_find_if, real_VECTOR_find_if); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_size, real_VECTOR_size); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, real_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_HOOK(size_tToString, real_size_tToString); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { size_t i; if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } currentmalloc_call = 0; whenShallmalloc_fail = 0; currentrealloc_call = 0; whenShallrealloc_fail = 0; currentHTTPAPI_SaveOption_call = 0; whenShallHTTPAPI_SaveOption_fail = 0; currentBUFFER_content_call = 0; whenShallBUFFER_content_fail = 0; currentBUFFER_size_call = 0; whenShallBUFFER_size_fail = 0; HTTPAPI_Init_calls = 0; currentHTTPAPI_CreateConnection_call = 0; for(i=0;i #include #include #else #include #include #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/agenttime.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/sastoken.h" #include "azure_c_shared_utility/httpheaders.h" #include "azure_c_shared_utility/httpapiex.h" #include "azure_c_shared_utility/crt_abstractions.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/httpapiexsas.h" TEST_DEFINE_ENUM_TYPE(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT_VALUES); #define TEST_STRING_HANDLE (STRING_HANDLE)0x46 #define TEST_NULL_STRING_HANDLE (STRING_HANDLE)0x00 #define TEST_KEYNAME_HANDLE (STRING_HANDLE)0x48 #define TEST_KEY_HANDLE (STRING_HANDLE)0x49 #define TEST_URIRESOURCE_HANDLE (STRING_HANDLE)0x50 #define TEST_CLONED_KEYNAME_HANDLE (STRING_HANDLE)0x51 #define TEST_CLONED_URIRESOURCE_HANDLE (STRING_HANDLE)0x52 #define TEST_CLONED_KEY_HANDLE (STRING_HANDLE)0x53 #define TEST_HTTPAPIEX_HANDLE (HTTPAPIEX_HANDLE)0x54 #define TEST_HTTPAPI_REQUEST_TYPE (HTTPAPI_REQUEST_TYPE)0x55 #define TEST_REQUEST_HTTP_HEADERS_HANDLE (HTTP_HEADERS_HANDLE)0x56 #define TEST_REQUEST_CONTENT (BUFFER_HANDLE)0x57 #define TEST_RESPONSE_HTTP_HEADERS_HANDLE (HTTP_HEADERS_HANDLE)0x58 #define TEST_RESPONSE_CONTENT (BUFFER_HANDLE)0x59 #define TEST_CONST_CHAR_STAR_NULL (const char*)NULL #define TEST_SASTOKEN_HANDLE (STRING_HANDLE)0x60 #define TEST_EXPIRY ((size_t)7200) #define TEST_TIME_T ((time_t)-1) static const char* TEST_KEY = "key"; static const char* TEST_URI_RESOURCE = "test_uri"; static const char* TEST_KEY_NAME = "key_name"; static const char TEST_CHAR_ARRAY[10] = "ABCD"; static TEST_MUTEX_HANDLE g_testByTest; static int my_mallocAndStrcpy_s(char** destination, const char* source) { size_t len = strlen(source); *destination = (char*)my_gballoc_malloc(len+1); (void)strcpy(*destination, source); return 0; } static void my_STRING_delete(STRING_HANDLE handle) { my_gballoc_free(handle); } static STRING_HANDLE my_SASToken_CreateString(const char* key, const char* scope, const char* keyName, size_t expiry) { (void)key, (void)scope, (void)keyName, (void)expiry; return (STRING_HANDLE)my_gballoc_malloc(1); } static void setupSASString_Create_happy_path(bool allocateKeyName) { STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); if (allocateKeyName) { STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); } } static void setupSAS_Create_happy_path(bool allocateKeyName) { // HTTPAPIEX_SAS_Create STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_KEY); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_URI_RESOURCE); if (allocateKeyName) { STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_KEY_NAME); } STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); if (allocateKeyName) { STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); } } DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } int umocktypes_copy_time_t(time_t* destination, const time_t* source) { *destination = *source; return 0; } void umocktypes_free_time_t(time_t* value) { (void)value; } char* umocktypes_stringify_time_t(const time_t* value) { char temp_str[32]; char* result; int length = snprintf(temp_str, sizeof(temp_str), "%d", (int)(*value)); if (length <= 0) { result = NULL; } else { result = (char*)malloc(length + 1); (void)memcpy(result, temp_str, length + 1); } return result; } int umocktypes_are_equal_time_t(time_t* left, time_t* right) { int result; if (*left == *right) { result = 1; } else { result = 0; } return result; } IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTPAPI_REQUEST_TYPE, HTTPAPI_REQUEST_TYPE_VALUES); BEGIN_TEST_SUITE(httpapiexsas_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_TYPE(HTTPAPIEX_RESULT, HTTPAPIEX_RESULT); REGISTER_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(HTTP_HEADERS_HANDLE, void*); REGISTER_TYPE(time_t, time_t); REGISTER_UMOCK_ALIAS_TYPE(HTTPAPIEX_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); REGISTER_TYPE(HTTPAPI_REQUEST_TYPE, HTTPAPI_REQUEST_TYPE); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(SASToken_CreateString, my_SASToken_CreateString); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, my_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_RETURN(STRING_c_str, TEST_CONST_CHAR_STAR_NULL); REGISTER_GLOBAL_MOCK_RETURN(STRING_length, 0); REGISTER_GLOBAL_MOCK_HOOK(STRING_delete, my_STRING_delete); REGISTER_GLOBAL_MOCK_RETURN(HTTPAPIEX_ExecuteRequest, HTTPAPIEX_OK); REGISTER_GLOBAL_MOCK_RETURN(HTTPHeaders_FindHeaderValue, TEST_CONST_CHAR_STAR_NULL); REGISTER_GLOBAL_MOCK_RETURN(HTTPHeaders_ReplaceHeaderNameValuePair, HTTP_HEADERS_ERROR); REGISTER_GLOBAL_MOCK_RETURN(get_time, TEST_TIME_T); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); umock_c_reset_all_calls(); } TEST_FUNCTION(HTTPAPIEX_SAS_is_zero_the_epoch) { time_t epoch_candidate = 0; struct tm broken_down_time; broken_down_time = *gmtime(&epoch_candidate); ASSERT_ARE_EQUAL(int, broken_down_time.tm_hour, 0); ASSERT_ARE_EQUAL(int, broken_down_time.tm_min, 0); ASSERT_ARE_EQUAL(int, broken_down_time.tm_sec, 0); ASSERT_ARE_EQUAL(int, broken_down_time.tm_year, 70); ASSERT_ARE_EQUAL(int, broken_down_time.tm_mon, 0); ASSERT_ARE_EQUAL(int, broken_down_time.tm_mday, 1); } /*Tests_SRS_HTTPAPIEXSAS_01_001: [ HTTPAPIEX_SAS_Create shall create a new instance of HTTPAPIEX_SAS and return a non-NULL handle to it. ]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_Succeeds) { // arrange HTTPAPIEX_SAS_HANDLE handle; setupSAS_Create_happy_path(true); // act handle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(handle); // Cleanup HTTPAPIEX_SAS_Destroy(handle); } /*Tests_SRS_HTTPAPIEXSAS_06_001: [If the parameter key is NULL then HTTPAPIEX_SAS_Create shall return NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_null_key_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; // act handle = HTTPAPIEX_SAS_Create(NULL, TEST_STRING_HANDLE, TEST_STRING_HANDLE); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_002: [If the parameter uriResource is NULL then HTTPAPIEX_SAS_Create shall return NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_null_uriResource_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; // act handle = HTTPAPIEX_SAS_Create(TEST_STRING_HANDLE, NULL, TEST_STRING_HANDLE); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_003: [The parameter keyName for HTTPAPIEX_SAS_Create is optional and can be NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_null_keyName_succeeds) { // arrange HTTPAPIEX_SAS_HANDLE handle; setupSAS_Create_happy_path(true); // act handle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(handle); // Cleanup HTTPAPIEX_SAS_Destroy(handle); } /*Tests_SRS_HTTPAPIEXSAS_01_001: [ HTTPAPIEX_SAS_Create shall create a new instance of HTTPAPIEX_SAS and return a non-NULL handle to it. ]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_From_String_Succeeds) { // arrange HTTPAPIEX_SAS_HANDLE handle; setupSASString_Create_happy_path(true); // act handle = HTTPAPIEX_SAS_Create_From_String(TEST_KEY, TEST_URI_RESOURCE, TEST_KEY_NAME); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(handle); // Cleanup HTTPAPIEX_SAS_Destroy(handle); } /* Tests_SRS_HTTPAPIEXSAS_07_001: [ If the parameter key or uriResource is NULL then HTTPAPIEX_SAS_Create_From_String shall return NULL. ] */ TEST_FUNCTION(HTTPAPIEX_SAS_Create_From_String_null_key_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; // act handle = HTTPAPIEX_SAS_Create_From_String(NULL, TEST_URI_RESOURCE, TEST_KEY_NAME); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_HTTPAPIEXSAS_07_001: [ If the parameter key or uriResource is NULL then HTTPAPIEX_SAS_Create_From_String shall return NULL. ] */ TEST_FUNCTION(HTTPAPIEX_SAS_Create_From_String_null_uriResource_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; // act handle = HTTPAPIEX_SAS_Create_From_String(TEST_KEY, NULL, TEST_KEY_NAME); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_003: [The parameter keyName for HTTPAPIEX_SAS_Create is optional and can be NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_From_String_null_keyName_succeeds) { // arrange HTTPAPIEX_SAS_HANDLE handle; setupSASString_Create_happy_path(false); // act handle = HTTPAPIEX_SAS_Create_From_String(TEST_KEY, TEST_URI_RESOURCE, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(handle); // Cleanup HTTPAPIEX_SAS_Destroy(handle); } /*Tests_SRS_HTTPAPIEXSAS_06_004: [If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_malloc_state_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_KEY); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_URI_RESOURCE); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_KEY_NAME); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).SetReturn(NULL); // act handle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_004: [If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_first_string_copy_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(__LINE__); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act handle = HTTPAPIEX_SAS_Create_From_String(TEST_KEY, TEST_URI_RESOURCE, TEST_KEY_NAME); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_004: [If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_second_string_copy_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(__LINE__); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act handle = HTTPAPIEX_SAS_Create_From_String(TEST_KEY, TEST_URI_RESOURCE, TEST_KEY_NAME); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_004: [If there are any other errors in the instantiation of this handle then HTTPAPIEX_SAS_Create shall return NULL.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Create_third_string_copy_fails) { // arrange HTTPAPIEX_SAS_HANDLE handle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(__LINE__); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act handle = HTTPAPIEX_SAS_Create_From_String(TEST_KEY, TEST_URI_RESOURCE, TEST_KEY_NAME); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_006: [HTTAPIEX_SAS_Destroy shall deallocate any structures denoted by the parameter handle.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_Destroy_frees_underlying_strings) { // arrange HTTPAPIEX_SAS_HANDLE handle; setupSAS_Create_happy_path(true); handle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act HTTPAPIEX_SAS_Destroy(handle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_005: [If the parameter handle is NULL then HTTAPIEX_SAS_Destroy shall do nothing and return.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_destroy_with_null_succeeds) { // arrange // act HTTPAPIEX_SAS_Destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_007: [If the parameter sasHandle is NULL then HTTPAPIEX_SAS_ExecuteRequest shall simply invoke HTTPAPIEX_ExecuteRequest with the remaining parameters (following sasHandle) as its arguments and shall return immediately with the result of that call as the result of HTTPAPIEX_SAS_ExecuteRequest.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_invoke_executerequest_with_null_sas_handle_succeeds) { HTTPAPIEX_RESULT result = HTTPAPIEX_ERROR; unsigned int statusCode; STRICT_EXPECTED_CALL(HTTPAPIEX_ExecuteRequest(TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT)).SetReturn(HTTPAPIEX_OK); // act result = HTTPAPIEX_SAS_ExecuteRequest(NULL, TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT); // assert ASSERT_ARE_EQUAL(HTTPAPIEX_RESULT, result, HTTPAPIEX_OK); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTPAPIEXSAS_06_008: [if the parameter requestHttpHeadersHandle is NULL then fallthrough.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_invoke_executerequest_with_null_request_http_headers_handle_succeeds) { HTTPAPIEX_RESULT result; unsigned int statusCode; HTTPAPIEX_SAS_HANDLE sasHandle; // arrange setupSAS_Create_happy_path(true); sasHandle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(HTTPAPIEX_ExecuteRequest(TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, NULL, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT)).SetReturn(HTTPAPIEX_OK); // act result = HTTPAPIEX_SAS_ExecuteRequest(sasHandle, TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, NULL, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT); // assert ASSERT_ARE_EQUAL(HTTPAPIEX_RESULT, result, HTTPAPIEX_OK); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Cleanup HTTPAPIEX_SAS_Destroy(sasHandle); } /*Tests_SRS_HTTPAPIEXSAS_06_009: [HTTPHeaders_FindHeaderValue shall be invoked with the requestHttpHeadersHandle as its first argument and the string "Authorization" as its second argument.]*/ /*Tests_SRS_HTTPAPIEXSAS_06_010: [If the return result of the invocation of HTTPHeaders_FindHeaderValue is NULL then fallthrough.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_invoke_executerequest_findheadervalues_returns_null_succeeds) { HTTPAPIEX_RESULT result; unsigned int statusCode; HTTPAPIEX_SAS_HANDLE sasHandle; // arrange setupSAS_Create_happy_path(true); sasHandle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(HTTPHeaders_FindHeaderValue(TEST_REQUEST_HTTP_HEADERS_HANDLE, "Authorization")).SetReturn(TEST_CONST_CHAR_STAR_NULL); STRICT_EXPECTED_CALL(HTTPAPIEX_ExecuteRequest(TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT)).SetReturn(HTTPAPIEX_OK); // act result = HTTPAPIEX_SAS_ExecuteRequest(sasHandle, TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT); // assert ASSERT_ARE_EQUAL(HTTPAPIEX_RESULT, result, HTTPAPIEX_OK); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Cleanup HTTPAPIEX_SAS_Destroy(sasHandle); } /*Tests_SRS_HTTPAPIEXSAS_06_018: [A value of type time_t that shall be known as currentTime is obtained from calling get_time.]*/ /*Tests_SRS_HTTPAPIEXSAS_06_019: [If the value of currentTime is (time_t)-1 is then fallthrough.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_invoke_executerequest_get_time_fails) { HTTPAPIEX_RESULT result; unsigned int statusCode; HTTPAPIEX_SAS_HANDLE sasHandle; // arrange setupSAS_Create_happy_path(true); sasHandle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(HTTPHeaders_FindHeaderValue(TEST_REQUEST_HTTP_HEADERS_HANDLE, "Authorization")).SetReturn(TEST_CHAR_ARRAY); STRICT_EXPECTED_CALL(get_time(NULL)).SetReturn((time_t)-1); STRICT_EXPECTED_CALL(HTTPAPIEX_ExecuteRequest(TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT)).SetReturn(HTTPAPIEX_OK); // act result = HTTPAPIEX_SAS_ExecuteRequest(sasHandle, TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT); // assert ASSERT_ARE_EQUAL(HTTPAPIEX_RESULT, result, HTTPAPIEX_OK); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Cleanup HTTPAPIEX_SAS_Destroy(sasHandle); } /*Tests_SRS_HTTPAPIEXSAS_06_011: [SASToken_Create shall be invoked.]*/ /*Tests_SRS_HTTPAPIEXSAS_06_012: [If the return result of SASToken_Create is NULL then fallthrough.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_invoke_executerequest_sastoken_create_returns_null_succeeds) { HTTPAPIEX_RESULT result; unsigned int statusCode; HTTPAPIEX_SAS_HANDLE sasHandle; // arrange setupSAS_Create_happy_path(true); sasHandle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(HTTPHeaders_FindHeaderValue(TEST_REQUEST_HTTP_HEADERS_HANDLE, "Authorization")).SetReturn(TEST_CHAR_ARRAY); STRICT_EXPECTED_CALL(get_time(NULL)).SetReturn(3600); STRICT_EXPECTED_CALL(SASToken_CreateString(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, TEST_EXPIRY)).SetReturn(NULL); STRICT_EXPECTED_CALL(HTTPAPIEX_ExecuteRequest(TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT)).SetReturn(HTTPAPIEX_OK); // act result = HTTPAPIEX_SAS_ExecuteRequest(sasHandle, TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT); // assert ASSERT_ARE_EQUAL(HTTPAPIEX_RESULT, result, HTTPAPIEX_OK); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Cleanup HTTPAPIEX_SAS_Destroy(sasHandle); } /*Tests_SRS_HTTPAPIEXSAS_06_013: [HTTPHeaders_ReplaceHeaderNameValuePair shall be invoked with "Authorization" as its second argument and STRING_c_str (newSASToken) as its third argument.]*/ /*Tests_SRS_HTTPAPIEXSAS_06_014: [If the result of the invocation of HTTPHeaders_ReplaceHeaderNameValuePair is NOT HTTP_HEADERS_OK then fallthrough.]*/ /*Tests_SRS_HTTPAPIEXSAS_06_015: [STRING_delete(newSASToken) will be invoked.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_invoke_executerequest_replace_header_name_value_pair_fails_succeeds) { HTTPAPIEX_RESULT result; unsigned int statusCode; HTTPAPIEX_SAS_HANDLE sasHandle; // arrange setupSAS_Create_happy_path(true); sasHandle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(HTTPHeaders_FindHeaderValue(TEST_REQUEST_HTTP_HEADERS_HANDLE, "Authorization")).SetReturn(TEST_CHAR_ARRAY); STRICT_EXPECTED_CALL(get_time(NULL)).SetReturn(3600); STRICT_EXPECTED_CALL(SASToken_CreateString(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, TEST_EXPIRY)); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_CHAR_ARRAY); STRICT_EXPECTED_CALL(HTTPHeaders_ReplaceHeaderNameValuePair(TEST_REQUEST_HTTP_HEADERS_HANDLE, "Authorization", IGNORED_PTR_ARG)).SetReturn(HTTP_HEADERS_ERROR); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(HTTPAPIEX_ExecuteRequest(TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT)).SetReturn(HTTPAPIEX_OK); // act result = HTTPAPIEX_SAS_ExecuteRequest(sasHandle, TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT); // assert ASSERT_ARE_EQUAL(HTTPAPIEX_RESULT, result, HTTPAPIEX_OK); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Cleanup HTTPAPIEX_SAS_Destroy(sasHandle); } /*Tests_SRS_HTTPAPIEXSAS_06_016: [HTTPAPIEX_ExecuteRequest with the remaining parameters (following sasHandle) as its arguments will be invoked and the result of that call is the result of HTTPAPIEX_SAS_ExecuteRequest.]*/ TEST_FUNCTION(HTTPAPIEX_SAS_invoke_executerequest_replace_header_name_value_pair_succeeds_succeeds) { HTTPAPIEX_RESULT result; unsigned int statusCode; HTTPAPIEX_SAS_HANDLE sasHandle; // arrange setupSAS_Create_happy_path(true); sasHandle = HTTPAPIEX_SAS_Create(TEST_KEY_HANDLE, TEST_URIRESOURCE_HANDLE, TEST_KEYNAME_HANDLE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(HTTPHeaders_FindHeaderValue(TEST_REQUEST_HTTP_HEADERS_HANDLE, "Authorization")).SetReturn(TEST_CHAR_ARRAY); STRICT_EXPECTED_CALL(get_time(NULL)).SetReturn((time_t)3600); STRICT_EXPECTED_CALL(SASToken_CreateString(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, TEST_EXPIRY)); STRICT_EXPECTED_CALL(STRING_c_str(IGNORED_PTR_ARG)).SetReturn(TEST_CHAR_ARRAY); STRICT_EXPECTED_CALL(HTTPHeaders_ReplaceHeaderNameValuePair(TEST_REQUEST_HTTP_HEADERS_HANDLE, "Authorization", TEST_CHAR_ARRAY)).SetReturn(HTTP_HEADERS_OK); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(HTTPAPIEX_ExecuteRequest(TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT)); // act result = HTTPAPIEX_SAS_ExecuteRequest(sasHandle, TEST_HTTPAPIEX_HANDLE, TEST_HTTPAPI_REQUEST_TYPE, TEST_CHAR_ARRAY, TEST_REQUEST_HTTP_HEADERS_HANDLE, TEST_REQUEST_CONTENT, &statusCode, TEST_RESPONSE_HTTP_HEADERS_HANDLE, TEST_RESPONSE_CONTENT); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(HTTPAPIEX_RESULT, result, HTTPAPIEX_OK); // Cleanup HTTPAPIEX_SAS_Destroy(sasHandle); } END_TEST_SUITE(httpapiexsas_unittests) main.c000066400000000000000000000005051362133436400347340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpapiexsas_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(httpapiexsas_unittests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpheaders_ut/000077500000000000000000000000001362133436400335215ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000011411362133436400361770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpheaders_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(NOT ${use_http}) message(FATAL_ERROR "httpheaders_ut being generated without HTTP support") endif() set(theseTestsName httpheaders_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/httpheaders.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) httpheaders_ut.c000066400000000000000000001542411362133436400366400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/httpheaders_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif static size_t currentmalloc_call = 0; static size_t whenShallmalloc_fail = 0; static size_t currentrealloc_call = 0; static size_t whenShallrealloc_fail = 0; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void* my_gballoc_realloc(void* ptr, size_t size) { void* result; currentrealloc_call++; if (whenShallrealloc_fail > 0) { if (currentrealloc_call == whenShallrealloc_fail) { result = NULL; } else { result = realloc(ptr, size); } } else { result = realloc(ptr, size); } return result; } void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/map.h" MAP_HANDLE my_Map_Create(MAP_FILTER_CALLBACK mapFilterFunc) { (void)mapFilterFunc; return (MAP_HANDLE)malloc(1); } MAP_HANDLE my_Map_Clone(MAP_HANDLE handle) { (void)handle; return (MAP_HANDLE)malloc(1); } void my_Map_Destroy(MAP_HANDLE handle) { free(handle); } #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/httpheaders.h" /*Below tags exists for traceability reasons only, they canot be really tested by automated means, except "this file compiles"*/ /*Tests_SRS_HTTP_HEADERS_99_001:[ HttpHeaders shall have the following interface]*/ static TEST_MUTEX_HANDLE g_testByTest; TEST_DEFINE_ENUM_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(HTTP_HEADERS_RESULT, HTTP_HEADERS_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(MAP_RESULT, MAP_RESULT_VALUES); /*test assets*/ #define NAME1 "name1" #define VALUE1 "value1" #define HEADER1 NAME1 ": " VALUE1 static const char *NAME1_TRICK1 = "name1:"; static const char *NAME1_TRICK2 = "name1: "; static const char *NAME1_TRICK3 = "name1: value1"; #define NAME2 "name2" #define VALUE2 "value2" #define HEADER2 NAME2 ": " VALUE2 #define TEMP_BUFFER_SIZE 1024 static char tempBuffer[TEMP_BUFFER_SIZE]; #define MAX_NAME_VALUE_PAIR 100 DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(HTTPHeaders_UnitTests) TEST_SUITE_INITIALIZE(TestClassInitialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_TYPE(MAP_RESULT, MAP_RESULT); REGISTER_UMOCK_ALIAS_TYPE(MAP_FILTER_CALLBACK, void*); REGISTER_UMOCK_ALIAS_TYPE(MAP_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(Map_Create, my_Map_Create); REGISTER_GLOBAL_MOCK_HOOK(Map_Clone, my_Map_Clone); REGISTER_GLOBAL_MOCK_HOOK(Map_Destroy, my_Map_Destroy); REGISTER_GLOBAL_MOCK_RETURN(Map_AddOrUpdate, MAP_OK); REGISTER_GLOBAL_MOCK_RETURN(Map_GetValueFromKey, VALUE1); REGISTER_GLOBAL_MOCK_RETURN(Map_GetInternals, MAP_OK); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; currentrealloc_call = 0; whenShallrealloc_fail = 0; } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /*Tests_SRS_HTTP_HEADERS_99_002:[ This API shall produce a HTTP_HANDLE that can later be used in subsequent calls to the module.]*/ TEST_FUNCTION(HTTPHeaders_Alloc_happy_path_succeeds) { ///arrange HTTP_HEADERS_HANDLE handle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_Create(IGNORED_PTR_ARG)); ///act handle = HTTPHeaders_Alloc(); ///assert ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); /// cleanup HTTPHeaders_Free(handle); } /*Tests_SRS_HTTP_HEADERS_99_003:[ The function shall return NULL when the function cannot execute properly]*/ TEST_FUNCTION(HTTPHeaders_Alloc_fails_when_malloc_fails) { ///arrange HTTP_HEADERS_HANDLE httpHandle; whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act httpHandle = HTTPHeaders_Alloc(); ///assert ASSERT_IS_NULL(httpHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_02_001: [If httpHeadersHandle is NULL then HTTPHeaders_Free shall perform no action.] */ TEST_FUNCTION(HTTPHeaders_Free_with_NULL_handle_does_nothing) { ///arrange ///act HTTPHeaders_Free(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_99_005:[ Calling this API shall de-allocate the data structures allocated by previous API calls to the same handle.]*/ TEST_FUNCTION(HTTPHeaders_Free_with_valid_handle_succeeds) { ///arrange HTTP_HEADERS_HANDLE handle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act HTTPHeaders_Free(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_99_003:[ The function shall return NULL when the function cannot execute properly]*/ TEST_FUNCTION(HTTPHeaders_Alloc_fails_when_Map_Create_fails) { ///arrange HTTP_HEADERS_HANDLE httpHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_Create(IGNORED_PTR_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act httpHandle = HTTPHeaders_Alloc(); ///assert ASSERT_IS_NULL(httpHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_99_004:[ After a successful init, HTTPHeaders_GetHeaderCount shall report 0 existing headers.]*/ TEST_FUNCTION(HTTPHeaders_Alloc_succeeds_and_GetHeaderCount_returns_0) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); size_t nHeaders; size_t zero = 0; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments() .CopyOutArgumentBuffer(4, &zero, sizeof(zero)); ///act res = HTTPHeaders_GetHeaderCount(httpHandle, &nHeaders); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(size_t, 0, nHeaders); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_012:[ Calling this API shall record a header from name and value parameters.]*/ /*Tests_SRS_HTTP_HEADERS_99_013:[ The function shall return HTTP_HEADERS_OK when execution is successful.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_happy_path_succeeds) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist*/ STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME1, VALUE1)) .IgnoreArgument(1); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //checking content ///cleanup HTTPHeaders_Free(httpHandle); } /*Codes_SRS_HTTP_HEADERS_99_015:[ The function shall return HTTP_HEADERS_ALLOC_FAILED when an internal request to allocate memory fails.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_fails_when_Map_AddOrUpdate_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist*/ STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME1, VALUE1)) .IgnoreArgument(1) .SetReturn(MAP_ERROR); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_ALLOC_FAILED, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //checking content ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_016:[ The function shall store the name:value pair in such a way that when later retrieved by a call to GetHeader it will return a string that shall strcmp equal to the name+": "+value.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_succeeds) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist*/ STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME1, VALUE1)) .IgnoreArgument(1); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //checking content ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_014:[ The function shall return when the handle is not valid or when name parameter is NULL or when value parameter is NULL.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_NULL_handle_fails) { ///arrange ///act HTTP_HEADERS_RESULT res = HTTPHeaders_AddHeaderNameValuePair(NULL, NAME1, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_99_014:[ The function shall return when the handle is not valid or when name parameter is NULL or when value parameter is NULL.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_NULL_name_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NULL, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_014:[ The function shall return when the handle is not valid or when name parameter is NULL or when value parameter is NULL.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_NULL_value_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, NULL); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_017:[ If the name already exists in the collection of headers, the function shall concatenate the new value after the existing value, separated by a comma and a space as in: old-value+", "+new-value.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_same_Name_appends_to_existing_value_succeeds) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn(VALUE1); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME1, VALUE1 ", " VALUE1)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_015:[ The function shall return HTTP_HEADERS_ALLOC_FAILED when an internal request to allocate memory fails.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_same_Name_appends_fails_when_Map_AddOrUpdate_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn(VALUE1); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME1, VALUE1 ", " VALUE1)) .IgnoreArgument(1) .SetReturn(MAP_ERROR); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_ERROR, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_015:[ The function shall return HTTP_HEADERS_ALLOC_FAILED when an internal request to allocate memory fails.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_same_Name_fails_when_gballoc_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn(VALUE1); whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_ALLOC_FAILED, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_012:[ Calling this API shall record a header from name and value parameters.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_add_two_headers_produces_two_headers) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME2)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME2, VALUE2)) .IgnoreArgument(1); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME2, VALUE2); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_017:[ If the name already exists in the collection of headers, the function shall concatenate the new value after the existing value, separated by a comma and a space as in: old-value+", "+new-value.]*/ TEST_FUNCTION(HTTPHeaders_When_Second_Added_Header_Is_A_Substring_Of_An_Existing_Header_2_Headers_Are_Added) { ///arrange HTTP_HEADERS_RESULT result; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, "ab")) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, "ab", VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, "a")) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, "a", VALUE1)) .IgnoreArgument(1); ///act result = HTTPHeaders_AddHeaderNameValuePair(httpHandle, "a", VALUE1); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_022:[ The return value shall be NULL if name parameter is NULL or if httpHeadersHandle is NULL]*/ TEST_FUNCTION(HTTPHeaders_FindHeaderValue_with_NULL_handle_returns_NULL) { ///arrange ///act const char* res = HTTPHeaders_FindHeaderValue(NULL, NAME1); ///assert ASSERT_IS_NULL(res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_99_022:[ The return value shall be NULL if name parameter is NULL or if httpHeadersHandle is NULL]*/ TEST_FUNCTION(HTTPHeaders_FindHeaderValue_with_NULL_name_returns_NULL) { ///arrange const char* res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); ///act res = HTTPHeaders_FindHeaderValue(httpHandle, NULL); ///assert ASSERT_IS_NULL(res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_018:[ Calling this API shall retrieve the value for a previously stored name.]*/ /*Tests_SRS_HTTP_HEADERS_99_021:[ In this case the return value shall point to a string that shall strcmp equal to the original stored string.]*/ TEST_FUNCTION(HTTPHeaders_FindHeaderValue_retrieves_previously_stored_value_succeeds) { ///arrange const char* res1; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1); ///act res1 = HTTPHeaders_FindHeaderValue(httpHandle, NAME1); ///assert ASSERT_ARE_EQUAL(char_ptr, VALUE1, res1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_018:[ Calling this API shall retrieve the value for a previously stored name.]*/ /*Tests_SRS_HTTP_HEADERS_99_021:[ In this case the return value shall point to a string that shall strcmp equal to the original stored string.]*/ TEST_FUNCTION(HTTPHeaders_FindHeaderValue_retrieves_previously_stored_value_for_two_headers_succeeds) { ///arrange const char* res1; const char* res2; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME2)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME2, VALUE2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn(VALUE1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME2)) .IgnoreArgument(1) .SetReturn(VALUE2); ///act res1 = HTTPHeaders_FindHeaderValue(httpHandle, NAME1); res2 = HTTPHeaders_FindHeaderValue(httpHandle, NAME2); ///assert ASSERT_ARE_EQUAL(char_ptr, VALUE1, res1); ASSERT_ARE_EQUAL(char_ptr, VALUE2, res2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_018:[ Calling this API shall retrieve the value for a previously stored name.]*/ /*Tests_SRS_HTTP_HEADERS_99_021:[ In this case the return value shall point to a string that shall strcmp equal to the original stored string.]*/ TEST_FUNCTION(HTTPHeaders_FindHeaderValue_retrieves_concatenation_of_previously_stored_values_for_header_name_succeeds) { const char* res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn(VALUE1); /*this key exists, was added above*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn(VALUE1 ", " VALUE2); ///act res = HTTPHeaders_FindHeaderValue(httpHandle, NAME1); ///assert ASSERT_ARE_EQUAL(char_ptr,VALUE1 ", " VALUE2, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_020:[ The return value shall be different than NULL when the name matches the name of a previously stored name:value pair.]*/ /*actually we are trying to see that finding a nonexisting value produces NULL*/ TEST_FUNCTION(HTTPHeaders_FindHeaderValue_returns_NULL_for_nonexistent_value) { ///arrange const char* res2; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME2)) .IgnoreArgument(1) .SetReturn((const char*)NULL); ///act res2 = HTTPHeaders_FindHeaderValue(httpHandle, NAME2); ///assert ASSERT_IS_NULL(res2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*trying to catch some errors here*/ /*Tests_SRS_HTTP_HEADERS_99_020:[ The return value shall be different than NULL when the name matches the name of a previously stored name:value pair.]*/ TEST_FUNCTION(HTTPHeaders_FindHeaderValue_with_nonexistent_header_succeeds) { ///arrange const char* res1; const char* res2; const char* res3; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1_TRICK1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1_TRICK2)) .IgnoreArgument(1) .SetReturn((const char*)NULL); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1_TRICK3)) .IgnoreArgument(1) .SetReturn((const char*)NULL); ///act res1 = HTTPHeaders_FindHeaderValue(httpHandle, NAME1_TRICK1); res2 = HTTPHeaders_FindHeaderValue(httpHandle, NAME1_TRICK2); res3 = HTTPHeaders_FindHeaderValue(httpHandle, NAME1_TRICK3); ///assert ASSERT_IS_NULL(res1); ASSERT_IS_NULL(res2); ASSERT_IS_NULL(res3); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /* Tests_SRS_HTTP_HEADERS_06_001: [This API will perform exactly as HTTPHeaders_AddHeaderNameValuePair except that if the header name already exists the already existing value will be replaced as opposed to concatenated to.] */ TEST_FUNCTION(HTTPHeaders_ReplaceHeaderNameValuePair_succeeds) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn(VALUE1); /*this key does not exist, the line below is adding it*/ STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME1, VALUE2)) .IgnoreArgument(1); ///act res = HTTPHeaders_ReplaceHeaderNameValuePair(httpHandle, NAME1, VALUE2); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /* Tests_SRS_HTTP_HEADERS_06_001: [This API will perform exactly as HTTPHeaders_AddHeaderNameValuePair except that if the header name already exists the already existing value will be replaced as opposed to concatenated to.] */ TEST_FUNCTION(HTTPHeaders_ReplaceHeaderNameValuePair_for_none_existing_header_succeeds) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); STRICT_EXPECTED_CALL(Map_AddOrUpdate(IGNORED_PTR_ARG, NAME1, VALUE2)) .IgnoreArgument(1); ///act res = HTTPHeaders_ReplaceHeaderNameValuePair(httpHandle, NAME1, VALUE2); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_024:[ The function shall return HTTP_HEADERS_INVALID_ARG when an invalid handle is passed.]*/ TEST_FUNCTION(HTTPHeaders_GetHeaderCount_with_NULL_handle_fails) { ///arrange HTTP_HEADERS_RESULT res1; size_t nHeaders; ///act res1 = HTTPHeaders_GetHeaderCount(NULL, &nHeaders); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_99_025:[ The function shall return HTTP_HEADERS_INVALID_ARG when headersCount is NULL.]*/ TEST_FUNCTION(HTTPHeaders_GetHeaderCount_with_NULL_headersCount_fails) { ///arrange HTTP_HEADERS_RESULT res1; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); ///act res1 = HTTPHeaders_GetHeaderCount(httpHandle, NULL); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_026:[ The function shall write in *headersCount the number of currently stored headers and shall return HTTP_HEADERS_OK]*/ /*Tests_SRS_HTTP_HEADERS_99_023:[ Calling this API shall provide the number of stored headers.]*/ /*Tests_SRS_HTTP_HEADERS_99_016:[ The function shall store the name:value pair in such a way that when later retrieved by a call to GetHeader it will return a string that shall strcmp equal to the name+": "+value.]*/ TEST_FUNCTION(HTTPHeaders_GetHeaderCount_with_1_header_produces_1) { ///arrange HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); size_t nHeaders; const char* keys[] = { "NAME1" }; const char* values[] = { "VALUE1" }; const char* const ** pKeys = (const char* const **)&keys; const char* const ** pValues = (const char* const **)&values; const size_t one = 1; HTTP_HEADERS_RESULT res; STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, &pKeys, sizeof(pKeys)) .CopyOutArgumentBuffer(3, &pValues, sizeof(pValues)) .CopyOutArgumentBuffer(4, &one, sizeof(one)); ///act res = HTTPHeaders_GetHeaderCount(httpHandle, &nHeaders); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(size_t, (size_t)1, nHeaders); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_037:[ The function shall return HTTP_HEADERS_ERROR when an internal error occurs.]*/ TEST_FUNCTION(HTTPHeaders_GetHeaderCount_fails_when_Map_GetInternals_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); size_t nHeaders; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreAllArguments() .SetReturn(MAP_ERROR); ///act res = HTTPHeaders_GetHeaderCount(httpHandle, &nHeaders); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_ERROR, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_026:[ The function shall write in *headersCount the number of currently stored headers and shall return HTTP_HEADERS_OK]*/ /*Tests_SRS_HTTP_HEADERS_99_023:[ Calling this API shall provide the number of stored headers.]*/ TEST_FUNCTION(HTTPHeaders_GetHeaderCount_with_2_header_produces_2) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); size_t nHeaders; const char* keys[2] = { "NAME1", "NAME2" }; const char* values[2] = { "VALUE1", "VALUE2" }; const char* const ** pKeys = (const char* const **)&keys; const char* const ** pValues = (const char* const **)&values; const size_t two = 2; STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME2)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME2, VALUE2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, &pKeys, sizeof(pKeys)) .CopyOutArgumentBuffer(3, &pValues, sizeof(pValues)) .CopyOutArgumentBuffer(4, &two, sizeof(two)); ///act res = HTTPHeaders_GetHeaderCount(httpHandle, &nHeaders); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res); ASSERT_ARE_EQUAL(size_t, 2, nHeaders); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_028:[ The function shall return NULL if the handle is invalid.]*/ TEST_FUNCTION(HTTPHeaders_GetHeader_with_NULL_handle_fails) { ///arrange char* headerValue; ///act HTTP_HEADERS_RESULT res = HTTPHeaders_GetHeader(NULL, 0, &headerValue); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_HTTP_HEADERS_99_032:[ The function shall return HTTP_HEADERS_INVALID_ARG if the destination is NULL]*/ TEST_FUNCTION(HTTPHeaders_GetHeader_with_NULL_buffer_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); ///act res = HTTPHeaders_GetHeader(httpHandle, 0, NULL); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_029:[ The function shall return HTTP_HEADERS_INVALID_ARG if index is not valid (for example, out of range) for the currently stored headers.]*/ /*Tests that not adding something to the collection fails tso retrieve for index 0*/ TEST_FUNCTION(HTTPHeaders_GetHeader_with_index_too_big_fails_1) { ///arrange HTTP_HEADERS_RESULT res1; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); char* headerValue; const char* thisIsNULL = NULL; const char* zero = 0; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, &thisIsNULL, sizeof(thisIsNULL)) .CopyOutArgumentBuffer(3, &thisIsNULL, sizeof(thisIsNULL)) .CopyOutArgumentBuffer(4, &zero, sizeof(zero)); ///act res1 = HTTPHeaders_GetHeader(httpHandle, 0, &headerValue); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_029:[ The function shall return HTTP_HEADERS_INVALID_ARG if index is not valid (for example, out of range) for the currently stored headers.]*/ /*Tests that not adding something to the collection fails tso retrieve for index 0*/ TEST_FUNCTION(HTTPHeaders_GetHeader_with_index_too_big_fails_2) { ///arrange HTTP_HEADERS_RESULT res1; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); const char* keys[1] = { "NAME1" }; const char* values[1] = { "VALUE1" }; const char* const ** pKeys = (const char* const **)&keys; const char* const ** pValues = (const char* const **)&values; const size_t one = 1; char* headerValue; STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, NAME1)) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, NAME1, VALUE1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, pKeys, sizeof(pKeys)) .CopyOutArgumentBuffer(3, pValues, sizeof(pValues)) .CopyOutArgumentBuffer(4, &one, sizeof(one)); ///act res1 = HTTPHeaders_GetHeader(httpHandle, 1, &headerValue); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_027:[ Calling this API shall produce the string value+": "+pair) for the index header in the buffer pointed to by buffer.]*/ /*Tests_SRS_HTTP_HEADERS_99_035:[ The function shall return HTTP_HEADERS_OK when the function executed without error.]*/ TEST_FUNCTION(HTTPHeaders_GetHeader_succeeds_1) { ///arrange HTTP_HEADERS_RESULT res1; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); char* headerValue; const char* keys[1] = { "a" }; const char** pKeys = &keys[0]; const char* values[1] = { "b" }; const char** pValues = &values[0]; const size_t one = 1; STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, "a")) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, "a", "b"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, &pKeys, sizeof(pKeys)) .CopyOutArgumentBuffer(3, &pValues, sizeof(pValues)) .CopyOutArgumentBuffer(4, &one, sizeof(one)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act res1 = HTTPHeaders_GetHeader(httpHandle, 0, &headerValue); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res1); ASSERT_ARE_EQUAL(char_ptr, "a: b", headerValue); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); free(headerValue); } /*Tests_SRS_HTTP_HEADERS_99_034:[ The function shall return HTTP_HEADERS_ERROR when an internal error occurs]*/ TEST_FUNCTION(HTTPHeaders_GetHeader_fails_when_Map_GetInternals_fails) { ///arrange HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); char* headerValue; const char* keys[1] = { "a" }; const char** pKeys = &keys[0]; const char* values[1] = { "b" }; const char** pValues = &values[0]; const size_t one = 1; HTTP_HEADERS_RESULT res1; STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, "a")) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, "a", "b"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, &pKeys, sizeof(pKeys)) .CopyOutArgumentBuffer(3, &pValues, sizeof(pValues)) .CopyOutArgumentBuffer(4, &one, sizeof(one)) .SetReturn(MAP_ERROR); ///act res1 = HTTPHeaders_GetHeader(httpHandle, 0, &headerValue); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_ERROR, res1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_034:[ The function shall return HTTP_HEADERS_ERROR when an internal error occurs]*/ TEST_FUNCTION(HTTPHeaders_GetHeader_succeeds_fails_when_malloc_fails) { ///arrange HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); char* headerValue; const char* keys[1] = { "a" }; const char** pKeys = &keys[0]; const char* values[1] = { "b" }; const char** pValues = &values[0]; const size_t one = 1; HTTP_HEADERS_RESULT res1; STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, "a")) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, "a", "b"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, &pKeys, sizeof(pKeys)) .CopyOutArgumentBuffer(3, &pValues, sizeof(pValues)) .CopyOutArgumentBuffer(4, &one, sizeof(one)); whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act res1 = HTTPHeaders_GetHeader(httpHandle, 0, &headerValue); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_ERROR, res1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); free(headerValue); } /*Tests_SRS_HTTP_HEADERS_99_031:[ If name contains the character ":" then the return value shall be HTTP_HEADERS_INVALID_ARG.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_colon_in_name_fails) { ///arrange HTTP_HEADERS_RESULT res; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); umock_c_reset_all_calls(); ///act res = HTTPHeaders_AddHeaderNameValuePair(httpHandle, "a:", "b"); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_INVALID_ARG, res); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); } /*Tests_SRS_HTTP_HEADERS_99_031:[ If name contains the character ":" then the return value shall be HTTP_HEADERS_INVALID_ARG.]*/ TEST_FUNCTION(HTTPHeaders_AddHeaderNameValuePair_with_colon_in_value_succeeds_1) { ///arrange const char* keys[1] = { "a" }; const char** pKeys = &keys[0]; const char* values[1] = { ":" }; const char** pValues = &values[0]; const size_t one = 1; HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); char* headerValue; HTTP_HEADERS_RESULT res1; STRICT_EXPECTED_CALL(Map_GetValueFromKey(IGNORED_PTR_ARG, "a")) .IgnoreArgument(1) .SetReturn((const char*)NULL); /*this key does not exist, the line below is adding it*/ (void)HTTPHeaders_AddHeaderNameValuePair(httpHandle, "a", ":"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument(1) .CopyOutArgumentBuffer(2, &pKeys, sizeof(pKeys)) .CopyOutArgumentBuffer(3, &pValues, sizeof(pValues)) .CopyOutArgumentBuffer(4, &one, sizeof(one)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act res1 = HTTPHeaders_GetHeader(httpHandle, 0, &headerValue); ///assert ASSERT_ARE_EQUAL(HTTP_HEADERS_RESULT, HTTP_HEADERS_OK, res1); ASSERT_ARE_EQUAL(char_ptr, "a: :", headerValue); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup HTTPHeaders_Free(httpHandle); free(headerValue); } /*Tests_SRS_HTTP_HEADERS_99_036:[ If name contains the characters outside character codes 33 to 126 then the return value shall be HTTP_HEADERS_INVALID_ARG]*/ /*so says http://tools.ietf.org/html/rfc822#section-3.1*/ TEST_FUNCTION(HTTP_HEADERS_AddHeaderNameValuePair_fails_for_every_invalid_character) { ///arrange HTTP_HEADERS_HANDLE httpHandle = HTTPHeaders_Alloc(); char unacceptableString[2]={'\0', '\0'}; int c; for(c=SCHAR_MIN;c <=SCHAR_MAX; c++) { if(c=='\0') continue; if((c<33) ||( 126 #else #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/lock.h" TEST_DEFINE_ENUM_TYPE(LOCK_RESULT, LOCK_RESULT_VALUES); BEGIN_TEST_SUITE(LOCK_UnitTests) TEST_SUITE_INITIALIZE(a) { } TEST_SUITE_CLEANUP(b) { } /* Tests_SRS_LOCK_10_002: [Lock_Init on success shall return a valid lock handle which should be a non NULL value] */ TEST_FUNCTION(LOCK_Lock_Init_succeeds) { //arrange //act LOCK_HANDLE handle = Lock_Init(); //assert ASSERT_IS_NOT_NULL(handle); //cleanup (void)Lock_Deinit(handle); } /* Tests_SRS_LOCK_10_005: [Lock on success shall return LOCK_OK] */ TEST_FUNCTION(LOCK_Init_Lock_succeeds) { //arrange LOCK_HANDLE handle = Lock_Init(); //act LOCK_RESULT result = Lock(handle); //assert ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_OK, result); //cleanup (void)Unlock(handle); (void)Lock_Deinit(handle); } /* Tests_SRS_LOCK_10_009: [Unlock on success shall return LOCK_OK] */ TEST_FUNCTION(LOCK_Init_Lock_Unlock_succeeds) { //arrange LOCK_RESULT result; LOCK_HANDLE handle = Lock_Init(); (void)Lock(handle); //act result = Unlock(handle); //assert ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_OK, result); //cleanup (void)Lock_Deinit(handle); } /* Tests_SRS_LOCK_10_002: [Lock_Init on success shall return a valid lock handle which should be a non NULL value] */ TEST_FUNCTION(LOCK_Init_DeInit_succeeds) { //arrange LOCK_HANDLE handle = Lock_Init(); //act LOCK_RESULT result = Lock_Deinit(handle); //assert ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_OK, result); } /* Tests_SRS_LOCK_10_007: [Lock_Deinit on NULL handle passed returns LOCK_ERROR] */ TEST_FUNCTION(LOCK_Lock_NULL_fails) { //arrange //act LOCK_RESULT result = Lock(NULL); ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_ERROR, result); } /* Tests_SRS_LOCK_10_011: [Unlock on NULL handle passed returns LOCK_ERROR] */ TEST_FUNCTION(LOCK_Unlock_NULL_fails) { //arrange //act LOCK_RESULT result = Unlock(NULL); /*Tests_SRS_LOCK_10_011:[ This API on NULL handle passed returns LOCK_ERROR]*/ ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_ERROR, result); } TEST_FUNCTION(LOCK_DeInit_NULL_fails) { //arrange //act LOCK_RESULT result = Lock_Deinit(NULL); //assert ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_ERROR, result); } /* Extra negative tests - only supported on Win32 since the behavior on other platforms is undefined. */ #ifdef WIN32 TEST_FUNCTION(LOCK_Init_Unlock_fails) { //arrange LOCK_HANDLE handle = Lock_Init(); //act LOCK_RESULT result = Unlock(handle); //assert ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_ERROR, result); //cleanup (void)Lock_Deinit(handle); } TEST_FUNCTION(LOCK_Init_Lock_Unlock_Unlock_fails) { //arrange LOCK_RESULT result; LOCK_HANDLE handle = Lock_Init(); (void)Lock(handle); (void)Unlock(handle); //act result = Unlock(handle); //assert ASSERT_ARE_EQUAL(LOCK_RESULT, LOCK_ERROR, result); //cleanup (void)Lock_Deinit(handle); } #endif // WIN32 END_TEST_SUITE(LOCK_UnitTests); azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/lock_ut/main.c000066400000000000000000000004761362133436400332350ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(LOCK_UnitTests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/map_ut/000077500000000000000000000000001362133436400317635ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000010051362133436400344400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/map_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName map_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/map.c ../../src/crt_abstractions.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/map_ut/main.c000066400000000000000000000004741362133436400330600ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(map_unittests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/map_ut/map_ut.c000066400000000000000000004424301362133436400334230ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "azure_c_shared_utility/optimize_size.h" static size_t currentmalloc_call = 0; static size_t whenShallmalloc_fail = 0; static size_t currentrealloc_call = 0; static size_t whenShallrealloc_fail = 0; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void* my_gballoc_realloc(void* ptr, size_t size) { void* result; currentrealloc_call++; if (whenShallrealloc_fail > 0) { if (currentrealloc_call == whenShallrealloc_fail) { result = NULL; } else { result = realloc(ptr, size); } } else { result = realloc(ptr, size); } return result; } void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" static TEST_MUTEX_HANDLE g_testByTest; #define ENABLE_MOCKS #include "azure_c_shared_utility/strings.h" STRING_HANDLE my_STRING_construct(const char* psz) { (void)psz; return (STRING_HANDLE)malloc(1); } void my_STRING_delete(STRING_HANDLE handle) { free(handle); } STRING_HANDLE my_STRING_new_JSON(const char* source) { (void)source; return (STRING_HANDLE)malloc(1); } #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/map.h" TEST_DEFINE_ENUM_TYPE(MAP_RESULT, MAP_RESULT_VALUES) IMPLEMENT_UMOCK_C_ENUM_TYPE(MAP_RESULT, MAP_RESULT_VALUES); static int DontAllowCapitalsFilters(const char* mapProperty, const char* mapValue) { int result = 0; const char* iterator = mapProperty; while (iterator != NULL && *iterator != '\0') { if (*iterator >= 'A' && *iterator <= 'Z') { result = __FAILURE__; break; } iterator++; } if (result != 0) { iterator = mapValue; while (iterator != NULL && *iterator != '\0') { if (*iterator >= 'A' && *iterator <= 'Z') { result = __FAILURE__; break; } iterator++; } } return result; } /* capacity */ static const char* TEST_REDKEY = "testRedKey"; static const char* TEST_REDVALUE = "testRedValue"; static const char* TEST_YELLOWKEY = "testYellowKey"; static const char* TEST_YELLOWVALUE = "testYellowValue"; static const char* TEST_BLUEKEY = "testBlueKey"; static const char* TEST_BLUEVALUE = "cyan"; static const char* TEST_GREENKEY = "testgreenkey"; static const char* TEST_GREENVALUE = "green"; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(map_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(MAP_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(STRING_construct, my_STRING_construct); REGISTER_GLOBAL_MOCK_HOOK(STRING_delete, my_STRING_delete); REGISTER_GLOBAL_MOCK_HOOK(STRING_new_JSON, my_STRING_new_JSON); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; currentrealloc_call = 0; whenShallrealloc_fail = 0; } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /*Tests_SRS_MAP_02_001: [Map_Create shall create a new, empty map.]*/ /*this tests "create"*/ /*Tests_SRS_MAP_02_003: [Otherwise, it shall return a non-NULL handle that can be used in subsequent calls.] */ /*Tests_SRS_MAP_02_004: [Map_Destroy shall release all resources associated with the map.] */ TEST_FUNCTION(Map_Create_Destroy_succeeds) { MAP_HANDLE handle; ///arrange STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*handleData*/ .IgnoreArgument(1); ///act handle = Map_Create(NULL); Map_Destroy(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_004: [Map_Destroy shall release all resources associated with the map.] */ TEST_FUNCTION(Map_Destroy_on_non_empty_map_succeeds_1) { ///arrange MAP_HANDLE handle = Map_Create(NULL); Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free the red key*/ .ValidateArgumentBuffer(1, TEST_REDKEY, strlen(TEST_REDKEY)+1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG))/*free the red value*/ .ValidateArgumentBuffer(1, TEST_REDVALUE, strlen(TEST_REDVALUE)+1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free keys array*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free values array*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free handle*/ .IgnoreArgument(1); ///act Map_Destroy(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_004: [Map_Destroy shall release all resources associated with the map.] */ TEST_FUNCTION(Map_Destroy_on_non_empty_map_succeeds_2) { ///arrange MAP_HANDLE handle = Map_Create(NULL); Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); Map_AddOrUpdate(handle, TEST_REDKEY, "a"); /*overwrites to something smaller*/ umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free the red key*/ .ValidateArgumentBuffer(1, TEST_REDKEY, strlen(TEST_REDKEY)+1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG))/*free the red value*/ .ValidateArgumentBuffer(1, "a", 2); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free keys array*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free values array*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*free handle*/ .IgnoreArgument(1); ///act Map_Destroy(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_001: [Map_Create shall create a new, empty map.]*/ /*this tests "empty"*/ TEST_FUNCTION(Map_Create_Destroy_succeeds_2) { ///arrange MAP_HANDLE handle = Map_Create(NULL); const char*const* keys; const char*const* values; size_t count; MAP_RESULT result; umock_c_reset_all_calls(); ///act result = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(void_ptr, NULL, keys); ASSERT_ARE_EQUAL(void_ptr, NULL, values); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_002: [If during creation there are any error, then Map_Create shall return NULL.]*/ TEST_FUNCTION(Map_Create_fails_when_malloc_fails) { ///arrange MAP_HANDLE handle; whenShallmalloc_fail = 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act handle = Map_Create(NULL); ///assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_005: [If parameter handle is NULL then Map_Destroy shall take no action.]*/ TEST_FUNCTION(Map_Destroy_with_NULL_argument_does_nothing) { ///arrange ///act Map_Destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_006: [If parameter handle is NULL then Map_Add shall return MAP_INVALID_ARG.]*/ TEST_FUNCTION(Map_Add_with_NULL_parameter_handle_fails) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result; umock_c_reset_all_calls(); ///act result = Map_Add(NULL, TEST_REDKEY, TEST_REDVALUE); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_007: [If parameter key is NULL then Map_Add shall return MAP_INVALID_ARG.]*/ TEST_FUNCTION(Map_Add_with_NULL_parameter_key_fails) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result; umock_c_reset_all_calls(); ///act result = Map_Add(handle, NULL, TEST_REDVALUE); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_008: [If parameter value is NULL then Map_Add shall return MAP_INVALID_ARG.]*/ TEST_FUNCTION(Map_Add_with_NULL_parameter_value_fails) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result; umock_c_reset_all_calls(); ///act result = Map_Add(handle, TEST_REDKEY, NULL); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_010: [Otherwise, Map_Add shall add the pair to the map.] */ /*Tests_SRS_MAP_02_012: [Otherwise, Map_Add shall return MAP_OK.] */ TEST_FUNCTION(Map_Add_succeeds_1) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result2; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result2); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_010: [Otherwise, Map_Add shall add the pair to the map.] */ /*Tests_SRS_MAP_02_012: [Otherwise, Map_Add shall return MAP_OK.] */ /*Tests_SRS_MAP_02_043: [Map_GetInternals shall produce in *keys an pointer to an array of const char* having all the keys stored so far by the map.]*/ /*Tests_SRS_MAP_02_044: [Map_GetInternals shall produce in *values a pointer to an array of const char* having all the values stored so far by the map.]*/ /*Tests_SRS_MAP_02_045: [Map_GetInternals shall produce in *count the number of stored keys and values.]*/ TEST_FUNCTION(Map_Add_succeeds_2) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2*sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2*sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*copy of blue key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEVALUE) + 1)); /*copy of blue value*/ ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_Add(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_1) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*copy of blue key*/ whenShallmalloc_fail =currentmalloc_call+ 4; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEVALUE) + 1)); /*copy of blue value*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo copy of blue key*/ .ValidateArgumentBuffer(1, TEST_BLUEKEY, strlen(TEST_BLUEKEY) + 1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_Add(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_2) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); whenShallmalloc_fail = currentmalloc_call + 3; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*copy of blue key*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_Add(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_3) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); whenShallrealloc_fail = currentrealloc_call + 4; STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing keys*/ .IgnoreArgument(1); ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_Add(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_4) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ whenShallrealloc_fail = currentrealloc_call + 3; STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); /*below are undo actions*/ ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_Add(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_5) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ whenShallmalloc_fail = currentmalloc_call + 2; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo copy of red key*/ .ValidateArgumentBuffer(1, TEST_REDKEY, strlen(TEST_REDKEY) + 1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG))/*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_6) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG))/*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_7) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ whenShallrealloc_fail = currentrealloc_call + 2; STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing keys*/ .IgnoreArgument(1); ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_011: [If adding the pair fails then Map_Add shall return MAP_ERROR.] */ TEST_FUNCTION(Map_Add_fails_when_gballoc_fails_8) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); whenShallrealloc_fail = currentrealloc_call + 1; STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ /*below are undo actions*/ /*none*/ ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_009: [If the key already exists, then Map_Add shall return MAP_KEYEXISTS.]*/ TEST_FUNCTION(Map_Add_with_existing_key_fails_1) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); (void)Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); /*below are undo actions*/ /*none*/ ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_KEYEXISTS, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_009: [If the key already exists, then Map_Add shall return MAP_KEYEXISTS.]*/ TEST_FUNCTION(Map_Add_with_existing_key_fails_2) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; MAP_HANDLE handle = Map_Create(NULL); (void)Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_Add(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); /*below are undo actions*/ /*none*/ ///act result1 = Map_Add(handle, TEST_BLUEKEY, TEST_YELLOWVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_KEYEXISTS, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_013: [If parameter handle is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG.]*/ TEST_FUNCTION(Map_AddOrUpdate_with_NULL_parameter_handle_fails) { ///arrange ///act MAP_RESULT result1 = Map_AddOrUpdate(NULL, TEST_BLUEKEY, TEST_YELLOWVALUE); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_014: [If parameter key is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG.] */ TEST_FUNCTION(Map_AddOrUpdate_with_NULL_key_handle_fails) { ///arrange MAP_RESULT result1; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); ///act result1 = Map_AddOrUpdate(handle, NULL, TEST_YELLOWVALUE); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_015: [If parameter value is NULL then Map_AddOrUpdate shall return MAP_INVALID_ARG.]*/ TEST_FUNCTION(Map_AddOrUpdate_with_NULL_value_handle_fails) { ///arrange MAP_RESULT result1; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, NULL); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_017: [Otherwise, Map_AddOrUpdate shall add the pair to the map.]*/ /*Tests_SRS_MAP_02_019: [Otherwise, Map_AddOrUpdate shall return MAP_OK.] */ TEST_FUNCTION(Map_AddOrUpdate_with_1_pair_succeeded) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY)+1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result2); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_017: [Otherwise, Map_AddOrUpdate shall add the pair to the map.]*/ TEST_FUNCTION(Map_AddOrUpdate_with_2_pair_succeeded) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEVALUE) + 1)); /*copy of red value*/ ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_1) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*copy of red key*/ whenShallmalloc_fail = currentmalloc_call + 4; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEVALUE) + 1)); /*copy of red value*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo blue key value*/ .ValidateArgumentBuffer(1, TEST_BLUEKEY, strlen(TEST_BLUEKEY) + 1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_2) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); whenShallmalloc_fail = currentmalloc_call + 3; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*copy of red key*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_3) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); whenShallrealloc_fail = currentrealloc_call + 4; STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing values*/ .IgnoreArgument(1); /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*undo growing keys*/ .IgnoreArgument(1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_4) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ whenShallrealloc_fail = currentrealloc_call + 3; STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 * sizeof(const char*))) /*growing keys*/ .IgnoreArgument(1); /*below are undo actions*/ /*none*/ ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_5) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ whenShallmalloc_fail = currentmalloc_call + 2; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*copy of red value*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo red key value*/ .ValidateArgumentBuffer(1, TEST_REDKEY, strlen(TEST_REDKEY) + 1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_6) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*copy of red key*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing keys*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing values*/ .IgnoreArgument(1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_7) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ whenShallrealloc_fail = currentrealloc_call + 2; STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing values*/ /*below are undo actions*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*undo growing keys*/ .IgnoreArgument(1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_018: [If there are any failures then Map_AddOrUpdate shall return MAP_ERROR.] */ TEST_FUNCTION(Map_AddOrUpdate_with_2_differnt_pair_fails_when_gballoc_fails_8) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); whenShallrealloc_fail = currentrealloc_call + 1; STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); /*growing keys*/ /*below are undo actions*/ ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_016: [If the key already exists, then Map_AddOrUpdate shall overwrite the value of the existing key with parameter value.]*/ TEST_FUNCTION(Map_AddOrUpdate_with_2_pair_overwrites_firstValue_succeeds) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(TEST_YELLOWVALUE) + 1)) /*changing redkey value to yellow*/ .ValidateArgumentBuffer(1, TEST_REDVALUE, strlen(TEST_REDVALUE) + 1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_YELLOWVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_YELLOWVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_016: [If the key already exists, then Map_AddOrUpdate shall overwrite the value of the existing key with parameter value.]*/ TEST_FUNCTION(Map_AddOrUpdate_with_2_pair_overwrites_firstValue_when_gballoc_fails_it_does_not_change_the_value) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); whenShallrealloc_fail = currentrealloc_call + 1; STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(TEST_YELLOWVALUE) + 1)) /*changing redkey value to yellow*/ .ValidateArgumentBuffer(1, TEST_REDVALUE, strlen(TEST_REDVALUE) + 1); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_YELLOWVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_016: [If the key already exists, then Map_AddOrUpdate shall overwrite the value of the existing key with parameter value.]*/ TEST_FUNCTION(Map_AddOrUpdate_with_2_pair_overwrites_secondValue) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(TEST_YELLOWVALUE) + 1)) /*changing bluekey value to yellow*/ .ValidateArgumentBuffer(1, TEST_BLUEVALUE, strlen(TEST_BLUEVALUE) + 1); ///act result1 = Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_YELLOWVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_YELLOWVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_016: [If the key already exists, then Map_AddOrUpdate shall overwrite the value of the existing key with parameter value.]*/ TEST_FUNCTION(Map_AddOrUpdate_with_2_pair_overwrites_secondValue_doesn_not_change_the_value_when_gballoc_fails) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result1; MAP_RESULT result3; size_t count; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); whenShallrealloc_fail = currentrealloc_call + 1; STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(TEST_YELLOWVALUE) + 1)) /*changing bluekey value to yellow*/ .ValidateArgumentBuffer(1, TEST_BLUEVALUE, strlen(TEST_BLUEVALUE) + 1); ///act result1 = Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_YELLOWVALUE); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_ERROR, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_020: [If parameter handle is NULL then Map_Delete shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_Delete_with_NULL_handle_fails) { ///arrange ///act MAP_RESULT result1 = Map_Delete(NULL, TEST_BLUEKEY); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_021: [If parameter key is NULL then Map_Delete shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_Delete_with_NULL_key_fails) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_Delete(handle, NULL); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_022: [If key does not exist then Map_Delete shall return MAP_KEYNOTFOUND.]*/ TEST_FUNCTION(Map_Delete_with_not_found_key_succeeds_1) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_Delete(handle, TEST_REDKEY); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_KEYNOTFOUND, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_022: [If key does not exist then Map_Delete shall return MAP_KEYNOTFOUND.]*/ TEST_FUNCTION(Map_Delete_with_not_found_key_succeeds_2) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result1; (void)Map_AddOrUpdate(handle, TEST_YELLOWKEY, TEST_YELLOWVALUE); umock_c_reset_all_calls(); ///act result1 = Map_Delete(handle, TEST_REDKEY); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_KEYNOTFOUND, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_023: [Otherwise, Map_Delete shall remove the key and its associated value from the map and return MAP_OK.] */ TEST_FUNCTION(Map_Delete_with_1_found_key_succeeds) { ///arrange MAP_HANDLE handle = Map_Create(NULL); const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; (void)Map_AddOrUpdate(handle, TEST_YELLOWKEY, TEST_YELLOWVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*freeing yellow key*/ .ValidateArgumentBuffer(1, TEST_YELLOWKEY, strlen(TEST_YELLOWKEY) + 1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*freeing yellow value*/ .ValidateArgumentBuffer(1, TEST_YELLOWVALUE, strlen(TEST_YELLOWVALUE) + 1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*ungrowing values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*ungowing keys*/ .IgnoreArgument(1); ///act result1 = Map_Delete(handle, TEST_YELLOWKEY); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_023: [Otherwise, Map_Delete shall remove the key and its associated value from the map and return MAP_OK.] */ TEST_FUNCTION(Map_Delete_with_1_found_key_succeeds_2) { ///arrange MAP_HANDLE handle = Map_Create(NULL); const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_YELLOWKEY, TEST_YELLOWVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*freeing yellow key*/ .ValidateArgumentBuffer(1, TEST_YELLOWKEY, strlen(TEST_YELLOWKEY) + 1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*freeing yellow value*/ .ValidateArgumentBuffer(1, TEST_YELLOWVALUE, strlen(TEST_YELLOWVALUE) + 1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1* sizeof(const char*))) /*ungrowing values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*ungrowing keys*/ .IgnoreArgument(1); ///act result1 = Map_Delete(handle, TEST_YELLOWKEY); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_023: [Otherwise, Map_Delete shall remove the key and its associated value from the map and return MAP_OK.] */ TEST_FUNCTION(Map_Delete_with_1_found_key_succeeds_3) { ///arrange MAP_HANDLE handle = Map_Create(NULL); const char*const* keys; const char*const* values; size_t count; MAP_RESULT result1; MAP_RESULT result3; (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_YELLOWKEY, TEST_YELLOWVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*freeing yellow key*/ .ValidateArgumentBuffer(1, TEST_REDKEY, strlen(TEST_REDKEY) + 1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) /*freeing yellow value*/ .ValidateArgumentBuffer(1, TEST_REDVALUE, strlen(TEST_REDVALUE) + 1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*ungrowing values*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1 * sizeof(const char*))) /*ungrowing keys*/ .IgnoreArgument(1); ///act result1 = Map_Delete(handle, TEST_REDKEY); result3 = Map_GetInternals(handle, &keys, &values, &count); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_YELLOWKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_YELLOWVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_024: [If parameter handle, key or keyExists are NULL then Map_ContainsKey shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_ContainsKey_fails_with_invalid_arg_1) { ///arrange bool exists; MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_ContainsKey(NULL,TEST_REDKEY, &exists); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_024: [If parameter handle, key or keyExists are NULL then Map_ContainsKey shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_ContainsKey_fails_with_invalid_arg_2) { ///arrange bool exists; MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_ContainsKey(handle, NULL, &exists); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_024: [If parameter handle, key or keyExists are NULL then Map_ContainsKey shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_ContainsKey_fails_with_invalid_arg_3) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_ContainsKey(handle, TEST_REDKEY, NULL); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_025: [Otherwise if a key exists then Map_ContainsKey shall return MAP_OK and shall write in keyExists "true".]*/ /*Tests_SRS_MAP_02_026: [If a key doesn't exist, then Map_ContainsKey shall return MAP_OK and write in keyExists "false".] */ TEST_FUNCTION(Map_ContainsKey_fails_with_known_key_succeeds) { ///arrange MAP_HANDLE handle = Map_Create(NULL); bool e1, e2; MAP_RESULT result1; MAP_RESULT result2; (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); ///act result1 = Map_ContainsKey(handle, TEST_REDKEY, &e1); result2 = Map_ContainsKey(handle, TEST_BLUEKEY, &e2); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_IS_TRUE(e1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result2); ASSERT_IS_FALSE(e2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_027: [If parameter handle, value or valueExists is NULL then Map_ContainsValue shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_ContainsValue_fails_with_NULL_handle) { ///arrange bool e1; MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_ContainsValue(NULL, TEST_REDKEY, &e1); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_027: [If parameter handle, value or valueExists is NULL then Map_ContainsValue shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_ContainsValue_fails_with_NULL_key) { ///arrange MAP_HANDLE handle = Map_Create(NULL); bool e1; MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_ContainsValue(handle, NULL, &e1); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_027: [If parameter handle, value or valueExists is NULL then Map_ContainsValue shall return MAP_INVALIDARG.]*/ TEST_FUNCTION(Map_ContainsValue_fails_with_NULL_exists) { ///arrange MAP_HANDLE handle = Map_Create(NULL); MAP_RESULT result1; umock_c_reset_all_calls(); ///act result1 = Map_ContainsValue(handle, TEST_REDKEY, NULL); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_028: [Otherwise, if a pair has its value equal to the parameter value, the Map_ContainsValue shall return MAP_OK and shall write in valueExists "true".]*/ /*Tests_SRS_MAP_02_029: [Otherwise, if such a does not exist, then Map_ContainsValue shall return MAP_OK and shall write in valueExists "false".] */ TEST_FUNCTION(Map_ContainsValue_succeeds) { ///arrange MAP_HANDLE handle = Map_Create(NULL); bool e1, e2; MAP_RESULT result1; MAP_RESULT result2; (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); ///act result1 = Map_ContainsValue(handle, TEST_REDVALUE, &e1); result2 = Map_ContainsValue(handle, TEST_BLUEVALUE, &e2); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result2); ASSERT_IS_TRUE(e1); ASSERT_IS_FALSE(e2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_040: [If parameter handle or key is NULL then Map_GetValueFromKey returns NULL.]*/ TEST_FUNCTION(Map_GetValueFromKey_returns_NULL__for_invalid_handle) { ///arrange ///act const char* result = Map_GetValueFromKey(NULL, TEST_REDKEY); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_040: [If parameter handle or key is NULL then Map_GetValueFromKey returns NULL.]*/ TEST_FUNCTION(Map_GetValueFromKey_returns_NULL_for_NULL_key) { ///arrange MAP_HANDLE handle = Map_Create(NULL); const char* result; umock_c_reset_all_calls(); ///act result = Map_GetValueFromKey(handle, NULL); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_041: [If the key is not found, then Map_GetValueFromKey returns NULL.]*/ TEST_FUNCTION(Map_GetValueFromKey_returns_NULL_for_notfound_key) { ///arrange MAP_HANDLE handle = Map_Create(NULL); const char* result; umock_c_reset_all_calls(); ///act result = Map_GetValueFromKey(handle, TEST_REDKEY); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_042: [Otherwise, Map_GetValueFromKey returns the key's value.] */ TEST_FUNCTION(Map_GetValueFromKey_returns_non_NULL_for_found_key) { ///arrange MAP_HANDLE handle = Map_Create(NULL); const char* result; Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); ///act result = Map_GetValueFromKey(handle, TEST_REDKEY); ///assert ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_046: [If parameter handle, keys, values or count is NULL then Map_GetInternals shall return MAP_INVALIDARG.] */ TEST_FUNCTION(Map_GetInternals_fails_with_NULL_arg_1) { ///arrange const char*const* keys; const char*const* values; size_t size; ///act MAP_RESULT result = Map_GetInternals(NULL, &keys, &values, &size); ///assert ASSERT_ARE_EQUAL(MAP_RESULT,MAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_MAP_02_046: [If parameter handle, keys, values or count is NULL then Map_GetInternals shall return MAP_INVALIDARG.] */ TEST_FUNCTION(Map_GetInternals_fails_with_NULL_arg_2) { ///arrange const char*const* values; size_t size; MAP_RESULT result; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); ///act result = Map_GetInternals(handle, NULL, &values, &size); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_046: [If parameter handle, keys, values or count is NULL then Map_GetInternals shall return MAP_INVALIDARG.] */ TEST_FUNCTION(Map_GetInternals_fails_with_NULL_arg_3) { ///arrange const char*const* keys; size_t size; MAP_RESULT result; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); ///act result = Map_GetInternals(handle, &keys, NULL, &size); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_046: [If parameter handle, keys, values or count is NULL then Map_GetInternals shall return MAP_INVALIDARG.] */ TEST_FUNCTION(Map_GetInternals_fails_with_NULL_arg_4) { ///arrange const char*const* keys; const char*const* values; MAP_RESULT result; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); ///act result = Map_GetInternals(handle, &keys, &values, NULL); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_INVALIDARG, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_043: [Map_GetInternals shall produce in *keys an pointer to an array of const char* having all the keys stored so far by the map.]*/ /*Tests_SRS_MAP_02_044: [Map_GetInternals shall produce in *values a pointer to an array of const char* having all the values stored so far by the map.]*/ /*Tests_SRS_MAP_02_045: [ Map_GetInternals shall produce in *count the number of stored keys and values.]*/ /*tested by every test in this suite... almost*/ /*Tests_SRS_MAP_02_038: [Map_Clone returns NULL if parameter handle is NULL.]*/ TEST_FUNCTION(Map_Clone_with_NULL_handle_returns_NULL) { ///arrange ///act MAP_HANDLE result = Map_Clone(NULL); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_039: [Map_Clone shall make a copy of the map indicated by parameter handle and return a non-NULL handle to it.]*/ TEST_FUNCTION(Map_Clone_with_empty_map_returns_empty_map) { ///arrange const char*const* keys; const char*const* values; size_t count; MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NOT_NULL(result); (void)Map_GetInternals(result, &keys, &values, &count); ASSERT_IS_NULL(keys); ASSERT_IS_NULL(values); ASSERT_ARE_EQUAL(size_t, 0, count); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_039: [Map_Clone shall make a copy of the map indicated by parameter handle and return a non-NULL handle to it.]*/ TEST_FUNCTION(Map_Clone_with_empty_fails_when_malloc_fails) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); umock_c_reset_all_calls(); whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_039: [Map_Clone shall make a copy of the map indicated by parameter handle and return a non-NULL handle to it.]*/ TEST_FUNCTION(Map_Clone_with_map_with_1_element_succeeds) { ///arrange MAP_HANDLE result; const char*const* keys; const char*const* values; size_t count; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*this is creating a clone of RED value*/ ///act result = Map_Clone(handle); ///assert ASSERT_IS_NOT_NULL(result); (void)Map_GetInternals(result, &keys, &values, &count); ASSERT_IS_NOT_NULL(keys); ASSERT_IS_NOT_NULL(values); ASSERT_ARE_EQUAL(size_t, 1, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_1_element_fails_when_gbaloc_fails_1) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for values*/ whenShallmalloc_fail = currentmalloc_call + 5; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*this is creating a clone of RED value*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_1_element_fails_when_gbaloc_fails_2) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ whenShallmalloc_fail = currentmalloc_call + 4; STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for values*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_1_element_fails_when_gbaloc_fails_3) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for keys*/ whenShallmalloc_fail = currentmalloc_call + 3; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_1_element_fails_when_gbaloc_fails_4) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); whenShallmalloc_fail = currentmalloc_call + 2; STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_1_element_fails_when_gbaloc_fails_5) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); umock_c_reset_all_calls(); whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_039: [Map_Clone shall make a copy of the map indicated by parameter handle and return a non-NULL handle to it.]*/ TEST_FUNCTION(Map_Clone_with_map_with_2_element_succeeds) { ///arrange MAP_HANDLE result; const char*const* keys; const char*const* values; size_t count; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(2*sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*this is creating a clone of BLUE key*/ STRICT_EXPECTED_CALL(gballoc_malloc(2*sizeof(char*))); /*this is creating a clone of the storage for values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*this is creating a clone of RED value*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEVALUE) + 1)); /*this is creating a clone of RED value*/ ///act result = Map_Clone(handle); ///assert ASSERT_IS_NOT_NULL(result); (void)Map_GetInternals(result, &keys, &values, &count); ASSERT_IS_NOT_NULL(keys); ASSERT_IS_NOT_NULL(values); ASSERT_ARE_EQUAL(size_t, 2, count); ASSERT_ARE_EQUAL(char_ptr, TEST_REDKEY, keys[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_REDVALUE, values[0]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEKEY, keys[1]); ASSERT_ARE_EQUAL(char_ptr, TEST_BLUEVALUE, values[1]); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_2_element_fails_when_gballoc_fails_1) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*this is creating a clone of BLUE key*/ STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for values*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*this is creating a clone of RED value*/ whenShallmalloc_fail = currentmalloc_call + 7; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEVALUE) + 1)); /*this is creating a clone of BLUE value*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_2_element_fails_when_gballoc_fails_2) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*this is creating a clone of BLUE key*/ STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for values*/ whenShallmalloc_fail = currentmalloc_call + 6; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDVALUE) + 1)); /*this is creating a clone of RED value*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_2_element_fails_when_gballoc_fails_3) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*this is creating a clone of BLUE key*/ whenShallmalloc_fail = currentmalloc_call + 5; STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for values*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_2_element_fails_when_gballoc_fails_4) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)); /*this is creating a clone of RED key*/ whenShallmalloc_fail = currentmalloc_call + 4; STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_BLUEKEY) + 1)); /*this is creating a clone of BLUE key*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_2_element_fails_when_gballoc_fails_5) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_REDKEY) + 1)) .SetReturn(NULL); /*this is creating a clone of RED key*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_2_element_fails_when_gballoc_fails_6) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); whenShallmalloc_fail = currentmalloc_call + 2; STRICT_EXPECTED_CALL(gballoc_malloc(2 * sizeof(char*))); /*this is creating a clone of the storage for keys*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /*Tests_SRS_MAP_02_047: [If during cloning, any operation fails, then Map_Clone shall return NULL.] */ TEST_FUNCTION(Map_Clone_with_map_with_2_element_fails_when_gballoc_fails_7) { ///arrange MAP_HANDLE result; MAP_HANDLE handle = Map_Create(NULL); (void)Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); (void)Map_AddOrUpdate(handle, TEST_BLUEKEY, TEST_BLUEVALUE); umock_c_reset_all_calls(); whenShallmalloc_fail = currentmalloc_call + 1; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the HANDLE structure*/ .IgnoreArgument(1); ///act result = Map_Clone(handle); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); Map_Destroy(result); } /* Tests_SRS_MAP_07_009: [If the mapFilterCallback function is not NULL, then the return value will be check and if it is not zero then Map_Add shall return MAP_FILTER_REJECT.] */ TEST_FUNCTION(Map_Add_With_Filter_Succeed) { ///arrange MAP_HANDLE handle = Map_Create(DontAllowCapitalsFilters); MAP_RESULT result1; MAP_RESULT result2; MAP_RESULT result3; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_GREENKEY) + 1)); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_GREENVALUE) + 1)); ///act result1 = Map_Add(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_Add(handle, TEST_YELLOWKEY, TEST_YELLOWVALUE); result3 = Map_Add(handle, TEST_GREENKEY, TEST_GREENVALUE); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_FILTER_REJECT, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_FILTER_REJECT, result2); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result3); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /* Tests_SRS_MAP_07_008: [If the mapFilterCallback function is not NULL, then the return value will be check and if it is not zero then Map_AddOrUpdate shall return MAP_FILTER_REJECT.] */ TEST_FUNCTION(Map_AddOrUpdate_With_Filter_Succeed) { ///arrange MAP_HANDLE handle = Map_Create(DontAllowCapitalsFilters); MAP_RESULT result1; MAP_RESULT result2; umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); EXPECTED_CALL(gballoc_realloc(NULL, sizeof(const char*))); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_GREENKEY) + 1)); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_GREENVALUE) + 1)); ///act result1 = Map_AddOrUpdate(handle, TEST_REDKEY, TEST_REDVALUE); result2 = Map_AddOrUpdate(handle, TEST_GREENKEY, TEST_GREENVALUE); ///assert ASSERT_ARE_EQUAL(MAP_RESULT, MAP_FILTER_REJECT, result1); ASSERT_ARE_EQUAL(MAP_RESULT, MAP_OK, result2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_052: [If parameter handle is NULL then Map_ToJSON shall return NULL.] */ TEST_FUNCTION(Map_ToJSON_fails_with_NULL_argument) { ///arrange ///act STRING_HANDLE toJSON = Map_ToJSON(NULL); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_MAP_02_048: [Map_ToJSON shall produce a STRING_HANDLE representing the content of the MAP.]*/ /*Tests_SRS_MAP_02_049: [If the MAP is empty, then Map_ToJSON shall produce the string "{}".] */ TEST_FUNCTION(Map_ToJSON_with_empty_MAP_produces_empty_JSON) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, "}")) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); STRING_delete(toJSON); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_empty_MAP_produces_empty_JSON_fails_when_STRING_concat_fails) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, "}")) .IgnoreArgument(1).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_empty_MAP_produces_empty_JSON_fails_when_STRING_construct_fails) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1).SetReturn(NULL); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_050: [If the map has properties then Map_ToJSON shall produce the following string:{"name1":"value1", "name2":"value2" ...}] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_succeeds) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, "}"))/*now JSON is {"redkey":"redoor"}*/ .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NOT_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); STRING_delete(toJSON); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_fail_when_STRING_fails_1) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, "}"))/*now JSON is {"redkey":"redoor"}*/ .IgnoreArgument(1).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_fail_when_STRING_fails_2) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_fail_when_STRING_fails_3) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_fail_when_STRING_fails_4) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_fail_when_STRING_fails_5) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")) .SetReturn(NULL); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_fail_when_STRING_fails_6) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")).SetReturn(NULL); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_1_MAP_element_fail_when_STRING_fails_7) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1) .SetReturn(NULL); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_050: [If the map has properties then Map_ToJSON shall produce the following string:{"name1":"value1", "name2":"value2" ...}] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_succeeds) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowdoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ",")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, "}"))/*now JSON is {"redkey":"redoor"}*/ .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NOT_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); STRING_delete(toJSON); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_1) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowdoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ",")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, "}"))/*now JSON is {"redkey":"redoor"}*/ .IgnoreArgument(1) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_2) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowdoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ",")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_3) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowdoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ",")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_4) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowdoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ",")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_5) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowdoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ",")) .IgnoreArgument(1).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_6) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowdoor")).SetReturn(NULL); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_7) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } { /*artificial scope for second key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("yellowkey")).SetReturn(NULL); /*prepare the key*/ } STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_8) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_9) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey":"reddoor"*/ .IgnoreArgument(1) .IgnoreArgument(2) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); } ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_10) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(STRING_concat(IGNORED_PTR_ARG, ":")) /*now JSON is {"redkey":*/ .IgnoreArgument(1) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); } ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_11) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); { /*artificial scope for first key:value*/ STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_concat_with_STRING(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) /*now JSON is {"redkey"*/ .IgnoreArgument(1) .IgnoreArgument(2) .SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the value*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); } ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_12) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_new_JSON("reddoor")).SetReturn(NULL); /*prepare the value*/ STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) /*delete the key*/ .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_13) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1); STRICT_EXPECTED_CALL(STRING_new_JSON("redkey")).SetReturn(NULL); /*prepare the key*/ STRICT_EXPECTED_CALL(STRING_delete(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } /*Tests_SRS_MAP_02_051: [If any error occurs while producing the output, then Map_ToJSON shall fail and return NULL.] */ TEST_FUNCTION(Map_ToJSON_with_2_MAP_elements_fails_when_STRING_fails_14) { ///arrange MAP_HANDLE handle = Map_Create(NULL); STRING_HANDLE toJSON; (void)Map_AddOrUpdate(handle, "redkey", "reddoor"); (void)Map_AddOrUpdate(handle, "yellowkey", "yellowdoor"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_construct("{")) .IgnoreArgument(1) .SetReturn(NULL); ///act toJSON = Map_ToJSON(handle); ///assert ASSERT_IS_NULL(toJSON); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup Map_Destroy(handle); } END_TEST_SUITE(map_unittests) optionhandler_ut/000077500000000000000000000000001362133436400337755ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000007741362133436400365450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/optionhandler_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName optionhandler_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/optionhandler.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005061362133436400350660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/optionhandler_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(optionhandler_unittests, failedTestCount); return failedTestCount; } optionhandler_ut.c000066400000000000000000001332071362133436400375250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/optionhandler_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* s) { free(s); } #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/optimize_size.h" /*not very nice source level preprocessor mocking... */ /*but real implementation of VECTOR is paramount here, because -> operator cannot be mocked*/ #define GBALLOC_H #define VECTOR_create real_VECTOR_create #define VECTOR_move real_VECTOR_move #define VECTOR_destroy real_VECTOR_destroy #define VECTOR_push_back real_VECTOR_push_back #define VECTOR_erase real_VECTOR_erase #define VECTOR_clear real_VECTOR_clear #define VECTOR_element real_VECTOR_element #define VECTOR_front real_VECTOR_front #define VECTOR_back real_VECTOR_back #define VECTOR_find_if real_VECTOR_find_if #define VECTOR_size real_VECTOR_size #include "../src/vector.c" #undef VECTOR_create #undef VECTOR_move #undef VECTOR_destroy #undef VECTOR_push_back #undef VECTOR_erase #undef VECTOR_clear #undef VECTOR_element #undef VECTOR_front #undef VECTOR_back #undef VECTOR_find_if #undef VECTOR_size #undef VECTOR_H #undef GBALLOC_H #undef CRT_ABSTRACTIONS_H #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/vector.h" MOCKABLE_FUNCTION(, void*, aCloneOption, const char*, name, const void*, value); MOCKABLE_FUNCTION(, void, aDestroyOption, const char*, name, const void*, value); MOCKABLE_FUNCTION(, int, aSetOption, void*, handle, const char*, name, const void*, value); #undef ENABLE_MOCKS static TEST_MUTEX_HANDLE g_testByTest; static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { (void)error_code; ASSERT_FAIL("umock_c reported error"); } TEST_DEFINE_ENUM_TYPE(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES); static int my_mallocAndStrcpy_s(char** destination, const char* source) { size_t l = strlen(source); char* temp = (char*)my_gballoc_malloc(l + 1); (void)memcpy(temp, source, l+1); *destination=temp; return 0; } static void* my_aCloneOption(const char* name, const void* value) { (void)name, (void)value; return my_gballoc_malloc(2); } static void my_aDestroyOption(const char* name, const void* value) { (void)(name); my_gballoc_free((void*)value); } BEGIN_TEST_SUITE(optionhandler_unittests) TEST_SUITE_INITIALIZE(a) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); (void)umocktypes_charptr_register_types(); REGISTER_UMOCK_ALIAS_TYPE(const VECTOR_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(VECTOR_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_create, real_VECTOR_create); REGISTER_GLOBAL_MOCK_FAIL_RETURN(VECTOR_create, NULL); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_size, real_VECTOR_size); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_push_back, real_VECTOR_push_back); REGISTER_GLOBAL_MOCK_FAIL_RETURN(VECTOR_push_back, __FAILURE__); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_element, real_VECTOR_element); REGISTER_GLOBAL_MOCK_HOOK(VECTOR_destroy, real_VECTOR_destroy); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, my_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_FAIL_RETURN(mallocAndStrcpy_s, __FAILURE__); REGISTER_GLOBAL_MOCK_HOOK(aCloneOption, my_aCloneOption); REGISTER_GLOBAL_MOCK_FAIL_RETURN(aCloneOption, NULL); REGISTER_GLOBAL_MOCK_FAIL_RETURN(aSetOption, __FAILURE__); REGISTER_GLOBAL_MOCK_HOOK(aDestroyOption, my_aDestroyOption); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(initialize) { umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(cleans) { } /* OptionHandler_Create */ /*Tests_SRS_OPTIONHANDLER_02_001: [ OptionHandler_Create shall fail and retun NULL if any parameters are NULL. ]*/ TEST_FUNCTION(OptionHandler_Create_fails_with_NULL_cloneOption_parameter) { ///arrange ///act OPTIONHANDLER_HANDLE h = OptionHandler_Create(NULL, aDestroyOption, aSetOption); ///assert ASSERT_IS_NULL(h); ///cleanup } /*Tests_SRS_OPTIONHANDLER_02_001: [ OptionHandler_Create shall fail and retun NULL if any parameters are NULL. ]*/ TEST_FUNCTION(OptionHandler_Create_fails_with_NULL_destroyOption_parameter) { ///arrange ///act OPTIONHANDLER_HANDLE h = OptionHandler_Create(aCloneOption, NULL, aSetOption); ///assert ASSERT_IS_NULL(h); ///cleanup } /*Tests_SRS_OPTIONHANDLER_02_001: [ OptionHandler_Create shall fail and retun NULL if any parameters are NULL. ]*/ TEST_FUNCTION(OptionHandler_Create_fails_with_NULL_setOption_parameter) { ///arrange ///act OPTIONHANDLER_HANDLE h = OptionHandler_Create(aCloneOption, aDestroyOption, NULL); ///assert ASSERT_IS_NULL(h); ///cleanup } /*the following function, called "inert" - allegedly half happy and half unhappy is hared between the positive and negative test cases*/ static void OptionHandler_Create_inert_path(void) { STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) /*this is creating the handle*/ .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) /*this is creating the vector that stores the options*/ .IgnoreArgument_elementSize(); } /*Tests_SRS_OPTIONHANDLER_02_002: [ OptionHandler_Create shall create an empty VECTOR that will hold pairs of const char* and void*. ]*/ /*Tests_SRS_OPTIONHANDLER_02_003: [ If all the operations succeed then OptionHandler_Create shall succeed and return a non-NULL handle. ]*/ TEST_FUNCTION(OptionHandler_Create_happy_path) { ///arrange OPTIONHANDLER_HANDLE h; OptionHandler_Create_inert_path(); /*in this case, it is happy*/ ///act h = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); ///assert ASSERT_IS_NOT_NULL(h); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(h); } /*Tests_SRS_OPTIONHANDLER_02_004: [ Otherwise, OptionHandler_Create shall fail and return NULL. ]*/ TEST_FUNCTION(OptionHandler_Create_unhappy_paths) { ///arrange size_t i; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); OptionHandler_Create_inert_path(); /*in this case, it is unhappy*/ umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; OPTIONHANDLER_HANDLE h; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act (void)sprintf(temp_str, "On failed call %zu", i); ///act h = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); ///assert ASSERT_IS_NULL(h, temp_str); } ///cleanup umock_c_negative_tests_deinit(); } /* OptionHandler_Clone */ /* Tests_SRS_OPTIONHANDLER_01_010: [ If `handler` is NULL, OptionHandler_Clone shall fail and return NULL. ]*/ TEST_FUNCTION(OptionHandler_Clone_with_NULL_handler_fails) { ///arrange OPTIONHANDLER_HANDLE result; ///act result = OptionHandler_Clone(NULL); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_OPTIONHANDLER_01_001: [ `OptionHandler_Clone` shall clone an existing option handler instance. ]*/ /* Tests_SRS_OPTIONHANDLER_01_002: [ On success it shall return a non-NULL handle. ]*/ /* Tests_SRS_OPTIONHANDLER_01_003: [ `OptionHandler_Clone` shall allocate memory for the new option handler instance. ]*/ /* Tests_SRS_OPTIONHANDLER_01_005: [ `OptionHandler_Clone` shall iterate through all the options stored by the option handler to be cloned by using VECTOR's iteration mechanism. ]*/ TEST_FUNCTION(OptionHandler_Clone_clones_an_instance_with_no_options) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); OptionHandler_Destroy(result); } /* Tests_SRS_OPTIONHANDLER_01_001: [ `OptionHandler_Clone` shall clone an existing option handler instance. ]*/ /* Tests_SRS_OPTIONHANDLER_01_002: [ On success it shall return a non-NULL handle. ]*/ /* Tests_SRS_OPTIONHANDLER_01_003: [ `OptionHandler_Clone` shall allocate memory for the new option handler instance. ]*/ /* Tests_SRS_OPTIONHANDLER_01_005: [ `OptionHandler_Clone` shall iterate through all the options stored by the option handler to be cloned by using VECTOR's iteration mechanism. ]*/ /* Tests_SRS_OPTIONHANDLER_01_006: [ For each option the option name shall be cloned by calling `mallocAndStrcpy_s`. ]*/ /* Tests_SRS_OPTIONHANDLER_01_007: [ For each option the value shall be cloned by using the cloning function associated with the source option handler `handler`. ]*/ TEST_FUNCTION(OptionHandler_Clone_clones_an_instance_with_one_option) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("TrustedCerts", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements(); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); OptionHandler_Destroy(result); } /* Tests_SRS_OPTIONHANDLER_01_001: [ `OptionHandler_Clone` shall clone an existing option handler instance. ]*/ /* Tests_SRS_OPTIONHANDLER_01_002: [ On success it shall return a non-NULL handle. ]*/ /* Tests_SRS_OPTIONHANDLER_01_003: [ `OptionHandler_Clone` shall allocate memory for the new option handler instance. ]*/ /* Tests_SRS_OPTIONHANDLER_01_005: [ `OptionHandler_Clone` shall iterate through all the options stored by the option handler to be cloned by using VECTOR's iteration mechanism. ]*/ /* Tests_SRS_OPTIONHANDLER_01_006: [ For each option the option name shall be cloned by calling `mallocAndStrcpy_s`. ]*/ /* Tests_SRS_OPTIONHANDLER_01_007: [ For each option the value shall be cloned by using the cloning function associated with the source option handler `handler`. ]*/ TEST_FUNCTION(OptionHandler_Clone_clones_an_instance_with_2_options) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("TrustedCerts", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "option_2")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("option_2", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements(); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); OptionHandler_Destroy(result); } /* Tests_SRS_OPTIONHANDLER_01_004: [ If allocating memory fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_cloned_option_handler_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size() .SetReturn(NULL); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* Tests_SRS_OPTIONHANDLER_01_004: [ If allocating memory fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_creating_the_vector_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize() .SetReturn(NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* Tests_SRS_OPTIONHANDLER_01_008: [ If cloning one of the option names fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_cloning_the_first_option_name_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination() .SetReturn(1); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); EXPECTED_CALL(VECTOR_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* Tests_SRS_OPTIONHANDLER_01_009: [ If cloning one of the option values fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_cloning_the_first_option_value_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("TrustedCerts", IGNORED_PTR_ARG)) .IgnoreArgument_value() .SetReturn(NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); EXPECTED_CALL(VECTOR_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* Tests_SRS_OPTIONHANDLER_01_011: [ When adding one of the newly cloned options to the option handler storage vector fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_adding_the_first_cloned_option_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("TrustedCerts", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements() .SetReturn(1); EXPECTED_CALL(aDestroyOption("TrustedCerts", IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); EXPECTED_CALL(VECTOR_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* Tests_SRS_OPTIONHANDLER_01_008: [ If cloning one of the option names fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_cloning_the_2nd_option_name_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("TrustedCerts", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "option_2")) .IgnoreArgument_destination() .SetReturn(1); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); EXPECTED_CALL(aDestroyOption("TrustedCerts", IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(VECTOR_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* Tests_SRS_OPTIONHANDLER_01_009: [ If cloning one of the option values fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_cloning_the_2nd_option_value_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("TrustedCerts", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "option_2")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("option_2", IGNORED_PTR_ARG)) .IgnoreArgument_value() .SetReturn(NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); EXPECTED_CALL(aDestroyOption("TrustedCerts", IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(VECTOR_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* Tests_SRS_OPTIONHANDLER_01_011: [ When adding one of the newly cloned options to the option handler storage vector fails, `OptionHandler_Clone` shall return NULL. ]*/ TEST_FUNCTION(when_adding_the_2nd_cloned_option_fails_OptionHandler_Clone_fails) { ///arrange OPTIONHANDLER_HANDLE source; OPTIONHANDLER_HANDLE result; source = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(source, "TrustedCerts", "xxx"); (void)OptionHandler_AddOption(source, "option_2", "y"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(VECTOR_create(IGNORED_NUM_ARG)) .IgnoreArgument_elementSize(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "TrustedCerts")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("TrustedCerts", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "option_2")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("option_2", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements() .SetReturn(1); EXPECTED_CALL(aDestroyOption("option_2", IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); EXPECTED_CALL(aDestroyOption("TrustedCerts", IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(VECTOR_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act result = OptionHandler_Clone(source); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(source); } /* OptionHandler_AddOption */ /*Tests_SRS_OPTIONHANDLER_02_005: [ OptionHandler_AddOption shall fail and return OPTIONHANDLER_INVALIDARG if any parameter is NULL. ]*/ TEST_FUNCTION(OptionHandler_AddOption_with_NULL_handle_fails) { ///arrange ///act OPTIONHANDLER_RESULT result = OptionHandler_AddOption(NULL, "name", "some value"); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_INVALIDARG, result); ///cleanup } /*Tests_SRS_OPTIONHANDLER_02_005: [ OptionHandler_AddOption shall fail and return OPTIONHANDLER_INVALIDARG if any parameter is NULL. ]*/ TEST_FUNCTION(OptionHandler_AddOption_with_NULL_name_fails) { ///arrange OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); ///act OPTIONHANDLER_RESULT result = OptionHandler_AddOption(handle, NULL, "some value"); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_INVALIDARG, result); ///cleanup OptionHandler_Destroy(handle); } /*Tests_SRS_OPTIONHANDLER_02_005: [ OptionHandler_AddOption shall fail and return OPTIONHANDLER_INVALIDARG if any parameter is NULL. ]*/ TEST_FUNCTION(OptionHandler_AddOption_with_NULL_value_fails) { ///arrange OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); ///act OPTIONHANDLER_RESULT result = OptionHandler_AddOption(handle, "name", NULL); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_INVALIDARG, result); ///cleanup OptionHandler_Destroy(handle); } void OptionHandler_AddOption_inert_path(void* value) { STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "name")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(aCloneOption("name", value)) .IgnoreAllArguments(); STRICT_EXPECTED_CALL(VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle() .IgnoreArgument_elements(); } /*Tests_SRS_OPTIONHANDLER_02_006: [ OptionHandler_AddOption shall call pfCloneOption passing name and value. ]*/ /*Tests_SRS_OPTIONHANDLER_02_007: [ OptionHandler_AddOption shall use VECTOR APIs to save the name and the newly created clone of value. ]*/ /*Tests_SRS_OPTIONHANDLER_02_008: [ If all the operations succed then OptionHandler_AddOption shall succeed and return OPTIONHANDLER_OK. ]*/ TEST_FUNCTION(OptionHandler_AddOption_happy_path) { ///arrange OPTIONHANDLER_RESULT result; OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); void* value = "value"; OptionHandler_AddOption_inert_path(value); ///act result = OptionHandler_AddOption(handle, "name", value); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_OK, result); ///cleanup OptionHandler_Destroy(handle); } /*Tests_SRS_OPTIONHANDLER_02_009: [ Otherwise, OptionHandler_AddOption shall succeed and return OPTIONHANDLER_ERROR. ]*/ /*Tests_SRS_OPTIONHANDLER_02_008: [ If all the operations succed then OptionHandler_AddOption shall succeed and return OPTIONHANDLER_OK. ]*/ TEST_FUNCTION(OptionHandler_AddOption_unhappy_path) { ///arrange void* value = "value"; size_t i; OPTIONHANDLER_HANDLE handle; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); umock_c_reset_all_calls(); OptionHandler_AddOption_inert_path(value); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; OPTIONHANDLER_RESULT result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act (void)sprintf(temp_str, "On failed call %zu", i); ///act result = OptionHandler_AddOption(handle, "name", value); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_ERROR, result, temp_str); } ///cleanup OptionHandler_Destroy(handle); umock_c_negative_tests_deinit(); } /* OptionHandler_FeedOptions */ /*Tests_SRS_OPTIONHANDLER_02_010: [ OptionHandler_FeedOptions shall fail and return OPTIONHANDLER_INVALIDARG if any argument is NULL. ]*/ TEST_FUNCTION(OptionHandler_FeedOptions_with_NULL_handle_fails) { ///arrange ///act OPTIONHANDLER_RESULT result = OptionHandler_FeedOptions(NULL, "something non NULL"); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_INVALIDARG, result); ///cleanup } /*Tests_SRS_OPTIONHANDLER_02_010: [ OptionHandler_FeedOptions shall fail and return OPTIONHANDLER_INVALIDARG if any argument is NULL. ]*/ TEST_FUNCTION(OptionHandler_FeedOptions_with_NULL_destinationhandle_fails) { ///arrange OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); ///act OPTIONHANDLER_RESULT result = OptionHandler_FeedOptions(handle, NULL); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_INVALIDARG, result); ///cleanup OptionHandler_Destroy(handle); } /*Tests_SRS_OPTIONHANDLER_02_011: [ Otherwise, OptionHandler_FeedOptions shall use VECTOR's iteration mechanisms to retrieve pairs of name, value (const char* and void*). ]*/ /*Tests_SRS_OPTIONHANDLER_02_012: [ OptionHandler_FeedOptions shall call for every pair of name,value setOption passing destinationHandle, name and value. ]*/ /*Tests_SRS_OPTIONHANDLER_02_013: [ If all the operations succeed then OptionHandler_FeedOptions shall succeed and return OPTIONHANDLER_OK. ]*/ TEST_FUNCTION(OptionHandler_FeedOptions_with_0_saved_options_feeds_0_succeeds) { ///arrange OPTIONHANDLER_RESULT result; OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) /*will return 0, so nothing else happens*/ .IgnoreArgument_handle(); ///act result = OptionHandler_FeedOptions(handle, (void*)42); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_OK, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(handle); } static void OptionHandler_FeedOptions_with_1_saved_options_feeds_1_inert_path(void) { STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) /*will return 0, so nothing else happens*/ .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(aSetOption((void*)42, "a", IGNORED_PTR_ARG)) .IgnoreArgument_value(); } /*Tests_SRS_OPTIONHANDLER_02_011: [ Otherwise, OptionHandler_FeedOptions shall use VECTOR's iteration mechanisms to retrieve pairs of name, value (const char* and void*). ]*/ /*Tests_SRS_OPTIONHANDLER_02_012: [ OptionHandler_FeedOptions shall call for every pair of name,value setOption passing destinationHandle, name and value. ]*/ /*Tests_SRS_OPTIONHANDLER_02_013: [ If all the operations succeed then OptionHandler_FeedOptions shall succeed and return OPTIONHANDLER_OK. ]*/ TEST_FUNCTION(OptionHandler_FeedOptions_with_1_saved_options_feeds_1_happypath) { ///arrange OPTIONHANDLER_RESULT result; OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(handle, "a", "b"); umock_c_reset_all_calls(); OptionHandler_FeedOptions_with_1_saved_options_feeds_1_inert_path(); ///act result = OptionHandler_FeedOptions(handle, (void*)42); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_OK, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(handle); } /*Tests_SRS_OPTIONHANDLER_02_014: [ Otherwise, OptionHandler_FeedOptions shall fail and return OPTIONHANDLER_ERROR. ]*/ TEST_FUNCTION(OptionHandler_FeedOptions_with_1_saved_options_feeds_1_unhappypaths) { ///arrange size_t i; size_t calls_that_cannot_fail[] = { 0, 1, }; OPTIONHANDLER_HANDLE handle; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(handle, "a", "b"); umock_c_reset_all_calls(); OptionHandler_FeedOptions_with_1_saved_options_feeds_1_inert_path(); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; size_t j; OPTIONHANDLER_RESULT result; for (j = 0;j < sizeof(calls_that_cannot_fail) / sizeof(calls_that_cannot_fail[0]);j++) { if (calls_that_cannot_fail[j] == i) { break; } } if (j != sizeof(calls_that_cannot_fail) / sizeof(calls_that_cannot_fail[0])) { continue; //just go to the next call that might be failed. } umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act (void)sprintf(temp_str, "On failed call %zu", i); ///act result = OptionHandler_FeedOptions(handle, (void*)42); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_ERROR, result, temp_str); } ///cleanup OptionHandler_Destroy(handle); umock_c_negative_tests_deinit(); } static void OptionHandler_FeedOptions_with_2_saved_options_feeds_2_inert_path(void) { STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) /*will return 0, so nothing else happens*/ .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(aSetOption((void*)42, "a", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(aSetOption((void*)42, "c", IGNORED_PTR_ARG)) .IgnoreArgument_value(); } /*Tests_SRS_OPTIONHANDLER_02_011: [ Otherwise, OptionHandler_FeedOptions shall use VECTOR's iteration mechanisms to retrieve pairs of name, value (const char* and void*). ]*/ /*Tests_SRS_OPTIONHANDLER_02_012: [ OptionHandler_FeedOptions shall call for every pair of name,value setOption passing destinationHandle, name and value. ]*/ /*Tests_SRS_OPTIONHANDLER_02_013: [ If all the operations succeed then OptionHandler_FeedOptions shall succeed and return OPTIONHANDLER_OK. ]*/ TEST_FUNCTION(OptionHandler_FeedOptions_with_2_saved_options_feeds_2_happypath) { ///arrange OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); OPTIONHANDLER_RESULT result; (void)OptionHandler_AddOption(handle, "a", "b"); (void)OptionHandler_AddOption(handle, "c", "b2"); umock_c_reset_all_calls(); OptionHandler_FeedOptions_with_2_saved_options_feeds_2_inert_path(); ///act result = OptionHandler_FeedOptions(handle, (void*)42); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_OK, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(handle); } /*Tests_SRS_OPTIONHANDLER_02_014: [ Otherwise, OptionHandler_FeedOptions shall fail and return OPTIONHANDLER_ERROR. ]*/ TEST_FUNCTION(OptionHandler_FeedOptions_with_2_saved_options_feeds_2_unhappypaths) { ///arrange OPTIONHANDLER_HANDLE handle; size_t calls_that_cannot_fail[] = { 0, 1, 3, }; size_t i; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(handle, "a", "b"); (void)OptionHandler_AddOption(handle, "c", "b2"); umock_c_reset_all_calls(); OptionHandler_FeedOptions_with_2_saved_options_feeds_2_inert_path(); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; size_t j; OPTIONHANDLER_RESULT result; for (j = 0;j < sizeof(calls_that_cannot_fail) / sizeof(calls_that_cannot_fail[0]);j++) { if (calls_that_cannot_fail[j] == i) { break; } } if (j != sizeof(calls_that_cannot_fail) / sizeof(calls_that_cannot_fail[0])) { continue; //just go to the next call that might be failed. } umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act (void)sprintf(temp_str, "On failed call %zu", i); ///act result = OptionHandler_FeedOptions(handle, (void*)42); ///assert ASSERT_ARE_EQUAL(OPTIONHANDLER_RESULT, OPTIONHANDLER_ERROR, result, temp_str); } ///cleanup OptionHandler_Destroy(handle); umock_c_negative_tests_deinit(); } /* OptionHandler_Destroy */ /*Tests_SRS_OPTIONHANDLER_02_015: [ OptionHandler_Destroy shall do nothing if parameter handle is NULL. ]*/ TEST_FUNCTION(OptionHandler_Destroy_with_NULL_does_nothing) { ///arrange ///act OptionHandler_Destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_OPTIONHANDLER_02_016: [ Otherwise, OptionHandler_Destroy shall free all used resources. ]*/ TEST_FUNCTION(OptionHandler_Destroy_with_non_NULL_handle_succeeds) { ///arrange OPTIONHANDLER_HANDLE handle = OptionHandler_Create(aCloneOption, aDestroyOption, aSetOption); (void)OptionHandler_AddOption(handle, "a", "b"); (void)OptionHandler_AddOption(handle, "c", "b2"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 0)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(aDestroyOption("a", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument_ptr(); STRICT_EXPECTED_CALL(VECTOR_element(IGNORED_PTR_ARG, 1)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(aDestroyOption("c", IGNORED_PTR_ARG)) .IgnoreArgument_value(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument_ptr(); STRICT_EXPECTED_CALL(VECTOR_destroy(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument_ptr(); ///act OptionHandler_Destroy(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } END_TEST_SUITE(optionhandler_unittests) platform_win32_ut/000077500000000000000000000000001362133436400337755ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000012401362133436400365320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/platform_win32_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /IGNORE:4217") set(CMAKE_SHARED_LINKER_FLAGS "$(CMAKE_SHARED_LINKER_FLAGS) /IGNORE:4217") endif() set(theseTestsName platform_win32_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ${PLATFORM_C_FILE} ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005001362133436400350600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/platform_win32_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(platform_win32_ut, failedTestCount); return failedTestCount; } platform_win32_ut.c000066400000000000000000000143751362133436400375310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/platform_win32_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplus #include #else #include #endif #include "testrunnerswitcher.h" #undef DECLSPEC_IMPORT #pragma warning(disable: 4273) #include void* my_gballoc_malloc(size_t size) { return malloc(size); } void my_gballoc_free(void* ptr) { free(ptr); } #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_stdint.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/tlsio_schannel.h" #ifdef USE_OPENSSL #include "azure_c_shared_utility/tlsio_openssl.h" #endif #if USE_WOLFSSL #include "azure_c_shared_utility/tlsio_wolfssl.h" #endif #undef ENABLE_MOCKS #include "azure_c_shared_utility/platform.h" #define ENABLE_MOCKS MOCK_FUNCTION_WITH_CODE(WSAAPI, int, WSAStartup, WORD, wVersionRequested, LPWSADATA, lpWSAData) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, WSACleanup) MOCK_FUNCTION_END(0) static const IO_INTERFACE_DESCRIPTION* TEST_IO_INTERFACE_DESCRIPTION = (const IO_INTERFACE_DESCRIPTION*)0x4444; #ifdef __cplusplus extern "C" { #endif STRING_HANDLE STRING_construct_sprintf(const char* format, ...); STRING_HANDLE STRING_construct_sprintf(const char* format, ...) { const char* psz = "STRING_construct_sprintf variable"; char* temp = (char*)my_gballoc_malloc(strlen(psz) + 1); ASSERT_IS_NOT_NULL(temp); (void)format; (void)memcpy(temp, psz, strlen(psz) + 1); return (STRING_HANDLE)temp; } #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } static STRING_HANDLE my_STRING_construct(const char* psz) { char* temp = (char*)my_gballoc_malloc(strlen(psz) + 1); ASSERT_IS_NOT_NULL(temp); (void)memcpy(temp, psz, strlen(psz) + 1); return (STRING_HANDLE)temp; } const char* my_STRING_c_str(STRING_HANDLE handle) { return (const char*)handle; } static void my_STRING_delete(STRING_HANDLE h) { my_gballoc_free((void*)h); } static const IO_INTERFACE_DESCRIPTION* my_tlsio_schannel_get_interface_description(void) { return TEST_IO_INTERFACE_DESCRIPTION; } static VOID my_GetSystemInfo(_Out_ LPSYSTEM_INFO lpSystemInfo) { lpSystemInfo->wProcessorArchitecture = PROCESSOR_ARCHITECTURE_INTEL; } BEGIN_TEST_SUITE(platform_win32_ut) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_stdint_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(WORD, int); REGISTER_UMOCK_ALIAS_TYPE(LPWSADATA, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(STRING_construct, my_STRING_construct); REGISTER_GLOBAL_MOCK_HOOK(STRING_c_str, my_STRING_c_str); REGISTER_GLOBAL_MOCK_HOOK(STRING_delete, my_STRING_delete); REGISTER_GLOBAL_MOCK_RETURN(tlsio_schannel_get_interface_description, TEST_IO_INTERFACE_DESCRIPTION); #ifdef USE_OPENSSL REGISTER_GLOBAL_MOCK_RETURN(tlsio_openssl_get_interface_description, TEST_IO_INTERFACE_DESCRIPTION); REGISTER_GLOBAL_MOCK_RETURN(tlsio_openssl_init, 0); #endif } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } TEST_FUNCTION(platform_init_success) { int result; //arrange STRICT_EXPECTED_CALL(WSAStartup(IGNORED_NUM_ARG, IGNORED_PTR_ARG)); #ifdef USE_OPENSSL STRICT_EXPECTED_CALL(tlsio_openssl_init()); #endif //act result = platform_init(); //assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } TEST_FUNCTION(platform_init_WSAStartup_0_fail) { int result; //arrange STRICT_EXPECTED_CALL(WSAStartup(IGNORED_NUM_ARG, IGNORED_PTR_ARG)).SetReturn(1); //act result = platform_init(); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } TEST_FUNCTION(platform_get_default_tlsio_success) { const IO_INTERFACE_DESCRIPTION* io_desc; //arrange #ifdef USE_OPENSSL STRICT_EXPECTED_CALL(tlsio_openssl_get_interface_description()); #else STRICT_EXPECTED_CALL(tlsio_schannel_get_interface_description()); #endif //act io_desc = platform_get_default_tlsio(); //assert ASSERT_IS_NOT_NULL(io_desc); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } TEST_FUNCTION(platform_get_platform_info_success) { //arrange //act STRING_HANDLE platform = platform_get_platform_info(); //assert ASSERT_IS_NOT_NULL(platform); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup STRING_delete(platform); } TEST_FUNCTION(platform_deinit_success) { //arrange STRICT_EXPECTED_CALL(WSACleanup()); #ifdef USE_OPENSSL STRICT_EXPECTED_CALL(tlsio_openssl_deinit()); #endif //act platform_deinit(); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } END_TEST_SUITE(platform_win32_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files/000077500000000000000000000000001362133436400336425ustar00rootroot00000000000000real_base64.c000066400000000000000000000005131362133436400360150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define Base64_Encoder real_Base64_Encoder #define Base64_Encode_Bytes real_Base64_Encode_Bytes #define Base64_Decoder real_Base64_Decoder #define GBALLOC_H #include "base64.c" real_buffer.c000066400000000000000000000016011362133436400362010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define BUFFER_new real_BUFFER_new #define BUFFER_create real_BUFFER_create #define BUFFER_pre_build real_BUFFER_pre_build #define BUFFER_build real_BUFFER_build #define BUFFER_unbuild real_BUFFER_unbuild #define BUFFER_append real_BUFFER_append #define BUFFER_prepend real_BUFFER_prepend #define BUFFER_u_char real_BUFFER_u_char #define BUFFER_length real_BUFFER_length #define BUFFER_clone real_BUFFER_clone #define BUFFER_delete real_BUFFER_delete #define BUFFER_enlarge real_BUFFER_enlarge #define BUFFER_size real_BUFFER_size #define BUFFER_content real_BUFFER_content #define BUFFER_append_build real_BUFFER_append_build #define BUFFER_shrink real_BUFFER_shrink #define BUFFER_fill real_BUFFER_fill #define GBALLOC_H #include "buffer.c" real_constbuffer.c000066400000000000000000000007401362133436400372530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define CONSTBUFFER_Create real_CONSTBUFFER_Create #define CONSTBUFFER_CreateFromBuffer real_CONSTBUFFER_CreateFromBuffer #define CONSTBUFFER_Clone real_CONSTBUFFER_Clone #define CONSTBUFFER_GetContent real_CONSTBUFFER_GetContent #define CONSTBUFFER_Destroy real_CONSTBUFFER_Destroy #define GBALLOC_H #include "constbuffer.c" real_crt_abstractions.c000066400000000000000000000005331362133436400402770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define mallocAndStrcpy_s real_mallocAndStrcpy_s #define unsignedIntToString real_unsignedIntToString #define size_tToString real_size_tToString #define GBALLOC_H #include "crt_abstractions.c" real_map.c000066400000000000000000000012761362133436400355150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define GBALLOC_H #define Map_Create real_Map_Create #define Map_Destroy real_Map_Destroy #define Map_Clone real_Map_Clone #define Map_Add real_Map_Add #define Map_AddOrUpdate real_Map_AddOrUpdate #define Map_Delete real_Map_Delete #define Map_ContainsKey real_Map_ContainsKey #define Map_ContainsValue real_Map_ContainsValue #define Map_GetValueFromKey real_Map_GetValueFromKey #define Map_GetInternals real_Map_GetInternals #define Map_ToJSON real_Map_ToJSON #include "map.c" real_map.h000066400000000000000000000037571362133436400355300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef REAL_MAP_H #define REAL_MAP_H #define REGISTER_MAP_GLOBAL_MOCK_HOOK \ REGISTER_GLOBAL_MOCK_HOOK(Map_Create, real_Map_Create); \ REGISTER_GLOBAL_MOCK_HOOK(Map_Destroy, real_Map_Destroy); \ REGISTER_GLOBAL_MOCK_HOOK(Map_Clone, real_Map_Clone); \ REGISTER_GLOBAL_MOCK_HOOK(Map_Add, real_Map_Add); \ REGISTER_GLOBAL_MOCK_HOOK(Map_AddOrUpdate, real_Map_AddOrUpdate); \ REGISTER_GLOBAL_MOCK_HOOK(Map_Delete, real_Map_Delete); \ REGISTER_GLOBAL_MOCK_HOOK(Map_ContainsKey, real_Map_ContainsKey); \ REGISTER_GLOBAL_MOCK_HOOK(Map_ContainsValue, real_Map_ContainsValue); \ REGISTER_GLOBAL_MOCK_HOOK(Map_GetValueFromKey, real_Map_GetValueFromKey); \ REGISTER_GLOBAL_MOCK_HOOK(Map_GetInternals, real_Map_GetInternals); \ REGISTER_GLOBAL_MOCK_HOOK(Map_ToJSON, real_Map_ToJSON); #ifdef __cplusplus #include extern "C" { #else #include #endif extern MAP_HANDLE real_Map_Create(MAP_FILTER_CALLBACK mapFilterFunc); extern void real_Map_Destroy(MAP_HANDLE handle); extern MAP_HANDLE real_Map_Clone(MAP_HANDLE handle); extern MAP_RESULT real_Map_Add(MAP_HANDLE handle, const char* key, const char* value); extern MAP_RESULT real_Map_AddOrUpdate(MAP_HANDLE handle, const char* key, const char* value); extern MAP_RESULT real_Map_Delete(MAP_HANDLE handle, const char* key); extern MAP_RESULT real_Map_ContainsKey(MAP_HANDLE handle, const char* key, bool* keyExists); extern MAP_RESULT real_Map_ContainsValue(MAP_HANDLE handle, const char* value, bool* valueExists); extern const char* real_Map_GetValueFromKey(MAP_HANDLE handle, const char* key); extern MAP_RESULT real_Map_GetInternals(MAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count); extern STRING_HANDLE real_Map_ToJSON(MAP_HANDLE handle); #ifdef __cplusplus } #endif #endif // !REAL_MAP_H real_singlylinkedlist.c000066400000000000000000000016311362133436400403230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define singlylinkedlist_create real_singlylinkedlist_create #define singlylinkedlist_destroy real_singlylinkedlist_destroy #define singlylinkedlist_add real_singlylinkedlist_add #define singlylinkedlist_add_head real_singlylinkedlist_add_head #define singlylinkedlist_remove real_singlylinkedlist_remove #define singlylinkedlist_get_head_item real_singlylinkedlist_get_head_item #define singlylinkedlist_get_next_item real_singlylinkedlist_get_next_item #define singlylinkedlist_find real_singlylinkedlist_find #define singlylinkedlist_item_get_value real_singlylinkedlist_item_get_value #define singlylinkedlist_remove_if real_singlylinkedlist_remove_if #define singlylinkedlist_foreach real_singlylinkedlist_foreach #define GBALLOC_H #include "singlylinkedlist.c" real_string_token.c000066400000000000000000000011071362133436400374370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define StringToken_GetFirst real_StringToken_GetFirst #define StringToken_GetNext real_StringToken_GetNext #define StringToken_GetValue real_StringToken_GetValue #define StringToken_GetLength real_StringToken_GetLength #define StringToken_GetDelimiter real_StringToken_GetDelimiter #define StringToken_Split real_StringToken_Split #define StringToken_Destroy real_StringToken_Destroy #define GBALLOC_H #include "string_token.c" real_string_tokenizer.c000066400000000000000000000004361362133436400403350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define COMPILING_REAL_REAL_STRING_TOKENIZER_H_C #define GBALLOC_H #include "real_string_tokenizer.h" #include "string_tokenizer.c" real_string_tokenizer.h000066400000000000000000000024171362133436400403430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef REAL_STRING_TOKENIZER_H #define REAL_STRING_TOKENIZER_H #define REGISTER_STRING_TOKENIZER_GLOBAL_MOCK_HOOK \ REGISTER_GLOBAL_MOCK_HOOK(STRING_TOKENIZER_create, real_STRING_TOKENIZER_create); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_TOKENIZER_create_from_char, real_STRING_TOKENIZER_create_from_char); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_TOKENIZER_get_next_token, real_STRING_TOKENIZER_get_next_token); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_TOKENIZER_destroy, real_STRING_TOKENIZER_destroy); #define STRING_TOKENIZER_create real_STRING_TOKENIZER_create #define STRING_TOKENIZER_create_from_char real_STRING_TOKENIZER_create_from_char #define STRING_TOKENIZER_get_next_token real_STRING_TOKENIZER_get_next_token #define STRING_TOKENIZER_destroy real_STRING_TOKENIZER_destroy #undef STRING_TOKENIZER_H #include "azure_c_shared_utility/string_tokenizer.h" #ifndef COMPILING_REAL_REAL_STRING_TOKENIZER_H_C #undef STRING_TOKENIZER_create #undef STRING_TOKENIZER_create_from_char #undef STRING_TOKENIZER_get_next_token #undef STRING_TOKENIZER_destroy #endif #undef STRING_TOKENIZER_H #endif real_strings.c000066400000000000000000000003731362133436400364260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define COMPILING_REAL_STRINGS_C #define GBALLOC_H #include "real_strings.h" #include "strings.c" real_strings.h000066400000000000000000000103301362133436400364250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef REAL_STRINGS_H #define REAL_STRINGS_H #define REGISTER_STRING_GLOBAL_MOCK_HOOK \ REGISTER_GLOBAL_MOCK_HOOK(STRING_new, real_STRING_new); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_clone, real_STRING_clone); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_clone, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_construct, real_STRING_construct); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_construct, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_construct_n, real_STRING_construct_n); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_construct_n, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_new_with_memory, real_STRING_new_with_memory); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new_with_memory, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_new_quoted, real_STRING_new_quoted); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new_quoted, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_new_JSON, real_STRING_new_JSON); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new_JSON, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_from_byte_array, real_STRING_from_byte_array); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_from_byte_array, NULL); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_delete, real_STRING_delete); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_concat, real_STRING_concat); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_concat, __LINE__); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_concat_with_STRING, real_STRING_concat_with_STRING); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_concat_with_STRING, __LINE__); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_quote, real_STRING_quote); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_quote, __LINE__); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_copy, real_STRING_copy); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_copy, __LINE__); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_copy_n, real_STRING_copy_n); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_copy_n, __LINE__); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_c_str, real_STRING_c_str); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_empty, real_STRING_empty); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_empty, __LINE__); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_length, real_STRING_length); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_compare, real_STRING_compare); \ REGISTER_GLOBAL_MOCK_HOOK(STRING_replace, real_STRING_replace); \ REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_replace, __LINE__); #define STRING_new real_STRING_new #define STRING_clone real_STRING_clone #define STRING_construct real_STRING_construct #define STRING_construct_n real_STRING_construct_n #define STRING_new_with_memory real_STRING_new_with_memory #define STRING_new_quoted real_STRING_new_quoted #define STRING_new_JSON real_STRING_new_JSON #define STRING_from_byte_array real_STRING_from_byte_array #define STRING_delete real_STRING_delete #define STRING_concat real_STRING_concat #define STRING_concat_with_STRING real_STRING_concat_with_STRING #define STRING_quote real_STRING_quote #define STRING_copy real_STRING_copy #define STRING_copy_n real_STRING_copy_n #define STRING_c_str real_STRING_c_str #define STRING_empty real_STRING_empty #define STRING_length real_STRING_length #define STRING_compare real_STRING_compare #define STRING_replace real_STRING_replace #undef STRINGS_H #include "azure_c_shared_utility/strings.h" #ifndef COMPILING_REAL_STRINGS_C #undef STRING_new #undef STRING_clone #undef STRING_construct #undef STRING_construct_n #undef STRING_new_with_memory #undef STRING_new_quoted #undef STRING_new_JSON #undef STRING_from_byte_array #undef STRING_delete #undef STRING_concat #undef STRING_concat_with_STRING #undef STRING_quote #undef STRING_copy #undef STRING_copy_n #undef STRING_c_str #undef STRING_empty #undef STRING_length #undef STRING_compare #undef STRING_replace #endif #undef STRINGS_H #endifreal_vector.c000066400000000000000000000011751362133436400362400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #define VECTOR_create real_VECTOR_create #define VECTOR_move real_VECTOR_move #define VECTOR_destroy real_VECTOR_destroy #define VECTOR_push_back real_VECTOR_push_back #define VECTOR_erase real_VECTOR_erase #define VECTOR_clear real_VECTOR_clear #define VECTOR_element real_VECTOR_element #define VECTOR_front real_VECTOR_front #define VECTOR_back real_VECTOR_back #define VECTOR_find_if real_VECTOR_find_if #define VECTOR_size real_VECTOR_size #define GBALLOC_H #include "vector.c" azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/refcount_ut/000077500000000000000000000000001362133436400330335ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000010111362133436400355050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/refcount_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName refcount_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files some_refcount_impl.c ) set(${theseTestsName}_h_files some_refcount_impl.h ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C11) main.c000066400000000000000000000005011362133436400340400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/refcount_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(refcount_unittests, failedTestCount); return failedTestCount; } refcount_ut.c000066400000000000000000000142001362133436400354520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/refcount_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif void* my_gballoc_malloc(size_t size) { return malloc(size); } void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "some_refcount_impl.h" #include "umock_c.h" static TEST_MUTEX_HANDLE g_testByTest; #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(refcount_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(POS_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* REFCOUNT_TYPE_CREATE */ /* Tests_SRS_REFCOUNT_01_002: [ `REFCOUNT_TYPE_CREATE` shall allocate memory for the type that is ref counted. ]*/ /* Tests_SRS_REFCOUNT_01_003: [ On success it shall return a non-NULL handle to the allocated ref counted type `type`. ]*/ TEST_FUNCTION(refcount_create_returns_non_NULL) { ///arrange POS_HANDLE p; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); ///act p = Pos_Create(4); ///assert ASSERT_IS_NOT_NULL(p); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup Pos_Destroy(p); } /* Tests_SRS_REFCOUNT_01_004: [ If any error occurrs, `REFCOUNT_TYPE_CREATE` shall return NULL. ]*/ TEST_FUNCTION(when_malloc_fails_refcount_create_fails) { ///arrange POS_HANDLE p; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); ///act p = Pos_Create(4); ///assert ASSERT_IS_NULL(p); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE */ /* Tests_SRS_REFCOUNT_01_005: [ `REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE` shall allocate memory for the type that is ref counted (`type`) plus extra memory enough to hold `size` bytes. ]*/ /* Tests_SRS_REFCOUNT_01_006: [ On success it shall return a non-NULL handle to the allocated ref counted type `type`. ]*/ TEST_FUNCTION(refcount_create_with_extra_size_returns_non_NULL) { ///arrange POS_HANDLE p; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); ///act p = Pos_Create_With_Extra_Size(4, 42); ///assert ASSERT_IS_NOT_NULL(p); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup Pos_Destroy(p); } /* Tests_SRS_REFCOUNT_01_007: [ If any error occurrs, `REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE` shall return NULL. ]*/ TEST_FUNCTION(when_malloc_fails_refcount_create_with_extra_size_also_fails) { ///arrange POS_HANDLE p; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); ///act p = Pos_Create_With_Extra_Size(4, 42); ///assert ASSERT_IS_NULL(p); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* REFCOUNT_TYPE_DESTROY */ /* Tests_SRS_REFCOUNT_01_008: [ `REFCOUNT_TYPE_DESTROY` shall free the memory allocated by `REFCOUNT_TYPE_CREATE` or `REFCOUNT_TYPE_CREATE_WITH_EXTRA_MEMORY`. ]*/ TEST_FUNCTION(refcount_DEC_REF_after_create_says_we_should_free) { ///arrange POS_HANDLE p; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); p = Pos_Create(4); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); Pos_Destroy(p); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } /* Tests_SRS_REFCOUNT_01_009: [ If `counted_type` is NULL, `REFCOUNT_TYPE_DESTROY` shall return. ]*/ TEST_FUNCTION(refcount_DESTROY_with_NULL_returns) { ///arrange ///act Pos_Destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(refcount_INC_REF_and_DEC_REF_after_create_says_we_should_not_free) { ///arrange POS_HANDLE p, clone_of_p; p = Pos_Create(2); clone_of_p = Pos_Clone(p); umock_c_reset_all_calls(); ///act Pos_Destroy(p); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup Pos_Destroy(p); } TEST_FUNCTION(refcount_after_clone_it_takes_2_destroys_to_free) { ///arrange POS_HANDLE p, clone_of_p; p = Pos_Create(2); clone_of_p = Pos_Clone(p); Pos_Destroy(p); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); Pos_Destroy(clone_of_p); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } END_TEST_SUITE(refcount_unittests) some_refcount_impl.c000066400000000000000000000023371362133436400370160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/refcount_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "azure_c_shared_utility/refcount.h" #include "some_refcount_impl.h" typedef struct pos_TAG { int x; #ifdef _MSC_VER /*warning C4200: nonstandard extension used: zero-sized array in struct/union */ #pragma warning(disable:4200) #endif int flexible_array[]; } pos; DEFINE_REFCOUNT_TYPE(pos); POS_HANDLE Pos_Create(int x) { pos* result = REFCOUNT_TYPE_CREATE(pos); if (result != NULL) { result->x = x; } return result; } POS_HANDLE Pos_Create_With_Extra_Size(int x, size_t extra_size) { pos* result = REFCOUNT_TYPE_CREATE_WITH_EXTRA_SIZE(pos, extra_size); if (result != NULL) { result->x = x; } return result; } POS_HANDLE Pos_Clone(POS_HANDLE posHandle) { if (posHandle != NULL) { pos* p = posHandle; INC_REF(pos, p); } return posHandle; } void Pos_Destroy(POS_HANDLE posHandle) { if (posHandle != NULL) { pos* p = posHandle; if (DEC_REF(pos, p) == DEC_RETURN_ZERO) { REFCOUNT_TYPE_DESTROY(pos, p); } } } some_refcount_impl.h000066400000000000000000000010751362133436400370210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/refcount_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef SOME_REFCOUNT_IMPL_H #define SOME_REFCOUNT_IMPL_H #ifdef __cplusplus #include extern "C" { #else #include #endif typedef struct pos_TAG* POS_HANDLE; POS_HANDLE Pos_Create(int x); POS_HANDLE Pos_Create_With_Extra_Size(int x, size_t extraSize); POS_HANDLE Pos_Clone(POS_HANDLE posHandle); void Pos_Destroy(POS_HANDLE posHandle); #ifdef __cplusplus } #endif #endif /*SOME_REFCOUNT_IMPL_H*/ azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/sastoken_ut/000077500000000000000000000000001362133436400330355ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007611362133436400355220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/sastoken_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName sastoken_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/sastoken.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005011362133436400340420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/sastoken_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(sastoken_unittests, failedTestCount); return failedTestCount; } sastoken_ut.c000066400000000000000000002437631362133436400355000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/sastoken_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* ptr) { free(ptr); } #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/hmacsha256.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/buffer_.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/urlencode.h" #include "azure_c_shared_utility/base64.h" #include "azure_c_shared_utility/agenttime.h" #undef ENABLE_MOCKS IMPLEMENT_UMOCK_C_ENUM_TYPE(HMACSHA256_RESULT, HMACSHA256_RESULT_VALUES); double my_get_difftime(time_t stopTime, time_t startTime) { return (double)(stopTime - startTime); } STRING_HANDLE my_STRING_new(void) { return (STRING_HANDLE)malloc(1); } BUFFER_HANDLE my_BUFFER_new(void) { return (BUFFER_HANDLE)malloc(1); } STRING_HANDLE my_Base64_Encode(BUFFER_HANDLE input) { (void)input; return (STRING_HANDLE)malloc(1); } BUFFER_HANDLE my_Base64_Decoder(const char* source) { (void)source; return (BUFFER_HANDLE)malloc(1); } STRING_HANDLE my_URL_Encode(STRING_HANDLE input) { (void)input; return (STRING_HANDLE)malloc(1); } #include "azure_c_shared_utility/sastoken.h" #define TEST_STRING_HANDLE (STRING_HANDLE)0x46 #define TEST_NULL_STRING_HANDLE (STRING_HANDLE)0x00 #define TEST_BUFFER_HANDLE (BUFFER_HANDLE)0x47 #define TEST_NULL_BUFFER_HANDLE (BUFFER_HANDLE)0x00 #define TEST_SCOPE_HANDLE (STRING_HANDLE)0x48 #define TEST_KEY_HANDLE (STRING_HANDLE)0x49 #define TEST_KEYNAME_HANDLE (STRING_HANDLE)0x50 #define TEST_HASH_HANDLE (BUFFER_HANDLE)0x51 #define TEST_TOBEHASHED_HANDLE (STRING_HANDLE)0x52 #define TEST_RESULT_HANDLE (STRING_HANDLE)0x53 #define TEST_BASE64SIGNATURE_HANDLE (STRING_HANDLE)0x54 #define TEST_URLENCODEDSIGNATURE_HANDLE (STRING_HANDLE)0x55 #define TEST_DECODEDKEY_HANDLE (BUFFER_HANDLE)0x56 #define TEST_TIME_T ((time_t)3600) #define TEST_PTR_DECODEDKEY (unsigned char*)0x123 #define TEST_LENGTH_DECODEDKEY (size_t)32 #define TEST_PTR_TOBEHASHED (const char*)0x456 #define TEST_LENGTH_TOBEHASHED (size_t)456 #define TEST_EXPIRY ((size_t)7200) #define TEST_LATER_TIME (time_t) 11 #define TEST_EARLY_TIME (time_t) 10 static const char* TEST_STRING_VALUE = "Test string value"; static const char* TEST_NULL_STRING_VALUE = 0x00; static char TEST_CHAR_ARRAY[10] = "ABCD"; static unsigned char TEST_UNSIGNED_CHAR_ARRAY[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09 }; static char TEST_TOKEN_EXPIRATION_TIME[32] = "7200"; static TEST_MUTEX_HANDLE g_testByTest; #ifdef __cplusplus extern "C" { #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } #ifdef __cplusplus } #endif BEGIN_TEST_SUITE(sastoken_unittests) TEST_SUITE_INITIALIZE(TestClassInitialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(time_t, int); REGISTER_UMOCK_ALIAS_TYPE(time_t*, void*); REGISTER_UMOCK_ALIAS_TYPE(size_t, unsigned int); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_TYPE(HMACSHA256_RESULT, HMACSHA256_RESULT); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(STRING_new, my_STRING_new); REGISTER_GLOBAL_MOCK_RETURN(STRING_concat, 0); REGISTER_GLOBAL_MOCK_RETURN(STRING_concat_with_STRING, 0); REGISTER_GLOBAL_MOCK_RETURN(STRING_c_str, &TEST_CHAR_ARRAY[0]); REGISTER_GLOBAL_MOCK_RETURN(STRING_length, 1); REGISTER_GLOBAL_MOCK_RETURN(STRING_copy, 0); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_new, my_BUFFER_new); REGISTER_GLOBAL_MOCK_RETURN(BUFFER_u_char, &TEST_UNSIGNED_CHAR_ARRAY[0]); REGISTER_GLOBAL_MOCK_RETURN(BUFFER_length, 1); REGISTER_GLOBAL_MOCK_HOOK(Base64_Encoder, my_Base64_Encode); REGISTER_GLOBAL_MOCK_HOOK(Base64_Decoder, my_Base64_Decoder); REGISTER_GLOBAL_MOCK_HOOK(URL_Encode, my_URL_Encode); REGISTER_GLOBAL_MOCK_RETURN(HMACSHA256_ComputeHash, HMACSHA256_OK); REGISTER_GLOBAL_MOCK_RETURN(size_tToString, 0); REGISTER_GLOBAL_MOCK_RETURN(get_time, TEST_TIME_T); REGISTER_GLOBAL_MOCK_HOOK(get_difftime, my_get_difftime); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /*Tests_SRS_SASTOKEN_25_025: [**SASToken_Validate shall get the SASToken value by invoking STRING_c_str on the handle.**]***/ TEST_FUNCTION(SASToken_validate_null_handle_fails) { // arrange STRING_HANDLE handle = NULL; bool result; STRICT_EXPECTED_CALL(STRING_c_str(TEST_NULL_STRING_HANDLE)).SetReturn(NULL); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_25_025: [**SASToken_Validate shall get the SASToken value by invoking STRING_c_str on the handle.**]***/ TEST_FUNCTION(SASToken_validate_null_string_valid_handle_fails) { // arrange STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_NULL_STRING_VALUE); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_25_025: [**SASToken_Validate shall get the SASToken value by invoking STRING_c_str on the handle.**]***/ TEST_FUNCTION(SASToken_validate_se_improper_format_1_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sig=TESTSIG&se0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_25_027: [**If SASTOKEN does not obey the SASToken format then SASToken_Validate shall return false.**]*/ TEST_FUNCTION(SASToken_validate_se_improper_format_2_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sig=TESTSIG&se"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_se_improper_format_3_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sig=TESTSIG&se="; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_se_improper_format_4_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sig=TESTSIGse=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_se_improper_format_5_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&se0123456789&sig=TESTSIG"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_25_028: [**SASToken_validate shall check for the presence of sr, se and sig from the token and return false if not found**]*/ TEST_FUNCTION(SASToken_validate_improper_format_no_se_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sig=TESTSIG"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_improper_format_no_sr_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature se=0123456789&sig=TESTSIG"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_improper_format_no_sig_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature se=0123456789&sr=TESTSR"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sr_improper_format_1_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature srTESTSR&sig=TESTSIG&se=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sr_improper_format_2_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr&sig=TESTSIG&se=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sr_improper_format_3_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=&sig=TESTSIG&se=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sr_improper_format_4_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignaturesr=TESTSR&sig=TESTSIGse=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sr_improper_format_5_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature srTESTSR&se=0123456789&sig=TESTSIG"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sig_improper_format_1_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sigTESTSIG&se=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sig_improper_format_2_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sig&se=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sig_improper_format_3_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&sig=&se=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sig_improper_format_4_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSRsig=TESTSIGse=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_sig_improper_format_5_fails) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&se0123456789&sig=TESTSIG"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_25_030: [**SASToken_validate shall return true only if the format is obeyed and the token has not yet expired **]*/ TEST_FUNCTION(SASToken_validate_proper_format_1_pass) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature se=0123456789&sr=TESTSR&sig=TESTSIG"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(get_time(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(get_difftime(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments().SetReturn(TEST_TIME_T); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_25_030: [**SASToken_validate shall return true only if the format is obeyed and the token has not yet expired **]*/ TEST_FUNCTION(SASToken_validate_proper_format_with_skn_1_pass) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature sr=devices.net/devices/tmp_device&sig=TESTSIG&se=0123456789&skn="; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(get_time(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(get_difftime(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments().SetReturn(TEST_TIME_T); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_proper_format_with_skn_expired_se_fail) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature sr=devices.net/devices/tmp_device&sig=TESTSIG&se=011&skn="; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(get_time(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(get_difftime(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments().SetReturn(TEST_TIME_T); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_proper_format_2_pass) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sr=TESTSR&se=0123456789&sig=TESTSIG"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(get_time(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(get_difftime(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments().SetReturn(TEST_TIME_T); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_proper_format_3_pass) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=0123456789"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(get_time(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(get_difftime(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments().SetReturn(TEST_TIME_T); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_not_expired_pass) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=11"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(get_time(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(get_difftime(IGNORED_NUM_ARG, IGNORED_NUM_ARG)).IgnoreAllArguments().SetReturn(TEST_EARLY_TIME); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_25_029: [**SASToken_validate shall check for expiry time from token and if token has expired then would return false **]*/ TEST_FUNCTION(SASToken_validate_expired_fail) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=10"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(get_time(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(get_difftime(TEST_TIME_T, IGNORED_NUM_ARG)).IgnoreAllArguments().SetReturn(TEST_LATER_TIME); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_invalid_expiry_1_fail) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=10A"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_invalid_expiry_2_fail) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=-10"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_invalid_expiry_3_fail) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=0"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_invalid_expiry_4_fail) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=A0"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_validate_invalid_expiry_5_fail) { // arrange const char* TEST_INVALID_SE = "SharedAccessSignature=SharedAccessSignature sig=TESTSIG&sr=TESTSR&se=1A0"; size_t TEST_INVALID_SE_LENGTH = strlen(TEST_INVALID_SE); STRING_HANDLE handle = TEST_STRING_HANDLE; bool result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(STRING_c_str(handle)).SetReturn(TEST_INVALID_SE); STRICT_EXPECTED_CALL(STRING_length(handle)).SetReturn(TEST_INVALID_SE_LENGTH); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)).IgnoreAllArguments(); // act result = SASToken_Validate(handle); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_001: [If key is NULL then SASToken_Create shall return NULL.]*/ TEST_FUNCTION(SASToken_Create_null_key_fails) { // arrange STRING_HANDLE handle; // act handle = SASToken_Create(TEST_NULL_STRING_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_003: [If scope is NULL then SASToken_Create shall return NULL.]*/ TEST_FUNCTION(SASToken_Create_null_scope_fails) { // arrange STRING_HANDLE handle; // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_NULL_STRING_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_007: [keyName is optional and can be set to NULL.]*/ TEST_FUNCTION(SASToken_Create_null_keyName_succeeds) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(NULL)).SetReturn(NULL); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&se=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_NULL_STRING_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_030: [If there is an error in the decoding then SASToken_Create shall return NULL.]*/ TEST_FUNCTION(SASToken_Create_decoded_key_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_NULL_BUFFER_HANDLE); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_029: [The key parameter is decoded from base64.]*/ /*Tests_SRS_SASTOKEN_06_026: [If the conversion to string form fails for any reason then SASToken_Create shall return NULL.]*/ TEST_FUNCTION(SASToken_Create_size_tToString_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)).SetReturn(-1); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_024: [The size_t value ((size_t) (difftime(get_time(NULL),0) + 3600)) is converted to a string form.]*/ TEST_FUNCTION(SASToken_Create_buffer_new_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(NULL); STRICT_EXPECTED_CALL(STRING_delete(NULL)); STRICT_EXPECTED_CALL(BUFFER_delete(NULL)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_Create_first_string_new_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(NULL); STRICT_EXPECTED_CALL(STRING_delete(NULL)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_Create_second_string_new_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(NULL); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_Create_build_to_be_hashed_part1_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_009: [The scope is the basis for creating a STRING_HANDLE.]*/ TEST_FUNCTION(SASToken_Create_build_to_be_hashed_part2_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_010: [A "\n" is appended to that string.]*/ TEST_FUNCTION(SASToken_Create_build_to_be_hashed_part3_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_011: [tokenExpirationTime is appended to that string.]*/ /*Tests_SRS_SASTOKEN_06_013: [If an error is returned from the HMAC256 function then NULL is returned from SASToken_Create.]*/ TEST_FUNCTION(SASToken_Create_HMAC256_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).SetReturn(HMACSHA256_ERROR); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(NULL)); STRICT_EXPECTED_CALL(STRING_delete(NULL)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_012: [An HMAC256 hash is calculated using the decodedKey, over toBeHashed.]*/ /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ TEST_FUNCTION(SASToken_Create_HMAC256_passes_signature_encode_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(NULL); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(NULL)); STRICT_EXPECTED_CALL(STRING_delete(NULL)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_015: [The hash is base 64 encoded.]*/ TEST_FUNCTION(SASToken_Create_building_token_signature_url_encoding_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(NULL); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(NULL)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_028: [base64Signature shall be url encoded.]*/ TEST_FUNCTION(SASToken_Create_building_token_copy_scope_identifier_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_016: [The string "SharedAccessSignature sr=" is the first part of the result of SASToken_Create.]*/ /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ TEST_FUNCTION(SASToken_Create_building_token_concat_scope_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_017: [The scope parameter is appended to result.]*/ TEST_FUNCTION(SASToken_Create_building_token_concat_signature_identifier_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_018: [The string "&sig=" is appended to result.]*/ TEST_FUNCTION(SASToken_Create_building_token_concat_signature_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_019: [The string urlEncodedSignature shall be appended to result.]*/ TEST_FUNCTION(SASToken_Create_building_token_concat_token_expiration_time_identifier_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&se=")).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_020: [The string "&se=" shall be appended to result.]*/ TEST_FUNCTION(SASToken_Create_building_token_concat_token_expiration_time_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&se=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, TEST_TOKEN_EXPIRATION_TIME)).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_021: [tokenExpirationTime is appended to result.]*/ TEST_FUNCTION(SASToken_Create_building_token_concat_keyname_identifier_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&se=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&skn=")).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_014: [If there are any errors from the following operations then NULL shall be returned.]*/ /*Tests_SRS_SASTOKEN_06_022: [If keyName is non-NULL, the string "&skn=" is appended to result.]*/ TEST_FUNCTION(SASToken_Create_building_token_concat_keyname_fails) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&se=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&skn=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)).SetReturn(1); STRICT_EXPECTED_CALL(STRING_delete(TEST_RESULT_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_SASTOKEN_06_023: [The argument keyName is appended to result.]*/ TEST_FUNCTION(SASToken_Create_succeeds) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEY_HANDLE)).SetReturn(&TEST_CHAR_ARRAY[0]); STRICT_EXPECTED_CALL(STRING_c_str(TEST_SCOPE_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(STRING_c_str(TEST_KEYNAME_HANDLE)).SetReturn(TEST_STRING_VALUE); STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&se=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&skn=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_Create(TEST_KEY_HANDLE, TEST_SCOPE_HANDLE, TEST_KEYNAME_HANDLE, TEST_EXPIRY); // assert ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(SASToken_CreateString_succeeds) { // arrange STRING_HANDLE handle; STRICT_EXPECTED_CALL(Base64_Decoder(&TEST_CHAR_ARRAY[0])).SetReturn(TEST_DECODEDKEY_HANDLE); STRICT_EXPECTED_CALL(size_tToString(IGNORED_PTR_ARG, sizeof(TEST_TOKEN_EXPIRATION_TIME), TEST_EXPIRY)).IgnoreArgument(1).CopyOutArgumentBuffer(1, TEST_TOKEN_EXPIRATION_TIME, sizeof(TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(BUFFER_new()).SetReturn(TEST_HASH_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_TOBEHASHED_HANDLE); STRICT_EXPECTED_CALL(STRING_new()).SetReturn(TEST_RESULT_HANDLE); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, "\n")); STRICT_EXPECTED_CALL(STRING_concat(TEST_TOBEHASHED_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_length(TEST_TOBEHASHED_HANDLE)).SetReturn(TEST_LENGTH_TOBEHASHED); STRICT_EXPECTED_CALL(STRING_c_str(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_length(TEST_DECODEDKEY_HANDLE)).SetReturn(TEST_LENGTH_DECODEDKEY); STRICT_EXPECTED_CALL(BUFFER_u_char(TEST_DECODEDKEY_HANDLE)); STRICT_EXPECTED_CALL(HMACSHA256_ComputeHash(IGNORED_PTR_ARG, TEST_LENGTH_DECODEDKEY, IGNORED_PTR_ARG, TEST_LENGTH_TOBEHASHED, TEST_HASH_HANDLE)).IgnoreArgument(1).IgnoreArgument(3); STRICT_EXPECTED_CALL(Base64_Encoder(TEST_HASH_HANDLE)).SetReturn(TEST_BASE64SIGNATURE_HANDLE); STRICT_EXPECTED_CALL(URL_Encode(TEST_BASE64SIGNATURE_HANDLE)).SetReturn(TEST_URLENCODEDSIGNATURE_HANDLE); STRICT_EXPECTED_CALL(STRING_copy(TEST_RESULT_HANDLE, "SharedAccessSignature sr=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&sig=")); STRICT_EXPECTED_CALL(STRING_concat_with_STRING(TEST_RESULT_HANDLE, TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&se=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, TEST_TOKEN_EXPIRATION_TIME)); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, "&skn=")); STRICT_EXPECTED_CALL(STRING_concat(TEST_RESULT_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(TEST_BASE64SIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_URLENCODEDSIGNATURE_HANDLE)); STRICT_EXPECTED_CALL(STRING_delete(TEST_TOBEHASHED_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_HASH_HANDLE)); STRICT_EXPECTED_CALL(BUFFER_delete(TEST_DECODEDKEY_HANDLE)); // act handle = SASToken_CreateString(TEST_CHAR_ARRAY, TEST_STRING_VALUE, TEST_STRING_VALUE, TEST_EXPIRY); // assert ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } END_TEST_SUITE(sastoken_unittests) singlylinkedlist_ut/000077500000000000000000000000001362133436400345175ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000010021362133436400372500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/singlylinkedlist_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName singlylinkedlist_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/singlylinkedlist.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000002611362133436400356060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/singlylinkedlist_ut#include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(singlylinkedlist_unittests, failedTestCount); return failedTestCount; } singlylinkedlist_ut.c000066400000000000000000001263401362133436400407710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/singlylinkedlist_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #include #endif #include "testrunnerswitcher.h" static size_t currentmalloc_call = 0; static size_t whenShallmalloc_fail = 0; static size_t currentrealloc_call = 0; static size_t whenShallrealloc_fail = 0; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void my_gballoc_free(void* ptr) { free(ptr); } #include "umock_c.h" #include "umocktypes_bool.h" #include "azure_c_shared_utility/singlylinkedlist.h" #define ENABLE_MOCKS /* test match function mock */ MOCK_FUNCTION_WITH_CODE(, bool, test_match_function, LIST_ITEM_HANDLE, list_item, const void*, match_context) MOCK_FUNCTION_END(true); #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS static TEST_MUTEX_HANDLE test_serialize_mutex; #define TEST_CONTEXT ((const void*)0x4242) DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(singlylinkedlist_unittests) TEST_SUITE_INITIALIZE(suite_init) { int result; test_serialize_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_serialize_mutex); umock_c_init(on_umock_c_error); result = umocktypes_bool_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(LIST_ITEM_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(test_serialize_mutex); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(test_serialize_mutex)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(test_serialize_mutex); } /* singlylinkedlist_create */ /* Tests_SRS_LIST_01_001: [singlylinkedlist_create shall create a new list and return a non-NULL handle on success.] */ TEST_FUNCTION(when_underlying_calls_succeed_singlylinkedlist_create_succeeds) { // arrange SINGLYLINKEDLIST_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // act result = singlylinkedlist_create(); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(result); } /* Tests_SRS_LIST_01_002: [If any error occurs during the list creation, singlylinkedlist_create shall return NULL.] */ TEST_FUNCTION(when_underlying_malloc_fails_singlylinkedlist_create_fails) { // arrange SINGLYLINKEDLIST_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn((void*)NULL); // act result = singlylinkedlist_create(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* singlylinkedlist_destroy */ /* Tests_SRS_LIST_01_003: [singlylinkedlist_destroy shall free all resources associated with the list identified by the handle argument.] */ TEST_FUNCTION(singlylinkedlist_destroy_on_a_non_null_handle_frees_resources) { // arrange SINGLYLINKEDLIST_HANDLE handle = singlylinkedlist_create(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act singlylinkedlist_destroy(handle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_LIST_01_004: [If the list argument is NULL, no freeing of resources shall occur.] */ TEST_FUNCTION(singlylinkedlist_destroy_on_a_null_list_frees_nothing) { // arrange // act singlylinkedlist_destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* singlylinkedlist_add */ /* Tests_SRS_LIST_01_006: [If any of the arguments is NULL, singlylinkedlist_add shall not add the item to the list and return NULL.] */ TEST_FUNCTION(singlylinkedlist_add_with_NULL_handle_fails) { // arrange int x = 42; // act LIST_ITEM_HANDLE result = singlylinkedlist_add(NULL, &x); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_LIST_01_006: [If any of the arguments is NULL, singlylinkedlist_add shall not add the item to the list and return NULL.] */ TEST_FUNCTION(singlylinkedlist_add_with_NULL_item_fails) { // arrange LIST_ITEM_HANDLE result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); umock_c_reset_all_calls(); // act result = singlylinkedlist_add(list, NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_005: [singlylinkedlist_add shall add one item to the tail of the list and on success it shall return a handle to the added item.] */ /* Tests_SRS_LIST_01_008: [singlylinkedlist_get_head_item shall return the head of the list.] */ TEST_FUNCTION(singlylinkedlist_add_adds_the_item_and_returns_a_non_NULL_handle) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE result; LIST_ITEM_HANDLE head; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // act result = singlylinkedlist_add(list, &x); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); head = singlylinkedlist_get_head_item(list); ASSERT_IS_NOT_NULL(head); ASSERT_ARE_EQUAL(int, x, *(const int*)singlylinkedlist_item_get_value(head)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_005: [singlylinkedlist_add shall add one item to the tail of the list and on success it shall return a handle to the added item.] */ /* Tests_SRS_LIST_01_008: [singlylinkedlist_get_head_item shall return the head of the list.] */ TEST_FUNCTION(singlylinkedlist_add_when_an_item_is_in_the_singlylinkedlist_adds_at_the_end) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE result; LIST_ITEM_HANDLE list_item; (void)singlylinkedlist_add(list, &x1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // act result = singlylinkedlist_add(list, &x2); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); list_item = singlylinkedlist_get_head_item(list); ASSERT_IS_NOT_NULL(list_item); ASSERT_ARE_EQUAL(int, x1, *(const int*)singlylinkedlist_item_get_value(list_item)); list_item = singlylinkedlist_get_next_item(list_item); ASSERT_IS_NOT_NULL(list_item); ASSERT_ARE_EQUAL(int, x2, *(const int*)singlylinkedlist_item_get_value(list_item)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_007: [If allocating the new list node fails, singlylinkedlist_add shall return NULL.] */ TEST_FUNCTION(when_the_underlying_malloc_fails_singlylinkedlist_add_fails) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn((void*)NULL); // act result = singlylinkedlist_add(list, &x); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* singlylinkedlist_get_head_item */ /* Tests_SRS_LIST_01_010: [If the list is empty, singlylinkedlist_get_head_item_shall_return NULL.] */ TEST_FUNCTION(when_the_list_is_empty_singlylinkedlist_get_head_item_yields_NULL) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); LIST_ITEM_HANDLE result; umock_c_reset_all_calls(); // act result = singlylinkedlist_get_head_item(list); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_009: [If the list argument is NULL, singlylinkedlist_get_head_item shall return NULL.] */ TEST_FUNCTION(singlylinkedlist_get_head_item_with_NULL_list_yields_NULL) { // arrange // act LIST_ITEM_HANDLE result = singlylinkedlist_get_head_item(NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_LIST_01_008: [singlylinkedlist_get_head_item shall return the head of the list.] */ TEST_FUNCTION(singlylinkedlist_get_head_item_removes_the_item) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE head; (void)singlylinkedlist_add(list, &x); umock_c_reset_all_calls(); // act head = singlylinkedlist_get_head_item(list); // assert ASSERT_IS_NOT_NULL(head); ASSERT_ARE_EQUAL(int, x, *(const int*)singlylinkedlist_item_get_value(head)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* singlylinkedlist_get_next_item */ /* Tests_SRS_LIST_01_018: [singlylinkedlist_get_next_item shall return the next item in the list following the item item_handle.] */ TEST_FUNCTION(singlylinkedlist_get_next_item_gets_the_next_item) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE item; (void)singlylinkedlist_add(list, &x1); (void)singlylinkedlist_add(list, &x2); umock_c_reset_all_calls(); item = singlylinkedlist_get_head_item(list); // act item = singlylinkedlist_get_next_item(item); // assert ASSERT_IS_NOT_NULL(item); ASSERT_ARE_EQUAL(int, x2, *(const int*)singlylinkedlist_item_get_value(item)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_019: [If item_handle is NULL then singlylinkedlist_get_next_item shall return NULL.] */ TEST_FUNCTION(singlylinkedlist_get_next_item_with_NULL_item_handle_returns_NULL) { // arrange // act LIST_ITEM_HANDLE item = singlylinkedlist_get_next_item(NULL); // assert ASSERT_IS_NULL(item); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_LIST_01_022: [If no more items exist in the list after the item_handle item, singlylinkedlist_get_next_item shall return NULL.] */ TEST_FUNCTION(singlylinkedlist_get_next_item_when_no_more_items_in_list_returns_NULL) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE item; (void)singlylinkedlist_add(list, &x1); (void)singlylinkedlist_add(list, &x2); umock_c_reset_all_calls(); item = singlylinkedlist_get_head_item(list); item = singlylinkedlist_get_next_item(item); // act item = singlylinkedlist_get_next_item(item); // assert ASSERT_IS_NULL(item); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* singlylinkedlist_item_get_value */ /* Tests_SRS_LIST_01_020: [singlylinkedlist_item_get_value shall return the value associated with the list item identified by the item_handle argument.] */ TEST_FUNCTION(singlylinkedlist_item_get_value_returns_the_item_value) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE item; int result; (void)singlylinkedlist_add(list, &x); umock_c_reset_all_calls(); item = singlylinkedlist_get_head_item(list); // act result = *(const int*)singlylinkedlist_item_get_value(item); // assert ASSERT_ARE_EQUAL(int, x, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_021: [If item_handle is NULL, singlylinkedlist_item_get_value shall return NULL.] */ TEST_FUNCTION(singlylinkedlist_item_get_value_with_NULL_item_returns_NULL) { // arrange // act const void* result = singlylinkedlist_item_get_value(NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* singlylinkedlist_find */ /* Tests_SRS_LIST_01_012: [If the list or the match_function argument is NULL, singlylinkedlist_find shall return NULL.] */ TEST_FUNCTION(singlylinkedlist_find_with_NULL_list_fails_with_NULL) { // arrange // act LIST_ITEM_HANDLE result = singlylinkedlist_find(NULL, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_LIST_01_012: [If the list or the match_function argument is NULL, singlylinkedlist_find shall return NULL.] */ TEST_FUNCTION(singlylinkedlist_find_with_NULL_match_function_fails_with_NULL) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE result; (void)singlylinkedlist_add(list, &x); umock_c_reset_all_calls(); // act result = singlylinkedlist_find(list, NULL, TEST_CONTEXT); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_011: [singlylinkedlist_find shall iterate through all items in a list and return the first one that satisfies a certain match function.] */ /* Tests_SRS_LIST_01_014: [list find shall determine whether an item satisfies the match criteria by invoking the match function for each item in the list until a matching item is found.] */ /* Tests_SRS_LIST_01_013: [The match_function shall get as arguments the list item being attempted to be matched and the match_context as is.] */ /* Tests_SRS_LIST_01_017: [If the match function returns true, singlylinkedlist_find shall consider that item as matching.] */ TEST_FUNCTION(singlylinkedlist_find_on_a_list_with_1_matching_item_yields_that_item) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE result; (void)singlylinkedlist_add(list, &x); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1); // act result = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(int, x, *(const int*)singlylinkedlist_item_get_value(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_016: [If the match function returns false, singlylinkedlist_find shall consider that item as not matching.] */ TEST_FUNCTION(singlylinkedlist_find_on_a_list_with_1_items_that_does_not_match_returns_NULL) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE result; (void)singlylinkedlist_add(list, &x); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1).SetReturn(false); // act result = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_011: [singlylinkedlist_find shall iterate through all items in a list and return the first one that satisfies a certain match function.] */ /* Tests_SRS_LIST_01_014: [list find shall determine whether an item satisfies the match criteria by invoking the match function for each item in the list until a matching item is found.] */ /* Tests_SRS_LIST_01_013: [The match_function shall get as arguments the list item being attempted to be matched and the match_context as is.] */ /* Tests_SRS_LIST_01_017: [If the match function returns true, singlylinkedlist_find shall consider that item as matching.] */ TEST_FUNCTION(singlylinkedlist_find_on_a_list_with_2_items_where_the_first_matches_yields_the_first_item) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE result; (void)singlylinkedlist_add(list, &x1); (void)singlylinkedlist_add(list, &x2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1); // act result = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(int, x1, *(int*)singlylinkedlist_item_get_value(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_011: [singlylinkedlist_find shall iterate through all items in a list and return the first one that satisfies a certain match function.] */ /* Tests_SRS_LIST_01_014: [list find shall determine whether an item satisfies the match criteria by invoking the match function for each item in the list until a matching item is found.] */ /* Tests_SRS_LIST_01_013: [The match_function shall get as arguments the list item being attempted to be matched and the match_context as is.] */ /* Tests_SRS_LIST_01_017: [If the match function returns true, singlylinkedlist_find shall consider that item as matching.] */ /* Tests_SRS_LIST_01_016: [If the match function returns false, singlylinkedlist_find shall consider that item as not matching.] */ TEST_FUNCTION(singlylinkedlist_find_on_a_list_with_2_items_where_the_second_matches_yields_the_second_item) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE result; (void)singlylinkedlist_add(list, &x1); (void)singlylinkedlist_add(list, &x2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1).SetReturn(false); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1); // act result = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(int, x2, *(int*)singlylinkedlist_item_get_value(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_011: [singlylinkedlist_find shall iterate through all items in a list and return the first one that satisfies a certain match function.] */ TEST_FUNCTION(singlylinkedlist_find_on_a_list_with_2_items_both_matching_yields_the_first_item) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 42; LIST_ITEM_HANDLE result; (void)singlylinkedlist_add(list, &x1); (void)singlylinkedlist_add(list, &x2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1); // act result = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(int, x1, *(int*)singlylinkedlist_item_get_value(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_016: [If the match function returns false, singlylinkedlist_find shall consider that item as not matching.] */ TEST_FUNCTION(singlylinkedlist_find_on_a_list_with_2_items_where_none_matches_returns_NULL) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE result; (void)singlylinkedlist_add(list, &x1); (void)singlylinkedlist_add(list, &x2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1).SetReturn(false); STRICT_EXPECTED_CALL(test_match_function(IGNORED_PTR_ARG, TEST_CONTEXT)) .IgnoreArgument(1).SetReturn(false); // act result = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_015: [If the list is empty, singlylinkedlist_find shall return NULL.] */ TEST_FUNCTION(singlylinkedlist_find_on_a_list_with_no_items_yields_NULL) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); LIST_ITEM_HANDLE result; umock_c_reset_all_calls(); // act result = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* singlylinkedlist_remove */ /* Tests_SRS_LIST_01_023: [singlylinkedlist_remove shall remove a list item from the list and on success it shall return 0.] */ TEST_FUNCTION(singlylinkedlist_remove_when_one_item_is_in_the_list_succeeds) { // arrange int x1 = 0x42; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); LIST_ITEM_HANDLE item; int result; singlylinkedlist_add(list, &x1); item = singlylinkedlist_find(list, test_match_function, TEST_CONTEXT); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act result = singlylinkedlist_remove(list, item); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_024: [If any of the arguments list or item_handle is NULL, singlylinkedlist_remove shall fail and return a non-zero value.] */ TEST_FUNCTION(singlylinkedlist_remove_with_NULL_list_fails) { // arrange int x1 = 0x42; int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); LIST_ITEM_HANDLE item = singlylinkedlist_add(list, &x1); umock_c_reset_all_calls(); // act result = singlylinkedlist_remove(NULL, item); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_024: [If any of the arguments list or item_handle is NULL, singlylinkedlist_remove shall fail and return a non-zero value.] */ TEST_FUNCTION(singlylinkedlist_remove_with_NULL_item_fails) { // arrange int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); umock_c_reset_all_calls(); // act result = singlylinkedlist_remove(list, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_025: [If the item item_handle is not found in the list, then singlylinkedlist_remove shall fail and return a non-zero value.] */ TEST_FUNCTION(singlylinkedlist_remove_with_an_item_that_has_already_been_removed_fails) { // arrange int x1 = 0x42; int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); LIST_ITEM_HANDLE item = singlylinkedlist_add(list, &x1); singlylinkedlist_remove(list, item); umock_c_reset_all_calls(); // act result = singlylinkedlist_remove(list, item); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_023: [singlylinkedlist_remove shall remove a list item from the list and on success it shall return 0.] */ TEST_FUNCTION(singlylinkedlist_remove_first_of_2_items_succeeds) { // arrange int x1 = 0x42; int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); LIST_ITEM_HANDLE item1 = singlylinkedlist_add(list, &x1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act result = singlylinkedlist_remove(list, item1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_01_023: [singlylinkedlist_remove shall remove a list item from the list and on success it shall return 0.] */ TEST_FUNCTION(singlylinkedlist_remove_second_of_2_items_succeeds) { // arrange int x1 = 0x42; int x2 = 0x43; int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); LIST_ITEM_HANDLE item2; (void)singlylinkedlist_add(list, &x1); item2 = singlylinkedlist_add(list, &x2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act result = singlylinkedlist_remove(list, item2); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* singlylinkedlist_foreach */ typedef struct FOREACH_PROFILE_TAG { int count; int stop; int sum; } FOREACH_PROFILE; static void foreach_action_function(const void* item, const void* action_context, bool* continue_processing) { int* item_value = (int*)item; FOREACH_PROFILE* profile = (FOREACH_PROFILE*)action_context; profile->count++; profile->sum += *item_value; *continue_processing = profile->count < profile->stop; } /* Tests_SRS_LIST_09_008: [ If the list or the action_function argument is NULL, singlylinkedlist_foreach shall return non-zero value. ] */ TEST_FUNCTION(singlylinkedlist_foreach_NULL_list_argument) { // arrange FOREACH_PROFILE profile; int result; profile.sum = 0; profile.count = 0; profile.stop = 1000000; umock_c_reset_all_calls(); // act result = singlylinkedlist_foreach(NULL, foreach_action_function, &profile); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 0, profile.count); ASSERT_ARE_EQUAL(int, 0, profile.sum); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } /* Tests_SRS_LIST_09_008: [ If the list or the action_function argument is NULL, singlylinkedlist_foreach shall return non-zero value. ] */ TEST_FUNCTION(singlylinkedlist_foreach_NULL_action_function) { // arrange FOREACH_PROFILE profile; int v1 = 115; int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &v1); profile.sum = 0; profile.count = 0; profile.stop = 1000000; umock_c_reset_all_calls(); // act result = singlylinkedlist_foreach(list, NULL, &profile); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 0, profile.count); ASSERT_ARE_EQUAL(int, 0, profile.sum); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_09_009: [ singlylinkedlist_foreach shall iterate through all items in a list and invoke action_function for each one of them. ] */ /* Tests_SRS_LIST_09_011: [ If no errors occur, singlylinkedlist_foreach shall return zero. ] */ TEST_FUNCTION(singlylinkedlist_foreach_all_items_succeeds) { // arrange FOREACH_PROFILE profile; int v1 = 115; int v2 = 10; int v3 = 88; int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &v1); (void)singlylinkedlist_add(list, &v2); (void)singlylinkedlist_add(list, &v3); profile.sum = 0; profile.count = 0; profile.stop = 1000000; umock_c_reset_all_calls(); // act result = singlylinkedlist_foreach(list, foreach_action_function, &profile); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 3, profile.count); ASSERT_ARE_EQUAL(int, (v1 + v2 + v3), profile.sum); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_09_010: [ If the condition function returns continue_processing as false, singlylinkedlist_foreach shall stop iterating through the list and return. ] */ TEST_FUNCTION(singlylinkedlist_foreach_break_succeeds) { // arrange FOREACH_PROFILE profile; int v1 = 115; int v2 = 10; int v3 = 88; int result; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &v1); (void)singlylinkedlist_add(list, &v2); (void)singlylinkedlist_add(list, &v3); profile.sum = 0; profile.count = 0; profile.stop = 2; umock_c_reset_all_calls(); // act result = singlylinkedlist_foreach(list, foreach_action_function, &profile); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 2, profile.count); ASSERT_ARE_EQUAL(int, (v1 + v2), profile.sum); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /* singlylinkedlist_remove_if */ typedef struct REMOVE_IF_PROFILE_TAG { int count; int items_to_remove[10]; int stop_at_item_value; } REMOVE_IF_PROFILE; static bool removeif_condition_function(const void* item, const void* condition_context, bool* continue_processing) { int* item_value = (int*)item; REMOVE_IF_PROFILE* profile = (REMOVE_IF_PROFILE*)condition_context; int i; bool remove_item = false; for (i = 0; i < profile->count; i++) { if (*item_value == profile->items_to_remove[i]) { remove_item = true; break; } } *continue_processing = (*item_value != profile->stop_at_item_value); return remove_item; } /* Tests_SRS_LIST_09_001: [ If the list or the condition_function argument is NULL, singlylinkedlist_remove_if shall return non-zero value. ] */ TEST_FUNCTION(singlylinkedlist_remove_if_NULL_condition_argument) { // arrange int result; int values[5] = { 3, 5, 7, 11, 17 }; SINGLYLINKEDLIST_HANDLE list; REMOVE_IF_PROFILE profile; profile.count = 2; profile.items_to_remove[0] = values[1]; profile.items_to_remove[1] = values[4]; profile.stop_at_item_value = values[3]; list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &values[0]); (void)singlylinkedlist_add(list, &values[1]); (void)singlylinkedlist_add(list, &values[2]); (void)singlylinkedlist_add(list, &values[3]); (void)singlylinkedlist_add(list, &values[4]); umock_c_reset_all_calls(); // act result = singlylinkedlist_remove_if(list, NULL, &profile); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); { FOREACH_PROFILE profile2; profile2.sum = 0; profile2.count = 0; profile2.stop = 10000; (void)singlylinkedlist_foreach(list, foreach_action_function, &profile2); ASSERT_ARE_EQUAL(int, (values[0] + values[1] + values[2] + values[3] + values[4]), profile2.sum); } // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_09_001: [ If the list or the condition_function argument is NULL, singlylinkedlist_remove_if shall return non-zero value. ] */ TEST_FUNCTION(singlylinkedlist_remove_if_NULL_list_argument) { // arrange int result; REMOVE_IF_PROFILE profile; profile.count = 0; umock_c_reset_all_calls(); // act result = singlylinkedlist_remove_if(NULL, removeif_condition_function, &profile); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } /* Tests_SRS_LIST_09_002: [ singlylinkedlist_remove_if shall iterate through all items in a list and remove all that satisfies a certain condition function. ] */ /* Tests_SRS_LIST_09_003: [ singlylinkedlist_remove_if shall determine whether an item satisfies the condition criteria by invoking the condition function for that item. ] */ /* Tests_SRS_LIST_09_004: [ If the condition function remove_item as true, singlylinkedlist_find shall consider that item as to be removed. ] */ /* Tests_SRS_LIST_09_005: [ If the condition function returns remove_item as false or unchanged, singlylinkedlist_find shall consider that item as not to be removed. ] */ /* Tests_SRS_LIST_09_007: [ If no errors occur, singlylinkedlist_remove_if shall return zero. ] */ TEST_FUNCTION(singlylinkedlist_remove_if_all_items_succeeds) { // arrange int result; int values[5] = { 3, 5, 7, 11, 17 }; REMOVE_IF_PROFILE profile; SINGLYLINKEDLIST_HANDLE list; profile.count = 2; profile.items_to_remove[0] = values[1]; profile.items_to_remove[1] = values[3]; profile.stop_at_item_value = 1000000; list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &values[0]); (void)singlylinkedlist_add(list, &values[1]); (void)singlylinkedlist_add(list, &values[2]); (void)singlylinkedlist_add(list, &values[3]); (void)singlylinkedlist_add(list, &values[4]); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = singlylinkedlist_remove_if(list, removeif_condition_function, &profile); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); { FOREACH_PROFILE profile2; profile2.sum = 0; profile2.count = 0; profile2.stop = 10000; (void)singlylinkedlist_foreach(list, foreach_action_function, &profile2); ASSERT_ARE_EQUAL(int, (values[0] + values[2] + values[4]), profile2.sum); } // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_09_006: [ If the condition function returns continue_processing as false, singlylinkedlist_remove_if shall stop iterating through the list and return. ] */ TEST_FUNCTION(singlylinkedlist_remove_if_break_succeeds) { // arrange int result; int values[5] = { 3, 5, 7, 11, 17 }; REMOVE_IF_PROFILE profile; SINGLYLINKEDLIST_HANDLE list; profile.count = 2; profile.items_to_remove[0] = values[1]; profile.items_to_remove[1] = values[4]; profile.stop_at_item_value = values[3]; list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &values[0]); (void)singlylinkedlist_add(list, &values[1]); (void)singlylinkedlist_add(list, &values[2]); (void)singlylinkedlist_add(list, &values[3]); (void)singlylinkedlist_add(list, &values[4]); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = singlylinkedlist_remove_if(list, removeif_condition_function, &profile); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); { FOREACH_PROFILE profile2; profile2.sum = 0; profile2.count = 0; profile2.stop = 10000; (void)singlylinkedlist_foreach(list, foreach_action_function, &profile2); ASSERT_ARE_EQUAL(int, (values[0] + values[2] + values[3] + values[4]), profile2.sum); } // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_09_006: [ If the condition function returns continue_processing as false, singlylinkedlist_remove_if shall stop iterating through the list and return. ] */ TEST_FUNCTION(singlylinkedlist_remove_if_remove_and_break_succeeds) { // arrange int result; int values[5] = { 3, 5, 7, 11, 17 }; REMOVE_IF_PROFILE profile; SINGLYLINKEDLIST_HANDLE list; profile.count = 2; profile.items_to_remove[0] = values[0]; profile.items_to_remove[1] = values[3]; profile.stop_at_item_value = values[3]; list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &values[0]); (void)singlylinkedlist_add(list, &values[1]); (void)singlylinkedlist_add(list, &values[2]); (void)singlylinkedlist_add(list, &values[3]); (void)singlylinkedlist_add(list, &values[4]); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = singlylinkedlist_remove_if(list, removeif_condition_function, &profile); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); { FOREACH_PROFILE profile2; profile2.sum = 0; profile2.count = 0; profile2.stop = 10000; (void)singlylinkedlist_foreach(list, foreach_action_function, &profile2); ASSERT_ARE_EQUAL(int, (values[1] + values[2] + values[4]), profile2.sum); } // cleanup singlylinkedlist_destroy(list); } /* Tests_SRS_LIST_09_006: [ If the condition function returns continue_processing as false, singlylinkedlist_remove_if shall stop iterating through the list and return. ] */ TEST_FUNCTION(singlylinkedlist_remove_if_removes_the_only_item_in_the_list) { // arrange int result; int values[] = { 42 }; REMOVE_IF_PROFILE profile; SINGLYLINKEDLIST_HANDLE list; profile.count = 1; profile.items_to_remove[0] = values[0]; profile.stop_at_item_value = 0; list = singlylinkedlist_create(); (void)singlylinkedlist_add(list, &values[0]); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = singlylinkedlist_remove_if(list, removeif_condition_function, &profile); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup singlylinkedlist_destroy(list); } /*Tests_SRS_LIST_02_001: [ If list is NULL then singlylinkedlist_add_head shall fail and return NULL. ]*/ TEST_FUNCTION(singlylinkedlist_add_head_with_list_NULL_fails) { ///arrange ///act LIST_ITEM_HANDLE listItemHandle = singlylinkedlist_add_head(NULL, (void*)0x42); ///assert ASSERT_IS_NULL(listItemHandle); } /*Tests_SRS_LIST_02_002: [ singlylinkedlist_add_head shall insert item at head, succeed and return a non-NULL value. ]*/ /*Tests_SRS_LIST_02_003: [ If there are any failures then singlylinkedlist_add_head shall fail and return NULL. ]*/ TEST_FUNCTION(singlylinkedlist_add_head_succeeds) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE result; LIST_ITEM_HANDLE head; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // act result = singlylinkedlist_add_head(list, &x); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); head = singlylinkedlist_get_head_item(list); ASSERT_IS_NOT_NULL(head); ASSERT_ARE_EQUAL(int, x, *(const int*)singlylinkedlist_item_get_value(head)); // cleanup singlylinkedlist_destroy(list); } /*Tests_SRS_LIST_02_002: [ singlylinkedlist_add_head shall insert item at head, succeed and return a non-NULL value. ]*/ TEST_FUNCTION(singlylinkedlist_add_head_succeeds_two_times) { // arrange LIST_ITEM_HANDLE result1; LIST_ITEM_HANDLE result2; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE head; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // act result1 = singlylinkedlist_add_head(list, &x1); result2 = singlylinkedlist_add_head(list, &x2); // assert ASSERT_ARE_NOT_EQUAL(void_ptr, result1, result2); ASSERT_IS_NOT_NULL(result1); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); head = singlylinkedlist_get_head_item(list); ASSERT_IS_NOT_NULL(head); ASSERT_ARE_EQUAL(int, x2, *(const int*)singlylinkedlist_item_get_value(head)); // cleanup singlylinkedlist_destroy(list); } /*Tests_SRS_LIST_02_002: [ singlylinkedlist_add_head shall insert item at head, succeed and return a non-NULL value. ]*/ TEST_FUNCTION(singlylinkedlist_add_2_heads_and_remove_front_produces_first_item_succeds) { // arrange LIST_ITEM_HANDLE result2; SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x1 = 42; int x2 = 43; LIST_ITEM_HANDLE head; (void)singlylinkedlist_add_head(list, &x1); result2 = singlylinkedlist_add_head(list, &x2); (void)singlylinkedlist_remove(list, result2); umock_c_reset_all_calls(); // act head = singlylinkedlist_get_head_item(list); ///assert ASSERT_IS_NOT_NULL(head); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, x1, *(const int*)singlylinkedlist_item_get_value(head)); // cleanup singlylinkedlist_destroy(list); } /*Tests_SRS_LIST_02_003: [ If there are any failures then singlylinkedlist_add_head shall fail and return NULL. ]*/ TEST_FUNCTION(singlylinkedlist_add_head_fails_when_malloc_fails) { // arrange SINGLYLINKEDLIST_HANDLE list = singlylinkedlist_create(); int x = 42; LIST_ITEM_HANDLE result; LIST_ITEM_HANDLE head; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); // act result = singlylinkedlist_add_head(list, &x); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); head = singlylinkedlist_get_head_item(list); ASSERT_IS_NULL(head); // cleanup singlylinkedlist_destroy(list); } END_TEST_SUITE(singlylinkedlist_unittests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut/000077500000000000000000000000001362133436400336735ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000016041362133436400363550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName socket_async_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../pal/socket_async.c ) include_directories(.) include_directories(../../pal/inc) # Windows will eventually be built with a socket_async_win32.c because # the function signatures don't match Linux. That file will need # different unit tests because of the differing socket semantics if(WIN32) include_directories(./win32_fake_linux) else() include_directories(../../pal/linux) endif() set(${theseTestsName}_h_files test_defines.h keep_alive.h ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C11)keep_alive.h000066400000000000000000000067011362133436400360750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is made an integral part of socket_async_ut.c with a #include. It // is broken out for readability. static int keep_alive; // < 0 for system defaults, 0 to disable, > 0 to use supplied idle, interval, and count static int keep_idle; // seconds before first keepalive packet (ignored if keep_alive <= 0) static int keep_interval; // seconds between keepalive packets (ignored if keep_alive <= 0) static int keep_count; // number of times to try before declaring failure (ignored if keep_alive <= 0) #define test_keep_alive 1 #define test_keep_alive_sys_default -1 #define test_keep_idle 22 #define test_keep_interval 33 #define test_keep_count 66 #define KEEP_ALIVE_UNDEFINED -1 #define KEEP_ALIVE_FALSE 0 static int my_setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen) { int value; (void)optlen; // All options are integers ASSERT_ARE_EQUAL(int, sockfd, test_socket); value = *((int*)optval); if (level == IPPROTO_TCP) { switch (optname) { case TCP_KEEPIDLE: keep_idle = value; break; case TCP_KEEPINTVL: keep_interval = value; break; case TCP_KEEPCNT: keep_count = value; break; default: { ASSERT_FAIL("Unexpected setsockopt IPPROTO_TCP parameters"); break; } } } else if (level == SOL_SOCKET && optname == SO_KEEPALIVE) { keep_alive = value; ASSERT_IS_TRUE(value == 0 || value == 1, "Unexpected keep-alive value"); } else { ASSERT_FAIL("Unexpected setsockopt parameters"); } return 0; } static void init_keep_alive_values() { keep_alive = KEEP_ALIVE_UNDEFINED; keep_idle = KEEP_ALIVE_UNDEFINED; keep_interval = KEEP_ALIVE_UNDEFINED; keep_count = KEEP_ALIVE_UNDEFINED; } static void ASSERT_KEEP_ALIVE_UNTOUCHED() { ASSERT_ARE_EQUAL(int, keep_alive, KEEP_ALIVE_UNDEFINED, "keep_alive in ASSERT_KEEP_ALIVE_UNTOUCHED"); ASSERT_ARE_EQUAL(int, keep_idle, KEEP_ALIVE_UNDEFINED, "keep_idle in ASSERT_KEEP_ALIVE_UNTOUCHED"); ASSERT_ARE_EQUAL(int, keep_interval, KEEP_ALIVE_UNDEFINED, "keep_interval in ASSERT_KEEP_ALIVE_UNTOUCHED"); ASSERT_ARE_EQUAL(int, keep_count, KEEP_ALIVE_UNDEFINED, "keep_count in ASSERT_KEEP_ALIVE_UNTOUCHED"); } static void ASSERT_KEEP_ALIVE_FALSE() { ASSERT_ARE_EQUAL(int, keep_alive, KEEP_ALIVE_FALSE, "keep_alive in ASSERT_KEEP_ALIVE_FALSE"); ASSERT_ARE_EQUAL(int, keep_idle, KEEP_ALIVE_UNDEFINED, "keep_idle in ASSERT_KEEP_ALIVE_FALSE"); ASSERT_ARE_EQUAL(int, keep_interval, KEEP_ALIVE_UNDEFINED, "keep_interval in ASSERT_KEEP_ALIVE_FALSE"); ASSERT_ARE_EQUAL(int, keep_count, KEEP_ALIVE_UNDEFINED, "keep_count in ASSERT_KEEP_ALIVE_FALSE"); } /* Tests_SRS_SOCKET_ASYNC_30_014: [ If the optional options parameter is non-NULL and is_UDP is false, socket_async_create shall set the socket options to the provided values. ]*/ static void ASSERT_KEEP_ALIVE_SET() { ASSERT_ARE_EQUAL(int, keep_alive, test_keep_alive, "keep_count in ASSERT_KEEP_ALIVE_SET"); ASSERT_ARE_EQUAL(int, keep_idle, test_keep_idle, "keep_idle in ASSERT_KEEP_ALIVE_SET"); ASSERT_ARE_EQUAL(int, keep_interval, test_keep_interval, "keep_interval in ASSERT_KEEP_ALIVE_SET"); ASSERT_ARE_EQUAL(int, keep_count, test_keep_count, "keep_count in ASSERT_KEEP_ALIVE_SET"); } main.c000066400000000000000000000005731362133436400347110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; /** * Identify the test suite to run here. */ RUN_TEST_SUITE(socket_async_ut, failedTestCount); return failedTestCount; } socket_async_ut.c000066400000000000000000001176141362133436400371670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #include #include #endif /** * Include the C standards here. */ #ifdef __cplusplus #include #include #else #include #include #endif #include "socket_async.h" // This file is OS-specific, and is identified by setting include directories // in the project #include "socket_async_os.h" /** * Include the test tools. */ #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_bool.h" #include "umocktypes_stdint.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, int, socket, int, af, int, type, int, protocol); MOCKABLE_FUNCTION(, int, bind, int, sockfd, const struct sockaddr*, addr, socklen_t, addrlen); MOCKABLE_FUNCTION(, int, setsockopt, int, sockfd, int, level, int, optname, const void*, optval, socklen_t, optlen); MOCKABLE_FUNCTION(, int, getsockopt, int, sockfd, int, level, int, optname, void*, optval, socklen_t*, optlen); MOCKABLE_FUNCTION(, int, connect, int, sockfd, const struct sockaddr*, addr, socklen_t, addrlen); MOCKABLE_FUNCTION(, int, select, int, nfds, fd_set*, readfds, fd_set*, writefds, fd_set*, exceptfds, struct timeval*, timeout); MOCKABLE_FUNCTION(, ssize_t, send, int, sockfd, const void*, buf, size_t, len, int, flags); MOCKABLE_FUNCTION(, ssize_t, recv, int, sockfd, void*, buf, size_t, len, int, flags); MOCKABLE_FUNCTION(, int, close, int, sockfd); #ifdef __cplusplus } #endif #undef ENABLE_MOCKS #include "test_defines.h" #include "keep_alive.h" // A non-tested function from socket.h int fcntl(int fd, int cmd, ... /* arg */) { (void)fd; (void)cmd; return 0; } typedef enum { SELECT_TCP_IS_COMPLETE_ERRSET_FAIL, SELECT_TCP_IS_COMPLETE_READY_OK, SELECT_TCP_IS_COMPLETE_NOT_READY_OK, } SELECT_BEHAVIOR; // The mocked select() function uses FD_SET, etc. macros, so it needs to be specially implemented static SELECT_BEHAVIOR select_behavior; int my_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) { (void)timeout; (void)nfds; (void)readfds; // TP_TCP_IS_COMPLETE_ERRSET_FAIL, // a non-empty error set // TP_TCP_IS_COMPLETE_READY_OK, // // TTP_TCP_IS_COMPLETE_NOT_READY_OK, // // This arguably odd sequence of FD_SET, etc. was necessary // to make the linux_c-ubuntu-clang build succeed. FD_CLR // did not work as expected on that system, but this does the job. switch (select_behavior) { case SELECT_TCP_IS_COMPLETE_ERRSET_FAIL: FD_SET(nfds, exceptfds); break; case SELECT_TCP_IS_COMPLETE_READY_OK: FD_ZERO(exceptfds); FD_SET(nfds, writefds); break; case SELECT_TCP_IS_COMPLETE_NOT_READY_OK: FD_ZERO(exceptfds); FD_ZERO(writefds); break; default: ASSERT_FAIL("program bug"); } return 0; } /** * Umock error will helps you to identify errors in the test suite or in the way that you are * using it, just keep it as is. */ DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } /** * This is necessary for the test suite, just keep as is. */ static TEST_MUTEX_HANDLE g_testByTest; BEGIN_TEST_SUITE(socket_async_ut) /** * This is the place where we initialize the test system. Replace the test name to associate the test * suite with your test cases. * It is called once, before start the tests. */ TEST_SUITE_INITIALIZE(a) { int result; size_t type_size; ssize_t sr_error; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_bool_register_types(); ASSERT_ARE_EQUAL(int, 0, result); umocktypes_stdint_register_types(); ASSERT_ARE_EQUAL(int, 0, result); // Unnatural type_size variable exists to avoid "conditional expression is constant" warning type_size = sizeof(ssize_t); if (type_size == sizeof(int32_t)) { REGISTER_UMOCK_ALIAS_TYPE(ssize_t, int32_t); } else if (type_size == sizeof(int64_t)) { REGISTER_UMOCK_ALIAS_TYPE(ssize_t, int64_t); } else { ASSERT_FAIL("bad ssize_t"); } type_size = sizeof(socklen_t); if (type_size == sizeof(int32_t)) { REGISTER_UMOCK_ALIAS_TYPE(socklen_t, uint32_t); } else if (type_size == sizeof(int64_t)) { REGISTER_UMOCK_ALIAS_TYPE(socklen_t, uint64_t); } else { ASSERT_FAIL("bad socklen_t"); } sr_error = (ssize_t)(-1); REGISTER_GLOBAL_MOCK_RETURNS(socket, test_socket, -1); REGISTER_GLOBAL_MOCK_RETURNS(bind, 0, -1); REGISTER_GLOBAL_MOCK_RETURNS(connect, 0, -1); REGISTER_GLOBAL_MOCK_RETURNS(setsockopt, 0, -1); REGISTER_GLOBAL_MOCK_RETURNS(getsockopt, EAGAIN, EXTENDED_ERROR_FAIL); REGISTER_GLOBAL_MOCK_RETURNS(select, 0, -1); REGISTER_GLOBAL_MOCK_RETURNS(send, sizeof(test_msg), sr_error); REGISTER_GLOBAL_MOCK_RETURNS(recv, sizeof(test_msg), sr_error); REGISTER_GLOBAL_MOCK_HOOK(setsockopt, my_setsockopt); REGISTER_GLOBAL_MOCK_HOOK(select, my_select); } /** * The test suite will call this function to cleanup your machine. * It is called only once, after all tests is done. */ TEST_SUITE_CLEANUP(TestClassCleanup) { //free(g_GenericPointer); umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } /** * The test suite will call this function to prepare the machine for the new test. * It is called before execute each test. */ TEST_FUNCTION_INITIALIZE(initialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); } /** * The test suite will call this function to cleanup your machine for the next test. * It is called after execute each test. */ TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_SOCKET_ASYNC_30_071: [ socket_async_destroy shall call the underlying close method on the supplied socket. ]*/ TEST_FUNCTION(socket_async_destroy__succeeds) { ///arrange STRICT_EXPECTED_CALL(close(test_socket)); ///act socket_async_destroy(test_socket); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_052: [ If the buffer parameter is NULL, socket_async_receive shall log the error and return FAILURE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_053: [ If the received_count parameter is NULL, socket_async_receive shall log the error and return FAILURE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_072: [ If the size parameter is 0, socket_async_receive shall log an error and return FAILURE. ]*/ TEST_FUNCTION(socket_async_receive__parameter_validation__fails) { ///arrange // no calls expected size_t i; size_t received_count_receptor = BAD_BUFFER_COUNT; send_receive_parameters_t parameters[3]; // buffer size received_count fail_msg populate_s_r_parameters(parameters + 0, NULL, sizeof(test_msg), &received_count_receptor, "Unexpected receive_result success when buffer is NULL"); populate_s_r_parameters(parameters + 1, test_msg, sizeof(test_msg), NULL, "Unexpected receive_result success when received_count is NULL"); populate_s_r_parameters(parameters + 2, test_msg, 0, &received_count_receptor, "Unexpected receive_result success when size parameter is 0"); // Cycle through each failing combo of parameters for (i = 0; i < sizeof(parameters) / sizeof(send_receive_parameters_t); i++) { ///act int receive_result = socket_async_receive(test_socket, parameters[i].buffer, parameters[i].size, parameters[i].returned_count); ///assert ASSERT_ARE_EQUAL(size_t, received_count_receptor, BAD_BUFFER_COUNT, "Unexpected received_count_receptor"); ASSERT_ARE_NOT_EQUAL(int, receive_result, 0, parameters[i].fail_msg); } ///cleanup // no cleanup necessary } /* Codes_SRS_SOCKET_ASYNC_30_056: [ If the underlying socket fails unexpectedly, socket_async_receive shall log the error and return FAILURE. ]*/ TEST_FUNCTION(socket_async_receive__recv_fail__fails) { ///arrange char *buffer = test_msg; int receive_result; size_t size = sizeof(test_msg); size_t received_count_receptor = BAD_BUFFER_COUNT; size_t *received_count = &received_count_receptor; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_FAIL; STRICT_EXPECTED_CALL(recv(test_socket, buffer, size, RECV_ZERO_FLAGS)).SetReturn(RECV_FAIL_RETURN); // getsockopt is used to get the extended error information after a socket failure STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act receive_result = socket_async_receive(test_socket, buffer, size, received_count); ///assert ASSERT_ARE_EQUAL(size_t, received_count_receptor, BAD_BUFFER_COUNT, "Unexpected received_count_receptor"); ASSERT_ARE_NOT_EQUAL(int, receive_result, 0, "Unexpected receive_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_055: [ If the underlying socket has no received bytes available, socket_async_receive shall return 0 and the received_count parameter shall receive the value 0. ]*/ TEST_FUNCTION(socket_async_receive__recv_waiting__succeeds) { ///arrange char *buffer = test_msg; int receive_result; size_t size = sizeof(test_msg); size_t received_count_receptor = BAD_BUFFER_COUNT; size_t *received_count = &received_count_receptor; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_WAITING; STRICT_EXPECTED_CALL(recv(test_socket, buffer, size, RECV_ZERO_FLAGS)).SetReturn(RECV_FAIL_RETURN); // getsockopt is used to get the extended error information after a socket failure STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act receive_result = socket_async_receive(test_socket, buffer, size, received_count); ///assert ASSERT_ARE_EQUAL(size_t, received_count_receptor, 0, "Unexpected received_count_receptor"); ASSERT_ARE_EQUAL(int, receive_result, 0, "Unexpected receive_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_054: [ On success, the underlying socket shall set one or more received bytes into buffer, socket_async_receive shall return 0, and the received_count parameter shall receive the number of bytes received into buffer. ]*/ TEST_FUNCTION(socket_async_receive__recv__succeeds) { ///arrange char *buffer = test_msg; int receive_result; size_t size = sizeof(test_msg); size_t received_count_receptor; size_t *received_count = &received_count_receptor; STRICT_EXPECTED_CALL(recv(test_socket, buffer, size, RECV_ZERO_FLAGS)); ///act receive_result = socket_async_receive(test_socket, buffer, size, received_count); ///assert ASSERT_ARE_EQUAL(size_t, received_count_receptor, sizeof(test_msg), "Unexpected received_count_receptor"); ASSERT_ARE_EQUAL(int, receive_result, 0, "Unexpected receive_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_033: [ If the buffer parameter is NULL, socket_async_send shall log the error return FAILURE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_034: [ If the sent_count parameter is NULL, socket_async_send shall log the error return FAILURE. ]*/ TEST_FUNCTION(socket_async_send__parameter_validation__fails) { ///arrange // no calls expected size_t i; size_t sent_count_receptor = BAD_BUFFER_COUNT; send_receive_parameters_t parameters[2]; // buffer size received_count fail_msg populate_s_r_parameters(parameters + 0, NULL, sizeof(test_msg), &sent_count_receptor, "Unexpected receive_result success when buffer is NULL"); populate_s_r_parameters(parameters + 1, test_msg, sizeof(test_msg), NULL, "Unexpected receive_result success when received_count is NULL"); // Cycle through each failing combo of parameters for (i = 0; i < sizeof(parameters) / sizeof(send_receive_parameters_t); i++) { ///act int send_result = socket_async_send(test_socket, parameters[i].buffer, parameters[i].size, parameters[i].returned_count); ///assert ASSERT_ARE_NOT_EQUAL(int, send_result, 0, parameters[i].fail_msg); } ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_037: [ If socket_async_send fails unexpectedly, socket_async_send shall log the error return FAILURE. ]*/ TEST_FUNCTION(socket_async_send__send_fail__fails) { ///arrange int send_result; char *buffer = test_msg; size_t size = sizeof(test_msg); size_t sent_count_receptor = BAD_BUFFER_COUNT; size_t *sent_count = &sent_count_receptor; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_FAIL; STRICT_EXPECTED_CALL(send(test_socket, buffer, size, SEND_ZERO_FLAGS)).SetReturn(SEND_FAIL_RETURN); // getsockopt is used to get the extended error information after a socket failure STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act send_result = socket_async_send(test_socket, buffer, size, sent_count); ///assert ASSERT_ARE_NOT_EQUAL(int, send_result, 0, "Unexpected send_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_036: [ If the underlying socket is unable to accept any bytes for transmission because its buffer is full, socket_async_send shall return 0 and the sent_count parameter shall receive the value 0. ]*/ TEST_FUNCTION(socket_async_send__send_waiting__succeeds) { ///arrange int send_result; char *buffer = test_msg; size_t size = sizeof(test_msg); size_t sent_count_receptor = BAD_BUFFER_COUNT; size_t *sent_count = &sent_count_receptor; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_WAITING; STRICT_EXPECTED_CALL(send(test_socket, buffer, size, SEND_ZERO_FLAGS)).SetReturn(SEND_FAIL_RETURN); // getsockopt is used to get the extended error information after a socket failure STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act send_result = socket_async_send(test_socket, buffer, size, sent_count); ///assert ASSERT_ARE_EQUAL(size_t, sent_count_receptor, 0, "Unexpected sent_count_receptor"); ASSERT_ARE_EQUAL(int, send_result, 0, "Unexpected send_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_073: [ If the size parameter is 0, socket_async_send shall set sent_count to 0 and return 0. ]*/ TEST_FUNCTION(socket_async_send__send_0_bytes__succeeds) { ///arrange char *buffer = test_msg; size_t size = 0; size_t sent_count_receptor = BAD_BUFFER_COUNT; size_t *sent_count = &sent_count_receptor; ///act int send_result = socket_async_send(test_socket, buffer, size, sent_count); ///assert ASSERT_ARE_EQUAL(size_t, sent_count_receptor, 0, "Unexpected sent_count_receptor"); ASSERT_ARE_EQUAL(int, send_result, 0, "Unexpected send_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_035: [ If the underlying socket accepts one or more bytes for transmission, socket_async_send shall return 0 and the sent_count parameter shall receive the number of bytes accepted for transmission. ]*/ TEST_FUNCTION(socket_async_send__succeeds) { ///arrange int send_result; char *buffer = test_msg; size_t size = sizeof(test_msg); size_t sent_count_receptor = BAD_BUFFER_COUNT; size_t *sent_count = &sent_count_receptor; STRICT_EXPECTED_CALL(send(test_socket, buffer, size, SEND_ZERO_FLAGS)); ///act send_result = socket_async_send(test_socket, buffer, size, sent_count); ///assert ASSERT_ARE_EQUAL(size_t, sent_count_receptor, sizeof(test_msg), "Unexpected sent_count_receptor"); ASSERT_ARE_EQUAL(int, send_result, 0, "Unexpected send_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup // no cleanup necessary } /* Tests_SRS_SOCKET_ASYNC_30_026: [ If the is_complete parameter is NULL, socket_async_is_create_complete shall log an error and return FAILURE. ]*/ TEST_FUNCTION(socket_async_is_create_complete__parameter_validation__fails) { ///arrange //bool is_complete = true; //bool* is_complete_param = &is_complete; bool* is_complete_param = NULL; ///act int create_complete_result = socket_async_is_create_complete(test_socket, is_complete_param); ///assert ASSERT_ARE_NOT_EQUAL(int, create_complete_result, 0, "Unexpected send_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_028: [ On failure, the is_complete value shall be set to false and socket_async_create shall return FAILURE. ]*/ TEST_FUNCTION(socket_async_is_create_complete__select_fail__fails) { ///arrange int create_complete_result; bool is_complete; bool* is_complete_param = &is_complete; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_FAIL; STRICT_EXPECTED_CALL(select(test_socket + 1, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(SELECT_FAIL_RETURN); // getsockopt is used to get the extended error information after a socket failure STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act create_complete_result = socket_async_is_create_complete(test_socket, is_complete_param); ///assert ASSERT_ARE_NOT_EQUAL(int, create_complete_result, 0, "Unexpected create_complete_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_028: [ On failure, the is_complete value shall be set to false and socket_async_create shall return FAILURE. ]*/ TEST_FUNCTION(socket_async_is_create_complete__errset_set__fails) { ///arrange int getsockopt_extended_error_return_value; int create_complete_result; bool is_complete; bool* is_complete_param = &is_complete; // Define how the FD_ISSET etc. macros behave // Cause the FD_ISSET macro to detect a failure even though select() succeeded select_behavior = SELECT_TCP_IS_COMPLETE_ERRSET_FAIL; // getsockopt is used to get the extended error information after a socket failure getsockopt_extended_error_return_value = EXTENDED_ERROR_FAIL; STRICT_EXPECTED_CALL(select(test_socket + 1, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // getsockopt is used to get the extended error information after a socket failure STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act create_complete_result = socket_async_is_create_complete(test_socket, is_complete_param); ///assert ASSERT_ARE_NOT_EQUAL(int, create_complete_result, 0, "Unexpected create_complete_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Codes_SRS_SOCKET_ASYNC_30_027: [ On success, the is_complete value shall be set to the completion state and socket_async_create shall return 0. ]*/ TEST_FUNCTION(socket_async_is_create_complete__waiting__succeeds) { ///arrange int create_complete_result; bool is_complete = true; // unexpected so change can be detected bool* is_complete_param = &is_complete; // Define how the FD_ISET etc. macros behave select_behavior = SELECT_TCP_IS_COMPLETE_NOT_READY_OK; STRICT_EXPECTED_CALL(select(test_socket + 1, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); ///act create_complete_result = socket_async_is_create_complete(test_socket, is_complete_param); ///assert ASSERT_IS_FALSE(is_complete, "Unexpected is_complete failure"); ASSERT_ARE_EQUAL(int, create_complete_result, 0, "Unexpected create_complete_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Codes_SRS_SOCKET_ASYNC_30_027: [ On success, the is_complete value shall be set to the completion state and socket_async_create shall return 0. ]*/ TEST_FUNCTION(socket_async_is_create_complete__succeeds) { ///arrange int create_complete_result; bool is_complete = false; // unexpected so change can be detected bool* is_complete_param = &is_complete; // Define how the FD_ISET etc. macros behave select_behavior = SELECT_TCP_IS_COMPLETE_READY_OK; STRICT_EXPECTED_CALL(select(test_socket + 1, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); ///act create_complete_result = socket_async_is_create_complete(test_socket, is_complete_param); ///assert ASSERT_IS_TRUE(is_complete, "Unexpected is_complete failure"); ASSERT_ARE_EQUAL(int, create_complete_result, 0, "Unexpected create_complete_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_010: [ If socket option creation fails, socket_async_create shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. ]*/ TEST_FUNCTION(socket_async_create__create_fail__fails) { ///arrange SOCKET_ASYNC_HANDLE create_result; SOCKET_ASYNC_OPTIONS* options = NULL; bool is_udp = false; STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM /* the TCP value, doesn't matter */, 0)).SetReturn(SOCKET_FAIL_RETURN); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_ARE_EQUAL(int, create_result, SOCKET_ASYNC_INVALID_SOCKET, "Unexpected create_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_020: [ If socket option setting fails, the sock value shall be set to SOCKET_ASYNC_INVALID_SOCKET and socket_async_create shall log an error and return FAILURE. ]*/ TEST_FUNCTION(socket_async_create__opt_default_fail__fails) { ///arrange SOCKET_ASYNC_HANDLE create_result; SOCKET_ASYNC_OPTIONS* options = NULL; bool is_udp = false; STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, 0)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)).SetReturn(SETSOCKOPT_FAIL_RETURN); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_ARE_EQUAL(int, create_result, SOCKET_ASYNC_INVALID_SOCKET, "Unexpected create_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_020: [ If socket option setting fails, the sock value shall be set to SOCKET_ASYNC_INVALID_SOCKET and socket_async_create shall log an error and return FAILURE. ]*/ TEST_FUNCTION(socket_async_create__set_all_options_fail__fails) { ///arrange SOCKET_ASYNC_OPTIONS options_value = { test_keep_alive , test_keep_idle , test_keep_interval, test_keep_count }; SOCKET_ASYNC_OPTIONS* options = &options_value; bool is_udp = false; int negativeTestsInitResult = umock_c_negative_tests_init(); size_t i; ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, 0)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); umock_c_negative_tests_snapshot(); for (i = 1; i < umock_c_negative_tests_call_count(); i++) { SOCKET_ASYNC_HANDLE create_result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_ARE_EQUAL(int, create_result, SOCKET_ASYNC_INVALID_SOCKET, "Unexpected create_result success"); } ///cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_SOCKET_ASYNC_30_021: [ If socket binding fails, socket_async_create shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. ]*/ TEST_FUNCTION(socket_async_create__bind_fail__fails) { ///arrange SOCKET_ASYNC_OPTIONS options_value = { test_keep_alive , test_keep_idle , test_keep_interval, test_keep_count }; SOCKET_ASYNC_OPTIONS* options = &options_value; bool is_udp = false; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_FAIL; SOCKET_ASYNC_HANDLE create_result; STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, 0)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(bind(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)).SetReturn(BIND_FAIL_RETURN); STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_ARE_EQUAL(int, create_result, SOCKET_ASYNC_INVALID_SOCKET, "Unexpected create_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_022: [ If socket connection fails, socket_async_create shall log an error and return SOCKET_ASYNC_INVALID_SOCKET. ]*/ TEST_FUNCTION(socket_async_create__connect_fail__fails) { ///arrange SOCKET_ASYNC_OPTIONS options_value = { test_keep_alive , test_keep_idle , test_keep_interval, test_keep_count }; SOCKET_ASYNC_OPTIONS* options = &options_value; bool is_udp = false; SOCKET_ASYNC_HANDLE create_result; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_FAIL; STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, 0)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(bind(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(connect(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)).SetReturn(BIND_FAIL_RETURN); STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_ARE_EQUAL(int, create_result, SOCKET_ASYNC_INVALID_SOCKET, "Unexpected create_result success"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_018: [ On success, socket_async_create shall return the created and configured SOCKET_ASYNC_HANDLE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_013: [ The is_UDP parameter shall be true for a UDP connection, and false for TCP. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_014: [ If the optional options parameter is non-NULL and is_UDP is false, socket_async_create shall set the socket options to the provided values. ]*/ TEST_FUNCTION(socket_async_create__tcp_connect_waiting__succeeds) { ///arrange SOCKET_ASYNC_OPTIONS options_value = { test_keep_alive , test_keep_idle , test_keep_interval, test_keep_count }; SOCKET_ASYNC_OPTIONS* options = &options_value; bool is_udp = false; SOCKET_ASYNC_HANDLE create_result; // getsockopt is used to get the extended error information after a socket failure int getsockopt_extended_error_return_value = EXTENDED_ERROR_CONNECT_WAITING; init_keep_alive_values(); STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, 0)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(bind(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(connect(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)).SetReturn(BIND_FAIL_RETURN); STRICT_EXPECTED_CALL(getsockopt(test_socket, SOL_SOCKET, SO_ERROR, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_optval(&getsockopt_extended_error_return_value, sizeof_int); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_KEEP_ALIVE_SET(); ASSERT_ARE_EQUAL(int, create_result, test_socket, "Unexpected create_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_018: [ On success, socket_async_create shall return the created and configured SOCKET_ASYNC_HANDLE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_013: [ The is_UDP parameter shall be true for a UDP connection, and false for TCP. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_014: [ If the optional options parameter is non-NULL and is_UDP is false, socket_async_create shall set the socket options to the provided values. ]*/ TEST_FUNCTION(socket_async_create__tcp_succeeds) { ///arrange SOCKET_ASYNC_OPTIONS options_value = { test_keep_alive , test_keep_idle , test_keep_interval, test_keep_count }; SOCKET_ASYNC_OPTIONS* options = &options_value; bool is_udp = false; SOCKET_ASYNC_HANDLE create_result; init_keep_alive_values(); STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM /* the TCP value */, 0)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(bind(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(connect(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_KEEP_ALIVE_SET(); ASSERT_ARE_EQUAL(int, create_result, test_socket, "Unexpected create_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_018: [ On success, socket_async_create shall return the created and configured SOCKET_ASYNC_HANDLE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_013: [ The is_UDP parameter shall be true for a UDP connection, and false for TCP. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_015: [ If the optional options parameter is non-NULL and is_UDP is false, and options->keep_alive is negative, socket_async_create not set the socket keep-alive options. ]*/ TEST_FUNCTION(socket_async_create__tcp_default_sys_keep_alive__succeeds) { ///arrange SOCKET_ASYNC_OPTIONS options_value = { test_keep_alive_sys_default , test_keep_idle , test_keep_interval, test_keep_count }; SOCKET_ASYNC_OPTIONS* options = &options_value; bool is_udp = false; SOCKET_ASYNC_HANDLE create_result; init_keep_alive_values(); STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM /* the TCP value */, 0)); STRICT_EXPECTED_CALL(bind(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(connect(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_KEEP_ALIVE_UNTOUCHED(); ASSERT_ARE_EQUAL(int, create_result, test_socket, "Unexpected create_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_018: [ On success, socket_async_create shall return the created and configured SOCKET_ASYNC_HANDLE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_013: [ The is_UDP parameter shall be true for a UDP connection, and false for TCP. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_017: [ If the optional options parameter is NULL and is_UDP is false, socket_async_create shall disable TCP keep-alive. ]*/ TEST_FUNCTION(socket_async_create__tcp_keep_alive_off_by_default__succeeds) { ///arrange SOCKET_ASYNC_OPTIONS* options = NULL; bool is_udp = false; SOCKET_ASYNC_HANDLE create_result; init_keep_alive_values(); STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM /* the TCP value */, 0)); STRICT_EXPECTED_CALL(setsockopt(test_socket, IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(bind(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(connect(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_KEEP_ALIVE_FALSE(); ASSERT_ARE_EQUAL(int, create_result, test_socket, "Unexpected create_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_SOCKET_ASYNC_30_018: [ On success, socket_async_create shall return the created and configured SOCKET_ASYNC_HANDLE. ]*/ /* Tests_SRS_SOCKET_ASYNC_30_013: [ The is_UDP parameter shall be true for a UDP connection, and false for TCP. ]*/ // Keep alive does not apply to udp connections TEST_FUNCTION(socket_async_create__udp__succeeds) { ///arrange SOCKET_ASYNC_OPTIONS options_value = { test_keep_alive_sys_default , test_keep_idle , test_keep_interval, test_keep_count }; SOCKET_ASYNC_OPTIONS* options = &options_value; bool is_udp = true; SOCKET_ASYNC_HANDLE create_result; init_keep_alive_values(); STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_DGRAM /* the UDP value */, 0)); STRICT_EXPECTED_CALL(bind(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(connect(test_socket, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); ///act create_result = socket_async_create(test_ipv4, test_port, is_udp, options); ///assert ASSERT_KEEP_ALIVE_UNTOUCHED(); ASSERT_ARE_EQUAL(int, create_result, test_socket, "Unexpected create_result failure"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } END_TEST_SUITE(socket_async_ut) test_defines.h000066400000000000000000000024371362133436400364470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is made an integral part of socket_async_ut.c with a #include. It // is broken out for readability. // These definitions provide parameters and pass / fail values for unit testing static int test_socket = (int)0x1; static uint16_t test_port = 0x5566; static uint32_t test_ipv4 = 0x11223344; char test_msg[] = "Send this"; #define BAD_BUFFER_COUNT 10000 #define RECV_FAIL_RETURN -1 #define RECV_ZERO_FLAGS 0 #define SEND_FAIL_RETURN -1 #define SEND_ZERO_FLAGS 0 #define SELECT_FAIL_RETURN -1 #define SOCKET_FAIL_RETURN -1 #define SETSOCKOPT_FAIL_RETURN -1 #define BIND_FAIL_RETURN -1 #define EXTENDED_ERROR_FAIL EACCES #define EXTENDED_ERROR_WAITING EAGAIN #define EXTENDED_ERROR_CONNECT_WAITING EINPROGRESS static size_t sizeof_int = sizeof(test_socket); typedef struct { char * buffer; size_t size; size_t *returned_count; const char* fail_msg; } send_receive_parameters_t; void populate_s_r_parameters(send_receive_parameters_t* p, char* buffer, size_t size, size_t* returned_count, const char* fail_msg) { p->buffer = buffer; p->size = size; p->returned_count = returned_count; p->fail_msg = fail_msg; } win32_fake_linux/000077500000000000000000000000001362133436400367635ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_utreadme.txt000066400000000000000000000001771362133436400407660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut/win32_fake_linuxThis file is a convenience for debugging socket_async.c under Windows, and does not need to normally be part of the SDK build. socket_async_os.h000066400000000000000000000047701362133436400423320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socket_async_ut/win32_fake_linux #ifndef TEST_SOCKET_H #define TEST_SOCKET_H // This file enables testing of these Linux-oriented unit tests under Windows. It is not // strictly necessary, but is convenient to have. #ifdef __cplusplus extern "C" { #include #include #endif #include #include #include #ifndef EINPROGRESS #define EINPROGRESS 112 #endif #ifndef EAGAIN #define EAGAIN 11 #endif #ifndef EWOULDBLOCK #define EWOULDBLOCK 140 #endif #define SOL_SOCKET 0xffff #define SO_ERROR 0x1007 #define AF_INET 2 #define SOCK_STREAM 1 #define SOCK_DGRAM 2 #define SO_KEEPALIVE 0x0008 #define IPPROTO_TCP 6 #define TCP_KEEPIDLE 0x03 #define TCP_KEEPINTVL 0x04 #define TCP_KEEPCNT 0x05 #define F_GETFL 3 #define F_SETFL 4 #define O_NONBLOCK 1 #define EACCES 13 #define FD_SET(n, p) *(p) = 1 #define FD_CLR(n, p) *(p) = 0 #define FD_ISSET(n, p) (*(p) == 1) #define FD_ZERO(p) *(p) = 0 typedef size_t socklen_t; typedef int ssize_t; typedef int fd_set; #define htons(x) x struct in_addr { uint32_t s_addr; /* address in network byte order */ }; struct sockaddr_in { uint8_t sin_family; /* address family: AF_INET */ uint16_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ }; struct sockaddr { uint8_t sin_family; /* address family: AF_INET */ uint16_t sin_port; /* port in network byte order */ struct in_addr sin_addr; /* internet address */ }; struct timeval { long tv_sec; /* seconds */ long tv_usec; /* and microseconds */ }; int socket(int socket_family, int socket_type, int protocol); int fcntl(int fd, int cmd, ... /* arg */); int bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen); int getsockopt(int sockfd, int level, int optname, void *optval, socklen_t *optlen); int setsockopt(int sockfd, int level, int optname, const void *optval, socklen_t optlen); int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen); int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); ssize_t send(int sockfd, const void *buf, size_t len, int flags); ssize_t recv(int sockfd, void *buf, size_t len, int flags); int close(int fd); #ifdef __cplusplus } #endif #endif /* TEST_SOCKET_H */ socketio_berkeley_ut/000077500000000000000000000000001362133436400346315ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000012441362133436400373720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socketio_berkeley_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /IGNORE:4217") set(CMAKE_SHARED_LINKER_FLAGS "$(CMAKE_SHARED_LINKER_FLAGS) /IGNORE:4217") endif() set(theseTestsName socketio_berkeley_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../adapters/socketio_berkeley.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005121362133436400357170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socketio_berkeley_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(socketio_berkeley_unittests, failedTestCount); return failedTestCount; } socketio_berkeley_ut.c000066400000000000000000000443051362133436400412150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socketio_berkeley_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optionhandler.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/socketio.h" #include #include #include TEST_MUTEX_HANDLE test_serialize_mutex; BEGIN_TEST_SUITE(socketio_berkeley_unittests) #if 0 // SOCKETIO_SETOPTION TESTS WERE WORKING BEFORE SWITCH TO umock_c...need to finish the conversion // socketio_setoption tests static CONCRETE_IO_HANDLE setup_socket() { SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); int result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); ASSERT_ARE_EQUAL(int, 0, result); return ioHandle; } static void verify_mocks_and_destroy_socket(CONCRETE_IO_HANDLE ioHandle) { ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_setoption_fails_when_handle_is_null) { // arrange int irrelevant = 1; // act int result = socketio_setoption(NULL, "tcp_keepalive", &irrelevant); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(socketio_setoption_fails_when_option_name_is_null) { // arrange int irrelevant = 1; CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); // act int result = socketio_setoption(ioHandle, NULL, &irrelevant); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_fails_when_value_is_null) { // arrange CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); // act int result = socketio_setoption(ioHandle, "tcp_keepalive", NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_fails_when_it_receives_an_unsupported_option) { // arrange int irrelevant = 1; CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); // act int result = socketio_setoption(ioHandle, "unsupported_option_name", &irrelevant); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_passes_tcp_keepalive_to_setsockopt) { // arrange CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); int onoff = -42; STRICT_EXPECTED_CALL(setsockopt(*(int*)ioHandle, SOL_SOCKET, SO_KEEPALIVE, &onoff, sizeof(int))); // act int result = socketio_setoption(ioHandle, "tcp_keepalive", &onoff); // assert ASSERT_ARE_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_passes_tcp_keepalive_time_to_setsockopt) { // arrange CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); int time = 3; STRICT_EXPECTED_CALL(setsockopt(*(int*)ioHandle, SOL_TCP, TCP_KEEPIDLE, &time, sizeof(int))); // act int result = socketio_setoption(ioHandle, "tcp_keepalive_time", &time); // assert ASSERT_ARE_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_passes_tcp_keepalive_interval_to_setsockopt) { // arrange CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); int interval = 15; STRICT_EXPECTED_CALL(setsockopt(*(int*)ioHandle, SOL_TCP, TCP_KEEPINTVL, &interval, sizeof(int))); // act int result = socketio_setoption(ioHandle, "tcp_keepalive_interval", &interval); // assert ASSERT_ARE_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } #endif /* Seems like the below tests require a full blown rewrite */ #if 0 TEST_SUITE_INITIALIZE(suite_init) { test_serialize_mutex = MicroMockCreateMutex(); ASSERT_IS_NOT_NULL(test_serialize_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { MicroMockDestroyMutex(test_serialize_mutex); } TEST_FUNCTION_INITIALIZE(method_init) { if (!MicroMockAcquireMutex(test_serialize_mutex)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } list_head_count = 0; list_add_called = false; g_addrinfo_call_fail = false; //g_socket_send_size_value = -1; g_socket_recv_size_value = -1; } TEST_FUNCTION_CLEANUP(method_cleanup) { if (!MicroMockReleaseMutex(test_serialize_mutex)) { ASSERT_FAIL("Could not release test serialization mutex."); } } static void OnBytesReceived(void* context, const unsigned char* buffer, size_t size) { (void)context; (void)buffer; (void)size; } static void PrintLogFunction(unsigned int options, char* format, ...) { (void)options; (void)format; } static void OnSendComplete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } /* socketio_win32_create */ TEST_FUNCTION(socketio_create_io_create_parameters_NULL_fails) { // arrange socketio_mocks mocks; // act CONCRETE_IO_HANDLE ioHandle = socketio_create(NULL, PrintLogFunction); // assert ASSERT_IS_NULL(ioHandle); } TEST_FUNCTION(socketio_create_list_create_fails) { // arrange socketio_mocks mocks; EXPECTED_CALL(mocks, gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(mocks, singlylinkedlist_create()).SetReturn((SINGLYLINKEDLIST_HANDLE)NULL); EXPECTED_CALL(mocks, gballoc_free(IGNORED_PTR_ARG)); SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; // act CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); // assert ASSERT_IS_NULL(ioHandle); } TEST_FUNCTION(socketio_create_succeeds) { // arrange socketio_mocks mocks; EXPECTED_CALL(mocks, gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(mocks, singlylinkedlist_create()); EXPECTED_CALL(mocks, gballoc_malloc(IGNORED_NUM_ARG)); SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; // act CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); // assert ASSERT_IS_NOT_NULL(ioHandle); mocks.AssertActualAndExpectedCalls(); socketio_destroy(ioHandle); } // socketio_win32_destroy TEST_FUNCTION(socketio_destroy_socket_io_NULL_succeeds) { // arrange socketio_mocks mocks; // act socketio_destroy(NULL); // assert } TEST_FUNCTION(socketio_destroy_socket_succeeds) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); mocks.ResetAllCalls(); EXPECTED_CALL(mocks, close(IGNORED_NUM_ARG)); EXPECTED_CALL(mocks, singlylinkedlist_get_head_item(IGNORED_PTR_ARG)) .ExpectedAtLeastTimes(2); EXPECTED_CALL(mocks, singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, singlylinkedlist_remove(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, singlylinkedlist_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, gballoc_free(IGNORED_PTR_ARG)); list_head_count = 1; // act socketio_destroy(ioHandle); // assert } TEST_FUNCTION(socketio_open_socket_io_NULL_fails) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; mocks.ResetAllCalls(); // act int result = socketio_open(NULL, OnBytesReceived, OnIoStateChanged, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_open_socket_fails) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); mocks.ResetAllCalls(); EXPECTED_CALL(mocks, socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .SetReturn(-1); // act int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); mocks.AssertActualAndExpectedCalls(); socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_open_getaddrinfo_fails) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); mocks.ResetAllCalls(); g_addrinfo_call_fail = true; EXPECTED_CALL(mocks, socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(mocks, getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, close(IGNORED_NUM_ARG)); // act int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); mocks.AssertActualAndExpectedCalls(); socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_open_connect_fails) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); mocks.ResetAllCalls(); EXPECTED_CALL(mocks, socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(mocks, getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, connect(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)) .SetReturn(-1); EXPECTED_CALL(mocks, close(IGNORED_NUM_ARG)); EXPECTED_CALL(mocks, freeaddrinfo(IGNORED_PTR_ARG)); // act int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); mocks.AssertActualAndExpectedCalls(); socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_open_ioctlsocket_fails) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); mocks.ResetAllCalls(); EXPECTED_CALL(mocks, socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(mocks, getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, connect(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); //EXPECTED_CALL(mocks, fcntl(IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) // .SetReturn(-1); EXPECTED_CALL(mocks, freeaddrinfo(IGNORED_PTR_ARG)); EXPECTED_CALL(mocks, close(IGNORED_NUM_ARG)); // act int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); mocks.AssertActualAndExpectedCalls(); socketio_destroy(ioHandle); } //TEST_FUNCTION(socketio_open_succeeds) //{ // // arrange // socketio_mocks mocks; // // SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; // CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); // // mocks.ResetAllCalls(); // // EXPECTED_CALL(mocks, socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); // EXPECTED_CALL(mocks, getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // EXPECTED_CALL(mocks, connect(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); // EXPECTED_CALL(mocks, freeaddrinfo(IGNORED_PTR_ARG)); // // // act // int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // // // assert // ASSERT_ARE_EQUAL(int, 0, result); // mocks.AssertActualAndExpectedCalls(); // // socketio_destroy(ioHandle); //} TEST_FUNCTION(socketio_close_socket_io_NULL_fails) { // arrange socketio_mocks mocks; // act int result = socketio_close(NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_close_Succeeds) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); mocks.ResetAllCalls(); EXPECTED_CALL(mocks, close(IGNORED_NUM_ARG)); // act result = socketio_close(ioHandle); // assert ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_send_socket_io_fails) { // arrange socketio_mocks mocks; // act int result = socketio_send(NULL, (const void*)TEST_BUFFER_VALUE, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_send_buffer_NULL_fails) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); mocks.ResetAllCalls(); // act result = socketio_send(ioHandle, NULL, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_send_size_zero_fails) { // arrange socketio_mocks mocks; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); mocks.ResetAllCalls(); // act result = socketio_send(ioHandle, (const void*)TEST_BUFFER_VALUE, 0, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } // TBD: To be implemented when fcntl is mocked //TEST_FUNCTION(socketio_send_succeeds) //{ // // arrange // socketio_mocks mocks; // SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; // CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); // // int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // // mocks.ResetAllCalls(); // // EXPECTED_CALL(mocks, singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); // EXPECTED_CALL(mocks, send(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); // // // act // result = socketio_send(ioHandle, (const void*)TEST_BUFFER_VALUE, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // // // assert // ASSERT_ARE_EQUAL(int, 0, result); // mocks.AssertActualAndExpectedCalls(); // // socketio_destroy(ioHandle); //} // TBD: To be implemented when fcntl is mocked //TEST_FUNCTION(socketio_send_returns_1_succeeds) //{ // // arrange // socketio_mocks mocks; // SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; // CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); // // int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // ASSERT_ARE_EQUAL(int, 0, result); // // mocks.ResetAllCalls(); // // EXPECTED_CALL(mocks, singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); // EXPECTED_CALL(mocks, send(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)).SetReturn(1); // EXPECTED_CALL(mocks, gballoc_malloc(IGNORED_NUM_ARG)); // EXPECTED_CALL(mocks, gballoc_malloc(IGNORED_NUM_ARG)); // EXPECTED_CALL(mocks, singlylinkedlist_add(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // // // act // result = socketio_send(ioHandle, (const void*)TEST_BUFFER_VALUE, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // // // assert // ASSERT_ARE_EQUAL(int, 0, result); // mocks.AssertActualAndExpectedCalls(); // // socketio_destroy(ioHandle); //} TEST_FUNCTION(socketio_dowork_socket_io_NULL_fails) { // arrange socketio_mocks mocks; // act socketio_dowork(NULL); // assert } // TBD: To be implemented when fcntl is mocked //TEST_FUNCTION(socketio_dowork_succeeds) //{ // // arrange // socketio_mocks mocks; // SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; // CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); // // int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // // mocks.ResetAllCalls(); // // EXPECTED_CALL(mocks, singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); // EXPECTED_CALL(mocks, recv(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); // // // act // socketio_dowork(ioHandle); // // // assert // mocks.AssertActualAndExpectedCalls(); // // socketio_destroy(ioHandle); //} // TBD: To be implemented when fcntl is mocked //TEST_FUNCTION(socketio_dowork_recv_bytes_succeeds) //{ // // arrange // socketio_mocks mocks; // SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; // CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig, PrintLogFunction); // // int result = socketio_open(ioHandle, OnBytesReceived, OnIoStateChanged, &callbackContext); // // mocks.ResetAllCalls(); // // EXPECTED_CALL(mocks, singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); // EXPECTED_CALL(mocks, recv(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) // .CopyOutArgumentBuffer(2, "t", 1) // .SetReturn(1); // EXPECTED_CALL(mocks, recv(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); // // // act // socketio_dowork(ioHandle); // // // assert // mocks.AssertActualAndExpectedCalls(); // // socketio_destroy(ioHandle); //} #endif END_TEST_SUITE(socketio_berkeley_unittests) socketio_win32_ut/000077500000000000000000000000001362133436400337715ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000012441362133436400365320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socketio_win32_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /IGNORE:4217") set(CMAKE_SHARED_LINKER_FLAGS "$(CMAKE_SHARED_LINKER_FLAGS) /IGNORE:4217") endif() set(theseTestsName socketio_win32_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../adapters/socketio_win32.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005071362133436400350630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socketio_win32_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(socketio_win32_unittests, failedTestCount); return failedTestCount; } socketio_win32_ut.c000066400000000000000000001046741362133436400375230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/socketio_win32_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #undef DECLSPEC_IMPORT #pragma warning(disable: 4273) #include #include #include #include static size_t currentmalloc_call; static size_t whenShallmalloc_fail; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void my_gballoc_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "azure_c_shared_utility/optionhandler.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/socketio.h" #define ENABLE_MOCKS #include "umock_c.h" #include "umocktypes_charptr.h" #include "azure_c_shared_utility/singlylinkedlist.h" static bool g_addrinfo_call_fail; //static int g_socket_send_size_value; static int g_socket_recv_size_value; static const SINGLYLINKEDLIST_HANDLE TEST_SINGLYLINKEDLIST_HANDLE = (SINGLYLINKEDLIST_HANDLE)0x4242; static const LIST_ITEM_HANDLE TEST_LIST_ITEM_HANDLE = (LIST_ITEM_HANDLE)0x11; static const void** list_items = NULL; static size_t list_item_count = 0; static SOCKET test_socket = (SOCKET)0x4243; static size_t list_head_count = 0; static bool singlylinkedlist_add_called = false; static size_t callbackContext = 11; static const struct sockaddr test_sock_addr = { 0 }; static ADDRINFO TEST_ADDR_INFO = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)&test_sock_addr, NULL }; static const char* TEST_BUFFER_VALUE = "test_buffer_value"; #define PORT_NUM 80 #define HOSTNAME_ARG "hostname" #define TEST_BUFFER_SIZE 17 #define TEST_CALLBACK_CONTEXT 0x951753 static struct tcp_keepalive persisted_tcp_keepalive; MOCK_FUNCTION_WITH_CODE(WSAAPI, SOCKET, socket, int, af, int, type, int, protocol) MOCK_FUNCTION_END(test_socket) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, closesocket, SOCKET, s) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, connect, SOCKET, s, const struct sockaddr*, name, int, namelen) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, recv, SOCKET, s, char*, buf, int, len, int, flags) if (g_socket_recv_size_value >= 0) { len = g_socket_recv_size_value; } MOCK_FUNCTION_END(-1) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, send, SOCKET, s, const char*, buf, int, len, int, flags) /*if (g_socket_send_size_value >= 0) { len = g_socket_send_size_value; }*/ MOCK_FUNCTION_END(len) MOCK_FUNCTION_WITH_CODE(WSAAPI, INT, getaddrinfo, PCSTR, pNodeName, PCSTR, pServiceName, const ADDRINFOA*, pHints, PADDRINFOA*, ppResult) int callFail; if (!g_addrinfo_call_fail) { *ppResult = (PADDRINFOA)malloc(sizeof(ADDRINFOA)); memcpy(*ppResult, &TEST_ADDR_INFO, sizeof(ADDRINFOA)); callFail = 0; } else { *ppResult = NULL; callFail = __FAILURE__; } MOCK_FUNCTION_END(callFail) MOCK_FUNCTION_WITH_CODE(WSAAPI, void, freeaddrinfo, PADDRINFOA, pResult) if (pResult != NULL) { free(pResult); } MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WSAAPI, int, WSAGetLastError) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, ioctlsocket, SOCKET, s, long, cmd, u_long FAR*, argp) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, WSAIoctl, SOCKET, s, DWORD, dwIoControlCode, LPVOID, lpvInBuffer, DWORD, cbInBuffer, LPVOID, lpvOutBuffer, DWORD, cbOutBuffer, LPDWORD, lpcbBytesReturned, LPWSAOVERLAPPED, lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE, lpCompletionRoutine) (void)memcpy(&persisted_tcp_keepalive, lpvInBuffer, sizeof(struct tcp_keepalive)); MOCK_FUNCTION_END(0) LIST_ITEM_HANDLE my_singlylinkedlist_get_head_item(SINGLYLINKEDLIST_HANDLE list) { LIST_ITEM_HANDLE listHandle = NULL; (void)list; if (list_item_count > 0) { listHandle = (LIST_ITEM_HANDLE)list_items[0]; list_item_count--; } return listHandle; } LIST_ITEM_HANDLE my_singlylinkedlist_add(SINGLYLINKEDLIST_HANDLE list, const void* item) { const void** items = (const void**)realloc((void*)list_items, (list_item_count + 1) * sizeof(item)); (void)list; if (items != NULL) { list_items = items; list_items[list_item_count++] = item; } singlylinkedlist_add_called = true; return (LIST_ITEM_HANDLE)list_item_count; } const void* my_singlylinkedlist_item_get_value(LIST_ITEM_HANDLE item_handle) { const void* resultPtr = NULL; if (singlylinkedlist_add_called) { resultPtr = item_handle; } return (const void*)resultPtr; } LIST_ITEM_HANDLE my_singlylinkedlist_find(SINGLYLINKEDLIST_HANDLE handle, LIST_MATCH_FUNCTION match_function, const void* match_context) { size_t i; const void* found_item = NULL; (void)handle; for (i = 0; i < list_item_count; i++) { if (match_function((LIST_ITEM_HANDLE)list_items[i], match_context)) { found_item = list_items[i]; break; } } return (LIST_ITEM_HANDLE)found_item; } void my_singlylinkedlist_destroy(SINGLYLINKEDLIST_HANDLE handle) { (void)handle; free((void*)list_items); list_items = NULL; } static void test_on_bytes_received(void* context, const unsigned char* buffer, size_t size) { (void)context; (void)buffer; (void)size; } static void test_on_io_open_complete(void* context, IO_OPEN_RESULT open_result) { (void)context; (void)open_result; } static void test_on_io_close_complete(void* context) { (void)context; } static void test_on_io_error(void* context) { (void)context; } char* umocktypes_stringify_const_ADDRINFOA_ptr(const ADDRINFOA** value) { char* result = NULL; char temp_buffer[256]; int length; length = sprintf(temp_buffer, "{ ai_flags = %d, ai_family = %d, ai_socktype = %d, ai_protocol = %d, ai_addrlen = %u, ai_canonname = %s", (*value)->ai_flags, (*value)->ai_family, (*value)->ai_socktype, (*value)->ai_protocol, (unsigned int)((*value)->ai_addrlen), (*value)->ai_canonname); if (length > 0) { result = (char*)malloc(strlen(temp_buffer) + 1); if (result != NULL) { (void)memcpy(result, temp_buffer, strlen(temp_buffer) + 1); } } return result; } int umocktypes_are_equal_const_ADDRINFOA_ptr(const ADDRINFOA** left, const ADDRINFOA** right) { int result = 1; if (((*left)->ai_flags != (*right)->ai_flags) || ((*left)->ai_family != (*right)->ai_family) || ((*left)->ai_socktype != (*right)->ai_socktype) || ((*left)->ai_protocol != (*right)->ai_protocol) || ((((*left)->ai_canonname == NULL) || ((*right)->ai_canonname == NULL)) && ((*left)->ai_canonname != (*right)->ai_canonname)) || (strcmp((*left)->ai_canonname, (*right)->ai_canonname) != 0)) { result = 0; } return result; } int umocktypes_copy_const_ADDRINFOA_ptr(ADDRINFOA** destination, const ADDRINFOA** source) { int result; *destination = (ADDRINFOA*)malloc(sizeof(ADDRINFOA)); if (*destination == NULL) { result = __FAILURE__; } else { (*destination)->ai_flags = (*source)->ai_flags; (*destination)->ai_family = (*source)->ai_family; (*destination)->ai_socktype = (*source)->ai_socktype; (*destination)->ai_protocol = (*source)->ai_protocol; (*destination)->ai_canonname = (*source)->ai_canonname; result = 0; } return result; } void umocktypes_free_const_ADDRINFOA_ptr(ADDRINFOA** value) { free(*value); } char* umocktypes_stringify_const_struct_sockaddr_ptr(const struct sockaddr** value) { char* result = NULL; char temp_buffer[256]; int length; length = sprintf(temp_buffer, "{ sa_family = %u, sa_data = ... }", (unsigned int)((*value)->sa_family)); if (length > 0) { result = (char*)malloc(strlen(temp_buffer) + 1); if (result != NULL) { (void)memcpy(result, temp_buffer, strlen(temp_buffer) + 1); } } return result; } int umocktypes_are_equal_const_struct_sockaddr_ptr(const struct sockaddr** left, const struct sockaddr** right) { int result = 1; if (((*left)->sa_family != (*left)->sa_family) || (memcmp((*left)->sa_data, (*right)->sa_data, sizeof((*left)->sa_data) != 0))) { result = 0; } return result; } int umocktypes_copy_const_struct_sockaddr_ptr(struct sockaddr** destination, const struct sockaddr** source) { int result; *destination = (struct sockaddr*)malloc(sizeof(struct sockaddr)); if (*destination == NULL) { result = __FAILURE__; } else { (*destination)->sa_family = (*source)->sa_family; (void)memcpy((*destination)->sa_data, (*source)->sa_data, sizeof((*source)->sa_data)); result = 0; } return result; } void umocktypes_free_const_struct_sockaddr_ptr(struct sockaddr** value) { free(*value); } /* after this point malloc is gballoc */ #include "azure_c_shared_utility/gballoc.h" static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(socketio_win32_unittests) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(CONCRETE_IO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(SINGLYLINKEDLIST_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(LIST_ITEM_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(SOCKET, void*); REGISTER_UMOCK_ALIAS_TYPE(PCSTR, char*); REGISTER_TYPE(const ADDRINFOA*, const_ADDRINFOA_ptr); REGISTER_UMOCK_ALIAS_TYPE(PADDRINFOA, const ADDRINFOA*); REGISTER_UMOCK_ALIAS_TYPE(DWORD, unsigned long); REGISTER_UMOCK_ALIAS_TYPE(LPVOID, void*); REGISTER_UMOCK_ALIAS_TYPE(LPDWORD, void*); REGISTER_UMOCK_ALIAS_TYPE(LPWSAOVERLAPPED, void*); REGISTER_UMOCK_ALIAS_TYPE(LPWSAOVERLAPPED_COMPLETION_ROUTINE, void*); REGISTER_GLOBAL_MOCK_RETURN(singlylinkedlist_remove, 0); REGISTER_GLOBAL_MOCK_RETURN(singlylinkedlist_create, TEST_SINGLYLINKEDLIST_HANDLE); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_get_head_item, my_singlylinkedlist_get_head_item); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_add, my_singlylinkedlist_add); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_item_get_value, my_singlylinkedlist_item_get_value); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_find, my_singlylinkedlist_find); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_destroy, my_singlylinkedlist_destroy); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; list_head_count = 0; singlylinkedlist_add_called = false; g_addrinfo_call_fail = false; //g_socket_send_size_value = -1; g_socket_recv_size_value = -1; } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } static void OnSendComplete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } /* socketio_win32_create */ TEST_FUNCTION(socketio_create_io_create_parameters_NULL_fails) { // arrange // act CONCRETE_IO_HANDLE ioHandle = socketio_create(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ioHandle); } TEST_FUNCTION(socketio_create_singlylinkedlist_create_fails) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(singlylinkedlist_create()).SetReturn((SINGLYLINKEDLIST_HANDLE)NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act ioHandle = socketio_create(&socketConfig); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ioHandle); } TEST_FUNCTION(socketio_create_succeeds) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(singlylinkedlist_create()); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // act ioHandle = socketio_create(&socketConfig); // assert ASSERT_IS_NOT_NULL(ioHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); socketio_destroy(ioHandle); } // socketio_win32_destroy TEST_FUNCTION(socketio_destroy_socket_io_NULL_succeeds) { // arrange // act socketio_destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(socketio_destroy_socket_succeeds) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); EXPECTED_CALL(send(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .SetReturn(0); EXPECTED_CALL(WSAGetLastError()) .SetReturn(WSAEWOULDBLOCK); (void)socketio_send(ioHandle, TEST_BUFFER_VALUE, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); umock_c_reset_all_calls(); EXPECTED_CALL(closesocket(IGNORED_NUM_ARG)); EXPECTED_CALL(singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(singlylinkedlist_remove(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); EXPECTED_CALL(singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); EXPECTED_CALL(singlylinkedlist_destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act socketio_destroy(ioHandle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(socketio_open_socket_io_NULL_fails) { // arrange // act int result = socketio_open(NULL, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_open_socket_fails) { // arrange int result; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); umock_c_reset_all_calls(); EXPECTED_CALL(socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .SetReturn(INVALID_SOCKET); #ifndef NO_LOGGING EXPECTED_CALL(WSAGetLastError()); #endif // act result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_open_getaddrinfo_fails) { // arrange int result; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); umock_c_reset_all_calls(); g_addrinfo_call_fail = true; EXPECTED_CALL(socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, &TEST_ADDR_INFO, IGNORED_PTR_ARG)); #ifndef NO_LOGGING EXPECTED_CALL(WSAGetLastError()); #endif EXPECTED_CALL(closesocket(IGNORED_NUM_ARG)); // act result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_open_connect_fails) { // arrange int result; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); umock_c_reset_all_calls(); EXPECTED_CALL(socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, &TEST_ADDR_INFO, IGNORED_PTR_ARG)); EXPECTED_CALL(connect(IGNORED_NUM_ARG, &test_sock_addr, IGNORED_NUM_ARG)) .SetReturn(WSAECONNREFUSED); #ifndef NO_LOGGING EXPECTED_CALL(WSAGetLastError()); #endif EXPECTED_CALL(closesocket(IGNORED_NUM_ARG)); EXPECTED_CALL(freeaddrinfo(&TEST_ADDR_INFO)); // act result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_open_ioctlsocket_fails) { // arrange int result; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); static ADDRINFO addrInfo = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)0x11, NULL }; umock_c_reset_all_calls(); EXPECTED_CALL(socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, &TEST_ADDR_INFO, IGNORED_PTR_ARG)); EXPECTED_CALL(connect(IGNORED_NUM_ARG, &test_sock_addr, IGNORED_NUM_ARG)); EXPECTED_CALL(ioctlsocket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG)) .SetReturn(WSAENETDOWN); #ifndef NO_LOGGING EXPECTED_CALL(WSAGetLastError()); #endif EXPECTED_CALL(closesocket(IGNORED_NUM_ARG)); EXPECTED_CALL(freeaddrinfo(&TEST_ADDR_INFO)); // act result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_open_succeeds) { // arrange int result; SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); umock_c_reset_all_calls(); EXPECTED_CALL(socket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, &TEST_ADDR_INFO, IGNORED_PTR_ARG)); EXPECTED_CALL(connect(IGNORED_NUM_ARG, &test_sock_addr, IGNORED_NUM_ARG)); EXPECTED_CALL(ioctlsocket(IGNORED_NUM_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG)); EXPECTED_CALL(freeaddrinfo(&TEST_ADDR_INFO)); // act result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_close_socket_io_NULL_fails) { // arrange // act int result = socketio_close(NULL, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_close_Succeeds) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); static ADDRINFO addrInfo = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)0x11, NULL }; int result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); EXPECTED_CALL(closesocket(IGNORED_NUM_ARG)); // act result = socketio_close(ioHandle, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_send_socket_io_fails) { // arrange // act int result = socketio_send(NULL, (const void*)TEST_BUFFER_VALUE, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } TEST_FUNCTION(socketio_send_buffer_NULL_fails) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); static ADDRINFO addrInfo = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)0x11, NULL }; int result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); // act result = socketio_send(ioHandle, NULL, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_send_size_zero_fails) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); static ADDRINFO addrInfo = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)0x11, NULL }; int result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); // act result = socketio_send(ioHandle, (const void*)TEST_BUFFER_VALUE, 0, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_send_succeeds) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); static ADDRINFO addrInfo = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)0x11, NULL }; int result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); EXPECTED_CALL(send(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); // act result = socketio_send(ioHandle, (const void*)TEST_BUFFER_VALUE, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_send_returns_1_succeeds) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); static ADDRINFO addrInfo = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)0x11, NULL }; int result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); EXPECTED_CALL(send(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)).SetReturn(1); EXPECTED_CALL(WSAGetLastError()).SetReturn(WSAEWOULDBLOCK); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(singlylinkedlist_add(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // act result = socketio_send(ioHandle, (const void*)TEST_BUFFER_VALUE, TEST_BUFFER_SIZE, OnSendComplete, (void*)TEST_CALLBACK_CONTEXT); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); list_head_count = list_item_count; socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_dowork_socket_io_NULL_fails) { // arrange // act socketio_dowork(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(socketio_dowork_succeeds) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); (void)socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); EXPECTED_CALL(recv(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(WSAGetLastError()); // act socketio_dowork(ioHandle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_dowork_recv_bytes_succeeds) { // arrange SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); (void)socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_get_head_item(IGNORED_PTR_ARG)); EXPECTED_CALL(recv(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer(2, "t", 1) .SetReturn(1); EXPECTED_CALL(recv(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(WSAGetLastError()); // act socketio_dowork(ioHandle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); socketio_destroy(ioHandle); } // socketio_setoption tests static CONCRETE_IO_HANDLE setup_socket() { SOCKETIO_CONFIG socketConfig = { HOSTNAME_ARG, PORT_NUM, NULL }; CONCRETE_IO_HANDLE ioHandle = socketio_create(&socketConfig); int result = socketio_open(ioHandle, test_on_io_open_complete, &callbackContext, test_on_bytes_received, &callbackContext, test_on_io_error, &callbackContext); ASSERT_ARE_EQUAL(int, 0, result); return ioHandle; } static CONCRETE_IO_HANDLE setup_socket_and_expect_WSAIoctl() { CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(WSAIoctl(*(SOCKET*)ioHandle, SIO_KEEPALIVE_VALS, IGNORED_PTR_ARG, sizeof(struct tcp_keepalive), NULL, 0, IGNORED_PTR_ARG, NULL, NULL)) .IgnoreArgument_lpvInBuffer() .IgnoreArgument_lpcbBytesReturned(); memset(&persisted_tcp_keepalive, 0, sizeof(struct tcp_keepalive)); return ioHandle; } static void verify_mocks_and_destroy_socket(CONCRETE_IO_HANDLE ioHandle) { ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); socketio_destroy(ioHandle); } TEST_FUNCTION(socketio_setoption_fails_when_handle_is_null) { // arrange int irrelevant = 1; // act int result = socketio_setoption(NULL, "tcp_keepalive", &irrelevant); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(socketio_setoption_fails_when_option_name_is_null) { // arrange int irrelevant = 1; int result; CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); // act result = socketio_setoption(ioHandle, NULL, &irrelevant); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_fails_when_value_is_null) { // arrange int result; CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); // act result = socketio_setoption(ioHandle, "tcp_keepalive", NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_fails_when_it_receives_an_unsupported_option) { // arrange int irrelevant = 1; int result; CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); // act result = socketio_setoption(ioHandle, "unsupported_option_name", &irrelevant); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(calling_socketio_setoption_with_tcp_keepalive_does_not_impact_the_other_two_options) { // arrange int irrelevant = 1; CONCRETE_IO_HANDLE ioHandle = setup_socket_and_expect_WSAIoctl(); // act int result = socketio_setoption(ioHandle, "tcp_keepalive", &irrelevant); ASSERT_ARE_EQUAL(int, 0, result); // assert ASSERT_ARE_EQUAL(int, 0, persisted_tcp_keepalive.keepalivetime); ASSERT_ARE_EQUAL(int, 0, persisted_tcp_keepalive.keepaliveinterval); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(calling_socketio_setoption_for_option_tcp_keepalive_time_does_not_impact_the_other_two) { // arrange int irrelevant = 1; CONCRETE_IO_HANDLE ioHandle = setup_socket_and_expect_WSAIoctl(); // act int result = socketio_setoption(ioHandle, "tcp_keepalive_time", &irrelevant); ASSERT_ARE_EQUAL(int, 0, result); // assert ASSERT_ARE_EQUAL(int, 0, persisted_tcp_keepalive.onoff); ASSERT_ARE_EQUAL(int, 0, persisted_tcp_keepalive.keepaliveinterval); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(calling_socketio_setoption_for_option_tcp_keepalive_interval_does_not_impact_the_other_two) { // arrange int irrelevant = 1; CONCRETE_IO_HANDLE ioHandle = setup_socket_and_expect_WSAIoctl(); // act int result = socketio_setoption(ioHandle, "tcp_keepalive_interval", &irrelevant); ASSERT_ARE_EQUAL(int, 0, result); // assert ASSERT_ARE_EQUAL(int, 0, persisted_tcp_keepalive.onoff); ASSERT_ARE_EQUAL(int, 0, persisted_tcp_keepalive.keepalivetime); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(tcp_keepalive_time_arg_to_socketio_setoption_is_converted_to_milliseconds) { // arrange int result; CONCRETE_IO_HANDLE ioHandle = setup_socket_and_expect_WSAIoctl(); int time = 3; // act result = socketio_setoption(ioHandle, "tcp_keepalive_time", &time); ASSERT_ARE_EQUAL(int, 0, result); // assert ASSERT_ARE_EQUAL(int, time * 1000, persisted_tcp_keepalive.keepalivetime); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(tcp_keepalive_interval_arg_to_socketio_setoption_is_converted_to_milliseconds) { // arrange int result; CONCRETE_IO_HANDLE ioHandle = setup_socket_and_expect_WSAIoctl(); int interval = 15; // act result = socketio_setoption(ioHandle, "tcp_keepalive_interval", &interval); ASSERT_ARE_EQUAL(int, 0, result); // assert ASSERT_ARE_EQUAL(int, interval * 1000, persisted_tcp_keepalive.keepaliveinterval); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(tcp_keepalive_arg_is_not_modified_by_socketio_setoption) { // arrange int result; CONCRETE_IO_HANDLE ioHandle = setup_socket_and_expect_WSAIoctl(); int onoff = -42; // act result = socketio_setoption(ioHandle, "tcp_keepalive", &onoff); ASSERT_ARE_EQUAL(int, 0, result); // assert ASSERT_ARE_EQUAL(int, onoff, persisted_tcp_keepalive.onoff); verify_mocks_and_destroy_socket(ioHandle); } TEST_FUNCTION(socketio_setoption_does_not_persist_keepalive_values_if_WSAIoctl_fails) { // arrange int irrelevant = 1; int result; CONCRETE_IO_HANDLE ioHandle = setup_socket(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(WSAIoctl(*(SOCKET*)ioHandle, SIO_KEEPALIVE_VALS, IGNORED_PTR_ARG, sizeof(struct tcp_keepalive), NULL, 0, IGNORED_PTR_ARG, NULL, NULL)) .IgnoreArgument_lpvInBuffer() .IgnoreArgument_lpcbBytesReturned() .SetReturn(1); // 1st call fails, keepalive changes should be discarded STRICT_EXPECTED_CALL(WSAIoctl(*(SOCKET*)ioHandle, SIO_KEEPALIVE_VALS, IGNORED_PTR_ARG, sizeof(struct tcp_keepalive), NULL, 0, IGNORED_PTR_ARG, NULL, NULL)) .IgnoreArgument_lpvInBuffer() .IgnoreArgument_lpcbBytesReturned() .SetReturn(0); // purpose of 2nd call is just to see the keepalive state after the 1st call memset(&persisted_tcp_keepalive, 0, sizeof(struct tcp_keepalive)); // act result = socketio_setoption(ioHandle, "tcp_keepalive", &irrelevant); ASSERT_ARE_NOT_EQUAL(int, 0, result); result = socketio_setoption(ioHandle, "tcp_keepalive_time", &irrelevant); // use different option for 2nd call so we don't overwrite the value from the 1st ASSERT_ARE_EQUAL(int, 0, result); // assert ASSERT_ARE_EQUAL(int, 0, persisted_tcp_keepalive.onoff); verify_mocks_and_destroy_socket(ioHandle); } END_TEST_SUITE(socketio_win32_unittests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/string_token_ut/000077500000000000000000000000001362133436400337145ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007721362133436400364030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/string_token_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName string_token_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/string_token.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005031362133436400347230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/string_token_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(string_token_ut, failedTestCount); return (int)failedTestCount; } string_token_ut.c000066400000000000000000001132311362133436400372200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/string_token_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif void* real_malloc(size_t size) { return malloc(size); } void* real_realloc(void* block, size_t size) { return realloc(block, size); } void real_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #include "umock_c_negative_tests.h" #include "umocktypes_charptr.h" #include "umocktypes_stdint.h" #include "umocktypes_bool.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "azure_c_shared_utility/macro_utils.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/string_token.h" static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } // Helpers static int saved_malloc_returns_count = 0; static void* saved_malloc_returns[20]; static void* TEST_malloc(size_t size) { saved_malloc_returns[saved_malloc_returns_count] = real_malloc(size); return saved_malloc_returns[saved_malloc_returns_count++]; } static int saved_realloc_returns_count = 0; static void* saved_realloc_returns[20]; static void* TEST_realloc(void* block, size_t size) { saved_realloc_returns[saved_realloc_returns_count] = real_realloc(block, size); return saved_realloc_returns[saved_realloc_returns_count++]; } static void TEST_free(void* ptr) { int i, j; for (i = 0, j = 0; j < saved_malloc_returns_count; i++, j++) { if (saved_malloc_returns[i] == ptr) j++; saved_malloc_returns[i] = saved_malloc_returns[j]; } if (i != j) saved_malloc_returns_count--; real_free(ptr); } static void register_global_mock_hooks() { REGISTER_GLOBAL_MOCK_HOOK(malloc, TEST_malloc); REGISTER_GLOBAL_MOCK_HOOK(realloc, TEST_realloc); REGISTER_GLOBAL_MOCK_HOOK(free, TEST_free); } // Set Expected Call Helpers static void set_expected_calls_for_get_delimiters_lengths() { STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); } static void set_expected_calls_for_StringToken_GetFirst() { STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); } static void set_expected_calls_for_StringToken_GetNext() { set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // delimiters lengths } BEGIN_TEST_SUITE(string_token_ut) TEST_SUITE_INITIALIZE(string_token_ut_initialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); register_global_mock_hooks(); } TEST_SUITE_CLEANUP(string_token_ut_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(string_token_ut_test_function_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); saved_realloc_returns_count = 0; } TEST_FUNCTION_CLEANUP(string_token_ut_test_function_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } // Tests_SRS_STRING_TOKENIZER_09_001: [ If `source` or `delimiters` are NULL, or `n_delims` is zero, the function shall return NULL ] TEST_FUNCTION(StringToken_GetFirst_NULL_source) { ///arrange size_t length = 10; STRING_TOKEN_HANDLE handle; const char* delimiters[1]; delimiters[0] = "?"; umock_c_reset_all_calls(); // act handle = StringToken_GetFirst(NULL, length, delimiters, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(handle); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_001: [ If `source` or `delimiters` are NULL, or `n_delims` is zero, the function shall return NULL ] TEST_FUNCTION(StringToken_GetFirst_NULL_delimiters) { ///arrange char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length; STRING_TOKEN_HANDLE handle; length = strlen(string); umock_c_reset_all_calls(); // act handle = StringToken_GetFirst(string, length, NULL, 4); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(handle); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_001: [ If `source` or `delimiters` are NULL, or `n_delims` is zero, the function shall return NULL ] TEST_FUNCTION(StringToken_GetFirst_ZERO_delimiters) { ///arrange char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length; const char* delimiters[1]; STRING_TOKEN_HANDLE handle; length = strlen(string); delimiters[0] = "?"; umock_c_reset_all_calls(); // act handle = StringToken_GetFirst(string, length, delimiters, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(handle); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_002: [ If any of the strings in `delimiters` are NULL, the function shall return NULL ] // Tests_SRS_STRING_TOKENIZER_09_007: [ If any failure occurs, all memory allocated by this function shall be released ] TEST_FUNCTION(StringToken_GetFirst_NULL_delimiter) { ///arrange STRING_TOKEN_HANDLE handle; const char* delimiters[4]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "http://"; delimiters[1] = NULL; delimiters[2] = "/"; delimiters[3] = "?"; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act handle = StringToken_GetFirst(string, length, delimiters, 4); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(handle); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_004: [ If the STRING_TOKEN structure fails to be allocated, the function shall return NULL ] TEST_FUNCTION(StringToken_GetFirst_negative_tests) { ///arrange size_t i; const char* delimiters[1]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); delimiters[0] = "?"; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_get_delimiters_lengths(); umock_c_negative_tests_snapshot(); // act for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char error_msg[64]; STRING_TOKEN_HANDLE handle; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act handle = StringToken_GetFirst(string, length, delimiters, 1); sprintf(error_msg, "On failed call %zu", i); ASSERT_IS_NULL(handle, error_msg); } // cleanup umock_c_negative_tests_deinit(); } // Tests_SRS_STRING_TOKENIZER_09_003: [ A STRING_TOKEN structure shall be allocated to hold the token parameters ] // Tests_SRS_STRING_TOKENIZER_09_005: [ The source string shall be split in a token starting from the beginning of `source` up to occurrence of any one of the `demiliters`, whichever occurs first in the order provided ] TEST_FUNCTION(StringToken_GetFirst_Success) { ///arrange STRING_TOKEN_HANDLE handle; const char* delimiters[1]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "?"; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act handle = StringToken_GetFirst(string, length, delimiters, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(handle); // cleanup StringToken_Destroy(handle); } TEST_FUNCTION(StringToken_GetFirst_Empty_String_Success) { ///arrange STRING_TOKEN_HANDLE handle; const char* delimiters[1]; char* string = ""; size_t length = 0; delimiters[0] = "?"; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act handle = StringToken_GetFirst(string, length, delimiters, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(handle); ASSERT_IS_NULL(StringToken_GetValue(handle)); ASSERT_ARE_EQUAL(size_t, 0, StringToken_GetLength(handle)); ASSERT_IS_NULL(StringToken_GetDelimiter(handle)); ASSERT_IS_FALSE(StringToken_GetNext(handle, delimiters, 1)); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_006: [ If the source string does not have any of the `demiliters`, the resulting token shall be the entire `source` string ] TEST_FUNCTION(StringToken_GetFirst_delimiter_not_found) { ///arrange STRING_TOKEN_HANDLE handle; const char* delimiters[1]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "#"; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // delimiters lengths // act handle = StringToken_GetFirst(string, length, delimiters, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(void_ptr, (void_ptr)string, (void_ptr)StringToken_GetValue(handle)); ASSERT_ARE_EQUAL(size_t, length, StringToken_GetLength(handle)); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_008: [ If `token` or `delimiters` are NULL, or `n_delims` is zero, the function shall return false ] TEST_FUNCTION(StringToken_GetNext_NULL_token) { ///arrange bool result; const char* delimiters[2]; delimiters[0] = "https://"; delimiters[1] = "/path"; umock_c_reset_all_calls(); // act result = StringToken_GetNext(NULL, delimiters, 2); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_FALSE(result); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_008: [ If `token` or `delimiters` are NULL, or `n_delims` is zero, the function shall return false ] TEST_FUNCTION(StringToken_GetNext_NULL_delimiters) { ///arrange const char* delimiters[2]; STRING_TOKEN_HANDLE handle; bool result; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "https://"; delimiters[1] = "/path"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, length, delimiters, 2); umock_c_reset_all_calls(); // act result = StringToken_GetNext(handle, NULL, 2); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_FALSE(result); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_008: [ If `token` or `delimiters` are NULL, or `n_delims` is zero, the function shall return false ] TEST_FUNCTION(StringToken_GetNext_zero_delimiters) { ///arrange bool result; STRING_TOKEN_HANDLE handle; const char* delimiters[2]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "https://"; delimiters[1] = "/path"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, length, delimiters, 2); umock_c_reset_all_calls(); // act result = StringToken_GetNext(handle, delimiters, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_FALSE(result); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_010: [ The next token shall be selected starting from the position in `source` right after the previous delimiter up to occurrence of any one of `demiliters`, whichever occurs first in the order provided ] TEST_FUNCTION(StringToken_GetNext_Success) { ///arrange int result; STRING_TOKEN_HANDLE handle; const char* delimiters[2]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "https://"; delimiters[1] = "/path"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, length, delimiters, 2); umock_c_reset_all_calls(); set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // delimiters lengths // act result = StringToken_GetNext(handle, delimiters, 2); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(int, 0, strncmp(StringToken_GetValue(handle), "some.site.com", StringToken_GetLength(handle))); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_012: [ If a token was identified, the function shall return true ] TEST_FUNCTION(StringToken_GetNext_malloc_fails) { ///arrange bool result; STRING_TOKEN_HANDLE handle; const char* delimiters[2]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); delimiters[0] = "https://"; delimiters[1] = "/path"; // this causes the failure umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, length, delimiters, 2); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); // delimiters lengths umock_c_negative_tests_snapshot(); umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(0); // act result = StringToken_GetNext(handle, delimiters, 2); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_FALSE(result); // cleanup umock_c_negative_tests_deinit(); StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_009: [ If the previous token already extended to the end of `source`, the function shall return false ] TEST_FUNCTION(StringToken_GetNext_no_more_tokens) { ///arrange const char* delimiters[1]; bool result; STRING_TOKEN_HANDLE handle; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "?"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, length, delimiters, 1); ASSERT_IS_NOT_NULL(handle); set_expected_calls_for_StringToken_GetNext(); result = StringToken_GetNext(handle, delimiters, 1); ASSERT_IS_TRUE(result); umock_c_reset_all_calls(); // act result = StringToken_GetNext(handle, delimiters, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_FALSE(result); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_011: [ If the source string, starting right after the position of the last delimiter found, does not have any of the `demiliters`, the resulting token shall be the entire remaining of the `source` string ] TEST_FUNCTION(StringToken_GetNext_delimiter_not_found) { ///arrange bool result; const char* delimiters[1]; STRING_TOKEN_HANDLE handle; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "?"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, length, delimiters, 1); umock_c_reset_all_calls(); set_expected_calls_for_get_delimiters_lengths(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // delimiters lengths // act result = StringToken_GetNext(handle, delimiters, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(int, 0, strncmp(StringToken_GetValue(handle), "prop1=site.com&prop2=/prop2/abc", StringToken_GetLength(handle))); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_013: [ If `token` is NULL the function shall return NULL ] TEST_FUNCTION(StringToken_GetValue_NULL_handle) { ///arrange const char* value; umock_c_reset_all_calls(); // act value = StringToken_GetValue(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(value); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_015: [ If `token` is NULL the function shall return zero ] TEST_FUNCTION(StringToken_GetLength_NULL_handle) { ///arrange size_t length; umock_c_reset_all_calls(); // act length = StringToken_GetLength(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, length); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_017: [ If `token` is NULL the function shall return NULL ] TEST_FUNCTION(StringToken_GetDelimiter_NULL_handle) { ///arrange const char* value; umock_c_reset_all_calls(); // act value = StringToken_GetDelimiter(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(value); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_020: [ If `token` is NULL the function shall return ] TEST_FUNCTION(StringToken_Destroy_NULL_handle) { ///arrange umock_c_reset_all_calls(); // act StringToken_Destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_021: [ Otherwise the memory allocated for STRING_TOKEN shall be released ] TEST_FUNCTION(StringToken_Destroy_success) { ///arrange STRING_TOKEN_HANDLE handle; const char* delimiters[1]; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; size_t length = strlen(string); delimiters[0] = "?"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, length, delimiters, 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // STRING_TOKEN // act StringToken_Destroy(handle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_014: [ The function shall return the pointer to the position in `source` where the current token starts. ] // Tests_SRS_STRING_TOKENIZER_09_016: [ The function shall return the length of the current token ] // Tests_SRS_STRING_TOKENIZER_09_018: [ The function shall return a pointer to the delimiter that defined the current token, as passed to the previous call to `StringToken_GetNext()` or `StringToken_GetFirst()` ] // Tests_SRS_STRING_TOKENIZER_09_019: [ If the current token extends to the end of `source`, the function shall return NULL ] TEST_FUNCTION(StringToken_tokenize_HTTP_URL) { ///arrange STRING_TOKEN_HANDLE handle; bool result; char* host = "some.site.com"; char* relative_path = "path/morepath/"; char* property1 = "prop1=site.com"; char* property2 = "prop2=/prop2/abc"; char* string = "https://some.site.com/path/morepath/?prop1=site.com&prop2=/prop2/abc"; const char* delimiters1[4]; const char* delimiters2[1]; delimiters1[0] = "?"; delimiters1[1] = "http://"; delimiters1[2] = "https://"; delimiters1[3] = "/"; delimiters2[0] = "&"; // act // assert umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); handle = StringToken_GetFirst(string, strlen(string), delimiters1, 4); ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(void_ptr, (void*)delimiters1[2], (void*)StringToken_GetDelimiter(handle)); ASSERT_IS_NULL(StringToken_GetValue(handle)); ASSERT_ARE_EQUAL(int, 0, StringToken_GetLength(handle)); set_expected_calls_for_StringToken_GetNext(); result = StringToken_GetNext(handle, delimiters1, 4); ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(void_ptr, (void*)delimiters1[3], (void*)StringToken_GetDelimiter(handle)); ASSERT_IS_TRUE(strncmp(host, StringToken_GetValue(handle), StringToken_GetLength(handle)) == 0); set_expected_calls_for_StringToken_GetNext(); result = StringToken_GetNext(handle, delimiters1, 1); // intentionally restricting to "?" only ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(void_ptr, (void*)delimiters1[0], (void*)StringToken_GetDelimiter(handle)); ASSERT_IS_TRUE(strncmp(relative_path, StringToken_GetValue(handle), StringToken_GetLength(handle)) == 0); set_expected_calls_for_StringToken_GetNext(); result = StringToken_GetNext(handle, delimiters2, 1); ASSERT_IS_TRUE(result); ASSERT_ARE_EQUAL(void_ptr, (void*)delimiters2[0], (void*)StringToken_GetDelimiter(handle)); ASSERT_IS_TRUE(strncmp(property1, StringToken_GetValue(handle), StringToken_GetLength(handle)) == 0); set_expected_calls_for_StringToken_GetNext(); result = StringToken_GetNext(handle, delimiters2, 1); ASSERT_IS_TRUE(result); // SRS_STRING_TOKENIZER_09_019: ASSERT_IS_NULL(StringToken_GetDelimiter(handle)); ASSERT_IS_TRUE(strncmp(property2, StringToken_GetValue(handle), StringToken_GetLength(handle)) == 0); result = StringToken_GetNext(handle, delimiters2, 1); ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup StringToken_Destroy(handle); } TEST_FUNCTION(StringToken_string_ends_with_delimiter) { ///arrange bool result; const char* delimiters[1]; STRING_TOKEN_HANDLE handle; char* string = "abcde"; delimiters[0] = "de"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); // act handle = StringToken_GetFirst(string, strlen(string), delimiters, 1); // assert ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(void_ptr, (void*)delimiters[0], (void*)StringToken_GetDelimiter(handle)); ASSERT_IS_TRUE(strncmp(string, StringToken_GetValue(handle), StringToken_GetLength(handle)) == 0); ASSERT_ARE_EQUAL(int, 3, StringToken_GetLength(handle)); ///arrange set_expected_calls_for_StringToken_GetNext(); // act result = StringToken_GetNext(handle, delimiters, 1); // assert ASSERT_IS_TRUE(result); ASSERT_IS_NULL(StringToken_GetDelimiter(handle)); ASSERT_IS_NULL(StringToken_GetValue(handle)); ASSERT_ARE_EQUAL(int, 0, StringToken_GetLength(handle)); ///arrange // act result = StringToken_GetNext(handle, delimiters, 1); // assert ASSERT_IS_FALSE(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup StringToken_Destroy(handle); } // Tests_SRS_STRING_TOKENIZER_09_022: [ If `source`, `delimiters`, `token` or `token_count` are NULL, or `n_delims` is zero the function shall return a non-zero value ] TEST_FUNCTION(StringToken_Split_NULL_source) { ///arrange int result; umock_c_reset_all_calls(); result = StringToken_Split(NULL, 30, (const char**)0x4444, 2, false, (char***)0x4445, (size_t*)0x4446); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_022: [ If `source`, `delimiters`, `token` or `token_count` are NULL, or `n_delims` is zero the function shall return a non-zero value ] TEST_FUNCTION(StringToken_Split_NULL_delimiters) { ///arrange int result; umock_c_reset_all_calls(); result = StringToken_Split((char*)0x4443, 30, (const char**)NULL, 2, false, (char***)0x4445, (size_t*)0x4446); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_022: [ If `source`, `delimiters`, `token` or `token_count` are NULL, or `n_delims` is zero the function shall return a non-zero value ] TEST_FUNCTION(StringToken_Split_NULL_token) { ///arrange int result; umock_c_reset_all_calls(); result = StringToken_Split((char*)0x4443, 30, (const char**)0x4444, 2, false, (char***)NULL, (size_t*)0x4446); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_022: [ If `source`, `delimiters`, `token` or `token_count` are NULL, or `n_delims` is zero the function shall return a non-zero value ] TEST_FUNCTION(StringToken_Split_NULL_token_count) { ///arrange int result; umock_c_reset_all_calls(); result = StringToken_Split((char*)0x4443, 30, (const char**)0x4444, 2, false, (char***)0x4445, (size_t*)NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_022: [ If `source`, `delimiters`, `token` or `token_count` are NULL, or `n_delims` is zero the function shall return a non-zero value ] TEST_FUNCTION(StringToken_Split_zero_n_delims) { ///arrange int result; umock_c_reset_all_calls(); result = StringToken_Split((char*)0x4443, 30, (const char**)0x4444, 0, false, (char***)0x4445, (size_t*)0x4446); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_STRING_TOKENIZER_09_023: [ `source` (up to `length`) shall be split into individual tokens separated by any of `delimiters` ] // Tests_SRS_STRING_TOKENIZER_09_024: [ All NULL tokens shall be ommited if `include_empty` is not TRUE ] // Tests_SRS_STRING_TOKENIZER_09_025: [ The tokens shall be stored in `tokens`, and their count stored in `token_count` ] // Tests_SRS_STRING_TOKENIZER_09_027: [ If no failures occur the function shall return zero ] TEST_FUNCTION(StringToken_Split_Success) { ///arrange int result; const char* delimiters[2]; char* string = "abc/def&ghi/jkl"; char** tokens; size_t token_count; size_t length = strlen(string); delimiters[0] = "/"; delimiters[1] = "&"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = StringToken_Split(string, length, delimiters, 2, false, &tokens, &token_count); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 4, token_count); ASSERT_ARE_EQUAL(int, 0, strcmp("abc", tokens[0])); ASSERT_ARE_EQUAL(int, 0, strcmp("def", tokens[1])); ASSERT_ARE_EQUAL(int, 0, strcmp("ghi", tokens[2])); ASSERT_ARE_EQUAL(int, 0, strcmp("jkl", tokens[3])); // cleanup while (token_count > 0) { free(tokens[--token_count]); } free(tokens); } TEST_FUNCTION(StringToken_Split_Zero_Length_Success) { ///arrange int result; const char* delimiters[2]; char* string = ""; size_t length = 0; char** tokens = NULL; size_t token_count; delimiters[0] = "/"; delimiters[1] = "&"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = StringToken_Split(string, length, delimiters, 2, false, &tokens, &token_count); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, token_count); ASSERT_IS_NULL(tokens); // cleanup free(tokens); } // Tests_SRS_STRING_TOKENIZER_09_024: [ All NULL tokens shall be ommited if `include_empty` is not TRUE ] TEST_FUNCTION(StringToken_Split_include_NULL_Success) { ///arrange int result; const char* delimiters[2]; char* string = "&abc/&def&ghi/jkl//"; char** tokens; size_t token_count; size_t length = strlen(string); delimiters[0] = "/"; delimiters[1] = "&"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = StringToken_Split(string, length, delimiters, 2, true, &tokens, &token_count); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 8, token_count); ASSERT_IS_NULL(tokens[0]); ASSERT_ARE_EQUAL(int, 0, strcmp("abc", tokens[1])); ASSERT_IS_NULL(tokens[2]); ASSERT_ARE_EQUAL(int, 0, strcmp("def", tokens[3])); ASSERT_ARE_EQUAL(int, 0, strcmp("ghi", tokens[4])); ASSERT_ARE_EQUAL(int, 0, strcmp("jkl", tokens[5])); ASSERT_IS_NULL(tokens[6]); ASSERT_IS_NULL(tokens[7]); // cleanup while (token_count > 0) { if (tokens[--token_count] != NULL) { free(tokens[token_count]); } } free(tokens); } // Tests_SRS_STRING_TOKENIZER_09_026: [ If any failures splitting or storing the tokens occur the function shall return a non-zero value ] TEST_FUNCTION(StringToken_Split_negative_tests) { ///arrange const char* delimiters[2]; char* string = "abc/def&ghi/jkl"; char** tokens; size_t token_count; size_t i; size_t length = strlen(string); ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); delimiters[0] = "/"; delimiters[1] = "&"; umock_c_reset_all_calls(); set_expected_calls_for_StringToken_GetFirst(); // 0, 1, 2 STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); // 5, 6 STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); // 9, 10 STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); set_expected_calls_for_StringToken_GetNext(); // 13, 14 STRICT_EXPECTED_CALL(realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // 17 umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char error_msg[64]; int result; if (i == 0 || i == 1 || i == 2 || i == 5 || i == 6 || i == 9 || i == 10 || i == 13 || i == 14 || i == 17) { continue; } umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = StringToken_Split(string, length, delimiters, 2, false, &tokens, &token_count); if (i == 7 || i == 11 || i == 15) { int j = sizeof(saved_realloc_returns[saved_realloc_returns_count - 1]) / sizeof(char*); while (j > 0) { free(((char**)saved_realloc_returns[saved_realloc_returns_count - 1])[--j]); } free(saved_realloc_returns[saved_realloc_returns_count - 1]); } sprintf(error_msg, "On failed call %zu", i); ASSERT_ARE_NOT_EQUAL(int, 0, result, error_msg); } // cleanup umock_c_negative_tests_deinit(); } END_TEST_SUITE(string_token_ut) string_tokenizer_ut/000077500000000000000000000000001362133436400345275ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000010641362133436400372700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/string_tokenizer_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName string_tokenizer_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/string_tokenizer.c ../../src/strings.c ../../src/crt_abstractions.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005161362133436400356210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/string_tokenizer_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(string_tokenizer_unittests, failedTestCount); return (int)failedTestCount; } string_tokenizer_ut.c000066400000000000000000000713151362133436400410120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/string_tokenizer_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/strings.h" static size_t currentmalloc_call; static size_t whenShallmalloc_fail; void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void my_gballoc_free(void* ptr) { free(ptr); } #include "azure_c_shared_utility/string_tokenizer.h" #define ENABLE_MOCKS #include "umock_c.h" #include "umocktypes_charptr.h" #include "azure_c_shared_utility/gballoc.h" static TEST_MUTEX_HANDLE g_testByTest; #define TEST_STRING_HANDLE (STRING_HANDLE)0x42 #define FAKE_LOCK_HANDLE (LOCK_HANDLE)0x4f DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(string_tokenizer_unittests) TEST_SUITE_INITIALIZE(setsBufferTempSize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(a) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; } TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* STRING_TOKENIZER_Tests BEGIN */ /* STRING_TOKENIZER_CREATE */ /* Tests_SRS_STRING_04_001: [STRING_TOKENIZER_create shall return an NULL STRING_TOKENIZER_HANDLE if parameter handle is NULL]*/ TEST_FUNCTION(STRING_TOKENIZER_create_with_null_handle_fail) { ///arrange ///act STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(t); } /* Tests_SRS_STRING_04_002: [STRING_TOKENIZER_create shall allocate a new STRING_TOKENIZER _HANDLE having the content of the STRING_HANDLE copied and current position pointing at the beginning of the string] */ TEST_FUNCTION(STRING_TOKENIZER_create_succeed) { ///arrange STRING_TOKENIZER_HANDLE t; const char* inputString = "Pirlimpimpim"; STRING_HANDLE input_string_handle = STRING_construct(inputString); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(0)) //Token Allocation. .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(0)) //Token Content Allocation. .IgnoreArgument(1); ///act t = STRING_TOKENIZER_create(input_string_handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///assert ASSERT_IS_NOT_NULL(t); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); } TEST_FUNCTION(STRING_TOKENIZER_create_from_char_input_NULL_fail) { ///arrange ///act STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create_from_char(NULL); ///assert ASSERT_IS_NULL(t); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); } TEST_FUNCTION(STRING_TOKENIZER_create_from_char_succeed) { ///arrange const char* inputString = "Pirlimpimpim"; STRING_TOKENIZER_HANDLE t; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(0)) //Token Allocation. .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(0)) //Token Content Allocation. .IgnoreArgument(1); ///act t = STRING_TOKENIZER_create_from_char(inputString); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(t); //Cleanup STRING_TOKENIZER_destroy(t); } /* Test_SRS_STRING_04_003: [STRING_TOKENIZER_create shall return an NULL STRING_TOKENIZER _HANDLE on any error that is encountered] */ TEST_FUNCTION(STRING_TOKENIZER_create_when_malloc_fails_then_string_tokenizer_create_fails) { ///arrange const char* inputString = "Pirlimpimpim"; STRING_TOKENIZER_HANDLE t; STRING_HANDLE input_string_handle = STRING_construct(inputString); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(0)); //Token Allocation. whenShallmalloc_fail = currentmalloc_call + 1; ///act t = STRING_TOKENIZER_create(input_string_handle); ///assert ASSERT_IS_NULL(t); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_delete(input_string_handle); } /* STRING_TOKENIZER_get_next_token */ /* Tests_SRS_STRING_04_004: [STRING_TOKENIZER_get_next_token shall return a nonzero value if any of the 3 parameters is NULL] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_handle_NULL_Fail) { ///arrange int r; STRING_HANDLE output_string_handle = STRING_new(); umock_c_reset_all_calls(); ///act r = STRING_TOKENIZER_get_next_token(NULL, output_string_handle, "m"); ///assert ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_004: [STRING_TOKENIZER_get_next_token shall return a nonzero value if any of the 3 parameters is NULL] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_Delimiter_empty_Fail) { ///arrange int r; STRING_HANDLE output_string_handle = STRING_new(); umock_c_reset_all_calls(); ///act r = STRING_TOKENIZER_get_next_token(NULL, output_string_handle, ""); ///assert ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_004: [STRING_TOKENIZER_get_next_token shall return a nonzero value if any of the 3 parameters is NULL] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_output_NULL_Fail) { ///arrange int r; const char* inputString = "Pirlimpimpim"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act r = STRING_TOKENIZER_get_next_token(t, NULL, "m"); ///assert ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); } /* Tests_SRS_STRING_04_004: [STRING_TOKENIZER_get_next_token shall return a nonzero value if any of the 3 parameters is NULL] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_delimiters_NULL_Fail) { ///arrange int r; const char* inputString = "Pirlimpimpim"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_new(); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, NULL); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///assert ASSERT_ARE_NOT_EQUAL(int, r, 0); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_005: [STRING_TOKENIZER_get_next_token searches the string inside STRING_TOKENIZER_HANDLE for the first character that is NOT contained in the current delimiter] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_PIRLI_Succeed) { ///arrange int r; const char* inputString = "Pirlimpimpim"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "m"); ///assert ASSERT_ARE_EQUAL(char_ptr, "Pirli", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_005: [STRING_TOKENIZER_get_next_token searches the string inside STRING_TOKENIZER_HANDLE for the first character that is NOT contained in the current delimiter] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_Start_With_Delimiter_Succeed) { ///arrange int r; const char* inputString = "Pirlimpimpim"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///assert ASSERT_ARE_EQUAL(char_ptr, "irlimpimpim", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_005: [STRING_TOKENIZER_get_next_token searches the string inside STRING_TOKENIZER_HANDLE for the first character that is NOT contained in the current delimiter] */ /* Tests_SRS_STRING_04_008: [STRING_TOKENIZER_get_next_token than searches from the start of a token for a character that is contained in the delimiters string.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_Start_And_End_With_Delimiter_Succeed) { ///arrange int r; const char* inputString = "PirlimP"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///assert ASSERT_ARE_EQUAL(char_ptr, "irlim", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_006: [If no such character is found, then STRING_TOKENIZER_get_next_token shall return a nonzero Value (You've reach the end of the string or the string consists with only delimiters).] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_with_All_token_String_Fail) { ///arrange int r; const char* inputString = "PPPPPP"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///assert ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_006: [If no such character is found, then STRING_TOKENIZER_get_next_token shall return a nonzero Value (You've reach the end of the string or the string consists with only delimiters).] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_2Times_With_Just_1Token_SecondCall_Fail) { ///arrange int r; const char* inputString = "TestP"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); ///act1 r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///Assert1 ASSERT_ARE_EQUAL(char_ptr, "Test", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act2 r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///assert ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_007: [If such a character is found, STRING_TOKENIZER_get_next_token consider it as the start of a token.] */ /* Tests_SRS_STRING_04_009: [If no such character is found, STRING_TOKENIZER_get_next_token extends the current token to the end of the string inside t, copies the token to output and returns 0.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_2charactersToken_at_begin_of_input_call_1_Time_Succeed) { ///arrange int r; const char* inputString = "??This is a Test"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "?"); ///Assert1 ASSERT_ARE_EQUAL(char_ptr, "This is a Test", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_010: [If such a character is found, STRING_TOKENIZER_get_next_token consider it the end of the token and copy it's content to output, updates the current position inside t to the next character and returns 0.] */ /* Tests_SRS_STRING_04_011: [Each subsequent call to STRING_TOKENIZER_get_next_token starts searching from the saved position on t and behaves as described above.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_stringWith3Tokens_Call3Times_Succeed) { ///arrange int r; const char* inputString = "Test1PTest2PTest3"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result1. .IgnoreArgument(1) .IgnoreArgument(2); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result2. .IgnoreArgument(1) .IgnoreArgument(2); EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result3. .IgnoreArgument(1) .IgnoreArgument(2); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///Assert1 ASSERT_ARE_EQUAL(char_ptr, "Test1", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act2 r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///Assert2 ASSERT_ARE_EQUAL(char_ptr,"Test2", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act3 r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///Assert3 ASSERT_ARE_EQUAL(char_ptr,"Test3", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_TOKENIZER_04_014: [STRING_TOKENIZER_get_next_token shall return nonzero value if t contains an empty string.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_inputEmptyString_Fail) { ///arrange int r; const char* inputString = ""; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "P"); ///Assert ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_010: [If such a character is found, STRING_TOKENIZER_get_next_token consider it the end of the token and copy it's content to output, updates the current position inside t to the next character and returns 0.] */ /* Tests_SRS_STRING_04_011: [Each subsequent call to STRING_TOKENIZER_get_next_token starts searching from the saved position on t and behaves as described above.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_multipleCalls_DifferentToken_Succeed) { ///arrange int r; const char* inputString = "?a???b,,,#c"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act1 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "?"); ///Assert1 ASSERT_ARE_EQUAL(char_ptr,"a", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act2 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, ","); ///Assert2 ASSERT_ARE_EQUAL(char_ptr,"??b", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act3 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "#,"); ///Assert3 ASSERT_ARE_EQUAL(char_ptr,"c", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act4 r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "?"); ///Assert4 ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///Cleanup STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_010: [If such a character is found, STRING_TOKENIZER_get_next_token consider it the end of the token and copy it's content to output, updates the current position inside t to the next character and returns 0.] */ /* Tests_SRS_STRING_04_011: [Each subsequent call to STRING_TOKENIZER_get_next_token starts searching from the saved position on t and behaves as described above.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_inputString_with_SingleCharacter_call2Times_succeed) { ///arrange int r; const char* inputString = "c"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act1 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "?"); ///Assert1 ASSERT_ARE_EQUAL(char_ptr,"c", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act2 r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "?"); ///Assert2 ASSERT_ARE_NOT_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///Clean Up STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_010: [If such a character is found, STRING_TOKENIZER_get_next_token consider it the end of the token and copy it's content to output, updates the current position inside t to the next character and returns 0.] */ /* Tests_SRS_STRING_04_011: [Each subsequent call to STRING_TOKENIZER_get_next_token starts searching from the saved position on t and behaves as described above.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_inputString_with_NULL_in_the_Middle_succeed) { ///arrange int r; const char* inputString = "This is a Test \0 1234"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act1 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "1"); ///Assert1 ASSERT_ARE_EQUAL(char_ptr,"This is a Test ", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///Clean Up STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* Tests_SRS_STRING_04_010: [If such a character is found, STRING_TOKENIZER_get_next_token consider it the end of the token and copy it's content to output, updates the current position inside t to the next character and returns 0.] */ /* Tests_SRS_STRING_04_011: [Each subsequent call to STRING_TOKENIZER_get_next_token starts searching from the saved position on t and behaves as described above.] */ TEST_FUNCTION(STRING_TOKENIZER_get_next_token_inputString_with_specialCharacters_succeed) { ///arrange int r; const char* inputString = "This is a Test \r\n 1234 \r\n\t 12345"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_HANDLE output_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act1 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "\r\n"); ///Assert1 ASSERT_ARE_EQUAL(char_ptr,"This is a Test ", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act2 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "\r\n"); ///Assert2 ASSERT_ARE_EQUAL(char_ptr," 1234 ", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ///act3 EXPECTED_CALL(gballoc_realloc(0, 0)) //Alloc memory to copy result. .IgnoreArgument(1) .IgnoreArgument(2); r = STRING_TOKENIZER_get_next_token(t, output_string_handle, "\r\n\t"); ///Assert3 ASSERT_ARE_EQUAL(char_ptr," 12345", STRING_c_str(output_string_handle)); ASSERT_ARE_EQUAL(int, r, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///Clean Up STRING_TOKENIZER_destroy(t); STRING_delete(input_string_handle); STRING_delete(output_string_handle); } /* STRING_TOKENIZER_delete */ /*Test_SRS_STRING_TOKENIZER_04_012: [STRING_TOKENIZER_destroy shall free the memory allocated by the STRING_TOKENIZER_create ] */ TEST_FUNCTION(STRING_TOKENIZER_DESTROY_Succeed) { ///arrange const char* inputString = "Pirlimpimpim"; STRING_HANDLE input_string_handle = STRING_construct(inputString); STRING_TOKENIZER_HANDLE t = STRING_TOKENIZER_create(input_string_handle); umock_c_reset_all_calls(); ///act EXPECTED_CALL(gballoc_free(0)) //Free Token content. .IgnoreArgument(1); EXPECTED_CALL(gballoc_free(0)) //Free Token. .IgnoreArgument(1); STRING_TOKENIZER_destroy(t); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //Cleanup STRING_delete(input_string_handle); } /*Tests_SRS_STRING_TOKENIZER_04_013: [When the t argument is NULL, then STRING_TOKENIZER_destroy shall not attempt to free] */ TEST_FUNCTION(STRING_TOKENIZER_DESTROY_WITH_NULL_HANDLE_NO_FREE) { ///arrange // act STRING_TOKENIZER_destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } END_TEST_SUITE(string_tokenizer_unittests)azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/strings_ut/000077500000000000000000000000001362133436400326775ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007601362133436400353630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/strings_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName strings_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/strings.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005051362133436400337100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/strings_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(strings_unittests, failedTestCount); return (int)failedTestCount; } strings_ut.c000066400000000000000000001555051362133436400352000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/strings_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif void* my_gballoc_malloc(size_t size) { return malloc(size); } void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #include "umock_c_negative_tests.h" #include "umocktypes_charptr.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/strings.h" static const char TEST_STRING_VALUE []= "DataValueTest"; static const char INITIAL_STRING_VALUE []= "Initial_"; static const char MULTIPLE_TEST_STRING_VALUE[] = "DataValueTestDataValueTest"; static const char* COMBINED_STRING_VALUE = "Initial_DataValueTest"; static const char* QUOTED_TEST_STRING_VALUE = "\"DataValueTest\""; static const char* FORMAT_STRING = "test_format_%s"; static const char* FORMAT_INTEGER = "test_format_%d"; static const char* FORMAT_STRING_RESULT = "test_format_DataValueTest"; static const char* FORMAT_INTEGER_RESULT = "test_format_1234"; static const char* INIT_FORMAT_STRING_RESULT = "Initial_test_format_DataValueTest"; static const char* INIT_FORMAT_INTEGER_RESULT = "Initial_test_format_1234"; static const char* EMPTY_STRING = ""; static const char* MODIFIED_STRING_VALUE = "Initial*"; static const char* MODIFIED_STRING_VALUE2 = "*nitial_"; #define NUMBER_OF_CHAR_TOCOPY 8 #define TEST_INTEGER_VALUE 1234 static TEST_MUTEX_HANDLE g_testByTest; static const struct JSONEncoding { const char* source; const char* expectedJSON; } JSONtests[]= { { "", "\"\"" }, /*empty string*/ { "a", "\"a\"" }, /*a => "a"*/ { "aaslkdjhfalksjh", "\"aaslkdjhfalksjh\"" }, /*aaslkdjhfalksjh => "aaslkdjhfalksjh"*/ { "\x01", "\"\\u0001\"" }, { "\x1F", "\"\\u001F\"" }, { "\x1F", "\"\\u001F\"" }, { "\"", "\"\\\"\""}, { "\\", "\"\\\\\"" }, { "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F some text\"\\a/a", "\"\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F some text\\\"\\\\a\\/a\"" }, }; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(strings_unittests) TEST_SUITE_INITIALIZE(setsBufferTempSize) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); ASSERT_ARE_EQUAL(int, 0, umocktypes_charptr_register_types() ); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_realloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(a) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* STRING_Tests BEGIN */ /* Tests_SRS_STRING_07_001: [STRING_new shall allocate a new STRING_HANDLE pointing to an empty string.] */ TEST_FUNCTION(STRING_new_Succeed) { ///arrange STRING_HANDLE g_hString; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(1)); ///act g_hString = STRING_new(); ///assert ASSERT_IS_NOT_NULL(g_hString); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } TEST_FUNCTION(STRING_new_fail) { //arrange STRING_HANDLE str_handle; size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(1)); umock_c_negative_tests_snapshot(); //act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { char tmp_msg[64]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); str_handle = STRING_new(); sprintf(tmp_msg, "STRING_new failure in test %zu/%zu", index+1, count); //assert ASSERT_IS_NULL(str_handle, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_STRING_07_007: [STRING_new_with_memory shall return a NULL STRING_HANDLE if the supplied char* is empty.] */ TEST_FUNCTION(STRING_new_With_Memory_NULL_Memory_Fail) { ///arrange STRING_HANDLE g_hString; ///act g_hString = STRING_new_with_memory(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(g_hString); } /* Tests_SRS_STRING_07_006: [STRING_new_with_memory shall return a STRING_HANDLE by using the supplied char* memory.] */ TEST_FUNCTION(STRING_new_With_Memory_Succeed) { ///arrange STRING_HANDLE g_hString; size_t nLen = strlen(TEST_STRING_VALUE) + 1; char* szTestString = (char*)malloc(nLen); strncpy(szTestString, TEST_STRING_VALUE, nLen); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act g_hString = STRING_new_with_memory(szTestString); ///assert ASSERT_ARE_EQUAL(char_ptr, TEST_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_003: [STRING_construct shall allocate a new string with the value of the specified const char*.] */ TEST_FUNCTION(STRING_construct_Succeed) { ///arrange STRING_HANDLE g_hString; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_STRING_VALUE) + 1)); ///act g_hString = STRING_construct(TEST_STRING_VALUE); ///assert ASSERT_ARE_EQUAL(char_ptr, TEST_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_003: [STRING_construct shall allocate a new string with the value of the specified const char*.] */ TEST_FUNCTION(STRING_construct_Fail) { //arrange STRING_HANDLE str_handle; size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_STRING_VALUE) + 1)); umock_c_negative_tests_snapshot(); //act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { char tmp_msg[64]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); str_handle = STRING_construct(TEST_STRING_VALUE); sprintf(tmp_msg, "STRING_construct failure in test %zu/%zu", index+1, count); //assert ASSERT_IS_NULL(str_handle, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_STRING_07_005: [If the supplied const char* is NULL STRING_construct shall return a NULL value.] */ TEST_FUNCTION(STRING_construct_With_NULL_HANDLE_Fail) { ///arrange STRING_HANDLE g_hString; ///act g_hString = STRING_construct(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(g_hString); } /* Tests_SRS_STRING_07_008: [STRING_new_quoted shall return a valid STRING_HANDLE Copying the supplied const char* value surrounded by quotes.] */ TEST_FUNCTION(STRING_new_quoted_Succeed) { ///arrange STRING_HANDLE g_hString; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(2 + strlen(TEST_STRING_VALUE) + 1)); ///act g_hString = STRING_new_quoted(TEST_STRING_VALUE); ///assert ASSERT_ARE_EQUAL(char_ptr, QUOTED_TEST_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_009: [STRING_new_quoted shall return a NULL STRING_HANDLE if the supplied const char* is NULL.] */ TEST_FUNCTION(STRING_new_quoted_NULL_Fail) { ///arrange STRING_HANDLE g_hString; ///act g_hString = STRING_new_quoted(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(g_hString); } /* Tests_SRS_STRING_07_039: [If the parameter format is NULL then STRING_construct_sprintf shall return NULL.] */ TEST_FUNCTION(STRING_construct_sprintf_format_NULL_Fail) { ///arrange STRING_HANDLE g_hString; int value = 123; ///act g_hString = STRING_construct_sprintf(NULL, value); ///assert ASSERT_IS_NULL(g_hString); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_STRING_07_045: [STRING_construct_sprintf shall allocate a new string with the value of the specified printf formated const char. ] */ /* Tests_SRS_STRING_07_041: [STRING_construct_sprintf shall determine the size of the resulting string and allocate the necessary memory.] */ TEST_FUNCTION(STRING_construct_sprintf_Succeed) { ///arrange STRING_HANDLE str_handle; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); ///act str_handle = STRING_construct_sprintf(FORMAT_STRING, TEST_STRING_VALUE); ///assert ASSERT_IS_NOT_NULL(str_handle); ASSERT_ARE_EQUAL(char_ptr, FORMAT_STRING_RESULT, STRING_c_str(str_handle) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_045: [STRING_construct_sprintf shall allocate a new string with the value of the specified printf formated const char. ] */ /* Tests_SRS_STRING_07_041: [STRING_construct_sprintf shall determine the size of the resulting string and allocate the necessary memory.] */ TEST_FUNCTION(STRING_construct_sprintf_Empty_String_Succeed) { ///arrange STRING_HANDLE str_handle; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); ///act str_handle = STRING_construct_sprintf(EMPTY_STRING); ///assert ASSERT_IS_NOT_NULL(str_handle); ASSERT_ARE_EQUAL(size_t, STRING_length(str_handle), 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_040: [If any error is encountered STRING_construct_sprintf shall return NULL.] */ TEST_FUNCTION(STRING_construct_sprintf_fail) { //arrange STRING_HANDLE str_handle; size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); umock_c_negative_tests_snapshot(); //act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { char tmp_msg[64]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); str_handle = STRING_construct_sprintf(FORMAT_STRING, TEST_STRING_VALUE); sprintf(tmp_msg, "STRING_construct_sprintf failure in test %zu/%zu", index+1, count); //assert ASSERT_IS_NULL(str_handle, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); } /* Tests_ */ TEST_FUNCTION(STRING_Concat_Succeed) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(INITIAL_STRING_VALUE) + strlen(TEST_STRING_VALUE) + 1)) .IgnoreArgument(1); ///act nResult = STRING_concat(g_hString, TEST_STRING_VALUE); ///assert ASSERT_ARE_EQUAL(char_ptr, COMBINED_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_013: [STRING_concat shall return a nonzero number if the STRING_HANDLE and const char* is NULL.] */ TEST_FUNCTION(STRING_Concat_HANDLE_NULL_Fail) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); ///act nResult = STRING_concat(NULL, TEST_STRING_VALUE); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_013: [STRING_concat shall return a nonzero number if the STRING_HANDLE and const char* is NULL.] */ TEST_FUNCTION(STRING_Concat_CharPtr_NULL_Fail) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); ///act nResult = STRING_concat(g_hString, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_013: [STRING_concat shall return a nonzero number if the STRING_HANDLE and const char* is NULL.] */ TEST_FUNCTION(STRING_Concat_HANDLE_and_CharPtr_NULL_Fail) { ///arrange ///act int nResult = STRING_concat(NULL, TEST_STRING_VALUE); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ///cleanup } /* Tests_SRS_STRING_07_013: [STRING_concat shall return a nonzero number if the STRING_HANDLE and const char* is NULL.] */ TEST_FUNCTION(STRING_Concat_Copy_Multiple_Succeed) { ///arrange STRING_HANDLE g_hString; g_hString = STRING_new(); STRING_copy(g_hString, TEST_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(TEST_STRING_VALUE) + strlen(TEST_STRING_VALUE)+1)) .IgnoreArgument(1) .IgnoreArgument(2); ///act STRING_concat(g_hString, TEST_STRING_VALUE); ///assert ASSERT_ARE_EQUAL(char_ptr, MULTIPLE_TEST_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_034: [String_Concat_with_STRING shall concatenate a given STRING_HANDLE variable with a source STRING_HANDLE.] */ TEST_FUNCTION(STRING_Concat_With_STRING_SUCCEED) { ///arrange int nResult; STRING_HANDLE g_hString = STRING_construct(INITIAL_STRING_VALUE); STRING_HANDLE hAppend = STRING_construct(TEST_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(INITIAL_STRING_VALUE) + strlen(TEST_STRING_VALUE) + 1)) .IgnoreArgument(1); ///act nResult = STRING_concat_with_STRING(g_hString, hAppend); ///assert ASSERT_ARE_EQUAL(char_ptr, COMBINED_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Clean up STRING_delete(hAppend); STRING_delete(g_hString); } /* Tests_SRS_STRING_07_035: [String_Concat_with_STRING shall return a nonzero number if an error is encountered.] */ TEST_FUNCTION(STRING_Concat_With_STRING_HANDLE_NULL_Fail) { ///arrange int nResult; STRING_HANDLE hAppend = STRING_construct(TEST_STRING_VALUE); umock_c_reset_all_calls(); ///act nResult = STRING_concat_with_STRING(NULL, hAppend); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // Clean up STRING_delete(hAppend); } /* Tests_SRS_STRING_07_035: [String_Concat_with_STRING shall return a nonzero number if an error is encountered.] */ TEST_FUNCTION(STRING_Concat_With_STRING_Append_HANDLE_NULL_Fail) { ///arrange STRING_HANDLE g_hString; int nResult; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); ///act nResult = STRING_concat_with_STRING(g_hString, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_035: [String_Concat_with_STRING shall return a nonzero number if an error is encountered.] */ TEST_FUNCTION(STRING_Concat_With_STRING_All_HANDLE_NULL_Fail) { ///arrange ///act int nResult = STRING_concat_with_STRING(NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_STRING_07_016: [STRING_copy shall copy the const char* into the supplied STRING_HANDLE.] */ TEST_FUNCTION(STRING_Copy_Succeed) { ///arrange STRING_HANDLE g_hString; int nResult; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, strlen(TEST_STRING_VALUE) + 1)) .IgnoreArgument(1); ///act nResult = STRING_copy(g_hString, TEST_STRING_VALUE); ///assert ASSERT_ARE_EQUAL(char_ptr, TEST_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_017: [STRING_copy shall return a nonzero value if any of the supplied parameters are NULL.] */ TEST_FUNCTION(STRING_Copy_NULL_Fail) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); ///act nResult = STRING_copy(g_hString, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_018: [STRING_copy_n shall copy the number of characters defined in size_t.] */ TEST_FUNCTION(STRING_Copy_n_Succeed) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, NUMBER_OF_CHAR_TOCOPY + 1)) .IgnoreArgument(1); ///act nResult = STRING_copy_n(g_hString, COMBINED_STRING_VALUE, NUMBER_OF_CHAR_TOCOPY); ///assert ASSERT_ARE_EQUAL(char_ptr, INITIAL_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_019: [STRING_copy_n shall return a nonzero value if STRING_HANDLE or const char* is NULL.] */ TEST_FUNCTION(STRING_Copy_n_With_HANDLE_NULL_Fail) { ///arrange ///act int nResult = STRING_copy_n(NULL, COMBINED_STRING_VALUE, NUMBER_OF_CHAR_TOCOPY); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_STRING_07_019: [STRING_copy_n shall return a nonzero value if STRING_HANDLE or const char* is NULL.] */ TEST_FUNCTION(STRING_Copy_n_With_CONST_CHAR_NULL_Fail) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); ///act nResult = STRING_copy_n(g_hString, NULL, NUMBER_OF_CHAR_TOCOPY); ///assert ASSERT_ARE_NOT_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_018: [STRING_copy_n shall copy the number of characters defined in size_t.] */ TEST_FUNCTION(STRING_Copy_n_With_Size_0_Succeed) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(INITIAL_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1)) .IgnoreArgument(1); ///act nResult = STRING_copy_n(g_hString, COMBINED_STRING_VALUE, 0); ///assert ASSERT_ARE_EQUAL(char_ptr, EMPTY_STRING, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_014: [STRING_quote shall "quote" the supplied STRING_HANDLE and return 0 on success.] */ TEST_FUNCTION(STRING_quote_Succeed) { ///arrange int nResult; STRING_HANDLE g_hString; g_hString = STRING_construct(TEST_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 + strlen(TEST_STRING_VALUE) + 1)) .IgnoreArgument(1); ///act nResult = STRING_quote(g_hString); ///assert ASSERT_ARE_EQUAL(char_ptr, QUOTED_TEST_STRING_VALUE, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } TEST_FUNCTION(STRING_quote_fail) { ///arrange STRING_HANDLE str_handle; size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); str_handle = STRING_construct(TEST_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 2 + strlen(TEST_STRING_VALUE) + 1)) .IgnoreArgument(1); umock_c_negative_tests_snapshot(); ///act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { char tmp_msg[64]; int nResult; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); nResult = STRING_quote(str_handle); sprintf(tmp_msg, "STRING_quote failure in test %zu/%zu", index+1, count); //assert ASSERT_ARE_NOT_EQUAL(int, 0, nResult, tmp_msg); } ///cleanup STRING_delete(str_handle); umock_c_negative_tests_deinit(); } /* Tests_SRS_STRING_07_015: [STRING_quote shall return a nonzero value if any of the supplied parameters are NULL.] */ TEST_FUNCTION(STRING_quote_NULL_HANDLE_Fail) { ///arrange ///act int nResult = STRING_quote(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_STRING_07_021: [STRING_c_str shall return NULL if the STRING_HANDLE is NULL.] */ TEST_FUNCTION(STRING_c_str_NULL_HANDLE_Fail) { ///arrange ///act const char* s = STRING_c_str(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(s); } /* Tests_SRS_STRING_07_020: [STRING_c_str shall return the const char* associated with the given STRING_HANDLE.] */ TEST_FUNCTION(STRING_c_str_Success) { ///arrange const char* s; STRING_HANDLE g_hString; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(TEST_STRING_VALUE) + 1)); ///act g_hString = STRING_construct(TEST_STRING_VALUE); s = STRING_c_str(g_hString); ///assert ASSERT_ARE_EQUAL(char_ptr, s, TEST_STRING_VALUE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_022: [STRING_empty shall revert the STRING_HANDLE to an empty state.] */ TEST_FUNCTION(STRING_empty_Succeed) { ///arrange STRING_HANDLE g_hString; int nResult; g_hString = STRING_construct(TEST_STRING_VALUE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, 1)) .IgnoreArgument(1); ///act nResult = STRING_empty(g_hString); ///assert ASSERT_ARE_EQUAL(int, nResult, 0); ASSERT_ARE_EQUAL(char_ptr, EMPTY_STRING, STRING_c_str(g_hString) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } /* Tests_SRS_STRING_07_023: [STRING_empty shall return a nonzero value if the STRING_HANDLE is NULL.] */ TEST_FUNCTION(STRING_empty_NULL_HANDLE_Fail) { ///arrange ///act int nResult = STRING_empty(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, nResult, 0); } /* Tests_SRS_STRING_07_011: [STRING_delete will not attempt to free anything with a NULL STRING_HANDLE.] */ TEST_FUNCTION(STRING_delete_NULL_Succeed) { ///arrange ///act STRING_delete(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_STRING_07_011: [STRING_delete will not attempt to free anything with a NULL STRING_HANDLE.] */ TEST_FUNCTION(STRING_delete_Succeed) { ///arrange STRING_HANDLE g_hString; g_hString = STRING_new(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act STRING_delete(g_hString); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(STRING_length_Succeed) { ///arrange STRING_HANDLE g_hString; size_t nResult; g_hString = STRING_construct(TEST_STRING_VALUE); umock_c_reset_all_calls(); ///act nResult = STRING_length(g_hString); ///assert ASSERT_ARE_EQUAL(size_t, nResult, strlen(TEST_STRING_VALUE) ); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(g_hString); } TEST_FUNCTION(STRING_length_NULL_HANDLE_Fail) { ///arrange ///act size_t nResult = STRING_length(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, nResult, 0); } /*Tests_SRS_STRING_02_002: [If parameter handle is NULL then STRING_clone shall return NULL.]*/ TEST_FUNCTION(STRING_clone_NULL_HANDLE_return_NULL) { ///arrange ///act STRING_HANDLE result = STRING_clone(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL( result); } /*Tests_SRS_STRING_02_001: [STRING_clone shall produce a new string having the same content as the handle string.]*/ TEST_FUNCTION(STRING_clone_succeeds) { ///arrange STRING_HANDLE result; STRING_HANDLE hSource = STRING_construct("aa"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(sizeof("aa"))); ///act result = STRING_clone(hSource); ///assert ASSERT_ARE_NOT_EQUAL(void_ptr, NULL, result); ASSERT_ARE_NOT_EQUAL(void_ptr, STRING_c_str(hSource), STRING_c_str(result)); ASSERT_ARE_EQUAL (char_ptr, STRING_c_str(hSource), STRING_c_str(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(hSource); STRING_delete(result); } /*Tests_SRS_STRING_02_002: [If parameter handle is NULL then STRING_clone shall return NULL.]*/ TEST_FUNCTION(STRING_clone_fail) { //arrange STRING_HANDLE str_handle; size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); str_handle = STRING_construct("aa"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(sizeof("aa"))); umock_c_negative_tests_snapshot(); //act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { STRING_HANDLE str_result; char tmp_msg[64]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); str_result = STRING_clone(str_handle); sprintf(tmp_msg, "STRING_clone failure in test %zu/%zu", index+1, count); //assert ASSERT_IS_NULL(str_result, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); STRING_delete(str_handle); } /*Tests_SRS_STRING_02_008: [If psz is NULL then STRING_construct_n shall return NULL*/ TEST_FUNCTION(STRING_construct_n_with_NULL_argument_fails) { ///arrange ///act STRING_HANDLE result = STRING_construct_n(NULL, 3); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /*Tests_SRS_STRING_02_009: [If n is bigger than the size of the string psz, then STRING_construct_n shall return NULL.] */ TEST_FUNCTION(STRING_construct_n_with_too_big_size_fails) { ///arrange ///act STRING_HANDLE result = STRING_construct_n("a", 2); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /*Tests_SRS_STRING_02_007: [STRING_construct_n shall construct a STRING_HANDLE from first "n" characters of the string pointed to by psz parameter.] */ TEST_FUNCTION(STRING_construct_n_succeeds_with_2_char) { ///arrange STRING_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(3)) .IgnoreArgument(1); ///act result = STRING_construct_n("qq", 2); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, "qq", STRING_c_str(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(result); } /*Tests_SRS_STRING_02_007: [STRING_construct_n shall construct a STRING_HANDLE from first "n" characters of the string pointed to by psz parameter.] */ TEST_FUNCTION(STRING_construct_n_succeeds_with_3_char_out_of_five) { ///arrange STRING_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(4)) .IgnoreArgument(1); ///act result = STRING_construct_n("12345", 3); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, "123", STRING_c_str(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(result); } TEST_FUNCTION(STRING_construct_n_fail) { //arrange size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(3)) .IgnoreArgument(1); umock_c_negative_tests_snapshot(); //act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { STRING_HANDLE result; char tmp_msg[64]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); result = STRING_construct_n("qq", 2); sprintf(tmp_msg, "STRING_construct_n failure in test %zu/%zu", index+1, count); //assert ASSERT_IS_NULL(result, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_STRING_07_036: [If h1 is NULL and h2 is nonNULL then STRING_compare shall return 1.] */ TEST_FUNCTION(STRING_compare_s1_NULL) { ///arrange int result; STRING_HANDLE h2 = STRING_construct("bb"); umock_c_reset_all_calls(); ///act result = STRING_compare(NULL, h2); ///assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(h2); } /* Tests_SRS_STRING_07_037: [If h2 is NULL and h1 is nonNULL then STRING_compare shall return -1.] */ TEST_FUNCTION(STRING_compare_s2_NULL) { ///arrange int result; STRING_HANDLE h1 = STRING_construct("aa"); umock_c_reset_all_calls(); ///act result = STRING_compare(h1, NULL); ///assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(h1); } /* Tests_SRS_STRING_07_035: [If h1 and h2 are both NULL then STRING_compare shall return 0.] */ TEST_FUNCTION(STRING_compare_s1_s2_NULL) { ///arrange ///act int result = STRING_compare(NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup } /* Tests_SRS_STRING_07_034: [STRING_compare returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string s2.] */ TEST_FUNCTION(STRING_compare_s1_first_SUCCEED) { ///arrange int result; STRING_HANDLE h1 = STRING_construct("aa"); STRING_HANDLE h2 = STRING_construct("bb"); umock_c_reset_all_calls(); ///act result = STRING_compare(h1, h2); ///assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(h1); STRING_delete(h2); } /* Tests_SRS_STRING_07_034: [STRING_compare returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string s2.] */ TEST_FUNCTION(STRING_compare_s2_first_SUCCEED) { ///arrange int result; STRING_HANDLE h1 = STRING_construct("aa"); STRING_HANDLE h2 = STRING_construct("bb"); umock_c_reset_all_calls(); ///act result = STRING_compare(h2, h1); ///assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(h1); STRING_delete(h2); } /* Tests_SRS_STRING_07_034: [STRING_compare returns an integer greater than, equal to, or less than zero, accordingly as the string pointed to by s1 is greater than, equal to, or less than the string s2.] */ /* Tests_SRS_STRING_07_038: [STRING_compare shall compare the char s variable using the strcmp function.] */ TEST_FUNCTION(STRING_compare_Equal_SUCCEED) { ///arrange int result; STRING_HANDLE h1 = STRING_construct("a1234"); STRING_HANDLE h2 = STRING_construct("a1234"); umock_c_reset_all_calls(); ///act result = STRING_compare(h1, h2); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(h1); STRING_delete(h2); } /*Tests_SRS_STRING_02_011: [If source is NULL then STRING_new_JSON shall return NULL.] */ TEST_FUNCTION(STRING_new_JSON_with_NULL_input_returns_NULL) { ///arrange ///act STRING_HANDLE result = STRING_new_JSON(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); ///cleanup } /*Tests_SRS_STRING_02_012: [The string shall begin with the quote character.] */ /*Tests_SRS_STRING_02_013: [The string shall copy the characters of source "as they are" (until the '\0' character) with the following exceptions:] */ /*Tests_SRS_STRING_02_014: [If any character has the value outside [1...127] then STRING_new_JSON shall fail and return NULL.] */ /*Tests_SRS_STRING_02_016: [If the character is " (quote) then it shall be repsented as \".] */ /*Tests_SRS_STRING_02_017: [If the character is \ (backslash) then it shall represented as \\.]*/ /*Tests_SRS_STRING_02_018: [If the character is / (slash) then it shall be represented as \/.] */ /*Tests_SRS_STRING_02_019: [If the character code is less than 0x20 then it shall be represented as \\u00xx, where xx is the hex representation of the character code.]*/ /*Tests_SRS_STRING_02_020: [The string shall end with " (quote).] */ TEST_FUNCTION(STRING_new_JSON_succeeds) { size_t i; for (i = 0; i < sizeof(JSONtests) / sizeof(JSONtests[0]); i++) { ///arrange STRING_HANDLE result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen(JSONtests[i].expectedJSON) + 1)); ///act result = STRING_new_JSON(JSONtests[i].source); ///assert ASSERT_ARE_EQUAL(char_ptr, JSONtests[i].expectedJSON, STRING_c_str(result)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(result); } } /*Tests_SRS_STRING_02_021: [If the complete JSON representation cannot be produced, then STRING_new_JSON shall fail and return NULL.] */ TEST_FUNCTION(STRING_new_JSON_fails) { //arrange size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(gballoc_malloc(strlen("ab") + 2+1)); umock_c_negative_tests_snapshot(); //act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { char tmp_msg[64]; STRING_HANDLE result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); result = STRING_new_JSON("ab"); sprintf(tmp_msg, "STRING_new_JSON failure in test %zu/%zu", index+1, count); //assert ASSERT_IS_NULL(result, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); } /*Tests_SRS_STRING_02_014: [If any character has the value outside [1...127] then STRING_new_JSON shall fail and return NULL.] */ TEST_FUNCTION(STRING_new_JSON_when_character_not_ASCII_fails) { ///arrange ///act STRING_HANDLE result = STRING_new_JSON("a\xFF"); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_STRING_02_022: [ If source is NULL and size > 0 then STRING_from_BUFFER shall fail and return NULL. ]*/ TEST_FUNCTION(STRING_from_byte_array_with_NULL_array_and_size_not_zero_fails) { ///arrange ///act STRING_HANDLE result = STRING_from_byte_array(NULL, 1); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_STRING_02_023: [ Otherwise, STRING_from_BUFFER shall build a string that has the same content (byte-by-byte) as source and return a non-NULL handle. ]*/ TEST_FUNCTION(STRING_from_byte_array_succeeds) { ///arrange STRING_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(gballoc_malloc(1 + 1)); ///act result = STRING_from_byte_array((const unsigned char*)"a", 1); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(char_ptr, "a", STRING_c_str(result)); ///cleanup STRING_delete(result); } /*Tests_SRS_STRING_02_023: [ Otherwise, STRING_from_BUFFER shall build a string that has the same content (byte-by-byte) as source and return a non-NULL handle. ]*/ TEST_FUNCTION(STRING_from_byte_array_succeeds_2) { ///arrange STRING_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(gballoc_malloc(1 + 0)); ///act result = STRING_from_byte_array(NULL, 0); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(char_ptr, "", STRING_c_str(result)); ///cleanup STRING_delete(result); } /*Tests_SRS_STRING_02_024: [ If building the string fails, then STRING_from_BUFFER shall fail and return NULL. ]*/ TEST_FUNCTION(STRING_from_byte_array_fails_1) { ///arrange STRING_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); STRICT_EXPECTED_CALL(gballoc_malloc(1 + 1)) .SetReturn(NULL); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument_ptr(); ///act result = STRING_from_byte_array((const unsigned char*)"a", 1); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /*Tests_SRS_STRING_02_024: [ If building the string fails, then STRING_from_BUFFER shall fail and return NULL. ]*/ TEST_FUNCTION(STRING_from_byte_array_fails_2) { ///arrange STRING_HANDLE result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size() .SetReturn(NULL); ///act result = STRING_from_byte_array((const unsigned char*)"a", 1); ///assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /* Tests_SRS_STRING_07_042: [if the parameters s1 or format are NULL then STRING_sprintf shall return non zero value.] */ TEST_FUNCTION(STRING_sprintf_string_handle_null_fail) { ///arrange ///act int str_result = STRING_sprintf(NULL, FORMAT_STRING, TEST_STRING_VALUE); ///assert ASSERT_ARE_NOT_EQUAL(int, str_result, 0); ///cleanup } /* Tests_SRS_STRING_07_042: [if the parameters s1 or format are NULL then STRING_sprintf shall return non zero value.] */ TEST_FUNCTION(STRING_sprintf_format_NULL_fail) { ///arrange int str_result; STRING_HANDLE str_handle = STRING_new(); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); ///act str_result = STRING_sprintf(str_handle, NULL, TEST_STRING_VALUE); ///assert ASSERT_ARE_NOT_EQUAL(int, str_result, 0); ///cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_044: [On success STRING_sprintf shall return 0.] */ TEST_FUNCTION(STRING_sprintf_format_succeed) { ///arrange int str_result; STRING_HANDLE str_handle = STRING_construct(INITIAL_STRING_VALUE); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); ///act str_result = STRING_sprintf(str_handle, FORMAT_STRING, TEST_STRING_VALUE); ///assert ASSERT_ARE_EQUAL(int, str_result, 0); ASSERT_ARE_EQUAL(char_ptr, INIT_FORMAT_STRING_RESULT, STRING_c_str(str_handle)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_044: [On success STRING_sprintf shall return 0.] */ TEST_FUNCTION(STRING_sprintf_format_Empty_String_succeed) { ///arrange int str_result; STRING_HANDLE str_handle = STRING_construct(INITIAL_STRING_VALUE); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); ///act str_result = STRING_sprintf(str_handle, EMPTY_STRING); ///assert ASSERT_ARE_EQUAL(int, str_result, 0); ASSERT_ARE_EQUAL(char_ptr, STRING_c_str(str_handle), INITIAL_STRING_VALUE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_043: [If any error is encountered STRING_sprintf shall return a non zero value.] */ TEST_FUNCTION(STRING_sprintf_format_fail) { ///arrange size_t count; size_t index; int negativeTestsInitResult = umock_c_negative_tests_init(); STRING_HANDLE str_handle; ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); str_handle = STRING_construct(INITIAL_STRING_VALUE); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); umock_c_negative_tests_snapshot(); //act count = umock_c_negative_tests_call_count(); for (index = 0; index < count; index++) { char tmp_msg[64]; int str_result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); str_result = STRING_sprintf(str_handle, FORMAT_STRING, TEST_STRING_VALUE); sprintf(tmp_msg, "STRING_sprintf failure in test %zu/%zu", index+1, count); ///assert ASSERT_ARE_NOT_EQUAL(int, str_result, 0); } ///cleanup umock_c_negative_tests_deinit(); STRING_delete(str_handle); } /* Tests_SRS_STRING_07_046: [ If handle is NULL STRING_replace shall return a non-zero value. ] */ TEST_FUNCTION(STRING_replace_handle_NULL_fail) { //arrange int str_result; //act str_result = STRING_replace(NULL, '_', '*'); //assert ASSERT_ARE_NOT_EQUAL(int, 0, str_result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } /* Tests_SRS_STRING_07_047: [ STRING_replace shall replace all instances of target with replace. ] */ /* Tests_SRS_STRING_07_049: [ On success STRING_replace shall return zero. ] */ TEST_FUNCTION(STRING_replace_empty_string_success) { //arrange int str_result; STRING_HANDLE str_handle = STRING_construct(EMPTY_STRING); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); //act str_result = STRING_replace(str_handle, '_', '*'); //assert ASSERT_ARE_EQUAL(int, 0, str_result); ASSERT_ARE_EQUAL(char_ptr, EMPTY_STRING, STRING_c_str(str_handle)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_047: [ STRING_replace shall replace all instances of target with replace. ] */ /* Tests_SRS_STRING_07_049: [ On success STRING_replace shall return zero. ] */ TEST_FUNCTION(STRING_replace_value_not_found_success) { //arrange int str_result; STRING_HANDLE str_handle = STRING_construct(TEST_STRING_VALUE); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); //act str_result = STRING_replace(str_handle, '_', '*'); //assert ASSERT_ARE_EQUAL(int, 0, str_result); ASSERT_ARE_EQUAL(char_ptr, TEST_STRING_VALUE, STRING_c_str(str_handle)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_047: [ STRING_replace shall replace all instances of target with replace. ] */ /* Tests_SRS_STRING_07_049: [ On success STRING_replace shall return zero. ] */ TEST_FUNCTION(STRING_replace_succeed) { //arrange int str_result; STRING_HANDLE str_handle = STRING_construct(INITIAL_STRING_VALUE); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); //act str_result = STRING_replace(str_handle, '_', '*'); //assert ASSERT_ARE_EQUAL(int, 0, str_result); ASSERT_ARE_EQUAL(char_ptr, MODIFIED_STRING_VALUE, STRING_c_str(str_handle)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_048: [ If target and replace are equal STRING_replace, shall do nothing shall return zero. ] */ TEST_FUNCTION(STRING_replace_same_string_succeed) { //arrange int str_result; STRING_HANDLE str_handle = STRING_construct(INITIAL_STRING_VALUE); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); //act str_result = STRING_replace(str_handle, '_', '_'); //assert ASSERT_ARE_EQUAL(int, 0, str_result); ASSERT_ARE_EQUAL(char_ptr, INITIAL_STRING_VALUE, STRING_c_str(str_handle)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup STRING_delete(str_handle); } /* Tests_SRS_STRING_07_047: [ STRING_replace shall replace all instances of target with replace. ] */ /* Tests_SRS_STRING_07_049: [ On success STRING_replace shall return zero. ] */ TEST_FUNCTION(STRING_replace_find_first_succeed) { //arrange int str_result; STRING_HANDLE str_handle = STRING_construct(INITIAL_STRING_VALUE); ASSERT_IS_NOT_NULL(str_handle); umock_c_reset_all_calls(); //act str_result = STRING_replace(str_handle, 'I', '*'); //assert ASSERT_ARE_EQUAL(int, 0, str_result); ASSERT_ARE_EQUAL(char_ptr, MODIFIED_STRING_VALUE2, STRING_c_str(str_handle)); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup STRING_delete(str_handle); } END_TEST_SUITE(strings_unittests)azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/template_ut/000077500000000000000000000000001362133436400330215ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000013161362133436400355030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/template_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName template_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ## # Include all target files that you need to execute the test. # ../../adapters/.c # ../../src/.c ## target/target.c ) set(${theseTestsName}_h_files ## # Include all headers that you need to execute the test. Normally we don't need any. ## ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005671362133436400340420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/template_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; /** * Identify the test suite to run here. */ RUN_TEST_SUITE(template_ut, failedTestCount); return failedTestCount; } template_ut.c000066400000000000000000000414641362133436400354420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/template_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif /** * The gballoc.h will replace the malloc, free, and realloc by the my_gballoc functions, in this case, * if you define these mock functions after include the gballoc.h, you will create an infinity recursion, * so, places the my_gballoc functions before the #include "azure_c_shared_utility/gballoc.h" */ void* my_gballoc_malloc(size_t size) { return malloc(size); } void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void my_gballoc_free(void* ptr) { free(ptr); } /** * Include the C standards here. */ #ifdef __cplusplus #include #include #else #include #include #endif /** * Include the test tools. */ #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" /** * Include the mockable headers here. * These are the headers that contains the functions that you will replace to execute the test. * * For instance, if you will test a target_create() function in the target.c that calls a callee_open() function * in the callee.c, you must define callee_open() as a mockable function in the callee.h. * * Observe that we will replace the functions in callee.h here, so we don't care about its real implementation, * in fact, on this example, we even have the callee.c. * * Include all header files that you will replace the mockable functions in the ENABLE_MOCKS session below. * */ #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "target/callee.h" #undef ENABLE_MOCKS /** * Include the target header after the ENABLE_MOCKS session. */ #include "target/target.h" /** * If your test need constants, this is a good place to define it. For examples: * * #define TEST_CREATE_CONNECTION_HOST_NAME (const char*)"https://test.azure-devices.net" * * static const char* SendBuffer = "Message to send"; * */ #define SIZEOF_FOO_MEMORY 10 /** * You can create some global variables that your test will need in some way. */ static void* g_GenericPointer; /** * Umock error will helps you to identify errors in the test suite or in the way that you are * using it, just keep it as is. */ DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } /** * Create the mock function that will replace your callee functions. * For this example, we will replace the functions open and close of the callee. So we * need to create the mock functions my_callee_open(), and my_callee_close(). */ bool my_callee_open_must_succeed; //This bool will manually determine the happy and unhappy paths. CALLEE_HANDLE my_callee_open(size_t a) { void* result; if(my_callee_open_must_succeed) { // Do something like when callee_open succeed... result = malloc(a); } else { // Do something like when callee_open failed... result = NULL; } return result; } void my_callee_close(CALLEE_HANDLE handle) { free(handle); } /** * This is necessary for the test suite, just keep as is. */ static TEST_MUTEX_HANDLE g_testByTest; /** * Tests begin here. Give a name for your test, for instance template_ut, use the same * name to close the test suite on END_TEST_SUITE(template_ut), and to identify the * test suit in the main() function * * RUN_TEST_SUITE(template_ut, failedTestCount); * */ BEGIN_TEST_SUITE(template_ut) /** * This is the place where we initialize the test system. Replace the test name to associate the test * suite with your test cases. * It is called once, before start the tests. */ TEST_SUITE_INITIALIZE(a) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); /** * It is necessary to identify the types defined on your target. With it, the test system will * know how to use it. * * On the target.h example, there is the type TARGET_HANDLE that is a void* */ REGISTER_UMOCK_ALIAS_TYPE(CALLEE_HANDLE, void*); /** * It is necessary to replace all mockable functions by the mock functions that you created here. * It will tell the test suite to call my_callee_open besides to call the real callee_open. */ REGISTER_GLOBAL_MOCK_HOOK(callee_open, my_callee_open); REGISTER_GLOBAL_MOCK_HOOK(callee_close, my_callee_close); /** * If you don't care about what there is inside of the function in anyway, and you just need * to control the function return you can use the REGISTER_GLOBAL_MOCK_RETURN and * REGISTER_GLOBAL_MOCK_FAIL_RETURN. * * In the follow example, callee_bar_1 will always return CALLEE_RESULT_OK, so, we don't need to * create the unhappy return; and callee_bar_2 can return CALLEE_RESULT_OK or CALLEE_RESULT_FAIL. */ REGISTER_GLOBAL_MOCK_RETURN(callee_bar_1, CALLEE_RESULT_OK); REGISTER_GLOBAL_MOCK_RETURN(callee_bar_2, CALLEE_RESULT_OK); REGISTER_GLOBAL_MOCK_FAIL_RETURN(callee_bar_2, CALLEE_RESULT_FAIL); /** * Or you can combine, for example, in the success case malloc will call my_gballoc_malloc, and for * the failed cases, it will return NULL. */ REGISTER_GLOBAL_MOCK_FAIL_RETURN(callee_open, NULL); // Fail return for the callee_open. REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_realloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); /** * You can initialize other global variables here, for instance image that you have a standard void* that will be converted * any pointer that your test needs. */ g_GenericPointer = malloc(1); ASSERT_IS_NOT_NULL(g_GenericPointer); } /** * The test suite will call this function to cleanup your machine. * It is called only once, after all tests is done. */ TEST_SUITE_CLEANUP(TestClassCleanup) { free(g_GenericPointer); umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } /** * The test suite will call this function to prepare the machine for the new test. * It is called before execute each test. */ TEST_FUNCTION_INITIALIZE(initialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); my_callee_open_must_succeed = true; //As default, callee_open will return a valid pointer. } /** * The test suite will call this function to cleanup your machine for the next test. * It is called after execute each test. */ TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_TEMPLATE_21_001: [ The target_create shall call callee_open to do stuff and allocate the memory. ]*/ TEST_FUNCTION(target_create_call_callee_open__succeed) { ///arrange TARGET_RESULT result; /** * The STRICT_EXPECTED_CALL creates a list of functions that we expect that the target calls. * The function umock_c_get_expected_calls() returns this list as a serialized string. * You can determine all parameters, with the expected value, or define that the argument must * be ignored by the test suite. * During the execution, the suit will collect the same information, creating a second list of * called functions. * The function umock_c_get_actual_calls() return this list as a serialized string. */ STRICT_EXPECTED_CALL(callee_open(SIZEOF_FOO_MEMORY)); STRICT_EXPECTED_CALL(gballoc_malloc(SIZEOF_FOO_MEMORY)); //This is the malloc in the mock my_callee_open(). STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); //This is the malloc in the target_create(). STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //This is the free in the target_create(). ///act result = target_create(SIZEOF_FOO_MEMORY); ///assert ASSERT_ARE_EQUAL(int, TARGET_RESULT_OK, result); /** * The follow assert will compare the expected calls with the actual calls. If it is different, * it will show the serialized strings with the differences in the log. */ ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup target_destroy(); } /* Tests_SRS_TEMPLATE_21_001: [ The target_create shall call callee_open to do stuffs and allocate the memory. ]*/ /* Tests_SRS_TEMPLATE_21_002: [ If callee_open return error, the target_create shall return TARGET_RESULT_FAIL. ]*/ TEST_FUNCTION(target_create_call_callee_open_got_error_manual__failed) { ///arrange TARGET_RESULT result; /** * Here we are demonstrating how to manually interfere in the mock function execution. * The target_create() function will call the mock callee_open that will fail because * we set my_callee_open_must_succeed to false. * For this manual unhappy test, you DON'T need to specify the fail return in * REGISTER_GLOBAL_MOCK_FAIL_RETURN(callee_open, NULL) */ my_callee_open_must_succeed = false; /** * In the path where callee_open failed, no memory will be allocated or free. So, the list * of expected calls only have one function, the callee_open(). */ STRICT_EXPECTED_CALL(callee_open(SIZEOF_FOO_MEMORY)); ///act result = target_create(SIZEOF_FOO_MEMORY); ///assert ASSERT_ARE_EQUAL(int, TARGET_RESULT_FAIL, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /* Tests_SRS_TEMPLATE_21_001: [ The target_create shall call callee_open to do stuffs and allocate the memory. ]*/ /* Tests_SRS_TEMPLATE_21_002: [ If callee_open return error, the target_create shall return TARGET_RESULT_FAIL. ]*/ /* Tests_SRS_TEMPLATE_21_003: [ If there is no memory to control the target_create information, it shall return TARGET_RESULT_OUT_OF_MEMORY. ]*/ TEST_FUNCTION(target_create_call_callee_open_automatic_unhappy_paths) { ///arrange TARGET_RESULT result; size_t i; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); /** * Here we are demonstrating how to automatically test the multiples unhappy paths. * The umock_c_negative_tests_ functions will return all possible unhappy cases, * this list is created based on the STRICT_EXPECTED_CALL below. * * For each follow STRICT_EXPECTED_CALL, the code inside of the for loop will call the * target function, and the function in the list will return the values specified * on REGISTER_GLOBAL_MOCK_FAIL_RETURN. * * In this example, there are tree STRICT_EXPECTED_CALL (unhappy path). So, * umock_c_negative_tests_call_count() will returns 3. * In the first interaction of the loop, callee_open() will return NULL. * In the second, the malloc in the mock my_callee_open() will return NULL. * In the third, the malloc in the target_create() will return NULL. * * Observe that the second test do not make sense, because it is testing the mock * function, not the target. In the next example we will reexecute this test * avoiding the second test. */ STRICT_EXPECTED_CALL(callee_open(SIZEOF_FOO_MEMORY)); STRICT_EXPECTED_CALL(gballoc_malloc(SIZEOF_FOO_MEMORY)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); (void)sprintf(temp_str, "On failed call %zu", i); ///act result = target_create(SIZEOF_FOO_MEMORY); ///assert ASSERT_ARE_NOT_EQUAL(int, TARGET_RESULT_OK, result, temp_str); } ///cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_TEMPLATE_21_001: [ The target_create shall call callee_open to do stuff and allocate the memory. ]*/ /* Tests_SRS_TEMPLATE_21_002: [ If callee_open return error, the target_create shall return TARGET_RESULT_FAIL. ]*/ /* Tests_SRS_TEMPLATE_21_003: [ If there is no memory to control the target_create information, it shall return TARGET_RESULT_OUT_OF_MEMORY. ]*/ TEST_FUNCTION(target_create_call_callee_open_automatic_unhappy_paths_avoid_nonsence_test) { ///arrange TARGET_RESULT result; int negativeTestsInitResult = umock_c_negative_tests_init(); bool runTest[] = { true, false, true }; size_t i; ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); /** * As in the previus example, umock_c_negative_tests_call_count() will returns 3. * 1. callee_open() will return NULL. * 2. the malloc in the mock my_callee_open() will return NULL. * 3. the malloc in the target_create() will return NULL. * * But here we will create a simple logit that will avoid the second test, you can * create a better logic to do the same. */ STRICT_EXPECTED_CALL(callee_open(SIZEOF_FOO_MEMORY)); STRICT_EXPECTED_CALL(gballoc_malloc(SIZEOF_FOO_MEMORY)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { if (runTest[i]) { char temp_str[128]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); (void)sprintf(temp_str, "On failed call %zu", i); ///act result = target_create(SIZEOF_FOO_MEMORY); ///assert ASSERT_ARE_NOT_EQUAL(int, TARGET_RESULT_OK, result, temp_str); } } ///cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_TEMPLATE_21_004: [ The target_foo shall do stuff calling callee_bar_1 and callee_bar_2. ]*/ /* Tests_SRS_TEMPLATE_21_005: [ If target_foo is called but the connection is not created, the target_foo shall return TARGET_RESULT_FAIL. ]*/ /* Tests_SRS_TEMPLATE_21_010: [ If target_foo cannot execute foo, the target_foo shall return TARGET_RESULT_FAIL. ]*/ TEST_FUNCTION(target_foo_unhappy_paths) { ///arrange TARGET_RESULT result; size_t i; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); result = target_create(SIZEOF_FOO_MEMORY); ASSERT_ARE_EQUAL(int, TARGET_RESULT_OK, result); /** * Clear the function call list, to remove the ones created by the target_create(), so, * now we can concentrate on the functions in target_foo(). */ umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(callee_bar_2('a')); umock_c_negative_tests_snapshot(); /** * Here we are demonstrating how to automatically test an unhappy path from a function that * we do not implement any mock to replace it. */ for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); (void)sprintf(temp_str, "On failed call %zu", i); ///act result = target_foo(); ///assert ASSERT_ARE_EQUAL(int, TARGET_RESULT_FAIL, result, temp_str); } ///cleanup target_destroy(); umock_c_negative_tests_deinit(); } END_TEST_SUITE(template_ut) tickcounter_freertos_ut/000077500000000000000000000000001362133436400353725ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000010421362133436400401270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_freertos_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tickcounter_freertos_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../pal/freertos/tickcounter.c ) set(${theseTestsName}_h_files ) include_directories(.) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) freertos/000077500000000000000000000000001362133436400372235ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_freertos_utFreeRTOS.h000066400000000000000000000007561362133436400407750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_freertos_ut/freertos// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef FREERTOS_H #define FREERTOS_H #ifdef __cplusplus extern "C" { #include #else #include #endif /* __cplusplus */ #define CONFIG_FREERTOS_HZ 100 #include "azure_c_shared_utility/umock_c_prod.h" MOCKABLE_FUNCTION(, uint32_t, xTaskGetTickCount); #ifdef __cplusplus } #endif /* __cplusplus */ #endif // FREERTOS_Htask.h000066400000000000000000000004651362133436400403430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_freertos_ut/freertos// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef FREERTOS_TASK_H #define FREERTOS_TASK_H // This file must exist to keep tickcounter_freertos.c compatible with FreeRTOS #endif // FREERTOS_TASK_H main.c000066400000000000000000000005151362133436400364630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_freertos_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(tickcounter_freertos_unittests, failedTestCount); return failedTestCount; } tickcounter_freertos_ut.c000066400000000000000000000203461362133436400425160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_freertos_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/threadapi.h" #include "umocktypes_stdint.h" static TEST_MUTEX_HANDLE g_testByTest; #define FAKE_TICK_NO_OVERFLOW 333 #define FAKE_TICK_INTERVAL 120 #define FAKE_TICK_SCALED_INTERVAL FAKE_TICK_INTERVAL * 1000 / CONFIG_FREERTOS_HZ #define FAKE_TICK_OVERFLOW_OFFSET 40 #define FAKE_TICK_BEFORE_OVERFLOW (UINT32_MAX - FAKE_TICK_OVERFLOW_OFFSET) #define FAKE_TICK_AFTER_OVERFLOW (FAKE_TICK_INTERVAL - FAKE_TICK_OVERFLOW_OFFSET - 1) static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* ptr) { free(ptr); } #include "azure_c_shared_utility/tickcounter.h" #define ENABLE_MOCKS #include "freertos/FreeRTOS.h" #include "azure_c_shared_utility/gballoc.h" DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static int tickcounter_ms_t_Compare(tickcounter_ms_t left, tickcounter_ms_t right) { return left != right; } static void tickcounter_ms_t_ToString(char* string, size_t bufferSize, tickcounter_ms_t val) { (void)snprintf(string, bufferSize, "%llu", (unsigned long long)val); } static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(tickcounter_freertos_unittests) TEST_SUITE_INITIALIZE(suite_init) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(TICK_COUNTER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(uint32_t, unsigned int); REGISTER_UMOCK_ALIAS_TYPE(tickcounter_ms_t, unsigned long long); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_TICKCOUNTER_FREERTOS_30_004: [ If allocation of the internally-defined TICK_COUNTER_INSTANCE structure fails, tickcounter_create shall return NULL. (Initialization failure is not possible for FreeRTOS.) ] */ TEST_FUNCTION(tickcounter_freertos_create_fails) { ///arrange TICK_COUNTER_HANDLE tickHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1) .SetReturn((void*)NULL); ///act tickHandle = tickcounter_create(); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(tickHandle); } #define FAKE_TICK_NO_OVERFLOW 333 /* Tests_SRS_TICKCOUNTER_FREERTOS_30_003: [ tickcounter_create shall allocate and initialize an internally-defined TICK_COUNTER_INSTANCE structure and return its pointer on success. ] */ TEST_FUNCTION(tickcounter_freertos_create_succeed) { ///arrange TICK_COUNTER_HANDLE tickHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xTaskGetTickCount()) .SetReturn(FAKE_TICK_NO_OVERFLOW); ///act tickHandle = tickcounter_create(); ///assert ASSERT_IS_NOT_NULL(tickHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); /// cleanup tickcounter_destroy(tickHandle); } /* Tests_SRS_TICKCOUNTER_FREERTOS_30_006: [ If the tick_counter parameter is NULL, tickcounter_destroy shall do nothing. ] */ TEST_FUNCTION(tickcounter_freertos_destroy_tick_counter_NULL_succeed) { ///arrange ///act tickcounter_destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TICKCOUNTER_FREERTOS_30_005: [ tickcounter_destroy shall delete the internally-defined TICK_COUNTER_INSTANCE structure specified by the tick_counter parameter. (This call has no failure case.) ] */ TEST_FUNCTION(tickcounter_freertos_destroy_succeed) { ///arrange TICK_COUNTER_HANDLE tickHandle = tickcounter_create(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act tickcounter_destroy(tickHandle); ///assert ASSERT_IS_NOT_NULL(tickHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TICKCOUNTER_FREERTOS_30_007: [ If the tick_counter parameter is NULL, tickcounter_get_current_ms shall return a non-zero value to indicate error. ] */ TEST_FUNCTION(tickcounter_freertos_get_current_ms_tick_counter_NULL_fail) { ///arrange tickcounter_ms_t current_ms = 0; ///act int result = tickcounter_get_current_ms(NULL, ¤t_ms); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TICKCOUNTER_FREERTOS_30_008: [ If the current_ms parameter is NULL, tickcounter_get_current_ms shall return a non-zero value to indicate error. ] */ TEST_FUNCTION(tickcounter_freertos_get_current_ms_current_ms_NULL_fail) { ///arrange int result; TICK_COUNTER_HANDLE tickHandle = tickcounter_create(); umock_c_reset_all_calls(); ///act result = tickcounter_get_current_ms(tickHandle, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); /// cleanup tickcounter_destroy(tickHandle); } /* Tests_SRS_TICKCOUNTER_FREERTOS_30_009: [ tickcounter_get_current_ms shall set *current_ms to the number of milliseconds elapsed since the tickcounter_create call for the specified tick_counter and return 0 to indicate success (In FreeRTOS this call has no failure case.) ] */ TEST_FUNCTION(tickcounter_freertos_get_current_ms_succeed) { ///arrange tickcounter_ms_t current_ms = 0; int result; TICK_COUNTER_HANDLE tickHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xTaskGetTickCount()) .SetReturn(FAKE_TICK_NO_OVERFLOW); STRICT_EXPECTED_CALL(xTaskGetTickCount()) .SetReturn((FAKE_TICK_NO_OVERFLOW + FAKE_TICK_INTERVAL)); ///act tickHandle = tickcounter_create(); result = tickcounter_get_current_ms(tickHandle, ¤t_ms); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(tickcounter_ms_t, FAKE_TICK_SCALED_INTERVAL, current_ms); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); /// clean tickcounter_destroy(tickHandle); } /* Tests_SRS_TICKCOUNTER_FREERTOS_30_010: [ If the FreeRTOS call xTaskGetTickCount experiences a single overflow between the calls to tickcounter_create and tickcounter_get_current_ms, the tickcounter_get_current_ms call shall still return the correct interval. ] */ TEST_FUNCTION(tickcounter_freertos_get_current_ms_succeed_despite_overflow) { ///arrange TICK_COUNTER_HANDLE tickHandle; tickcounter_ms_t current_ms = 0; int result; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); STRICT_EXPECTED_CALL(xTaskGetTickCount()) .SetReturn(FAKE_TICK_BEFORE_OVERFLOW); STRICT_EXPECTED_CALL(xTaskGetTickCount()) .SetReturn((FAKE_TICK_AFTER_OVERFLOW)); tickHandle = tickcounter_create(); ///act result = tickcounter_get_current_ms(tickHandle, ¤t_ms); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(tickcounter_ms_t, FAKE_TICK_SCALED_INTERVAL, current_ms); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); /// clean tickcounter_destroy(tickHandle); } END_TEST_SUITE(tickcounter_freertos_unittests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_ut/000077500000000000000000000000001362133436400335405ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000012011362133436400362130ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tickcounter_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ${TICKCOUTER_C_FILE} ) if(UNIX) # linux & apple set(${theseTestsName}_c_files ${${theseTestsName}_c_files} ../../adapters/linux_time.c ) endif() set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005041362133436400345500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(tickcounter_unittests, failedTestCount); return failedTestCount; } tickcounter_ut.c000066400000000000000000000124351362133436400366740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tickcounter_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/threadapi.h" static TEST_MUTEX_HANDLE g_testByTest; void* my_gballoc_malloc(size_t size) { return malloc(size); } void my_gballoc_free(void* ptr) { free(ptr); } #include "azure_c_shared_utility/tickcounter.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #define BUSY_LOOP_TIME 1000000 DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(tickcounter_unittests) TEST_SUITE_INITIALIZE(suite_init) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(TICK_COUNTER_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } TEST_FUNCTION(tickcounter_create_fails) { ///arrange TICK_COUNTER_HANDLE tickHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1) .SetReturn((void*)NULL); ///act tickHandle = tickcounter_create(); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(tickHandle); } TEST_FUNCTION(tickcounter_create_succeed) { ///arrange TICK_COUNTER_HANDLE tickHandle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument(1); ///act tickHandle = tickcounter_create(); ///assert ASSERT_IS_NOT_NULL(tickHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); tickcounter_destroy(tickHandle); } TEST_FUNCTION(tickcounter_destroy_tick_counter_NULL_succeed) { ///arrange ///act tickcounter_destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(tickcounter_destroy_succeed) { ///arrange TICK_COUNTER_HANDLE tickHandle = tickcounter_create(); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument(1); ///act tickcounter_destroy(tickHandle); ///assert ASSERT_IS_NOT_NULL(tickHandle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(tickcounter_get_current_ms_tick_counter_NULL_fail) { ///arrange tickcounter_ms_t current_ms = 0; ///act int result = tickcounter_get_current_ms(NULL, ¤t_ms); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } TEST_FUNCTION(tickcounter_get_current_ms_current_ms_NULL_fail) { ///arrange int result; TICK_COUNTER_HANDLE tickHandle = tickcounter_create(); umock_c_reset_all_calls(); ///act result = tickcounter_get_current_ms(tickHandle, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); tickcounter_destroy(tickHandle); } TEST_FUNCTION(tickcounter_get_current_ms_succeed) { ///arrange int result; tickcounter_ms_t current_ms; TICK_COUNTER_HANDLE tickHandle = tickcounter_create(); umock_c_reset_all_calls(); current_ms = 0; ///act result = tickcounter_get_current_ms(tickHandle, ¤t_ms); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); /// clean tickcounter_destroy(tickHandle); } //TEST_FUNCTION(tickcounter_get_current_ms_validate_tick_succeed) //{ // ///arrange // CTickCounterMocks mocks; // TICK_COUNTER_HANDLE tickHandle = tickcounter_create(); // umock_c_reset_all_calls(); // // uint64_t first_ms = 0; // // ThreadAPI_Sleep(1250); // // ///act // int result = tickcounter_get_current_ms(tickHandle, &first_ms); // // // busy loop here // ThreadAPI_Sleep(1250); // // uint64_t next_ms = 0; // // int resultAlso = tickcounter_get_current_ms(tickHandle, &next_ms); // // ///assert // ASSERT_ARE_EQUAL(int, 0, result); // ASSERT_ARE_EQUAL(int, 0, resultAlso); // ASSERT_IS_TRUE(first_ms > 0); // ASSERT_IS_TRUE(next_ms > first_ms); // ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // // /// clean // tickcounter_destroy(tickHandle); //} END_TEST_SUITE(tickcounter_unittests) tlsio_cyclonessl_socket_bsd_ut/000077500000000000000000000000001362133436400367175ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000014221362133436400414560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_cyclonessl_socket_bsd_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tlsio_cyclonessl_socket_bsd_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/tlsio_cyclonessl_socket_bsd.c ) set(${theseTestsName}_h_files ) #CycloneSSL has a pretty big list of warnings which need to be ignored set_source_files_properties(../../src/tlsio_cyclonessl_socket_bsd.c PROPERTIES COMPILE_FLAGS "/wd4200 /wd4201 /wd4244 /wd4100 /wd4267 /wd4701 /wd4703 /wd4389 /wd4005 /wd4996") build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005241362133436400400100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_cyclonessl_socket_bsd_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(tlsio_cyclonessl_socket_bsd_unittests, failedTestCount); return failedTestCount; } tlsio_cyclonessl_socket_bsd_ut.c000066400000000000000000000211661362133436400453710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_cyclonessl_socket_bsd_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #ifdef _MSC_VER /* CycloneSSL has a pretty big list of warnings which need to be ignored */ #pragma warning(disable: 4200 4201 4244 4100 4267 4701 4703 4389 4005 4996) #endif #include "tls.h" #undef htonl #undef htons #undef ntohl #undef ntohs #if _WIN32 #undef DECLSPEC_IMPORT #pragma warning(disable: 4273 4189) #include #include #include #endif #ifdef __cplusplus #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" static TEST_MUTEX_HANDLE g_testByTest; static TEST_MUTEX_HANDLE g_dllByDll; void* my_gballoc_malloc(size_t size) { return malloc(size); } void my_gballoc_free(void* ptr) { free(ptr); } #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/tlsio_cyclonessl_socket.h" #define ENABLE_MOCKS SOCKET TEST_SOCKET = (SOCKET)0x4243; static const struct sockaddr test_sock_addr = { 0 }; static ADDRINFO TEST_ADDR_INFO = { AI_PASSIVE, AF_INET, SOCK_STREAM, IPPROTO_TCP, 128, NULL, (struct sockaddr*)&test_sock_addr, NULL }; static bool g_addrinfo_call_fail; MOCK_FUNCTION_WITH_CODE(WSAAPI, SOCKET, socket, int, af, int, type, int, protocol) MOCK_FUNCTION_END(TEST_SOCKET) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, closesocket, SOCKET, s) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, connect, SOCKET, s, const struct sockaddr*, name, int, namelen) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, WSAGetLastError) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WSAAPI, int, getaddrinfo, PCSTR, pNodeName, PCSTR, pServiceName, const ADDRINFOA*, pHints, PADDRINFOA*, ppResult) int callFail; if (!g_addrinfo_call_fail) { *ppResult = &TEST_ADDR_INFO; callFail = 0; } else { *ppResult = NULL; callFail = __FAILURE__; } MOCK_FUNCTION_END(callFail) #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(tlsio_cyclonessl_socket_bsd_unittests) TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); result = umock_c_init(on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(TlsSocket, void*); REGISTER_UMOCK_ALIAS_TYPE(PCSTR, const char*); REGISTER_UMOCK_ALIAS_TYPE(SOCKET, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } g_addrinfo_call_fail = false; umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* tlsio_cyclonessl_socket_create */ /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_001: [ tlsio_cyclonessl_socket_create shall create a new socket to be used by CycloneSSL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_008: [ On success tlsio_cyclonessl_socket_create shall return 0 and fill in the socket handle in the new_socket out argument. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_003: [ tlsio_cyclonessl_socket_create shall call socket to create a TCP socket. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_004: [ tlsio_cyclonessl_socket_create shall call getaddrinfo to obtain a hint ADDRINFO. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_006: [ tlsio_cyclonessl_socket_create shall call connect and pass the constructed address in order to connect the socket. ]*/ TEST_FUNCTION(tlsio_cyclonessl_socket_create_succeeds) { ///arrange TlsSocket socket; STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)); EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, &TEST_ADDR_INFO, IGNORED_PTR_ARG)); EXPECTED_CALL(connect(TEST_SOCKET, &test_sock_addr, IGNORED_NUM_ARG)) .ValidateArgument_s(); ///act int result = tlsio_cyclonessl_socket_create("testhostname", 4242, &socket); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_socket_destroy(socket); } /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_002: [ If hostname or new_socket is NULL, then tlsio_cyclonessl_socket_create shall fail and it shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_socket_create_with_NULL_hostname_fails) { ///arrange TlsSocket socket; ///act int result = tlsio_cyclonessl_socket_create(NULL, 4242, &socket); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_002: [ If hostname or new_socket is NULL, then tlsio_cyclonessl_socket_create shall fail and it shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_socket_create_with_NULL_socket_fails) { ///arrange ///act int result = tlsio_cyclonessl_socket_create("testhostname", 4242, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_007: [ If any of the socket calls fails, then tlsio_cyclonessl_socket_create shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_a_failure_occurs_for_tlsio_cyclonessl_socket_create_then_create_fails) { ///arrange int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); TlsSocket socket; STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) .SetFailReturn((SOCKET)-1); EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, &TEST_ADDR_INFO, IGNORED_PTR_ARG)) .SetFailReturn(-1); EXPECTED_CALL(connect(TEST_SOCKET, &test_sock_addr, IGNORED_NUM_ARG)) .ValidateArgument_s() .SetFailReturn(-1); umock_c_negative_tests_snapshot(); for (size_t i = 0; i < umock_c_negative_tests_call_count(); i++) { umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); char temp_str[128]; (void)sprintf(temp_str, "On failed call %zu", i); ///act int result = tlsio_cyclonessl_socket_create("testhostname", 4242, &socket); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result, temp_str); } ///cleanup umock_c_negative_tests_deinit(); } /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_009: [ tlsio_cyclonessl_socket_destroy shall close the socket passed as argument by calling the function close. ]*/ TEST_FUNCTION(tlsio_cyclonessl_socket_destroy_closes_the_socket) { ///arrange TlsSocket socket; STRICT_EXPECTED_CALL(socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)); EXPECTED_CALL(getaddrinfo(IGNORED_PTR_ARG, IGNORED_PTR_ARG, &TEST_ADDR_INFO, IGNORED_PTR_ARG)); EXPECTED_CALL(connect(TEST_SOCKET, &test_sock_addr, IGNORED_NUM_ARG)) .ValidateArgument_s(); int result = tlsio_cyclonessl_socket_create("testhostname", 4242, &socket); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(closesocket(TEST_SOCKET)); ///act tlsio_cyclonessl_socket_destroy(socket); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TLSIO_CYCLONESSL_SOCKET_BSD_01_010: [ If socket is INVALID_SOCKET (-1), tlsio_cyclonessl_socket_destroy shall do nothing. ]*/ TEST_FUNCTION(tlsio_cyclonessl_socket_destroy_with_invalid_socket_does_nothing) { ///arrange ///act tlsio_cyclonessl_socket_destroy((TlsSocket)-1); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } END_TEST_SUITE(tlsio_cyclonessl_socket_bsd_unittests) tlsio_cyclonessl_ut/000077500000000000000000000000001362133436400345175ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000015231362133436400372600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_cyclonessl_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tlsio_cyclonessl_ut) include_directories(${SHARED_UTIL_REAL_TEST_FOLDER}) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/tlsio_cyclonessl.c ../real_test_files/real_crt_abstractions.c ) #CycloneSSL has a pretty big list of warnings which need to be ignored set_source_files_properties(../../src/tlsio_cyclonessl.c PROPERTIES COMPILE_FLAGS "/wd4200 /wd4201 /wd4244 /wd4100 /wd4267 /wd4701 /wd4703 /wd4389 /wd4005 /wd4996") set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005111362133436400356040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_cyclonessl_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(tlsio_cyclonessl_unittests, failedTestCount); return failedTestCount; } tlsio_cyclonessl_ut.c000066400000000000000000002205661362133436400407760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_cyclonessl_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #ifdef _MSC_VER /* CycloneSSL has a pretty big list of warnings which need to be ignored */ #pragma warning(disable: 4200 4201 4244 4100 4267 4701 4703 4389 4005 4996) #endif #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_stdint.h" #include "umock_c_negative_tests.h" /* tls and yarrow need extern "C" in case of C++ compilation */ #ifdef __cplusplus extern "C" { #endif #include "tls.h" #include "yarrow.h" #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE g_testByTest; static TEST_MUTEX_HANDLE g_dllByDll; #ifdef __cplusplus extern "C" { #endif void* my_gballoc_malloc(size_t size) { return malloc(size); } void my_gballoc_free(void* ptr) { free(ptr); } int real_mallocAndStrcpy_s(char** destination, const char* source); #ifdef __cplusplus } #endif #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/tlsio_cyclonessl_socket.h" #include "azure_c_shared_utility/xio.h" #define TlsConnectionEnd_VALUES \ TLS_CONNECTION_END_CLIENT, \ TLS_CONNECTION_END_SERVER TEST_DEFINE_ENUM_TYPE(TlsConnectionEnd, TlsConnectionEnd_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(TlsConnectionEnd, TlsConnectionEnd_VALUES); TEST_DEFINE_ENUM_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); TEST_DEFINE_ENUM_TYPE(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); #define TEST_TLS_CONTEXT (TlsContext*)0x4242 #define TEST_TLS_SOCKET (TlsSocket)0x4243 #define TEST_OPTION_HANDLER (OPTIONHANDLER_HANDLE)0x4244 #ifdef _MSC_VER #pragma warning(disable:4189) #endif MOCK_FUNCTION_WITH_CODE(, TlsContext*, tlsInit) TlsContext* my_result = TEST_TLS_CONTEXT; MOCK_FUNCTION_END(my_result); MOCK_FUNCTION_WITH_CODE(, void, tlsFree, TlsContext*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, error_t, tlsSetSocket, TlsContext*, context, TlsSocket, socket) MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, tlsSetConnectionEnd, TlsContext*, context, TlsConnectionEnd, entity) MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, tlsSetPrng, TlsContext*, context, const PrngAlgo*, prngAlgo, void*, prngContext); MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, tlsSetTrustedCaList, TlsContext*, context, const char_t*, trustedCaList, size_t, length); MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, tlsConnect, TlsContext*, context); MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, tlsWrite, TlsContext*, context, const void*, data, size_t, length, uint_t, flags); MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, tlsRead, TlsContext*, context, void*, data, size_t, size, size_t*, received, uint_t, flags); MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, tlsShutdown, TlsContext*, context); MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, error_t, yarrowInit, YarrowContext*, context) MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, void, yarrowRelease, YarrowContext*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, error_t, yarrowSeed, YarrowContext*, context, const uint8_t*, input, size_t, length); MOCK_FUNCTION_END(NO_ERROR); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_open_complete, void*, context, IO_OPEN_RESULT, open_result) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_bytes_received, void*, context, const unsigned char*, buffer, size_t, size) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_error, void*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_close_complete, void*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_send_complete, void*, context, IO_SEND_RESULT, send_result) MOCK_FUNCTION_END(); const PrngAlgo yarrowPrngAlgo = { 0 }; #undef ENABLE_MOCKS #include "azure_c_shared_utility/tlsio_cyclonessl.h" #include "azure_c_shared_utility/tlsio.h" #ifdef __cplusplus extern "C" { #endif pfCloneOption tlsio_cyclonessl_clone_option; pfDestroyOption tlsio_cyclonessl_destroy_option; OPTIONHANDLER_HANDLE my_OptionHandler_Create(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { (void)setOption; tlsio_cyclonessl_clone_option = cloneOption; tlsio_cyclonessl_destroy_option = destroyOption; return TEST_OPTION_HANDLER; } #ifdef __cplusplus } #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(tlsio_cyclonessl_unittests) TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); result = umock_c_init(on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_stdint_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, real_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_Create, my_OptionHandler_Create); REGISTER_GLOBAL_MOCK_RETURN(tlsInit, TEST_TLS_CONTEXT); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_Create, TEST_OPTION_HANDLER); REGISTER_TYPE(TlsConnectionEnd, TlsConnectionEnd); REGISTER_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT); REGISTER_TYPE(IO_SEND_RESULT, IO_SEND_RESULT); REGISTER_UMOCK_ALIAS_TYPE(error_t, int); REGISTER_UMOCK_ALIAS_TYPE(uint_t, unsigned int); REGISTER_UMOCK_ALIAS_TYPE(TlsSocket, void*); REGISTER_UMOCK_ALIAS_TYPE(pfCloneOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfDestroyOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfSetOption, void*); REGISTER_UMOCK_ALIAS_TYPE(OPTIONHANDLER_HANDLE, void*); REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(tlsInit, tlsFree); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* tlsio_cyclonessl_create */ /* Tests_SRS_TLSIO_CYCLONESSL_01_001: [ tlsio_cyclonessl_create shall create a new instance of the tlsio for Cyclone SSL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_005: [ tlsio_cyclonessl_create shall copy the hostname and port values for later use when the openof the underlying socket is needed. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_006: [ hostname shall be copied by calling mallocAndStrcpy_s. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_008: [ tlsio_cyclonessl_create shall initialize the yarrow context by calling yarrowInit. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_010: [ The yarrow context shall be seeded with 32 bytes of randomly chosen data by calling yarrowSeed. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_012: [ tlsio_cyclonessl_create shall create a TLS context by calling tlsInit. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_014: [ The TLS context shall be setup to operate as a client by calling tlsSetConnectionEnd with TLS_CONNECTION_END_CLIENT. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_016: [ The pseudo random number generator to be used shall be set by calling tlsSetPrng with the yarrow instance as argument. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_003: [ io_create_parameters shall be used as a TLSIO_CONFIG\*. ]*/ TEST_FUNCTION(tlsio_cyclonessl_create_succeeds) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test")) .IgnoreArgument_destination(); EXPECTED_CALL(yarrowInit(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(yarrowSeed(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 32)) .IgnoreArgument_context().IgnoreArgument_input(); STRICT_EXPECTED_CALL(tlsInit()); STRICT_EXPECTED_CALL(tlsSetConnectionEnd(TEST_TLS_CONTEXT, TLS_CONNECTION_END_CLIENT)); STRICT_EXPECTED_CALL(tlsSetPrng(TEST_TLS_CONTEXT, YARROW_PRNG_ALGO, IGNORED_PTR_ARG)) .IgnoreArgument_prngContext(); ///act CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(tlsio_handle); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_002: [ If io_create_parameters is NULL, tlsio_cyclonessl_create shall fail and return NULL. ]*/ TEST_FUNCTION(tlsio_cyclonessl_with_NULL_argument_fails) { ///arrange ///act CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_003: [ io_create_parameters shall be used as a TLSIO_CONFIG\*. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_004: [ If the hostname member is NULL, then tlsio_cyclonessl_create shall fail and return NULL. ]*/ TEST_FUNCTION(tlsio_cyclonessl_create_with_NULL_hostname_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = NULL; tlsio_config.port = 4242; ///act CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_076: [ If allocating memory for the TLS IO instance fails then tlsio_cyclonessl_create shall fail and return NULL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_007: [ If mallocAndStrcpy_s fails then tlsio_cyclonessl_create shall fail and return NULL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_009: [ If yarrowInit fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_011: [ If yarrowSeed fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_013: [ If tlsInit fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_015: [ If tlsSetConnectionEnd fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_017: [ If tlsSetPrng fails then tlsio_cyclonessl_create shall return NULL. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_018: [ When tlsio_cyclonessl_create fails, all allocated resources up to that point shall be freed. ]*/ TEST_FUNCTION(when_a_failure_occurs_for_tlsio_cyclonessl_create_then_create_fails) { ///arrange int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetFailReturn(NULL); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test")) .IgnoreArgument_destination().SetFailReturn(1); EXPECTED_CALL(yarrowInit(IGNORED_PTR_ARG)).SetFailReturn(ERROR_INVALID_PARAMETER); STRICT_EXPECTED_CALL(yarrowSeed(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 32)) .IgnoreArgument_context().IgnoreArgument_input().SetFailReturn(ERROR_INVALID_PARAMETER); STRICT_EXPECTED_CALL(tlsInit()).SetFailReturn(NULL); STRICT_EXPECTED_CALL(tlsSetConnectionEnd(TEST_TLS_CONTEXT, TLS_CONNECTION_END_CLIENT)).SetFailReturn(ERROR_INVALID_PARAMETER); STRICT_EXPECTED_CALL(tlsSetPrng(TEST_TLS_CONTEXT, YARROW_PRNG_ALGO, IGNORED_PTR_ARG)) .IgnoreArgument_prngContext().SetFailReturn(ERROR_INVALID_PARAMETER); umock_c_negative_tests_snapshot(); for (size_t i = 0; i < umock_c_negative_tests_call_count(); i++) { TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); char temp_str[128]; (void)sprintf(temp_str, "On failed call %zu", i); ///act CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); ///assert ASSERT_IS_NULL(tlsio_handle, temp_str); } ///cleanup umock_c_negative_tests_deinit(); } /* tlsio_cyclonessl_destroy */ /* Tests_SRS_TLSIO_CYCLONESSL_01_019: [ tlsio_cyclonessl_destroy shall free the tlsio CycloneSSL instance. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_021: [ tlsio_cyclonessl_destroy shall deinitialize the yarrow context by calling yarrowRelease. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_022: [ The TLS context shall be freed by calling tlsFree. ]*/ TEST_FUNCTION(tlsio_cyclonessl_destroy_frees_the_resources_allocated_by_create) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); EXPECTED_CALL(tlsFree(TEST_TLS_CONTEXT)); EXPECTED_CALL(yarrowRelease(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TLSIO_CYCLONESSL_01_020: [ If tls_io is NULL, tlsio_cyclonessl_destroy shall do nothing. ]*/ TEST_FUNCTION(tlsio_cyclonessl_destroy_with_NULL_does_not_free_any_resources) { ///arrange ///act tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TLSIO_CYCLONESSL_01_077: [ All options cached via tlsio_cyclonessl_set_option shall also be freed. ]*/ TEST_FUNCTION(when_TrustedCerts_was_set_tlsio_cyclonessl_destroy_shall_free_it) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "x"); umock_c_reset_all_calls(); EXPECTED_CALL(tlsFree(TEST_TLS_CONTEXT)); EXPECTED_CALL(yarrowRelease(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TLSIO_CYCLONESSL_01_081: [ tlsio_cyclonessl_destroy should close the IO if it was open before freeing all the resources. ]*/ TEST_FUNCTION(when_IO_is_open_tlsio_cyclonessl_destroy_also_closes_it) { ///arrange TlsSocket tls_socket = TEST_TLS_SOCKET; TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsio_cyclonessl_socket_create("test", 4242, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_new_socket(&tls_socket, sizeof(tls_socket)); STRICT_EXPECTED_CALL(tlsSetSocket(TEST_TLS_CONTEXT, TEST_TLS_SOCKET)); STRICT_EXPECTED_CALL(tlsConnect(TEST_TLS_CONTEXT)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsShutdown(TEST_TLS_CONTEXT)); STRICT_EXPECTED_CALL(tlsio_cyclonessl_socket_destroy(TEST_TLS_SOCKET)); EXPECTED_CALL(tlsFree(TEST_TLS_CONTEXT)); EXPECTED_CALL(yarrowRelease(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* tlsio_cyclonessl_open */ /* Tests_SRS_TLSIO_CYCLONESSL_01_023: [ tlsio_cyclonessl_open shall open the TLS io and on success it shall return 0. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_025: [ tlsio_cyclonessl_open shall create a socket by calling tlsio_cyclonessl_socket_create, while passing to it the hostname and port that were saved in the tlsio_cyclonessl_create. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_027: [ The socket created by tlsio_cyclonessl_socket_create shall be assigned to the TLS context by calling tlsSetSocket. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_031: [ tlsio_cyclonessl_open shall start the TLS handshake by calling tlsConnect. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_033: [ If tlsConnect succeeds, the callback on_io_open_complete shall be called, while passing on_io_open_complete_context and IO_OPEN_OK as arguments. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_succeeds) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; TlsSocket tls_socket = TEST_TLS_SOCKET; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsio_cyclonessl_socket_create("test", 4242, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_new_socket(&tls_socket, sizeof(tls_socket)); STRICT_EXPECTED_CALL(tlsSetSocket(TEST_TLS_CONTEXT, TEST_TLS_SOCKET)); STRICT_EXPECTED_CALL(tlsConnect(TEST_TLS_CONTEXT)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_078: [ If certificates have been set by using tlsio_cyclonessl_set_option then a call to tlsSetTrustedCaList shall be made to pass the certificates to CycloneSSL. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_passes_certs_to_CycloneSSL) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; TlsSocket tls_socket = TEST_TLS_SOCKET; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "my_certs"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsio_cyclonessl_socket_create("test", 4242, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_new_socket(&tls_socket, sizeof(tls_socket)); STRICT_EXPECTED_CALL(tlsSetSocket(TEST_TLS_CONTEXT, TEST_TLS_SOCKET)); STRICT_EXPECTED_CALL(tlsSetTrustedCaList(TEST_TLS_CONTEXT, "my_certs", 8)) .ValidateArgumentBuffer(2, "my_certs", 8) .SetFailReturn(ERROR_INVALID_PARAMETER); STRICT_EXPECTED_CALL(tlsConnect(TEST_TLS_CONTEXT)); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_024: [ If any of the arguments tls_io, on_io_open_complete, on_bytes_received or on_io_error are NULL then tlsio_cyclonessl_open shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_with_NULL_handle_fails) { ///arrange ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(NULL, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_TLSIO_CYCLONESSL_01_024: [ If any of the arguments tls_io, on_io_open_complete, on_bytes_received or on_io_error are NULL then tlsio_cyclonessl_open shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_with_NULL_open_complete_callback_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; TlsSocket tls_socket = TEST_TLS_SOCKET; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, NULL, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_024: [ If any of the arguments tls_io, on_io_open_complete, on_bytes_received or on_io_error are NULL then tlsio_cyclonessl_open shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_with_NULL_bytes_received_callback_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; TlsSocket tls_socket = TEST_TLS_SOCKET; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, NULL, (void*)0x4243, test_on_io_error, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_024: [ If any of the arguments tls_io, on_io_open_complete, on_bytes_received or on_io_error are NULL then tlsio_cyclonessl_open shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_with_NULL_io_error_callback_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; TlsSocket tls_socket = TEST_TLS_SOCKET; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, NULL, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_026: [ If tlsio_cyclonessl_socket_create fails, then tlsio_cyclonessl_open shall return a non-zero value. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_028: [ If tlsSetSocket fails then tlsio_cyclonessl_open shall return a non-zero value. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_032: [ If tlsConnect fails then tlsio_cyclonessl_open shall return a non-zero value. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_079: [ If tlsSetTrustedCaList fails then tlsio_cyclonessl_open shall return a non-zero value. ]*/ TEST_FUNCTION(when_a_failure_occurs_for_tlsio_cyclonessl_open_then_create_fails) { ///arrange TLSIO_CONFIG tlsio_config; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); tlsio_config.hostname = "test"; tlsio_config.port = 4242; TlsSocket tls_socket = TEST_TLS_SOCKET; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "certs"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsio_cyclonessl_socket_create("test", 4242, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_new_socket(&tls_socket, sizeof(tls_socket)) .SetFailReturn(1); STRICT_EXPECTED_CALL(tlsSetSocket(TEST_TLS_CONTEXT, TEST_TLS_SOCKET)) .SetFailReturn(ERROR_INVALID_PARAMETER); STRICT_EXPECTED_CALL(tlsSetTrustedCaList(TEST_TLS_CONTEXT, "certs", 5)) .ValidateArgumentBuffer(2, "certs", 5) .SetFailReturn(ERROR_INVALID_PARAMETER); STRICT_EXPECTED_CALL(tlsConnect(TEST_TLS_CONTEXT)) .SetFailReturn(ERROR_INVALID_PARAMETER); umock_c_negative_tests_snapshot(); for (size_t i = 0; i < umock_c_negative_tests_call_count(); i++) { umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); char temp_str[128]; (void)sprintf(temp_str, "On failed call %zu", i); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, NULL, (void*)0x4244); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result, temp_str); } ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); umock_c_negative_tests_deinit(); } /* Tests_SRS_TLSIO_CYCLONESSL_01_034: [ If tlsio_cyclonessl_open is called while the IO is open, tlsio_cyclonessl_open shall fail and return a non-zero value without performing any work to open the IO. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_after_open_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_034: [ If tlsio_cyclonessl_open is called while the IO is open, tlsio_cyclonessl_open shall fail and return a non-zero value without performing any work to open the IO. ]*/ TEST_FUNCTION(tlsio_cyclonessl_open_after_io_is_in_error_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsRead(TEST_TLS_CONTEXT, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG, 0)) .IgnoreArgument_data().IgnoreArgument_size().IgnoreArgument_received() .SetReturn(ERROR_INVALID_PARAMETER); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(tlsio_handle); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* tlsio_cyclonessl_close */ /* Tests_SRS_TLSIO_CYCLONESSL_01_035: [ tlsio_cyclonessl_close shall close the TLS IO and on success it shall return 0. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_037: [ tlsio_cyclonessl_close shall close the TLS connection by calling tlsShutdown. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_039: [ tlsio_cyclonessl_destroy shall destroy the underlying socket by calling tlsio_cyclonessl_socket_destroy. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_040: [ On success, on_io_close_complete shall be called while passing as argument on_io_close_complete_context. ]*/ TEST_FUNCTION(tlsio_cyclonessl_close_succeeds) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; TlsSocket tls_socket = TEST_TLS_SOCKET; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsio_cyclonessl_socket_create("test", 4242, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_new_socket(&tls_socket, sizeof(tls_socket)); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsShutdown(TEST_TLS_CONTEXT)); STRICT_EXPECTED_CALL(tlsio_cyclonessl_socket_destroy(TEST_TLS_SOCKET)); STRICT_EXPECTED_CALL(test_on_io_close_complete((void*)0x4242)); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_close(tlsio_handle, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_036: [ If the argument tls_io is NULL, tlsio_cyclonessl_close shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_close_with_NULL_tls_io_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_close(NULL, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_038: [ If tlsShutdown fails, tlsio_cyclonessl_close shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_tlsShutdown_fails_tlsio_cyclonessl_close_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsShutdown(TEST_TLS_CONTEXT)) .SetReturn(ERROR_INVALID_PARAMETER); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_close(tlsio_handle, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_041: [ If tlsio_cyclonessl_close is called when not open, tlsio_cyclonessl_close shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_close_when_IO_not_open_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_close(tlsio_handle, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_041: [ If tlsio_cyclonessl_close is called when not open, tlsio_cyclonessl_close shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_close_after_close_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_close(tlsio_handle, test_on_io_close_complete, (void*)0x4242); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_close(tlsio_handle, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* tlsio_cyclonessl_send */ /* Tests_SRS_TLSIO_CYCLONESSL_01_042: [ tlsio_cyclonessl_send shall send the `size` bytes pointed to by `buffer` and on success it shall return 0. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_046: [ On success, if a non-NULL value was passed for on_send_complete, then on_send_complete shall be called while passing to it the on_send_complete_context value. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_047: [ tlsio_cyclonessl_send shall send the bytes by calling tlsWrite and passing buffer and size as arguments. 0 shall be passed for the flags argument. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_succeeds) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsWrite(TEST_TLS_CONTEXT, IGNORED_PTR_ARG, sizeof(test_buffer), 0)) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4242, IO_SEND_OK)); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(tlsio_handle, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_045: [ on_send_complete shall be allowed to be NULL. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_with_NULL_complete_callback_does_not_trigger_the_callback) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsWrite(TEST_TLS_CONTEXT, IGNORED_PTR_ARG, sizeof(test_buffer), 0)) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(tlsio_handle, test_buffer, sizeof(test_buffer), NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_043: [ If any of the arguments tls_io or buffer is NULL, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_with_NULL_tls_io_fails) { ///arrange unsigned char test_buffer[] = { 0x42, 0x43 }; ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(NULL, test_buffer, sizeof(test_buffer), NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_TLSIO_CYCLONESSL_01_043: [ If any of the arguments tls_io or buffer is NULL, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_with_NULL_buffer_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(tlsio_handle, NULL, 1, NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_044: [ If size is 0, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_with_0_size_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(tlsio_handle, test_buffer, 0, NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_048: [ If tlsio_cyclonessl_send is called when the IO is not open, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_when_IO_is_closed_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_close(tlsio_handle, NULL, NULL); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(tlsio_handle, test_buffer, 0, NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_048: [ If tlsio_cyclonessl_send is called when the IO is not open, tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_when_IO_is_not_open_yet_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(tlsio_handle, test_buffer, 0, NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_049: [ If the IO is in an error state (an error was reported through the on_io_error callback), tlsio_cyclonessl_send shall fail and return a non-zero value. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_056: [ Also the IO shall be considered in error and any subsequent calls to tlsio_cyclonessl_send shall fail. ]*/ TEST_FUNCTION(tlsio_cyclonessl_send_when_IO_is_in_error_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsRead(TEST_TLS_CONTEXT, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_NUM_ARG, 0)) .IgnoreArgument_data().IgnoreArgument_size().IgnoreArgument_received() .SetReturn(ERROR_INVALID_PARAMETER); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(tlsio_handle); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_send(tlsio_handle, test_buffer, 0, NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* tlsio_cyclonessl_dowork */ /* Tests_SRS_TLSIO_CYCLONESSL_01_050: [ tlsio_cyclonessl_dowork shall check if any bytes are available to be read from the CycloneSSL library and indicate those bytes as received. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_054: [ The flags argument for tlsRead shall be 0. ]*/ TEST_FUNCTION(tlsio_cyclonessl_dowork_when_no_bytes_are_available_does_not_trigger_received_callback) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; size_t received = 0; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsRead(TEST_TLS_CONTEXT, IGNORED_PTR_ARG, 64, IGNORED_PTR_ARG, 0)) .IgnoreArgument_data() .CopyOutArgumentBuffer_received(&received, sizeof(received)); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_080: [ If any bytes are read from CycloneSSL they should be indicated via the on_bytes_received callback passed to tlsio_cyclonessl_open. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_053: [ If the IO is open, tlsio_cyclonessl_dowork shall attempt to read 64 bytes from the TLS library by calling tlsRead. ]*/ TEST_FUNCTION(tlsio_cyclonessl_dowork_when_2_bytes_are_available_they_are_indicated_as_received) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; size_t received = sizeof(test_buffer); CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsRead(TEST_TLS_CONTEXT, IGNORED_PTR_ARG, 64, IGNORED_PTR_ARG, 0)) .CopyOutArgumentBuffer_data(test_buffer, sizeof(test_buffer)) .CopyOutArgumentBuffer_received(&received, sizeof(received)); STRICT_EXPECTED_CALL(test_on_bytes_received((void*)0x4243, IGNORED_PTR_ARG, sizeof(test_buffer))) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_051: [ If the tls_io argument is NULL, tlsio_cyclonessl_dowork shall do nothing. ]*/ TEST_FUNCTION(tlsio_cyclonessl_dowork_with_NULL_handle_does_nothing) { ///arrange ///act tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_TLSIO_CYCLONESSL_01_052: [ If the IO is not open (no open has been called or the IO has been closed) then tlsio_cyclonessl_dowork shall do nothing. ]*/ TEST_FUNCTION(tlsio_cyclonessl_dowork_when_the_IO_is_not_open_does_nothing) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_052: [ If the IO is not open (no open has been called or the IO has been closed) then tlsio_cyclonessl_dowork shall do nothing. ]*/ TEST_FUNCTION(tlsio_cyclonessl_dowork_when_the_IO_is_closed_does_nothing) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_close(tlsio_handle, NULL, NULL); umock_c_reset_all_calls(); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_055: [ If tlsRead fails, the error shall be indicated by calling the on_io_error callback passed in tlsio_cyclonessl_open, while passing the on_io_error_context to the callback. ]*/ TEST_FUNCTION(when_tlsRead_fails_then_tlsio_cyclonessl_dowork_indicates_an_error) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; size_t received = sizeof(test_buffer); CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_open(tlsio_handle, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(tlsRead(TEST_TLS_CONTEXT, IGNORED_PTR_ARG, 64, IGNORED_PTR_ARG, 0)) .IgnoreArgument_data() .IgnoreArgument_received() .SetReturn(ERROR_INVALID_PARAMETER); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); ///act tlsio_cyclonessl_get_interface_description()->concrete_io_dowork(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* tlsio_cyclonessl_setoption */ /* Tests_SRS_TLSIO_CYCLONESSL_01_057: [ If any of the arguments tls_io or option_name is NULL tlsio_cyclonessl_setoption shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_setoption_with_NULL_argument_fails) { ///arrange ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(NULL, "TrustedCerts", "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_TLSIO_CYCLONESSL_01_057: [ If any of the arguments tls_io or option_name is NULL tlsio_cyclonessl_setoption shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_setoption_with_NULL_option_name_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; size_t received = sizeof(test_buffer); CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, NULL, "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_058: [ If the option_name argument indicates an option that is not handled by tlsio_cyclonessl, then tlsio_cyclonessl_setoption shall return a non-zero value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_setoption_with_an_unknown_option_name_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; unsigned char test_buffer[] = { 0x42, 0x43 }; size_t received = sizeof(test_buffer); CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "nothingIknow", "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_059: [ If the option was handled by tlsio_cyclonessl, then tlsio_cyclonessl_setoption shall return 0. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_060: [ - "TrustedCerts" - a char\* that shall be saved by tlsio_cyclonessl as it shall be given to the underlying CycloneSSL TLS context when the IO is open. ]*/ TEST_FUNCTION(tlsio_cyclonessl_setoption_with_trustedCerts_clones_the_certs) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "xx")) .IgnoreArgument_destination(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_061: [ If copying the char\* passed in value fails then tlsio_cyclonessl_setoption shall return a non-zero value. ]*/ TEST_FUNCTION(when_copying_the_tustedCerts_fails_tlsio_cyclonessl_setoption_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "xx")) .IgnoreArgument_destination() .SetReturn(1); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_062: [ If a previous TrustedCerts option was saved, then the previous value shall be freed. ]*/ TEST_FUNCTION(when_copying_the_tustedCerts_the_previous_option_value_is_freed_and_new_cert_copy_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "xx"); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "yy")) .IgnoreArgument_destination() .SetReturn(1); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "yy"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_062: [ If a previous TrustedCerts option was saved, then the previous value shall be freed. ]*/ TEST_FUNCTION(when_copying_the_tustedCerts_the_previous_option_value_is_freed) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "xx"); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "yy")) .IgnoreArgument_destination(); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "yy"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_063: [ A NULL value shall be allowed for TrustedCerts, in which case the previously stored TrustedCerts option value shall be cleared. ]*/ TEST_FUNCTION(tlsio_cyclonessl_setoption_with_NULL_TrustedCerts_frees_the_previous_certs_value) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "xx"); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act int result = tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* tlsio_cyclonessl_retrieve_options */ /* Tests_SRS_TLSIO_CYCLONESSL_01_064: [ If parameter handle is `NULL` then `tlsio_cyclonessl_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(tlsio_cyclonessl_retrieveoptions_with_NULL_handle_fails) { ///arrange ///act OPTIONHANDLER_HANDLE result = tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_TLSIO_CYCLONESSL_01_065: [ `tlsio_cyclonessl_retrieve_options` shall produce an OPTIONHANDLER_HANDLE. ]*/ TEST_FUNCTION(tlsio_cyclonessl_retrieveoptions_when_no_option_was_set_gives_back_an_emptyoption_handles) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); ///act OPTIONHANDLER_HANDLE result = tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_066: [ `tlsio_cyclonessl_retrieve_options` shall add to it the options: ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_067: [ - TrustedCerts ]*/ TEST_FUNCTION(tlsio_cyclonessl_retrieveoptions_when_TrustedCerts_is_set_populates_the_trustedcerts_in_the_option_handler) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "xx"); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); EXPECTED_CALL(OptionHandler_AddOption(TEST_OPTION_HANDLER, "TrustedCerts", IGNORED_PTR_ARG)) .ValidateArgumentBuffer(3, "xx", 2); ///act OPTIONHANDLER_HANDLE result = tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_065: [ `tlsio_cyclonessl_retrieve_options` shall produce an OPTIONHANDLER_HANDLE. ]*/ TEST_FUNCTION(tlsio_cyclonessl_retrieveoptions_when_TrustedCerts_was_set_and_cleared_does_not_add_the_option) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", "xx"); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_setoption(tlsio_handle, "TrustedCerts", NULL); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); ///act OPTIONHANDLER_HANDLE result = tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_068: [ If producing the OPTIONHANDLER_HANDLE fails then tlsio_cyclonessl_retrieve_options shall fail and return NULL. ]*/ TEST_FUNCTION(when_OptionHandler_Create_fails_then_tlsio_cyclonessl_retrieveoptions_returns_NULL) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(NULL); ///act OPTIONHANDLER_HANDLE result = tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* tlsio_cyclonessl_get_interface_description */ /* Tests_SRS_TLSIO_CYCLONESSL_01_069: [ tlsio_cyclonessl_get_interface_description shall return a pointer to an IO_INTERFACE_DESCRIPTION structure that contains pointers to the functions: tlsio_cyclonessl_retrieve_options, tlsio_cyclonessl_create, tlsio_cyclonessl_destroy, tlsio_cyclonessl_open, tlsio_cyclonessl_close, tlsio_cyclonessl_send and tlsio_cyclonessl_dowork. ]*/ TEST_FUNCTION(tlsio_cyclonessl_get_interface_description_yields_a_filled_in_structure) { ///arrange ///act const IO_INTERFACE_DESCRIPTION* io_interface = tlsio_cyclonessl_get_interface_description(); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(io_interface); ASSERT_IS_NOT_NULL(io_interface->concrete_io_close); ASSERT_IS_NOT_NULL(io_interface->concrete_io_create); ASSERT_IS_NOT_NULL(io_interface->concrete_io_destroy); ASSERT_IS_NOT_NULL(io_interface->concrete_io_dowork); ASSERT_IS_NOT_NULL(io_interface->concrete_io_open); ASSERT_IS_NOT_NULL(io_interface->concrete_io_retrieveoptions); ASSERT_IS_NOT_NULL(io_interface->concrete_io_send); ASSERT_IS_NOT_NULL(io_interface->concrete_io_setoption); } /* tlsio_cyclonessl_clone_option */ /* Tests_SRS_TLSIO_CYCLONESSL_01_070: [ If the name or value arguments are NULL, tlsio_cyclonessl_clone_option shall return NULL. ]*/ TEST_FUNCTION(tlsio_cyclonessl_clone_option_with_NULL_option_name_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); umock_c_reset_all_calls(); ///act void* result = tlsio_cyclonessl_clone_option(NULL, "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_070: [ If the name or value arguments are NULL, tlsio_cyclonessl_clone_option shall return NULL. ]*/ TEST_FUNCTION(tlsio_cyclonessl_clone_option_with_NULL_value_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); umock_c_reset_all_calls(); ///act void* result = tlsio_cyclonessl_clone_option("TrustedCerts", NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_071: [ tlsio_cyclonessl_clone_option shall clone the option named `TrustedCerts` by calling mallocAndStrcpy_s. ]*/ /* Tests_SRS_TLSIO_CYCLONESSL_01_072: [ On success it shall return a non-NULL pointer to the cloned option. ]*/ TEST_FUNCTION(tlsio_cyclonessl_clone_option_clones_TrustedCerts) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "xx")) .IgnoreArgument_destination(); ///act void* result = tlsio_cyclonessl_clone_option("TrustedCerts", "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(result); ///cleanup tlsio_cyclonessl_destroy_option("TrustedCerts", result); tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_073: [ If mallocAndStrcpy_s for `TrustedCerts` fails, tlsio_cyclonessl_clone_option shall return NULL. ]*/ TEST_FUNCTION(when_copying_the_TrustedCerts_option_fails_tlsio_cyclonessl_clone_option_fails) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "xx")) .IgnoreArgument_destination() .SetReturn(1); ///act void* result = tlsio_cyclonessl_clone_option("TrustedCerts", "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_074: [ If any of the arguments is NULL, tlsio_cyclonessl_destroy_option shall do nothing. ]*/ TEST_FUNCTION(tlsio_cyclonessl_destroy_option_with_NULL_option_name_does_nothing) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); umock_c_reset_all_calls(); ///act tlsio_cyclonessl_destroy_option(NULL, "xx"); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_074: [ If any of the arguments is NULL, tlsio_cyclonessl_destroy_option shall do nothing. ]*/ TEST_FUNCTION(tlsio_cyclonessl_destroy_option_with_NULL_value_does_nothing) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); umock_c_reset_all_calls(); ///act tlsio_cyclonessl_destroy_option("TrustedCerts", NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } /* Tests_SRS_TLSIO_CYCLONESSL_01_075: [ If the option name is `TrustedCerts`, tlsio_cyclonessl_destroy_option shall free the char\* option indicated by value. ]*/ TEST_FUNCTION(tlsio_cyclonessl_destroy_option_frees_the_TrustedCerts_option) { ///arrange TLSIO_CONFIG tlsio_config; tlsio_config.hostname = "test"; tlsio_config.port = 4242; CONCRETE_IO_HANDLE tlsio_handle = tlsio_cyclonessl_get_interface_description()->concrete_io_create(&tlsio_config); (void)tlsio_cyclonessl_get_interface_description()->concrete_io_retrieveoptions(tlsio_handle); void* result = tlsio_cyclonessl_clone_option("TrustedCerts", "xx"); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); ///act tlsio_cyclonessl_destroy_option("TrustedCerts", result); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup tlsio_cyclonessl_get_interface_description()->concrete_io_destroy(tlsio_handle); } END_TEST_SUITE(tlsio_cyclonessl_unittests) tlsio_esp8266_ut/000077500000000000000000000000001362133436400334565ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000011461362133436400362200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_esp8266_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tlsio_esp8266_ut) include_directories(${SHARED_UTIL_REAL_TEST_FOLDER}) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../adapters/tlsio_ssl_esp8266.c ../real_test_files/real_crt_abstractions.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005741362133436400345540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_esp8266_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; /** * Identify the test suite to run here. */ RUN_TEST_SUITE(tlsio_esp8266_ut, failedTestCount); return failedTestCount; } tlsio_esp8266_ut.c000066400000000000000000002636251362133436400366770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_esp8266_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #ifdef _CRTDBG_MAP_ALLOC #include #endif /** * Include the C standards here. */ #include #include /** * Include the test tools. */ #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" /** * Include the mockable headers here. */ #define ENABLE_MOCKS #include "../../adapters/esp8266_mock.h" #undef ENABLE_MOCKS /** * Include the target header after the ENABLE_MOCKS session. */ #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/tlsio.h" #define TEST_CREATE_CONNECTION_HOST_NAME (const char*)"https://test.azure-devices.net" #define TEST_CREATE_CONNECTION_PORT (int)443 static const TLSIO_CONFIG tlsio_config = { TEST_CREATE_CONNECTION_HOST_NAME, TEST_CREATE_CONNECTION_PORT, NULL, NULL }; static int g_ssl_write_success = 1; static int g_ssl_read_returns_data = 1; static size_t g_on_bytes_received_buffer_size = 0; static int g_gethostbyname_success = 1; static int g_socket_success = 1; static int g_setsockopt_success = 1; static int g_bind_success = 1; static int g_getsockopt_success = 1; static int g_connect_success = 1; static int g_ssl_lwip_select_success = 1; static int g_ssl_ctx_new_success = 1; static int g_ssl_new_success = 1; static int g_ssl_set_fd_success = 1; static int g_ssl_connect_success = 1; static int g_ssl_shutdown_success = 1; static int g_ssl_TLSv1clientmethod_success = 1; static int g_ssl_fd_isset = 0; static int g_ssl_get_error_success = 1; static int g_socket_close_success = 1; static SSL_CTX* g_ctx = NULL; static SSL* g_ssl = NULL; static SSL_METHOD* g_sslmethod = NULL; static void* g_mallocptr = NULL; static char* g_destination = NULL; #define MAX_RETRY 20 #define RECEIVE_BUFFER_SIZE 1024 void* my_gballoc_malloc(size_t size) { g_mallocptr = malloc(size); return g_mallocptr; } void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void my_gballoc_free(void* ptr) { free(ptr); } typedef enum TLSIO_STATE_TAG { TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING, TLSIO_STATE_OPEN, TLSIO_STATE_CLOSING, TLSIO_STATE_ERROR } TLSIO_STATE; typedef struct TLS_IO_INSTANCE_TAG { ON_BYTES_RECEIVED on_bytes_received; ON_IO_OPEN_COMPLETE on_io_open_complete; ON_IO_CLOSE_COMPLETE on_io_close_complete; ON_IO_ERROR on_io_error; void* on_bytes_received_context; void* on_io_open_complete_context; void* on_io_close_complete_context; void* on_io_error_context; SSL* ssl; SSL_CTX* ssl_context; TLSIO_STATE tlsio_state; char* hostname; int port; char* certificate; const char* x509certificate; const char* x509privatekey; int sock; ip_addr_t target_ip; } TLS_IO_INSTANCE; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ const IO_INTERFACE_DESCRIPTION* tlsio_openssl_get_interface_description(void); #ifdef __cplusplus } #endif /* __cplusplus */ int my_mallocAndStrcpy_s(char** destination, const char* source){ (void)(source); *destination = (char*)malloc(1); g_destination = *destination; return 0; } int my_SSL_get_error(const SSL *ssl, int ret_code){ (void)(ret_code), (void)(ssl); if (g_ssl_get_error_success == 1){ return SSL_ERROR_WANT_READ; }else{ return 0; } } int my_FD_ISSET(int n, void* p){ (void)(n),(void)(p); if(g_ssl_fd_isset == 0){ g_ssl_fd_isset++; return 1; }else{ return 0; } } int my_lwip_select(int maxfdp1, fd_set *readset, fd_set *writeset, fd_set *exceptset, struct timeval *timeout){ (void)(maxfdp1),(void)(readset),(void)(writeset),(void)(exceptset),(void)(timeout); if(g_ssl_lwip_select_success == 1) { return 1; }else{ return 0; } } int my_SSL_write(SSL *ssl, const void *buffer, int len){ (void)(ssl),(void)(buffer); if (g_ssl_write_success){ return len; }else{ return 0; } } void my_SSL_CTX_free(SSL_CTX *ctx){ (void)(ctx); } void my_SSL_free(SSL *ssl){ (void)(ssl); } int my_SSL_read(SSL *ssl, void *buffer, int len){ (void)(ssl),(void)(buffer); if (g_ssl_read_returns_data){ return len; }else{ return 0; } } int my_SSL_connect(SSL *ssl){ (void)(ssl); if (g_ssl_connect_success == 1){ return 1; }else{ return -1; } } int my_SSL_shutdown(SSL *ssl){ (void)(ssl); if (g_ssl_shutdown_success == 1){ return 0; }else{ return -1; } } int my_socket(int domain, int type, int protocol){ (void)(domain),(void)(type), (void)(protocol); if (g_socket_success == 1){ return 0; }else{ return -1; } } int my_SSL_set_fd(SSL *ssl, int fd){ (void)(ssl),(void)(fd); if (g_ssl_set_fd_success == 1){ return 1; }else{ return 0; } } //NOTE: malloc(1) is used here since SSL is defined as void in esp8266_mock.h SSL* my_SSL_new(SSL_CTX *ssl_ctx){ (void)(ssl_ctx); if (g_ssl_new_success == 1){ g_ssl = (SSL*)malloc(1); return g_ssl; }else{ return NULL; } } //NOTE: malloc(1) is used here since SSL_CTX is defined as void in esp8266_mock.h SSL_CTX* my_SSL_CTX_new(SSL_METHOD *method){ (void)(method); if(g_ssl_ctx_new_success == 1) { if(method != NULL){ g_ctx = (SSL_CTX*)malloc(1); return g_ctx; } else { return NULL; } }else{ return NULL; } } void my_SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len) { (void)(ctx),(void)(len); } int my_fcntl(int s, int cmd, int val) { (void)(s); (void)(cmd); (void)(val); return 0; } err_t my_netconn_gethostbyname(const char *name, ip_addr_t *target_ip){ (void)(name),(void)(target_ip); if (g_gethostbyname_success == 1){ return 0; }else{ return -1; } } //NOTE: malloc(1) is used here since SSL_METHOD is defined as void in esp8266_mock.h SSL_METHOD* my_TLSv1_client_method(void){ if (g_ssl_TLSv1clientmethod_success == 1){ g_sslmethod = (SSL_METHOD*)malloc(1); return g_sslmethod; }else{ return NULL; } } int my_bind(int s, const struct sockaddr* name, socklen_t namelen){ (void)(s),(void)(name),(void)(namelen); if (g_bind_success == 1){ return 0; }else{ return -1; } } int my_setsockopt(int s, int level, int optname, const void *optval, socklen_t optlen){ (void)(s),(void)(level),(void)(optname),(void)(optval),(void)(optlen); if (g_setsockopt_success == 1){ return 0; }else{ return -1; } } int my_close(int s){ (void)(s); if (g_socket_close_success == 1){ return 0; } else{ return 1; } } int my_connect(int s, const struct sockaddr *name, socklen_t namelen){ (void)(s),(void)(name), (void)(namelen); if (g_connect_success == 1){ return 0; }else{ return -1; } } #undef EINPROGRESS #define EINPROGRESS 115 /* Operation now in progress */ int my_getsockopt(int s, int level, int optname, void *optval, socklen_t *optlen){ (void)(s), (void)(level), (void)(optname), (void)(optval), (void)(optlen); if (g_getsockopt_success == 1){ return EINPROGRESS; }else{ return -1; } } void my_os_delay_us(int us){ (void)(us); } static void on_bytes_received(void* context, const unsigned char* buffer, size_t size) { (void)(context), (void)(buffer), (void)(size); g_on_bytes_received_buffer_size = size; } #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/optionhandler.h" IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_error, void*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_bytes_received, void*, context, const unsigned char*, buffer, size_t, size) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_open_complete, void*, context, IO_OPEN_RESULT, open_result) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_io_close_complete, void*, context) MOCK_FUNCTION_END(); MOCK_FUNCTION_WITH_CODE(, void, test_on_send_complete, void*, context, IO_SEND_RESULT, send_result) MOCK_FUNCTION_END(); #undef ENABLE_MOCKS /** * You can create some global variables that your test will need in some way. */ static void* g_GenericPointer; /** * Umock error will helps you to identify errors in the test suite or in the way that you are * using it, just keep it as is. */ DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } /** * This is necessary for the test suite, just keep as is. */ static TEST_MUTEX_HANDLE g_testByTest; /** * Tests begin here. * * RUN_TEST_SUITE(tlsio_esp8266_ut, failedTestCount); * */ BEGIN_TEST_SUITE(tlsio_esp8266_ut) /** * This is the place where we initialize the test system. Replace the test name to associate the test * suite with your test cases. * It is called once, before start the tests. */ TEST_SUITE_INITIALIZE(a) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); /** * It is necessary to identify the types defined on your target. With it, the test system will * know how to use it. * * On the target.h example, there is the type TARGET_HANDLE that is a void* */ //REGISTER_UMOCK_ALIAS_TYPE(CALLEE_HANDLE, void*); /** * Or you can combine, for example, in the success case malloc will call my_gballoc_malloc, and for * the failed cases, it will return NULL. */ REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_realloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); //REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_Create, my_OptionHandler_Create); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, my_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_HOOK(lwip_select, my_lwip_select); REGISTER_GLOBAL_MOCK_HOOK(SSL_write, my_SSL_write); REGISTER_GLOBAL_MOCK_HOOK(SSL_CTX_free, my_SSL_CTX_free); REGISTER_GLOBAL_MOCK_HOOK(SSL_free, my_SSL_free); REGISTER_GLOBAL_MOCK_HOOK(SSL_read, my_SSL_read); REGISTER_GLOBAL_MOCK_HOOK(SSL_connect, my_SSL_connect); REGISTER_GLOBAL_MOCK_HOOK(SSL_shutdown, my_SSL_shutdown); REGISTER_GLOBAL_MOCK_HOOK(SSL_set_fd, my_SSL_set_fd); REGISTER_GLOBAL_MOCK_HOOK(SSL_new, my_SSL_new); REGISTER_GLOBAL_MOCK_HOOK(SSL_CTX_new, my_SSL_CTX_new); REGISTER_GLOBAL_MOCK_HOOK(netconn_gethostbyname, my_netconn_gethostbyname); REGISTER_GLOBAL_MOCK_HOOK(TLSv1_client_method, my_TLSv1_client_method); REGISTER_GLOBAL_MOCK_HOOK(bind, my_bind); REGISTER_GLOBAL_MOCK_HOOK(getsockopt, my_getsockopt); REGISTER_GLOBAL_MOCK_HOOK(socket, my_socket); REGISTER_GLOBAL_MOCK_HOOK(SSL_CTX_set_default_read_buffer_len, my_SSL_CTX_set_default_read_buffer_len); REGISTER_GLOBAL_MOCK_HOOK(setsockopt, my_setsockopt); REGISTER_GLOBAL_MOCK_HOOK(close, my_close); REGISTER_GLOBAL_MOCK_HOOK(connect, my_connect); REGISTER_GLOBAL_MOCK_HOOK(FD_ISSET, my_FD_ISSET); REGISTER_GLOBAL_MOCK_HOOK(SSL_get_error, my_SSL_get_error); REGISTER_GLOBAL_MOCK_HOOK(fcntl, my_fcntl); REGISTER_TYPE(IO_SEND_RESULT, IO_SEND_RESULT); REGISTER_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT); /** * You can initialize other global variables here, for instance image that you have a standard void* that will be converted * any pointer that your test needs. */ g_GenericPointer = malloc(1); ASSERT_IS_NOT_NULL(g_GenericPointer); } /** * The test suite will call this function to cleanup your machine. * It is called only once, after all tests is done. */ TEST_SUITE_CLEANUP(TestClassCleanup) { free(g_GenericPointer); umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } /** * The test suite will call this function to prepare the machine for the new test. * It is called before execute each test. */ TEST_FUNCTION_INITIALIZE(initialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } g_ssl_fd_isset = 1; umock_c_reset_all_calls(); } /** * The test suite will call this function to cleanup your machine for the next test. * It is called after execute each test. */ TEST_FUNCTION_CLEANUP(cleans) { TEST_MUTEX_RELEASE(g_testByTest); } /* Tests_SRS_TLSIO_SSL_ESP8266_99_063: [ The tlsio_openssl_dowork shall execute the async jobs for the tlsio. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_069: [ If the tlsio state is TLSIO_STATE_OPEN, the tlsio_openssl_dowork shall read data from the ssl client. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_070: [ If there are received data in the ssl client, the tlsio_openssl_dowork shall read this data and call the on_bytes_received with the pointer to the buffer with the data. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_075: [ The tlsio_openssl_dowork shall create a buffer to store the data received from the ssl client. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_076: [ The tlsio_openssl_dowork shall delete the buffer to store the data received from the ssl client. ] */ TEST_FUNCTION(tlsio_openssl_dowork_withdata__succeed) { ///arrange TLS_IO_INSTANCE instance; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; g_ssl_read_returns_data = 1; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.on_bytes_received = on_bytes_received; instance.tlsio_state = TLSIO_STATE_OPEN; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); EXPECTED_CALL(SSL_read(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); ///act tlsioInterfaces->concrete_io_dowork(&instance); ///assert ASSERT_ARE_EQUAL(size_t, g_on_bytes_received_buffer_size, RECEIVE_BUFFER_SIZE); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_071: [** If there are no received data in the ssl client, the tlsio_openssl_dowork shall do nothing. ] */ TEST_FUNCTION(tlsio_openssl_dowork_withoutdata__succeed) { ///arrange TLS_IO_INSTANCE instance; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; g_ssl_read_returns_data = 0; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.on_bytes_received = on_bytes_received; instance.tlsio_state = TLSIO_STATE_OPEN; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); EXPECTED_CALL(SSL_read(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); ///act tlsioInterfaces->concrete_io_dowork(&instance); ///assert ASSERT_ARE_EQUAL(size_t, g_on_bytes_received_buffer_size, 0); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_074: [ If the tlsio handle is NULL, the tlsio_openssl_dowork shall not do anything. ] */ TEST_FUNCTION(tlsio_openssl_dowork__failed) { ///arrange const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act tlsioInterfaces->concrete_io_dowork(NULL); ///assert ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_053: [ The tlsio_openssl_send shall send all bytes in a buffer to the ssl connection. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_054: [ The tlsio_openssl_send shall use the provided on_io_send_complete callback function address. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_055: [ The tlsio_openssl_send shall use the provided on_io_send_complete_context handle. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_056: [ The ssl will continue to send all data in the buffer until all bytes have been sent. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_058: [ If the ssl finish to send all bytes in the buffer, then tlsio_openssl_send shall call the on_send_complete with IO_SEND_OK, and return 0 ] */ TEST_FUNCTION(tlsio_openssl_send__SSL_write__succeed) { ///arrange int result = 0; TLS_IO_INSTANCE instance; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; unsigned char test_buffer[] = { 0x42, 0x43 }; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.tlsio_state = TLSIO_STATE_OPEN; g_ssl_write_success = 1; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); EXPECTED_CALL(SSL_write(IGNORED_PTR_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4242, IO_SEND_OK)); ///act result = tlsioInterfaces->concrete_io_send(&instance, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, result, 0); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_060: [ If the tls_io handle is NULL, the tlsio_openssl_send shall not do anything, and return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_send_null_handle__failed) { ///arrange int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act result = tlsioInterfaces->concrete_io_send(NULL, NULL, 0, NULL, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_061: [ If the buffer is NULL, the tlsio_openssl_send shall not do anything, and return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_send__SSL_write_null_buffer__failed) { ///arrange int result = 0; TLS_IO_INSTANCE instance; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.tlsio_state = TLSIO_STATE_OPEN; g_ssl_write_success = 1; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act result = tlsioInterfaces->concrete_io_send(&instance, NULL, 0, test_on_send_complete, (void*)0x4242); ///assert ASSERT_ARE_NOT_EQUAL(int, result, 0); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_062: [ If the size is 0, the tlsio_openssl_send shall not do anything, and return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_send__SSL_write_size_zero__failed) { ///arrange int result = 0; TLS_IO_INSTANCE instance; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; unsigned char test_buffer[] = {0x42}; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.tlsio_state = TLSIO_STATE_OPEN; g_ssl_write_success = 1; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act result = tlsioInterfaces->concrete_io_send(&instance, test_buffer, 0, test_on_send_complete, (void*)0x4242); ///assert ASSERT_ARE_NOT_EQUAL(int, result, 0); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_059: [ If the tlsio state is not TLSIO_STATE_OPEN, the tlsio_openssl_send shall return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_send_wrong_state__failed) { ///arrange int result; TLS_IO_INSTANCE instance; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ///act result = tlsioInterfaces->concrete_io_send(&instance, NULL, 0, NULL, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_057: [ If the ssl was not able to send all the bytes in the buffer, the tlsio_openssl_send shall call the on_send_complete with IO_SEND_ERROR, and return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_send__SSL_write__failed) { ///arrange int result = 0; TLS_IO_INSTANCE instance; unsigned char test_buffer[] = { 0x42, 0x43 }; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.tlsio_state = TLSIO_STATE_OPEN; g_ssl_write_success = 0; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); EXPECTED_CALL(SSL_write(IGNORED_PTR_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)); EXPECTED_CALL(SSL_shutdown(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4242, IO_SEND_ERROR)); ///act result = tlsioInterfaces->concrete_io_send(&instance, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, result, 0); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_043: [ The tlsio_openssl_close shall start the process to close the ssl connection. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_045: [ The tlsio_openssl_close shall store the provided on_io_close_complete callback function address. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_046: [ The tlsio_openssl_close shall store the provided on_io_close_complete_context handle. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_047: [ If tlsio_openssl_close get success to start the process to close the ssl connection, it shall set the tlsio state as TLSIO_STATE_CLOSING, and return 0. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_050: [ If tlsio_openssl_close successfully destroys the ssl connection, it shall set the tlsio state as TLSIO_STATE_NOT_OPEN, and return 0. ] */ /* Tests_SRS_TLSIO_SSL_ESP8266_99_051: [ If tlsio_openssl_close successfully destroys the ssl connection, it shall call on_io_close_complete. ] */ TEST_FUNCTION(tlsio_openssl_close__succeed) { ///arrange int result; TLS_IO_INSTANCE instance; SSL_CTX *ctx; SSL *ssl; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); g_ssl_TLSv1clientmethod_success = 0; ctx = SSL_CTX_new(TLSv1_client_method()); ASSERT_IS_NULL(ctx); g_ssl_TLSv1clientmethod_success = 1; ctx = SSL_CTX_new(TLSv1_client_method()); ASSERT_IS_NOT_NULL(ctx); ssl = SSL_new(ctx); g_ssl_shutdown_success = 1; g_socket_close_success = 1; instance.tlsio_state = TLSIO_STATE_OPEN; instance.ssl = ssl; instance.ssl_context = ctx; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(SSL_free(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(close(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_free(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(test_on_io_close_complete((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_close(&instance, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, (int)TLSIO_STATE_NOT_OPEN, instance.tlsio_state); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if(g_ssl != NULL){ free(g_ssl); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* Tests_SRS_TLSIO_SSL_ESP8266_99_048: [ If the tlsio state is TLSIO_STATE_NOT_OPEN, TLSIO_STATE_OPENING, or TLSIO_STATE_CLOSING, the tlsio_openssl_close shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_close_wrong_state__failed) { ///arrange int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); TLS_IO_INSTANCE instance; ASSERT_IS_NOT_NULL(tlsioInterfaces); memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ///act result = tlsioInterfaces->concrete_io_close(&instance, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); instance.tlsio_state = TLSIO_STATE_CLOSING; ///act result = tlsioInterfaces->concrete_io_close(&instance, NULL, NULL); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, (int)TLSIO_STATE_ERROR, instance.tlsio_state); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_049: [ If the tlsio_handle is NULL, the tlsio_openssl_close shall not do anything, and return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_close_null_handle__failed) { ///arrange int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act result = tlsioInterfaces->concrete_io_close(NULL, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_052: [ If tlsio_openssl_close fails to shutdown the ssl connection, it shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_, and call on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_close_shutdown__failed) { ///arrange int result; TLS_IO_INSTANCE instance; SSL_CTX *ctx; SSL *ssl; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; memset(&instance, 0, sizeof(TLS_IO_INSTANCE)); g_ssl_TLSv1clientmethod_success = 0; ctx = SSL_CTX_new(TLSv1_client_method()); ASSERT_IS_NULL(ctx); g_ssl_TLSv1clientmethod_success = 1; ctx = SSL_CTX_new(TLSv1_client_method()); ASSERT_IS_NOT_NULL(ctx); ssl = SSL_new(ctx); g_socket_close_success = 0; instance.tlsio_state = TLSIO_STATE_OPEN; instance.ssl = ssl; instance.ssl_context = ctx; instance.on_io_error = test_on_io_error; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(SSL_free(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(close(IGNORED_NUM_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_free(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(test_on_io_error(NULL)); ///act result = tlsioInterfaces->concrete_io_close(&instance, test_on_io_close_complete, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, (int)TLSIO_STATE_ERROR, instance.tlsio_state); ///cleanup if (g_sslmethod != NULL){ free(g_sslmethod); } if(g_ctx != NULL){ free(g_ctx); } if(g_ssl != NULL){ free(g_ssl); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_021: [ The tlsio_openssl_destroy shall destroy a created instance of the tlsio for ESP8266 identified by the CONCRETE_IO_HANDLE. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_022: [ The tlsio_openssl_destroy shall free all memory allocated for tlsio_instance. ] */ TEST_FUNCTION(tlsio_openssl_destroy__succeed) { ///arrange const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; TLS_IO_INSTANCE* instance = (TLS_IO_INSTANCE*)malloc(sizeof(TLS_IO_INSTANCE)); memset(instance, 0, sizeof(TLS_IO_INSTANCE)); instance->tlsio_state = TLSIO_STATE_NOT_OPEN; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(free(instance)); ///act tlsioInterfaces->concrete_io_destroy(instance); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_024: [ If the tlsio_handle is NULL, the tlsio_openssl_destroy shall not do anything. ] */ TEST_FUNCTION(tlsio_openssl_destroy_NULL_handle__failed) { ///arrange const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act tlsioInterfaces->concrete_io_destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_025: [ If the tlsio state is TLSIO_STATE_OPENING, TLSIO_STATE_OPEN, or TLSIO_STATE_CLOSING, the tlsio_openssl_destroy shall destroy the tlsio, but log an error. ] */ TEST_FUNCTION(tlsio_openssl_destroy_wrong_state__failed) { ///arrange const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; TLS_IO_INSTANCE* instance = (TLS_IO_INSTANCE*)malloc(sizeof(TLS_IO_INSTANCE)); memset(instance, 0, sizeof(TLS_IO_INSTANCE)); instance->tlsio_state = TLSIO_STATE_OPENING; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(free(instance)); ///act tlsioInterfaces->concrete_io_destroy(instance); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_018: [ The tlsio_openssl_open shall convert the provide hostName to an IP address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_026: [ The tlsio_openssl_open shall start the process to open the ssl connection with the host provided in the tlsio_openssl_create. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_030: [ The tlsio_openssl_open shall store the provided on_bytes_received callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_031: [ The tlsio_openssl_open shall store the provided on_bytes_received_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_034: [ If tlsio_openssl_open get success to open the ssl connection, it shall set the tlsio state as TLSIO_STATE_OPEN, and return 0. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_041: [ If the tlsio_openssl_open get success to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_OK. ] */ TEST_FUNCTION(tlsio_openssl_open__succeed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(bind(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(connect(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(SSL_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_set_fd(IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(SSL_connect(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); STRICT_EXPECTED_CALL(os_delay_us(IGNORED_NUM_ARG)).IgnoreArgument(1); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(int, 0, result); /** * The follow assert will compare the expected calls with the actual calls. If it is different, * it will show the serialized strings with the differences in the log. */ ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, (int)TLSIO_STATE_OPEN, tls_io_instance.tlsio_state); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if(g_ssl != NULL){ free(g_ssl); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_035: [ If the tlsio state is not TLSIO_STATE_NOT_OPEN and not TLSIO_STATE_ERROR, then tlsio_openssl_open shall set the tlsio state as TLSIO_STATE_ERROR, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ TEST_FUNCTION(tlsio_openssl_open_invalid_state__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); tls_io_instance.tlsio_state = TLSIO_STATE_OPENING; STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, (int)TLSIO_STATE_ERROR, tls_io_instance.tlsio_state); ///cleanup } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_036: [ If the tls_io handle is NULL, the tlsio_openssl_open shall not do anything, and return _LINE_. ] */ TEST_FUNCTION(tlsio_openssl_open_NULL_handle__failed) { ///arrange int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act result = tlsioInterfaces->concrete_io_open(NULL, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_019: [ If the WiFi cannot find the IP for the hostName, the tlsio_openssl_open shall return __LINE__. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_027: [ The tlsio_openssl_open shall set the tlsio to try to open the connection for MAX_RETRY times before assuming that connection failed. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_gethostbyname__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; int retry = 0; memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 0; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; umock_c_reset_all_calls(); do{ STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); }while(retry++ < MAX_RETRY); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_080: [ If socket failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_socket__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 0; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_081: [ If setsockopt failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_setsockopt__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 0; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_082: [ If bind failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_bind__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 0; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(bind(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_083: [ If connect and getsockopt failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_connect_getsockopt__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 0; g_getsockopt_success = 0; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(bind(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(connect(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(getsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_084: [ If lwip_select failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_027: [ The tlsio_openssl_open shall set the tlsio to try to open the connection for MAX_RETRY times before assuming that connection failed. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_lwip_select__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 0; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(bind(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(connect(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(getsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_085: [ If SSL_CTX_new failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_sslctxnew__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 0; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_087: [ If SSL_new failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_sslnew__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 0; g_ssl_set_fd_success = 1; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(bind(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(connect(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(SSL_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_088: [ If SSL_set_fd failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_sslsetfd__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 0; g_ssl_connect_success = 1; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(bind(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(connect(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(SSL_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_set_fd(IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_ssl != NULL){ free(g_ssl); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_089: [ If SSL_connect failed, the tlsio_openssl_open shall return __LINE__. ]*/ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_042: [ If the tlsio_openssl_open retry SSL_connect to open more than MAX_RETRY times without success, it shall return __LINE__. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_032: [ The tlsio_openssl_open shall store the provided on_io_error callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_033: [ The tlsio_openssl_open shall store the provided on_io_error_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_028: [ The tlsio_openssl_open shall store the provided on_io_open_complete callback function address. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_029: [ The tlsio_openssl_open shall store the provided on_io_open_complete_context handle. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_037: [ If the ssl client is not connected, the tlsio_openssl_open shall change the state to TLSIO_STATE_ERROR, log the error, and return _LINE_. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_039: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_open_complete callback was provided, it shall call the on_io_open_complete with IO_OPEN_ERROR. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_040: [ If the tlsio_openssl_open failed to open the tls connection, and the on_io_error callback was provided, it shall call the on_io_error. ] */ TEST_FUNCTION(tlsio_openssl_open_sslconnect__failed) { ///arrange TLS_IO_INSTANCE tls_io_instance; int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); int retry = 0; memset(&tls_io_instance, 0, sizeof(TLS_IO_INSTANCE)); tls_io_instance.tlsio_state = TLSIO_STATE_NOT_OPEN; ASSERT_IS_NOT_NULL(tlsioInterfaces); g_gethostbyname_success = 1; g_socket_success = 1; g_setsockopt_success = 1; g_bind_success = 1; g_connect_success = 1; g_ssl_lwip_select_success = 1; g_ssl_ctx_new_success = 1; g_ssl_new_success = 1; g_ssl_set_fd_success = 1; g_ssl_connect_success = 0; g_ssl_fd_isset = 0; g_ssl_get_error_success = 1; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(netconn_gethostbyname(IGNORED_PTR_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(TLSv1_client_method()); STRICT_EXPECTED_CALL(SSL_CTX_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_CTX_set_default_read_buffer_len(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(socket(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(setsockopt(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(fcntl(IGNORED_NUM_ARG,IGNORED_NUM_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(bind(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(connect(IGNORED_NUM_ARG,IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3); STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(SSL_new(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_set_fd(IGNORED_PTR_ARG, IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); while(retry < MAX_RETRY){ STRICT_EXPECTED_CALL(lwip_select(IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2).IgnoreArgument(3).IgnoreArgument(4).IgnoreArgument(5); STRICT_EXPECTED_CALL(FD_ISSET(IGNORED_NUM_ARG,IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(SSL_connect(IGNORED_PTR_ARG)).IgnoreArgument(1); STRICT_EXPECTED_CALL(SSL_get_error(IGNORED_PTR_ARG,IGNORED_NUM_ARG)).IgnoreArgument(1).IgnoreArgument(2); STRICT_EXPECTED_CALL(os_delay_us(IGNORED_NUM_ARG)).IgnoreArgument(1); retry++; } STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4242)); ///act result = tlsioInterfaces->concrete_io_open(&tls_io_instance, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4242, test_on_io_error, (void*)0x4242); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); ///cleanup if(g_ctx != NULL){ free(g_ctx); } if (g_ssl != NULL){ free(g_ssl); } if (g_sslmethod != NULL){ free(g_sslmethod); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_012: [ If there is not enough memory to create the tlsio, the tlsio_openssl_create shall return NULL as the handle. ] */ TEST_FUNCTION(tlsio_openssl_create_malloc__failed) { ///arrange OPTIONHANDLER_HANDLE result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; int negativeTestsInitResult = umock_c_negative_tests_init(); size_t i; ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)).IgnoreArgument(1); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act result = (OPTIONHANDLER_HANDLE)tlsioInterfaces->concrete_io_create((void*)&tlsio_config); ///assert ASSERT_IS_NULL(result); } ///cleanup umock_c_negative_tests_deinit(); } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_009: [ The tlsio_openssl_create shall create a new instance of the tlsio for esp8266. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_010: [ The tlsio_openssl_create shall return a non-NULL handle on success. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_011: [ The tlsio_openssl_create shall allocate memory to control the tlsio instance. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_016: [ The tlsio_openssl_create shall initialize all callback pointers as NULL. ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_017: [ The tlsio_openssl_create shall receive the connection configuration (TLSIO_CONFIG). ] */ /* TESTS_SRS_TLSIO_SSL_ESP8266_99_020: [ If tlsio_openssl_create get success to create the tlsio instance, it shall set the tlsio state as TLSIO_STATE_NOT_OPEN. ] */ TEST_FUNCTION(tlsio_openssl_create__succeed) { TLS_IO_INSTANCE* result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(sizeof(TLS_IO_INSTANCE))); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(&g_destination, IGNORED_PTR_ARG)).IgnoreArgument(1).IgnoreArgument(2); ///act result = (TLS_IO_INSTANCE*)tlsioInterfaces->concrete_io_create((void*)&tlsio_config); ///assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, (int)TLSIO_STATE_NOT_OPEN, result->tlsio_state); ///cleanup if (g_mallocptr != NULL){ free(g_mallocptr); } if (g_destination != NULL){ free(g_destination); } } /* TESTS_SRS_TLSIO_SSL_ESP8266_99_013: [ The tlsio_openssl_create shall return NULL when io_create_parameters is NULL. ] */ TEST_FUNCTION(tlsio_openssl_create_NULL_parameters__failed) { ///arrange OPTIONHANDLER_HANDLE result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); ///act result = (OPTIONHANDLER_HANDLE)tlsioInterfaces->concrete_io_create(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_078: [ The tlsio_openssl_retrieveoptions shall not do anything, and return NULL. ]*/ TEST_FUNCTION(tlsio_openssl_retrieveoptions__succeed) { ///arrange OPTIONHANDLER_HANDLE result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); ///act result = tlsioInterfaces->concrete_io_retrieveoptions(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_077: [ he tlsio_openssl_setoption shall not do anything, and return 0. ]*/ TEST_FUNCTION(tlsio_openssl_setoption__succeed) { ///arrange int result; const IO_INTERFACE_DESCRIPTION* tlsioInterfaces = tlsio_openssl_get_interface_description(); ASSERT_IS_NOT_NULL(tlsioInterfaces); umock_c_reset_all_calls(); ///act result = tlsioInterfaces->concrete_io_setoption(NULL, NULL, NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ///cleanup } /* Tests_SRS_TLSIO_SSL_ESP8266_99_008: [ The tlsio_openssl_get_interface_description shall return the VTable IO_INTERFACE_DESCRIPTION. ]*/ TEST_FUNCTION(tlsio_openssl_get_interface_description__succeed) { ///arrange const IO_INTERFACE_DESCRIPTION* tlsioInterfaces; ///act tlsioInterfaces = tlsio_openssl_get_interface_description(); ///assert ASSERT_IS_NOT_NULL(tlsioInterfaces); ///cleanup } END_TEST_SUITE(tlsio_esp8266_ut)tlsio_mbedtls_ut/000077500000000000000000000000001362133436400337735ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000012741362133436400365370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_mbedtls_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tlsio_mbedtls_ut) #set(MBED_ROOT_DIR $ENV{MBED_ROOT_DIR} CACHE PATH "") set(MBED_ROOT_DIR "G:/Enlistment/mbedtls") include_directories("${MBED_ROOT_DIR}/include") set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../adapters/tlsio_mbedtls.c ) set(${theseTestsName}_h_files ) add_definitions(-DUSE_MBED_TLS) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000004771362133436400350730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_mbedtls_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(tlsio_mbedtls_ut, failedTestCount); return failedTestCount; } tlsio_mbedtls_ut.c000066400000000000000000001073671362133436400375310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_mbedtls_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #include #endif #ifdef _CRTDBG_MAP_ALLOC #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } static void my_gballoc_free(void* ptr) { free(ptr); } /** * Include the C standards here. */ #include /** * Include the test tools. */ #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" #include "mbedtls/config.h" #include "mbedtls/debug.h" #include "mbedtls/ssl.h" #include "mbedtls/entropy.h" #include "mbedtls/ctr_drbg.h" #include "mbedtls/error.h" #include "mbedtls/certs.h" #include "mbedtls/entropy_poll.h" /** * Include the mockable headers here. */ #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/optionhandler.h" typedef int(*f_rng)(void *p_rng, unsigned char *output, size_t output_len); typedef void(*f_dbg)(void* a, int b, const char* c, int d, const char* e); typedef int(*f_entropy)(void *, unsigned char *, size_t); MOCKABLE_FUNCTION(, void, mbedtls_init, void*, instance, const char*, hostname); MOCKABLE_FUNCTION(, int, mbedtls_x509_crt_parse, mbedtls_x509_crt*, crt, const unsigned char*, buf, size_t, buflen); MOCKABLE_FUNCTION(, void, mbedtls_x509_crt_init, mbedtls_x509_crt*, crt); MOCKABLE_FUNCTION(, void, mbedtls_x509_crt_free, mbedtls_x509_crt*, crt); MOCKABLE_FUNCTION(, void, mbedtls_ctr_drbg_init, mbedtls_ctr_drbg_context*, ctx); MOCKABLE_FUNCTION(, void, mbedtls_ctr_drbg_free, mbedtls_ctr_drbg_context*, ctx) MOCKABLE_FUNCTION(, int, mbedtls_ctr_drbg_seed_entropy_len, mbedtls_ctr_drbg_context*, ctx, f_entropy, fe, void*, p_entropy, const unsigned char*, custom, size_t, len, size_t, entropy_len); MOCKABLE_FUNCTION(, int, mbedtls_ctr_drbg_random_with_add, void*, p_rng, unsigned char*, output, size_t, output_len, const unsigned char*, additional, size_t, add_len); MOCKABLE_FUNCTION(, int, mbedtls_ctr_drbg_seed, mbedtls_ctr_drbg_context*, ctx, f_entropy, fe, void*, p_entropy, const unsigned char*, custom, size_t, len); MOCKABLE_FUNCTION(, int, mbedtls_ctr_drbg_random, void*, p_rng, unsigned char*, output, size_t, output_len); MOCKABLE_FUNCTION(, void, mbedtls_ssl_init, mbedtls_ssl_context*, ssl) MOCKABLE_FUNCTION(, void, mbedtls_ssl_free, mbedtls_ssl_context*, ssl) MOCKABLE_FUNCTION(, void, mbedtls_ssl_config_free, mbedtls_ssl_config*, conf) MOCKABLE_FUNCTION(, int, mbedtls_ssl_handshake_step, mbedtls_ssl_context*, ssl) MOCKABLE_FUNCTION(, int, mbedtls_ssl_setup, mbedtls_ssl_context*, ssl, const mbedtls_ssl_config*, conf) MOCKABLE_FUNCTION(, int, mbedtls_ssl_set_session, mbedtls_ssl_context*, ssl, const mbedtls_ssl_session*, session) MOCKABLE_FUNCTION(, int, mbedtls_ssl_read, mbedtls_ssl_context*, ssl, unsigned char*, buf, size_t, len) MOCKABLE_FUNCTION(, void, mbedtls_ssl_conf_authmode, mbedtls_ssl_config*, conf, int, authmode) MOCKABLE_FUNCTION(, void, mbedtls_ssl_conf_rng, mbedtls_ssl_config*, conf, f_rng, fr, void*, p_rng); MOCKABLE_FUNCTION(, void, mbedtls_ssl_conf_dbg, mbedtls_ssl_config*, conf, f_dbg, fd, void*, p_dbg); MOCKABLE_FUNCTION(, void, mbedtls_ssl_set_bio, mbedtls_ssl_context*, ssl, void*, p_bio, mbedtls_ssl_send_t*, f_send, mbedtls_ssl_recv_t*, f_recv, mbedtls_ssl_recv_timeout_t*, f_recv_timeout); MOCKABLE_FUNCTION(, void, mbedtls_ssl_conf_ca_chain, mbedtls_ssl_config*, conf, mbedtls_x509_crt*, ca_chain, mbedtls_x509_crl*, ca_crl); MOCKABLE_FUNCTION(, void, mbedtls_ssl_conf_min_version, mbedtls_ssl_config*, conf, int, major, int, minor); MOCKABLE_FUNCTION(, int, mbedtls_ssl_set_hostname, mbedtls_ssl_context*, ssl, const char*, hostname); MOCKABLE_FUNCTION(, int, mbedtls_ssl_handshake, mbedtls_ssl_context*, ssl); MOCKABLE_FUNCTION(, int, mbedtls_ssl_write, mbedtls_ssl_context*, ssl, const unsigned char*, buf, size_t, len); MOCKABLE_FUNCTION(, int, mbedtls_ssl_close_notify, mbedtls_ssl_context*, ssl); MOCKABLE_FUNCTION(, int, mbedtls_ssl_config_defaults, mbedtls_ssl_config*, conf, int, endpoint, int, transport, int, preset); MOCKABLE_FUNCTION(, void, mbedtls_ssl_config_init, mbedtls_ssl_config*, conf); MOCKABLE_FUNCTION(, void, mbedtls_ssl_session_init, mbedtls_ssl_session*, session); MOCKABLE_FUNCTION(, void, mbedtls_debug_set_threshold, int, threshold); MOCKABLE_FUNCTION(, void, mbedtls_entropy_init, mbedtls_entropy_context*, ctx); MOCKABLE_FUNCTION(, int, mbedtls_entropy_add_source, mbedtls_entropy_context*, ctx, mbedtls_entropy_f_source_ptr, f_source, void*, p_source, size_t, threshold, int, strong); MOCKABLE_FUNCTION(, int, mbedtls_entropy_func, void*, data, unsigned char*, output, size_t, len); MOCKABLE_FUNCTION(, void, mbedtls_entropy_free, mbedtls_entropy_context*, ctx) MOCKABLE_FUNCTION(, void, on_io_open_complete, void*, context, IO_OPEN_RESULT, open_result); MOCKABLE_FUNCTION(, void, on_bytes_received, void*, context, const unsigned char*, buffer, size_t, size); MOCKABLE_FUNCTION(, void, on_io_error, void*, context); MOCKABLE_FUNCTION(, void, on_io_close_complete, void*, context); MOCKABLE_FUNCTION(, void, on_send_complete, void*, context, IO_SEND_RESULT, send_result); #undef ENABLE_MOCKS #include "azure_c_shared_utility/tlsio_mbedtls.h" static const char* const TEST_HOSTNAME = "test.azure-devices.net"; static int TEST_CONNECTION_PORT = 443; static const IO_INTERFACE_DESCRIPTION* TEST_INTERFACE_DESC = (IO_INTERFACE_DESCRIPTION*)0x6543; static const unsigned char TEST_DATA_VALUE[] = { 0x02, 0x34, 0x03 }; static size_t TEST_DATA_SIZE = sizeof(TEST_DATA_VALUE) / sizeof(TEST_DATA_VALUE[0]); static ON_IO_OPEN_COMPLETE g_open_complete = NULL; static void* g_open_complete_ctx = NULL; static ON_BYTES_RECEIVED g_on_bytes_received = NULL; static void* g_on_bytes_received_ctx = NULL; static ON_IO_ERROR g_on_io_error = NULL; static void* g_on_io_error_ctx = NULL; static mbedtls_ssl_send_t* mbed_f_send = NULL; static mbedtls_ssl_recv_t* mbed_f_recv = NULL; static mbedtls_ssl_recv_timeout_t* mbed_f_recv_timeout = NULL; static void* g_mbedtls_ctx = NULL; static mbedtls_entropy_f_source_ptr g_entropy_f_source; #define MAX_RETRY 20 #define RECEIVE_BUFFER_SIZE 1024 #define ENTROPY_LENGTH 16 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ const IO_INTERFACE_DESCRIPTION* tlsio_openssl_get_interface_description(void); #ifdef __cplusplus } #endif /* __cplusplus */ static int my_mallocAndStrcpy_s(char** destination, const char* source) { (void)source; size_t src_len = strlen(source); *destination = (char*)my_gballoc_malloc(src_len + 1); strcpy(*destination, source); return 0; } static XIO_HANDLE my_xio_create(const IO_INTERFACE_DESCRIPTION* io_interface_description, const void* xio_create_parameters) { (void)io_interface_description; (void)xio_create_parameters; return (XIO_HANDLE)my_gballoc_malloc(1); } static int my_xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { (void)xio; g_open_complete = on_io_open_complete; g_open_complete_ctx = on_io_open_complete_context; g_on_bytes_received = on_bytes_received; g_on_bytes_received_ctx = on_bytes_received_context; g_on_io_error = on_io_error; g_on_io_error_ctx = on_io_error_context; return 0; } static void my_xio_destroy(XIO_HANDLE xio) { my_gballoc_free(xio); } static void my_mbedtls_ssl_set_bio(mbedtls_ssl_context* ssl, void* p_bio, mbedtls_ssl_send_t* f_send, mbedtls_ssl_recv_t* f_recv, mbedtls_ssl_recv_timeout_t* f_recv_timeout) { (void)ssl; g_mbedtls_ctx = p_bio; mbed_f_send = f_send; mbed_f_recv = f_recv; mbed_f_recv_timeout = f_recv_timeout; } static int my_mbedtls_entropy_add_source(mbedtls_entropy_context* ctx, mbedtls_entropy_f_source_ptr f_source, void* p_source, size_t threshold, int strong) { (void)ctx; (void)p_source; (void)threshold; (void)strong; g_entropy_f_source = f_source; return 0; } static void my_os_delay_us(int us) { (void)(us); } static void my_on_bytes_received(void* context, const unsigned char* buffer, size_t size) { (void)context; (void)buffer; (void)size; } static void my_on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } static void my_on_io_open_complete(void* context, IO_OPEN_RESULT open_result) { (void)context; (void)open_result; } static void my_on_io_close_complete(void* context) { (void)context; } static void my_on_io_error(void* context) { (void)context; } IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); /** * Umock error will helps you to identify errors in the test suite or in the way that you are * using it, just keep it as is. */ DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } /** * This is necessary for the test suite, just keep as is. */ static TEST_MUTEX_HANDLE g_testByTest; static TEST_MUTEX_HANDLE g_dllByDll; /** * Tests begin here. * * RUN_TEST_SUITE(tlsio_esp8266_ut, failedTestCount); * */ BEGIN_TEST_SUITE(tlsio_mbedtls_ut) /** * This is the place where we initialize the test system. Replace the test name to associate the test * suite with your test cases. * It is called once, before start the tests. */ TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(mbedtls_entropy_f_source_ptr, void*); REGISTER_UMOCK_ALIAS_TYPE(f_entropy, void*); REGISTER_UMOCK_ALIAS_TYPE(f_rng, void*); REGISTER_UMOCK_ALIAS_TYPE(f_dbg, void*); REGISTER_UMOCK_ALIAS_TYPE(XIO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_OPEN_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_ERROR, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_CLOSE_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_SEND_COMPLETE, void*); REGISTER_TYPE(IO_SEND_RESULT, IO_SEND_RESULT); REGISTER_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_realloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, my_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_FAIL_RETURN(mallocAndStrcpy_s, __LINE__); REGISTER_GLOBAL_MOCK_HOOK(xio_create, my_xio_create); REGISTER_GLOBAL_MOCK_FAIL_RETURN(xio_create, NULL); REGISTER_GLOBAL_MOCK_HOOK(xio_open, my_xio_open); REGISTER_GLOBAL_MOCK_FAIL_RETURN(xio_open, __LINE__); REGISTER_GLOBAL_MOCK_HOOK(xio_destroy, my_xio_destroy); REGISTER_GLOBAL_MOCK_RETURN(socketio_get_interface_description, TEST_INTERFACE_DESC); REGISTER_GLOBAL_MOCK_FAIL_RETURN(socketio_get_interface_description, NULL); REGISTER_GLOBAL_MOCK_RETURN(mbedtls_ssl_read, 0); REGISTER_GLOBAL_MOCK_HOOK(mbedtls_ssl_set_bio, my_mbedtls_ssl_set_bio); REGISTER_GLOBAL_MOCK_HOOK(mbedtls_entropy_add_source, my_mbedtls_entropy_add_source); REGISTER_GLOBAL_MOCK_HOOK(on_io_open_complete, my_on_io_open_complete); REGISTER_GLOBAL_MOCK_HOOK(on_bytes_received, my_on_bytes_received); REGISTER_GLOBAL_MOCK_HOOK(on_io_error, my_on_io_error); REGISTER_GLOBAL_MOCK_HOOK(on_io_close_complete, my_on_io_close_complete); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } g_open_complete = NULL; g_open_complete_ctx = NULL; g_on_bytes_received = NULL; g_on_bytes_received_ctx = NULL; g_on_io_error = NULL; g_on_io_error_ctx = NULL; mbed_f_send = NULL; mbed_f_recv = NULL; mbed_f_recv_timeout = NULL; umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } static int should_skip_index(size_t current_index, const size_t skip_array[], size_t length) { int result = 0; for (size_t index = 0; index < length; index++) { if (current_index == skip_array[index]) { result = __LINE__; break; } } return result; } static void setup_tlsio_mbedtls_create_mocks(bool call_iface_desc) { STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); if (call_iface_desc) { STRICT_EXPECTED_CALL(socketio_get_interface_description()); } STRICT_EXPECTED_CALL(xio_create(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_entropy_init(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ctr_drbg_init(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_init(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_session_init(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_config_init(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_x509_crt_init(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_entropy_add_source(IGNORED_PTR_ARG, IGNORED_PTR_ARG, NULL, IGNORED_NUM_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mbedtls_ctr_drbg_seed(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_config_defaults(IGNORED_PTR_ARG, MBEDTLS_SSL_IS_CLIENT, MBEDTLS_SSL_TRANSPORT_STREAM, MBEDTLS_SSL_PRESET_DEFAULT)); STRICT_EXPECTED_CALL(mbedtls_ssl_conf_rng(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_conf_authmode(IGNORED_PTR_ARG, MBEDTLS_SSL_VERIFY_REQUIRED)); STRICT_EXPECTED_CALL(mbedtls_ssl_conf_min_version(IGNORED_PTR_ARG, MBEDTLS_SSL_MAJOR_VERSION_3, MBEDTLS_SSL_MINOR_VERSION_3)); STRICT_EXPECTED_CALL(mbedtls_ssl_set_bio(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, NULL)); STRICT_EXPECTED_CALL(mbedtls_ssl_set_hostname(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_set_session(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_setup(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); } TEST_FUNCTION(tlsio_mbedtls_create_config_NULL_fail) { //arrange //act CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(NULL); //assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(tlsio_mbedtls_create_succeed) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; setup_tlsio_mbedtls_create_mocks(false); //act CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); //assert ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_create_fail) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); setup_tlsio_mbedtls_create_mocks(false); umock_c_negative_tests_snapshot(); size_t count = umock_c_negative_tests_call_count(); // Only the first 2 calls can fail for (size_t index = 0; index < 2; index++) { umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); char tmp_msg[64]; sprintf(tmp_msg, "tlsio_mbedtls_create failure in test %zu/%zu", index, count); //act CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); //assert ASSERT_IS_NULL(handle, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); } TEST_FUNCTION(tlsio_mbedtls_destroy_succeed) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mbedtls_ssl_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ssl_config_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_x509_crt_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_ctr_drbg_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(mbedtls_entropy_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_NUM_ARG)); //act tlsio_mbedtls_destroy(handle); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(tlsio_mbedtls_destroy_handle_NULL_fail) { //arrange //act tlsio_mbedtls_destroy(NULL); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(tlsio_mbedtls_open_handle_NULL_fail) { //arrange //act int result = tlsio_mbedtls_open(NULL, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(tlsio_mbedtls_open_succeed) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); //act int result = tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); //assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_close(handle, NULL, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_open_multiple_calls_fail) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); int result = tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); umock_c_reset_all_calls(); //act result = tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_close(handle, NULL, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_open_fail) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)).SetReturn(__LINE__); //act int result = tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_entropy_poll_success) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); umock_c_reset_all_calls(); unsigned char output[ENTROPY_LENGTH]; size_t len = ENTROPY_LENGTH; size_t olen; //act g_entropy_f_source(NULL, output, len, &olen); //assert ASSERT_ARE_EQUAL(int, ENTROPY_LENGTH, olen); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_close_handle_NULL_fail) { //arrange //act int result = tlsio_mbedtls_close(NULL, on_io_close_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(tlsio_mbedtls_close_success) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); int result = tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mbedtls_ssl_close_notify(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_close(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); //act result = tlsio_mbedtls_close(handle, on_io_close_complete, NULL); //assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_close_multiple_calls_fail) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); int result = tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); result = tlsio_mbedtls_close(handle, on_io_close_complete, NULL); umock_c_reset_all_calls(); //act result = tlsio_mbedtls_close(handle, on_io_close_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_send_handle_NULL_fail) { //arrange //act int result = tlsio_mbedtls_send(NULL, TEST_DATA_VALUE, TEST_DATA_SIZE, on_send_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(tlsio_mbedtls_send_not_open_fail) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); umock_c_reset_all_calls(); //act int result = tlsio_mbedtls_send(handle, TEST_DATA_VALUE, TEST_DATA_SIZE, on_send_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_send_success) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); g_open_complete(g_open_complete_ctx, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mbedtls_ssl_write(IGNORED_PTR_ARG, TEST_DATA_VALUE, TEST_DATA_SIZE)).SetReturn(TEST_DATA_SIZE); //act int result = tlsio_mbedtls_send(handle, TEST_DATA_VALUE, TEST_DATA_SIZE, on_send_complete, NULL); //assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_send_failure) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); umock_c_reset_all_calls(); //act int result = tlsio_mbedtls_send(handle, TEST_DATA_VALUE, TEST_DATA_SIZE, on_send_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_dowork_handle_NULL_fail) { //arrange //act tlsio_mbedtls_dowork(NULL); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(tlsio_mbedtls_dowork_success) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mbedtls_ssl_read(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); //act tlsio_mbedtls_dowork(handle); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_mbedtls_dowork_w_data_success) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mbedtls_ssl_read(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)) .CopyOutArgumentBuffer_buf(TEST_DATA_VALUE, sizeof(unsigned char**) ) .SetReturn(TEST_DATA_SIZE); STRICT_EXPECTED_CALL(on_bytes_received(IGNORED_PTR_ARG, IGNORED_PTR_ARG, TEST_DATA_SIZE)); STRICT_EXPECTED_CALL(mbedtls_ssl_read(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); //act tlsio_mbedtls_dowork(handle); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_on_underlying_io_bytes_received_success) { //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); //act g_on_bytes_received(g_on_bytes_received_ctx, TEST_DATA_VALUE, TEST_DATA_SIZE); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_on_io_recv_timeout_success) { unsigned char* read_buff[32]; size_t buff_len = 32; //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); //g_on_bytes_received(g_on_bytes_received_ctx, TEST_DATA_VALUE, TEST_DATA_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); //act mbed_f_recv(g_mbedtls_ctx, (unsigned char*)read_buff, buff_len); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_on_io_recv_success) { unsigned char* read_buff[32]; size_t buff_len = 32; //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); g_on_bytes_received(g_on_bytes_received_ctx, TEST_DATA_VALUE, TEST_DATA_SIZE); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act mbed_f_recv(g_mbedtls_ctx, (unsigned char*)read_buff, buff_len); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } TEST_FUNCTION(tlsio_on_io_recv_context_NULL_success) { unsigned char* read_buff[32]; size_t buff_len = 32; //arrange TLSIO_CONFIG tls_io_config; tls_io_config.hostname = TEST_HOSTNAME; tls_io_config.port = TEST_CONNECTION_PORT; tls_io_config.underlying_io_interface = TEST_INTERFACE_DESC; tls_io_config.underlying_io_parameters = NULL; CONCRETE_IO_HANDLE handle = tlsio_mbedtls_create(&tls_io_config); (void)tlsio_mbedtls_open(handle, on_io_open_complete, NULL, on_bytes_received, NULL, on_io_error, NULL); g_on_bytes_received(g_on_bytes_received_ctx, TEST_DATA_VALUE, TEST_DATA_SIZE); umock_c_reset_all_calls(); //act mbed_f_recv(NULL, (unsigned char*)read_buff, buff_len); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup (void)tlsio_mbedtls_close(handle, on_io_close_complete, NULL); tlsio_mbedtls_destroy(handle); } END_TEST_SUITE(tlsio_mbedtls_ut) tlsio_options_ut/000077500000000000000000000000001362133436400340345ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000011721362133436400365750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_options_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tlsio_options_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../pal/tlsio_options.c ../../src/optionhandler.c ../../src/crt_abstractions.c ../../src/vector.c ) set(${theseTestsName}_h_files gballoc_ut_impl_1.h gballoc_ut_impl_2.h ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) gballoc_ut_impl_1.h000066400000000000000000000025451362133436400375670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_options_ut// Copyright(c) Microsoft.All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is made an integral part of a unit test implementation with a #include. It // is broken out for reuse and readability. #ifndef GBALLOC_UT_IMPL_1_H #define GBALLOC_UT_IMPL_1_H // These functions add memory leak checking to the unit test itself rather than // relying on Valgrind, which is inconvenient for troubleshooting. static void add_gballoc_memory_block(void* block); static void remove_gballoc_memory_block(void* block); /** * The gballoc.h will replace the malloc, free, and realloc by the my_gballoc functions, in this case, * if you define these mock functions after include the gballoc.h, you will create an infinity recursion, * so, places the my_gballoc functions before the #include "azure_c_shared_utility/gballoc.h" */ static void* my_gballoc_malloc(size_t size) { void* result = malloc(size); add_gballoc_memory_block(result); return result; } static void* my_gballoc_realloc(void* ptr, size_t size) { void* result; remove_gballoc_memory_block(ptr); result = realloc(ptr, size); add_gballoc_memory_block(result); return result; } static void my_gballoc_free(void* ptr) { remove_gballoc_memory_block(ptr); free(ptr); } #endif // GBALLOC_UT_IMPL_1_H gballoc_ut_impl_2.h000066400000000000000000000037651362133436400375750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_options_ut// Copyright(c) Microsoft.All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is made an integral part of a unit test implementation with a #include. It // is broken out for reuse and readability. #ifndef GBALLOC_UT_IMPL_2_H #define GBALLOC_UT_IMPL_2_H #include // This adds memory checking to the gballoc mocking // NOTE: Using ASSERTs wouuld be nice, but this file must preceed their definition // to avoid the malloc infinite recursion problem #ifndef GBALLOC_UT_IMPL_MAX_ALLOCS #define GBALLOC_UT_IMPL_MAX_ALLOCS 1000 #endif static void* memory_blocks[GBALLOC_UT_IMPL_MAX_ALLOCS]; static uint32_t memory_block_count; static void init_gballoc_checks() { uint32_t i; memory_block_count = 0; for (i = 0; i < GBALLOC_UT_IMPL_MAX_ALLOCS; i++) { memory_blocks[i] = NULL; } } static void add_gballoc_memory_block(void* block) { if (block != NULL) { if (memory_block_count < GBALLOC_UT_IMPL_MAX_ALLOCS) { memory_blocks[memory_block_count] = block; memory_block_count++; } else { ASSERT_FAIL("GBALLOC_UT_IMPL_MAX_ALLOCS is too small in add_gballoc_memory_block"); } } } static void remove_gballoc_memory_block(void* block) { if (block != NULL) { bool found = false; uint32_t i; for (i = 0; i < memory_block_count; i++) { if (memory_blocks[i] == block) { memory_blocks[i] = NULL; found = true; break; } } if (!found) { ASSERT_FAIL("unknown block in remove_gballoc_memory_block"); } } } static void assert_gballoc_checks() { uint32_t i; for (i = 0; i < memory_block_count; i++) { if (memory_blocks[i] != NULL) { ASSERT_FAIL("undeleted memory block"); } } } #endif // GBALLOC_UT_IMPL_2_H main.c000066400000000000000000000005061362133436400351250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_options_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(tlsio_options_unittests, failedTestCount); return failedTestCount; } tlsio_options_ut.c000066400000000000000000001014541362133436400376220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_options_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif /** * The gballoc.h will replace the malloc, free, and realloc by the my_gballoc functions, in this case, * if you define these mock functions after include the gballoc.h, you will create an infinity recursion, * so, places the my_gballoc functions before the #include "azure_c_shared_utility/gballoc.h" */ #include "gballoc_ut_impl_1.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/tlsio_options.h" #include "azure_c_shared_utility/shared_util_options.h" #include "testrunnerswitcher.h" #include "umock_c_negative_tests.h" static TEST_MUTEX_HANDLE g_testByTest; #include "gballoc_ut_impl_2.h" const char* fake_trusted_cert = "Fake trusted cert"; const char* fake_x509_cert = "Fake x509 cert"; const char* fake_x509_key = "Fake x509 key"; #define SET_PV_COUNT 3 #define RETRIEVE_PV_COUNT 4 #define SET_INCONSISTENT_x509_COUNT 8 #define SET_NOT_SUPPORTED_COUNT 5 void ASSERT_COPIED_STRING(const char* target, const char* source) { ASSERT_IS_NOT_NULL(target, "Target string is NULL"); ASSERT_IS_NOT_NULL(target, "Source string is NULL"); ASSERT_ARE_NOT_EQUAL(void_ptr, (void*)target, (void*)source, "Strings are duplicates instead of copies"); ASSERT_ARE_EQUAL(char_ptr, target, source, "Strings do not match"); } DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } static void use_negative_mocks() { int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); } void* pfCloneOption_impl(const char* name, const void* value) { void* result; tlsio_options_clone_option(name, value, &result); return result; } void pfDestroyOption_impl(const char* name, const void* value) { (void)tlsio_options_destroy_option(name, value); } int pfSetOption_impl(void* handle, const char* name, const void* value) { TLSIO_OPTIONS* options = (TLSIO_OPTIONS*)handle; TLSIO_OPTIONS_RESULT sr = tlsio_options_set(options, name, value); return sr == TLSIO_OPTIONS_RESULT_SUCCESS ? 0 : __FAILURE__; } BEGIN_TEST_SUITE(tlsio_options_unittests) TEST_SUITE_INITIALIZE(suite_init) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(TLSIO_OPTIONS_x509_TYPE, int); /** * Or you can combine, for example, in the success case malloc will call my_gballoc_malloc, and for * the failed cases, it will return NULL. */ REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); init_gballoc_checks(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } TEST_FUNCTION(tlsio_options_initialize__succeeds) { ///arrange TLSIO_OPTIONS options; memset(&options, 0xff, sizeof(options)); ///act tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); ///assert ASSERT_IS_NULL(options.trusted_certs); ASSERT_IS_NULL(options.x509_cert); ASSERT_IS_NULL(options.x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED); ///clean } TEST_FUNCTION(tlsio_options__set_trusted_certs__succeeds) { ///arrange TLSIO_OPTIONS_RESULT result; TLSIO_OPTIONS options; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS); ///act result = tlsio_options_set(&options, OPTION_TRUSTED_CERT, fake_trusted_cert); ///assert ASSERT_COPIED_STRING(options.trusted_certs, fake_trusted_cert); ASSERT_IS_NULL(options.x509_cert); ASSERT_IS_NULL(options.x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_TRUSTED_CERTS)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED); ASSERT_ARE_EQUAL(int, (int)result, 0); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__set_x509_certs__succeeds) { ///arrange TLSIO_OPTIONS_RESULT result; TLSIO_OPTIONS options; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_x509_RSA_CERT); ///act result = tlsio_options_set(&options, SU_OPTION_X509_CERT, fake_x509_cert); ///assert ASSERT_IS_NULL(options.trusted_certs); ASSERT_COPIED_STRING(options.x509_cert, fake_x509_cert); ASSERT_IS_NULL(options.x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_x509_RSA_CERT)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_RSA); ASSERT_ARE_EQUAL(int, (int)result, 0); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__set_x509_ECC_certs__succeeds) { ///arrange TLSIO_OPTIONS_RESULT result; TLSIO_OPTIONS options; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_x509_ECC_CERT); ///act result = tlsio_options_set(&options, OPTION_X509_ECC_CERT, fake_x509_cert); ///assert ASSERT_IS_NULL(options.trusted_certs); ASSERT_COPIED_STRING(options.x509_cert, fake_x509_cert); ASSERT_IS_NULL(options.x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_x509_ECC_CERT)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_ECC); ASSERT_ARE_EQUAL(int, (int)result, 0); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__set_x509_key__succeeds) { ///arrange TLSIO_OPTIONS_RESULT result; TLSIO_OPTIONS options; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_x509_RSA_CERT); ///act result = tlsio_options_set(&options, SU_OPTION_X509_PRIVATE_KEY, fake_x509_key); ///assert ASSERT_IS_NULL(options.trusted_certs); ASSERT_IS_NULL(options.x509_cert); ASSERT_COPIED_STRING(options.x509_key, fake_x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_x509_RSA_CERT)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_RSA); ASSERT_ARE_EQUAL(int, (int)result, 0); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__set_x509_ECC_key__succeeds) { ///arrange TLSIO_OPTIONS_RESULT result; TLSIO_OPTIONS options; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_x509_ECC_CERT); ///act result = tlsio_options_set(&options, OPTION_X509_ECC_KEY, fake_x509_key); ///assert ASSERT_IS_NULL(options.trusted_certs); ASSERT_IS_NULL(options.x509_cert); ASSERT_COPIED_STRING(options.x509_key, fake_x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_x509_ECC_CERT)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_ECC); ASSERT_ARE_EQUAL(int, (int)result, 0); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__set_unhandled__succeeds) { ///arrange TLSIO_OPTIONS_RESULT result; TLSIO_OPTIONS options; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_x509_ECC_CERT); ///act result = tlsio_options_set(&options, OPTION_HTTP_PROXY, fake_x509_key); ///assert ASSERT_IS_NULL(options.trusted_certs); ASSERT_IS_NULL(options.x509_cert); ASSERT_IS_NULL(options.x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_x509_ECC_CERT)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_NOT_HANDLED); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__set_parameter_validation__fails) { int i; int k = 0; TLSIO_OPTIONS* p0[SET_PV_COUNT]; const char* p1[SET_PV_COUNT]; const char* p2[SET_PV_COUNT]; const char* fm[SET_PV_COUNT]; TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT result; p0[k] = NULL; p1[k] = OPTION_TRUSTED_CERT; p2[k] = fake_x509_key; fm[k] = "Unexpected tlsio_options_initialize success when options is NULL"; /* */ k++; p0[k] = &options; p1[k] = NULL; /* */ p2[k] = fake_x509_key; fm[k] = "Unexpected tlsio_options_initialize success when option_name is NULL"; k++; p0[k] = &options; p1[k] = OPTION_TRUSTED_CERT; p2[k] = NULL; fm[k] = "Unexpected tlsio_options_initialize success when option_value is NULL"; k++; // Cycle through each failing combo of parameters for (i = 0; i < SET_PV_COUNT; i++) { ///arrange tlsio_options_initialize(&options, TLSIO_OPTION_BIT_x509_ECC_CERT); ///act result = tlsio_options_set(p0[i], p1[i], p2[i]); ///assert ASSERT_IS_NULL(options.trusted_certs); ASSERT_IS_NULL(options.x509_cert); ASSERT_IS_NULL(options.x509_key); ASSERT_ARE_EQUAL(int, options.supported_options, (int)(TLSIO_OPTION_BIT_x509_ECC_CERT)); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_ERROR, fm[i]); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } } TEST_FUNCTION(tlsio_options__set_x509_bad_combos__fails) { int i; int k = 0; const char* p0[SET_INCONSISTENT_x509_COUNT]; const char* p1[SET_INCONSISTENT_x509_COUNT]; TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT result; p0[k] = SU_OPTION_X509_CERT; /* */ p1[k] = OPTION_X509_ECC_CERT; k++; p0[k] = SU_OPTION_X509_CERT; /* */ p1[k] = OPTION_X509_ECC_KEY; k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; p1[k] = OPTION_X509_ECC_CERT; k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; p1[k] = OPTION_X509_ECC_KEY; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ p1[k] = SU_OPTION_X509_CERT; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ p1[k] = SU_OPTION_X509_PRIVATE_KEY; k++; p0[k] = OPTION_X509_ECC_KEY; /* */ p1[k] = SU_OPTION_X509_CERT; k++; p0[k] = OPTION_X509_ECC_KEY; /* */ p1[k] = SU_OPTION_X509_PRIVATE_KEY; k++; // Cycle through each failing combo of parameters for (i = 0; i < SET_INCONSISTENT_x509_COUNT; i++) { ///arrange tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); result = tlsio_options_set(&options, p0[i], fake_x509_key); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_set(&options, p1[i], fake_x509_key); ///assert ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_ERROR, "Unexpected success with inconsistent x509 settings"); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } } TEST_FUNCTION(tlsio_options__set_not_supported__fails) { int i; int k = 0; const char* p0[SET_NOT_SUPPORTED_COUNT]; TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT result; p0[k] = OPTION_TRUSTED_CERT; /* */ k++; p0[k] = SU_OPTION_X509_CERT; /* */ k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ k++; p0[k] = OPTION_X509_ECC_KEY; /* */ k++; // Cycle through each failing combo of parameters for (i = 0; i < SET_NOT_SUPPORTED_COUNT; i++) { ///arrange umock_c_reset_all_calls(); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_NONE); ///act result = tlsio_options_set(&options, p0[i], fake_x509_key); ///assert ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_ERROR, "Unexpected success with unsupported option"); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } } TEST_FUNCTION(tlsio_options__set_malloc_fail__fails) { int i; int k = 0; const char* p0[SET_NOT_SUPPORTED_COUNT]; TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT result; p0[k] = OPTION_TRUSTED_CERT; /* */ k++; p0[k] = SU_OPTION_X509_CERT; /* */ k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ k++; p0[k] = OPTION_X509_ECC_KEY; /* */ k++; use_negative_mocks(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // concrete_io struct umock_c_negative_tests_snapshot(); // Cycle through each failing combo of parameters for (i = 0; i < SET_NOT_SUPPORTED_COUNT; i++) { ///arrange umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(0); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); ///act result = tlsio_options_set(&options, p0[i], fake_x509_key); ///assert ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_ERROR, "Unexpected success with malloc failure"); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } umock_c_negative_tests_deinit(); } TEST_FUNCTION(tlsio_options__release_resources__succeeds) { ///arrange TLSIO_OPTIONS_RESULT result; TLSIO_OPTIONS options; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT); result = tlsio_options_set(&options, OPTION_TRUSTED_CERT, fake_trusted_cert); result = tlsio_options_set(&options, SU_OPTION_X509_CERT, fake_x509_cert); result = tlsio_options_set(&options, SU_OPTION_X509_PRIVATE_KEY, fake_x509_key); ///act tlsio_options_release_resources(&options); ///assert assert_gballoc_checks(); // checks for un-freed memory ///clean } TEST_FUNCTION(tlsio_options__clone_option_OPTION_TRUSTED_CERT__succeeds) { ///arrange void* out_result; TLSIO_OPTIONS_RESULT result; ///act result = tlsio_options_clone_option(OPTION_TRUSTED_CERT, fake_trusted_cert, &out_result); ///assert ASSERT_COPIED_STRING((const char*)out_result, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///clean free(out_result); } TEST_FUNCTION(tlsio_options__clone_option_SU_OPTION_X509_CERT__succeeds) { ///arrange void* out_result; TLSIO_OPTIONS_RESULT result; ///act result = tlsio_options_clone_option(SU_OPTION_X509_CERT, fake_trusted_cert, &out_result); ///assert ASSERT_COPIED_STRING((const char*)out_result, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///clean free(out_result); } TEST_FUNCTION(tlsio_options__clone_option_SU_OPTION_X509_PRIVATE_KEY__succeeds) { ///arrange void* out_result; TLSIO_OPTIONS_RESULT result; ///act result = tlsio_options_clone_option(SU_OPTION_X509_PRIVATE_KEY, fake_trusted_cert, &out_result); ///assert ASSERT_COPIED_STRING((const char*)out_result, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///clean free(out_result); } TEST_FUNCTION(tlsio_options__clone_option_OPTION_X509_ECC_CERT__succeeds) { ///arrange void* out_result; TLSIO_OPTIONS_RESULT result; ///act result = tlsio_options_clone_option(OPTION_X509_ECC_CERT, fake_trusted_cert, &out_result); ///assert ASSERT_COPIED_STRING((const char*)out_result, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///clean free(out_result); } TEST_FUNCTION(tlsio_options__clone_option_OPTION_X509_ECC_KEY__succeeds) { ///arrange void* out_result; TLSIO_OPTIONS_RESULT result; ///act result = tlsio_options_clone_option(OPTION_X509_ECC_KEY, fake_trusted_cert, &out_result); ///assert ASSERT_COPIED_STRING((const char*)out_result, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///clean free(out_result); } TEST_FUNCTION(tlsio_options__clone_option_malloc_fail__fails) { int i; int k = 0; const char* p0[SET_NOT_SUPPORTED_COUNT]; p0[k] = OPTION_TRUSTED_CERT; /* */ k++; p0[k] = SU_OPTION_X509_CERT; /* */ k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ k++; p0[k] = OPTION_X509_ECC_KEY; /* */ k++; use_negative_mocks(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // concrete_io struct umock_c_negative_tests_snapshot(); // Cycle through each failing combo of parameters for (i = 0; i < SET_NOT_SUPPORTED_COUNT; i++) { void* out_result = NULL; TLSIO_OPTIONS_RESULT result; ///arrange umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(0); ///act result = tlsio_options_clone_option(p0[i], fake_trusted_cert, &out_result); ///assert ASSERT_IS_NULL(out_result); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_ERROR, "Unexpected success with malloc failure"); ///clean } umock_c_negative_tests_deinit(); } TEST_FUNCTION(tlsio_options__clone_parameter_validation__fails) { int i; int k = 0; const char* p0[SET_PV_COUNT]; const char* p1[SET_PV_COUNT]; void** p2[SET_PV_COUNT]; const char* fm[SET_PV_COUNT]; TLSIO_OPTIONS_RESULT result; void* out_result = NULL; p0[k] = NULL; /* */ p1[k] = fake_x509_key; p2[k] = &out_result; fm[k] = "Unexpected clone_option success when name is NULL"; /* */ k++; p0[k] = OPTION_TRUSTED_CERT; p1[k] = NULL; /* */ p2[k] = &out_result; fm[k] = "Unexpected clone_option success when option value is NULL"; k++; p0[k] = OPTION_TRUSTED_CERT; p1[k] = fake_x509_key; p2[k] = NULL; /* */ fm[k] = "Unexpected clone_option success when out_status is NULL"; k++; // Cycle through each failing combo of parameters for (i = 0; i < SET_PV_COUNT; i++) { ///arrange ///act result = tlsio_options_clone_option(p0[i], p1[i], p2[i]); ///assert ASSERT_IS_NULL(out_result); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_ERROR, "Unexpected success with bad clone parameter"); ///clean } } TEST_FUNCTION(tlsio_options__clone_malloc_fail__fails) { int i; int k = 0; const char* p0[SET_NOT_SUPPORTED_COUNT]; void* out_result = NULL; TLSIO_OPTIONS_RESULT result; p0[k] = OPTION_TRUSTED_CERT; /* */ k++; p0[k] = SU_OPTION_X509_CERT; /* */ k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ k++; p0[k] = OPTION_X509_ECC_KEY; /* */ k++; use_negative_mocks(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); // concrete_io struct umock_c_negative_tests_snapshot(); // Cycle through each failing combo of parameters for (i = 0; i < SET_NOT_SUPPORTED_COUNT; i++) { ///arrange umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(0); ///act result = tlsio_options_clone_option(p0[i], fake_x509_key, &out_result); ///assert ASSERT_IS_NULL(out_result); ASSERT_ARE_EQUAL(int, (int)result, (int)TLSIO_OPTIONS_RESULT_ERROR, "Unexpected success with malloc failure"); ///clean } umock_c_negative_tests_deinit(); } TEST_FUNCTION(tlsio_options__retrieve_ex_OPTION_TRUSTED_CERT__succeeds) { ///arrange TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_RESULT option_handler_result; OPTIONHANDLER_HANDLE result = NULL; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, OPTION_TRUSTED_CERT, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_retrieve_options_ex(&options, pfCloneOption_impl, pfDestroyOption_impl, pfSetOption_impl); ///assert ASSERT_IS_NOT_NULL(result); tlsio_options_release_resources(&options); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); option_handler_result = OptionHandler_FeedOptions(result, &options); ASSERT_ARE_EQUAL(int, (int)option_handler_result, (int)OPTIONHANDLER_OK); ASSERT_COPIED_STRING(options.trusted_certs, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_UNSPECIFIED); ///clean tlsio_options_release_resources(&options); OptionHandler_Destroy(result); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__retrieve_ex_SU_OPTION_X509_CERT__succeeds) { ///arrange TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_RESULT option_handler_result; OPTIONHANDLER_HANDLE result = NULL; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, SU_OPTION_X509_CERT, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_retrieve_options_ex(&options, pfCloneOption_impl, pfDestroyOption_impl, pfSetOption_impl); ///assert ASSERT_IS_NOT_NULL(result); tlsio_options_release_resources(&options); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); option_handler_result = OptionHandler_FeedOptions(result, &options); ASSERT_ARE_EQUAL(int, (int)option_handler_result, (int)OPTIONHANDLER_OK); ASSERT_COPIED_STRING(options.x509_cert, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_RSA); ///clean tlsio_options_release_resources(&options); OptionHandler_Destroy(result); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__retrieve_ex_SU_OPTION_X509_PRIVATE_KEY__succeeds) { ///arrange TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_RESULT option_handler_result; OPTIONHANDLER_HANDLE result = NULL; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, SU_OPTION_X509_PRIVATE_KEY, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_retrieve_options_ex(&options, pfCloneOption_impl, pfDestroyOption_impl, pfSetOption_impl); ///assert ASSERT_IS_NOT_NULL(result); tlsio_options_release_resources(&options); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); option_handler_result = OptionHandler_FeedOptions(result, &options); ASSERT_ARE_EQUAL(int, (int)option_handler_result, (int)OPTIONHANDLER_OK); ASSERT_COPIED_STRING(options.x509_key, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_RSA); ///clean tlsio_options_release_resources(&options); OptionHandler_Destroy(result); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__retrieve_ex_OPTION_X509_ECC_CERT__succeeds) { ///arrange TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_RESULT option_handler_result; OPTIONHANDLER_HANDLE result = NULL; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, OPTION_X509_ECC_CERT, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_retrieve_options_ex(&options, pfCloneOption_impl, pfDestroyOption_impl, pfSetOption_impl); ///assert ASSERT_IS_NOT_NULL(result); tlsio_options_release_resources(&options); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); option_handler_result = OptionHandler_FeedOptions(result, &options); ASSERT_ARE_EQUAL(int, (int)option_handler_result, (int)OPTIONHANDLER_OK); ASSERT_COPIED_STRING(options.x509_cert, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_ECC); ///clean tlsio_options_release_resources(&options); OptionHandler_Destroy(result); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__retrieve_ex_OPTION_X509_ECC_KEY__succeeds) { ///arrange TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_RESULT option_handler_result; OPTIONHANDLER_HANDLE result = NULL; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, OPTION_X509_ECC_KEY, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_retrieve_options_ex(&options, pfCloneOption_impl, pfDestroyOption_impl, pfSetOption_impl); ///assert ASSERT_IS_NOT_NULL(result); tlsio_options_release_resources(&options); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); option_handler_result = OptionHandler_FeedOptions(result, &options); ASSERT_ARE_EQUAL(int, (int)option_handler_result, (int)OPTIONHANDLER_OK); ASSERT_COPIED_STRING(options.x509_key, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_ECC); ///clean tlsio_options_release_resources(&options); OptionHandler_Destroy(result); assert_gballoc_checks(); } TEST_FUNCTION(tlsio_options__retrieve_ex_parameter_validation__fails) { int i; int k = 0; TLSIO_OPTIONS options; TLSIO_OPTIONS* p0[RETRIEVE_PV_COUNT]; pfCloneOption p1[RETRIEVE_PV_COUNT]; pfDestroyOption p2[RETRIEVE_PV_COUNT]; pfSetOption p3[RETRIEVE_PV_COUNT]; p0[k] = NULL; p1[k] = pfCloneOption_impl; p2[k] = pfDestroyOption_impl; p3[k] = pfSetOption_impl; k++; p0[k] = &options; p1[k] = NULL; /* */ p2[k] = pfDestroyOption_impl; p3[k] = pfSetOption_impl; k++; p0[k] = &options; p1[k] = pfCloneOption_impl; p2[k] = NULL; /* */ p3[k] = pfSetOption_impl; k++; p0[k] = &options; p1[k] = pfCloneOption_impl; p2[k] = pfDestroyOption_impl; p3[k] = NULL; k++; // Cycle through each failing combo of parameters for (i = 0; i < RETRIEVE_PV_COUNT; i++) { ///arrange TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_HANDLE result = NULL; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, OPTION_X509_ECC_KEY, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_retrieve_options_ex(p0[i], p1[i], p2[i], p3[i]); ///assert ASSERT_IS_NULL(result, "Unexpected success with bad retrieve parameter"); ///clean tlsio_options_release_resources(&options); } } TEST_FUNCTION(tlsio_options__retrieve_ex_OptionHandler_Create_fail__fails) { int i; int k = 0; const char* p0[SET_NOT_SUPPORTED_COUNT]; TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_HANDLE result; p0[k] = OPTION_TRUSTED_CERT; /* */ k++; p0[k] = SU_OPTION_X509_CERT; /* */ k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ k++; p0[k] = OPTION_X509_ECC_KEY; /* */ k++; use_negative_mocks(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); umock_c_negative_tests_snapshot(); // Cycle through each option for (i = 0; i < SET_NOT_SUPPORTED_COUNT; i++) { ///arrange tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, p0[i], fake_x509_key); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(0); ///act result = tlsio_options_retrieve_options_ex(&options, pfCloneOption_impl, pfDestroyOption_impl, pfSetOption_impl); ///assert ASSERT_IS_NULL(result, "Unexpected success with OptionHandler_Create failure"); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } umock_c_negative_tests_deinit(); } TEST_FUNCTION(tlsio_options__retrieve_ex_OptionHandler_AddOption_fail__fails) { int i; int k = 0; const char* p0[SET_NOT_SUPPORTED_COUNT]; TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_HANDLE result; p0[k] = OPTION_TRUSTED_CERT; /* */ k++; p0[k] = SU_OPTION_X509_CERT; /* */ k++; p0[k] = SU_OPTION_X509_PRIVATE_KEY; k++; p0[k] = OPTION_X509_ECC_CERT; /* */ k++; p0[k] = OPTION_X509_ECC_KEY; /* */ k++; use_negative_mocks(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); umock_c_negative_tests_snapshot(); // Cycle through each option for (i = 0; i < SET_NOT_SUPPORTED_COUNT; i++) { ///arrange tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, p0[i], fake_x509_key); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(2); ///act result = tlsio_options_retrieve_options_ex(&options, pfCloneOption_impl, pfDestroyOption_impl, pfSetOption_impl); ///assert ASSERT_IS_NULL(result, "Unexpected success with OptionHandler_Create failure"); ///clean tlsio_options_release_resources(&options); assert_gballoc_checks(); } umock_c_negative_tests_deinit(); } // The tlsio_options_retrieve_options is a simple pass-through to tlsio_options_retrieve_options_ex, // so a single success case is sufficient for validation TEST_FUNCTION(tlsio_options__retrieve__succeeds) { ///arrange TLSIO_OPTIONS options; TLSIO_OPTIONS_RESULT set_result; OPTIONHANDLER_RESULT option_handler_result; OPTIONHANDLER_HANDLE result = NULL; tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); set_result = tlsio_options_set(&options, OPTION_X509_ECC_KEY, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)set_result, (int)TLSIO_OPTIONS_RESULT_SUCCESS); ///act result = tlsio_options_retrieve_options(&options, pfSetOption_impl); ///assert ASSERT_IS_NOT_NULL(result); tlsio_options_release_resources(&options); tlsio_options_initialize(&options, TLSIO_OPTION_BIT_TRUSTED_CERTS | TLSIO_OPTION_BIT_x509_RSA_CERT | TLSIO_OPTION_BIT_x509_ECC_CERT); option_handler_result = OptionHandler_FeedOptions(result, &options); ASSERT_ARE_EQUAL(int, (int)option_handler_result, (int)OPTIONHANDLER_OK); ASSERT_COPIED_STRING(options.x509_key, fake_trusted_cert); ASSERT_ARE_EQUAL(int, (int)options.x509_type, (int)TLSIO_OPTIONS_x509_TYPE_ECC); ///clean tlsio_options_release_resources(&options); OptionHandler_Destroy(result); assert_gballoc_checks(); } END_TEST_SUITE(tlsio_options_unittests) tlsio_wolfssl_ut/000077500000000000000000000000001362133436400340325ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000010111362133436400365630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_wolfssl_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName tlsio_wolfssl_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../adapters/tlsio_wolfssl.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000004771362133436400351320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_wolfssl_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(tlsio_wolfssl_ut, failedTestCount); return failedTestCount; } tlsio_wolfssl_ut.c000066400000000000000000000717271362133436400376270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/tlsio_wolfssl_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } static void my_gballoc_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_stdint.h" #include "umock_c_negative_tests.h" #include "azure_c_shared_utility/macro_utils.h" #include "wolfssl/options.h" #include "wolfssl/ssl.h" #include "wolfssl/error-ssl.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/umock_c_prod.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xlogging.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/xio.h" MOCKABLE_FUNCTION(, void, on_bytes_recv, void*, context, const unsigned char*, buffer, size_t, size); MOCKABLE_FUNCTION(, void, on_error, void*, context); MOCKABLE_FUNCTION(, void, on_close_complete, void*, context); #undef ENABLE_MOCKS #include "azure_c_shared_utility/tlsio_wolfssl.h" static TEST_MUTEX_HANDLE g_testByTest; static TEST_MUTEX_HANDLE g_dllByDll; #define BUFFER_LEN 10 #define TEST_DEVICE_ID 11 #define WOLFSSL_READ_LIMIT 5 static WOLFSSL_METHOD* TEST_WOLFSSL_CLIENT_METHOD = (WOLFSSL_METHOD*)0x0011; static WOLFSSL_CTX* TEST_WOLFSSL_CTX = (WOLFSSL_CTX*)0x0012; static WOLFSSL* TEST_WOLFSSL = (WOLFSSL*)0x0013; static const IO_INTERFACE_DESCRIPTION* TEST_SOCKETIO_INTERFACE_DESCRIPTION = (const IO_INTERFACE_DESCRIPTION*)0x0014; static XIO_HANDLE TEST_IO_HANDLE = (XIO_HANDLE)0x0015; static const unsigned char TEST_BUFFER[] = { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xA }; static const size_t TEST_BUFFER_LEN = BUFFER_LEN; static const char* TEST_TRUSTED_CERT = "test_trusted_cert"; static HandShakeDoneCb g_handshake_done_cb = NULL; static void* g_handshake_done_ctx = NULL; static ON_BYTES_RECEIVED g_on_bytes_received; static void* g_on_bytes_received_context; static ON_IO_ERROR g_on_io_error; static void* g_on_io_error_context; static CallbackIORecv g_wolfssl_cb_rcv; static void* g_wolfssl_rcv_ctx; MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_SetIORecv, WOLFSSL_CTX*, ctx, CallbackIORecv, cb_rcv) g_wolfssl_cb_rcv = cb_rcv; MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_SetIOSend, WOLFSSL_CTX*, ctx, CallbackIORecv, cb_rcv) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_SetIOReadCtx, WOLFSSL*, ssl, void*, ctx) g_wolfssl_rcv_ctx = ctx; MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_SetIOWriteCtx, WOLFSSL*, ssl, void*, ctx) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, WOLFSSL_METHOD*, wolfTLSv1_2_client_method) MOCK_FUNCTION_END(TEST_WOLFSSL_CLIENT_METHOD) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, WOLFSSL_CTX*, wolfSSL_CTX_new, WOLFSSL_METHOD*, method) MOCK_FUNCTION_END(TEST_WOLFSSL_CTX) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, WOLFSSL*, wolfSSL_new, WOLFSSL_CTX*, ctx) MOCK_FUNCTION_END(TEST_WOLFSSL) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_set_using_nonblock, WOLFSSL*, ssl, int, opt); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_connect, WOLFSSL*, ssl) MOCK_FUNCTION_END(SSL_SUCCESS) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_write, WOLFSSL*, ssl, const void*, data, int, len) MOCK_FUNCTION_END(len) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_read, WOLFSSL*, ssl, void*, buff, int, len) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_CTX_free, WOLFSSL_CTX*, ctx) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_free, WOLFSSL*, ssl) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, void, wolfSSL_load_error_strings) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_library_init) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_CTX_load_verify_buffer, WOLFSSL_CTX*, ctx, const unsigned char*, buff, long, len, int, opt) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_use_PrivateKey_buffer, WOLFSSL*, ssl, const unsigned char*, buff, long, len, int, opt) MOCK_FUNCTION_END(SSL_SUCCESS) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_use_certificate_chain_buffer, WOLFSSL*, ssl, const unsigned char*, chain_buff, long, len) MOCK_FUNCTION_END(SSL_SUCCESS) MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_SetHsDoneCb, WOLFSSL*, ssl, HandShakeDoneCb, hs_cb, void*, ctx) g_handshake_done_cb = hs_cb; g_handshake_done_ctx = ctx; MOCK_FUNCTION_END(0) #ifdef HAVE_SECURE_RENEGOTIATION MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_UseSecureRenegotiation, WOLFSSL*, ssl) MOCK_FUNCTION_END(SSL_SUCCESS) #endif #ifdef INVALID_DEVID MOCK_FUNCTION_WITH_CODE(WOLFSSL_API, int, wolfSSL_SetDevId, WOLFSSL*, ssl, int, devId) MOCK_FUNCTION_END(WOLFSSL_SUCCESS) #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static int my_mallocAndStrcpy_s(char** destination, const char* source) { *destination = (char*)malloc(strlen(source) + 1); (void)strcpy(*destination, source); return 0; } static void execute_wolfssl_open(ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context) { on_io_open_complete(on_io_open_complete_context, IO_OPEN_OK); if (g_handshake_done_cb != NULL) { g_handshake_done_cb(TEST_WOLFSSL, g_handshake_done_ctx); } } static void on_io_open_complete(void* context, IO_OPEN_RESULT open_result) { (void)context; (void)open_result; } static void on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } static int my_xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { (void)xio; g_on_io_error = on_io_error; g_on_io_error_context = on_io_error_context; g_on_bytes_received = on_bytes_received; g_on_bytes_received_context = on_bytes_received_context; execute_wolfssl_open(on_io_open_complete, on_io_open_complete_context); return 0; } static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(tlsio_wolfssl_ut) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_UMOCK_ALIAS_TYPE(CONCRETE_IO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(XIO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(CallbackIORecv, void*); REGISTER_UMOCK_ALIAS_TYPE(HandShakeDoneCb, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_OPEN_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_ERROR, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_CLOSE_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_realloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, my_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_RETURN(socketio_get_interface_description, TEST_SOCKETIO_INTERFACE_DESCRIPTION); REGISTER_GLOBAL_MOCK_RETURN(xio_create, TEST_IO_HANDLE); REGISTER_GLOBAL_MOCK_HOOK(xio_open, my_xio_open); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } g_on_bytes_received = NULL; g_on_bytes_received_context = NULL; g_on_io_error = NULL; g_on_io_error_context = NULL; g_wolfssl_cb_rcv = NULL; g_handshake_done_cb = NULL; g_handshake_done_ctx = NULL; umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } TEST_FUNCTION(tlsio_wolfssl_create_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); /*STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(wolfTLSv1_2_client_method()); STRICT_EXPECTED_CALL(wolfSSL_CTX_new(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(IGNORED_NUM_ARG, IGNORED_NUM_ARG));*/ //act CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); //assert ASSERT_IS_NOT_NULL(io_handle); //ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_create_config_NULL_fail) { //arrange //act CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(NULL); //assert ASSERT_IS_NULL(io_handle); //clean } TEST_FUNCTION(tlsio_wolfssl_destroy_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(wolfSSL_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(wolfSSL_CTX_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); //act tlsio_wolfssl_destroy(io_handle); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean } TEST_FUNCTION(tlsio_wolfssl_destroy_handle_NULL_succeeds) { //arrange //act tlsio_wolfssl_destroy(NULL); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean } TEST_FUNCTION(tlsio_wolfssl_open_handle_NULL_fail) { //arrange //act int test_result = tlsio_wolfssl_open(NULL, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean } TEST_FUNCTION(tlsio_wolfssl_open_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_open_with_cert_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_setoption(io_handle, SU_OPTION_X509_CERT, TEST_TRUSTED_CERT); (void)tlsio_wolfssl_setoption(io_handle, SU_OPTION_X509_PRIVATE_KEY, TEST_TRUSTED_CERT); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_open_set_dev_id_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(wolfSSL_SetDevId(TEST_WOLFSSL, 11)); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(wolfSSL_connect(TEST_WOLFSSL)); //act int device_id = TEST_DEVICE_ID; int test_result = tlsio_wolfssl_setoption(io_handle, OPTION_WOLFSSL_SET_DEVICE_ID, &device_id); ASSERT_ARE_EQUAL(int, 0, test_result); test_result = tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); //assert ASSERT_ARE_EQUAL(int, 0, test_result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_open_set_dev_id_2_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(wolfSSL_connect(TEST_WOLFSSL)); STRICT_EXPECTED_CALL(wolfSSL_SetDevId(TEST_WOLFSSL, 11)); //act int test_result = tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); ASSERT_ARE_EQUAL(int, 0, test_result); int device_id = TEST_DEVICE_ID; test_result = tlsio_wolfssl_setoption(io_handle, OPTION_WOLFSSL_SET_DEVICE_ID, &device_id); //assert ASSERT_ARE_EQUAL(int, 0, test_result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_on_handshake_done_succeed) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act int test_result = g_handshake_done_cb(TEST_WOLFSSL, g_handshake_done_ctx); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_close_handle_NULL_fail) { //arrange //act int test_result = tlsio_wolfssl_close(NULL, on_close_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean } TEST_FUNCTION(tlsio_wolfssl_close_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_close(io_handle, on_close_complete, NULL); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_close_not_open_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_close(io_handle, on_close_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_send_handle_NULL_fail) { //arrange umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_send(NULL, TEST_BUFFER, TEST_BUFFER_LEN, on_send_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean } TEST_FUNCTION(tlsio_wolfssl_send_buffer_0_fail) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_send(io_handle, NULL, 0, on_send_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_send_not_open_fail) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_send(io_handle, TEST_BUFFER, TEST_BUFFER_LEN, on_send_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_send_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_send(io_handle, TEST_BUFFER, TEST_BUFFER_LEN, on_send_complete, NULL); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_send_write_returns_zero_fail) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(wolfSSL_write(TEST_WOLFSSL, TEST_BUFFER, TEST_BUFFER_LEN)).SetReturn(0); //act int test_result = tlsio_wolfssl_send(io_handle, TEST_BUFFER, TEST_BUFFER_LEN, on_send_complete, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_dowork_handle_NULL_succeeds) { //arrange //act tlsio_wolfssl_dowork(NULL); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean } TEST_FUNCTION(tlsio_wolfssl_dowork_NOT_OPEN_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act tlsio_wolfssl_dowork(NULL); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_dowork_succeeds) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(wolfSSL_read(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)).CopyOutArgumentBuffer_buff(&TEST_BUFFER, BUFFER_LEN).SetReturn(BUFFER_LEN); STRICT_EXPECTED_CALL(on_bytes_recv(NULL, IGNORED_PTR_ARG, BUFFER_LEN)); STRICT_EXPECTED_CALL(wolfSSL_read(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); //act tlsio_wolfssl_dowork(io_handle); //assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_get_interface_description_succeed) { //arrange umock_c_reset_all_calls(); //act const IO_INTERFACE_DESCRIPTION* interface_desc = tlsio_wolfssl_get_interface_description(); //assert ASSERT_IS_NOT_NULL(interface_desc->concrete_io_retrieveoptions); ASSERT_IS_NOT_NULL(interface_desc->concrete_io_create); ASSERT_IS_NOT_NULL(interface_desc->concrete_io_destroy); ASSERT_IS_NOT_NULL(interface_desc->concrete_io_open); ASSERT_IS_NOT_NULL(interface_desc->concrete_io_close); ASSERT_IS_NOT_NULL(interface_desc->concrete_io_send); ASSERT_IS_NOT_NULL(interface_desc->concrete_io_dowork); ASSERT_IS_NOT_NULL(interface_desc->concrete_io_setoption); //clean } TEST_FUNCTION(tlsio_wolfssl_setoption_tls_io_NULL_Fail) { //arrange umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_setoption(NULL, OPTION_TRUSTED_CERT, TEST_TRUSTED_CERT); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean } TEST_FUNCTION(tlsio_wolfssl_setoption_option_name_NULL_Fail) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_setoption(io_handle, NULL, TEST_TRUSTED_CERT); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_setoption_trusted_cert_succeed) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_setoption(io_handle, OPTION_TRUSTED_CERT, TEST_TRUSTED_CERT); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_setoption_trusted_cert_twice_succeed) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act int test_result = tlsio_wolfssl_setoption(io_handle, OPTION_TRUSTED_CERT, TEST_TRUSTED_CERT); ASSERT_ARE_EQUAL(int, 0, test_result); test_result = tlsio_wolfssl_setoption(io_handle, OPTION_TRUSTED_CERT, TEST_TRUSTED_CERT); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } #ifdef INVALID_DEVID TEST_FUNCTION(tlsio_wolfssl_setoption_device_id_succeed) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); //act int device_id = TEST_DEVICE_ID; int test_result = tlsio_wolfssl_setoption(io_handle, OPTION_WOLFSSL_SET_DEVICE_ID, &device_id); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_setoption_device_id_fail) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(wolfSSL_SetDevId(TEST_WOLFSSL, 11)).SetReturn(0); //act int device_id = TEST_DEVICE_ID; int test_result = tlsio_wolfssl_setoption(io_handle, OPTION_WOLFSSL_SET_DEVICE_ID, &device_id); //assert ASSERT_ARE_NOT_EQUAL(int, 0, test_result); //clean tlsio_wolfssl_destroy(io_handle); } #endif TEST_FUNCTION(tlsio_wolfssl_on_underlying_io_bytes_received_ctx_NULL_succeess) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act g_on_bytes_received(NULL, TEST_BUFFER, TEST_BUFFER_LEN); //assert //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_on_underlying_io_bytes_received_realloc_NULL_success) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)).SetReturn(NULL); //act g_on_bytes_received(g_on_bytes_received_context, TEST_BUFFER, TEST_BUFFER_LEN); //assert //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_on_underlying_io_bytes_received_success) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); //act g_on_bytes_received(g_on_bytes_received_context, TEST_BUFFER, TEST_BUFFER_LEN); //assert //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_on_underlying_io_error_success) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act g_on_io_error(g_on_io_error_context); //assert //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_on_underlying_io_error_ctx_NULL_success) { //arrange TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act g_on_io_error(NULL); //assert //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_on_io_recv_on_open_success) { //arrange char recv_buff[BUFFER_LEN]; TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); //act int test_result = g_wolfssl_cb_rcv(TEST_WOLFSSL, recv_buff, BUFFER_LEN, g_wolfssl_rcv_ctx); //assert ASSERT_ARE_EQUAL(int, WOLFSSL_CBIO_ERR_WANT_READ, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } TEST_FUNCTION(tlsio_wolfssl_on_io_recv_timeout_success) { //arrange char recv_buff[BUFFER_LEN]; TLSIO_CONFIG tls_io_config; memset(&tls_io_config, 0, sizeof(tls_io_config)); CONCRETE_IO_HANDLE io_handle = tlsio_wolfssl_create(&tls_io_config); // ensure we stay in the handshake mode g_handshake_done_cb = NULL; (void)tlsio_wolfssl_open(io_handle, on_io_open_complete, NULL, on_bytes_recv, NULL, on_error, NULL); umock_c_reset_all_calls(); for (size_t index = 0; index < WOLFSSL_READ_LIMIT; index++) { STRICT_EXPECTED_CALL(xio_dowork(IGNORED_PTR_ARG)); } //act int test_result = g_wolfssl_cb_rcv(TEST_WOLFSSL, recv_buff, BUFFER_LEN, g_wolfssl_rcv_ctx); //assert ASSERT_ARE_EQUAL(int, 0, test_result); //clean (void)tlsio_wolfssl_close(io_handle, on_close_complete, NULL); tlsio_wolfssl_destroy(io_handle); } END_TEST_SUITE(tlsio_wolfssl_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uniqueid_ut/000077500000000000000000000000001362133436400330315ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000021101362133436400355040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uniqueid_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName uniqueid_ut) if(WIN32) set(uniqueid_ut_test_file ${theseTestsName}_win32.c) else() set(uniqueid_ut_test_file ${theseTestsName}_linux.c) endif() set(${theseTestsName}_test_files ${uniqueid_ut_test_file} ) set(${theseTestsName}_c_files ${UNIQUEID_C_FILE} ) set(${theseTestsName}_h_files ) if(APPLE) find_package(PkgConfig REQUIRED) pkg_search_module(UUID REQUIRED uuid) endif() if(WIN32) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests" ADDITIONAL_LIBS rpcrt4.lib) elseif(UNIX) if(APPLE) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests" ADDITIONAL_LIBS -L${UUID_LIBRARY_DIRS} ${UUID_LIBRARIES}) else() build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests" ADDITIONAL_LIBS uuid) endif() endif() compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005061362133436400340430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uniqueid_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(uniqueid_unittests, failedTestCount); return (int)failedTestCount; } uniqueid_ut_linux.c000066400000000000000000000041501362133436400366700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uniqueid_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/uniqueid.h" static TEST_MUTEX_HANDLE g_testByTest; static TEST_MUTEX_HANDLE g_dllByDll; TEST_DEFINE_ENUM_TYPE(UNIQUEID_RESULT, UNIQUEID_RESULT_VALUES); #define BUFFER_SIZE 37 static char* uidBuffer = NULL; static char* uidBuffer2 = NULL; BEGIN_TEST_SUITE(uniqueid_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest) != 0) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { if (uidBuffer != NULL) { free(uidBuffer); uidBuffer = NULL; } if (uidBuffer2 != NULL) { free(uidBuffer2); uidBuffer2 = NULL; } TEST_MUTEX_RELEASE(g_testByTest); } /* UniqueId_Generate */ TEST_FUNCTION(UniqueId_Generate_UID_NULL_Fail) { //Arrange //Act UNIQUEID_RESULT result = UniqueId_Generate(NULL, BUFFER_SIZE); //Assert ASSERT_ARE_EQUAL(UNIQUEID_RESULT, UNIQUEID_INVALID_ARG, result); } TEST_FUNCTION(UniqueId_Generate_Len_too_small_Fail) { //Arrange char uid[BUFFER_SIZE]; //Act UNIQUEID_RESULT result = UniqueId_Generate(uid, BUFFER_SIZE/2); //Assert ASSERT_ARE_EQUAL(UNIQUEID_RESULT, UNIQUEID_INVALID_ARG, result); } TEST_FUNCTION(UniqueId_Generate_Succeed) { //Arrange char uid[BUFFER_SIZE]; //Act UNIQUEID_RESULT result = UniqueId_Generate(uid, BUFFER_SIZE); //Assert ASSERT_ARE_EQUAL(UNIQUEID_RESULT, UNIQUEID_OK, result); ASSERT_ARE_EQUAL(size_t, 36, strlen(uid) ); } END_TEST_SUITE(uniqueid_unittests) uniqueid_ut_win32.c000066400000000000000000000041451362133436400364770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uniqueid_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/uniqueid.h" #include static TEST_MUTEX_HANDLE g_testByTest; TEST_DEFINE_ENUM_TYPE(UNIQUEID_RESULT, UNIQUEID_RESULT_VALUES); #define BUFFER_SIZE 37 BEGIN_TEST_SUITE(uniqueid_unittests) TEST_SUITE_INITIALIZE(suite_init) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* UniqueId_Generate */ /* Tests_SRS_UNIQUEID_07_002: [If uid is NULL then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ TEST_FUNCTION(UniqueId_Generate_UID_NULL_Fail) { //Arrange //Act UNIQUEID_RESULT result = UniqueId_Generate(NULL, BUFFER_SIZE); //Assert ASSERT_ARE_EQUAL(UNIQUEID_RESULT, UNIQUEID_INVALID_ARG, result); } /* Tests_SRS_UNIQUEID_07_003: [If len is less then 37 then UniqueId_Generate shall return UNIQUEID_INVALID_ARG] */ TEST_FUNCTION(UniqueId_Generate_Len_too_small_Fail) { //Arrange char uid[BUFFER_SIZE]; //Act UNIQUEID_RESULT result = UniqueId_Generate(uid, BUFFER_SIZE/2); //Assert ASSERT_ARE_EQUAL(UNIQUEID_RESULT, UNIQUEID_INVALID_ARG, result); } /* Tests_SRS_UNIQUEID_07_001: [UniqueId_Generate shall create a unique Id 36 character long string.] */ TEST_FUNCTION(UniqueId_Generate_Succeed) { //Arrange char uid[BUFFER_SIZE]; //Act UNIQUEID_RESULT result = UniqueId_Generate(uid, BUFFER_SIZE); //Assert ASSERT_ARE_EQUAL(UNIQUEID_RESULT, UNIQUEID_OK, result); ASSERT_ARE_EQUAL(size_t, 36, strlen(uid) ); } END_TEST_SUITE(uniqueid_unittests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/urlencode_ut/000077500000000000000000000000001362133436400331665ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000010101362133436400356370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/urlencode_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName urlencode_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/urlencode.c ../../src/strings.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005021362133436400341740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/urlencode_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(URLEncode_UnitTests, failedTestCount); return failedTestCount; } urlencode_ut.c000066400000000000000000000756301362133436400357560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/urlencode_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #endif void* real_malloc(size_t size) { return malloc(size); } void* real_realloc(void* ptr, size_t size) { return realloc(ptr, size); } void real_free(void* ptr) { free(ptr); } #include "testrunnerswitcher.h" #include "umock_c.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/urlencode.h" #include "azure_c_shared_utility/strings.h" static const struct { const char* inputData; const char* expectedOutput; } testVector[] = { { "\x01", "%01" }, { "\x02", "%02" }, { "\x03", "%03" }, { "\x04", "%04" }, { "\x05", "%05" }, { "\x06", "%06" }, { "\x07", "%07" }, { "\x08", "%08" }, { "\x09", "%09" }, { "\x0a", "%0a" }, { "\x0b", "%0b" }, { "\x0c", "%0c" }, { "\x0d", "%0d" }, { "\x0e", "%0e" }, { "\x0f", "%0f" }, { "\x10", "%10" }, { "\x11", "%11" }, { "\x12", "%12" }, { "\x13", "%13" }, { "\x14", "%14" }, { "\x15", "%15" }, { "\x16", "%16" }, { "\x17", "%17" }, { "\x18", "%18" }, { "\x19", "%19" }, { "\x1a", "%1a" }, { "\x1b", "%1b" }, { "\x1c", "%1c" }, { "\x1d", "%1d" }, { "\x1e", "%1e" }, { "\x1f", "%1f" }, { "\x20", "%20" }, { "\x21", "!" }, { "\x22", "%22" }, { "\x23", "%23" }, { "\x24", "%24" }, { "\x25", "%25" }, { "\x26", "%26" }, { "\x27", "%27" }, { "\x28", "(" }, { "\x29", ")" }, { "\x2a", "*" }, { "\x2b", "%2b" }, { "\x2c", "%2c" }, { "\x2d", "-" }, { "\x2e", "." }, { "\x2f", "%2f" }, { "\x30", "0" }, { "\x31", "1" }, { "\x32", "2" }, { "\x33", "3" }, { "\x34", "4" }, { "\x35", "5" }, { "\x36", "6" }, { "\x37", "7" }, { "\x38", "8" }, { "\x39", "9" }, { "\x3a", "%3a" }, { "\x3b", "%3b" }, { "\x3c", "%3c" }, { "\x3d", "%3d" }, { "\x3e", "%3e" }, { "\x3f", "%3f" }, { "\x40", "%40" }, { "\x41", "A" }, { "\x42", "B" }, { "\x43", "C" }, { "\x44", "D" }, { "\x45", "E" }, { "\x46", "F" }, { "\x47", "G" }, { "\x48", "H" }, { "\x49", "I" }, { "\x4a", "J" }, { "\x4b", "K" }, { "\x4c", "L" }, { "\x4d", "M" }, { "\x4e", "N" }, { "\x4f", "O" }, { "\x50", "P" }, { "\x51", "Q" }, { "\x52", "R" }, { "\x53", "S" }, { "\x54", "T" }, { "\x55", "U" }, { "\x56", "V" }, { "\x57", "W" }, { "\x58", "X" }, { "\x59", "Y" }, { "\x5a", "Z" }, { "\x5b", "%5b" }, { "\x5c", "%5c" }, { "\x5d", "%5d" }, { "\x5e", "%5e" }, { "\x5f", "_" }, { "\x60", "%60" }, { "\x61", "a" }, { "\x62", "b" }, { "\x63", "c" }, { "\x64", "d" }, { "\x65", "e" }, { "\x66", "f" }, { "\x67", "g" }, { "\x68", "h" }, { "\x69", "i" }, { "\x6a", "j" }, { "\x6b", "k" }, { "\x6c", "l" }, { "\x6d", "m" }, { "\x6e", "n" }, { "\x6f", "o" }, { "\x70", "p" }, { "\x71", "q" }, { "\x72", "r" }, { "\x73", "s" }, { "\x74", "t" }, { "\x75", "u" }, { "\x76", "v" }, { "\x77", "w" }, { "\x78", "x" }, { "\x79", "y" }, { "\x7a", "z" }, { "\x7b", "%7b" }, { "\x7c", "%7c" }, { "\x7d", "%7d" }, { "\x7e", "%7e" }, { "\x7f", "%7f" }, { "\x80", "%c2%80" }, { "\x81", "%c2%81" }, { "\x82", "%c2%82" }, { "\x83", "%c2%83" }, { "\x84", "%c2%84" }, { "\x85", "%c2%85" }, { "\x86", "%c2%86" }, { "\x87", "%c2%87" }, { "\x88", "%c2%88" }, { "\x89", "%c2%89" }, { "\x8a", "%c2%8a" }, { "\x8b", "%c2%8b" }, { "\x8c", "%c2%8c" }, { "\x8d", "%c2%8d" }, { "\x8e", "%c2%8e" }, { "\x8f", "%c2%8f" }, { "\x90", "%c2%90" }, { "\x91", "%c2%91" }, { "\x92", "%c2%92" }, { "\x93", "%c2%93" }, { "\x94", "%c2%94" }, { "\x95", "%c2%95" }, { "\x96", "%c2%96" }, { "\x97", "%c2%97" }, { "\x98", "%c2%98" }, { "\x99", "%c2%99" }, { "\x9a", "%c2%9a" }, { "\x9b", "%c2%9b" }, { "\x9c", "%c2%9c" }, { "\x9d", "%c2%9d" }, { "\x9e", "%c2%9e" }, { "\x9f", "%c2%9f" }, { "\xa0", "%c2%a0" }, { "\xa1", "%c2%a1" }, { "\xa2", "%c2%a2" }, { "\xa3", "%c2%a3" }, { "\xa4", "%c2%a4" }, { "\xa5", "%c2%a5" }, { "\xa6", "%c2%a6" }, { "\xa7", "%c2%a7" }, { "\xa8", "%c2%a8" }, { "\xa9", "%c2%a9" }, { "\xaa", "%c2%aa" }, { "\xab", "%c2%ab" }, { "\xac", "%c2%ac" }, { "\xad", "%c2%ad" }, { "\xae", "%c2%ae" }, { "\xaf", "%c2%af" }, { "\xb0", "%c2%b0" }, { "\xb1", "%c2%b1" }, { "\xb2", "%c2%b2" }, { "\xb3", "%c2%b3" }, { "\xb4", "%c2%b4" }, { "\xb5", "%c2%b5" }, { "\xb6", "%c2%b6" }, { "\xb7", "%c2%b7" }, { "\xb8", "%c2%b8" }, { "\xb9", "%c2%b9" }, { "\xba", "%c2%ba" }, { "\xbb", "%c2%bb" }, { "\xbc", "%c2%bc" }, { "\xbd", "%c2%bd" }, { "\xbe", "%c2%be" }, { "\xbf", "%c2%bf" }, { "\xc0", "%c3%80" }, { "\xc1", "%c3%81" }, { "\xc2", "%c3%82" }, { "\xc3", "%c3%83" }, { "\xc4", "%c3%84" }, { "\xc5", "%c3%85" }, { "\xc6", "%c3%86" }, { "\xc7", "%c3%87" }, { "\xc8", "%c3%88" }, { "\xc9", "%c3%89" }, { "\xca", "%c3%8a" }, { "\xcb", "%c3%8b" }, { "\xcc", "%c3%8c" }, { "\xcd", "%c3%8d" }, { "\xce", "%c3%8e" }, { "\xcf", "%c3%8f" }, { "\xd0", "%c3%90" }, { "\xd1", "%c3%91" }, { "\xd2", "%c3%92" }, { "\xd3", "%c3%93" }, { "\xd4", "%c3%94" }, { "\xd5", "%c3%95" }, { "\xd6", "%c3%96" }, { "\xd7", "%c3%97" }, { "\xd8", "%c3%98" }, { "\xd9", "%c3%99" }, { "\xda", "%c3%9a" }, { "\xdb", "%c3%9b" }, { "\xdc", "%c3%9c" }, { "\xdd", "%c3%9d" }, { "\xde", "%c3%9e" }, { "\xdf", "%c3%9f" }, { "\xe0", "%c3%a0" }, { "\xe1", "%c3%a1" }, { "\xe2", "%c3%a2" }, { "\xe3", "%c3%a3" }, { "\xe4", "%c3%a4" }, { "\xe5", "%c3%a5" }, { "\xe6", "%c3%a6" }, { "\xe7", "%c3%a7" }, { "\xe8", "%c3%a8" }, { "\xe9", "%c3%a9" }, { "\xea", "%c3%aa" }, { "\xeb", "%c3%ab" }, { "\xec", "%c3%ac" }, { "\xed", "%c3%ad" }, { "\xee", "%c3%ae" }, { "\xef", "%c3%af" }, { "\xf0", "%c3%b0" }, { "\xf1", "%c3%b1" }, { "\xf2", "%c3%b2" }, { "\xf3", "%c3%b3" }, { "\xf4", "%c3%b4" }, { "\xf5", "%c3%b5" }, { "\xf6", "%c3%b6" }, { "\xf7", "%c3%b7" }, { "\xf8", "%c3%b8" }, { "\xf9", "%c3%b9" }, { "\xfa", "%c3%ba" }, { "\xfb", "%c3%bb" }, { "\xfc", "%c3%bc" }, { "\xfd", "%c3%bd" }, { "\xfe", "%c3%be" }, { "\xff", "%c3%bf" } }; static const struct { const char* charRep; const char* endcodedRep; } testVectorASCII[] = { { "\x01", "%01" }, { "\x02", "%02" }, { "\x03", "%03" }, { "\x04", "%04" }, { "\x05", "%05" }, { "\x06", "%06" }, { "\x07", "%07" }, { "\x08", "%08" }, { "\x09", "%09" }, { "\x0a", "%0a" }, { "\x0b", "%0b" }, { "\x0c", "%0c" }, { "\x0d", "%0d" }, { "\x0e", "%0e" }, { "\x0f", "%0f" }, { "\x10", "%10" }, { "\x11", "%11" }, { "\x12", "%12" }, { "\x13", "%13" }, { "\x14", "%14" }, { "\x15", "%15" }, { "\x16", "%16" }, { "\x17", "%17" }, { "\x18", "%18" }, { "\x19", "%19" }, { "\x1a", "%1a" }, { "\x1b", "%1b" }, { "\x1c", "%1c" }, { "\x1d", "%1d" }, { "\x1e", "%1e" }, { "\x1f", "%1f" }, { "\x20", "%20" }, { "\x21", "!" }, { "\x22", "%22" }, { "\x23", "%23" }, { "\x24", "%24" }, { "\x25", "%25" }, { "\x26", "%26" }, { "\x27", "%27" }, { "\x28", "(" }, { "\x29", ")" }, { "\x2a", "*" }, { "\x2b", "%2b" }, { "\x2c", "%2c" }, { "\x2d", "-" }, { "\x2e", "." }, { "\x2f", "%2f" }, { "\x30", "0" }, { "\x31", "1" }, { "\x32", "2" }, { "\x33", "3" }, { "\x34", "4" }, { "\x35", "5" }, { "\x36", "6" }, { "\x37", "7" }, { "\x38", "8" }, { "\x39", "9" }, { "\x3a", "%3a" }, { "\x3b", "%3b" }, { "\x3c", "%3c" }, { "\x3d", "%3d" }, { "\x3e", "%3e" }, { "\x3f", "%3f" }, { "\x40", "%40" }, { "\x41", "A" }, { "\x42", "B" }, { "\x43", "C" }, { "\x44", "D" }, { "\x45", "E" }, { "\x46", "F" }, { "\x47", "G" }, { "\x48", "H" }, { "\x49", "I" }, { "\x4a", "J" }, { "\x4b", "K" }, { "\x4c", "L" }, { "\x4d", "M" }, { "\x4e", "N" }, { "\x4f", "O" }, { "\x50", "P" }, { "\x51", "Q" }, { "\x52", "R" }, { "\x53", "S" }, { "\x54", "T" }, { "\x55", "U" }, { "\x56", "V" }, { "\x57", "W" }, { "\x58", "X" }, { "\x59", "Y" }, { "\x5a", "Z" }, { "\x5b", "%5b" }, { "\x5c", "%5c" }, { "\x5d", "%5d" }, { "\x5e", "%5e" }, { "\x5f", "_" }, { "\x60", "%60" }, { "\x61", "a" }, { "\x62", "b" }, { "\x63", "c" }, { "\x64", "d" }, { "\x65", "e" }, { "\x66", "f" }, { "\x67", "g" }, { "\x68", "h" }, { "\x69", "i" }, { "\x6a", "j" }, { "\x6b", "k" }, { "\x6c", "l" }, { "\x6d", "m" }, { "\x6e", "n" }, { "\x6f", "o" }, { "\x70", "p" }, { "\x71", "q" }, { "\x72", "r" }, { "\x73", "s" }, { "\x74", "t" }, { "\x75", "u" }, { "\x76", "v" }, { "\x77", "w" }, { "\x78", "x" }, { "\x79", "y" }, { "\x7a", "z" }, { "\x7b", "%7b" }, { "\x7c", "%7c" }, { "\x7d", "%7d" }, { "\x7e", "%7e" }, { "\x7f", "%7f" }, }; static const struct { const char* charRep; const char* endcodedRep; } testVectorExtendedASCII[] = { { "\x80", "%c2%80" }, { "\x81", "%c2%81" }, { "\x82", "%c2%82" }, { "\x83", "%c2%83" }, { "\x84", "%c2%84" }, { "\x85", "%c2%85" }, { "\x86", "%c2%86" }, { "\x87", "%c2%87" }, { "\x88", "%c2%88" }, { "\x89", "%c2%89" }, { "\x8a", "%c2%8a" }, { "\x8b", "%c2%8b" }, { "\x8c", "%c2%8c" }, { "\x8d", "%c2%8d" }, { "\x8e", "%c2%8e" }, { "\x8f", "%c2%8f" }, { "\x90", "%c2%90" }, { "\x91", "%c2%91" }, { "\x92", "%c2%92" }, { "\x93", "%c2%93" }, { "\x94", "%c2%94" }, { "\x95", "%c2%95" }, { "\x96", "%c2%96" }, { "\x97", "%c2%97" }, { "\x98", "%c2%98" }, { "\x99", "%c2%99" }, { "\x9a", "%c2%9a" }, { "\x9b", "%c2%9b" }, { "\x9c", "%c2%9c" }, { "\x9d", "%c2%9d" }, { "\x9e", "%c2%9e" }, { "\x9f", "%c2%9f" }, { "\xa0", "%c2%a0" }, { "\xa1", "%c2%a1" }, { "\xa2", "%c2%a2" }, { "\xa3", "%c2%a3" }, { "\xa4", "%c2%a4" }, { "\xa5", "%c2%a5" }, { "\xa6", "%c2%a6" }, { "\xa7", "%c2%a7" }, { "\xa8", "%c2%a8" }, { "\xa9", "%c2%a9" }, { "\xaa", "%c2%aa" }, { "\xab", "%c2%ab" }, { "\xac", "%c2%ac" }, { "\xad", "%c2%ad" }, { "\xae", "%c2%ae" }, { "\xaf", "%c2%af" }, { "\xb0", "%c2%b0" }, { "\xb1", "%c2%b1" }, { "\xb2", "%c2%b2" }, { "\xb3", "%c2%b3" }, { "\xb4", "%c2%b4" }, { "\xb5", "%c2%b5" }, { "\xb6", "%c2%b6" }, { "\xb7", "%c2%b7" }, { "\xb8", "%c2%b8" }, { "\xb9", "%c2%b9" }, { "\xba", "%c2%ba" }, { "\xbb", "%c2%bb" }, { "\xbc", "%c2%bc" }, { "\xbd", "%c2%bd" }, { "\xbe", "%c2%be" }, { "\xbf", "%c2%bf" }, { "\xc0", "%c3%80" }, { "\xc1", "%c3%81" }, { "\xc2", "%c3%82" }, { "\xc3", "%c3%83" }, { "\xc4", "%c3%84" }, { "\xc5", "%c3%85" }, { "\xc6", "%c3%86" }, { "\xc7", "%c3%87" }, { "\xc8", "%c3%88" }, { "\xc9", "%c3%89" }, { "\xca", "%c3%8a" }, { "\xcb", "%c3%8b" }, { "\xcc", "%c3%8c" }, { "\xcd", "%c3%8d" }, { "\xce", "%c3%8e" }, { "\xcf", "%c3%8f" }, { "\xd0", "%c3%90" }, { "\xd1", "%c3%91" }, { "\xd2", "%c3%92" }, { "\xd3", "%c3%93" }, { "\xd4", "%c3%94" }, { "\xd5", "%c3%95" }, { "\xd6", "%c3%96" }, { "\xd7", "%c3%97" }, { "\xd8", "%c3%98" }, { "\xd9", "%c3%99" }, { "\xda", "%c3%9a" }, { "\xdb", "%c3%9b" }, { "\xdc", "%c3%9c" }, { "\xdd", "%c3%9d" }, { "\xde", "%c3%9e" }, { "\xdf", "%c3%9f" }, { "\xe0", "%c3%a0" }, { "\xe1", "%c3%a1" }, { "\xe2", "%c3%a2" }, { "\xe3", "%c3%a3" }, { "\xe4", "%c3%a4" }, { "\xe5", "%c3%a5" }, { "\xe6", "%c3%a6" }, { "\xe7", "%c3%a7" }, { "\xe8", "%c3%a8" }, { "\xe9", "%c3%a9" }, { "\xea", "%c3%aa" }, { "\xeb", "%c3%ab" }, { "\xec", "%c3%ac" }, { "\xed", "%c3%ad" }, { "\xee", "%c3%ae" }, { "\xef", "%c3%af" }, { "\xf0", "%c3%b0" }, { "\xf1", "%c3%b1" }, { "\xf2", "%c3%b2" }, { "\xf3", "%c3%b3" }, { "\xf4", "%c3%b4" }, { "\xf5", "%c3%b5" }, { "\xf6", "%c3%b6" }, { "\xf7", "%c3%b7" }, { "\xf8", "%c3%b8" }, { "\xf9", "%c3%b9" }, { "\xfa", "%c3%ba" }, { "\xfb", "%c3%bb" }, { "\xfc", "%c3%bc" }, { "\xfd", "%c3%bd" }, { "\xfe", "%c3%be" }, { "\xff", "%c3%bf" } }; const char* UNRESERVED_CHAR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._"; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(URLEncode_UnitTests) TEST_SUITE_INITIALIZE(TestClassInitialize) { umock_c_init(on_umock_c_error); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, real_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, real_free); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, real_realloc); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); } /* Encode Tests */ TEST_FUNCTION(URL_EncodeString_is_null_should_yield_NULL) { // arrange // act STRING_HANDLE encodedURL = URL_EncodeString(NULL); //assert ASSERT_IS_NULL(encodedURL); } /*Tests_SRS_URL_ENCODE_06_003: [If input is a zero length string then URL_Encode will return a zero length string.]*/ TEST_FUNCTION(URL_EncodeString_new_should_yield_zeroLengthString) { // arrange const char* newString = ""; // act STRING_HANDLE encodedURL = URL_EncodeString(newString); //assert ASSERT_IS_NOT_NULL(encodedURL); ASSERT_ARE_EQUAL(size_t, strlen(STRING_c_str(encodedURL)),0); STRING_delete(encodedURL); } TEST_FUNCTION(URL_EncodeString_is_hello_world) { // arrange const char* hello = "hello world"; // act STRING_HANDLE encodedURL = URL_EncodeString(hello); //assert ASSERT_IS_NOT_NULL(encodedURL); ASSERT_ARE_EQUAL(char_ptr,"hello%20world", STRING_c_str(encodedURL) ); STRING_delete(encodedURL); } TEST_FUNCTION(URL_EncodeString_unreserved_mapping) { // arrange // act STRING_HANDLE encodedUnreservedURL = URL_EncodeString(UNRESERVED_CHAR); //assert ASSERT_IS_NOT_NULL(encodedUnreservedURL); ASSERT_ARE_EQUAL(char_ptr, UNRESERVED_CHAR, STRING_c_str(encodedUnreservedURL) ); STRING_delete(encodedUnreservedURL); } TEST_FUNCTION(URL_EncodeString_path_with_device) { // arrange const char* pathWithDevice = "/getalarm('Le Pichet')"; // act STRING_HANDLE encodedPathWithDevice = URL_EncodeString(pathWithDevice); //assert ASSERT_IS_NOT_NULL(encodedPathWithDevice); ASSERT_ARE_EQUAL(char_ptr, "%2fgetalarm(%27Le%20Pichet%27)", STRING_c_str(encodedPathWithDevice)); STRING_delete(encodedPathWithDevice); } TEST_FUNCTION(URL_EncodeString_a_few_bogus_characters) { // arrange const char* bogusCharacters = "{}%"; // act STRING_HANDLE encodedBogusCharacters = URL_EncodeString(bogusCharacters); //assert ASSERT_IS_NOT_NULL(encodedBogusCharacters); ASSERT_ARE_EQUAL(char_ptr, "%7b%7d%25", STRING_c_str(encodedBogusCharacters)); STRING_delete(encodedBogusCharacters); } TEST_FUNCTION(URL_EncodeString_full_url) { // arrange const char* fullUrl = "https://one.two.three.four-five.com/six/Seven('EightNine1234567890.Ten_Eleven')?twelve-thirteen=2015-11-31 HTTP/1.1"; // act STRING_HANDLE encodedFullUrl = URL_EncodeString(fullUrl); //ASSERT ASSERT_IS_NOT_NULL(encodedFullUrl); ASSERT_ARE_EQUAL(char_ptr, "https%3a%2f%2fone.two.three.four-five.com%2fsix%2fSeven(%27EightNine1234567890.Ten_Eleven%27)%3ftwelve-thirteen%3d2015-11-31%20HTTP%2f1.1", STRING_c_str(encodedFullUrl)); STRING_delete(encodedFullUrl); } TEST_FUNCTION(URL_EncodeString_Exhaustive_chars) { size_t i; size_t numberOfTests = sizeof(testVector) / sizeof(testVector[i]); for (i = 0; i < numberOfTests; i++) { //arrange const char* original = testVector[i].inputData; //act STRING_HANDLE encodedOriginal = URL_EncodeString(original); //assert ASSERT_IS_NOT_NULL(encodedOriginal); ASSERT_ARE_EQUAL(char_ptr, testVector[i].expectedOutput, STRING_c_str(encodedOriginal)); STRING_delete(encodedOriginal); } } /*Tests_SRS_URL_ENCODE_06_001: [If input is NULL then URL_Encode will return NULL.]*/ TEST_FUNCTION(URL_is_null_should_yield_NULL) { // arrange // act STRING_HANDLE encodedURL = URL_Encode(NULL); //assert ASSERT_IS_NULL(encodedURL); } /*Tests_SRS_URL_ENCODE_06_003: [If input is a zero length string then URL_Encode will return a zero length string.]*/ TEST_FUNCTION(URL_new_should_yield_zeroLengthString) { // arrange STRING_HANDLE newString = STRING_new(); // act STRING_HANDLE encodedURL = URL_Encode(newString); //assert ASSERT_IS_NOT_NULL(encodedURL); ASSERT_ARE_EQUAL(size_t, strlen(STRING_c_str(encodedURL)),0); STRING_delete(newString); STRING_delete(encodedURL); } TEST_FUNCTION(URL_is_hello_world) { // arrange STRING_HANDLE encodedURL; STRING_HANDLE hello = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(hello, "hello world"),0); // act encodedURL = URL_Encode(hello); //assert ASSERT_IS_NOT_NULL(encodedURL); ASSERT_ARE_EQUAL(char_ptr,"hello%20world",STRING_c_str(encodedURL)); STRING_delete(hello); STRING_delete(encodedURL); } TEST_FUNCTION(URL_unreserved_mapping) { // arrange STRING_HANDLE encodedUnreservedURL; STRING_HANDLE unreserved = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(unreserved, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._"), 0); // act encodedUnreservedURL = URL_Encode(unreserved); //assert ASSERT_IS_NOT_NULL(encodedUnreservedURL); ASSERT_ARE_EQUAL(char_ptr, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._", STRING_c_str(encodedUnreservedURL)); STRING_delete(unreserved); STRING_delete(encodedUnreservedURL); } TEST_FUNCTION(URL_path_with_device) { // arrange STRING_HANDLE encodedPathWithDevice; STRING_HANDLE pathWithDevice = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(pathWithDevice, "/getalarm('Le Pichet')"), 0); // act encodedPathWithDevice = URL_Encode(pathWithDevice); //assert ASSERT_IS_NOT_NULL(encodedPathWithDevice); ASSERT_ARE_EQUAL(char_ptr, "%2fgetalarm(%27Le%20Pichet%27)", STRING_c_str(encodedPathWithDevice)); STRING_delete(pathWithDevice); STRING_delete(encodedPathWithDevice); } TEST_FUNCTION(URL_a_few_bogus_characters) { // arrange STRING_HANDLE encodedBogusCharacters; STRING_HANDLE bogusCharacters = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(bogusCharacters, "{}%"), 0); // act encodedBogusCharacters = URL_Encode(bogusCharacters); //assert ASSERT_IS_NOT_NULL(encodedBogusCharacters); ASSERT_ARE_EQUAL(char_ptr, "%7b%7d%25", STRING_c_str(encodedBogusCharacters)); STRING_delete(bogusCharacters); STRING_delete(encodedBogusCharacters); } TEST_FUNCTION(URL_full_IOT_url) { // arrange STRING_HANDLE encodedFullUrl; STRING_HANDLE fullUrl = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(fullUrl, "https://one.two.three.four-five.com/six/Seven('EightNine1234567890.Ten_Eleven')?twelve-thirteen=2015-11-31 HTTP/1.1"), 0); // act encodedFullUrl = URL_Encode(fullUrl); //ASSERT ASSERT_IS_NOT_NULL(encodedFullUrl); ASSERT_ARE_EQUAL(char_ptr, "https%3a%2f%2fone.two.three.four-five.com%2fsix%2fSeven(%27EightNine1234567890.Ten_Eleven%27)%3ftwelve-thirteen%3d2015-11-31%20HTTP%2f1.1", STRING_c_str(encodedFullUrl)); STRING_delete(fullUrl); STRING_delete(encodedFullUrl); } TEST_FUNCTION(URL_Exhaustive_chars) { size_t i; size_t numberOfTests = sizeof(testVector) / sizeof(testVector[i]); for (i = 0; i < numberOfTests; i++) { //arrange STRING_HANDLE encodedOriginal; STRING_HANDLE original = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(original, testVector[i].inputData), 0); //act encodedOriginal = URL_Encode(original); //assert ASSERT_IS_NOT_NULL(encodedOriginal); ASSERT_ARE_EQUAL(char_ptr, testVector[i].expectedOutput, STRING_c_str(encodedOriginal)); STRING_delete(original); STRING_delete(encodedOriginal); } } /* Decode Tests */ TEST_FUNCTION(URL_DecodeString_null_input) { //arrange //act STRING_HANDLE decodedURL = URL_DecodeString(NULL); //assert ASSERT_IS_NULL(decodedURL); //cleanup } TEST_FUNCTION(URL_DecodeString_zerolength_input) { //arrange const char* newString = ""; //act STRING_HANDLE decodedURL = URL_DecodeString(newString); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(size_t, 0, strlen(STRING_c_str(decodedURL))); //cleanup STRING_delete(decodedURL); } TEST_FUNCTION(URL_DecodeString_unencoded_input) { //arrange const char* newString = "hello world"; //space is not encoded //act STRING_HANDLE decodedURL = URL_DecodeString(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup } TEST_FUNCTION(URL_DecodeString_partially_unencoded_input) { //arrange const char* newString = "hello%20world&mistake"; //& is an unencoded char //act STRING_HANDLE decodedURL = URL_DecodeString(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup } TEST_FUNCTION(URL_DecodeString_invalid_encoding_incomplete) { //arrange const char* newString = "%7"; //act STRING_HANDLE decodedURL = URL_DecodeString(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup } TEST_FUNCTION(URL_DecodeString_invalid_encoding_non_hex) { //arrange const char* newString = "%G5"; //act STRING_HANDLE decodedURL = URL_DecodeString(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup } TEST_FUNCTION(URL_DecodeString_invalid_has_multibyte_encoding) { //arrange const char* newString = "%C2%B4"; //act STRING_HANDLE decodedURL = URL_DecodeString(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup } TEST_FUNCTION(URL_DecodeString_unreserved_mapping) { //arrange //act STRING_HANDLE decodedURL = URL_DecodeString(UNRESERVED_CHAR); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, UNRESERVED_CHAR, STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); } TEST_FUNCTION(URL_DecodeString_path_with_device) { //arrange const char* input = "%2fgetalarm(%27Le%20Pichet%27)"; //act STRING_HANDLE decodedURL = URL_DecodeString(input); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, "/getalarm('Le Pichet')", STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); } TEST_FUNCTION(URL_DecodeString_a_few_bogus_characters) { //arrange const char* input = "%7b%7d%25"; //act STRING_HANDLE decodedURL = URL_DecodeString(input); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, "{}%", STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); } TEST_FUNCTION(URL_DecodeString_full_url) { //arrange const char* input = "https%3a%2f%2fone.two.three.four-five.com%2fsix%2fSeven(%27EightNine1234567890.Ten_Eleven%27)%3ftwelve-thirteen%3d2015-11-31%20HTTP%2f1.1"; //act STRING_HANDLE decodedURL = URL_DecodeString(input); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, "https://one.two.three.four-five.com/six/Seven('EightNine1234567890.Ten_Eleven')?twelve-thirteen=2015-11-31 HTTP/1.1", STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); } TEST_FUNCTION(URL_DecodeString_ASCII_chars) { size_t i; size_t numberOfTests = sizeof(testVectorASCII) / sizeof(testVectorASCII[i]); for (i = 0; i < numberOfTests; i++) { //arrange STRING_HANDLE decoded; //act decoded = URL_DecodeString(testVectorASCII[i].endcodedRep); //assert ASSERT_IS_NOT_NULL(decoded); ASSERT_ARE_EQUAL(char_ptr, testVectorASCII[i].charRep, STRING_c_str(decoded)); STRING_delete(decoded); } } TEST_FUNCTION(URL_DecodeString_Extended_ASCII_chars) { size_t i; size_t numberOfTests = sizeof(testVectorExtendedASCII) / sizeof(testVectorExtendedASCII[i]); for (i = 0; i < numberOfTests; i++) { //arrange STRING_HANDLE decoded; //act decoded = URL_DecodeString(testVectorExtendedASCII[i].endcodedRep); //assert ASSERT_IS_NULL(decoded); //these should be rejected by the function STRING_delete(decoded); } } TEST_FUNCTION(URL_Decode_null_input) { //arrange //act STRING_HANDLE decodedURL = URL_Decode(NULL); //assert ASSERT_IS_NULL(decodedURL); //cleanup } TEST_FUNCTION(URL_Decode_zerolength_input) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE newString = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(newString, "")); //act decodedURL = URL_Decode(newString); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(size_t, 0, strlen(STRING_c_str(decodedURL))); //cleanup STRING_delete(decodedURL); STRING_delete(newString); } TEST_FUNCTION(URL_Decode_unencoded_input) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE newString = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(newString, "hello world")); //space is not encoded //act decodedURL = URL_Decode(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup STRING_delete(newString); } TEST_FUNCTION(URL_Decode_partially_unencoded_input) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE newString = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(newString, "hello%20world&mistake")); //& is an unencoded char //act decodedURL = URL_Decode(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup STRING_delete(newString); } TEST_FUNCTION(URL_Decode_invalid_encoding_incomplete) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE newString = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(newString, "%7")); //act decodedURL = URL_Decode(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup STRING_delete(newString); } TEST_FUNCTION(URL_Decode_invalid_encoding_non_hex) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE newString = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(newString, "%G5")); //act decodedURL = URL_Decode(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup STRING_delete(newString); } TEST_FUNCTION(URL_Decode_invalid_has_multibyte_encoding) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE newString = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(newString, "%C2%B4")); //act decodedURL = URL_Decode(newString); //assert ASSERT_IS_NULL(decodedURL); //cleanup STRING_delete(newString); } TEST_FUNCTION(URL_Decode_unreserved_mapping) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE newString = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(newString, UNRESERVED_CHAR)); //act decodedURL = URL_Decode(newString); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, UNRESERVED_CHAR, STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); STRING_delete(newString); } TEST_FUNCTION(URL_Decode_path_with_device) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE input = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(input, "%2fgetalarm(%27Le%20Pichet%27)")); //act decodedURL = URL_Decode(input); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, "/getalarm('Le Pichet')", STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); STRING_delete(input); } TEST_FUNCTION(URL_Decode_a_few_bogus_characters) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE input = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(input, "%7b%7d%25")); //act decodedURL = URL_Decode(input); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, "{}%", STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); STRING_delete(input); } TEST_FUNCTION(URL_Decode_full_url) { //arrange STRING_HANDLE decodedURL; STRING_HANDLE input = STRING_new(); ASSERT_ARE_EQUAL(int, 0, STRING_concat(input, "https%3a%2f%2fone.two.three.four-five.com%2fsix%2fSeven(%27EightNine1234567890.Ten_Eleven%27)%3ftwelve-thirteen%3d2015-11-31%20HTTP%2f1.1")); //act decodedURL = URL_Decode(input); //assert ASSERT_IS_NOT_NULL(decodedURL); ASSERT_ARE_EQUAL(char_ptr, "https://one.two.three.four-five.com/six/Seven('EightNine1234567890.Ten_Eleven')?twelve-thirteen=2015-11-31 HTTP/1.1", STRING_c_str(decodedURL)); //cleanup STRING_delete(decodedURL); STRING_delete(input); } TEST_FUNCTION(URL_Decode_ASCII_chars) { size_t i; size_t numberOfTests = sizeof(testVectorASCII) / sizeof(testVectorASCII[i]); for (i = 0; i < numberOfTests; i++) { //arrange STRING_HANDLE decoded; STRING_HANDLE encoded = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(encoded, testVectorASCII[i].endcodedRep), 0); //act decoded = URL_Decode(encoded); //assert ASSERT_IS_NOT_NULL(decoded); ASSERT_ARE_EQUAL(char_ptr, testVectorASCII[i].charRep, STRING_c_str(decoded)); STRING_delete(encoded); STRING_delete(decoded); } } TEST_FUNCTION(URL_Decode_Extended_ASCII_chars) { size_t i; size_t numberOfTests = sizeof(testVectorExtendedASCII) / sizeof(testVectorExtendedASCII[i]); for (i = 0; i < numberOfTests; i++) { //arrange STRING_HANDLE decoded; STRING_HANDLE encoded = STRING_new(); ASSERT_ARE_EQUAL(int, STRING_concat(encoded, testVectorExtendedASCII[i].endcodedRep), 0); //act decoded = URL_Decode(encoded); //assert ASSERT_IS_NULL(decoded); //these should be rejected by the function //cleanup STRING_delete(encoded); } } END_TEST_SUITE(URLEncode_UnitTests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/utf8_checker_ut/000077500000000000000000000000001362133436400335605ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007721362133436400362470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/utf8_checker_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName utf8_checker_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/utf8_checker.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000004761362133436400346000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/utf8_checker_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(utf8_checker_ut, failedTestCount); return failedTestCount; } utf8_checker_ut.c000066400000000000000000000454631362133436400367430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/utf8_checker_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #ifdef _CRTDBG_MAP_ALLOC #include #endif #ifdef __cplusplus #include #else #include #include #endif #include "testrunnerswitcher.h" #include "azure_c_shared_utility/utf8_checker.h" static TEST_MUTEX_HANDLE g_testByTest; BEGIN_TEST_SUITE(utf8_checker_ut) TEST_SUITE_INITIALIZE(suite_init) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* utf8_checker_is_valid_utf8 */ /* Tests_SRS_UTF8_CHECKER_01_002: [ If `utf8_checker_is_valid_utf8` is called with NULL `utf8_str` it shall return false. ]*/ TEST_FUNCTION(utf8_checker_is_valid_utf8_with_NULL_string_fails) { // arrange bool result; // act result = utf8_checker_is_valid_utf8(NULL, 1); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_003: [ If `length` is 0, `utf8_checker_is_valid_utf8` shall consider `utf8_str` to be valid UTF-8 and return true. ]*/ /* Tests_SRS_UTF8_CHECKER_01_005: [ On success it shall return true. ]*/ TEST_FUNCTION(utf8_checker_is_valid_with_0_length_succeeds) { // arrange bool result; // act result = utf8_checker_is_valid_utf8((const unsigned char*)"", 0); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_006: [ 00000000 0xxxxxxx 0xxxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_NULL_succeeds) { // arrange bool result; unsigned char test_str[] = { 0x00 }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_006: [ 00000000 0xxxxxxx 0xxxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_1_succeeds) { // arrange bool result; unsigned char test_str[] = { 0x01 }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_006: [ 00000000 0xxxxxxx 0xxxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_max_1_byte_code_succeeds) { // arrange bool result; unsigned char test_str[] = { 0x7F }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_007: [ 00000yyy yyxxxxxx 110yyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_valid_2_byte_code_succeeds) { // arrange bool result; unsigned char test_str[] = { 0xC2, 0x80 }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_007: [ 00000yyy yyxxxxxx 110yyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_valid_max_2_byte_code_succeeds) { // arrange bool result; unsigned char test_str[] = { 0xDF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_007: [ 00000yyy yyxxxxxx 110yyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_too_low_codepoint_for_2_bytes_fails) { // arrange bool result; unsigned char test_str[] = { 0xC1, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_007: [ 00000yyy yyxxxxxx 110yyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_the_second_byte_header_00_fails) { // arrange bool result; unsigned char test_str[] = { 0xDF, 0x00 }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_007: [ 00000yyy yyxxxxxx 110yyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_the_second_byte_header_11_fails) { // arrange bool result; unsigned char test_str[] = { 0xDF, 0xC0 }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_007: [ 00000yyy yyxxxxxx 110yyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_2_bytes_code_too_few_bytes_fails) { // arrange bool result; unsigned char test_str[] = { 0xDF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_valid_3_byte_code_succeeds) { // arrange bool result; unsigned char test_str[] = { 0xE0, 0xA0, 0x80 }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_max_valid_3_byte_code_succeeds) { // arrange bool result; unsigned char test_str[] = { 0xEF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_too_low_3_byte_code_fails) { // arrange bool result; unsigned char test_str[] = { 0xE0, 0x9F, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_3_bytes_code_the_second_byte_header_00_fails) { // arrange bool result; unsigned char test_str[] = { 0xEF, 0x3F, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_3_bytes_code_the_second_byte_header_11_fails) { // arrange bool result; unsigned char test_str[] = { 0xE0, 0xFF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_3_bytes_code_the_third_byte_header_00_fails) { // arrange bool result; unsigned char test_str[] = { 0xEF, 0xBF, 0x3F }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_3_bytes_code_the_third_byte_header_11_fails) { // arrange bool result; unsigned char test_str[] = { 0xE0, 0xBF, 0xFF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_008: [ zzzzyyyy yyxxxxxx 1110zzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_3_bytes_code_too_few_bytes_fails) { // arrange bool result; unsigned char test_str[] = { 0xE0, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_valid_4_byte_code_succeeds) { // arrange bool result; unsigned char test_str[] = { 0xF0, 0x90, 0x80, 0x80 }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_max_valid_4_byte_code_succeeds) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0xBF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_a_too_low_4_byte_code_fails) { // arrange bool result; unsigned char test_str[] = { 0xF0, 0x8F, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4_byte_code_second_byte_with_00_header_fails) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0x3F, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4_byte_code_second_byte_with_11_header_fails) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0xFF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4_byte_code_third_byte_with_00_header_fails) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0xBF, 0x3F, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4_byte_code_third_byte_with_11_header_fails) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0xBF, 0xFF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4_byte_code_fourth_byte_with_00_header_fails) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0xBF, 0xBF, 0x3F }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4_byte_code_fourth_byte_with_11_header_fails) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0xBF, 0xBF, 0xFF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4_byte_code_too_few_bytes_fails) { // arrange bool result; unsigned char test_str[] = { 0xF7, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_bad_1st_byte_header_fails) { // arrange bool result; unsigned char test_str[] = { 0xFF, 0xBF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_all_length_chars_succeeds) { // arrange bool result; unsigned char test_str[] = { 0x01, 0xC2, 0x80, 0xEF, 0xBF, 0xBF, 0xF7, 0xBF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_TRUE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_2nd_char_bad_fails) { // arrange bool result; unsigned char test_str[] = { 0x01, 0xC2, 0xFF, 0xEF, 0xBF, 0xBF, 0xF7, 0xBF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_3rd_char_bad_fails) { // arrange bool result; unsigned char test_str[] = { 0x01, 0xC2, 0x80, 0xEF, 0xFF, 0xBF, 0xF7, 0xBF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } /* Tests_SRS_UTF8_CHECKER_01_001: [ `utf8_checker_is_valid_utf8` shall verify that the sequence of chars pointed to by `utf8_str` represent UTF-8 encoded codepoints. ]*/ /* Tests_SRS_UTF8_CHECKER_01_009: [ 000uuuuu zzzzyyyy yyxxxxxx 11110uuu 10uuzzzz 10yyyyyy 10xxxxxx ]*/ TEST_FUNCTION(utf8_checker_with_4th_char_bad_fails) { // arrange bool result; unsigned char test_str[] = { 0x01, 0xC2, 0x80, 0xEF, 0xBF, 0xBF, 0xF7, 0xFF, 0xBF, 0xBF }; // act result = utf8_checker_is_valid_utf8(test_str, sizeof(test_str)); // assert ASSERT_IS_FALSE(result); } END_TEST_SUITE(utf8_checker_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uuid_ut/000077500000000000000000000000001362133436400321545ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007521362133436400346410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uuid_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName uuid_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/uuid.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uuid_ut/main.c000066400000000000000000000005021362133436400332410ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(uuid_unittests, failedTestCount); return (int)failedTestCount; } uuid_ut.c000066400000000000000000000216321362133436400337230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uuid_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_bool.h" #include "umock_c_negative_tests.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/uniqueid.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/uuid.h" static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } #define UUID_OCTET_COUNT 16 #define UUID_STRING_LENGTH 36 #define UUID_STRING_SIZE (UUID_STRING_LENGTH + 1) static const UUID_T TEST_UUID = { 222, 193, 74, 152, 197, 252, 67, 14, 180, 227, 51, 193, 196, 52, 220, 175 }; static char* TEST_UUID_STRING = "dec14a98-c5fc-430e-b4e3-33c1c434dcaf"; static UNIQUEID_RESULT mock_UniqueId_Generate_result; static UNIQUEID_RESULT mock_UniqueId_Generate(char* uid, size_t bufferSize) { (void)memcpy(uid, TEST_UUID_STRING, bufferSize); return mock_UniqueId_Generate_result; } static void initialize_variables() { mock_UniqueId_Generate_result = UNIQUEID_OK; } static void register_global_mock_returns() { REGISTER_GLOBAL_MOCK_FAIL_RETURN(malloc, NULL); REGISTER_GLOBAL_MOCK_FAIL_RETURN(UniqueId_Generate, UNIQUEID_ERROR); } static void register_global_function_hooks() { REGISTER_GLOBAL_MOCK_HOOK(UniqueId_Generate, mock_UniqueId_Generate); } static void register_mock_aliases() { REGISTER_UMOCK_ALIAS_TYPE(UNIQUEID_RESULT, int); } BEGIN_TEST_SUITE(uuid_unittests) TEST_SUITE_INITIALIZE(suite_init) { int result; result = umock_c_init(on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); register_mock_aliases(); register_global_mock_returns(); register_global_function_hooks(); initialize_variables(); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { if (TEST_MUTEX_ACQUIRE(g_testByTest) != 0) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_MUTEX_RELEASE(g_testByTest); } // Tests_SRS_UUID_09_001: [ If `uuid` is NULL, UUID_generate shall return a non-zero value ] TEST_FUNCTION(UUID_generate_NULL_uuid) { //Arrange int result; umock_c_reset_all_calls(); //Act result = UUID_generate(NULL); //Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } // Tests_SRS_UUID_09_002: [ UUID_generate shall obtain an UUID string from UniqueId_Generate ] // Tests_SRS_UUID_09_004: [ The UUID string shall be parsed into an UUID_T type (16 unsigned char array) and filled in `uuid` ] // Tests_SRS_UUID_09_006: [ If no failures occur, UUID_generate shall return zero ] TEST_FUNCTION(UUID_generate_succeed) { //Arrange UUID_T uuid; int result; char uuid_string[UUID_STRING_SIZE]; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(UUID_STRING_SIZE)) .SetReturn(uuid_string); STRICT_EXPECTED_CALL(UniqueId_Generate(uuid_string, UUID_STRING_SIZE)); STRICT_EXPECTED_CALL(free(uuid_string)); //Act result = UUID_generate(&uuid); //Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); { int i; for (i = 0; i < UUID_OCTET_COUNT; i++) { ASSERT_ARE_EQUAL(int, TEST_UUID[i], uuid[i]); } } } // Tests_SRS_UUID_09_003: [ If the UUID string fails to be obtained, UUID_generate shall fail and return a non-zero value ] // Tests_SRS_UUID_09_005: [ If `uuid` fails to be set, UUID_generate shall fail and return a non-zero value ] TEST_FUNCTION(UUID_generate_failure_checks) { //Arrange UUID_T uuid; int result; size_t i; char uuid_string[UUID_STRING_SIZE]; ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(UUID_STRING_SIZE)) .SetReturn(uuid_string); STRICT_EXPECTED_CALL(UniqueId_Generate(uuid_string, UUID_STRING_SIZE)); STRICT_EXPECTED_CALL(free(uuid_string)); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[64]; if (i == 2) continue; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); (void)sprintf(temp_str, "On failed call %zu", i); // act result = UUID_generate(&uuid); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result, temp_str); } umock_c_negative_tests_reset(); umock_c_negative_tests_deinit(); } // Tests_SRS_UUID_09_011: [ If `uuid` is NULL, UUID_to_string shall return a non-zero value ] TEST_FUNCTION(UUID_to_string_NULL_uuid) { //Arrange //Act char* result = UUID_to_string(NULL); //Assert ASSERT_IS_NULL(result); } // Tests_SRS_UUID_09_012: [ UUID_to_string shall allocate a valid UUID string (`uuid_string`) as per RFC 4122 ] // Tests_SRS_UUID_09_014: [ Each character in `uuid` shall be written in the respective positions of `uuid_string` as a 2-digit HEX value ] // Tests_SRS_UUID_09_016: [ If no failures occur, UUID_to_string shall return `uuid_string` ] TEST_FUNCTION(UUID_to_string_succeed) { //Arrange char* result; char buffer[UUID_STRING_SIZE]; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(UUID_STRING_SIZE * sizeof(char))) .SetReturn(buffer); //Act result = UUID_to_string(&TEST_UUID); //Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(char_ptr, TEST_UUID_STRING, result); } // Tests_SRS_UUID_09_013: [ If `uuid_string` fails to be allocated, UUID_to_string shall return NULL ] // Tests_SRS_UUID_09_015: [ If `uuid_string` fails to be set, UUID_to_string shall return NULL ] TEST_FUNCTION(UUID_to_string_failure_checks) { //Arrange char* result; char buffer[UUID_STRING_SIZE]; size_t i; ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(malloc(UUID_STRING_SIZE * sizeof(char))) .SetReturn(buffer); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[64]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); (void)sprintf(temp_str, "On failed call %zu", i); // act result = UUID_to_string(&TEST_UUID); // assert ASSERT_IS_NULL(result, temp_str); } umock_c_negative_tests_reset(); umock_c_negative_tests_deinit(); } // Tests_SRS_UUID_09_007: [ If `uuid_string` or `uuid` are NULL, UUID_from_string shall return a non-zero value ] TEST_FUNCTION(UUID_from_string_NULL_uuid_string) { //Arrange int result; UUID_T uuid; umock_c_reset_all_calls(); //Act result = UUID_from_string(NULL, &uuid); //Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } // Tests_SRS_UUID_09_007: [ If `uuid_string` or `uuid` are NULL, UUID_from_string shall return a non-zero value ] TEST_FUNCTION(UUID_from_string_NULL_uuid) { //Arrange int result; umock_c_reset_all_calls(); //Act result = UUID_from_string(TEST_UUID_STRING, NULL); //Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } // Tests_SRS_UUID_09_008: [ Each pair of digits in `uuid_string`, excluding dashes, shall be read as a single HEX value and saved on the respective position in `uuid` ] // Tests_SRS_UUID_09_010: [ If no failures occur, UUID_from_string shall return zero ] TEST_FUNCTION(UUID_from_string_succeed) { //Arrange int result; UUID_T uuid; umock_c_reset_all_calls(); //Act result = UUID_from_string(TEST_UUID_STRING, &uuid); //Assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); { int i; for (i = 0; i < UUID_OCTET_COUNT; i++) { ASSERT_ARE_EQUAL(int, TEST_UUID[i], uuid[i]); } } } // Tests_SRS_UUID_09_009: [ If `uuid` fails to be generated, UUID_from_string shall return a non-zero value ] // To be implemented once sscanf mock is implemented. END_TEST_SUITE(uuid_unittests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uws_client_ut/000077500000000000000000000000001362133436400333625ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000011151362133436400360410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uws_client_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName uws_client_ut) include_directories(${SHARED_UTIL_REAL_TEST_FOLDER}) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/uws_client.c ../real_test_files/real_buffer.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000004741362133436400344000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uws_client_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(uws_client_ut, failedTestCount); return failedTestCount; } uws_client_ut.c000066400000000000000000013337501362133436400363470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uws_client_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_bool.h" #include "umock_c_negative_tests.h" /* Requirements not needed as they are optional: Tests_SRS_UWS_CLIENT_01_254: [ If an endpoint receives a Ping frame and has not yet sent Pong frame(s) in response to previous Ping frame(s), the endpoint MAY elect to send a Pong frame for only the most recently processed Ping frame. ] Tests_SRS_UWS_CLIENT_01_255: [ A Pong frame MAY be sent unsolicited. ] Tests_SRS_UWS_CLIENT_01_256: [ A response to an unsolicited Pong frame is not expected. ] */ /* Requirements satisfied by the underlying TLS/socket stack Tests_SRS_UWS_CLIENT_01_362: [ To achieve reasonable levels of protection, clients should use only Strong TLS algorithms. ] Tests_SRS_UWS_CLIENT_01_289: [ An endpoint SHOULD use a method that cleanly closes the TCP connection, as well as the TLS session, if applicable, discarding any trailing bytes that may have been received. ] Tests_SRS_UWS_CLIENT_01_078: [ Otherwise, all further communication on this channel MUST run through the encrypted tunnel [RFC5246]. ] Tests_SRS_UWS_CLIENT_01_141: [ masking is done whether or not the WebSocket Protocol is running over TLS. ] */ /* Requirements satisfied by the way the APIs are defined Tests_SRS_UWS_CLIENT_01_324: [ 1000 indicates a normal closure, meaning that the purpose for which the connection was established has been fulfilled. ] Tests_SRS_UWS_CLIENT_01_325: [ 1001 indicates that an endpoint is "going away", such as a server going down or a browser having navigated away from a page. ] Tests_SRS_UWS_CLIENT_01_326: [ 1002 indicates that an endpoint is terminating the connection due to a protocol error. ] Tests_SRS_UWS_CLIENT_01_327: [ 1003 indicates that an endpoint is terminating the connection because it has received a type of data it cannot accept (e.g., an endpoint that understands only text data MAY send this if it receives a binary message). ] Tests_SRS_UWS_CLIENT_01_328: [ Reserved. The specific meaning might be defined in the future. ] Tests_SRS_UWS_CLIENT_01_329: [ 1005 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. ] Tests_SRS_UWS_CLIENT_01_330: [ 1006 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. ] Tests_SRS_UWS_CLIENT_01_331: [ 1007 indicates that an endpoint is terminating the connection because it has received data within a message that was not consistent with the type of the message (e.g., non-UTF-8 [RFC3629] data within a text message). ] Tests_SRS_UWS_CLIENT_01_332: [ 1008 indicates that an endpoint is terminating the connection because it has received a message that violates its policy. ] Tests_SRS_UWS_CLIENT_01_333: [ 1009 indicates that an endpoint is terminating the connection because it has received a message that is too big for it to process. ] Tests_SRS_UWS_CLIENT_01_334: [ 1010 indicates that an endpoint (client) is terminating the connection because it has expected the server to negotiate one or more extension, but the server didn't return them in the response message of the WebSocket handshake. ] Tests_SRS_UWS_CLIENT_01_336: [ 1011 indicates that a server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request. ] Tests_SRS_UWS_CLIENT_01_337: [ 1015 is a reserved value and MUST NOT be set as a status code in a Close control frame by an endpoint. ] Tests_SRS_UWS_CLIENT_01_238: [ As the data is not guaranteed to be human readable, clients MUST NOT show it to end users. ] Tests_SRS_UWS_CLIENT_01_211: [ One implication of this is that in absence of extensions, senders and receivers must not depend on the presence of specific frame boundaries. ] */ #define ENABLE_MOCKS #include "azure_c_shared_utility/optimize_size.h" #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/shared_util_options.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/tlsio.h" #include "azure_c_shared_utility/uws_frame_encoder.h" #include "azure_c_shared_utility/gb_rand.h" #include "azure_c_shared_utility/base64.h" #include "azure_c_shared_utility/map.h" IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(WS_FRAME_TYPE, WS_FRAME_TYPE_VALUES); static const void** list_items = NULL; static size_t list_item_count = 0; static const SINGLYLINKEDLIST_HANDLE TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE = (SINGLYLINKEDLIST_HANDLE)0x4242; static const LIST_ITEM_HANDLE TEST_LIST_ITEM_HANDLE = (LIST_ITEM_HANDLE)0x4243; static const XIO_HANDLE TEST_IO_HANDLE = (XIO_HANDLE)0x4244; static const OPTIONHANDLER_HANDLE TEST_IO_OPTIONHANDLER_HANDLE = (OPTIONHANDLER_HANDLE)0x4446; static const OPTIONHANDLER_HANDLE TEST_OPTIONHANDLER_HANDLE = (OPTIONHANDLER_HANDLE)0x4447; static const STRING_HANDLE BASE64_ENCODED_STRING = (STRING_HANDLE)0x4447; static const MAP_HANDLE TEST_REQUEST_HEADERS_MAP = (MAP_HANDLE)0x4448; static size_t currentmalloc_call; static size_t whenShallmalloc_fail; static size_t currentrealloc_call; static size_t whenShallrealloc_fail; static void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } static void* my_gballoc_realloc(void* ptr, size_t size) { void* result; currentrealloc_call++; if (whenShallrealloc_fail > 0) { if (currentrealloc_call == whenShallrealloc_fail) { result = NULL; } else { result = realloc(ptr, size); } } else { result = realloc(ptr, size); } return result; } static void my_gballoc_free(void* ptr) { free(ptr); } static int my_mallocAndStrcpy_s(char** destination, const char* source) { *destination = (char*)malloc(strlen(source) + 1); (void)strcpy(*destination, source); return 0; } static LIST_ITEM_HANDLE add_to_list(const void* item) { const void** items = (const void**)realloc((void*)list_items, (list_item_count + 1) * sizeof(item)); if (items != NULL) { list_items = items; list_items[list_item_count++] = item; } return (LIST_ITEM_HANDLE)list_item_count; } static int singlylinkedlist_remove_result; static int my_singlylinkedlist_remove(SINGLYLINKEDLIST_HANDLE list, LIST_ITEM_HANDLE item) { size_t index = (size_t)item - 1; (void)list; (void)memmove((void*)&list_items[index], &list_items[index + 1], sizeof(const void*) * (list_item_count - index - 1)); list_item_count--; if (list_item_count == 0) { free((void*)list_items); list_items = NULL; } return singlylinkedlist_remove_result; } static LIST_ITEM_HANDLE my_singlylinkedlist_get_head_item(SINGLYLINKEDLIST_HANDLE list) { LIST_ITEM_HANDLE list_item_handle = NULL; (void)list; if (list_item_count > 0) { list_item_handle = (LIST_ITEM_HANDLE)1; } else { list_item_handle = NULL; } return list_item_handle; } static LIST_ITEM_HANDLE my_singlylinkedlist_add(SINGLYLINKEDLIST_HANDLE list, const void* item) { (void)list; return add_to_list(item); } static const void* my_singlylinkedlist_item_get_value(LIST_ITEM_HANDLE item_handle) { return (const void*)list_items[(size_t)item_handle - 1]; } static LIST_ITEM_HANDLE my_singlylinkedlist_find(SINGLYLINKEDLIST_HANDLE handle, LIST_MATCH_FUNCTION match_function, const void* match_context) { size_t i; const void* found_item = NULL; (void)handle; for (i = 0; i < list_item_count; i++) { if (match_function((LIST_ITEM_HANDLE)list_items[i], match_context)) { found_item = list_items[i]; break; } } return (LIST_ITEM_HANDLE)found_item; } static MAP_RESULT my_Map_GetInternals_return; static char* my_Map_GetInternals_keys[10]; static char* my_Map_GetInternals_values[10]; static size_t my_Map_GetInternals_count; static MAP_RESULT my_Map_GetInternals(MAP_HANDLE handle, const char*const** keys, const char*const** values, size_t* count) { (void)handle; *keys = (const char*const*)my_Map_GetInternals_keys; *values = (const char*const*)my_Map_GetInternals_values; *count = my_Map_GetInternals_count; return my_Map_GetInternals_return; } #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/socketio.h" #include "azure_c_shared_utility/platform.h" #include "azure_c_shared_utility/utf8_checker.h" #include "azure_c_shared_utility/strings.h" #include "azure_c_shared_utility/optionhandler.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/uws_client.h" static const WS_PROTOCOL protocols[] = { { "test_protocol" } }; IMPLEMENT_UMOCK_C_ENUM_TYPE(WS_OPEN_RESULT, WS_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(WS_ERROR, WS_ERROR_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(WS_SEND_FRAME_RESULT, WS_SEND_FRAME_RESULT_VALUES); static char* umocktypes_stringify_const_SOCKETIO_CONFIG_ptr(const SOCKETIO_CONFIG** value) { char* result = NULL; char temp_buffer[1024]; int length; length = sprintf(temp_buffer, "{ hostname = %s, port = %d, accepted_socket = %p }", (*value)->hostname, (*value)->port, (*value)->accepted_socket); if (length > 0) { result = (char*)malloc(strlen(temp_buffer) + 1); if (result != NULL) { (void)memcpy(result, temp_buffer, strlen(temp_buffer) + 1); } } return result; } static int umocktypes_are_equal_const_SOCKETIO_CONFIG_ptr(const SOCKETIO_CONFIG** left, const SOCKETIO_CONFIG** right) { int result; if ((left == NULL) || (right == NULL)) { result = -1; } else { result = ((*left)->port == (*right)->port); result = result && ((*left)->accepted_socket == (*right)->accepted_socket); if (strcmp((*left)->hostname, (*right)->hostname) != 0) { result = 0; } } return result; } static char* copy_string(const char* source) { char* result; if (source == NULL) { result = NULL; } else { size_t length = strlen(source); result = (char*)malloc(length + 1); (void)memcpy(result, source, length + 1); } return result; } static int umocktypes_copy_const_SOCKETIO_CONFIG_ptr(SOCKETIO_CONFIG** destination, const SOCKETIO_CONFIG** source) { int result; *destination = (SOCKETIO_CONFIG*)malloc(sizeof(SOCKETIO_CONFIG)); if (*destination == NULL) { result = __FAILURE__; } else { if ((*source)->hostname == NULL) { (*destination)->hostname = NULL; } else { (*destination)->hostname = copy_string((*source)->hostname); (*destination)->port = (*source)->port; (*destination)->accepted_socket = (*source)->accepted_socket; } result = 0; } return result; } static void umocktypes_free_const_SOCKETIO_CONFIG_ptr(SOCKETIO_CONFIG** value) { free((void*)(*value)->hostname); free(*value); } // consumer mocks MOCK_FUNCTION_WITH_CODE(, void, test_on_ws_open_complete, void*, context, WS_OPEN_RESULT, ws_open_result) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_ws_frame_received, void*, context, unsigned char, frame_type, const unsigned char*, buffer, size_t, size) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_ws_peer_closed, void*, context, uint16_t*, close_code, const unsigned char*, extra_data, size_t, extra_data_length) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_ws_error, void*, context, WS_ERROR, error_code); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_ws_close_complete, void*, context); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_ws_send_frame_complete, void*, context, WS_SEND_FRAME_RESULT, ws_send_frame_result) MOCK_FUNCTION_END() static ON_IO_OPEN_COMPLETE g_on_io_open_complete; static void* g_on_io_open_complete_context; static ON_SEND_COMPLETE g_on_io_send_complete; static void* g_on_io_send_complete_context; static int g_xio_send_result; static ON_BYTES_RECEIVED g_on_bytes_received; static void* g_on_bytes_received_context; static ON_IO_ERROR g_on_io_error; static void* g_on_io_error_context; static ON_IO_CLOSE_COMPLETE g_on_io_close_complete; static void* g_on_io_close_complete_context; static int my_xio_open(XIO_HANDLE xio, ON_IO_OPEN_COMPLETE on_io_open_complete, void* on_io_open_complete_context, ON_BYTES_RECEIVED on_bytes_received, void* on_bytes_received_context, ON_IO_ERROR on_io_error, void* on_io_error_context) { (void)xio; g_on_io_open_complete = on_io_open_complete; g_on_io_open_complete_context = on_io_open_complete_context; g_on_bytes_received = on_bytes_received; g_on_bytes_received_context = on_bytes_received_context; g_on_io_error = on_io_error; g_on_io_error_context = on_io_error_context; return 0; } static int my_xio_close(XIO_HANDLE xio, ON_IO_CLOSE_COMPLETE on_io_close_complete, void* callback_context) { (void)xio; g_on_io_close_complete = on_io_close_complete; g_on_io_close_complete_context = callback_context; return 0; } static int my_xio_send(XIO_HANDLE xio, const void* buffer, size_t size, ON_SEND_COMPLETE on_send_complete, void* callback_context) { (void)xio; (void)buffer; (void)size; g_on_io_send_complete = on_send_complete; g_on_io_send_complete_context = callback_context; return g_xio_send_result; } static pfCloneOption g_clone_option; static pfDestroyOption g_destroy_option; static pfSetOption g_set_option; static OPTIONHANDLER_HANDLE my_OptionHandler_Create(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { g_clone_option = cloneOption; g_destroy_option = destroyOption; g_set_option = setOption; return TEST_OPTIONHANDLER_HANDLE; } static TEST_MUTEX_HANDLE g_testByTest; static const IO_INTERFACE_DESCRIPTION* TEST_SOCKET_IO_INTERFACE_DESCRIPTION = (const IO_INTERFACE_DESCRIPTION*)0x4542; static const IO_INTERFACE_DESCRIPTION* TEST_TLS_IO_INTERFACE_DESCRIPTION = (const IO_INTERFACE_DESCRIPTION*)0x4543; #ifdef __cplusplus extern "C" { #endif extern BUFFER_HANDLE real_BUFFER_new(void); extern void real_BUFFER_delete(BUFFER_HANDLE handle); extern unsigned char* real_BUFFER_u_char(BUFFER_HANDLE handle); extern size_t real_BUFFER_length(BUFFER_HANDLE handle); BUFFER_HANDLE my_uws_frame_encoder_encode(WS_FRAME_TYPE opcode, const unsigned char* payload, size_t length, bool is_masked, bool is_final, unsigned char reserved) { (void)opcode; (void)payload; (void)length; (void)is_masked; (void)is_final; (void)reserved; return real_BUFFER_new(); } #ifdef __cplusplus } #endif DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(uws_client_ut) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_bool_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, my_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_HOOK(xio_open, my_xio_open); REGISTER_GLOBAL_MOCK_HOOK(xio_close, my_xio_close); REGISTER_GLOBAL_MOCK_HOOK(xio_send, my_xio_send); REGISTER_GLOBAL_MOCK_RETURN(singlylinkedlist_create, TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_remove, my_singlylinkedlist_remove); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_get_head_item, my_singlylinkedlist_get_head_item); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_add, my_singlylinkedlist_add); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_item_get_value, my_singlylinkedlist_item_get_value); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_find, my_singlylinkedlist_find); REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_Create, my_OptionHandler_Create); REGISTER_GLOBAL_MOCK_RETURN(socketio_get_interface_description, TEST_SOCKET_IO_INTERFACE_DESCRIPTION); REGISTER_GLOBAL_MOCK_RETURN(platform_get_default_tlsio, TEST_TLS_IO_INTERFACE_DESCRIPTION); REGISTER_GLOBAL_MOCK_RETURN(xio_create, TEST_IO_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(xio_retrieveoptions, TEST_IO_OPTIONHANDLER_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(utf8_checker_is_valid_utf8, true); REGISTER_GLOBAL_MOCK_RETURN(Base64_Encode_Bytes, BASE64_ENCODED_STRING); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_FeedOptions, OPTIONHANDLER_OK); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_AddOption, OPTIONHANDLER_OK); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_Clone, TEST_OPTIONHANDLER_HANDLE); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_new, real_BUFFER_new); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_delete, real_BUFFER_delete); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_u_char, real_BUFFER_u_char); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_length, real_BUFFER_length); REGISTER_GLOBAL_MOCK_HOOK(uws_frame_encoder_encode, my_uws_frame_encoder_encode); REGISTER_GLOBAL_MOCK_HOOK(Map_GetInternals, my_Map_GetInternals); REGISTER_GLOBAL_MOCK_RETURN(STRING_c_str, "test_str"); REGISTER_GLOBAL_MOCK_RETURN(Map_Create, TEST_REQUEST_HEADERS_MAP); REGISTER_GLOBAL_MOCK_FAIL_RETURN(Map_Create, NULL); REGISTER_GLOBAL_MOCK_RETURN(Map_AddOrUpdate, MAP_OK); REGISTER_GLOBAL_MOCK_FAIL_RETURN(Map_AddOrUpdate, MAP_ERROR); REGISTER_GLOBAL_MOCK_RETURN(Map_GetInternals, MAP_OK); REGISTER_GLOBAL_MOCK_FAIL_RETURN(Map_GetInternals, MAP_ERROR); REGISTER_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT); REGISTER_TYPE(IO_SEND_RESULT, IO_SEND_RESULT); REGISTER_TYPE(WS_OPEN_RESULT, WS_OPEN_RESULT); REGISTER_TYPE(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT); REGISTER_TYPE(WS_ERROR, WS_ERROR); REGISTER_TYPE(WS_SEND_FRAME_RESULT, WS_SEND_FRAME_RESULT); REGISTER_TYPE(WS_FRAME_TYPE, WS_FRAME_TYPE); REGISTER_TYPE(const SOCKETIO_CONFIG*, const_SOCKETIO_CONFIG_ptr); REGISTER_UMOCK_ALIAS_TYPE(SINGLYLINKEDLIST_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(LIST_ITEM_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(LIST_MATCH_FUNCTION, void*); REGISTER_UMOCK_ALIAS_TYPE(UWS_CLIENT_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(XIO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_OPEN_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_ERROR, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_CLOSE_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_SEND_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(UWS_FRAME_DECODER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_WS_FRAME_DECODED, void*); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(OPTIONHANDLER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(STRING_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(pfCloneOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfSetOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfDestroyOption, void*); REGISTER_UMOCK_ALIAS_TYPE(MAP_FILTER_CALLBACK, void*); REGISTER_UMOCK_ALIAS_TYPE(MAP_HANDLE, void*); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; currentrealloc_call = 0; whenShallrealloc_fail = 0; singlylinkedlist_remove_result = 0; g_xio_send_result = 0; memset(my_Map_GetInternals_keys, 0, sizeof(my_Map_GetInternals_keys)); memset(my_Map_GetInternals_values, 0, sizeof(my_Map_GetInternals_values)); my_Map_GetInternals_count = 0; } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); umock_c_negative_tests_deinit(); } /* uws_client_create */ /* Tests_SRS_UWS_CLIENT_01_001: [`uws_client_create` shall create an instance of uws and return a non-NULL handle to it.]*/ /* Tests_SRS_UWS_CLIENT_01_017: [ `uws_client_create` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_005: [ If `use_ssl` is false then `uws_client_create` shall obtain the interface used to create a socketio instance by calling `socketio_get_interface_description`. ]*/ /* Tests_SRS_UWS_CLIENT_01_008: [ The obtained interface shall be used to create the IO used as underlying IO by the newly created uws instance. ]*/ /* Tests_SRS_UWS_CLIENT_01_009: [ The underlying IO shall be created by calling `xio_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_010: [ The create arguments for the socket IO (when `use_ssl` is 0) shall have: ]*/ /* Tests_SRS_UWS_CLIENT_01_011: [ - `hostname` set to the `hostname` argument passed to `uws_client_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_012: [ - `port` set to the `port` argument passed to `uws_client_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_004: [ The argument `hostname` shall be copied for later use. ]*/ /* Tests_SRS_UWS_CLIENT_01_403: [ The argument `port` shall be copied for later use. ]*/ /* Tests_SRS_UWS_CLIENT_01_404: [ The argument `resource_name` shall be copied for later use. ]*/ /* Tests_SRS_UWS_CLIENT_01_413: [ The protocol information indicated by `protocols` and `protocol_count` shall be copied for later use (for constructing the upgrade request). ]*/ /* Tests_SRS_UWS_CLIENT_01_063: [ A client will need to supply a /host/, /port/, /resource name/, and a /secure/ flag, which are the components of a WebSocket URI as discussed in Section 3, along with a list of /protocols/ and /extensions/ to be used. ]*/ /* Tests_SRS_UWS_CLIENT_01_076: [ If /secure/ is true, the client MUST perform a TLS handshake over the connection after opening the connection and before sending the handshake data [RFC2818]. ]*/ TEST_FUNCTION(uws_client_create_with_valid_args_no_ssl_succeeds) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "111")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol")) .IgnoreArgument_destination(); // act uws_client = uws_client_create("test_host", 80, "111", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NOT_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_002: [ If any of the arguments `hostname` and `resource_name` is NULL then `uws_client_create` shall return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_NULL_hostname_fails) { // arrange // act UWS_CLIENT_HANDLE uws_client = uws_client_create(NULL, 80, "222", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_002: [ If any of the arguments `hostname` and `resource_name` is NULL then `uws_client_create` shall return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_NULL_resource_name_fails) { // arrange // act UWS_CLIENT_HANDLE uws_client = uws_client_create("testhost", 80, NULL, false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_012: [ - `port` set to the `port` argument passed to `uws_client_create`. ]*/ TEST_FUNCTION(uws_client_create_with_valid_args_no_ssl_port_different_than_80_succeeds) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 81; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "333")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol")) .IgnoreArgument_destination(); // act uws_client = uws_client_create("test_host", 81, "333", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NOT_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_410: [ The `protocols` argument shall be allowed to be NULL, in which case no protocol is to be specified by the client in the upgrade request. ]*/ TEST_FUNCTION(uws_client_create_with_NULL_protocols_succeeds) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 81; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "333")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); // act uws_client = uws_client_create("test_host", 81, "333", false, NULL, 0); // assert ASSERT_IS_NOT_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_411: [ If `protocol_count` is non zero and `protocols` is NULL then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_non_zero_protocol_count_and_NULL_protocols_fails) { // arrange UWS_CLIENT_HANDLE uws_client; // act uws_client = uws_client_create("test_host", 81, "333", false, NULL, 1); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_412: [ If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_the_first_protocol_name_NULL_fails) { // arrange UWS_CLIENT_HANDLE uws_client; WS_PROTOCOL NULL_test_protocol[] = { { NULL } }; // act uws_client = uws_client_create("test_host", 81, "333", false, NULL_test_protocol, sizeof(NULL_test_protocol) / sizeof(NULL_test_protocol[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_412: [ If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_the_second_protocol_name_NULL_fails) { // arrange UWS_CLIENT_HANDLE uws_client; WS_PROTOCOL NULL_test_protocol[] = { { "aaa" }, { NULL } }; // act uws_client = uws_client_create("test_host", 81, "333", false, NULL_test_protocol, sizeof(NULL_test_protocol) / sizeof(NULL_test_protocol[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_003: [ If allocating memory for the new uws instance fails then `uws_client_create` shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_new_uws_instance_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); // act uws_client = uws_client_create("test_host", 80, "aaa", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_392: [ If allocating memory for the copy of the `hostname` argument fails, then `uws_client_create` shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_hostname_copy_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination() .SetReturn(1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "bbb", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_405: [ If allocating memory for the copy of the `resource_name` argument fails, then `uws_client_create` shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_resource_name_copy_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/1")) .IgnoreArgument_destination() .SetReturn(1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "test_resource/1", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_018: [ If `singlylinkedlist_create` fails then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_creating_the_pending_sends_list_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/1")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()) .SetReturn(NULL); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "test_resource/1", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(uws_client); } /* Tests_SRS_UWS_CLIENT_01_007: [ If obtaining the underlying IO interface fails, then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_getting_the_socket_interface_description_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/1")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()) .SetReturn(NULL); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "test_resource/1", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(uws_client); } /* Tests_SRS_UWS_CLIENT_01_016: [ If `xio_create` fails, then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_creating_the_io_handle_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/1")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters() .SetReturn(NULL); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "test_resource/1", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(uws_client); } /* Tests_SRS_UWS_CLIENT_01_414: [ If allocating memory for the copied protocol information fails then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_protocols_array_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/1")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "test_resource/1", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(uws_client); } /* Tests_SRS_UWS_CLIENT_01_414: [ If allocating memory for the copied protocol information fails then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_first_proitocol_name_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/1")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol")) .IgnoreArgument_destination() .SetReturn(1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "test_resource/1", false, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(uws_client); } /* Tests_SRS_UWS_CLIENT_01_414: [ If allocating memory for the copied protocol information fails then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_second_protocol_name_fails_then_uws_client_create_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; static const WS_PROTOCOL two_protocols[] = { { "test_protocol1" }, { "test_protocol2" } }; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/1")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol1")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol2")) .IgnoreArgument_destination() .SetReturn(1); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 80, "test_resource/1", false, two_protocols, sizeof(two_protocols) / sizeof(two_protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_006: [ If `use_ssl` is true then `uws_client_create` shall obtain the interface used to create a tlsio instance by calling `platform_get_default_tlsio`. ]*/ /* Tests_SRS_UWS_CLIENT_01_013: [ The create arguments for the tls IO (when `use_ssl` is 1) shall have: ]*/ /* Tests_SRS_UWS_CLIENT_01_014: [ - `hostname` set to the `hostname` argument passed to `uws_client_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_015: [ - `port` set to the `port` argument passed to `uws_client_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_360: [ Connection confidentiality and integrity is provided by running the WebSocket Protocol over TLS (wss URIs). ]*/ /* Tests_SRS_UWS_CLIENT_01_361: [ WebSocket implementations MUST support TLS and SHOULD employ it when communicating with their peers. ]*/ TEST_FUNCTION(uws_client_create_with_valid_args_ssl_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; SOCKETIO_CONFIG socketio_config; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 443; tlsio_config.hostname = "test_host"; tlsio_config.port = 443; tlsio_config.underlying_io_interface = TEST_SOCKET_IO_INTERFACE_DESCRIPTION; tlsio_config.underlying_io_parameters = &socketio_config; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/23")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(platform_get_default_tlsio()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_TLS_IO_INTERFACE_DESCRIPTION, &tlsio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol")) .IgnoreArgument_destination(); // act uws_client = uws_client_create("test_host", 443, "test_resource/23", true, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NOT_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_006: [ If `use_ssl` is true then `uws_client_create` shall obtain the interface used to create a tlsio instance by calling `platform_get_default_tlsio`. ]*/ /* Tests_SRS_UWS_CLIENT_01_013: [ The create arguments for the tls IO (when `use_ssl` is 1) shall have: ]*/ /* Tests_SRS_UWS_CLIENT_01_014: [ - `hostname` set to the `hostname` argument passed to `uws_client_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_015: [ - `port` set to the `port` argument passed to `uws_client_create`. ]*/ TEST_FUNCTION(uws_client_create_with_valid_args_ssl_port_different_than_443_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; SOCKETIO_CONFIG socketio_config; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 444; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; tlsio_config.underlying_io_interface = TEST_SOCKET_IO_INTERFACE_DESCRIPTION; tlsio_config.underlying_io_parameters = &socketio_config; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/23")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(platform_get_default_tlsio()); STRICT_EXPECTED_CALL(socketio_get_interface_description()); STRICT_EXPECTED_CALL(xio_create(TEST_TLS_IO_INTERFACE_DESCRIPTION, &tlsio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol")) .IgnoreArgument_destination(); // act uws_client = uws_client_create("test_host", 444, "test_resource/23", true, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NOT_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_007: [ If obtaining the underlying IO interface fails, then `uws_client_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_getting_the_tlsio_interface_fails_then_uws_client_create_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_resource/23")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(platform_get_default_tlsio()) .SetReturn(NULL); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client = uws_client_create("test_host", 444, "test_resource/23", true, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* uws_client_create_with_io */ /* Tests_SRS_UWS_CLIENT_01_515: [ `uws_client_create_with_io` shall create an instance of uws and return a non-NULL handle to it. ]*/ /* Tests_SRS_UWS_CLIENT_01_518: [ The argument `hostname` shall be copied for later use. ]*/ /* Tests_SRS_UWS_CLIENT_01_520: [ The argument `port` shall be copied for later use. ]*/ /* Tests_SRS_UWS_CLIENT_01_521: [ The underlying IO shall be created by calling `xio_create`, while passing as arguments the `io_interface` and `io_create_parameters` argument values. ]*/ /* Tests_SRS_UWS_CLIENT_01_523: [ The argument `resource_name` shall be copied for later use. ]*/ /* Tests_SRS_UWS_CLIENT_01_530: [ `uws_client_create_with_io` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_527: [ The protocol information indicated by `protocols` and `protocol_count` shall be copied for later use (for constructing the upgrade request). ]*/ TEST_FUNCTION(uws_client_create_with_io_valid_args_succeeds) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "my_horrible_host"; socketio_config.port = 1122; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "111")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol")) .IgnoreArgument_destination(); // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, "test_host", 80, "111", protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NOT_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_516: [ If any of the arguments `io_interface`, `hostname` and `resource_name` is NULL then `uws_client_create_with_io` shall return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_io_with_NULL_io_interface_description_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "my_horrible_host"; socketio_config.port = 1122; // act uws_client = uws_client_create_with_io(NULL, &socketio_config, "test_host", 80, "111", protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_516: [ If any of the arguments `io_interface`, `hostname` and `resource_name` is NULL then `uws_client_create_with_io` shall return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_io_with_NULL_hostname_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "my_horrible_host"; socketio_config.port = 1122; // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, NULL, 80, "111", protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_516: [ If any of the arguments `io_interface`, `hostname` and `resource_name` is NULL then `uws_client_create_with_io` shall return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_io_with_NULL_resource_name_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "my_horrible_host"; socketio_config.port = 1122; // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, "test_host", 80, NULL, protocols, sizeof(protocols) / sizeof(protocols[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_517: [ If allocating memory for the new uws instance fails then `uws_client_create_with_io` shall return NULL. ]*/ /* Tests_SRS_UWS_CLIENT_01_519: [ If allocating memory for the copy of the `hostname` argument fails, then `uws_client_create` shall return NULL. ]*/ /* Tests_SRS_UWS_CLIENT_01_522: [ If `xio_create` fails, then `uws_client_create_with_io` shall fail and return NULL. ]*/ /* Tests_SRS_UWS_CLIENT_01_529: [ If allocating memory for the copy of the `resource_name` argument fails, then `uws_client_create_with_io` shall return NULL. ]*/ /* Tests_SRS_UWS_CLIENT_01_531: [ If `singlylinkedlist_create` fails then `uws_client_create_with_io` shall fail and return NULL. ]*/ /* Tests_SRS_UWS_CLIENT_01_528: [ If allocating memory for the copied protocol information fails then `uws_client_create_with_io` shall fail and return NULL. ]*/ TEST_FUNCTION(when_any_call_fails_uws_client_create_with_io_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; size_t i; static const WS_PROTOCOL two_protocols[] = { { "test_protocol1" },{ "test_protocol2" } }; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); socketio_config.accepted_socket = NULL; socketio_config.hostname = "my_horrible_host"; socketio_config.port = 1122; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetFailReturn(NULL); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination() .SetFailReturn(1); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "111")) .IgnoreArgument_destination() .SetFailReturn(1); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()) .SetFailReturn(NULL); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters() .SetFailReturn(NULL); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetFailReturn(NULL); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol1")) .IgnoreArgument_destination() .SetFailReturn(1); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_protocol2")) .IgnoreArgument_destination() .SetFailReturn(1); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); (void)sprintf(temp_str, "On failed call %zu", i); // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, "test_host", 80, "111", two_protocols, sizeof(two_protocols) / sizeof(two_protocols[0])); // assert ASSERT_IS_NULL(uws_client, temp_str); } } /* Tests_SRS_UWS_CLIENT_01_524: [ The `protocols` argument shall be allowed to be NULL, in which case no protocol is to be specified by the client in the upgrade request. ]*/ TEST_FUNCTION(uws_client_create_with_io_with_NULL_protocols_succeeds) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "my_horrible_host"; socketio_config.port = 1122; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "test_host")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, "111")) .IgnoreArgument_destination(); STRICT_EXPECTED_CALL(Map_Create(NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); STRICT_EXPECTED_CALL(xio_create(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config)) .IgnoreArgument_io_create_parameters(); // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, "test_host", 80, "111", NULL, 0); // assert ASSERT_IS_NOT_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_525: [ If `protocol_count` is non zero and `protocols` is NULL then `uws_client_create_with_io` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_io_with_NULL_protocols_and_non_zero_protocol_count_fails) { // arrange SOCKETIO_CONFIG socketio_config; UWS_CLIENT_HANDLE uws_client; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 80; // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, "test_host", 80, "111", NULL, 1); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_526: [ If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create_with_io` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_io_with_a_NULL_protocol_name_for_first_protocol_fails) { // arrange UWS_CLIENT_HANDLE uws_client; SOCKETIO_CONFIG socketio_config; WS_PROTOCOL NULL_test_protocol[] = { { NULL } }; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 444; // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, "test_host", 80, "test_resource/23", NULL_test_protocol, sizeof(NULL_test_protocol) / sizeof(NULL_test_protocol[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_526: [ If the `protocol` member of any of the items in the `protocols` argument is NULL, then `uws_client_create_with_io` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_client_create_with_io_with_a_NULL_protocol_name_for_second_protocol_fails) { // arrange UWS_CLIENT_HANDLE uws_client; SOCKETIO_CONFIG socketio_config; WS_PROTOCOL NULL_test_protocol[] = { { "a" }, { NULL } }; socketio_config.accepted_socket = NULL; socketio_config.hostname = "test_host"; socketio_config.port = 444; // act uws_client = uws_client_create_with_io(TEST_SOCKET_IO_INTERFACE_DESCRIPTION, &socketio_config, "test_host", 80, "test_resource/23", NULL_test_protocol, sizeof(NULL_test_protocol) / sizeof(NULL_test_protocol[0])); // assert ASSERT_IS_NULL(uws_client); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* uws_client_destroy */ /* Tests_SRS_UWS_CLIENT_01_019: [ `uws_client_destroy` shall free all resources associated with the uws instance. ]*/ /* Tests_SRS_UWS_CLIENT_01_023: [ `uws_client_destroy` shall ensure the underlying IO created in `uws_client_open_async` is destroyed by calling `xio_destroy`. ]*/ /* Tests_SRS_UWS_CLIENT_01_024: [ `uws_client_destroy` shall free the list used to track the pending sends by calling `singlylinkedlist_destroy`. ]*/ /* Tests_SRS_UWS_CLIENT_01_424: [ `uws_client_destroy` shall free the buffer allocated in `uws_client_create` by calling `BUFFER_delete`. ]*/ /* Tests_SRS_UWS_CLIENT_01_437: [ `uws_client_destroy` shall free the protocols array allocated in `uws_client_create`. ]*/ TEST_FUNCTION(uws_client_destroy_fress_the_resources) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client_destroy(uws_client); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_437: [ `uws_client_destroy` shall free the protocols array allocated in `uws_client_create`. ]*/ TEST_FUNCTION(uws_client_destroy_with_2_protocols_fress_both_protocols) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; static const WS_PROTOCOL two_protocols[] = { { "test_protocol1" },{ "test_protocol2" } }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, two_protocols, sizeof(two_protocols) / sizeof(two_protocols[0])); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client_destroy(uws_client); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_437: [ `uws_client_destroy` shall free the protocols array allocated in `uws_client_create`. ]*/ TEST_FUNCTION(uws_client_destroy_with_no_protocols_frees_all_other_resources) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, NULL, 0); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client_destroy(uws_client); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_020: [ If `uws_client` is NULL, `uws_client_destroy` shall do nothing. ]*/ TEST_FUNCTION(uws_client_destroy_with_NULL_does_nothing) { // arrange // act uws_client_destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_021: [ `uws_client_destroy` shall perform a close action if the uws instance has already been open. ]*/ /* Tests_SRS_UWS_CLIENT_01_034: [ `uws_client_close_async` shall obtain all the pending send frames by repetitively querying for the head of the pending IO list and freeing that head item. ]*/ /* Tests_SRS_UWS_CLIENT_01_035: [ Obtaining the head of the pending send frames list shall be done by calling `singlylinkedlist_get_head_item`. ]*/ TEST_FUNCTION(uws_client_destroy_also_performs_a_close) { TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_destroy(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); EXPECTED_CALL(Map_Destroy(IGNORED_PTR_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act uws_client_destroy(uws_client); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* uws_client_open_async */ /* Tests_SRS_UWS_CLIENT_01_025: [ `uws_client_open_async` shall open the underlying IO by calling `xio_open` and providing the IO handle created in `uws_client_create` as argument. ]*/ /* Tests_SRS_UWS_CLIENT_01_367: [ The callbacks `on_underlying_io_open_complete`, `on_underlying_io_bytes_received` and `on_underlying_io_error` shall be passed as arguments to `xio_open`. ]*/ /* Tests_SRS_UWS_CLIENT_01_026: [ On success, `uws_client_open_async` shall return 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_061: [ To _Establish a WebSocket Connection_, a client opens a connection and sends a handshake as defined in this section. ]*/ TEST_FUNCTION(uws_client_open_async_opens_the_underlying_IO) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_027: [ If `uws_client`, `on_ws_open_complete`, `on_ws_frame_received`, `on_ws_peer_closed` or `on_ws_error` is NULL, `uws_client_open_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_handle_fails) { // arrange int result; // act result = uws_client_open_async(NULL, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_027: [ If `uws_client`, `on_ws_open_complete`, `on_ws_frame_received`, `on_ws_peer_closed` or `on_ws_error` is NULL, `uws_client_open_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_open_complete_callback_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_open_async(uws_client, NULL, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_027: [ If `uws_client`, `on_ws_open_complete`, `on_ws_frame_received`, `on_ws_peer_closed` or `on_ws_error` is NULL, `uws_client_open_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_frame_received_callback_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, NULL, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_027: [ If `uws_client`, `on_ws_open_complete`, `on_ws_frame_received`, `on_ws_peer_closed` or `on_ws_error` is NULL, `uws_client_open_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_peer_closed_callback_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, NULL, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_027: [ If `uws_client`, `on_ws_open_complete`, `on_ws_frame_received`, `on_ws_peer_closed` or `on_ws_error` is NULL, `uws_client_open_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_error_callback_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, NULL, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_393: [ The context arguments for the callbacks shall be allowed to be NULL. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_open_complete_context_succeeds) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, NULL, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_393: [ The context arguments for the callbacks shall be allowed to be NULL. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_frame_received_context_succeeds) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, NULL, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_393: [ The context arguments for the callbacks shall be allowed to be NULL. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_peer_closed_context_succeeds) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, NULL, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_393: [ The context arguments for the callbacks shall be allowed to be NULL. ]*/ TEST_FUNCTION(uws_client_open_async_with_NULL_on_ws_error_context_succeeds) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_028: [ If opening the underlying IO fails then `uws_client_open_async` shall fail and return a non-zero value. ]*/ /* Tests_SRS_UWS_CLIENT_01_075: [ If the connection could not be opened, either because a direct connection failed or because any proxy used returned an error, then the client MUST _Fail the WebSocket Connection_ and abort the connection attempt. ]*/ TEST_FUNCTION(when_opening_the_underlying_io_fails_uws_client_open_async_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context() .SetReturn(1); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_394: [ `uws_client_open_async` while the uws instance is already OPEN or OPENING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_after_uws_client_open_async_without_a_close_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_400: [ `uws_client_open_async` while CLOSING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_while_closing_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); (void)uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); umock_c_reset_all_calls(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_400: [ `uws_client_open_async` while CLOSING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_open_async_while_waiting_for_CLOSE_frame_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, NULL); umock_c_reset_all_calls(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_client_close_async */ /* Tests_SRS_UWS_CLIENT_01_029: [ `uws_client_close_async` shall close the uws instance connection if an open action is either pending or has completed successfully (if the IO is open). ]*/ /* Tests_SRS_UWS_CLIENT_01_031: [ `uws_client_close_async` shall close the connection by calling `xio_close` while passing as argument the IO handle created in `uws_client_create`. ]*/ /* Tests_SRS_UWS_CLIENT_01_368: [ The callback `on_underlying_io_close` shall be passed as argument to `xio_close`. ]*/ /* Tests_SRS_UWS_CLIENT_01_396: [ On success `uws_client_close_async` shall return 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_399: [ `on_ws_close_complete` and `on_ws_close_complete_context` shall be saved and the callback `on_ws_close_complete` shall be triggered when the close is complete. ]*/ /* Tests_SRS_UWS_CLIENT_01_317: [ Clients SHOULD NOT close the WebSocket connection arbitrarily. ]*/ TEST_FUNCTION(uws_client_close_async_closes_the_underlying_IO) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_030: [ if `uws_client` is NULL, `uws_client_close_async` shall return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_async_with_NULL_handle_fails) { // arrange int result; // act result = uws_client_close_async(NULL, test_on_ws_close_complete, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_397: [ The `on_ws_close_complete` argument shall be allowed to be NULL, in which case no callback shall be called when the close is complete. ]*/ TEST_FUNCTION(uws_client_close_async_with_NULL_close_complete_callback_is_allowed) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_async(uws_client, NULL, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_398: [ `on_ws_close_complete_context` shall also be allows to be NULL. ]*/ TEST_FUNCTION(uws_client_close_async_with_NULL_close_context_succeeds) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_395: [ If `xio_close` fails, `uws_client_close_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_the_underlying_xio_close_fails_then_uws_client_close_async_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context() .SetReturn(1); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_032: [ `uws_client_close_async` when no open action has been issued shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_async_without_open_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_033: [ `uws_client_close_async` after a `uws_client_close_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_async_while_closing_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); (void)uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); umock_c_reset_all_calls(); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_033: [ `uws_client_close_async` after a `uws_client_close_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_async_while_WAITING_for_close_frame_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_close_handshake_async(uws_client, 1002, "", NULL, NULL); umock_c_reset_all_calls(); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_033: [ `uws_client_close_async` after a `uws_client_close_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_async_after_close_complete_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); (void)uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); g_on_io_close_complete(g_on_io_close_complete_context); umock_c_reset_all_calls(); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_034: [ `uws_client_close_async` shall obtain all the pending send frames by repetitively querying for the head of the pending IO list and freeing that head item. ]*/ /* Tests_SRS_UWS_CLIENT_01_035: [ Obtaining the head of the pending send frames list shall be done by calling `singlylinkedlist_get_head_item`. ]*/ /* Tests_SRS_UWS_CLIENT_01_036: [ For each pending send frame the send complete callback shall be called with `UWS_SEND_FRAME_CANCELLED`. ]*/ /* Tests_SRS_UWS_CLIENT_01_037: [ When indicating pending send frames as cancelled the callback context passed to the `on_ws_send_frame_complete` callback shall be the context given to `uws_client_send_frame_async`. ]*/ TEST_FUNCTION(uws_client_close_async_with_1_pending_send_frames_indicates_the_frames_as_cancelled) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; LIST_ITEM_HANDLE list_item; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, NULL, 0, true, test_on_ws_send_frame_complete, (void*)0x4248); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)) .CaptureReturn(&list_item); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .ValidateArgumentValue_item_handle(&list_item); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete((void*)0x4248, WS_SEND_FRAME_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_034: [ `uws_client_close_async` shall obtain all the pending send frames by repetitively querying for the head of the pending IO list and freeing that head item. ]*/ /* Tests_SRS_UWS_CLIENT_01_035: [ Obtaining the head of the pending send frames list shall be done by calling `singlylinkedlist_get_head_item`. ]*/ /* Tests_SRS_UWS_CLIENT_01_036: [ For each pending send frame the send complete callback shall be called with `UWS_SEND_FRAME_CANCELLED`. ]*/ /* Tests_SRS_UWS_CLIENT_01_037: [ When indicating pending send frames as cancelled the callback context passed to the `on_ws_send_frame_complete` callback shall be the context given to `uws_client_send_frame_async`. ]*/ TEST_FUNCTION(uws_client_close_async_with_2_pending_send_frames_indicates_the_frames_as_cancelled) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char test_frame_1[] = { 0x42 }; const unsigned char test_frame_2[] = { 0x43, 0x44 }; LIST_ITEM_HANDLE list_item_1; LIST_ITEM_HANDLE list_item_2; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_frame_1, sizeof(test_frame_2), true, test_on_ws_send_frame_complete, (void*)0x4248); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_TEXT, test_frame_2, sizeof(test_frame_2), true, test_on_ws_send_frame_complete, (void*)0x4249); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)) .CaptureReturn(&list_item_1); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .ValidateArgumentValue_item_handle(&list_item_1); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete((void*)0x4248, WS_SEND_FRAME_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)) .CaptureReturn(&list_item_2); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .ValidateArgumentValue_item_handle(&list_item_2); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete((void*)0x4249, WS_SEND_FRAME_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_async(uws_client, test_on_ws_close_complete, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_client_close_handshake_async */ /* Tests_SRS_UWS_CLIENT_01_465: [ `uws_client_close_handshake_async` shall initiate the close handshake by sending a close frame to the peer. ]*/ /* Tests_SRS_UWS_CLIENT_01_466: [ On success `uws_client_close_handshake_async` shall return 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_468: [ `on_ws_close_complete` and `on_ws_close_complete_context` shall be saved and the callback `on_ws_close_complete` shall be triggered when the close is complete. ]*/ /* Tests_SRS_UWS_CLIENT_01_471: [ The callback `on_underlying_io_close_sent` shall be passed as argument to `xio_send`. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_sends_the_close_frame) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame_payload[] = { 0x03, 0xEA }; unsigned char close_frame[] = { 0x88, 0x82, 0x00, 0x00, 0x00, 0x00, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, IGNORED_PTR_ARG, sizeof(close_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, close_frame_payload, sizeof(close_frame_payload)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, close_frame, sizeof(close_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, close_frame, sizeof(close_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, (void*)0x4445); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_467: [ if `uws_client` is NULL, `uws_client_close_handshake_async` shall return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_with_NULL_handle_fails) { // arrange int result; // act result = uws_client_close_handshake_async(NULL, 1002, "", test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_469: [ The `on_ws_close_complete` argument shall be allowed to be NULL, in which case no callback shall be called when the close is complete. ]*/ /* Tests_SRS_UWS_CLIENT_01_471: [ The callback `on_underlying_io_close_sent` shall be passed as argument to `xio_send`. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_with_NULL_close_complete_callback_is_allowed) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame_payload[] = { 0x03, 0xEA }; unsigned char close_frame[] = { 0x88, 0x82, 0x00, 0x00, 0x00, 0x00, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, IGNORED_PTR_ARG, sizeof(close_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, close_frame_payload, sizeof(close_frame_payload)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, close_frame, sizeof(close_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, close_frame, sizeof(close_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_handshake_async(uws_client, 1002, "", NULL, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_470: [ `on_ws_close_complete_context` shall also be allowed to be NULL. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_with_NULL_context_is_allowed) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame_payload[] = { 0x03, 0xEA }; unsigned char close_frame[] = { 0x88, 0x82, 0x00, 0x00, 0x00, 0x00, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, IGNORED_PTR_ARG, sizeof(close_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, close_frame_payload, sizeof(close_frame_payload)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, close_frame, sizeof(close_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, close_frame, sizeof(close_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_472: [ If `xio_send` fails, `uws_client_close_handshake_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_xio_send_fails_uws_client_close_handshake_async_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame_payload[] = { 0x03, 0xEA }; unsigned char close_frame[] = { 0x88, 0x82, 0x00, 0x00, 0x00, 0x00, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, IGNORED_PTR_ARG, sizeof(close_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, close_frame_payload, sizeof(close_frame_payload)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, close_frame, sizeof(close_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, close_frame, sizeof(close_frame)) .SetReturn(1); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act result = uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_473: [ `uws_client_close_handshake_async` when no open action has been issued shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_when_not_opened_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, (void*)0x4445); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_474: [ `uws_client_close_handshake_async` when already CLOSING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_when_already_SENDING_CLOSE_frame_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); // act result = uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_474: [ `uws_client_close_handshake_async` when already CLOSING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_when_already_CLOSING_underlying_IO_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); umock_c_reset_all_calls(); // act result = uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_033: [ `uws_client_close_async` after a `uws_client_close_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_close_handshake_async_while_WAITING_for_close_frame_fails) { // arrange TLSIO_CONFIG tlsio_config; int result; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_close_handshake_async(uws_client, 1002, "", NULL, NULL); umock_c_reset_all_calls(); // act result = uws_client_close_handshake_async(uws_client, 1002, "", NULL, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* on_underlying_io_open_complete */ /* Tests_SRS_UWS_CLIENT_01_369: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_ERROR` while uws is OPENING (`uws_client_open_async` was called), uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED`. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_with_ERROR_triggers_the_ws_open_complete_callback_with_WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_ERROR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_409: [ After any error is indicated by `on_ws_open_complete`, a subsequent `uws_client_open_async` shall be possible. ]*/ TEST_FUNCTION(uws_client_open_async_after_WS_OPEN_ERROR_UNDERLYING_IO_OPEN_FAILED_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_ERROR); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244);; // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_401: [ If `on_underlying_io_open_complete` is called with a NULL context, `on_underlying_io_open_complete` shall do nothing. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_with_NULL_context_does_nothing) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); // act g_on_io_open_complete(NULL, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_402: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_CANCELLED` while uws is OPENING (`uws_client_open_async` was called), uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED`. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_with_CANCELLED_triggers_the_ws_open_complete_callback_with_WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_CANCELLED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_409: [ After any error is indicated by `on_ws_open_complete`, a subsequent `uws_client_open_async` shall be possible. ]*/ TEST_FUNCTION(uws_client_open_async_after_WS_OPEN_ERROR_UNDERLYING_IO_OPEN_CANCELLED_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_CANCELLED); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244);; // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_371: [ When `on_underlying_io_open_complete` is called with `IO_OPEN_OK` while uws is OPENING (`uws_client_open_async` was called), uws shall prepare the WebSockets upgrade request. ]*/ /* Tests_SRS_UWS_CLIENT_01_372: [ Once prepared the WebSocket upgrade request shall be sent by calling `xio_send`. ]*/ /* Tests_SRS_UWS_CLIENT_01_080: [ Once a connection to the server has been established (including a connection via a proxy or over a TLS-encrypted tunnel), the client MUST send an opening handshake to the server. ]*/ /* Tests_SRS_UWS_CLIENT_01_081: [ The handshake consists of an HTTP Upgrade request, along with a list of required and optional header fields. ]*/ /* Tests_SRS_UWS_CLIENT_01_082: [ The handshake MUST be a valid HTTP request as specified by [RFC2616]. ]*/ /* Tests_SRS_UWS_CLIENT_01_083: [ The method of the request MUST be GET, and the HTTP version MUST be at least 1.1. ]*/ /* Tests_SRS_UWS_CLIENT_01_084: [ The "Request-URI" part of the request MUST match the /resource name/ defined in Section 3 (a relative URI) or be an absolute http/https URI that, when parsed, has a /resource name/, /host/, and /port/ that match the corresponding ws/wss URI. ]*/ /* Tests_SRS_UWS_CLIENT_01_085: [ The request MUST contain a |Host| header field whose value contains /host/ plus optionally ":" followed by /port/ (when not using the default port). ]*/ /* Tests_SRS_UWS_CLIENT_01_086: [ The request MUST contain an |Upgrade| header field whose value MUST include the "websocket" keyword. ]*/ /* Tests_SRS_UWS_CLIENT_01_087: [ The request MUST contain a |Connection| header field whose value MUST include the "Upgrade" token. ]*/ /* Tests_SRS_UWS_CLIENT_01_088: [ The request MUST include a header field with the name |Sec-WebSocket-Key|. ]*/ /* Tests_SRS_UWS_CLIENT_01_094: [ The request MUST include a header field with the name |Sec-WebSocket-Version|. ]*/ /* Tests_SRS_UWS_CLIENT_01_095: [ The value of this header field MUST be 13. ]*/ /* Tests_SRS_UWS_CLIENT_01_096: [ The request MAY include a header field with the name |Sec-WebSocket-Protocol|. ]*/ /* Tests_SRS_UWS_CLIENT_01_100: [ The request MAY include a header field with the name |Sec-WebSocket-Extensions|. ]*/ /* Tests_SRS_UWS_CLIENT_01_101: [ The request MAY include any other header fields, for example, cookies [RFC6265] and/or authentication-related header fields such as the |Authorization| header field [RFC2616], which are processed according to documents that define them. ] */ /* Tests_SRS_UWS_CLIENT_01_089: [ The value of this header field MUST be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded (see Section 4 of [RFC4648]). ]*/ /* Tests_SRS_UWS_CLIENT_01_090: [ The nonce MUST be selected randomly for each connection. ]*/ /* Tests_SRS_UWS_CLIENT_01_497: [ The nonce needed for the upgrade request shall be Base64 encoded with `Base64_Encode_Bytes`. ]*/ TEST_FUNCTION(on_underlying_io_open_complete_with_OK_prepares_and_sends_the_WebSocket_upgrade_request) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; size_t i; unsigned char expected_nonce[16]; char* req_header1_key = "Authorization"; char* req_header1_value = "Bearer 23420939909809283488230949"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; my_Map_GetInternals_keys[0] = req_header1_key; my_Map_GetInternals_values[0] = req_header1_value; my_Map_GetInternals_count = 1; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_AddOrUpdate(TEST_REQUEST_HEADERS_MAP, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); (void)uws_client_set_request_header(uws_client, req_header1_key, req_header1_value); umock_c_reset_all_calls(); /* get the random 16 bytes */ for (i = 0; i < 16; i++) { EXPECTED_CALL(gb_rand()).SetReturn((int)i); expected_nonce[i] = (unsigned char)i; } STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_PTR_ARG, 16)) .ValidateArgumentBuffer(1, expected_nonce, 16); // get_request_headers() STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(malloc(strlen(req_header1_key)+strlen(req_header1_value)+2+2+1)); STRICT_EXPECTED_CALL(STRING_c_str(BASE64_ENCODED_STRING)).SetReturn("ZWRuYW1vZGU6bm9jYXBlcyE="); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .IgnoreArgument_buffer() .IgnoreArgument_size(); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(BASE64_ENCODED_STRING)); EXPECTED_CALL(free(IGNORED_PTR_ARG)); // request headers // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_498: [ If Base64 encoding the nonce for the upgrade request fails, then the uws client shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BASE64_ENCODE_FAILED`. ]*/ TEST_FUNCTION(when_base64_encode_fails_on_underlying_io_open_complete_triggers_the_error_WS_OPEN_ERROR_BASE64_ENCODE_FAILED) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; size_t i; unsigned char expected_nonce[16]; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); /* get the random 16 bytes */ for (i = 0; i < 16; i++) { EXPECTED_CALL(gb_rand()).SetReturn((int)i); expected_nonce[i] = (unsigned char)i; } STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_PTR_ARG, 16)) .ValidateArgumentBuffer(1, expected_nonce, 16) .SetReturn(NULL); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_BASE64_ENCODE_FAILED)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_406: [ If not enough memory can be allocated to construct the WebSocket upgrade request, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_websocket_upgrade_request_fails_the_error_WS_OPEN_ERROR_NOT_ENOUGH_MEMORY_is_indicated_via_the_open_complete_callback) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; size_t i; unsigned char expected_nonce[16]; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); /* get the random 16 bytes */ for (i = 0; i < 16; i++) { EXPECTED_CALL(gb_rand()).SetReturn((int)i); expected_nonce[i] = (unsigned char)i; } STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_PTR_ARG, 16)) .ValidateArgumentBuffer(1, expected_nonce, 16); // get_request_headers() STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(STRING_c_str(BASE64_ENCODED_STRING)).SetReturn("ZWRuYW1vZGU6bm9jYXBlcyE="); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_NOT_ENOUGH_MEMORY)); STRICT_EXPECTED_CALL(STRING_delete(BASE64_ENCODED_STRING)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // empty request headers // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_409: [ After any error is indicated by `on_ws_open_complete`, a subsequent `uws_client_open_async` shall be possible. ]*/ TEST_FUNCTION(uws_client_open_async_after_WS_OPEN_ERROR_NOT_ENOUGH_MEMORY_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; size_t i; unsigned char expected_nonce[16]; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); /* get the random 16 bytes */ for (i = 0; i < 16; i++) { EXPECTED_CALL(gb_rand()).SetReturn((int)i); expected_nonce[i] = (unsigned char)i; } STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_PTR_ARG, 16)) .ValidateArgumentBuffer(1, expected_nonce, 16); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_NOT_ENOUGH_MEMORY)); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244);; // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_373: [ If `xio_send` fails then uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST`. ]*/ TEST_FUNCTION(when_sending_the_upgrade_request_fails_the_error_WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; size_t i; unsigned char expected_nonce[16]; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); /* get the random 16 bytes */ for (i = 0; i < 16; i++) { EXPECTED_CALL(gb_rand()).SetReturn((int)i); expected_nonce[i] = (unsigned char)i; } STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_PTR_ARG, 16)) .ValidateArgumentBuffer(1, expected_nonce, 16); STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); // get_request_headers(), no headers STRICT_EXPECTED_CALL(STRING_c_str(BASE64_ENCODED_STRING)).SetReturn("ZWRuYW1vZGU6bm9jYXBlcyE="); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .IgnoreArgument_buffer() .IgnoreArgument_size() .SetReturn(1); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(STRING_delete(BASE64_ENCODED_STRING)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_409: [ After any error is indicated by `on_ws_open_complete`, a subsequent `uws_client_open_async` shall be possible. ]*/ TEST_FUNCTION(uws_client_open_async_after_WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; size_t i; unsigned char expected_nonce[16]; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); /* get the random 16 bytes */ for (i = 0; i < 16; i++) { EXPECTED_CALL(gb_rand()).SetReturn((int)i); expected_nonce[i] = (unsigned char)i; } STRICT_EXPECTED_CALL(Base64_Encode_Bytes(IGNORED_PTR_ARG, 16)) .ValidateArgumentBuffer(1, expected_nonce, 16); // get_request_headers() STRICT_EXPECTED_CALL(Map_GetInternals(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(STRING_c_str(BASE64_ENCODED_STRING)).SetReturn("ZWRuYW1vZGU6bm9jYXBlcyE="); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_NUM_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .IgnoreArgument_buffer() .IgnoreArgument_size() .SetReturn(1); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244);; // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_407: [ When `on_underlying_io_open_complete` is called when the uws instance has send the upgrade request but it is waiting for the response, an error shall be reported to the user by calling the `on_ws_open_complete` with `WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS`. ]*/ TEST_FUNCTION(when_sending_the_upgrade_request_fails_the_error_WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS)); // act g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_409: [ After any error is indicated by `on_ws_open_complete`, a subsequent `uws_client_open_async` shall be possible. ]*/ TEST_FUNCTION(uws_client_open_async_after_WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_MULTIPLE_UNDERLYING_IO_OPEN_EVENTS)); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244);; // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* on_underlying_io_bytes_received */ /* Tests_SRS_UWS_CLIENT_01_378: [ When `on_underlying_io_bytes_received` is called while the uws is OPENING, the received bytes shall be accumulated in order to attempt parsing the WebSocket Upgrade response. ]*/ /* Tests_SRS_UWS_CLIENT_01_380: [ If an WebSocket Upgrade request can be parsed from the accumulated bytes, the status shall be read from the WebSocket upgrade response. ]*/ /* Tests_SRS_UWS_CLIENT_01_381: [ If the status is 101, uws shall be considered OPEN and this shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `IO_OPEN_OK`. ]*/ /* Tests_SRS_UWS_CLIENT_01_065: [ When the client is to _Establish a WebSocket Connection_ given a set of (/host/, /port/, /resource name/, and /secure/ flag), along with a list of /protocols/ and /extensions/ to be used, and an /origin/ in the case of web browsers, it MUST open a connection, send an opening handshake, and read the server's handshake in response. ]*/ /* Tests_SRS_UWS_CLIENT_01_102: [ Once the client's opening handshake has been sent, the client MUST wait for a response from the server before sending any further data. ]*/ /* Tests_SRS_UWS_CLIENT_01_115: [ If the server's response is validated as provided for above, it is said that _The WebSocket Connection is Established_ and that the WebSocket Connection is in the OPEN state. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_full_reply_after_the_upgrade_request_was_sent_indicates_open_complete) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_382: [ If a negative status is decoded from the WebSocket upgrade request, an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_RESPONSE_STATUS`. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_reply_with_a_status_code_different_than_101_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 403\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_BAD_RESPONSE_STATUS)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_382: [ If a negative status is decoded from the WebSocket upgrade request, an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_RESPONSE_STATUS`. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_reply_with_status_100_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 100\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_BAD_RESPONSE_STATUS)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_382: [ If a negative status is decoded from the WebSocket upgrade request, an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_RESPONSE_STATUS`. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(open_after_a_bad_status_is_decoded_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 100\r\n\r\n"; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_378: [ When `on_underlying_io_bytes_received` is called while the uws is OPENING, the received bytes shall be accumulated in order to attempt parsing the WebSocket Upgrade response. ]*/ /* Tests_SRS_UWS_CLIENT_01_380: [ If an WebSocket Upgrade request can be parsed from the accumulated bytes, the status shall be read from the WebSocket upgrade response. ]*/ /* Tests_SRS_UWS_CLIENT_01_381: [ If the status is 101, uws shall be considered OPEN and this shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `IO_OPEN_OK`. ]*/ /* Tests_SRS_UWS_CLIENT_01_065: [ When the client is to _Establish a WebSocket Connection_ given a set of (/host/, /port/, /resource name/, and /secure/ flag), along with a list of /protocols/ and /extensions/ to be used, and an /origin/ in the case of web browsers, it MUST open a connection, send an opening handshake, and read the server's handshake in response. ]*/ /* Tests_SRS_UWS_CLIENT_01_102: [ Once the client's opening handshake has been sent, the client MUST wait for a response from the server before sending any further data. ]*/ /* Tests_SRS_UWS_CLIENT_01_115: [ If the server's response is validated as provided for above, it is said that _The WebSocket Connection is Established_ and that the WebSocket Connection is in the OPEN state. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(after_a_bad_status_code_a_subsequent_open_completes) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_bad_upgrade_response[] = "HTTP/1.1 403 \r\n\r\n"; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_bad_upgrade_response, sizeof(test_bad_upgrade_response) - 1); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_383: [ If the WebSocket upgrade request cannot be decoded an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE`. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_an_empty_reply_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_383: [ If the WebSocket upgrade request cannot be decoded an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE`. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_an_imcomplete_HTTP_1_1__reply_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_383: [ If the WebSocket upgrade request cannot be decoded an error shall be indicated by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE`. ]*/ /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_a_complete_HTTP_version_but_no_status_code_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_BAD_UPGRADE_RESPONSE)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(open_completes_when_response_has_more_spaces_in_it) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(open_completes_when_response_has_more_spaces_in_it_after_the_status_code) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_478: [ A Status-Line with a 101 response code as per RFC 2616 [RFC2616]. ]*/ TEST_FUNCTION(open_completes_when_a_header_is_present_in_the_response) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\nSomeHeader:x\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_379: [ If allocating memory for accumulating the bytes fails, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_received_bytes_fails_on_underlying_io_bytes_received_indicates_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_NOT_ENOUGH_MEMORY)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_378: [ When `on_underlying_io_bytes_received` is called while the uws is OPENING, the received bytes shall be accumulated in order to attempt parsing the WebSocket Upgrade response. ]*/ /* Tests_SRS_UWS_CLIENT_01_380: [ If an WebSocket Upgrade request can be parsed from the accumulated bytes, the status shall be read from the WebSocket upgrade response. ]*/ TEST_FUNCTION(when_only_a_byte_is_received_no_open_complete_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "H"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_415: [ If called with a NULL `context` argument, `on_underlying_io_bytes_received` shall do nothing. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_NULL_context_does_nothing) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); // act g_on_bytes_received(NULL, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_416: [ If called with NULL `buffer` or zero `size` and the state of the iws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS`. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_NULL_buffer_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS)); // act g_on_bytes_received(g_on_bytes_received_context, NULL, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_416: [ If called with NULL `buffer` or zero `size` and the state of the iws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS`. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_with_zero_size_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_INVALID_BYTES_RECEIVED_ARGUMENTS)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_417: [ When `on_underlying_io_bytes_received` is called while OPENING but before the `on_underlying_io_open_complete` has been called, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN`. ]*/ TEST_FUNCTION(on_underlying_io_bytes_received_before_underlying_io_open_complete_indicates_an_open_complete_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_BYTES_RECEIVED_BEFORE_UNDERLYING_OPEN)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_379: [ If allocating memory for accumulating the bytes fails, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_NOT_ENOUGH_MEMORY`. ]*/ TEST_FUNCTION(when_allocating_memory_for_a_second_byte_fails_open_complete_is_indicated_with_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_NOT_ENOUGH_MEMORY)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response + 1, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } void when_only_n_bytes_are_received_from_the_response_no_open_complete_is_indicated(const char* test_upgrade_response, size_t n) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; char temp_str[32]; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, n); // assert (void)sprintf(temp_str, "Bytes = %u", (unsigned int)n); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls(), temp_str); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_380: [ If an WebSocket Upgrade request can be parsed from the accumulated bytes, the status shall be read from the WebSocket upgrade response. ]*/ TEST_FUNCTION(when_all_but_1_bytes_are_received_from_the_response_no_open_complete_is_indicated) { const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r"; size_t i; for (i = 1; i < sizeof(test_upgrade_response); i++) { when_only_n_bytes_are_received_from_the_response_no_open_complete_is_indicated(test_upgrade_response, i); } } /* Tests_SRS_UWS_CLIENT_01_384: [ Any extra bytes that are left unconsumed after decoding a succesfull WebSocket upgrade response shall be used for decoding WebSocket frames by passing them to `uws_frame_decoder_decode`. ]*/ TEST_FUNCTION(when_1_extra_byte_is_received_the_open_complete_is_properly_indicated_and_the_extra_byte_is_saved_for_decoding_frames) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n\0"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_386: [ When a WebSocket data frame is decoded succesfully it shall be indicated via the callback `on_ws_frame_received`. ]*/ /* Tests_SRS_UWS_CLIENT_01_385: [ If the state of the uws instance is OPEN, the received bytes shall be used for decoding WebSocket frames. ]*/ /* Tests_SRS_UWS_CLIENT_01_154: [ * %x2 denotes a binary frame ]*/ /* Tests_SRS_UWS_CLIENT_01_163: [ The length of the "Payload data", in bytes: ]*/ /* Tests_SRS_UWS_CLIENT_01_164: [ if 0-125, that is the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_169: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ /* Tests_SRS_UWS_CLIENT_01_173: [ The "Payload data" is defined as "Extension data" concatenated with "Application data". ]*/ /* Tests_SRS_UWS_CLIENT_01_147: [ Indicates that this is the final fragment in a message. ]*/ /* Tests_SRS_UWS_CLIENT_01_148: [ The first fragment MAY also be the final fragment. ]*/ /* Tests_SRS_UWS_CLIENT_01_277: [ To receive WebSocket data, an endpoint listens on the underlying network connection. ]*/ /* Tests_SRS_UWS_CLIENT_01_278: [ Incoming data MUST be parsed as WebSocket frames as defined in Section 5.2. ]*/ /* Tests_SRS_UWS_CLIENT_01_280: [ Upon receiving a data frame (Section 5.6), the endpoint MUST note the /type/ of the data as defined by the opcode (frame-opcode) from Section 5.2. ]*/ /* Tests_SRS_UWS_CLIENT_01_281: [ The "Application data" from this frame is defined as the /data/ of the message. ]*/ /* Tests_SRS_UWS_CLIENT_01_282: [ If the frame comprises an unfragmented message (Section 5.4), it is said that _A WebSocket Message Has Been Received_ with type /type/ and data /data/. ]*/ TEST_FUNCTION(when_a_1_byte_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char test_frame[] = { 0x82, 0x01, 0x42 }; const unsigned char expected_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 1)) .ValidateArgumentBuffer(3, expected_payload, sizeof(expected_payload)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_153: [ * %x1 denotes a text frame ]*/ /* Tests_SRS_UWS_CLIENT_01_258: [ Currently defined opcodes for data frames include 0x1 (Text), 0x2 (Binary). ]*/ /* Tests_SRS_UWS_CLIENT_01_280: [ Upon receiving a data frame (Section 5.6), the endpoint MUST note the /type/ of the data as defined by the opcode (frame-opcode) from Section 5.2. ]*/ /* Tests_SRS_UWS_CLIENT_01_281: [ The "Application data" from this frame is defined as the /data/ of the message. ]*/ /* Tests_SRS_UWS_CLIENT_01_282: [ If the frame comprises an unfragmented message (Section 5.4), it is said that _A WebSocket Message Has Been Received_ with type /type/ and data /data/. ]*/ TEST_FUNCTION(when_a_1_byte_text_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char test_frame[] = { 0x81, 0x01, 'a' }; const unsigned char expected_payload[] = { 'a' }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_TEXT, IGNORED_PTR_ARG, 1)) .ValidateArgumentBuffer(3, expected_payload, sizeof(expected_payload)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_163: [ The length of the "Payload data", in bytes: ]*/ /* Tests_SRS_UWS_CLIENT_01_164: [ if 0-125, that is the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_264: [ The "Payload data" is arbitrary binary data whose interpretation is solely up to the application layer. ]*/ TEST_FUNCTION(when_a_0_bytes_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char test_frame[] = { 0x82, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 0)) .IgnoreArgument_buffer(); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_163: [ The length of the "Payload data", in bytes: ]*/ /* Tests_SRS_UWS_CLIENT_01_164: [ if 0-125, that is the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_258: [ Currently defined opcodes for data frames include 0x1 (Text), 0x2 (Binary). ]*/ TEST_FUNCTION(when_a_0_bytes_text_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char test_frame[] = { 0x81, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_TEXT, IGNORED_PTR_ARG, 0)) .IgnoreArgument_buffer(); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_213: [ A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_147: [ Indicates that this is the final fragment in a message. ]*/ /* Tests_SRS_UWS_CLIENT_01_152: [* * %x0 denotes a continuation frame *]*/ /* Tests_SRS_UWS_CLIENT_01_216: [ Message fragments MUST be delivered to the recipient in the order sent by the sender. ]*/ /* Tests_SRS_UWS_CLIENT_01_219: [ A sender MAY create fragments of any size for non-control messages. ]*/ /* Tests_SRS_UWS_CLIENT_01_225: [ As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. ]*/ TEST_FUNCTION(when_a_fragmented_text_frame_is_received_it_shall_be_indicated_to_the_user_once_fully_received) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char first_fragment[125 + 2] = { 0x01, 0x7D }; unsigned char middle_fragment[130 + 4] = { 0x00, 0x7E, 0x00, 0x82 }; unsigned char last_fragment[2] = { 0x80, 0x00 }; unsigned char* result_payload = (unsigned char*)malloc(255); size_t i; for (i = 0; i < 255; i++) { if (i < 125) { first_fragment[2 + i] = (unsigned char)i; } else { middle_fragment[4 + (i - 125)] = (unsigned char)i; } result_payload[i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_TEXT, IGNORED_PTR_ARG, 255)) .ValidateArgumentBuffer(3, result_payload, 255); // act g_on_bytes_received(g_on_bytes_received_context, first_fragment, sizeof(first_fragment)); g_on_bytes_received(g_on_bytes_received_context, middle_fragment, sizeof(middle_fragment)); g_on_bytes_received(g_on_bytes_received_context, last_fragment, sizeof(last_fragment)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup free(result_payload); uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_213: [ A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_147: [ Indicates that this is the final fragment in a message. ]*/ /* Tests_SRS_UWS_CLIENT_01_152: [* * %x0 denotes a continuation frame *]*/ /* Tests_SRS_UWS_CLIENT_01_216: [ Message fragments MUST be delivered to the recipient in the order sent by the sender. ]*/ /* Tests_SRS_UWS_CLIENT_01_219: [ A sender MAY create fragments of any size for non-control messages. ]*/ /* Tests_SRS_UWS_CLIENT_01_225: [ As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. ]*/ TEST_FUNCTION(when_a_fragmented_binary_frame_is_received_it_shall_be_indicated_to_the_user_once_fully_received) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char first_fragment[125 + 2] = { 0x02, 0x7D }; unsigned char middle_fragment[130 + 4] = { 0x00, 0x7E, 0x00, 0x82 }; unsigned char last_fragment[2] = { 0x80, 0x00 }; unsigned char* result_payload = (unsigned char*)malloc(255); size_t i; for (i = 0; i < 255; i++) { if (i < 125) { first_fragment[2 + i] = (unsigned char)i; } else { middle_fragment[4 + (i - 125)] = (unsigned char)i; } result_payload[i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 255)) .ValidateArgumentBuffer(3, result_payload, 255); // act g_on_bytes_received(g_on_bytes_received_context, first_fragment, sizeof(first_fragment)); g_on_bytes_received(g_on_bytes_received_context, middle_fragment, sizeof(middle_fragment)); g_on_bytes_received(g_on_bytes_received_context, last_fragment, sizeof(last_fragment)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup free(result_payload); uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_217: [ The fragments of one message MUST NOT be interleaved between the fragments of another message unless an extension has been negotiated that can interpret the interleaving. ]*/ TEST_FUNCTION(when_a_fragmented_frame_is_interleaved_within_another_fragmented_frame_there_is_an_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char fragment1[2] = {0x02, 0x00}; unsigned char fragment2[2] = {0x02, 0x00}; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, fragment1, sizeof(fragment1)); g_on_bytes_received(g_on_bytes_received_context, fragment2, sizeof(fragment2)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_213: [ A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_147: [ Indicates that this is the final fragment in a message. ]*/ /* Tests_SRS_UWS_CLIENT_01_152: [* * %x0 denotes a continuation frame *]*/ /* Tests_SRS_UWS_CLIENT_01_216: [ Message fragments MUST be delivered to the recipient in the order sent by the sender. ]*/ /* Tests_SRS_UWS_CLIENT_01_219: [ A sender MAY create fragments of any size for non-control messages. ]*/ /* Tests_SRS_UWS_CLIENT_01_225: [ As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. ]*/ TEST_FUNCTION(when_a_fragmented_frame_is_received_all_at_once_the_frame_is_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_stream[2 + 3 + 2] = { 0x02, 0x00, 0x00, 0x01, 0x00, 0x80, 0x00}; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 1)) .IgnoreArgument_buffer(); // act g_on_bytes_received(g_on_bytes_received_context, test_stream, sizeof(test_stream)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_213: [ A fragmented message consists of a single frame with the FIN bit clear and an opcode other than 0, followed by zero or more frames with the FIN bit clear and the opcode set to 0, and terminated by a single frame with the FIN bit set and an opcode of 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_147: [ Indicates that this is the final fragment in a message. ]*/ /* Tests_SRS_UWS_CLIENT_01_152: [* * %x0 denotes a continuation frame *]*/ /* Tests_SRS_UWS_CLIENT_01_216: [ Message fragments MUST be delivered to the recipient in the order sent by the sender. ]*/ /* Tests_SRS_UWS_CLIENT_01_219: [ A sender MAY create fragments of any size for non-control messages. ]*/ /* Tests_SRS_UWS_CLIENT_01_225: [ As a consequence of these rules, all fragments of a message are of the same type, as set by the first fragment's opcode. ]*/ /* Tests_SRS_UWS_CLIENT_01_214: [ Control frames (see Section 5.5) MAY be injected in the middle of a fragmented message. ]*/ TEST_FUNCTION(pong_frame_can_be_injected_in_middle_of_fragmented_message) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char first_fragment[125 + 2] = { 0x01, 0x7D }; unsigned char middle_fragment[130 + 4] = { 0x00, 0x7E, 0x00, 0x82 }; unsigned char last_fragment[2] = { 0x80, 0x00 }; const unsigned char ping_frame[] = { 0x89, 0x00 }; unsigned char pong_frame[] = {0x8A, 0x00, 0x00, 0x00, 0x00, 0x00}; BUFFER_HANDLE buffer_handle; unsigned char* result_payload = (unsigned char*)malloc(255); size_t i; for (i = 0; i < 255; i++) { if (i < 125) { first_fragment[2 + i] = (unsigned char)i; } else { middle_fragment[4 + (i - 125)] = (unsigned char)i; } result_payload[i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_PONG_FRAME, IGNORED_PTR_ARG, 0, true, true, 0)) .IgnoreArgument_payload() .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(pong_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(pong_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, pong_frame, sizeof(pong_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, pong_frame, sizeof(pong_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_TEXT, IGNORED_PTR_ARG, 255)) .ValidateArgumentBuffer(3, result_payload, 255); // act g_on_bytes_received(g_on_bytes_received_context, first_fragment, sizeof(first_fragment)); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)ping_frame, sizeof(ping_frame)); g_on_bytes_received(g_on_bytes_received_context, middle_fragment, sizeof(middle_fragment)); g_on_bytes_received(g_on_bytes_received_context, last_fragment, sizeof(last_fragment)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup free(result_payload); uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_215: [ Control frames themselves MUST NOT be fragmented. ]*/ TEST_FUNCTION(when_a_fragmented_control_frame_is_received_there_is_an_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char test_frame[] = {0x09, 0x00}; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_163: [ The length of the "Payload data", in bytes: ]*/ /* Tests_SRS_UWS_CLIENT_01_164: [ if 0-125, that is the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_264: [ The "Payload data" is arbitrary binary data whose interpretation is solely up to the application layer. ]*/ /* Tests_SRS_UWS_CLIENT_01_258: [ Currently defined opcodes for data frames include 0x1 (Text), 0x2 (Binary). ]*/ TEST_FUNCTION(when_a_125_bytes_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[125 + 2] = { 0x82, 0x7D }; size_t i; for (i = 0; i < 125; i++) { test_frame[2 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 125)) .ValidateArgumentBuffer(3, &test_frame[2], 125); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_165: [ If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_167: [ Multibyte length quantities are expressed in network byte order. ]*/ TEST_FUNCTION(when_a_126_bytes_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[126 + 4] = { 0x82, 0x7E, 0x00, 0x7E }; size_t i; for (i = 0; i < 126; i++) { test_frame[4 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 126)) .ValidateArgumentBuffer(3, &test_frame[4], 126); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_165: [ If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_167: [ Multibyte length quantities are expressed in network byte order. ]*/ TEST_FUNCTION(when_a_127_bytes_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[127 + 4] = { 0x82, 0x7E, 0x00, 0x7F }; size_t i; for (i = 0; i < 127; i++) { test_frame[4 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 127)) .ValidateArgumentBuffer(3, &test_frame[4], 127); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_165: [ If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_167: [ Multibyte length quantities are expressed in network byte order. ]*/ TEST_FUNCTION(when_a_65535_bytes_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char* test_frame = (unsigned char*)malloc(65535 + 4); size_t i; test_frame[0] = 0x82; test_frame[1] = 0x7E; test_frame[2] = 0xFF; test_frame[3] = 0xFF; for (i = 0; i < 65535; i++) { test_frame[4 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 65535)) .ValidateArgumentBuffer(3, &test_frame[4], 65535); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, 65535 + 4); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup free(test_frame); uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_166: [ If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_167: [ Multibyte length quantities are expressed in network byte order. ]*/ TEST_FUNCTION(when_a_65536_bytes_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char* test_frame = (unsigned char*)malloc(65536 + 10); size_t i; test_frame[0] = 0x82; test_frame[1] = 0x7F; test_frame[2] = 0x00; test_frame[3] = 0x00; test_frame[4] = 0x00; test_frame[5] = 0x00; test_frame[6] = 0x00; test_frame[7] = 0x01; test_frame[8] = 0x00; test_frame[9] = 0x00; for (i = 0; i < 65536; i++) { test_frame[10 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 65536)) .ValidateArgumentBuffer(3, &test_frame[10], 65536); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, 65536 + 10); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup free(test_frame); uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_166: [ If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_167: [ Multibyte length quantities are expressed in network byte order. ]*/ TEST_FUNCTION(when_a_65537_bytes_binary_frame_is_received_it_shall_be_indicated_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char* test_frame = (unsigned char*)malloc(65537 + 10); size_t i; test_frame[0] = 0x82; test_frame[1] = 0x7F; test_frame[2] = 0x00; test_frame[3] = 0x00; test_frame[4] = 0x00; test_frame[5] = 0x00; test_frame[6] = 0x00; test_frame[7] = 0x01; test_frame[8] = 0x00; test_frame[9] = 0x01; for (i = 0; i < 65537; i++) { test_frame[10 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 65537)) .ValidateArgumentBuffer(3, &test_frame[10], 65537); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, 65537 + 10); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup free(test_frame); uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ TEST_FUNCTION(when_a_0_byte_binary_frame_is_received_with_16_bit_length_an_error_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x7E, 0x00, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ TEST_FUNCTION(when_a_125_byte_binary_frame_is_received_with_16_bit_length_an_error_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[125 + 4] = { 0x82, 0x7E, 0x00, 0x7D }; size_t i; for (i = 0; i < 125; i++) { test_frame[4 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ TEST_FUNCTION(when_a_0_byte_binary_frame_is_received_with_64_bit_length_an_error_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ TEST_FUNCTION(when_a_65535_byte_binary_frame_is_received_with_64_bit_length_an_error_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char* test_frame = (unsigned char*)malloc(65535 + 10); size_t i; test_frame[0] = 0x82; test_frame[1] = 0x7F; test_frame[2] = 0x00; test_frame[3] = 0x00; test_frame[4] = 0x00; test_frame[5] = 0x00; test_frame[6] = 0x00; test_frame[7] = 0x00; test_frame[8] = 0xFF; test_frame[9] = 0xFF; for (i = 0; i < 65535; i++) { test_frame[10 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, 65535 + 10); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); free(test_frame); } /* Tests_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ TEST_FUNCTION(check_for_16_bit_length_too_low_is_done_as_soon_as_length_is_received) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x7E, 0x00, 0x7D }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_168: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ TEST_FUNCTION(check_for_64_bit_length_too_low_is_done_as_soon_as_length_is_received) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_166: [ If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. ]*/ /* Tests_SRS_UWS_CLIENT_01_419: [ If there is an error decoding the WebSocket frame, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_BAD_FRAME_RECEIVED`. ]*/ TEST_FUNCTION(when_the_highest_bit_is_set_in_a_64_bit_length_frame_an_error_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char* test_frame = (unsigned char*)malloc(65536 + 10); size_t i; test_frame[0] = 0x82; test_frame[1] = 0x7F; test_frame[2] = 0x80; test_frame[3] = 0x00; test_frame[4] = 0x00; test_frame[5] = 0x00; test_frame[6] = 0x00; test_frame[7] = 0x01; test_frame[8] = 0x00; test_frame[9] = 0x00; for (i = 0; i < 65536; i++) { test_frame[10 + i] = (unsigned char)i; } tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, 65536 + 10); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); free(test_frame); } /* Tests_SRS_UWS_CLIENT_01_418: [ If allocating memory for the bytes accumulated for decoding WebSocket frames fails, an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_NOT_ENOUGH_MEMORY`. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_received_frame_bytes_fails_an_error_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_NOT_ENOUGH_MEMORY)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_384: [ Any extra bytes that are left unconsumed after decoding a succesfull WebSocket upgrade response shall be used for decoding WebSocket frames ]*/ TEST_FUNCTION(when_1_byte_is_received_together_with_the_upgrade_request_and_one_byte_with_a_separate_call_decoding_frame_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char* upgrade_response_frame = (unsigned char*)malloc(sizeof(test_upgrade_response)); unsigned char test_frame[] = { 0x00 }; (void)memcpy(upgrade_response_frame, test_upgrade_response, sizeof(test_upgrade_response) - 1); upgrade_response_frame[sizeof(test_upgrade_response) - 1] = 0x82; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)upgrade_response_frame, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 0)) .IgnoreArgument_buffer(); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); free(upgrade_response_frame); } /* Tests_SRS_UWS_CLIENT_01_384: [ Any extra bytes that are left unconsumed after decoding a succesfull WebSocket upgrade response shall be used for decoding WebSocket frames ]*/ TEST_FUNCTION(when_a_complete_frame_is_received_together_with_the_upgrade_request_the_frame_is_indicated_as_received) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; size_t received_data_length = sizeof(test_upgrade_response) + 1; unsigned char* received_data = (unsigned char*)malloc(received_data_length); (void)memcpy(received_data, test_upgrade_response, sizeof(test_upgrade_response) - 1); received_data[received_data_length - 2] = 0x82; received_data[received_data_length - 1] = 0x00; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 0)) .IgnoreArgument_buffer(); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)received_data, received_data_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); free(received_data); } /* Tests_SRS_UWS_CLIENT_01_384: [ Any extra bytes that are left unconsumed after decoding a succesfull WebSocket upgrade response shall be used for decoding WebSocket frames ]*/ TEST_FUNCTION(when_a_1_byte_complete_frame_is_received_together_with_the_upgrade_request_the_frame_is_indicated_as_received) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; size_t received_data_length = sizeof(test_upgrade_response) + 2; unsigned char* received_data = (unsigned char*)malloc(received_data_length); unsigned char expected_frame_payload[] = { 0x42 }; (void)memcpy(received_data, test_upgrade_response, sizeof(test_upgrade_response) - 1); received_data[received_data_length - 1] = 0x42; received_data[received_data_length - 2] = 0x01; received_data[received_data_length - 3] = 0x82; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, expected_frame_payload, sizeof(expected_frame_payload))) .ValidateArgumentBuffer(3, expected_frame_payload, sizeof(expected_frame_payload)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)received_data, received_data_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); free(received_data); } /* Tests_SRS_UWS_CLIENT_01_384: [ Any extra bytes that are left unconsumed after decoding a succesfull WebSocket upgrade response shall be used for decoding WebSocket frames ]*/ TEST_FUNCTION(when_2_complete_frames_are_received_together_with_the_upgrade_request_the_frames_are_indicated_as_received) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; size_t received_data_length = sizeof(test_upgrade_response) + 4; unsigned char* received_data = (unsigned char*)malloc(received_data_length); (void)memcpy(received_data, test_upgrade_response, sizeof(test_upgrade_response) - 1); received_data[received_data_length - 5] = 0x81; received_data[received_data_length - 4] = 0x01; received_data[received_data_length - 3] = 'a'; received_data[received_data_length - 2] = 0x82; received_data[received_data_length - 1] = 0x00; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_OK)); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_TEXT, IGNORED_PTR_ARG, 1)) .ValidateArgumentBuffer(3, "a", 1); STRICT_EXPECTED_CALL(test_on_ws_frame_received((void*)0x4243, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, 0)) .IgnoreArgument_buffer(); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)received_data, received_data_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); free(received_data); } /* Tests_SRS_UWS_CLIENT_01_144: [ A client MUST close a connection if it detects a masked frame. ]*/ /* Tests_SRS_UWS_CLIENT_01_145: [ In this case, it MAY use the status code 1002 (protocol error) as defined in Section 7.4.1. (These rules might be relaxed in a future specification.) ]*/ /* Tests_SRS_UWS_CLIENT_01_160: [ Defines whether the "Payload data" is masked. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_masked_frame_is_received_an_error_is_indicated_and_connection_is_closed) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x80 }; unsigned char close_frame_payload[] = { 0x03, 0xEA }; unsigned char close_frame[] = { 0x88, 0x82, 0x00, 0x00, 0x00, 0x00, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, IGNORED_PTR_ARG, sizeof(close_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, close_frame_payload, sizeof(close_frame_payload)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, close_frame, sizeof(close_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, close_frame, sizeof(close_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_144: [ A client MUST close a connection if it detects a masked frame. ]*/ /* Tests_SRS_UWS_CLIENT_01_145: [ In this case, it MAY use the status code 1002 (protocol error) as defined in Section 7.4.1. (These rules might be relaxed in a future specification.) ]*/ /* Tests_SRS_UWS_CLIENT_01_160: [ Defines whether the "Payload data" is masked. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_masked_frame_is_received_and_encoding_the_close_frame_fails_an_error_is_indicated_anyhow) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x80 }; unsigned char close_frame_payload[] = { 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&buffer_handle); uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, IGNORED_PTR_ARG, sizeof(close_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, close_frame_payload, sizeof(close_frame_payload)) .SetReturn(NULL); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_144: [ A client MUST close a connection if it detects a masked frame. ]*/ /* Tests_SRS_UWS_CLIENT_01_145: [ In this case, it MAY use the status code 1002 (protocol error) as defined in Section 7.4.1. (These rules might be relaxed in a future specification.) ]*/ /* Tests_SRS_UWS_CLIENT_01_160: [ Defines whether the "Payload data" is masked. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_masked_frame_is_received_and_sending_the_encoded_CLOSE_frame_fails_an_error_is_indicated_anyhow) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_frame[] = { 0x82, 0x80 }; unsigned char close_frame_payload[] = { 0x03, 0xEA }; unsigned char close_frame[] = { 0x88, 0x82, 0x00, 0x00, 0x00, 0x00, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, IGNORED_PTR_ARG, sizeof(close_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, close_frame_payload, sizeof(close_frame_payload)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, close_frame, sizeof(close_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, close_frame, sizeof(close_frame)) .SetReturn(1); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_BAD_FRAME_RECEIVED)); // act g_on_bytes_received(g_on_bytes_received_context, test_frame, sizeof(test_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_460: [ When a CLOSE frame is received the callback `on_ws_peer_closed` passed to `uws_client_open_async` shall be called, while passing to it the argument `on_ws_peer_closed_context`. ]*/ /* Tests_SRS_UWS_CLIENT_01_156: [ * %x8 denotes a connection close ]*/ /* Tests_SRS_UWS_CLIENT_01_234: [ The Close frame contains an opcode of 0x8. ]*/ /* Tests_SRS_UWS_CLIENT_01_235: [ The Close frame MAY contain a body (the "Application data" portion of the frame) that indicates a reason for closing, such as an endpoint shutting down, an endpoint having received a frame too large, or an endpoint having received a frame that does not conform to the format expected by the endpoint. ]*/ /* Tests_SRS_UWS_CLIENT_01_236: [ If there is a body, the first two bytes of the body MUST be a 2-byte unsigned integer (in network byte order) representing a status code with value /code/ defined in Section 7.4. ]*/ /* Tests_SRS_UWS_CLIENT_01_461: [ The argument `close_code` shall be set to point to the code extracted from the CLOSE frame. ]*/ /* Tests_SRS_UWS_CLIENT_01_296: [ Upon either sending or receiving a Close control frame, it is said that _The WebSocket Closing Handshake is Started_ and that the WebSocket connection is in the CLOSING state. ]*/ /* Tests_SRS_UWS_CLIENT_01_241: [ If an endpoint receives a Close frame and did not previously send a Close frame, the endpoint MUST send a Close frame in response. ]*/ /* Tests_SRS_UWS_CLIENT_01_242: [ It SHOULD do so as soon as practical. ]*/ /* Tests_SRS_UWS_CLIENT_01_239: [ Close frames sent from client to server must be masked as per Section 5.3. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_CLOSE_frame_is_received_while_in_open_the_code_is_reported_to_the_user) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; uint16_t expected_close_code = 1002; unsigned char sent_close_frame[] = { 0x88, 0x80, 0x00, 0x00, 0x00, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sent_close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(sent_close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, sent_close_frame, sizeof(sent_close_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .ValidateArgumentBuffer(2, sent_close_frame, sizeof(sent_close_frame)) .IgnoreArgument_callback_context() .IgnoreArgument_on_send_complete(); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, NULL, 0)) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)); // act g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_460: [ When a CLOSE frame is received the callback `on_ws_peer_closed` passed to `uws_client_open_async` shall be called, while passing to it the argument `on_ws_peer_closed_context`. ]*/ /* Tests_SRS_UWS_CLIENT_01_156: [ * %x8 denotes a connection close ]*/ /* Tests_SRS_UWS_CLIENT_01_234: [ The Close frame contains an opcode of 0x8. ]*/ /* Tests_SRS_UWS_CLIENT_01_462: [ If no code can be extracted then `close_code` shall be NULL. ]*/ /* Tests_SRS_UWS_CLIENT_01_241: [ If an endpoint receives a Close frame and did not previously send a Close frame, the endpoint MUST send a Close frame in response. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_CLOSE_frame_is_received_without_a_close_code_while_in_open_the_callback_is_triggered) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x00 }; BUFFER_HANDLE buffer_handle; unsigned char sent_close_frame[] = { 0x88, 0x80, 0x00, 0x00, 0x00, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sent_close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(sent_close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, sent_close_frame, sizeof(sent_close_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .ValidateArgumentBuffer(2, sent_close_frame, sizeof(sent_close_frame)) .IgnoreArgument_callback_context() .IgnoreArgument_on_send_complete(); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, NULL, NULL, 0)); // act g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_463: [ The extra bytes (besides the close code) shall be passed to the `on_ws_peer_closed` callback by using `extra_data` and `extra_data_length`. ]*/ /* Tests_SRS_UWS_CLIENT_01_241: [ If an endpoint receives a Close frame and did not previously send a Close frame, the endpoint MUST send a Close frame in response. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_CLOSE_frame_is_received_with_extra_bytes_the_bytes_are_passed_to_the_callback) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x04, 0x03, 0xEA, 0x42, 0x43 }; BUFFER_HANDLE buffer_handle; uint16_t expected_close_code = 1002; unsigned char expected_extra_data[] = { 0x42, 0x43 }; unsigned char sent_close_frame[] = { 0x88, 0x80, 0x00, 0x00, 0x00, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(utf8_checker_is_valid_utf8(IGNORED_PTR_ARG, 2)) .ValidateArgumentBuffer(1, &close_frame[4], 2); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sent_close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(sent_close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, sent_close_frame, sizeof(sent_close_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .ValidateArgumentBuffer(2, sent_close_frame, sizeof(sent_close_frame)) .IgnoreArgument_callback_context() .IgnoreArgument_on_send_complete(); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, IGNORED_PTR_ARG, sizeof(expected_extra_data))) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)) .ValidateArgumentBuffer(3, &expected_extra_data, sizeof(expected_extra_data)); // act g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_237: [ Following the 2-byte integer, the body MAY contain UTF-8-encoded data with value /reason/, the interpretation of which is not defined by this specification. ]*/ TEST_FUNCTION(when_a_CLOSE_frame_is_received_with_a_malformed_UTF8_text_the_connection_is_closed) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x03, 0x03, 0xEA, 0xDF }; uint16_t expected_close_code = 1002; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(utf8_checker_is_valid_utf8(IGNORED_PTR_ARG, 1)) .ValidateArgumentBuffer(1, &close_frame[4], 1) .SetReturn(false); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_callback_context() .IgnoreArgument_on_io_close_complete(); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0)) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)); // act g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_288: [ To _Close the WebSocket Connection_, an endpoint closes the underlying TCP connection. ]*/ /* Tests_SRS_UWS_CLIENT_01_290: [ An endpoint MAY close the connection via any means available when necessary, such as when under attack. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_CLOSE_frame_is_received_while_in_open_and_encoding_the_outgoing_CLOSE_fails_the_connection_is_closed) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; uint16_t expected_close_code = 1002; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_callback_context() .IgnoreArgument_on_io_close_complete(); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, NULL, 0)) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)); // act g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_288: [ To _Close the WebSocket Connection_, an endpoint closes the underlying TCP connection. ]*/ /* Tests_SRS_UWS_CLIENT_01_290: [ An endpoint MAY close the connection via any means available when necessary, such as when under attack. ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ TEST_FUNCTION(when_a_CLOSE_frame_is_received_while_in_open_and_sending_the_outgoing_CLOSE_fails_the_connection_is_closed) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; BUFFER_HANDLE buffer_handle; uint16_t expected_close_code = 1002; unsigned char sent_close_frame[] = { 0x88, 0x80, 0x00, 0x00, 0x00, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sent_close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(sent_close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, sent_close_frame, sizeof(sent_close_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .ValidateArgumentBuffer(2, sent_close_frame, sizeof(sent_close_frame)) .IgnoreArgument_callback_context() .IgnoreArgument_on_send_complete() .SetReturn(1); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_callback_context() .IgnoreArgument_on_io_close_complete(); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, NULL, 0)) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)); // act g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_240: [ The application MUST NOT send any more data frames after sending a Close frame. ] */ TEST_FUNCTION(sending_after_a_close_is_received_does_not_send_anything) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; int result; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_client_send_frame_async */ /* Tests_SRS_UWS_CLIENT_01_044: [ If any the arguments `uws_client` is NULL, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_send_frame_async_with_NULL_handle_fails) { // arrange unsigned char test_payload[] = { 0x42 }; int result; // act result = uws_client_send_frame_async(NULL, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_045: [ If `size` is non-zero and `buffer` is NULL then `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(uws_client_send_frame_async_with_NULL_buffer_and_non_zero_size_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, NULL, 1, true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_043: [ If the uws instance is not OPEN (open has not been called or is still in progress) then `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ /* Tests_SRS_UWS_CLIENT_01_146: [ A data frame MAY be transmitted by either the client or the server at any time after opening handshake completion and before that endpoint has sent a Close frame (Section 5.5.1). ]*/ /* Tests_SRS_UWS_CLIENT_01_268: [ The endpoint MUST ensure the WebSocket connection is in the OPEN state ]*/ TEST_FUNCTION(uws_client_send_frame_async_when_not_open_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_043: [ If the uws instance is not OPEN (open has not been called or is still in progress) then `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ /* Tests_SRS_UWS_CLIENT_01_146: [ A data frame MAY be transmitted by either the client or the server at any time after opening handshake completion and before that endpoint has sent a Close frame (Section 5.5.1). ]*/ TEST_FUNCTION(uws_client_send_frame_async_when_opening_underlying_io_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_043: [ If the uws instance is not OPEN (open has not been called or is still in progress) then `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ /* Tests_SRS_UWS_CLIENT_01_146: [ A data frame MAY be transmitted by either the client or the server at any time after opening handshake completion and before that endpoint has sent a Close frame (Section 5.5.1). ]*/ TEST_FUNCTION(uws_client_send_frame_async_when_waiting_for_upgrade_response_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_038: [ `uws_client_send_frame_async` shall create and queue a structure that contains: ]*/ /* Tests_SRS_UWS_CLIENT_01_039: [ - the encoded websocket frame, so that the frame can be later sent when `uws_client_dowork` is called ]*/ /* Tests_SRS_UWS_CLIENT_01_040: [ - the send complete callback `on_ws_send_frame_complete` ]*/ /* Tests_SRS_UWS_CLIENT_01_056: [ - the `send_complete` callback shall be the `on_underlying_io_send_complete` function. ]*/ /* Tests_SRS_UWS_CLIENT_01_042: [ On success, `uws_client_send_frame_async` shall return 0. ]*/ /* Tests_SRS_UWS_CLIENT_01_425: [ Encoding shall be done by calling `uws_frame_encoder_encode` and passing to it the `buffer` and `size` argument for payload, the `is_final` flag and setting `is_masked` to true. ]*/ /* Tests_SRS_UWS_CLIENT_01_428: [ The encoded frame buffer memory shall be obtained by calling `BUFFER_u_char` on the encode buffer. ]*/ /* Tests_SRS_UWS_CLIENT_01_429: [ The encoded frame size shall be obtained by calling `BUFFER_length` on the encode buffer. ]*/ /* Tests_SRS_UWS_CLIENT_01_048: [ Queueing shall be done by calling `singlylinkedlist_add`. ]*/ /* Tests_SRS_UWS_CLIENT_01_038: [ `uws_client_send_frame_async` shall create and queue a structure that contains: ]*/ /* Tests_SRS_UWS_CLIENT_01_040: [ - the send complete callback `on_ws_send_frame_complete` ]*/ /* Tests_SRS_UWS_CLIENT_01_041: [ - the send complete callback context `on_ws_send_frame_complete_context` ]*/ /* Tests_SRS_UWS_CLIENT_01_140: [ To avoid confusing network intermediaries (such as intercepting proxies) and for security reasons that are further discussed in Section 10.3, a client MUST mask all frames that it sends to the server (see Section 5.3 for further details). ]*/ /* Tests_SRS_UWS_CLIENT_01_146: [ A data frame MAY be transmitted by either the client or the server at any time after opening handshake completion and before that endpoint has sent a Close frame (Section 5.5.1). ]*/ /* Tests_SRS_UWS_CLIENT_01_270: [ An endpoint MUST encapsulate the /data/ in a WebSocket frame as defined in Section 5.2. ]*/ /* Tests_SRS_UWS_CLIENT_01_274: [ If the data is being sent by the client, the frame(s) MUST be masked as defined in Section 5.3. ]*/ /* Tests_SRS_UWS_CLIENT_01_276: [ The frame(s) that have been formed MUST be transmitted over the underlying network connection. ]*/ TEST_FUNCTION(uws_client_send_frame_async_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; unsigned char encoded_frame[] = { 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42 }; int result; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_BINARY_FRAME, test_payload, sizeof(test_payload), true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(encoded_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(encoded_frame)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item(); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(encoded_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .ValidateArgumentBuffer(2, encoded_frame, sizeof(encoded_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_272: [ The opcode (frame-opcode) of the first frame containing the data MUST be set to the appropriate value from Section 5.2 for data that is to be interpreted by the recipient as text or binary data. ]*/ TEST_FUNCTION(uws_send_text_frame_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 'a' }; unsigned char encoded_frame[] = { 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, 'a' }; int result; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_TEXT_FRAME, test_payload, sizeof(test_payload), true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(encoded_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(encoded_frame)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item(); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(encoded_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .ValidateArgumentBuffer(2, encoded_frame, sizeof(encoded_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_TEXT, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_047: [ If allocating memory for the newly queued item fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_new_sent_item_fails_uws_client_send_frame_async_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_426: [ If `uws_frame_encoder_encode` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_encoding_the_frame_fails_uws_client_send_frame_async_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_BINARY_FRAME, test_payload, sizeof(test_payload), true, true, 0)) .SetReturn(NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_058: [ If `xio_send` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ /* Tests_SRS_UWS_CLIENT_09_001: [ If `xio_send` fails and the message is still queued, it shall be de-queued and destroyed. ] */ TEST_FUNCTION(when_xio_send_fails_uws_client_send_frame_async_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; unsigned char encoded_frame[] = { 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42 }; int result; BUFFER_HANDLE buffer_handle; LIST_ITEM_HANDLE new_item_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&buffer_handle); uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_BINARY_FRAME, test_payload, sizeof(test_payload), true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(encoded_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(encoded_frame)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item() .CaptureReturn(&new_item_handle); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(encoded_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .ValidateArgumentBuffer(2, encoded_frame, sizeof(encoded_frame)) .SetReturn(1); STRICT_EXPECTED_CALL(singlylinkedlist_find(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn((LIST_ITEM_HANDLE)0x1234); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .ValidateArgumentValue_item_handle(&new_item_handle); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_09_001: [ If `xio_send` fails and the message is still queued, it shall be de-queued and destroyed. ] */ TEST_FUNCTION(when_xio_send_fails_uws_client_send_frame_async_fails_message_removed_by_xio_send) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; unsigned char encoded_frame[] = { 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42 }; int result; BUFFER_HANDLE buffer_handle; LIST_ITEM_HANDLE new_item_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&buffer_handle); uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_BINARY_FRAME, test_payload, sizeof(test_payload), true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(encoded_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(encoded_frame)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item() .CaptureReturn(&new_item_handle); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(encoded_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .ValidateArgumentBuffer(2, encoded_frame, sizeof(encoded_frame)); STRICT_EXPECTED_CALL(singlylinkedlist_find(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(NULL); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // section for on_io_send_complete() g_xio_send_result = 1; STRICT_EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete(IGNORED_PTR_ARG, WS_SEND_FRAME_ERROR)); STRICT_EXPECTED_CALL(free(IGNORED_PTR_ARG)); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_ERROR); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_049: [ If `singlylinkedlist_add` fails, `uws_client_send_frame_async` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_adding_the_item_to_the_list_fails_uws_client_send_frame_async_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; unsigned char encoded_frame[] = { 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42 }; int result; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_BINARY_FRAME, test_payload, sizeof(test_payload), true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(encoded_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(encoded_frame)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item() .SetReturn(NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4248); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_050: [ The argument `on_ws_send_frame_complete` shall be optional, if NULL is passed by the caller then no send complete callback shall be triggered. ]*/ TEST_FUNCTION(uws_client_send_frame_async_with_NULL_complete_callback_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; unsigned char encoded_frame[] = { 0x82, 0x01, 0x00, 0x00, 0x00, 0x00, 0x42 }; int result; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_BINARY_FRAME, test_payload, sizeof(test_payload), true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(encoded_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(encoded_frame)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item(); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, IGNORED_PTR_ARG, sizeof(encoded_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_send_complete() .IgnoreArgument_callback_context() .ValidateArgumentBuffer(2, encoded_frame, sizeof(encoded_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act result = uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, NULL, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* on_underlying_io_send_complete */ /* Tests_SRS_UWS_CLIENT_01_389: [ When `on_underlying_io_send_complete` is called with `IO_SEND_OK` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_OK`. ]*/ /* Tests_SRS_UWS_CLIENT_01_432: [ The indicated sent frame shall be removed from the list by calling `singlylinkedlist_remove`. ]*/ /* Tests_SRS_UWS_CLIENT_01_434: [ The memory associated with the sent frame shall be freed. ]*/ TEST_FUNCTION(on_underlying_io_send_complete_with_OK_indicates_the_frame_as_sent_OK) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4245); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item_handle(); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete((void*)0x4245, WS_SEND_FRAME_OK)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_433: [ If `singlylinkedlist_remove` fails an error shall be indicated by calling the `on_ws_error` callback with `WS_ERROR_CANNOT_REMOVE_SENT_ITEM_FROM_LIST`. ]*/ TEST_FUNCTION(when_removing_the_sent_framefrom_the_list_fails_then_an_error_is_indicated) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4245); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item_handle() .SetReturn(1); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_CANNOT_REMOVE_SENT_ITEM_FROM_LIST)); // act g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_390: [ When `on_underlying_io_send_complete` is called with `IO_SEND_ERROR` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_ERROR`. ]*/ TEST_FUNCTION(on_underlying_io_send_complete_with_ERROR_indicates_the_frame_with_WS_SEND_ERROR) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4245); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item_handle(); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete((void*)0x4245, WS_SEND_FRAME_ERROR)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_ERROR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_391: [ When `on_underlying_io_send_complete` is called with `IO_SEND_CANCELLED` as a result of sending a WebSocket frame to the underlying IO, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_CANCELLED`. ]*/ TEST_FUNCTION(on_underlying_io_send_complete_with_CANCELLED_indicates_the_frame_with_WS_SEND_CANCELLED) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4245); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item_handle(); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete((void*)0x4245, WS_SEND_FRAME_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_CANCELLED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_435: [ When `on_underlying_io_send_complete` is called with a NULL `context`, it shall do nothing. ]*/ TEST_FUNCTION(on_underlying_io_send_complete_with_NULL_context_does_nothing) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4245); umock_c_reset_all_calls(); // act g_on_io_send_complete(NULL, IO_SEND_CANCELLED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_436: [ When `on_underlying_io_send_complete` is called with any other error code, the send shall be indicated to the uws user by calling `on_ws_send_frame_complete` with `WS_SEND_FRAME_ERROR`. ]*/ TEST_FUNCTION(on_underlying_io_send_complete_with_an_unknown_result_indicates_an_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char test_payload[] = { 0x42 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response)); (void)uws_client_send_frame_async(uws_client, WS_FRAME_TYPE_BINARY, test_payload, sizeof(test_payload), true, test_on_ws_send_frame_complete, (void*)0x4245); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .IgnoreArgument_item_handle(); STRICT_EXPECTED_CALL(test_on_ws_send_frame_complete((void*)0x4245, WS_SEND_FRAME_ERROR)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_io_send_complete(g_on_io_send_complete_context, (IO_SEND_RESULT)0x42); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_client_dowork */ /* Tests_SRS_UWS_CLIENT_01_059: [ If the `uws_client` argument is NULL, `uws_client_dowork` shall do nothing. ]*/ TEST_FUNCTION(uws_client_dowork_with_NULL_handle_does_nothing) { // arrange // act uws_client_dowork(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_430: [ `uws_client_dowork` shall call `xio_dowork` with the IO handle argument set to the underlying IO created in `uws_client_create`. ]*/ TEST_FUNCTION(uws_client_dowork_calls_the_underlying_io_dowork) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_dowork(TEST_IO_HANDLE)); // act uws_client_dowork(uws_client); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_060: [ If the IO is not yet open, `uws_client_dowork` shall do nothing. ]*/ TEST_FUNCTION(uws_client_dowork_when_closed_does_nothing) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act uws_client_dowork(uws_client); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* on_underlying_io_error */ /* Tests_SRS_UWS_CLIENT_01_375: [ When `on_underlying_io_error` is called while uws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_ERROR`. ]*/ /* Tests_SRS_UWS_CLIENT_01_077: [ If this fails (e.g., the server's certificate could not be verified), then the client MUST _Fail the WebSocket Connection_ and abort the connection. ]*/ TEST_FUNCTION(on_underlying_io_error_while_opening_underlying_io_indicates_an_open_complete_with_WS_OPEN_ERROR_UNDERLYING_IO_ERROR) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_UNDERLYING_IO_ERROR)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_375: [ When `on_underlying_io_error` is called while uws is OPENING, uws shall report that the open failed by calling the `on_ws_open_complete` callback passed to `uws_client_open_async` with `WS_OPEN_ERROR_UNDERLYING_IO_ERROR`. ]*/ TEST_FUNCTION(on_underlying_io_error_while_waiting_for_upgrade_response_indicates_an_open_complete_with_WS_OPEN_ERROR_UNDERLYING_IO_ERROR) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); STRICT_EXPECTED_CALL(test_on_ws_open_complete((void*)0x4242, WS_OPEN_ERROR_UNDERLYING_IO_ERROR)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_376: [ When `on_underlying_io_error` is called while the uws instance is OPEN, an error shall be reported to the user by calling the `on_ws_error` callback that was passed to `uws_client_open_async` with the argument `WS_ERROR_UNDERLYING_IO_ERROR`. ]*/ /* Tests_SRS_UWS_CLIENT_01_318: [ Servers MAY close the WebSocket connection whenever desired. ]*/ /* Tests_SRS_UWS_CLIENT_01_269: [ If at any point the state of the WebSocket connection changes, the endpoint MUST abort the following steps. ]*/ TEST_FUNCTION(on_underlying_io_error_while_OPEN_indicates_an_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_ws_error((void*)0x4244, WS_ERROR_UNDERLYING_IO_ERROR)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_377: [ When `on_underlying_io_error` is called while the uws instance is CLOSING the underlying IO shall be closed by calling `xio_close`. ]*/ TEST_FUNCTION(on_underlying_io_error_while_CLOSING_indicates_an_error) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, NULL, NULL)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_377: [ When `on_underlying_io_error` is called while the uws instance is CLOSING the underlying IO shall be closed by calling `xio_close`. ]*/ TEST_FUNCTION(open_after_error_during_sending_close_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); g_on_io_error(g_on_io_error_context); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_377: [ When `on_underlying_io_error` is called while the uws instance is CLOSING the underlying IO shall be closed by calling `xio_close`. ]*/ /* Tests_SRS_UWS_CLIENT_01_499: [ If the CLOSE was due to the peer closing, the callback `on_ws_close_complete` shall not be called. ]*/ TEST_FUNCTION(on_underlying_io_error_while_CLOSING_underlying_io_indicates_the_close) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_callback_context() .IgnoreArgument_on_io_close_complete(); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_377: [ When `on_underlying_io_error` is called while the uws instance is CLOSING the underlying IO shall be closed by calling `xio_close`. ]*/ TEST_FUNCTION(open_after_error_during_closing_underlying_io_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); g_on_io_error(g_on_io_error_context); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_500: [ If `xio_close` fails then the callback `on_ws_close_complete` shall be called, while passing the `on_ws_close_complete_context` argument to it. ]*/ /* Tests_SRS_UWS_CLIENT_01_500: [ The callback `on_ws_close_complete` shall be called, while passing the `on_ws_close_complete_context` argument to it. ]*/ TEST_FUNCTION(on_underlying_io_error_while_CLOSING_due_to_local_initiated_close) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, (void*)0x6666); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context() .SetReturn(1); STRICT_EXPECTED_CALL(test_on_ws_close_complete((void*)0x6666)); // act g_on_io_error(g_on_io_error_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* on_underlying_io_close_sent */ /* Tests_SRS_UWS_CLIENT_01_489: [ When `on_underlying_io_close_sent` is called with NULL context, it shall do nothing. ]*/ TEST_FUNCTION(on_underlying_io_close_sent_with_NULL_context_does_nothing) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); // act g_on_io_send_complete(NULL, IO_SEND_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_490: [ When `on_underlying_io_close_sent` is called while the uws client is CLOSING, `on_underlying_io_close_sent` shall close the underlying IO by calling `xio_close`. ]*/ TEST_FUNCTION(on_underlying_io_close_sent_when_a_CLOSE_was_sent_closes_the_underlying_IO) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context(); // act g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_493: [ If calling `xio_close` fails, the state of the uws client shall be considered CLOSED and the `on_ws_close_complete` shall be called if it was specified. ]*/ /* Tests_SRS_UWS_CLIENT_01_496: [ If the close was initiated by the peer no `on_ws_close_complete` shall be called. ]*/ TEST_FUNCTION(when_xio_close_fails_in_on_underlying_io_close_sent_and_CLOSE_initiated_by_peer_no_callback_is_triggered) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context() .SetReturn(1); // act g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_493: [ If calling `xio_close` fails, the state of the uws client shall be considered CLOSED and the `on_ws_close_complete` shall be called if it was specified. ]*/ /* Tests_SRS_UWS_CLIENT_01_496: [ If the close was initiated by the peer no `on_ws_close_complete` shall be called. ]*/ TEST_FUNCTION(when_xio_close_fails_in_on_underlying_io_close_sent_and_CLOSE_initiated_by_peer_no_callback_is_triggered_and_next_open_succeeds) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_frame[] = { 0x88, 0x00 }; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_close_complete() .IgnoreArgument_callback_context() .SetReturn(1); g_on_io_send_complete(g_on_io_send_complete_context, IO_SEND_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Ping frame */ /* Tests_SRS_UWS_CLIENT_01_157: [ * %x9 denotes a ping ]*/ /* Tests_SRS_UWS_CLIENT_01_249: [ Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in response ]*/ /* Tests_SRS_UWS_CLIENT_01_250: [ It SHOULD respond with Pong frame as soon as is practical. ]*/ /* Tests_SRS_UWS_CLIENT_01_253: [ A Pong frame sent in response to a Ping frame must have identical "Application data" as found in the message body of the Ping frame being replied to. ]*/ /* Tests_SRS_UWS_CLIENT_01_247: [ The Ping frame contains an opcode of 0x9. ]*/ /* Tests_SRS_UWS_CLIENT_01_251: [ An endpoint MAY send a Ping frame any time after the connection is established and before the connection is closed. ]*/ TEST_FUNCTION(when_a_PING_frame_was_received_a_PONG_frame_is_sent) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char ping_frame[] = { 0x89, 0x00 }; unsigned char pong_frame[] = { 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00 }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_PONG_FRAME, IGNORED_PTR_ARG, 0, true, true, 0)) .IgnoreArgument_payload() .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(pong_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(pong_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, pong_frame, sizeof(pong_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, pong_frame, sizeof(pong_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)ping_frame, sizeof(ping_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_253: [ A Pong frame sent in response to a Ping frame must have identical "Application data" as found in the message body of the Ping frame being replied to. ]*/ /* Tests_SRS_UWS_CLIENT_01_248: [ A Ping frame MAY include "Application data". ]*/ TEST_FUNCTION(when_a_PING_frame_was_received_with_some_payload_a_PONG_frame_is_sent_with_the_Same_payload) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char ping_frame[] = { 0x89, 0x02, 0x42, 0x43 }; unsigned char pong_frame_payload[] = { 0x42, 0x43 }; unsigned char pong_frame[] = { 0x8A, 0x02, 0x00, 0x00, 0x00, 0x00, 0x42, 0x43 }; BUFFER_HANDLE buffer_handle; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&buffer_handle); uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_PONG_FRAME, pong_frame_payload, sizeof(pong_frame_payload), true, true, 0)) .ValidateArgumentBuffer(2, pong_frame_payload, sizeof(pong_frame_payload)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(pong_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(pong_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, pong_frame, sizeof(pong_frame), IGNORED_PTR_ARG, NULL)) .ValidateArgumentBuffer(2, pong_frame, sizeof(pong_frame)); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)ping_frame, sizeof(ping_frame)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_251: [ An endpoint MAY send a Ping frame any time after the connection is established and before the connection is closed. ]*/ /* Tests_SRS_UWS_CLIENT_01_240: [ The application MUST NOT send any more data frames after sending a Close frame. ]*/ TEST_FUNCTION(when_a_PING_frame_is_received_after_a_close_frame_no_pong_is_sent) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; const unsigned char close_and_ping_frames[] = { 0x88, 0x00, 0x89, 0x02, 0x42, 0x43 }; BUFFER_HANDLE buffer_handle; unsigned char sent_close_frame[] = { 0x88, 0x80, 0x00, 0x00, 0x00, 0x00 }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .CaptureReturn(&buffer_handle); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sent_close_frame); STRICT_EXPECTED_CALL(BUFFER_length(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle) .SetReturn(sizeof(sent_close_frame)); STRICT_EXPECTED_CALL(xio_send(TEST_IO_HANDLE, sent_close_frame, sizeof(sent_close_frame), IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .ValidateArgumentBuffer(2, sent_close_frame, sizeof(sent_close_frame)) .IgnoreArgument_callback_context() .IgnoreArgument_on_send_complete(); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&buffer_handle); EXPECTED_CALL(test_on_ws_peer_closed(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0)); // act g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)close_and_ping_frames, sizeof(close_and_ping_frames)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_setoption */ /* Tests_SRS_UWS_CLIENT_01_440: [ If any of the arguments `uws_client` or `option_name` is NULL `uws_client_set_option` shall return a non-zero value. ]*/ TEST_FUNCTION(uws_set_option_with_NULL_uws_handle_fails) { // arrange int result; // act result = uws_client_set_option(NULL, "test_option", (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_440: [ If any of the arguments `uws_client` or `option_name` is NULL `uws_client_set_option` shall return a non-zero value. ]*/ TEST_FUNCTION(uws_set_option_with_NULL_option_name_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_set_option(uws_client, NULL, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_510: [ If the option name is `uWSClientOptions` then `uws_client_set_option` shall call `OptionHandler_FeedOptions` and pass to it the underlying IO handle and the `value` argument. ]*/ /* Tests_SRS_UWS_CLIENT_01_442: [ On success, `uws_client_set_option` shall return 0. ]*/ TEST_FUNCTION(uws_set_option_with_uws_client_options_calls_OptionHandler_FeedOptions) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(OptionHandler_FeedOptions((OPTIONHANDLER_HANDLE)0x4242, TEST_IO_HANDLE)); // act result = uws_client_set_option(uws_client, "uWSClientOptions", (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_511: [ If `OptionHandler_FeedOptions` fails, `uws_client_set_option` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_OptionHandler_FeedOptions_fails_then_uws_set_option_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(OptionHandler_FeedOptions((OPTIONHANDLER_HANDLE)0x4242, TEST_IO_HANDLE)) .SetReturn(OPTIONHANDLER_ERROR); // act result = uws_client_set_option(uws_client, "uWSClientOptions", (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_441: [ Otherwise all options shall be passed as they are to the underlying IO by calling `xio_setoption`. ]*/ /* Tests_SRS_UWS_CLIENT_01_442: [ On success, `uws_client_set_option` shall return 0. ]*/ TEST_FUNCTION(uws_set_option_passes_the_option_down) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_setoption(TEST_IO_HANDLE, "option1", (void*)0x4242)); // act result = uws_client_set_option(uws_client, "option1", (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_443: [ If `xio_setoption` fails, `uws_client_set_option` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_xio_setoption_fails_then_uws_set_option_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_setoption(TEST_IO_HANDLE, "option1", (void*)0x4242)) .SetReturn(1); // act result = uws_client_set_option(uws_client, "option1", (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_client_retrieve_options */ /* Tests_SRS_UWS_CLIENT_01_444: [ If parameter `uws_client` is `NULL` then `uws_client_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_retrieve_options_with_NULL_handle_fails) { // arrange OPTIONHANDLER_HANDLE result; // act result = uws_client_retrieve_options(NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_CLIENT_01_445: [ `uws_client_retrieve_options` shall call `OptionHandler_Create` to produce an `OPTIONHANDLER_HANDLE` and on success return the new `OPTIONHANDLER_HANDLE` handle. ]*/ /* Tests_SRS_UWS_CLIENT_01_501: [ `uws_client_retrieve_options` shall add to the option handler one option, whose name shall be `uWSClientOptions` and the value shall be queried by calling `xio_retrieveoptions`. ]*/ /* Tests_SRS_UWS_CLIENT_01_502: [ When calling `xio_retrieveoptions` the underlying IO handle shall be passed to it. ]*/ /* Tests_SRS_UWS_CLIENT_01_504: [ Adding the option shall be done by calling `OptionHandler_AddOption`. ]*/ TEST_FUNCTION(uws_retrieve_options_calls_the_underlying_xio_retrieve_options_and_returns_the_a_new_option_handler_instance) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; OPTIONHANDLER_HANDLE result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_retrieveoptions(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(OptionHandler_AddOption(TEST_OPTIONHANDLER_HANDLE, "uWSClientOptions", TEST_IO_OPTIONHANDLER_HANDLE)); // act result = uws_client_retrieve_options(uws_client); // assert ASSERT_ARE_EQUAL(void_ptr, TEST_OPTIONHANDLER_HANDLE, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_446: [ If `OptionHandler_Create` fails then `uws_client_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(when_OptionHandler_Create_fails_then_uws_retrieve_options_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; OPTIONHANDLER_HANDLE result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(NULL); // act result = uws_client_retrieve_options(uws_client); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_503: [ If `xio_retrieveoptions` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(when_xio_retrieveoptions_fails_then_uws_retrieve_options_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; OPTIONHANDLER_HANDLE result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_retrieveoptions(TEST_IO_HANDLE)) .SetReturn(NULL); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_OPTIONHANDLER_HANDLE)); // act result = uws_client_retrieve_options(uws_client); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_505: [ If `OptionHandler_AddOption` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(when_OptionHandler_AddOption_fails_then_uws_retrieve_options_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; OPTIONHANDLER_HANDLE result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(xio_retrieveoptions(TEST_IO_HANDLE)); STRICT_EXPECTED_CALL(OptionHandler_AddOption(TEST_OPTIONHANDLER_HANDLE, "uWSClientOptions", TEST_IO_OPTIONHANDLER_HANDLE)) .SetReturn(OPTIONHANDLER_ERROR); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_IO_OPTIONHANDLER_HANDLE)); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_OPTIONHANDLER_HANDLE)); // act result = uws_client_retrieve_options(uws_client); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_client_clone_option */ /* Tests_SRS_UWS_CLIENT_01_507: [ `uws_client_clone_option` called with `name` being `uWSClientOptions` shall return the same value. ]*/ TEST_FUNCTION(uws_client_clone_option_calls_xio_cloneoption) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; void* result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); // act result = g_clone_option("uWSClientOptions", (void*)0x4243); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x4243, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_512: [ `uws_client_clone_option` called with any other option name than `uWSClientOptions` shall return NULL. ]*/ TEST_FUNCTION(uws_client_clone_with_an_unknown_option_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; void* result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); // act result = g_clone_option("TrustedCerts", (void*)0x4243); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_506: [ If `uws_client_clone_option` is called with NULL `name` or `value` it shall return NULL. ]*/ TEST_FUNCTION(uws_client_clone_option_with_NULL_name_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; void* result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); // act result = g_clone_option(NULL, (void*)0x4243); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_506: [ If `uws_client_clone_option` is called with NULL `name` or `value` it shall return NULL. ]*/ TEST_FUNCTION(uws_client_clone_option_with_NULL_value_fails) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; void* result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); // act result = g_clone_option("uWSClientOptions", NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* uws_client_destroy_option */ /* Tests_SRS_UWS_CLIENT_01_509: [ If `uws_client_destroy_option` is called with NULL `name` or `value` it shall do nothing. ]*/ TEST_FUNCTION(uws_client_destroy_option_with_NULL_name_does_no_destroy) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); // act g_destroy_option(NULL, (void*)0x4243); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_509: [ If `uws_client_destroy_option` is called with NULL `name` or `value` it shall do nothing. ]*/ TEST_FUNCTION(uws_client_destroy_option_with_NULL_value_does_no_destroy) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); // act g_destroy_option("uWSClientOptions", NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_513: [ If `uws_client_destroy_option` is called with any other `name` it shall do nothing. ]*/ TEST_FUNCTION(uws_client_destroy_option_with_an_unknown_option_does_no_destroy) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); // act g_destroy_option("TrustedCerts", (void*)0x4243); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_508: [ `uws_client_destroy_option` called with the option `name` being `uWSClientOptions` shall destroy the value by calling `OptionHandler_Destroy`. ]*/ TEST_FUNCTION(uws_client_destroy_option_with_uWSClientOptions_calls_OptionHandler_Destroy) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_retrieve_options(uws_client); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_OPTIONHANDLER_HANDLE)); // act g_destroy_option("uWSClientOptions", TEST_OPTIONHANDLER_HANDLE); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* on_underlying_io_close_complete */ /* Tests_SRS_UWS_CLIENT_01_475: [ When `on_underlying_io_close_complete` is called while closing the underlying IO a subsequent `uws_client_open_async` shall succeed. ]*/ TEST_FUNCTION(underlying_io_close_after_a_send_close_frame_failed_puts_the_uws_in_closed_state_and_a_new_open_is_allowed) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; uint16_t expected_close_code = 1002; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_callback_context() .IgnoreArgument_on_io_close_complete(); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0)) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)) .IgnoreArgument_extra_data(); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); g_on_io_close_complete(g_on_io_close_complete_context); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(xio_open(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_on_io_open_complete() .IgnoreArgument_on_io_open_complete_context() .IgnoreArgument_on_bytes_received() .IgnoreArgument_on_bytes_received_context() .IgnoreArgument_on_io_error() .IgnoreArgument_on_io_error_context(); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_476: [ If the close is as a result of receiving a CLOSE frame, no callback shall be called. ]*/ TEST_FUNCTION(underlying_io_close_due_to_CLOSE_frame_being_received_doe_not_trigger_a_user_callback) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; uint16_t expected_close_code = 1002; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_callback_context() .IgnoreArgument_on_io_close_complete(); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0)) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)) .IgnoreArgument_extra_data(); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); // act g_on_io_close_complete(g_on_io_close_complete_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_477: [ When `on_underlying_io_close_complete` is called with a NULL context, it shall do nothing. ]*/ TEST_FUNCTION(underlying_io_close_complete_with_NULL_context_does_nothing) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; uint16_t expected_close_code = 1002; int result; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, true, true, 0)) .SetReturn(NULL); STRICT_EXPECTED_CALL(xio_close(TEST_IO_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .IgnoreArgument_callback_context() .IgnoreArgument_on_io_close_complete(); STRICT_EXPECTED_CALL(test_on_ws_peer_closed((void*)0x4301, IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0)) .ValidateArgumentBuffer(2, &expected_close_code, sizeof(expected_close_code)) .IgnoreArgument_extra_data(); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); g_on_io_close_complete(NULL); // act result = uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_387: [ When `on_underlying_io_close_complete` is called when the uws instance is closing, the `on_ws_close_complete` callback passed to `uws_client_close_async` shall be called. ]*/ TEST_FUNCTION(when_close_complete_is_called_the_user_callback_is_triggered) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_close_handshake_async(uws_client, 1002, "", test_on_ws_close_complete, (void*)0x4444); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_ws_close_complete((void*)0x4444)); // act g_on_io_close_complete(g_on_io_close_complete_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } /* Tests_SRS_UWS_CLIENT_01_387: [ When `on_underlying_io_close_complete` is called when the uws instance is closing, the `on_ws_close_complete` callback passed to `uws_client_close_async` shall be called. ]*/ /* Tests_SRS_UWS_CLIENT_01_469: [ The `on_ws_close_complete` argument shall be allowed to be NULL, in which case no callback shall be called when the close is complete. ]*/ TEST_FUNCTION(when_close_complete_is_called_and_the_user_callback_is_NULL_no_callback_is_triggered) { // arrange TLSIO_CONFIG tlsio_config; UWS_CLIENT_HANDLE uws_client; const char test_upgrade_response[] = "HTTP/1.1 101 Switching Protocols\r\n\r\n"; unsigned char close_frame[] = { 0x88, 0x02, 0x03, 0xEA }; tlsio_config.hostname = "test_host"; tlsio_config.port = 444; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); (void)uws_client_open_async(uws_client, test_on_ws_open_complete, (void*)0x4242, test_on_ws_frame_received, (void*)0x4243, test_on_ws_peer_closed, (void*)0x4301, test_on_ws_error, (void*)0x4244); g_on_io_open_complete(g_on_io_open_complete_context, IO_OPEN_OK); g_on_bytes_received(g_on_bytes_received_context, (const unsigned char*)test_upgrade_response, sizeof(test_upgrade_response) - 1); (void)uws_client_close_handshake_async(uws_client, 1002, "", NULL, NULL); g_on_bytes_received(g_on_bytes_received_context, close_frame, sizeof(close_frame)); umock_c_reset_all_calls(); // act g_on_io_close_complete(g_on_io_close_complete_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup uws_client_destroy(uws_client); } // Tests_SRS_UWS_CLIENT_09_002: [ If any of the arguments `uws_client` or `name` or `value` is NULL `uws_client_set_request_header` shall fail and return a non-zero value. ] TEST_FUNCTION(uws_client_set_request_header_NULL_handle) { // arrange int result; char* req_header1_key = "Authorization"; char* req_header1_value = "Bearer 23420939909809283488230949"; umock_c_reset_all_calls(); // act result = uws_client_set_request_header(NULL, req_header1_key, req_header1_value); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_UWS_CLIENT_09_002: [ If any of the arguments `uws_client` or `name` or `value` is NULL `uws_client_set_request_header` shall fail and return a non-zero value. ] TEST_FUNCTION(uws_client_set_request_header_NULL_name) { // arrange UWS_CLIENT_HANDLE uws_client; int result; char* req_header1_key = NULL; char* req_header1_value = "Bearer 23420939909809283488230949"; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_set_request_header(uws_client, req_header1_key, req_header1_value); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup uws_client_destroy(uws_client); } // Tests_SRS_UWS_CLIENT_09_002: [ If any of the arguments `uws_client` or `name` or `value` is NULL `uws_client_set_request_header` shall fail and return a non-zero value. ] TEST_FUNCTION(uws_client_set_request_header_NULL_value) { // arrange UWS_CLIENT_HANDLE uws_client; int result; char* req_header1_key = "Authorization"; char* req_header1_value = NULL; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); // act result = uws_client_set_request_header(uws_client, req_header1_key, req_header1_value); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup uws_client_destroy(uws_client); } // Tests_SRS_UWS_CLIENT_09_004: [ If `name` or `value` fail to be stored the function shall fail and return a non-zero value. ] TEST_FUNCTION(uws_client_set_request_header_negative_tests) { // arrange UWS_CLIENT_HANDLE uws_client; char* req_header1_key = "Authorization"; char* req_header1_value = "Bearer 23420939909809283488230949"; size_t i; ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_AddOrUpdate(TEST_REQUEST_HEADERS_MAP, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char error_msg[64]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = uws_client_set_request_header(uws_client, req_header1_key, req_header1_value); sprintf(error_msg, "On failed call %zu", i); ASSERT_ARE_NOT_EQUAL(int, 0, result, error_msg); } // cleanup uws_client_destroy(uws_client); umock_c_negative_tests_deinit(); } // Tests_SRS_UWS_CLIENT_09_003: [ A copy of `name` and `value` shall be stored for later sending in the request message. ] // Tests_SRS_UWS_CLIENT_09_005: [ If no failures occur the function shall return zero. ] TEST_FUNCTION(uws_client_set_request_header_success) { // arrange UWS_CLIENT_HANDLE uws_client; int result; char* req_header1_key = "Authorization"; char* req_header1_value = "Bearer 23420939909809283488230949"; uws_client = uws_client_create("test_host", 444, "/aaa", true, protocols, sizeof(protocols) / sizeof(protocols[0])); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(Map_AddOrUpdate(TEST_REQUEST_HEADERS_MAP, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // act result = uws_client_set_request_header(uws_client, req_header1_key, req_header1_value); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); // cleanup uws_client_destroy(uws_client); } END_TEST_SUITE(uws_client_ut) uws_frame_encoder_ut/000077500000000000000000000000001362133436400346165ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000011331362133436400373540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uws_frame_encoder_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName uws_frame_encoder_ut) include_directories(${SHARED_UTIL_REAL_TEST_FOLDER}) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/uws_frame_encoder.c ../real_test_files/real_buffer.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005031362133436400357040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uws_frame_encoder_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(uws_frame_encoder_ut, failedTestCount); return failedTestCount; } uws_frame_encoder_ut.c000066400000000000000000001766241362133436400412010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/uws_frame_encoder_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" void* real_malloc(size_t size) { return malloc(size); } void real_free(void* ptr) { free(ptr); } #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/gb_rand.h" #include "azure_c_shared_utility/buffer_.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/uws_frame_encoder.h" #ifdef __cplusplus extern "C" { #endif extern BUFFER_HANDLE real_BUFFER_new(void); extern void real_BUFFER_delete(BUFFER_HANDLE handle); extern int real_BUFFER_enlarge(BUFFER_HANDLE handle, size_t enlargeSize); extern int real_BUFFER_size(BUFFER_HANDLE handle, size_t* size); extern int real_BUFFER_content(BUFFER_HANDLE handle, const unsigned char** content); extern unsigned char* real_BUFFER_u_char(BUFFER_HANDLE handle); extern size_t real_BUFFER_length(BUFFER_HANDLE handle); #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE g_testByTest; static char expected_encoded_str[256]; static char actual_encoded_str[256]; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } static void stringify_bytes(const unsigned char* bytes, size_t byte_count, char* output_string, size_t string_buffer_size) { size_t i; size_t pos = 0; output_string[pos++] = '['; for (i = 0; i < byte_count; i++) { (void)snprintf(&output_string[pos], string_buffer_size, "0x%02X", bytes[i]); if (i < byte_count - 1) { strcat(output_string, ","); } pos = strlen(output_string); } output_string[pos++] = ']'; output_string[pos++] = '\0'; } BEGIN_TEST_SUITE(uws_frame_encoder_ut) TEST_SUITE_INITIALIZE(suite_init) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_new, real_BUFFER_new); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_delete, real_BUFFER_delete); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_u_char, real_BUFFER_u_char); REGISTER_GLOBAL_MOCK_HOOK(BUFFER_enlarge, real_BUFFER_enlarge); REGISTER_UMOCK_ALIAS_TYPE(BUFFER_HANDLE, void*); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* uws_frame_encoder_encode */ /* Tests_SRS_UWS_FRAME_ENCODER_01_054: [ If `length` is greater than 0 and payload is NULL, then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_with_1_length_and_NULL_payload_fails) { // arrange BUFFER_HANDLE result; // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 1, false, true, 0); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_FRAME_ENCODER_01_001: [ `uws_frame_encoder_encode` shall encode the information given in `opcode`, `payload`, `length`, `is_masked`, `is_final` and `reserved` according to the RFC6455 into a new buffer.]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_044: [ On success `uws_frame_encoder_encode` shall return a non-NULL handle to the result buffer. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_048: [ The newly created buffer shall be created by calling `BUFFER_new`. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_046: [ The result buffer shall be resized accordingly using `BUFFER_enlarge`. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_050: [ The allocated memory shall be accessed by calling `BUFFER_u_char`. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_002: [ Indicates that this is the final fragment in a message. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_003: [ The first fragment MAY also be the final fragment. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_015: [ Defines whether the "Payload data" is masked. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_018: [ The length of the "Payload data", in bytes: ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_043: [ if 0-125, that is the payload length. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_zero_length_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x82, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_049: [ If `BUFFER_new` fails then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ TEST_FUNCTION(when_BUFFER_new_fails_then_uws_frame_encoder_encode_fails) { // arrange BUFFER_HANDLE result; STRICT_EXPECTED_CALL(BUFFER_new()) .SetReturn(NULL); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_FRAME_ENCODER_01_047: [ If `BUFFER_enlarge` fails then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ TEST_FUNCTION(when_BUFFER_enlarge_fails_then_uws_frame_encoder_encode_fails) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer) .SetReturn(1); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_FRAME_ENCODER_01_051: [ If `BUFFER_u_char` fails then `uws_frame_encoder_encode` shall fail and return a NULL. ]*/ TEST_FUNCTION(when_BUFFER_u_char_fails_then_uws_frame_encoder_encode_fails) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer) .SetReturn(NULL); STRICT_EXPECTED_CALL(BUFFER_delete(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_FRAME_ENCODER_01_002: [ Indicates that this is the final fragment in a message. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_003: [ The first fragment MAY also be the final fragment. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_zero_length_binary_frame_that_is_not_final) { // arrange unsigned char expected_bytes[] = { 0x02, 0x00 }; BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, false, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_004: [ MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_zero_length_binary_frame_with_reserved_bits_set) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0xF2, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, 7); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_052: [ If `reserved` has any bits set except the lowest 3 then `uws_frame_encoder_encode` shall fail and return NULL. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_zero_length_binary_frame_with_reserved_bits_having_all_bits_set_fails) { // arrange BUFFER_HANDLE result; // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, 0xFF); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_FRAME_ENCODER_01_004: [ MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_zero_length_binary_frame_with_RSV1_set) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0xC2, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, RESERVED_1); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_004: [ MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_zero_length_binary_frame_with_RSV2_set) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0xA2, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, RESERVED_2); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_004: [ MUST be 0 unless an extension is negotiated that defines meanings for non-zero values. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_zero_length_binary_frame_with_RSV3_set) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x92, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, RESERVED_3); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_006: [ If an unknown opcode is received, the receiving endpoint MUST _Fail the WebSocket Connection_. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_with_opcode_16_fails) { // arrange BUFFER_HANDLE result; // act result = uws_frame_encoder_encode((WS_FRAME_TYPE)0x10, NULL, 0, false, true, 0); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_UWS_FRAME_ENCODER_01_007: [ * %x0 denotes a continuation frame ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_continuation_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x80, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_CONTINUATION_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_008: [ * %x1 denotes a text frame ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_text_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x81, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_TEXT_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_009: [ * %x2 denotes a binary frame ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x82, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_010: [ * %x3-7 are reserved for further non-control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_non_control_frame_3) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x83, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_NON_CONTROL_FRAME_3, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_010: [ * %x3-7 are reserved for further non-control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_non_control_frame_4) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x84, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_NON_CONTROL_FRAME_4, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_010: [ * %x3-7 are reserved for further non-control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_non_control_frame_5) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x85, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_NON_CONTROL_FRAME_5, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_010: [ * %x3-7 are reserved for further non-control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_non_control_frame_6) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x86, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_NON_CONTROL_FRAME_6, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_010: [ * %x3-7 are reserved for further non-control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_non_control_frame_7) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x87, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_NON_CONTROL_FRAME_7, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_011: [ * %x8 denotes a connection close ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_close_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x88, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_CLOSE_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_012: [ * %x9 denotes a ping ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_ping_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x89, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_PING_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_013: [ * %xA denotes a pong ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_pong_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x8A, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_PONG_FRAME, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_014: [ * %xB-F are reserved for further control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_control_frame_B) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x8B, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_CONTROL_FRAME_B, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_014: [ * %xB-F are reserved for further control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_control_frame_C) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x8C, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_CONTROL_FRAME_C, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_014: [ * %xB-F are reserved for further control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_control_frame_D) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x8D, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_CONTROL_FRAME_D, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_014: [ * %xB-F are reserved for further control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_control_frame_E) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x8E, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_CONTROL_FRAME_E, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_014: [ * %xB-F are reserved for further control frames ]*/ TEST_FUNCTION(uws_frame_encoder_encodes_a_reserved_control_frame_F) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x8F, 0x00 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_RESERVED_CONTROL_FRAME_F, NULL, 0, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_015: [ Defines whether the "Payload data" is masked. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_053: [ In order to obtain a 32 bit value for masking, `gb_rand` shall be used 4 times (for each byte). ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_016: [ If set to 1, a masking key is present in masking-key, and this is used to unmask the "Payload data" as per Section 5.3. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_026: [ This field is present if the mask bit is set to 1 and is absent if the mask bit is set to 0. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_042: [ The payload length, indicated in the framing as frame-payload-length, does NOT include the length of the masking key. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_masked_zero_length_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x82, 0x80, 0xFF, 0xFF, 0xFF, 0xFF }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, true, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_015: [ Defines whether the "Payload data" is masked. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_053: [ In order to obtain a 32 bit value for masking, `gb_rand` shall be used 4 times (for each byte). ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_016: [ If set to 1, a masking key is present in masking-key, and this is used to unmask the "Payload data" as per Section 5.3. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_026: [ This field is present if the mask bit is set to 1 and is absent if the mask bit is set to 0. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_042: [ The payload length, indicated in the framing as frame-payload-length, does NOT include the length of the masking key. ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_masked_zero_length_binary_frame_different_mask) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char expected_bytes[] = { 0x82, 0x80, 0x42, 0x43, 0x44, 0x45 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x42); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x43); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x44); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x45); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, NULL, 0, true, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_043: [ if 0-125, that is the payload length. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_023: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_1_byte_long_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char payload[] = { 0x42 }; unsigned char expected_bytes[] = { 0x82, 0x01, 0x42 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, sizeof(payload), false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_043: [ if 0-125, that is the payload length. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_022: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_023: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_125_byte_long_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char* payload = (unsigned char*)real_malloc(125); unsigned char* expected_bytes = (unsigned char*)real_malloc(125 + 2); char* temp_expected_str = (char*)real_malloc(200 * 5); char* temp_actual_str = (char*)real_malloc(200 * 5); size_t i; expected_bytes[0] = 0x82; expected_bytes[1] = 0x7D; for (i = 0; i < 125; i++) { payload[i] = (unsigned char)i; expected_bytes[i + 2] = (unsigned char)i; } STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 125 + 2)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, 125, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, 125 + 2, temp_expected_str, 200 * 5); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), temp_actual_str, 200 * 5); ASSERT_ARE_EQUAL(char_ptr, temp_expected_str, temp_actual_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_free(temp_expected_str); real_free(temp_actual_str); real_free(expected_bytes); real_free(payload); real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_019: [ If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_023: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_126_byte_long_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char* payload = (unsigned char*)real_malloc(126); unsigned char* expected_bytes = (unsigned char*)real_malloc(126 + 4); char* temp_expected_str = (char*)real_malloc(200 * 5); char* temp_actual_str = (char*)real_malloc(200 * 5); size_t i; expected_bytes[0] = 0x82; expected_bytes[1] = 0x7E; expected_bytes[2] = 0x00; expected_bytes[3] = 0x7E; for (i = 0; i < 126; i++) { payload[i] = (unsigned char)i; expected_bytes[i + 4] = (unsigned char)i; } STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 126 + 4)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, 126, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, 126 + 4, temp_expected_str, 200 * 5); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), temp_actual_str, 200 * 5); ASSERT_ARE_EQUAL(char_ptr, temp_expected_str, temp_actual_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_free(temp_expected_str); real_free(temp_actual_str); real_free(expected_bytes); real_free(payload); real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_019: [ If 126, the following 2 bytes interpreted as a 16-bit unsigned integer are the payload length. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_021: [ Multibyte length quantities are expressed in network byte order. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_022: [ Note that in all cases, the minimal number of bytes MUST be used to encode the length, for example, the length of a 124-byte-long string can't be encoded as the sequence 126, 0, 124. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_023: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_65535_byte_long_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char* payload = (unsigned char*)real_malloc(65535); unsigned char* expected_bytes = (unsigned char*)real_malloc(65535 + 4); uint32_t i; expected_bytes[0] = 0x82; expected_bytes[1] = 0x7E; expected_bytes[2] = 0xFF; expected_bytes[3] = 0xFF; for (i = 0; i < 65535; i++) { payload[i] = (unsigned char)i; expected_bytes[i + 4] = (unsigned char)i; } STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 65535 + 4)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, 65535, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 65535 + 4, real_BUFFER_length(result)); ASSERT_ARE_EQUAL(int, 0, memcmp(expected_bytes, real_BUFFER_u_char(result), real_BUFFER_length(result)), "Memory compare failed"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_free(expected_bytes); real_free(payload); real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_020: [ If 127, the following 8 bytes interpreted as a 64-bit unsigned integer (the most significant bit MUST be 0) are the payload length. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_021: [ Multibyte length quantities are expressed in network byte order. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_023: [ The payload length is the length of the "Extension data" + the length of the "Application data". ]*/ TEST_FUNCTION(uws_frame_encoder_encode_encodes_a_65536_byte_long_binary_frame) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char* payload = (unsigned char*)real_malloc(65536); unsigned char* expected_bytes = (unsigned char*)real_malloc(65536 + 10); uint32_t i; expected_bytes[0] = 0x82; expected_bytes[1] = 0x7F; expected_bytes[2] = 0x00; expected_bytes[3] = 0x00; expected_bytes[4] = 0x00; expected_bytes[5] = 0x00; expected_bytes[6] = 0x00; expected_bytes[7] = 0x01; expected_bytes[8] = 0x00; expected_bytes[9] = 0x00; for (i = 0; i < 65536; i++) { payload[i] = (unsigned char)i; expected_bytes[i + 10] = (unsigned char)i; } STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, 65536 + 10)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, 65536, false, true, 0); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 65536 + 10, real_BUFFER_length(result)); ASSERT_ARE_EQUAL(int, 0, memcmp(expected_bytes, real_BUFFER_u_char(result), real_BUFFER_length(result)), "Memory compare failed"); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_free(expected_bytes); real_free(payload); real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_033: [ A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. **]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_034: [ The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_035: [ It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_036: [ The masking key is a 32-bit value chosen at random by the client. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_037: [ When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_038: [ The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_039: [ To convert masked data into unmasked data, or vice versa, the following algorithm is applied. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_040: [ The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_041: [ Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): ]*/ TEST_FUNCTION(uws_frame_encoder_encode_masks_a_1_byte_frame_with_0_as_mask) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char payload[] = { 0x42 }; unsigned char expected_bytes[] = { 0x82, 0x81, 0x00, 0x00, 0x00, 0x00, 0x42 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, sizeof(payload), true, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_033: [ A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. **]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_034: [ The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_035: [ It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_036: [ The masking key is a 32-bit value chosen at random by the client. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_037: [ When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_038: [ The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_039: [ To convert masked data into unmasked data, or vice versa, the following algorithm is applied. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_040: [ The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_041: [ Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): ]*/ TEST_FUNCTION(uws_frame_encoder_encode_masks_a_1_byte_frame_with_0xFF_as_mask) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char payload[] = { 0x42 }; unsigned char expected_bytes[] = { 0x82, 0x81, 0xFF, 0x00, 0x00, 0x00, 0xBD }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, sizeof(payload), true, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_033: [ A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. **]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_034: [ The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_035: [ It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_036: [ The masking key is a 32-bit value chosen at random by the client. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_037: [ When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_038: [ The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_039: [ To convert masked data into unmasked data, or vice versa, the following algorithm is applied. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_040: [ The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_041: [ Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): ]*/ TEST_FUNCTION(uws_frame_encoder_encode_masks_a_4_byte_frame_with_0xFF_as_mask) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char payload[] = { 0x42, 0x43, 0x44, 0x45 }; unsigned char expected_bytes[] = { 0x82, 0x84, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xBC, 0xBB, 0xBA }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, sizeof(payload), true, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_033: [ A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. **]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_034: [ The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_035: [ It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_036: [ The masking key is a 32-bit value chosen at random by the client. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_037: [ When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_038: [ The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_039: [ To convert masked data into unmasked data, or vice versa, the following algorithm is applied. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_040: [ The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_041: [ Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): ]*/ TEST_FUNCTION(uws_frame_encoder_encode_masks_a_5_byte_frame_with_0xFF_as_mask) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char payload[] = { 0x42, 0x43, 0x44, 0x45, 0x01 }; unsigned char expected_bytes[] = { 0x82, 0x85, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xBC, 0xBB, 0xBA, 0xFE }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, sizeof(payload), true, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } /* Tests_SRS_UWS_FRAME_ENCODER_01_033: [ A masked frame MUST have the field frame-masked set to 1, as defined in Section 5.2. **]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_034: [ The masking key is contained completely within the frame, as defined in Section 5.2 as frame-masking-key. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_035: [ It is used to mask the "Payload data" defined in the same section as frame-payload-data, which includes "Extension data" and "Application data". ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_036: [ The masking key is a 32-bit value chosen at random by the client. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_037: [ When preparing a masked frame, the client MUST pick a fresh masking key from the set of allowed 32-bit values. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_038: [ The masking key needs to be unpredictable; thus, the masking key MUST be derived from a strong source of entropy, and the masking key for a given frame MUST NOT make it simple for a server/proxy to predict the masking key for a subsequent frame. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_039: [ To convert masked data into unmasked data, or vice versa, the following algorithm is applied. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_040: [ The same algorithm applies regardless of the direction of the translation, e.g., the same steps are applied to mask the data as to unmask the data. ]*/ /* Tests_SRS_UWS_FRAME_ENCODER_01_041: [ Octet i of the transformed data ("transformed-octet-i") is the XOR of octet i of the original data ("original-octet-i") with octet at index i modulo 4 of the masking key ("masking-key-octet-j"): ]*/ TEST_FUNCTION(uws_frame_encoder_encode_masks_a_8_byte_frame_with_different_mask_bytes) { // arrange BUFFER_HANDLE result; BUFFER_HANDLE newly_created_buffer; unsigned char payload[] = { 0x42, 0x43, 0x44, 0x45, 0x01, 0x02, 0xFF, 0xAA }; unsigned char expected_bytes[] = { 0x82, 0x88, 0x00, 0xFF, 0xAA, 0x42, 0x42, 0xBC, 0xEE, 0x07, 0x01, 0xFD, 0x55, 0xE8 }; STRICT_EXPECTED_CALL(BUFFER_new()) .CaptureReturn(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_enlarge(IGNORED_PTR_ARG, sizeof(expected_bytes))) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(BUFFER_u_char(IGNORED_PTR_ARG)) .ValidateArgumentValue_handle(&newly_created_buffer); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x00); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xFF); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0xAA); STRICT_EXPECTED_CALL(gb_rand()) .SetReturn(0x42); // act result = uws_frame_encoder_encode(WS_BINARY_FRAME, payload, sizeof(payload), true, true, 0); // assert ASSERT_IS_NOT_NULL(result); stringify_bytes(expected_bytes, sizeof(expected_bytes), expected_encoded_str, sizeof(expected_encoded_str)); stringify_bytes(real_BUFFER_u_char(result), real_BUFFER_length(result), actual_encoded_str, sizeof(actual_encoded_str)); ASSERT_ARE_EQUAL(char_ptr, expected_encoded_str, actual_encoded_str); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup real_BUFFER_delete(result); } END_TEST_SUITE(uws_frame_encoder_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/vector_ut/000077500000000000000000000000001362133436400325105ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007561362133436400352010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/vector_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName vector_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/vector.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/vector_ut/main.c000066400000000000000000000004771362133436400336100ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(Vector_UnitTests, failedTestCount); return failedTestCount; } vector_ut.c000066400000000000000000001050521362133436400346120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/vector_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void* my_gballoc_realloc(void* ptr, size_t size) { return realloc(ptr, size); } static void my_gballoc_free(void* s) { free(s); } #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/vector.h" #include "testrunnerswitcher.h" #include "umock_c.h" DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } typedef struct VECTOR_UNITTEST_TAG { int nValue1; long lValue2; } VECTOR_UNITTEST; static bool VECTOR_UNITTEST_isEqual(const void* left_hand_side, const void* right_hand_side) { VECTOR_UNITTEST* rhs = (VECTOR_UNITTEST*)left_hand_side; VECTOR_UNITTEST* lhs = (VECTOR_UNITTEST*)right_hand_side; return (rhs->nValue1 == lhs->nValue1 && rhs->lValue2 == lhs->lValue2); } #define NUM_ITEM_PUSH_BACK 128 BEGIN_TEST_SUITE(Vector_UnitTests) TEST_SUITE_INITIALIZE(a) { int result; result = umock_c_init(on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_realloc, my_gballoc_realloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_realloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); } TEST_FUNCTION_INITIALIZE(initialize) { umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(cleans) { } /* Vector_Tests BEGIN */ /* Tests_SRS_VECTOR_10_001: [VECTOR_create shall allocate a VECTOR_HANDLE that will contain an empty vector.The size of each element is given with the parameter elementSize.] */ TEST_FUNCTION(VECTOR_create_succeeds) { ///arrange VECTOR_HANDLE handle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); ///act handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); ///assert ASSERT_IS_NOT_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_002: [VECTOR_create shall fail and return NULL if elementsize is equal to 0.] */ TEST_FUNCTION(VECTOR_create_fails_if_element_size_is_zero) { ///arrange ///act VECTOR_HANDLE handle = VECTOR_create(0); ///assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_033: [VECTOR_create shall fail and return NULL if malloc fails.] */ TEST_FUNCTION(VECTOR_create_returns_NULL_if_malloc_fails) { ///arrange VECTOR_HANDLE handle; STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size() .SetReturn(NULL); ///act handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); ///assert ASSERT_IS_NULL(handle); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_004: [VECTOR_move shall allocate a VECTOR_HANDLE and move the data to it from the given handle.] */ TEST_FUNCTION(VECTOR_move_succeeds) { ///arrange VECTOR_UNITTEST* current; VECTOR_HANDLE test; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {5, 6}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size(); ///act test = VECTOR_move(handle); ///assert ASSERT_IS_NOT_NULL(test); ASSERT_ARE_EQUAL(size_t, VECTOR_size(test), 2); ASSERT_ARE_EQUAL(size_t, VECTOR_size(handle), 0); current = (VECTOR_UNITTEST *)VECTOR_element(test, 0); ASSERT_ARE_EQUAL(int, sItem1.nValue1, current->nValue1); ASSERT_ARE_EQUAL(long, sItem1.lValue2, current->lValue2); current = (VECTOR_UNITTEST *)VECTOR_element(test, 1); ASSERT_ARE_EQUAL(int, sItem2.nValue1, current->nValue1); ASSERT_ARE_EQUAL(long, sItem2.lValue2, current->lValue2); ///cleanup VECTOR_destroy(handle); VECTOR_destroy(test); } /* Tests_SRS_VECTOR_10_005: [VECTOR_move shall fail and return NULL if the given handle is NULL.] */ TEST_FUNCTION(VECTOR_move_returns_NULL_if_handle_is_NULL) { ///arrange ///act VECTOR_HANDLE test = VECTOR_move(NULL); ///assert ASSERT_IS_NULL(test); } /* Tests_SRS_VECTOR_10_006: [VECTOR_move shall fail and return NULL if malloc fails.] */ TEST_FUNCTION(VECTOR_move_returns_NULL_if_malloc_fails) { ///arrange VECTOR_HANDLE test; VECTOR_UNITTEST* current; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {5, 6}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .IgnoreArgument_size() .SetReturn(NULL); ///act test = VECTOR_move(handle); ///assert ASSERT_IS_NULL(test); ASSERT_ARE_EQUAL(size_t, VECTOR_size(handle), 2); current = (VECTOR_UNITTEST *)VECTOR_element(handle, 0); ASSERT_ARE_EQUAL(int, sItem1.nValue1, current->nValue1); ASSERT_ARE_EQUAL(long, sItem1.lValue2, current->lValue2); current = (VECTOR_UNITTEST *)VECTOR_element(handle, 1); ASSERT_ARE_EQUAL(int, sItem2.nValue1, current->nValue1); ASSERT_ARE_EQUAL(long, sItem2.lValue2, current->lValue2); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_008: [VECTOR_destroy shall free the given handle and its internal storage.] */ TEST_FUNCTION(VECTOR_destroy_succeeds) { ///arrange VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument_ptr(); STRICT_EXPECTED_CALL(gballoc_free(handle)); ///act VECTOR_destroy(handle); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_009: [VECTOR_destroy shall return if the given handle is NULL.] */ TEST_FUNCTION(VECTOR_destroy_return_if_handle_is_NULL) { ///arrange ///act VECTOR_destroy(NULL); ///assert ///VECTOR_destroy doesn't crash ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_011: [VECTOR_push_back shall fail and return non - zero if `handle` is NULL.] */ TEST_FUNCTION(VECTOR_push_back_fails_if_handle_is_NULL) { ///arrange VECTOR_UNITTEST vItem; ///act int result = VECTOR_push_back(NULL, &vItem, 1); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_034: [VECTOR_push_back shall fail and return non - zero if `elements` is NULL.] */ TEST_FUNCTION(VECTOR_push_back_fails_if_elements_is_NULL) { ///arrange int result; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act result = VECTOR_push_back(handle, NULL, 1); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_035: [VECTOR_push_back shall fail and return non - zero if `numElements` is 0.] */ TEST_FUNCTION(VECTOR_push_back_fails_if_numElements_is_zero) { ///arrange int result; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act result = VECTOR_push_back(handle, &sItem, 0); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_013: [VECTOR_push_back shall append the given elements and return 0 indicating success.] */ TEST_FUNCTION(VECTOR_push_back_succeeds) { ///arrange int result; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(VECTOR_UNITTEST))); result = VECTOR_push_back(handle, &sItem, 1); ///assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_012: [VECTOR_push_back shall fail and return non - zero if memory allocation fails.] */ TEST_FUNCTION(VECTOR_push_back_fails_if_realloc_fails) { ///arrange int result; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_realloc(NULL, sizeof(VECTOR_UNITTEST))) .SetReturn(NULL); result = VECTOR_push_back(handle, &sItem, 1); ///assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_026: [VECTOR_size shall return 0 if the given handle is NULL.] */ TEST_FUNCTION(VECTOR_size_fails_if_handle_is_NULL) { ///arrange ///act size_t num = VECTOR_size(NULL); ///assert ASSERT_ARE_EQUAL(size_t, 0, num); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_025: [VECTOR_size shall return the number of elements stored with the given handle.] */ TEST_FUNCTION(VECTOR_size_succeeds_if_vector_is_empty) { ///arrange size_t num; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act num = VECTOR_size(handle); ///assert ASSERT_ARE_EQUAL(size_t, 0, num); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_025: [VECTOR_size shall return the number of elements stored with the given handle.] */ TEST_FUNCTION(VECTOR_size_succeeds) { ///arrange size_t num; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem, 1); umock_c_reset_all_calls(); ///act num = VECTOR_size(handle); ///assert ASSERT_ARE_EQUAL(size_t, 1, num); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_030: [VECTOR_find_if shall fail and return NULL if `handle` is NULL.] */ TEST_FUNCTION(VECTOR_find_fails_if_handle_is_NULL) { ///arrange VECTOR_UNITTEST sItem = {1, 2}; ///act VECTOR_UNITTEST* pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(NULL, VECTOR_UNITTEST_isEqual, &sItem); ///assert ASSERT_IS_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_036: [VECTOR_find_if shall fail and return NULL if `pred` is NULL.] */ TEST_FUNCTION(VECTOR_find_fails_if_pred_is_NULL) { ///arrange VECTOR_UNITTEST* pfindItem; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem, 1); umock_c_reset_all_calls(); ///act pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, NULL, &sItem); ///assert ASSERT_IS_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_031: [VECTOR_find_if shall return the first element in the vector that matches `pred`.] */ TEST_FUNCTION(VECTOR_find_if_succeeds) { ///arrange VECTOR_UNITTEST* pfindItem; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem, 1); umock_c_reset_all_calls(); ///act pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem); ///assert ASSERT_IS_NOT_NULL(pfindItem); ASSERT_ARE_EQUAL(size_t, sItem.nValue1, pfindItem->nValue1); ASSERT_ARE_EQUAL(long, sItem.lValue2, pfindItem->lValue2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_032: [VECTOR_find_if shall return NULL if no element is found that matches `pred`.] */ TEST_FUNCTION(VECTOR_find_if_return_null_if_no_match) { ///arrange VECTOR_UNITTEST* pfindItem; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {5, 8}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); umock_c_reset_all_calls(); ///act pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); ///assert ASSERT_IS_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_017: [VECTOR_clear shall if the object is NULL or empty.] */ TEST_FUNCTION(VECTOR_clear_fails_if_handle_is_NULL) { ///arrange ///act VECTOR_clear(NULL); ///assert // Make sure this clear doesn't crash ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_017: [VECTOR_clear shall if the object is NULL or empty.] */ TEST_FUNCTION(VECTOR_clear_fails_if_vector_is_empty) { ///arrange VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_free(NULL)); VECTOR_clear(handle); ///assert // Make sure this clear doesn't crash ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_016: [VECTOR_clear shall remove all elements from the object and release internal storage.] */ TEST_FUNCTION(VECTOR_clear_succeeds) { ///arrange size_t num; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem, 1); (void)VECTOR_push_back(handle, &sItem, 1); umock_c_reset_all_calls(); ///act STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument_ptr(); VECTOR_clear(handle); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 0, num); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_018: [VECTOR_element shall return a pointer to the element at the given index.] */ TEST_FUNCTION(VECTOR_element_succeeds) { ///arrange VECTOR_UNITTEST* pResult; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); umock_c_reset_all_calls(); ///act pResult = (VECTOR_UNITTEST*)VECTOR_element(handle, 1); ///assert ASSERT_IS_NOT_NULL(pResult); ASSERT_ARE_EQUAL(size_t, sItem2.nValue1, pResult->nValue1); ASSERT_ARE_EQUAL(long, sItem2.lValue2, pResult->lValue2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_019: [VECTOR_element shall fail and return NULL if handle is NULL.] */ TEST_FUNCTION(VECTOR_element_fails_if_handle_is_NULL) { ///arrange ///act void* pResult = VECTOR_element(NULL, 0); ///assert ASSERT_IS_NULL(pResult); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_020: [VECTOR_element shall fail and return NULL if the given index is out of range.] */ TEST_FUNCTION(VECTOR_element_fails_if_index_is_out_of_range) { ///arrange VECTOR_UNITTEST* pResult; VECTOR_UNITTEST sItem = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem, 1); (void)VECTOR_push_back(handle, &sItem, 1); umock_c_reset_all_calls(); ///act pResult = (VECTOR_UNITTEST*)VECTOR_element(handle, 2); ///assert ASSERT_IS_NULL(pResult); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_022: [VECTOR_front shall fail and return NULL if handle is NULL.] */ TEST_FUNCTION(VECTOR_front_fails_if_handle_is_NULL) { ///arrange ///act void* pResult = VECTOR_front(NULL); ///assert ASSERT_IS_NULL(pResult); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_021: [VECTOR_front shall return the element at index 0.] */ TEST_FUNCTION(VECTOR_front_succeeds) { ///arrange VECTOR_UNITTEST* pResult; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); umock_c_reset_all_calls(); ///act pResult = (VECTOR_UNITTEST*)VECTOR_front(handle); ///assert ASSERT_IS_NOT_NULL(pResult); ASSERT_ARE_EQUAL(size_t, sItem1.nValue1, pResult->nValue1); ASSERT_ARE_EQUAL(long, sItem1.lValue2, pResult->lValue2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_028: [VECTOR_front shall fail and return NULL if the vector is empty.] */ TEST_FUNCTION(VECTOR_front_return_null_if_vector_is_empty) { ///arrange VECTOR_UNITTEST* pResult; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act pResult = (VECTOR_UNITTEST*)VECTOR_front(handle); ///assert ASSERT_IS_NULL(pResult); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_023: [VECTOR_back shall return the last element of the vector.] */ TEST_FUNCTION(VECTOR_back_succeeds) { ///arrange VECTOR_UNITTEST* pResult; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_UNITTEST sItem3 = {5, 6}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); (void)VECTOR_push_back(handle, &sItem3, 1); umock_c_reset_all_calls(); ///act pResult = (VECTOR_UNITTEST*)VECTOR_back(handle); ///assert ASSERT_IS_NOT_NULL(pResult); ASSERT_ARE_EQUAL(size_t, sItem3.nValue1, pResult->nValue1); ASSERT_ARE_EQUAL(long, sItem3.lValue2, pResult->lValue2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_024: [VECTOR_back shall fail and return NULL if handle is NULL.] */ TEST_FUNCTION(VECTOR_back_fails_if_handle_is_NULL) { ///arrange ///act void* pResult = VECTOR_back(NULL); ///assert ASSERT_IS_NULL(pResult); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_029: [VECTOR_back shall fail and return NULL if the vector is empty.] */ TEST_FUNCTION(VECTOR_back_return_null_if_vector_is_empty) { ///arrange VECTOR_UNITTEST* pResult; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act pResult = (VECTOR_UNITTEST*)VECTOR_back(handle); ///assert ASSERT_IS_NULL(pResult); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_015: [VECTOR_erase shall return if `handle`.] */ TEST_FUNCTION(VECTOR_erase_if_handle_is_NULL) { ///arrange VECTOR_UNITTEST sItem = {1, 2}; ///act VECTOR_erase(NULL, &sItem, 1); ///assert // Make sure this erase doesn't crash ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_VECTOR_10_038: [VECTOR_erase shall return if `elements` is NULL.] */ TEST_FUNCTION(VECTOR_erase_if_elements_is_NULL) { ///arrange VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); ///act VECTOR_erase(handle, NULL, 1); ///assert // Make sure this erase doesn't crash ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_039: [VECTOR_erase shall return if `numElements` is 0.] */ TEST_FUNCTION(VECTOR_erase_if_numElements_is_zero) { ///arrange VECTOR_UNITTEST* pfindItem; size_t num; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = (VECTOR_UNITTEST*)VECTOR_back(handle); umock_c_reset_all_calls(); ///act VECTOR_erase(handle, pfindItem, 0); ///assert // Make sure this erase doesn't crash num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 2, num); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_014: [VECTOR_erase shall remove the `numElements` starting at `elements` and reduce its internal storage.] */ TEST_FUNCTION(VECTOR_erase_succeeds_case_1) { ///arrange VECTOR_UNITTEST* pfindItem; size_t num; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, sizeof(VECTOR_UNITTEST))) .IgnoreArgument_ptr(); ///act VECTOR_erase(handle, pfindItem, 1); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 1, num); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); ASSERT_IS_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_014: [VECTOR_erase shall remove the `numElements` starting at `elements` and reduce its internal storage.] */ TEST_FUNCTION(VECTOR_erase_succeeds_case_2) { ///arrange VECTOR_UNITTEST* pfindItem; size_t num; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)) .IgnoreArgument_ptr(); ///act VECTOR_erase(handle, pfindItem, 2); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 0, num); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); ASSERT_IS_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_014: [VECTOR_erase shall remove the `numElements` starting at `elements` and reduce its internal storage.] */ TEST_FUNCTION(VECTOR_erase_succeeds_case_3) { ///arrange size_t num; VECTOR_UNITTEST* pfindItem; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, IGNORED_NUM_ARG)) .IgnoreArgument_ptr() .IgnoreArgument_size() .SetReturn(NULL); ///act VECTOR_erase(handle, pfindItem, 1); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 1, num); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); ASSERT_IS_NULL(pfindItem); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); ASSERT_IS_NOT_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_027: [VECTOR_erase shall return if `numElements` is out of bound.] */ TEST_FUNCTION(VECTOR_erase_numElements_out_of_bound) { ///arrange size_t num; VECTOR_UNITTEST* pfindItem; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); umock_c_reset_all_calls(); ///act VECTOR_erase(handle, pfindItem, 2); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 2, num); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); ASSERT_IS_NOT_NULL(pfindItem); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); ASSERT_IS_NOT_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_040: [VECTOR_erase shall return if `elements` is out of bound.] */ TEST_FUNCTION(VECTOR_erase_elements_out_of_bound_case_1) { ///arrange VECTOR_UNITTEST* pfindItem; size_t num; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); pfindItem -= 1; umock_c_reset_all_calls(); ///act VECTOR_erase(handle, pfindItem, 1); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 2, num); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); ASSERT_IS_NOT_NULL(pfindItem); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); ASSERT_IS_NOT_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_040: [VECTOR_erase shall return if `elements` is out of bound.] */ TEST_FUNCTION(VECTOR_erase_elements_out_of_bound_case_2) { ///arrange size_t num; VECTOR_UNITTEST* pfindItem; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); pfindItem += 2; umock_c_reset_all_calls(); ///act VECTOR_erase(handle, pfindItem, 1); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 2, num); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); ASSERT_IS_NOT_NULL(pfindItem); pfindItem = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); ASSERT_IS_NOT_NULL(pfindItem); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Tests_SRS_VECTOR_10_041: [VECTOR_erase shall return if `elements` is misaligned.] */ TEST_FUNCTION(VECTOR_erase_elements_misaligned) { ///arrange VECTOR_UNITTEST* pResult; void* pfindItem; size_t num; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_UNITTEST sItem2 = {3, 4}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); (void)VECTOR_push_back(handle, &sItem1, 1); (void)VECTOR_push_back(handle, &sItem2, 1); pfindItem = VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); pfindItem = (void*)(((unsigned char*)pfindItem) + 0x1); umock_c_reset_all_calls(); ///act VECTOR_erase(handle, pfindItem, 1); ///assert num = VECTOR_size(handle); ASSERT_ARE_EQUAL(size_t, 2, num); pResult = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem1); ASSERT_IS_NOT_NULL(pfindItem); ASSERT_ARE_EQUAL(size_t, sItem1.nValue1, pResult->nValue1); ASSERT_ARE_EQUAL(long, sItem1.lValue2, pResult->lValue2); pResult = (VECTOR_UNITTEST*)VECTOR_find_if(handle, VECTOR_UNITTEST_isEqual, &sItem2); ASSERT_IS_NOT_NULL(pResult); ASSERT_ARE_EQUAL(size_t, sItem2.nValue1, pResult->nValue1); ASSERT_ARE_EQUAL(long, sItem2.lValue2, pResult->lValue2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } TEST_FUNCTION(VECTOR_push_back_multiple_elements_succeeds) { ///arrange size_t nIndex; VECTOR_UNITTEST* pResult; int result = 0; VECTOR_UNITTEST sItem1 = {1, 2}; VECTOR_HANDLE handle = VECTOR_create(sizeof(VECTOR_UNITTEST)); umock_c_reset_all_calls(); for (nIndex = 0; nIndex < NUM_ITEM_PUSH_BACK; nIndex++) { STRICT_EXPECTED_CALL(gballoc_realloc(IGNORED_PTR_ARG, (nIndex + 1) * sizeof(VECTOR_UNITTEST))) .IgnoreArgument_ptr(); } ///act for (nIndex = 0; (nIndex < NUM_ITEM_PUSH_BACK) && (result == 0); nIndex++) { sItem1.nValue1++; sItem1.lValue2++; result = VECTOR_push_back(handle, &sItem1, 1); } ///assert ASSERT_ARE_EQUAL(int, 0, result); pResult = (VECTOR_UNITTEST*)VECTOR_back(handle); ASSERT_IS_NOT_NULL(pResult); ASSERT_ARE_EQUAL(size_t, sItem1.nValue1, pResult->nValue1); ASSERT_ARE_EQUAL(long, sItem1.lValue2, pResult->lValue2); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup VECTOR_destroy(handle); } /* Vector_Tests END */ END_TEST_SUITE(Vector_UnitTests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/ws_url_ut/000077500000000000000000000000001362133436400325215ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000010251362133436400352000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/ws_url_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName ws_url_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/ws_url.c ../real_test_files/real_string_token.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/ws_url_ut/main.c000066400000000000000000000004751362133436400336170ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(ws_url_ut, failedTestCount); return (int)failedTestCount; } ws_url_ut.c000066400000000000000000001654131362133436400346430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/ws_url_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umock_c_negative_tests.h" #include "umocktypes_charptr.h" #include "umocktypes_stdint.h" #include "umocktypes_bool.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "azure_c_shared_utility/macro_utils.h" #ifdef __cplusplus extern "C" { #endif void* real_malloc(size_t size) { return malloc(size); } void real_free(void* ptr) { free(ptr); } #ifdef __cplusplus } #endif #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/string_token.h" #include "azure_c_shared_utility/crt_abstractions.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/ws_url.h" #ifdef __cplusplus extern "C" { #endif extern STRING_TOKEN_HANDLE real_StringToken_GetFirst(const char* source, size_t length, const char** delimiters, size_t n_delims); extern bool real_StringToken_GetNext(STRING_TOKEN_HANDLE token, const char** delimiters, size_t n_delims); extern const char* real_StringToken_GetValue(STRING_TOKEN_HANDLE token); extern size_t real_StringToken_GetLength(STRING_TOKEN_HANDLE token); extern const char* real_StringToken_GetDelimiter(STRING_TOKEN_HANDLE token); extern void real_StringToken_Destroy(STRING_TOKEN_HANDLE token); #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } // Helpers static int saved_malloc_returns_count = 0; static void* saved_malloc_returns[20]; static void* TEST_malloc(size_t size) { saved_malloc_returns[saved_malloc_returns_count] = real_malloc(size); return saved_malloc_returns[saved_malloc_returns_count++]; } static void TEST_free(void* ptr) { int i, j; for (i = 0, j = 0; j < saved_malloc_returns_count; i++, j++) { if (saved_malloc_returns[i] == ptr) j++; saved_malloc_returns[i] = saved_malloc_returns[j]; } if (i != j) saved_malloc_returns_count--; real_free(ptr); } static int TEST_mallocAndStrcpy_s(char** destination, const char* source) { *destination = (char*)real_malloc(strlen(source) + 1); (void)strcpy(*destination, source); return 0; } static void register_umock_alias_types() { REGISTER_UMOCK_ALIAS_TYPE(STRING_TOKEN_HANDLE, void*); } static void register_global_mock_hooks() { REGISTER_GLOBAL_MOCK_HOOK(malloc, TEST_malloc); REGISTER_GLOBAL_MOCK_HOOK(free, TEST_free); REGISTER_GLOBAL_MOCK_HOOK(StringToken_GetFirst, real_StringToken_GetFirst); REGISTER_GLOBAL_MOCK_HOOK(StringToken_GetNext, real_StringToken_GetNext); REGISTER_GLOBAL_MOCK_HOOK(StringToken_GetDelimiter, real_StringToken_GetDelimiter); REGISTER_GLOBAL_MOCK_HOOK(StringToken_GetValue, real_StringToken_GetValue); REGISTER_GLOBAL_MOCK_HOOK(StringToken_GetLength, real_StringToken_GetLength); REGISTER_GLOBAL_MOCK_HOOK(StringToken_Destroy, real_StringToken_Destroy); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, TEST_mallocAndStrcpy_s); } static void register_global_mock_returns() { REGISTER_GLOBAL_MOCK_FAIL_RETURN(StringToken_GetFirst, NULL); REGISTER_GLOBAL_MOCK_FAIL_RETURN(StringToken_GetNext, false); REGISTER_GLOBAL_MOCK_FAIL_RETURN(StringToken_GetDelimiter, NULL); REGISTER_GLOBAL_MOCK_FAIL_RETURN(StringToken_GetValue, NULL); REGISTER_GLOBAL_MOCK_FAIL_RETURN(StringToken_GetLength, 0); REGISTER_GLOBAL_MOCK_RETURN(mallocAndStrcpy_s, 0); REGISTER_GLOBAL_MOCK_FAIL_RETURN(mallocAndStrcpy_s, 1); } // Set Expected Call Helpers BEGIN_TEST_SUITE(ws_url_ut) TEST_SUITE_INITIALIZE(ws_url_ut_initialize) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); register_umock_alias_types(); register_global_mock_returns(); register_global_mock_hooks(); } TEST_SUITE_CLEANUP(ws_url_ut_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(ws_url_ut_test_function_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(ws_url_ut_test_function_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } // Tests_SRS_WS_URL_09_001: [ If `url` is NULL the function shall fail and return NULL ] TEST_FUNCTION(ws_url_create_NULL_url) { // arrange WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); // act ws_url = ws_url_create(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ws_url); // cleanup } // Tests_SRS_WS_URL_09_002: [ Memory shall be allocated for an instance of WS_URL (aka `ws_url`) ] // Tests_SRS_WS_URL_09_024: [ `url` shall be copied into `ws_url->url` ] // Tests_SRS_WS_URL_09_005: [ If `url` starts with "wss://" (`protocol`), `ws_url->is_secure` shall be set to false ] // Tests_SRS_WS_URL_09_006: [ The pointer to the token starting right after `protocol` (in the `url` string) shall be stored in `ws_url->host` ] // Tests_SRS_WS_URL_09_008: [ The length from `ws_url->host` up to the first occurrence of either ":" (`port_delimiter`), "/" (`path_delimiter`), "?" (`query_delimiter`) or `\0` shall be stored in `ws_url->host_length` ] // Tests_SRS_WS_URL_09_010: [ If after `ws_url->host` the `port_delimiter` occurs (not preceeded by `path_delimiter` or `query_delimiter`) the number that follows shall be parsed and stored in `ws_url->port` ] // Tests_SRS_WS_URL_09_012: [ If after `ws_url->host` or the port number the `path_delimiter` occurs (not preceeded by `query_delimiter`) the following pointer address shall be stored in `ws_url->path` ] // Tests_SRS_WS_URL_09_014: [ The length from `ws_url->path` up to the first occurrence of either `query_delimiter` or `\0` shall be stored in `ws_url->path_length` ] // Tests_SRS_WS_URL_09_016: [ Next if the `query_delimiter` occurs the following pointer address shall be stored in `ws_url->query` ] // Tests_SRS_WS_URL_09_018: [ The length from `ws_url->query` up to `\0` shall be stored in `ws_url->query_length` ] TEST_FUNCTION(ws_url_create_wss_port_path_query_Success) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(ws_url); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_003: [ If `ws_url` failed to be allocated, the function shall return NULL ] // Tests_SRS_WS_URL_09_025: [ If `url` fails to be copied, the function shall free `ws_url` and return NULL ] // Tests_SRS_WS_URL_09_007: [ If `ws_url->host` ends up being NULL, the function shall fail and return NULL ] // Tests_SRS_WS_URL_09_009: [ If `ws_url->host_length` ends up being zero, the function shall fail and return NULL ] // Tests_SRS_WS_URL_09_011: [ If the port number fails to be parsed, the function shall fail and return NULL ] // Tests_SRS_WS_URL_09_013: [ If the path component is present and `ws_url->path` ends up being NULL, the function shall fail and return NULL ] // Tests_SRS_WS_URL_09_015: [ If the path component is present and `ws_url->path_length` ends up being zero, the function shall fail and return NULL ] // Tests_SRS_WS_URL_09_017: [ If the query component is present and `ws_url->query` ends up being NULL, the function shall fail and return NULL ] // Tests_SRS_WS_URL_09_019: [ If the query component is present and `ws_url->query_length` ends up being zero, the function shall fail and return NULL ] // Tests_SRS_WS_URL_09_021: [ If any failure occurs, all memory allocated by the function shall be released before returning ] TEST_FUNCTION(ws_url_create_negative_tests) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; size_t i; size_t negative_tests_call_count = 1; ASSERT_ARE_EQUAL(int, 0, umock_c_negative_tests_init()); for (i = 0; i < negative_tests_call_count; i++) { // arrange char error_msg[64]; WS_URL_HANDLE ws_url; if (i == 5 || i == 9 || i == 13 || i == 14 || i == 17) { continue; } umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // 5 // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // 9 // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // 13 // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); // 14 STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // 17 umock_c_negative_tests_snapshot(); negative_tests_call_count = umock_c_negative_tests_call_count(); umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act ws_url = ws_url_create(url); // assert sprintf(error_msg, "On failed call %zu", i); ASSERT_IS_NULL(ws_url, error_msg); } // cleanup umock_c_negative_tests_deinit(); } // Tests_SRS_WS_URL_09_004: [ If `url` starts with "ws://" (`protocol`), `ws_url->is_secure` shall be set to false ] TEST_FUNCTION(ws_url_create_ws_port_path_query_Success) { // arrange char* url = "ws://some.url.com:80/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; bool is_secure; const char* host; size_t host_length; size_t port; const char* path; size_t path_length; const char* query; size_t query_length; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 5, strlen(url) - 5, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(ws_url); ASSERT_ARE_EQUAL(int, 0, ws_url_is_secure(ws_url, &is_secure)); ASSERT_IS_FALSE(is_secure); ASSERT_ARE_EQUAL(int, 0, ws_url_get_host(ws_url, &host, &host_length)); ASSERT_ARE_EQUAL(size_t, 12, host_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 5, host, host_length)); ASSERT_ARE_EQUAL(int, 0, ws_url_get_port(ws_url, &port)); ASSERT_ARE_EQUAL(size_t, 80, port); ASSERT_ARE_EQUAL(int, 0, ws_url_get_path(ws_url, &path, &path_length)); ASSERT_ARE_EQUAL(size_t, 37, path_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 21, path, path_length)); ASSERT_ARE_EQUAL(int, 0, ws_url_get_query(ws_url, &query, &query_length)); ASSERT_ARE_EQUAL(size_t, 12, query_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 59, query, query_length)); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_012: [ If after `ws_url->host` or the port number the `path_delimiter` occurs (not preceeded by `query_delimiter`) the following pointer address shall be stored in `ws_url->path` ] TEST_FUNCTION(ws_url_create_wss_path_query_Success) { // arrange char* url = "wss://some.url.com/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; bool is_secure; const char* host; size_t host_length; size_t port; const char* path; size_t path_length; const char* query; size_t query_length; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NOT_NULL(ws_url); ASSERT_ARE_EQUAL(int, 0, ws_url_is_secure(ws_url, &is_secure)); ASSERT_IS_TRUE(is_secure); ASSERT_ARE_EQUAL(int, 0, ws_url_get_host(ws_url, &host, &host_length)); ASSERT_ARE_EQUAL(size_t, 12, host_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 6, host, host_length)); ASSERT_ARE_EQUAL(int, 0, ws_url_get_port(ws_url, &port)); ASSERT_ARE_EQUAL(size_t, 0, port); ASSERT_ARE_EQUAL(int, 0, ws_url_get_path(ws_url, &path, &path_length)); ASSERT_ARE_EQUAL(size_t, 37, path_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 19, path, path_length)); ASSERT_ARE_EQUAL(int, 0, ws_url_get_query(ws_url, &query, &query_length)); ASSERT_ARE_EQUAL(size_t, 12, query_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 57, query, query_length)); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_024: [ If `protocol` cannot be identified in `url`, the function shall fail and return NULL ] TEST_FUNCTION(ws_url_create_unrecognized_protocol) { // arrange char* url = "wws://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ws_url); // cleanup } // Tests_SRS_WS_URL_09_022: [ If `url` is NULL, the function shall return without further action ] TEST_FUNCTION(ws_url_destroy_NULL_handle) { // arrange umock_c_reset_all_calls(); // act ws_url_destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } // Tests_SRS_WS_URL_09_023: [ Otherwise, the memory allocated for `url` shall released ] TEST_FUNCTION(ws_url_destroy_Success) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); ws_url = ws_url_create(url); umock_c_reset_all_calls(); // act ws_url_destroy(ws_url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup } // Tests_SRS_WS_URL_09_020: [ If any component cannot be parsed or is out of order, the function shall fail and return NULL ] TEST_FUNCTION(ws_url_create_url_out_order1) { // arrange char* url = "wss://some.url.com?prop1=value1:443/path/f3548245132826c6cf2fa09694bc6b93"; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ws_url); // cleanup } // Tests_SRS_WS_URL_09_020: [ If any component cannot be parsed or is out of order, the function shall fail and return NULL ] TEST_FUNCTION(ws_url_create_url_out_order2) { // arrange char* url = "wss://some.url.com:443?prop1=value1/path/f3548245132826c6cf2fa09694bc6b93"; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ws_url); // cleanup } // Tests_SRS_WS_URL_09_020: [ If any component cannot be parsed or is out of order, the function shall fail and return NULL ] TEST_FUNCTION(ws_url_create_url_out_order3) { // arrange char* url = "wss://some.url.com?prop1=value1/path/f3548245132826c6cf2fa09694bc6b93:443"; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ws_url); // cleanup } // Tests_SRS_WS_URL_09_020: [ If any component cannot be parsed or is out of order, the function shall fail and return NULL ] TEST_FUNCTION(ws_url_create_url_out_order4) { // arrange char* url = "wss://some.url.com?prop1=value1/path/f3548245132826c6cf2fa09694bc6b93"; WS_URL_HANDLE ws_url; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); // act ws_url = ws_url_create(url); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(ws_url); // cleanup } // Tests_SRS_WS_URL_09_026: [ If `url` is NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_is_NULL_handle) { // arrange int result; bool is_secure; umock_c_reset_all_calls(); // act result = ws_url_is_secure(NULL, &is_secure); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_WS_URL_09_026: [ If `url` is NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_is_NULL_is_secure) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_is_secure(ws_url, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_027: [ Otherwize the function shall set `is_secure` as `url->is_secure` ] // Tests_SRS_WS_URL_09_028: [ If no errors occur function shall return zero (success) ] TEST_FUNCTION(ws_url_is_secure_success) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; bool is_secure; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_is_secure(ws_url, &is_secure); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_IS_TRUE(is_secure); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_038: [ If `url` or `port` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_port_NULL_url) { // arrange int result; size_t port; umock_c_reset_all_calls(); // act result = ws_url_get_port(NULL, &port); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_WS_URL_09_038: [ If `url` or `port` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_port_NULL_port) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_port(ws_url, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_039: [ Otherwize the function shall set `port` as `url->port` ] // Tests_SRS_WS_URL_09_040: [ If no errors occur function shall return zero (success) ] TEST_FUNCTION(ws_url_get_port_success) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; size_t port; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_port(ws_url, &port); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 443, port); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_029: [ If `url` or `host` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_host_NULL_url) { // arrange int result; const char* host; size_t host_length; umock_c_reset_all_calls(); // act result = ws_url_get_host(NULL, &host, &host_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_WS_URL_09_029: [ If `url` or `host` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_host_NULL_host) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; size_t host_length; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_host(ws_url, NULL, &host_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_029: [ If `url` or `host` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_host_NULL_length) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; const char* host; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_host(ws_url, &host, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_030: [ Otherwize the function shall set `host` to `url->host` and `length` to `url->host_length` ] // Tests_SRS_WS_URL_09_031: [ If no errors occur function shall return zero (success) ] TEST_FUNCTION(ws_url_get_host_success) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; const char* host; size_t host_length; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_host(ws_url, &host, &host_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 6, host, host_length)); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_032: [ If `url` or `path` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_path_NULL_url) { // arrange int result; const char* path; size_t path_length; umock_c_reset_all_calls(); // act result = ws_url_get_path(NULL, &path, &path_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_WS_URL_09_032: [ If `url` or `path` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_path_NULL_path) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; size_t path_length; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_path(ws_url, NULL, &path_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_032: [ If `url` or `path` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_path_NULL_length) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; const char* path; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_path(ws_url, &path, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_033: [ Otherwize the function shall set `path` to `url->path` and `length` to `url->path_length` ] // Tests_SRS_WS_URL_09_034: [ If no errors occur function shall return zero (success) ] TEST_FUNCTION(ws_url_get_path_success) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; const char* path; size_t path_length; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_path(ws_url, &path, &path_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 37, path_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 23, path, path_length)); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_035: [ If `url` or `query` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_query_NULL_url) { // arrange int result; const char* query; size_t query_length; umock_c_reset_all_calls(); // act result = ws_url_get_query(NULL, &query, &query_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup } // Tests_SRS_WS_URL_09_035: [ If `url` or `query` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_query_NULL_query) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; size_t query_length; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_query(ws_url, NULL, &query_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_035: [ If `url` or `query` or `length` are NULL, the function shall return a non-zero value (failure) ] TEST_FUNCTION(ws_url_get_query_NULL_length) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; const char* query; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_query(ws_url, &query, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup ws_url_destroy(ws_url); } // Tests_SRS_WS_URL_09_036: [ Otherwize the function shall set `query` to `url->query` and `length` to `url->query_length` ] // Tests_SRS_WS_URL_09_037: [ If no errors occur function shall return zero (success) ] TEST_FUNCTION(ws_url_get_query_success) { // arrange char* url = "wss://some.url.com:443/path/f3548245132826c6cf2fa09694bc6b93?prop1=value1"; WS_URL_HANDLE ws_url; int result; const char* query; size_t query_length; umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(mallocAndStrcpy_s(IGNORED_PTR_ARG, url)); STRICT_EXPECTED_CALL(StringToken_GetFirst(url + 6, strlen(url) - 6, IGNORED_PTR_ARG, 3)); // host STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 3)); // port STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // path STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); // query STRICT_EXPECTED_CALL(StringToken_GetDelimiter(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetValue(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetLength(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(StringToken_GetNext(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(StringToken_Destroy(IGNORED_PTR_ARG)); ws_url = ws_url_create(url); // act result = ws_url_get_query(ws_url, &query, &query_length); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 12, query_length); ASSERT_ARE_EQUAL(int, 0, strncmp(url + 61, query, query_length)); // cleanup ws_url_destroy(ws_url); } END_TEST_SUITE(ws_url_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/wsio_ut/000077500000000000000000000000001362133436400321675ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007521362133436400346540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/wsio_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName wsio_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/wsio.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/wsio_ut/main.c000066400000000000000000000004661362133436400332650ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(wsio_ut, failedTestCount); return failedTestCount; } wsio_ut.c000066400000000000000000003255761362133436400337670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/wsio_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "umocktypes_bool.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/xio.h" #include "azure_c_shared_utility/crt_abstractions.h" #include "azure_c_shared_utility/singlylinkedlist.h" #include "azure_c_shared_utility/optionhandler.h" #include "azure_c_shared_utility/uws_client.h" static const void** list_items = NULL; static size_t list_item_count = 0; static const char* TEST_HOST_ADDRESS = "host_address.com"; static const char* TEST_RESOURCE_NAME = "/test_resource"; static const char* TEST_PROTOCOL = "test_proto"; static const SINGLYLINKEDLIST_HANDLE TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE = (SINGLYLINKEDLIST_HANDLE)0x4242; static const LIST_ITEM_HANDLE TEST_LIST_ITEM_HANDLE = (LIST_ITEM_HANDLE)0x11; static const UWS_CLIENT_HANDLE TEST_UWS_HANDLE = (UWS_CLIENT_HANDLE)0x4243; static const XIO_HANDLE TEST_UNDERLYING_IO_HANDLE = (XIO_HANDLE)0x4244; static const OPTIONHANDLER_HANDLE TEST_OPTIONHANDLER_HANDLE = (OPTIONHANDLER_HANDLE)0x4246; static const OPTIONHANDLER_HANDLE TEST_UWS_CLIENT_OPTIONHANDLER_HANDLE = (OPTIONHANDLER_HANDLE)0x4247; static void* TEST_UNDERLYING_IO_PARAMETERS = (void*)0x4248; static const IO_INTERFACE_DESCRIPTION* TEST_UNDERLYING_IO_INTERFACE = (const IO_INTERFACE_DESCRIPTION*)0x4249; IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(WS_OPEN_RESULT, WS_OPEN_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(IO_SEND_RESULT, IO_SEND_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(WS_SEND_FRAME_RESULT, WS_SEND_FRAME_RESULT_VALUES); IMPLEMENT_UMOCK_C_ENUM_TYPE(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT_VALUES); static size_t currentmalloc_call; static size_t whenShallmalloc_fail; static void* my_gballoc_malloc(size_t size) { void* result; currentmalloc_call++; if (whenShallmalloc_fail > 0) { if (currentmalloc_call == whenShallmalloc_fail) { result = NULL; } else { result = malloc(size); } } else { result = malloc(size); } return result; } static void my_gballoc_free(void* ptr) { free(ptr); } static LIST_ITEM_HANDLE add_to_list(const void* item) { const void** items = (const void**)realloc((void*)list_items, (list_item_count + 1) * sizeof(item)); if (items != NULL) { list_items = items; list_items[list_item_count++] = item; } return (LIST_ITEM_HANDLE)list_item_count; } static int singlylinkedlist_remove_result; static int my_singlylinkedlist_remove(SINGLYLINKEDLIST_HANDLE list, LIST_ITEM_HANDLE item) { size_t index = (size_t)item - 1; (void)list; (void)memmove((void*)&list_items[index], &list_items[index + 1], sizeof(const void*) * (list_item_count - index - 1)); list_item_count--; if (list_item_count == 0) { free((void*)list_items); list_items = NULL; } return singlylinkedlist_remove_result; } static LIST_ITEM_HANDLE my_singlylinkedlist_get_head_item(SINGLYLINKEDLIST_HANDLE list) { LIST_ITEM_HANDLE list_item_handle = NULL; (void)list; if (list_item_count > 0) { list_item_handle = (LIST_ITEM_HANDLE)1; } else { list_item_handle = NULL; } return list_item_handle; } static LIST_ITEM_HANDLE my_singlylinkedlist_add(SINGLYLINKEDLIST_HANDLE list, const void* item) { (void)list; return add_to_list(item); } static const void* my_singlylinkedlist_item_get_value(LIST_ITEM_HANDLE item_handle) { return (const void*)list_items[(size_t)item_handle - 1]; } static LIST_ITEM_HANDLE my_singlylinkedlist_find(SINGLYLINKEDLIST_HANDLE handle, LIST_MATCH_FUNCTION match_function, const void* match_context) { size_t i; const void* found_item = NULL; (void)handle; for (i = 0; i < list_item_count; i++) { if (match_function((LIST_ITEM_HANDLE)list_items[i], match_context)) { found_item = list_items[i]; break; } } return (LIST_ITEM_HANDLE)found_item; } int my_mallocAndStrcpy_s(char** destination, const char* source) { *destination = (char*)malloc(strlen(source) + 1); (void)strcpy(*destination, source); return 0; } static pfCloneOption g_clone_option; static pfDestroyOption g_destroy_option; static pfSetOption g_set_option; static OPTIONHANDLER_HANDLE my_OptionHandler_Create(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { g_clone_option = cloneOption; g_destroy_option = destroyOption; g_set_option = setOption; return TEST_OPTIONHANDLER_HANDLE; } #include "azure_c_shared_utility/gballoc.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/wsio.h" // consumer mocks MOCK_FUNCTION_WITH_CODE(, void, test_on_io_open_complete, void*, context, IO_OPEN_RESULT, io_open_result); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_bytes_received, void*, context, const unsigned char*, buffer, size_t, size); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_io_error, void*, context); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_io_close_complete, void*, context); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, test_on_send_complete, void*, context, IO_SEND_RESULT, send_result) MOCK_FUNCTION_END() static ON_WS_OPEN_COMPLETE g_on_ws_open_complete; static void* g_on_ws_open_complete_context; static ON_WS_SEND_FRAME_COMPLETE g_on_ws_send_frame_complete; static void* g_on_ws_send_frame_complete_context; static ON_WS_FRAME_RECEIVED g_on_ws_frame_received; static void* g_on_ws_frame_received_context; static ON_WS_PEER_CLOSED g_on_ws_peer_closed; static void* g_on_ws_peer_closed_context; static ON_WS_ERROR g_on_ws_error; static void* g_on_ws_error_context; static ON_WS_CLOSE_COMPLETE g_on_ws_close_complete; static void* g_on_ws_close_complete_context; static int my_uws_open_async(UWS_CLIENT_HANDLE uws, ON_WS_OPEN_COMPLETE on_ws_open_complete, void* on_ws_open_complete_context, ON_WS_FRAME_RECEIVED on_ws_frame_received, void* on_ws_frame_received_context, ON_WS_PEER_CLOSED on_ws_peer_closed, void* on_ws_peer_closed_context, ON_WS_ERROR on_ws_error, void* on_ws_error_context) { (void)uws; g_on_ws_open_complete = on_ws_open_complete; g_on_ws_open_complete_context = on_ws_open_complete_context; g_on_ws_frame_received = on_ws_frame_received; g_on_ws_frame_received_context = on_ws_frame_received_context; g_on_ws_peer_closed = on_ws_peer_closed; g_on_ws_peer_closed_context = on_ws_peer_closed_context; g_on_ws_error = on_ws_error; g_on_ws_error_context = on_ws_error_context; return 0; } static int my_uws_close_async(UWS_CLIENT_HANDLE uws, ON_WS_CLOSE_COMPLETE on_ws_close_complete, void* on_ws_close_complete_context) { (void)uws; g_on_ws_close_complete = on_ws_close_complete; g_on_ws_close_complete_context = on_ws_close_complete_context; return 0; } static int my_uws_send_frame_async(UWS_CLIENT_HANDLE uws, unsigned char frame_type, const unsigned char* buffer, size_t size, bool is_final, ON_WS_SEND_FRAME_COMPLETE on_ws_send_frame_complete, void* on_ws_send_frame_complete_context) { (void)uws; (void)buffer; (void)size; (void)is_final; (void)frame_type; g_on_ws_send_frame_complete = on_ws_send_frame_complete; g_on_ws_send_frame_complete_context = on_ws_send_frame_complete_context; return 0; } static WSIO_CONFIG default_wsio_config; static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } BEGIN_TEST_SUITE(wsio_ut) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_bool_register_types(); ASSERT_ARE_EQUAL(int, 0, result); default_wsio_config.hostname = TEST_HOST_ADDRESS; default_wsio_config.port = 443; default_wsio_config.resource_name = TEST_RESOURCE_NAME; default_wsio_config.protocol = TEST_PROTOCOL; default_wsio_config.underlying_io_interface = TEST_UNDERLYING_IO_INTERFACE; default_wsio_config.underlying_io_parameters = TEST_UNDERLYING_IO_PARAMETERS; REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_RETURN(singlylinkedlist_create, TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_remove, my_singlylinkedlist_remove); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_get_head_item, my_singlylinkedlist_get_head_item); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_add, my_singlylinkedlist_add); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_item_get_value, my_singlylinkedlist_item_get_value); REGISTER_GLOBAL_MOCK_HOOK(singlylinkedlist_find, my_singlylinkedlist_find); REGISTER_GLOBAL_MOCK_HOOK(mallocAndStrcpy_s, my_mallocAndStrcpy_s); REGISTER_GLOBAL_MOCK_HOOK(uws_client_open_async, my_uws_open_async); REGISTER_GLOBAL_MOCK_HOOK(uws_client_close_async, my_uws_close_async); REGISTER_GLOBAL_MOCK_HOOK(uws_client_send_frame_async, my_uws_send_frame_async); REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_Create, my_OptionHandler_Create); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_FeedOptions, OPTIONHANDLER_OK); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_AddOption, OPTIONHANDLER_OK); REGISTER_GLOBAL_MOCK_RETURN(OptionHandler_Clone, TEST_OPTIONHANDLER_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(uws_client_create_with_io, TEST_UWS_HANDLE); REGISTER_GLOBAL_MOCK_RETURN(uws_client_retrieve_options, TEST_UWS_CLIENT_OPTIONHANDLER_HANDLE); REGISTER_TYPE(IO_OPEN_RESULT, IO_OPEN_RESULT); REGISTER_TYPE(IO_SEND_RESULT, IO_SEND_RESULT); REGISTER_TYPE(OPTIONHANDLER_RESULT, OPTIONHANDLER_RESULT); REGISTER_UMOCK_ALIAS_TYPE(SINGLYLINKEDLIST_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(LIST_ITEM_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(XIO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(UWS_CLIENT_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_WS_OPEN_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_WS_FRAME_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_WS_ERROR, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_WS_CLOSE_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_WS_SEND_FRAME_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(OPTIONHANDLER_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_WS_PEER_CLOSED, void*); REGISTER_UMOCK_ALIAS_TYPE(pfCloneOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfSetOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfDestroyOption, void*); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } umock_c_reset_all_calls(); currentmalloc_call = 0; whenShallmalloc_fail = 0; singlylinkedlist_remove_result = 0; } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* wsio_create */ /* Tests_SRS_WSIO_01_001: [`wsio_create` shall create an instance of wsio and return a non-NULL handle to it.]*/ /* Tests_SRS_WSIO_01_066: [ `io_create_parameters` shall be used as a `WSIO_CONFIG*` . ]*/ /* Tests_SRS_WSIO_01_070: [ The underlying uws instance shall be created by calling `uws_client_create_with_io`. ]*/ /* Tests_SRS_WSIO_01_071: [ The arguments for `uws_client_create_with_io` shall be: ]*/ /* Tests_SRS_WSIO_01_185: [ - `underlying_io_interface` shall be set to the `underlying_io_interface` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_186: [ - `underlying_io_parameters` shall be set to the `underlying_io_parameters` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_072: [ - `hostname` set to the `hostname` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_130: [ - `port` set to the `port` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_128: [ - `resource_name` set to the `resource_name` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_129: [ - `protocols` shall be filled with only one structure, that shall have the `protocol` set to the value of the `protocol` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_076: [ `wsio_create` shall create a pending send IO list that is to be used to queue send packets by calling `singlylinkedlist_create`. ]*/ TEST_FUNCTION(wsio_create_for_secure_connection_with_valid_args_succeeds) { // arrange CONCRETE_IO_HANDLE wsio; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_client_create_with_io(TEST_UNDERLYING_IO_INTERFACE, TEST_UNDERLYING_IO_PARAMETERS, TEST_HOST_ADDRESS, 443, TEST_RESOURCE_NAME, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); // act wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); // assert ASSERT_IS_NOT_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_065: [ If the argument `io_create_parameters` is NULL then `wsio_create` shall return NULL. ]*/ TEST_FUNCTION(wsio_create_with_NULL_create_arguments_fails) { // arrange // act CONCRETE_IO_HANDLE wsio = wsio_get_interface_description()->concrete_io_create(NULL); // assert ASSERT_IS_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_067: [ If any of the members `hostname`, `resource_name` or `protocol` is NULL in `WSIO_CONFIG` then `wsio_create` shall return NULL. ]*/ TEST_FUNCTION(wsio_create_with_NULL_hostname_field_fails) { // arrange WSIO_CONFIG wsio_config; CONCRETE_IO_HANDLE wsio; wsio_config.hostname = NULL; wsio_config.port = 443; wsio_config.resource_name = TEST_RESOURCE_NAME; wsio_config.protocol = TEST_PROTOCOL; wsio_config.underlying_io_interface = NULL; wsio_config.underlying_io_parameters = NULL; // act wsio = wsio_get_interface_description()->concrete_io_create(&wsio_config); // assert ASSERT_IS_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_067: [ If any of the members `hostname`, `resource_name` or `protocol` is NULL in `WSIO_CONFIG` then `wsio_create` shall return NULL. ]*/ TEST_FUNCTION(wsio_create_with_NULL_resource_name_field_fails) { // arrange CONCRETE_IO_HANDLE wsio; WSIO_CONFIG wsio_config; wsio_config.hostname = TEST_HOST_ADDRESS; wsio_config.port = 443; wsio_config.resource_name = NULL; wsio_config.protocol = TEST_PROTOCOL; wsio_config.underlying_io_interface = NULL; wsio_config.underlying_io_parameters = NULL; // act wsio = wsio_get_interface_description()->concrete_io_create(&wsio_config); // assert ASSERT_IS_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_067: [ If any of the members `hostname`, `resource_name` or `protocol` is NULL in `WSIO_CONFIG` then `wsio_create` shall return NULL. ]*/ TEST_FUNCTION(wsio_create_with_NULL_protocol_field_fails) { // arrange WSIO_CONFIG wsio_config; CONCRETE_IO_HANDLE wsio; wsio_config.hostname = TEST_HOST_ADDRESS; wsio_config.port = 443; wsio_config.resource_name = TEST_RESOURCE_NAME; wsio_config.protocol = NULL; wsio_config.underlying_io_interface = NULL; wsio_config.underlying_io_parameters = NULL; // act wsio = wsio_get_interface_description()->concrete_io_create(&wsio_config); // assert ASSERT_IS_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_068: [ If allocating memory for the new wsio instance fails then `wsio_create` shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_wsio_create_fails) { // arrange CONCRETE_IO_HANDLE wsio; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); // act wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); // assert ASSERT_IS_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_075: [ If `uws_client_create_with_io` fails, then `wsio_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_uws_create_fails_then_wsio_create_fails) { // arrange CONCRETE_IO_HANDLE wsio; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_client_create_with_io(TEST_UNDERLYING_IO_INTERFACE, TEST_UNDERLYING_IO_PARAMETERS, TEST_HOST_ADDRESS, 443, TEST_RESOURCE_NAME, IGNORED_PTR_ARG, 1)) .SetReturn(NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); // assert ASSERT_IS_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_077: [ If `singlylinkedlist_create` fails then `wsio_create` shall fail and return NULL. ]*/ TEST_FUNCTION(when_singlylinkedlist_create_fails_then_wsio_create_fails) { // arrange CONCRETE_IO_HANDLE wsio; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_client_create_with_io(TEST_UNDERLYING_IO_INTERFACE, TEST_UNDERLYING_IO_PARAMETERS, TEST_HOST_ADDRESS, 443, TEST_RESOURCE_NAME, IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(singlylinkedlist_create()) .SetReturn(NULL); STRICT_EXPECTED_CALL(uws_client_destroy(TEST_UWS_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); // assert ASSERT_IS_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_071: [ The arguments for `uws_client_create_with_io` shall be: ]*/ /* Tests_SRS_WSIO_01_185: [ - `underlying_io_interface` shall be set to the `underlying_io_interface` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_186: [ - `underlying_io_parameters` shall be set to the `underlying_io_parameters` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_072: [ - `hostname` set to the `hostname` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_130: [ - `port` set to the `port` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_128: [ - `resource_name` set to the `resource_name` field in the `io_create_parameters` passed to `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_129: [ - `protocols` shall be filled with only one structure, that shall have the `protocol` set to the value of the `protocol` field in the `io_create_parameters` passed to `wsio_create`. ]*/ TEST_FUNCTION(wsio_create_for_secure_connection_with_valid_args_succeeds_2) { // arrange WSIO_CONFIG wsio_config; CONCRETE_IO_HANDLE wsio; wsio_config.hostname = "another.com"; wsio_config.port = 80; wsio_config.resource_name = "haga"; wsio_config.protocol = "LeProtocol"; wsio_config.underlying_io_interface = TEST_UNDERLYING_IO_INTERFACE; wsio_config.underlying_io_parameters = NULL; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(uws_client_create_with_io(TEST_UNDERLYING_IO_INTERFACE, NULL, "another.com", 80, "haga", IGNORED_PTR_ARG, 1)); STRICT_EXPECTED_CALL(singlylinkedlist_create()); // act wsio = wsio_get_interface_description()->concrete_io_create(&wsio_config); // assert ASSERT_IS_NOT_NULL(wsio); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_destroy */ /* Tests_SRS_WSIO_01_078: [ `wsio_destroy` shall free all resources associated with the wsio instance. ]*/ /* Tests_SRS_WSIO_01_080: [ `wsio_destroy` shall destroy the uws instance created in `wsio_create` by calling `uws_client_destroy`. ]*/ /* Tests_SRS_WSIO_01_081: [ `wsio_destroy` shall free the list used to track the pending send IOs by calling `singlylinkedlist_destroy`. ]*/ TEST_FUNCTION(wsio_destroy_frees_all_resources) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_destroy(TEST_UWS_HANDLE)); STRICT_EXPECTED_CALL(singlylinkedlist_destroy(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act wsio_get_interface_description()->concrete_io_destroy(wsio); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_079: [ If `ws_io` is NULL, `wsio_destroy` shall do nothing. ]*/ TEST_FUNCTION(wsio_destroy_with_NULL_does_nothing) { // arrange // act wsio_get_interface_description()->concrete_io_destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* wsio_open */ /* Tests_SRS_WSIO_01_082: [ `wsio_open` shall open the underlying uws instance by calling `uws_client_open_async` and providing the uws handle created in `wsio_create` as argument. ]*/ /* Tests_SRS_WSIO_01_083: [ On success, `wsio_open` shall return 0. ]*/ TEST_FUNCTION(wsio_open_opens_the_underlying_uws_instance) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_open_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // act result = wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_084: [ If opening the underlying uws instance fails then `wsio_open` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_opening_the_uws_instance_fails_wsio_open_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_open_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(1); // act result = wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_131: [ `wsio_open` when already OPEN or OPENING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_open_when_already_opening_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_131: [ `wsio_open` when already OPEN or OPENING shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_open_when_already_open_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_132: [ If any of the arguments `ws_io`, `on_io_open_complete`, `on_bytes_received`, `on_io_error` is NULL, `wsio_open` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_open_with_NULL_handle_fails) { // arrange int result; // act result = wsio_get_interface_description()->concrete_io_open(NULL, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_132: [ If any of the arguments `ws_io`, `on_io_open_complete`, `on_bytes_received`, `on_io_error` is NULL, `wsio_open` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_open_with_NULL_on_open_complete_callback_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_open(wsio, NULL, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_132: [ If any of the arguments `ws_io`, `on_io_open_complete`, `on_bytes_received`, `on_io_error` is NULL, `wsio_open` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_open_with_NULL_on_bytes_received_callback_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, NULL, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_132: [ If any of the arguments `ws_io`, `on_io_open_complete`, `on_bytes_received`, `on_io_error` is NULL, `wsio_open` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_open_with_NULL_on_io_error_callback_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, NULL, (void*)0x4244); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_082: [ `wsio_open` shall open the underlying uws instance by calling `uws_client_open_async` and providing the uws handle created in `wsio_create` as argument. ]*/ /* Tests_SRS_WSIO_01_083: [ On success, `wsio_open` shall return 0. ]*/ TEST_FUNCTION(wsio_open_after_close_succeeds) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); g_on_ws_close_complete(g_on_ws_close_complete_context); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_open_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // act result = wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_close */ /* Tests_SRS_WSIO_01_085: [ `wsio_close` shall close the websockets IO if an open action is either pending or has completed successfully (if the IO is open). ]*/ /* Tests_SRS_WSIO_01_133: [ On success `wsio_close` shall return 0. ]*/ /* Tests_SRS_WSIO_01_091: [ `wsio_close` shall obtain all the pending IO items by repetitively querying for the head of the pending IO list and freeing that head item. ]*/ /* Tests_SRS_WSIO_01_087: [ `wsio_close` shall call `uws_client_close_async` while passing as argument the IO handle created in `wsio_create`. ]*/ /* Tests_SRS_WSIO_01_092: [ Obtaining the head of the pending IO list shall be done by calling `singlylinkedlist_get_head_item`. ]*/ /* Tests_SRS_WSIO_01_094: [ The callback context passed to the `on_send_complete` callback shall be the context given to `wsio_send`. ]*/ TEST_FUNCTION(wsio_close_when_IO_is_open_closes_the_uws) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_close_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_086: [ if `ws_io` is NULL, `wsio_close` shall return a non-zero value. ]*/ TEST_FUNCTION(wsio_close_with_NULL_handle_fails) { // arrange int result; // act result = wsio_get_interface_description()->concrete_io_close(NULL, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_088: [ `wsio_close` when no open action has been issued shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_IO_is_not_open_wsio_close_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_089: [ `wsio_close` after a `wsio_close` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_close_after_wsio_close_completed_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); g_on_ws_close_complete(g_on_ws_close_complete_context); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_089: [ `wsio_close` after a `wsio_close` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_close_after_wsio_close_and_in_closing_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_164: [ When `uws_client_close` fails, `wsio_close` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_uws_close_fails_then_wsio_close_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_close_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_090: [ The argument `on_io_close_complete` shall be optional, if NULL is passed by the caller then no close complete callback shall be triggered. ]*/ TEST_FUNCTION(wsio_close_with_NULL_close_complete_callback_succeeds) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_close_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_close(wsio, NULL, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_093: [ For each pending item the send complete callback shall be called with `IO_SEND_CANCELLED`.]*/ TEST_FUNCTION(wsio_close_indicates_a_pending_send_as_CANCELLED) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_close_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4343, IO_SEND_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_close(wsio, NULL, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_093: [ For each pending item the send complete callback shall be called with `IO_SEND_CANCELLED`.]*/ TEST_FUNCTION(wsio_close_indicates_2_pending_sends_as_CANCELLED) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); (void)wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_close_async(TEST_UWS_HANDLE, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4343, IO_SEND_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4343, IO_SEND_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_get_head_item(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_close(wsio, NULL, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_send */ /* Tests_SRS_WSIO_01_095: [ `wsio_send` shall call `uws_client_send_frame_async`, passing the `buffer` and `size` arguments as they are: ]*/ /* Tests_SRS_WSIO_01_097: [ The `is_final` argument shall be set to true. ]*/ /* Tests_SRS_WSIO_01_098: [ On success, `wsio_send` shall return 0. ]*/ /* Tests_SRS_WSIO_01_102: [ An entry shall be queued in the singly linked list by calling `singlylinkedlist_add`. ]*/ /* Tests_SRS_WSIO_01_103: [ The entry shall contain the `on_send_complete` callback and its context. ]*/ /* Tests_SRS_WSIO_01_096: [ The frame type used shall be `WS_FRAME_TYPE_BINARY`. ]*/ TEST_FUNCTION(wsio_send_with_1_byte_calls_uws_send_frame) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(uws_client_send_frame_async(TEST_UWS_HANDLE, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, sizeof(test_buffer), true, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .ValidateArgumentBuffer(3, test_buffer, sizeof(test_buffer)); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_099: [ If the wsio is not OPEN (open has not been called or is still in progress) then `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_send_when_not_open_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_099: [ If the wsio is not OPEN (open has not been called or is still in progress) then `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_send_when_opening_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_099: [ If the wsio is not OPEN (open has not been called or is still in progress) then `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_send_after_io_is_closed_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_100: [ If any of the arguments `ws_io` or `buffer` are NULL, `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_send_with_NULL_wsio_fails) { // arrange int result; unsigned char test_buffer[] = { 42 }; // act result = wsio_get_interface_description()->concrete_io_send(NULL, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_100: [ If any of the arguments `ws_io` or `buffer` are NULL, `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_send_with_NULL_buffer_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_send(wsio, NULL, 1, test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_101: [ If `size` is zero then `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(wsio_send_with_zero_size_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, 0, test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_134: [ If allocating memory for the pending IO data fails, `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_pending_send_fails_wsio_send_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn(NULL); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_104: [ If `singlylinkedlist_add` fails, `wsio_send` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_adding_the_pending_item_to_the_list_fails_wsio_send_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)) .SetReturn(NULL); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_105: [ The argument `on_send_complete` shall be optional, if NULL is passed by the caller then no send complete callback shall be triggered. ]*/ TEST_FUNCTION(wsio_send_with_NULL_send_complete_callback_succeeds) { // arrange CONCRETE_IO_HANDLE wsio; int result; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_add(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(uws_client_send_frame_async(TEST_UWS_HANDLE, WS_FRAME_TYPE_BINARY, IGNORED_PTR_ARG, sizeof(test_buffer), true, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .ValidateArgumentBuffer(3, test_buffer, sizeof(test_buffer)); // act result = wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), NULL, (void*)0x4343); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_dowork */ /* Tests_SRS_WSIO_01_106: [ `wsio_dowork` shall call `uws_client_dowork` with the uws handle created in `wsio_create`. ]*/ TEST_FUNCTION(wsio_dowork_calls_the_underlying_uws_dowork) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_dowork(TEST_UWS_HANDLE)); // act wsio_get_interface_description()->concrete_io_dowork(wsio); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_107: [ If the `ws_io` argument is NULL, `wsio_dowork` shall do nothing. ]*/ TEST_FUNCTION(wsio_dowork_with_NULL_handle_does_nothing) { // arrange // act wsio_get_interface_description()->concrete_io_dowork(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_108: [ If the IO is not yet open, `wsio_dowork` shall do nothing. ]*/ TEST_FUNCTION(wsio_dowork_when_not_open_dows_nothing) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); // act wsio_get_interface_description()->concrete_io_dowork(wsio); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_108: [ If the IO is not yet open, `wsio_dowork` shall do nothing. ]*/ TEST_FUNCTION(wsio_dowork_when_opening_calls_uws_dowork) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_dowork(TEST_UWS_HANDLE)); // act wsio_get_interface_description()->concrete_io_dowork(wsio); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_108: [ If the IO is not yet open, `wsio_dowork` shall do nothing. ]*/ TEST_FUNCTION(wsio_dowork_after_close_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); g_on_ws_close_complete(g_on_ws_close_complete_context); umock_c_reset_all_calls(); // act wsio_get_interface_description()->concrete_io_dowork(wsio); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_108: [ If the IO is not yet open, `wsio_dowork` shall do nothing. ]*/ TEST_FUNCTION(wsio_dowork_in_closing_calls_uws_do_work) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act wsio_get_interface_description()->concrete_io_dowork(wsio); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* on_ws_error */ /* Tests_SRS_WSIO_01_121: [ When `on_underlying_ws_error` is called while the IO is OPEN the wsio instance shall be set to ERROR and an error shall be indicated via the `on_io_error` callback passed to `wsio_open`. ]*/ /* Tests_SRS_WSIO_01_123: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ TEST_FUNCTION(when_on_underlying_ws_error_is_called_in_open_the_error_is_reported_up) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_error(g_on_ws_error_context, WS_ERROR_BAD_FRAME_RECEIVED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_135: [ When `on_underlying_ws_error` is called with a NULL context, it shall do nothing. ]*/ TEST_FUNCTION(when_on_underlying_ws_error_with_NULL_context_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); // act g_on_ws_error(NULL, WS_ERROR_BAD_FRAME_RECEIVED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_122: [ When `on_underlying_ws_error` is called while the IO is OPENING, the `on_io_open_complete` callback passed to `wsio_open` shall be called with `IO_OPEN_ERROR`. ]*/ TEST_FUNCTION(when_on_underlying_ws_error_is_called_while_OPENING_calls_open_complete_with_ERROR) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_ws_error(g_on_ws_error_context, WS_ERROR_BAD_FRAME_RECEIVED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* on_underlying_ws_open_complete */ /* Tests_SRS_WSIO_01_136: [ When `on_underlying_ws_open_complete` is called with `WS_OPEN_OK` while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_OK`. ]*/ TEST_FUNCTION(when_on_underlying_ws_open_complete_is_called_with_OK_while_OPENING_the_io_open_complete_callback_is_called_with_OPEN_OK) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_OK)); // act g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_149: [ When `on_underlying_ws_open_complete` is called with `WS_OPEN_CANCELLED` while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_CANCELLED`. ]*/ TEST_FUNCTION(when_on_underlying_ws_open_complete_is_called_with_CANCELLED_while_OPENING_the_io_open_complete_callback_is_called_with_OPEN_CANCELLED) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_CANCELLED)); // act g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_CANCELLED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_137: [ When `on_underlying_ws_open_complete` is called with any other error code while the IO is opening, the callback `on_io_open_complete` shall be called with `IO_OPEN_ERROR`. ]*/ TEST_FUNCTION(when_on_underlying_ws_open_complete_is_called_with_an_error_while_OPENING_the_io_open_complete_callback_is_called_with_OPEN_ERROR) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_138: [ When `on_underlying_ws_open_complete` is called with a NULL context, it shall do nothing. ]*/ TEST_FUNCTION(on_underlying_ws_open_complete_with_NULL_context_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); // act g_on_ws_open_complete(NULL, WS_OPEN_ERROR_CANNOT_SEND_UPGRADE_REQUEST); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_139: [ When `on_underlying_ws_open_complete` is called while in OPEN state it shall indicate an error by calling the `on_io_error` callback passed to `wsio_open` and switch to the ERROR state. ]*/ /* Tests_SRS_WSIO_01_140: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ TEST_FUNCTION(when_on_underlying_ws_open_complete_is_called_when_already_OPEN_an_error_is_indicated) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_141: [ When `on_underlying_ws_open_complete` is called while in the ERROR state it shall indicate an error by calling the `on_io_error` callback passed to `wsio_open`. ]*/ /* Tests_SRS_WSIO_01_140: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ TEST_FUNCTION(when_on_underlying_ws_open_complete_is_called_when_in_ERROR_an_error_is_indicated) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_142: [ When `on_underlying_ws_open_complete` is called while in the CLOSING state an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ TEST_FUNCTION(when_on_underlying_ws_open_complete_is_called_when_CLOSING_it_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* on_ws_frame_received */ /* Tests_SRS_WSIO_01_124: [ When `on_underlying_ws_frame_received` is called the bytes in the frame shall be indicated by calling the `on_bytes_received` callback passed to `wsio_open`. ]*/ /* Tests_SRS_WSIO_01_125: [ When calling `on_bytes_received`, the `on_bytes_received_context` argument given in `wsio_open` shall be passed to the callback `on_bytes_received`. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_is_called_the_frame_content_is_indicated_up) { // arrange CONCRETE_IO_HANDLE wsio; const unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_bytes_received((void*)0x4243, IGNORED_PTR_ARG, sizeof(test_buffer))) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)); // act g_on_ws_frame_received(g_on_ws_frame_received_context, WS_FRAME_TYPE_BINARY, test_buffer, sizeof(test_buffer)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_125: [ When calling `on_bytes_received`, the `on_bytes_received_context` argument given in `wsio_open` shall be passed to the callback `on_bytes_received`. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_is_called_the_frame_content_is_indicated_up_with_the_proper_context) { // arrange CONCRETE_IO_HANDLE wsio; const unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, NULL, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_bytes_received(NULL, IGNORED_PTR_ARG, sizeof(test_buffer))) .ValidateArgumentBuffer(2, test_buffer, sizeof(test_buffer)); // act g_on_ws_frame_received(g_on_ws_frame_received_context, WS_FRAME_TYPE_BINARY, test_buffer, sizeof(test_buffer)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_126: [ If `on_underlying_ws_frame_received` is called while the IO is in any state other than OPEN, it shall do nothing. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_is_called_while_opening_it_shall_do_nothing) { // arrange CONCRETE_IO_HANDLE wsio; const unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, NULL, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); // act g_on_ws_frame_received(g_on_ws_frame_received_context, WS_FRAME_TYPE_BINARY, test_buffer, sizeof(test_buffer)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_126: [ If `on_underlying_ws_frame_received` is called while the IO is in any state other than OPEN, it shall do nothing. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_is_called_while_closing_it_shall_do_nothing) { // arrange CONCRETE_IO_HANDLE wsio; const unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, NULL, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act g_on_ws_frame_received(g_on_ws_frame_received_context, WS_FRAME_TYPE_BINARY, test_buffer, sizeof(test_buffer)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_150: [ If `on_underlying_ws_frame_received` is called with NULL context it shall do nothing. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_with_NULL_context_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; const unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, NULL, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); // act g_on_ws_frame_received(NULL, WS_FRAME_TYPE_BINARY, test_buffer, sizeof(test_buffer)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_151: [ If the WebSocket frame type is not binary then an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ /* Tests_SRS_WSIO_01_152: [ When calling `on_io_error`, the `on_io_error_context` argument given in `wsio_open` shall be passed to the callback `on_io_error`. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_is_called_with_a_text_frame_an_error_is_indicated) { // arrange CONCRETE_IO_HANDLE wsio; const unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, NULL, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_frame_received(g_on_ws_frame_received_context, WS_FRAME_TYPE_TEXT, test_buffer, sizeof(test_buffer)); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_153: [ When `on_underlying_ws_frame_received` is called with zero `size`, no bytes shall be indicated up as received. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_is_called_with_zero_bytes_no_bytes_are_reported_as_received) { // arrange CONCRETE_IO_HANDLE wsio; const unsigned char test_buffer[] = { 0x42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, NULL, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); // act g_on_ws_frame_received(g_on_ws_frame_received_context, WS_FRAME_TYPE_BINARY, test_buffer, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_154: [ When `on_underlying_ws_frame_received` is called with a positive `size` and a NULL `buffer`, an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ TEST_FUNCTION(when_on_underlying_ws_frame_received_is_called_with_positive_size_and_NULL_buffer_an_error_is_indicated) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, NULL, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_frame_received(g_on_ws_frame_received_context, WS_FRAME_TYPE_BINARY, NULL, 1); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* on_underlying_ws_send_frame_complete */ /* Tests_SRS_WSIO_01_143: [ When `on_underlying_ws_send_frame_complete` is called after sending a WebSocket frame, the pending IO shall be removed from the list. ]*/ /* Tests_SRS_WSIO_01_145: [ Removing it from the list shall be done by calling `singlylinkedlist_remove`. ]*/ /* Tests_SRS_WSIO_01_144: [ Also the pending IO data shall be freed. ]*/ /* Tests_SRS_WSIO_01_146: [ When `on_underlying_ws_send_frame_complete` is called with `WS_SEND_OK`, the callback `on_send_complete` shall be called with `IO_SEND_OK`. ]*/ TEST_FUNCTION(wsio_send_with_1_byte_completed_indicates_the_completion_up) { // arrange CONCRETE_IO_HANDLE wsio; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4343, IO_SEND_OK)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_ws_send_frame_complete(g_on_ws_send_frame_complete_context, WS_SEND_FRAME_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_147: [ When `on_underlying_ws_send_frame_complete` is called with `WS_SEND_CANCELLED`, the callback `on_send_complete` shall be called with `IO_SEND_CANCELLED`. ]*/ TEST_FUNCTION(wsio_send_with_1_byte_completed_with_CANCELLED_indicates_the_completion_up_as_CANCELLED) { // arrange CONCRETE_IO_HANDLE wsio; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4343, IO_SEND_CANCELLED)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_ws_send_frame_complete(g_on_ws_send_frame_complete_context, WS_SEND_FRAME_CANCELLED); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_148: [ When `on_underlying_ws_send_frame_complete` is called with any other error code, the callback `on_send_complete` shall be called with `IO_SEND_ERROR`. ]*/ TEST_FUNCTION(wsio_send_with_1_byte_completed_with_ERROR_indicates_the_completion_up_as_ERROR) { // arrange CONCRETE_IO_HANDLE wsio; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); umock_c_reset_all_calls(); EXPECTED_CALL(singlylinkedlist_item_get_value(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(singlylinkedlist_remove(TEST_SINGLYLINKEDSINGLYLINKEDLIST_HANDLE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(test_on_send_complete((void*)0x4343, IO_SEND_ERROR)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act g_on_ws_send_frame_complete(g_on_ws_send_frame_complete_context, WS_SEND_FRAME_ERROR); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_155: [ When `on_underlying_ws_send_frame_complete` is called with a NULL context it shall do nothing. ]*/ TEST_FUNCTION(on_underlying_ws_send_frame_complete_with_NULL_context_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; unsigned char test_buffer[] = { 42 }; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_send(wsio, test_buffer, sizeof(test_buffer), test_on_send_complete, (void*)0x4343); umock_c_reset_all_calls(); // act g_on_ws_send_frame_complete(NULL, WS_SEND_FRAME_OK); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_setoption */ /* Tests_SRS_WSIO_01_109: [ If any of the arguments `ws_io` or `option_name` is NULL `wsio_setoption` shall return a non-zero value. ]*/ TEST_FUNCTION(wsio_setoption_with_NULL_handle_fails) { // arrange int result; // act result = wsio_get_interface_description()->concrete_io_setoption(NULL, "option1", (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_109: [ If any of the arguments `ws_io` or `option_name` is NULL `wsio_setoption` shall return a non-zero value. ]*/ TEST_FUNCTION(wsio_setoption_with_NULL_option_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); // act result = wsio_get_interface_description()->concrete_io_setoption(wsio, NULL, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_183: [ If the option name is `WSIOOptions` then `wsio_setoption` shall call `OptionHandler_FeedOptions` and pass to it the underlying IO handle and the `value` argument. ]*/ /* Tests_SRS_WSIO_01_158: [ On success, `wsio_setoption` shall return 0. ]*/ TEST_FUNCTION(wsio_setoption_with_WSIOOptions_feeds_the_options_to_the_underlying_layer) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(OptionHandler_FeedOptions(TEST_OPTIONHANDLER_HANDLE, TEST_UWS_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_setoption(wsio, "WSIOOptions", (void*)TEST_OPTIONHANDLER_HANDLE); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_184: [ If `OptionHandler_FeedOptions` fails, `wsio_setoption` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_OptionHandler_FeedOptions_fails_then_wsio_setoption_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(OptionHandler_FeedOptions(TEST_OPTIONHANDLER_HANDLE, TEST_UWS_HANDLE)) .SetReturn(OPTIONHANDLER_ERROR); // act result = wsio_get_interface_description()->concrete_io_setoption(wsio, "WSIOOptions", (void*)TEST_OPTIONHANDLER_HANDLE); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_156: [ Otherwise all options shall be passed as they are to uws by calling `uws_client_set_option`. ]*/ /* Tests_SRS_WSIO_01_158: [ On success, `wsio_setoption` shall return 0. ]*/ TEST_FUNCTION(wsio_setoption_passes_the_option_dows_to_uws) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_set_option(TEST_UWS_HANDLE, "option1", (void*)0x4242)); // act result = wsio_get_interface_description()->concrete_io_setoption(wsio, "option1", (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_157: [ If `uws_client_set_option` fails, `wsio_setoption` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_uws_set_option_fails_wsio_setoption_fails) { // arrange CONCRETE_IO_HANDLE wsio; int result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(uws_client_set_option(TEST_UWS_HANDLE, "option1", (void*)0x4242)) .SetReturn(1); // act result = wsio_get_interface_description()->concrete_io_setoption(wsio, "option1", (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_retrieveoptions */ /* Tests_SRS_WSIO_01_118: [ If parameter `handle` is `NULL` then `wsio_retrieveoptions` shall fail and return NULL. ]*/ TEST_FUNCTION(wsio_retrieveoptions_with_NULL_handle_fails) { // arrange OPTIONHANDLER_HANDLE result; // act result = wsio_get_interface_description()->concrete_io_retrieveoptions(NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_WSIO_01_119: [ `wsio_retrieveoptions` shall call `OptionHandler_Create` to produce an `OPTIONHANDLER_HANDLE` and on success return the new `OPTIONHANDLER_HANDLE` handle. ]*/ /* Tests_SRS_WSIO_01_179: [ When calling `uws_client_retrieve_options` the uws client handle shall be passed to it. ]*/ /* Tests_SRS_WSIO_01_178: [ `uws_client_retrieve_options` shall add to the option handler one option, whose name shall be `uWSCLientOptions` and the value shall be queried by calling `uws_client_retrieve_options`. ]*/ /* Tests_SRS_WSIO_01_181: [ Adding the option shall be done by calling `OptionHandler_AddOption`. ]*/ TEST_FUNCTION(wsio_retrieveoptions_creates_an_option_handler_with_the_value_obtained_from_the_underlying_retrieve_options) { // arrange OPTIONHANDLER_HANDLE result; CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(uws_client_retrieve_options(TEST_UWS_HANDLE)); STRICT_EXPECTED_CALL(OptionHandler_AddOption(TEST_OPTIONHANDLER_HANDLE, "WSIOOptions", TEST_UWS_CLIENT_OPTIONHANDLER_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_120: [ If `OptionHandler_Create` fails then `wsio_retrieveoptions` shall fail and return NULL. ]*/ TEST_FUNCTION(when_OptionHandler_Create_fails_then_wsio_retrieveoptions_fails) { // arrange OPTIONHANDLER_HANDLE result; CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(NULL); // act result = wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_180: [ If `uws_client_retrieve_options` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(when_uws_client_retrieve_options_fails_then_wsio_retrieveoptions_fails) { // arrange OPTIONHANDLER_HANDLE result; CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(uws_client_retrieve_options(TEST_UWS_HANDLE)) .SetReturn(NULL); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_OPTIONHANDLER_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_182: [ If `OptionHandler_AddOption` fails, `uws_client_retrieve_options` shall fail and return NULL. ]*/ TEST_FUNCTION(when_OptionHandler_AddOption_fails_then_wsio_retrieveoptions_fails) { // arrange OPTIONHANDLER_HANDLE result; CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); umock_c_reset_all_calls(); EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(uws_client_retrieve_options(TEST_UWS_HANDLE)); STRICT_EXPECTED_CALL(OptionHandler_AddOption(TEST_OPTIONHANDLER_HANDLE, "WSIOOptions", TEST_UWS_CLIENT_OPTIONHANDLER_HANDLE)) .SetReturn(OPTIONHANDLER_ERROR); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_UWS_CLIENT_OPTIONHANDLER_HANDLE)); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_OPTIONHANDLER_HANDLE)); // act result = wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_clone_option */ /* Tests_SRS_WSIO_01_174: [ If `wsio_clone_option` is called with NULL `name` or `value` it shall return NULL. ]*/ TEST_FUNCTION(wsio_clone_option_with_NULL_name_fails) { // arrange CONCRETE_IO_HANDLE wsio; void* result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); // act result = g_clone_option(NULL, (void*)0x4243); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_174: [ If `wsio_clone_option` is called with NULL `name` or `value` it shall return NULL. ]*/ TEST_FUNCTION(wsio_clone_option_with_NULL_value_fails) { // arrange CONCRETE_IO_HANDLE wsio; void* result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); // act result = g_clone_option("WSIOOptions", NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_171: [** `wsio_clone_option` called with `name` being `WSIOOptions` shall return the same value. ]*/ TEST_FUNCTION(wsio_clone_option_with_WSIOOptions_clones_the_option_handler) { // arrange CONCRETE_IO_HANDLE wsio; void* result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); // act result = g_clone_option("WSIOOptions", (void*)0x4243); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x4243, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_173: [ `wsio_clone_option` called with any other option name than `WSIOOptions` shall return NULL. ]*/ TEST_FUNCTION(wsio_clone_option_with_an_unknown_option_name_fails) { // arrange CONCRETE_IO_HANDLE wsio; void* result; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); // act result = g_clone_option("Cucu", (void*)0x4243); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* wsio_destroy_option */ /* Tests_SRS_WSIO_01_175: [ `wsio_destroy_option` called with the option `name` being `WSIOOptions` shall destroy the value by calling `OptionHandler_Destroy`. ]*/ TEST_FUNCTION(wsio_destroy_option_with_WSIOOptions_destroys_the_handler) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(OptionHandler_Destroy(TEST_OPTIONHANDLER_HANDLE)); // act g_destroy_option("WSIOOptions", TEST_OPTIONHANDLER_HANDLE); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_176: [ If `wsio_destroy_option` is called with any other `name` it shall do nothing. ]*/ TEST_FUNCTION(wsio_destroy_option_with_an_unknown_option_does_no_destroy) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); // act g_destroy_option("cucu", TEST_OPTIONHANDLER_HANDLE); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_177: [ If `wsio_destroy_option` is called with NULL `name` or `value` it shall do nothing. ]*/ TEST_FUNCTION(wsio_destroy_option_with_NULL_name_does_no_destroy) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); // act g_destroy_option(NULL, TEST_OPTIONHANDLER_HANDLE); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_177: [ If `wsio_destroy_option` is called with NULL `name` or `value` it shall do nothing. ]*/ TEST_FUNCTION(wsio_destroy_option_with_NULL_value_does_no_destroy) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_retrieveoptions(wsio); umock_c_reset_all_calls(); // act g_destroy_option("WSIOOptions", NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* on_underlying_ws_close_complete */ /* Tests_SRS_WSIO_01_159: [ When `on_underlying_ws_close_complete` while the IO is closing (after `wsio_close`), the close shall be indicated up by calling the `on_io_close_complete` callback passed to `wsio_close`. ]*/ /* Tests_SRS_WSIO_01_163: [ When `on_io_close_complete` is called, the context passed to `wsio_close` shall be passed as argument to `on_io_close_complete`. ]*/ TEST_FUNCTION(on_underlying_ws_close_complete_while_closing_triggers_the_send_complete_callback) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_close_complete((void*)0x4245)); // act g_on_ws_close_complete(g_on_ws_close_complete_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_160: [ If NULL was passed to `wsio_close` no callback shall be called. ]*/ TEST_FUNCTION(when_on_close_complete_was_NULL_on_underlying_ws_close_complete_does_not_trigger_any_callback) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, NULL, (void*)0x4245); umock_c_reset_all_calls(); // act g_on_ws_close_complete(g_on_ws_close_complete_context); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_161: [ If the context passed to `on_underlying_ws_close_complete` is NULL, `on_underlying_ws_close_complete` shall do nothing. ]*/ TEST_FUNCTION(on_underlying_ws_close_complete_with_NULL_context_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act g_on_ws_close_complete(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* on_underlying_ws_peer_closed */ /* Tests_SRS_WSIO_01_170: [ When `on_underlying_ws_peer_closed` and the state of the IO is OPENING an error shall be indicated by calling the `on_io_open_complete` callback passed to `wsio_open` with the error code `WS_OPEN_ERROR`. ]*/ /* Tests_SRS_WSIO_01_168: [ The `close_code`, `extra_data` and `extra_data_length` arguments shall be ignored. ]*/ TEST_FUNCTION(on_underlying_ws_peer_closed_when_OPENING_indicates_an_error) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_open_complete((void*)0x4242, IO_OPEN_ERROR)); // act g_on_ws_peer_closed(g_on_ws_peer_closed_context, NULL, NULL, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_166: [ When `on_underlying_ws_peer_closed` and the state of the IO is OPEN an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ /* Tests_SRS_WSIO_01_168: [ The `close_code`, `extra_data` and `extra_data_length` arguments shall be ignored. ]*/ TEST_FUNCTION(on_underlying_ws_peer_closed_when_OPEN_indicates_an_error) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_peer_closed(g_on_ws_peer_closed_context, NULL, NULL, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_166: [ When `on_underlying_ws_peer_closed` and the state of the IO is OPEN an error shall be indicated by calling the `on_io_error` callback passed to `wsio_open`. ]*/ /* Tests_SRS_WSIO_01_168: [ The `close_code`, `extra_data` and `extra_data_length` arguments shall be ignored. ]*/ TEST_FUNCTION(on_underlying_ws_peer_closed_when_CLOSING_indicates_an_error) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_peer_closed(g_on_ws_peer_closed_context, NULL, NULL, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } // Tests_SRS_WSIO_07_001: [When `on_underlying_ws_peer_closed` and the state of the IO is NOT_OPEN an error will be raised and the io_state will remain as NOT_OPEN] TEST_FUNCTION(on_underlying_ws_peer_closed_when_NOT_OPEN_indicates_an_error) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_on_io_error((void*)0x4244)); // act g_on_ws_peer_closed(g_on_ws_peer_closed_context, NULL, NULL, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } /* Tests_SRS_WSIO_01_167: [ If `on_underlying_ws_peer_closed` is called with a NULL context it shall do nothing. ]*/ TEST_FUNCTION(on_underlying_ws_peer_closed_with_NULL_context_does_nothing) { // arrange CONCRETE_IO_HANDLE wsio; wsio = wsio_get_interface_description()->concrete_io_create(&default_wsio_config); (void)wsio_get_interface_description()->concrete_io_open(wsio, test_on_io_open_complete, (void*)0x4242, test_on_bytes_received, (void*)0x4243, test_on_io_error, (void*)0x4244); g_on_ws_open_complete(g_on_ws_open_complete_context, WS_OPEN_OK); (void)wsio_get_interface_description()->concrete_io_close(wsio, test_on_io_close_complete, (void*)0x4245); umock_c_reset_all_calls(); // act g_on_ws_peer_closed(NULL, NULL, NULL, 0); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup wsio_get_interface_description()->concrete_io_destroy(wsio); } END_TEST_SUITE(wsio_ut) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/x509_openssl_ut/000077500000000000000000000000001362133436400334565ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007771362133436400361520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/x509_openssl_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName x509_openssl_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../adapters/x509_openssl.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005051362133436400344670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/x509_openssl_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(x509_openssl_unittests, failedTestCount); return failedTestCount; } x509_openssl_ut.c000066400000000000000000000546411362133436400365350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/x509_openssl_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* s) { free(s); } #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "openssl/ssl.h" #include "openssl/x509.h" #include "openssl/err.h" #include "openssl/opensslv.h" #include "openssl/pem.h" #include "openssl/bio.h" #include "openssl/rsa.h" #include "openssl/evp.h" #include "azure_c_shared_utility/x509_openssl.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/umock_c_prod.h" #ifndef VALIDATED_PTR_ARG #define VALIDATED_PTR_ARG NULL #endif #ifndef VALIDATED_NUM_ARG #define VALIDATED_NUM_ARG 0 #endif /*from openssl/bio.h*/ /*the below function has different signatures on different versions of OPENSSL*/ /* |openssl version (number) | openssl string | BIO_new_mem_buf prototype | Observations | |-------------------------|----------------------------------|---------------------------------------------------|---------------------------------| | 0x1000106fL | OpenSSL 1.0.1f 6 Jan 2014 | BIO *BIO_new_mem_buf(void *buf, int len); | Ubuntu 14.04 | | 0x1000204fL | OpenSSL 1.0.2d 9 Jul 2015 | BIO *BIO_new_mem_buf(void *buf, int len); | Ubuntu 15.10 | | 0x1000207fL | OpenSSL 1.0.2g-fips 1 Mar 2016 | BIO *BIO_new_mem_buf(const void *buf, int len); | Ubuntu 16.10 | | 0x1010007fL | OpenSSL 1.0.2g-fips 1 Mar 2016 | BIO *BIO_new(const BIO_METHOD *type); | Ubuntu 18.04 | */ MOCKABLE_FUNCTION(,int, BIO_free, BIO *,a); #if OPENSSL_VERSION_NUMBER >= 0x1010007fL MOCKABLE_FUNCTION(, BIO *, BIO_new, const BIO_METHOD *, type); MOCKABLE_FUNCTION(, const BIO_METHOD *, BIO_s_mem); #else MOCKABLE_FUNCTION(, BIO *, BIO_new, BIO_METHOD *, type); MOCKABLE_FUNCTION(, BIO_METHOD *, BIO_s_mem); #endif MOCKABLE_FUNCTION(, BIO *, BIO_mem, BIO_METHOD *, type); MOCKABLE_FUNCTION(, int, BIO_puts, BIO *, bp, const char *, buf); #if OPENSSL_VERSION_NUMBER >= 0x1000207fL MOCKABLE_FUNCTION(,BIO *,BIO_new_mem_buf, const void *,buf, int, len); #else MOCKABLE_FUNCTION(, BIO *, BIO_new_mem_buf, void *, buf, int, len); #endif /*from openssl/rsa.h*/ MOCKABLE_FUNCTION(, void, RSA_free, RSA *,rsa); /*from openssl/x509.h*/ MOCKABLE_FUNCTION(, void, X509_free, X509 *, a); /*from openssl/pem.h*/ MOCKABLE_FUNCTION(, X509 *, PEM_read_bio_X509, BIO *, bp, X509 **, x, pem_password_cb *, cb, void *, u); MOCKABLE_FUNCTION(, RSA *, PEM_read_bio_RSAPrivateKey, BIO *,bp, RSA **,x, pem_password_cb *,cb, void *,u); MOCKABLE_FUNCTION(, RSA*, EVP_PKEY_get1_RSA, EVP_PKEY*, pkey); /*from openssl/ssl.h*/ MOCKABLE_FUNCTION(,int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *,ctx, RSA *,rsa); MOCKABLE_FUNCTION(,int, SSL_CTX_use_certificate, SSL_CTX *,ctx, X509*, x); MOCKABLE_FUNCTION(, X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *, ssl_ctx); /*from openssl/err.h*/ MOCKABLE_FUNCTION(,unsigned long, ERR_get_error); MOCKABLE_FUNCTION(, char *,ERR_error_string, unsigned long, e, char *,buf); MOCKABLE_FUNCTION(, unsigned long, ERR_peek_error); /*from openssl/x509_vfy.h*/ MOCKABLE_FUNCTION(,int, X509_STORE_add_cert, X509_STORE *, ctx, X509 *, x); typedef void (*x509_FREE_FUNC)(void*); MOCKABLE_FUNCTION(, void, sk_pop_free, _STACK*, st, x509_FREE_FUNC, free_func); MOCKABLE_FUNCTION(, void, EVP_PKEY_free, EVP_PKEY*, pkey); MOCKABLE_FUNCTION(, X509*, PEM_read_bio_X509_AUX, BIO*, bp, X509**, x, pem_password_cb*, cb, void*, u); MOCKABLE_FUNCTION(, EVP_PKEY*, PEM_read_bio_PrivateKey, BIO*, bp, EVP_PKEY**, x, pem_password_cb*, cb, void*, u); MOCKABLE_FUNCTION(, int, SSL_CTX_use_PrivateKey, SSL_CTX*, ctx, EVP_PKEY*, pkey); MOCKABLE_FUNCTION(, long, SSL_CTX_ctrl, SSL_CTX*, ctx, int, cmd, long, larg, void*, parg); MOCKABLE_FUNCTION(, unsigned long, ERR_peek_last_error); MOCKABLE_FUNCTION(, void, ERR_clear_error); #ifndef __APPLE__ MOCKABLE_FUNCTION(, int, EVP_PKEY_id, const EVP_PKEY*, pkey); #endif #undef ENABLE_MOCKS /*the below function has different signatures on different versions of OPENSSL*/ #if OPENSSL_VERSION_NUMBER >= 0x1000207fL static BIO* my_BIO_new_mem_buf(const void * buf, int len) #else static BIO* my_BIO_new_mem_buf(void * buf, int len) #endif { (void)len, (void)buf; return (BIO*)my_gballoc_malloc(1); } static int my_BIO_free(BIO * a) { my_gballoc_free(a); return 0; } #if OPENSSL_VERSION_NUMBER >= 0x1010007fL static BIO *my_BIO_new(const BIO_METHOD *type) #else static BIO *my_BIO_new(BIO_METHOD *type) #endif { (void)type; return (BIO*)my_gballoc_malloc(1); } static void my_RSA_free(RSA * rsa) { my_gballoc_free(rsa); } static void my_X509_free(X509 * a) { my_gballoc_free(a); } static X509* my_PEM_read_bio_X509_AUX(BIO* bp, X509** x, pem_password_cb* cb, void* u) { (void)u, (void)cb, (void)x, (void)bp; return (X509*)my_gballoc_malloc(1); } static long my_SSL_CTX_ctrl(SSL_CTX* ctx, int cmd, long larg, void* parg) { (void)ctx; (void)cmd; (void)larg; my_gballoc_free(parg); return 1; } static RSA* my_EVP_PKEY_get1_RSA(EVP_PKEY* pkey) { (void)pkey; return (RSA*)my_gballoc_malloc(1); } static X509 * my_PEM_read_bio_X509(BIO * bp, X509 ** x, pem_password_cb * cb, void * u) { (void)u, (void)cb, (void)x, (void)bp; return (X509*)my_gballoc_malloc(1); } static RSA * my_PEM_read_bio_RSAPrivateKey(BIO * bp, RSA ** x, pem_password_cb * cb, void * u) { (void)u, (void)cb, (void)x, (void)bp; return (RSA*)my_gballoc_malloc(1); } static TEST_MUTEX_HANDLE g_testByTest; static TEST_MUTEX_HANDLE g_dllByDll; static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { (void)error_code; ASSERT_FAIL("umock_c reported error"); } typedef struct SSL_TEST_CTX_tag { void* extra_certs; } SSL_TEST_CTX; typedef struct replace_evp_pkey_st_tag { int type; } replace_evp_pkey_st; #define TEST_SSL_CTX ((SSL_CTX*)(0x42)) #define TEST_CERTIFICATE_1 "one certificate" #define TEST_X509_STORE (X509_STORE *)"le store" #define TEST_BIO_METHOD (BIO_METHOD*)"le method" #define TEST_BIO (BIO*)"le bio" static const char* TEST_PUBLIC_CERTIFICATE = "PUBLIC CERTIFICATE"; static const char* TEST_PRIVATE_CERTIFICATE = "PRIVATE KEY"; static BIO* TEST_BIO_CERT = (BIO*)0x11; static X509* TEST_X509 = (X509*)0x13; static SSL_CTX* TEST_SSL_CTX_STRUCTURE; static SSL_TEST_CTX g_replace_ctx; static EVP_PKEY* g_evp_pkey; static replace_evp_pkey_st g_replace_evp_key; BEGIN_TEST_SUITE(x509_openssl_unittests) TEST_SUITE_INITIALIZE(a) { g_evp_pkey = (EVP_PKEY*)&g_replace_evp_key; TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); (void)umocktypes_charptr_register_types(); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(BIO_new_mem_buf, my_BIO_new_mem_buf); REGISTER_GLOBAL_MOCK_FAIL_RETURN(BIO_new_mem_buf, NULL); REGISTER_GLOBAL_MOCK_HOOK(PEM_read_bio_X509, my_PEM_read_bio_X509); REGISTER_GLOBAL_MOCK_FAIL_RETURN(PEM_read_bio_X509, NULL); REGISTER_GLOBAL_MOCK_HOOK(PEM_read_bio_RSAPrivateKey, my_PEM_read_bio_RSAPrivateKey); REGISTER_GLOBAL_MOCK_FAIL_RETURN(PEM_read_bio_X509, NULL); REGISTER_GLOBAL_MOCK_RETURNS(SSL_CTX_use_certificate, 1, 0); REGISTER_GLOBAL_MOCK_RETURNS(BIO_s_mem, TEST_BIO_METHOD, NULL); REGISTER_GLOBAL_MOCK_HOOK(BIO_new, my_BIO_new); REGISTER_GLOBAL_MOCK_FAIL_RETURN(BIO_new, NULL); REGISTER_GLOBAL_MOCK_RETURNS(BIO_puts, strlen(TEST_CERTIFICATE_1), strlen(TEST_CERTIFICATE_1)-1); REGISTER_GLOBAL_MOCK_RETURNS(SSL_CTX_get_cert_store, TEST_X509_STORE, NULL); REGISTER_GLOBAL_MOCK_RETURNS(X509_STORE_add_cert, __LINE__, 0); REGISTER_GLOBAL_MOCK_RETURNS(SSL_CTX_use_RSAPrivateKey, 1, 0); REGISTER_GLOBAL_MOCK_HOOK(BIO_free, my_BIO_free); REGISTER_GLOBAL_MOCK_HOOK(RSA_free, my_RSA_free); REGISTER_GLOBAL_MOCK_HOOK(X509_free, my_X509_free); REGISTER_GLOBAL_MOCK_HOOK(EVP_PKEY_get1_RSA, my_EVP_PKEY_get1_RSA); REGISTER_GLOBAL_MOCK_FAIL_RETURN(EVP_PKEY_get1_RSA, NULL); REGISTER_GLOBAL_MOCK_RETURNS(PEM_read_bio_PrivateKey, g_evp_pkey, NULL); REGISTER_GLOBAL_MOCK_RETURNS(BIO_new_mem_buf, TEST_BIO_CERT, NULL); REGISTER_GLOBAL_MOCK_HOOK(PEM_read_bio_X509_AUX, my_PEM_read_bio_X509_AUX); REGISTER_GLOBAL_MOCK_RETURNS(SSL_CTX_use_PrivateKey, 1, 0); REGISTER_GLOBAL_MOCK_HOOK(SSL_CTX_ctrl, my_SSL_CTX_ctrl); } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(initialize) { umock_c_reset_all_calls(); memset(&g_replace_ctx, 0, sizeof(SSL_TEST_CTX) ); TEST_SSL_CTX_STRUCTURE = (SSL_CTX*)&g_replace_ctx; memset(&g_replace_evp_key, 0, sizeof(replace_evp_pkey_st)); g_evp_pkey = (EVP_PKEY*)&g_replace_evp_key; } TEST_FUNCTION_CLEANUP(cleans) { } static int should_skip_index(size_t current_index, const size_t skip_array[], size_t length) { int result = 0; for (size_t index = 0; index < length; index++) { if (current_index == skip_array[index]) { result = __LINE__; break; } } return result; } static void setup_load_alias_key_cert_mocks(bool is_rsa_cert) { if (is_rsa_cert) { g_replace_evp_key.type = EVP_PKEY_RSA; STRICT_EXPECTED_CALL(EVP_PKEY_get1_RSA(g_evp_pkey)); STRICT_EXPECTED_CALL(SSL_CTX_use_RSAPrivateKey(TEST_SSL_CTX_STRUCTURE, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(RSA_free(IGNORED_PTR_ARG) ); } else { g_replace_evp_key.type = EVP_PKEY_EC; STRICT_EXPECTED_CALL(SSL_CTX_use_PrivateKey(TEST_SSL_CTX_STRUCTURE, g_evp_pkey)); } } static void setup_load_certificate_chain_mocks() { STRICT_EXPECTED_CALL(BIO_new_mem_buf((void*)TEST_PUBLIC_CERTIFICATE, -1)); STRICT_EXPECTED_CALL(PEM_read_bio_X509_AUX(IGNORED_PTR_ARG, NULL, NULL, NULL)); STRICT_EXPECTED_CALL(SSL_CTX_use_certificate(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) //STRICT_EXPECTED_CALL(SSL_CTX_clear_extra_chain_certs(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(SSL_CTX_ctrl(TEST_SSL_CTX_STRUCTURE, SSL_CTRL_CLEAR_EXTRA_CHAIN_CERTS, 0, NULL)); #endif STRICT_EXPECTED_CALL(PEM_read_bio_X509(IGNORED_PTR_ARG, NULL, NULL, NULL)); STRICT_EXPECTED_CALL(SSL_CTX_ctrl(TEST_SSL_CTX_STRUCTURE, SSL_CTRL_EXTRA_CHAIN_CERT, IGNORED_NUM_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(PEM_read_bio_X509(IGNORED_PTR_ARG, NULL, NULL, NULL)) .SetReturn(NULL); // Needed because the x509 needs not to be free STRICT_EXPECTED_CALL(X509_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(BIO_free(IGNORED_PTR_ARG)); } static void setup_add_credentials(bool is_rsa_cert) { STRICT_EXPECTED_CALL(BIO_new_mem_buf((char*)TEST_PRIVATE_CERTIFICATE, -1)); STRICT_EXPECTED_CALL(PEM_read_bio_PrivateKey(IGNORED_PTR_ARG, NULL, NULL, NULL)); #ifndef __APPLE__ STRICT_EXPECTED_CALL(EVP_PKEY_id(IGNORED_PTR_ARG)).SetReturn(is_rsa_cert ? EVP_PKEY_RSA : EVP_PKEY_EC); #endif setup_load_alias_key_cert_mocks(is_rsa_cert); setup_load_certificate_chain_mocks(); STRICT_EXPECTED_CALL(EVP_PKEY_free(g_evp_pkey)); STRICT_EXPECTED_CALL(BIO_free(IGNORED_PTR_ARG)); } /*Tests_SRS_X509_OPENSSL_02_001: [ If any argument is NULL then x509_openssl_add_credentials shall fail and return a non-zero value. ]*/ TEST_FUNCTION(x509_openssl_add_credentials_with_NULL_SSL_CTX_fails) { //arrange //act int result = x509_openssl_add_credentials(NULL, "certificate", "privatekey"); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); //cleanup } /*Tests_SRS_X509_OPENSSL_02_001: [ If any argument is NULL then x509_openssl_add_credentials shall fail and return a non-zero value. ]*/ TEST_FUNCTION(x509_openssl_add_credentials_with_NULL_certificate_fails) { //arrange //act int result = x509_openssl_add_credentials(TEST_SSL_CTX, NULL, "privatekey"); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); //cleanup } /*Tests_SRS_X509_OPENSSL_02_001: [ If any argument is NULL then x509_openssl_add_credentials shall fail and return a non-zero value. ]*/ TEST_FUNCTION(x509_openssl_add_credentials_with_NULL_privatekey_fails) { //arrange //act int result = x509_openssl_add_credentials(TEST_SSL_CTX, "certificate", NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); //cleanup } /*Tests_SRS_X509_OPENSSL_02_002: [ x509_openssl_add_credentials shall use BIO_new_mem_buf to create a memory BIO from the x509 certificate. ] */ /*Tests_SRS_X509_OPENSSL_02_003: [ x509_openssl_add_credentials shall use PEM_read_bio_X509 to read the x509 certificate. ] */ /*Tests_SRS_X509_OPENSSL_02_004: [ x509_openssl_add_credentials shall use BIO_new_mem_buf to create a memory BIO from the x509 privatekey. ] */ /*Tests_SRS_X509_OPENSSL_02_005: [ x509_openssl_add_credentials shall use PEM_read_bio_RSAPrivateKey to read the x509 private key. ] */ /*Tests_SRS_X509_OPENSSL_02_006: [ x509_openssl_add_credentials shall use SSL_CTX_use_certificate to load the certicate into the SSL context. ] */ /*Tests_SRS_X509_OPENSSL_02_007: [ x509_openssl_add_credentials shall use SSL_CTX_use_RSAPrivateKey to load the private key into the SSL context. ]*/ /*Tests_SRS_X509_OPENSSL_02_008: [ If no error occurs, then x509_openssl_add_credentials shall succeed and return 0. ] */ TEST_FUNCTION(x509_openssl_add_credentials_happy_path) { setup_add_credentials(true); //act int result = x509_openssl_add_credentials(TEST_SSL_CTX_STRUCTURE, TEST_PUBLIC_CERTIFICATE, TEST_PRIVATE_CERTIFICATE); //assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } TEST_FUNCTION(x509_openssl_add_credentials_ecc_happy_path) { setup_add_credentials(false); //act int result = x509_openssl_add_credentials(TEST_SSL_CTX_STRUCTURE, TEST_PUBLIC_CERTIFICATE, TEST_PRIVATE_CERTIFICATE); //assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); //cleanup } /*Tests_SRS_X509_OPENSSL_02_009: [ Otherwise x509_openssl_add_credentials shall fail and return a non-zero number. ]*/ TEST_FUNCTION(x509_openssl_add_credentials_fails) { //arrange umock_c_reset_all_calls(); int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); setup_add_credentials(true); umock_c_negative_tests_snapshot(); #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && (OPENSSL_VERSION_NUMBER < 0x20000000L) #ifdef __APPLE__ size_t calls_cannot_fail[] = { 4, 8, 9, 10, 11, 12, 13, 14, 15 }; #else size_t calls_cannot_fail[] = { 2, 5, 9, 10, 11, 12, 13, 14, 15, 16 }; #endif #else #ifdef __APPLE__ size_t calls_cannot_fail[] = { 4, 8, 9, 10, 11, 12, 13, 14 }; #else size_t calls_cannot_fail[] = { 2, 5, 9, 10, 11, 12, 13, 14, 15 }; #endif #endif //act int result; size_t count = umock_c_negative_tests_call_count(); for (size_t index = 0; index < count; index++) { if (should_skip_index(index, calls_cannot_fail, sizeof(calls_cannot_fail) / sizeof(calls_cannot_fail[0])) != 0) { continue; } umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); char tmp_msg[128]; sprintf(tmp_msg, "x509_openssl_add_credentials failure in test %zu/%zu", index, count); g_replace_ctx.extra_certs = NULL; result = x509_openssl_add_credentials(TEST_SSL_CTX_STRUCTURE, TEST_PUBLIC_CERTIFICATE, TEST_PRIVATE_CERTIFICATE); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result, tmp_msg); } //cleanup umock_c_negative_tests_deinit(); } /*Tests_SRS_X509_OPENSSL_02_010: [ If ssl_ctx is NULL then x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ TEST_FUNCTION(x509_openssl_add_certificates_with_NULL_ssl_ctx_fails) { //arrange //act int result = x509_openssl_add_certificates(NULL, "a"); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); //clean } /*Tests_SRS_X509_OPENSSL_02_011: [ If certificates is NULL then x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ TEST_FUNCTION(x509_openssl_add_certificates_with_NULL_certificates_fails) { //arrange //act int result = x509_openssl_add_certificates(TEST_SSL_CTX, NULL); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result); //clean } /*Tests_SRS_X509_OPENSSL_02_012: [ x509_openssl_add_certificates shall get the memory BIO method function by calling BIO_s_mem. ]*/ /*Tests_SRS_X509_OPENSSL_02_013: [ x509_openssl_add_certificates shall create a new memory BIO by calling BIO_new. ]*/ /*Tests_SRS_X509_OPENSSL_02_014: [ x509_openssl_add_certificates shall load certificates into the memory BIO by a call to BIO_puts. ]*/ /*Tests_SRS_X509_OPENSSL_02_015: [ x509_openssl_add_certificates shall retrieve each certificate by a call to PEM_read_bio_X509. ]*/ /*Tests_SRS_X509_OPENSSL_02_016: [ x509_openssl_add_certificates shall add the certificate to the store by a call to X509_STORE_add_cert. ]*/ /*Tests_SRS_X509_OPENSSL_02_019: [ Otherwise, x509_openssl_add_certificates shall succeed and return 0. ]*/ TEST_FUNCTION(x509_openssl_add_certificates_1_certificate_happy_path) { //arrange int result; STRICT_EXPECTED_CALL(SSL_CTX_get_cert_store(TEST_SSL_CTX)); STRICT_EXPECTED_CALL(BIO_s_mem()); STRICT_EXPECTED_CALL(BIO_new(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(BIO_puts(IGNORED_PTR_ARG, TEST_CERTIFICATE_1)); STRICT_EXPECTED_CALL(PEM_read_bio_X509(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(X509_STORE_add_cert(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(X509_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(PEM_read_bio_X509(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(NULL); //act result = x509_openssl_add_certificates(TEST_SSL_CTX, TEST_CERTIFICATE_1); //assert ASSERT_ARE_EQUAL(int, 0, result); //clean } void x509_openssl_add_certificates_1_certificate_which_exists_inert_path(void) { STRICT_EXPECTED_CALL(SSL_CTX_get_cert_store(TEST_SSL_CTX)); STRICT_EXPECTED_CALL(BIO_s_mem()); STRICT_EXPECTED_CALL(BIO_new(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(BIO_puts(IGNORED_PTR_ARG, TEST_CERTIFICATE_1)); STRICT_EXPECTED_CALL(PEM_read_bio_X509(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(X509_STORE_add_cert(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(0); STRICT_EXPECTED_CALL(ERR_peek_error()) .SetReturn(X509_R_CERT_ALREADY_IN_HASH_TABLE); STRICT_EXPECTED_CALL(X509_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(PEM_read_bio_X509(IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .SetReturn(NULL); } /*Tests_SRS_X509_OPENSSL_02_017: [ If X509_STORE_add_cert returns with error and that error is X509_R_CERT_ALREADY_IN_HASH_TABLE then x509_openssl_add_certificates shall ignore it as the certificate is already in the store. ]*/ TEST_FUNCTION(x509_openssl_add_certificates_1_certificate_which_exists_happy_path) { //arrange int result; x509_openssl_add_certificates_1_certificate_which_exists_inert_path(); //act result = x509_openssl_add_certificates(TEST_SSL_CTX, TEST_CERTIFICATE_1); //assert ASSERT_ARE_EQUAL(int, 0, result); //clean } /*Tests_SRS_X509_OPENSSL_02_018: [ In case of any failure x509_openssl_add_certificates shall fail and return a non-zero value. ]*/ TEST_FUNCTION(x509_openssl_add_certificates_1_certificate_which_exists_unhappy_paths) { //arrange umock_c_reset_all_calls(); int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); x509_openssl_add_certificates_1_certificate_which_exists_inert_path(); umock_c_negative_tests_snapshot(); size_t calls_cannot_fail[] = { 4, 5, 7, 8 }; int result; size_t count = umock_c_negative_tests_call_count(); for (size_t index = 0; index < count; index++) { if (should_skip_index(index, calls_cannot_fail, sizeof(calls_cannot_fail) / sizeof(calls_cannot_fail[0])) != 0) { continue; } umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(index); char tmp_msg[128]; sprintf(tmp_msg, "x509_openssl_add_credentials failure in test %zu/%zu", index, count); //act result = x509_openssl_add_certificates(TEST_SSL_CTX, TEST_CERTIFICATE_1); //assert ASSERT_ARE_NOT_EQUAL(int, 0, result, tmp_msg); } //clean umock_c_negative_tests_deinit(); } END_TEST_SUITE(x509_openssl_unittests) x509_schannel_ut/000077500000000000000000000000001362133436400335075ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testsCMakeLists.txt000066400000000000000000000025451362133436400362550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/x509_schannel_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName x509_schannel_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../adapters/x509_schannel.c ) set(${theseTestsName}_h_files ) #/*the following linker option will make x509_schannel.obj : warning LNK4217: locally defined symbol _CryptDecodeObjectEx@32 imported in function _x509_schannel_create go away*/ #/*the warning appears because CryptDecodeObjectEx is defined with declspec(dllexport) and the mocked functions in the unittests do not (cannot) adhere to that specification*/ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4217") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ignore:4217") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /ignore:4217") #the below line strips advapi32.lib from CMAKE_C_STANDARD_LIBRARIES and from CMAKE_CXX_STANDARD_LIBRARIES string(REPLACE "advapi32.lib" "" CMAKE_C_STANDARD_LIBRARIES ${CMAKE_C_STANDARD_LIBRARIES}) string(REPLACE "advapi32.lib" "" CMAKE_CXX_STANDARD_LIBRARIES ${CMAKE_CXX_STANDARD_LIBRARIES}) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) main.c000066400000000000000000000005061362133436400346000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/x509_schannel_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(x509_schannel_unittests, failedTestCount); return failedTestCount; } x509_schannel_ut.c000066400000000000000000000552661362133436400367610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/x509_schannel_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef WIN32 #error x509_schannel_unittests can only be compiled and used in Windows #else /*the following #defines will make "inconsistent dll linkage" warning go away (that is, it takes away declspec(dllexport) */ #define WINCRYPT32API #define _ADVAPI32_ #define WINADVAPI #include "windows.h" #ifdef __cplusplus #include #else #include #endif static void* my_gballoc_malloc(size_t size) { return malloc(size); } static void my_gballoc_free(void* s) { free(s); } /*define this symbol so that CryptDecodeObjectEx is not linked with dll linkage*/ #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umocktypes_charptr.h" #include "azure_c_shared_utility/x509_schannel.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/umock_c_prod.h" MOCKABLE_FUNCTION(WINAPI, BOOL, CryptDecodeObjectEx, DWORD, dwCertEncodingType, LPCSTR, lpszStructType, const BYTE *, pbEncoded, DWORD, cbEncoded, DWORD, dwFlags, PCRYPT_DECODE_PARA, pDecodePara, void *, pvStructInfo, DWORD *, pcbStructInfo ); MOCKABLE_FUNCTION(WINAPI, PCCERT_CONTEXT, CertCreateCertificateContext, DWORD, dwCertEncodingType, const BYTE *, pbCertEncoded, DWORD, cbCertEncoded ); MOCKABLE_FUNCTION(WINAPI, BOOL, CertFreeCertificateContext, PCCERT_CONTEXT, pCertContext ); MOCKABLE_FUNCTION(WINAPI, BOOL, CertSetCertificateContextProperty, PCCERT_CONTEXT, pCertContext, DWORD, dwPropId, DWORD, dwFlags, const void *, pvData ); MOCKABLE_FUNCTION(WINAPI, BOOL, CryptStringToBinaryA, LPCTSTR, pszString, DWORD, cchString, DWORD, dwFlags, BYTE *, pbBinary, DWORD *, pcbBinary, DWORD *, pdwSkip, DWORD *, pdwFlags ); MOCKABLE_FUNCTION(WINAPI, BOOL, CryptAcquireContextA, HCRYPTPROV *, phProv, LPCTSTR, szContainer, LPCTSTR, szProvider, DWORD, dwProvType, DWORD, dwFlags ); MOCKABLE_FUNCTION(WINAPI, BOOL, CryptReleaseContext, HCRYPTPROV, hProv, DWORD, dwFlags ); MOCKABLE_FUNCTION(WINAPI, BOOL, CryptDestroyKey, HCRYPTKEY, hKey ); MOCKABLE_FUNCTION(WINAPI, BOOL, CryptImportKey, HCRYPTPROV, hProv, CONST BYTE *, pbData, DWORD, dwDataLen, HCRYPTKEY, hPubKey, DWORD, dwFlags, HCRYPTKEY *, phKey ); #if _MSC_VER > 1500 MOCKABLE_FUNCTION(WINAPI, SECURITY_STATUS, NCryptFreeObject, NCRYPT_HANDLE, hObject); MOCKABLE_FUNCTION(WINAPI, SECURITY_STATUS, NCryptOpenStorageProvider, NCRYPT_PROV_HANDLE*, phProvider, LPCWSTR, pszProviderName, DWORD, dwFlags); MOCKABLE_FUNCTION(WINAPI, SECURITY_STATUS, NCryptImportKey, NCRYPT_PROV_HANDLE, hProvider, NCRYPT_KEY_HANDLE, hImportKey, LPCWSTR, pszBlobType, NCryptBufferDesc*, pParameterList, NCRYPT_KEY_HANDLE*, phKey, PBYTE, pbData, DWORD, cbData, DWORD, dwFlags); #endif #undef ENABLE_MOCKS static TEST_MUTEX_HANDLE g_testByTest; static const unsigned char TEST_DATA_INFO[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10 }; #define TEST_KEY_SIZE 10 //PCERT_INFO* g_cert_info; static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { (void)error_code; ASSERT_FAIL("umock_c reported error"); } static BOOL my_CryptStringToBinaryA( LPCTSTR pszString, DWORD cchString, DWORD dwFlags, BYTE *pbBinary, DWORD *pcbBinary, DWORD *pdwSkip, DWORD *pdwFlags ) { (void)pszString; (void)cchString; (void)dwFlags; (void)pdwSkip; (void)pdwFlags; *pcbBinary = 1; /*the binary form always has 1 byte*/ if (pbBinary != NULL) { *pbBinary = (BYTE)'3'; } return TRUE; } static BOOL my_CryptDecodeObjectEx( DWORD dwCertEncodingType, LPCSTR lpszStructType, const BYTE * pbEncoded, DWORD cbEncoded, DWORD dwFlags, PCRYPT_DECODE_PARA pDecodePara, void * pvStructInfo, DWORD * pcbStructInfo ) { (void)pDecodePara; (void)dwFlags; (void)cbEncoded; (void)pbEncoded; (void)pvStructInfo; (void)lpszStructType; (void)dwCertEncodingType; #if _MSC_VER > 1500 if (lpszStructType == X509_ECC_PRIVATE_KEY) { if (pcbStructInfo != NULL) { *pcbStructInfo = sizeof(CRYPT_ECC_PRIVATE_KEY_INFO); /*assume the decoded size is 2*/ } if (pvStructInfo != NULL) { PCRYPT_ECC_PRIVATE_KEY_INFO key_info = (PCRYPT_ECC_PRIVATE_KEY_INFO)pvStructInfo; key_info->dwVersion = 12; key_info->PrivateKey.cbData = TEST_KEY_SIZE; key_info->PrivateKey.pbData = (BYTE*)TEST_DATA_INFO; key_info->PublicKey.cbData = TEST_KEY_SIZE; key_info->PublicKey.pbData = (BYTE*)TEST_DATA_INFO; } } else { if (pcbStructInfo != NULL) { *pcbStructInfo = 2; /*assume the decoded size is 2*/ } } #else if (pcbStructInfo != NULL) { *pcbStructInfo = 2; /*assume the decoded size is 2*/ } #endif return TRUE; } static BOOL my_CryptAcquireContextA( HCRYPTPROV *phProv, LPCTSTR szContainer, LPCTSTR szProvider, DWORD dwProvType, DWORD dwFlags ) { (void)szContainer; (void)szProvider; (void)dwProvType; (void)dwFlags; *phProv = (HCRYPTPROV)my_gballoc_malloc(3); return TRUE; } static BOOL my_CryptImportKey( HCRYPTPROV hProv, CONST BYTE * pbData, DWORD dwDataLen, HCRYPTKEY hPubKey, DWORD dwFlags, HCRYPTKEY * phKey ) { (void)hProv; (void)pbData; (void)dwDataLen; (void)hPubKey; (void)dwFlags; *phKey = (HCRYPTKEY)my_gballoc_malloc(4); return TRUE; } static PCCERT_CONTEXT my_CertCreateCertificateContext( DWORD dwCertEncodingType, const BYTE * pbCertEncoded, DWORD cbCertEncoded ) { PCERT_CONTEXT result; (void)dwCertEncodingType; (void)pbCertEncoded; (void)cbCertEncoded; result = (PCERT_CONTEXT)my_gballoc_malloc(sizeof(CERT_CONTEXT)); result->pCertInfo = (PCERT_INFO)my_gballoc_malloc(sizeof(CERT_INFO)); result->pCertInfo->SubjectPublicKeyInfo.PublicKey.cbData = TEST_KEY_SIZE; result->pCertInfo->SubjectPublicKeyInfo.PublicKey.pbData = (BYTE*)TEST_DATA_INFO; return result; } static BOOL my_CryptReleaseContext( HCRYPTPROV hProv, DWORD dwFlags ) { (void)dwFlags; my_gballoc_free((void*)hProv); return TRUE; } #if _MSC_VER > 1500 static SECURITY_STATUS my_NCryptFreeObject(_In_ NCRYPT_HANDLE hObject) { my_gballoc_free((void*)hObject); return ERROR_SUCCESS; } #endif static BOOL my_CryptDestroyKey( HCRYPTKEY hKey ) { my_gballoc_free((void*)hKey); return TRUE; } static BOOL my_CertFreeCertificateContext( PCCERT_CONTEXT pCertContext ) { my_gballoc_free(pCertContext->pCertInfo); my_gballoc_free((void*)pCertContext); return TRUE; } static BOOL my_CertSetCertificateContextProperty( PCCERT_CONTEXT pCertContext, DWORD dwPropId, DWORD dwFlags, const void* pvData ) { (void)pCertContext; (void)dwPropId; (void)dwFlags; (void)pvData; return TRUE; } BEGIN_TEST_SUITE(x509_schannel_unittests) TEST_SUITE_INITIALIZE(a) { g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); (void)umock_c_init(on_umock_c_error); (void)umocktypes_charptr_register_types(); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_FAIL_RETURN(gballoc_malloc, NULL); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); //REGISTER_TYPE(wchar_t*, IOTHUB_SECURITY_TYPE); REGISTER_UMOCK_ALIAS_TYPE(LPCTSTR, const char*); REGISTER_UMOCK_ALIAS_TYPE(LPCSTR, void*); REGISTER_UMOCK_ALIAS_TYPE(PCRYPT_DECODE_PARA, void*); REGISTER_UMOCK_ALIAS_TYPE(HCRYPTPROV, void*); REGISTER_UMOCK_ALIAS_TYPE(HCRYPTKEY, void*); REGISTER_UMOCK_ALIAS_TYPE(PCCERT_CONTEXT, void*); REGISTER_UMOCK_ALIAS_TYPE(NCRYPT_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(NCRYPT_PROV_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(PBYTE, void*); REGISTER_UMOCK_ALIAS_TYPE(DWORD, unsigned int); REGISTER_UMOCK_ALIAS_TYPE(SECURITY_STATUS, unsigned int); REGISTER_UMOCK_ALIAS_TYPE(BOOL, unsigned int); REGISTER_UMOCK_ALIAS_TYPE(LPCWSTR, void*); REGISTER_UMOCK_ALIAS_TYPE(NCRYPT_KEY_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(CryptStringToBinaryA, my_CryptStringToBinaryA); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CryptStringToBinaryA, FALSE); REGISTER_GLOBAL_MOCK_HOOK(CryptDecodeObjectEx, my_CryptDecodeObjectEx); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CryptDecodeObjectEx, FALSE); REGISTER_GLOBAL_MOCK_HOOK(CryptAcquireContextA, my_CryptAcquireContextA); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CryptAcquireContextA, FALSE); REGISTER_GLOBAL_MOCK_HOOK(CryptImportKey, my_CryptImportKey); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CryptImportKey, FALSE); REGISTER_GLOBAL_MOCK_HOOK(CryptDestroyKey, my_CryptDestroyKey); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CryptDestroyKey, FALSE); REGISTER_GLOBAL_MOCK_HOOK(CertCreateCertificateContext, my_CertCreateCertificateContext); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CertCreateCertificateContext, NULL); REGISTER_GLOBAL_MOCK_HOOK(CryptReleaseContext, my_CryptReleaseContext); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CryptReleaseContext, FALSE); REGISTER_GLOBAL_MOCK_HOOK(CertSetCertificateContextProperty, my_CertSetCertificateContextProperty); REGISTER_GLOBAL_MOCK_FAIL_RETURN(CertSetCertificateContextProperty, FALSE); REGISTER_GLOBAL_MOCK_HOOK(CertFreeCertificateContext, my_CertFreeCertificateContext); #if _MSC_VER > 1500 REGISTER_GLOBAL_MOCK_RETURN(NCryptOpenStorageProvider, ERROR_SUCCESS); REGISTER_GLOBAL_MOCK_FAIL_RETURN(NCryptOpenStorageProvider, ERROR_INVALID_FUNCTION); REGISTER_GLOBAL_MOCK_RETURN(NCryptImportKey, ERROR_SUCCESS); REGISTER_GLOBAL_MOCK_FAIL_RETURN(NCryptImportKey, ERROR_INVALID_FUNCTION); REGISTER_GLOBAL_MOCK_HOOK(NCryptFreeObject, my_NCryptFreeObject); REGISTER_GLOBAL_MOCK_FAIL_RETURN(NCryptFreeObject, ERROR_INVALID_FUNCTION); #endif } TEST_SUITE_CLEANUP(TestClassCleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(initialize) { umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(cleans) { } #if _MSC_VER > 1500 static void setup_x509_schannel_create_ecc_mocks(void) { STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is creating the handle storage space*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("certificate", 0, CRYPT_STRING_ANY, NULL, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "how big is the certificate binary size?"*/ STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is creating the binary storage for the certificate*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("certificate", 0, CRYPT_STRING_ANY, IGNORED_PTR_ARG, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "fill in the certificate in this binary buffer"*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("private key", 0, CRYPT_STRING_ANY, NULL, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "how big is the private key binary size?"*/ STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is creating the binary storage for the private key*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("private key", 0, CRYPT_STRING_ANY, IGNORED_PTR_ARG, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "fill in the private key in this binary buffer"*/ STRICT_EXPECTED_CALL(CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, PKCS_RSA_PRIVATE_KEY, IGNORED_PTR_ARG, IGNORED_NUM_ARG, 0, NULL, NULL, IGNORED_PTR_ARG)).SetReturn(FALSE); /*this is asking "how big is the decoded private key? (from binary)*/ STRICT_EXPECTED_CALL(CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, X509_ECC_PRIVATE_KEY, IGNORED_PTR_ARG, IGNORED_NUM_ARG, 0, NULL, NULL, IGNORED_PTR_ARG)); /*this is asking "how big is the decoded private key? (from binary)*/ STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is allocating space for the decoded private key*/ STRICT_EXPECTED_CALL(CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, X509_ECC_PRIVATE_KEY, IGNORED_PTR_ARG, IGNORED_NUM_ARG, 0, NULL, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); /*this is asking "how big is the decoded private key? (from binary)*/ STRICT_EXPECTED_CALL(CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); /*create a certificate context from an encoded certificate*/ STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(NCryptOpenStorageProvider(IGNORED_PTR_ARG, MS_KEY_STORAGE_PROVIDER, 0)) .IgnoreArgument_pszProviderName(); STRICT_EXPECTED_CALL(NCryptImportKey((NCRYPT_PROV_HANDLE)IGNORED_PTR_ARG, (NCRYPT_KEY_HANDLE)IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, NCRYPT_OVERWRITE_KEY_FLAG)) .IgnoreArgument_hProvider() .IgnoreArgument_hImportKey(); STRICT_EXPECTED_CALL(NCryptFreeObject((HCRYPTKEY)IGNORED_PTR_ARG)) .IgnoreArgument_hObject(); STRICT_EXPECTED_CALL(NCryptFreeObject((HCRYPTKEY)IGNORED_PTR_ARG)) .IgnoreArgument_hObject(); STRICT_EXPECTED_CALL(CertSetCertificateContextProperty(IGNORED_PTR_ARG, CERT_KEY_PROV_INFO_PROP_ID, 0, IGNORED_PTR_ARG)); /*give the private key*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); } #endif static void setup_x509_schannel_create_mocks(void) { STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is creating the handle storage space*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("certificate", 0, CRYPT_STRING_ANY, NULL, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "how big is the certificate binary size?"*/ STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is creating the binary storage for the certificate*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("certificate", 0, CRYPT_STRING_ANY, IGNORED_PTR_ARG, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "fill in the certificate in this binary buffer"*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("private key", 0, CRYPT_STRING_ANY, NULL, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "how big is the private key binary size?"*/ STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is creating the binary storage for the private key*/ STRICT_EXPECTED_CALL(CryptStringToBinaryA("private key", 0, CRYPT_STRING_ANY, IGNORED_PTR_ARG, IGNORED_PTR_ARG, NULL, NULL)); /*this is asking for "fill in the private key in this binary buffer"*/ STRICT_EXPECTED_CALL(CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, PKCS_RSA_PRIVATE_KEY, IGNORED_PTR_ARG, IGNORED_NUM_ARG, 0, NULL, NULL, IGNORED_PTR_ARG)); /*this is asking "how big is the decoded private key? (from binary)*/ STRICT_EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); /*this is allocating space for the decoded private key*/ STRICT_EXPECTED_CALL(CryptDecodeObjectEx(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, PKCS_RSA_PRIVATE_KEY, IGNORED_PTR_ARG, IGNORED_NUM_ARG, 0, NULL, IGNORED_PTR_ARG, IGNORED_PTR_ARG)); /*this is asking "how big is the decoded private key? (from binary)*/ STRICT_EXPECTED_CALL(CertCreateCertificateContext(X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, IGNORED_PTR_ARG, IGNORED_NUM_ARG)); /*create a certificate context from an encoded certificate*/ STRICT_EXPECTED_CALL(CryptAcquireContextA(IGNORED_PTR_ARG, NULL, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, CRYPT_VERIFYCONTEXT)); /*this is acquire a handle to a key container within a cryptographic service provider*/ STRICT_EXPECTED_CALL(CryptImportKey((HCRYPTPROV)IGNORED_PTR_ARG, IGNORED_PTR_ARG, IGNORED_NUM_ARG, (HCRYPTKEY)NULL, 0, IGNORED_PTR_ARG)) /*tranferring the key from the blob to the cryptrographic key provider*/ .IgnoreArgument_hProv(); STRICT_EXPECTED_CALL(CertSetCertificateContextProperty(IGNORED_PTR_ARG, CERT_KEY_PROV_HANDLE_PROP_ID, 0, IGNORED_PTR_ARG)); /*give the private key*/ STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); STRICT_EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); } /*Tests_SRS_X509_SCHANNEL_02_001: [ If x509certificate or x509privatekey are NULL then x509_schannel_create shall fail and return NULL. ]*/ TEST_FUNCTION(x509_schannel_create_with_NULL_x509certificate_fails) { ///arrange ///act X509_SCHANNEL_HANDLE h = x509_schannel_create(NULL, "private key"); ///assert ASSERT_IS_NULL(h); ///cleanup } /*Tests_SRS_X509_SCHANNEL_02_001: [ If x509certificate or x509privatekey are NULL then x509_schannel_create shall fail and return NULL. ]*/ TEST_FUNCTION(x509_schannel_create_with_NULL_x509privatekey_fails) { ///arrange ///act X509_SCHANNEL_HANDLE h = x509_schannel_create("certificate", NULL); ///assert ASSERT_IS_NULL(h); ///cleanup } /*Tests_SRS_X509_SCHANNEL_02_002: [ x509_schannel_create shall convert the certificate to binary form by calling CryptStringToBinaryA. ]*/ /*Tests_SRS_X509_SCHANNEL_02_003: [ x509_schannel_create shall convert the private key to binary form by calling CryptStringToBinaryA. ]*/ /*Tests_SRS_X509_SCHANNEL_02_004: [ x509_schannel_create shall decode the private key by calling CryptDecodeObjectEx. ]*/ /*Tests_SRS_X509_SCHANNEL_02_005: [ x509_schannel_create shall call CryptAcquireContext. ]*/ /*Tests_SRS_X509_SCHANNEL_02_006: [ x509_schannel_create shall import the private key by calling CryptImportKey. ]*/ /*Tests_SRS_X509_SCHANNEL_02_007: [ x509_schannel_create shall create a cerficate context by calling CertCreateCertificateContext. ]*/ /*Tests_SRS_X509_SCHANNEL_02_008: [ x509_schannel_create shall call set the certificate private key by calling CertSetCertificateContextProperty. ]*/ /*Tests_SRS_X509_SCHANNEL_02_009: [ If all the operations above succeed, then x509_schannel_create shall succeeds and return a non-NULL X509_SCHANNEL_HANDLE. ]*/ TEST_FUNCTION(x509_schannel_create_succeeds) { ///arrange X509_SCHANNEL_HANDLE h; setup_x509_schannel_create_mocks(); ///act h = x509_schannel_create("certificate", "private key"); ///assert ASSERT_IS_NOT_NULL(h); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup x509_schannel_destroy(h); } /*Tests_SRS_X509_SCHANNEL_02_010: [ Otherwise, x509_schannel_create shall fail and return a NULL X509_SCHANNEL_HANDLE. ]*/ TEST_FUNCTION(x509_schannel_negative_test_cases) { ///arrange size_t i; size_t calls_that_cannot_fail[] = { 7, 14, /*gballoc_free*/ 15, /*gballoc_free*/ 16, /*gballoc_free*/ }; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); setup_x509_schannel_create_mocks(); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { ///arrange size_t j; for (j = 0; j 1500 /* Codes_SRS_X509_SCHANNEL_07_001: [ x509_schannel_create shall determine whether the certificate is of type RSA or ECC. ] */ TEST_FUNCTION(x509_schannel_create_ecc_succeeds) { ///arrange X509_SCHANNEL_HANDLE h; setup_x509_schannel_create_ecc_mocks(); ///act h = x509_schannel_create("certificate", "private key"); ///assert ASSERT_IS_NOT_NULL(h); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup x509_schannel_destroy(h); } #endif /*Tests_SRS_X509_SCHANNEL_02_011: [ If parameter x509_schannel_handle is NULL then x509_schannel_destroy shall do nothing. ]*/ TEST_FUNCTION(x509_schannel_destroy_with_NULL_handle_does_nothing) { ///arrange ///act x509_schannel_destroy(NULL); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup - none required } /*Tests_SRS_X509_SCHANNEL_02_012: [ Otherwise, x509_schannel_destroy shall free all used resources. ]*/ TEST_FUNCTION(x509_schannel_destroy_succeeds) { ///arrange X509_SCHANNEL_HANDLE h = x509_schannel_create("certificate", "private key"); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(CryptDestroyKey((HCRYPTKEY)IGNORED_PTR_ARG)) .IgnoreArgument_hKey(); STRICT_EXPECTED_CALL(CryptReleaseContext((HCRYPTPROV)IGNORED_PTR_ARG, 0)) .IgnoreArgument_hProv(); STRICT_EXPECTED_CALL(CertFreeCertificateContext(IGNORED_PTR_ARG)) .IgnoreArgument_pCertContext(); STRICT_EXPECTED_CALL(gballoc_free(h)); ///act x509_schannel_destroy(h); ///assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup - none required } /*Tests_SRS_X509_SCHANNEL_02_013: [ If parameter x509_schannel_handle is NULL then x509_schannel_get_certificate_context shall return NULL. ]*/ TEST_FUNCTION(x509_schannel_get_certificate_context_with_NULL_handle_returns_NULL) { ///arrange ///act PCCERT_CONTEXT p = x509_schannel_get_certificate_context(NULL); ///assert ASSERT_IS_NULL(p); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /*Tests_SRS_X509_SCHANNEL_02_014: [ Otherwise, x509_schannel_get_certificate_context shall return a non-NULL PCCERT_CONTEXT pointer. ]*/ TEST_FUNCTION(x509_schannel_get_certificate_context_succeeds) { ///arrange PCCERT_CONTEXT p; X509_SCHANNEL_HANDLE h = x509_schannel_create("certificate", "private key"); umock_c_reset_all_calls(); ///act p = x509_schannel_get_certificate_context(h); ///assert ASSERT_IS_NOT_NULL(p); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup x509_schannel_destroy(h); } END_TEST_SUITE(x509_schannel_unittests) #endif /*WIN32*/azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/xio_ut/000077500000000000000000000000001362133436400320055ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000007501362133436400344700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/xio_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName xio_ut) set(${theseTestsName}_test_files ${theseTestsName}.c ) set(${theseTestsName}_c_files ../../src/xio.c ) set(${theseTestsName}_h_files ) build_c_test_artifacts(${theseTestsName} ON "tests/azure_c_shared_utility_tests") compile_c_test_artifacts_as(${theseTestsName} C99) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/xio_ut/main.c000066400000000000000000000002441362133436400330750ustar00rootroot00000000000000#include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(xio_unittests, failedTestCount); return failedTestCount; } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/xio_ut/xio_ut.c000066400000000000000000000755211362133436400334720ustar00rootroot00000000000000// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #else #include #endif #include "testrunnerswitcher.h" static unsigned int g_fail_alloc_calls; static void* my_gballoc_malloc(size_t size) { void* result = NULL; if (g_fail_alloc_calls == 0) { result = malloc(size); } return result; } static void my_gballoc_free(void* ptr) { free(ptr); } #include "umock_c.h" #include "umocktypes_charptr.h" #include "umock_c_negative_tests.h" #define ENABLE_MOCKS #include "azure_c_shared_utility/gballoc.h" #include "azure_c_shared_utility/optionhandler.h" #undef ENABLE_MOCKS #include "azure_c_shared_utility/xio.h" static CONCRETE_IO_HANDLE TEST_CONCRETE_IO_HANDLE = (CONCRETE_IO_HANDLE)0x4242; #define ENABLE_MOCKS MOCK_FUNCTION_WITH_CODE(, CONCRETE_IO_HANDLE, test_xio_create, void*, xio_create_parameters) MOCK_FUNCTION_END(TEST_CONCRETE_IO_HANDLE) MOCK_FUNCTION_WITH_CODE(, void, test_xio_destroy, CONCRETE_IO_HANDLE, handle) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, int, test_xio_open, CONCRETE_IO_HANDLE, handle, ON_IO_OPEN_COMPLETE, on_io_open_complete, void*, on_io_open_complete_context, ON_BYTES_RECEIVED, on_bytes_received, void*, on_bytes_received_context, ON_IO_ERROR, on_io_error, void*, on_io_error_context) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(, int, test_xio_close, CONCRETE_IO_HANDLE, handle, ON_IO_CLOSE_COMPLETE, on_io_close_complete, void*, callback_context) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(, int, test_xio_send, CONCRETE_IO_HANDLE, handle, const void*, buffer, size_t, size, ON_SEND_COMPLETE, on_send_complete, void*, callback_context) MOCK_FUNCTION_END(0) MOCK_FUNCTION_WITH_CODE(, void, test_xio_dowork, CONCRETE_IO_HANDLE, handle) MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, int, test_xio_setoption, CONCRETE_IO_HANDLE, handle, const char*, optionName, const void*, value) MOCK_FUNCTION_END(0) #include "azure_c_shared_utility/umock_c_prod.h" /*this function will clone an option given by name and value*/ MOCKABLE_FUNCTION(,void*, test_xio_CloneOption, const char*, name, const void*, value); MOCKABLE_FUNCTION(, void, test_xio_DestroyOption, const char*, name, const void*, value); MOCKABLE_FUNCTION(, OPTIONHANDLER_HANDLE, test_xio_retrieveoptions, CONCRETE_IO_HANDLE, handle); #undef ENABLE_MOCKS #ifdef __cplusplus extern "C" { #endif void test_on_bytes_received(void* context, const unsigned char* buffer, size_t size) { (void)context; (void)buffer; (void)size; } void test_on_io_open_complete(void* context, IO_OPEN_RESULT open_result) { (void)context; (void)open_result; } void test_on_io_close_complete(void* context) { (void)context; } void test_on_io_error(void* context) { (void)context; } void test_on_send_complete(void* context, IO_SEND_RESULT send_result) { (void)context; (void)send_result; } #ifdef __cplusplus } #endif const IO_INTERFACE_DESCRIPTION test_io_description = { test_xio_retrieveoptions, test_xio_create, test_xio_destroy, test_xio_open, test_xio_close, test_xio_send, test_xio_dowork, test_xio_setoption }; static TEST_MUTEX_HANDLE g_testByTest; DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } static OPTIONHANDLER_HANDLE my_OptionHandler_Create(pfCloneOption cloneOption, pfDestroyOption destroyOption, pfSetOption setOption) { (void)cloneOption, (void)destroyOption, (void)setOption; return (OPTIONHANDLER_HANDLE)my_gballoc_malloc(1); } static OPTIONHANDLER_HANDLE my_test_xio_retrieveoptions(CONCRETE_IO_HANDLE handle) { (void)(handle); return (OPTIONHANDLER_HANDLE)my_gballoc_malloc(2); } static OPTIONHANDLER_RESULT my_OptionHandler_AddOption(OPTIONHANDLER_HANDLE handle, const char* name, const void* value) { (void)name, (void)handle, (void)value; /*if an option is added here, it is because it was cloned (malloc'd) so safe to free it here*/ my_gballoc_free((void*)value); return OPTIONHANDLER_OK; } static void my_OptionHandler_Destroy(OPTIONHANDLER_HANDLE handle) { my_gballoc_free((void*)handle); } BEGIN_TEST_SUITE(xio_unittests) TEST_SUITE_INITIALIZE(suite_init) { int result; g_testByTest = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(g_testByTest); umock_c_init(on_umock_c_error); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(CONCRETE_IO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(XIO_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(LOGGER_LOG, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_SEND_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_CLOSE_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_OPEN_COMPLETE, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_BYTES_RECEIVED, void*); REGISTER_UMOCK_ALIAS_TYPE(ON_IO_ERROR, void*); REGISTER_UMOCK_ALIAS_TYPE(pfCloneOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfDestroyOption, void*); REGISTER_UMOCK_ALIAS_TYPE(pfSetOption, void*); REGISTER_UMOCK_ALIAS_TYPE(OPTIONHANDLER_HANDLE, void*); REGISTER_GLOBAL_MOCK_HOOK(gballoc_malloc, my_gballoc_malloc); REGISTER_GLOBAL_MOCK_HOOK(gballoc_free, my_gballoc_free); REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_Create, my_OptionHandler_Create); REGISTER_GLOBAL_MOCK_FAIL_RETURN(OptionHandler_Create, (OPTIONHANDLER_HANDLE)NULL); REGISTER_GLOBAL_MOCK_HOOK(test_xio_retrieveoptions, my_test_xio_retrieveoptions); REGISTER_GLOBAL_MOCK_FAIL_RETURN(test_xio_retrieveoptions, (OPTIONHANDLER_HANDLE)NULL); REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_AddOption, my_OptionHandler_AddOption); REGISTER_GLOBAL_MOCK_FAIL_RETURN(OptionHandler_AddOption, OPTIONHANDLER_ERROR); REGISTER_GLOBAL_MOCK_HOOK(OptionHandler_Destroy, my_OptionHandler_Destroy); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(g_testByTest); } TEST_FUNCTION_INITIALIZE(method_init) { if (TEST_MUTEX_ACQUIRE(g_testByTest)) { ASSERT_FAIL("Could not acquire test serialization mutex."); } g_fail_alloc_calls = 0; umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(method_cleanup) { TEST_MUTEX_RELEASE(g_testByTest); } /* xio_create */ /* Tests_SRS_XIO_01_001: [xio_create shall return on success a non-NULL handle to a new IO interface.] */ /* Tests_SRS_XIO_01_002: [In order to instantiate the concrete IO implementation the function concrete_io_create from the io_interface_description shall be called, passing the xio_create_parameters argument.] */ TEST_FUNCTION(xio_create_with_all_args_except_interface_description_NULL_succeeds) { // arrange XIO_HANDLE result; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_xio_create(NULL)); // act result = xio_create(&test_io_description, NULL); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(result); } /* Tests_SRS_XIO_01_002: [In order to instantiate the concrete IO implementation the function concrete_io_create from the io_interface_description shall be called, passing the xio_create_parameters argument.] */ TEST_FUNCTION(xio_create_passes_the_args_to_the_concrete_io_implementation) { // arrange XIO_HANDLE result; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); STRICT_EXPECTED_CALL(test_xio_create((void*)0x4243)); // act result = xio_create(&test_io_description, (void*)0x4243); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(result); } /* Tests_SRS_XIO_01_016: [If the underlying concrete_xxio_create call fails, xxio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_create_fails_then_xio_create_fails) { // arrange XIO_HANDLE result; STRICT_EXPECTED_CALL(test_xio_create(NULL)) .SetReturn((CONCRETE_IO_HANDLE)NULL); EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act result = xio_create(&test_io_description, NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_003: [If the argument io_interface_description is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_io_interface_description_is_NULL_then_xio_create_fails) { // arrange // act XIO_HANDLE result = xio_create(NULL, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_retrieveoptions_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { NULL, test_xio_create, test_xio_destroy, test_xio_open, test_xio_close, test_xio_send, test_xio_dowork, test_xio_setoption }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_create_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { test_xio_retrieveoptions, NULL, test_xio_destroy, test_xio_open, test_xio_close, test_xio_send, test_xio_dowork, test_xio_setoption }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_destroy_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { test_xio_retrieveoptions, test_xio_create, NULL, test_xio_open, test_xio_close, test_xio_send, test_xio_dowork, test_xio_setoption }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_open_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { test_xio_retrieveoptions, test_xio_create, test_xio_destroy, NULL, test_xio_close, test_xio_send, test_xio_dowork, test_xio_setoption }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_close_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { test_xio_retrieveoptions, test_xio_create, test_xio_destroy, test_xio_open, NULL, test_xio_send, test_xio_dowork, test_xio_setoption }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_send_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { test_xio_retrieveoptions, test_xio_create, test_xio_destroy, test_xio_open, test_xio_close, NULL, test_xio_dowork, test_xio_setoption }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_dowork_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { test_xio_retrieveoptions, test_xio_create, test_xio_destroy, test_xio_open, test_xio_close, test_xio_send, NULL, test_xio_setoption }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_XIO_01_004: [If any io_interface_description member is NULL, xio_create shall return NULL.] */ TEST_FUNCTION(when_concrete_xio_setoption_is_NULL_then_xio_create_fails) { // arrange const IO_INTERFACE_DESCRIPTION io_description_null = { test_xio_retrieveoptions, test_xio_create, test_xio_destroy, test_xio_open, test_xio_close, test_xio_send, test_xio_dowork, NULL }; // act XIO_HANDLE result = xio_create(&io_description_null, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* Tests_SRS_XIO_01_017: [If allocating the memory needed for the IO interface fails then xio_create shall return NULL.] */ TEST_FUNCTION(when_allocating_memory_Fails_then_xio_create_fails) { // arrange XIO_HANDLE result; g_fail_alloc_calls = 1; EXPECTED_CALL(gballoc_malloc(IGNORED_NUM_ARG)) .SetReturn((void*)NULL); // act result = xio_create(&test_io_description, NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_IS_NULL(result); } /* xio_destroy */ /* Tests_SRS_XIO_01_005: [xio_destroy shall free all resources associated with the IO handle.] */ /* Tests_SRS_XIO_01_006: [xio_destroy shall also call the concrete_xio_destroy function that is member of the io_interface_description argument passed to xio_create, while passing as argument to concrete_xio_destroy the result of the underlying concrete_xio_create handle that was called as part of the xio_create call.] */ TEST_FUNCTION(xio_destroy_calls_concrete_xio_destroy_and_frees_memory) { // arrange XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_destroy(TEST_CONCRETE_IO_HANDLE)); EXPECTED_CALL(gballoc_free(IGNORED_PTR_ARG)); // act xio_destroy(handle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_XIO_01_007: [If handle is NULL, xio_destroy shall do nothing.] */ TEST_FUNCTION(xio_destroy_with_null_handle_does_nothing) { // arrange // act xio_destroy(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* xio_open */ /* Tests_SRS_XIO_01_019: SRS_XIO_01_019: [xio_open shall call the specific concrete_xio_open function specified in xio_create, passing callback function and context arguments for three events: open completed, bytes received, and IO error.] */ /* Tests_SRS_XIO_01_020: [On success, xio_open shall return 0.] */ TEST_FUNCTION(xio_open_calls_the_underlying_concrete_xio_open_and_succeeds) { // arrange int result; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_open(TEST_CONCRETE_IO_HANDLE, test_on_io_open_complete, (void*)1, test_on_bytes_received, (void*)2, test_on_io_error, (void*)3)); // act result = xio_open(handle, test_on_io_open_complete, (void*)1, test_on_bytes_received, (void*)2, test_on_io_error, (void*)3); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_01_021: [If handle is NULL, xio_open shall return a non-zero value.] */ TEST_FUNCTION(xio_open_with_NULL_handle_fails) { // arrange // act int result = xio_open(NULL, test_on_io_open_complete, (void*)1, test_on_bytes_received, (void*)2, test_on_io_error, (void*)3); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_XIO_01_022: [If the underlying concrete_xio_open fails, xio_open shall return a non-zero value.] */ TEST_FUNCTION(when_the_concrete_xio_open_fails_then_xio_open_fails) { // arrange int result; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_open(TEST_CONCRETE_IO_HANDLE, test_on_io_open_complete, (void*)1, test_on_bytes_received, (void*)2, test_on_io_error, (void*)3)) .SetReturn(1); // act result = xio_open(handle, test_on_io_open_complete, (void*)1, test_on_bytes_received, (void*)2, test_on_io_error, (void*)3); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* xio_close */ /* Tests_SRS_XIO_01_023: [xio_close shall call the specific concrete_xio_close function specified in xio_create.] */ /* Tests_SRS_XIO_01_024: [On success, xio_close shall return 0.] */ TEST_FUNCTION(xio_close_calls_the_underlying_concrete_xio_close_and_succeeds) { // arrange int result; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_close(TEST_CONCRETE_IO_HANDLE, test_on_io_close_complete, (void*)0x4242)); // act result = xio_close(handle, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_01_025: [If handle is NULL, xio_close shall return a non-zero value.] */ TEST_FUNCTION(xio_close_with_NULL_handle_fails) { // arrange // act int result = xio_close(NULL, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_XIO_01_026: [If the underlying concrete_xio_close fails, xio_close shall return a non-zero value.] */ TEST_FUNCTION(when_the_concrete_xio_close_fails_then_xio_close_fails) { // arrange int result; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_close(TEST_CONCRETE_IO_HANDLE, test_on_io_close_complete, (void*)0x4242)) .SetReturn(1); // act result = xio_close(handle, test_on_io_close_complete, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* xio_send */ /* Tests_SRS_XIO_01_008: [xio_send shall pass the sequence of bytes pointed to by buffer to the concrete IO implementation specified in xio_create, by calling the concrete_xio_send function while passing down the buffer and size arguments to it.] */ /* Tests_SRS_XIO_01_009: [On success, xio_send shall return 0.] */ TEST_FUNCTION(xio_send_calls_the_underlying_concrete_xio_send_and_succeeds) { // arrange int result; unsigned char send_data[] = { 0x42, 43 }; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_send(TEST_CONCRETE_IO_HANDLE, send_data, sizeof(send_data), test_on_send_complete, (void*)0x4242)); // act result = xio_send(handle, send_data, sizeof(send_data), test_on_send_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_01_010: [If handle is NULL, xio_send shall return a non-zero value.] */ TEST_FUNCTION(xio_send_with_NULL_handle_fails) { // arrange int result; unsigned char send_data[] = { 0x42, 43 }; umock_c_reset_all_calls(); // act result = xio_send(NULL, send_data, sizeof(send_data), test_on_send_complete, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_XIO_01_015: [If the underlying concrete_xio_send fails, xio_send shall return a non-zero value.] */ TEST_FUNCTION(when_the_concrete_xio_send_fails_then_xio_send_fails) { // arrange int result; unsigned char send_data[] = { 0x42, 43 }; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_send(TEST_CONCRETE_IO_HANDLE, send_data, sizeof(send_data), test_on_send_complete, (void*)0x4242)) .SetReturn(42); // act result = xio_send(handle, send_data, sizeof(send_data), test_on_send_complete, (void*)0x4242); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_01_011: [No error check shall be performed on buffer and size.] */ TEST_FUNCTION(xio_send_with_NULL_buffer_and_nonzero_length_passes_the_args_down_and_succeeds) { // arrange int result; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_send(TEST_CONCRETE_IO_HANDLE, NULL, 1, test_on_send_complete, (void*)0x4242)); // act result = xio_send(handle, NULL, 1, test_on_send_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_01_011: [No error check shall be performed on buffer and size.] */ TEST_FUNCTION(xio_send_with_NULL_buffer_and_zero_length_passes_the_args_down_and_succeeds) { // arrange int result; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_send(TEST_CONCRETE_IO_HANDLE, NULL, 0, test_on_send_complete, (void*)0x4242)); // act result = xio_send(handle, NULL, 0, test_on_send_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_01_011: [No error check shall be performed on buffer and size.] */ TEST_FUNCTION(xio_send_with_non_NULL_buffer_and_zero_length_passes_the_args_down_and_succeeds) { // arrange int result; unsigned char send_data[] = { 0x42, 43 }; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_send(TEST_CONCRETE_IO_HANDLE, send_data, 0, test_on_send_complete, (void*)0x4242)); // act result = xio_send(handle, send_data, 0, test_on_send_complete, (void*)0x4242); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* xio_dowork */ /* Tests_SRS_XIO_01_012: [xio_dowork shall call the concrete IO implementation specified in xio_create, by calling the concrete_xio_dowork function.] */ TEST_FUNCTION(xio_dowork_calls_the_concrete_dowork_and_succeeds) { // arrange XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_dowork(TEST_CONCRETE_IO_HANDLE)); // act xio_dowork(handle); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_01_018: [When the handle argument is NULL, xio_dowork shall do nothing.] */ TEST_FUNCTION(xio_dowork_with_NULL_handle_does_nothing) { // arrange // act xio_dowork(NULL); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } /* Tests_SRS_XIO_03_030: [If the xio argument or the optionName argument is NULL, xio_setoption shall return a non-zero value.] */ TEST_FUNCTION(xio_setoption_with_NULL_handle_fails) { // arrange int result; const char* optionName = "TheOptionName"; const void* optionValue = (void*)1; umock_c_reset_all_calls(); // act result = xio_setoption(NULL, optionName, optionValue); // assert ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_XIO_03_030: [If the xio argument or the optionName argument is NULL, xio_setoption shall return a non-zero value.] */ TEST_FUNCTION(xio_setoption_with_NULL_optionName_fails) { // arrange const void* optionValue = (void*)1; int result; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); // act result = xio_setoption(handle, NULL, optionValue); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_003_028: [xio_setoption shall pass the optionName and value to the concrete IO implementation specified in xio_create by invoking the concrete_xio_setoption function.] */ /* Tests_SRS_XIO_03_029: [xio_setoption shall return 0 upon success.] */ TEST_FUNCTION(xio_setoption_with_valid_args_passes_the_args_down_and_succeeds) { // arrange int result; const char* optionName = "TheOptionName"; const void* optionValue = (void*)1; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_setoption(TEST_CONCRETE_IO_HANDLE, optionName, optionValue)); // act result = xio_setoption(handle, optionName, optionValue); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /* Tests_SRS_XIO_03_031: [If the underlying concrete_xio_setoption fails, xio_setOption shall return a non-zero value.] */ TEST_FUNCTION(xio_setoption_fails_when_concrete_xio_setoption_fails) { // arrange int result; const char* optionName = "TheOptionName"; const void* optionValue = (void*)1; XIO_HANDLE handle = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); STRICT_EXPECTED_CALL(test_xio_setoption(TEST_CONCRETE_IO_HANDLE, optionName, optionValue)) .SetReturn(42); // act result = xio_setoption(handle, optionName, optionValue); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); // cleanup xio_destroy(handle); } /*Tests_SRS_XIO_02_001: [ If argument xio is NULL then xio_retrieveoptions shall fail and return NULL. ]*/ TEST_FUNCTION(xio_retrieveoptions_with_NULL_xio_fails) { ///arrange ///act OPTIONHANDLER_HANDLE h = xio_retrieveoptions(NULL); ///assert ASSERT_IS_NULL(h); ///cleanup } /*this function exists for the purpose of sharing code between happy and unhappy paths*/ static void xio_retrieveoptions_inert_path(void) { STRICT_EXPECTED_CALL(OptionHandler_Create(IGNORED_PTR_ARG, IGNORED_PTR_ARG, (pfSetOption)xio_setoption)) .IgnoreArgument_cloneOption() .IgnoreArgument_destroyOption(); STRICT_EXPECTED_CALL(test_xio_retrieveoptions(IGNORED_PTR_ARG)) .IgnoreArgument_handle(); STRICT_EXPECTED_CALL(OptionHandler_AddOption(IGNORED_PTR_ARG, "concreteOptions", IGNORED_PTR_ARG)) .IgnoreArgument_handle() .IgnoreArgument_value(); } /*Tests_SRS_XIO_02_002: [ xio_retrieveoptions shall create a OPTIONHANDLER_HANDLE by calling OptionHandler_Create passing xio_setoption as setOption argument and xio_CloneOption and xio_DestroyOption for cloneOption and destroyOption. ]*/ /*Tests_SRS_XIO_02_003: [ xio_retrieveoptions shall retrieve the concrete handle's options by a call to concrete_io_retrieveoptions. ]*/ /*Tests_SRS_XIO_02_004: [ xio_retrieveoptions shall add a hardcoded option named concreteOptions having the same content as the concrete handle's options. ]*/ /*Tests_SRS_XIO_02_006: [ Otherwise, xio_retrieveoptions shall succeed and return a non-NULL handle. ]*/ TEST_FUNCTION(xio_retrieveoptions_happypath) { ///arrange OPTIONHANDLER_HANDLE h; XIO_HANDLE x = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); xio_retrieveoptions_inert_path(); ///act h = xio_retrieveoptions(x); ///assert ASSERT_IS_NOT_NULL(h); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); ///cleanup OptionHandler_Destroy(h); xio_destroy(x); } /*Tests_SRS_XIO_02_005: [ If any operation fails, then xio_retrieveoptions shall fail and return NULL. ]*/ TEST_FUNCTION(xio_retrieveoptions_unhappypaths) { ///arrange XIO_HANDLE x; size_t i; int negativeTestsInitResult = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, negativeTestsInitResult); x = xio_create(&test_io_description, NULL); umock_c_reset_all_calls(); xio_retrieveoptions_inert_path(); umock_c_negative_tests_snapshot(); ///act for (i = 0; i < umock_c_negative_tests_call_count(); i++) { char temp_str[128]; OPTIONHANDLER_HANDLE h; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); ///act (void)sprintf(temp_str, "On failed call %zu", i); ///act h = xio_retrieveoptions(x); ///assert ASSERT_IS_NULL(h, temp_str); } ///cleanup xio_destroy(x); umock_c_negative_tests_deinit(); } END_TEST_SUITE(xio_unittests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/000077500000000000000000000000001362133436400313745ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000010051362133436400340510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. #this is CMakeLists for testtools. It does nothing, except loads other folders include("../configs/azure_c_shared_utilityFunctions.cmake") usePermissiveRulesForSamplesAndTests() if(NOT ${use_installed_dependencies}) add_subdirectory(ctest) add_subdirectory(testrunner) add_subdirectory(umock-c) endif() add_subdirectory(sal) add_subdirectory(micromock) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/000077500000000000000000000000001362133436400334605ustar00rootroot00000000000000SerialPort.sln000066400000000000000000000017211362133436400362040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerialPort", "SerialPort\SerialPort.csproj", "{D09A2AFE-DF3D-41E1-80CF-37FA64A04E49}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D09A2AFE-DF3D-41E1-80CF-37FA64A04E49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D09A2AFE-DF3D-41E1-80CF-37FA64A04E49}.Debug|Any CPU.Build.0 = Debug|Any CPU {D09A2AFE-DF3D-41E1-80CF-37FA64A04E49}.Release|Any CPU.ActiveCfg = Release|Any CPU {D09A2AFE-DF3D-41E1-80CF-37FA64A04E49}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal SerialPort/000077500000000000000000000000001362133436400354655ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPortEnumerations.cs000066400000000000000000000136061362133436400404730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortusing System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace Azure.IoT.Internal.Tools { [Flags] public enum FileAccess : uint { // // Standart Section // AccessSystemSecurity = 0x1000000, // AccessSystemAcl access type MaximumAllowed = 0x2000000, // MaximumAllowed access type Delete = 0x10000, ReadControl = 0x20000, WriteDAC = 0x40000, WriteOwner = 0x80000, Synchronize = 0x100000, StandardRightsRequired = 0xF0000, StandardRightsRead = ReadControl, StandardRightsWrite = ReadControl, StandardRightsExecute = ReadControl, StandardRightsAll = 0x1F0000, SpecificRightsAll = 0xFFFF, FILE_READ_DATA = 0x0001, // file & pipe FILE_LIST_DIRECTORY = 0x0001, // directory FILE_WRITE_DATA = 0x0002, // file & pipe FILE_ADD_FILE = 0x0002, // directory FILE_APPEND_DATA = 0x0004, // file FILE_ADD_SUBDIRECTORY = 0x0004, // directory FILE_CREATE_PIPE_INSTANCE = 0x0004, // named pipe FILE_READ_EA = 0x0008, // file & directory FILE_WRITE_EA = 0x0010, // file & directory FILE_EXECUTE = 0x0020, // file FILE_TRAVERSE = 0x0020, // directory FILE_DELETE_CHILD = 0x0040, // directory FILE_READ_ATTRIBUTES = 0x0080, // all FILE_WRITE_ATTRIBUTES = 0x0100, // all // // Generic Section // GenericRead = 0x80000000, GenericWrite = 0x40000000, GenericExecute = 0x20000000, GenericAll = 0x10000000, SPECIFIC_RIGHTS_ALL = 0x00FFFF, FILE_ALL_ACCESS = StandardRightsRequired | Synchronize | 0x1FF, FILE_GENERIC_READ = StandardRightsRead | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | Synchronize, FILE_GENERIC_WRITE = StandardRightsWrite | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | Synchronize, FILE_GENERIC_EXECUTE = StandardRightsExecute | FILE_READ_ATTRIBUTES | FILE_EXECUTE | Synchronize } [Flags] public enum FileShare : uint { /// /// /// None = 0x00000000, /// /// Enables subsequent open operations on an object to request read access. /// Otherwise, other processes cannot open the object if they request read access. /// If this flag is not specified, but the object has been opened for read access, the function fails. /// Read = 0x00000001, /// /// Enables subsequent open operations on an object to request write access. /// Otherwise, other processes cannot open the object if they request write access. /// If this flag is not specified, but the object has been opened for write access, the function fails. /// Write = 0x00000002, /// /// Enables subsequent open operations on an object to request delete access. /// Otherwise, other processes cannot open the object if they request delete access. /// If this flag is not specified, but the object has been opened for delete access, the function fails. /// Delete = 0x00000004 } public enum CreationDisposition : uint { /// /// Creates a new file. The function fails if a specified file exists. /// New = 1, /// /// Creates a new file, always. /// If a file exists, the function overwrites the file, clears the existing attributes, combines the specified file attributes, /// and flags with FILE_ATTRIBUTE_ARCHIVE, but does not set the security descriptor that the SECURITY_ATTRIBUTES structure specifies. /// CreateAlways = 2, /// /// Opens a file. The function fails if the file does not exist. /// OpenExisting = 3, /// /// Opens a file, always. /// If a file does not exist, the function creates a file as if dwCreationDisposition is CREATE_NEW. /// OpenAlways = 4, /// /// Opens a file and truncates it so that its size is 0 (zero) bytes. The function fails if the file does not exist. /// The calling process must open the file with the GENERIC_WRITE access right. /// TruncateExisting = 5 } [Flags] public enum FileMode : uint { CreateAlways = 2, CreateNew = 1, OpenAlways = 4, OpenExisting = 3, TruncateExisting = 5 } [Flags] public enum FileAttributes : uint { Readonly = 0x00000001, Hidden = 0x00000002, System = 0x00000004, Directory = 0x00000010, Archive = 0x00000020, Device = 0x00000040, Normal = 0x00000080, Temporary = 0x00000100, SparseFile = 0x00000200, ReparsePoint = 0x00000400, Compressed = 0x00000800, Offline = 0x00001000, NotContentIndexed = 0x00002000, Encrypted = 0x00004000, Write_Through = 0x80000000, Overlapped = 0x40000000, NoBuffering = 0x20000000, RandomAccess = 0x10000000, SequentialScan = 0x08000000, DeleteOnClose = 0x04000000, BackupSemantics = 0x02000000, PosixSemantics = 0x01000000, OpenReparsePoint = 0x00200000, OpenNoRecall = 0x00100000, FirstPipeInstance = 0x00080000 } } Program.cs000066400000000000000000000015401362133436400374230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace Azure.IoT.Internal.Tools { class Program { static void Main(string[] args) { SerialPort sp = new SerialPort("COM4"); if (sp.Open()) { sp.SetBreakState(); Thread.Sleep(50); sp.ClearBreakState(); sp.SetDefaultTimeouts(); SerialPortState cfg = sp.GetState(); cfg.BaudRate = 115200; sp.SetState(cfg); for (int i = 0; i < 3; i++) { string message = sp.ReadLine(); bool result = sp.WriteLine("cataca"); } sp.Close(); } } } } Properties/000077500000000000000000000000001362133436400376215ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortAssemblyInfo.cs000066400000000000000000000026001362133436400425410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPort/Propertiesusing System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("NativeSerialTest")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NativeSerialTest")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("056e53a9-48fa-4bde-9010-50888995b813")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] SerialPort.cs000066400000000000000000000203251362133436400401020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortusing Microsoft.Win32.SafeHandles; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Azure.IoT.Internal.Tools { /// /// Provides a wrapper around Win32 API for serial port communication. /// /// /// Motivation for this wrapper: /// The .Net 4.5 SerialPort currently has a bug in BreakState, making it unusable if this function is needed. /// public class SerialPort : IDisposable { #region Data private IntPtr m_fileHandle; private string m_portName; #endregion Data public bool IsOpen { get { return m_fileHandle != IntPtr.Zero && m_fileHandle.ToInt32() != Win32Api.INVALID_HANDLE_VALUE; } } public SerialPort(string portName) { m_portName = portName; } /// /// Opens the serial port for communication. /// /// True if the port is open successfully. public bool Open() { m_fileHandle = Win32Api.CreateFile(m_portName); return IsOpen; } /// /// Closes the serial port for communication. /// /// True if the port is closed successfully. public bool Close() { if (Win32Api.CloseHandle(m_fileHandle)) { m_fileHandle = IntPtr.Zero; } return !IsOpen; } /// /// Sets the serial port into break state. /// /// SetBreakState() followed by ClearBrakeState() is equivalent to sending CTRL+BREAK. /// True if the state was set correctly, false otherwise. public bool SetBreakState() { return Win32Api.SetCommBreak(m_fileHandle); } /// /// Clears the break state set in the serial port. /// /// True if the state was set correctly, false otherwise. public bool ClearBreakState() { return Win32Api.ClearCommBreak(m_fileHandle); } /// /// Gets the timeouts currently set for the serial port communication. /// /// The timeouts currently set. public SerialPortTimeouts GetTimeouts() { if (!IsOpen) throw new InvalidOperationException("Port is not open."); SerialPortTimeouts commTimeouts = new SerialPortTimeouts(); if (!Win32Api.GetCommTimeouts(m_fileHandle, ref commTimeouts)) { throw new Win32Exception(Win32Api.GetLastError(), "'GetCommTimeouts()' failed"); } return commTimeouts; } /// /// Sets the timeouts for the serial port communication. /// /// Timeouts to be set. public void SetTimeouts(SerialPortTimeouts timeouts) { if (!Win32Api.SetCommTimeouts(m_fileHandle, ref timeouts)) { throw new Win32Exception(Win32Api.GetLastError(), "'SetCommTimeouts()' failed"); } } /// /// Sets the read timeouts to return only the contents in the buffer, returning immediatelly. /// public void SetDefaultTimeouts() { if (IsOpen) { SerialPortTimeouts timeouts = this.GetTimeouts(); timeouts.ReadIntervalTimeout = UInt32.MaxValue; timeouts.ReadTotalTimeoutConstant = 0; timeouts.ReadTotalTimeoutMultiplier = 0; this.SetTimeouts(timeouts); } } /// /// Gets the current state (config parameters) set on the serial port. /// /// The current serial port state. public SerialPortState GetState() { if (!IsOpen) throw new InvalidOperationException("Port is not open."); SerialPortState dcb = new SerialPortState(); if (!Win32Api.GetCommState(m_fileHandle, ref dcb)) { throw new Win32Exception(Win32Api.GetLastError(), "'GetCommState()' failed"); } return dcb; } /// /// Sets the state (config parameters) on the serial port. /// /// The configuation to be applied to the serial port. public void SetState(SerialPortState state) { if (!IsOpen) throw new InvalidOperationException("Port is not open."); if (!Win32Api.SetCommState(m_fileHandle, ref state)) { throw new Win32Exception(Win32Api.GetLastError(), "'SetCommState()' failed"); } } /// /// Reads data from the serial port. /// /// Array where to store the bytes read. /// (Not used) /// Number of bytes to read. /// Number of bytes actually read. public int Read(byte[] data, int offset, int count) { if (!IsOpen) throw new InvalidOperationException("Port is not open."); uint bytesRead = 0; if (!Win32Api.ReadFile(m_fileHandle, data, (uint)count, out bytesRead, IntPtr.Zero)) { throw new Win32Exception(Win32Api.GetLastError(), "'ReadFile()' failed"); } return (int)bytesRead; } /// /// Reads text from the serial port. /// /// A string representing the data read from the serial port. public string ReadLine() { StringBuilder message = new StringBuilder(); int bytesRead = 0; byte[] data = new byte[1024]; while ((bytesRead = this.Read(data, 0, data.Length)) > 0) { message.Append(Encoding.ASCII.GetString(data, 0, bytesRead)); Thread.Sleep(50); } return message.ToString(); } /// /// Writes the text message, followed by CRLF. /// /// Text message to be written to the port. /// Arguments to be replaced on the message. /// True if the message was written successfully, false otherwise. public bool WriteLine(string message, params object[] args) { message = args.Length > 0 ? String.Format(message, args) : message; byte[] data = Encoding.ASCII.GetBytes(String.Format("{0}\r\n", message)); return (Write(data, 0, data.Length) > 0); } /// /// Writes data to the serial port. /// /// The data to be written. /// (Not used) /// Number of bytes from the data array to be written into the port. /// Number of bytes actually written. public int Write(byte[] data, int offset, int count) { if (!IsOpen) throw new InvalidOperationException("Port is not open."); uint bytesWritten = 0; if (!Win32Api.WriteFile(m_fileHandle, data, (uint)count, out bytesWritten, IntPtr.Zero)) { throw new Win32Exception(Win32Api.GetLastError(), "'WriteFile()' failed"); } return (int)bytesWritten; } /// /// Disposes the current serial port connection (closing it). /// public void Dispose() { if (IsOpen) { this.Close(); } } } } SerialPort.csproj000066400000000000000000000054621362133436400410020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPort Debug AnyCPU {D09A2AFE-DF3D-41E1-80CF-37FA64A04E49} Library Properties Azure.IoT.Internal.Tools Azure.IoT.Internal.Tools.SerialPort v4.5 512 AnyCPU true full false bin\Debug\ DEBUG;TRACE prompt 4 AnyCPU pdbonly true bin\Release\ TRACE prompt 4 SerialPortState.cs000066400000000000000000000167431362133436400411140ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortusing System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace Azure.IoT.Internal.Tools { public enum RtsControl : int { /// /// Disables the RTS line when the device is opened and leaves it disabled. /// Disable = 0, /// /// Enables the RTS line when the device is opened and leaves it on. /// Enable = 1, /// /// Enables RTS handshaking. The driver raises the RTS line when the "type-ahead" (input) buffer /// is less than one-half full and lowers the RTS line when the buffer is more than /// three-quarters full. If handshaking is enabled, it is an error for the application to /// adjust the line by using the EscapeCommFunction function. /// Handshake = 2, /// /// Specifies that the RTS line will be high if bytes are available for transmission. After /// all buffered bytes have been sent, the RTS line will be low. /// Toggle = 3 } public enum Parity : byte { None = 0, Odd = 1, Even = 2, Mark = 3, Space = 4, } public enum StopBits : byte { One = 0, OnePointFive = 1, Two = 2 } public enum DtrControl : int { /// /// Disables the DTR line when the device is opened and leaves it disabled. /// Disable = 0, /// /// Enables the DTR line when the device is opened and leaves it on. /// Enable = 1, /// /// Enables DTR handshaking. If handshaking is enabled, it is an error for the application to adjust the line by /// using the EscapeCommFunction function. /// Handshake = 2 } [StructLayout(LayoutKind.Sequential)] public struct SerialPortState // a.k.a 'Dcb' { public uint DCBLength; public uint BaudRate; private BitVector32 Flags; private ushort wReserved; // not currently used public ushort XonLim; // transmit XON threshold public ushort XoffLim; // transmit XOFF threshold public byte ByteSize; public Parity Parity; public StopBits StopBits; public sbyte XonChar; // Tx and Rx XON character public sbyte XoffChar; // Tx and Rx XOFF character public sbyte ErrorChar; // error replacement character public sbyte EofChar; // end of input character public sbyte EvtChar; // received event character private ushort wReserved1; // reserved; do not use private static readonly int fBinary; private static readonly int fParity; private static readonly int fOutxCtsFlow; private static readonly int fOutxDsrFlow; private static readonly BitVector32.Section fDtrControl; private static readonly int fDsrSensitivity; private static readonly int fTXContinueOnXoff; private static readonly int fOutX; private static readonly int fInX; private static readonly int fErrorChar; private static readonly int fNull; private static readonly BitVector32.Section fRtsControl; private static readonly int fAbortOnError; static SerialPortState() { // Create Boolean Mask int previousMask; fBinary = BitVector32.CreateMask(); fParity = BitVector32.CreateMask(fBinary); fOutxCtsFlow = BitVector32.CreateMask(fParity); fOutxDsrFlow = BitVector32.CreateMask(fOutxCtsFlow); previousMask = BitVector32.CreateMask(fOutxDsrFlow); previousMask = BitVector32.CreateMask(previousMask); fDsrSensitivity = BitVector32.CreateMask(previousMask); fTXContinueOnXoff = BitVector32.CreateMask(fDsrSensitivity); fOutX = BitVector32.CreateMask(fTXContinueOnXoff); fInX = BitVector32.CreateMask(fOutX); fErrorChar = BitVector32.CreateMask(fInX); fNull = BitVector32.CreateMask(fErrorChar); previousMask = BitVector32.CreateMask(fNull); previousMask = BitVector32.CreateMask(previousMask); fAbortOnError = BitVector32.CreateMask(previousMask); // Create section Mask BitVector32.Section previousSection; previousSection = BitVector32.CreateSection(1); previousSection = BitVector32.CreateSection(1, previousSection); previousSection = BitVector32.CreateSection(1, previousSection); previousSection = BitVector32.CreateSection(1, previousSection); fDtrControl = BitVector32.CreateSection(2, previousSection); previousSection = BitVector32.CreateSection(1, fDtrControl); previousSection = BitVector32.CreateSection(1, previousSection); previousSection = BitVector32.CreateSection(1, previousSection); previousSection = BitVector32.CreateSection(1, previousSection); previousSection = BitVector32.CreateSection(1, previousSection); previousSection = BitVector32.CreateSection(1, previousSection); fRtsControl = BitVector32.CreateSection(3, previousSection); previousSection = BitVector32.CreateSection(1, fRtsControl); } public bool Binary { get { return Flags[fBinary]; } set { Flags[fBinary] = value; } } public bool CheckParity { get { return Flags[fParity]; } set { Flags[fParity] = value; } } public bool OutxCtsFlow { get { return Flags[fOutxCtsFlow]; } set { Flags[fOutxCtsFlow] = value; } } public bool OutxDsrFlow { get { return Flags[fOutxDsrFlow]; } set { Flags[fOutxDsrFlow] = value; } } public DtrControl DtrControl { get { return (DtrControl)Flags[fDtrControl]; } set { Flags[fDtrControl] = (int)value; } } public bool DsrSensitivity { get { return Flags[fDsrSensitivity]; } set { Flags[fDsrSensitivity] = value; } } public bool TxContinueOnXoff { get { return Flags[fTXContinueOnXoff]; } set { Flags[fTXContinueOnXoff] = value; } } public bool OutX { get { return Flags[fOutX]; } set { Flags[fOutX] = value; } } public bool InX { get { return Flags[fInX]; } set { Flags[fInX] = value; } } public bool ReplaceErrorChar { get { return Flags[fErrorChar]; } set { Flags[fErrorChar] = value; } } public bool Null { get { return Flags[fNull]; } set { Flags[fNull] = value; } } public RtsControl RtsControl { get { return (RtsControl)Flags[fRtsControl]; } set { Flags[fRtsControl] = (int)value; } } public bool AbortOnError { get { return Flags[fAbortOnError]; } set { Flags[fAbortOnError] = value; } } } } SerialPortTimeouts.cs000066400000000000000000000010471362133436400416340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Azure.IoT.Internal.Tools { /// /// See the Win32 API COMMTIMEOUTS for details. /// public struct SerialPortTimeouts // a.k.a. COMMTIMEOUTS { public uint ReadIntervalTimeout; public uint ReadTotalTimeoutMultiplier; public uint ReadTotalTimeoutConstant; public uint WriteTotalTimeoutMultiplier; public uint WriteTotalTimeoutConstant; } } Win32Api.cs000066400000000000000000000053601362133436400373540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortusing System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace Azure.IoT.Internal.Tools { internal class Win32Api { public const int INVALID_HANDLE_VALUE = -1; [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr CreateFile( [MarshalAs(UnmanagedType.LPTStr)] string filename, [MarshalAs(UnmanagedType.U4)] FileAccess access, [MarshalAs(UnmanagedType.U4)] FileShare share, IntPtr securityAttributes, // optional SECURITY_ATTRIBUTES struct or IntPtr.Zero [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, [MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes, IntPtr templateFile); [DllImport("kernel32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool CloseHandle(IntPtr hObject); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern bool GetCommState(IntPtr hFile, ref SerialPortState lpDcb); [DllImport("kernel32.dll")] public static extern bool SetCommState(IntPtr hFile, [In] ref SerialPortState lpDCB); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool GetCommTimeouts(IntPtr hFile, [In] ref SerialPortTimeouts lpCommTimeouts); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool SetCommTimeouts(IntPtr hFile, [In] ref SerialPortTimeouts lpCommTimeouts); [DllImport("kernel32.dll", SetLastError = true)] [return: MarshalAsAttribute(UnmanagedType.Bool)] public static extern bool SetCommBreak(IntPtr fileHandle); [DllImport("kernel32.dll")] public static extern bool ClearCommBreak(IntPtr fileHandle); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool ReadFile(IntPtr hFile, [Out] byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped); [DllImport("kernel32.dll")] public static extern bool WriteFile(IntPtr hFile, byte[] lpBuffer, uint nNumberOfBytesToWrite, out uint lpNumberOfBytesWritten, IntPtr lpOverlapped); public static int GetLastError() { return Marshal.GetLastWin32Error(); } public static IntPtr CreateFile(string portName) { return CreateFile(@"\\.\" + portName, FileAccess.GenericWrite | FileAccess.GenericRead, FileShare.None, IntPtr.Zero, FileMode.OpenExisting, FileAttributes.Normal, IntPtr.Zero); } } } Win32Exceptioncs.cs000066400000000000000000000006201362133436400411210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/SerialPort/SerialPortusing System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Azure.IoT.Internal.Tools { public class Win32Exception : Exception { public Win32Exception(int errorCode, string message, params object[] args) :base(String.Format(message, args) + String.Format("(error {0})", errorCode)) { } } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/000077500000000000000000000000001362133436400325165ustar00rootroot00000000000000.gitignore000066400000000000000000000004561362133436400344340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest################################################################################ # This .gitignore file was automatically created by Microsoft(R) Visual Studio. ################################################################################ /cmake /build *.jar #Visual Studio Code Files /.vscode CMakeLists.txt000066400000000000000000000073151362133436400352050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(TARGET ctest) RETURN() endif() project(ctest) set(CTEST_VERSION 1.1.19) #Use solution folders. set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Build with -fPIC always set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF) include (CTest) include (CheckIncludeFiles) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "--std=c99 ${CMAKE_C_FLAGS}") endif() else() set (CMAKE_C_STANDARD 99) endif() if(MSVC) if (WINCE) # Be lax with WEC 2013 compiler set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3") # WEC 2013 uses older VS compiler. Build some files as C++ files to resolve C99 related compile issues SET_SOURCE_FILES_PROPERTIES(src/consolelogger.c src/xlogging.c src/map.c adapters/uniqueid_win32.c adapters/httpapi_wince.c src/tlsio_schannel.c src/x509_schannel.c PROPERTIES LANGUAGE CXX) add_definitions(-DWIN32) #WEC 2013 ELSE() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") endif() elseif(LINUX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") if(NOT IN_OPENWRT) set (CMAKE_C_FLAGS "-D_POSIX_C_SOURCE=200112L ${CMAKE_C_FLAGS}") endif() endif() set(ctest_c_files ./src/ctest.c ) set(ctest_h_files ./inc/ctest.h ./inc/ctest_macros.h) #these are the include folders #the following "set" statetement exports across the project a global variable called CTEST_INC_FOLDER that expands to whatever needs to included when using ctest library set(CTEST_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "this is what needs to be included if using ctest lib" FORCE) include_directories(${CTEST_INC_FOLDER}) CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILES(stdbool.h HAVE_STDBOOL_H) if ((NOT HAVE_STDINT_H) OR (NOT HAVE_STDBOOL_H)) include_directories(${CTEST_INC_FOLDER}/aux_inc) endif() IF(WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) ENDIF(WIN32) add_library( ctest ${ctest_c_files} ${ctest_h_files} ) set_target_properties(ctest PROPERTIES FOLDER "test_tools") if (${run_unittests}) add_subdirectory(tests) endif() # Set CMAKE_INSTALL_* if not defined include(GNUInstallDirs) if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() # Install Azure CTest set(package_location "cmake") install (TARGETS ctest EXPORT ctestTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install (FILES ${ctest_h_files} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) include(CMakePackageConfigHelpers) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" VERSION ${CTEST_VERSION} COMPATIBILITY SameMajorVersion ) configure_file("configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" COPYONLY ) install(EXPORT ctestTargets FILE "${PROJECT_NAME}Targets.cmake" DESTINATION ${package_location} ) install( FILES "configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION ${package_location} ) LICENSE000066400000000000000000000021541362133436400334460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctestMicrosoft Azure IoT SDKs Copyright (c) Microsoft Corporation All rights reserved. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.README.md000066400000000000000000000030331362133436400337150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctestThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # ctest azure-ctest is a simple portable C test runner. ## Setup 1. Clone **azure-ctest** by: ``` git clone https://github.com/Azure/azure-ctest ``` 2. Create a folder called *cmake* (or any name of your choice). 3. Switch to the *cmake* folder and run ``` cmake .. ``` ### Build Switch to the *cmake* folder and run: ``` cmake --build . ``` ### Installation and Use Optionally, you may choose to install azure-ctest on your machine: 1. Switch to the *cmake* folder and run ``` cmake --build . --target install ``` or Linux: ``` sudo make install ``` Windows: ``` msbuild /m INSTALL.vcxproj ``` 2. Use it in your project (if installed) ``` find_package(ctest REQUIRED CONFIG) target_link_library(yourlib ctest) ``` ### Building the tests In order to build the tests use the *run_unittests* cmake option: ``` cmake .. -Drun_unittests:bool=ON ``` ## Example ```c #include "ctest.h" #include "SomeUnitUnderTest.h" CTEST_BEGIN_TEST_SUITE(SimpleTestSuiteOneTest) CTEST_FUNCTION(Test1) { // arrange // act int x = SomeFunction(); // assert CTEST_ASSERT_ARE_EQUAL(int, 42, x); } CTEST_END_TEST_SUITE(SimpleTestSuiteOneTest) ``` configs/000077500000000000000000000000001362133436400340675ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctestctestConfig.cmake000066400000000000000000000005151362133436400373420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. include("${CMAKE_CURRENT_LIST_DIR}/ctestTargets.cmake") get_target_property(CTEST_INCLUDES ctest INTERFACE_INCLUDE_DIRECTORIES) set(CTEST_INCLUDES ${CTEST_INCLUDES} CACHE INTERNAL "")azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/doc/000077500000000000000000000000001362133436400332635ustar00rootroot00000000000000ctest_user_manual.docx000066400000000000000000001130551362133436400376050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/docPK!W¥&Œl[Content_Types].xml ¢( ´•ËNÃ0E÷HüCä-Jܲ@5í‚Ç*Q>Àu&©…_²Ý×ß3y Umƒh³‰ÏÜ{Ï$Ž3™í”Œ6à¼0:%ãdD"ÐÜdB)ùZ¼Å$òéŒI£!%{ðd6½½™,ö|„jíS² Á>Qêù 󉱠±’§XÀ[WPËø7+€ÞF”@‡8”d:yœ­eˆ^w¸\“X]è¹î+£R"T©/×éQ…é$ÌZ)8 X§pÅ S‚ʪǯ„õwØp"¡¬œhtø0È š3Þ™Â.º5.£™ák…Êä¼ÍN“ç‚C§/ݬ3¼Ç·¤dÒUºå?É¡×j •×é¬{!|ØKð×'¨}ûã! Ð8÷"laù9Å/ó^nTi2Eëüg„ê[Ë ¥MèEÊ1|Á–®ÏÒY÷BX0v‚Ú·7>àiõu|1Des.;çÎX»Áýcæö0/Õ1NkÁqþ(èÑúâù ÙYG²iõ¯œþÿÿPK!‘·ïN _rels/.rels ¢( ¬’ÁjÃ0 @ïƒýƒÑ½QÚÁ£N/cÐÛÙ[ILÛØj×þý<ØØ]éaGËÒÓ“ÐzsœFuà”]ð–U н Öù^Ã[û¼x•…¼¥1xÖpâ ›æöfýÊ#I)ʃ‹YŠÏ‘øˆ˜ÍÀå*Döå§ i")ÏÔc$³£žqU×÷˜~3 ™1ÕÖjH[{ª=E¾†ºÎ~ f?±—3-ÂÞ²]ÄTꓸ2j)õ,l0/%œ‘b¬ ð¼Ñêz£¿§Å‰…, ¡ ‰/û|f\ZþçŠæ?6ï!Y´_áoœ]AóÿÿPK!¶ï—R¶word/_rels/document.xml.rels ¢( ¬”ÉNÃ0E÷HüCä=qR  jÚ u å\û%±ˆÙ¯Ðþ=¦¥M:EHxù®å{®‡Ñd©šäœ—F$O3’€æFH]ä}öruOL Ö Y'“ñåÅè†a“¯¥õIpѾ 5¢}¤Ôóó©± ÃJiœbFWQËø«€²lH]׃Œ÷<“©(ˆ›Š?[Yø‹·)KÉáÉð…'"hi4ÎØ¼`Ê\X”7BOC\Ç„ð€êõ-ÃVéC¸‹‰ U8ƒ6_l#æ©ÕÕ9†AÔpÕ@·„õÜWA3^/Ô\h½%ØI}Ã3Jrg¼)1åFýæ‡Üüþ?_Æ#áÉ“ ?ÀSp"øá áç“ï7î/Ú‰¤^8ôFQè:yõ““ÿ¼ø×ùýóù0LÇ~˜ øarþ<|:yLÓÉùÙY2xôÇ^r:q”D÷éé ŸE÷÷ÁÀ?{Žâá™  ¿Mâhà' ~Ÿå…O^r’?nðÂö´aì=ã/“JgƒG/Ný—Å3`ã‡Ègú™ööAâÂ=aõQã·RŠ&~ˆoÞGñØKñŸñÃÙØ‹L'¿à'O¼4¸ FAúŠ ”Ùc¢O'Ó8<Ïñ˼1ä+çYcò³oÄ,ï;b皥o<‹ýnC&Ád®žñ¦OÃ7gyZÕ‰§ñhö¹ç ”ÚaËÎô²x KóseŽGYËW?GÌ¿ÁÒ„ò;g-{A¸xñF¢)ÊÍ ¾y€’øÍ!ç8K^Ç Óxž<´Óò¯q4,ž´{Úeøcþ,âú<+GKÁI»Æ\?zlÊãÁùåCÅÞÝ·ë^Àê¨b%'Ø1ßEÃWòs‚oHç/ö.‡ŸNd[Sl'ô*öH)¹ªæÿà«ç8 ¯> )²¤jóK¶ïMGéÛ;ßÈ%ÃFš˜½xò-¦?®Ó×nÏù“7útr¤#ÿäŒÜøË`vñ.Â^_;›‰þ'½°nü$%—Sz3Î>ò¶7P׬;¤Ý;îÍÛFãçmv£0Mðm/Á V+VÊØûKÿf„I@ì{Ij$W¼éä×ÈýGòÁÚo’´pÙ †Aöîdâ 0 fú‚ìú?gE-ÿìßfWdevÅ" .\#R&Ý©¨â.ÆK_'¸ï*p•>dhˆ$Ê úÐDYuÀ–Ðõ›ï‘\2l„Eå‡C?ö‡ßp·ÌØ÷~Я¦_qôøÏ èP‚Ü÷@_½ÉA"x‚%¤äwœq„Ømœ —©€]ÈS0ôÉ]z/ž†¡ 8£ÃW?¢{ÁK?N…±G’>z©0ðBáΦ‰?ÒHxŽƒÔ§HNYä#iªl¨,hØ£|°‚‡v蜡²jÈ®­Úûv˜Ÿƒ$ý†Ûð{“Üß„ÓqöÉ`ô4š}.·{|ïr8»Fíà¬ðù| G¯DÑ=8õ ª&þ…*[BÇ!  ‚qãào>þå…|¢(²~÷;áCý4û=ô>‘÷_¦Xîa”RÁcƒû‰Å¯Ë®¡ÙP9v¡ÿÁ{Éd9‰âÔËüXxS,Áø•Ê?¼§(Àfšb9¿ ƒˆèƒŒ‚ÖG0žŒ|’VÓÜ\H&þ À„pï{é4ö™ÌTÒ’eî[Ø vzñ¤@kn ‰Že#u™CÓqlÇf5Ed´€‡Òþ»âØbÿ¯Sb% £VHzÉ⟠¨ê¦ H$=jS¹ £é0Ìé#˜'œb¤c;`“‚€jJ@2ƒóy?~òO.„½uË@PÆlëú9ÉÓ¸–8j;ŽaH,ÞŸ» î6¸Û8b·qýïa~'“·ì.i@CªbqÒ Ï\È’xàH¢ãÚ$áÝ\™¶ k¾üÀ•Ùíx ¸hÆöýuã\ßÜVÝf Â:×3ÓùõòË-íÞõ÷Ëç=û¸£ xñáš[I˜¸&3 _Cú;Ë„¬¹€*Ï9»¡íÕÙ²5™eŠœ+“ŒöÃýþź¹üú¥ëÈ‹Ä_B&‡iÛª‘ÎmŒÛØŽAùw8"è˜"ÔYÖ^89[ÀqÉT þgÞ_Û‰¡ ^{áÓj§¤JжùK·,®^™P6 $),¼Z®Lî>¹û\æ>,$dšë˜,L5nmÜÚºnm»Yº ²©v^„OY÷rs&Õ‡ŸþƒÁ©@U®ã²0‹¸S9ô| ! ºPo·äÅ•É#Dßó1ºÅ‰Å{šÐ®[™ÎT€ä"]\0¹Áqƒë¾Áív1ĸ¾v®ð+çÖùãwãs׳´‹•!yP0Ì- ›Ôc„ÍÎöBÁŠƒ$Åmzò½pJn½”˜!€Ò/ÿ«Þý\’Îø3õ ¤ísÇ$U‡;^vßA&^hœž,#úŒJ®›ÄÂKCŸì¬ 0 ;é¶ÛÏú° l_JX78nÖÃ!ÃBþ‘‚3ØÇ·o³^å#ÒJ'³+Ý„}y!¸â®4 Y¶Ù5”¦,ƒiÅ6mÙUøÎ•n¨µÃéàÅÿ0ÀÊñ¹nÁ±^™@è"»s†Ó™É·p:sÓž9_ìc'3¯ì”†lèt¯SõícT ‡™–dh*KŠ–a}ùfðú–QuIaaP/ߦ޲e9H%E©”xšÕ· •Hå?«A0«: R¹]’e_ªŠðÀBC|v‰ÃqÇpdæ¢1) ~Eöy^§¤kÆbgm­¿rU!›¯BîLTû]ë\7®¾¯¨èSÔ£C» ä’]jY‹¥ª¸Vþ$ÿÞýpPiÆì=³»Å­nK¢ DGÝr[苺›ø,+kÄ´+Èu 9?P÷,þ,ÉmeÝÔE…Ó€º¥Ì]ûœ½qºI2ûé4÷:÷›,—*Y’%"e±`ùÚ¸*#@ÍâVÈSúe(eㆺ®i¹€e«htއá¡!‰¢.³(Ó‘!rèΓª2Ëw¸2÷æ[²5p8ÁŠHr&Ò(Š~£à‡ÏÂERU¤Ù†ÉB æê?ÔÐFßâ(º/¹òÑÒ(óÓ†ñ¯“ó $"†A’ÞP’ßÌùoŸç¿œÐ“_ϽpðÅ4/ª m‰¤öä†? (z$É…ŽªC¢ýÉ9†9»›³-ëR°H„Á+!¥‹’ 2N þÔý½?Hì³TÇÖ‰éõŽð‡Y±©p:¾ËR¢ ‘yVôŒFd&™ŽÇøâtBò$:QSÁí“ÞÝèÍ{oð i@h`½Àlb&]ôR"‚ 98a(x${˜’=5o²6Úâú ­:HÕLÈÂb\žûWuà:JêA2Üà…°o˜èȢȴ=Tr€j“#ÃÞHª|‡J*¿´NR³Ý`Í¥²l— Ì…¿ôþì•¥šùjú·—_.o.Ï—fÛô6kñS ä™*(+nî ×î4{®øK j„Qüñ–D ¾—¤Fxµ7©O­½3HÒÂe35v–.³dË[Öå5b©Û (»¢‚ÐÑŠ¥°-q‰Ejš%kæù¤ômÍt/êæ‘‘H`óFÂ}歈ן×ï|œ6ø¥uˆj¸- Âq¡h–0øXU}hÓ',‹áYì]ÌR”ƒW¥õº¨h¨´ýµÍ» ,3üW4~B$ <"RܦUP4 ò¾×efk¼òÅ;Æ—ïßv ㋲Ô;HÕDYûHY8ý°!RêcÂ19’N©ƒ4ýKÍ"UÕ5×q-nR½4©]a¥>‘„T˜.Ë2‡‡^»dí(ý™žÍŒÍ ÑÐ~>c°3EÔ4¨ÑºÜθm L QF6b* H†^ ½ò ½üRz[žc,ªc;äz‰Ð0EW·* ƒ·Íwže¢Mfžd‚ºhÚÙä£f¼Ó$Ó2[´u™6ø·´E0 ¼ãôP§tÁ­T·:V?Ì6º– +#Kܹ-n ±,£kU“5 ²•ßëéàq‰àÙÐf™yîö´Ähií¯Yâî~ÿbÝ\~ý²lákIîk)ȰÔÊ&N®cª0Iu’[Jœf£¯ p|!øö½Ác6NŸŸúvð¾)qÃv±;¸{‘ y[ÓYS¢4¨exë²XׯÙ{ÊàbÛ¢ª“™< :Ô$h)/Íš²ä¾”w¹ëÑ”º›Ë¥ä )¨ÌâjHDö¦5­™i¡ØšM³ë[CßTç0ŽhöN¶%It>{LJmûž½ƒ¦mè¦ÆRg’CCÏÞý,\†ÙÁüÍŸíŠàQ†b"]†5Ã,¦É;ÑÒlÇ‘XêãrS䦸ÍÉ;Ùt [u˜6*ÚР§Š¾^ù…^~©½¡Æ¬˜ÖËH‚H·\……ïßRF}bÇl8³•QfªÁ¤¨ׂš­P±¶oué+BôhL؈.£@[Vd¥ Ìqa‡òÒ÷«I÷ÖŠºÑ³™_a³ÝèH¿hL²hH†h²°Ã¹Ÿã)ðV'B  ­°¬"rèqèñ‰&ÓªÜB†ŠvZZ|7ß{n±«Ž4¦—)²£[ŠÞ޵Ï}$÷‘e2ÍPIªdêËxù鮊èZ´vèz)¥e$8t¤Y‘{–zZÐ62D– UAP­ÍfÊw–ˆ‹©^kV¿Ìc-âFþ½Ås(î«ÜoI¾4= ¤ô[œ§AŠÕEÓd~¢©‡Ý )hGî*gå³¯á ˆß6õ“3ÿ…þ$ÀvE¿tÊ > ’:®ve)@D¨m¢ÑP%0?u§¨¾òæêk"ñ‚ª›Õæ­¨z3홯Â0ë7QBå:ÈÏ„ BOòbÍYñÂl"Žè3?‚Î#çÑ ps?½UЊ ÐU-Í‚,ÖÝÙÙnMãæ9ã›\T6Rë K—r<žƒô‘šù%š¦Xää¿Q@L¿HTïs9'”4¤ƒRáû6i6©,›·5™Þß/~Ö¸•Ço›Ð‰™¢zÜþéòæ·Û?\ÿÚ°Ë-^yç?zOÙé,‰7öé™Ïä¯ ¤ô§O(k’°ŽÂ¹6YéÑÑkµáC4ó4Í (gžœËKÎ\È…_²}šð@:Èl*ÜÆÜ™%Ç RQOç+x|…|¿àM›Õ=^×Çͺ³¼#íÌ|åvàu1‰ƒ0Í€TãG„cV½ÿ'<ÜL£…c''adM¦L§ˆ ª®HÏ _çÁ] Ù´ÞWv)cW.Üzùιõ奸G*­ryÌj¬S¯úÐí4¼—vÐîú·®tí I€]œ“{÷šMªìB-,‡eAݲeD¥h)–,Y[$6´¶*jµFQ¾“ñS²K£XEXa0K«»Mjgº .¼YöÌ…ÃsP¨À^-PEÅ(m`á\_;W•fž-üuãç¹Æåço¡ òÌꙄ qŠ<ÍŹ$"Š:Dj‰BݲåyPbsË1>¤*@t4¹²¹LteÑpè2ÛÖlö=ƒ=Bu1Ô›g-RG‘„û­€(ÏߨAž¸ˆ#á«PÀC~(Ò wh Œ ú†A2y¯™øó^³ªù[s;§  W4]×tz|1Péªè•@Õ2{ëb ÊqåÜ:ün¼§Zhb&? ÆO¦Çúd#ä:DŽdl²\yñ°Õ)íwA <¾zLWÄ Ù¤êÕU;ÃUÓ*ïTê•Gèëì*Ⳬïàv»PºŽ1&ŒÜr¬L‘Òa…«6óy%d7žUo€~.Iõœµ}jƒ¦z°ã‘TÆzZ-ÁV³ˆG5Iü(¼ì1YØM/(íZ¦¢['¥,AÖdCkA¿}› äd¹F©C'I îcöõ^3M´ɬ¬Âˆ²å@·pR iZ™t².ÇÂQ)À¥_s±…Ž·Ÿ‹­EMAÊ]ðÄ+©È³$ty×]ßM~:ëÕò,õ½û½S•g9ëR¢wÁRÐf––YŠ%a_ܹÌk•ØÞ¥‹ÛOÏg½ÊW6¡“»Ó#%¶²À¿ÕìlØŽ0P€ÚM+µÒÜpÊ—;îLŽÁ™´šØ­Û:ȶn=w«èv†™Mò,1‹³ú©CHÑX(S|×!¬³ÿt£luC!°5¤›Õº¡–a Z%8ö»À—¯7ïW€zÕ4ª.¯ ªØ•R‘RË·_`Í ‹jÕÆòš%–-êˆy‹¾´ÉfU[ô·,Õ [‚²eÍ^wp[ôeQ4%ƒiÓCËÍ·èoæk÷—y‹¾Oö Ÿ2€DŽ S¥[ž×õ#¯ãÛóÙÒžÂöü/Qºá}QW4S¤;Ò¹ýqûÛ%`YvÕËš*"‘éÜè>ñ>¥¾n””ùFÉÞïªÇñÅ•¬jÙž»¹Ozd@Õ¤'ïpdÑŠÁÔå`x°èñ®z¨¹ ”(‘“»ƒ‚Uôu¡Ü»]„ø]é•ýØ~ó|3ö½ôÛ|¿}Ýx»ýöi†)R+àþ°àú´‡²ŠáhHù~û 2Zm2í2JoU¡ö» Pž8¿âÜt¿=šâ˜Z%w†n‰bÆ—Óˆ¹áÚcCòSG+=(ÄŽÆK|ÿ:ùÊ‚ò¤l¸ÆÁ·>t &|ëC-­Ãq+ßàTKeT6\¡ávÍíº³v]€ÿ†ËPK™¼ÝÞóWŠm‘O)h[b+ÎßtLhéE¹’MmÚÔx]cYâ™ã«›…rHµ!¤w3ç^ít;œi°±ë%ÇÒ6`×gÌå¾ÊaÙ¦š†¥(ôÌÁuºéïî°ËëÛ/ß?ïr_ØÙÀdLÐuTY•X¨Іfáˆë‚ÂÊwx«ÊŠÝÂìde:ŒR¨è”A‚@–*kÖî%È'·àÉöáù>67•ïã¨v¤d2²4—ZA§úv™¬óñÉÈ< r€‚=Òˆ{@îw G–4X¦#¹|' ùQ˜^Ù˜M¯dÏì$ÇCÙöT˜Wêšð4•QŽ-ê,ÃÒ^¹„ i_t õÈP9¦Jh`dlÈ‹ë~°Øp¿)‡,šO‰Ç!’æV7ÖI’a9[¥—î@ݨÓyw nÈdàî mÏv±_æ) †{íÄ.|ÚÏ-7LjŽ&¹’*.®ïÚŠ´Ñ1W dºËÂj¯AL¥—ÁoÃý³<øj.Üts pTQQÔJ(몌²ÂÝ|fÿ ˜Þ¡­Ú2s?:²v[éÁ‚¨n¸Î°”üLÉP;·܈ü½.8VB/w§ÈŸYéßjûõ¦²ÜºMÿ/’(‰+eWH9[­HeW¦tLrË9àÝ‹lõ²e[´DDFà $£÷ð˜‰ÝPÓyP–¡±Lõ›ÑûõæpX½¢ eËqYV5s‚]í”î«—•Ñ«Š&´\ÈiÇÒã£Þ-x²}x`ÎèesQ9£—°_£”úC¦Rì†*[:­Åà ŽÜ.ÊB •’WgIyzµÒWNÊ9A}'*ÀVM™Ò`¸KXX†Ö'^Ð’`áÈšêˆd´"Nu8Xhí‹ʃÅû‹FRDØä²ÅwT¬‚$Ó½tœCà ¤¥žÖRÅ„x€ ¸‹#? –Þ§ý•õÈ Ø6⛩*ÈhEè2Jo¿š_(~ïŸ 7&"Ójuã­lÑ ê0ùÌþA17¼&®§tDªm¸Ö°”Djê²iiÙ‰t]|i·ÉL"ÕÚ¯9•åÖ#©ÞjU¢(»âP¥c’뉊–èêl•,Ë©fN"=8"ÜñHeË%Ã! ?'‘dWÍìn®¾;%q–Ú¢•uéVÉ˽-´Øòmþ IÓ w×#&Ç ˆ†HXà½$Ã.!øøSúð"áo~2ÈIÈqL‰Åxù¾cxN‡es¸ :ìM<õY¨°ŠeKºj2m…áÆÖ cÛ:Y¨°À–×YàØ§}CvSvKöÌN®èè²› GÏtÍN8¶ºYC4²¤Ó½r ¨G.¡²£‹º(ßÈ‘Q@Ɔ°î‹ 1ûåúʃ wt0ü®ôʇ~ì¿y¾ûÞúmNëQ 8†n‹´V÷ˆE¿À™b"r]C¦ìrh¡Ñ[ªäT±¾WR4\$ëËN\¾ pHVÌ ïp©bëh Y_|þ•„$9@gÙ½[q#ëHïÅ™8’ŠLË’PuÒTÒ¡¥4õ™ëFµU1;|‡\ÊKüHRÍZRùãT7ù¥‚n6d -jB¸áj˜ºÈÏ–*£ <јœùyEÖ3®S/&ßɘwgùPöb§6œ²Í:EU«¦FÐ_Ô=̹ÆåçÛ?]Þüvû‡ë_ɧ֕Í|ûÒ’^¼îÃØOï!§f-©ÍXvÑ´ j#³Œv$ª‹tRÅo·h¯Aï†3Ôô6iñÍNîb×Á8y1aeh[ 0ª!ÙQ$…öbk­ ß ÙMÞòQ¸›¦B Þ(‰„IXBøtÞpIo$ä?m q¤9¶«;•ó‚ª%‹ Jz¡©@tñ·€æòŠæüRÍfWέóÇïFÙŸô]tÖ\”|y ‡ØÎ«ÕK’±ògù”9 -{®¤7þÛÚ8£ø7’@Ùû^’IàÕÞ¤iFíA’.›Á0¨ s³!ÏBD³.ÏšYîó:Áä1¬$Û‘k¯`hŸçb;§¹uŒÅ9™M0ÄsiI™aU‘,K/j¨ÔtÑÔ¡‘Oϳ5=}”ÙÍ^Ø\V[¼­q÷–ŒRKM8ËgT¶‰ˆú÷ú/úÃdYtê>VÇÊÅh¿Éw-nò¸eÑÎBÜ ?ëð–q4Ì[x÷†]_­%ñ›»(åÔkÆŒÐÒ5WsÉèpíR„ŽM±WÏW.×Jw²õƒìmEDXÃ>iý¦é›|´š94MâÖÍ‘ ]MX™j•mI‘‘Z™ô;mûòõfuê¶E£Xˆ7Yµ°8RÔiñÿÿÿì]ër£8~mªv+Ý•N¸_<›T†žTõ%gj«öOŠÙfÚ/ÈIwOMÕ<ÈÎËÍ“¬$  ¶Œ±;NÈ\lKØ}çÓ9GÒ‘Ð.þùØ‹®"ò2 §a{îôüH0uÞpŽÎHÅÄO¦ø?”U>N|IÝÙÓ—øz?íÅ3wÏfŒaô.¹%ÒÿûALoYw_Žþm}_øu‡z'À¢¹;=) òØóàÿªïñw„ߺs4 £ó£¾+òc„¥z€n0'•ž‹ðÏ /½ãÈ¿7‚Г¤Çý'_žׇ´ª"Y–Þ´XÔø] o3HгÏOmÙìö›"œÝ{7lú n•JJÚeØÅ=Œcw ßüT&óŒÔÏÀ#/õfnä^b6ÉŠ$óªìÑR„E#¥júG¸Dк&bH÷þò¶Ô‚¼ÿm²ÜPIØ}մŤüzнòÑ ³ÿ?Œ6²Äœ$*¼ä”âÊd–.þxyñÇ®¨Ç’(+è–- :áMŽz§ˆ:¯/ºõ:êm@=æDÙ¼Ol²zZïyYä$ãð|âÊýJûhÔ.²‹Béh„— ¬7qP¨ä'à›¬¶¬zÊÇa¢•ÍãǤŒ)ùà08@ÏK•»m^ÿM–¦„¯Ôéyº­]¤4Žü³+ý{1Ú±,ë$N¼ äj¦)7zªŽsj Íáu˜ò!ìy…7YÇ{q1@ãþƒãÂ>nÈy™—Û§øÑoàïøýho ÙY_û›õÝUð‰ÝóÁë¡8‹´Ëìʉ=,Íê¢Ò jLÒú}‘ÓYNgéfVö«I¢°TÖƒc Ë5NÓû¦j—&õ:ê=#êU+N IטNtRŽÓɃ»’¢u™¾ÅË©6Ó¢œ6S›v c¤Ñ5 <AïÊC3‚îŠ]M0HåËùñtÈ ü`My®éÝ7ÉÚMÇ©5îj›ð–d‡{0ö1 ‚´"@.m`8Úi›Ö9á-Zu'X©‡*>I™&[XÒí+äõ¯?þËàMqaÝrV«XC­VZ”³Z?ü‰iŸç(Û*z~ñ|6 #”=‰Áìs¢# "}°^s¬DG१ÄÞ¬ö‚éŸÖ ŒÀ” `gàp¤UòH¹QÝ»‘·$6ÉöÆôô rí($ÏŸ"õR–‡EIçX kÇ‹äÖ`šÕòï6 WX†qäÎÒÇWóûÔ¬Lˆí¥×¥c0\wù4^¤¤=Ë}a/ê*Ï%VãÉ;ªª4„èð\‰çÒ¹üuåEËâX ä+#ŠŠ†¦J¢Á4Ó Š‚RyˆQ±æ…": —×^«ö¢aË#s^9EçØˆj·,$•u왬rrb‡i¥_bƒT´xÕÔ–só:š"^aU•GåùÎ=±ð”SN1KYD T¡¯Ê†¡t> Q1å^íË2ËãS:¢"Eb#ª©p¢Ú·:PˆÊŠ©,™&×g‰Pu‘׫1-Ö¼ÔA”ÿ2Aªˆ–á(K4õÊ!MC—)”²Íq¬ÒV8Þ°d£_ZÕyöˆæ×{$" ÛêòŽSßqâ ¯õ¾Ù¹½›ëÇ çwÓ¥]—UVÄÒlS¥ÓªyÊ‹²mpIúî“‚ Ž74ºlRVP±æ (ŸWæ§g,+³™~È,¨VRºVu†_îÝè˹ù­DTºxBÖ4În߇¦;ü’à“]mÓ œìÚ䦕†NÐLÜ77÷ÇÉZÒ+wÒtQ“röËž`ÁâA` +«¬«?N·â¤¢íýËZÃ!ºŠXÅ£wHrÕã99dÞ……÷‹ÏäðÊŧ t=’L¦Ò‰Þ( inYúq!I@»òÑpB’híYÖnúö.ô¾Ñ7ø+ô ï‹ÿÿÿPK!ªR%ß#‹word/theme/theme1.xmlìYM‹7¾úÄÜÍøc‰7Øc;i³›„ì&%GyFžQ¬IÞ]%9 ¥ié¡Þz(m ô’þšmSÚòªÑxlÉ–YÚl`)YÃZÏûêÑûJ4žËWNŽ㘦§z©â”4ÄiÔqîK-pÓš¢Ž3Gܹ²ûá—ᎈQ‚€´Oùì8±Ór™²òKtŠRÙ7¦,BVYT<–~R®U*rqê€&ÒíÍñf.ÝÂù€È©àYC@ØAæ NªÙŸsŸ0pIÇ‘ã„ôøÈ…ìè8õç”w/——FDl±Õì†êoa·0'5eÇ¢ÑÒÐu=·Ñ]úW"6qƒæ 1h,ý) 9Óœ‹Žõzí^ß[`5P^´øî7ûõª×ü×7ð]/ûxÊ‹î~8ôW1Ô@yѳĤYó]¯@y±±oVº}·ià(&8l +^£î³]BÆ”\³ÂÛž;lÖ𪬭®Ü>ÛÖZïS6”•\(p Ä|ŠÆ08}ô³ÅêL#Ýêõ÷_üýôSð×óï^?ùÊŽç:þ÷Ÿ>ûí×/í@¡_}ýìÏ^}óùŸ?<±À» Žtø!N7Ð1¸M91ËhÄþÅa ±nÑM#S˜ÙXÐèsH ×Cfï2)6àÕÙ}ƒðAÌf[€×ãÄîSJz”Yçt=KÂ,샳™Ž» á‘ml-¿ƒÙT®wlséÇÈ y‹È”Ã¥H€¬N²˜ÝÃØˆë>åt,À= z[CrˆGÆjZ]ÉÌËÜFPæÛˆÍþ]Ð£Äæ¾ŽL¤ÜØ\"b„ñ*œ ˜XÄèÈ=(bɃ9 Œ€s!3!BÁ DœÛln²¹A÷º”{Ú÷É<1‘Là‰ ¹)Õ‘}:ñc˜L­œqëØøD.QnQa%AÍ’Õe`º5Ýw12Ò}öÞ¾#•Õ¾@²ž³m DÍý8'cˆ”óòšž'8=SÜ×dÝ{·².…ôÕ·Oíº{!½Ë°uG­Ëø6ܺxû”…øâkwÎÒ[Hn ô½t¿—îÿ½toÛÏç/Ø+V—øâª®Ü$[ïícLȘ´Ç•ºs9½p(UE-¦±,.†3pƒª Ÿ`Äp*‡©ª"¾pq0¥\žªÙê;ë ³dŸ†ykµZ<™J(Víò|)Úåi$òÖFsõ¶t¯j‘zT.d¶ÿ†„6˜I¢n!Ñ,Ï ¡fv.,Ú­ÌýVêk‘¹ÿÌ~ÔðÜœ‘\o 0ËSn_d÷Ü3½-˜æ´k–éµ3®ç“iƒ„¶ÜLÚ2ŒaˆÖ›Ï9×íUJ zY(6i4[ï"×™ˆ¬iIÍ8–{®îI7œvœ±¼Êb2•þx¦›DiÇ Ä"ÐÿEY¦Œ‹>äqS]ùü,'r­ëi éŠ[µÖÌæxAɵ+/rêKO2Q ¶´¬ª²/wbí}KpV¡3Iú ÁˆÌØm(å5«YCÌÅ2š!fÚâ^EqM®[ÑøÅlµE!™Æpq¢èbžÃUyIG›‡bº>+³¾˜Ì(Ê’ôÖ§îÙFY‡&š[ìÔ´ëÇ»;ä5V+Ý7XåÒ½®uíBë¶o hÔVƒÔ2Æj«V“Ú9^´á–KsÛqÞ§ÁúªÍˆâ^©j¯&èè¾\ù}y]ÁUt"ŸüâGå\ Tk¡.'Ìî8*^×õkž_ª´¼AÉ­»•RËëÖK]Ï«W^µÒïÕÊ ˆ8©zùØCù¤lÖ©?V¢Aë´EÛX*P©HÝÄB–J·•¨Û?l+ö?uQÜmº¢BÈ–¨ªµ¢9]!EŽ@&Të 'BZ>²+Úå*T˜íÌ™{çÎ9ï{î9÷ž÷¼¿«5ZŸ}ççù=³ç™ygÎÙ•?û_ÿçƒ~ôÁïÿûðbùÓóC€,…ÀÊÊJee×%ÅÏ¥—\²«ßßµòÜ ¯]xê¾¥ÈN @€ÀHkŽžÚµk×ÊO}ò—þã¯~xä¦kP @€S üÙ¿»0õ¶3Üðoÿ›á ýìsþÅ7Š‹ÿ~¿wñÃîÏT @€À‚ ”ÿbßMý-° @€ÀLÊŽ±W\ñ{šo¦®&#@€‹)PvüâŠ1ƒ 0Sªã÷g:§É @€…Xùò×~û»õTÿBWIp °GŽ?1fog¹uèŸ.þSý_{â§.¹ôÇúøGÏl#¦] @€›Ž<öXñ«ùR÷•’YêŸ!¦© @`IŠËú¡¿æ‘ÞÙ;î(¦­{õ›êÅyü¬üƒúùuëŸO\êÿ­?úÙ¨ÝÿÊ'þ4j¼Á @`AŠ¥þQëùcþh‹KýÍ‹þ­tý1_à³¶Ô®ü©xÛ¨_~ᯋ?ªÿ>§‘¦8ÿø3ÅßÀõ_/<µ1Ñ›_9þÌ£«›&~êá'Ž<üfó¥ò•/;ßx©Ó\þ¾3[¹ëõÙ6‡QÆsüñ÷ºI æYÿÕØoT`Å´›æ)c’ìÔ¤³ßðÙê¬7±4^_—œ{"ͪÍ>S3ز@Ýì·ÒõC¢ˆXêÿõGýúÕòw‹?ªÿ²cclAà½G¿ôħw?P¯Åè=ùl=ß•·ÜüÎwþxS÷=úñ}½§ßhœ¼wîµ^ïÜßÝ8?(_9öñ+‡EõΩ7"´ÇÜ|ccIðÆëOïÈñÖ‰È÷¿vÝ·Ö£}`ÿ+w®ˆ ¬ÌúþÞÆ¾ØÿîùÞd·Ûë-yóùÐVf{ê™ÞzJ–¯¬Õè½GŸÙ½®qã±§08'˜u"[‰Û¶vB µÔ?¿"ÿ'>öwÍ/\3(Î?þü©^ÑG?r´æ8ü‘/Þ°9úéëzgÿ²y5ß»f÷¡Þ»çê6¿ú—ß9wù¡ƒï¼Zµöà•k‡}Åõ¡»®;vî•/»ŽVŽ+¿ðÈ'ï;¸zÿú’ÀSÿàÌÁë¾õë¬>zÏ­ܼ> <°A„÷}zãÔäèmåœC’]˜£äè=uоÞ;óLµèrÙÝ÷ÔWþó».qP¬ENdaD2R ±þ×X]ûpþBiÖ÷õ[÷ûçdDãŸÇîÍI ^àÍož~çØ}tc†ÕsÇ«eù}W}ª÷Ê7×®/^¼rpcàü¿ñâÍ×~fÝŠz½ ï¾xpïÏïÎU_8±ïÅÓÑX0õewßQ/0¼ùäÓ½n´E“;ôô«k¡¶o÷õ½Æ™JB7Ùâ6ÖÒKÖ …rÑ»º¬ï;¹Ú;W,HlÜiÜËØ¸RLxüñ7‹ˆêݶ¼”/ñ«ÿÛ\íØuhÿe]¸×ì^{qh"åyÞÆ=jÍ |ïwF¾tî܈¢u¼RgQ.´ »³Ó¾$Ûb¡¶óL¢õ4ß¼{tã/¾é·õõþ¾í¡Þå îÙ7ÎôöÝrxBëýù#—¯__V#/+^yñµµõÿs¯½S4¡r™ýµbµ|ÐKžYííß]_”·g?ü‘kôÒú:~T´]<<°òâøÌÉî3å ›’-zðÉwïûêà™ä{‹x›™özï}÷ìàÌ©;ìžbü¾^±>QlxO¹´P´À;Ïî][–?±ûÔç7šú‹§_íÝ[îâ[ƒ¨Ž<Øûry/cÓjÇÕ³/Üÿô¾ÏÜ6¤ñ7ä;‰TÔ÷t¾zݵë3†ì½èúwXîx÷þÓïtK74Á·ýt±fóõÁÏÚòÒ$ƒÂ˜¹ Ìö!üQ³U¯Ï<‘¢Ó·îëw_™áNãÑãW?U³×ògX SÍ@`ßÁGùøÝƒ«ö?·÷Ц›ú½òÊrí•â*üòOýÜe½Ã{­Ýæ\—¿Á¿ׯ5zH e_ý ìÀm?ûÕëzå3›Ú7Ù^o÷ÁjõâðÁd#ÓâÒ¼¸ePŸ9mÖ¹X\éÝwïúâÊáŸ,ÚáÆ³7_»F}ÛµÇzõªÆ`µcýtjðìá`à±â¦~ãÖÌúŽŠ¾[œ<0h«Ãª6XÝ9±¾á¾ƒw^ßròÞË*7‚/Nݺ•àewß[8k<Íc5B«mèÿûO_5EEï/¶ªþë ` @›Ì]`ßÁÏÜÜèRe Ü{¬7x¥¸ _[Õ¿ìÚê6ÿê»/O\EØwðËwõ&<åWgUNüXyrS^—¿X´ÿús ­dËû«÷W+ðk?Î nsì-2lsÌårÅ;§>_ß1ýÞ©ÆrùæuûáGì}¡z¤ñÞÞ;Ÿw(®ÈWó‚V"£Ww&ï½,ÁúiÍ ­ƒû/o—dL‚ƒHî?þƒ3ëgåa3Z#¸ØØy~ïÖâd=ú§yÅ_·ÿèYl@` ÖÓp£g(Ö·Ï<Ö|¿|¾ìå ï¿ðîúªþÚÚrÙ î>8)˜Å¥màS~õ£¢-ÛRÝ,ã;ü‘âÒí)AØ›“½ìî_¿µðr±ßøøÀàºÁ:ÿÚÚÆaƒ}´ðæC”“À^œ¯lzN¢þ„B{ SµˆlZ” hÓ‘ V' ›Ï0f¤˜Aæ%Ðÿ½ç¯Ÿ»Zä¯ü‹­Z-¿{û?|f# „ Ó;õíMʾms}{0¢x+ñì_|s£ó­­ÿ³¸å䪑7ø7f¿²zÊï»b}ó+'W×è+/‡DûÔ·_)ž.¬–ʧ ¬õ¬_'Ù^¹6PÞq¯îU¯­ö?Û\çì»5¬™Zð9VhíÖÇ=õð÷Ní¿±zŒ ýÓLd+t¶-ìhïkÌü«ç¾X¬F”7Vž_ûNˆ­ dYž ºë'Ë[ «ç¾^Ü}o|.qóvDZ¬ž{´‘ׄrUÛÖ_ÀP>]¸¾ÅƧ?F%øÞ£¾Ò+¢mÞßÙªFÈáe íXyöÂÓ¯û¯ìý—¿ö¹ÀˆþÃoþg_ÙheØ´ÅZqã–sõAùâ ýóo|ê«kÏ÷•3—¯¼û™»Èƒ­Šïh|ª~­ 7î4—¯ß“3¸-~ÿõýŸ|¤ù8z9gq½¾6`ðØyóR²X î>Ŷ9Úõm¹‡V<(÷ƒ3ÛtvT'[E8yè®Fð-ŸáÃÖC]rà³¶×z¶Í,E`¯^[³,å+…7e½Ic¿u6ÇN4n"l®Z#€Ëïì%lïÅÜn¾ñ[û_½óµk˲nvè&¸öq€µƒ¤dyq¨Æ´Ç°íl«ÀÙç.T_Ù»òø×þõÊîÿÒø£Ôø£¸ ž›@ùÖÿêÓÞ™ž[Xó™xR²-y>ûŸÙ¬“™ÙŽLD #Æøôdd#Õå(¯È«ë¼ ~Æ&[vÓïÙ¼z±¨&YUmQ‹ ®eÐø—­¢ò!0F`mzÈ-lä"P7þ¸/ðÉ…Gž–K ø×ÊÓç±ì±\¥“ Ù hü³75#XXaK#0 0{ö¦f$@€ (ð±Ÿù[Ÿ¸éàÊüásï?ÿ¥‰ç[À„D€ ÷ýì/>¸gÏWüb† @€eÐø—¡Šr @€–ú_:ÿVàD† @€;.pÃ+†ÆP/õOnü»ó¿îx @€¹ ÿæíÛo¿•õK¿ÿ¹4þwö~¶»×[n¹%*”y ~òÉ'‹i!’™dW¥Óü™SjÅŽBfÞ¶xºzÍ]‡„:ÿz’zﻎ?ÛhÍF€À Ì©ñO¾Ç_¿ý¿©~¶S¹Û~¶gï³ÚoÔ<×'bã ß<쫦>þxÎá=HŽ,‡@ÄR·Ý6ß [KÓ­³„nSßÊRöÒwój!Ì)¯Úï˜ößjÌ3tèvÙÀŠwÑQÇáøãsè:Dà‰H`¨† @`j'NL½m±aDãï.¥ŽÙqõ<æÒ|+Aïà¶Cóª^Œí%QYìÔ~G9¿xjÆÖvW=xÔq{|ÆŽŸ.Z[ @`¢@Õõ·Òû£±¿úÒ§»Âߊx®·êþ1Å[Hü!jVçÍy¶s¿!×ý‹O3æ:NüËVùGQ52ppÈ®!@€@«ßOÝû'?Ü7êsüÍ®_Ÿ t¯ÒšKßÍ÷Á¡¯W×ÍÅlõŸÖ›Œš§^‡èž…tWÝ[“9Œ&î7$¯æIRÈ-€‰>M™æä­×‡î·Û„&†4×xBðGåÛ:Nfg³èÝé>ÒêÈG­»·3 h=ÜWwú“'O6ßÜv6_à“ú7÷…œä|̺*xZ3šÜ  ° CÑõ«]W½¿þ¿Õ‹!š¥þmÈv†»h-õëg-ÛæÝkw²gxà™Š3h¶ùVËß×ò7þÂB? ? Œ$@€ÅèvúézDã÷¤Rì¡P?áþœ×…u'oî7<æ)v=tòÔ“X‡Øñá1’ómü±ïæ±ãGå6«yæa7~ÎúÙ‚ú3sõ@Ylðõ£6œÉM‰9F…´#ƒcbÇïHRvJ€Z`rã¿Z­'Õ»ÿ¬æÙñzÇ&Õ¹£ÏbŠãd~Á˜™º§¾ñ;¿ñÐéÉ竞êo^Œ†\é6Çt?›WüéÄÃùøÙ¨o ,ä3WÍxZûúz® vò¨ÆÏÜ-džVibÿæ„'õAUí¢u4?:Ýñ3jþÀ×Gc>V:õ¡‹l<™Ìü»ú_èÝõ?qÙä+þXßúí¯~¤®š¡¹ôÝ|óõzì<£âõiþê}Ô:|øú|ˆOHK¨»r÷ÒyTœQ×úþ!éÌd̨xFM“±.qÈñÖš¿#p¿311 Z/ÅüLÔûg·ÿ½ã¿ü ³oüãw<´«uO ÆLÒº é©õ™GkpLwia¢]ø€ðÉ[':Í]Ì0Îyç.3u›í¼µ»î™Ð¨|cbLJ;I€mØîÆ__¼6{põbø{kìøÊ´ÚcëR>ê¢yºÚ„Ÿš Ô•èÔÁ´Vb¦›g&[MWǨ]=Þêà ¼ú£æ‰ Æ`,‚À|ÈõV=¦y Ø¢iÎ2~~²±ß[ìúsJ$ü+6ßð€·RÇãªIìøQY,‚[¸°‘*0ùá¾îwõ‡4³z‰»9¸¹îòzqÔ7ÜpÃø¯ìýèííÙ³grãOý»úÃÉ&Žl5ʼnãS[¾©×Kü,™Àœÿ|—ú—¬á·„—#ñÜò]ŽªÉ‚ãú—üè-F @€@&“¯øëÇ»æ÷œ×BYg’f¸yømásI€;%0¹ñ×O]µ>·SÏ{¿!Oím=†îów[Ÿs+3,Z<[ÉŶ 0F èÐ!@Û,°h]v|<îôoóáaw˜«ÀÊêêêŸüîgÜtÍÐݼtþ­â©þ¡Ÿpk~ÐnÔgÀŠ9C>¶7êãR£2:¾Õ½ºûm~¤müeý¨OôÿXWàü£>kW$;‡QóŒò‰güw᣷?´gÏWüQ¤ @€´úÿö¿_L;Ñ @€Áý?}ó­àÁ @€i ôÏ|úo¤è  @€`÷øƒ© $@€é ôëe÷øÓ/£  @€@˜@ÿW®_ i ¼€¥þäK( . ñ‡[I€’Ðø“/¡ @€@¸€Æne$H^@ãO¾„ @€á¸•‘ @ y?ùJ€„ hüáVF @€ä4þäK( . ñ‡[I€’Ðø“/¡ @€@¸€Æne$H^@ãO¾„ @€á¸•‘ @ yþ™‡žK>  @€a®øÃœŒ"@€K! ñ/E%A€Â4þ0'£ @€ÀRhüKQFI @€0?ÌÉ( °ÿR”Q @ L@ãs2Š,…€Æ¿e”èûìMa#"@€’pÅŸ| %@€Â4þp+#  @€@òò%”ÐøÃ­Œ$@€É hüÉ—P @ \@ã·2’$/ ñ'_B  @€p?ÜÊH ¼€ÆŸ| %@€Â4þp+#  @€@òò%”ÐøÃ­Œ$@€É hüÉ—P @ \@ã·2’$/ ñ'_B  @€p?ÜÊH ¼€ÆŸ| %@€Âúýï‹á£$@€’èß~åóI' x @ \ ßûësá£$@€’p?éò žÄ ô{?v0n £  @€dú+?þ3É/p @ NÀRœ—Ñ @ i?éò žÄ hüq^F @€¤4þ¤Ë'x ' ñÇyM€’Ðø“.Ÿà  @€@œ€Æçe4HZ õÕ×'€à  @€pþ… /„6’HZ ¿²òãI' x @ \À=þp+#  @€@òò%”ÐøÃ­Œ$@€É hüÉ—P @ \ ñâ_…6’HZ Í5G“N@ð @€@¸@ÿõן m$ ´€{üI—Oð @ N@ãó2š$- ñ']>Á @€8?ÎËh ´€ÆŸtùO€â4þ8/£  @€@ÒÒå<ˆÐøã¼Œ&@€I hüI—Oð @ N ÿ?~óïÇma4 ¬@ÿÁoü£dƒ8 'Ð?ô7#n £  @€dú¿ö¯'¼À  @€8÷ÅyM€’èß{õÕI' x @ \ ÿàë–úùŒ$@€i XêO»~¢'@€Q—Á @ m?íú‰žD hüQ\ @€´4þ´ë'z % ñGqL€ÒÐøÓ®Ÿè  @€@”€ÆÅe0H[@ãO»~¢'@€Q—Á @ m?íú‰žD hüQ\ @€´4þ´ë'z % ñGqL€ÒÐøÓ®Ÿè  @€@”€ÆÅe0H[@ãO»~¢'@€Q—Á @ m?íú‰žD hüQ\ @€´4þ´ë'z % ñGqL€ÒÐøÓ®Ÿè  @€@”€ÆÅe0H[@ãO»~¢'@€Q—Á @ m?íú‰žD hüQ\ @€´4þ´ë'z % ñGqL€ÒÐøÓ®Ÿè  @€@”€ÆÅe0H[@ãO»~¢'@€Q—Á @ m?íú‰žD hüQ\ @€´4þ´ë'z % ñGqL€ÒÐøÓ®Ÿè  @€@”€ÆÅe0H[@ãO»~¢'@€Q—Á @ m?íú‰žD hüQ\ @€´4þ´ë'z % ñGqL€ÒÐøÓ®Ÿè  @€@”€ÆÅe0H[@ãO»~¢'@€Q—Á @ m?íú‰ž ¼5øÑø¹ #@€Ë  ñ/Cå@€& \1øÑø'B@€–G@ã_žZÊ„LÐø'@€–G@ã_žZÊ„LÐø'@€–G@ã_žZÊ„LÐø'@€–G@ã_žZÊ„LÐø'@€–G@ã_žZÊ„LÐø'@€–G@ã_žZÊ„Œð¯ó9< @€@v®ø³+¹„  @ Oÿ:_žu—5d-àŠ?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžrÐøs«¸|  @ k?ëòKžR8qâD+Ôî+!¹hü!JÆ @€hvúéº~‘ƒÆ¿ó…¨úýÔ]_ãt6Œì°ÀÉ“'«ê®_¿™+þ(.ƒ  @€ÀŽ 4;ýt]ßÿŽÏŽ  @€ÀU¿ŸºëküS˜Û„ì¤ÀVº¾Æ¿“•³o °ýîño¿¹= @€ÐøwŒÞŽ  @€Àö hüÛon @`ÇVVWWÿäw?{ä¦k††ðÒù·v,4;&@€"n8pÅÐ-Î>w᣷?´gÏž ?rw† @€‹(P7~Ký‹X1 @€9 hüs‚5-XD«"& 0'þÊÊÊœ¦6- °8EÇ/~úÅÏâÄ$ @`N»ví*ÿ%—\2§˜–X¢ñ——û—^zéâÄ$ @`NEÇ/×úøÃ>ñÈ]sÚ‡i  @€¸õøéb™¿lü|ðÁûï¿ÿ£ÁÏÅ‹$>ad(ðÐyêwþÛïµÿ¥ü‹·ÿ¡X}{¯ŠÝÄx,¥@q‘_,ò?ÅÙø‹fÿá‡ý¾ú¯Æ¿”UO%©ÿôȧ{¬í]wÜñË·ýtl WïÛ»‰ñXJúaþê‘þÿn›” ¨ÑÐIEND®B`‚PK!è:Jxword/comments.xmlÔYënãÆþ_ ïp–@°v •x‘HIYy¡ ¹à8 K› ùcŒÈ‘Èšœa8¤dµ(Ð×èëåIz†¤îΆÒ­b=3üæÌùÎeÎñû/QKšˆ€³ž¢ÕU(s¹°EOù\ÚXñÄk誦æOqÂ]*î7$lI„R¹/Õ섬ðe Øl¸>IRú²ÃÐÎi5:ö)~žP׎¡¢S-ñ˜2œœó$")þ™,Iž³ø"Ç$ fA¤kUÍ ï)Yº%Ä»­0ò•n!Lùµy#©²oñʈ»™¤6ß±‘ÐeàLøA¼¥'º 'ý ÈòK‡XFáfÝ*Öš_g[£‚—`ñK2£°üˈšZ ±}£Š‡{n$‰HÀv_¤š=åj­óôSÐó Z%DC¬£k¬âÅ×±ü1áY¼C ¾mÌž·X2ôUZ˾‹¯fâ“]9r»ãã ™…(rHä €ôån˜aÕ ¼ž¢+ø@²ÔçF„Á0 DÊC¾¤„erÒ#)‚ÉúN•¿S]í¶Ú]UýYÎ,H¢ü£aã~ÍnL2Fx£m Ì‘…iBŽb Kå¨UþHÌ-ÞcOQU§cô-u;4¢s’…éÞLŽþ)É¿&é:Ä3u—$ì)ÃâDSDWwïÛeÅGùüÚ+tNÌh´|¯\KãiÕpA9“cl„û”ɕ޷ðøùáijO¦O“Ïã© ÂçYèABSô|H} ,‹f4>‡9 BêAJº2Lý@þ¦'\ÎQ瀬ð(—¢ê’ Y ˜7õçkžA,|d“ ¥ø¾\ôýøøÃã½ý£}ÿ”‚̰u±c¹} Æ@"Xp´ ¹n†“Ë)ÏÒ8K•:Œ áé ‰âÖ H8’€Ç©`oÓòˆµÍ0.(Ïî“%žn–<ðnQöyÂ¥åù”ÉEÅkhêK!nÖ”ø5ˆˆ´}pÑIq&*5‰fTÔàoN„Á3…yÆÜ<Õëu¸•t¥Ò¤1䟥ٟz€q]Õ¬èªe4GÕ= ¥ úº£æÞ·õÍTu{ç{PÎ\ÆþW×`EÁÍY&Z2šp f2BÓ_ÿõo‘%ÙŒRzhJ 2SMÕ'òÅ!ëü;ä « a†&ÃH¸þ;::ÅlsüYšæ>xóæ 8ýñ½=’gr­I.wŠd›¶¥·æ B¸Ó–ÚÌÅ9!û`æÓÞÐÕðoÞB?cû% ÉM0OlÃÐ3ã+À#\¼¶È€'íæÁ z0L\1Y ¢1ê1\=Ì£¦óùa8ÿðP‡¾ï¾ÂíIz´–m ¯D߯ ÙÄ|­FóºŒ"½+´žçª§ñÃx:îß¶o^‹Ÿ'G2u£ÕîWIëÿÓ#ý£‚ì­–:RöµÉ.¯‚]£OœPA“%UîéR=ã» g³Ô¶ÝêöµñòÏ ²ëCÜ£å%Ê+óe³oXŽÖt®MÁ‡ôfŠ8­Š#[Ž¡µF£«‹MUY7ìNGËSú‘Ó^ó;h|+/ÍE:Ä»IŒ÷ðß6ª„-ÝtTK]SU\[m[†nvdqwÅizàô‡¶~twk6;­Ùìÿÿx’¬ÏVþ%µêå‹:tœÖÐ>ʪ>r¬Q³s |³i˜† F'Ê/g®@ùáŠnÍž\¿£­[8 dB¨ÓqŠRú[+«n–—JyËgS+‘#ÇÎû®ÏPŒn‹'´ éÈ\¶Zêp³éÁÈ9ï†U¸œ¥o± ±Ààcv‹…óäN¨¯‘b˜ÈÊ,Ä!…ò8š(tÏm¦hÒv.VU ÕZ»oJ[Ü·PË´Mg ËÀ?bxxàΊ6`ÀrjÅ€ä¾l§Í( gA¸FzdnÎÇ1šˆ'I“vQTÜD<™¡ÒÏ&ð¢¯u5µrŒ±T}Ø<*Ùõ~ÇÔšæ!ƒÖÈ evÂ`9su1fO®ôN3oác°¤Éh*)AŽêe.Í©ÊÛœ ²dޱA6ÇŠV®ìIr /”²štÚ1ˆ4É œ¡Œg ½~¢o=XÐ’À+Ú,ôÍlEž~Oÿòôýä#&~ÈîÙi碼s†M´0¶ŽæQÒ×úÖÀhî\Xjx4Ò çÕ¼SÎ\WO0X×`êL´vÛÔôßSúîYÜýÿÿPK!Ñ[Ü¥pword/settings.xml´XYoÛF~/Ðÿ 蹊¸7)Ô x6)ⶈœ°"W6a’K,);NÑÿÞáÙɸpZôIËùæÚ¹ÄáÏo>ÕÕêθ®´ÍÅš¼òÖ+Óä¶(›ë‹õÇ«lã¯W]¯›BW¶1ëÓ­ß¼þñ‡Ÿïwé{`ëV ¢évu~±¾éûv·Ývù©u÷ʶ¦ðh]­{xt×ÛZ»ÛS»ÉmÝê¾<”UÙ?l©çÉõ¬Æ^¬O®ÙÍ*6u™;ÛÙc?ˆììñXæfþY$ÜKìN"‰ÍOµiúÑâÖ™ |°MwS¶Ý¢­þ·Ú¼Y”ÜýÓ%îêjá»'Þ ®{o]ñEâ%î ­³¹é:HP]-–ÍÙ0ÿFÑÛ¯Àö|ÅQˆo<=ö\|ŸúÙ™ïS!fÛî¡6ŸE]õ’LÐûòà´› nŽGïÞ]7ÖéCî@\VpµÕèÝú5TùgkëÕý®5.‡TC‹xÞz;½ÓùísW­Ó¤Âõ©ê¯ôaßÛ¤î48§è,‘ßhéÛ·:‡ÄĶé­¾ÂþfûÃAÞf‰±MΧýÔr ÑèÜ}ÒF—¶€ž¸ß\ùò¸£u"›üÚ…áÊÂ\ aÚ÷•ÉÀù}ùÙ„Mñë©ëKÐ86ÓðàŸ0Í`ùwHìÕCk2£û„é26f"«Êö²tκwM©ÿߌ•Ç£q` Ô½¹„ò)½ãüÖè&ó´»}\F0ç‹n9|°¶_X=KÁ•?y: gÄ#,•1Š0Ƹ £‰7—ÔWWIPDQ†(È,ã(â§(’©t)ê§ñÉPg±Ÿ¡ˆ`G}#Ò£©BER¡H@£½ õq;‘òø\I_! {‰"ü¦™ÈB4n4 L¡24TÜC½†dá<åž"Œ IQ„ú¨6¦x"Ð,°ˆ« ¡ÂePô>,£„?‡¤š9NHš Ï™2RèMŸï9î³ÀÑÔS Z!Þ?ÀÕ&ˆŒ=4nBŠ,E+DDŒøhNEJ¸@ó#RŽH.qm• ­k S‰Ö›äL24§RÂAï#}Î<´ƒeÀ¹ÞG†œÇèLTPG`†Pt")I³’Œ(4Jò0@³ H£±Vð.ÂpßE}4¢€DøŒ‡°Å Ú%¾zn&úõê›ÒÀC‘€JŸ¡¾ŒxLxEB˜±>ÑÁtAí„0ÄR4n¡ Þ³MÑè€ù„ •Æ^à^'̧è 3B2Ôë(Ïd.ŠHä¡v¢ˆ§xÇkEŸAÒ­Þ˜SwIÌ…À§X’ÿׄ ‰×uÂh”¢1HIãg.´F¥HˆF'I¼ˆâ$”áïI-„Æ-…ùGRÀR4 i(ÂÍi }š¢uf„F(’y4‘èD‚¢òc\Æ'Ÿä™¯¢ý/É*4 Y(üÿ'‹‰WU³dšÛ ‚7Úz7ì߸å4¬'«z’ˆu}p¥^]úvà8¸Û¨lü``S4‘ýé°€›Ítµ®ª ö·¨wEÙµ‰9ŽçêR»ë³Þ™Ã¡TØý¢kX-ûÅÙS;¡÷N·ÓÚ±°Îgɲéß—õBïN‡ý"ÕÀnû:5ÅïwnŒÓ9<°¸Âú0®oïõ¸†Œ¼¦Ù|ÜOÁÎ+·V s©ÛvÚT×äb]•×7=–‹ž ínLJÃ51:btÂÆ7îùp¦Ñ…öˆ-4v¦ñ…ÆÏ4±ÐÄ™&šh7°#ºªlnaiZŽýh«ÊÞ›âíÿ†4¡»Ñ­I¦}ÊËN„yÁïVw;󩇨e¿^umYÔúÓðm€Ž;sWúÁžú'¼60·O5º×˺öDx,ñ¯|¾3ä%”ãþ¡>œ?¼š¯ÊVÌV;Ý[·`?á»Âæï “à4•ϲ ™ç#ãŠþjø°yÿ`Ž‘îL1c‹¨˜Dÿ¤>aABýMótÃeÆ7aÈņD~(Îy¤‚¿æ&]>¾þÿÿPK!p4¢Ü¸ ð…word/styles.xmlì]sÛº†ï;ÓÿÀÑU{‘Ø’e;ñçŒíاvâ9Í5DBŽIB%©Øî¯/‚¨%(.ˆ¸gÚ^Ù"µ@¼» ,Å_~}NâàÍrÆÓÓÑøíþ( iÈ#–>œŽ¾Ý_½y7 ò‚¤‰yJOG/4ýúáÏúåé$/^bšæ'Ix:ZÅêdo/—4!ù[¾¢©Ø¹àYB ñ1{ØKHö¸^½ y²"›³˜/{“ýý£‘Æd}(|±`!ýÈÃuBÓBÙïe4DžæK¶Ê+ÚSÚÏ¢UÆCšçâ “¸ä%„¥5f< „…Ïù¢x+F÷H¡„ùx_ý—ÄÀ!0€£œâ‡±—¿$ôy$áÉõCÊ32IR z(ðèƒP3âáGº ë¸ÈåÇì.Óõ'õ犧E<KƒX~{Í6+óV°±V¢Í~I‰Ì'Áx¡ºBL¤Enm;s½uìê[¨†^«¡ék5tøZ ½VCǯÕл×jHa~fC,èsˆ°@ÝűD#šc 64ÇKhŽ%TÐK$ 9GGs,~ŒæXÜÁ)xhóBÃÙ,ÞÞÍÝ=G¸qwO nÜÝ3€wwÂwãîÎïnÜÝéÜ»;{»qw'k<·\j×"ÌÒbp”-8/R^Р ÏÃi$,UdùáÉIf^Ò¦Ìlz"L ‰ú¼ÛCTºÏç…,ç¾ìa‰Ú|hÇiúƒÆ¢JH žG`F‹ufŸÎè‚f4 ©OÇö••`®“¹ß\‘o,šFž‡¯"zI µC‹úy)ƒ„ypê„„Þ5N¼å‡–+ Î×qL=±>ûq1Å^(ÌðÒ@a†W 3¼004ó5Dšæi¤4ÍÓ€iš§q+ýÓ׸iš§qÓ4Oã¦iÃÇíž±JñæªcÜÿÜÝEÌåiñÁý˜±‡”ˆÀðéFŸ3 îHF2²Zò¬t;ÖÝßÞ÷|%ËL90~€ç¼(xâ©Ïþå;ÿÕOÏDœ¾x:Ú3O§‡ì‚y˜dJ<‘Ä2“¥Ì˪x§/sN²Èí.£å5,õDœ‘dU.:<Ä–È‹O"ÿxX )Þ?HÆäy¡Á4ãL_¾žÿNÃáÙé3¼œÌù².Ô)Cµ:UÖþpÃgönø¬~¯Îò͘t9ÛÀ ?ØÎ×Á^Ä$Ï™õWOgž¯Ã­x¾wx½¦y<æÙbûÀ èm+ ·!äñ:IsŸG¬xXñ|¯G—Q<gÑïo‹¼‰¡`¾”P0_2(˜/ Ì«Ã/ª1`ï¬1`Ã/¯)až–Ì—Ÿyþ=ý0cÀ|ù™‚ùò3óåg æËÏ>t±‹`SŒôåsÒßD“4YñŒd/ž—1} Îi–´»Œ/äý<-¯»ö€”§•c‹íçKäïtî­k’åá\&‰cÎ=ÂÚLʲy‰˜Ýì.&!]ò8¢™¥v[Q—ÎÊ;¶›T½ïuFð†=,‹`¶¬O„›˜£ý–UaÜ0ÛÝ`Û8U·z´™ÝÒˆ­“ª£ð>ƒ£ƒþÆÊsÆÓÝÆ›»ayØÓ¶y´Ûr³mX÷´„m¾ëi©²pòˇ?’ì±ÕŽ»ü§®¥,ÎwÜåEµqk³]ŽT[¶¹àq—5B%8 Cy"ªÓ/fìöý‚Çn‰";NvJ︲#ºì+ýÁä ŠIšª½ú«ÕbµWæümÍËSÚßbúßït-(iNƒVÎAÿßtYÆ>޽ÓÑ;ïØ½Ñ+YÍQ)ÉNé›ìˆÞIÊŽ@g+8#಴Çe+hï’­ Å%[ Xؽ—v:P!¨V v*P¹S B :P!¨T¸Ã*´Ç*´w THq THA*D "Ð è@…t :®í­æN )è@…t B:PÕzq@ B{\ B{—@…—@…t B:P!¨Tˆ@*D ˜;*¤ "Ð è@-ïÂsTh Thï¨â¨‚Tˆ@*D "Ð è@…T s§@…t B:P!¨êG¹ íq í]R\RÐ è@…t B:P!¨ T`Tˆ@*Dtù§þ)ÐvúÖÓz1{ÿŸ®t§¾šw9›¨ƒþ¨ªWvVÿËôÏ9 ZïÉ;PõF?›ÇŒ«SÔ–Ÿ¯M®ºôõcå—‹î›_LúÀçéÛÔÏ£>ík ΩL»\Þ´EÞ´ËÓMK°êœve_ÓLƒÓ®¤«â²ºøCLGÀ¸+ÍÆc‹yW¶6ÌáwåhÃŽpWf6 áwåcÃð0ÉyÛú°ç8Õ×qB—;„c;¡Ë-¡VU:†ÑW4;¡¯zvB_픞V ^X; ­°å&5 3¬Ôîj'`¥†'©Æ]jˆr–¢Ü¤†‰+5$`¥vOÎv‚“Ôã.5D9K QnRé +5$`¥†¬Ô'd+Æ]jˆr–¢Ü¤†‹;¬Ô€•°RC‚“Ôã.5D9K QnRƒ*-5$`¥†¬Ôà$5À¸K QÎRCT—Ôê,JCj”†9nfâ&dל C‡jɰv¬– ‚cµµª4ÇUK¦hvB_õ섾2Ú (=­¼°vZa;ÊMj\µÔ&µ{ Ú X©qÕ’Uj\µÔ)5®Zê”W-Ù¥ÆUKmR㪥6©Ý“³à$5®Zê”W-uJ«–ìR㪥6©qÕR›Ô¸j©Mê²ã.5®Zê”W-Ù¥ÆUKmR㪥6©qÕR›Ô¸jÉ*5®Zê”W-uJ«–ìR㪥6©qÕR›Ô¸j©Mj\µd•W-uJ«–:¥ÆUK·Â„ažŽ´÷ÔxÇ‘«Wˆ‰ï/+*smÜx•ùÔ@õÅë¨~‘4–Ýô[ŸôfÕ[ýÃcÙ¢2ÜÑT ׿zŽ~ó#Õœˆ£ú"‡4žÊ§ßµl—O‰«¶WÍ\,IVîÝ zõíV›cy:ÉrQéêÝûûÓ£Ãé±v_ý†ªGJWŸEûj›üpÃRš«O›—WÍ僣ÄL¦ê."ý.+í~¼|ÌÏ͸nH+§›è|ù½ãE`rç¥Þ&÷7Þְܼ Ln>¯ßJw­ú5¹<žž«Ü¤¾¬\ùtD”#+Q›åÕt~U6o;hy›X¹Íx)˜‹ï”¯ÑjóݢߙôðfþdwêçMUø/󦉞Êï¦SÛv{S(„$¡~Tš%ééG×7&ªoû™å¹ÈÑ™l“¹Û]ÆÞïBN"}V“Lg¶.ç!«k/ÞÕCÑŸy\ú‘øç:•>ý¤ßNWö4z&%Jì¿ q|KÊoó•ý«1]ÈP{Çûêq[ûçåíö™ZúX{ÍΔ»ý¤|ýƒ¾&Ç:9Êù½e¸ÕbCG›ËËœ¶;Sn-qX*T¤®<8Öy•õÀkÍ—<–Y¾äQ¦“T¾ÿbMbýÔ…?L¢Û:è7Õ¨<Ò¬ú‰ƒMJ;lIiå6dJ ×¹ˆµä)¢°ÕI‚¶[žÒšÛýc—oØýáÿšµiÖX»n˦wŠÒo tõBÜ–²þÈâý±×©r&Ø<á`[AUnv·)h¦c¨Ì¾ •s™šµåœ+¯VÖ¾Þ•Q½ùq¹Ž¶ùñÄ“kÿ‡ýØÛ ¹ð‚'òa囋²·El}«NÊ!«Ò¦¦WïΪ´¦›Á· N¹Í5Èõà¨gFuŒ‹zc×®7ýÙàv F ,Çv,ÁÀbËp>l8_ubÃÓ¼¸=2Û£®÷—oG˜ULuq œrÈ u:åL?x»Ã/«gs· 8x³T;[†M·ÿ³ýWè¼<† yÞÄ»·™‡bs8ý»ÏµÆ´}Ü|{œ9@?×ÿôýZ“bãim£dˈôÕ3"¢@ÝQŠžŽfôÓàÛu½Thn sãó–Rãº1¦/µÍŸÃos—~CÓ«é'žý?4êÕù‡ÿÿPK!±?¸b"Nword/webSettings.xml”ÒÍJ1à»à;„ÜÛl‹-²t[©þÖ{šÎ¶Á$2©ÛõéתH/í-“É|Ì$™ÌvÞ‰wHd1TrÐ/¤€`peú’‹—yïR Ê:¬´Ã•lälz~6iÊ–Ï3Ÿ$ÁJ Ò›JnrŽ¥Rd6à5õ1BàdÉëÌaZ+¯ÓÛ6ö ú¨³]Zgs«†E1–{&£`][×h¶BîêUÇ"ÚØH?ZsŒÖ`ZÅ„ˆxï¾=¯møe·&!aû<̾£ŽâòAÑ­¼ûF§Ã`Lp1ÚŠZ;)¼)oד^:–x$Á]‰–S~RŒÙzûsLW ‚¤¾¶ù^ÛÇðz×EÚ9lžn8Pÿ~ÁôÿÿPK!~uz{ÍdocProps/app.xml ¢( œRËNÃ0¼#ñQîÔ ¥ª­+T„8ð’Ú³ål Ƕl·¢φ@âFN»³ÞñÌİzour@”5Ë4Ÿdi‚FÚR™z™¾wgWi¢0¥ÐÖà2=bHWüô^¼uè£Â… Ë´‰Ñ- ²ÁV„ M*ë[©õ5³U¥$ÞZ¹oÑDvžes†ïM‰å™Óžqqˆÿ%-­ìô…mqtÄÇ¡ÀÖi‘?u›Ø@a£Ð…j‘_Os -¼ˆ¿Ö°³¾ <ϧS`} ëFx!#åÇçsÂGÜ8§•‘¢åJzl“çO½IGl|ÈÃåÞ«xä°q Ê„ÝÐW$Î‹Ú ×¢Y'qha#…Æ5ùç•Ðý°¶­†ÙPá[xu…½íòøZù Ž|îTl6NÈ.™ÙU>v<Á†P,É aàž~Š×Ý´kj,¿Ïütnû×Éóù$£ï3´oŒŒφÿÿPK!ÚN´:ó}word/people.xml¤•ÛŽ›0†ï+õï‰1‚PȪڨU®·}¯q‚µØcÙ’·¯!¶´ÊABcæ›ßþgÌúå(« áÆ P9"³\1(„:äèÏïŸáÖQUÐ Ïщ[ô²ùþmÝ’4ÓtÅP6k5ËQéœÎ0¶¬ä’ڙ̀…½›1ö{Á8nÁ8ŽHÔ?iŒ[ëó½RÕP‹;ÞF+ m}pL0+©qü81Èݯðò?ò+ŒÉÿ(y½K ¹ò“{0’:?4,©ù¨uèÉš:ñ.*áNÍG ä¨6*áEL’Å ·1ÂÜ’÷²VK®\Ÿ^y  l)ôÅù(ÍO–#¤ùj¬ÆïZM’çjk{öeÞ"0SVgå_Itƒ#âq‹„sŽJ$jJüÐÖ|Ú\’Þˆ¯sËïC¤Û“œZ£Õ‡ç\þe ÖMKÝ㻓ë(xލà8uWX¹W—ïß],G¼d,ÁÐ ®FË"KݹÖÅÈóT6Ç ©SF2)”˜êÓL0OL§$ÃÞRÈÜ ýÀ¯Þ )2¬àÜ"¾@Ê­á²çýÐr‰–àl#/›#©ñó#è {Co° ö‚ Ãà%ÛeI˜ƒr*$C>åÌcH>•Å H“ ¡D¯ÔO‘º¥ä£âdŒqÙ`ê¥ñûìk]>ˆ¬d˜ëjGOb 1®æ¤X—‡õEå¼Y¼–Ä‚ÑÆnYÑag냭ËpŸðëb2j#1ð÷¨ˆX{ìÂöžM$ ¾Ù¸5-rƒ¸@¸(Ü "®!<µb›ÖX³ÃªüIŠ²Ø ‘ÃÐîùÓË̾XõiiŸ`uX0sT@+³lt?ãB¢ …ˆ ö”Ï©*à˜.q/a2£‰Òeú¡dÎÖ×}žº0áÁe$1Œui„vˆ_O5–7£'cbP¸"9¸/MÝè:> ‡QìzFÃJªÉW¼Àt¼*pc3_M$É¿5:k«YA‹ÁMœÜ†¾ÕÐ…QXlP#]P˜Iòñö.9·™À?æŽéÆRRŠõÚ{ŒŸ×ª“µôKÖÈ(žÖÆÅwiÂMBFœºçaµçñYõ¯;Kª°¼µ±¬—;Áµ24ªŒÀºE”@žÆ#¥¯Ac('ƒ¨Ëçk ­6/[æ™Ò-Ã’[;Â!šOWGPmíUÙ¼$*ØåGþÐ÷ý³Jãfô ãS·!"°,ìM¦èJfE=Ù¥$X:xÙ&m[š©]Ãn¬…;¬ÅoÏÚß_¿»òI?Þ~‚µ¹£©kÛ²nÙCÔ&È´7&èOg‚ƒ~=®ØDÐ;-A7j¢£ì8àá¨;Îö×ñu\tÖsî¿uÇ%GÚq±ßs”¿]ÇeÇÅç=gõê¸Á‘v\õá‡wœ·uù­uª§¹ [>¶®ÇMFM„ܸÙÕ^“/ÿÿÿPK!ä³€Vvp word/fontTable.xmlÌ•KÚ0…÷•ú"ï‡8!<5a4CA©êbêÚ¬Ævä^ÿ¾×I€¡•TbÔ ¢ä\ûÄþß?lUê­…itL‚%žÐÜÌ¥^Ääýmz×'äLÏYj´ˆÉNy}ýr¿&Fçàa CÅc²ÌólèûÀ—B1h™Lh,&Æ*–ã­]øŠÙ_«ìŽ•±\Îd*óRÚ%•½ÆÅ$‰äâ›á+%t^ô÷­HÑÑhXÊ ön›kÜ6ÆÎ3k¸À9«´ôSLêƒM)É­“ä-œL5¢Â »´¸RéÑ ÓÌ <3è‚hfÑ©,|Ø)±%žâÃç…6–ÍRtÂ)y8*¯0&£êez›¡f Ëc–Ê™•E!cÚ€°¶fiLhH§´ƒg÷‹hÛ‰ïò%³ œIÙ–r”Lw{6 ,d2ç˽¾fVº¡•% ,¬`Fc2¡x„Ó))• & ヺgGP)íƒB Ÿ²Å èÅ ŸC|¦_8#ñ&•ï‡Øx/F1}HH»H¢ƒ<™v#"¶ðmJ$œ|$2F¥×ÚgD'Rú\OdlVV ë˜\ ÑCƒ‚Š£5¢¡Ì\Ø:‰ÜŠùÿÆâ'&†KJ¨%ÑÙ[za ¶ÊM£Ïâã¤JÁ©rD±WjQôO•+Q¼îÔ̤8t0].öp¸¯¢×€CóõñÇ$?D•Þw¹XæÔåæg%è£2.’ÓÅuúÔŒGqÛ8A_ÅÂïýùЧ*$Ê?†çm7“¨..&Qï|3¹Itj0)«O ‡¢[åfó¯â_rótWuÂôV»ju£ßÿÿPK!Ñdãhÿïword/commentsExtended.xml¤•ÝŽ¢0†Ï7™{ =×¶Œ ’Á‰ n<Ûdv/ Sª¡?iQôî·þÌêÁ# ô}¾—¾íÇÛûŽçΖi“IÜGÀa‚Ê$ëüù½è€c "’KÁB°g¼O^~¼•Ø ¨äœ‰ÂÌwŽÅ”І - @hhÊ81}žQ-\};ÊÕ*£ –R'ÐEî”–”ckÆDl‰ Žî£%š”V\¦DlwfàÖŽáèävÙ/tñ¿(~½JR1a_®¤æ¤°z 9Ñ_Õ³dEŠì3˳bo¡È?bd6Z ¢w2SI‚ÚLs9*ô#ukÉLÒMî¡"Ô,·¤0i¦Nñð®4û2=B¶÷>bËóã¼RáÁs{kVçr>b¿ “çµóûDŒH¤BœXø^óè„“Lœ wZš‹ÅÅ^;€{ð k‡ð4{~>¥Z?—òO-7êLËž£-Å׉Uµ¿¬f·\î`󜙔({”9 –k!5ùÌ­#›½cãs 8Õ)“Ëæl{sõ¤ˆ&Ë$¯£aäφ¶«W£É¡§#ïIÐÐðáZRþ"ÚNì„D‹iÙWe´ç•Ñc’ ‰@ #•^Éër?È#×’—FØÀ“Iq{“ › ãàÙ ø((iŸ ;&kD›QêÅ*îСùe\Å1¤nE-¾š26¢ —9mcÛ+’£¤½¤Ýº²‚B hô4$ôÌ"¸Ê_h;¿ÈJáÁÂUôÔìé½W=X×õ ¶hØ?¡ï‹§—öWc¥¯"—"C…%9=‡!òÛÏoØ•û$ÄÂGãŠ×ÑÔ)¦4;àzÛ’§nãûµqÒ‹,`¼pÊb¸Íî„‹B Kîq®÷K|<\;ì/ÔÌ9Ø©æ c-Óò£åÝŠ £`UÖ{ê¼ §³åœ)Kîb¾t™¦YšdŒ}4[^ÌŸ«ã ÿ+ŽbvD—,ù£x茺|®ÅÿÿPK-!W¥&Œl[Content_Types].xmlPK-!‘·ïN Å_rels/.relsPK-!¶ï—R¶åword/_rels/document.xml.relsPK-!ºõ½âl0–Äy word/document.xmlPK-!ªR%ß#‹:word/theme/theme1.xmlPK- !œg³µ$µ$j@word/media/image1.pngPK-!è:JxReword/comments.xmlPK-!Ñ[Ü¥pËlword/settings.xmlPK-!p4¢Ü¸ ð…úrword/styles.xmlPK-!±?¸b"N߀word/webSettings.xmlPK-!~uz{Í3‚docProps/app.xmlPK-!ÚN´:ó}ä„word/people.xmlPK-!¼bÙ‘N2‡word/numbering.xmlPK-!ä³€Vvp ‚Šword/fontTable.xmlPK-!Ñdãhÿï(word/commentsExtended.xmlPK-!欪9{û^docProps/core.xmlPK’azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc/000077500000000000000000000000001362133436400332675ustar00rootroot00000000000000aux_inc/000077500000000000000000000000001362133436400346365ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inccstdbool000066400000000000000000000003541362133436400363740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CSTDBOOL_H #define CSTDBOOL_H #include "stdbool.h" #endif /* STDBOOL_H */ cstdint000066400000000000000000000003511362133436400362300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CSTDINT_H #define CSTDINT_H #include "stdint.h" #endif /* CSTDINT_H */ inttypes.h000066400000000000000000000006501362133436400366670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef INTTYPES_H #define INTTYPES_H #define PRId8 "hhd" #define PRId16 "hd" #define PRId32 "d" #define PRId64 "lld" #define PRIu8 "hhu" #define PRIu16 "hu" #define PRIu32 "u" #define PRIu64 "llu" #endif // INTTYPES_H stdbool.h000066400000000000000000000006221362133436400364550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STDBOOL_H #define STDBOOL_H #define __bool_true_false_are_defined 1 #define HAS_STDBOOL #ifndef __cplusplus typedef unsigned char bool; typedef bool _Bool; #define false 0 #define true 1 #endif /* __cplusplus */ #endif /* STDBOOL_H */ stdint.h000066400000000000000000000031741362133436400363210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STDINT_H #define STDINT_H typedef signed char int8_t; typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; typedef signed char int_least8_t; typedef short int_least16_t; typedef int int_least32_t; typedef long long int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned long long uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; typedef long long int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; typedef unsigned long long uint_fast64_t; #define INT8_MIN (-127i8 - 1) #define INT16_MIN (-32767i16 - 1) #define INT32_MIN (-2147483647i32 - 1) #define INT64_MIN (-9223372036854775807i64 - 1) #define INT8_MAX 127i8 #define INT16_MAX 32767i16 #define INT32_MAX 2147483647i32 #define INT64_MAX 9223372036854775807i64 #define UINT8_MAX 0xffui8 #define UINT16_MAX 0xffffui16 #define UINT32_MAX 0xffffffffui32 #define UINT64_MAX 0xffffffffffffffffui64 #endif /* STDINT_H */ ctest.h000066400000000000000000000364631362133436400345170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CTEST_H #define CTEST_H #ifdef __cplusplus #include #include #include #include "ctest_macros.h" #include #include /* Some compilers do not want to play by the standard, specifically ARM CC */ #include /* Some compilers do not want to play by the standard, specifically ARM CC */ extern "C" { #define C_LINKAGE "C" #define C_LINKAGE_PREFIX extern "C" #else #include #include #include #include "ctest_macros.h" #include #define C_LINKAGE #define C_LINKAGE_PREFIX #endif #if defined _MSC_VER #define CTEST_USE_STDINT #define snprintf _snprintf #elif defined __cplusplus #define CTEST_USE_STDINT #elif defined __STDC_VERSION__ #if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) #define CTEST_USE_STDINT #else C_LINKAGE_PREFIX int snprintf(char * s, size_t n, const char * format, ...); #endif #endif #if defined _MSC_VER && _MSC_VER <= 1700 #pragma warning(disable: 4054 4127 4510 4512 4610) /* MSC 1500 (VS2008) incorrectly fires this */ #endif #if defined CTEST_USE_STDINT #include #endif typedef void(*TEST_FUNC)(void); typedef enum CTEST_FUNCTION_TYPE_TAG { CTEST_BEGIN_SUITE, CTEST_END_SUITE, CTEST_TEST_FUNCTION, CTEST_TEST_SUITE_INITIALIZE, CTEST_TEST_SUITE_CLEANUP, CTEST_TEST_FUNCTION_INITIALIZE, CTEST_TEST_FUNCTION_CLEANUP } CTEST_FUNCTION_TYPE; typedef enum TEST_RESULT_TAG { TEST_SUCCESS, TEST_FAILED, TEST_NOT_EXECUTED } TEST_RESULT; typedef struct TEST_FUNCTION_DATA_TAG { const TEST_FUNC TestFunction; const char* TestFunctionName; const void* const NextTestFunctionData; TEST_RESULT* const TestResult; const CTEST_FUNCTION_TYPE FunctionType; } TEST_FUNCTION_DATA; #define STR_CONCAT2(x,y) x##y #define STR_CONCAT(x,y) STR_CONCAT2(x,y) #define EXPAND_1(A) A extern const TEST_FUNCTION_DATA* g_CurrentTestFunction; extern jmp_buf g_ExceptionJump; #define CTEST_BEGIN_TEST_SUITE(testSuiteName) \ C_LINKAGE_PREFIX const int TestListHead_Begin_##testSuiteName = 0; \ static const TEST_FUNCTION_DATA STR_CONCAT(TestFunctionData, EXPAND_1(__COUNTER__)) = { NULL, NULL, NULL, NULL, CTEST_BEGIN_SUITE }; \ #define CTEST_FUNCTION(funcName) \ static void funcName(void); \ static TEST_RESULT funcName##_TestResult; \ static const TEST_FUNCTION_DATA STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_INC(__COUNTER__))) = \ { funcName, #funcName, &STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_DEC(CTEST_DEC(__COUNTER__)))), &funcName##_TestResult, CTEST_TEST_FUNCTION }; \ static void funcName(void) #define CTEST_SUITE_INITIALIZE() \ static void TestSuiteInitialize(void); \ static const TEST_FUNCTION_DATA STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_INC(__COUNTER__))) = \ { TestSuiteInitialize, "TestSuiteInitialize", &STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_DEC(CTEST_DEC(__COUNTER__)))), NULL, CTEST_TEST_SUITE_INITIALIZE }; \ static void TestSuiteInitialize(void) #define CTEST_SUITE_CLEANUP() \ static void TestSuiteCleanup(void); \ static const TEST_FUNCTION_DATA STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_INC(__COUNTER__))) = \ { &TestSuiteCleanup, "TestSuiteCleanup", &STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_DEC(CTEST_DEC(__COUNTER__)))), NULL, CTEST_TEST_SUITE_CLEANUP }; \ static void TestSuiteCleanup(void) #define CTEST_FUNCTION_INITIALIZE() \ static void TestFunctionInitialize(void); \ static const TEST_FUNCTION_DATA STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_INC(__COUNTER__))) = \ { TestFunctionInitialize, "TestFunctionInitialize", &STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_DEC(CTEST_DEC(__COUNTER__)))), NULL, CTEST_TEST_FUNCTION_INITIALIZE }; \ static void TestFunctionInitialize(void) #define CTEST_FUNCTION_CLEANUP() \ static void TestFunctionCleanup(void); \ static const TEST_FUNCTION_DATA STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_INC(__COUNTER__))) = \ { &TestFunctionCleanup, "TestFunctionCleanup", &STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_DEC(CTEST_DEC(__COUNTER__)))), NULL, CTEST_TEST_FUNCTION_CLEANUP }; \ static void TestFunctionCleanup(void) #define CTEST_END_TEST_SUITE(testSuiteName) \ static const TEST_FUNCTION_DATA STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_INC(__COUNTER__))) = { NULL, NULL, NULL, NULL, CTEST_TEST_FUNCTION }; \ C_LINKAGE_PREFIX const TEST_FUNCTION_DATA TestListHead_##testSuiteName = { NULL, NULL, &STR_CONCAT(TestFunctionData, EXPAND_1(CTEST_DEC(CTEST_DEC(__COUNTER__)))), NULL, CTEST_END_SUITE }; \ static const int* TestListHead_End_##testSuiteName = &TestListHead_Begin_##testSuiteName; #define PRINT_MY_ARG_2(A) #define PRINT_MY_ARG_1(A) \ A += #ifdef _MSC_VER #define PRINT_SECOND_ARG(argCount, B) \ C2(PRINT_MY_ARG_,argCount) LPAREN B ) #else #define PRINT_SECOND_ARG(argCount, B) \ C2(PRINT_MY_ARG_,argCount) (B) #endif #define CTEST_RUN_TEST_SUITE(...) \ do \ { \ extern C_LINKAGE const TEST_FUNCTION_DATA C2(TestListHead_,FIRST_ARG(__VA_ARGS__)); \ IF(DIV2(COUNT_ARG(__VA_ARGS__)),FOR_EACH_1_COUNTED(PRINT_SECOND_ARG, __VA_ARGS__),) RunTests(&C2(TestListHead_, FIRST_ARG(__VA_ARGS__)), TOSTRING(FIRST_ARG(__VA_ARGS__))); \ } while ((void)0,0) typedef const char* char_ptr; typedef void* void_ptr; typedef long double long_double; typedef unsigned long unsigned_long; extern C_LINKAGE void int_ToString(char* string, size_t bufferSize, int val); extern C_LINKAGE void char_ToString(char* string, size_t bufferSize, char val); extern C_LINKAGE void short_ToString(char* string, size_t bufferSize, short val); extern C_LINKAGE void long_ToString(char* string, size_t bufferSize, long val); extern C_LINKAGE void size_t_ToString(char* string, size_t bufferSize, size_t val); extern C_LINKAGE void float_ToString(char* string, size_t bufferSize, float val); extern C_LINKAGE void double_ToString(char* string, size_t bufferSize, double val); extern C_LINKAGE void long_double_ToString(char* string, size_t bufferSize, long double val); extern C_LINKAGE void char_ptr_ToString(char* string, size_t bufferSize, const char* val); extern C_LINKAGE void void_ptr_ToString(char* string, size_t bufferSize, const void* val); extern C_LINKAGE void unsigned_long_ToString(char* string, size_t bufferSize, unsigned long val); extern C_LINKAGE int int_Compare(int left, int right); extern C_LINKAGE int char_Compare(char left, char right); extern C_LINKAGE int short_Compare(short left, short right); extern C_LINKAGE int long_Compare(long left, long right); extern C_LINKAGE int size_t_Compare(size_t left, size_t right); extern C_LINKAGE int float_Compare(float left, float right); extern C_LINKAGE int double_Compare(double left, double right); extern C_LINKAGE int long_double_Compare(long double left, long double right); extern C_LINKAGE int char_ptr_Compare(const char* left, const char* right); extern C_LINKAGE int void_ptr_Compare(const void * left, const void* right); extern C_LINKAGE int unsigned_long_Compare(unsigned long left, unsigned long right); #if defined CTEST_USE_STDINT extern C_LINKAGE void uint8_t_ToString(char* string, size_t bufferSize, uint8_t val); extern C_LINKAGE void int8_t_ToString(char* string, size_t bufferSize, int8_t val); extern C_LINKAGE void uint16_t_ToString(char* string, size_t bufferSize, uint16_t val); extern C_LINKAGE void int16_t_ToString(char* string, size_t bufferSize, int16_t val); extern C_LINKAGE void uint32_t_ToString(char* string, size_t bufferSize, uint32_t val); extern C_LINKAGE void int32_t_ToString(char* string, size_t bufferSize, int32_t val); extern C_LINKAGE void uint64_t_ToString(char* string, size_t bufferSize, uint64_t val); extern C_LINKAGE void int64_t_ToString(char* string, size_t bufferSize, int64_t val); extern C_LINKAGE int uint8_t_Compare(uint8_t left, uint8_t right); extern C_LINKAGE int int8_t_Compare(int8_t left, int8_t right); extern C_LINKAGE int uint16_t_Compare(uint16_t left, uint16_t right); extern C_LINKAGE int int16_t_Compare(int16_t left, int16_t right); extern C_LINKAGE int uint32_t_Compare(uint32_t left, uint32_t right); extern C_LINKAGE int int32_t_Compare(int32_t left, int32_t right); extern C_LINKAGE int uint64_t_Compare(uint64_t left, uint64_t right); extern C_LINKAGE int int64_t_Compare(int64_t left, int64_t right); #endif #define CTEST_COMPARE(toStringType, cType) \ typedef cType toStringType; \ static int toStringType##_Compare(toStringType left, toStringType right) #define CTEST_TO_STRING(toStringType, cType, string, bufferSize, value) \ static void toStringType##_ToString(char* string, size_t bufferSize, cType value) #define EAT_2(X1,X2, NAME,...) NAME #define EAT_3(X1,X2,X3, NAME,...) NAME #define EAT_4(X1,X2,X3,X4, NAME,...) NAME #ifdef _MSC_VER #define LPAREN ( #define CTEST_ASSERT_ARE_EQUAL(...) EAT_4 LPAREN __VA_ARGS__, CTEST_ASSERT_ARE_EQUAL_WITH_MSG, CTEST_ASSERT_ARE_EQUAL_WITHOUT_MSG)(__VA_ARGS__) #else #define CTEST_ASSERT_ARE_EQUAL(...) EAT_4 (__VA_ARGS__, CTEST_ASSERT_ARE_EQUAL_WITH_MSG, CTEST_ASSERT_ARE_EQUAL_WITHOUT_MSG)(__VA_ARGS__) #endif void do_jump(jmp_buf *exceptionJump, const volatile void* expected, const volatile void* actual); #define CTEST_ASSERT_ARE_EQUAL_WITH_MSG(type, A, B, message) \ do { \ const type A_value = (const type)(A); \ const type B_value = (const type)(B); \ char expectedString[1024]; \ char actualString[1024]; \ type##_ToString(expectedString, sizeof(expectedString), A_value); /*one evaluation per argument*/ \ type##_ToString(actualString, sizeof(actualString), B_value);/*one evaluation per argument*/ \ if (type##_Compare(A_value, B_value)) \ { \ (void)printf(" Assert failed: %s Expected: %s, Actual: %s\n", message, expectedString, actualString); \ if (g_CurrentTestFunction != NULL) *g_CurrentTestFunction->TestResult = TEST_FAILED; \ do_jump(&g_ExceptionJump, expectedString, actualString); \ } \ } while (0) #define CTEST_ASSERT_ARE_EQUAL_WITHOUT_MSG(type, A, B) CTEST_ASSERT_ARE_EQUAL_WITH_MSG(type, (A), (B), "") #ifdef _MSC_VER #define LPAREN ( #define CTEST_ASSERT_ARE_NOT_EQUAL(...) EAT_4 LPAREN __VA_ARGS__, CTEST_ASSERT_ARE_NOT_EQUAL_WITH_MSG, CTEST_ASSERT_ARE_NOT_EQUAL_WITHOUT_MSG)(__VA_ARGS__) #else #define CTEST_ASSERT_ARE_NOT_EQUAL(...) EAT_4 (__VA_ARGS__, CTEST_ASSERT_ARE_NOT_EQUAL_WITH_MSG, CTEST_ASSERT_ARE_NOT_EQUAL_WITHOUT_MSG)(__VA_ARGS__) #endif #define CTEST_ASSERT_ARE_NOT_EQUAL_WITH_MSG(type, A, B, message) \ do { \ const type A_value = (const type)(A); \ const type B_value = (const type)(B); \ char expectedString[1024]; \ char actualString[1024]; \ type##_ToString(expectedString, sizeof(expectedString), A_value); /*one evaluation per argument*/ \ type##_ToString(actualString, sizeof(actualString), B_value);/*one evaluation per argument*/ \ if (!type##_Compare(A_value, B_value)) \ { \ (void)printf(" Assert failed: %s Expected: %s, Actual: %s\n", message, expectedString, actualString); \ if (g_CurrentTestFunction != NULL) *g_CurrentTestFunction->TestResult = TEST_FAILED; \ do_jump(&g_ExceptionJump, "some expected string", actualString); \ } \ } while (0) #define CTEST_ASSERT_ARE_NOT_EQUAL_WITHOUT_MSG(type, A, B) CTEST_ASSERT_ARE_NOT_EQUAL_WITH_MSG(type, (A), (B), "") #ifdef _MSC_VER #define LPAREN ( #define CTEST_ASSERT_IS_NULL(...) EAT_2 LPAREN __VA_ARGS__, CTEST_ASSERT_IS_NULL_WITH_MSG, CTEST_ASSERT_IS_NULL_WITHOUT_MSG)(__VA_ARGS__) #else #define CTEST_ASSERT_IS_NULL(...) EAT_2 (__VA_ARGS__, CTEST_ASSERT_IS_NULL_WITH_MSG, CTEST_ASSERT_IS_NULL_WITHOUT_MSG)(__VA_ARGS__) #endif #define CTEST_ASSERT_IS_NULL_WITH_MSG(value, message) \ do \ { \ const void* copy_of_value = (void*)(value); \ if (copy_of_value != NULL) \ { \ (void)printf(" Assert failed in line %d: NULL expected, actual: 0x%p. %s\n", __LINE__, copy_of_value, (message)); \ if (g_CurrentTestFunction != NULL) *g_CurrentTestFunction->TestResult = TEST_FAILED; \ do_jump(&g_ExceptionJump, "expected it to be NULL (actual is the value)", copy_of_value); \ } \ } \ while(0) #define CTEST_ASSERT_IS_NULL_WITHOUT_MSG(value) CTEST_ASSERT_IS_NULL_WITH_MSG((value), "") #ifdef _MSC_VER #define LPAREN ( #define CTEST_ASSERT_IS_NOT_NULL(...) EAT_2 LPAREN __VA_ARGS__, CTEST_ASSERT_IS_NOT_NULL_WITH_MSG, CTEST_ASSERT_IS_NOT_NULL_WITHOUT_MSG)(__VA_ARGS__) #else #define CTEST_ASSERT_IS_NOT_NULL(...) EAT_2 (__VA_ARGS__, CTEST_ASSERT_IS_NOT_NULL_WITH_MSG, CTEST_ASSERT_IS_NOT_NULL_WITHOUT_MSG)(__VA_ARGS__) #endif #define CTEST_ASSERT_IS_NOT_NULL_WITH_MSG(value, message) \ do \ { \ const void* copy_of_value = (void*)(value); \ if (copy_of_value == NULL) \ { \ (void)printf(" Assert failed in line %d: non-NULL expected. %s\n", __LINE__, (message)); \ if (g_CurrentTestFunction != NULL) *g_CurrentTestFunction->TestResult = TEST_FAILED; \ do_jump(&g_ExceptionJump, "expected it not to be NULL (actual is value)", copy_of_value); \ } \ }while(0) #define CTEST_ASSERT_IS_NOT_NULL_WITHOUT_MSG(value) CTEST_ASSERT_IS_NOT_NULL_WITH_MSG((value), "") #ifdef _MSC_VER #define LPAREN ( #define CTEST_ASSERT_IS_TRUE(...) EAT_2 LPAREN __VA_ARGS__, CTEST_ASSERT_IS_TRUE_WITH_MSG, CTEST_ASSERT_IS_TRUE_WITHOUT_MSG)(__VA_ARGS__) #else #define CTEST_ASSERT_IS_TRUE(...) EAT_2 (__VA_ARGS__, CTEST_ASSERT_IS_TRUE_WITH_MSG, CTEST_ASSERT_IS_TRUE_WITHOUT_MSG)(__VA_ARGS__) #endif #define CTEST_ASSERT_IS_TRUE_WITH_MSG(expression, message) \ do { \ int expression_is_false = ((expression)==0);/*one evaluation per argument*/ \ if (expression_is_false) \ { \ (void)printf(" Assert failed in line %d: Expression should be true: %s. %s\n", __LINE__, #expression, (message)); \ if (g_CurrentTestFunction != NULL) *g_CurrentTestFunction->TestResult = TEST_FAILED; \ do_jump(&g_ExceptionJump, "expected it to be true", "but it wasn't"); \ } \ }while(0) #define CTEST_ASSERT_IS_TRUE_WITHOUT_MSG(expression) CTEST_ASSERT_IS_TRUE_WITH_MSG(expression, "") #ifdef _MSC_VER #define LPAREN ( #define CTEST_ASSERT_IS_FALSE(...) EAT_2 LPAREN __VA_ARGS__, CTEST_ASSERT_IS_FALSE_WITH_MSG, CTEST_ASSERT_IS_FALSE_WITHOUT_MSG)(__VA_ARGS__) #else #define CTEST_ASSERT_IS_FALSE(...) EAT_2 (__VA_ARGS__, CTEST_ASSERT_IS_FALSE_WITH_MSG, CTEST_ASSERT_IS_FALSE_WITHOUT_MSG)(__VA_ARGS__) #endif #define CTEST_ASSERT_IS_FALSE_WITH_MSG(expression, message) \ do { \ int expression_is_true = ((expression)!=0);/*one evaluation per argument*/ \ if (expression_is_true) \ { \ (void)printf(" Assert failed in line %d: Expression should be true: %s. %s\n", __LINE__, #expression, (message)); \ if (g_CurrentTestFunction != NULL) *g_CurrentTestFunction->TestResult = TEST_FAILED; \ do_jump(&g_ExceptionJump, "expected it to be false", "but it was true"); \ } \ }while(0) #define CTEST_ASSERT_IS_FALSE_WITHOUT_MSG(expression) CTEST_ASSERT_IS_FALSE_WITH_MSG(expression, "") #define CTEST_ASSERT_FAIL(message) \ do \ { \ (void)printf(" Assert failed in line %d: %s\n", __LINE__, (message)); \ if (g_CurrentTestFunction != NULL) *g_CurrentTestFunction->TestResult = TEST_FAILED; \ do_jump(&g_ExceptionJump, (void*)"nothing expected, 100% fail", (void*)"nothing actual, 100% fail"); \ } \ while(0) extern C_LINKAGE size_t RunTests(const TEST_FUNCTION_DATA* testListHead, const char* testSuiteName); #ifdef __cplusplus } #endif #endif ctest_macros.h000066400000000000000000016275021362133436400360640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CTEST_MACROS_H #define CTEST_MACROS_H #define EXPAND_2(A, B) A ## B #define CTEST_INC_0 1 #define CTEST_INC_1 2 #define CTEST_INC_2 3 #define CTEST_INC_3 4 #define CTEST_INC_4 5 #define CTEST_INC_5 6 #define CTEST_INC_6 7 #define CTEST_INC_7 8 #define CTEST_INC_8 9 #define CTEST_INC_9 10 #define CTEST_INC_10 11 #define CTEST_INC_11 12 #define CTEST_INC_12 13 #define CTEST_INC_13 14 #define CTEST_INC_14 15 #define CTEST_INC_15 16 #define CTEST_INC_16 17 #define CTEST_INC_17 18 #define CTEST_INC_18 19 #define CTEST_INC_19 20 #define CTEST_INC_20 21 #define CTEST_INC_21 22 #define CTEST_INC_22 23 #define CTEST_INC_23 24 #define CTEST_INC_24 25 #define CTEST_INC_25 26 #define CTEST_INC_26 27 #define CTEST_INC_27 28 #define CTEST_INC_28 29 #define CTEST_INC_29 30 #define CTEST_INC_30 31 #define CTEST_INC_31 32 #define CTEST_INC_32 33 #define CTEST_INC_33 34 #define CTEST_INC_34 35 #define CTEST_INC_35 36 #define CTEST_INC_36 37 #define CTEST_INC_37 38 #define CTEST_INC_38 39 #define CTEST_INC_39 40 #define CTEST_INC_40 41 #define CTEST_INC_41 42 #define CTEST_INC_42 43 #define CTEST_INC_43 44 #define CTEST_INC_44 45 #define CTEST_INC_45 46 #define CTEST_INC_46 47 #define CTEST_INC_47 48 #define CTEST_INC_48 49 #define CTEST_INC_49 50 #define CTEST_INC_50 51 #define CTEST_INC_51 52 #define CTEST_INC_52 53 #define CTEST_INC_53 54 #define CTEST_INC_54 55 #define CTEST_INC_55 56 #define CTEST_INC_56 57 #define CTEST_INC_57 58 #define CTEST_INC_58 59 #define CTEST_INC_59 60 #define CTEST_INC_60 61 #define CTEST_INC_61 62 #define CTEST_INC_62 63 #define CTEST_INC_63 64 #define CTEST_INC_64 65 #define CTEST_INC_65 66 #define CTEST_INC_66 67 #define CTEST_INC_67 68 #define CTEST_INC_68 69 #define CTEST_INC_69 70 #define CTEST_INC_70 71 #define CTEST_INC_71 72 #define CTEST_INC_72 73 #define CTEST_INC_73 74 #define CTEST_INC_74 75 #define CTEST_INC_75 76 #define CTEST_INC_76 77 #define CTEST_INC_77 78 #define CTEST_INC_78 79 #define CTEST_INC_79 80 #define CTEST_INC_80 81 #define CTEST_INC_81 82 #define CTEST_INC_82 83 #define CTEST_INC_83 84 #define CTEST_INC_84 85 #define CTEST_INC_85 86 #define CTEST_INC_86 87 #define CTEST_INC_87 88 #define CTEST_INC_88 89 #define CTEST_INC_89 90 #define CTEST_INC_90 91 #define CTEST_INC_91 92 #define CTEST_INC_92 93 #define CTEST_INC_93 94 #define CTEST_INC_94 95 #define CTEST_INC_95 96 #define CTEST_INC_96 97 #define CTEST_INC_97 98 #define CTEST_INC_98 99 #define CTEST_INC_99 100 #define CTEST_INC_100 101 #define CTEST_INC_101 102 #define CTEST_INC_102 103 #define CTEST_INC_103 104 #define CTEST_INC_104 105 #define CTEST_INC_105 106 #define CTEST_INC_106 107 #define CTEST_INC_107 108 #define CTEST_INC_108 109 #define CTEST_INC_109 110 #define CTEST_INC_110 111 #define CTEST_INC_111 112 #define CTEST_INC_112 113 #define CTEST_INC_113 114 #define CTEST_INC_114 115 #define CTEST_INC_115 116 #define CTEST_INC_116 117 #define CTEST_INC_117 118 #define CTEST_INC_118 119 #define CTEST_INC_119 120 #define CTEST_INC_120 121 #define CTEST_INC_121 122 #define CTEST_INC_122 123 #define CTEST_INC_123 124 #define CTEST_INC_124 125 #define CTEST_INC_125 126 #define CTEST_INC_126 127 #define CTEST_INC_127 128 #define CTEST_INC_128 129 #define CTEST_INC_129 130 #define CTEST_INC_130 131 #define CTEST_INC_131 132 #define CTEST_INC_132 133 #define CTEST_INC_133 134 #define CTEST_INC_134 135 #define CTEST_INC_135 136 #define CTEST_INC_136 137 #define CTEST_INC_137 138 #define CTEST_INC_138 139 #define CTEST_INC_139 140 #define CTEST_INC_140 141 #define CTEST_INC_141 142 #define CTEST_INC_142 143 #define CTEST_INC_143 144 #define CTEST_INC_144 145 #define CTEST_INC_145 146 #define CTEST_INC_146 147 #define CTEST_INC_147 148 #define CTEST_INC_148 149 #define CTEST_INC_149 150 #define CTEST_INC_150 151 #define CTEST_INC_151 152 #define CTEST_INC_152 153 #define CTEST_INC_153 154 #define CTEST_INC_154 155 #define CTEST_INC_155 156 #define CTEST_INC_156 157 #define CTEST_INC_157 158 #define CTEST_INC_158 159 #define CTEST_INC_159 160 #define CTEST_INC_160 161 #define CTEST_INC_161 162 #define CTEST_INC_162 163 #define CTEST_INC_163 164 #define CTEST_INC_164 165 #define CTEST_INC_165 166 #define CTEST_INC_166 167 #define CTEST_INC_167 168 #define CTEST_INC_168 169 #define CTEST_INC_169 170 #define CTEST_INC_170 171 #define CTEST_INC_171 172 #define CTEST_INC_172 173 #define CTEST_INC_173 174 #define CTEST_INC_174 175 #define CTEST_INC_175 176 #define CTEST_INC_176 177 #define CTEST_INC_177 178 #define CTEST_INC_178 179 #define CTEST_INC_179 180 #define CTEST_INC_180 181 #define CTEST_INC_181 182 #define CTEST_INC_182 183 #define CTEST_INC_183 184 #define CTEST_INC_184 185 #define CTEST_INC_185 186 #define CTEST_INC_186 187 #define CTEST_INC_187 188 #define CTEST_INC_188 189 #define CTEST_INC_189 190 #define CTEST_INC_190 191 #define CTEST_INC_191 192 #define CTEST_INC_192 193 #define CTEST_INC_193 194 #define CTEST_INC_194 195 #define CTEST_INC_195 196 #define CTEST_INC_196 197 #define CTEST_INC_197 198 #define CTEST_INC_198 199 #define CTEST_INC_199 200 #define CTEST_INC_200 201 #define CTEST_INC_201 202 #define CTEST_INC_202 203 #define CTEST_INC_203 204 #define CTEST_INC_204 205 #define CTEST_INC_205 206 #define CTEST_INC_206 207 #define CTEST_INC_207 208 #define CTEST_INC_208 209 #define CTEST_INC_209 210 #define CTEST_INC_210 211 #define CTEST_INC_211 212 #define CTEST_INC_212 213 #define CTEST_INC_213 214 #define CTEST_INC_214 215 #define CTEST_INC_215 216 #define CTEST_INC_216 217 #define CTEST_INC_217 218 #define CTEST_INC_218 219 #define CTEST_INC_219 220 #define CTEST_INC_220 221 #define CTEST_INC_221 222 #define CTEST_INC_222 223 #define CTEST_INC_223 224 #define CTEST_INC_224 225 #define CTEST_INC_225 226 #define CTEST_INC_226 227 #define CTEST_INC_227 228 #define CTEST_INC_228 229 #define CTEST_INC_229 230 #define CTEST_INC_230 231 #define CTEST_INC_231 232 #define CTEST_INC_232 233 #define CTEST_INC_233 234 #define CTEST_INC_234 235 #define CTEST_INC_235 236 #define CTEST_INC_236 237 #define CTEST_INC_237 238 #define CTEST_INC_238 239 #define CTEST_INC_239 240 #define CTEST_INC_240 241 #define CTEST_INC_241 242 #define CTEST_INC_242 243 #define CTEST_INC_243 244 #define CTEST_INC_244 245 #define CTEST_INC_245 246 #define CTEST_INC_246 247 #define CTEST_INC_247 248 #define CTEST_INC_248 249 #define CTEST_INC_249 250 #define CTEST_INC_250 251 #define CTEST_INC_251 252 #define CTEST_INC_252 253 #define CTEST_INC_253 254 #define CTEST_INC_254 255 #define CTEST_INC_255 256 #define CTEST_INC_256 257 #define CTEST_INC_257 258 #define CTEST_INC_258 259 #define CTEST_INC_259 260 #define CTEST_INC_260 261 #define CTEST_INC_261 262 #define CTEST_INC_262 263 #define CTEST_INC_263 264 #define CTEST_INC_264 265 #define CTEST_INC_265 266 #define CTEST_INC_266 267 #define CTEST_INC_267 268 #define CTEST_INC_268 269 #define CTEST_INC_269 270 #define CTEST_INC_270 271 #define CTEST_INC_271 272 #define CTEST_INC_272 273 #define CTEST_INC_273 274 #define CTEST_INC_274 275 #define CTEST_INC_275 276 #define CTEST_INC_276 277 #define CTEST_INC_277 278 #define CTEST_INC_278 279 #define CTEST_INC_279 280 #define CTEST_INC_280 281 #define CTEST_INC_281 282 #define CTEST_INC_282 283 #define CTEST_INC_283 284 #define CTEST_INC_284 285 #define CTEST_INC_285 286 #define CTEST_INC_286 287 #define CTEST_INC_287 288 #define CTEST_INC_288 289 #define CTEST_INC_289 290 #define CTEST_INC_290 291 #define CTEST_INC_291 292 #define CTEST_INC_292 293 #define CTEST_INC_293 294 #define CTEST_INC_294 295 #define CTEST_INC_295 296 #define CTEST_INC_296 297 #define CTEST_INC_297 298 #define CTEST_INC_298 299 #define CTEST_INC_299 300 #define CTEST_INC_300 301 #define CTEST_INC_301 302 #define CTEST_INC_302 303 #define CTEST_INC_303 304 #define CTEST_INC_304 305 #define CTEST_INC_305 306 #define CTEST_INC_306 307 #define CTEST_INC_307 308 #define CTEST_INC_308 309 #define CTEST_INC_309 310 #define CTEST_INC_310 311 #define CTEST_INC_311 312 #define CTEST_INC_312 313 #define CTEST_INC_313 314 #define CTEST_INC_314 315 #define CTEST_INC_315 316 #define CTEST_INC_316 317 #define CTEST_INC_317 318 #define CTEST_INC_318 319 #define CTEST_INC_319 320 #define CTEST_INC_320 321 #define CTEST_INC_321 322 #define CTEST_INC_322 323 #define CTEST_INC_323 324 #define CTEST_INC_324 325 #define CTEST_INC_325 326 #define CTEST_INC_326 327 #define CTEST_INC_327 328 #define CTEST_INC_328 329 #define CTEST_INC_329 330 #define CTEST_INC_330 331 #define CTEST_INC_331 332 #define CTEST_INC_332 333 #define CTEST_INC_333 334 #define CTEST_INC_334 335 #define CTEST_INC_335 336 #define CTEST_INC_336 337 #define CTEST_INC_337 338 #define CTEST_INC_338 339 #define CTEST_INC_339 340 #define CTEST_INC_340 341 #define CTEST_INC_341 342 #define CTEST_INC_342 343 #define CTEST_INC_343 344 #define CTEST_INC_344 345 #define CTEST_INC_345 346 #define CTEST_INC_346 347 #define CTEST_INC_347 348 #define CTEST_INC_348 349 #define CTEST_INC_349 350 #define CTEST_INC_350 351 #define CTEST_INC_351 352 #define CTEST_INC_352 353 #define CTEST_INC_353 354 #define CTEST_INC_354 355 #define CTEST_INC_355 356 #define CTEST_INC_356 357 #define CTEST_INC_357 358 #define CTEST_INC_358 359 #define CTEST_INC_359 360 #define CTEST_INC_360 361 #define CTEST_INC_361 362 #define CTEST_INC_362 363 #define CTEST_INC_363 364 #define CTEST_INC_364 365 #define CTEST_INC_365 366 #define CTEST_INC_366 367 #define CTEST_INC_367 368 #define CTEST_INC_368 369 #define CTEST_INC_369 370 #define CTEST_INC_370 371 #define CTEST_INC_371 372 #define CTEST_INC_372 373 #define CTEST_INC_373 374 #define CTEST_INC_374 375 #define CTEST_INC_375 376 #define CTEST_INC_376 377 #define CTEST_INC_377 378 #define CTEST_INC_378 379 #define CTEST_INC_379 380 #define CTEST_INC_380 381 #define CTEST_INC_381 382 #define CTEST_INC_382 383 #define CTEST_INC_383 384 #define CTEST_INC_384 385 #define CTEST_INC_385 386 #define CTEST_INC_386 387 #define CTEST_INC_387 388 #define CTEST_INC_388 389 #define CTEST_INC_389 390 #define CTEST_INC_390 391 #define CTEST_INC_391 392 #define CTEST_INC_392 393 #define CTEST_INC_393 394 #define CTEST_INC_394 395 #define CTEST_INC_395 396 #define CTEST_INC_396 397 #define CTEST_INC_397 398 #define CTEST_INC_398 399 #define CTEST_INC_399 400 #define CTEST_INC_400 401 #define CTEST_INC_401 402 #define CTEST_INC_402 403 #define CTEST_INC_403 404 #define CTEST_INC_404 405 #define CTEST_INC_405 406 #define CTEST_INC_406 407 #define CTEST_INC_407 408 #define CTEST_INC_408 409 #define CTEST_INC_409 410 #define CTEST_INC_410 411 #define CTEST_INC_411 412 #define CTEST_INC_412 413 #define CTEST_INC_413 414 #define CTEST_INC_414 415 #define CTEST_INC_415 416 #define CTEST_INC_416 417 #define CTEST_INC_417 418 #define CTEST_INC_418 419 #define CTEST_INC_419 420 #define CTEST_INC_420 421 #define CTEST_INC_421 422 #define CTEST_INC_422 423 #define CTEST_INC_423 424 #define CTEST_INC_424 425 #define CTEST_INC_425 426 #define CTEST_INC_426 427 #define CTEST_INC_427 428 #define CTEST_INC_428 429 #define CTEST_INC_429 430 #define CTEST_INC_430 431 #define CTEST_INC_431 432 #define CTEST_INC_432 433 #define CTEST_INC_433 434 #define CTEST_INC_434 435 #define CTEST_INC_435 436 #define CTEST_INC_436 437 #define CTEST_INC_437 438 #define CTEST_INC_438 439 #define CTEST_INC_439 440 #define CTEST_INC_440 441 #define CTEST_INC_441 442 #define CTEST_INC_442 443 #define CTEST_INC_443 444 #define CTEST_INC_444 445 #define CTEST_INC_445 446 #define CTEST_INC_446 447 #define CTEST_INC_447 448 #define CTEST_INC_448 449 #define CTEST_INC_449 450 #define CTEST_INC_450 451 #define CTEST_INC_451 452 #define CTEST_INC_452 453 #define CTEST_INC_453 454 #define CTEST_INC_454 455 #define CTEST_INC_455 456 #define CTEST_INC_456 457 #define CTEST_INC_457 458 #define CTEST_INC_458 459 #define CTEST_INC_459 460 #define CTEST_INC_460 461 #define CTEST_INC_461 462 #define CTEST_INC_462 463 #define CTEST_INC_463 464 #define CTEST_INC_464 465 #define CTEST_INC_465 466 #define CTEST_INC_466 467 #define CTEST_INC_467 468 #define CTEST_INC_468 469 #define CTEST_INC_469 470 #define CTEST_INC_470 471 #define CTEST_INC_471 472 #define CTEST_INC_472 473 #define CTEST_INC_473 474 #define CTEST_INC_474 475 #define CTEST_INC_475 476 #define CTEST_INC_476 477 #define CTEST_INC_477 478 #define CTEST_INC_478 479 #define CTEST_INC_479 480 #define CTEST_INC_480 481 #define CTEST_INC_481 482 #define CTEST_INC_482 483 #define CTEST_INC_483 484 #define CTEST_INC_484 485 #define CTEST_INC_485 486 #define CTEST_INC_486 487 #define CTEST_INC_487 488 #define CTEST_INC_488 489 #define CTEST_INC_489 490 #define CTEST_INC_490 491 #define CTEST_INC_491 492 #define CTEST_INC_492 493 #define CTEST_INC_493 494 #define CTEST_INC_494 495 #define CTEST_INC_495 496 #define CTEST_INC_496 497 #define CTEST_INC_497 498 #define CTEST_INC_498 499 #define CTEST_INC_499 500 #define CTEST_INC_500 501 #define CTEST_INC_501 502 #define CTEST_INC_502 503 #define CTEST_INC_503 504 #define CTEST_INC_504 505 #define CTEST_INC_505 506 #define CTEST_INC_506 507 #define CTEST_INC_507 508 #define CTEST_INC_508 509 #define CTEST_INC_509 510 #define CTEST_INC_510 511 #define CTEST_INC_511 512 #define CTEST_INC_512 513 #define CTEST_INC_513 514 #define CTEST_INC_514 515 #define CTEST_INC_515 516 #define CTEST_INC_516 517 #define CTEST_INC_517 518 #define CTEST_INC_518 519 #define CTEST_INC_519 520 #define CTEST_INC_520 521 #define CTEST_INC_521 522 #define CTEST_INC_522 523 #define CTEST_INC_523 524 #define CTEST_INC_524 525 #define CTEST_INC_525 526 #define CTEST_INC_526 527 #define CTEST_INC_527 528 #define CTEST_INC_528 529 #define CTEST_INC_529 530 #define CTEST_INC_530 531 #define CTEST_INC_531 532 #define CTEST_INC_532 533 #define CTEST_INC_533 534 #define CTEST_INC_534 535 #define CTEST_INC_535 536 #define CTEST_INC_536 537 #define CTEST_INC_537 538 #define CTEST_INC_538 539 #define CTEST_INC_539 540 #define CTEST_INC_540 541 #define CTEST_INC_541 542 #define CTEST_INC_542 543 #define CTEST_INC_543 544 #define CTEST_INC_544 545 #define CTEST_INC_545 546 #define CTEST_INC_546 547 #define CTEST_INC_547 548 #define CTEST_INC_548 549 #define CTEST_INC_549 550 #define CTEST_INC_550 551 #define CTEST_INC_551 552 #define CTEST_INC_552 553 #define CTEST_INC_553 554 #define CTEST_INC_554 555 #define CTEST_INC_555 556 #define CTEST_INC_556 557 #define CTEST_INC_557 558 #define CTEST_INC_558 559 #define CTEST_INC_559 560 #define CTEST_INC_560 561 #define CTEST_INC_561 562 #define CTEST_INC_562 563 #define CTEST_INC_563 564 #define CTEST_INC_564 565 #define CTEST_INC_565 566 #define CTEST_INC_566 567 #define CTEST_INC_567 568 #define CTEST_INC_568 569 #define CTEST_INC_569 570 #define CTEST_INC_570 571 #define CTEST_INC_571 572 #define CTEST_INC_572 573 #define CTEST_INC_573 574 #define CTEST_INC_574 575 #define CTEST_INC_575 576 #define CTEST_INC_576 577 #define CTEST_INC_577 578 #define CTEST_INC_578 579 #define CTEST_INC_579 580 #define CTEST_INC_580 581 #define CTEST_INC_581 582 #define CTEST_INC_582 583 #define CTEST_INC_583 584 #define CTEST_INC_584 585 #define CTEST_INC_585 586 #define CTEST_INC_586 587 #define CTEST_INC_587 588 #define CTEST_INC_588 589 #define CTEST_INC_589 590 #define CTEST_INC_590 591 #define CTEST_INC_591 592 #define CTEST_INC_592 593 #define CTEST_INC_593 594 #define CTEST_INC_594 595 #define CTEST_INC_595 596 #define CTEST_INC_596 597 #define CTEST_INC_597 598 #define CTEST_INC_598 599 #define CTEST_INC_599 600 #define CTEST_INC_600 601 #define CTEST_INC_601 602 #define CTEST_INC_602 603 #define CTEST_INC_603 604 #define CTEST_INC_604 605 #define CTEST_INC_605 606 #define CTEST_INC_606 607 #define CTEST_INC_607 608 #define CTEST_INC_608 609 #define CTEST_INC_609 610 #define CTEST_INC_610 611 #define CTEST_INC_611 612 #define CTEST_INC_612 613 #define CTEST_INC_613 614 #define CTEST_INC_614 615 #define CTEST_INC_615 616 #define CTEST_INC_616 617 #define CTEST_INC_617 618 #define CTEST_INC_618 619 #define CTEST_INC_619 620 #define CTEST_INC_620 621 #define CTEST_INC_621 622 #define CTEST_INC_622 623 #define CTEST_INC_623 624 #define CTEST_INC_624 625 #define CTEST_INC_625 626 #define CTEST_INC_626 627 #define CTEST_INC_627 628 #define CTEST_INC_628 629 #define CTEST_INC_629 630 #define CTEST_INC_630 631 #define CTEST_INC_631 632 #define CTEST_INC_632 633 #define CTEST_INC_633 634 #define CTEST_INC_634 635 #define CTEST_INC_635 636 #define CTEST_INC_636 637 #define CTEST_INC_637 638 #define CTEST_INC_638 639 #define CTEST_INC_639 640 #define CTEST_INC_640 641 #define CTEST_INC_641 642 #define CTEST_INC_642 643 #define CTEST_INC_643 644 #define CTEST_INC_644 645 #define CTEST_INC_645 646 #define CTEST_INC_646 647 #define CTEST_INC_647 648 #define CTEST_INC_648 649 #define CTEST_INC_649 650 #define CTEST_INC_650 651 #define CTEST_INC_651 652 #define CTEST_INC_652 653 #define CTEST_INC_653 654 #define CTEST_INC_654 655 #define CTEST_INC_655 656 #define CTEST_INC_656 657 #define CTEST_INC_657 658 #define CTEST_INC_658 659 #define CTEST_INC_659 660 #define CTEST_INC_660 661 #define CTEST_INC_661 662 #define CTEST_INC_662 663 #define CTEST_INC_663 664 #define CTEST_INC_664 665 #define CTEST_INC_665 666 #define CTEST_INC_666 667 #define CTEST_INC_667 668 #define CTEST_INC_668 669 #define CTEST_INC_669 670 #define CTEST_INC_670 671 #define CTEST_INC_671 672 #define CTEST_INC_672 673 #define CTEST_INC_673 674 #define CTEST_INC_674 675 #define CTEST_INC_675 676 #define CTEST_INC_676 677 #define CTEST_INC_677 678 #define CTEST_INC_678 679 #define CTEST_INC_679 680 #define CTEST_INC_680 681 #define CTEST_INC_681 682 #define CTEST_INC_682 683 #define CTEST_INC_683 684 #define CTEST_INC_684 685 #define CTEST_INC_685 686 #define CTEST_INC_686 687 #define CTEST_INC_687 688 #define CTEST_INC_688 689 #define CTEST_INC_689 690 #define CTEST_INC_690 691 #define CTEST_INC_691 692 #define CTEST_INC_692 693 #define CTEST_INC_693 694 #define CTEST_INC_694 695 #define CTEST_INC_695 696 #define CTEST_INC_696 697 #define CTEST_INC_697 698 #define CTEST_INC_698 699 #define CTEST_INC_699 700 #define CTEST_INC_700 701 #define CTEST_INC_701 702 #define CTEST_INC_702 703 #define CTEST_INC_703 704 #define CTEST_INC_704 705 #define CTEST_INC_705 706 #define CTEST_INC_706 707 #define CTEST_INC_707 708 #define CTEST_INC_708 709 #define CTEST_INC_709 710 #define CTEST_INC_710 711 #define CTEST_INC_711 712 #define CTEST_INC_712 713 #define CTEST_INC_713 714 #define CTEST_INC_714 715 #define CTEST_INC_715 716 #define CTEST_INC_716 717 #define CTEST_INC_717 718 #define CTEST_INC_718 719 #define CTEST_INC_719 720 #define CTEST_INC_720 721 #define CTEST_INC_721 722 #define CTEST_INC_722 723 #define CTEST_INC_723 724 #define CTEST_INC_724 725 #define CTEST_INC_725 726 #define CTEST_INC_726 727 #define CTEST_INC_727 728 #define CTEST_INC_728 729 #define CTEST_INC_729 730 #define CTEST_INC_730 731 #define CTEST_INC_731 732 #define CTEST_INC_732 733 #define CTEST_INC_733 734 #define CTEST_INC_734 735 #define CTEST_INC_735 736 #define CTEST_INC_736 737 #define CTEST_INC_737 738 #define CTEST_INC_738 739 #define CTEST_INC_739 740 #define CTEST_INC_740 741 #define CTEST_INC_741 742 #define CTEST_INC_742 743 #define CTEST_INC_743 744 #define CTEST_INC_744 745 #define CTEST_INC_745 746 #define CTEST_INC_746 747 #define CTEST_INC_747 748 #define CTEST_INC_748 749 #define CTEST_INC_749 750 #define CTEST_INC_750 751 #define CTEST_INC_751 752 #define CTEST_INC_752 753 #define CTEST_INC_753 754 #define CTEST_INC_754 755 #define CTEST_INC_755 756 #define CTEST_INC_756 757 #define CTEST_INC_757 758 #define CTEST_INC_758 759 #define CTEST_INC_759 760 #define CTEST_INC_760 761 #define CTEST_INC_761 762 #define CTEST_INC_762 763 #define CTEST_INC_763 764 #define CTEST_INC_764 765 #define CTEST_INC_765 766 #define CTEST_INC_766 767 #define CTEST_INC_767 768 #define CTEST_INC_768 769 #define CTEST_INC_769 770 #define CTEST_INC_770 771 #define CTEST_INC_771 772 #define CTEST_INC_772 773 #define CTEST_INC_773 774 #define CTEST_INC_774 775 #define CTEST_INC_775 776 #define CTEST_INC_776 777 #define CTEST_INC_777 778 #define CTEST_INC_778 779 #define CTEST_INC_779 780 #define CTEST_INC_780 781 #define CTEST_INC_781 782 #define CTEST_INC_782 783 #define CTEST_INC_783 784 #define CTEST_INC_784 785 #define CTEST_INC_785 786 #define CTEST_INC_786 787 #define CTEST_INC_787 788 #define CTEST_INC_788 789 #define CTEST_INC_789 790 #define CTEST_INC_790 791 #define CTEST_INC_791 792 #define CTEST_INC_792 793 #define CTEST_INC_793 794 #define CTEST_INC_794 795 #define CTEST_INC_795 796 #define CTEST_INC_796 797 #define CTEST_INC_797 798 #define CTEST_INC_798 799 #define CTEST_INC_799 800 #define CTEST_INC_800 801 #define CTEST_INC_801 802 #define CTEST_INC_802 803 #define CTEST_INC_803 804 #define CTEST_INC_804 805 #define CTEST_INC_805 806 #define CTEST_INC_806 807 #define CTEST_INC_807 808 #define CTEST_INC_808 809 #define CTEST_INC_809 810 #define CTEST_INC_810 811 #define CTEST_INC_811 812 #define CTEST_INC_812 813 #define CTEST_INC_813 814 #define CTEST_INC_814 815 #define CTEST_INC_815 816 #define CTEST_INC_816 817 #define CTEST_INC_817 818 #define CTEST_INC_818 819 #define CTEST_INC_819 820 #define CTEST_INC_820 821 #define CTEST_INC_821 822 #define CTEST_INC_822 823 #define CTEST_INC_823 824 #define CTEST_INC_824 825 #define CTEST_INC_825 826 #define CTEST_INC_826 827 #define CTEST_INC_827 828 #define CTEST_INC_828 829 #define CTEST_INC_829 830 #define CTEST_INC_830 831 #define CTEST_INC_831 832 #define CTEST_INC_832 833 #define CTEST_INC_833 834 #define CTEST_INC_834 835 #define CTEST_INC_835 836 #define CTEST_INC_836 837 #define CTEST_INC_837 838 #define CTEST_INC_838 839 #define CTEST_INC_839 840 #define CTEST_INC_840 841 #define CTEST_INC_841 842 #define CTEST_INC_842 843 #define CTEST_INC_843 844 #define CTEST_INC_844 845 #define CTEST_INC_845 846 #define CTEST_INC_846 847 #define CTEST_INC_847 848 #define CTEST_INC_848 849 #define CTEST_INC_849 850 #define CTEST_INC_850 851 #define CTEST_INC_851 852 #define CTEST_INC_852 853 #define CTEST_INC_853 854 #define CTEST_INC_854 855 #define CTEST_INC_855 856 #define CTEST_INC_856 857 #define CTEST_INC_857 858 #define CTEST_INC_858 859 #define CTEST_INC_859 860 #define CTEST_INC_860 861 #define CTEST_INC_861 862 #define CTEST_INC_862 863 #define CTEST_INC_863 864 #define CTEST_INC_864 865 #define CTEST_INC_865 866 #define CTEST_INC_866 867 #define CTEST_INC_867 868 #define CTEST_INC_868 869 #define CTEST_INC_869 870 #define CTEST_INC_870 871 #define CTEST_INC_871 872 #define CTEST_INC_872 873 #define CTEST_INC_873 874 #define CTEST_INC_874 875 #define CTEST_INC_875 876 #define CTEST_INC_876 877 #define CTEST_INC_877 878 #define CTEST_INC_878 879 #define CTEST_INC_879 880 #define CTEST_INC_880 881 #define CTEST_INC_881 882 #define CTEST_INC_882 883 #define CTEST_INC_883 884 #define CTEST_INC_884 885 #define CTEST_INC_885 886 #define CTEST_INC_886 887 #define CTEST_INC_887 888 #define CTEST_INC_888 889 #define CTEST_INC_889 890 #define CTEST_INC_890 891 #define CTEST_INC_891 892 #define CTEST_INC_892 893 #define CTEST_INC_893 894 #define CTEST_INC_894 895 #define CTEST_INC_895 896 #define CTEST_INC_896 897 #define CTEST_INC_897 898 #define CTEST_INC_898 899 #define CTEST_INC_899 900 #define CTEST_INC_900 901 #define CTEST_INC_901 902 #define CTEST_INC_902 903 #define CTEST_INC_903 904 #define CTEST_INC_904 905 #define CTEST_INC_905 906 #define CTEST_INC_906 907 #define CTEST_INC_907 908 #define CTEST_INC_908 909 #define CTEST_INC_909 910 #define CTEST_INC_910 911 #define CTEST_INC_911 912 #define CTEST_INC_912 913 #define CTEST_INC_913 914 #define CTEST_INC_914 915 #define CTEST_INC_915 916 #define CTEST_INC_916 917 #define CTEST_INC_917 918 #define CTEST_INC_918 919 #define CTEST_INC_919 920 #define CTEST_INC_920 921 #define CTEST_INC_921 922 #define CTEST_INC_922 923 #define CTEST_INC_923 924 #define CTEST_INC_924 925 #define CTEST_INC_925 926 #define CTEST_INC_926 927 #define CTEST_INC_927 928 #define CTEST_INC_928 929 #define CTEST_INC_929 930 #define CTEST_INC_930 931 #define CTEST_INC_931 932 #define CTEST_INC_932 933 #define CTEST_INC_933 934 #define CTEST_INC_934 935 #define CTEST_INC_935 936 #define CTEST_INC_936 937 #define CTEST_INC_937 938 #define CTEST_INC_938 939 #define CTEST_INC_939 940 #define CTEST_INC_940 941 #define CTEST_INC_941 942 #define CTEST_INC_942 943 #define CTEST_INC_943 944 #define CTEST_INC_944 945 #define CTEST_INC_945 946 #define CTEST_INC_946 947 #define CTEST_INC_947 948 #define CTEST_INC_948 949 #define CTEST_INC_949 950 #define CTEST_INC_950 951 #define CTEST_INC_951 952 #define CTEST_INC_952 953 #define CTEST_INC_953 954 #define CTEST_INC_954 955 #define CTEST_INC_955 956 #define CTEST_INC_956 957 #define CTEST_INC_957 958 #define CTEST_INC_958 959 #define CTEST_INC_959 960 #define CTEST_INC_960 961 #define CTEST_INC_961 962 #define CTEST_INC_962 963 #define CTEST_INC_963 964 #define CTEST_INC_964 965 #define CTEST_INC_965 966 #define CTEST_INC_966 967 #define CTEST_INC_967 968 #define CTEST_INC_968 969 #define CTEST_INC_969 970 #define CTEST_INC_970 971 #define CTEST_INC_971 972 #define CTEST_INC_972 973 #define CTEST_INC_973 974 #define CTEST_INC_974 975 #define CTEST_INC_975 976 #define CTEST_INC_976 977 #define CTEST_INC_977 978 #define CTEST_INC_978 979 #define CTEST_INC_979 980 #define CTEST_INC_980 981 #define CTEST_INC_981 982 #define CTEST_INC_982 983 #define CTEST_INC_983 984 #define CTEST_INC_984 985 #define CTEST_INC_985 986 #define CTEST_INC_986 987 #define CTEST_INC_987 988 #define CTEST_INC_988 989 #define CTEST_INC_989 990 #define CTEST_INC_990 991 #define CTEST_INC_991 992 #define CTEST_INC_992 993 #define CTEST_INC_993 994 #define CTEST_INC_994 995 #define CTEST_INC_995 996 #define CTEST_INC_996 997 #define CTEST_INC_997 998 #define CTEST_INC_998 999 #define CTEST_INC_999 1000 #define CTEST_INC_1000 1001 #define CTEST_INC_1001 1002 #define CTEST_INC_1002 1003 #define CTEST_INC_1003 1004 #define CTEST_INC_1004 1005 #define CTEST_INC_1005 1006 #define CTEST_INC_1006 1007 #define CTEST_INC_1007 1008 #define CTEST_INC_1008 1009 #define CTEST_INC_1009 1010 #define CTEST_INC_1010 1011 #define CTEST_INC_1011 1012 #define CTEST_INC_1012 1013 #define CTEST_INC_1013 1014 #define CTEST_INC_1014 1015 #define CTEST_INC_1015 1016 #define CTEST_INC_1016 1017 #define CTEST_INC_1017 1018 #define CTEST_INC_1018 1019 #define CTEST_INC_1019 1020 #define CTEST_INC_1020 1021 #define CTEST_INC_1021 1022 #define CTEST_INC_1022 1023 #define CTEST_INC_1023 1024 #define CTEST_INC_1024 1025 #define CTEST_INC_1025 1026 #define CTEST_INC_1026 1027 #define CTEST_INC_1027 1028 #define CTEST_INC_1028 1029 #define CTEST_INC_1029 1030 #define CTEST_INC_1030 1031 #define CTEST_INC_1031 1032 #define CTEST_INC_1032 1033 #define CTEST_INC_1033 1034 #define CTEST_INC_1034 1035 #define CTEST_INC_1035 1036 #define CTEST_INC_1036 1037 #define CTEST_INC_1037 1038 #define CTEST_INC_1038 1039 #define CTEST_INC_1039 1040 #define CTEST_INC_1040 1041 #define CTEST_INC_1041 1042 #define CTEST_INC_1042 1043 #define CTEST_INC_1043 1044 #define CTEST_INC_1044 1045 #define CTEST_INC_1045 1046 #define CTEST_INC_1046 1047 #define CTEST_INC_1047 1048 #define CTEST_INC_1048 1049 #define CTEST_INC_1049 1050 #define CTEST_INC_1050 1051 #define CTEST_INC_1051 1052 #define CTEST_INC_1052 1053 #define CTEST_INC_1053 1054 #define CTEST_INC_1054 1055 #define CTEST_INC_1055 1056 #define CTEST_INC_1056 1057 #define CTEST_INC_1057 1058 #define CTEST_INC_1058 1059 #define CTEST_INC_1059 1060 #define CTEST_INC_1060 1061 #define CTEST_INC_1061 1062 #define CTEST_INC_1062 1063 #define CTEST_INC_1063 1064 #define CTEST_INC_1064 1065 #define CTEST_INC_1065 1066 #define CTEST_INC_1066 1067 #define CTEST_INC_1067 1068 #define CTEST_INC_1068 1069 #define CTEST_INC_1069 1070 #define CTEST_INC_1070 1071 #define CTEST_INC_1071 1072 #define CTEST_INC_1072 1073 #define CTEST_INC_1073 1074 #define CTEST_INC_1074 1075 #define CTEST_INC_1075 1076 #define CTEST_INC_1076 1077 #define CTEST_INC_1077 1078 #define CTEST_INC_1078 1079 #define CTEST_INC_1079 1080 #define CTEST_INC_1080 1081 #define CTEST_INC_1081 1082 #define CTEST_INC_1082 1083 #define CTEST_INC_1083 1084 #define CTEST_INC_1084 1085 #define CTEST_INC_1085 1086 #define CTEST_INC_1086 1087 #define CTEST_INC_1087 1088 #define CTEST_INC_1088 1089 #define CTEST_INC_1089 1090 #define CTEST_INC_1090 1091 #define CTEST_INC_1091 1092 #define CTEST_INC_1092 1093 #define CTEST_INC_1093 1094 #define CTEST_INC_1094 1095 #define CTEST_INC_1095 1096 #define CTEST_INC_1096 1097 #define CTEST_INC_1097 1098 #define CTEST_INC_1098 1099 #define CTEST_INC_1099 1100 #define CTEST_INC_1100 1101 #define CTEST_INC_1101 1102 #define CTEST_INC_1102 1103 #define CTEST_INC_1103 1104 #define CTEST_INC_1104 1105 #define CTEST_INC_1105 1106 #define CTEST_INC_1106 1107 #define CTEST_INC_1107 1108 #define CTEST_INC_1108 1109 #define CTEST_INC_1109 1110 #define CTEST_INC_1110 1111 #define CTEST_INC_1111 1112 #define CTEST_INC_1112 1113 #define CTEST_INC_1113 1114 #define CTEST_INC_1114 1115 #define CTEST_INC_1115 1116 #define CTEST_INC_1116 1117 #define CTEST_INC_1117 1118 #define CTEST_INC_1118 1119 #define CTEST_INC_1119 1120 #define CTEST_INC_1120 1121 #define CTEST_INC_1121 1122 #define CTEST_INC_1122 1123 #define CTEST_INC_1123 1124 #define CTEST_INC_1124 1125 #define CTEST_INC_1125 1126 #define CTEST_INC_1126 1127 #define CTEST_INC_1127 1128 #define CTEST_INC_1128 1129 #define CTEST_INC_1129 1130 #define CTEST_INC_1130 1131 #define CTEST_INC_1131 1132 #define CTEST_INC_1132 1133 #define CTEST_INC_1133 1134 #define CTEST_INC_1134 1135 #define CTEST_INC_1135 1136 #define CTEST_INC_1136 1137 #define CTEST_INC_1137 1138 #define CTEST_INC_1138 1139 #define CTEST_INC_1139 1140 #define CTEST_INC_1140 1141 #define CTEST_INC_1141 1142 #define CTEST_INC_1142 1143 #define CTEST_INC_1143 1144 #define CTEST_INC_1144 1145 #define CTEST_INC_1145 1146 #define CTEST_INC_1146 1147 #define CTEST_INC_1147 1148 #define CTEST_INC_1148 1149 #define CTEST_INC_1149 1150 #define CTEST_INC_1150 1151 #define CTEST_INC_1151 1152 #define CTEST_INC_1152 1153 #define CTEST_INC_1153 1154 #define CTEST_INC_1154 1155 #define CTEST_INC_1155 1156 #define CTEST_INC_1156 1157 #define CTEST_INC_1157 1158 #define CTEST_INC_1158 1159 #define CTEST_INC_1159 1160 #define CTEST_INC_1160 1161 #define CTEST_INC_1161 1162 #define CTEST_INC_1162 1163 #define CTEST_INC_1163 1164 #define CTEST_INC_1164 1165 #define CTEST_INC_1165 1166 #define CTEST_INC_1166 1167 #define CTEST_INC_1167 1168 #define CTEST_INC_1168 1169 #define CTEST_INC_1169 1170 #define CTEST_INC_1170 1171 #define CTEST_INC_1171 1172 #define CTEST_INC_1172 1173 #define CTEST_INC_1173 1174 #define CTEST_INC_1174 1175 #define CTEST_INC_1175 1176 #define CTEST_INC_1176 1177 #define CTEST_INC_1177 1178 #define CTEST_INC_1178 1179 #define CTEST_INC_1179 1180 #define CTEST_INC_1180 1181 #define CTEST_INC_1181 1182 #define CTEST_INC_1182 1183 #define CTEST_INC_1183 1184 #define CTEST_INC_1184 1185 #define CTEST_INC_1185 1186 #define CTEST_INC_1186 1187 #define CTEST_INC_1187 1188 #define CTEST_INC_1188 1189 #define CTEST_INC_1189 1190 #define CTEST_INC_1190 1191 #define CTEST_INC_1191 1192 #define CTEST_INC_1192 1193 #define CTEST_INC_1193 1194 #define CTEST_INC_1194 1195 #define CTEST_INC_1195 1196 #define CTEST_INC_1196 1197 #define CTEST_INC_1197 1198 #define CTEST_INC_1198 1199 #define CTEST_INC_1199 1200 #define CTEST_INC_1200 1201 #define CTEST_INC_1201 1202 #define CTEST_INC_1202 1203 #define CTEST_INC_1203 1204 #define CTEST_INC_1204 1205 #define CTEST_INC_1205 1206 #define CTEST_INC_1206 1207 #define CTEST_INC_1207 1208 #define CTEST_INC_1208 1209 #define CTEST_INC_1209 1210 #define CTEST_INC_1210 1211 #define CTEST_INC_1211 1212 #define CTEST_INC_1212 1213 #define CTEST_INC_1213 1214 #define CTEST_INC_1214 1215 #define CTEST_INC_1215 1216 #define CTEST_INC_1216 1217 #define CTEST_INC_1217 1218 #define CTEST_INC_1218 1219 #define CTEST_INC_1219 1220 #define CTEST_INC_1220 1221 #define CTEST_INC_1221 1222 #define CTEST_INC_1222 1223 #define CTEST_INC_1223 1224 #define CTEST_INC_1224 1225 #define CTEST_INC_1225 1226 #define CTEST_INC_1226 1227 #define CTEST_INC_1227 1228 #define CTEST_INC_1228 1229 #define CTEST_INC_1229 1230 #define CTEST_INC_1230 1231 #define CTEST_INC_1231 1232 #define CTEST_INC_1232 1233 #define CTEST_INC_1233 1234 #define CTEST_INC_1234 1235 #define CTEST_INC_1235 1236 #define CTEST_INC_1236 1237 #define CTEST_INC_1237 1238 #define CTEST_INC_1238 1239 #define CTEST_INC_1239 1240 #define CTEST_INC_1240 1241 #define CTEST_INC_1241 1242 #define CTEST_INC_1242 1243 #define CTEST_INC_1243 1244 #define CTEST_INC_1244 1245 #define CTEST_INC_1245 1246 #define CTEST_INC_1246 1247 #define CTEST_INC_1247 1248 #define CTEST_INC_1248 1249 #define CTEST_INC_1249 1250 #define CTEST_INC_1250 1251 #define CTEST_INC_1251 1252 #define CTEST_INC_1252 1253 #define CTEST_INC_1253 1254 #define CTEST_INC_1254 1255 #define CTEST_INC_1255 1256 #define CTEST_INC_1256 1257 #define CTEST_INC_1257 1258 #define CTEST_INC_1258 1259 #define CTEST_INC_1259 1260 #define CTEST_INC_1260 1261 #define CTEST_INC_1261 1262 #define CTEST_INC_1262 1263 #define CTEST_INC_1263 1264 #define CTEST_INC_1264 1265 #define CTEST_INC_1265 1266 #define CTEST_INC_1266 1267 #define CTEST_INC_1267 1268 #define CTEST_INC_1268 1269 #define CTEST_INC_1269 1270 #define CTEST_INC_1270 1271 #define CTEST_INC_1271 1272 #define CTEST_INC_1272 1273 #define CTEST_INC_1273 1274 #define CTEST_INC_1274 1275 #define CTEST_INC_1275 1276 #define CTEST_INC_1276 1277 #define CTEST_INC_1277 1278 #define CTEST_INC_1278 1279 #define CTEST_INC_1279 1280 #define CTEST_INC_1280 1281 #define CTEST_INC_1281 1282 #define CTEST_INC_1282 1283 #define CTEST_INC_1283 1284 #define CTEST_INC_1284 1285 #define CTEST_INC_1285 1286 #define CTEST_INC_1286 1287 #define CTEST_INC_1287 1288 #define CTEST_INC_1288 1289 #define CTEST_INC_1289 1290 #define CTEST_INC_1290 1291 #define CTEST_INC_1291 1292 #define CTEST_INC_1292 1293 #define CTEST_INC_1293 1294 #define CTEST_INC_1294 1295 #define CTEST_INC_1295 1296 #define CTEST_INC_1296 1297 #define CTEST_INC_1297 1298 #define CTEST_INC_1298 1299 #define CTEST_INC_1299 1300 #define CTEST_INC_1300 1301 #define CTEST_INC_1301 1302 #define CTEST_INC_1302 1303 #define CTEST_INC_1303 1304 #define CTEST_INC_1304 1305 #define CTEST_INC_1305 1306 #define CTEST_INC_1306 1307 #define CTEST_INC_1307 1308 #define CTEST_INC_1308 1309 #define CTEST_INC_1309 1310 #define CTEST_INC_1310 1311 #define CTEST_INC_1311 1312 #define CTEST_INC_1312 1313 #define CTEST_INC_1313 1314 #define CTEST_INC_1314 1315 #define CTEST_INC_1315 1316 #define CTEST_INC_1316 1317 #define CTEST_INC_1317 1318 #define CTEST_INC_1318 1319 #define CTEST_INC_1319 1320 #define CTEST_INC_1320 1321 #define CTEST_INC_1321 1322 #define CTEST_INC_1322 1323 #define CTEST_INC_1323 1324 #define CTEST_INC_1324 1325 #define CTEST_INC_1325 1326 #define CTEST_INC_1326 1327 #define CTEST_INC_1327 1328 #define CTEST_INC_1328 1329 #define CTEST_INC_1329 1330 #define CTEST_INC_1330 1331 #define CTEST_INC_1331 1332 #define CTEST_INC_1332 1333 #define CTEST_INC_1333 1334 #define CTEST_INC_1334 1335 #define CTEST_INC_1335 1336 #define CTEST_INC_1336 1337 #define CTEST_INC_1337 1338 #define CTEST_INC_1338 1339 #define CTEST_INC_1339 1340 #define CTEST_INC_1340 1341 #define CTEST_INC_1341 1342 #define CTEST_INC_1342 1343 #define CTEST_INC_1343 1344 #define CTEST_INC_1344 1345 #define CTEST_INC_1345 1346 #define CTEST_INC_1346 1347 #define CTEST_INC_1347 1348 #define CTEST_INC_1348 1349 #define CTEST_INC_1349 1350 #define CTEST_INC_1350 1351 #define CTEST_INC_1351 1352 #define CTEST_INC_1352 1353 #define CTEST_INC_1353 1354 #define CTEST_INC_1354 1355 #define CTEST_INC_1355 1356 #define CTEST_INC_1356 1357 #define CTEST_INC_1357 1358 #define CTEST_INC_1358 1359 #define CTEST_INC_1359 1360 #define CTEST_INC_1360 1361 #define CTEST_INC_1361 1362 #define CTEST_INC_1362 1363 #define CTEST_INC_1363 1364 #define CTEST_INC_1364 1365 #define CTEST_INC_1365 1366 #define CTEST_INC_1366 1367 #define CTEST_INC_1367 1368 #define CTEST_INC_1368 1369 #define CTEST_INC_1369 1370 #define CTEST_INC_1370 1371 #define CTEST_INC_1371 1372 #define CTEST_INC_1372 1373 #define CTEST_INC_1373 1374 #define CTEST_INC_1374 1375 #define CTEST_INC_1375 1376 #define CTEST_INC_1376 1377 #define CTEST_INC_1377 1378 #define CTEST_INC_1378 1379 #define CTEST_INC_1379 1380 #define CTEST_INC_1380 1381 #define CTEST_INC_1381 1382 #define CTEST_INC_1382 1383 #define CTEST_INC_1383 1384 #define CTEST_INC_1384 1385 #define CTEST_INC_1385 1386 #define CTEST_INC_1386 1387 #define CTEST_INC_1387 1388 #define CTEST_INC_1388 1389 #define CTEST_INC_1389 1390 #define CTEST_INC_1390 1391 #define CTEST_INC_1391 1392 #define CTEST_INC_1392 1393 #define CTEST_INC_1393 1394 #define CTEST_INC_1394 1395 #define CTEST_INC_1395 1396 #define CTEST_INC_1396 1397 #define CTEST_INC_1397 1398 #define CTEST_INC_1398 1399 #define CTEST_INC_1399 1400 #define CTEST_INC_1400 1401 #define CTEST_INC_1401 1402 #define CTEST_INC_1402 1403 #define CTEST_INC_1403 1404 #define CTEST_INC_1404 1405 #define CTEST_INC_1405 1406 #define CTEST_INC_1406 1407 #define CTEST_INC_1407 1408 #define CTEST_INC_1408 1409 #define CTEST_INC_1409 1410 #define CTEST_INC_1410 1411 #define CTEST_INC_1411 1412 #define CTEST_INC_1412 1413 #define CTEST_INC_1413 1414 #define CTEST_INC_1414 1415 #define CTEST_INC_1415 1416 #define CTEST_INC_1416 1417 #define CTEST_INC_1417 1418 #define CTEST_INC_1418 1419 #define CTEST_INC_1419 1420 #define CTEST_INC_1420 1421 #define CTEST_INC_1421 1422 #define CTEST_INC_1422 1423 #define CTEST_INC_1423 1424 #define CTEST_INC_1424 1425 #define CTEST_INC_1425 1426 #define CTEST_INC_1426 1427 #define CTEST_INC_1427 1428 #define CTEST_INC_1428 1429 #define CTEST_INC_1429 1430 #define CTEST_INC_1430 1431 #define CTEST_INC_1431 1432 #define CTEST_INC_1432 1433 #define CTEST_INC_1433 1434 #define CTEST_INC_1434 1435 #define CTEST_INC_1435 1436 #define CTEST_INC_1436 1437 #define CTEST_INC_1437 1438 #define CTEST_INC_1438 1439 #define CTEST_INC_1439 1440 #define CTEST_INC_1440 1441 #define CTEST_INC_1441 1442 #define CTEST_INC_1442 1443 #define CTEST_INC_1443 1444 #define CTEST_INC_1444 1445 #define CTEST_INC_1445 1446 #define CTEST_INC_1446 1447 #define CTEST_INC_1447 1448 #define CTEST_INC_1448 1449 #define CTEST_INC_1449 1450 #define CTEST_INC_1450 1451 #define CTEST_INC_1451 1452 #define CTEST_INC_1452 1453 #define CTEST_INC_1453 1454 #define CTEST_INC_1454 1455 #define CTEST_INC_1455 1456 #define CTEST_INC_1456 1457 #define CTEST_INC_1457 1458 #define CTEST_INC_1458 1459 #define CTEST_INC_1459 1460 #define CTEST_INC_1460 1461 #define CTEST_INC_1461 1462 #define CTEST_INC_1462 1463 #define CTEST_INC_1463 1464 #define CTEST_INC_1464 1465 #define CTEST_INC_1465 1466 #define CTEST_INC_1466 1467 #define CTEST_INC_1467 1468 #define CTEST_INC_1468 1469 #define CTEST_INC_1469 1470 #define CTEST_INC_1470 1471 #define CTEST_INC_1471 1472 #define CTEST_INC_1472 1473 #define CTEST_INC_1473 1474 #define CTEST_INC_1474 1475 #define CTEST_INC_1475 1476 #define CTEST_INC_1476 1477 #define CTEST_INC_1477 1478 #define CTEST_INC_1478 1479 #define CTEST_INC_1479 1480 #define CTEST_INC_1480 1481 #define CTEST_INC_1481 1482 #define CTEST_INC_1482 1483 #define CTEST_INC_1483 1484 #define CTEST_INC_1484 1485 #define CTEST_INC_1485 1486 #define CTEST_INC_1486 1487 #define CTEST_INC_1487 1488 #define CTEST_INC_1488 1489 #define CTEST_INC_1489 1490 #define CTEST_INC_1490 1491 #define CTEST_INC_1491 1492 #define CTEST_INC_1492 1493 #define CTEST_INC_1493 1494 #define CTEST_INC_1494 1495 #define CTEST_INC_1495 1496 #define CTEST_INC_1496 1497 #define CTEST_INC_1497 1498 #define CTEST_INC_1498 1499 #define CTEST_INC_1499 1500 #define CTEST_INC_1500 1501 #define CTEST_INC_1501 1502 #define CTEST_INC_1502 1503 #define CTEST_INC_1503 1504 #define CTEST_INC_1504 1505 #define CTEST_INC_1505 1506 #define CTEST_INC_1506 1507 #define CTEST_INC_1507 1508 #define CTEST_INC_1508 1509 #define CTEST_INC_1509 1510 #define CTEST_INC_1510 1511 #define CTEST_INC_1511 1512 #define CTEST_INC_1512 1513 #define CTEST_INC_1513 1514 #define CTEST_INC_1514 1515 #define CTEST_INC_1515 1516 #define CTEST_INC_1516 1517 #define CTEST_INC_1517 1518 #define CTEST_INC_1518 1519 #define CTEST_INC_1519 1520 #define CTEST_INC_1520 1521 #define CTEST_INC_1521 1522 #define CTEST_INC_1522 1523 #define CTEST_INC_1523 1524 #define CTEST_INC_1524 1525 #define CTEST_INC_1525 1526 #define CTEST_INC_1526 1527 #define CTEST_INC_1527 1528 #define CTEST_INC_1528 1529 #define CTEST_INC_1529 1530 #define CTEST_INC_1530 1531 #define CTEST_INC_1531 1532 #define CTEST_INC_1532 1533 #define CTEST_INC_1533 1534 #define CTEST_INC_1534 1535 #define CTEST_INC_1535 1536 #define CTEST_INC_1536 1537 #define CTEST_INC_1537 1538 #define CTEST_INC_1538 1539 #define CTEST_INC_1539 1540 #define CTEST_INC_1540 1541 #define CTEST_INC_1541 1542 #define CTEST_INC_1542 1543 #define CTEST_INC_1543 1544 #define CTEST_INC_1544 1545 #define CTEST_INC_1545 1546 #define CTEST_INC_1546 1547 #define CTEST_INC_1547 1548 #define CTEST_INC_1548 1549 #define CTEST_INC_1549 1550 #define CTEST_INC_1550 1551 #define CTEST_INC_1551 1552 #define CTEST_INC_1552 1553 #define CTEST_INC_1553 1554 #define CTEST_INC_1554 1555 #define CTEST_INC_1555 1556 #define CTEST_INC_1556 1557 #define CTEST_INC_1557 1558 #define CTEST_INC_1558 1559 #define CTEST_INC_1559 1560 #define CTEST_INC_1560 1561 #define CTEST_INC_1561 1562 #define CTEST_INC_1562 1563 #define CTEST_INC_1563 1564 #define CTEST_INC_1564 1565 #define CTEST_INC_1565 1566 #define CTEST_INC_1566 1567 #define CTEST_INC_1567 1568 #define CTEST_INC_1568 1569 #define CTEST_INC_1569 1570 #define CTEST_INC_1570 1571 #define CTEST_INC_1571 1572 #define CTEST_INC_1572 1573 #define CTEST_INC_1573 1574 #define CTEST_INC_1574 1575 #define CTEST_INC_1575 1576 #define CTEST_INC_1576 1577 #define CTEST_INC_1577 1578 #define CTEST_INC_1578 1579 #define CTEST_INC_1579 1580 #define CTEST_INC_1580 1581 #define CTEST_INC_1581 1582 #define CTEST_INC_1582 1583 #define CTEST_INC_1583 1584 #define CTEST_INC_1584 1585 #define CTEST_INC_1585 1586 #define CTEST_INC_1586 1587 #define CTEST_INC_1587 1588 #define CTEST_INC_1588 1589 #define CTEST_INC_1589 1590 #define CTEST_INC_1590 1591 #define CTEST_INC_1591 1592 #define CTEST_INC_1592 1593 #define CTEST_INC_1593 1594 #define CTEST_INC_1594 1595 #define CTEST_INC_1595 1596 #define CTEST_INC_1596 1597 #define CTEST_INC_1597 1598 #define CTEST_INC_1598 1599 #define CTEST_INC_1599 1600 #define CTEST_INC_1600 1601 #define CTEST_INC_1601 1602 #define CTEST_INC_1602 1603 #define CTEST_INC_1603 1604 #define CTEST_INC_1604 1605 #define CTEST_INC_1605 1606 #define CTEST_INC_1606 1607 #define CTEST_INC_1607 1608 #define CTEST_INC_1608 1609 #define CTEST_INC_1609 1610 #define CTEST_INC_1610 1611 #define CTEST_INC_1611 1612 #define CTEST_INC_1612 1613 #define CTEST_INC_1613 1614 #define CTEST_INC_1614 1615 #define CTEST_INC_1615 1616 #define CTEST_INC_1616 1617 #define CTEST_INC_1617 1618 #define CTEST_INC_1618 1619 #define CTEST_INC_1619 1620 #define CTEST_INC_1620 1621 #define CTEST_INC_1621 1622 #define CTEST_INC_1622 1623 #define CTEST_INC_1623 1624 #define CTEST_INC_1624 1625 #define CTEST_INC_1625 1626 #define CTEST_INC_1626 1627 #define CTEST_INC_1627 1628 #define CTEST_INC_1628 1629 #define CTEST_INC_1629 1630 #define CTEST_INC_1630 1631 #define CTEST_INC_1631 1632 #define CTEST_INC_1632 1633 #define CTEST_INC_1633 1634 #define CTEST_INC_1634 1635 #define CTEST_INC_1635 1636 #define CTEST_INC_1636 1637 #define CTEST_INC_1637 1638 #define CTEST_INC_1638 1639 #define CTEST_INC_1639 1640 #define CTEST_INC_1640 1641 #define CTEST_INC_1641 1642 #define CTEST_INC_1642 1643 #define CTEST_INC_1643 1644 #define CTEST_INC_1644 1645 #define CTEST_INC_1645 1646 #define CTEST_INC_1646 1647 #define CTEST_INC_1647 1648 #define CTEST_INC_1648 1649 #define CTEST_INC_1649 1650 #define CTEST_INC_1650 1651 #define CTEST_INC_1651 1652 #define CTEST_INC_1652 1653 #define CTEST_INC_1653 1654 #define CTEST_INC_1654 1655 #define CTEST_INC_1655 1656 #define CTEST_INC_1656 1657 #define CTEST_INC_1657 1658 #define CTEST_INC_1658 1659 #define CTEST_INC_1659 1660 #define CTEST_INC_1660 1661 #define CTEST_INC_1661 1662 #define CTEST_INC_1662 1663 #define CTEST_INC_1663 1664 #define CTEST_INC_1664 1665 #define CTEST_INC_1665 1666 #define CTEST_INC_1666 1667 #define CTEST_INC_1667 1668 #define CTEST_INC_1668 1669 #define CTEST_INC_1669 1670 #define CTEST_INC_1670 1671 #define CTEST_INC_1671 1672 #define CTEST_INC_1672 1673 #define CTEST_INC_1673 1674 #define CTEST_INC_1674 1675 #define CTEST_INC_1675 1676 #define CTEST_INC_1676 1677 #define CTEST_INC_1677 1678 #define CTEST_INC_1678 1679 #define CTEST_INC_1679 1680 #define CTEST_INC_1680 1681 #define CTEST_INC_1681 1682 #define CTEST_INC_1682 1683 #define CTEST_INC_1683 1684 #define CTEST_INC_1684 1685 #define CTEST_INC_1685 1686 #define CTEST_INC_1686 1687 #define CTEST_INC_1687 1688 #define CTEST_INC_1688 1689 #define CTEST_INC_1689 1690 #define CTEST_INC_1690 1691 #define CTEST_INC_1691 1692 #define CTEST_INC_1692 1693 #define CTEST_INC_1693 1694 #define CTEST_INC_1694 1695 #define CTEST_INC_1695 1696 #define CTEST_INC_1696 1697 #define CTEST_INC_1697 1698 #define CTEST_INC_1698 1699 #define CTEST_INC_1699 1700 #define CTEST_INC_1700 1701 #define CTEST_INC_1701 1702 #define CTEST_INC_1702 1703 #define CTEST_INC_1703 1704 #define CTEST_INC_1704 1705 #define CTEST_INC_1705 1706 #define CTEST_INC_1706 1707 #define CTEST_INC_1707 1708 #define CTEST_INC_1708 1709 #define CTEST_INC_1709 1710 #define CTEST_INC_1710 1711 #define CTEST_INC_1711 1712 #define CTEST_INC_1712 1713 #define CTEST_INC_1713 1714 #define CTEST_INC_1714 1715 #define CTEST_INC_1715 1716 #define CTEST_INC_1716 1717 #define CTEST_INC_1717 1718 #define CTEST_INC_1718 1719 #define CTEST_INC_1719 1720 #define CTEST_INC_1720 1721 #define CTEST_INC_1721 1722 #define CTEST_INC_1722 1723 #define CTEST_INC_1723 1724 #define CTEST_INC_1724 1725 #define CTEST_INC_1725 1726 #define CTEST_INC_1726 1727 #define CTEST_INC_1727 1728 #define CTEST_INC_1728 1729 #define CTEST_INC_1729 1730 #define CTEST_INC_1730 1731 #define CTEST_INC_1731 1732 #define CTEST_INC_1732 1733 #define CTEST_INC_1733 1734 #define CTEST_INC_1734 1735 #define CTEST_INC_1735 1736 #define CTEST_INC_1736 1737 #define CTEST_INC_1737 1738 #define CTEST_INC_1738 1739 #define CTEST_INC_1739 1740 #define CTEST_INC_1740 1741 #define CTEST_INC_1741 1742 #define CTEST_INC_1742 1743 #define CTEST_INC_1743 1744 #define CTEST_INC_1744 1745 #define CTEST_INC_1745 1746 #define CTEST_INC_1746 1747 #define CTEST_INC_1747 1748 #define CTEST_INC_1748 1749 #define CTEST_INC_1749 1750 #define CTEST_INC_1750 1751 #define CTEST_INC_1751 1752 #define CTEST_INC_1752 1753 #define CTEST_INC_1753 1754 #define CTEST_INC_1754 1755 #define CTEST_INC_1755 1756 #define CTEST_INC_1756 1757 #define CTEST_INC_1757 1758 #define CTEST_INC_1758 1759 #define CTEST_INC_1759 1760 #define CTEST_INC_1760 1761 #define CTEST_INC_1761 1762 #define CTEST_INC_1762 1763 #define CTEST_INC_1763 1764 #define CTEST_INC_1764 1765 #define CTEST_INC_1765 1766 #define CTEST_INC_1766 1767 #define CTEST_INC_1767 1768 #define CTEST_INC_1768 1769 #define CTEST_INC_1769 1770 #define CTEST_INC_1770 1771 #define CTEST_INC_1771 1772 #define CTEST_INC_1772 1773 #define CTEST_INC_1773 1774 #define CTEST_INC_1774 1775 #define CTEST_INC_1775 1776 #define CTEST_INC_1776 1777 #define CTEST_INC_1777 1778 #define CTEST_INC_1778 1779 #define CTEST_INC_1779 1780 #define CTEST_INC_1780 1781 #define CTEST_INC_1781 1782 #define CTEST_INC_1782 1783 #define CTEST_INC_1783 1784 #define CTEST_INC_1784 1785 #define CTEST_INC_1785 1786 #define CTEST_INC_1786 1787 #define CTEST_INC_1787 1788 #define CTEST_INC_1788 1789 #define CTEST_INC_1789 1790 #define CTEST_INC_1790 1791 #define CTEST_INC_1791 1792 #define CTEST_INC_1792 1793 #define CTEST_INC_1793 1794 #define CTEST_INC_1794 1795 #define CTEST_INC_1795 1796 #define CTEST_INC_1796 1797 #define CTEST_INC_1797 1798 #define CTEST_INC_1798 1799 #define CTEST_INC_1799 1800 #define CTEST_INC_1800 1801 #define CTEST_INC_1801 1802 #define CTEST_INC_1802 1803 #define CTEST_INC_1803 1804 #define CTEST_INC_1804 1805 #define CTEST_INC_1805 1806 #define CTEST_INC_1806 1807 #define CTEST_INC_1807 1808 #define CTEST_INC_1808 1809 #define CTEST_INC_1809 1810 #define CTEST_INC_1810 1811 #define CTEST_INC_1811 1812 #define CTEST_INC_1812 1813 #define CTEST_INC_1813 1814 #define CTEST_INC_1814 1815 #define CTEST_INC_1815 1816 #define CTEST_INC_1816 1817 #define CTEST_INC_1817 1818 #define CTEST_INC_1818 1819 #define CTEST_INC_1819 1820 #define CTEST_INC_1820 1821 #define CTEST_INC_1821 1822 #define CTEST_INC_1822 1823 #define CTEST_INC_1823 1824 #define CTEST_INC_1824 1825 #define CTEST_INC_1825 1826 #define CTEST_INC_1826 1827 #define CTEST_INC_1827 1828 #define CTEST_INC_1828 1829 #define CTEST_INC_1829 1830 #define CTEST_INC_1830 1831 #define CTEST_INC_1831 1832 #define CTEST_INC_1832 1833 #define CTEST_INC_1833 1834 #define CTEST_INC_1834 1835 #define CTEST_INC_1835 1836 #define CTEST_INC_1836 1837 #define CTEST_INC_1837 1838 #define CTEST_INC_1838 1839 #define CTEST_INC_1839 1840 #define CTEST_INC_1840 1841 #define CTEST_INC_1841 1842 #define CTEST_INC_1842 1843 #define CTEST_INC_1843 1844 #define CTEST_INC_1844 1845 #define CTEST_INC_1845 1846 #define CTEST_INC_1846 1847 #define CTEST_INC_1847 1848 #define CTEST_INC_1848 1849 #define CTEST_INC_1849 1850 #define CTEST_INC_1850 1851 #define CTEST_INC_1851 1852 #define CTEST_INC_1852 1853 #define CTEST_INC_1853 1854 #define CTEST_INC_1854 1855 #define CTEST_INC_1855 1856 #define CTEST_INC_1856 1857 #define CTEST_INC_1857 1858 #define CTEST_INC_1858 1859 #define CTEST_INC_1859 1860 #define CTEST_INC_1860 1861 #define CTEST_INC_1861 1862 #define CTEST_INC_1862 1863 #define CTEST_INC_1863 1864 #define CTEST_INC_1864 1865 #define CTEST_INC_1865 1866 #define CTEST_INC_1866 1867 #define CTEST_INC_1867 1868 #define CTEST_INC_1868 1869 #define CTEST_INC_1869 1870 #define CTEST_INC_1870 1871 #define CTEST_INC_1871 1872 #define CTEST_INC_1872 1873 #define CTEST_INC_1873 1874 #define CTEST_INC_1874 1875 #define CTEST_INC_1875 1876 #define CTEST_INC_1876 1877 #define CTEST_INC_1877 1878 #define CTEST_INC_1878 1879 #define CTEST_INC_1879 1880 #define CTEST_INC_1880 1881 #define CTEST_INC_1881 1882 #define CTEST_INC_1882 1883 #define CTEST_INC_1883 1884 #define CTEST_INC_1884 1885 #define CTEST_INC_1885 1886 #define CTEST_INC_1886 1887 #define CTEST_INC_1887 1888 #define CTEST_INC_1888 1889 #define CTEST_INC_1889 1890 #define CTEST_INC_1890 1891 #define CTEST_INC_1891 1892 #define CTEST_INC_1892 1893 #define CTEST_INC_1893 1894 #define CTEST_INC_1894 1895 #define CTEST_INC_1895 1896 #define CTEST_INC_1896 1897 #define CTEST_INC_1897 1898 #define CTEST_INC_1898 1899 #define CTEST_INC_1899 1900 #define CTEST_INC_1900 1901 #define CTEST_INC_1901 1902 #define CTEST_INC_1902 1903 #define CTEST_INC_1903 1904 #define CTEST_INC_1904 1905 #define CTEST_INC_1905 1906 #define CTEST_INC_1906 1907 #define CTEST_INC_1907 1908 #define CTEST_INC_1908 1909 #define CTEST_INC_1909 1910 #define CTEST_INC_1910 1911 #define CTEST_INC_1911 1912 #define CTEST_INC_1912 1913 #define CTEST_INC_1913 1914 #define CTEST_INC_1914 1915 #define CTEST_INC_1915 1916 #define CTEST_INC_1916 1917 #define CTEST_INC_1917 1918 #define CTEST_INC_1918 1919 #define CTEST_INC_1919 1920 #define CTEST_INC_1920 1921 #define CTEST_INC_1921 1922 #define CTEST_INC_1922 1923 #define CTEST_INC_1923 1924 #define CTEST_INC_1924 1925 #define CTEST_INC_1925 1926 #define CTEST_INC_1926 1927 #define CTEST_INC_1927 1928 #define CTEST_INC_1928 1929 #define CTEST_INC_1929 1930 #define CTEST_INC_1930 1931 #define CTEST_INC_1931 1932 #define CTEST_INC_1932 1933 #define CTEST_INC_1933 1934 #define CTEST_INC_1934 1935 #define CTEST_INC_1935 1936 #define CTEST_INC_1936 1937 #define CTEST_INC_1937 1938 #define CTEST_INC_1938 1939 #define CTEST_INC_1939 1940 #define CTEST_INC_1940 1941 #define CTEST_INC_1941 1942 #define CTEST_INC_1942 1943 #define CTEST_INC_1943 1944 #define CTEST_INC_1944 1945 #define CTEST_INC_1945 1946 #define CTEST_INC_1946 1947 #define CTEST_INC_1947 1948 #define CTEST_INC_1948 1949 #define CTEST_INC_1949 1950 #define CTEST_INC_1950 1951 #define CTEST_INC_1951 1952 #define CTEST_INC_1952 1953 #define CTEST_INC_1953 1954 #define CTEST_INC_1954 1955 #define CTEST_INC_1955 1956 #define CTEST_INC_1956 1957 #define CTEST_INC_1957 1958 #define CTEST_INC_1958 1959 #define CTEST_INC_1959 1960 #define CTEST_INC_1960 1961 #define CTEST_INC_1961 1962 #define CTEST_INC_1962 1963 #define CTEST_INC_1963 1964 #define CTEST_INC_1964 1965 #define CTEST_INC_1965 1966 #define CTEST_INC_1966 1967 #define CTEST_INC_1967 1968 #define CTEST_INC_1968 1969 #define CTEST_INC_1969 1970 #define CTEST_INC_1970 1971 #define CTEST_INC_1971 1972 #define CTEST_INC_1972 1973 #define CTEST_INC_1973 1974 #define CTEST_INC_1974 1975 #define CTEST_INC_1975 1976 #define CTEST_INC_1976 1977 #define CTEST_INC_1977 1978 #define CTEST_INC_1978 1979 #define CTEST_INC_1979 1980 #define CTEST_INC_1980 1981 #define CTEST_INC_1981 1982 #define CTEST_INC_1982 1983 #define CTEST_INC_1983 1984 #define CTEST_INC_1984 1985 #define CTEST_INC_1985 1986 #define CTEST_INC_1986 1987 #define CTEST_INC_1987 1988 #define CTEST_INC_1988 1989 #define CTEST_INC_1989 1990 #define CTEST_INC_1990 1991 #define CTEST_INC_1991 1992 #define CTEST_INC_1992 1993 #define CTEST_INC_1993 1994 #define CTEST_INC_1994 1995 #define CTEST_INC_1995 1996 #define CTEST_INC_1996 1997 #define CTEST_INC_1997 1998 #define CTEST_INC_1998 1999 #define CTEST_INC_1999 2000 #define CTEST_INC_2000 2001 #define CTEST_INC_2001 2002 #define CTEST_INC_2002 2003 #define CTEST_INC_2003 2004 #define CTEST_INC_2004 2005 #define CTEST_INC_2005 2006 #define CTEST_INC_2006 2007 #define CTEST_INC_2007 2008 #define CTEST_INC_2008 2009 #define CTEST_INC_2009 2010 #define CTEST_INC_2010 2011 #define CTEST_INC_2011 2012 #define CTEST_INC_2012 2013 #define CTEST_INC_2013 2014 #define CTEST_INC_2014 2015 #define CTEST_INC_2015 2016 #define CTEST_INC_2016 2017 #define CTEST_INC_2017 2018 #define CTEST_INC_2018 2019 #define CTEST_INC_2019 2020 #define CTEST_INC_2020 2021 #define CTEST_INC_2021 2022 #define CTEST_INC_2022 2023 #define CTEST_INC_2023 2024 #define CTEST_INC_2024 2025 #define CTEST_INC_2025 2026 #define CTEST_INC_2026 2027 #define CTEST_INC_2027 2028 #define CTEST_INC_2028 2029 #define CTEST_INC_2029 2030 #define CTEST_INC_2030 2031 #define CTEST_INC_2031 2032 #define CTEST_INC_2032 2033 #define CTEST_INC_2033 2034 #define CTEST_INC_2034 2035 #define CTEST_INC_2035 2036 #define CTEST_INC_2036 2037 #define CTEST_INC_2037 2038 #define CTEST_INC_2038 2039 #define CTEST_INC_2039 2040 #define CTEST_INC_2040 2041 #define CTEST_INC_2041 2042 #define CTEST_INC_2042 2043 #define CTEST_INC_2043 2044 #define CTEST_INC_2044 2045 #define CTEST_INC_2045 2046 #define CTEST_INC_2046 2047 #define CTEST_INC_2047 2048 #define CTEST_INC_2048 2049 #define CTEST_INC_2049 2050 #define CTEST_INC_2050 2051 #define CTEST_INC_2051 2052 #define CTEST_INC_2052 2053 #define CTEST_INC_2053 2054 #define CTEST_INC_2054 2055 #define CTEST_INC_2055 2056 #define CTEST_INC_2056 2057 #define CTEST_INC_2057 2058 #define CTEST_INC_2058 2059 #define CTEST_INC_2059 2060 #define CTEST_INC_2060 2061 #define CTEST_INC_2061 2062 #define CTEST_INC_2062 2063 #define CTEST_INC_2063 2064 #define CTEST_INC_2064 2065 #define CTEST_INC_2065 2066 #define CTEST_INC_2066 2067 #define CTEST_INC_2067 2068 #define CTEST_INC_2068 2069 #define CTEST_INC_2069 2070 #define CTEST_INC_2070 2071 #define CTEST_INC_2071 2072 #define CTEST_INC_2072 2073 #define CTEST_INC_2073 2074 #define CTEST_INC_2074 2075 #define CTEST_INC_2075 2076 #define CTEST_INC_2076 2077 #define CTEST_INC_2077 2078 #define CTEST_INC_2078 2079 #define CTEST_INC_2079 2080 #define CTEST_INC_2080 2081 #define CTEST_INC_2081 2082 #define CTEST_INC_2082 2083 #define CTEST_INC_2083 2084 #define CTEST_INC_2084 2085 #define CTEST_INC_2085 2086 #define CTEST_INC_2086 2087 #define CTEST_INC_2087 2088 #define CTEST_INC_2088 2089 #define CTEST_INC_2089 2090 #define CTEST_INC_2090 2091 #define CTEST_INC_2091 2092 #define CTEST_INC_2092 2093 #define CTEST_INC_2093 2094 #define CTEST_INC_2094 2095 #define CTEST_INC_2095 2096 #define CTEST_INC_2096 2097 #define CTEST_INC_2097 2098 #define CTEST_INC_2098 2099 #define CTEST_INC_2099 2100 #define CTEST_INC_2100 2101 #define CTEST_INC_2101 2102 #define CTEST_INC_2102 2103 #define CTEST_INC_2103 2104 #define CTEST_INC_2104 2105 #define CTEST_INC_2105 2106 #define CTEST_INC_2106 2107 #define CTEST_INC_2107 2108 #define CTEST_INC_2108 2109 #define CTEST_INC_2109 2110 #define CTEST_INC_2110 2111 #define CTEST_INC_2111 2112 #define CTEST_INC_2112 2113 #define CTEST_INC_2113 2114 #define CTEST_INC_2114 2115 #define CTEST_INC_2115 2116 #define CTEST_INC_2116 2117 #define CTEST_INC_2117 2118 #define CTEST_INC_2118 2119 #define CTEST_INC_2119 2120 #define CTEST_INC_2120 2121 #define CTEST_INC_2121 2122 #define CTEST_INC_2122 2123 #define CTEST_INC_2123 2124 #define CTEST_INC_2124 2125 #define CTEST_INC_2125 2126 #define CTEST_INC_2126 2127 #define CTEST_INC_2127 2128 #define CTEST_INC_2128 2129 #define CTEST_INC_2129 2130 #define CTEST_INC_2130 2131 #define CTEST_INC_2131 2132 #define CTEST_INC_2132 2133 #define CTEST_INC_2133 2134 #define CTEST_INC_2134 2135 #define CTEST_INC_2135 2136 #define CTEST_INC_2136 2137 #define CTEST_INC_2137 2138 #define CTEST_INC_2138 2139 #define CTEST_INC_2139 2140 #define CTEST_INC_2140 2141 #define CTEST_INC_2141 2142 #define CTEST_INC_2142 2143 #define CTEST_INC_2143 2144 #define CTEST_INC_2144 2145 #define CTEST_INC_2145 2146 #define CTEST_INC_2146 2147 #define CTEST_INC_2147 2148 #define CTEST_INC_2148 2149 #define CTEST_INC_2149 2150 #define CTEST_INC_2150 2151 #define CTEST_INC_2151 2152 #define CTEST_INC_2152 2153 #define CTEST_INC_2153 2154 #define CTEST_INC_2154 2155 #define CTEST_INC_2155 2156 #define CTEST_INC_2156 2157 #define CTEST_INC_2157 2158 #define CTEST_INC_2158 2159 #define CTEST_INC_2159 2160 #define CTEST_INC_2160 2161 #define CTEST_INC_2161 2162 #define CTEST_INC_2162 2163 #define CTEST_INC_2163 2164 #define CTEST_INC_2164 2165 #define CTEST_INC_2165 2166 #define CTEST_INC_2166 2167 #define CTEST_INC_2167 2168 #define CTEST_INC_2168 2169 #define CTEST_INC_2169 2170 #define CTEST_INC_2170 2171 #define CTEST_INC_2171 2172 #define CTEST_INC_2172 2173 #define CTEST_INC_2173 2174 #define CTEST_INC_2174 2175 #define CTEST_INC_2175 2176 #define CTEST_INC_2176 2177 #define CTEST_INC_2177 2178 #define CTEST_INC_2178 2179 #define CTEST_INC_2179 2180 #define CTEST_INC_2180 2181 #define CTEST_INC_2181 2182 #define CTEST_INC_2182 2183 #define CTEST_INC_2183 2184 #define CTEST_INC_2184 2185 #define CTEST_INC_2185 2186 #define CTEST_INC_2186 2187 #define CTEST_INC_2187 2188 #define CTEST_INC_2188 2189 #define CTEST_INC_2189 2190 #define CTEST_INC_2190 2191 #define CTEST_INC_2191 2192 #define CTEST_INC_2192 2193 #define CTEST_INC_2193 2194 #define CTEST_INC_2194 2195 #define CTEST_INC_2195 2196 #define CTEST_INC_2196 2197 #define CTEST_INC_2197 2198 #define CTEST_INC_2198 2199 #define CTEST_INC_2199 2200 #define CTEST_INC_2200 2201 #define CTEST_INC_2201 2202 #define CTEST_INC_2202 2203 #define CTEST_INC_2203 2204 #define CTEST_INC_2204 2205 #define CTEST_INC_2205 2206 #define CTEST_INC_2206 2207 #define CTEST_INC_2207 2208 #define CTEST_INC_2208 2209 #define CTEST_INC_2209 2210 #define CTEST_INC_2210 2211 #define CTEST_INC_2211 2212 #define CTEST_INC_2212 2213 #define CTEST_INC_2213 2214 #define CTEST_INC_2214 2215 #define CTEST_INC_2215 2216 #define CTEST_INC_2216 2217 #define CTEST_INC_2217 2218 #define CTEST_INC_2218 2219 #define CTEST_INC_2219 2220 #define CTEST_INC_2220 2221 #define CTEST_INC_2221 2222 #define CTEST_INC_2222 2223 #define CTEST_INC_2223 2224 #define CTEST_INC_2224 2225 #define CTEST_INC_2225 2226 #define CTEST_INC_2226 2227 #define CTEST_INC_2227 2228 #define CTEST_INC_2228 2229 #define CTEST_INC_2229 2230 #define CTEST_INC_2230 2231 #define CTEST_INC_2231 2232 #define CTEST_INC_2232 2233 #define CTEST_INC_2233 2234 #define CTEST_INC_2234 2235 #define CTEST_INC_2235 2236 #define CTEST_INC_2236 2237 #define CTEST_INC_2237 2238 #define CTEST_INC_2238 2239 #define CTEST_INC_2239 2240 #define CTEST_INC_2240 2241 #define CTEST_INC_2241 2242 #define CTEST_INC_2242 2243 #define CTEST_INC_2243 2244 #define CTEST_INC_2244 2245 #define CTEST_INC_2245 2246 #define CTEST_INC_2246 2247 #define CTEST_INC_2247 2248 #define CTEST_INC_2248 2249 #define CTEST_INC_2249 2250 #define CTEST_INC_2250 2251 #define CTEST_INC_2251 2252 #define CTEST_INC_2252 2253 #define CTEST_INC_2253 2254 #define CTEST_INC_2254 2255 #define CTEST_INC_2255 2256 #define CTEST_INC_2256 2257 #define CTEST_INC_2257 2258 #define CTEST_INC_2258 2259 #define CTEST_INC_2259 2260 #define CTEST_INC_2260 2261 #define CTEST_INC_2261 2262 #define CTEST_INC_2262 2263 #define CTEST_INC_2263 2264 #define CTEST_INC_2264 2265 #define CTEST_INC_2265 2266 #define CTEST_INC_2266 2267 #define CTEST_INC_2267 2268 #define CTEST_INC_2268 2269 #define CTEST_INC_2269 2270 #define CTEST_INC_2270 2271 #define CTEST_INC_2271 2272 #define CTEST_INC_2272 2273 #define CTEST_INC_2273 2274 #define CTEST_INC_2274 2275 #define CTEST_INC_2275 2276 #define CTEST_INC_2276 2277 #define CTEST_INC_2277 2278 #define CTEST_INC_2278 2279 #define CTEST_INC_2279 2280 #define CTEST_INC_2280 2281 #define CTEST_INC_2281 2282 #define CTEST_INC_2282 2283 #define CTEST_INC_2283 2284 #define CTEST_INC_2284 2285 #define CTEST_INC_2285 2286 #define CTEST_INC_2286 2287 #define CTEST_INC_2287 2288 #define CTEST_INC_2288 2289 #define CTEST_INC_2289 2290 #define CTEST_INC_2290 2291 #define CTEST_INC_2291 2292 #define CTEST_INC_2292 2293 #define CTEST_INC_2293 2294 #define CTEST_INC_2294 2295 #define CTEST_INC_2295 2296 #define CTEST_INC_2296 2297 #define CTEST_INC_2297 2298 #define CTEST_INC_2298 2299 #define CTEST_INC_2299 2300 #define CTEST_INC_2300 2301 #define CTEST_INC_2301 2302 #define CTEST_INC_2302 2303 #define CTEST_INC_2303 2304 #define CTEST_INC_2304 2305 #define CTEST_INC_2305 2306 #define CTEST_INC_2306 2307 #define CTEST_INC_2307 2308 #define CTEST_INC_2308 2309 #define CTEST_INC_2309 2310 #define CTEST_INC_2310 2311 #define CTEST_INC_2311 2312 #define CTEST_INC_2312 2313 #define CTEST_INC_2313 2314 #define CTEST_INC_2314 2315 #define CTEST_INC_2315 2316 #define CTEST_INC_2316 2317 #define CTEST_INC_2317 2318 #define CTEST_INC_2318 2319 #define CTEST_INC_2319 2320 #define CTEST_INC_2320 2321 #define CTEST_INC_2321 2322 #define CTEST_INC_2322 2323 #define CTEST_INC_2323 2324 #define CTEST_INC_2324 2325 #define CTEST_INC_2325 2326 #define CTEST_INC_2326 2327 #define CTEST_INC_2327 2328 #define CTEST_INC_2328 2329 #define CTEST_INC_2329 2330 #define CTEST_INC_2330 2331 #define CTEST_INC_2331 2332 #define CTEST_INC_2332 2333 #define CTEST_INC_2333 2334 #define CTEST_INC_2334 2335 #define CTEST_INC_2335 2336 #define CTEST_INC_2336 2337 #define CTEST_INC_2337 2338 #define CTEST_INC_2338 2339 #define CTEST_INC_2339 2340 #define CTEST_INC_2340 2341 #define CTEST_INC_2341 2342 #define CTEST_INC_2342 2343 #define CTEST_INC_2343 2344 #define CTEST_INC_2344 2345 #define CTEST_INC_2345 2346 #define CTEST_INC_2346 2347 #define CTEST_INC_2347 2348 #define CTEST_INC_2348 2349 #define CTEST_INC_2349 2350 #define CTEST_INC_2350 2351 #define CTEST_INC_2351 2352 #define CTEST_INC_2352 2353 #define CTEST_INC_2353 2354 #define CTEST_INC_2354 2355 #define CTEST_INC_2355 2356 #define CTEST_INC_2356 2357 #define CTEST_INC_2357 2358 #define CTEST_INC_2358 2359 #define CTEST_INC_2359 2360 #define CTEST_INC_2360 2361 #define CTEST_INC_2361 2362 #define CTEST_INC_2362 2363 #define CTEST_INC_2363 2364 #define CTEST_INC_2364 2365 #define CTEST_INC_2365 2366 #define CTEST_INC_2366 2367 #define CTEST_INC_2367 2368 #define CTEST_INC_2368 2369 #define CTEST_INC_2369 2370 #define CTEST_INC_2370 2371 #define CTEST_INC_2371 2372 #define CTEST_INC_2372 2373 #define CTEST_INC_2373 2374 #define CTEST_INC_2374 2375 #define CTEST_INC_2375 2376 #define CTEST_INC_2376 2377 #define CTEST_INC_2377 2378 #define CTEST_INC_2378 2379 #define CTEST_INC_2379 2380 #define CTEST_INC_2380 2381 #define CTEST_INC_2381 2382 #define CTEST_INC_2382 2383 #define CTEST_INC_2383 2384 #define CTEST_INC_2384 2385 #define CTEST_INC_2385 2386 #define CTEST_INC_2386 2387 #define CTEST_INC_2387 2388 #define CTEST_INC_2388 2389 #define CTEST_INC_2389 2390 #define CTEST_INC_2390 2391 #define CTEST_INC_2391 2392 #define CTEST_INC_2392 2393 #define CTEST_INC_2393 2394 #define CTEST_INC_2394 2395 #define CTEST_INC_2395 2396 #define CTEST_INC_2396 2397 #define CTEST_INC_2397 2398 #define CTEST_INC_2398 2399 #define CTEST_INC_2399 2400 #define CTEST_INC_2400 2401 #define CTEST_INC_2401 2402 #define CTEST_INC_2402 2403 #define CTEST_INC_2403 2404 #define CTEST_INC_2404 2405 #define CTEST_INC_2405 2406 #define CTEST_INC_2406 2407 #define CTEST_INC_2407 2408 #define CTEST_INC_2408 2409 #define CTEST_INC_2409 2410 #define CTEST_INC_2410 2411 #define CTEST_INC_2411 2412 #define CTEST_INC_2412 2413 #define CTEST_INC_2413 2414 #define CTEST_INC_2414 2415 #define CTEST_INC_2415 2416 #define CTEST_INC_2416 2417 #define CTEST_INC_2417 2418 #define CTEST_INC_2418 2419 #define CTEST_INC_2419 2420 #define CTEST_INC_2420 2421 #define CTEST_INC_2421 2422 #define CTEST_INC_2422 2423 #define CTEST_INC_2423 2424 #define CTEST_INC_2424 2425 #define CTEST_INC_2425 2426 #define CTEST_INC_2426 2427 #define CTEST_INC_2427 2428 #define CTEST_INC_2428 2429 #define CTEST_INC_2429 2430 #define CTEST_INC_2430 2431 #define CTEST_INC_2431 2432 #define CTEST_INC_2432 2433 #define CTEST_INC_2433 2434 #define CTEST_INC_2434 2435 #define CTEST_INC_2435 2436 #define CTEST_INC_2436 2437 #define CTEST_INC_2437 2438 #define CTEST_INC_2438 2439 #define CTEST_INC_2439 2440 #define CTEST_INC_2440 2441 #define CTEST_INC_2441 2442 #define CTEST_INC_2442 2443 #define CTEST_INC_2443 2444 #define CTEST_INC_2444 2445 #define CTEST_INC_2445 2446 #define CTEST_INC_2446 2447 #define CTEST_INC_2447 2448 #define CTEST_INC_2448 2449 #define CTEST_INC_2449 2450 #define CTEST_INC_2450 2451 #define CTEST_INC_2451 2452 #define CTEST_INC_2452 2453 #define CTEST_INC_2453 2454 #define CTEST_INC_2454 2455 #define CTEST_INC_2455 2456 #define CTEST_INC_2456 2457 #define CTEST_INC_2457 2458 #define CTEST_INC_2458 2459 #define CTEST_INC_2459 2460 #define CTEST_INC_2460 2461 #define CTEST_INC_2461 2462 #define CTEST_INC_2462 2463 #define CTEST_INC_2463 2464 #define CTEST_INC_2464 2465 #define CTEST_INC_2465 2466 #define CTEST_INC_2466 2467 #define CTEST_INC_2467 2468 #define CTEST_INC_2468 2469 #define CTEST_INC_2469 2470 #define CTEST_INC_2470 2471 #define CTEST_INC_2471 2472 #define CTEST_INC_2472 2473 #define CTEST_INC_2473 2474 #define CTEST_INC_2474 2475 #define CTEST_INC_2475 2476 #define CTEST_INC_2476 2477 #define CTEST_INC_2477 2478 #define CTEST_INC_2478 2479 #define CTEST_INC_2479 2480 #define CTEST_INC_2480 2481 #define CTEST_INC_2481 2482 #define CTEST_INC_2482 2483 #define CTEST_INC_2483 2484 #define CTEST_INC_2484 2485 #define CTEST_INC_2485 2486 #define CTEST_INC_2486 2487 #define CTEST_INC_2487 2488 #define CTEST_INC_2488 2489 #define CTEST_INC_2489 2490 #define CTEST_INC_2490 2491 #define CTEST_INC_2491 2492 #define CTEST_INC_2492 2493 #define CTEST_INC_2493 2494 #define CTEST_INC_2494 2495 #define CTEST_INC_2495 2496 #define CTEST_INC_2496 2497 #define CTEST_INC_2497 2498 #define CTEST_INC_2498 2499 #define CTEST_INC_2499 2500 #define CTEST_INC_2500 2501 #define CTEST_INC_2501 2502 #define CTEST_INC_2502 2503 #define CTEST_INC_2503 2504 #define CTEST_INC_2504 2505 #define CTEST_INC_2505 2506 #define CTEST_INC_2506 2507 #define CTEST_INC_2507 2508 #define CTEST_INC_2508 2509 #define CTEST_INC_2509 2510 #define CTEST_INC_2510 2511 #define CTEST_INC_2511 2512 #define CTEST_INC_2512 2513 #define CTEST_INC_2513 2514 #define CTEST_INC_2514 2515 #define CTEST_INC_2515 2516 #define CTEST_INC_2516 2517 #define CTEST_INC_2517 2518 #define CTEST_INC_2518 2519 #define CTEST_INC_2519 2520 #define CTEST_INC_2520 2521 #define CTEST_INC_2521 2522 #define CTEST_INC_2522 2523 #define CTEST_INC_2523 2524 #define CTEST_INC_2524 2525 #define CTEST_INC_2525 2526 #define CTEST_INC_2526 2527 #define CTEST_INC_2527 2528 #define CTEST_INC_2528 2529 #define CTEST_INC_2529 2530 #define CTEST_INC_2530 2531 #define CTEST_INC_2531 2532 #define CTEST_INC_2532 2533 #define CTEST_INC_2533 2534 #define CTEST_INC_2534 2535 #define CTEST_INC_2535 2536 #define CTEST_INC_2536 2537 #define CTEST_INC_2537 2538 #define CTEST_INC_2538 2539 #define CTEST_INC_2539 2540 #define CTEST_INC_2540 2541 #define CTEST_INC_2541 2542 #define CTEST_INC_2542 2543 #define CTEST_INC_2543 2544 #define CTEST_INC_2544 2545 #define CTEST_INC_2545 2546 #define CTEST_INC_2546 2547 #define CTEST_INC_2547 2548 #define CTEST_INC_2548 2549 #define CTEST_INC_2549 2550 #define CTEST_INC_2550 2551 #define CTEST_INC_2551 2552 #define CTEST_INC_2552 2553 #define CTEST_INC_2553 2554 #define CTEST_INC_2554 2555 #define CTEST_INC_2555 2556 #define CTEST_INC_2556 2557 #define CTEST_INC_2557 2558 #define CTEST_INC_2558 2559 #define CTEST_INC_2559 2560 #define CTEST_INC_2560 2561 #define CTEST_INC_2561 2562 #define CTEST_INC_2562 2563 #define CTEST_INC_2563 2564 #define CTEST_INC_2564 2565 #define CTEST_INC_2565 2566 #define CTEST_INC_2566 2567 #define CTEST_INC_2567 2568 #define CTEST_INC_2568 2569 #define CTEST_INC_2569 2570 #define CTEST_INC_2570 2571 #define CTEST_INC_2571 2572 #define CTEST_INC_2572 2573 #define CTEST_INC_2573 2574 #define CTEST_INC_2574 2575 #define CTEST_INC_2575 2576 #define CTEST_INC_2576 2577 #define CTEST_INC_2577 2578 #define CTEST_INC_2578 2579 #define CTEST_INC_2579 2580 #define CTEST_INC_2580 2581 #define CTEST_INC_2581 2582 #define CTEST_INC_2582 2583 #define CTEST_INC_2583 2584 #define CTEST_INC_2584 2585 #define CTEST_INC_2585 2586 #define CTEST_INC_2586 2587 #define CTEST_INC_2587 2588 #define CTEST_INC_2588 2589 #define CTEST_INC_2589 2590 #define CTEST_INC_2590 2591 #define CTEST_INC_2591 2592 #define CTEST_INC_2592 2593 #define CTEST_INC_2593 2594 #define CTEST_INC_2594 2595 #define CTEST_INC_2595 2596 #define CTEST_INC_2596 2597 #define CTEST_INC_2597 2598 #define CTEST_INC_2598 2599 #define CTEST_INC_2599 2600 #define CTEST_INC_2600 2601 #define CTEST_INC_2601 2602 #define CTEST_INC_2602 2603 #define CTEST_INC_2603 2604 #define CTEST_INC_2604 2605 #define CTEST_INC_2605 2606 #define CTEST_INC_2606 2607 #define CTEST_INC_2607 2608 #define CTEST_INC_2608 2609 #define CTEST_INC_2609 2610 #define CTEST_INC_2610 2611 #define CTEST_INC_2611 2612 #define CTEST_INC_2612 2613 #define CTEST_INC_2613 2614 #define CTEST_INC_2614 2615 #define CTEST_INC_2615 2616 #define CTEST_INC_2616 2617 #define CTEST_INC_2617 2618 #define CTEST_INC_2618 2619 #define CTEST_INC_2619 2620 #define CTEST_INC_2620 2621 #define CTEST_INC_2621 2622 #define CTEST_INC_2622 2623 #define CTEST_INC_2623 2624 #define CTEST_INC_2624 2625 #define CTEST_INC_2625 2626 #define CTEST_INC_2626 2627 #define CTEST_INC_2627 2628 #define CTEST_INC_2628 2629 #define CTEST_INC_2629 2630 #define CTEST_INC_2630 2631 #define CTEST_INC_2631 2632 #define CTEST_INC_2632 2633 #define CTEST_INC_2633 2634 #define CTEST_INC_2634 2635 #define CTEST_INC_2635 2636 #define CTEST_INC_2636 2637 #define CTEST_INC_2637 2638 #define CTEST_INC_2638 2639 #define CTEST_INC_2639 2640 #define CTEST_INC_2640 2641 #define CTEST_INC_2641 2642 #define CTEST_INC_2642 2643 #define CTEST_INC_2643 2644 #define CTEST_INC_2644 2645 #define CTEST_INC_2645 2646 #define CTEST_INC_2646 2647 #define CTEST_INC_2647 2648 #define CTEST_INC_2648 2649 #define CTEST_INC_2649 2650 #define CTEST_INC_2650 2651 #define CTEST_INC_2651 2652 #define CTEST_INC_2652 2653 #define CTEST_INC_2653 2654 #define CTEST_INC_2654 2655 #define CTEST_INC_2655 2656 #define CTEST_INC_2656 2657 #define CTEST_INC_2657 2658 #define CTEST_INC_2658 2659 #define CTEST_INC_2659 2660 #define CTEST_INC_2660 2661 #define CTEST_INC_2661 2662 #define CTEST_INC_2662 2663 #define CTEST_INC_2663 2664 #define CTEST_INC_2664 2665 #define CTEST_INC_2665 2666 #define CTEST_INC_2666 2667 #define CTEST_INC_2667 2668 #define CTEST_INC_2668 2669 #define CTEST_INC_2669 2670 #define CTEST_INC_2670 2671 #define CTEST_INC_2671 2672 #define CTEST_INC_2672 2673 #define CTEST_INC_2673 2674 #define CTEST_INC_2674 2675 #define CTEST_INC_2675 2676 #define CTEST_INC_2676 2677 #define CTEST_INC_2677 2678 #define CTEST_INC_2678 2679 #define CTEST_INC_2679 2680 #define CTEST_INC_2680 2681 #define CTEST_INC_2681 2682 #define CTEST_INC_2682 2683 #define CTEST_INC_2683 2684 #define CTEST_INC_2684 2685 #define CTEST_INC_2685 2686 #define CTEST_INC_2686 2687 #define CTEST_INC_2687 2688 #define CTEST_INC_2688 2689 #define CTEST_INC_2689 2690 #define CTEST_INC_2690 2691 #define CTEST_INC_2691 2692 #define CTEST_INC_2692 2693 #define CTEST_INC_2693 2694 #define CTEST_INC_2694 2695 #define CTEST_INC_2695 2696 #define CTEST_INC_2696 2697 #define CTEST_INC_2697 2698 #define CTEST_INC_2698 2699 #define CTEST_INC_2699 2700 #define CTEST_INC_2700 2701 #define CTEST_INC_2701 2702 #define CTEST_INC_2702 2703 #define CTEST_INC_2703 2704 #define CTEST_INC_2704 2705 #define CTEST_INC_2705 2706 #define CTEST_INC_2706 2707 #define CTEST_INC_2707 2708 #define CTEST_INC_2708 2709 #define CTEST_INC_2709 2710 #define CTEST_INC_2710 2711 #define CTEST_INC_2711 2712 #define CTEST_INC_2712 2713 #define CTEST_INC_2713 2714 #define CTEST_INC_2714 2715 #define CTEST_INC_2715 2716 #define CTEST_INC_2716 2717 #define CTEST_INC_2717 2718 #define CTEST_INC_2718 2719 #define CTEST_INC_2719 2720 #define CTEST_INC_2720 2721 #define CTEST_INC_2721 2722 #define CTEST_INC_2722 2723 #define CTEST_INC_2723 2724 #define CTEST_INC_2724 2725 #define CTEST_INC_2725 2726 #define CTEST_INC_2726 2727 #define CTEST_INC_2727 2728 #define CTEST_INC_2728 2729 #define CTEST_INC_2729 2730 #define CTEST_INC_2730 2731 #define CTEST_INC_2731 2732 #define CTEST_INC_2732 2733 #define CTEST_INC_2733 2734 #define CTEST_INC_2734 2735 #define CTEST_INC_2735 2736 #define CTEST_INC_2736 2737 #define CTEST_INC_2737 2738 #define CTEST_INC_2738 2739 #define CTEST_INC_2739 2740 #define CTEST_INC_2740 2741 #define CTEST_INC_2741 2742 #define CTEST_INC_2742 2743 #define CTEST_INC_2743 2744 #define CTEST_INC_2744 2745 #define CTEST_INC_2745 2746 #define CTEST_INC_2746 2747 #define CTEST_INC_2747 2748 #define CTEST_INC_2748 2749 #define CTEST_INC_2749 2750 #define CTEST_INC_2750 2751 #define CTEST_INC_2751 2752 #define CTEST_INC_2752 2753 #define CTEST_INC_2753 2754 #define CTEST_INC_2754 2755 #define CTEST_INC_2755 2756 #define CTEST_INC_2756 2757 #define CTEST_INC_2757 2758 #define CTEST_INC_2758 2759 #define CTEST_INC_2759 2760 #define CTEST_INC_2760 2761 #define CTEST_INC_2761 2762 #define CTEST_INC_2762 2763 #define CTEST_INC_2763 2764 #define CTEST_INC_2764 2765 #define CTEST_INC_2765 2766 #define CTEST_INC_2766 2767 #define CTEST_INC_2767 2768 #define CTEST_INC_2768 2769 #define CTEST_INC_2769 2770 #define CTEST_INC_2770 2771 #define CTEST_INC_2771 2772 #define CTEST_INC_2772 2773 #define CTEST_INC_2773 2774 #define CTEST_INC_2774 2775 #define CTEST_INC_2775 2776 #define CTEST_INC_2776 2777 #define CTEST_INC_2777 2778 #define CTEST_INC_2778 2779 #define CTEST_INC_2779 2780 #define CTEST_INC_2780 2781 #define CTEST_INC_2781 2782 #define CTEST_INC_2782 2783 #define CTEST_INC_2783 2784 #define CTEST_INC_2784 2785 #define CTEST_INC_2785 2786 #define CTEST_INC_2786 2787 #define CTEST_INC_2787 2788 #define CTEST_INC_2788 2789 #define CTEST_INC_2789 2790 #define CTEST_INC_2790 2791 #define CTEST_INC_2791 2792 #define CTEST_INC_2792 2793 #define CTEST_INC_2793 2794 #define CTEST_INC_2794 2795 #define CTEST_INC_2795 2796 #define CTEST_INC_2796 2797 #define CTEST_INC_2797 2798 #define CTEST_INC_2798 2799 #define CTEST_INC_2799 2800 #define CTEST_INC_2800 2801 #define CTEST_INC_2801 2802 #define CTEST_INC_2802 2803 #define CTEST_INC_2803 2804 #define CTEST_INC_2804 2805 #define CTEST_INC_2805 2806 #define CTEST_INC_2806 2807 #define CTEST_INC_2807 2808 #define CTEST_INC_2808 2809 #define CTEST_INC_2809 2810 #define CTEST_INC_2810 2811 #define CTEST_INC_2811 2812 #define CTEST_INC_2812 2813 #define CTEST_INC_2813 2814 #define CTEST_INC_2814 2815 #define CTEST_INC_2815 2816 #define CTEST_INC_2816 2817 #define CTEST_INC_2817 2818 #define CTEST_INC_2818 2819 #define CTEST_INC_2819 2820 #define CTEST_INC_2820 2821 #define CTEST_INC_2821 2822 #define CTEST_INC_2822 2823 #define CTEST_INC_2823 2824 #define CTEST_INC_2824 2825 #define CTEST_INC_2825 2826 #define CTEST_INC_2826 2827 #define CTEST_INC_2827 2828 #define CTEST_INC_2828 2829 #define CTEST_INC_2829 2830 #define CTEST_INC_2830 2831 #define CTEST_INC_2831 2832 #define CTEST_INC_2832 2833 #define CTEST_INC_2833 2834 #define CTEST_INC_2834 2835 #define CTEST_INC_2835 2836 #define CTEST_INC_2836 2837 #define CTEST_INC_2837 2838 #define CTEST_INC_2838 2839 #define CTEST_INC_2839 2840 #define CTEST_INC_2840 2841 #define CTEST_INC_2841 2842 #define CTEST_INC_2842 2843 #define CTEST_INC_2843 2844 #define CTEST_INC_2844 2845 #define CTEST_INC_2845 2846 #define CTEST_INC_2846 2847 #define CTEST_INC_2847 2848 #define CTEST_INC_2848 2849 #define CTEST_INC_2849 2850 #define CTEST_INC_2850 2851 #define CTEST_INC_2851 2852 #define CTEST_INC_2852 2853 #define CTEST_INC_2853 2854 #define CTEST_INC_2854 2855 #define CTEST_INC_2855 2856 #define CTEST_INC_2856 2857 #define CTEST_INC_2857 2858 #define CTEST_INC_2858 2859 #define CTEST_INC_2859 2860 #define CTEST_INC_2860 2861 #define CTEST_INC_2861 2862 #define CTEST_INC_2862 2863 #define CTEST_INC_2863 2864 #define CTEST_INC_2864 2865 #define CTEST_INC_2865 2866 #define CTEST_INC_2866 2867 #define CTEST_INC_2867 2868 #define CTEST_INC_2868 2869 #define CTEST_INC_2869 2870 #define CTEST_INC_2870 2871 #define CTEST_INC_2871 2872 #define CTEST_INC_2872 2873 #define CTEST_INC_2873 2874 #define CTEST_INC_2874 2875 #define CTEST_INC_2875 2876 #define CTEST_INC_2876 2877 #define CTEST_INC_2877 2878 #define CTEST_INC_2878 2879 #define CTEST_INC_2879 2880 #define CTEST_INC_2880 2881 #define CTEST_INC_2881 2882 #define CTEST_INC_2882 2883 #define CTEST_INC_2883 2884 #define CTEST_INC_2884 2885 #define CTEST_INC_2885 2886 #define CTEST_INC_2886 2887 #define CTEST_INC_2887 2888 #define CTEST_INC_2888 2889 #define CTEST_INC_2889 2890 #define CTEST_INC_2890 2891 #define CTEST_INC_2891 2892 #define CTEST_INC_2892 2893 #define CTEST_INC_2893 2894 #define CTEST_INC_2894 2895 #define CTEST_INC_2895 2896 #define CTEST_INC_2896 2897 #define CTEST_INC_2897 2898 #define CTEST_INC_2898 2899 #define CTEST_INC_2899 2900 #define CTEST_INC_2900 2901 #define CTEST_INC_2901 2902 #define CTEST_INC_2902 2903 #define CTEST_INC_2903 2904 #define CTEST_INC_2904 2905 #define CTEST_INC_2905 2906 #define CTEST_INC_2906 2907 #define CTEST_INC_2907 2908 #define CTEST_INC_2908 2909 #define CTEST_INC_2909 2910 #define CTEST_INC_2910 2911 #define CTEST_INC_2911 2912 #define CTEST_INC_2912 2913 #define CTEST_INC_2913 2914 #define CTEST_INC_2914 2915 #define CTEST_INC_2915 2916 #define CTEST_INC_2916 2917 #define CTEST_INC_2917 2918 #define CTEST_INC_2918 2919 #define CTEST_INC_2919 2920 #define CTEST_INC_2920 2921 #define CTEST_INC_2921 2922 #define CTEST_INC_2922 2923 #define CTEST_INC_2923 2924 #define CTEST_INC_2924 2925 #define CTEST_INC_2925 2926 #define CTEST_INC_2926 2927 #define CTEST_INC_2927 2928 #define CTEST_INC_2928 2929 #define CTEST_INC_2929 2930 #define CTEST_INC_2930 2931 #define CTEST_INC_2931 2932 #define CTEST_INC_2932 2933 #define CTEST_INC_2933 2934 #define CTEST_INC_2934 2935 #define CTEST_INC_2935 2936 #define CTEST_INC_2936 2937 #define CTEST_INC_2937 2938 #define CTEST_INC_2938 2939 #define CTEST_INC_2939 2940 #define CTEST_INC_2940 2941 #define CTEST_INC_2941 2942 #define CTEST_INC_2942 2943 #define CTEST_INC_2943 2944 #define CTEST_INC_2944 2945 #define CTEST_INC_2945 2946 #define CTEST_INC_2946 2947 #define CTEST_INC_2947 2948 #define CTEST_INC_2948 2949 #define CTEST_INC_2949 2950 #define CTEST_INC_2950 2951 #define CTEST_INC_2951 2952 #define CTEST_INC_2952 2953 #define CTEST_INC_2953 2954 #define CTEST_INC_2954 2955 #define CTEST_INC_2955 2956 #define CTEST_INC_2956 2957 #define CTEST_INC_2957 2958 #define CTEST_INC_2958 2959 #define CTEST_INC_2959 2960 #define CTEST_INC_2960 2961 #define CTEST_INC_2961 2962 #define CTEST_INC_2962 2963 #define CTEST_INC_2963 2964 #define CTEST_INC_2964 2965 #define CTEST_INC_2965 2966 #define CTEST_INC_2966 2967 #define CTEST_INC_2967 2968 #define CTEST_INC_2968 2969 #define CTEST_INC_2969 2970 #define CTEST_INC_2970 2971 #define CTEST_INC_2971 2972 #define CTEST_INC_2972 2973 #define CTEST_INC_2973 2974 #define CTEST_INC_2974 2975 #define CTEST_INC_2975 2976 #define CTEST_INC_2976 2977 #define CTEST_INC_2977 2978 #define CTEST_INC_2978 2979 #define CTEST_INC_2979 2980 #define CTEST_INC_2980 2981 #define CTEST_INC_2981 2982 #define CTEST_INC_2982 2983 #define CTEST_INC_2983 2984 #define CTEST_INC_2984 2985 #define CTEST_INC_2985 2986 #define CTEST_INC_2986 2987 #define CTEST_INC_2987 2988 #define CTEST_INC_2988 2989 #define CTEST_INC_2989 2990 #define CTEST_INC_2990 2991 #define CTEST_INC_2991 2992 #define CTEST_INC_2992 2993 #define CTEST_INC_2993 2994 #define CTEST_INC_2994 2995 #define CTEST_INC_2995 2996 #define CTEST_INC_2996 2997 #define CTEST_INC_2997 2998 #define CTEST_INC_2998 2999 #define CTEST_INC_2999 3000 #define CTEST_INC_3000 3001 #define CTEST_INC_3001 3002 #define CTEST_INC_3002 3003 #define CTEST_INC_3003 3004 #define CTEST_INC_3004 3005 #define CTEST_INC_3005 3006 #define CTEST_INC_3006 3007 #define CTEST_INC_3007 3008 #define CTEST_INC_3008 3009 #define CTEST_INC_3009 3010 #define CTEST_INC_3010 3011 #define CTEST_INC_3011 3012 #define CTEST_INC_3012 3013 #define CTEST_INC_3013 3014 #define CTEST_INC_3014 3015 #define CTEST_INC_3015 3016 #define CTEST_INC_3016 3017 #define CTEST_INC_3017 3018 #define CTEST_INC_3018 3019 #define CTEST_INC_3019 3020 #define CTEST_INC_3020 3021 #define CTEST_INC_3021 3022 #define CTEST_INC_3022 3023 #define CTEST_INC_3023 3024 #define CTEST_INC_3024 3025 #define CTEST_INC_3025 3026 #define CTEST_INC_3026 3027 #define CTEST_INC_3027 3028 #define CTEST_INC_3028 3029 #define CTEST_INC_3029 3030 #define CTEST_INC_3030 3031 #define CTEST_INC_3031 3032 #define CTEST_INC_3032 3033 #define CTEST_INC_3033 3034 #define CTEST_INC_3034 3035 #define CTEST_INC_3035 3036 #define CTEST_INC_3036 3037 #define CTEST_INC_3037 3038 #define CTEST_INC_3038 3039 #define CTEST_INC_3039 3040 #define CTEST_INC_3040 3041 #define CTEST_INC_3041 3042 #define CTEST_INC_3042 3043 #define CTEST_INC_3043 3044 #define CTEST_INC_3044 3045 #define CTEST_INC_3045 3046 #define CTEST_INC_3046 3047 #define CTEST_INC_3047 3048 #define CTEST_INC_3048 3049 #define CTEST_INC_3049 3050 #define CTEST_INC_3050 3051 #define CTEST_INC_3051 3052 #define CTEST_INC_3052 3053 #define CTEST_INC_3053 3054 #define CTEST_INC_3054 3055 #define CTEST_INC_3055 3056 #define CTEST_INC_3056 3057 #define CTEST_INC_3057 3058 #define CTEST_INC_3058 3059 #define CTEST_INC_3059 3060 #define CTEST_INC_3060 3061 #define CTEST_INC_3061 3062 #define CTEST_INC_3062 3063 #define CTEST_INC_3063 3064 #define CTEST_INC_3064 3065 #define CTEST_INC_3065 3066 #define CTEST_INC_3066 3067 #define CTEST_INC_3067 3068 #define CTEST_INC_3068 3069 #define CTEST_INC_3069 3070 #define CTEST_INC_3070 3071 #define CTEST_INC_3071 3072 #define CTEST_INC_3072 3073 #define CTEST_INC_3073 3074 #define CTEST_INC_3074 3075 #define CTEST_INC_3075 3076 #define CTEST_INC_3076 3077 #define CTEST_INC_3077 3078 #define CTEST_INC_3078 3079 #define CTEST_INC_3079 3080 #define CTEST_INC_3080 3081 #define CTEST_INC_3081 3082 #define CTEST_INC_3082 3083 #define CTEST_INC_3083 3084 #define CTEST_INC_3084 3085 #define CTEST_INC_3085 3086 #define CTEST_INC_3086 3087 #define CTEST_INC_3087 3088 #define CTEST_INC_3088 3089 #define CTEST_INC_3089 3090 #define CTEST_INC_3090 3091 #define CTEST_INC_3091 3092 #define CTEST_INC_3092 3093 #define CTEST_INC_3093 3094 #define CTEST_INC_3094 3095 #define CTEST_INC_3095 3096 #define CTEST_INC_3096 3097 #define CTEST_INC_3097 3098 #define CTEST_INC_3098 3099 #define CTEST_INC_3099 3100 #define CTEST_INC_3100 3101 #define CTEST_INC_3101 3102 #define CTEST_INC_3102 3103 #define CTEST_INC_3103 3104 #define CTEST_INC_3104 3105 #define CTEST_INC_3105 3106 #define CTEST_INC_3106 3107 #define CTEST_INC_3107 3108 #define CTEST_INC_3108 3109 #define CTEST_INC_3109 3110 #define CTEST_INC_3110 3111 #define CTEST_INC_3111 3112 #define CTEST_INC_3112 3113 #define CTEST_INC_3113 3114 #define CTEST_INC_3114 3115 #define CTEST_INC_3115 3116 #define CTEST_INC_3116 3117 #define CTEST_INC_3117 3118 #define CTEST_INC_3118 3119 #define CTEST_INC_3119 3120 #define CTEST_INC_3120 3121 #define CTEST_INC_3121 3122 #define CTEST_INC_3122 3123 #define CTEST_INC_3123 3124 #define CTEST_INC_3124 3125 #define CTEST_INC_3125 3126 #define CTEST_INC_3126 3127 #define CTEST_INC_3127 3128 #define CTEST_INC_3128 3129 #define CTEST_INC_3129 3130 #define CTEST_INC_3130 3131 #define CTEST_INC_3131 3132 #define CTEST_INC_3132 3133 #define CTEST_INC_3133 3134 #define CTEST_INC_3134 3135 #define CTEST_INC_3135 3136 #define CTEST_INC_3136 3137 #define CTEST_INC_3137 3138 #define CTEST_INC_3138 3139 #define CTEST_INC_3139 3140 #define CTEST_INC_3140 3141 #define CTEST_INC_3141 3142 #define CTEST_INC_3142 3143 #define CTEST_INC_3143 3144 #define CTEST_INC_3144 3145 #define CTEST_INC_3145 3146 #define CTEST_INC_3146 3147 #define CTEST_INC_3147 3148 #define CTEST_INC_3148 3149 #define CTEST_INC_3149 3150 #define CTEST_INC_3150 3151 #define CTEST_INC_3151 3152 #define CTEST_INC_3152 3153 #define CTEST_INC_3153 3154 #define CTEST_INC_3154 3155 #define CTEST_INC_3155 3156 #define CTEST_INC_3156 3157 #define CTEST_INC_3157 3158 #define CTEST_INC_3158 3159 #define CTEST_INC_3159 3160 #define CTEST_INC_3160 3161 #define CTEST_INC_3161 3162 #define CTEST_INC_3162 3163 #define CTEST_INC_3163 3164 #define CTEST_INC_3164 3165 #define CTEST_INC_3165 3166 #define CTEST_INC_3166 3167 #define CTEST_INC_3167 3168 #define CTEST_INC_3168 3169 #define CTEST_INC_3169 3170 #define CTEST_INC_3170 3171 #define CTEST_INC_3171 3172 #define CTEST_INC_3172 3173 #define CTEST_INC_3173 3174 #define CTEST_INC_3174 3175 #define CTEST_INC_3175 3176 #define CTEST_INC_3176 3177 #define CTEST_INC_3177 3178 #define CTEST_INC_3178 3179 #define CTEST_INC_3179 3180 #define CTEST_INC_3180 3181 #define CTEST_INC_3181 3182 #define CTEST_INC_3182 3183 #define CTEST_INC_3183 3184 #define CTEST_INC_3184 3185 #define CTEST_INC_3185 3186 #define CTEST_INC_3186 3187 #define CTEST_INC_3187 3188 #define CTEST_INC_3188 3189 #define CTEST_INC_3189 3190 #define CTEST_INC_3190 3191 #define CTEST_INC_3191 3192 #define CTEST_INC_3192 3193 #define CTEST_INC_3193 3194 #define CTEST_INC_3194 3195 #define CTEST_INC_3195 3196 #define CTEST_INC_3196 3197 #define CTEST_INC_3197 3198 #define CTEST_INC_3198 3199 #define CTEST_INC_3199 3200 #define CTEST_INC_3200 3201 #define CTEST_INC_3201 3202 #define CTEST_INC_3202 3203 #define CTEST_INC_3203 3204 #define CTEST_INC_3204 3205 #define CTEST_INC_3205 3206 #define CTEST_INC_3206 3207 #define CTEST_INC_3207 3208 #define CTEST_INC_3208 3209 #define CTEST_INC_3209 3210 #define CTEST_INC_3210 3211 #define CTEST_INC_3211 3212 #define CTEST_INC_3212 3213 #define CTEST_INC_3213 3214 #define CTEST_INC_3214 3215 #define CTEST_INC_3215 3216 #define CTEST_INC_3216 3217 #define CTEST_INC_3217 3218 #define CTEST_INC_3218 3219 #define CTEST_INC_3219 3220 #define CTEST_INC_3220 3221 #define CTEST_INC_3221 3222 #define CTEST_INC_3222 3223 #define CTEST_INC_3223 3224 #define CTEST_INC_3224 3225 #define CTEST_INC_3225 3226 #define CTEST_INC_3226 3227 #define CTEST_INC_3227 3228 #define CTEST_INC_3228 3229 #define CTEST_INC_3229 3230 #define CTEST_INC_3230 3231 #define CTEST_INC_3231 3232 #define CTEST_INC_3232 3233 #define CTEST_INC_3233 3234 #define CTEST_INC_3234 3235 #define CTEST_INC_3235 3236 #define CTEST_INC_3236 3237 #define CTEST_INC_3237 3238 #define CTEST_INC_3238 3239 #define CTEST_INC_3239 3240 #define CTEST_INC_3240 3241 #define CTEST_INC_3241 3242 #define CTEST_INC_3242 3243 #define CTEST_INC_3243 3244 #define CTEST_INC_3244 3245 #define CTEST_INC_3245 3246 #define CTEST_INC_3246 3247 #define CTEST_INC_3247 3248 #define CTEST_INC_3248 3249 #define CTEST_INC_3249 3250 #define CTEST_INC_3250 3251 #define CTEST_INC_3251 3252 #define CTEST_INC_3252 3253 #define CTEST_INC_3253 3254 #define CTEST_INC_3254 3255 #define CTEST_INC_3255 3256 #define CTEST_INC_3256 3257 #define CTEST_INC_3257 3258 #define CTEST_INC_3258 3259 #define CTEST_INC_3259 3260 #define CTEST_INC_3260 3261 #define CTEST_INC_3261 3262 #define CTEST_INC_3262 3263 #define CTEST_INC_3263 3264 #define CTEST_INC_3264 3265 #define CTEST_INC_3265 3266 #define CTEST_INC_3266 3267 #define CTEST_INC_3267 3268 #define CTEST_INC_3268 3269 #define CTEST_INC_3269 3270 #define CTEST_INC_3270 3271 #define CTEST_INC_3271 3272 #define CTEST_INC_3272 3273 #define CTEST_INC_3273 3274 #define CTEST_INC_3274 3275 #define CTEST_INC_3275 3276 #define CTEST_INC_3276 3277 #define CTEST_INC_3277 3278 #define CTEST_INC_3278 3279 #define CTEST_INC_3279 3280 #define CTEST_INC_3280 3281 #define CTEST_INC_3281 3282 #define CTEST_INC_3282 3283 #define CTEST_INC_3283 3284 #define CTEST_INC_3284 3285 #define CTEST_INC_3285 3286 #define CTEST_INC_3286 3287 #define CTEST_INC_3287 3288 #define CTEST_INC_3288 3289 #define CTEST_INC_3289 3290 #define CTEST_INC_3290 3291 #define CTEST_INC_3291 3292 #define CTEST_INC_3292 3293 #define CTEST_INC_3293 3294 #define CTEST_INC_3294 3295 #define CTEST_INC_3295 3296 #define CTEST_INC_3296 3297 #define CTEST_INC_3297 3298 #define CTEST_INC_3298 3299 #define CTEST_INC_3299 3300 #define CTEST_INC_3300 3301 #define CTEST_INC_3301 3302 #define CTEST_INC_3302 3303 #define CTEST_INC_3303 3304 #define CTEST_INC_3304 3305 #define CTEST_INC_3305 3306 #define CTEST_INC_3306 3307 #define CTEST_INC_3307 3308 #define CTEST_INC_3308 3309 #define CTEST_INC_3309 3310 #define CTEST_INC_3310 3311 #define CTEST_INC_3311 3312 #define CTEST_INC_3312 3313 #define CTEST_INC_3313 3314 #define CTEST_INC_3314 3315 #define CTEST_INC_3315 3316 #define CTEST_INC_3316 3317 #define CTEST_INC_3317 3318 #define CTEST_INC_3318 3319 #define CTEST_INC_3319 3320 #define CTEST_INC_3320 3321 #define CTEST_INC_3321 3322 #define CTEST_INC_3322 3323 #define CTEST_INC_3323 3324 #define CTEST_INC_3324 3325 #define CTEST_INC_3325 3326 #define CTEST_INC_3326 3327 #define CTEST_INC_3327 3328 #define CTEST_INC_3328 3329 #define CTEST_INC_3329 3330 #define CTEST_INC_3330 3331 #define CTEST_INC_3331 3332 #define CTEST_INC_3332 3333 #define CTEST_INC_3333 3334 #define CTEST_INC_3334 3335 #define CTEST_INC_3335 3336 #define CTEST_INC_3336 3337 #define CTEST_INC_3337 3338 #define CTEST_INC_3338 3339 #define CTEST_INC_3339 3340 #define CTEST_INC_3340 3341 #define CTEST_INC_3341 3342 #define CTEST_INC_3342 3343 #define CTEST_INC_3343 3344 #define CTEST_INC_3344 3345 #define CTEST_INC_3345 3346 #define CTEST_INC_3346 3347 #define CTEST_INC_3347 3348 #define CTEST_INC_3348 3349 #define CTEST_INC_3349 3350 #define CTEST_INC_3350 3351 #define CTEST_INC_3351 3352 #define CTEST_INC_3352 3353 #define CTEST_INC_3353 3354 #define CTEST_INC_3354 3355 #define CTEST_INC_3355 3356 #define CTEST_INC_3356 3357 #define CTEST_INC_3357 3358 #define CTEST_INC_3358 3359 #define CTEST_INC_3359 3360 #define CTEST_INC_3360 3361 #define CTEST_INC_3361 3362 #define CTEST_INC_3362 3363 #define CTEST_INC_3363 3364 #define CTEST_INC_3364 3365 #define CTEST_INC_3365 3366 #define CTEST_INC_3366 3367 #define CTEST_INC_3367 3368 #define CTEST_INC_3368 3369 #define CTEST_INC_3369 3370 #define CTEST_INC_3370 3371 #define CTEST_INC_3371 3372 #define CTEST_INC_3372 3373 #define CTEST_INC_3373 3374 #define CTEST_INC_3374 3375 #define CTEST_INC_3375 3376 #define CTEST_INC_3376 3377 #define CTEST_INC_3377 3378 #define CTEST_INC_3378 3379 #define CTEST_INC_3379 3380 #define CTEST_INC_3380 3381 #define CTEST_INC_3381 3382 #define CTEST_INC_3382 3383 #define CTEST_INC_3383 3384 #define CTEST_INC_3384 3385 #define CTEST_INC_3385 3386 #define CTEST_INC_3386 3387 #define CTEST_INC_3387 3388 #define CTEST_INC_3388 3389 #define CTEST_INC_3389 3390 #define CTEST_INC_3390 3391 #define CTEST_INC_3391 3392 #define CTEST_INC_3392 3393 #define CTEST_INC_3393 3394 #define CTEST_INC_3394 3395 #define CTEST_INC_3395 3396 #define CTEST_INC_3396 3397 #define CTEST_INC_3397 3398 #define CTEST_INC_3398 3399 #define CTEST_INC_3399 3400 #define CTEST_INC_3400 3401 #define CTEST_INC_3401 3402 #define CTEST_INC_3402 3403 #define CTEST_INC_3403 3404 #define CTEST_INC_3404 3405 #define CTEST_INC_3405 3406 #define CTEST_INC_3406 3407 #define CTEST_INC_3407 3408 #define CTEST_INC_3408 3409 #define CTEST_INC_3409 3410 #define CTEST_INC_3410 3411 #define CTEST_INC_3411 3412 #define CTEST_INC_3412 3413 #define CTEST_INC_3413 3414 #define CTEST_INC_3414 3415 #define CTEST_INC_3415 3416 #define CTEST_INC_3416 3417 #define CTEST_INC_3417 3418 #define CTEST_INC_3418 3419 #define CTEST_INC_3419 3420 #define CTEST_INC_3420 3421 #define CTEST_INC_3421 3422 #define CTEST_INC_3422 3423 #define CTEST_INC_3423 3424 #define CTEST_INC_3424 3425 #define CTEST_INC_3425 3426 #define CTEST_INC_3426 3427 #define CTEST_INC_3427 3428 #define CTEST_INC_3428 3429 #define CTEST_INC_3429 3430 #define CTEST_INC_3430 3431 #define CTEST_INC_3431 3432 #define CTEST_INC_3432 3433 #define CTEST_INC_3433 3434 #define CTEST_INC_3434 3435 #define CTEST_INC_3435 3436 #define CTEST_INC_3436 3437 #define CTEST_INC_3437 3438 #define CTEST_INC_3438 3439 #define CTEST_INC_3439 3440 #define CTEST_INC_3440 3441 #define CTEST_INC_3441 3442 #define CTEST_INC_3442 3443 #define CTEST_INC_3443 3444 #define CTEST_INC_3444 3445 #define CTEST_INC_3445 3446 #define CTEST_INC_3446 3447 #define CTEST_INC_3447 3448 #define CTEST_INC_3448 3449 #define CTEST_INC_3449 3450 #define CTEST_INC_3450 3451 #define CTEST_INC_3451 3452 #define CTEST_INC_3452 3453 #define CTEST_INC_3453 3454 #define CTEST_INC_3454 3455 #define CTEST_INC_3455 3456 #define CTEST_INC_3456 3457 #define CTEST_INC_3457 3458 #define CTEST_INC_3458 3459 #define CTEST_INC_3459 3460 #define CTEST_INC_3460 3461 #define CTEST_INC_3461 3462 #define CTEST_INC_3462 3463 #define CTEST_INC_3463 3464 #define CTEST_INC_3464 3465 #define CTEST_INC_3465 3466 #define CTEST_INC_3466 3467 #define CTEST_INC_3467 3468 #define CTEST_INC_3468 3469 #define CTEST_INC_3469 3470 #define CTEST_INC_3470 3471 #define CTEST_INC_3471 3472 #define CTEST_INC_3472 3473 #define CTEST_INC_3473 3474 #define CTEST_INC_3474 3475 #define CTEST_INC_3475 3476 #define CTEST_INC_3476 3477 #define CTEST_INC_3477 3478 #define CTEST_INC_3478 3479 #define CTEST_INC_3479 3480 #define CTEST_INC_3480 3481 #define CTEST_INC_3481 3482 #define CTEST_INC_3482 3483 #define CTEST_INC_3483 3484 #define CTEST_INC_3484 3485 #define CTEST_INC_3485 3486 #define CTEST_INC_3486 3487 #define CTEST_INC_3487 3488 #define CTEST_INC_3488 3489 #define CTEST_INC_3489 3490 #define CTEST_INC_3490 3491 #define CTEST_INC_3491 3492 #define CTEST_INC_3492 3493 #define CTEST_INC_3493 3494 #define CTEST_INC_3494 3495 #define CTEST_INC_3495 3496 #define CTEST_INC_3496 3497 #define CTEST_INC_3497 3498 #define CTEST_INC_3498 3499 #define CTEST_INC_3499 3500 #define CTEST_INC_3500 3501 #define CTEST_INC_3501 3502 #define CTEST_INC_3502 3503 #define CTEST_INC_3503 3504 #define CTEST_INC_3504 3505 #define CTEST_INC_3505 3506 #define CTEST_INC_3506 3507 #define CTEST_INC_3507 3508 #define CTEST_INC_3508 3509 #define CTEST_INC_3509 3510 #define CTEST_INC_3510 3511 #define CTEST_INC_3511 3512 #define CTEST_INC_3512 3513 #define CTEST_INC_3513 3514 #define CTEST_INC_3514 3515 #define CTEST_INC_3515 3516 #define CTEST_INC_3516 3517 #define CTEST_INC_3517 3518 #define CTEST_INC_3518 3519 #define CTEST_INC_3519 3520 #define CTEST_INC_3520 3521 #define CTEST_INC_3521 3522 #define CTEST_INC_3522 3523 #define CTEST_INC_3523 3524 #define CTEST_INC_3524 3525 #define CTEST_INC_3525 3526 #define CTEST_INC_3526 3527 #define CTEST_INC_3527 3528 #define CTEST_INC_3528 3529 #define CTEST_INC_3529 3530 #define CTEST_INC_3530 3531 #define CTEST_INC_3531 3532 #define CTEST_INC_3532 3533 #define CTEST_INC_3533 3534 #define CTEST_INC_3534 3535 #define CTEST_INC_3535 3536 #define CTEST_INC_3536 3537 #define CTEST_INC_3537 3538 #define CTEST_INC_3538 3539 #define CTEST_INC_3539 3540 #define CTEST_INC_3540 3541 #define CTEST_INC_3541 3542 #define CTEST_INC_3542 3543 #define CTEST_INC_3543 3544 #define CTEST_INC_3544 3545 #define CTEST_INC_3545 3546 #define CTEST_INC_3546 3547 #define CTEST_INC_3547 3548 #define CTEST_INC_3548 3549 #define CTEST_INC_3549 3550 #define CTEST_INC_3550 3551 #define CTEST_INC_3551 3552 #define CTEST_INC_3552 3553 #define CTEST_INC_3553 3554 #define CTEST_INC_3554 3555 #define CTEST_INC_3555 3556 #define CTEST_INC_3556 3557 #define CTEST_INC_3557 3558 #define CTEST_INC_3558 3559 #define CTEST_INC_3559 3560 #define CTEST_INC_3560 3561 #define CTEST_INC_3561 3562 #define CTEST_INC_3562 3563 #define CTEST_INC_3563 3564 #define CTEST_INC_3564 3565 #define CTEST_INC_3565 3566 #define CTEST_INC_3566 3567 #define CTEST_INC_3567 3568 #define CTEST_INC_3568 3569 #define CTEST_INC_3569 3570 #define CTEST_INC_3570 3571 #define CTEST_INC_3571 3572 #define CTEST_INC_3572 3573 #define CTEST_INC_3573 3574 #define CTEST_INC_3574 3575 #define CTEST_INC_3575 3576 #define CTEST_INC_3576 3577 #define CTEST_INC_3577 3578 #define CTEST_INC_3578 3579 #define CTEST_INC_3579 3580 #define CTEST_INC_3580 3581 #define CTEST_INC_3581 3582 #define CTEST_INC_3582 3583 #define CTEST_INC_3583 3584 #define CTEST_INC_3584 3585 #define CTEST_INC_3585 3586 #define CTEST_INC_3586 3587 #define CTEST_INC_3587 3588 #define CTEST_INC_3588 3589 #define CTEST_INC_3589 3590 #define CTEST_INC_3590 3591 #define CTEST_INC_3591 3592 #define CTEST_INC_3592 3593 #define CTEST_INC_3593 3594 #define CTEST_INC_3594 3595 #define CTEST_INC_3595 3596 #define CTEST_INC_3596 3597 #define CTEST_INC_3597 3598 #define CTEST_INC_3598 3599 #define CTEST_INC_3599 3600 #define CTEST_INC_3600 3601 #define CTEST_INC_3601 3602 #define CTEST_INC_3602 3603 #define CTEST_INC_3603 3604 #define CTEST_INC_3604 3605 #define CTEST_INC_3605 3606 #define CTEST_INC_3606 3607 #define CTEST_INC_3607 3608 #define CTEST_INC_3608 3609 #define CTEST_INC_3609 3610 #define CTEST_INC_3610 3611 #define CTEST_INC_3611 3612 #define CTEST_INC_3612 3613 #define CTEST_INC_3613 3614 #define CTEST_INC_3614 3615 #define CTEST_INC_3615 3616 #define CTEST_INC_3616 3617 #define CTEST_INC_3617 3618 #define CTEST_INC_3618 3619 #define CTEST_INC_3619 3620 #define CTEST_INC_3620 3621 #define CTEST_INC_3621 3622 #define CTEST_INC_3622 3623 #define CTEST_INC_3623 3624 #define CTEST_INC_3624 3625 #define CTEST_INC_3625 3626 #define CTEST_INC_3626 3627 #define CTEST_INC_3627 3628 #define CTEST_INC_3628 3629 #define CTEST_INC_3629 3630 #define CTEST_INC_3630 3631 #define CTEST_INC_3631 3632 #define CTEST_INC_3632 3633 #define CTEST_INC_3633 3634 #define CTEST_INC_3634 3635 #define CTEST_INC_3635 3636 #define CTEST_INC_3636 3637 #define CTEST_INC_3637 3638 #define CTEST_INC_3638 3639 #define CTEST_INC_3639 3640 #define CTEST_INC_3640 3641 #define CTEST_INC_3641 3642 #define CTEST_INC_3642 3643 #define CTEST_INC_3643 3644 #define CTEST_INC_3644 3645 #define CTEST_INC_3645 3646 #define CTEST_INC_3646 3647 #define CTEST_INC_3647 3648 #define CTEST_INC_3648 3649 #define CTEST_INC_3649 3650 #define CTEST_INC_3650 3651 #define CTEST_INC_3651 3652 #define CTEST_INC_3652 3653 #define CTEST_INC_3653 3654 #define CTEST_INC_3654 3655 #define CTEST_INC_3655 3656 #define CTEST_INC_3656 3657 #define CTEST_INC_3657 3658 #define CTEST_INC_3658 3659 #define CTEST_INC_3659 3660 #define CTEST_INC_3660 3661 #define CTEST_INC_3661 3662 #define CTEST_INC_3662 3663 #define CTEST_INC_3663 3664 #define CTEST_INC_3664 3665 #define CTEST_INC_3665 3666 #define CTEST_INC_3666 3667 #define CTEST_INC_3667 3668 #define CTEST_INC_3668 3669 #define CTEST_INC_3669 3670 #define CTEST_INC_3670 3671 #define CTEST_INC_3671 3672 #define CTEST_INC_3672 3673 #define CTEST_INC_3673 3674 #define CTEST_INC_3674 3675 #define CTEST_INC_3675 3676 #define CTEST_INC_3676 3677 #define CTEST_INC_3677 3678 #define CTEST_INC_3678 3679 #define CTEST_INC_3679 3680 #define CTEST_INC_3680 3681 #define CTEST_INC_3681 3682 #define CTEST_INC_3682 3683 #define CTEST_INC_3683 3684 #define CTEST_INC_3684 3685 #define CTEST_INC_3685 3686 #define CTEST_INC_3686 3687 #define CTEST_INC_3687 3688 #define CTEST_INC_3688 3689 #define CTEST_INC_3689 3690 #define CTEST_INC_3690 3691 #define CTEST_INC_3691 3692 #define CTEST_INC_3692 3693 #define CTEST_INC_3693 3694 #define CTEST_INC_3694 3695 #define CTEST_INC_3695 3696 #define CTEST_INC_3696 3697 #define CTEST_INC_3697 3698 #define CTEST_INC_3698 3699 #define CTEST_INC_3699 3700 #define CTEST_INC_3700 3701 #define CTEST_INC_3701 3702 #define CTEST_INC_3702 3703 #define CTEST_INC_3703 3704 #define CTEST_INC_3704 3705 #define CTEST_INC_3705 3706 #define CTEST_INC_3706 3707 #define CTEST_INC_3707 3708 #define CTEST_INC_3708 3709 #define CTEST_INC_3709 3710 #define CTEST_INC_3710 3711 #define CTEST_INC_3711 3712 #define CTEST_INC_3712 3713 #define CTEST_INC_3713 3714 #define CTEST_INC_3714 3715 #define CTEST_INC_3715 3716 #define CTEST_INC_3716 3717 #define CTEST_INC_3717 3718 #define CTEST_INC_3718 3719 #define CTEST_INC_3719 3720 #define CTEST_INC_3720 3721 #define CTEST_INC_3721 3722 #define CTEST_INC_3722 3723 #define CTEST_INC_3723 3724 #define CTEST_INC_3724 3725 #define CTEST_INC_3725 3726 #define CTEST_INC_3726 3727 #define CTEST_INC_3727 3728 #define CTEST_INC_3728 3729 #define CTEST_INC_3729 3730 #define CTEST_INC_3730 3731 #define CTEST_INC_3731 3732 #define CTEST_INC_3732 3733 #define CTEST_INC_3733 3734 #define CTEST_INC_3734 3735 #define CTEST_INC_3735 3736 #define CTEST_INC_3736 3737 #define CTEST_INC_3737 3738 #define CTEST_INC_3738 3739 #define CTEST_INC_3739 3740 #define CTEST_INC_3740 3741 #define CTEST_INC_3741 3742 #define CTEST_INC_3742 3743 #define CTEST_INC_3743 3744 #define CTEST_INC_3744 3745 #define CTEST_INC_3745 3746 #define CTEST_INC_3746 3747 #define CTEST_INC_3747 3748 #define CTEST_INC_3748 3749 #define CTEST_INC_3749 3750 #define CTEST_INC_3750 3751 #define CTEST_INC_3751 3752 #define CTEST_INC_3752 3753 #define CTEST_INC_3753 3754 #define CTEST_INC_3754 3755 #define CTEST_INC_3755 3756 #define CTEST_INC_3756 3757 #define CTEST_INC_3757 3758 #define CTEST_INC_3758 3759 #define CTEST_INC_3759 3760 #define CTEST_INC_3760 3761 #define CTEST_INC_3761 3762 #define CTEST_INC_3762 3763 #define CTEST_INC_3763 3764 #define CTEST_INC_3764 3765 #define CTEST_INC_3765 3766 #define CTEST_INC_3766 3767 #define CTEST_INC_3767 3768 #define CTEST_INC_3768 3769 #define CTEST_INC_3769 3770 #define CTEST_INC_3770 3771 #define CTEST_INC_3771 3772 #define CTEST_INC_3772 3773 #define CTEST_INC_3773 3774 #define CTEST_INC_3774 3775 #define CTEST_INC_3775 3776 #define CTEST_INC_3776 3777 #define CTEST_INC_3777 3778 #define CTEST_INC_3778 3779 #define CTEST_INC_3779 3780 #define CTEST_INC_3780 3781 #define CTEST_INC_3781 3782 #define CTEST_INC_3782 3783 #define CTEST_INC_3783 3784 #define CTEST_INC_3784 3785 #define CTEST_INC_3785 3786 #define CTEST_INC_3786 3787 #define CTEST_INC_3787 3788 #define CTEST_INC_3788 3789 #define CTEST_INC_3789 3790 #define CTEST_INC_3790 3791 #define CTEST_INC_3791 3792 #define CTEST_INC_3792 3793 #define CTEST_INC_3793 3794 #define CTEST_INC_3794 3795 #define CTEST_INC_3795 3796 #define CTEST_INC_3796 3797 #define CTEST_INC_3797 3798 #define CTEST_INC_3798 3799 #define CTEST_INC_3799 3800 #define CTEST_INC_3800 3801 #define CTEST_INC_3801 3802 #define CTEST_INC_3802 3803 #define CTEST_INC_3803 3804 #define CTEST_INC_3804 3805 #define CTEST_INC_3805 3806 #define CTEST_INC_3806 3807 #define CTEST_INC_3807 3808 #define CTEST_INC_3808 3809 #define CTEST_INC_3809 3810 #define CTEST_INC_3810 3811 #define CTEST_INC_3811 3812 #define CTEST_INC_3812 3813 #define CTEST_INC_3813 3814 #define CTEST_INC_3814 3815 #define CTEST_INC_3815 3816 #define CTEST_INC_3816 3817 #define CTEST_INC_3817 3818 #define CTEST_INC_3818 3819 #define CTEST_INC_3819 3820 #define CTEST_INC_3820 3821 #define CTEST_INC_3821 3822 #define CTEST_INC_3822 3823 #define CTEST_INC_3823 3824 #define CTEST_INC_3824 3825 #define CTEST_INC_3825 3826 #define CTEST_INC_3826 3827 #define CTEST_INC_3827 3828 #define CTEST_INC_3828 3829 #define CTEST_INC_3829 3830 #define CTEST_INC_3830 3831 #define CTEST_INC_3831 3832 #define CTEST_INC_3832 3833 #define CTEST_INC_3833 3834 #define CTEST_INC_3834 3835 #define CTEST_INC_3835 3836 #define CTEST_INC_3836 3837 #define CTEST_INC_3837 3838 #define CTEST_INC_3838 3839 #define CTEST_INC_3839 3840 #define CTEST_INC_3840 3841 #define CTEST_INC_3841 3842 #define CTEST_INC_3842 3843 #define CTEST_INC_3843 3844 #define CTEST_INC_3844 3845 #define CTEST_INC_3845 3846 #define CTEST_INC_3846 3847 #define CTEST_INC_3847 3848 #define CTEST_INC_3848 3849 #define CTEST_INC_3849 3850 #define CTEST_INC_3850 3851 #define CTEST_INC_3851 3852 #define CTEST_INC_3852 3853 #define CTEST_INC_3853 3854 #define CTEST_INC_3854 3855 #define CTEST_INC_3855 3856 #define CTEST_INC_3856 3857 #define CTEST_INC_3857 3858 #define CTEST_INC_3858 3859 #define CTEST_INC_3859 3860 #define CTEST_INC_3860 3861 #define CTEST_INC_3861 3862 #define CTEST_INC_3862 3863 #define CTEST_INC_3863 3864 #define CTEST_INC_3864 3865 #define CTEST_INC_3865 3866 #define CTEST_INC_3866 3867 #define CTEST_INC_3867 3868 #define CTEST_INC_3868 3869 #define CTEST_INC_3869 3870 #define CTEST_INC_3870 3871 #define CTEST_INC_3871 3872 #define CTEST_INC_3872 3873 #define CTEST_INC_3873 3874 #define CTEST_INC_3874 3875 #define CTEST_INC_3875 3876 #define CTEST_INC_3876 3877 #define CTEST_INC_3877 3878 #define CTEST_INC_3878 3879 #define CTEST_INC_3879 3880 #define CTEST_INC_3880 3881 #define CTEST_INC_3881 3882 #define CTEST_INC_3882 3883 #define CTEST_INC_3883 3884 #define CTEST_INC_3884 3885 #define CTEST_INC_3885 3886 #define CTEST_INC_3886 3887 #define CTEST_INC_3887 3888 #define CTEST_INC_3888 3889 #define CTEST_INC_3889 3890 #define CTEST_INC_3890 3891 #define CTEST_INC_3891 3892 #define CTEST_INC_3892 3893 #define CTEST_INC_3893 3894 #define CTEST_INC_3894 3895 #define CTEST_INC_3895 3896 #define CTEST_INC_3896 3897 #define CTEST_INC_3897 3898 #define CTEST_INC_3898 3899 #define CTEST_INC_3899 3900 #define CTEST_INC_3900 3901 #define CTEST_INC_3901 3902 #define CTEST_INC_3902 3903 #define CTEST_INC_3903 3904 #define CTEST_INC_3904 3905 #define CTEST_INC_3905 3906 #define CTEST_INC_3906 3907 #define CTEST_INC_3907 3908 #define CTEST_INC_3908 3909 #define CTEST_INC_3909 3910 #define CTEST_INC_3910 3911 #define CTEST_INC_3911 3912 #define CTEST_INC_3912 3913 #define CTEST_INC_3913 3914 #define CTEST_INC_3914 3915 #define CTEST_INC_3915 3916 #define CTEST_INC_3916 3917 #define CTEST_INC_3917 3918 #define CTEST_INC_3918 3919 #define CTEST_INC_3919 3920 #define CTEST_INC_3920 3921 #define CTEST_INC_3921 3922 #define CTEST_INC_3922 3923 #define CTEST_INC_3923 3924 #define CTEST_INC_3924 3925 #define CTEST_INC_3925 3926 #define CTEST_INC_3926 3927 #define CTEST_INC_3927 3928 #define CTEST_INC_3928 3929 #define CTEST_INC_3929 3930 #define CTEST_INC_3930 3931 #define CTEST_INC_3931 3932 #define CTEST_INC_3932 3933 #define CTEST_INC_3933 3934 #define CTEST_INC_3934 3935 #define CTEST_INC_3935 3936 #define CTEST_INC_3936 3937 #define CTEST_INC_3937 3938 #define CTEST_INC_3938 3939 #define CTEST_INC_3939 3940 #define CTEST_INC_3940 3941 #define CTEST_INC_3941 3942 #define CTEST_INC_3942 3943 #define CTEST_INC_3943 3944 #define CTEST_INC_3944 3945 #define CTEST_INC_3945 3946 #define CTEST_INC_3946 3947 #define CTEST_INC_3947 3948 #define CTEST_INC_3948 3949 #define CTEST_INC_3949 3950 #define CTEST_INC_3950 3951 #define CTEST_INC_3951 3952 #define CTEST_INC_3952 3953 #define CTEST_INC_3953 3954 #define CTEST_INC_3954 3955 #define CTEST_INC_3955 3956 #define CTEST_INC_3956 3957 #define CTEST_INC_3957 3958 #define CTEST_INC_3958 3959 #define CTEST_INC_3959 3960 #define CTEST_INC_3960 3961 #define CTEST_INC_3961 3962 #define CTEST_INC_3962 3963 #define CTEST_INC_3963 3964 #define CTEST_INC_3964 3965 #define CTEST_INC_3965 3966 #define CTEST_INC_3966 3967 #define CTEST_INC_3967 3968 #define CTEST_INC_3968 3969 #define CTEST_INC_3969 3970 #define CTEST_INC_3970 3971 #define CTEST_INC_3971 3972 #define CTEST_INC_3972 3973 #define CTEST_INC_3973 3974 #define CTEST_INC_3974 3975 #define CTEST_INC_3975 3976 #define CTEST_INC_3976 3977 #define CTEST_INC_3977 3978 #define CTEST_INC_3978 3979 #define CTEST_INC_3979 3980 #define CTEST_INC_3980 3981 #define CTEST_INC_3981 3982 #define CTEST_INC_3982 3983 #define CTEST_INC_3983 3984 #define CTEST_INC_3984 3985 #define CTEST_INC_3985 3986 #define CTEST_INC_3986 3987 #define CTEST_INC_3987 3988 #define CTEST_INC_3988 3989 #define CTEST_INC_3989 3990 #define CTEST_INC_3990 3991 #define CTEST_INC_3991 3992 #define CTEST_INC_3992 3993 #define CTEST_INC_3993 3994 #define CTEST_INC_3994 3995 #define CTEST_INC_3995 3996 #define CTEST_INC_3996 3997 #define CTEST_INC_3997 3998 #define CTEST_INC_3998 3999 #define CTEST_INC_3999 4000 #define CTEST_INC_4000 4001 #define CTEST_INC_4001 4002 #define CTEST_INC_4002 4003 #define CTEST_INC_4003 4004 #define CTEST_INC_4004 4005 #define CTEST_INC_4005 4006 #define CTEST_INC_4006 4007 #define CTEST_INC_4007 4008 #define CTEST_INC_4008 4009 #define CTEST_INC_4009 4010 #define CTEST_INC_4010 4011 #define CTEST_INC_4011 4012 #define CTEST_INC_4012 4013 #define CTEST_INC_4013 4014 #define CTEST_INC_4014 4015 #define CTEST_INC_4015 4016 #define CTEST_INC_4016 4017 #define CTEST_INC_4017 4018 #define CTEST_INC_4018 4019 #define CTEST_INC_4019 4020 #define CTEST_INC_4020 4021 #define CTEST_INC_4021 4022 #define CTEST_INC_4022 4023 #define CTEST_INC_4023 4024 #define CTEST_INC_4024 4025 #define CTEST_INC_4025 4026 #define CTEST_INC_4026 4027 #define CTEST_INC_4027 4028 #define CTEST_INC_4028 4029 #define CTEST_INC_4029 4030 #define CTEST_INC_4030 4031 #define CTEST_INC_4031 4032 #define CTEST_INC_4032 4033 #define CTEST_INC_4033 4034 #define CTEST_INC_4034 4035 #define CTEST_INC_4035 4036 #define CTEST_INC_4036 4037 #define CTEST_INC_4037 4038 #define CTEST_INC_4038 4039 #define CTEST_INC_4039 4040 #define CTEST_INC_4040 4041 #define CTEST_INC_4041 4042 #define CTEST_INC_4042 4043 #define CTEST_INC_4043 4044 #define CTEST_INC_4044 4045 #define CTEST_INC_4045 4046 #define CTEST_INC_4046 4047 #define CTEST_INC_4047 4048 #define CTEST_INC_4048 4049 #define CTEST_INC_4049 4050 #define CTEST_INC_4050 4051 #define CTEST_INC_4051 4052 #define CTEST_INC_4052 4053 #define CTEST_INC_4053 4054 #define CTEST_INC_4054 4055 #define CTEST_INC_4055 4056 #define CTEST_INC_4056 4057 #define CTEST_INC_4057 4058 #define CTEST_INC_4058 4059 #define CTEST_INC_4059 4060 #define CTEST_INC_4060 4061 #define CTEST_INC_4061 4062 #define CTEST_INC_4062 4063 #define CTEST_INC_4063 4064 #define CTEST_INC_4064 4065 #define CTEST_INC_4065 4066 #define CTEST_INC_4066 4067 #define CTEST_INC_4067 4068 #define CTEST_INC_4068 4069 #define CTEST_INC_4069 4070 #define CTEST_INC_4070 4071 #define CTEST_INC_4071 4072 #define CTEST_INC_4072 4073 #define CTEST_INC_4073 4074 #define CTEST_INC_4074 4075 #define CTEST_INC_4075 4076 #define CTEST_INC_4076 4077 #define CTEST_INC_4077 4078 #define CTEST_INC_4078 4079 #define CTEST_INC_4079 4080 #define CTEST_INC_4080 4081 #define CTEST_INC_4081 4082 #define CTEST_INC_4082 4083 #define CTEST_INC_4083 4084 #define CTEST_INC_4084 4085 #define CTEST_INC_4085 4086 #define CTEST_INC_4086 4087 #define CTEST_INC_4087 4088 #define CTEST_INC_4088 4089 #define CTEST_INC_4089 4090 #define CTEST_INC_4090 4091 #define CTEST_INC_4091 4092 #define CTEST_INC_4092 4093 #define CTEST_INC_4093 4094 #define CTEST_INC_4094 4095 #define CTEST_INC_4095 4096 #define CTEST_INC_4096 4097 #define CTEST_INC_4097 4098 #define CTEST_INC_4098 4099 #define CTEST_INC_4099 4100 #define CTEST_INC_4100 4101 #define CTEST_INC_4101 4102 #define CTEST_INC_4102 4103 #define CTEST_INC_4103 4104 #define CTEST_INC_4104 4105 #define CTEST_INC_4105 4106 #define CTEST_INC_4106 4107 #define CTEST_INC_4107 4108 #define CTEST_INC_4108 4109 #define CTEST_INC_4109 4110 #define CTEST_INC_4110 4111 #define CTEST_INC_4111 4112 #define CTEST_INC_4112 4113 #define CTEST_INC_4113 4114 #define CTEST_INC_4114 4115 #define CTEST_INC_4115 4116 #define CTEST_INC_4116 4117 #define CTEST_INC_4117 4118 #define CTEST_INC_4118 4119 #define CTEST_INC_4119 4120 #define CTEST_INC_4120 4121 #define CTEST_INC_4121 4122 #define CTEST_INC_4122 4123 #define CTEST_INC_4123 4124 #define CTEST_INC_4124 4125 #define CTEST_INC_4125 4126 #define CTEST_INC_4126 4127 #define CTEST_INC_4127 4128 #define CTEST_INC_4128 4129 #define CTEST_INC_4129 4130 #define CTEST_INC_4130 4131 #define CTEST_INC_4131 4132 #define CTEST_INC_4132 4133 #define CTEST_INC_4133 4134 #define CTEST_INC_4134 4135 #define CTEST_INC_4135 4136 #define CTEST_INC_4136 4137 #define CTEST_INC_4137 4138 #define CTEST_INC_4138 4139 #define CTEST_INC_4139 4140 #define CTEST_INC_4140 4141 #define CTEST_INC_4141 4142 #define CTEST_INC_4142 4143 #define CTEST_INC_4143 4144 #define CTEST_INC_4144 4145 #define CTEST_INC_4145 4146 #define CTEST_INC_4146 4147 #define CTEST_INC_4147 4148 #define CTEST_INC_4148 4149 #define CTEST_INC_4149 4150 #define CTEST_INC_4150 4151 #define CTEST_INC_4151 4152 #define CTEST_INC_4152 4153 #define CTEST_INC_4153 4154 #define CTEST_INC_4154 4155 #define CTEST_INC_4155 4156 #define CTEST_INC_4156 4157 #define CTEST_INC_4157 4158 #define CTEST_INC_4158 4159 #define CTEST_INC_4159 4160 #define CTEST_INC_4160 4161 #define CTEST_INC_4161 4162 #define CTEST_INC_4162 4163 #define CTEST_INC_4163 4164 #define CTEST_INC_4164 4165 #define CTEST_INC_4165 4166 #define CTEST_INC_4166 4167 #define CTEST_INC_4167 4168 #define CTEST_INC_4168 4169 #define CTEST_INC_4169 4170 #define CTEST_INC_4170 4171 #define CTEST_INC_4171 4172 #define CTEST_INC_4172 4173 #define CTEST_INC_4173 4174 #define CTEST_INC_4174 4175 #define CTEST_INC_4175 4176 #define CTEST_INC_4176 4177 #define CTEST_INC_4177 4178 #define CTEST_INC_4178 4179 #define CTEST_INC_4179 4180 #define CTEST_INC_4180 4181 #define CTEST_INC_4181 4182 #define CTEST_INC_4182 4183 #define CTEST_INC_4183 4184 #define CTEST_INC_4184 4185 #define CTEST_INC_4185 4186 #define CTEST_INC_4186 4187 #define CTEST_INC_4187 4188 #define CTEST_INC_4188 4189 #define CTEST_INC_4189 4190 #define CTEST_INC_4190 4191 #define CTEST_INC_4191 4192 #define CTEST_INC_4192 4193 #define CTEST_INC_4193 4194 #define CTEST_INC_4194 4195 #define CTEST_INC_4195 4196 #define CTEST_INC_4196 4197 #define CTEST_INC_4197 4198 #define CTEST_INC_4198 4199 #define CTEST_INC_4199 4200 #define CTEST_INC_4200 4201 #define CTEST_INC_4201 4202 #define CTEST_INC_4202 4203 #define CTEST_INC_4203 4204 #define CTEST_INC_4204 4205 #define CTEST_INC_4205 4206 #define CTEST_INC_4206 4207 #define CTEST_INC_4207 4208 #define CTEST_INC_4208 4209 #define CTEST_INC_4209 4210 #define CTEST_INC_4210 4211 #define CTEST_INC_4211 4212 #define CTEST_INC_4212 4213 #define CTEST_INC_4213 4214 #define CTEST_INC_4214 4215 #define CTEST_INC_4215 4216 #define CTEST_INC_4216 4217 #define CTEST_INC_4217 4218 #define CTEST_INC_4218 4219 #define CTEST_INC_4219 4220 #define CTEST_INC_4220 4221 #define CTEST_INC_4221 4222 #define CTEST_INC_4222 4223 #define CTEST_INC_4223 4224 #define CTEST_INC_4224 4225 #define CTEST_INC_4225 4226 #define CTEST_INC_4226 4227 #define CTEST_INC_4227 4228 #define CTEST_INC_4228 4229 #define CTEST_INC_4229 4230 #define CTEST_INC_4230 4231 #define CTEST_INC_4231 4232 #define CTEST_INC_4232 4233 #define CTEST_INC_4233 4234 #define CTEST_INC_4234 4235 #define CTEST_INC_4235 4236 #define CTEST_INC_4236 4237 #define CTEST_INC_4237 4238 #define CTEST_INC_4238 4239 #define CTEST_INC_4239 4240 #define CTEST_INC_4240 4241 #define CTEST_INC_4241 4242 #define CTEST_INC_4242 4243 #define CTEST_INC_4243 4244 #define CTEST_INC_4244 4245 #define CTEST_INC_4245 4246 #define CTEST_INC_4246 4247 #define CTEST_INC_4247 4248 #define CTEST_INC_4248 4249 #define CTEST_INC_4249 4250 #define CTEST_INC_4250 4251 #define CTEST_INC_4251 4252 #define CTEST_INC_4252 4253 #define CTEST_INC_4253 4254 #define CTEST_INC_4254 4255 #define CTEST_INC_4255 4256 #define CTEST_INC_4256 4257 #define CTEST_INC_4257 4258 #define CTEST_INC_4258 4259 #define CTEST_INC_4259 4260 #define CTEST_INC_4260 4261 #define CTEST_INC_4261 4262 #define CTEST_INC_4262 4263 #define CTEST_INC_4263 4264 #define CTEST_INC_4264 4265 #define CTEST_INC_4265 4266 #define CTEST_INC_4266 4267 #define CTEST_INC_4267 4268 #define CTEST_INC_4268 4269 #define CTEST_INC_4269 4270 #define CTEST_INC_4270 4271 #define CTEST_INC_4271 4272 #define CTEST_INC_4272 4273 #define CTEST_INC_4273 4274 #define CTEST_INC_4274 4275 #define CTEST_INC_4275 4276 #define CTEST_INC_4276 4277 #define CTEST_INC_4277 4278 #define CTEST_INC_4278 4279 #define CTEST_INC_4279 4280 #define CTEST_INC_4280 4281 #define CTEST_INC_4281 4282 #define CTEST_INC_4282 4283 #define CTEST_INC_4283 4284 #define CTEST_INC_4284 4285 #define CTEST_INC_4285 4286 #define CTEST_INC_4286 4287 #define CTEST_INC_4287 4288 #define CTEST_INC_4288 4289 #define CTEST_INC_4289 4290 #define CTEST_INC_4290 4291 #define CTEST_INC_4291 4292 #define CTEST_INC_4292 4293 #define CTEST_INC_4293 4294 #define CTEST_INC_4294 4295 #define CTEST_INC_4295 4296 #define CTEST_INC_4296 4297 #define CTEST_INC_4297 4298 #define CTEST_INC_4298 4299 #define CTEST_INC_4299 4300 #define CTEST_INC_4300 4301 #define CTEST_INC_4301 4302 #define CTEST_INC_4302 4303 #define CTEST_INC_4303 4304 #define CTEST_INC_4304 4305 #define CTEST_INC_4305 4306 #define CTEST_INC_4306 4307 #define CTEST_INC_4307 4308 #define CTEST_INC_4308 4309 #define CTEST_INC_4309 4310 #define CTEST_INC_4310 4311 #define CTEST_INC_4311 4312 #define CTEST_INC_4312 4313 #define CTEST_INC_4313 4314 #define CTEST_INC_4314 4315 #define CTEST_INC_4315 4316 #define CTEST_INC_4316 4317 #define CTEST_INC_4317 4318 #define CTEST_INC_4318 4319 #define CTEST_INC_4319 4320 #define CTEST_INC_4320 4321 #define CTEST_INC_4321 4322 #define CTEST_INC_4322 4323 #define CTEST_INC_4323 4324 #define CTEST_INC_4324 4325 #define CTEST_INC_4325 4326 #define CTEST_INC_4326 4327 #define CTEST_INC_4327 4328 #define CTEST_INC_4328 4329 #define CTEST_INC_4329 4330 #define CTEST_INC_4330 4331 #define CTEST_INC_4331 4332 #define CTEST_INC_4332 4333 #define CTEST_INC_4333 4334 #define CTEST_INC_4334 4335 #define CTEST_INC_4335 4336 #define CTEST_INC_4336 4337 #define CTEST_INC_4337 4338 #define CTEST_INC_4338 4339 #define CTEST_INC_4339 4340 #define CTEST_INC_4340 4341 #define CTEST_INC_4341 4342 #define CTEST_INC_4342 4343 #define CTEST_INC_4343 4344 #define CTEST_INC_4344 4345 #define CTEST_INC_4345 4346 #define CTEST_INC_4346 4347 #define CTEST_INC_4347 4348 #define CTEST_INC_4348 4349 #define CTEST_INC_4349 4350 #define CTEST_INC_4350 4351 #define CTEST_INC_4351 4352 #define CTEST_INC_4352 4353 #define CTEST_INC_4353 4354 #define CTEST_INC_4354 4355 #define CTEST_INC_4355 4356 #define CTEST_INC_4356 4357 #define CTEST_INC_4357 4358 #define CTEST_INC_4358 4359 #define CTEST_INC_4359 4360 #define CTEST_INC_4360 4361 #define CTEST_INC_4361 4362 #define CTEST_INC_4362 4363 #define CTEST_INC_4363 4364 #define CTEST_INC_4364 4365 #define CTEST_INC_4365 4366 #define CTEST_INC_4366 4367 #define CTEST_INC_4367 4368 #define CTEST_INC_4368 4369 #define CTEST_INC_4369 4370 #define CTEST_INC_4370 4371 #define CTEST_INC_4371 4372 #define CTEST_INC_4372 4373 #define CTEST_INC_4373 4374 #define CTEST_INC_4374 4375 #define CTEST_INC_4375 4376 #define CTEST_INC_4376 4377 #define CTEST_INC_4377 4378 #define CTEST_INC_4378 4379 #define CTEST_INC_4379 4380 #define CTEST_INC_4380 4381 #define CTEST_INC_4381 4382 #define CTEST_INC_4382 4383 #define CTEST_INC_4383 4384 #define CTEST_INC_4384 4385 #define CTEST_INC_4385 4386 #define CTEST_INC_4386 4387 #define CTEST_INC_4387 4388 #define CTEST_INC_4388 4389 #define CTEST_INC_4389 4390 #define CTEST_INC_4390 4391 #define CTEST_INC_4391 4392 #define CTEST_INC_4392 4393 #define CTEST_INC_4393 4394 #define CTEST_INC_4394 4395 #define CTEST_INC_4395 4396 #define CTEST_INC_4396 4397 #define CTEST_INC_4397 4398 #define CTEST_INC_4398 4399 #define CTEST_INC_4399 4400 #define CTEST_INC_4400 4401 #define CTEST_INC_4401 4402 #define CTEST_INC_4402 4403 #define CTEST_INC_4403 4404 #define CTEST_INC_4404 4405 #define CTEST_INC_4405 4406 #define CTEST_INC_4406 4407 #define CTEST_INC_4407 4408 #define CTEST_INC_4408 4409 #define CTEST_INC_4409 4410 #define CTEST_INC_4410 4411 #define CTEST_INC_4411 4412 #define CTEST_INC_4412 4413 #define CTEST_INC_4413 4414 #define CTEST_INC_4414 4415 #define CTEST_INC_4415 4416 #define CTEST_INC_4416 4417 #define CTEST_INC_4417 4418 #define CTEST_INC_4418 4419 #define CTEST_INC_4419 4420 #define CTEST_INC_4420 4421 #define CTEST_INC_4421 4422 #define CTEST_INC_4422 4423 #define CTEST_INC_4423 4424 #define CTEST_INC_4424 4425 #define CTEST_INC_4425 4426 #define CTEST_INC_4426 4427 #define CTEST_INC_4427 4428 #define CTEST_INC_4428 4429 #define CTEST_INC_4429 4430 #define CTEST_INC_4430 4431 #define CTEST_INC_4431 4432 #define CTEST_INC_4432 4433 #define CTEST_INC_4433 4434 #define CTEST_INC_4434 4435 #define CTEST_INC_4435 4436 #define CTEST_INC_4436 4437 #define CTEST_INC_4437 4438 #define CTEST_INC_4438 4439 #define CTEST_INC_4439 4440 #define CTEST_INC_4440 4441 #define CTEST_INC_4441 4442 #define CTEST_INC_4442 4443 #define CTEST_INC_4443 4444 #define CTEST_INC_4444 4445 #define CTEST_INC_4445 4446 #define CTEST_INC_4446 4447 #define CTEST_INC_4447 4448 #define CTEST_INC_4448 4449 #define CTEST_INC_4449 4450 #define CTEST_INC_4450 4451 #define CTEST_INC_4451 4452 #define CTEST_INC_4452 4453 #define CTEST_INC_4453 4454 #define CTEST_INC_4454 4455 #define CTEST_INC_4455 4456 #define CTEST_INC_4456 4457 #define CTEST_INC_4457 4458 #define CTEST_INC_4458 4459 #define CTEST_INC_4459 4460 #define CTEST_INC_4460 4461 #define CTEST_INC_4461 4462 #define CTEST_INC_4462 4463 #define CTEST_INC_4463 4464 #define CTEST_INC_4464 4465 #define CTEST_INC_4465 4466 #define CTEST_INC_4466 4467 #define CTEST_INC_4467 4468 #define CTEST_INC_4468 4469 #define CTEST_INC_4469 4470 #define CTEST_INC_4470 4471 #define CTEST_INC_4471 4472 #define CTEST_INC_4472 4473 #define CTEST_INC_4473 4474 #define CTEST_INC_4474 4475 #define CTEST_INC_4475 4476 #define CTEST_INC_4476 4477 #define CTEST_INC_4477 4478 #define CTEST_INC_4478 4479 #define CTEST_INC_4479 4480 #define CTEST_INC_4480 4481 #define CTEST_INC_4481 4482 #define CTEST_INC_4482 4483 #define CTEST_INC_4483 4484 #define CTEST_INC_4484 4485 #define CTEST_INC_4485 4486 #define CTEST_INC_4486 4487 #define CTEST_INC_4487 4488 #define CTEST_INC_4488 4489 #define CTEST_INC_4489 4490 #define CTEST_INC_4490 4491 #define CTEST_INC_4491 4492 #define CTEST_INC_4492 4493 #define CTEST_INC_4493 4494 #define CTEST_INC_4494 4495 #define CTEST_INC_4495 4496 #define CTEST_INC_4496 4497 #define CTEST_INC_4497 4498 #define CTEST_INC_4498 4499 #define CTEST_INC_4499 4500 #define CTEST_INC_4500 4501 #define CTEST_INC_4501 4502 #define CTEST_INC_4502 4503 #define CTEST_INC_4503 4504 #define CTEST_INC_4504 4505 #define CTEST_INC_4505 4506 #define CTEST_INC_4506 4507 #define CTEST_INC_4507 4508 #define CTEST_INC_4508 4509 #define CTEST_INC_4509 4510 #define CTEST_INC_4510 4511 #define CTEST_INC_4511 4512 #define CTEST_INC_4512 4513 #define CTEST_INC_4513 4514 #define CTEST_INC_4514 4515 #define CTEST_INC_4515 4516 #define CTEST_INC_4516 4517 #define CTEST_INC_4517 4518 #define CTEST_INC_4518 4519 #define CTEST_INC_4519 4520 #define CTEST_INC_4520 4521 #define CTEST_INC_4521 4522 #define CTEST_INC_4522 4523 #define CTEST_INC_4523 4524 #define CTEST_INC_4524 4525 #define CTEST_INC_4525 4526 #define CTEST_INC_4526 4527 #define CTEST_INC_4527 4528 #define CTEST_INC_4528 4529 #define CTEST_INC_4529 4530 #define CTEST_INC_4530 4531 #define CTEST_INC_4531 4532 #define CTEST_INC_4532 4533 #define CTEST_INC_4533 4534 #define CTEST_INC_4534 4535 #define CTEST_INC_4535 4536 #define CTEST_INC_4536 4537 #define CTEST_INC_4537 4538 #define CTEST_INC_4538 4539 #define CTEST_INC_4539 4540 #define CTEST_INC_4540 4541 #define CTEST_INC_4541 4542 #define CTEST_INC_4542 4543 #define CTEST_INC_4543 4544 #define CTEST_INC_4544 4545 #define CTEST_INC_4545 4546 #define CTEST_INC_4546 4547 #define CTEST_INC_4547 4548 #define CTEST_INC_4548 4549 #define CTEST_INC_4549 4550 #define CTEST_INC_4550 4551 #define CTEST_INC_4551 4552 #define CTEST_INC_4552 4553 #define CTEST_INC_4553 4554 #define CTEST_INC_4554 4555 #define CTEST_INC_4555 4556 #define CTEST_INC_4556 4557 #define CTEST_INC_4557 4558 #define CTEST_INC_4558 4559 #define CTEST_INC_4559 4560 #define CTEST_INC_4560 4561 #define CTEST_INC_4561 4562 #define CTEST_INC_4562 4563 #define CTEST_INC_4563 4564 #define CTEST_INC_4564 4565 #define CTEST_INC_4565 4566 #define CTEST_INC_4566 4567 #define CTEST_INC_4567 4568 #define CTEST_INC_4568 4569 #define CTEST_INC_4569 4570 #define CTEST_INC_4570 4571 #define CTEST_INC_4571 4572 #define CTEST_INC_4572 4573 #define CTEST_INC_4573 4574 #define CTEST_INC_4574 4575 #define CTEST_INC_4575 4576 #define CTEST_INC_4576 4577 #define CTEST_INC_4577 4578 #define CTEST_INC_4578 4579 #define CTEST_INC_4579 4580 #define CTEST_INC_4580 4581 #define CTEST_INC_4581 4582 #define CTEST_INC_4582 4583 #define CTEST_INC_4583 4584 #define CTEST_INC_4584 4585 #define CTEST_INC_4585 4586 #define CTEST_INC_4586 4587 #define CTEST_INC_4587 4588 #define CTEST_INC_4588 4589 #define CTEST_INC_4589 4590 #define CTEST_INC_4590 4591 #define CTEST_INC_4591 4592 #define CTEST_INC_4592 4593 #define CTEST_INC_4593 4594 #define CTEST_INC_4594 4595 #define CTEST_INC_4595 4596 #define CTEST_INC_4596 4597 #define CTEST_INC_4597 4598 #define CTEST_INC_4598 4599 #define CTEST_INC_4599 4600 #define CTEST_INC_4600 4601 #define CTEST_INC_4601 4602 #define CTEST_INC_4602 4603 #define CTEST_INC_4603 4604 #define CTEST_INC_4604 4605 #define CTEST_INC_4605 4606 #define CTEST_INC_4606 4607 #define CTEST_INC_4607 4608 #define CTEST_INC_4608 4609 #define CTEST_INC_4609 4610 #define CTEST_INC_4610 4611 #define CTEST_INC_4611 4612 #define CTEST_INC_4612 4613 #define CTEST_INC_4613 4614 #define CTEST_INC_4614 4615 #define CTEST_INC_4615 4616 #define CTEST_INC_4616 4617 #define CTEST_INC_4617 4618 #define CTEST_INC_4618 4619 #define CTEST_INC_4619 4620 #define CTEST_INC_4620 4621 #define CTEST_INC_4621 4622 #define CTEST_INC_4622 4623 #define CTEST_INC_4623 4624 #define CTEST_INC_4624 4625 #define CTEST_INC_4625 4626 #define CTEST_INC_4626 4627 #define CTEST_INC_4627 4628 #define CTEST_INC_4628 4629 #define CTEST_INC_4629 4630 #define CTEST_INC_4630 4631 #define CTEST_INC_4631 4632 #define CTEST_INC_4632 4633 #define CTEST_INC_4633 4634 #define CTEST_INC_4634 4635 #define CTEST_INC_4635 4636 #define CTEST_INC_4636 4637 #define CTEST_INC_4637 4638 #define CTEST_INC_4638 4639 #define CTEST_INC_4639 4640 #define CTEST_INC_4640 4641 #define CTEST_INC_4641 4642 #define CTEST_INC_4642 4643 #define CTEST_INC_4643 4644 #define CTEST_INC_4644 4645 #define CTEST_INC_4645 4646 #define CTEST_INC_4646 4647 #define CTEST_INC_4647 4648 #define CTEST_INC_4648 4649 #define CTEST_INC_4649 4650 #define CTEST_INC_4650 4651 #define CTEST_INC_4651 4652 #define CTEST_INC_4652 4653 #define CTEST_INC_4653 4654 #define CTEST_INC_4654 4655 #define CTEST_INC_4655 4656 #define CTEST_INC_4656 4657 #define CTEST_INC_4657 4658 #define CTEST_INC_4658 4659 #define CTEST_INC_4659 4660 #define CTEST_INC_4660 4661 #define CTEST_INC_4661 4662 #define CTEST_INC_4662 4663 #define CTEST_INC_4663 4664 #define CTEST_INC_4664 4665 #define CTEST_INC_4665 4666 #define CTEST_INC_4666 4667 #define CTEST_INC_4667 4668 #define CTEST_INC_4668 4669 #define CTEST_INC_4669 4670 #define CTEST_INC_4670 4671 #define CTEST_INC_4671 4672 #define CTEST_INC_4672 4673 #define CTEST_INC_4673 4674 #define CTEST_INC_4674 4675 #define CTEST_INC_4675 4676 #define CTEST_INC_4676 4677 #define CTEST_INC_4677 4678 #define CTEST_INC_4678 4679 #define CTEST_INC_4679 4680 #define CTEST_INC_4680 4681 #define CTEST_INC_4681 4682 #define CTEST_INC_4682 4683 #define CTEST_INC_4683 4684 #define CTEST_INC_4684 4685 #define CTEST_INC_4685 4686 #define CTEST_INC_4686 4687 #define CTEST_INC_4687 4688 #define CTEST_INC_4688 4689 #define CTEST_INC_4689 4690 #define CTEST_INC_4690 4691 #define CTEST_INC_4691 4692 #define CTEST_INC_4692 4693 #define CTEST_INC_4693 4694 #define CTEST_INC_4694 4695 #define CTEST_INC_4695 4696 #define CTEST_INC_4696 4697 #define CTEST_INC_4697 4698 #define CTEST_INC_4698 4699 #define CTEST_INC_4699 4700 #define CTEST_INC_4700 4701 #define CTEST_INC_4701 4702 #define CTEST_INC_4702 4703 #define CTEST_INC_4703 4704 #define CTEST_INC_4704 4705 #define CTEST_INC_4705 4706 #define CTEST_INC_4706 4707 #define CTEST_INC_4707 4708 #define CTEST_INC_4708 4709 #define CTEST_INC_4709 4710 #define CTEST_INC_4710 4711 #define CTEST_INC_4711 4712 #define CTEST_INC_4712 4713 #define CTEST_INC_4713 4714 #define CTEST_INC_4714 4715 #define CTEST_INC_4715 4716 #define CTEST_INC_4716 4717 #define CTEST_INC_4717 4718 #define CTEST_INC_4718 4719 #define CTEST_INC_4719 4720 #define CTEST_INC_4720 4721 #define CTEST_INC_4721 4722 #define CTEST_INC_4722 4723 #define CTEST_INC_4723 4724 #define CTEST_INC_4724 4725 #define CTEST_INC_4725 4726 #define CTEST_INC_4726 4727 #define CTEST_INC_4727 4728 #define CTEST_INC_4728 4729 #define CTEST_INC_4729 4730 #define CTEST_INC_4730 4731 #define CTEST_INC_4731 4732 #define CTEST_INC_4732 4733 #define CTEST_INC_4733 4734 #define CTEST_INC_4734 4735 #define CTEST_INC_4735 4736 #define CTEST_INC_4736 4737 #define CTEST_INC_4737 4738 #define CTEST_INC_4738 4739 #define CTEST_INC_4739 4740 #define CTEST_INC_4740 4741 #define CTEST_INC_4741 4742 #define CTEST_INC_4742 4743 #define CTEST_INC_4743 4744 #define CTEST_INC_4744 4745 #define CTEST_INC_4745 4746 #define CTEST_INC_4746 4747 #define CTEST_INC_4747 4748 #define CTEST_INC_4748 4749 #define CTEST_INC_4749 4750 #define CTEST_INC_4750 4751 #define CTEST_INC_4751 4752 #define CTEST_INC_4752 4753 #define CTEST_INC_4753 4754 #define CTEST_INC_4754 4755 #define CTEST_INC_4755 4756 #define CTEST_INC_4756 4757 #define CTEST_INC_4757 4758 #define CTEST_INC_4758 4759 #define CTEST_INC_4759 4760 #define CTEST_INC_4760 4761 #define CTEST_INC_4761 4762 #define CTEST_INC_4762 4763 #define CTEST_INC_4763 4764 #define CTEST_INC_4764 4765 #define CTEST_INC_4765 4766 #define CTEST_INC_4766 4767 #define CTEST_INC_4767 4768 #define CTEST_INC_4768 4769 #define CTEST_INC_4769 4770 #define CTEST_INC_4770 4771 #define CTEST_INC_4771 4772 #define CTEST_INC_4772 4773 #define CTEST_INC_4773 4774 #define CTEST_INC_4774 4775 #define CTEST_INC_4775 4776 #define CTEST_INC_4776 4777 #define CTEST_INC_4777 4778 #define CTEST_INC_4778 4779 #define CTEST_INC_4779 4780 #define CTEST_INC_4780 4781 #define CTEST_INC_4781 4782 #define CTEST_INC_4782 4783 #define CTEST_INC_4783 4784 #define CTEST_INC_4784 4785 #define CTEST_INC_4785 4786 #define CTEST_INC_4786 4787 #define CTEST_INC_4787 4788 #define CTEST_INC_4788 4789 #define CTEST_INC_4789 4790 #define CTEST_INC_4790 4791 #define CTEST_INC_4791 4792 #define CTEST_INC_4792 4793 #define CTEST_INC_4793 4794 #define CTEST_INC_4794 4795 #define CTEST_INC_4795 4796 #define CTEST_INC_4796 4797 #define CTEST_INC_4797 4798 #define CTEST_INC_4798 4799 #define CTEST_INC_4799 4800 #define CTEST_INC_4800 4801 #define CTEST_INC_4801 4802 #define CTEST_INC_4802 4803 #define CTEST_INC_4803 4804 #define CTEST_INC_4804 4805 #define CTEST_INC_4805 4806 #define CTEST_INC_4806 4807 #define CTEST_INC_4807 4808 #define CTEST_INC_4808 4809 #define CTEST_INC_4809 4810 #define CTEST_INC_4810 4811 #define CTEST_INC_4811 4812 #define CTEST_INC_4812 4813 #define CTEST_INC_4813 4814 #define CTEST_INC_4814 4815 #define CTEST_INC_4815 4816 #define CTEST_INC_4816 4817 #define CTEST_INC_4817 4818 #define CTEST_INC_4818 4819 #define CTEST_INC_4819 4820 #define CTEST_INC_4820 4821 #define CTEST_INC_4821 4822 #define CTEST_INC_4822 4823 #define CTEST_INC_4823 4824 #define CTEST_INC_4824 4825 #define CTEST_INC_4825 4826 #define CTEST_INC_4826 4827 #define CTEST_INC_4827 4828 #define CTEST_INC_4828 4829 #define CTEST_INC_4829 4830 #define CTEST_INC_4830 4831 #define CTEST_INC_4831 4832 #define CTEST_INC_4832 4833 #define CTEST_INC_4833 4834 #define CTEST_INC_4834 4835 #define CTEST_INC_4835 4836 #define CTEST_INC_4836 4837 #define CTEST_INC_4837 4838 #define CTEST_INC_4838 4839 #define CTEST_INC_4839 4840 #define CTEST_INC_4840 4841 #define CTEST_INC_4841 4842 #define CTEST_INC_4842 4843 #define CTEST_INC_4843 4844 #define CTEST_INC_4844 4845 #define CTEST_INC_4845 4846 #define CTEST_INC_4846 4847 #define CTEST_INC_4847 4848 #define CTEST_INC_4848 4849 #define CTEST_INC_4849 4850 #define CTEST_INC_4850 4851 #define CTEST_INC_4851 4852 #define CTEST_INC_4852 4853 #define CTEST_INC_4853 4854 #define CTEST_INC_4854 4855 #define CTEST_INC_4855 4856 #define CTEST_INC_4856 4857 #define CTEST_INC_4857 4858 #define CTEST_INC_4858 4859 #define CTEST_INC_4859 4860 #define CTEST_INC_4860 4861 #define CTEST_INC_4861 4862 #define CTEST_INC_4862 4863 #define CTEST_INC_4863 4864 #define CTEST_INC_4864 4865 #define CTEST_INC_4865 4866 #define CTEST_INC_4866 4867 #define CTEST_INC_4867 4868 #define CTEST_INC_4868 4869 #define CTEST_INC_4869 4870 #define CTEST_INC_4870 4871 #define CTEST_INC_4871 4872 #define CTEST_INC_4872 4873 #define CTEST_INC_4873 4874 #define CTEST_INC_4874 4875 #define CTEST_INC_4875 4876 #define CTEST_INC_4876 4877 #define CTEST_INC_4877 4878 #define CTEST_INC_4878 4879 #define CTEST_INC_4879 4880 #define CTEST_INC_4880 4881 #define CTEST_INC_4881 4882 #define CTEST_INC_4882 4883 #define CTEST_INC_4883 4884 #define CTEST_INC_4884 4885 #define CTEST_INC_4885 4886 #define CTEST_INC_4886 4887 #define CTEST_INC_4887 4888 #define CTEST_INC_4888 4889 #define CTEST_INC_4889 4890 #define CTEST_INC_4890 4891 #define CTEST_INC_4891 4892 #define CTEST_INC_4892 4893 #define CTEST_INC_4893 4894 #define CTEST_INC_4894 4895 #define CTEST_INC_4895 4896 #define CTEST_INC_4896 4897 #define CTEST_INC_4897 4898 #define CTEST_INC_4898 4899 #define CTEST_INC_4899 4900 #define CTEST_INC_4900 4901 #define CTEST_INC_4901 4902 #define CTEST_INC_4902 4903 #define CTEST_INC_4903 4904 #define CTEST_INC_4904 4905 #define CTEST_INC_4905 4906 #define CTEST_INC_4906 4907 #define CTEST_INC_4907 4908 #define CTEST_INC_4908 4909 #define CTEST_INC_4909 4910 #define CTEST_INC_4910 4911 #define CTEST_INC_4911 4912 #define CTEST_INC_4912 4913 #define CTEST_INC_4913 4914 #define CTEST_INC_4914 4915 #define CTEST_INC_4915 4916 #define CTEST_INC_4916 4917 #define CTEST_INC_4917 4918 #define CTEST_INC_4918 4919 #define CTEST_INC_4919 4920 #define CTEST_INC_4920 4921 #define CTEST_INC_4921 4922 #define CTEST_INC_4922 4923 #define CTEST_INC_4923 4924 #define CTEST_INC_4924 4925 #define CTEST_INC_4925 4926 #define CTEST_INC_4926 4927 #define CTEST_INC_4927 4928 #define CTEST_INC_4928 4929 #define CTEST_INC_4929 4930 #define CTEST_INC_4930 4931 #define CTEST_INC_4931 4932 #define CTEST_INC_4932 4933 #define CTEST_INC_4933 4934 #define CTEST_INC_4934 4935 #define CTEST_INC_4935 4936 #define CTEST_INC_4936 4937 #define CTEST_INC_4937 4938 #define CTEST_INC_4938 4939 #define CTEST_INC_4939 4940 #define CTEST_INC_4940 4941 #define CTEST_INC_4941 4942 #define CTEST_INC_4942 4943 #define CTEST_INC_4943 4944 #define CTEST_INC_4944 4945 #define CTEST_INC_4945 4946 #define CTEST_INC_4946 4947 #define CTEST_INC_4947 4948 #define CTEST_INC_4948 4949 #define CTEST_INC_4949 4950 #define CTEST_INC_4950 4951 #define CTEST_INC_4951 4952 #define CTEST_INC_4952 4953 #define CTEST_INC_4953 4954 #define CTEST_INC_4954 4955 #define CTEST_INC_4955 4956 #define CTEST_INC_4956 4957 #define CTEST_INC_4957 4958 #define CTEST_INC_4958 4959 #define CTEST_INC_4959 4960 #define CTEST_INC_4960 4961 #define CTEST_INC_4961 4962 #define CTEST_INC_4962 4963 #define CTEST_INC_4963 4964 #define CTEST_INC_4964 4965 #define CTEST_INC_4965 4966 #define CTEST_INC_4966 4967 #define CTEST_INC_4967 4968 #define CTEST_INC_4968 4969 #define CTEST_INC_4969 4970 #define CTEST_INC_4970 4971 #define CTEST_INC_4971 4972 #define CTEST_INC_4972 4973 #define CTEST_INC_4973 4974 #define CTEST_INC_4974 4975 #define CTEST_INC_4975 4976 #define CTEST_INC_4976 4977 #define CTEST_INC_4977 4978 #define CTEST_INC_4978 4979 #define CTEST_INC_4979 4980 #define CTEST_INC_4980 4981 #define CTEST_INC_4981 4982 #define CTEST_INC_4982 4983 #define CTEST_INC_4983 4984 #define CTEST_INC_4984 4985 #define CTEST_INC_4985 4986 #define CTEST_INC_4986 4987 #define CTEST_INC_4987 4988 #define CTEST_INC_4988 4989 #define CTEST_INC_4989 4990 #define CTEST_INC_4990 4991 #define CTEST_INC_4991 4992 #define CTEST_INC_4992 4993 #define CTEST_INC_4993 4994 #define CTEST_INC_4994 4995 #define CTEST_INC_4995 4996 #define CTEST_INC_4996 4997 #define CTEST_INC_4997 4998 #define CTEST_INC_4998 4999 #define CTEST_INC_4999 5000 #define CTEST_INC(x) EXPAND_2(CTEST_INC_, x) #define CTEST_DEC_1 0 #define CTEST_DEC_2 1 #define CTEST_DEC_3 2 #define CTEST_DEC_4 3 #define CTEST_DEC_5 4 #define CTEST_DEC_6 5 #define CTEST_DEC_7 6 #define CTEST_DEC_8 7 #define CTEST_DEC_9 8 #define CTEST_DEC_10 9 #define CTEST_DEC_11 10 #define CTEST_DEC_12 11 #define CTEST_DEC_13 12 #define CTEST_DEC_14 13 #define CTEST_DEC_15 14 #define CTEST_DEC_16 15 #define CTEST_DEC_17 16 #define CTEST_DEC_18 17 #define CTEST_DEC_19 18 #define CTEST_DEC_20 19 #define CTEST_DEC_21 20 #define CTEST_DEC_22 21 #define CTEST_DEC_23 22 #define CTEST_DEC_24 23 #define CTEST_DEC_25 24 #define CTEST_DEC_26 25 #define CTEST_DEC_27 26 #define CTEST_DEC_28 27 #define CTEST_DEC_29 28 #define CTEST_DEC_30 29 #define CTEST_DEC_31 30 #define CTEST_DEC_32 31 #define CTEST_DEC_33 32 #define CTEST_DEC_34 33 #define CTEST_DEC_35 34 #define CTEST_DEC_36 35 #define CTEST_DEC_37 36 #define CTEST_DEC_38 37 #define CTEST_DEC_39 38 #define CTEST_DEC_40 39 #define CTEST_DEC_41 40 #define CTEST_DEC_42 41 #define CTEST_DEC_43 42 #define CTEST_DEC_44 43 #define CTEST_DEC_45 44 #define CTEST_DEC_46 45 #define CTEST_DEC_47 46 #define CTEST_DEC_48 47 #define CTEST_DEC_49 48 #define CTEST_DEC_50 49 #define CTEST_DEC_51 50 #define CTEST_DEC_52 51 #define CTEST_DEC_53 52 #define CTEST_DEC_54 53 #define CTEST_DEC_55 54 #define CTEST_DEC_56 55 #define CTEST_DEC_57 56 #define CTEST_DEC_58 57 #define CTEST_DEC_59 58 #define CTEST_DEC_60 59 #define CTEST_DEC_61 60 #define CTEST_DEC_62 61 #define CTEST_DEC_63 62 #define CTEST_DEC_64 63 #define CTEST_DEC_65 64 #define CTEST_DEC_66 65 #define CTEST_DEC_67 66 #define CTEST_DEC_68 67 #define CTEST_DEC_69 68 #define CTEST_DEC_70 69 #define CTEST_DEC_71 70 #define CTEST_DEC_72 71 #define CTEST_DEC_73 72 #define CTEST_DEC_74 73 #define CTEST_DEC_75 74 #define CTEST_DEC_76 75 #define CTEST_DEC_77 76 #define CTEST_DEC_78 77 #define CTEST_DEC_79 78 #define CTEST_DEC_80 79 #define CTEST_DEC_81 80 #define CTEST_DEC_82 81 #define CTEST_DEC_83 82 #define CTEST_DEC_84 83 #define CTEST_DEC_85 84 #define CTEST_DEC_86 85 #define CTEST_DEC_87 86 #define CTEST_DEC_88 87 #define CTEST_DEC_89 88 #define CTEST_DEC_90 89 #define CTEST_DEC_91 90 #define CTEST_DEC_92 91 #define CTEST_DEC_93 92 #define CTEST_DEC_94 93 #define CTEST_DEC_95 94 #define CTEST_DEC_96 95 #define CTEST_DEC_97 96 #define CTEST_DEC_98 97 #define CTEST_DEC_99 98 #define CTEST_DEC_100 99 #define CTEST_DEC_101 100 #define CTEST_DEC_102 101 #define CTEST_DEC_103 102 #define CTEST_DEC_104 103 #define CTEST_DEC_105 104 #define CTEST_DEC_106 105 #define CTEST_DEC_107 106 #define CTEST_DEC_108 107 #define CTEST_DEC_109 108 #define CTEST_DEC_110 109 #define CTEST_DEC_111 110 #define CTEST_DEC_112 111 #define CTEST_DEC_113 112 #define CTEST_DEC_114 113 #define CTEST_DEC_115 114 #define CTEST_DEC_116 115 #define CTEST_DEC_117 116 #define CTEST_DEC_118 117 #define CTEST_DEC_119 118 #define CTEST_DEC_120 119 #define CTEST_DEC_121 120 #define CTEST_DEC_122 121 #define CTEST_DEC_123 122 #define CTEST_DEC_124 123 #define CTEST_DEC_125 124 #define CTEST_DEC_126 125 #define CTEST_DEC_127 126 #define CTEST_DEC_128 127 #define CTEST_DEC_129 128 #define CTEST_DEC_130 129 #define CTEST_DEC_131 130 #define CTEST_DEC_132 131 #define CTEST_DEC_133 132 #define CTEST_DEC_134 133 #define CTEST_DEC_135 134 #define CTEST_DEC_136 135 #define CTEST_DEC_137 136 #define CTEST_DEC_138 137 #define CTEST_DEC_139 138 #define CTEST_DEC_140 139 #define CTEST_DEC_141 140 #define CTEST_DEC_142 141 #define CTEST_DEC_143 142 #define CTEST_DEC_144 143 #define CTEST_DEC_145 144 #define CTEST_DEC_146 145 #define CTEST_DEC_147 146 #define CTEST_DEC_148 147 #define CTEST_DEC_149 148 #define CTEST_DEC_150 149 #define CTEST_DEC_151 150 #define CTEST_DEC_152 151 #define CTEST_DEC_153 152 #define CTEST_DEC_154 153 #define CTEST_DEC_155 154 #define CTEST_DEC_156 155 #define CTEST_DEC_157 156 #define CTEST_DEC_158 157 #define CTEST_DEC_159 158 #define CTEST_DEC_160 159 #define CTEST_DEC_161 160 #define CTEST_DEC_162 161 #define CTEST_DEC_163 162 #define CTEST_DEC_164 163 #define CTEST_DEC_165 164 #define CTEST_DEC_166 165 #define CTEST_DEC_167 166 #define CTEST_DEC_168 167 #define CTEST_DEC_169 168 #define CTEST_DEC_170 169 #define CTEST_DEC_171 170 #define CTEST_DEC_172 171 #define CTEST_DEC_173 172 #define CTEST_DEC_174 173 #define CTEST_DEC_175 174 #define CTEST_DEC_176 175 #define CTEST_DEC_177 176 #define CTEST_DEC_178 177 #define CTEST_DEC_179 178 #define CTEST_DEC_180 179 #define CTEST_DEC_181 180 #define CTEST_DEC_182 181 #define CTEST_DEC_183 182 #define CTEST_DEC_184 183 #define CTEST_DEC_185 184 #define CTEST_DEC_186 185 #define CTEST_DEC_187 186 #define CTEST_DEC_188 187 #define CTEST_DEC_189 188 #define CTEST_DEC_190 189 #define CTEST_DEC_191 190 #define CTEST_DEC_192 191 #define CTEST_DEC_193 192 #define CTEST_DEC_194 193 #define CTEST_DEC_195 194 #define CTEST_DEC_196 195 #define CTEST_DEC_197 196 #define CTEST_DEC_198 197 #define CTEST_DEC_199 198 #define CTEST_DEC_200 199 #define CTEST_DEC_201 200 #define CTEST_DEC_202 201 #define CTEST_DEC_203 202 #define CTEST_DEC_204 203 #define CTEST_DEC_205 204 #define CTEST_DEC_206 205 #define CTEST_DEC_207 206 #define CTEST_DEC_208 207 #define CTEST_DEC_209 208 #define CTEST_DEC_210 209 #define CTEST_DEC_211 210 #define CTEST_DEC_212 211 #define CTEST_DEC_213 212 #define CTEST_DEC_214 213 #define CTEST_DEC_215 214 #define CTEST_DEC_216 215 #define CTEST_DEC_217 216 #define CTEST_DEC_218 217 #define CTEST_DEC_219 218 #define CTEST_DEC_220 219 #define CTEST_DEC_221 220 #define CTEST_DEC_222 221 #define CTEST_DEC_223 222 #define CTEST_DEC_224 223 #define CTEST_DEC_225 224 #define CTEST_DEC_226 225 #define CTEST_DEC_227 226 #define CTEST_DEC_228 227 #define CTEST_DEC_229 228 #define CTEST_DEC_230 229 #define CTEST_DEC_231 230 #define CTEST_DEC_232 231 #define CTEST_DEC_233 232 #define CTEST_DEC_234 233 #define CTEST_DEC_235 234 #define CTEST_DEC_236 235 #define CTEST_DEC_237 236 #define CTEST_DEC_238 237 #define CTEST_DEC_239 238 #define CTEST_DEC_240 239 #define CTEST_DEC_241 240 #define CTEST_DEC_242 241 #define CTEST_DEC_243 242 #define CTEST_DEC_244 243 #define CTEST_DEC_245 244 #define CTEST_DEC_246 245 #define CTEST_DEC_247 246 #define CTEST_DEC_248 247 #define CTEST_DEC_249 248 #define CTEST_DEC_250 249 #define CTEST_DEC_251 250 #define CTEST_DEC_252 251 #define CTEST_DEC_253 252 #define CTEST_DEC_254 253 #define CTEST_DEC_255 254 #define CTEST_DEC_256 255 #define CTEST_DEC_257 256 #define CTEST_DEC_258 257 #define CTEST_DEC_259 258 #define CTEST_DEC_260 259 #define CTEST_DEC_261 260 #define CTEST_DEC_262 261 #define CTEST_DEC_263 262 #define CTEST_DEC_264 263 #define CTEST_DEC_265 264 #define CTEST_DEC_266 265 #define CTEST_DEC_267 266 #define CTEST_DEC_268 267 #define CTEST_DEC_269 268 #define CTEST_DEC_270 269 #define CTEST_DEC_271 270 #define CTEST_DEC_272 271 #define CTEST_DEC_273 272 #define CTEST_DEC_274 273 #define CTEST_DEC_275 274 #define CTEST_DEC_276 275 #define CTEST_DEC_277 276 #define CTEST_DEC_278 277 #define CTEST_DEC_279 278 #define CTEST_DEC_280 279 #define CTEST_DEC_281 280 #define CTEST_DEC_282 281 #define CTEST_DEC_283 282 #define CTEST_DEC_284 283 #define CTEST_DEC_285 284 #define CTEST_DEC_286 285 #define CTEST_DEC_287 286 #define CTEST_DEC_288 287 #define CTEST_DEC_289 288 #define CTEST_DEC_290 289 #define CTEST_DEC_291 290 #define CTEST_DEC_292 291 #define CTEST_DEC_293 292 #define CTEST_DEC_294 293 #define CTEST_DEC_295 294 #define CTEST_DEC_296 295 #define CTEST_DEC_297 296 #define CTEST_DEC_298 297 #define CTEST_DEC_299 298 #define CTEST_DEC_300 299 #define CTEST_DEC_301 300 #define CTEST_DEC_302 301 #define CTEST_DEC_303 302 #define CTEST_DEC_304 303 #define CTEST_DEC_305 304 #define CTEST_DEC_306 305 #define CTEST_DEC_307 306 #define CTEST_DEC_308 307 #define CTEST_DEC_309 308 #define CTEST_DEC_310 309 #define CTEST_DEC_311 310 #define CTEST_DEC_312 311 #define CTEST_DEC_313 312 #define CTEST_DEC_314 313 #define CTEST_DEC_315 314 #define CTEST_DEC_316 315 #define CTEST_DEC_317 316 #define CTEST_DEC_318 317 #define CTEST_DEC_319 318 #define CTEST_DEC_320 319 #define CTEST_DEC_321 320 #define CTEST_DEC_322 321 #define CTEST_DEC_323 322 #define CTEST_DEC_324 323 #define CTEST_DEC_325 324 #define CTEST_DEC_326 325 #define CTEST_DEC_327 326 #define CTEST_DEC_328 327 #define CTEST_DEC_329 328 #define CTEST_DEC_330 329 #define CTEST_DEC_331 330 #define CTEST_DEC_332 331 #define CTEST_DEC_333 332 #define CTEST_DEC_334 333 #define CTEST_DEC_335 334 #define CTEST_DEC_336 335 #define CTEST_DEC_337 336 #define CTEST_DEC_338 337 #define CTEST_DEC_339 338 #define CTEST_DEC_340 339 #define CTEST_DEC_341 340 #define CTEST_DEC_342 341 #define CTEST_DEC_343 342 #define CTEST_DEC_344 343 #define CTEST_DEC_345 344 #define CTEST_DEC_346 345 #define CTEST_DEC_347 346 #define CTEST_DEC_348 347 #define CTEST_DEC_349 348 #define CTEST_DEC_350 349 #define CTEST_DEC_351 350 #define CTEST_DEC_352 351 #define CTEST_DEC_353 352 #define CTEST_DEC_354 353 #define CTEST_DEC_355 354 #define CTEST_DEC_356 355 #define CTEST_DEC_357 356 #define CTEST_DEC_358 357 #define CTEST_DEC_359 358 #define CTEST_DEC_360 359 #define CTEST_DEC_361 360 #define CTEST_DEC_362 361 #define CTEST_DEC_363 362 #define CTEST_DEC_364 363 #define CTEST_DEC_365 364 #define CTEST_DEC_366 365 #define CTEST_DEC_367 366 #define CTEST_DEC_368 367 #define CTEST_DEC_369 368 #define CTEST_DEC_370 369 #define CTEST_DEC_371 370 #define CTEST_DEC_372 371 #define CTEST_DEC_373 372 #define CTEST_DEC_374 373 #define CTEST_DEC_375 374 #define CTEST_DEC_376 375 #define CTEST_DEC_377 376 #define CTEST_DEC_378 377 #define CTEST_DEC_379 378 #define CTEST_DEC_380 379 #define CTEST_DEC_381 380 #define CTEST_DEC_382 381 #define CTEST_DEC_383 382 #define CTEST_DEC_384 383 #define CTEST_DEC_385 384 #define CTEST_DEC_386 385 #define CTEST_DEC_387 386 #define CTEST_DEC_388 387 #define CTEST_DEC_389 388 #define CTEST_DEC_390 389 #define CTEST_DEC_391 390 #define CTEST_DEC_392 391 #define CTEST_DEC_393 392 #define CTEST_DEC_394 393 #define CTEST_DEC_395 394 #define CTEST_DEC_396 395 #define CTEST_DEC_397 396 #define CTEST_DEC_398 397 #define CTEST_DEC_399 398 #define CTEST_DEC_400 399 #define CTEST_DEC_401 400 #define CTEST_DEC_402 401 #define CTEST_DEC_403 402 #define CTEST_DEC_404 403 #define CTEST_DEC_405 404 #define CTEST_DEC_406 405 #define CTEST_DEC_407 406 #define CTEST_DEC_408 407 #define CTEST_DEC_409 408 #define CTEST_DEC_410 409 #define CTEST_DEC_411 410 #define CTEST_DEC_412 411 #define CTEST_DEC_413 412 #define CTEST_DEC_414 413 #define CTEST_DEC_415 414 #define CTEST_DEC_416 415 #define CTEST_DEC_417 416 #define CTEST_DEC_418 417 #define CTEST_DEC_419 418 #define CTEST_DEC_420 419 #define CTEST_DEC_421 420 #define CTEST_DEC_422 421 #define CTEST_DEC_423 422 #define CTEST_DEC_424 423 #define CTEST_DEC_425 424 #define CTEST_DEC_426 425 #define CTEST_DEC_427 426 #define CTEST_DEC_428 427 #define CTEST_DEC_429 428 #define CTEST_DEC_430 429 #define CTEST_DEC_431 430 #define CTEST_DEC_432 431 #define CTEST_DEC_433 432 #define CTEST_DEC_434 433 #define CTEST_DEC_435 434 #define CTEST_DEC_436 435 #define CTEST_DEC_437 436 #define CTEST_DEC_438 437 #define CTEST_DEC_439 438 #define CTEST_DEC_440 439 #define CTEST_DEC_441 440 #define CTEST_DEC_442 441 #define CTEST_DEC_443 442 #define CTEST_DEC_444 443 #define CTEST_DEC_445 444 #define CTEST_DEC_446 445 #define CTEST_DEC_447 446 #define CTEST_DEC_448 447 #define CTEST_DEC_449 448 #define CTEST_DEC_450 449 #define CTEST_DEC_451 450 #define CTEST_DEC_452 451 #define CTEST_DEC_453 452 #define CTEST_DEC_454 453 #define CTEST_DEC_455 454 #define CTEST_DEC_456 455 #define CTEST_DEC_457 456 #define CTEST_DEC_458 457 #define CTEST_DEC_459 458 #define CTEST_DEC_460 459 #define CTEST_DEC_461 460 #define CTEST_DEC_462 461 #define CTEST_DEC_463 462 #define CTEST_DEC_464 463 #define CTEST_DEC_465 464 #define CTEST_DEC_466 465 #define CTEST_DEC_467 466 #define CTEST_DEC_468 467 #define CTEST_DEC_469 468 #define CTEST_DEC_470 469 #define CTEST_DEC_471 470 #define CTEST_DEC_472 471 #define CTEST_DEC_473 472 #define CTEST_DEC_474 473 #define CTEST_DEC_475 474 #define CTEST_DEC_476 475 #define CTEST_DEC_477 476 #define CTEST_DEC_478 477 #define CTEST_DEC_479 478 #define CTEST_DEC_480 479 #define CTEST_DEC_481 480 #define CTEST_DEC_482 481 #define CTEST_DEC_483 482 #define CTEST_DEC_484 483 #define CTEST_DEC_485 484 #define CTEST_DEC_486 485 #define CTEST_DEC_487 486 #define CTEST_DEC_488 487 #define CTEST_DEC_489 488 #define CTEST_DEC_490 489 #define CTEST_DEC_491 490 #define CTEST_DEC_492 491 #define CTEST_DEC_493 492 #define CTEST_DEC_494 493 #define CTEST_DEC_495 494 #define CTEST_DEC_496 495 #define CTEST_DEC_497 496 #define CTEST_DEC_498 497 #define CTEST_DEC_499 498 #define CTEST_DEC_500 499 #define CTEST_DEC_501 500 #define CTEST_DEC_502 501 #define CTEST_DEC_503 502 #define CTEST_DEC_504 503 #define CTEST_DEC_505 504 #define CTEST_DEC_506 505 #define CTEST_DEC_507 506 #define CTEST_DEC_508 507 #define CTEST_DEC_509 508 #define CTEST_DEC_510 509 #define CTEST_DEC_511 510 #define CTEST_DEC_512 511 #define CTEST_DEC_513 512 #define CTEST_DEC_514 513 #define CTEST_DEC_515 514 #define CTEST_DEC_516 515 #define CTEST_DEC_517 516 #define CTEST_DEC_518 517 #define CTEST_DEC_519 518 #define CTEST_DEC_520 519 #define CTEST_DEC_521 520 #define CTEST_DEC_522 521 #define CTEST_DEC_523 522 #define CTEST_DEC_524 523 #define CTEST_DEC_525 524 #define CTEST_DEC_526 525 #define CTEST_DEC_527 526 #define CTEST_DEC_528 527 #define CTEST_DEC_529 528 #define CTEST_DEC_530 529 #define CTEST_DEC_531 530 #define CTEST_DEC_532 531 #define CTEST_DEC_533 532 #define CTEST_DEC_534 533 #define CTEST_DEC_535 534 #define CTEST_DEC_536 535 #define CTEST_DEC_537 536 #define CTEST_DEC_538 537 #define CTEST_DEC_539 538 #define CTEST_DEC_540 539 #define CTEST_DEC_541 540 #define CTEST_DEC_542 541 #define CTEST_DEC_543 542 #define CTEST_DEC_544 543 #define CTEST_DEC_545 544 #define CTEST_DEC_546 545 #define CTEST_DEC_547 546 #define CTEST_DEC_548 547 #define CTEST_DEC_549 548 #define CTEST_DEC_550 549 #define CTEST_DEC_551 550 #define CTEST_DEC_552 551 #define CTEST_DEC_553 552 #define CTEST_DEC_554 553 #define CTEST_DEC_555 554 #define CTEST_DEC_556 555 #define CTEST_DEC_557 556 #define CTEST_DEC_558 557 #define CTEST_DEC_559 558 #define CTEST_DEC_560 559 #define CTEST_DEC_561 560 #define CTEST_DEC_562 561 #define CTEST_DEC_563 562 #define CTEST_DEC_564 563 #define CTEST_DEC_565 564 #define CTEST_DEC_566 565 #define CTEST_DEC_567 566 #define CTEST_DEC_568 567 #define CTEST_DEC_569 568 #define CTEST_DEC_570 569 #define CTEST_DEC_571 570 #define CTEST_DEC_572 571 #define CTEST_DEC_573 572 #define CTEST_DEC_574 573 #define CTEST_DEC_575 574 #define CTEST_DEC_576 575 #define CTEST_DEC_577 576 #define CTEST_DEC_578 577 #define CTEST_DEC_579 578 #define CTEST_DEC_580 579 #define CTEST_DEC_581 580 #define CTEST_DEC_582 581 #define CTEST_DEC_583 582 #define CTEST_DEC_584 583 #define CTEST_DEC_585 584 #define CTEST_DEC_586 585 #define CTEST_DEC_587 586 #define CTEST_DEC_588 587 #define CTEST_DEC_589 588 #define CTEST_DEC_590 589 #define CTEST_DEC_591 590 #define CTEST_DEC_592 591 #define CTEST_DEC_593 592 #define CTEST_DEC_594 593 #define CTEST_DEC_595 594 #define CTEST_DEC_596 595 #define CTEST_DEC_597 596 #define CTEST_DEC_598 597 #define CTEST_DEC_599 598 #define CTEST_DEC_600 599 #define CTEST_DEC_601 600 #define CTEST_DEC_602 601 #define CTEST_DEC_603 602 #define CTEST_DEC_604 603 #define CTEST_DEC_605 604 #define CTEST_DEC_606 605 #define CTEST_DEC_607 606 #define CTEST_DEC_608 607 #define CTEST_DEC_609 608 #define CTEST_DEC_610 609 #define CTEST_DEC_611 610 #define CTEST_DEC_612 611 #define CTEST_DEC_613 612 #define CTEST_DEC_614 613 #define CTEST_DEC_615 614 #define CTEST_DEC_616 615 #define CTEST_DEC_617 616 #define CTEST_DEC_618 617 #define CTEST_DEC_619 618 #define CTEST_DEC_620 619 #define CTEST_DEC_621 620 #define CTEST_DEC_622 621 #define CTEST_DEC_623 622 #define CTEST_DEC_624 623 #define CTEST_DEC_625 624 #define CTEST_DEC_626 625 #define CTEST_DEC_627 626 #define CTEST_DEC_628 627 #define CTEST_DEC_629 628 #define CTEST_DEC_630 629 #define CTEST_DEC_631 630 #define CTEST_DEC_632 631 #define CTEST_DEC_633 632 #define CTEST_DEC_634 633 #define CTEST_DEC_635 634 #define CTEST_DEC_636 635 #define CTEST_DEC_637 636 #define CTEST_DEC_638 637 #define CTEST_DEC_639 638 #define CTEST_DEC_640 639 #define CTEST_DEC_641 640 #define CTEST_DEC_642 641 #define CTEST_DEC_643 642 #define CTEST_DEC_644 643 #define CTEST_DEC_645 644 #define CTEST_DEC_646 645 #define CTEST_DEC_647 646 #define CTEST_DEC_648 647 #define CTEST_DEC_649 648 #define CTEST_DEC_650 649 #define CTEST_DEC_651 650 #define CTEST_DEC_652 651 #define CTEST_DEC_653 652 #define CTEST_DEC_654 653 #define CTEST_DEC_655 654 #define CTEST_DEC_656 655 #define CTEST_DEC_657 656 #define CTEST_DEC_658 657 #define CTEST_DEC_659 658 #define CTEST_DEC_660 659 #define CTEST_DEC_661 660 #define CTEST_DEC_662 661 #define CTEST_DEC_663 662 #define CTEST_DEC_664 663 #define CTEST_DEC_665 664 #define CTEST_DEC_666 665 #define CTEST_DEC_667 666 #define CTEST_DEC_668 667 #define CTEST_DEC_669 668 #define CTEST_DEC_670 669 #define CTEST_DEC_671 670 #define CTEST_DEC_672 671 #define CTEST_DEC_673 672 #define CTEST_DEC_674 673 #define CTEST_DEC_675 674 #define CTEST_DEC_676 675 #define CTEST_DEC_677 676 #define CTEST_DEC_678 677 #define CTEST_DEC_679 678 #define CTEST_DEC_680 679 #define CTEST_DEC_681 680 #define CTEST_DEC_682 681 #define CTEST_DEC_683 682 #define CTEST_DEC_684 683 #define CTEST_DEC_685 684 #define CTEST_DEC_686 685 #define CTEST_DEC_687 686 #define CTEST_DEC_688 687 #define CTEST_DEC_689 688 #define CTEST_DEC_690 689 #define CTEST_DEC_691 690 #define CTEST_DEC_692 691 #define CTEST_DEC_693 692 #define CTEST_DEC_694 693 #define CTEST_DEC_695 694 #define CTEST_DEC_696 695 #define CTEST_DEC_697 696 #define CTEST_DEC_698 697 #define CTEST_DEC_699 698 #define CTEST_DEC_700 699 #define CTEST_DEC_701 700 #define CTEST_DEC_702 701 #define CTEST_DEC_703 702 #define CTEST_DEC_704 703 #define CTEST_DEC_705 704 #define CTEST_DEC_706 705 #define CTEST_DEC_707 706 #define CTEST_DEC_708 707 #define CTEST_DEC_709 708 #define CTEST_DEC_710 709 #define CTEST_DEC_711 710 #define CTEST_DEC_712 711 #define CTEST_DEC_713 712 #define CTEST_DEC_714 713 #define CTEST_DEC_715 714 #define CTEST_DEC_716 715 #define CTEST_DEC_717 716 #define CTEST_DEC_718 717 #define CTEST_DEC_719 718 #define CTEST_DEC_720 719 #define CTEST_DEC_721 720 #define CTEST_DEC_722 721 #define CTEST_DEC_723 722 #define CTEST_DEC_724 723 #define CTEST_DEC_725 724 #define CTEST_DEC_726 725 #define CTEST_DEC_727 726 #define CTEST_DEC_728 727 #define CTEST_DEC_729 728 #define CTEST_DEC_730 729 #define CTEST_DEC_731 730 #define CTEST_DEC_732 731 #define CTEST_DEC_733 732 #define CTEST_DEC_734 733 #define CTEST_DEC_735 734 #define CTEST_DEC_736 735 #define CTEST_DEC_737 736 #define CTEST_DEC_738 737 #define CTEST_DEC_739 738 #define CTEST_DEC_740 739 #define CTEST_DEC_741 740 #define CTEST_DEC_742 741 #define CTEST_DEC_743 742 #define CTEST_DEC_744 743 #define CTEST_DEC_745 744 #define CTEST_DEC_746 745 #define CTEST_DEC_747 746 #define CTEST_DEC_748 747 #define CTEST_DEC_749 748 #define CTEST_DEC_750 749 #define CTEST_DEC_751 750 #define CTEST_DEC_752 751 #define CTEST_DEC_753 752 #define CTEST_DEC_754 753 #define CTEST_DEC_755 754 #define CTEST_DEC_756 755 #define CTEST_DEC_757 756 #define CTEST_DEC_758 757 #define CTEST_DEC_759 758 #define CTEST_DEC_760 759 #define CTEST_DEC_761 760 #define CTEST_DEC_762 761 #define CTEST_DEC_763 762 #define CTEST_DEC_764 763 #define CTEST_DEC_765 764 #define CTEST_DEC_766 765 #define CTEST_DEC_767 766 #define CTEST_DEC_768 767 #define CTEST_DEC_769 768 #define CTEST_DEC_770 769 #define CTEST_DEC_771 770 #define CTEST_DEC_772 771 #define CTEST_DEC_773 772 #define CTEST_DEC_774 773 #define CTEST_DEC_775 774 #define CTEST_DEC_776 775 #define CTEST_DEC_777 776 #define CTEST_DEC_778 777 #define CTEST_DEC_779 778 #define CTEST_DEC_780 779 #define CTEST_DEC_781 780 #define CTEST_DEC_782 781 #define CTEST_DEC_783 782 #define CTEST_DEC_784 783 #define CTEST_DEC_785 784 #define CTEST_DEC_786 785 #define CTEST_DEC_787 786 #define CTEST_DEC_788 787 #define CTEST_DEC_789 788 #define CTEST_DEC_790 789 #define CTEST_DEC_791 790 #define CTEST_DEC_792 791 #define CTEST_DEC_793 792 #define CTEST_DEC_794 793 #define CTEST_DEC_795 794 #define CTEST_DEC_796 795 #define CTEST_DEC_797 796 #define CTEST_DEC_798 797 #define CTEST_DEC_799 798 #define CTEST_DEC_800 799 #define CTEST_DEC_801 800 #define CTEST_DEC_802 801 #define CTEST_DEC_803 802 #define CTEST_DEC_804 803 #define CTEST_DEC_805 804 #define CTEST_DEC_806 805 #define CTEST_DEC_807 806 #define CTEST_DEC_808 807 #define CTEST_DEC_809 808 #define CTEST_DEC_810 809 #define CTEST_DEC_811 810 #define CTEST_DEC_812 811 #define CTEST_DEC_813 812 #define CTEST_DEC_814 813 #define CTEST_DEC_815 814 #define CTEST_DEC_816 815 #define CTEST_DEC_817 816 #define CTEST_DEC_818 817 #define CTEST_DEC_819 818 #define CTEST_DEC_820 819 #define CTEST_DEC_821 820 #define CTEST_DEC_822 821 #define CTEST_DEC_823 822 #define CTEST_DEC_824 823 #define CTEST_DEC_825 824 #define CTEST_DEC_826 825 #define CTEST_DEC_827 826 #define CTEST_DEC_828 827 #define CTEST_DEC_829 828 #define CTEST_DEC_830 829 #define CTEST_DEC_831 830 #define CTEST_DEC_832 831 #define CTEST_DEC_833 832 #define CTEST_DEC_834 833 #define CTEST_DEC_835 834 #define CTEST_DEC_836 835 #define CTEST_DEC_837 836 #define CTEST_DEC_838 837 #define CTEST_DEC_839 838 #define CTEST_DEC_840 839 #define CTEST_DEC_841 840 #define CTEST_DEC_842 841 #define CTEST_DEC_843 842 #define CTEST_DEC_844 843 #define CTEST_DEC_845 844 #define CTEST_DEC_846 845 #define CTEST_DEC_847 846 #define CTEST_DEC_848 847 #define CTEST_DEC_849 848 #define CTEST_DEC_850 849 #define CTEST_DEC_851 850 #define CTEST_DEC_852 851 #define CTEST_DEC_853 852 #define CTEST_DEC_854 853 #define CTEST_DEC_855 854 #define CTEST_DEC_856 855 #define CTEST_DEC_857 856 #define CTEST_DEC_858 857 #define CTEST_DEC_859 858 #define CTEST_DEC_860 859 #define CTEST_DEC_861 860 #define CTEST_DEC_862 861 #define CTEST_DEC_863 862 #define CTEST_DEC_864 863 #define CTEST_DEC_865 864 #define CTEST_DEC_866 865 #define CTEST_DEC_867 866 #define CTEST_DEC_868 867 #define CTEST_DEC_869 868 #define CTEST_DEC_870 869 #define CTEST_DEC_871 870 #define CTEST_DEC_872 871 #define CTEST_DEC_873 872 #define CTEST_DEC_874 873 #define CTEST_DEC_875 874 #define CTEST_DEC_876 875 #define CTEST_DEC_877 876 #define CTEST_DEC_878 877 #define CTEST_DEC_879 878 #define CTEST_DEC_880 879 #define CTEST_DEC_881 880 #define CTEST_DEC_882 881 #define CTEST_DEC_883 882 #define CTEST_DEC_884 883 #define CTEST_DEC_885 884 #define CTEST_DEC_886 885 #define CTEST_DEC_887 886 #define CTEST_DEC_888 887 #define CTEST_DEC_889 888 #define CTEST_DEC_890 889 #define CTEST_DEC_891 890 #define CTEST_DEC_892 891 #define CTEST_DEC_893 892 #define CTEST_DEC_894 893 #define CTEST_DEC_895 894 #define CTEST_DEC_896 895 #define CTEST_DEC_897 896 #define CTEST_DEC_898 897 #define CTEST_DEC_899 898 #define CTEST_DEC_900 899 #define CTEST_DEC_901 900 #define CTEST_DEC_902 901 #define CTEST_DEC_903 902 #define CTEST_DEC_904 903 #define CTEST_DEC_905 904 #define CTEST_DEC_906 905 #define CTEST_DEC_907 906 #define CTEST_DEC_908 907 #define CTEST_DEC_909 908 #define CTEST_DEC_910 909 #define CTEST_DEC_911 910 #define CTEST_DEC_912 911 #define CTEST_DEC_913 912 #define CTEST_DEC_914 913 #define CTEST_DEC_915 914 #define CTEST_DEC_916 915 #define CTEST_DEC_917 916 #define CTEST_DEC_918 917 #define CTEST_DEC_919 918 #define CTEST_DEC_920 919 #define CTEST_DEC_921 920 #define CTEST_DEC_922 921 #define CTEST_DEC_923 922 #define CTEST_DEC_924 923 #define CTEST_DEC_925 924 #define CTEST_DEC_926 925 #define CTEST_DEC_927 926 #define CTEST_DEC_928 927 #define CTEST_DEC_929 928 #define CTEST_DEC_930 929 #define CTEST_DEC_931 930 #define CTEST_DEC_932 931 #define CTEST_DEC_933 932 #define CTEST_DEC_934 933 #define CTEST_DEC_935 934 #define CTEST_DEC_936 935 #define CTEST_DEC_937 936 #define CTEST_DEC_938 937 #define CTEST_DEC_939 938 #define CTEST_DEC_940 939 #define CTEST_DEC_941 940 #define CTEST_DEC_942 941 #define CTEST_DEC_943 942 #define CTEST_DEC_944 943 #define CTEST_DEC_945 944 #define CTEST_DEC_946 945 #define CTEST_DEC_947 946 #define CTEST_DEC_948 947 #define CTEST_DEC_949 948 #define CTEST_DEC_950 949 #define CTEST_DEC_951 950 #define CTEST_DEC_952 951 #define CTEST_DEC_953 952 #define CTEST_DEC_954 953 #define CTEST_DEC_955 954 #define CTEST_DEC_956 955 #define CTEST_DEC_957 956 #define CTEST_DEC_958 957 #define CTEST_DEC_959 958 #define CTEST_DEC_960 959 #define CTEST_DEC_961 960 #define CTEST_DEC_962 961 #define CTEST_DEC_963 962 #define CTEST_DEC_964 963 #define CTEST_DEC_965 964 #define CTEST_DEC_966 965 #define CTEST_DEC_967 966 #define CTEST_DEC_968 967 #define CTEST_DEC_969 968 #define CTEST_DEC_970 969 #define CTEST_DEC_971 970 #define CTEST_DEC_972 971 #define CTEST_DEC_973 972 #define CTEST_DEC_974 973 #define CTEST_DEC_975 974 #define CTEST_DEC_976 975 #define CTEST_DEC_977 976 #define CTEST_DEC_978 977 #define CTEST_DEC_979 978 #define CTEST_DEC_980 979 #define CTEST_DEC_981 980 #define CTEST_DEC_982 981 #define CTEST_DEC_983 982 #define CTEST_DEC_984 983 #define CTEST_DEC_985 984 #define CTEST_DEC_986 985 #define CTEST_DEC_987 986 #define CTEST_DEC_988 987 #define CTEST_DEC_989 988 #define CTEST_DEC_990 989 #define CTEST_DEC_991 990 #define CTEST_DEC_992 991 #define CTEST_DEC_993 992 #define CTEST_DEC_994 993 #define CTEST_DEC_995 994 #define CTEST_DEC_996 995 #define CTEST_DEC_997 996 #define CTEST_DEC_998 997 #define CTEST_DEC_999 998 #define CTEST_DEC_1000 999 #define CTEST_DEC_1001 1000 #define CTEST_DEC_1002 1001 #define CTEST_DEC_1003 1002 #define CTEST_DEC_1004 1003 #define CTEST_DEC_1005 1004 #define CTEST_DEC_1006 1005 #define CTEST_DEC_1007 1006 #define CTEST_DEC_1008 1007 #define CTEST_DEC_1009 1008 #define CTEST_DEC_1010 1009 #define CTEST_DEC_1011 1010 #define CTEST_DEC_1012 1011 #define CTEST_DEC_1013 1012 #define CTEST_DEC_1014 1013 #define CTEST_DEC_1015 1014 #define CTEST_DEC_1016 1015 #define CTEST_DEC_1017 1016 #define CTEST_DEC_1018 1017 #define CTEST_DEC_1019 1018 #define CTEST_DEC_1020 1019 #define CTEST_DEC_1021 1020 #define CTEST_DEC_1022 1021 #define CTEST_DEC_1023 1022 #define CTEST_DEC_1024 1023 #define CTEST_DEC_1025 1024 #define CTEST_DEC_1026 1025 #define CTEST_DEC_1027 1026 #define CTEST_DEC_1028 1027 #define CTEST_DEC_1029 1028 #define CTEST_DEC_1030 1029 #define CTEST_DEC_1031 1030 #define CTEST_DEC_1032 1031 #define CTEST_DEC_1033 1032 #define CTEST_DEC_1034 1033 #define CTEST_DEC_1035 1034 #define CTEST_DEC_1036 1035 #define CTEST_DEC_1037 1036 #define CTEST_DEC_1038 1037 #define CTEST_DEC_1039 1038 #define CTEST_DEC_1040 1039 #define CTEST_DEC_1041 1040 #define CTEST_DEC_1042 1041 #define CTEST_DEC_1043 1042 #define CTEST_DEC_1044 1043 #define CTEST_DEC_1045 1044 #define CTEST_DEC_1046 1045 #define CTEST_DEC_1047 1046 #define CTEST_DEC_1048 1047 #define CTEST_DEC_1049 1048 #define CTEST_DEC_1050 1049 #define CTEST_DEC_1051 1050 #define CTEST_DEC_1052 1051 #define CTEST_DEC_1053 1052 #define CTEST_DEC_1054 1053 #define CTEST_DEC_1055 1054 #define CTEST_DEC_1056 1055 #define CTEST_DEC_1057 1056 #define CTEST_DEC_1058 1057 #define CTEST_DEC_1059 1058 #define CTEST_DEC_1060 1059 #define CTEST_DEC_1061 1060 #define CTEST_DEC_1062 1061 #define CTEST_DEC_1063 1062 #define CTEST_DEC_1064 1063 #define CTEST_DEC_1065 1064 #define CTEST_DEC_1066 1065 #define CTEST_DEC_1067 1066 #define CTEST_DEC_1068 1067 #define CTEST_DEC_1069 1068 #define CTEST_DEC_1070 1069 #define CTEST_DEC_1071 1070 #define CTEST_DEC_1072 1071 #define CTEST_DEC_1073 1072 #define CTEST_DEC_1074 1073 #define CTEST_DEC_1075 1074 #define CTEST_DEC_1076 1075 #define CTEST_DEC_1077 1076 #define CTEST_DEC_1078 1077 #define CTEST_DEC_1079 1078 #define CTEST_DEC_1080 1079 #define CTEST_DEC_1081 1080 #define CTEST_DEC_1082 1081 #define CTEST_DEC_1083 1082 #define CTEST_DEC_1084 1083 #define CTEST_DEC_1085 1084 #define CTEST_DEC_1086 1085 #define CTEST_DEC_1087 1086 #define CTEST_DEC_1088 1087 #define CTEST_DEC_1089 1088 #define CTEST_DEC_1090 1089 #define CTEST_DEC_1091 1090 #define CTEST_DEC_1092 1091 #define CTEST_DEC_1093 1092 #define CTEST_DEC_1094 1093 #define CTEST_DEC_1095 1094 #define CTEST_DEC_1096 1095 #define CTEST_DEC_1097 1096 #define CTEST_DEC_1098 1097 #define CTEST_DEC_1099 1098 #define CTEST_DEC_1100 1099 #define CTEST_DEC_1101 1100 #define CTEST_DEC_1102 1101 #define CTEST_DEC_1103 1102 #define CTEST_DEC_1104 1103 #define CTEST_DEC_1105 1104 #define CTEST_DEC_1106 1105 #define CTEST_DEC_1107 1106 #define CTEST_DEC_1108 1107 #define CTEST_DEC_1109 1108 #define CTEST_DEC_1110 1109 #define CTEST_DEC_1111 1110 #define CTEST_DEC_1112 1111 #define CTEST_DEC_1113 1112 #define CTEST_DEC_1114 1113 #define CTEST_DEC_1115 1114 #define CTEST_DEC_1116 1115 #define CTEST_DEC_1117 1116 #define CTEST_DEC_1118 1117 #define CTEST_DEC_1119 1118 #define CTEST_DEC_1120 1119 #define CTEST_DEC_1121 1120 #define CTEST_DEC_1122 1121 #define CTEST_DEC_1123 1122 #define CTEST_DEC_1124 1123 #define CTEST_DEC_1125 1124 #define CTEST_DEC_1126 1125 #define CTEST_DEC_1127 1126 #define CTEST_DEC_1128 1127 #define CTEST_DEC_1129 1128 #define CTEST_DEC_1130 1129 #define CTEST_DEC_1131 1130 #define CTEST_DEC_1132 1131 #define CTEST_DEC_1133 1132 #define CTEST_DEC_1134 1133 #define CTEST_DEC_1135 1134 #define CTEST_DEC_1136 1135 #define CTEST_DEC_1137 1136 #define CTEST_DEC_1138 1137 #define CTEST_DEC_1139 1138 #define CTEST_DEC_1140 1139 #define CTEST_DEC_1141 1140 #define CTEST_DEC_1142 1141 #define CTEST_DEC_1143 1142 #define CTEST_DEC_1144 1143 #define CTEST_DEC_1145 1144 #define CTEST_DEC_1146 1145 #define CTEST_DEC_1147 1146 #define CTEST_DEC_1148 1147 #define CTEST_DEC_1149 1148 #define CTEST_DEC_1150 1149 #define CTEST_DEC_1151 1150 #define CTEST_DEC_1152 1151 #define CTEST_DEC_1153 1152 #define CTEST_DEC_1154 1153 #define CTEST_DEC_1155 1154 #define CTEST_DEC_1156 1155 #define CTEST_DEC_1157 1156 #define CTEST_DEC_1158 1157 #define CTEST_DEC_1159 1158 #define CTEST_DEC_1160 1159 #define CTEST_DEC_1161 1160 #define CTEST_DEC_1162 1161 #define CTEST_DEC_1163 1162 #define CTEST_DEC_1164 1163 #define CTEST_DEC_1165 1164 #define CTEST_DEC_1166 1165 #define CTEST_DEC_1167 1166 #define CTEST_DEC_1168 1167 #define CTEST_DEC_1169 1168 #define CTEST_DEC_1170 1169 #define CTEST_DEC_1171 1170 #define CTEST_DEC_1172 1171 #define CTEST_DEC_1173 1172 #define CTEST_DEC_1174 1173 #define CTEST_DEC_1175 1174 #define CTEST_DEC_1176 1175 #define CTEST_DEC_1177 1176 #define CTEST_DEC_1178 1177 #define CTEST_DEC_1179 1178 #define CTEST_DEC_1180 1179 #define CTEST_DEC_1181 1180 #define CTEST_DEC_1182 1181 #define CTEST_DEC_1183 1182 #define CTEST_DEC_1184 1183 #define CTEST_DEC_1185 1184 #define CTEST_DEC_1186 1185 #define CTEST_DEC_1187 1186 #define CTEST_DEC_1188 1187 #define CTEST_DEC_1189 1188 #define CTEST_DEC_1190 1189 #define CTEST_DEC_1191 1190 #define CTEST_DEC_1192 1191 #define CTEST_DEC_1193 1192 #define CTEST_DEC_1194 1193 #define CTEST_DEC_1195 1194 #define CTEST_DEC_1196 1195 #define CTEST_DEC_1197 1196 #define CTEST_DEC_1198 1197 #define CTEST_DEC_1199 1198 #define CTEST_DEC_1200 1199 #define CTEST_DEC_1201 1200 #define CTEST_DEC_1202 1201 #define CTEST_DEC_1203 1202 #define CTEST_DEC_1204 1203 #define CTEST_DEC_1205 1204 #define CTEST_DEC_1206 1205 #define CTEST_DEC_1207 1206 #define CTEST_DEC_1208 1207 #define CTEST_DEC_1209 1208 #define CTEST_DEC_1210 1209 #define CTEST_DEC_1211 1210 #define CTEST_DEC_1212 1211 #define CTEST_DEC_1213 1212 #define CTEST_DEC_1214 1213 #define CTEST_DEC_1215 1214 #define CTEST_DEC_1216 1215 #define CTEST_DEC_1217 1216 #define CTEST_DEC_1218 1217 #define CTEST_DEC_1219 1218 #define CTEST_DEC_1220 1219 #define CTEST_DEC_1221 1220 #define CTEST_DEC_1222 1221 #define CTEST_DEC_1223 1222 #define CTEST_DEC_1224 1223 #define CTEST_DEC_1225 1224 #define CTEST_DEC_1226 1225 #define CTEST_DEC_1227 1226 #define CTEST_DEC_1228 1227 #define CTEST_DEC_1229 1228 #define CTEST_DEC_1230 1229 #define CTEST_DEC_1231 1230 #define CTEST_DEC_1232 1231 #define CTEST_DEC_1233 1232 #define CTEST_DEC_1234 1233 #define CTEST_DEC_1235 1234 #define CTEST_DEC_1236 1235 #define CTEST_DEC_1237 1236 #define CTEST_DEC_1238 1237 #define CTEST_DEC_1239 1238 #define CTEST_DEC_1240 1239 #define CTEST_DEC_1241 1240 #define CTEST_DEC_1242 1241 #define CTEST_DEC_1243 1242 #define CTEST_DEC_1244 1243 #define CTEST_DEC_1245 1244 #define CTEST_DEC_1246 1245 #define CTEST_DEC_1247 1246 #define CTEST_DEC_1248 1247 #define CTEST_DEC_1249 1248 #define CTEST_DEC_1250 1249 #define CTEST_DEC_1251 1250 #define CTEST_DEC_1252 1251 #define CTEST_DEC_1253 1252 #define CTEST_DEC_1254 1253 #define CTEST_DEC_1255 1254 #define CTEST_DEC_1256 1255 #define CTEST_DEC_1257 1256 #define CTEST_DEC_1258 1257 #define CTEST_DEC_1259 1258 #define CTEST_DEC_1260 1259 #define CTEST_DEC_1261 1260 #define CTEST_DEC_1262 1261 #define CTEST_DEC_1263 1262 #define CTEST_DEC_1264 1263 #define CTEST_DEC_1265 1264 #define CTEST_DEC_1266 1265 #define CTEST_DEC_1267 1266 #define CTEST_DEC_1268 1267 #define CTEST_DEC_1269 1268 #define CTEST_DEC_1270 1269 #define CTEST_DEC_1271 1270 #define CTEST_DEC_1272 1271 #define CTEST_DEC_1273 1272 #define CTEST_DEC_1274 1273 #define CTEST_DEC_1275 1274 #define CTEST_DEC_1276 1275 #define CTEST_DEC_1277 1276 #define CTEST_DEC_1278 1277 #define CTEST_DEC_1279 1278 #define CTEST_DEC_1280 1279 #define CTEST_DEC_1281 1280 #define CTEST_DEC_1282 1281 #define CTEST_DEC_1283 1282 #define CTEST_DEC_1284 1283 #define CTEST_DEC_1285 1284 #define CTEST_DEC_1286 1285 #define CTEST_DEC_1287 1286 #define CTEST_DEC_1288 1287 #define CTEST_DEC_1289 1288 #define CTEST_DEC_1290 1289 #define CTEST_DEC_1291 1290 #define CTEST_DEC_1292 1291 #define CTEST_DEC_1293 1292 #define CTEST_DEC_1294 1293 #define CTEST_DEC_1295 1294 #define CTEST_DEC_1296 1295 #define CTEST_DEC_1297 1296 #define CTEST_DEC_1298 1297 #define CTEST_DEC_1299 1298 #define CTEST_DEC_1300 1299 #define CTEST_DEC_1301 1300 #define CTEST_DEC_1302 1301 #define CTEST_DEC_1303 1302 #define CTEST_DEC_1304 1303 #define CTEST_DEC_1305 1304 #define CTEST_DEC_1306 1305 #define CTEST_DEC_1307 1306 #define CTEST_DEC_1308 1307 #define CTEST_DEC_1309 1308 #define CTEST_DEC_1310 1309 #define CTEST_DEC_1311 1310 #define CTEST_DEC_1312 1311 #define CTEST_DEC_1313 1312 #define CTEST_DEC_1314 1313 #define CTEST_DEC_1315 1314 #define CTEST_DEC_1316 1315 #define CTEST_DEC_1317 1316 #define CTEST_DEC_1318 1317 #define CTEST_DEC_1319 1318 #define CTEST_DEC_1320 1319 #define CTEST_DEC_1321 1320 #define CTEST_DEC_1322 1321 #define CTEST_DEC_1323 1322 #define CTEST_DEC_1324 1323 #define CTEST_DEC_1325 1324 #define CTEST_DEC_1326 1325 #define CTEST_DEC_1327 1326 #define CTEST_DEC_1328 1327 #define CTEST_DEC_1329 1328 #define CTEST_DEC_1330 1329 #define CTEST_DEC_1331 1330 #define CTEST_DEC_1332 1331 #define CTEST_DEC_1333 1332 #define CTEST_DEC_1334 1333 #define CTEST_DEC_1335 1334 #define CTEST_DEC_1336 1335 #define CTEST_DEC_1337 1336 #define CTEST_DEC_1338 1337 #define CTEST_DEC_1339 1338 #define CTEST_DEC_1340 1339 #define CTEST_DEC_1341 1340 #define CTEST_DEC_1342 1341 #define CTEST_DEC_1343 1342 #define CTEST_DEC_1344 1343 #define CTEST_DEC_1345 1344 #define CTEST_DEC_1346 1345 #define CTEST_DEC_1347 1346 #define CTEST_DEC_1348 1347 #define CTEST_DEC_1349 1348 #define CTEST_DEC_1350 1349 #define CTEST_DEC_1351 1350 #define CTEST_DEC_1352 1351 #define CTEST_DEC_1353 1352 #define CTEST_DEC_1354 1353 #define CTEST_DEC_1355 1354 #define CTEST_DEC_1356 1355 #define CTEST_DEC_1357 1356 #define CTEST_DEC_1358 1357 #define CTEST_DEC_1359 1358 #define CTEST_DEC_1360 1359 #define CTEST_DEC_1361 1360 #define CTEST_DEC_1362 1361 #define CTEST_DEC_1363 1362 #define CTEST_DEC_1364 1363 #define CTEST_DEC_1365 1364 #define CTEST_DEC_1366 1365 #define CTEST_DEC_1367 1366 #define CTEST_DEC_1368 1367 #define CTEST_DEC_1369 1368 #define CTEST_DEC_1370 1369 #define CTEST_DEC_1371 1370 #define CTEST_DEC_1372 1371 #define CTEST_DEC_1373 1372 #define CTEST_DEC_1374 1373 #define CTEST_DEC_1375 1374 #define CTEST_DEC_1376 1375 #define CTEST_DEC_1377 1376 #define CTEST_DEC_1378 1377 #define CTEST_DEC_1379 1378 #define CTEST_DEC_1380 1379 #define CTEST_DEC_1381 1380 #define CTEST_DEC_1382 1381 #define CTEST_DEC_1383 1382 #define CTEST_DEC_1384 1383 #define CTEST_DEC_1385 1384 #define CTEST_DEC_1386 1385 #define CTEST_DEC_1387 1386 #define CTEST_DEC_1388 1387 #define CTEST_DEC_1389 1388 #define CTEST_DEC_1390 1389 #define CTEST_DEC_1391 1390 #define CTEST_DEC_1392 1391 #define CTEST_DEC_1393 1392 #define CTEST_DEC_1394 1393 #define CTEST_DEC_1395 1394 #define CTEST_DEC_1396 1395 #define CTEST_DEC_1397 1396 #define CTEST_DEC_1398 1397 #define CTEST_DEC_1399 1398 #define CTEST_DEC_1400 1399 #define CTEST_DEC_1401 1400 #define CTEST_DEC_1402 1401 #define CTEST_DEC_1403 1402 #define CTEST_DEC_1404 1403 #define CTEST_DEC_1405 1404 #define CTEST_DEC_1406 1405 #define CTEST_DEC_1407 1406 #define CTEST_DEC_1408 1407 #define CTEST_DEC_1409 1408 #define CTEST_DEC_1410 1409 #define CTEST_DEC_1411 1410 #define CTEST_DEC_1412 1411 #define CTEST_DEC_1413 1412 #define CTEST_DEC_1414 1413 #define CTEST_DEC_1415 1414 #define CTEST_DEC_1416 1415 #define CTEST_DEC_1417 1416 #define CTEST_DEC_1418 1417 #define CTEST_DEC_1419 1418 #define CTEST_DEC_1420 1419 #define CTEST_DEC_1421 1420 #define CTEST_DEC_1422 1421 #define CTEST_DEC_1423 1422 #define CTEST_DEC_1424 1423 #define CTEST_DEC_1425 1424 #define CTEST_DEC_1426 1425 #define CTEST_DEC_1427 1426 #define CTEST_DEC_1428 1427 #define CTEST_DEC_1429 1428 #define CTEST_DEC_1430 1429 #define CTEST_DEC_1431 1430 #define CTEST_DEC_1432 1431 #define CTEST_DEC_1433 1432 #define CTEST_DEC_1434 1433 #define CTEST_DEC_1435 1434 #define CTEST_DEC_1436 1435 #define CTEST_DEC_1437 1436 #define CTEST_DEC_1438 1437 #define CTEST_DEC_1439 1438 #define CTEST_DEC_1440 1439 #define CTEST_DEC_1441 1440 #define CTEST_DEC_1442 1441 #define CTEST_DEC_1443 1442 #define CTEST_DEC_1444 1443 #define CTEST_DEC_1445 1444 #define CTEST_DEC_1446 1445 #define CTEST_DEC_1447 1446 #define CTEST_DEC_1448 1447 #define CTEST_DEC_1449 1448 #define CTEST_DEC_1450 1449 #define CTEST_DEC_1451 1450 #define CTEST_DEC_1452 1451 #define CTEST_DEC_1453 1452 #define CTEST_DEC_1454 1453 #define CTEST_DEC_1455 1454 #define CTEST_DEC_1456 1455 #define CTEST_DEC_1457 1456 #define CTEST_DEC_1458 1457 #define CTEST_DEC_1459 1458 #define CTEST_DEC_1460 1459 #define CTEST_DEC_1461 1460 #define CTEST_DEC_1462 1461 #define CTEST_DEC_1463 1462 #define CTEST_DEC_1464 1463 #define CTEST_DEC_1465 1464 #define CTEST_DEC_1466 1465 #define CTEST_DEC_1467 1466 #define CTEST_DEC_1468 1467 #define CTEST_DEC_1469 1468 #define CTEST_DEC_1470 1469 #define CTEST_DEC_1471 1470 #define CTEST_DEC_1472 1471 #define CTEST_DEC_1473 1472 #define CTEST_DEC_1474 1473 #define CTEST_DEC_1475 1474 #define CTEST_DEC_1476 1475 #define CTEST_DEC_1477 1476 #define CTEST_DEC_1478 1477 #define CTEST_DEC_1479 1478 #define CTEST_DEC_1480 1479 #define CTEST_DEC_1481 1480 #define CTEST_DEC_1482 1481 #define CTEST_DEC_1483 1482 #define CTEST_DEC_1484 1483 #define CTEST_DEC_1485 1484 #define CTEST_DEC_1486 1485 #define CTEST_DEC_1487 1486 #define CTEST_DEC_1488 1487 #define CTEST_DEC_1489 1488 #define CTEST_DEC_1490 1489 #define CTEST_DEC_1491 1490 #define CTEST_DEC_1492 1491 #define CTEST_DEC_1493 1492 #define CTEST_DEC_1494 1493 #define CTEST_DEC_1495 1494 #define CTEST_DEC_1496 1495 #define CTEST_DEC_1497 1496 #define CTEST_DEC_1498 1497 #define CTEST_DEC_1499 1498 #define CTEST_DEC_1500 1499 #define CTEST_DEC_1501 1500 #define CTEST_DEC_1502 1501 #define CTEST_DEC_1503 1502 #define CTEST_DEC_1504 1503 #define CTEST_DEC_1505 1504 #define CTEST_DEC_1506 1505 #define CTEST_DEC_1507 1506 #define CTEST_DEC_1508 1507 #define CTEST_DEC_1509 1508 #define CTEST_DEC_1510 1509 #define CTEST_DEC_1511 1510 #define CTEST_DEC_1512 1511 #define CTEST_DEC_1513 1512 #define CTEST_DEC_1514 1513 #define CTEST_DEC_1515 1514 #define CTEST_DEC_1516 1515 #define CTEST_DEC_1517 1516 #define CTEST_DEC_1518 1517 #define CTEST_DEC_1519 1518 #define CTEST_DEC_1520 1519 #define CTEST_DEC_1521 1520 #define CTEST_DEC_1522 1521 #define CTEST_DEC_1523 1522 #define CTEST_DEC_1524 1523 #define CTEST_DEC_1525 1524 #define CTEST_DEC_1526 1525 #define CTEST_DEC_1527 1526 #define CTEST_DEC_1528 1527 #define CTEST_DEC_1529 1528 #define CTEST_DEC_1530 1529 #define CTEST_DEC_1531 1530 #define CTEST_DEC_1532 1531 #define CTEST_DEC_1533 1532 #define CTEST_DEC_1534 1533 #define CTEST_DEC_1535 1534 #define CTEST_DEC_1536 1535 #define CTEST_DEC_1537 1536 #define CTEST_DEC_1538 1537 #define CTEST_DEC_1539 1538 #define CTEST_DEC_1540 1539 #define CTEST_DEC_1541 1540 #define CTEST_DEC_1542 1541 #define CTEST_DEC_1543 1542 #define CTEST_DEC_1544 1543 #define CTEST_DEC_1545 1544 #define CTEST_DEC_1546 1545 #define CTEST_DEC_1547 1546 #define CTEST_DEC_1548 1547 #define CTEST_DEC_1549 1548 #define CTEST_DEC_1550 1549 #define CTEST_DEC_1551 1550 #define CTEST_DEC_1552 1551 #define CTEST_DEC_1553 1552 #define CTEST_DEC_1554 1553 #define CTEST_DEC_1555 1554 #define CTEST_DEC_1556 1555 #define CTEST_DEC_1557 1556 #define CTEST_DEC_1558 1557 #define CTEST_DEC_1559 1558 #define CTEST_DEC_1560 1559 #define CTEST_DEC_1561 1560 #define CTEST_DEC_1562 1561 #define CTEST_DEC_1563 1562 #define CTEST_DEC_1564 1563 #define CTEST_DEC_1565 1564 #define CTEST_DEC_1566 1565 #define CTEST_DEC_1567 1566 #define CTEST_DEC_1568 1567 #define CTEST_DEC_1569 1568 #define CTEST_DEC_1570 1569 #define CTEST_DEC_1571 1570 #define CTEST_DEC_1572 1571 #define CTEST_DEC_1573 1572 #define CTEST_DEC_1574 1573 #define CTEST_DEC_1575 1574 #define CTEST_DEC_1576 1575 #define CTEST_DEC_1577 1576 #define CTEST_DEC_1578 1577 #define CTEST_DEC_1579 1578 #define CTEST_DEC_1580 1579 #define CTEST_DEC_1581 1580 #define CTEST_DEC_1582 1581 #define CTEST_DEC_1583 1582 #define CTEST_DEC_1584 1583 #define CTEST_DEC_1585 1584 #define CTEST_DEC_1586 1585 #define CTEST_DEC_1587 1586 #define CTEST_DEC_1588 1587 #define CTEST_DEC_1589 1588 #define CTEST_DEC_1590 1589 #define CTEST_DEC_1591 1590 #define CTEST_DEC_1592 1591 #define CTEST_DEC_1593 1592 #define CTEST_DEC_1594 1593 #define CTEST_DEC_1595 1594 #define CTEST_DEC_1596 1595 #define CTEST_DEC_1597 1596 #define CTEST_DEC_1598 1597 #define CTEST_DEC_1599 1598 #define CTEST_DEC_1600 1599 #define CTEST_DEC_1601 1600 #define CTEST_DEC_1602 1601 #define CTEST_DEC_1603 1602 #define CTEST_DEC_1604 1603 #define CTEST_DEC_1605 1604 #define CTEST_DEC_1606 1605 #define CTEST_DEC_1607 1606 #define CTEST_DEC_1608 1607 #define CTEST_DEC_1609 1608 #define CTEST_DEC_1610 1609 #define CTEST_DEC_1611 1610 #define CTEST_DEC_1612 1611 #define CTEST_DEC_1613 1612 #define CTEST_DEC_1614 1613 #define CTEST_DEC_1615 1614 #define CTEST_DEC_1616 1615 #define CTEST_DEC_1617 1616 #define CTEST_DEC_1618 1617 #define CTEST_DEC_1619 1618 #define CTEST_DEC_1620 1619 #define CTEST_DEC_1621 1620 #define CTEST_DEC_1622 1621 #define CTEST_DEC_1623 1622 #define CTEST_DEC_1624 1623 #define CTEST_DEC_1625 1624 #define CTEST_DEC_1626 1625 #define CTEST_DEC_1627 1626 #define CTEST_DEC_1628 1627 #define CTEST_DEC_1629 1628 #define CTEST_DEC_1630 1629 #define CTEST_DEC_1631 1630 #define CTEST_DEC_1632 1631 #define CTEST_DEC_1633 1632 #define CTEST_DEC_1634 1633 #define CTEST_DEC_1635 1634 #define CTEST_DEC_1636 1635 #define CTEST_DEC_1637 1636 #define CTEST_DEC_1638 1637 #define CTEST_DEC_1639 1638 #define CTEST_DEC_1640 1639 #define CTEST_DEC_1641 1640 #define CTEST_DEC_1642 1641 #define CTEST_DEC_1643 1642 #define CTEST_DEC_1644 1643 #define CTEST_DEC_1645 1644 #define CTEST_DEC_1646 1645 #define CTEST_DEC_1647 1646 #define CTEST_DEC_1648 1647 #define CTEST_DEC_1649 1648 #define CTEST_DEC_1650 1649 #define CTEST_DEC_1651 1650 #define CTEST_DEC_1652 1651 #define CTEST_DEC_1653 1652 #define CTEST_DEC_1654 1653 #define CTEST_DEC_1655 1654 #define CTEST_DEC_1656 1655 #define CTEST_DEC_1657 1656 #define CTEST_DEC_1658 1657 #define CTEST_DEC_1659 1658 #define CTEST_DEC_1660 1659 #define CTEST_DEC_1661 1660 #define CTEST_DEC_1662 1661 #define CTEST_DEC_1663 1662 #define CTEST_DEC_1664 1663 #define CTEST_DEC_1665 1664 #define CTEST_DEC_1666 1665 #define CTEST_DEC_1667 1666 #define CTEST_DEC_1668 1667 #define CTEST_DEC_1669 1668 #define CTEST_DEC_1670 1669 #define CTEST_DEC_1671 1670 #define CTEST_DEC_1672 1671 #define CTEST_DEC_1673 1672 #define CTEST_DEC_1674 1673 #define CTEST_DEC_1675 1674 #define CTEST_DEC_1676 1675 #define CTEST_DEC_1677 1676 #define CTEST_DEC_1678 1677 #define CTEST_DEC_1679 1678 #define CTEST_DEC_1680 1679 #define CTEST_DEC_1681 1680 #define CTEST_DEC_1682 1681 #define CTEST_DEC_1683 1682 #define CTEST_DEC_1684 1683 #define CTEST_DEC_1685 1684 #define CTEST_DEC_1686 1685 #define CTEST_DEC_1687 1686 #define CTEST_DEC_1688 1687 #define CTEST_DEC_1689 1688 #define CTEST_DEC_1690 1689 #define CTEST_DEC_1691 1690 #define CTEST_DEC_1692 1691 #define CTEST_DEC_1693 1692 #define CTEST_DEC_1694 1693 #define CTEST_DEC_1695 1694 #define CTEST_DEC_1696 1695 #define CTEST_DEC_1697 1696 #define CTEST_DEC_1698 1697 #define CTEST_DEC_1699 1698 #define CTEST_DEC_1700 1699 #define CTEST_DEC_1701 1700 #define CTEST_DEC_1702 1701 #define CTEST_DEC_1703 1702 #define CTEST_DEC_1704 1703 #define CTEST_DEC_1705 1704 #define CTEST_DEC_1706 1705 #define CTEST_DEC_1707 1706 #define CTEST_DEC_1708 1707 #define CTEST_DEC_1709 1708 #define CTEST_DEC_1710 1709 #define CTEST_DEC_1711 1710 #define CTEST_DEC_1712 1711 #define CTEST_DEC_1713 1712 #define CTEST_DEC_1714 1713 #define CTEST_DEC_1715 1714 #define CTEST_DEC_1716 1715 #define CTEST_DEC_1717 1716 #define CTEST_DEC_1718 1717 #define CTEST_DEC_1719 1718 #define CTEST_DEC_1720 1719 #define CTEST_DEC_1721 1720 #define CTEST_DEC_1722 1721 #define CTEST_DEC_1723 1722 #define CTEST_DEC_1724 1723 #define CTEST_DEC_1725 1724 #define CTEST_DEC_1726 1725 #define CTEST_DEC_1727 1726 #define CTEST_DEC_1728 1727 #define CTEST_DEC_1729 1728 #define CTEST_DEC_1730 1729 #define CTEST_DEC_1731 1730 #define CTEST_DEC_1732 1731 #define CTEST_DEC_1733 1732 #define CTEST_DEC_1734 1733 #define CTEST_DEC_1735 1734 #define CTEST_DEC_1736 1735 #define CTEST_DEC_1737 1736 #define CTEST_DEC_1738 1737 #define CTEST_DEC_1739 1738 #define CTEST_DEC_1740 1739 #define CTEST_DEC_1741 1740 #define CTEST_DEC_1742 1741 #define CTEST_DEC_1743 1742 #define CTEST_DEC_1744 1743 #define CTEST_DEC_1745 1744 #define CTEST_DEC_1746 1745 #define CTEST_DEC_1747 1746 #define CTEST_DEC_1748 1747 #define CTEST_DEC_1749 1748 #define CTEST_DEC_1750 1749 #define CTEST_DEC_1751 1750 #define CTEST_DEC_1752 1751 #define CTEST_DEC_1753 1752 #define CTEST_DEC_1754 1753 #define CTEST_DEC_1755 1754 #define CTEST_DEC_1756 1755 #define CTEST_DEC_1757 1756 #define CTEST_DEC_1758 1757 #define CTEST_DEC_1759 1758 #define CTEST_DEC_1760 1759 #define CTEST_DEC_1761 1760 #define CTEST_DEC_1762 1761 #define CTEST_DEC_1763 1762 #define CTEST_DEC_1764 1763 #define CTEST_DEC_1765 1764 #define CTEST_DEC_1766 1765 #define CTEST_DEC_1767 1766 #define CTEST_DEC_1768 1767 #define CTEST_DEC_1769 1768 #define CTEST_DEC_1770 1769 #define CTEST_DEC_1771 1770 #define CTEST_DEC_1772 1771 #define CTEST_DEC_1773 1772 #define CTEST_DEC_1774 1773 #define CTEST_DEC_1775 1774 #define CTEST_DEC_1776 1775 #define CTEST_DEC_1777 1776 #define CTEST_DEC_1778 1777 #define CTEST_DEC_1779 1778 #define CTEST_DEC_1780 1779 #define CTEST_DEC_1781 1780 #define CTEST_DEC_1782 1781 #define CTEST_DEC_1783 1782 #define CTEST_DEC_1784 1783 #define CTEST_DEC_1785 1784 #define CTEST_DEC_1786 1785 #define CTEST_DEC_1787 1786 #define CTEST_DEC_1788 1787 #define CTEST_DEC_1789 1788 #define CTEST_DEC_1790 1789 #define CTEST_DEC_1791 1790 #define CTEST_DEC_1792 1791 #define CTEST_DEC_1793 1792 #define CTEST_DEC_1794 1793 #define CTEST_DEC_1795 1794 #define CTEST_DEC_1796 1795 #define CTEST_DEC_1797 1796 #define CTEST_DEC_1798 1797 #define CTEST_DEC_1799 1798 #define CTEST_DEC_1800 1799 #define CTEST_DEC_1801 1800 #define CTEST_DEC_1802 1801 #define CTEST_DEC_1803 1802 #define CTEST_DEC_1804 1803 #define CTEST_DEC_1805 1804 #define CTEST_DEC_1806 1805 #define CTEST_DEC_1807 1806 #define CTEST_DEC_1808 1807 #define CTEST_DEC_1809 1808 #define CTEST_DEC_1810 1809 #define CTEST_DEC_1811 1810 #define CTEST_DEC_1812 1811 #define CTEST_DEC_1813 1812 #define CTEST_DEC_1814 1813 #define CTEST_DEC_1815 1814 #define CTEST_DEC_1816 1815 #define CTEST_DEC_1817 1816 #define CTEST_DEC_1818 1817 #define CTEST_DEC_1819 1818 #define CTEST_DEC_1820 1819 #define CTEST_DEC_1821 1820 #define CTEST_DEC_1822 1821 #define CTEST_DEC_1823 1822 #define CTEST_DEC_1824 1823 #define CTEST_DEC_1825 1824 #define CTEST_DEC_1826 1825 #define CTEST_DEC_1827 1826 #define CTEST_DEC_1828 1827 #define CTEST_DEC_1829 1828 #define CTEST_DEC_1830 1829 #define CTEST_DEC_1831 1830 #define CTEST_DEC_1832 1831 #define CTEST_DEC_1833 1832 #define CTEST_DEC_1834 1833 #define CTEST_DEC_1835 1834 #define CTEST_DEC_1836 1835 #define CTEST_DEC_1837 1836 #define CTEST_DEC_1838 1837 #define CTEST_DEC_1839 1838 #define CTEST_DEC_1840 1839 #define CTEST_DEC_1841 1840 #define CTEST_DEC_1842 1841 #define CTEST_DEC_1843 1842 #define CTEST_DEC_1844 1843 #define CTEST_DEC_1845 1844 #define CTEST_DEC_1846 1845 #define CTEST_DEC_1847 1846 #define CTEST_DEC_1848 1847 #define CTEST_DEC_1849 1848 #define CTEST_DEC_1850 1849 #define CTEST_DEC_1851 1850 #define CTEST_DEC_1852 1851 #define CTEST_DEC_1853 1852 #define CTEST_DEC_1854 1853 #define CTEST_DEC_1855 1854 #define CTEST_DEC_1856 1855 #define CTEST_DEC_1857 1856 #define CTEST_DEC_1858 1857 #define CTEST_DEC_1859 1858 #define CTEST_DEC_1860 1859 #define CTEST_DEC_1861 1860 #define CTEST_DEC_1862 1861 #define CTEST_DEC_1863 1862 #define CTEST_DEC_1864 1863 #define CTEST_DEC_1865 1864 #define CTEST_DEC_1866 1865 #define CTEST_DEC_1867 1866 #define CTEST_DEC_1868 1867 #define CTEST_DEC_1869 1868 #define CTEST_DEC_1870 1869 #define CTEST_DEC_1871 1870 #define CTEST_DEC_1872 1871 #define CTEST_DEC_1873 1872 #define CTEST_DEC_1874 1873 #define CTEST_DEC_1875 1874 #define CTEST_DEC_1876 1875 #define CTEST_DEC_1877 1876 #define CTEST_DEC_1878 1877 #define CTEST_DEC_1879 1878 #define CTEST_DEC_1880 1879 #define CTEST_DEC_1881 1880 #define CTEST_DEC_1882 1881 #define CTEST_DEC_1883 1882 #define CTEST_DEC_1884 1883 #define CTEST_DEC_1885 1884 #define CTEST_DEC_1886 1885 #define CTEST_DEC_1887 1886 #define CTEST_DEC_1888 1887 #define CTEST_DEC_1889 1888 #define CTEST_DEC_1890 1889 #define CTEST_DEC_1891 1890 #define CTEST_DEC_1892 1891 #define CTEST_DEC_1893 1892 #define CTEST_DEC_1894 1893 #define CTEST_DEC_1895 1894 #define CTEST_DEC_1896 1895 #define CTEST_DEC_1897 1896 #define CTEST_DEC_1898 1897 #define CTEST_DEC_1899 1898 #define CTEST_DEC_1900 1899 #define CTEST_DEC_1901 1900 #define CTEST_DEC_1902 1901 #define CTEST_DEC_1903 1902 #define CTEST_DEC_1904 1903 #define CTEST_DEC_1905 1904 #define CTEST_DEC_1906 1905 #define CTEST_DEC_1907 1906 #define CTEST_DEC_1908 1907 #define CTEST_DEC_1909 1908 #define CTEST_DEC_1910 1909 #define CTEST_DEC_1911 1910 #define CTEST_DEC_1912 1911 #define CTEST_DEC_1913 1912 #define CTEST_DEC_1914 1913 #define CTEST_DEC_1915 1914 #define CTEST_DEC_1916 1915 #define CTEST_DEC_1917 1916 #define CTEST_DEC_1918 1917 #define CTEST_DEC_1919 1918 #define CTEST_DEC_1920 1919 #define CTEST_DEC_1921 1920 #define CTEST_DEC_1922 1921 #define CTEST_DEC_1923 1922 #define CTEST_DEC_1924 1923 #define CTEST_DEC_1925 1924 #define CTEST_DEC_1926 1925 #define CTEST_DEC_1927 1926 #define CTEST_DEC_1928 1927 #define CTEST_DEC_1929 1928 #define CTEST_DEC_1930 1929 #define CTEST_DEC_1931 1930 #define CTEST_DEC_1932 1931 #define CTEST_DEC_1933 1932 #define CTEST_DEC_1934 1933 #define CTEST_DEC_1935 1934 #define CTEST_DEC_1936 1935 #define CTEST_DEC_1937 1936 #define CTEST_DEC_1938 1937 #define CTEST_DEC_1939 1938 #define CTEST_DEC_1940 1939 #define CTEST_DEC_1941 1940 #define CTEST_DEC_1942 1941 #define CTEST_DEC_1943 1942 #define CTEST_DEC_1944 1943 #define CTEST_DEC_1945 1944 #define CTEST_DEC_1946 1945 #define CTEST_DEC_1947 1946 #define CTEST_DEC_1948 1947 #define CTEST_DEC_1949 1948 #define CTEST_DEC_1950 1949 #define CTEST_DEC_1951 1950 #define CTEST_DEC_1952 1951 #define CTEST_DEC_1953 1952 #define CTEST_DEC_1954 1953 #define CTEST_DEC_1955 1954 #define CTEST_DEC_1956 1955 #define CTEST_DEC_1957 1956 #define CTEST_DEC_1958 1957 #define CTEST_DEC_1959 1958 #define CTEST_DEC_1960 1959 #define CTEST_DEC_1961 1960 #define CTEST_DEC_1962 1961 #define CTEST_DEC_1963 1962 #define CTEST_DEC_1964 1963 #define CTEST_DEC_1965 1964 #define CTEST_DEC_1966 1965 #define CTEST_DEC_1967 1966 #define CTEST_DEC_1968 1967 #define CTEST_DEC_1969 1968 #define CTEST_DEC_1970 1969 #define CTEST_DEC_1971 1970 #define CTEST_DEC_1972 1971 #define CTEST_DEC_1973 1972 #define CTEST_DEC_1974 1973 #define CTEST_DEC_1975 1974 #define CTEST_DEC_1976 1975 #define CTEST_DEC_1977 1976 #define CTEST_DEC_1978 1977 #define CTEST_DEC_1979 1978 #define CTEST_DEC_1980 1979 #define CTEST_DEC_1981 1980 #define CTEST_DEC_1982 1981 #define CTEST_DEC_1983 1982 #define CTEST_DEC_1984 1983 #define CTEST_DEC_1985 1984 #define CTEST_DEC_1986 1985 #define CTEST_DEC_1987 1986 #define CTEST_DEC_1988 1987 #define CTEST_DEC_1989 1988 #define CTEST_DEC_1990 1989 #define CTEST_DEC_1991 1990 #define CTEST_DEC_1992 1991 #define CTEST_DEC_1993 1992 #define CTEST_DEC_1994 1993 #define CTEST_DEC_1995 1994 #define CTEST_DEC_1996 1995 #define CTEST_DEC_1997 1996 #define CTEST_DEC_1998 1997 #define CTEST_DEC_1999 1998 #define CTEST_DEC_2000 1999 #define CTEST_DEC_2001 2000 #define CTEST_DEC_2002 2001 #define CTEST_DEC_2003 2002 #define CTEST_DEC_2004 2003 #define CTEST_DEC_2005 2004 #define CTEST_DEC_2006 2005 #define CTEST_DEC_2007 2006 #define CTEST_DEC_2008 2007 #define CTEST_DEC_2009 2008 #define CTEST_DEC_2010 2009 #define CTEST_DEC_2011 2010 #define CTEST_DEC_2012 2011 #define CTEST_DEC_2013 2012 #define CTEST_DEC_2014 2013 #define CTEST_DEC_2015 2014 #define CTEST_DEC_2016 2015 #define CTEST_DEC_2017 2016 #define CTEST_DEC_2018 2017 #define CTEST_DEC_2019 2018 #define CTEST_DEC_2020 2019 #define CTEST_DEC_2021 2020 #define CTEST_DEC_2022 2021 #define CTEST_DEC_2023 2022 #define CTEST_DEC_2024 2023 #define CTEST_DEC_2025 2024 #define CTEST_DEC_2026 2025 #define CTEST_DEC_2027 2026 #define CTEST_DEC_2028 2027 #define CTEST_DEC_2029 2028 #define CTEST_DEC_2030 2029 #define CTEST_DEC_2031 2030 #define CTEST_DEC_2032 2031 #define CTEST_DEC_2033 2032 #define CTEST_DEC_2034 2033 #define CTEST_DEC_2035 2034 #define CTEST_DEC_2036 2035 #define CTEST_DEC_2037 2036 #define CTEST_DEC_2038 2037 #define CTEST_DEC_2039 2038 #define CTEST_DEC_2040 2039 #define CTEST_DEC_2041 2040 #define CTEST_DEC_2042 2041 #define CTEST_DEC_2043 2042 #define CTEST_DEC_2044 2043 #define CTEST_DEC_2045 2044 #define CTEST_DEC_2046 2045 #define CTEST_DEC_2047 2046 #define CTEST_DEC_2048 2047 #define CTEST_DEC_2049 2048 #define CTEST_DEC_2050 2049 #define CTEST_DEC_2051 2050 #define CTEST_DEC_2052 2051 #define CTEST_DEC_2053 2052 #define CTEST_DEC_2054 2053 #define CTEST_DEC_2055 2054 #define CTEST_DEC_2056 2055 #define CTEST_DEC_2057 2056 #define CTEST_DEC_2058 2057 #define CTEST_DEC_2059 2058 #define CTEST_DEC_2060 2059 #define CTEST_DEC_2061 2060 #define CTEST_DEC_2062 2061 #define CTEST_DEC_2063 2062 #define CTEST_DEC_2064 2063 #define CTEST_DEC_2065 2064 #define CTEST_DEC_2066 2065 #define CTEST_DEC_2067 2066 #define CTEST_DEC_2068 2067 #define CTEST_DEC_2069 2068 #define CTEST_DEC_2070 2069 #define CTEST_DEC_2071 2070 #define CTEST_DEC_2072 2071 #define CTEST_DEC_2073 2072 #define CTEST_DEC_2074 2073 #define CTEST_DEC_2075 2074 #define CTEST_DEC_2076 2075 #define CTEST_DEC_2077 2076 #define CTEST_DEC_2078 2077 #define CTEST_DEC_2079 2078 #define CTEST_DEC_2080 2079 #define CTEST_DEC_2081 2080 #define CTEST_DEC_2082 2081 #define CTEST_DEC_2083 2082 #define CTEST_DEC_2084 2083 #define CTEST_DEC_2085 2084 #define CTEST_DEC_2086 2085 #define CTEST_DEC_2087 2086 #define CTEST_DEC_2088 2087 #define CTEST_DEC_2089 2088 #define CTEST_DEC_2090 2089 #define CTEST_DEC_2091 2090 #define CTEST_DEC_2092 2091 #define CTEST_DEC_2093 2092 #define CTEST_DEC_2094 2093 #define CTEST_DEC_2095 2094 #define CTEST_DEC_2096 2095 #define CTEST_DEC_2097 2096 #define CTEST_DEC_2098 2097 #define CTEST_DEC_2099 2098 #define CTEST_DEC_2100 2099 #define CTEST_DEC_2101 2100 #define CTEST_DEC_2102 2101 #define CTEST_DEC_2103 2102 #define CTEST_DEC_2104 2103 #define CTEST_DEC_2105 2104 #define CTEST_DEC_2106 2105 #define CTEST_DEC_2107 2106 #define CTEST_DEC_2108 2107 #define CTEST_DEC_2109 2108 #define CTEST_DEC_2110 2109 #define CTEST_DEC_2111 2110 #define CTEST_DEC_2112 2111 #define CTEST_DEC_2113 2112 #define CTEST_DEC_2114 2113 #define CTEST_DEC_2115 2114 #define CTEST_DEC_2116 2115 #define CTEST_DEC_2117 2116 #define CTEST_DEC_2118 2117 #define CTEST_DEC_2119 2118 #define CTEST_DEC_2120 2119 #define CTEST_DEC_2121 2120 #define CTEST_DEC_2122 2121 #define CTEST_DEC_2123 2122 #define CTEST_DEC_2124 2123 #define CTEST_DEC_2125 2124 #define CTEST_DEC_2126 2125 #define CTEST_DEC_2127 2126 #define CTEST_DEC_2128 2127 #define CTEST_DEC_2129 2128 #define CTEST_DEC_2130 2129 #define CTEST_DEC_2131 2130 #define CTEST_DEC_2132 2131 #define CTEST_DEC_2133 2132 #define CTEST_DEC_2134 2133 #define CTEST_DEC_2135 2134 #define CTEST_DEC_2136 2135 #define CTEST_DEC_2137 2136 #define CTEST_DEC_2138 2137 #define CTEST_DEC_2139 2138 #define CTEST_DEC_2140 2139 #define CTEST_DEC_2141 2140 #define CTEST_DEC_2142 2141 #define CTEST_DEC_2143 2142 #define CTEST_DEC_2144 2143 #define CTEST_DEC_2145 2144 #define CTEST_DEC_2146 2145 #define CTEST_DEC_2147 2146 #define CTEST_DEC_2148 2147 #define CTEST_DEC_2149 2148 #define CTEST_DEC_2150 2149 #define CTEST_DEC_2151 2150 #define CTEST_DEC_2152 2151 #define CTEST_DEC_2153 2152 #define CTEST_DEC_2154 2153 #define CTEST_DEC_2155 2154 #define CTEST_DEC_2156 2155 #define CTEST_DEC_2157 2156 #define CTEST_DEC_2158 2157 #define CTEST_DEC_2159 2158 #define CTEST_DEC_2160 2159 #define CTEST_DEC_2161 2160 #define CTEST_DEC_2162 2161 #define CTEST_DEC_2163 2162 #define CTEST_DEC_2164 2163 #define CTEST_DEC_2165 2164 #define CTEST_DEC_2166 2165 #define CTEST_DEC_2167 2166 #define CTEST_DEC_2168 2167 #define CTEST_DEC_2169 2168 #define CTEST_DEC_2170 2169 #define CTEST_DEC_2171 2170 #define CTEST_DEC_2172 2171 #define CTEST_DEC_2173 2172 #define CTEST_DEC_2174 2173 #define CTEST_DEC_2175 2174 #define CTEST_DEC_2176 2175 #define CTEST_DEC_2177 2176 #define CTEST_DEC_2178 2177 #define CTEST_DEC_2179 2178 #define CTEST_DEC_2180 2179 #define CTEST_DEC_2181 2180 #define CTEST_DEC_2182 2181 #define CTEST_DEC_2183 2182 #define CTEST_DEC_2184 2183 #define CTEST_DEC_2185 2184 #define CTEST_DEC_2186 2185 #define CTEST_DEC_2187 2186 #define CTEST_DEC_2188 2187 #define CTEST_DEC_2189 2188 #define CTEST_DEC_2190 2189 #define CTEST_DEC_2191 2190 #define CTEST_DEC_2192 2191 #define CTEST_DEC_2193 2192 #define CTEST_DEC_2194 2193 #define CTEST_DEC_2195 2194 #define CTEST_DEC_2196 2195 #define CTEST_DEC_2197 2196 #define CTEST_DEC_2198 2197 #define CTEST_DEC_2199 2198 #define CTEST_DEC_2200 2199 #define CTEST_DEC_2201 2200 #define CTEST_DEC_2202 2201 #define CTEST_DEC_2203 2202 #define CTEST_DEC_2204 2203 #define CTEST_DEC_2205 2204 #define CTEST_DEC_2206 2205 #define CTEST_DEC_2207 2206 #define CTEST_DEC_2208 2207 #define CTEST_DEC_2209 2208 #define CTEST_DEC_2210 2209 #define CTEST_DEC_2211 2210 #define CTEST_DEC_2212 2211 #define CTEST_DEC_2213 2212 #define CTEST_DEC_2214 2213 #define CTEST_DEC_2215 2214 #define CTEST_DEC_2216 2215 #define CTEST_DEC_2217 2216 #define CTEST_DEC_2218 2217 #define CTEST_DEC_2219 2218 #define CTEST_DEC_2220 2219 #define CTEST_DEC_2221 2220 #define CTEST_DEC_2222 2221 #define CTEST_DEC_2223 2222 #define CTEST_DEC_2224 2223 #define CTEST_DEC_2225 2224 #define CTEST_DEC_2226 2225 #define CTEST_DEC_2227 2226 #define CTEST_DEC_2228 2227 #define CTEST_DEC_2229 2228 #define CTEST_DEC_2230 2229 #define CTEST_DEC_2231 2230 #define CTEST_DEC_2232 2231 #define CTEST_DEC_2233 2232 #define CTEST_DEC_2234 2233 #define CTEST_DEC_2235 2234 #define CTEST_DEC_2236 2235 #define CTEST_DEC_2237 2236 #define CTEST_DEC_2238 2237 #define CTEST_DEC_2239 2238 #define CTEST_DEC_2240 2239 #define CTEST_DEC_2241 2240 #define CTEST_DEC_2242 2241 #define CTEST_DEC_2243 2242 #define CTEST_DEC_2244 2243 #define CTEST_DEC_2245 2244 #define CTEST_DEC_2246 2245 #define CTEST_DEC_2247 2246 #define CTEST_DEC_2248 2247 #define CTEST_DEC_2249 2248 #define CTEST_DEC_2250 2249 #define CTEST_DEC_2251 2250 #define CTEST_DEC_2252 2251 #define CTEST_DEC_2253 2252 #define CTEST_DEC_2254 2253 #define CTEST_DEC_2255 2254 #define CTEST_DEC_2256 2255 #define CTEST_DEC_2257 2256 #define CTEST_DEC_2258 2257 #define CTEST_DEC_2259 2258 #define CTEST_DEC_2260 2259 #define CTEST_DEC_2261 2260 #define CTEST_DEC_2262 2261 #define CTEST_DEC_2263 2262 #define CTEST_DEC_2264 2263 #define CTEST_DEC_2265 2264 #define CTEST_DEC_2266 2265 #define CTEST_DEC_2267 2266 #define CTEST_DEC_2268 2267 #define CTEST_DEC_2269 2268 #define CTEST_DEC_2270 2269 #define CTEST_DEC_2271 2270 #define CTEST_DEC_2272 2271 #define CTEST_DEC_2273 2272 #define CTEST_DEC_2274 2273 #define CTEST_DEC_2275 2274 #define CTEST_DEC_2276 2275 #define CTEST_DEC_2277 2276 #define CTEST_DEC_2278 2277 #define CTEST_DEC_2279 2278 #define CTEST_DEC_2280 2279 #define CTEST_DEC_2281 2280 #define CTEST_DEC_2282 2281 #define CTEST_DEC_2283 2282 #define CTEST_DEC_2284 2283 #define CTEST_DEC_2285 2284 #define CTEST_DEC_2286 2285 #define CTEST_DEC_2287 2286 #define CTEST_DEC_2288 2287 #define CTEST_DEC_2289 2288 #define CTEST_DEC_2290 2289 #define CTEST_DEC_2291 2290 #define CTEST_DEC_2292 2291 #define CTEST_DEC_2293 2292 #define CTEST_DEC_2294 2293 #define CTEST_DEC_2295 2294 #define CTEST_DEC_2296 2295 #define CTEST_DEC_2297 2296 #define CTEST_DEC_2298 2297 #define CTEST_DEC_2299 2298 #define CTEST_DEC_2300 2299 #define CTEST_DEC_2301 2300 #define CTEST_DEC_2302 2301 #define CTEST_DEC_2303 2302 #define CTEST_DEC_2304 2303 #define CTEST_DEC_2305 2304 #define CTEST_DEC_2306 2305 #define CTEST_DEC_2307 2306 #define CTEST_DEC_2308 2307 #define CTEST_DEC_2309 2308 #define CTEST_DEC_2310 2309 #define CTEST_DEC_2311 2310 #define CTEST_DEC_2312 2311 #define CTEST_DEC_2313 2312 #define CTEST_DEC_2314 2313 #define CTEST_DEC_2315 2314 #define CTEST_DEC_2316 2315 #define CTEST_DEC_2317 2316 #define CTEST_DEC_2318 2317 #define CTEST_DEC_2319 2318 #define CTEST_DEC_2320 2319 #define CTEST_DEC_2321 2320 #define CTEST_DEC_2322 2321 #define CTEST_DEC_2323 2322 #define CTEST_DEC_2324 2323 #define CTEST_DEC_2325 2324 #define CTEST_DEC_2326 2325 #define CTEST_DEC_2327 2326 #define CTEST_DEC_2328 2327 #define CTEST_DEC_2329 2328 #define CTEST_DEC_2330 2329 #define CTEST_DEC_2331 2330 #define CTEST_DEC_2332 2331 #define CTEST_DEC_2333 2332 #define CTEST_DEC_2334 2333 #define CTEST_DEC_2335 2334 #define CTEST_DEC_2336 2335 #define CTEST_DEC_2337 2336 #define CTEST_DEC_2338 2337 #define CTEST_DEC_2339 2338 #define CTEST_DEC_2340 2339 #define CTEST_DEC_2341 2340 #define CTEST_DEC_2342 2341 #define CTEST_DEC_2343 2342 #define CTEST_DEC_2344 2343 #define CTEST_DEC_2345 2344 #define CTEST_DEC_2346 2345 #define CTEST_DEC_2347 2346 #define CTEST_DEC_2348 2347 #define CTEST_DEC_2349 2348 #define CTEST_DEC_2350 2349 #define CTEST_DEC_2351 2350 #define CTEST_DEC_2352 2351 #define CTEST_DEC_2353 2352 #define CTEST_DEC_2354 2353 #define CTEST_DEC_2355 2354 #define CTEST_DEC_2356 2355 #define CTEST_DEC_2357 2356 #define CTEST_DEC_2358 2357 #define CTEST_DEC_2359 2358 #define CTEST_DEC_2360 2359 #define CTEST_DEC_2361 2360 #define CTEST_DEC_2362 2361 #define CTEST_DEC_2363 2362 #define CTEST_DEC_2364 2363 #define CTEST_DEC_2365 2364 #define CTEST_DEC_2366 2365 #define CTEST_DEC_2367 2366 #define CTEST_DEC_2368 2367 #define CTEST_DEC_2369 2368 #define CTEST_DEC_2370 2369 #define CTEST_DEC_2371 2370 #define CTEST_DEC_2372 2371 #define CTEST_DEC_2373 2372 #define CTEST_DEC_2374 2373 #define CTEST_DEC_2375 2374 #define CTEST_DEC_2376 2375 #define CTEST_DEC_2377 2376 #define CTEST_DEC_2378 2377 #define CTEST_DEC_2379 2378 #define CTEST_DEC_2380 2379 #define CTEST_DEC_2381 2380 #define CTEST_DEC_2382 2381 #define CTEST_DEC_2383 2382 #define CTEST_DEC_2384 2383 #define CTEST_DEC_2385 2384 #define CTEST_DEC_2386 2385 #define CTEST_DEC_2387 2386 #define CTEST_DEC_2388 2387 #define CTEST_DEC_2389 2388 #define CTEST_DEC_2390 2389 #define CTEST_DEC_2391 2390 #define CTEST_DEC_2392 2391 #define CTEST_DEC_2393 2392 #define CTEST_DEC_2394 2393 #define CTEST_DEC_2395 2394 #define CTEST_DEC_2396 2395 #define CTEST_DEC_2397 2396 #define CTEST_DEC_2398 2397 #define CTEST_DEC_2399 2398 #define CTEST_DEC_2400 2399 #define CTEST_DEC_2401 2400 #define CTEST_DEC_2402 2401 #define CTEST_DEC_2403 2402 #define CTEST_DEC_2404 2403 #define CTEST_DEC_2405 2404 #define CTEST_DEC_2406 2405 #define CTEST_DEC_2407 2406 #define CTEST_DEC_2408 2407 #define CTEST_DEC_2409 2408 #define CTEST_DEC_2410 2409 #define CTEST_DEC_2411 2410 #define CTEST_DEC_2412 2411 #define CTEST_DEC_2413 2412 #define CTEST_DEC_2414 2413 #define CTEST_DEC_2415 2414 #define CTEST_DEC_2416 2415 #define CTEST_DEC_2417 2416 #define CTEST_DEC_2418 2417 #define CTEST_DEC_2419 2418 #define CTEST_DEC_2420 2419 #define CTEST_DEC_2421 2420 #define CTEST_DEC_2422 2421 #define CTEST_DEC_2423 2422 #define CTEST_DEC_2424 2423 #define CTEST_DEC_2425 2424 #define CTEST_DEC_2426 2425 #define CTEST_DEC_2427 2426 #define CTEST_DEC_2428 2427 #define CTEST_DEC_2429 2428 #define CTEST_DEC_2430 2429 #define CTEST_DEC_2431 2430 #define CTEST_DEC_2432 2431 #define CTEST_DEC_2433 2432 #define CTEST_DEC_2434 2433 #define CTEST_DEC_2435 2434 #define CTEST_DEC_2436 2435 #define CTEST_DEC_2437 2436 #define CTEST_DEC_2438 2437 #define CTEST_DEC_2439 2438 #define CTEST_DEC_2440 2439 #define CTEST_DEC_2441 2440 #define CTEST_DEC_2442 2441 #define CTEST_DEC_2443 2442 #define CTEST_DEC_2444 2443 #define CTEST_DEC_2445 2444 #define CTEST_DEC_2446 2445 #define CTEST_DEC_2447 2446 #define CTEST_DEC_2448 2447 #define CTEST_DEC_2449 2448 #define CTEST_DEC_2450 2449 #define CTEST_DEC_2451 2450 #define CTEST_DEC_2452 2451 #define CTEST_DEC_2453 2452 #define CTEST_DEC_2454 2453 #define CTEST_DEC_2455 2454 #define CTEST_DEC_2456 2455 #define CTEST_DEC_2457 2456 #define CTEST_DEC_2458 2457 #define CTEST_DEC_2459 2458 #define CTEST_DEC_2460 2459 #define CTEST_DEC_2461 2460 #define CTEST_DEC_2462 2461 #define CTEST_DEC_2463 2462 #define CTEST_DEC_2464 2463 #define CTEST_DEC_2465 2464 #define CTEST_DEC_2466 2465 #define CTEST_DEC_2467 2466 #define CTEST_DEC_2468 2467 #define CTEST_DEC_2469 2468 #define CTEST_DEC_2470 2469 #define CTEST_DEC_2471 2470 #define CTEST_DEC_2472 2471 #define CTEST_DEC_2473 2472 #define CTEST_DEC_2474 2473 #define CTEST_DEC_2475 2474 #define CTEST_DEC_2476 2475 #define CTEST_DEC_2477 2476 #define CTEST_DEC_2478 2477 #define CTEST_DEC_2479 2478 #define CTEST_DEC_2480 2479 #define CTEST_DEC_2481 2480 #define CTEST_DEC_2482 2481 #define CTEST_DEC_2483 2482 #define CTEST_DEC_2484 2483 #define CTEST_DEC_2485 2484 #define CTEST_DEC_2486 2485 #define CTEST_DEC_2487 2486 #define CTEST_DEC_2488 2487 #define CTEST_DEC_2489 2488 #define CTEST_DEC_2490 2489 #define CTEST_DEC_2491 2490 #define CTEST_DEC_2492 2491 #define CTEST_DEC_2493 2492 #define CTEST_DEC_2494 2493 #define CTEST_DEC_2495 2494 #define CTEST_DEC_2496 2495 #define CTEST_DEC_2497 2496 #define CTEST_DEC_2498 2497 #define CTEST_DEC_2499 2498 #define CTEST_DEC_2500 2499 #define CTEST_DEC_2501 2500 #define CTEST_DEC_2502 2501 #define CTEST_DEC_2503 2502 #define CTEST_DEC_2504 2503 #define CTEST_DEC_2505 2504 #define CTEST_DEC_2506 2505 #define CTEST_DEC_2507 2506 #define CTEST_DEC_2508 2507 #define CTEST_DEC_2509 2508 #define CTEST_DEC_2510 2509 #define CTEST_DEC_2511 2510 #define CTEST_DEC_2512 2511 #define CTEST_DEC_2513 2512 #define CTEST_DEC_2514 2513 #define CTEST_DEC_2515 2514 #define CTEST_DEC_2516 2515 #define CTEST_DEC_2517 2516 #define CTEST_DEC_2518 2517 #define CTEST_DEC_2519 2518 #define CTEST_DEC_2520 2519 #define CTEST_DEC_2521 2520 #define CTEST_DEC_2522 2521 #define CTEST_DEC_2523 2522 #define CTEST_DEC_2524 2523 #define CTEST_DEC_2525 2524 #define CTEST_DEC_2526 2525 #define CTEST_DEC_2527 2526 #define CTEST_DEC_2528 2527 #define CTEST_DEC_2529 2528 #define CTEST_DEC_2530 2529 #define CTEST_DEC_2531 2530 #define CTEST_DEC_2532 2531 #define CTEST_DEC_2533 2532 #define CTEST_DEC_2534 2533 #define CTEST_DEC_2535 2534 #define CTEST_DEC_2536 2535 #define CTEST_DEC_2537 2536 #define CTEST_DEC_2538 2537 #define CTEST_DEC_2539 2538 #define CTEST_DEC_2540 2539 #define CTEST_DEC_2541 2540 #define CTEST_DEC_2542 2541 #define CTEST_DEC_2543 2542 #define CTEST_DEC_2544 2543 #define CTEST_DEC_2545 2544 #define CTEST_DEC_2546 2545 #define CTEST_DEC_2547 2546 #define CTEST_DEC_2548 2547 #define CTEST_DEC_2549 2548 #define CTEST_DEC_2550 2549 #define CTEST_DEC_2551 2550 #define CTEST_DEC_2552 2551 #define CTEST_DEC_2553 2552 #define CTEST_DEC_2554 2553 #define CTEST_DEC_2555 2554 #define CTEST_DEC_2556 2555 #define CTEST_DEC_2557 2556 #define CTEST_DEC_2558 2557 #define CTEST_DEC_2559 2558 #define CTEST_DEC_2560 2559 #define CTEST_DEC_2561 2560 #define CTEST_DEC_2562 2561 #define CTEST_DEC_2563 2562 #define CTEST_DEC_2564 2563 #define CTEST_DEC_2565 2564 #define CTEST_DEC_2566 2565 #define CTEST_DEC_2567 2566 #define CTEST_DEC_2568 2567 #define CTEST_DEC_2569 2568 #define CTEST_DEC_2570 2569 #define CTEST_DEC_2571 2570 #define CTEST_DEC_2572 2571 #define CTEST_DEC_2573 2572 #define CTEST_DEC_2574 2573 #define CTEST_DEC_2575 2574 #define CTEST_DEC_2576 2575 #define CTEST_DEC_2577 2576 #define CTEST_DEC_2578 2577 #define CTEST_DEC_2579 2578 #define CTEST_DEC_2580 2579 #define CTEST_DEC_2581 2580 #define CTEST_DEC_2582 2581 #define CTEST_DEC_2583 2582 #define CTEST_DEC_2584 2583 #define CTEST_DEC_2585 2584 #define CTEST_DEC_2586 2585 #define CTEST_DEC_2587 2586 #define CTEST_DEC_2588 2587 #define CTEST_DEC_2589 2588 #define CTEST_DEC_2590 2589 #define CTEST_DEC_2591 2590 #define CTEST_DEC_2592 2591 #define CTEST_DEC_2593 2592 #define CTEST_DEC_2594 2593 #define CTEST_DEC_2595 2594 #define CTEST_DEC_2596 2595 #define CTEST_DEC_2597 2596 #define CTEST_DEC_2598 2597 #define CTEST_DEC_2599 2598 #define CTEST_DEC_2600 2599 #define CTEST_DEC_2601 2600 #define CTEST_DEC_2602 2601 #define CTEST_DEC_2603 2602 #define CTEST_DEC_2604 2603 #define CTEST_DEC_2605 2604 #define CTEST_DEC_2606 2605 #define CTEST_DEC_2607 2606 #define CTEST_DEC_2608 2607 #define CTEST_DEC_2609 2608 #define CTEST_DEC_2610 2609 #define CTEST_DEC_2611 2610 #define CTEST_DEC_2612 2611 #define CTEST_DEC_2613 2612 #define CTEST_DEC_2614 2613 #define CTEST_DEC_2615 2614 #define CTEST_DEC_2616 2615 #define CTEST_DEC_2617 2616 #define CTEST_DEC_2618 2617 #define CTEST_DEC_2619 2618 #define CTEST_DEC_2620 2619 #define CTEST_DEC_2621 2620 #define CTEST_DEC_2622 2621 #define CTEST_DEC_2623 2622 #define CTEST_DEC_2624 2623 #define CTEST_DEC_2625 2624 #define CTEST_DEC_2626 2625 #define CTEST_DEC_2627 2626 #define CTEST_DEC_2628 2627 #define CTEST_DEC_2629 2628 #define CTEST_DEC_2630 2629 #define CTEST_DEC_2631 2630 #define CTEST_DEC_2632 2631 #define CTEST_DEC_2633 2632 #define CTEST_DEC_2634 2633 #define CTEST_DEC_2635 2634 #define CTEST_DEC_2636 2635 #define CTEST_DEC_2637 2636 #define CTEST_DEC_2638 2637 #define CTEST_DEC_2639 2638 #define CTEST_DEC_2640 2639 #define CTEST_DEC_2641 2640 #define CTEST_DEC_2642 2641 #define CTEST_DEC_2643 2642 #define CTEST_DEC_2644 2643 #define CTEST_DEC_2645 2644 #define CTEST_DEC_2646 2645 #define CTEST_DEC_2647 2646 #define CTEST_DEC_2648 2647 #define CTEST_DEC_2649 2648 #define CTEST_DEC_2650 2649 #define CTEST_DEC_2651 2650 #define CTEST_DEC_2652 2651 #define CTEST_DEC_2653 2652 #define CTEST_DEC_2654 2653 #define CTEST_DEC_2655 2654 #define CTEST_DEC_2656 2655 #define CTEST_DEC_2657 2656 #define CTEST_DEC_2658 2657 #define CTEST_DEC_2659 2658 #define CTEST_DEC_2660 2659 #define CTEST_DEC_2661 2660 #define CTEST_DEC_2662 2661 #define CTEST_DEC_2663 2662 #define CTEST_DEC_2664 2663 #define CTEST_DEC_2665 2664 #define CTEST_DEC_2666 2665 #define CTEST_DEC_2667 2666 #define CTEST_DEC_2668 2667 #define CTEST_DEC_2669 2668 #define CTEST_DEC_2670 2669 #define CTEST_DEC_2671 2670 #define CTEST_DEC_2672 2671 #define CTEST_DEC_2673 2672 #define CTEST_DEC_2674 2673 #define CTEST_DEC_2675 2674 #define CTEST_DEC_2676 2675 #define CTEST_DEC_2677 2676 #define CTEST_DEC_2678 2677 #define CTEST_DEC_2679 2678 #define CTEST_DEC_2680 2679 #define CTEST_DEC_2681 2680 #define CTEST_DEC_2682 2681 #define CTEST_DEC_2683 2682 #define CTEST_DEC_2684 2683 #define CTEST_DEC_2685 2684 #define CTEST_DEC_2686 2685 #define CTEST_DEC_2687 2686 #define CTEST_DEC_2688 2687 #define CTEST_DEC_2689 2688 #define CTEST_DEC_2690 2689 #define CTEST_DEC_2691 2690 #define CTEST_DEC_2692 2691 #define CTEST_DEC_2693 2692 #define CTEST_DEC_2694 2693 #define CTEST_DEC_2695 2694 #define CTEST_DEC_2696 2695 #define CTEST_DEC_2697 2696 #define CTEST_DEC_2698 2697 #define CTEST_DEC_2699 2698 #define CTEST_DEC_2700 2699 #define CTEST_DEC_2701 2700 #define CTEST_DEC_2702 2701 #define CTEST_DEC_2703 2702 #define CTEST_DEC_2704 2703 #define CTEST_DEC_2705 2704 #define CTEST_DEC_2706 2705 #define CTEST_DEC_2707 2706 #define CTEST_DEC_2708 2707 #define CTEST_DEC_2709 2708 #define CTEST_DEC_2710 2709 #define CTEST_DEC_2711 2710 #define CTEST_DEC_2712 2711 #define CTEST_DEC_2713 2712 #define CTEST_DEC_2714 2713 #define CTEST_DEC_2715 2714 #define CTEST_DEC_2716 2715 #define CTEST_DEC_2717 2716 #define CTEST_DEC_2718 2717 #define CTEST_DEC_2719 2718 #define CTEST_DEC_2720 2719 #define CTEST_DEC_2721 2720 #define CTEST_DEC_2722 2721 #define CTEST_DEC_2723 2722 #define CTEST_DEC_2724 2723 #define CTEST_DEC_2725 2724 #define CTEST_DEC_2726 2725 #define CTEST_DEC_2727 2726 #define CTEST_DEC_2728 2727 #define CTEST_DEC_2729 2728 #define CTEST_DEC_2730 2729 #define CTEST_DEC_2731 2730 #define CTEST_DEC_2732 2731 #define CTEST_DEC_2733 2732 #define CTEST_DEC_2734 2733 #define CTEST_DEC_2735 2734 #define CTEST_DEC_2736 2735 #define CTEST_DEC_2737 2736 #define CTEST_DEC_2738 2737 #define CTEST_DEC_2739 2738 #define CTEST_DEC_2740 2739 #define CTEST_DEC_2741 2740 #define CTEST_DEC_2742 2741 #define CTEST_DEC_2743 2742 #define CTEST_DEC_2744 2743 #define CTEST_DEC_2745 2744 #define CTEST_DEC_2746 2745 #define CTEST_DEC_2747 2746 #define CTEST_DEC_2748 2747 #define CTEST_DEC_2749 2748 #define CTEST_DEC_2750 2749 #define CTEST_DEC_2751 2750 #define CTEST_DEC_2752 2751 #define CTEST_DEC_2753 2752 #define CTEST_DEC_2754 2753 #define CTEST_DEC_2755 2754 #define CTEST_DEC_2756 2755 #define CTEST_DEC_2757 2756 #define CTEST_DEC_2758 2757 #define CTEST_DEC_2759 2758 #define CTEST_DEC_2760 2759 #define CTEST_DEC_2761 2760 #define CTEST_DEC_2762 2761 #define CTEST_DEC_2763 2762 #define CTEST_DEC_2764 2763 #define CTEST_DEC_2765 2764 #define CTEST_DEC_2766 2765 #define CTEST_DEC_2767 2766 #define CTEST_DEC_2768 2767 #define CTEST_DEC_2769 2768 #define CTEST_DEC_2770 2769 #define CTEST_DEC_2771 2770 #define CTEST_DEC_2772 2771 #define CTEST_DEC_2773 2772 #define CTEST_DEC_2774 2773 #define CTEST_DEC_2775 2774 #define CTEST_DEC_2776 2775 #define CTEST_DEC_2777 2776 #define CTEST_DEC_2778 2777 #define CTEST_DEC_2779 2778 #define CTEST_DEC_2780 2779 #define CTEST_DEC_2781 2780 #define CTEST_DEC_2782 2781 #define CTEST_DEC_2783 2782 #define CTEST_DEC_2784 2783 #define CTEST_DEC_2785 2784 #define CTEST_DEC_2786 2785 #define CTEST_DEC_2787 2786 #define CTEST_DEC_2788 2787 #define CTEST_DEC_2789 2788 #define CTEST_DEC_2790 2789 #define CTEST_DEC_2791 2790 #define CTEST_DEC_2792 2791 #define CTEST_DEC_2793 2792 #define CTEST_DEC_2794 2793 #define CTEST_DEC_2795 2794 #define CTEST_DEC_2796 2795 #define CTEST_DEC_2797 2796 #define CTEST_DEC_2798 2797 #define CTEST_DEC_2799 2798 #define CTEST_DEC_2800 2799 #define CTEST_DEC_2801 2800 #define CTEST_DEC_2802 2801 #define CTEST_DEC_2803 2802 #define CTEST_DEC_2804 2803 #define CTEST_DEC_2805 2804 #define CTEST_DEC_2806 2805 #define CTEST_DEC_2807 2806 #define CTEST_DEC_2808 2807 #define CTEST_DEC_2809 2808 #define CTEST_DEC_2810 2809 #define CTEST_DEC_2811 2810 #define CTEST_DEC_2812 2811 #define CTEST_DEC_2813 2812 #define CTEST_DEC_2814 2813 #define CTEST_DEC_2815 2814 #define CTEST_DEC_2816 2815 #define CTEST_DEC_2817 2816 #define CTEST_DEC_2818 2817 #define CTEST_DEC_2819 2818 #define CTEST_DEC_2820 2819 #define CTEST_DEC_2821 2820 #define CTEST_DEC_2822 2821 #define CTEST_DEC_2823 2822 #define CTEST_DEC_2824 2823 #define CTEST_DEC_2825 2824 #define CTEST_DEC_2826 2825 #define CTEST_DEC_2827 2826 #define CTEST_DEC_2828 2827 #define CTEST_DEC_2829 2828 #define CTEST_DEC_2830 2829 #define CTEST_DEC_2831 2830 #define CTEST_DEC_2832 2831 #define CTEST_DEC_2833 2832 #define CTEST_DEC_2834 2833 #define CTEST_DEC_2835 2834 #define CTEST_DEC_2836 2835 #define CTEST_DEC_2837 2836 #define CTEST_DEC_2838 2837 #define CTEST_DEC_2839 2838 #define CTEST_DEC_2840 2839 #define CTEST_DEC_2841 2840 #define CTEST_DEC_2842 2841 #define CTEST_DEC_2843 2842 #define CTEST_DEC_2844 2843 #define CTEST_DEC_2845 2844 #define CTEST_DEC_2846 2845 #define CTEST_DEC_2847 2846 #define CTEST_DEC_2848 2847 #define CTEST_DEC_2849 2848 #define CTEST_DEC_2850 2849 #define CTEST_DEC_2851 2850 #define CTEST_DEC_2852 2851 #define CTEST_DEC_2853 2852 #define CTEST_DEC_2854 2853 #define CTEST_DEC_2855 2854 #define CTEST_DEC_2856 2855 #define CTEST_DEC_2857 2856 #define CTEST_DEC_2858 2857 #define CTEST_DEC_2859 2858 #define CTEST_DEC_2860 2859 #define CTEST_DEC_2861 2860 #define CTEST_DEC_2862 2861 #define CTEST_DEC_2863 2862 #define CTEST_DEC_2864 2863 #define CTEST_DEC_2865 2864 #define CTEST_DEC_2866 2865 #define CTEST_DEC_2867 2866 #define CTEST_DEC_2868 2867 #define CTEST_DEC_2869 2868 #define CTEST_DEC_2870 2869 #define CTEST_DEC_2871 2870 #define CTEST_DEC_2872 2871 #define CTEST_DEC_2873 2872 #define CTEST_DEC_2874 2873 #define CTEST_DEC_2875 2874 #define CTEST_DEC_2876 2875 #define CTEST_DEC_2877 2876 #define CTEST_DEC_2878 2877 #define CTEST_DEC_2879 2878 #define CTEST_DEC_2880 2879 #define CTEST_DEC_2881 2880 #define CTEST_DEC_2882 2881 #define CTEST_DEC_2883 2882 #define CTEST_DEC_2884 2883 #define CTEST_DEC_2885 2884 #define CTEST_DEC_2886 2885 #define CTEST_DEC_2887 2886 #define CTEST_DEC_2888 2887 #define CTEST_DEC_2889 2888 #define CTEST_DEC_2890 2889 #define CTEST_DEC_2891 2890 #define CTEST_DEC_2892 2891 #define CTEST_DEC_2893 2892 #define CTEST_DEC_2894 2893 #define CTEST_DEC_2895 2894 #define CTEST_DEC_2896 2895 #define CTEST_DEC_2897 2896 #define CTEST_DEC_2898 2897 #define CTEST_DEC_2899 2898 #define CTEST_DEC_2900 2899 #define CTEST_DEC_2901 2900 #define CTEST_DEC_2902 2901 #define CTEST_DEC_2903 2902 #define CTEST_DEC_2904 2903 #define CTEST_DEC_2905 2904 #define CTEST_DEC_2906 2905 #define CTEST_DEC_2907 2906 #define CTEST_DEC_2908 2907 #define CTEST_DEC_2909 2908 #define CTEST_DEC_2910 2909 #define CTEST_DEC_2911 2910 #define CTEST_DEC_2912 2911 #define CTEST_DEC_2913 2912 #define CTEST_DEC_2914 2913 #define CTEST_DEC_2915 2914 #define CTEST_DEC_2916 2915 #define CTEST_DEC_2917 2916 #define CTEST_DEC_2918 2917 #define CTEST_DEC_2919 2918 #define CTEST_DEC_2920 2919 #define CTEST_DEC_2921 2920 #define CTEST_DEC_2922 2921 #define CTEST_DEC_2923 2922 #define CTEST_DEC_2924 2923 #define CTEST_DEC_2925 2924 #define CTEST_DEC_2926 2925 #define CTEST_DEC_2927 2926 #define CTEST_DEC_2928 2927 #define CTEST_DEC_2929 2928 #define CTEST_DEC_2930 2929 #define CTEST_DEC_2931 2930 #define CTEST_DEC_2932 2931 #define CTEST_DEC_2933 2932 #define CTEST_DEC_2934 2933 #define CTEST_DEC_2935 2934 #define CTEST_DEC_2936 2935 #define CTEST_DEC_2937 2936 #define CTEST_DEC_2938 2937 #define CTEST_DEC_2939 2938 #define CTEST_DEC_2940 2939 #define CTEST_DEC_2941 2940 #define CTEST_DEC_2942 2941 #define CTEST_DEC_2943 2942 #define CTEST_DEC_2944 2943 #define CTEST_DEC_2945 2944 #define CTEST_DEC_2946 2945 #define CTEST_DEC_2947 2946 #define CTEST_DEC_2948 2947 #define CTEST_DEC_2949 2948 #define CTEST_DEC_2950 2949 #define CTEST_DEC_2951 2950 #define CTEST_DEC_2952 2951 #define CTEST_DEC_2953 2952 #define CTEST_DEC_2954 2953 #define CTEST_DEC_2955 2954 #define CTEST_DEC_2956 2955 #define CTEST_DEC_2957 2956 #define CTEST_DEC_2958 2957 #define CTEST_DEC_2959 2958 #define CTEST_DEC_2960 2959 #define CTEST_DEC_2961 2960 #define CTEST_DEC_2962 2961 #define CTEST_DEC_2963 2962 #define CTEST_DEC_2964 2963 #define CTEST_DEC_2965 2964 #define CTEST_DEC_2966 2965 #define CTEST_DEC_2967 2966 #define CTEST_DEC_2968 2967 #define CTEST_DEC_2969 2968 #define CTEST_DEC_2970 2969 #define CTEST_DEC_2971 2970 #define CTEST_DEC_2972 2971 #define CTEST_DEC_2973 2972 #define CTEST_DEC_2974 2973 #define CTEST_DEC_2975 2974 #define CTEST_DEC_2976 2975 #define CTEST_DEC_2977 2976 #define CTEST_DEC_2978 2977 #define CTEST_DEC_2979 2978 #define CTEST_DEC_2980 2979 #define CTEST_DEC_2981 2980 #define CTEST_DEC_2982 2981 #define CTEST_DEC_2983 2982 #define CTEST_DEC_2984 2983 #define CTEST_DEC_2985 2984 #define CTEST_DEC_2986 2985 #define CTEST_DEC_2987 2986 #define CTEST_DEC_2988 2987 #define CTEST_DEC_2989 2988 #define CTEST_DEC_2990 2989 #define CTEST_DEC_2991 2990 #define CTEST_DEC_2992 2991 #define CTEST_DEC_2993 2992 #define CTEST_DEC_2994 2993 #define CTEST_DEC_2995 2994 #define CTEST_DEC_2996 2995 #define CTEST_DEC_2997 2996 #define CTEST_DEC_2998 2997 #define CTEST_DEC_2999 2998 #define CTEST_DEC_3000 2999 #define CTEST_DEC_3001 3000 #define CTEST_DEC_3002 3001 #define CTEST_DEC_3003 3002 #define CTEST_DEC_3004 3003 #define CTEST_DEC_3005 3004 #define CTEST_DEC_3006 3005 #define CTEST_DEC_3007 3006 #define CTEST_DEC_3008 3007 #define CTEST_DEC_3009 3008 #define CTEST_DEC_3010 3009 #define CTEST_DEC_3011 3010 #define CTEST_DEC_3012 3011 #define CTEST_DEC_3013 3012 #define CTEST_DEC_3014 3013 #define CTEST_DEC_3015 3014 #define CTEST_DEC_3016 3015 #define CTEST_DEC_3017 3016 #define CTEST_DEC_3018 3017 #define CTEST_DEC_3019 3018 #define CTEST_DEC_3020 3019 #define CTEST_DEC_3021 3020 #define CTEST_DEC_3022 3021 #define CTEST_DEC_3023 3022 #define CTEST_DEC_3024 3023 #define CTEST_DEC_3025 3024 #define CTEST_DEC_3026 3025 #define CTEST_DEC_3027 3026 #define CTEST_DEC_3028 3027 #define CTEST_DEC_3029 3028 #define CTEST_DEC_3030 3029 #define CTEST_DEC_3031 3030 #define CTEST_DEC_3032 3031 #define CTEST_DEC_3033 3032 #define CTEST_DEC_3034 3033 #define CTEST_DEC_3035 3034 #define CTEST_DEC_3036 3035 #define CTEST_DEC_3037 3036 #define CTEST_DEC_3038 3037 #define CTEST_DEC_3039 3038 #define CTEST_DEC_3040 3039 #define CTEST_DEC_3041 3040 #define CTEST_DEC_3042 3041 #define CTEST_DEC_3043 3042 #define CTEST_DEC_3044 3043 #define CTEST_DEC_3045 3044 #define CTEST_DEC_3046 3045 #define CTEST_DEC_3047 3046 #define CTEST_DEC_3048 3047 #define CTEST_DEC_3049 3048 #define CTEST_DEC_3050 3049 #define CTEST_DEC_3051 3050 #define CTEST_DEC_3052 3051 #define CTEST_DEC_3053 3052 #define CTEST_DEC_3054 3053 #define CTEST_DEC_3055 3054 #define CTEST_DEC_3056 3055 #define CTEST_DEC_3057 3056 #define CTEST_DEC_3058 3057 #define CTEST_DEC_3059 3058 #define CTEST_DEC_3060 3059 #define CTEST_DEC_3061 3060 #define CTEST_DEC_3062 3061 #define CTEST_DEC_3063 3062 #define CTEST_DEC_3064 3063 #define CTEST_DEC_3065 3064 #define CTEST_DEC_3066 3065 #define CTEST_DEC_3067 3066 #define CTEST_DEC_3068 3067 #define CTEST_DEC_3069 3068 #define CTEST_DEC_3070 3069 #define CTEST_DEC_3071 3070 #define CTEST_DEC_3072 3071 #define CTEST_DEC_3073 3072 #define CTEST_DEC_3074 3073 #define CTEST_DEC_3075 3074 #define CTEST_DEC_3076 3075 #define CTEST_DEC_3077 3076 #define CTEST_DEC_3078 3077 #define CTEST_DEC_3079 3078 #define CTEST_DEC_3080 3079 #define CTEST_DEC_3081 3080 #define CTEST_DEC_3082 3081 #define CTEST_DEC_3083 3082 #define CTEST_DEC_3084 3083 #define CTEST_DEC_3085 3084 #define CTEST_DEC_3086 3085 #define CTEST_DEC_3087 3086 #define CTEST_DEC_3088 3087 #define CTEST_DEC_3089 3088 #define CTEST_DEC_3090 3089 #define CTEST_DEC_3091 3090 #define CTEST_DEC_3092 3091 #define CTEST_DEC_3093 3092 #define CTEST_DEC_3094 3093 #define CTEST_DEC_3095 3094 #define CTEST_DEC_3096 3095 #define CTEST_DEC_3097 3096 #define CTEST_DEC_3098 3097 #define CTEST_DEC_3099 3098 #define CTEST_DEC_3100 3099 #define CTEST_DEC_3101 3100 #define CTEST_DEC_3102 3101 #define CTEST_DEC_3103 3102 #define CTEST_DEC_3104 3103 #define CTEST_DEC_3105 3104 #define CTEST_DEC_3106 3105 #define CTEST_DEC_3107 3106 #define CTEST_DEC_3108 3107 #define CTEST_DEC_3109 3108 #define CTEST_DEC_3110 3109 #define CTEST_DEC_3111 3110 #define CTEST_DEC_3112 3111 #define CTEST_DEC_3113 3112 #define CTEST_DEC_3114 3113 #define CTEST_DEC_3115 3114 #define CTEST_DEC_3116 3115 #define CTEST_DEC_3117 3116 #define CTEST_DEC_3118 3117 #define CTEST_DEC_3119 3118 #define CTEST_DEC_3120 3119 #define CTEST_DEC_3121 3120 #define CTEST_DEC_3122 3121 #define CTEST_DEC_3123 3122 #define CTEST_DEC_3124 3123 #define CTEST_DEC_3125 3124 #define CTEST_DEC_3126 3125 #define CTEST_DEC_3127 3126 #define CTEST_DEC_3128 3127 #define CTEST_DEC_3129 3128 #define CTEST_DEC_3130 3129 #define CTEST_DEC_3131 3130 #define CTEST_DEC_3132 3131 #define CTEST_DEC_3133 3132 #define CTEST_DEC_3134 3133 #define CTEST_DEC_3135 3134 #define CTEST_DEC_3136 3135 #define CTEST_DEC_3137 3136 #define CTEST_DEC_3138 3137 #define CTEST_DEC_3139 3138 #define CTEST_DEC_3140 3139 #define CTEST_DEC_3141 3140 #define CTEST_DEC_3142 3141 #define CTEST_DEC_3143 3142 #define CTEST_DEC_3144 3143 #define CTEST_DEC_3145 3144 #define CTEST_DEC_3146 3145 #define CTEST_DEC_3147 3146 #define CTEST_DEC_3148 3147 #define CTEST_DEC_3149 3148 #define CTEST_DEC_3150 3149 #define CTEST_DEC_3151 3150 #define CTEST_DEC_3152 3151 #define CTEST_DEC_3153 3152 #define CTEST_DEC_3154 3153 #define CTEST_DEC_3155 3154 #define CTEST_DEC_3156 3155 #define CTEST_DEC_3157 3156 #define CTEST_DEC_3158 3157 #define CTEST_DEC_3159 3158 #define CTEST_DEC_3160 3159 #define CTEST_DEC_3161 3160 #define CTEST_DEC_3162 3161 #define CTEST_DEC_3163 3162 #define CTEST_DEC_3164 3163 #define CTEST_DEC_3165 3164 #define CTEST_DEC_3166 3165 #define CTEST_DEC_3167 3166 #define CTEST_DEC_3168 3167 #define CTEST_DEC_3169 3168 #define CTEST_DEC_3170 3169 #define CTEST_DEC_3171 3170 #define CTEST_DEC_3172 3171 #define CTEST_DEC_3173 3172 #define CTEST_DEC_3174 3173 #define CTEST_DEC_3175 3174 #define CTEST_DEC_3176 3175 #define CTEST_DEC_3177 3176 #define CTEST_DEC_3178 3177 #define CTEST_DEC_3179 3178 #define CTEST_DEC_3180 3179 #define CTEST_DEC_3181 3180 #define CTEST_DEC_3182 3181 #define CTEST_DEC_3183 3182 #define CTEST_DEC_3184 3183 #define CTEST_DEC_3185 3184 #define CTEST_DEC_3186 3185 #define CTEST_DEC_3187 3186 #define CTEST_DEC_3188 3187 #define CTEST_DEC_3189 3188 #define CTEST_DEC_3190 3189 #define CTEST_DEC_3191 3190 #define CTEST_DEC_3192 3191 #define CTEST_DEC_3193 3192 #define CTEST_DEC_3194 3193 #define CTEST_DEC_3195 3194 #define CTEST_DEC_3196 3195 #define CTEST_DEC_3197 3196 #define CTEST_DEC_3198 3197 #define CTEST_DEC_3199 3198 #define CTEST_DEC_3200 3199 #define CTEST_DEC_3201 3200 #define CTEST_DEC_3202 3201 #define CTEST_DEC_3203 3202 #define CTEST_DEC_3204 3203 #define CTEST_DEC_3205 3204 #define CTEST_DEC_3206 3205 #define CTEST_DEC_3207 3206 #define CTEST_DEC_3208 3207 #define CTEST_DEC_3209 3208 #define CTEST_DEC_3210 3209 #define CTEST_DEC_3211 3210 #define CTEST_DEC_3212 3211 #define CTEST_DEC_3213 3212 #define CTEST_DEC_3214 3213 #define CTEST_DEC_3215 3214 #define CTEST_DEC_3216 3215 #define CTEST_DEC_3217 3216 #define CTEST_DEC_3218 3217 #define CTEST_DEC_3219 3218 #define CTEST_DEC_3220 3219 #define CTEST_DEC_3221 3220 #define CTEST_DEC_3222 3221 #define CTEST_DEC_3223 3222 #define CTEST_DEC_3224 3223 #define CTEST_DEC_3225 3224 #define CTEST_DEC_3226 3225 #define CTEST_DEC_3227 3226 #define CTEST_DEC_3228 3227 #define CTEST_DEC_3229 3228 #define CTEST_DEC_3230 3229 #define CTEST_DEC_3231 3230 #define CTEST_DEC_3232 3231 #define CTEST_DEC_3233 3232 #define CTEST_DEC_3234 3233 #define CTEST_DEC_3235 3234 #define CTEST_DEC_3236 3235 #define CTEST_DEC_3237 3236 #define CTEST_DEC_3238 3237 #define CTEST_DEC_3239 3238 #define CTEST_DEC_3240 3239 #define CTEST_DEC_3241 3240 #define CTEST_DEC_3242 3241 #define CTEST_DEC_3243 3242 #define CTEST_DEC_3244 3243 #define CTEST_DEC_3245 3244 #define CTEST_DEC_3246 3245 #define CTEST_DEC_3247 3246 #define CTEST_DEC_3248 3247 #define CTEST_DEC_3249 3248 #define CTEST_DEC_3250 3249 #define CTEST_DEC_3251 3250 #define CTEST_DEC_3252 3251 #define CTEST_DEC_3253 3252 #define CTEST_DEC_3254 3253 #define CTEST_DEC_3255 3254 #define CTEST_DEC_3256 3255 #define CTEST_DEC_3257 3256 #define CTEST_DEC_3258 3257 #define CTEST_DEC_3259 3258 #define CTEST_DEC_3260 3259 #define CTEST_DEC_3261 3260 #define CTEST_DEC_3262 3261 #define CTEST_DEC_3263 3262 #define CTEST_DEC_3264 3263 #define CTEST_DEC_3265 3264 #define CTEST_DEC_3266 3265 #define CTEST_DEC_3267 3266 #define CTEST_DEC_3268 3267 #define CTEST_DEC_3269 3268 #define CTEST_DEC_3270 3269 #define CTEST_DEC_3271 3270 #define CTEST_DEC_3272 3271 #define CTEST_DEC_3273 3272 #define CTEST_DEC_3274 3273 #define CTEST_DEC_3275 3274 #define CTEST_DEC_3276 3275 #define CTEST_DEC_3277 3276 #define CTEST_DEC_3278 3277 #define CTEST_DEC_3279 3278 #define CTEST_DEC_3280 3279 #define CTEST_DEC_3281 3280 #define CTEST_DEC_3282 3281 #define CTEST_DEC_3283 3282 #define CTEST_DEC_3284 3283 #define CTEST_DEC_3285 3284 #define CTEST_DEC_3286 3285 #define CTEST_DEC_3287 3286 #define CTEST_DEC_3288 3287 #define CTEST_DEC_3289 3288 #define CTEST_DEC_3290 3289 #define CTEST_DEC_3291 3290 #define CTEST_DEC_3292 3291 #define CTEST_DEC_3293 3292 #define CTEST_DEC_3294 3293 #define CTEST_DEC_3295 3294 #define CTEST_DEC_3296 3295 #define CTEST_DEC_3297 3296 #define CTEST_DEC_3298 3297 #define CTEST_DEC_3299 3298 #define CTEST_DEC_3300 3299 #define CTEST_DEC_3301 3300 #define CTEST_DEC_3302 3301 #define CTEST_DEC_3303 3302 #define CTEST_DEC_3304 3303 #define CTEST_DEC_3305 3304 #define CTEST_DEC_3306 3305 #define CTEST_DEC_3307 3306 #define CTEST_DEC_3308 3307 #define CTEST_DEC_3309 3308 #define CTEST_DEC_3310 3309 #define CTEST_DEC_3311 3310 #define CTEST_DEC_3312 3311 #define CTEST_DEC_3313 3312 #define CTEST_DEC_3314 3313 #define CTEST_DEC_3315 3314 #define CTEST_DEC_3316 3315 #define CTEST_DEC_3317 3316 #define CTEST_DEC_3318 3317 #define CTEST_DEC_3319 3318 #define CTEST_DEC_3320 3319 #define CTEST_DEC_3321 3320 #define CTEST_DEC_3322 3321 #define CTEST_DEC_3323 3322 #define CTEST_DEC_3324 3323 #define CTEST_DEC_3325 3324 #define CTEST_DEC_3326 3325 #define CTEST_DEC_3327 3326 #define CTEST_DEC_3328 3327 #define CTEST_DEC_3329 3328 #define CTEST_DEC_3330 3329 #define CTEST_DEC_3331 3330 #define CTEST_DEC_3332 3331 #define CTEST_DEC_3333 3332 #define CTEST_DEC_3334 3333 #define CTEST_DEC_3335 3334 #define CTEST_DEC_3336 3335 #define CTEST_DEC_3337 3336 #define CTEST_DEC_3338 3337 #define CTEST_DEC_3339 3338 #define CTEST_DEC_3340 3339 #define CTEST_DEC_3341 3340 #define CTEST_DEC_3342 3341 #define CTEST_DEC_3343 3342 #define CTEST_DEC_3344 3343 #define CTEST_DEC_3345 3344 #define CTEST_DEC_3346 3345 #define CTEST_DEC_3347 3346 #define CTEST_DEC_3348 3347 #define CTEST_DEC_3349 3348 #define CTEST_DEC_3350 3349 #define CTEST_DEC_3351 3350 #define CTEST_DEC_3352 3351 #define CTEST_DEC_3353 3352 #define CTEST_DEC_3354 3353 #define CTEST_DEC_3355 3354 #define CTEST_DEC_3356 3355 #define CTEST_DEC_3357 3356 #define CTEST_DEC_3358 3357 #define CTEST_DEC_3359 3358 #define CTEST_DEC_3360 3359 #define CTEST_DEC_3361 3360 #define CTEST_DEC_3362 3361 #define CTEST_DEC_3363 3362 #define CTEST_DEC_3364 3363 #define CTEST_DEC_3365 3364 #define CTEST_DEC_3366 3365 #define CTEST_DEC_3367 3366 #define CTEST_DEC_3368 3367 #define CTEST_DEC_3369 3368 #define CTEST_DEC_3370 3369 #define CTEST_DEC_3371 3370 #define CTEST_DEC_3372 3371 #define CTEST_DEC_3373 3372 #define CTEST_DEC_3374 3373 #define CTEST_DEC_3375 3374 #define CTEST_DEC_3376 3375 #define CTEST_DEC_3377 3376 #define CTEST_DEC_3378 3377 #define CTEST_DEC_3379 3378 #define CTEST_DEC_3380 3379 #define CTEST_DEC_3381 3380 #define CTEST_DEC_3382 3381 #define CTEST_DEC_3383 3382 #define CTEST_DEC_3384 3383 #define CTEST_DEC_3385 3384 #define CTEST_DEC_3386 3385 #define CTEST_DEC_3387 3386 #define CTEST_DEC_3388 3387 #define CTEST_DEC_3389 3388 #define CTEST_DEC_3390 3389 #define CTEST_DEC_3391 3390 #define CTEST_DEC_3392 3391 #define CTEST_DEC_3393 3392 #define CTEST_DEC_3394 3393 #define CTEST_DEC_3395 3394 #define CTEST_DEC_3396 3395 #define CTEST_DEC_3397 3396 #define CTEST_DEC_3398 3397 #define CTEST_DEC_3399 3398 #define CTEST_DEC_3400 3399 #define CTEST_DEC_3401 3400 #define CTEST_DEC_3402 3401 #define CTEST_DEC_3403 3402 #define CTEST_DEC_3404 3403 #define CTEST_DEC_3405 3404 #define CTEST_DEC_3406 3405 #define CTEST_DEC_3407 3406 #define CTEST_DEC_3408 3407 #define CTEST_DEC_3409 3408 #define CTEST_DEC_3410 3409 #define CTEST_DEC_3411 3410 #define CTEST_DEC_3412 3411 #define CTEST_DEC_3413 3412 #define CTEST_DEC_3414 3413 #define CTEST_DEC_3415 3414 #define CTEST_DEC_3416 3415 #define CTEST_DEC_3417 3416 #define CTEST_DEC_3418 3417 #define CTEST_DEC_3419 3418 #define CTEST_DEC_3420 3419 #define CTEST_DEC_3421 3420 #define CTEST_DEC_3422 3421 #define CTEST_DEC_3423 3422 #define CTEST_DEC_3424 3423 #define CTEST_DEC_3425 3424 #define CTEST_DEC_3426 3425 #define CTEST_DEC_3427 3426 #define CTEST_DEC_3428 3427 #define CTEST_DEC_3429 3428 #define CTEST_DEC_3430 3429 #define CTEST_DEC_3431 3430 #define CTEST_DEC_3432 3431 #define CTEST_DEC_3433 3432 #define CTEST_DEC_3434 3433 #define CTEST_DEC_3435 3434 #define CTEST_DEC_3436 3435 #define CTEST_DEC_3437 3436 #define CTEST_DEC_3438 3437 #define CTEST_DEC_3439 3438 #define CTEST_DEC_3440 3439 #define CTEST_DEC_3441 3440 #define CTEST_DEC_3442 3441 #define CTEST_DEC_3443 3442 #define CTEST_DEC_3444 3443 #define CTEST_DEC_3445 3444 #define CTEST_DEC_3446 3445 #define CTEST_DEC_3447 3446 #define CTEST_DEC_3448 3447 #define CTEST_DEC_3449 3448 #define CTEST_DEC_3450 3449 #define CTEST_DEC_3451 3450 #define CTEST_DEC_3452 3451 #define CTEST_DEC_3453 3452 #define CTEST_DEC_3454 3453 #define CTEST_DEC_3455 3454 #define CTEST_DEC_3456 3455 #define CTEST_DEC_3457 3456 #define CTEST_DEC_3458 3457 #define CTEST_DEC_3459 3458 #define CTEST_DEC_3460 3459 #define CTEST_DEC_3461 3460 #define CTEST_DEC_3462 3461 #define CTEST_DEC_3463 3462 #define CTEST_DEC_3464 3463 #define CTEST_DEC_3465 3464 #define CTEST_DEC_3466 3465 #define CTEST_DEC_3467 3466 #define CTEST_DEC_3468 3467 #define CTEST_DEC_3469 3468 #define CTEST_DEC_3470 3469 #define CTEST_DEC_3471 3470 #define CTEST_DEC_3472 3471 #define CTEST_DEC_3473 3472 #define CTEST_DEC_3474 3473 #define CTEST_DEC_3475 3474 #define CTEST_DEC_3476 3475 #define CTEST_DEC_3477 3476 #define CTEST_DEC_3478 3477 #define CTEST_DEC_3479 3478 #define CTEST_DEC_3480 3479 #define CTEST_DEC_3481 3480 #define CTEST_DEC_3482 3481 #define CTEST_DEC_3483 3482 #define CTEST_DEC_3484 3483 #define CTEST_DEC_3485 3484 #define CTEST_DEC_3486 3485 #define CTEST_DEC_3487 3486 #define CTEST_DEC_3488 3487 #define CTEST_DEC_3489 3488 #define CTEST_DEC_3490 3489 #define CTEST_DEC_3491 3490 #define CTEST_DEC_3492 3491 #define CTEST_DEC_3493 3492 #define CTEST_DEC_3494 3493 #define CTEST_DEC_3495 3494 #define CTEST_DEC_3496 3495 #define CTEST_DEC_3497 3496 #define CTEST_DEC_3498 3497 #define CTEST_DEC_3499 3498 #define CTEST_DEC_3500 3499 #define CTEST_DEC_3501 3500 #define CTEST_DEC_3502 3501 #define CTEST_DEC_3503 3502 #define CTEST_DEC_3504 3503 #define CTEST_DEC_3505 3504 #define CTEST_DEC_3506 3505 #define CTEST_DEC_3507 3506 #define CTEST_DEC_3508 3507 #define CTEST_DEC_3509 3508 #define CTEST_DEC_3510 3509 #define CTEST_DEC_3511 3510 #define CTEST_DEC_3512 3511 #define CTEST_DEC_3513 3512 #define CTEST_DEC_3514 3513 #define CTEST_DEC_3515 3514 #define CTEST_DEC_3516 3515 #define CTEST_DEC_3517 3516 #define CTEST_DEC_3518 3517 #define CTEST_DEC_3519 3518 #define CTEST_DEC_3520 3519 #define CTEST_DEC_3521 3520 #define CTEST_DEC_3522 3521 #define CTEST_DEC_3523 3522 #define CTEST_DEC_3524 3523 #define CTEST_DEC_3525 3524 #define CTEST_DEC_3526 3525 #define CTEST_DEC_3527 3526 #define CTEST_DEC_3528 3527 #define CTEST_DEC_3529 3528 #define CTEST_DEC_3530 3529 #define CTEST_DEC_3531 3530 #define CTEST_DEC_3532 3531 #define CTEST_DEC_3533 3532 #define CTEST_DEC_3534 3533 #define CTEST_DEC_3535 3534 #define CTEST_DEC_3536 3535 #define CTEST_DEC_3537 3536 #define CTEST_DEC_3538 3537 #define CTEST_DEC_3539 3538 #define CTEST_DEC_3540 3539 #define CTEST_DEC_3541 3540 #define CTEST_DEC_3542 3541 #define CTEST_DEC_3543 3542 #define CTEST_DEC_3544 3543 #define CTEST_DEC_3545 3544 #define CTEST_DEC_3546 3545 #define CTEST_DEC_3547 3546 #define CTEST_DEC_3548 3547 #define CTEST_DEC_3549 3548 #define CTEST_DEC_3550 3549 #define CTEST_DEC_3551 3550 #define CTEST_DEC_3552 3551 #define CTEST_DEC_3553 3552 #define CTEST_DEC_3554 3553 #define CTEST_DEC_3555 3554 #define CTEST_DEC_3556 3555 #define CTEST_DEC_3557 3556 #define CTEST_DEC_3558 3557 #define CTEST_DEC_3559 3558 #define CTEST_DEC_3560 3559 #define CTEST_DEC_3561 3560 #define CTEST_DEC_3562 3561 #define CTEST_DEC_3563 3562 #define CTEST_DEC_3564 3563 #define CTEST_DEC_3565 3564 #define CTEST_DEC_3566 3565 #define CTEST_DEC_3567 3566 #define CTEST_DEC_3568 3567 #define CTEST_DEC_3569 3568 #define CTEST_DEC_3570 3569 #define CTEST_DEC_3571 3570 #define CTEST_DEC_3572 3571 #define CTEST_DEC_3573 3572 #define CTEST_DEC_3574 3573 #define CTEST_DEC_3575 3574 #define CTEST_DEC_3576 3575 #define CTEST_DEC_3577 3576 #define CTEST_DEC_3578 3577 #define CTEST_DEC_3579 3578 #define CTEST_DEC_3580 3579 #define CTEST_DEC_3581 3580 #define CTEST_DEC_3582 3581 #define CTEST_DEC_3583 3582 #define CTEST_DEC_3584 3583 #define CTEST_DEC_3585 3584 #define CTEST_DEC_3586 3585 #define CTEST_DEC_3587 3586 #define CTEST_DEC_3588 3587 #define CTEST_DEC_3589 3588 #define CTEST_DEC_3590 3589 #define CTEST_DEC_3591 3590 #define CTEST_DEC_3592 3591 #define CTEST_DEC_3593 3592 #define CTEST_DEC_3594 3593 #define CTEST_DEC_3595 3594 #define CTEST_DEC_3596 3595 #define CTEST_DEC_3597 3596 #define CTEST_DEC_3598 3597 #define CTEST_DEC_3599 3598 #define CTEST_DEC_3600 3599 #define CTEST_DEC_3601 3600 #define CTEST_DEC_3602 3601 #define CTEST_DEC_3603 3602 #define CTEST_DEC_3604 3603 #define CTEST_DEC_3605 3604 #define CTEST_DEC_3606 3605 #define CTEST_DEC_3607 3606 #define CTEST_DEC_3608 3607 #define CTEST_DEC_3609 3608 #define CTEST_DEC_3610 3609 #define CTEST_DEC_3611 3610 #define CTEST_DEC_3612 3611 #define CTEST_DEC_3613 3612 #define CTEST_DEC_3614 3613 #define CTEST_DEC_3615 3614 #define CTEST_DEC_3616 3615 #define CTEST_DEC_3617 3616 #define CTEST_DEC_3618 3617 #define CTEST_DEC_3619 3618 #define CTEST_DEC_3620 3619 #define CTEST_DEC_3621 3620 #define CTEST_DEC_3622 3621 #define CTEST_DEC_3623 3622 #define CTEST_DEC_3624 3623 #define CTEST_DEC_3625 3624 #define CTEST_DEC_3626 3625 #define CTEST_DEC_3627 3626 #define CTEST_DEC_3628 3627 #define CTEST_DEC_3629 3628 #define CTEST_DEC_3630 3629 #define CTEST_DEC_3631 3630 #define CTEST_DEC_3632 3631 #define CTEST_DEC_3633 3632 #define CTEST_DEC_3634 3633 #define CTEST_DEC_3635 3634 #define CTEST_DEC_3636 3635 #define CTEST_DEC_3637 3636 #define CTEST_DEC_3638 3637 #define CTEST_DEC_3639 3638 #define CTEST_DEC_3640 3639 #define CTEST_DEC_3641 3640 #define CTEST_DEC_3642 3641 #define CTEST_DEC_3643 3642 #define CTEST_DEC_3644 3643 #define CTEST_DEC_3645 3644 #define CTEST_DEC_3646 3645 #define CTEST_DEC_3647 3646 #define CTEST_DEC_3648 3647 #define CTEST_DEC_3649 3648 #define CTEST_DEC_3650 3649 #define CTEST_DEC_3651 3650 #define CTEST_DEC_3652 3651 #define CTEST_DEC_3653 3652 #define CTEST_DEC_3654 3653 #define CTEST_DEC_3655 3654 #define CTEST_DEC_3656 3655 #define CTEST_DEC_3657 3656 #define CTEST_DEC_3658 3657 #define CTEST_DEC_3659 3658 #define CTEST_DEC_3660 3659 #define CTEST_DEC_3661 3660 #define CTEST_DEC_3662 3661 #define CTEST_DEC_3663 3662 #define CTEST_DEC_3664 3663 #define CTEST_DEC_3665 3664 #define CTEST_DEC_3666 3665 #define CTEST_DEC_3667 3666 #define CTEST_DEC_3668 3667 #define CTEST_DEC_3669 3668 #define CTEST_DEC_3670 3669 #define CTEST_DEC_3671 3670 #define CTEST_DEC_3672 3671 #define CTEST_DEC_3673 3672 #define CTEST_DEC_3674 3673 #define CTEST_DEC_3675 3674 #define CTEST_DEC_3676 3675 #define CTEST_DEC_3677 3676 #define CTEST_DEC_3678 3677 #define CTEST_DEC_3679 3678 #define CTEST_DEC_3680 3679 #define CTEST_DEC_3681 3680 #define CTEST_DEC_3682 3681 #define CTEST_DEC_3683 3682 #define CTEST_DEC_3684 3683 #define CTEST_DEC_3685 3684 #define CTEST_DEC_3686 3685 #define CTEST_DEC_3687 3686 #define CTEST_DEC_3688 3687 #define CTEST_DEC_3689 3688 #define CTEST_DEC_3690 3689 #define CTEST_DEC_3691 3690 #define CTEST_DEC_3692 3691 #define CTEST_DEC_3693 3692 #define CTEST_DEC_3694 3693 #define CTEST_DEC_3695 3694 #define CTEST_DEC_3696 3695 #define CTEST_DEC_3697 3696 #define CTEST_DEC_3698 3697 #define CTEST_DEC_3699 3698 #define CTEST_DEC_3700 3699 #define CTEST_DEC_3701 3700 #define CTEST_DEC_3702 3701 #define CTEST_DEC_3703 3702 #define CTEST_DEC_3704 3703 #define CTEST_DEC_3705 3704 #define CTEST_DEC_3706 3705 #define CTEST_DEC_3707 3706 #define CTEST_DEC_3708 3707 #define CTEST_DEC_3709 3708 #define CTEST_DEC_3710 3709 #define CTEST_DEC_3711 3710 #define CTEST_DEC_3712 3711 #define CTEST_DEC_3713 3712 #define CTEST_DEC_3714 3713 #define CTEST_DEC_3715 3714 #define CTEST_DEC_3716 3715 #define CTEST_DEC_3717 3716 #define CTEST_DEC_3718 3717 #define CTEST_DEC_3719 3718 #define CTEST_DEC_3720 3719 #define CTEST_DEC_3721 3720 #define CTEST_DEC_3722 3721 #define CTEST_DEC_3723 3722 #define CTEST_DEC_3724 3723 #define CTEST_DEC_3725 3724 #define CTEST_DEC_3726 3725 #define CTEST_DEC_3727 3726 #define CTEST_DEC_3728 3727 #define CTEST_DEC_3729 3728 #define CTEST_DEC_3730 3729 #define CTEST_DEC_3731 3730 #define CTEST_DEC_3732 3731 #define CTEST_DEC_3733 3732 #define CTEST_DEC_3734 3733 #define CTEST_DEC_3735 3734 #define CTEST_DEC_3736 3735 #define CTEST_DEC_3737 3736 #define CTEST_DEC_3738 3737 #define CTEST_DEC_3739 3738 #define CTEST_DEC_3740 3739 #define CTEST_DEC_3741 3740 #define CTEST_DEC_3742 3741 #define CTEST_DEC_3743 3742 #define CTEST_DEC_3744 3743 #define CTEST_DEC_3745 3744 #define CTEST_DEC_3746 3745 #define CTEST_DEC_3747 3746 #define CTEST_DEC_3748 3747 #define CTEST_DEC_3749 3748 #define CTEST_DEC_3750 3749 #define CTEST_DEC_3751 3750 #define CTEST_DEC_3752 3751 #define CTEST_DEC_3753 3752 #define CTEST_DEC_3754 3753 #define CTEST_DEC_3755 3754 #define CTEST_DEC_3756 3755 #define CTEST_DEC_3757 3756 #define CTEST_DEC_3758 3757 #define CTEST_DEC_3759 3758 #define CTEST_DEC_3760 3759 #define CTEST_DEC_3761 3760 #define CTEST_DEC_3762 3761 #define CTEST_DEC_3763 3762 #define CTEST_DEC_3764 3763 #define CTEST_DEC_3765 3764 #define CTEST_DEC_3766 3765 #define CTEST_DEC_3767 3766 #define CTEST_DEC_3768 3767 #define CTEST_DEC_3769 3768 #define CTEST_DEC_3770 3769 #define CTEST_DEC_3771 3770 #define CTEST_DEC_3772 3771 #define CTEST_DEC_3773 3772 #define CTEST_DEC_3774 3773 #define CTEST_DEC_3775 3774 #define CTEST_DEC_3776 3775 #define CTEST_DEC_3777 3776 #define CTEST_DEC_3778 3777 #define CTEST_DEC_3779 3778 #define CTEST_DEC_3780 3779 #define CTEST_DEC_3781 3780 #define CTEST_DEC_3782 3781 #define CTEST_DEC_3783 3782 #define CTEST_DEC_3784 3783 #define CTEST_DEC_3785 3784 #define CTEST_DEC_3786 3785 #define CTEST_DEC_3787 3786 #define CTEST_DEC_3788 3787 #define CTEST_DEC_3789 3788 #define CTEST_DEC_3790 3789 #define CTEST_DEC_3791 3790 #define CTEST_DEC_3792 3791 #define CTEST_DEC_3793 3792 #define CTEST_DEC_3794 3793 #define CTEST_DEC_3795 3794 #define CTEST_DEC_3796 3795 #define CTEST_DEC_3797 3796 #define CTEST_DEC_3798 3797 #define CTEST_DEC_3799 3798 #define CTEST_DEC_3800 3799 #define CTEST_DEC_3801 3800 #define CTEST_DEC_3802 3801 #define CTEST_DEC_3803 3802 #define CTEST_DEC_3804 3803 #define CTEST_DEC_3805 3804 #define CTEST_DEC_3806 3805 #define CTEST_DEC_3807 3806 #define CTEST_DEC_3808 3807 #define CTEST_DEC_3809 3808 #define CTEST_DEC_3810 3809 #define CTEST_DEC_3811 3810 #define CTEST_DEC_3812 3811 #define CTEST_DEC_3813 3812 #define CTEST_DEC_3814 3813 #define CTEST_DEC_3815 3814 #define CTEST_DEC_3816 3815 #define CTEST_DEC_3817 3816 #define CTEST_DEC_3818 3817 #define CTEST_DEC_3819 3818 #define CTEST_DEC_3820 3819 #define CTEST_DEC_3821 3820 #define CTEST_DEC_3822 3821 #define CTEST_DEC_3823 3822 #define CTEST_DEC_3824 3823 #define CTEST_DEC_3825 3824 #define CTEST_DEC_3826 3825 #define CTEST_DEC_3827 3826 #define CTEST_DEC_3828 3827 #define CTEST_DEC_3829 3828 #define CTEST_DEC_3830 3829 #define CTEST_DEC_3831 3830 #define CTEST_DEC_3832 3831 #define CTEST_DEC_3833 3832 #define CTEST_DEC_3834 3833 #define CTEST_DEC_3835 3834 #define CTEST_DEC_3836 3835 #define CTEST_DEC_3837 3836 #define CTEST_DEC_3838 3837 #define CTEST_DEC_3839 3838 #define CTEST_DEC_3840 3839 #define CTEST_DEC_3841 3840 #define CTEST_DEC_3842 3841 #define CTEST_DEC_3843 3842 #define CTEST_DEC_3844 3843 #define CTEST_DEC_3845 3844 #define CTEST_DEC_3846 3845 #define CTEST_DEC_3847 3846 #define CTEST_DEC_3848 3847 #define CTEST_DEC_3849 3848 #define CTEST_DEC_3850 3849 #define CTEST_DEC_3851 3850 #define CTEST_DEC_3852 3851 #define CTEST_DEC_3853 3852 #define CTEST_DEC_3854 3853 #define CTEST_DEC_3855 3854 #define CTEST_DEC_3856 3855 #define CTEST_DEC_3857 3856 #define CTEST_DEC_3858 3857 #define CTEST_DEC_3859 3858 #define CTEST_DEC_3860 3859 #define CTEST_DEC_3861 3860 #define CTEST_DEC_3862 3861 #define CTEST_DEC_3863 3862 #define CTEST_DEC_3864 3863 #define CTEST_DEC_3865 3864 #define CTEST_DEC_3866 3865 #define CTEST_DEC_3867 3866 #define CTEST_DEC_3868 3867 #define CTEST_DEC_3869 3868 #define CTEST_DEC_3870 3869 #define CTEST_DEC_3871 3870 #define CTEST_DEC_3872 3871 #define CTEST_DEC_3873 3872 #define CTEST_DEC_3874 3873 #define CTEST_DEC_3875 3874 #define CTEST_DEC_3876 3875 #define CTEST_DEC_3877 3876 #define CTEST_DEC_3878 3877 #define CTEST_DEC_3879 3878 #define CTEST_DEC_3880 3879 #define CTEST_DEC_3881 3880 #define CTEST_DEC_3882 3881 #define CTEST_DEC_3883 3882 #define CTEST_DEC_3884 3883 #define CTEST_DEC_3885 3884 #define CTEST_DEC_3886 3885 #define CTEST_DEC_3887 3886 #define CTEST_DEC_3888 3887 #define CTEST_DEC_3889 3888 #define CTEST_DEC_3890 3889 #define CTEST_DEC_3891 3890 #define CTEST_DEC_3892 3891 #define CTEST_DEC_3893 3892 #define CTEST_DEC_3894 3893 #define CTEST_DEC_3895 3894 #define CTEST_DEC_3896 3895 #define CTEST_DEC_3897 3896 #define CTEST_DEC_3898 3897 #define CTEST_DEC_3899 3898 #define CTEST_DEC_3900 3899 #define CTEST_DEC_3901 3900 #define CTEST_DEC_3902 3901 #define CTEST_DEC_3903 3902 #define CTEST_DEC_3904 3903 #define CTEST_DEC_3905 3904 #define CTEST_DEC_3906 3905 #define CTEST_DEC_3907 3906 #define CTEST_DEC_3908 3907 #define CTEST_DEC_3909 3908 #define CTEST_DEC_3910 3909 #define CTEST_DEC_3911 3910 #define CTEST_DEC_3912 3911 #define CTEST_DEC_3913 3912 #define CTEST_DEC_3914 3913 #define CTEST_DEC_3915 3914 #define CTEST_DEC_3916 3915 #define CTEST_DEC_3917 3916 #define CTEST_DEC_3918 3917 #define CTEST_DEC_3919 3918 #define CTEST_DEC_3920 3919 #define CTEST_DEC_3921 3920 #define CTEST_DEC_3922 3921 #define CTEST_DEC_3923 3922 #define CTEST_DEC_3924 3923 #define CTEST_DEC_3925 3924 #define CTEST_DEC_3926 3925 #define CTEST_DEC_3927 3926 #define CTEST_DEC_3928 3927 #define CTEST_DEC_3929 3928 #define CTEST_DEC_3930 3929 #define CTEST_DEC_3931 3930 #define CTEST_DEC_3932 3931 #define CTEST_DEC_3933 3932 #define CTEST_DEC_3934 3933 #define CTEST_DEC_3935 3934 #define CTEST_DEC_3936 3935 #define CTEST_DEC_3937 3936 #define CTEST_DEC_3938 3937 #define CTEST_DEC_3939 3938 #define CTEST_DEC_3940 3939 #define CTEST_DEC_3941 3940 #define CTEST_DEC_3942 3941 #define CTEST_DEC_3943 3942 #define CTEST_DEC_3944 3943 #define CTEST_DEC_3945 3944 #define CTEST_DEC_3946 3945 #define CTEST_DEC_3947 3946 #define CTEST_DEC_3948 3947 #define CTEST_DEC_3949 3948 #define CTEST_DEC_3950 3949 #define CTEST_DEC_3951 3950 #define CTEST_DEC_3952 3951 #define CTEST_DEC_3953 3952 #define CTEST_DEC_3954 3953 #define CTEST_DEC_3955 3954 #define CTEST_DEC_3956 3955 #define CTEST_DEC_3957 3956 #define CTEST_DEC_3958 3957 #define CTEST_DEC_3959 3958 #define CTEST_DEC_3960 3959 #define CTEST_DEC_3961 3960 #define CTEST_DEC_3962 3961 #define CTEST_DEC_3963 3962 #define CTEST_DEC_3964 3963 #define CTEST_DEC_3965 3964 #define CTEST_DEC_3966 3965 #define CTEST_DEC_3967 3966 #define CTEST_DEC_3968 3967 #define CTEST_DEC_3969 3968 #define CTEST_DEC_3970 3969 #define CTEST_DEC_3971 3970 #define CTEST_DEC_3972 3971 #define CTEST_DEC_3973 3972 #define CTEST_DEC_3974 3973 #define CTEST_DEC_3975 3974 #define CTEST_DEC_3976 3975 #define CTEST_DEC_3977 3976 #define CTEST_DEC_3978 3977 #define CTEST_DEC_3979 3978 #define CTEST_DEC_3980 3979 #define CTEST_DEC_3981 3980 #define CTEST_DEC_3982 3981 #define CTEST_DEC_3983 3982 #define CTEST_DEC_3984 3983 #define CTEST_DEC_3985 3984 #define CTEST_DEC_3986 3985 #define CTEST_DEC_3987 3986 #define CTEST_DEC_3988 3987 #define CTEST_DEC_3989 3988 #define CTEST_DEC_3990 3989 #define CTEST_DEC_3991 3990 #define CTEST_DEC_3992 3991 #define CTEST_DEC_3993 3992 #define CTEST_DEC_3994 3993 #define CTEST_DEC_3995 3994 #define CTEST_DEC_3996 3995 #define CTEST_DEC_3997 3996 #define CTEST_DEC_3998 3997 #define CTEST_DEC_3999 3998 #define CTEST_DEC_4000 3999 #define CTEST_DEC_4001 4000 #define CTEST_DEC_4002 4001 #define CTEST_DEC_4003 4002 #define CTEST_DEC_4004 4003 #define CTEST_DEC_4005 4004 #define CTEST_DEC_4006 4005 #define CTEST_DEC_4007 4006 #define CTEST_DEC_4008 4007 #define CTEST_DEC_4009 4008 #define CTEST_DEC_4010 4009 #define CTEST_DEC_4011 4010 #define CTEST_DEC_4012 4011 #define CTEST_DEC_4013 4012 #define CTEST_DEC_4014 4013 #define CTEST_DEC_4015 4014 #define CTEST_DEC_4016 4015 #define CTEST_DEC_4017 4016 #define CTEST_DEC_4018 4017 #define CTEST_DEC_4019 4018 #define CTEST_DEC_4020 4019 #define CTEST_DEC_4021 4020 #define CTEST_DEC_4022 4021 #define CTEST_DEC_4023 4022 #define CTEST_DEC_4024 4023 #define CTEST_DEC_4025 4024 #define CTEST_DEC_4026 4025 #define CTEST_DEC_4027 4026 #define CTEST_DEC_4028 4027 #define CTEST_DEC_4029 4028 #define CTEST_DEC_4030 4029 #define CTEST_DEC_4031 4030 #define CTEST_DEC_4032 4031 #define CTEST_DEC_4033 4032 #define CTEST_DEC_4034 4033 #define CTEST_DEC_4035 4034 #define CTEST_DEC_4036 4035 #define CTEST_DEC_4037 4036 #define CTEST_DEC_4038 4037 #define CTEST_DEC_4039 4038 #define CTEST_DEC_4040 4039 #define CTEST_DEC_4041 4040 #define CTEST_DEC_4042 4041 #define CTEST_DEC_4043 4042 #define CTEST_DEC_4044 4043 #define CTEST_DEC_4045 4044 #define CTEST_DEC_4046 4045 #define CTEST_DEC_4047 4046 #define CTEST_DEC_4048 4047 #define CTEST_DEC_4049 4048 #define CTEST_DEC_4050 4049 #define CTEST_DEC_4051 4050 #define CTEST_DEC_4052 4051 #define CTEST_DEC_4053 4052 #define CTEST_DEC_4054 4053 #define CTEST_DEC_4055 4054 #define CTEST_DEC_4056 4055 #define CTEST_DEC_4057 4056 #define CTEST_DEC_4058 4057 #define CTEST_DEC_4059 4058 #define CTEST_DEC_4060 4059 #define CTEST_DEC_4061 4060 #define CTEST_DEC_4062 4061 #define CTEST_DEC_4063 4062 #define CTEST_DEC_4064 4063 #define CTEST_DEC_4065 4064 #define CTEST_DEC_4066 4065 #define CTEST_DEC_4067 4066 #define CTEST_DEC_4068 4067 #define CTEST_DEC_4069 4068 #define CTEST_DEC_4070 4069 #define CTEST_DEC_4071 4070 #define CTEST_DEC_4072 4071 #define CTEST_DEC_4073 4072 #define CTEST_DEC_4074 4073 #define CTEST_DEC_4075 4074 #define CTEST_DEC_4076 4075 #define CTEST_DEC_4077 4076 #define CTEST_DEC_4078 4077 #define CTEST_DEC_4079 4078 #define CTEST_DEC_4080 4079 #define CTEST_DEC_4081 4080 #define CTEST_DEC_4082 4081 #define CTEST_DEC_4083 4082 #define CTEST_DEC_4084 4083 #define CTEST_DEC_4085 4084 #define CTEST_DEC_4086 4085 #define CTEST_DEC_4087 4086 #define CTEST_DEC_4088 4087 #define CTEST_DEC_4089 4088 #define CTEST_DEC_4090 4089 #define CTEST_DEC_4091 4090 #define CTEST_DEC_4092 4091 #define CTEST_DEC_4093 4092 #define CTEST_DEC_4094 4093 #define CTEST_DEC_4095 4094 #define CTEST_DEC_4096 4095 #define CTEST_DEC_4097 4096 #define CTEST_DEC_4098 4097 #define CTEST_DEC_4099 4098 #define CTEST_DEC_4100 4099 #define CTEST_DEC_4101 4100 #define CTEST_DEC_4102 4101 #define CTEST_DEC_4103 4102 #define CTEST_DEC_4104 4103 #define CTEST_DEC_4105 4104 #define CTEST_DEC_4106 4105 #define CTEST_DEC_4107 4106 #define CTEST_DEC_4108 4107 #define CTEST_DEC_4109 4108 #define CTEST_DEC_4110 4109 #define CTEST_DEC_4111 4110 #define CTEST_DEC_4112 4111 #define CTEST_DEC_4113 4112 #define CTEST_DEC_4114 4113 #define CTEST_DEC_4115 4114 #define CTEST_DEC_4116 4115 #define CTEST_DEC_4117 4116 #define CTEST_DEC_4118 4117 #define CTEST_DEC_4119 4118 #define CTEST_DEC_4120 4119 #define CTEST_DEC_4121 4120 #define CTEST_DEC_4122 4121 #define CTEST_DEC_4123 4122 #define CTEST_DEC_4124 4123 #define CTEST_DEC_4125 4124 #define CTEST_DEC_4126 4125 #define CTEST_DEC_4127 4126 #define CTEST_DEC_4128 4127 #define CTEST_DEC_4129 4128 #define CTEST_DEC_4130 4129 #define CTEST_DEC_4131 4130 #define CTEST_DEC_4132 4131 #define CTEST_DEC_4133 4132 #define CTEST_DEC_4134 4133 #define CTEST_DEC_4135 4134 #define CTEST_DEC_4136 4135 #define CTEST_DEC_4137 4136 #define CTEST_DEC_4138 4137 #define CTEST_DEC_4139 4138 #define CTEST_DEC_4140 4139 #define CTEST_DEC_4141 4140 #define CTEST_DEC_4142 4141 #define CTEST_DEC_4143 4142 #define CTEST_DEC_4144 4143 #define CTEST_DEC_4145 4144 #define CTEST_DEC_4146 4145 #define CTEST_DEC_4147 4146 #define CTEST_DEC_4148 4147 #define CTEST_DEC_4149 4148 #define CTEST_DEC_4150 4149 #define CTEST_DEC_4151 4150 #define CTEST_DEC_4152 4151 #define CTEST_DEC_4153 4152 #define CTEST_DEC_4154 4153 #define CTEST_DEC_4155 4154 #define CTEST_DEC_4156 4155 #define CTEST_DEC_4157 4156 #define CTEST_DEC_4158 4157 #define CTEST_DEC_4159 4158 #define CTEST_DEC_4160 4159 #define CTEST_DEC_4161 4160 #define CTEST_DEC_4162 4161 #define CTEST_DEC_4163 4162 #define CTEST_DEC_4164 4163 #define CTEST_DEC_4165 4164 #define CTEST_DEC_4166 4165 #define CTEST_DEC_4167 4166 #define CTEST_DEC_4168 4167 #define CTEST_DEC_4169 4168 #define CTEST_DEC_4170 4169 #define CTEST_DEC_4171 4170 #define CTEST_DEC_4172 4171 #define CTEST_DEC_4173 4172 #define CTEST_DEC_4174 4173 #define CTEST_DEC_4175 4174 #define CTEST_DEC_4176 4175 #define CTEST_DEC_4177 4176 #define CTEST_DEC_4178 4177 #define CTEST_DEC_4179 4178 #define CTEST_DEC_4180 4179 #define CTEST_DEC_4181 4180 #define CTEST_DEC_4182 4181 #define CTEST_DEC_4183 4182 #define CTEST_DEC_4184 4183 #define CTEST_DEC_4185 4184 #define CTEST_DEC_4186 4185 #define CTEST_DEC_4187 4186 #define CTEST_DEC_4188 4187 #define CTEST_DEC_4189 4188 #define CTEST_DEC_4190 4189 #define CTEST_DEC_4191 4190 #define CTEST_DEC_4192 4191 #define CTEST_DEC_4193 4192 #define CTEST_DEC_4194 4193 #define CTEST_DEC_4195 4194 #define CTEST_DEC_4196 4195 #define CTEST_DEC_4197 4196 #define CTEST_DEC_4198 4197 #define CTEST_DEC_4199 4198 #define CTEST_DEC_4200 4199 #define CTEST_DEC_4201 4200 #define CTEST_DEC_4202 4201 #define CTEST_DEC_4203 4202 #define CTEST_DEC_4204 4203 #define CTEST_DEC_4205 4204 #define CTEST_DEC_4206 4205 #define CTEST_DEC_4207 4206 #define CTEST_DEC_4208 4207 #define CTEST_DEC_4209 4208 #define CTEST_DEC_4210 4209 #define CTEST_DEC_4211 4210 #define CTEST_DEC_4212 4211 #define CTEST_DEC_4213 4212 #define CTEST_DEC_4214 4213 #define CTEST_DEC_4215 4214 #define CTEST_DEC_4216 4215 #define CTEST_DEC_4217 4216 #define CTEST_DEC_4218 4217 #define CTEST_DEC_4219 4218 #define CTEST_DEC_4220 4219 #define CTEST_DEC_4221 4220 #define CTEST_DEC_4222 4221 #define CTEST_DEC_4223 4222 #define CTEST_DEC_4224 4223 #define CTEST_DEC_4225 4224 #define CTEST_DEC_4226 4225 #define CTEST_DEC_4227 4226 #define CTEST_DEC_4228 4227 #define CTEST_DEC_4229 4228 #define CTEST_DEC_4230 4229 #define CTEST_DEC_4231 4230 #define CTEST_DEC_4232 4231 #define CTEST_DEC_4233 4232 #define CTEST_DEC_4234 4233 #define CTEST_DEC_4235 4234 #define CTEST_DEC_4236 4235 #define CTEST_DEC_4237 4236 #define CTEST_DEC_4238 4237 #define CTEST_DEC_4239 4238 #define CTEST_DEC_4240 4239 #define CTEST_DEC_4241 4240 #define CTEST_DEC_4242 4241 #define CTEST_DEC_4243 4242 #define CTEST_DEC_4244 4243 #define CTEST_DEC_4245 4244 #define CTEST_DEC_4246 4245 #define CTEST_DEC_4247 4246 #define CTEST_DEC_4248 4247 #define CTEST_DEC_4249 4248 #define CTEST_DEC_4250 4249 #define CTEST_DEC_4251 4250 #define CTEST_DEC_4252 4251 #define CTEST_DEC_4253 4252 #define CTEST_DEC_4254 4253 #define CTEST_DEC_4255 4254 #define CTEST_DEC_4256 4255 #define CTEST_DEC_4257 4256 #define CTEST_DEC_4258 4257 #define CTEST_DEC_4259 4258 #define CTEST_DEC_4260 4259 #define CTEST_DEC_4261 4260 #define CTEST_DEC_4262 4261 #define CTEST_DEC_4263 4262 #define CTEST_DEC_4264 4263 #define CTEST_DEC_4265 4264 #define CTEST_DEC_4266 4265 #define CTEST_DEC_4267 4266 #define CTEST_DEC_4268 4267 #define CTEST_DEC_4269 4268 #define CTEST_DEC_4270 4269 #define CTEST_DEC_4271 4270 #define CTEST_DEC_4272 4271 #define CTEST_DEC_4273 4272 #define CTEST_DEC_4274 4273 #define CTEST_DEC_4275 4274 #define CTEST_DEC_4276 4275 #define CTEST_DEC_4277 4276 #define CTEST_DEC_4278 4277 #define CTEST_DEC_4279 4278 #define CTEST_DEC_4280 4279 #define CTEST_DEC_4281 4280 #define CTEST_DEC_4282 4281 #define CTEST_DEC_4283 4282 #define CTEST_DEC_4284 4283 #define CTEST_DEC_4285 4284 #define CTEST_DEC_4286 4285 #define CTEST_DEC_4287 4286 #define CTEST_DEC_4288 4287 #define CTEST_DEC_4289 4288 #define CTEST_DEC_4290 4289 #define CTEST_DEC_4291 4290 #define CTEST_DEC_4292 4291 #define CTEST_DEC_4293 4292 #define CTEST_DEC_4294 4293 #define CTEST_DEC_4295 4294 #define CTEST_DEC_4296 4295 #define CTEST_DEC_4297 4296 #define CTEST_DEC_4298 4297 #define CTEST_DEC_4299 4298 #define CTEST_DEC_4300 4299 #define CTEST_DEC_4301 4300 #define CTEST_DEC_4302 4301 #define CTEST_DEC_4303 4302 #define CTEST_DEC_4304 4303 #define CTEST_DEC_4305 4304 #define CTEST_DEC_4306 4305 #define CTEST_DEC_4307 4306 #define CTEST_DEC_4308 4307 #define CTEST_DEC_4309 4308 #define CTEST_DEC_4310 4309 #define CTEST_DEC_4311 4310 #define CTEST_DEC_4312 4311 #define CTEST_DEC_4313 4312 #define CTEST_DEC_4314 4313 #define CTEST_DEC_4315 4314 #define CTEST_DEC_4316 4315 #define CTEST_DEC_4317 4316 #define CTEST_DEC_4318 4317 #define CTEST_DEC_4319 4318 #define CTEST_DEC_4320 4319 #define CTEST_DEC_4321 4320 #define CTEST_DEC_4322 4321 #define CTEST_DEC_4323 4322 #define CTEST_DEC_4324 4323 #define CTEST_DEC_4325 4324 #define CTEST_DEC_4326 4325 #define CTEST_DEC_4327 4326 #define CTEST_DEC_4328 4327 #define CTEST_DEC_4329 4328 #define CTEST_DEC_4330 4329 #define CTEST_DEC_4331 4330 #define CTEST_DEC_4332 4331 #define CTEST_DEC_4333 4332 #define CTEST_DEC_4334 4333 #define CTEST_DEC_4335 4334 #define CTEST_DEC_4336 4335 #define CTEST_DEC_4337 4336 #define CTEST_DEC_4338 4337 #define CTEST_DEC_4339 4338 #define CTEST_DEC_4340 4339 #define CTEST_DEC_4341 4340 #define CTEST_DEC_4342 4341 #define CTEST_DEC_4343 4342 #define CTEST_DEC_4344 4343 #define CTEST_DEC_4345 4344 #define CTEST_DEC_4346 4345 #define CTEST_DEC_4347 4346 #define CTEST_DEC_4348 4347 #define CTEST_DEC_4349 4348 #define CTEST_DEC_4350 4349 #define CTEST_DEC_4351 4350 #define CTEST_DEC_4352 4351 #define CTEST_DEC_4353 4352 #define CTEST_DEC_4354 4353 #define CTEST_DEC_4355 4354 #define CTEST_DEC_4356 4355 #define CTEST_DEC_4357 4356 #define CTEST_DEC_4358 4357 #define CTEST_DEC_4359 4358 #define CTEST_DEC_4360 4359 #define CTEST_DEC_4361 4360 #define CTEST_DEC_4362 4361 #define CTEST_DEC_4363 4362 #define CTEST_DEC_4364 4363 #define CTEST_DEC_4365 4364 #define CTEST_DEC_4366 4365 #define CTEST_DEC_4367 4366 #define CTEST_DEC_4368 4367 #define CTEST_DEC_4369 4368 #define CTEST_DEC_4370 4369 #define CTEST_DEC_4371 4370 #define CTEST_DEC_4372 4371 #define CTEST_DEC_4373 4372 #define CTEST_DEC_4374 4373 #define CTEST_DEC_4375 4374 #define CTEST_DEC_4376 4375 #define CTEST_DEC_4377 4376 #define CTEST_DEC_4378 4377 #define CTEST_DEC_4379 4378 #define CTEST_DEC_4380 4379 #define CTEST_DEC_4381 4380 #define CTEST_DEC_4382 4381 #define CTEST_DEC_4383 4382 #define CTEST_DEC_4384 4383 #define CTEST_DEC_4385 4384 #define CTEST_DEC_4386 4385 #define CTEST_DEC_4387 4386 #define CTEST_DEC_4388 4387 #define CTEST_DEC_4389 4388 #define CTEST_DEC_4390 4389 #define CTEST_DEC_4391 4390 #define CTEST_DEC_4392 4391 #define CTEST_DEC_4393 4392 #define CTEST_DEC_4394 4393 #define CTEST_DEC_4395 4394 #define CTEST_DEC_4396 4395 #define CTEST_DEC_4397 4396 #define CTEST_DEC_4398 4397 #define CTEST_DEC_4399 4398 #define CTEST_DEC_4400 4399 #define CTEST_DEC_4401 4400 #define CTEST_DEC_4402 4401 #define CTEST_DEC_4403 4402 #define CTEST_DEC_4404 4403 #define CTEST_DEC_4405 4404 #define CTEST_DEC_4406 4405 #define CTEST_DEC_4407 4406 #define CTEST_DEC_4408 4407 #define CTEST_DEC_4409 4408 #define CTEST_DEC_4410 4409 #define CTEST_DEC_4411 4410 #define CTEST_DEC_4412 4411 #define CTEST_DEC_4413 4412 #define CTEST_DEC_4414 4413 #define CTEST_DEC_4415 4414 #define CTEST_DEC_4416 4415 #define CTEST_DEC_4417 4416 #define CTEST_DEC_4418 4417 #define CTEST_DEC_4419 4418 #define CTEST_DEC_4420 4419 #define CTEST_DEC_4421 4420 #define CTEST_DEC_4422 4421 #define CTEST_DEC_4423 4422 #define CTEST_DEC_4424 4423 #define CTEST_DEC_4425 4424 #define CTEST_DEC_4426 4425 #define CTEST_DEC_4427 4426 #define CTEST_DEC_4428 4427 #define CTEST_DEC_4429 4428 #define CTEST_DEC_4430 4429 #define CTEST_DEC_4431 4430 #define CTEST_DEC_4432 4431 #define CTEST_DEC_4433 4432 #define CTEST_DEC_4434 4433 #define CTEST_DEC_4435 4434 #define CTEST_DEC_4436 4435 #define CTEST_DEC_4437 4436 #define CTEST_DEC_4438 4437 #define CTEST_DEC_4439 4438 #define CTEST_DEC_4440 4439 #define CTEST_DEC_4441 4440 #define CTEST_DEC_4442 4441 #define CTEST_DEC_4443 4442 #define CTEST_DEC_4444 4443 #define CTEST_DEC_4445 4444 #define CTEST_DEC_4446 4445 #define CTEST_DEC_4447 4446 #define CTEST_DEC_4448 4447 #define CTEST_DEC_4449 4448 #define CTEST_DEC_4450 4449 #define CTEST_DEC_4451 4450 #define CTEST_DEC_4452 4451 #define CTEST_DEC_4453 4452 #define CTEST_DEC_4454 4453 #define CTEST_DEC_4455 4454 #define CTEST_DEC_4456 4455 #define CTEST_DEC_4457 4456 #define CTEST_DEC_4458 4457 #define CTEST_DEC_4459 4458 #define CTEST_DEC_4460 4459 #define CTEST_DEC_4461 4460 #define CTEST_DEC_4462 4461 #define CTEST_DEC_4463 4462 #define CTEST_DEC_4464 4463 #define CTEST_DEC_4465 4464 #define CTEST_DEC_4466 4465 #define CTEST_DEC_4467 4466 #define CTEST_DEC_4468 4467 #define CTEST_DEC_4469 4468 #define CTEST_DEC_4470 4469 #define CTEST_DEC_4471 4470 #define CTEST_DEC_4472 4471 #define CTEST_DEC_4473 4472 #define CTEST_DEC_4474 4473 #define CTEST_DEC_4475 4474 #define CTEST_DEC_4476 4475 #define CTEST_DEC_4477 4476 #define CTEST_DEC_4478 4477 #define CTEST_DEC_4479 4478 #define CTEST_DEC_4480 4479 #define CTEST_DEC_4481 4480 #define CTEST_DEC_4482 4481 #define CTEST_DEC_4483 4482 #define CTEST_DEC_4484 4483 #define CTEST_DEC_4485 4484 #define CTEST_DEC_4486 4485 #define CTEST_DEC_4487 4486 #define CTEST_DEC_4488 4487 #define CTEST_DEC_4489 4488 #define CTEST_DEC_4490 4489 #define CTEST_DEC_4491 4490 #define CTEST_DEC_4492 4491 #define CTEST_DEC_4493 4492 #define CTEST_DEC_4494 4493 #define CTEST_DEC_4495 4494 #define CTEST_DEC_4496 4495 #define CTEST_DEC_4497 4496 #define CTEST_DEC_4498 4497 #define CTEST_DEC_4499 4498 #define CTEST_DEC_4500 4499 #define CTEST_DEC_4501 4500 #define CTEST_DEC_4502 4501 #define CTEST_DEC_4503 4502 #define CTEST_DEC_4504 4503 #define CTEST_DEC_4505 4504 #define CTEST_DEC_4506 4505 #define CTEST_DEC_4507 4506 #define CTEST_DEC_4508 4507 #define CTEST_DEC_4509 4508 #define CTEST_DEC_4510 4509 #define CTEST_DEC_4511 4510 #define CTEST_DEC_4512 4511 #define CTEST_DEC_4513 4512 #define CTEST_DEC_4514 4513 #define CTEST_DEC_4515 4514 #define CTEST_DEC_4516 4515 #define CTEST_DEC_4517 4516 #define CTEST_DEC_4518 4517 #define CTEST_DEC_4519 4518 #define CTEST_DEC_4520 4519 #define CTEST_DEC_4521 4520 #define CTEST_DEC_4522 4521 #define CTEST_DEC_4523 4522 #define CTEST_DEC_4524 4523 #define CTEST_DEC_4525 4524 #define CTEST_DEC_4526 4525 #define CTEST_DEC_4527 4526 #define CTEST_DEC_4528 4527 #define CTEST_DEC_4529 4528 #define CTEST_DEC_4530 4529 #define CTEST_DEC_4531 4530 #define CTEST_DEC_4532 4531 #define CTEST_DEC_4533 4532 #define CTEST_DEC_4534 4533 #define CTEST_DEC_4535 4534 #define CTEST_DEC_4536 4535 #define CTEST_DEC_4537 4536 #define CTEST_DEC_4538 4537 #define CTEST_DEC_4539 4538 #define CTEST_DEC_4540 4539 #define CTEST_DEC_4541 4540 #define CTEST_DEC_4542 4541 #define CTEST_DEC_4543 4542 #define CTEST_DEC_4544 4543 #define CTEST_DEC_4545 4544 #define CTEST_DEC_4546 4545 #define CTEST_DEC_4547 4546 #define CTEST_DEC_4548 4547 #define CTEST_DEC_4549 4548 #define CTEST_DEC_4550 4549 #define CTEST_DEC_4551 4550 #define CTEST_DEC_4552 4551 #define CTEST_DEC_4553 4552 #define CTEST_DEC_4554 4553 #define CTEST_DEC_4555 4554 #define CTEST_DEC_4556 4555 #define CTEST_DEC_4557 4556 #define CTEST_DEC_4558 4557 #define CTEST_DEC_4559 4558 #define CTEST_DEC_4560 4559 #define CTEST_DEC_4561 4560 #define CTEST_DEC_4562 4561 #define CTEST_DEC_4563 4562 #define CTEST_DEC_4564 4563 #define CTEST_DEC_4565 4564 #define CTEST_DEC_4566 4565 #define CTEST_DEC_4567 4566 #define CTEST_DEC_4568 4567 #define CTEST_DEC_4569 4568 #define CTEST_DEC_4570 4569 #define CTEST_DEC_4571 4570 #define CTEST_DEC_4572 4571 #define CTEST_DEC_4573 4572 #define CTEST_DEC_4574 4573 #define CTEST_DEC_4575 4574 #define CTEST_DEC_4576 4575 #define CTEST_DEC_4577 4576 #define CTEST_DEC_4578 4577 #define CTEST_DEC_4579 4578 #define CTEST_DEC_4580 4579 #define CTEST_DEC_4581 4580 #define CTEST_DEC_4582 4581 #define CTEST_DEC_4583 4582 #define CTEST_DEC_4584 4583 #define CTEST_DEC_4585 4584 #define CTEST_DEC_4586 4585 #define CTEST_DEC_4587 4586 #define CTEST_DEC_4588 4587 #define CTEST_DEC_4589 4588 #define CTEST_DEC_4590 4589 #define CTEST_DEC_4591 4590 #define CTEST_DEC_4592 4591 #define CTEST_DEC_4593 4592 #define CTEST_DEC_4594 4593 #define CTEST_DEC_4595 4594 #define CTEST_DEC_4596 4595 #define CTEST_DEC_4597 4596 #define CTEST_DEC_4598 4597 #define CTEST_DEC_4599 4598 #define CTEST_DEC_4600 4599 #define CTEST_DEC_4601 4600 #define CTEST_DEC_4602 4601 #define CTEST_DEC_4603 4602 #define CTEST_DEC_4604 4603 #define CTEST_DEC_4605 4604 #define CTEST_DEC_4606 4605 #define CTEST_DEC_4607 4606 #define CTEST_DEC_4608 4607 #define CTEST_DEC_4609 4608 #define CTEST_DEC_4610 4609 #define CTEST_DEC_4611 4610 #define CTEST_DEC_4612 4611 #define CTEST_DEC_4613 4612 #define CTEST_DEC_4614 4613 #define CTEST_DEC_4615 4614 #define CTEST_DEC_4616 4615 #define CTEST_DEC_4617 4616 #define CTEST_DEC_4618 4617 #define CTEST_DEC_4619 4618 #define CTEST_DEC_4620 4619 #define CTEST_DEC_4621 4620 #define CTEST_DEC_4622 4621 #define CTEST_DEC_4623 4622 #define CTEST_DEC_4624 4623 #define CTEST_DEC_4625 4624 #define CTEST_DEC_4626 4625 #define CTEST_DEC_4627 4626 #define CTEST_DEC_4628 4627 #define CTEST_DEC_4629 4628 #define CTEST_DEC_4630 4629 #define CTEST_DEC_4631 4630 #define CTEST_DEC_4632 4631 #define CTEST_DEC_4633 4632 #define CTEST_DEC_4634 4633 #define CTEST_DEC_4635 4634 #define CTEST_DEC_4636 4635 #define CTEST_DEC_4637 4636 #define CTEST_DEC_4638 4637 #define CTEST_DEC_4639 4638 #define CTEST_DEC_4640 4639 #define CTEST_DEC_4641 4640 #define CTEST_DEC_4642 4641 #define CTEST_DEC_4643 4642 #define CTEST_DEC_4644 4643 #define CTEST_DEC_4645 4644 #define CTEST_DEC_4646 4645 #define CTEST_DEC_4647 4646 #define CTEST_DEC_4648 4647 #define CTEST_DEC_4649 4648 #define CTEST_DEC_4650 4649 #define CTEST_DEC_4651 4650 #define CTEST_DEC_4652 4651 #define CTEST_DEC_4653 4652 #define CTEST_DEC_4654 4653 #define CTEST_DEC_4655 4654 #define CTEST_DEC_4656 4655 #define CTEST_DEC_4657 4656 #define CTEST_DEC_4658 4657 #define CTEST_DEC_4659 4658 #define CTEST_DEC_4660 4659 #define CTEST_DEC_4661 4660 #define CTEST_DEC_4662 4661 #define CTEST_DEC_4663 4662 #define CTEST_DEC_4664 4663 #define CTEST_DEC_4665 4664 #define CTEST_DEC_4666 4665 #define CTEST_DEC_4667 4666 #define CTEST_DEC_4668 4667 #define CTEST_DEC_4669 4668 #define CTEST_DEC_4670 4669 #define CTEST_DEC_4671 4670 #define CTEST_DEC_4672 4671 #define CTEST_DEC_4673 4672 #define CTEST_DEC_4674 4673 #define CTEST_DEC_4675 4674 #define CTEST_DEC_4676 4675 #define CTEST_DEC_4677 4676 #define CTEST_DEC_4678 4677 #define CTEST_DEC_4679 4678 #define CTEST_DEC_4680 4679 #define CTEST_DEC_4681 4680 #define CTEST_DEC_4682 4681 #define CTEST_DEC_4683 4682 #define CTEST_DEC_4684 4683 #define CTEST_DEC_4685 4684 #define CTEST_DEC_4686 4685 #define CTEST_DEC_4687 4686 #define CTEST_DEC_4688 4687 #define CTEST_DEC_4689 4688 #define CTEST_DEC_4690 4689 #define CTEST_DEC_4691 4690 #define CTEST_DEC_4692 4691 #define CTEST_DEC_4693 4692 #define CTEST_DEC_4694 4693 #define CTEST_DEC_4695 4694 #define CTEST_DEC_4696 4695 #define CTEST_DEC_4697 4696 #define CTEST_DEC_4698 4697 #define CTEST_DEC_4699 4698 #define CTEST_DEC_4700 4699 #define CTEST_DEC_4701 4700 #define CTEST_DEC_4702 4701 #define CTEST_DEC_4703 4702 #define CTEST_DEC_4704 4703 #define CTEST_DEC_4705 4704 #define CTEST_DEC_4706 4705 #define CTEST_DEC_4707 4706 #define CTEST_DEC_4708 4707 #define CTEST_DEC_4709 4708 #define CTEST_DEC_4710 4709 #define CTEST_DEC_4711 4710 #define CTEST_DEC_4712 4711 #define CTEST_DEC_4713 4712 #define CTEST_DEC_4714 4713 #define CTEST_DEC_4715 4714 #define CTEST_DEC_4716 4715 #define CTEST_DEC_4717 4716 #define CTEST_DEC_4718 4717 #define CTEST_DEC_4719 4718 #define CTEST_DEC_4720 4719 #define CTEST_DEC_4721 4720 #define CTEST_DEC_4722 4721 #define CTEST_DEC_4723 4722 #define CTEST_DEC_4724 4723 #define CTEST_DEC_4725 4724 #define CTEST_DEC_4726 4725 #define CTEST_DEC_4727 4726 #define CTEST_DEC_4728 4727 #define CTEST_DEC_4729 4728 #define CTEST_DEC_4730 4729 #define CTEST_DEC_4731 4730 #define CTEST_DEC_4732 4731 #define CTEST_DEC_4733 4732 #define CTEST_DEC_4734 4733 #define CTEST_DEC_4735 4734 #define CTEST_DEC_4736 4735 #define CTEST_DEC_4737 4736 #define CTEST_DEC_4738 4737 #define CTEST_DEC_4739 4738 #define CTEST_DEC_4740 4739 #define CTEST_DEC_4741 4740 #define CTEST_DEC_4742 4741 #define CTEST_DEC_4743 4742 #define CTEST_DEC_4744 4743 #define CTEST_DEC_4745 4744 #define CTEST_DEC_4746 4745 #define CTEST_DEC_4747 4746 #define CTEST_DEC_4748 4747 #define CTEST_DEC_4749 4748 #define CTEST_DEC_4750 4749 #define CTEST_DEC_4751 4750 #define CTEST_DEC_4752 4751 #define CTEST_DEC_4753 4752 #define CTEST_DEC_4754 4753 #define CTEST_DEC_4755 4754 #define CTEST_DEC_4756 4755 #define CTEST_DEC_4757 4756 #define CTEST_DEC_4758 4757 #define CTEST_DEC_4759 4758 #define CTEST_DEC_4760 4759 #define CTEST_DEC_4761 4760 #define CTEST_DEC_4762 4761 #define CTEST_DEC_4763 4762 #define CTEST_DEC_4764 4763 #define CTEST_DEC_4765 4764 #define CTEST_DEC_4766 4765 #define CTEST_DEC_4767 4766 #define CTEST_DEC_4768 4767 #define CTEST_DEC_4769 4768 #define CTEST_DEC_4770 4769 #define CTEST_DEC_4771 4770 #define CTEST_DEC_4772 4771 #define CTEST_DEC_4773 4772 #define CTEST_DEC_4774 4773 #define CTEST_DEC_4775 4774 #define CTEST_DEC_4776 4775 #define CTEST_DEC_4777 4776 #define CTEST_DEC_4778 4777 #define CTEST_DEC_4779 4778 #define CTEST_DEC_4780 4779 #define CTEST_DEC_4781 4780 #define CTEST_DEC_4782 4781 #define CTEST_DEC_4783 4782 #define CTEST_DEC_4784 4783 #define CTEST_DEC_4785 4784 #define CTEST_DEC_4786 4785 #define CTEST_DEC_4787 4786 #define CTEST_DEC_4788 4787 #define CTEST_DEC_4789 4788 #define CTEST_DEC_4790 4789 #define CTEST_DEC_4791 4790 #define CTEST_DEC_4792 4791 #define CTEST_DEC_4793 4792 #define CTEST_DEC_4794 4793 #define CTEST_DEC_4795 4794 #define CTEST_DEC_4796 4795 #define CTEST_DEC_4797 4796 #define CTEST_DEC_4798 4797 #define CTEST_DEC_4799 4798 #define CTEST_DEC_4800 4799 #define CTEST_DEC_4801 4800 #define CTEST_DEC_4802 4801 #define CTEST_DEC_4803 4802 #define CTEST_DEC_4804 4803 #define CTEST_DEC_4805 4804 #define CTEST_DEC_4806 4805 #define CTEST_DEC_4807 4806 #define CTEST_DEC_4808 4807 #define CTEST_DEC_4809 4808 #define CTEST_DEC_4810 4809 #define CTEST_DEC_4811 4810 #define CTEST_DEC_4812 4811 #define CTEST_DEC_4813 4812 #define CTEST_DEC_4814 4813 #define CTEST_DEC_4815 4814 #define CTEST_DEC_4816 4815 #define CTEST_DEC_4817 4816 #define CTEST_DEC_4818 4817 #define CTEST_DEC_4819 4818 #define CTEST_DEC_4820 4819 #define CTEST_DEC_4821 4820 #define CTEST_DEC_4822 4821 #define CTEST_DEC_4823 4822 #define CTEST_DEC_4824 4823 #define CTEST_DEC_4825 4824 #define CTEST_DEC_4826 4825 #define CTEST_DEC_4827 4826 #define CTEST_DEC_4828 4827 #define CTEST_DEC_4829 4828 #define CTEST_DEC_4830 4829 #define CTEST_DEC_4831 4830 #define CTEST_DEC_4832 4831 #define CTEST_DEC_4833 4832 #define CTEST_DEC_4834 4833 #define CTEST_DEC_4835 4834 #define CTEST_DEC_4836 4835 #define CTEST_DEC_4837 4836 #define CTEST_DEC_4838 4837 #define CTEST_DEC_4839 4838 #define CTEST_DEC_4840 4839 #define CTEST_DEC_4841 4840 #define CTEST_DEC_4842 4841 #define CTEST_DEC_4843 4842 #define CTEST_DEC_4844 4843 #define CTEST_DEC_4845 4844 #define CTEST_DEC_4846 4845 #define CTEST_DEC_4847 4846 #define CTEST_DEC_4848 4847 #define CTEST_DEC_4849 4848 #define CTEST_DEC_4850 4849 #define CTEST_DEC_4851 4850 #define CTEST_DEC_4852 4851 #define CTEST_DEC_4853 4852 #define CTEST_DEC_4854 4853 #define CTEST_DEC_4855 4854 #define CTEST_DEC_4856 4855 #define CTEST_DEC_4857 4856 #define CTEST_DEC_4858 4857 #define CTEST_DEC_4859 4858 #define CTEST_DEC_4860 4859 #define CTEST_DEC_4861 4860 #define CTEST_DEC_4862 4861 #define CTEST_DEC_4863 4862 #define CTEST_DEC_4864 4863 #define CTEST_DEC_4865 4864 #define CTEST_DEC_4866 4865 #define CTEST_DEC_4867 4866 #define CTEST_DEC_4868 4867 #define CTEST_DEC_4869 4868 #define CTEST_DEC_4870 4869 #define CTEST_DEC_4871 4870 #define CTEST_DEC_4872 4871 #define CTEST_DEC_4873 4872 #define CTEST_DEC_4874 4873 #define CTEST_DEC_4875 4874 #define CTEST_DEC_4876 4875 #define CTEST_DEC_4877 4876 #define CTEST_DEC_4878 4877 #define CTEST_DEC_4879 4878 #define CTEST_DEC_4880 4879 #define CTEST_DEC_4881 4880 #define CTEST_DEC_4882 4881 #define CTEST_DEC_4883 4882 #define CTEST_DEC_4884 4883 #define CTEST_DEC_4885 4884 #define CTEST_DEC_4886 4885 #define CTEST_DEC_4887 4886 #define CTEST_DEC_4888 4887 #define CTEST_DEC_4889 4888 #define CTEST_DEC_4890 4889 #define CTEST_DEC_4891 4890 #define CTEST_DEC_4892 4891 #define CTEST_DEC_4893 4892 #define CTEST_DEC_4894 4893 #define CTEST_DEC_4895 4894 #define CTEST_DEC_4896 4895 #define CTEST_DEC_4897 4896 #define CTEST_DEC_4898 4897 #define CTEST_DEC_4899 4898 #define CTEST_DEC_4900 4899 #define CTEST_DEC_4901 4900 #define CTEST_DEC_4902 4901 #define CTEST_DEC_4903 4902 #define CTEST_DEC_4904 4903 #define CTEST_DEC_4905 4904 #define CTEST_DEC_4906 4905 #define CTEST_DEC_4907 4906 #define CTEST_DEC_4908 4907 #define CTEST_DEC_4909 4908 #define CTEST_DEC_4910 4909 #define CTEST_DEC_4911 4910 #define CTEST_DEC_4912 4911 #define CTEST_DEC_4913 4912 #define CTEST_DEC_4914 4913 #define CTEST_DEC_4915 4914 #define CTEST_DEC_4916 4915 #define CTEST_DEC_4917 4916 #define CTEST_DEC_4918 4917 #define CTEST_DEC_4919 4918 #define CTEST_DEC_4920 4919 #define CTEST_DEC_4921 4920 #define CTEST_DEC_4922 4921 #define CTEST_DEC_4923 4922 #define CTEST_DEC_4924 4923 #define CTEST_DEC_4925 4924 #define CTEST_DEC_4926 4925 #define CTEST_DEC_4927 4926 #define CTEST_DEC_4928 4927 #define CTEST_DEC_4929 4928 #define CTEST_DEC_4930 4929 #define CTEST_DEC_4931 4930 #define CTEST_DEC_4932 4931 #define CTEST_DEC_4933 4932 #define CTEST_DEC_4934 4933 #define CTEST_DEC_4935 4934 #define CTEST_DEC_4936 4935 #define CTEST_DEC_4937 4936 #define CTEST_DEC_4938 4937 #define CTEST_DEC_4939 4938 #define CTEST_DEC_4940 4939 #define CTEST_DEC_4941 4940 #define CTEST_DEC_4942 4941 #define CTEST_DEC_4943 4942 #define CTEST_DEC_4944 4943 #define CTEST_DEC_4945 4944 #define CTEST_DEC_4946 4945 #define CTEST_DEC_4947 4946 #define CTEST_DEC_4948 4947 #define CTEST_DEC_4949 4948 #define CTEST_DEC_4950 4949 #define CTEST_DEC_4951 4950 #define CTEST_DEC_4952 4951 #define CTEST_DEC_4953 4952 #define CTEST_DEC_4954 4953 #define CTEST_DEC_4955 4954 #define CTEST_DEC_4956 4955 #define CTEST_DEC_4957 4956 #define CTEST_DEC_4958 4957 #define CTEST_DEC_4959 4958 #define CTEST_DEC_4960 4959 #define CTEST_DEC_4961 4960 #define CTEST_DEC_4962 4961 #define CTEST_DEC_4963 4962 #define CTEST_DEC_4964 4963 #define CTEST_DEC_4965 4964 #define CTEST_DEC_4966 4965 #define CTEST_DEC_4967 4966 #define CTEST_DEC_4968 4967 #define CTEST_DEC_4969 4968 #define CTEST_DEC_4970 4969 #define CTEST_DEC_4971 4970 #define CTEST_DEC_4972 4971 #define CTEST_DEC_4973 4972 #define CTEST_DEC_4974 4973 #define CTEST_DEC_4975 4974 #define CTEST_DEC_4976 4975 #define CTEST_DEC_4977 4976 #define CTEST_DEC_4978 4977 #define CTEST_DEC_4979 4978 #define CTEST_DEC_4980 4979 #define CTEST_DEC_4981 4980 #define CTEST_DEC_4982 4981 #define CTEST_DEC_4983 4982 #define CTEST_DEC_4984 4983 #define CTEST_DEC_4985 4984 #define CTEST_DEC_4986 4985 #define CTEST_DEC_4987 4986 #define CTEST_DEC_4988 4987 #define CTEST_DEC_4989 4988 #define CTEST_DEC_4990 4989 #define CTEST_DEC_4991 4990 #define CTEST_DEC_4992 4991 #define CTEST_DEC_4993 4992 #define CTEST_DEC_4994 4993 #define CTEST_DEC_4995 4994 #define CTEST_DEC_4996 4995 #define CTEST_DEC_4997 4996 #define CTEST_DEC_4998 4997 #define CTEST_DEC_4999 4998 #define CTEST_DEC_5000 4999 #define CTEST_DEC(x) EXPAND_2(CTEST_DEC_, x) #define THE_NTH_ARG(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124, ... ) P124 #define _TRIGGER_PARENTHESIS_(...) , #ifdef _MSC_VER #define LPAREN ( #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0) #else #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG (__VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG(__VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0) #endif #define COUNT_ARG(...) C2(COUNT_ARG_, ISEMPTY(__VA_ARGS__))(__VA_ARGS__) #define COUNT_ARG_1(...) 0 #define COUNT_ARG_0(...) C1(COUNT_1_OR_MORE_ARG(__VA_ARGS__)) #define ISEMPTY(...) C5(DISPTACH_EMPTY_, MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__ ()), MORE_THAN_1_ARG(__VA_ARGS__), MORE_THAN_1_ARG(__VA_ARGS__ ()), MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__)) #define DISPTACH_EMPTY_1000 1 #define DISPTACH_EMPTY_0000 0 #define DISPTACH_EMPTY_1100 0 #define DISPTACH_EMPTY_1111 0 #define DISPTACH_EMPTY_1001 0 #define DISPTACH_EMPTY_1010 0 #define C2_(x,y) x##y #define C2(x,y) C2_(x,y) #define C3(x,y,z) C2(x, C2(y,z)) #define C4(x,y,z, u) C2(C2(x,y), C2(z,u)) #define C5(x,y,z,u, v) C2(C4(x,y, z, u), v) #define C1_(x) x #define C1(x) C1_(x) #define C2STRING(x,y) x y #define C3STRING(x,y,z) x y z #define C4STRING(x,y,z,u) x y z u #define C5STRING(x,y,z,u,v) x y z u v #define FOR_EACH_1_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P1) \ FOR_EACH_1_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_1_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(P1) \ FOR_EACH_1_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P1) \ FOR_EACH_1_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(P1) \ FOR_EACH_1_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P1) \ FOR_EACH_1_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(P1) \ FOR_EACH_1_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P1) \ FOR_EACH_1_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(P1) \ FOR_EACH_1_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P1) \ FOR_EACH_1_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(P1) \ FOR_EACH_1_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P1) \ FOR_EACH_1_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(P1) \ FOR_EACH_1_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P1) \ FOR_EACH_1_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(P1) \ FOR_EACH_1_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P1) \ FOR_EACH_1_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(P1) \ FOR_EACH_1_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P1) \ FOR_EACH_1_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(P1) \ FOR_EACH_1_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P1) \ FOR_EACH_1_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(P1) \ FOR_EACH_1_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P1) \ FOR_EACH_1_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(P1) \ FOR_EACH_1_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P1) \ FOR_EACH_1_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(P1) \ FOR_EACH_1_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P1) \ FOR_EACH_1_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(P1) \ FOR_EACH_1_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P1) \ FOR_EACH_1_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(P1) \ FOR_EACH_1_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P1) \ FOR_EACH_1_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(P1) \ FOR_EACH_1_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P1) \ FOR_EACH_1_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(P1) \ FOR_EACH_1_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P1) \ FOR_EACH_1_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(P1) \ FOR_EACH_1_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P1) \ FOR_EACH_1_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(P1) \ FOR_EACH_1_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P1) \ FOR_EACH_1_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(P1) \ FOR_EACH_1_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P1) \ FOR_EACH_1_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(P1) \ FOR_EACH_1_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P1) \ FOR_EACH_1_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(P1) \ FOR_EACH_1_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P1) \ FOR_EACH_1_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(P1) \ FOR_EACH_1_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P1) \ FOR_EACH_1_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(P1) \ FOR_EACH_1_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P1) \ FOR_EACH_1_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(P1) \ FOR_EACH_1_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P1) \ FOR_EACH_1_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(P1) \ FOR_EACH_1_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P1) \ FOR_EACH_1_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(P1) \ FOR_EACH_1_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P1) \ FOR_EACH_1_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(P1) \ FOR_EACH_1_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P1) \ FOR_EACH_1_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(P1) \ FOR_EACH_1_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P1) \ FOR_EACH_1_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(P1) \ FOR_EACH_1_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P1) \ FOR_EACH_1_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(P1) \ FOR_EACH_1_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P1) \ FOR_EACH_1_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(P1) \ FOR_EACH_1_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P1) \ FOR_EACH_1_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(P1) \ FOR_EACH_1_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P1) \ FOR_EACH_1_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(P1) \ FOR_EACH_1_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P1) \ FOR_EACH_1_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(P1) \ FOR_EACH_1_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P1) \ FOR_EACH_1_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(P1) \ FOR_EACH_1_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P1) \ FOR_EACH_1_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(P1) \ FOR_EACH_1_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P1) \ FOR_EACH_1_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(P1) \ FOR_EACH_1_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P1) \ FOR_EACH_1_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(P1) \ FOR_EACH_1_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P1) \ FOR_EACH_1_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(P1) \ FOR_EACH_1_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P1) \ FOR_EACH_1_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(P1) \ FOR_EACH_1_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P1) \ FOR_EACH_1_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(P1) \ FOR_EACH_1_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P1) \ FOR_EACH_1_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(P1) \ FOR_EACH_1_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P1) \ FOR_EACH_1_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(P1) \ FOR_EACH_1_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P1) \ FOR_EACH_1_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(P1) \ FOR_EACH_1_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P1) \ FOR_EACH_1_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(P1) \ FOR_EACH_1_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P1) \ FOR_EACH_1_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(P1) \ FOR_EACH_1_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P1) \ FOR_EACH_1_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(P1) \ FOR_EACH_1_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P1) \ FOR_EACH_1_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(P1) \ FOR_EACH_1_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P1) \ FOR_EACH_1_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(P1) \ FOR_EACH_1_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P1) \ FOR_EACH_1_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(P1) \ FOR_EACH_1_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P1) \ FOR_EACH_1_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(P1) \ FOR_EACH_1_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P1) \ FOR_EACH_1_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(P1) \ FOR_EACH_1_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P1) \ FOR_EACH_1_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(P1) \ FOR_EACH_1_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P1) \ FOR_EACH_1_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(P1) \ FOR_EACH_1_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P1) \ FOR_EACH_1_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(P1) \ FOR_EACH_1_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P1) \ FOR_EACH_1_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(P1) \ FOR_EACH_1_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P1) \ FOR_EACH_1_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(P1) \ FOR_EACH_1_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P1) \ FOR_EACH_1_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(P1) \ FOR_EACH_1_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P1) \ FOR_EACH_1_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(P1) \ FOR_EACH_1_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_6(X, P1, P2, P3, P4, P5, P6) \ X(P1) \ FOR_EACH_1_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_5(X, P1, P2, P3, P4, P5) \ X(P1) \ FOR_EACH_1_4(X, P2, P3, P4, P5) #define FOR_EACH_1_4(X, P1, P2, P3, P4) \ X(P1) \ FOR_EACH_1_3(X, P2, P3, P4) #define FOR_EACH_1_3(X, P1, P2, P3) \ X(P1) \ FOR_EACH_1_2(X, P2, P3) #define FOR_EACH_1_2(X, P1, P2) \ X(P1) \ FOR_EACH_1_1(X, P2) #define FOR_EACH_1_1(X, P1) \ X(P1) #ifdef _MSC_VER #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_1_COUNTED_0(...) #define FOR_EACH_1_COUNTED_1(X, P1) \ X(1, P1) #define FOR_EACH_1_COUNTED_2(X, P1, P2) \ X(2, P1) \ FOR_EACH_1_COUNTED_1(X, P2) #define FOR_EACH_1_COUNTED_3(X, P1, P2, P3) \ X(3, P1) \ FOR_EACH_1_COUNTED_2(X, P2, P3) #define FOR_EACH_1_COUNTED_4(X, P1, P2, P3, P4) \ X(4, P1) \ FOR_EACH_1_COUNTED_3(X, P2, P3, P4) #define FOR_EACH_1_COUNTED_5(X, P1, P2, P3, P4, P5) \ X(5, P1) \ FOR_EACH_1_COUNTED_4(X, P2, P3, P4, P5) #define FOR_EACH_1_COUNTED_6(X, P1, P2, P3, P4, P5, P6) \ X(6, P1) \ FOR_EACH_1_COUNTED_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_COUNTED_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(7, P1) \ FOR_EACH_1_COUNTED_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_COUNTED_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(8, P1) \ FOR_EACH_1_COUNTED_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_COUNTED_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(9, P1) \ FOR_EACH_1_COUNTED_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_COUNTED_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(10, P1) \ FOR_EACH_1_COUNTED_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_COUNTED_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(11, P1) \ FOR_EACH_1_COUNTED_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_COUNTED_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(12, P1) \ FOR_EACH_1_COUNTED_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_COUNTED_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(13, P1) \ FOR_EACH_1_COUNTED_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_COUNTED_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(14, P1) \ FOR_EACH_1_COUNTED_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_COUNTED_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(15, P1) \ FOR_EACH_1_COUNTED_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_COUNTED_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(16, P1) \ FOR_EACH_1_COUNTED_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_COUNTED_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(17, P1) \ FOR_EACH_1_COUNTED_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_COUNTED_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(18, P1) \ FOR_EACH_1_COUNTED_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_COUNTED_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(19, P1) \ FOR_EACH_1_COUNTED_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_COUNTED_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(20, P1) \ FOR_EACH_1_COUNTED_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_COUNTED_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(21, P1) \ FOR_EACH_1_COUNTED_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_COUNTED_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(22, P1) \ FOR_EACH_1_COUNTED_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_COUNTED_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(23, P1) \ FOR_EACH_1_COUNTED_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_COUNTED_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(24, P1) \ FOR_EACH_1_COUNTED_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_COUNTED_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(25, P1) \ FOR_EACH_1_COUNTED_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_COUNTED_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(26, P1) \ FOR_EACH_1_COUNTED_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_COUNTED_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(27, P1) \ FOR_EACH_1_COUNTED_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_COUNTED_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(28, P1) \ FOR_EACH_1_COUNTED_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_COUNTED_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(29, P1) \ FOR_EACH_1_COUNTED_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_COUNTED_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(30, P1) \ FOR_EACH_1_COUNTED_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_COUNTED_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(31, P1) \ FOR_EACH_1_COUNTED_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_COUNTED_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(32, P1) \ FOR_EACH_1_COUNTED_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_COUNTED_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(33, P1) \ FOR_EACH_1_COUNTED_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_COUNTED_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(34, P1) \ FOR_EACH_1_COUNTED_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_COUNTED_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(35, P1) \ FOR_EACH_1_COUNTED_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_COUNTED_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(36, P1) \ FOR_EACH_1_COUNTED_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_COUNTED_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(37, P1) \ FOR_EACH_1_COUNTED_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_COUNTED_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(38, P1) \ FOR_EACH_1_COUNTED_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_COUNTED_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(39, P1) \ FOR_EACH_1_COUNTED_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_COUNTED_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(40, P1) \ FOR_EACH_1_COUNTED_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_COUNTED_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(41, P1) \ FOR_EACH_1_COUNTED_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_COUNTED_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(42, P1) \ FOR_EACH_1_COUNTED_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_COUNTED_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(43, P1) \ FOR_EACH_1_COUNTED_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_COUNTED_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(44, P1) \ FOR_EACH_1_COUNTED_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_COUNTED_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(45, P1) \ FOR_EACH_1_COUNTED_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_COUNTED_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(46, P1) \ FOR_EACH_1_COUNTED_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_COUNTED_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(47, P1) \ FOR_EACH_1_COUNTED_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_COUNTED_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(48, P1) \ FOR_EACH_1_COUNTED_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_COUNTED_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(49, P1) \ FOR_EACH_1_COUNTED_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_COUNTED_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(50, P1) \ FOR_EACH_1_COUNTED_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_COUNTED_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(51, P1) \ FOR_EACH_1_COUNTED_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_COUNTED_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(52, P1) \ FOR_EACH_1_COUNTED_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_COUNTED_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(53, P1) \ FOR_EACH_1_COUNTED_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_COUNTED_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(54, P1) \ FOR_EACH_1_COUNTED_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_COUNTED_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(55, P1) \ FOR_EACH_1_COUNTED_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_COUNTED_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(56, P1) \ FOR_EACH_1_COUNTED_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_COUNTED_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(57, P1) \ FOR_EACH_1_COUNTED_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_COUNTED_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(58, P1) \ FOR_EACH_1_COUNTED_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_COUNTED_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(59, P1) \ FOR_EACH_1_COUNTED_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_COUNTED_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(60, P1) \ FOR_EACH_1_COUNTED_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_COUNTED_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(61, P1) \ FOR_EACH_1_COUNTED_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_COUNTED_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(62, P1) \ FOR_EACH_1_COUNTED_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_COUNTED_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(63, P1) \ FOR_EACH_1_COUNTED_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_COUNTED_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(64, P1) \ FOR_EACH_1_COUNTED_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_COUNTED_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(65, P1) \ FOR_EACH_1_COUNTED_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_COUNTED_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(66, P1) \ FOR_EACH_1_COUNTED_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_COUNTED_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(67, P1) \ FOR_EACH_1_COUNTED_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_COUNTED_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(68, P1) \ FOR_EACH_1_COUNTED_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_COUNTED_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(69, P1) \ FOR_EACH_1_COUNTED_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_COUNTED_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(70, P1) \ FOR_EACH_1_COUNTED_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_COUNTED_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(71, P1) \ FOR_EACH_1_COUNTED_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_COUNTED_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(72, P1) \ FOR_EACH_1_COUNTED_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_COUNTED_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(73, P1) \ FOR_EACH_1_COUNTED_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_COUNTED_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(74, P1) \ FOR_EACH_1_COUNTED_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_COUNTED_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(75, P1) \ FOR_EACH_1_COUNTED_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_COUNTED_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(76, P1) \ FOR_EACH_1_COUNTED_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_COUNTED_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(77, P1) \ FOR_EACH_1_COUNTED_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_COUNTED_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(78, P1) \ FOR_EACH_1_COUNTED_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_COUNTED_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(79, P1) \ FOR_EACH_1_COUNTED_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_COUNTED_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(80, P1) \ FOR_EACH_1_COUNTED_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_COUNTED_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(81, P1) \ FOR_EACH_1_COUNTED_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_COUNTED_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(82, P1) \ FOR_EACH_1_COUNTED_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_COUNTED_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(83, P1) \ FOR_EACH_1_COUNTED_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_COUNTED_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(84, P1) \ FOR_EACH_1_COUNTED_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_COUNTED_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(85, P1) \ FOR_EACH_1_COUNTED_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_COUNTED_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(86, P1) \ FOR_EACH_1_COUNTED_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_COUNTED_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(87, P1) \ FOR_EACH_1_COUNTED_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_COUNTED_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(88, P1) \ FOR_EACH_1_COUNTED_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_COUNTED_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(89, P1) \ FOR_EACH_1_COUNTED_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_COUNTED_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(90, P1) \ FOR_EACH_1_COUNTED_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_COUNTED_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(91, P1) \ FOR_EACH_1_COUNTED_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_COUNTED_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(92, P1) \ FOR_EACH_1_COUNTED_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_COUNTED_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(93, P1) \ FOR_EACH_1_COUNTED_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_COUNTED_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(94, P1) \ FOR_EACH_1_COUNTED_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_COUNTED_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(95, P1) \ FOR_EACH_1_COUNTED_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_COUNTED_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(96, P1) \ FOR_EACH_1_COUNTED_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_COUNTED_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(97, P1) \ FOR_EACH_1_COUNTED_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_COUNTED_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(98, P1) \ FOR_EACH_1_COUNTED_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_COUNTED_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(99, P1) \ FOR_EACH_1_COUNTED_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_COUNTED_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(100, P1) \ FOR_EACH_1_COUNTED_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_COUNTED_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(101, P1) \ FOR_EACH_1_COUNTED_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_COUNTED_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(102, P1) \ FOR_EACH_1_COUNTED_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_COUNTED_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(103, P1) \ FOR_EACH_1_COUNTED_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_COUNTED_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(104, P1) \ FOR_EACH_1_COUNTED_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_COUNTED_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(105, P1) \ FOR_EACH_1_COUNTED_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_COUNTED_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(106, P1) \ FOR_EACH_1_COUNTED_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_COUNTED_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(107, P1) \ FOR_EACH_1_COUNTED_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_COUNTED_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(108, P1) \ FOR_EACH_1_COUNTED_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_COUNTED_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(109, P1) \ FOR_EACH_1_COUNTED_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_COUNTED_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(110, P1) \ FOR_EACH_1_COUNTED_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_COUNTED_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(111, P1) \ FOR_EACH_1_COUNTED_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_COUNTED_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(112, P1) \ FOR_EACH_1_COUNTED_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_COUNTED_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(113, P1) \ FOR_EACH_1_COUNTED_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_COUNTED_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(114, P1) \ FOR_EACH_1_COUNTED_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_COUNTED_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(115, P1) \ FOR_EACH_1_COUNTED_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_COUNTED_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(116, P1) \ FOR_EACH_1_COUNTED_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_COUNTED_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(117, P1) \ FOR_EACH_1_COUNTED_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_COUNTED_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(118, P1) \ FOR_EACH_1_COUNTED_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_COUNTED_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(119, P1) \ FOR_EACH_1_COUNTED_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_COUNTED_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(120, P1) \ FOR_EACH_1_COUNTED_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_COUNTED_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(121, P1) \ FOR_EACH_1_COUNTED_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_COUNTED_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(122, P1) \ FOR_EACH_1_COUNTED_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_COUNTED_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(123, P1) \ FOR_EACH_1_COUNTED_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_COUNTED_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(124, P1) \ FOR_EACH_1_COUNTED_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #ifdef _MSC_VER #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define DIV2(x) C2(DIV2_,x) #define DIV2_1024 512 #define DIV2_1023 511 #define DIV2_1022 511 #define DIV2_1021 510 #define DIV2_1020 510 #define DIV2_1019 509 #define DIV2_1018 509 #define DIV2_1017 508 #define DIV2_1016 508 #define DIV2_1015 507 #define DIV2_1014 507 #define DIV2_1013 506 #define DIV2_1012 506 #define DIV2_1011 505 #define DIV2_1010 505 #define DIV2_1009 504 #define DIV2_1008 504 #define DIV2_1007 503 #define DIV2_1006 503 #define DIV2_1005 502 #define DIV2_1004 502 #define DIV2_1003 501 #define DIV2_1002 501 #define DIV2_1001 500 #define DIV2_1000 500 #define DIV2_999 499 #define DIV2_998 499 #define DIV2_997 498 #define DIV2_996 498 #define DIV2_995 497 #define DIV2_994 497 #define DIV2_993 496 #define DIV2_992 496 #define DIV2_991 495 #define DIV2_990 495 #define DIV2_989 494 #define DIV2_988 494 #define DIV2_987 493 #define DIV2_986 493 #define DIV2_985 492 #define DIV2_984 492 #define DIV2_983 491 #define DIV2_982 491 #define DIV2_981 490 #define DIV2_980 490 #define DIV2_979 489 #define DIV2_978 489 #define DIV2_977 488 #define DIV2_976 488 #define DIV2_975 487 #define DIV2_974 487 #define DIV2_973 486 #define DIV2_972 486 #define DIV2_971 485 #define DIV2_970 485 #define DIV2_969 484 #define DIV2_968 484 #define DIV2_967 483 #define DIV2_966 483 #define DIV2_965 482 #define DIV2_964 482 #define DIV2_963 481 #define DIV2_962 481 #define DIV2_961 480 #define DIV2_960 480 #define DIV2_959 479 #define DIV2_958 479 #define DIV2_957 478 #define DIV2_956 478 #define DIV2_955 477 #define DIV2_954 477 #define DIV2_953 476 #define DIV2_952 476 #define DIV2_951 475 #define DIV2_950 475 #define DIV2_949 474 #define DIV2_948 474 #define DIV2_947 473 #define DIV2_946 473 #define DIV2_945 472 #define DIV2_944 472 #define DIV2_943 471 #define DIV2_942 471 #define DIV2_941 470 #define DIV2_940 470 #define DIV2_939 469 #define DIV2_938 469 #define DIV2_937 468 #define DIV2_936 468 #define DIV2_935 467 #define DIV2_934 467 #define DIV2_933 466 #define DIV2_932 466 #define DIV2_931 465 #define DIV2_930 465 #define DIV2_929 464 #define DIV2_928 464 #define DIV2_927 463 #define DIV2_926 463 #define DIV2_925 462 #define DIV2_924 462 #define DIV2_923 461 #define DIV2_922 461 #define DIV2_921 460 #define DIV2_920 460 #define DIV2_919 459 #define DIV2_918 459 #define DIV2_917 458 #define DIV2_916 458 #define DIV2_915 457 #define DIV2_914 457 #define DIV2_913 456 #define DIV2_912 456 #define DIV2_911 455 #define DIV2_910 455 #define DIV2_909 454 #define DIV2_908 454 #define DIV2_907 453 #define DIV2_906 453 #define DIV2_905 452 #define DIV2_904 452 #define DIV2_903 451 #define DIV2_902 451 #define DIV2_901 450 #define DIV2_900 450 #define DIV2_899 449 #define DIV2_898 449 #define DIV2_897 448 #define DIV2_896 448 #define DIV2_895 447 #define DIV2_894 447 #define DIV2_893 446 #define DIV2_892 446 #define DIV2_891 445 #define DIV2_890 445 #define DIV2_889 444 #define DIV2_888 444 #define DIV2_887 443 #define DIV2_886 443 #define DIV2_885 442 #define DIV2_884 442 #define DIV2_883 441 #define DIV2_882 441 #define DIV2_881 440 #define DIV2_880 440 #define DIV2_879 439 #define DIV2_878 439 #define DIV2_877 438 #define DIV2_876 438 #define DIV2_875 437 #define DIV2_874 437 #define DIV2_873 436 #define DIV2_872 436 #define DIV2_871 435 #define DIV2_870 435 #define DIV2_869 434 #define DIV2_868 434 #define DIV2_867 433 #define DIV2_866 433 #define DIV2_865 432 #define DIV2_864 432 #define DIV2_863 431 #define DIV2_862 431 #define DIV2_861 430 #define DIV2_860 430 #define DIV2_859 429 #define DIV2_858 429 #define DIV2_857 428 #define DIV2_856 428 #define DIV2_855 427 #define DIV2_854 427 #define DIV2_853 426 #define DIV2_852 426 #define DIV2_851 425 #define DIV2_850 425 #define DIV2_849 424 #define DIV2_848 424 #define DIV2_847 423 #define DIV2_846 423 #define DIV2_845 422 #define DIV2_844 422 #define DIV2_843 421 #define DIV2_842 421 #define DIV2_841 420 #define DIV2_840 420 #define DIV2_839 419 #define DIV2_838 419 #define DIV2_837 418 #define DIV2_836 418 #define DIV2_835 417 #define DIV2_834 417 #define DIV2_833 416 #define DIV2_832 416 #define DIV2_831 415 #define DIV2_830 415 #define DIV2_829 414 #define DIV2_828 414 #define DIV2_827 413 #define DIV2_826 413 #define DIV2_825 412 #define DIV2_824 412 #define DIV2_823 411 #define DIV2_822 411 #define DIV2_821 410 #define DIV2_820 410 #define DIV2_819 409 #define DIV2_818 409 #define DIV2_817 408 #define DIV2_816 408 #define DIV2_815 407 #define DIV2_814 407 #define DIV2_813 406 #define DIV2_812 406 #define DIV2_811 405 #define DIV2_810 405 #define DIV2_809 404 #define DIV2_808 404 #define DIV2_807 403 #define DIV2_806 403 #define DIV2_805 402 #define DIV2_804 402 #define DIV2_803 401 #define DIV2_802 401 #define DIV2_801 400 #define DIV2_800 400 #define DIV2_799 399 #define DIV2_798 399 #define DIV2_797 398 #define DIV2_796 398 #define DIV2_795 397 #define DIV2_794 397 #define DIV2_793 396 #define DIV2_792 396 #define DIV2_791 395 #define DIV2_790 395 #define DIV2_789 394 #define DIV2_788 394 #define DIV2_787 393 #define DIV2_786 393 #define DIV2_785 392 #define DIV2_784 392 #define DIV2_783 391 #define DIV2_782 391 #define DIV2_781 390 #define DIV2_780 390 #define DIV2_779 389 #define DIV2_778 389 #define DIV2_777 388 #define DIV2_776 388 #define DIV2_775 387 #define DIV2_774 387 #define DIV2_773 386 #define DIV2_772 386 #define DIV2_771 385 #define DIV2_770 385 #define DIV2_769 384 #define DIV2_768 384 #define DIV2_767 383 #define DIV2_766 383 #define DIV2_765 382 #define DIV2_764 382 #define DIV2_763 381 #define DIV2_762 381 #define DIV2_761 380 #define DIV2_760 380 #define DIV2_759 379 #define DIV2_758 379 #define DIV2_757 378 #define DIV2_756 378 #define DIV2_755 377 #define DIV2_754 377 #define DIV2_753 376 #define DIV2_752 376 #define DIV2_751 375 #define DIV2_750 375 #define DIV2_749 374 #define DIV2_748 374 #define DIV2_747 373 #define DIV2_746 373 #define DIV2_745 372 #define DIV2_744 372 #define DIV2_743 371 #define DIV2_742 371 #define DIV2_741 370 #define DIV2_740 370 #define DIV2_739 369 #define DIV2_738 369 #define DIV2_737 368 #define DIV2_736 368 #define DIV2_735 367 #define DIV2_734 367 #define DIV2_733 366 #define DIV2_732 366 #define DIV2_731 365 #define DIV2_730 365 #define DIV2_729 364 #define DIV2_728 364 #define DIV2_727 363 #define DIV2_726 363 #define DIV2_725 362 #define DIV2_724 362 #define DIV2_723 361 #define DIV2_722 361 #define DIV2_721 360 #define DIV2_720 360 #define DIV2_719 359 #define DIV2_718 359 #define DIV2_717 358 #define DIV2_716 358 #define DIV2_715 357 #define DIV2_714 357 #define DIV2_713 356 #define DIV2_712 356 #define DIV2_711 355 #define DIV2_710 355 #define DIV2_709 354 #define DIV2_708 354 #define DIV2_707 353 #define DIV2_706 353 #define DIV2_705 352 #define DIV2_704 352 #define DIV2_703 351 #define DIV2_702 351 #define DIV2_701 350 #define DIV2_700 350 #define DIV2_699 349 #define DIV2_698 349 #define DIV2_697 348 #define DIV2_696 348 #define DIV2_695 347 #define DIV2_694 347 #define DIV2_693 346 #define DIV2_692 346 #define DIV2_691 345 #define DIV2_690 345 #define DIV2_689 344 #define DIV2_688 344 #define DIV2_687 343 #define DIV2_686 343 #define DIV2_685 342 #define DIV2_684 342 #define DIV2_683 341 #define DIV2_682 341 #define DIV2_681 340 #define DIV2_680 340 #define DIV2_679 339 #define DIV2_678 339 #define DIV2_677 338 #define DIV2_676 338 #define DIV2_675 337 #define DIV2_674 337 #define DIV2_673 336 #define DIV2_672 336 #define DIV2_671 335 #define DIV2_670 335 #define DIV2_669 334 #define DIV2_668 334 #define DIV2_667 333 #define DIV2_666 333 #define DIV2_665 332 #define DIV2_664 332 #define DIV2_663 331 #define DIV2_662 331 #define DIV2_661 330 #define DIV2_660 330 #define DIV2_659 329 #define DIV2_658 329 #define DIV2_657 328 #define DIV2_656 328 #define DIV2_655 327 #define DIV2_654 327 #define DIV2_653 326 #define DIV2_652 326 #define DIV2_651 325 #define DIV2_650 325 #define DIV2_649 324 #define DIV2_648 324 #define DIV2_647 323 #define DIV2_646 323 #define DIV2_645 322 #define DIV2_644 322 #define DIV2_643 321 #define DIV2_642 321 #define DIV2_641 320 #define DIV2_640 320 #define DIV2_639 319 #define DIV2_638 319 #define DIV2_637 318 #define DIV2_636 318 #define DIV2_635 317 #define DIV2_634 317 #define DIV2_633 316 #define DIV2_632 316 #define DIV2_631 315 #define DIV2_630 315 #define DIV2_629 314 #define DIV2_628 314 #define DIV2_627 313 #define DIV2_626 313 #define DIV2_625 312 #define DIV2_624 312 #define DIV2_623 311 #define DIV2_622 311 #define DIV2_621 310 #define DIV2_620 310 #define DIV2_619 309 #define DIV2_618 309 #define DIV2_617 308 #define DIV2_616 308 #define DIV2_615 307 #define DIV2_614 307 #define DIV2_613 306 #define DIV2_612 306 #define DIV2_611 305 #define DIV2_610 305 #define DIV2_609 304 #define DIV2_608 304 #define DIV2_607 303 #define DIV2_606 303 #define DIV2_605 302 #define DIV2_604 302 #define DIV2_603 301 #define DIV2_602 301 #define DIV2_601 300 #define DIV2_600 300 #define DIV2_599 299 #define DIV2_598 299 #define DIV2_597 298 #define DIV2_596 298 #define DIV2_595 297 #define DIV2_594 297 #define DIV2_593 296 #define DIV2_592 296 #define DIV2_591 295 #define DIV2_590 295 #define DIV2_589 294 #define DIV2_588 294 #define DIV2_587 293 #define DIV2_586 293 #define DIV2_585 292 #define DIV2_584 292 #define DIV2_583 291 #define DIV2_582 291 #define DIV2_581 290 #define DIV2_580 290 #define DIV2_579 289 #define DIV2_578 289 #define DIV2_577 288 #define DIV2_576 288 #define DIV2_575 287 #define DIV2_574 287 #define DIV2_573 286 #define DIV2_572 286 #define DIV2_571 285 #define DIV2_570 285 #define DIV2_569 284 #define DIV2_568 284 #define DIV2_567 283 #define DIV2_566 283 #define DIV2_565 282 #define DIV2_564 282 #define DIV2_563 281 #define DIV2_562 281 #define DIV2_561 280 #define DIV2_560 280 #define DIV2_559 279 #define DIV2_558 279 #define DIV2_557 278 #define DIV2_556 278 #define DIV2_555 277 #define DIV2_554 277 #define DIV2_553 276 #define DIV2_552 276 #define DIV2_551 275 #define DIV2_550 275 #define DIV2_549 274 #define DIV2_548 274 #define DIV2_547 273 #define DIV2_546 273 #define DIV2_545 272 #define DIV2_544 272 #define DIV2_543 271 #define DIV2_542 271 #define DIV2_541 270 #define DIV2_540 270 #define DIV2_539 269 #define DIV2_538 269 #define DIV2_537 268 #define DIV2_536 268 #define DIV2_535 267 #define DIV2_534 267 #define DIV2_533 266 #define DIV2_532 266 #define DIV2_531 265 #define DIV2_530 265 #define DIV2_529 264 #define DIV2_528 264 #define DIV2_527 263 #define DIV2_526 263 #define DIV2_525 262 #define DIV2_524 262 #define DIV2_523 261 #define DIV2_522 261 #define DIV2_521 260 #define DIV2_520 260 #define DIV2_519 259 #define DIV2_518 259 #define DIV2_517 258 #define DIV2_516 258 #define DIV2_515 257 #define DIV2_514 257 #define DIV2_513 256 #define DIV2_512 256 #define DIV2_511 255 #define DIV2_510 255 #define DIV2_509 254 #define DIV2_508 254 #define DIV2_507 253 #define DIV2_506 253 #define DIV2_505 252 #define DIV2_504 252 #define DIV2_503 251 #define DIV2_502 251 #define DIV2_501 250 #define DIV2_500 250 #define DIV2_499 249 #define DIV2_498 249 #define DIV2_497 248 #define DIV2_496 248 #define DIV2_495 247 #define DIV2_494 247 #define DIV2_493 246 #define DIV2_492 246 #define DIV2_491 245 #define DIV2_490 245 #define DIV2_489 244 #define DIV2_488 244 #define DIV2_487 243 #define DIV2_486 243 #define DIV2_485 242 #define DIV2_484 242 #define DIV2_483 241 #define DIV2_482 241 #define DIV2_481 240 #define DIV2_480 240 #define DIV2_479 239 #define DIV2_478 239 #define DIV2_477 238 #define DIV2_476 238 #define DIV2_475 237 #define DIV2_474 237 #define DIV2_473 236 #define DIV2_472 236 #define DIV2_471 235 #define DIV2_470 235 #define DIV2_469 234 #define DIV2_468 234 #define DIV2_467 233 #define DIV2_466 233 #define DIV2_465 232 #define DIV2_464 232 #define DIV2_463 231 #define DIV2_462 231 #define DIV2_461 230 #define DIV2_460 230 #define DIV2_459 229 #define DIV2_458 229 #define DIV2_457 228 #define DIV2_456 228 #define DIV2_455 227 #define DIV2_454 227 #define DIV2_453 226 #define DIV2_452 226 #define DIV2_451 225 #define DIV2_450 225 #define DIV2_449 224 #define DIV2_448 224 #define DIV2_447 223 #define DIV2_446 223 #define DIV2_445 222 #define DIV2_444 222 #define DIV2_443 221 #define DIV2_442 221 #define DIV2_441 220 #define DIV2_440 220 #define DIV2_439 219 #define DIV2_438 219 #define DIV2_437 218 #define DIV2_436 218 #define DIV2_435 217 #define DIV2_434 217 #define DIV2_433 216 #define DIV2_432 216 #define DIV2_431 215 #define DIV2_430 215 #define DIV2_429 214 #define DIV2_428 214 #define DIV2_427 213 #define DIV2_426 213 #define DIV2_425 212 #define DIV2_424 212 #define DIV2_423 211 #define DIV2_422 211 #define DIV2_421 210 #define DIV2_420 210 #define DIV2_419 209 #define DIV2_418 209 #define DIV2_417 208 #define DIV2_416 208 #define DIV2_415 207 #define DIV2_414 207 #define DIV2_413 206 #define DIV2_412 206 #define DIV2_411 205 #define DIV2_410 205 #define DIV2_409 204 #define DIV2_408 204 #define DIV2_407 203 #define DIV2_406 203 #define DIV2_405 202 #define DIV2_404 202 #define DIV2_403 201 #define DIV2_402 201 #define DIV2_401 200 #define DIV2_400 200 #define DIV2_399 199 #define DIV2_398 199 #define DIV2_397 198 #define DIV2_396 198 #define DIV2_395 197 #define DIV2_394 197 #define DIV2_393 196 #define DIV2_392 196 #define DIV2_391 195 #define DIV2_390 195 #define DIV2_389 194 #define DIV2_388 194 #define DIV2_387 193 #define DIV2_386 193 #define DIV2_385 192 #define DIV2_384 192 #define DIV2_383 191 #define DIV2_382 191 #define DIV2_381 190 #define DIV2_380 190 #define DIV2_379 189 #define DIV2_378 189 #define DIV2_377 188 #define DIV2_376 188 #define DIV2_375 187 #define DIV2_374 187 #define DIV2_373 186 #define DIV2_372 186 #define DIV2_371 185 #define DIV2_370 185 #define DIV2_369 184 #define DIV2_368 184 #define DIV2_367 183 #define DIV2_366 183 #define DIV2_365 182 #define DIV2_364 182 #define DIV2_363 181 #define DIV2_362 181 #define DIV2_361 180 #define DIV2_360 180 #define DIV2_359 179 #define DIV2_358 179 #define DIV2_357 178 #define DIV2_356 178 #define DIV2_355 177 #define DIV2_354 177 #define DIV2_353 176 #define DIV2_352 176 #define DIV2_351 175 #define DIV2_350 175 #define DIV2_349 174 #define DIV2_348 174 #define DIV2_347 173 #define DIV2_346 173 #define DIV2_345 172 #define DIV2_344 172 #define DIV2_343 171 #define DIV2_342 171 #define DIV2_341 170 #define DIV2_340 170 #define DIV2_339 169 #define DIV2_338 169 #define DIV2_337 168 #define DIV2_336 168 #define DIV2_335 167 #define DIV2_334 167 #define DIV2_333 166 #define DIV2_332 166 #define DIV2_331 165 #define DIV2_330 165 #define DIV2_329 164 #define DIV2_328 164 #define DIV2_327 163 #define DIV2_326 163 #define DIV2_325 162 #define DIV2_324 162 #define DIV2_323 161 #define DIV2_322 161 #define DIV2_321 160 #define DIV2_320 160 #define DIV2_319 159 #define DIV2_318 159 #define DIV2_317 158 #define DIV2_316 158 #define DIV2_315 157 #define DIV2_314 157 #define DIV2_313 156 #define DIV2_312 156 #define DIV2_311 155 #define DIV2_310 155 #define DIV2_309 154 #define DIV2_308 154 #define DIV2_307 153 #define DIV2_306 153 #define DIV2_305 152 #define DIV2_304 152 #define DIV2_303 151 #define DIV2_302 151 #define DIV2_301 150 #define DIV2_300 150 #define DIV2_299 149 #define DIV2_298 149 #define DIV2_297 148 #define DIV2_296 148 #define DIV2_295 147 #define DIV2_294 147 #define DIV2_293 146 #define DIV2_292 146 #define DIV2_291 145 #define DIV2_290 145 #define DIV2_289 144 #define DIV2_288 144 #define DIV2_287 143 #define DIV2_286 143 #define DIV2_285 142 #define DIV2_284 142 #define DIV2_283 141 #define DIV2_282 141 #define DIV2_281 140 #define DIV2_280 140 #define DIV2_279 139 #define DIV2_278 139 #define DIV2_277 138 #define DIV2_276 138 #define DIV2_275 137 #define DIV2_274 137 #define DIV2_273 136 #define DIV2_272 136 #define DIV2_271 135 #define DIV2_270 135 #define DIV2_269 134 #define DIV2_268 134 #define DIV2_267 133 #define DIV2_266 133 #define DIV2_265 132 #define DIV2_264 132 #define DIV2_263 131 #define DIV2_262 131 #define DIV2_261 130 #define DIV2_260 130 #define DIV2_259 129 #define DIV2_258 129 #define DIV2_257 128 #define DIV2_256 128 #define DIV2_255 127 #define DIV2_254 127 #define DIV2_253 126 #define DIV2_252 126 #define DIV2_251 125 #define DIV2_250 125 #define DIV2_249 124 #define DIV2_248 124 #define DIV2_247 123 #define DIV2_246 123 #define DIV2_245 122 #define DIV2_244 122 #define DIV2_243 121 #define DIV2_242 121 #define DIV2_241 120 #define DIV2_240 120 #define DIV2_239 119 #define DIV2_238 119 #define DIV2_237 118 #define DIV2_236 118 #define DIV2_235 117 #define DIV2_234 117 #define DIV2_233 116 #define DIV2_232 116 #define DIV2_231 115 #define DIV2_230 115 #define DIV2_229 114 #define DIV2_228 114 #define DIV2_227 113 #define DIV2_226 113 #define DIV2_225 112 #define DIV2_224 112 #define DIV2_223 111 #define DIV2_222 111 #define DIV2_221 110 #define DIV2_220 110 #define DIV2_219 109 #define DIV2_218 109 #define DIV2_217 108 #define DIV2_216 108 #define DIV2_215 107 #define DIV2_214 107 #define DIV2_213 106 #define DIV2_212 106 #define DIV2_211 105 #define DIV2_210 105 #define DIV2_209 104 #define DIV2_208 104 #define DIV2_207 103 #define DIV2_206 103 #define DIV2_205 102 #define DIV2_204 102 #define DIV2_203 101 #define DIV2_202 101 #define DIV2_201 100 #define DIV2_200 100 #define DIV2_199 99 #define DIV2_198 99 #define DIV2_197 98 #define DIV2_196 98 #define DIV2_195 97 #define DIV2_194 97 #define DIV2_193 96 #define DIV2_192 96 #define DIV2_191 95 #define DIV2_190 95 #define DIV2_189 94 #define DIV2_188 94 #define DIV2_187 93 #define DIV2_186 93 #define DIV2_185 92 #define DIV2_184 92 #define DIV2_183 91 #define DIV2_182 91 #define DIV2_181 90 #define DIV2_180 90 #define DIV2_179 89 #define DIV2_178 89 #define DIV2_177 88 #define DIV2_176 88 #define DIV2_175 87 #define DIV2_174 87 #define DIV2_173 86 #define DIV2_172 86 #define DIV2_171 85 #define DIV2_170 85 #define DIV2_169 84 #define DIV2_168 84 #define DIV2_167 83 #define DIV2_166 83 #define DIV2_165 82 #define DIV2_164 82 #define DIV2_163 81 #define DIV2_162 81 #define DIV2_161 80 #define DIV2_160 80 #define DIV2_159 79 #define DIV2_158 79 #define DIV2_157 78 #define DIV2_156 78 #define DIV2_155 77 #define DIV2_154 77 #define DIV2_153 76 #define DIV2_152 76 #define DIV2_151 75 #define DIV2_150 75 #define DIV2_149 74 #define DIV2_148 74 #define DIV2_147 73 #define DIV2_146 73 #define DIV2_145 72 #define DIV2_144 72 #define DIV2_143 71 #define DIV2_142 71 #define DIV2_141 70 #define DIV2_140 70 #define DIV2_139 69 #define DIV2_138 69 #define DIV2_137 68 #define DIV2_136 68 #define DIV2_135 67 #define DIV2_134 67 #define DIV2_133 66 #define DIV2_132 66 #define DIV2_131 65 #define DIV2_130 65 #define DIV2_129 64 #define DIV2_128 64 #define DIV2_127 63 #define DIV2_126 63 #define DIV2_125 62 #define DIV2_124 62 #define DIV2_123 61 #define DIV2_122 61 #define DIV2_121 60 #define DIV2_120 60 #define DIV2_119 59 #define DIV2_118 59 #define DIV2_117 58 #define DIV2_116 58 #define DIV2_115 57 #define DIV2_114 57 #define DIV2_113 56 #define DIV2_112 56 #define DIV2_111 55 #define DIV2_110 55 #define DIV2_109 54 #define DIV2_108 54 #define DIV2_107 53 #define DIV2_106 53 #define DIV2_105 52 #define DIV2_104 52 #define DIV2_103 51 #define DIV2_102 51 #define DIV2_101 50 #define DIV2_100 50 #define DIV2_99 49 #define DIV2_98 49 #define DIV2_97 48 #define DIV2_96 48 #define DIV2_95 47 #define DIV2_94 47 #define DIV2_93 46 #define DIV2_92 46 #define DIV2_91 45 #define DIV2_90 45 #define DIV2_89 44 #define DIV2_88 44 #define DIV2_87 43 #define DIV2_86 43 #define DIV2_85 42 #define DIV2_84 42 #define DIV2_83 41 #define DIV2_82 41 #define DIV2_81 40 #define DIV2_80 40 #define DIV2_79 39 #define DIV2_78 39 #define DIV2_77 38 #define DIV2_76 38 #define DIV2_75 37 #define DIV2_74 37 #define DIV2_73 36 #define DIV2_72 36 #define DIV2_71 35 #define DIV2_70 35 #define DIV2_69 34 #define DIV2_68 34 #define DIV2_67 33 #define DIV2_66 33 #define DIV2_65 32 #define DIV2_64 32 #define DIV2_63 31 #define DIV2_62 31 #define DIV2_61 30 #define DIV2_60 30 #define DIV2_59 29 #define DIV2_58 29 #define DIV2_57 28 #define DIV2_56 28 #define DIV2_55 27 #define DIV2_54 27 #define DIV2_53 26 #define DIV2_52 26 #define DIV2_51 25 #define DIV2_50 25 #define DIV2_49 24 #define DIV2_48 24 #define DIV2_47 23 #define DIV2_46 23 #define DIV2_45 22 #define DIV2_44 22 #define DIV2_43 21 #define DIV2_42 21 #define DIV2_41 20 #define DIV2_40 20 #define DIV2_39 19 #define DIV2_38 19 #define DIV2_37 18 #define DIV2_36 18 #define DIV2_35 17 #define DIV2_34 17 #define DIV2_33 16 #define DIV2_32 16 #define DIV2_31 15 #define DIV2_30 15 #define DIV2_29 14 #define DIV2_28 14 #define DIV2_27 13 #define DIV2_26 13 #define DIV2_25 12 #define DIV2_24 12 #define DIV2_23 11 #define DIV2_22 11 #define DIV2_21 10 #define DIV2_20 10 #define DIV2_19 9 #define DIV2_18 9 #define DIV2_17 8 #define DIV2_16 8 #define DIV2_15 7 #define DIV2_14 7 #define DIV2_13 6 #define DIV2_12 6 #define DIV2_11 5 #define DIV2_10 5 #define DIV2_9 4 #define DIV2_8 4 #define DIV2_7 3 #define DIV2_6 3 #define DIV2_5 2 #define DIV2_4 2 #define DIV2_3 1 #define DIV2_2 1 #define DIV2_1 0 #define DIV2_0 0 #define THE_NTH_ARG(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124, ... ) P124 #define _TRIGGER_PARENTHESIS_(...) , #ifdef _MSC_VER #define LPAREN ( #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0) #else #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG (__VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG(__VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0) #endif /* we need some sort of macro that does: IF(0, "true", "false") => "false" IF(1, "true", "false") => "true" IF(X, "true", "false") => "true" */ #define INTERNALIF(x) INTERNALIF##x #define INTERNALIF0 #define ISZERO(x) COUNT_ARG(INTERNALIF(x)) #define IF(condition, trueBranch, falseBranch) C2(IF,ISZERO(condition))(trueBranch, falseBranch) #define IF0(trueBranch, falseBranch) falseBranch #define IF1(trueBranch, falseBranch) trueBranch #define TOSTRING_(x) #x #define TOSTRING(x) TOSTRING_(x) #define FIRST_ARG(arg, ...) \ arg #endif jenkins/000077500000000000000000000000001362133436400341005ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctestlinux_c_gcc44.sh000066400000000000000000000011151362133436400370570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) log_dir=$build_root make_install= build_folder=$build_root"/cmake" rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON -Drun_unittests:bool=ON make --jobs=$(nproc) if [[ $make_install == 1 ]] ; then echo "Installing packaging" # install the package make install fi popd :osx_c.sh000066400000000000000000000010451362133436400355470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) build_folder=$build_root"/cmake" CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON -Drun_unittests:bool=ON cmake --build . -- --jobs=$CORES ctest -C "debug" -V popd : ubuntu_clang.sh000066400000000000000000000011571362133436400371260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) log_dir=$build_root make_install= build_folder=$build_root"/cmake" rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON -Drun_unittests:bool=ON cmake --build . -- --jobs=$(nproc) ctest -C "debug" -V if [[ $make_install == 1 ]] ; then echo "Installing packaging" # install the package make install fi popd :windows_c.cmd000066400000000000000000000013101362133436400365540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM -- C -- cd %build-root% mkdir %build-root%\cmake pushd %build-root%\cmake if not ERRORLEVEL==0 exit /b ERRORLEVEL cmake .. -Drun_unittests:bool=ON if not ERRORLEVEL==0 exit /b ERRORLEVEL msbuild /m ctest.sln /p:Configuration=Release if not ERRORLEVEL==0 exit /b ERRORLEVEL msbuild /m ctest.sln /p:Configuration=Debug if not ERRORLEVEL==0 exit /b ERRORLEVEL ctest -C "debug" -V if not ERRORLEVEL==0 exit /b ERRORLEVEL popd windows_vs2008_c.cmd000066400000000000000000000034621362133436400376100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi @echo off set repo_root=%build-root%\.. rem // resolve to fully qualified path for %%i in ("%repo_root%") do set repo_root=%%~fi echo Build Root: %build-root% echo Repo Root: %repo_root% set CMAKE_DIR=ctest_win32 rem ----------------------------------------------------------------------------- rem -- build with CMAKE and run tests rem ----------------------------------------------------------------------------- echo CMAKE Output Path: %build-root%\cmake\%CMAKE_DIR% if EXIST %build-root%\cmake\%CMAKE_DIR% ( rmdir /s/q %build-root%\cmake\%CMAKE_DIR% rem no error checking ) echo %build-root%\cmake\%CMAKE_DIR% mkdir %build-root%\cmake\%CMAKE_DIR% rem no error checking pushd %build-root%\cmake\%CMAKE_DIR% echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:BOOL=ON -Duse_cppunittest:bool=OFF if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! call :_run-msbuild "Build" ctest.sln if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ctest -C "debug" -V if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd goto :eof rem ----------------------------------------------------------------------------- rem -- subroutines rem ----------------------------------------------------------------------------- :_run-msbuild rem // optionally override configuration|platform setlocal EnableExtensions set build-target= if "%~1" neq "Build" set "build-target=/t:%~1" msbuild /m %build-target% "/p:Configuration=Debug;Platform=Win32" %2 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof echo done azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/src/000077500000000000000000000000001362133436400333055ustar00rootroot00000000000000ctest.c000066400000000000000000000255341362133436400345250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "ctest.h" const TEST_FUNCTION_DATA* g_CurrentTestFunction; jmp_buf g_ExceptionJump; size_t RunTests(const TEST_FUNCTION_DATA* testListHead, const char* testSuiteName) { size_t totalTestCount = 0; size_t failedTestCount = 0; const TEST_FUNCTION_DATA* currentTestFunction = (const TEST_FUNCTION_DATA*)testListHead->NextTestFunctionData; const TEST_FUNCTION_DATA* testSuiteInitialize = NULL; const TEST_FUNCTION_DATA* testSuiteCleanup = NULL; const TEST_FUNCTION_DATA* testFunctionInitialize = NULL; const TEST_FUNCTION_DATA* testFunctionCleanup = NULL; int testSuiteInitializeFailed = 0; g_CurrentTestFunction = NULL; (void)printf(" === Executing test suite %s ===\n", testSuiteName); while (currentTestFunction->TestFunction != NULL) { if (currentTestFunction->FunctionType == CTEST_TEST_FUNCTION_INITIALIZE) { testFunctionInitialize = currentTestFunction; } if (currentTestFunction->FunctionType == CTEST_TEST_FUNCTION_CLEANUP) { testFunctionCleanup = currentTestFunction; } if (currentTestFunction->FunctionType == CTEST_TEST_SUITE_INITIALIZE) { testSuiteInitialize = currentTestFunction; } if (currentTestFunction->FunctionType == CTEST_TEST_SUITE_CLEANUP) { testSuiteCleanup = currentTestFunction; } currentTestFunction = (TEST_FUNCTION_DATA*)currentTestFunction->NextTestFunctionData; } if (testSuiteInitialize != NULL) { if (setjmp(g_ExceptionJump) == 0) { testSuiteInitialize->TestFunction(); } else { testSuiteInitializeFailed = 1; (void)printf("TEST_SUITE_INITIALIZE failed - suite ending\n"); } } if (testSuiteInitializeFailed == 1) { /* print results */ (void)printf("0 tests ran, ALL failed, NONE succeeded.\n"); failedTestCount = 1; } else { unsigned int is_test_runner_ok = 1; currentTestFunction = (const TEST_FUNCTION_DATA*)testListHead->NextTestFunctionData; while (currentTestFunction->TestFunction != NULL) { if (currentTestFunction->FunctionType == CTEST_TEST_FUNCTION) { if (is_test_runner_ok == 1) { int testFunctionInitializeFailed = 0; if (testFunctionInitialize != NULL) { if (setjmp(g_ExceptionJump) == 0) { testFunctionInitialize->TestFunction(); } else { testFunctionInitializeFailed = 1; (void)printf("TEST_FUNCTION_INITIALIZE failed - next TEST_FUNCTION will fail\n"); } } if (testFunctionInitializeFailed) { *currentTestFunction->TestResult = TEST_FAILED; (void)printf("Not executing test %s ...\n", currentTestFunction->TestFunctionName); } else { (void)printf("Executing test %s ...\n", currentTestFunction->TestFunctionName); g_CurrentTestFunction = currentTestFunction; if (setjmp(g_ExceptionJump) == 0) { currentTestFunction->TestFunction(); } else { /*can only get here if there was a longjmp called while executing currentTestFunction->TestFunction();*/ /*we don't do anything*/ } g_CurrentTestFunction = NULL;/*g_CurrentTestFunction is limited to actually executing a TEST_FUNCTION, otherwise it should be NULL*/ /*in the case when the cleanup can assert... have to prepare the long jump*/ if (setjmp(g_ExceptionJump) == 0) { if (testFunctionCleanup != NULL) { testFunctionCleanup->TestFunction(); } } else { /* this is a fatal error, if we got a fail in cleanup we can't do much */ *currentTestFunction->TestResult = TEST_FAILED; is_test_runner_ok = 0; } } } else { *currentTestFunction->TestResult = TEST_NOT_EXECUTED; } if (*currentTestFunction->TestResult == TEST_FAILED) { failedTestCount++; (void)printf("!!! FAILED !!!\n"); } else if (*currentTestFunction->TestResult == TEST_NOT_EXECUTED) { failedTestCount++; (void)printf("Test %s ... SKIPPED due to a failure in test function cleanup. \n", currentTestFunction->TestFunctionName); } else { (void)printf("Suceeded.\n"); } totalTestCount++; } currentTestFunction = (TEST_FUNCTION_DATA*)currentTestFunction->NextTestFunctionData; } if (testSuiteCleanup != NULL) { testSuiteCleanup->TestFunction(); } /* print results */ (void)printf("%d tests ran, %d failed, %d succeeded.\n", (int)totalTestCount, (int)failedTestCount, (int)(totalTestCount - failedTestCount)); } return failedTestCount; } void int_ToString(char* string, size_t bufferSize, int val) { (void)snprintf(string, bufferSize, "%d", val); } void char_ToString(char* string, size_t bufferSize, char val) { (void)snprintf(string, bufferSize, "%d", (int)val); } void short_ToString(char* string, size_t bufferSize, short val) { (void)snprintf(string, bufferSize, "%d", (int)val); } void long_ToString(char* string, size_t bufferSize, long val) { (void)snprintf(string, bufferSize, "%ld", (long)val); } void size_t_ToString(char* string, size_t bufferSize, size_t val) { (void)snprintf(string, bufferSize, "%d", (int)val); } void float_ToString(char* string, size_t bufferSize, float val) { (void)snprintf(string, bufferSize, "%.02f", val); } void double_ToString(char* string, size_t bufferSize, double val) { (void)snprintf(string, bufferSize, "%.02f", val); } void long_double_ToString(char* string, size_t bufferSize, long_double val) { (void)snprintf(string, bufferSize, "%.02Lf", val); } void char_ptr_ToString(char* string, size_t bufferSize, const char* val) { (void)snprintf(string, bufferSize, "%s", val); } void void_ptr_ToString(char* string, size_t bufferSize, const void* val) { (void)snprintf(string, bufferSize, "%p", val); } void unsigned_long_ToString(char* string, size_t bufferSize, unsigned long val) { (void)snprintf(string, bufferSize, "%lu", val); } int int_Compare(int left, int right) { return left != right; } int char_Compare(char left, char right) { return left != right; } int short_Compare(short left, short right) { return left != right; } int long_Compare(long left, long right) { return left != right; } int unsigned_long_Compare(unsigned long left, unsigned long right) { return left != right; } int size_t_Compare(size_t left, size_t right) { return left != right; } int float_Compare(float left, float right) { return left != right; } int double_Compare(double left, double right) { return left != right; } int long_double_Compare(long double left, long double right) { return left != right; } int char_ptr_Compare(const char* left, const char* right) { if ((left == NULL) && (right == NULL)) { return 0; } else if (left == NULL) { return -1; } else if (right == NULL) { return 1; } else { return strcmp(left, right); } } int void_ptr_Compare(const void* left, const void* right) { return left != right; } #if defined CTEST_USE_STDINT void uint8_t_ToString(char* string, size_t bufferSize, uint8_t val) { (void)snprintf(string, bufferSize, "%"PRIu8, val); } void int8_t_ToString(char* string, size_t bufferSize, int8_t val) { (void)snprintf(string, bufferSize, "%"PRId8, val); } void uint16_t_ToString(char* string, size_t bufferSize, uint16_t val) { (void)snprintf(string, bufferSize, "%"PRIu16, val); } void int16_t_ToString(char* string, size_t bufferSize, int16_t val) { (void)snprintf(string, bufferSize, "%"PRId16, val); } void uint32_t_ToString(char* string, size_t bufferSize, uint32_t val) { (void)snprintf(string, bufferSize, "%"PRIu32, val); } void int32_t_ToString(char* string, size_t bufferSize, int32_t val) { (void)snprintf(string, bufferSize, "%"PRId32, val); } void uint64_t_ToString(char* string, size_t bufferSize, uint64_t val) { (void)snprintf(string, bufferSize, "%"PRIu64, val); } void int64_t_ToString(char* string, size_t bufferSize, int64_t val) { (void)snprintf(string, bufferSize, "%"PRId64, val); } int uint8_t_Compare(uint8_t left, uint8_t right) { return left != right; } int int8_t_Compare(int8_t left, int8_t right) { return left != right; } int uint16_t_Compare(uint16_t left, uint16_t right) { return left != right; } int int16_t_Compare(int16_t left, int16_t right) { return left != right; } int uint32_t_Compare(uint32_t left, uint32_t right) { return left != right; } int int32_t_Compare(int32_t left, int32_t right) { return left != right; } int uint64_t_Compare(uint64_t left, uint64_t right) { return left != right; } int int64_t_Compare(int64_t left, int64_t right) { return left != right; } #endif #if defined _MSC_VER #elif defined __cpluplus #elif defined __STDC_VERSION__ #if ((__STDC_VERSION__ == 199901L) || (__STDC_VERSION__ == 201000L) || (__STDC_VERSION__ == 201112L)) #else int snprintf(char * s, size_t n, const char * format, ...) { int result; va_list args; va_start(args, format); result = vsprintf(s, format, args); va_end(args); return result; } #endif #endif void do_jump(jmp_buf *exceptionJump, const volatile void* expected, const volatile void* actual) { /*setting a breakpoint here allows catching the jump before it happens*/ (void)expected; (void)actual; longjmp(*exceptionJump, 0xca1e4); } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/000077500000000000000000000000001362133436400336605ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000002571362133436400363450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. add_subdirectory(ctest_ut) ctest_ut/000077500000000000000000000000001362133436400354335ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/testsCMakeLists.txt000066400000000000000000000020011362133436400401640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(ctest_ut_c_files assertfailurestests.c assertsuccesstests.c ctestunittests.c simpletestsuiteonetest.c simpletestsuitetwotests.c testfunctioncleanuptests.c testfunctioninitializetests.c testsuiteinitializecleanuptests.c whentestsuiteinitializefailstests.c whentestfunctioninitializefailstests.c testfunctioncleanupfailstests.c ) set(ctest_ut_cpp_files simpletestsuiteonetestcpp.cpp ) set(ctest_ut_h_files ) include_directories(${CTEST_INC_FOLDER}) IF(WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) ENDIF(WIN32) add_executable( ctest_ut ${ctest_ut_c_files} ${ctest_ut_cpp_files} ${ctest_ut_h_files} ) set_target_properties(ctest_ut PROPERTIES FOLDER "tests/ctest_ut") target_link_libraries(ctest_ut ctest) if(${run_unittests}) add_test(NAME ctest_ut COMMAND ctest_ut) endif() assertfailurestests.c000066400000000000000000000242071362133436400417230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" CTEST_BEGIN_TEST_SUITE(AssertFailureTests) typedef struct mystruct_tag { unsigned char x; } mystruct; CTEST_COMPARE(mystruct_ptr, mystruct*) { return (left->x != right->x); } CTEST_TO_STRING(mystruct_ptr, mystruct*, string, bufferSize, value) { (void)snprintf(string, bufferSize, "{ %d }", (int)value->x); } /* CTEST_ASSERT_FAIL */ CTEST_FUNCTION(AssertFail_Fails) { CTEST_ASSERT_FAIL("This test should fail."); } /* CTEST_ASSERT_ARE_EQUAL */ CTEST_FUNCTION(Assert_Are_Equal_2_Ints_Fails) { CTEST_ASSERT_ARE_EQUAL(int, 0, 1); } CTEST_FUNCTION(Assert_Are_Equal_2_Chars_Fails) { CTEST_ASSERT_ARE_EQUAL(char, (char)0, (char)1); } CTEST_FUNCTION(Assert_Are_Equal_2_Shorts_Fails) { CTEST_ASSERT_ARE_EQUAL(short, (short)0, (short)1); } CTEST_FUNCTION(Assert_Are_Equal_2_Longs_Fails) { CTEST_ASSERT_ARE_EQUAL(long, (long)0, (long)1); } CTEST_FUNCTION(Assert_Are_Equal_2_uint8_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint8_t, (uint8_t)0, (uint8_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int8_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int8_t, (int8_t)0, (int8_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_uint16_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint16_t, (uint16_t)0, (uint16_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int16_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int16_t, (int16_t)0, (int16_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_uint32_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint32_t, (uint32_t)0, (uint32_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int32_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int32_t, (int32_t)0, (int32_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_uint64_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint64_t, (uint64_t)0, (uint64_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int64_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int64_t, (int64_t)0, (int64_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_strings_With_To_String_Type_Fails) { CTEST_ASSERT_ARE_EQUAL(char_ptr, "test", "dan"); } CTEST_FUNCTION(Assert_Are_Equal_2_void_ptr_With_To_Different_Addresses_Fails) { char c1, c2; CTEST_ASSERT_ARE_EQUAL(void_ptr, &c1, &c2); } CTEST_FUNCTION(Assert_Are_Equal_2_Structures_Fails) { mystruct a = { 1 }; mystruct b = { 42 }; CTEST_ASSERT_ARE_EQUAL(mystruct_ptr, &a, &b); } /* CTEST_ASSERT_ARE_EQUAL_WITH_MSG */ CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Ints_Fails) { CTEST_ASSERT_ARE_EQUAL(int, 0, 1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Chars_Fails) { CTEST_ASSERT_ARE_EQUAL(char, (char)0, (char)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Shorts_Fails) { CTEST_ASSERT_ARE_EQUAL(short, (short)0, (short)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Longs_Fails) { CTEST_ASSERT_ARE_EQUAL(long, (long)0, (long)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint8_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint8_t, (uint8_t)0, (uint8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int8_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int8_t, (int8_t)0, (int8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint16_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint16_t, (uint16_t)0, (uint16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int16_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int16_t, (int16_t)0, (int16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint32_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint32_t, (uint32_t)0, (uint32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int32_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int32_t, (int32_t)0, (int32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint64_t_Fails) { CTEST_ASSERT_ARE_EQUAL(uint64_t, (uint64_t)0, (uint64_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int64_t_Fails) { CTEST_ASSERT_ARE_EQUAL(int64_t, (int64_t)0, (int64_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_strings_With_To_String_Type_Fails) { CTEST_ASSERT_ARE_EQUAL(char_ptr, "test", "dan", "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_void_ptr_Different_Addresses_Fails) { char c1, c2; CTEST_ASSERT_ARE_EQUAL(void_ptr, &c1, &c2, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Structures_Fails) { mystruct a = { 1 }; mystruct b = { 42 }; CTEST_ASSERT_ARE_EQUAL(mystruct_ptr, &a, &b, "Test message"); } /* CTEST_ASSERT_ARE_NOT_EQUAL */ CTEST_FUNCTION(Assert_Are_Not_Equal_2_Ints_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int, 1, 1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Chars_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(char, (char)1, (char)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Shorts_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(short, (short)1, (short)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Longs_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(long, (long)1, (long)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Unsigned_Longs_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(unsigned_long, 1, 1); } #if defined CTEST_USE_STDINT CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint8_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint8_t, (uint8_t)1, (uint8_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int8_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int8_t, (int8_t)1, (int8_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint16_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint16_t, (uint16_t)1, (uint16_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int16_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int16_t, (int16_t)1, (int16_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint32_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint32_t, (uint32_t)1, (uint32_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int32_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int32_t, (int32_t)1, (int32_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint64_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint64_t, (uint64_t)1, (uint64_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int64_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int64_t, (int64_t)1, (int64_t)1); } #endif CTEST_FUNCTION(Assert_Are_Not_Equal_2_strings_With_To_String_Type_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(char_ptr, "dan", "dan"); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_void_ptr_With_2_same_addresses_Fails) { char c1; CTEST_ASSERT_ARE_NOT_EQUAL(void_ptr, &c1, &c1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Structures_Fails) { mystruct a = { 1 }; mystruct b = { 1 }; CTEST_ASSERT_ARE_NOT_EQUAL(mystruct_ptr, &a, &b); } /* CTEST_ASSERT_ARE_NOT_EQUAL */ CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Ints_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int, 1, 1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Chars_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(char, (char)1, (char)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Shorts_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(short, (short)1, (short)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Longs_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(long, (long)1, (long)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Unsigned_Longs_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(unsigned_long, 1, 1, "Test message"); } #if defined CTEST_USE_STDINT CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint8_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint8_t, (uint8_t)1, (uint8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int8_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int8_t, (int8_t)1, (int8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint16_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint16_t, (uint16_t)1, (uint16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int16_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int16_t, (int16_t)1, (int16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint32_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint32_t, (uint32_t)1, (uint32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int32_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int32_t, (int32_t)1, (int32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint64_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(uint64_t, (uint64_t)1, (uint64_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int64_t_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(int64_t, (int64_t)1, (int64_t)1, "Test message"); } #endif CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_strings_With_To_String_Type_Fails) { CTEST_ASSERT_ARE_NOT_EQUAL(char_ptr, "dan", "dan", "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_void_ptr_with_same_address_Fails) { char c1; CTEST_ASSERT_ARE_NOT_EQUAL(void_ptr, &c1, &c1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Structures_Fails) { mystruct a = { 1 }; mystruct b = { 1 }; CTEST_ASSERT_ARE_NOT_EQUAL(mystruct_ptr, &a, &b, "Test message"); } /* CTEST_ASSERT_IS_NULL */ CTEST_FUNCTION(Assert_Is_NULL_Fails) { int a; int *ptr = &a; CTEST_ASSERT_IS_NULL(ptr); } /* CTEST_ASSERT_IS_NULL_WITH_MSG */ CTEST_FUNCTION(Assert_Is_NULL_With_Msg_Fails) { int a; int *ptr = &a; CTEST_ASSERT_IS_NULL(ptr, "Test message"); } /* CTEST_ASSERT_IS_NOT_NULL */ CTEST_FUNCTION(Assert_Is_Not_NULL_Fails) { void* test_value = NULL; CTEST_ASSERT_IS_NOT_NULL(test_value); } /* CTEST_ASSERT_IS_NOT_NULL_WITH_MSG */ CTEST_FUNCTION(Assert_Is_Not_NULL_With_Msg_Fails) { void* test_value = NULL; CTEST_ASSERT_IS_NOT_NULL(test_value, "Test message"); } /* CTEST_ASSERT_IS_TRUE */ CTEST_FUNCTION(Assert_Is_True_Fails) { int tested_value = 0; CTEST_ASSERT_IS_TRUE(tested_value); } /* CTEST_ASSERT_IS_TRUE_WITH_MSG */ CTEST_FUNCTION(Assert_Is_True_With_Msg_Fails) { int tested_value = 0; CTEST_ASSERT_IS_TRUE(tested_value, "Test message"); } /* CTEST_ASSERT_IS_FALSE */ CTEST_FUNCTION(Assert_Is_False_Fails) { int tested_value = 1; CTEST_ASSERT_IS_FALSE(tested_value); } /* CTEST_ASSERT_IS_FALSE_WITH_MSG */ CTEST_FUNCTION(Assert_Is_False_With_Msg_Fails) { int tested_value = 1; CTEST_ASSERT_IS_FALSE(tested_value, "Test message"); } CTEST_END_TEST_SUITE(AssertFailureTests) assertsuccesstests.c000066400000000000000000000243351362133436400415630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" CTEST_BEGIN_TEST_SUITE(AssertSuccessTests) typedef struct mystruct_tag { unsigned char x; } mystruct; CTEST_COMPARE(mystruct_ptr, mystruct*) { return (left->x != right->x); } CTEST_TO_STRING(mystruct_ptr, mystruct*, string, bufferSize, value) { (void)snprintf(string, bufferSize, "{ %d }", (int)value->x); } /* CTEST_ASSERT_ARE_EQUAL */ CTEST_FUNCTION(Assert_Are_Equal_2_Ints_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int, 1, 1); } CTEST_FUNCTION(Assert_Are_Equal_2_Chars_Succeeds) { CTEST_ASSERT_ARE_EQUAL(char, (char)1, (char)1); } CTEST_FUNCTION(Assert_Are_Equal_2_Shorts_Succeeds) { CTEST_ASSERT_ARE_EQUAL(short, (short)1, (short)1); } CTEST_FUNCTION(Assert_Are_Equal_2_Longs_Succeeds) { CTEST_ASSERT_ARE_EQUAL(long, (long)1, (long)1); } CTEST_FUNCTION(Assert_Are_Equal_2_Unsigned_Longs_Succeeds) { CTEST_ASSERT_ARE_EQUAL(unsigned_long, 1UL, 1UL); } CTEST_FUNCTION(Assert_Are_Equal_2_uint8_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint8_t, (uint8_t)1, (uint8_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int8_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int8_t, (int8_t)1, (int8_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_uint16_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint16_t, (uint16_t)1, (uint16_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int16_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int16_t, (int16_t)1, (int16_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_uint32_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint32_t, (uint32_t)1, (uint32_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int32_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int32_t, (int32_t)1, (int32_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_uint64_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint64_t, (uint64_t)1, (uint64_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_int64_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int64_t, (int64_t)1, (int64_t)1); } CTEST_FUNCTION(Assert_Are_Equal_2_strings_With_To_String_Type_Succeeds) { CTEST_ASSERT_ARE_EQUAL(char_ptr, "dan", "dan"); } CTEST_FUNCTION(Assert_Are_Equal_2_strings_With_Same_Address_Succeeds) { char c1; CTEST_ASSERT_ARE_EQUAL(void_ptr, &c1, &c1); } CTEST_FUNCTION(Assert_Are_Equal_2_Structures_Succeeds) { mystruct a = { 1 }; mystruct b = { 1 }; CTEST_ASSERT_ARE_EQUAL(mystruct_ptr, &a, &b); } /* CTEST_ASSERT_ARE_EQUAL_WITH_MSG */ CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Ints_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int, 1, 1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Chars_Succeeds) { CTEST_ASSERT_ARE_EQUAL(char, (char)1, (char)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Shorts_Succeeds) { CTEST_ASSERT_ARE_EQUAL(short, (short)1, (short)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Longs_Succeeds) { CTEST_ASSERT_ARE_EQUAL(long, (long)1, (long)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Unsigned_Longs_Succeeds) { CTEST_ASSERT_ARE_EQUAL(unsigned_long, 1UL, 1UL, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint8_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint8_t, (uint8_t)1, (uint8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int8_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int8_t, (int8_t)1, (int8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint16_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint16_t, (uint16_t)1, (uint16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int16_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int16_t, (int16_t)1, (int16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint32_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint32_t, (uint32_t)1, (uint32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int32_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int32_t, (int32_t)1, (int32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_uint64_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(uint64_t, (uint64_t)1, (uint64_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_int64_t_Succeeds) { CTEST_ASSERT_ARE_EQUAL(int64_t, (int64_t)1, (int64_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_strings_With_To_String_Type_Succeeds) { CTEST_ASSERT_ARE_EQUAL(char_ptr, "dan", "dan", "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_void_ptr_same_address_Succeeds) { char c1; CTEST_ASSERT_ARE_EQUAL(void_ptr, &c1, &c1, "Test message"); } CTEST_FUNCTION(Assert_Are_Equal_With_Msg_2_Structures_Succeeds) { mystruct a = { 1 }; mystruct b = { 1 }; CTEST_ASSERT_ARE_EQUAL(mystruct_ptr, &a, &b, "Test message"); } /* CTEST_ASSERT_ARE_NOT_EQUAL */ CTEST_FUNCTION(Assert_Are_Not_Equal_2_Ints_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int, 0, 1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Chars_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(char, (char)0, (char)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Shorts_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(short, (short)0, (short)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Longs_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(long, (long)0, (long)1); } #if defined CTEST_USE_STDINT CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint8_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint8_t, (uint8_t)0, (uint8_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int8_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int8_t, (int8_t)0, (int8_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint16_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint16_t, (uint16_t)0, (uint16_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int16_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int16_t, (int16_t)0, (int16_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint32_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint32_t, (uint32_t)0, (uint32_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int32_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int32_t, (int32_t)0, (int32_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_uint64_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint64_t, (uint64_t)0, (uint64_t)1); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_int64_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int64_t, (int64_t)0, (int64_t)1); } #endif CTEST_FUNCTION(Assert_Are_Not_Equal_2_strings_With_To_String_Type_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(char_ptr, "test", "dan"); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_void_ptr_different_address_Succeeds) { int c1, c2; CTEST_ASSERT_ARE_NOT_EQUAL(void_ptr, &c1, &c2); } CTEST_FUNCTION(Assert_Are_Not_Equal_2_Structures_Succeeds) { mystruct a = { 1 }; mystruct b = { 42 }; CTEST_ASSERT_ARE_NOT_EQUAL(mystruct_ptr, &a, &b); } /* CTEST_ASSERT_ARE_NOT_EQUAL_WITH_MSG */ CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Ints_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int, 0, 1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Chars_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(char, (char)0, (char)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Shorts_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(short, (short)0, (short)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Longs_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(long, (long)0, (long)1, "Test message"); } #if defined CTEST_USE_STDINT CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint8_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint8_t, (uint8_t)0, (uint8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int8_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int8_t, (int8_t)0, (int8_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint16_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint16_t, (uint16_t)0, (uint16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int16_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int16_t, (int16_t)0, (int16_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint32_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint32_t, (uint32_t)0, (uint32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int32_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int32_t, (int32_t)0, (int32_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_uint64_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(uint64_t, (uint64_t)0, (uint64_t)1, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_int64_t_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(int64_t, (int64_t)0, (int64_t)1, "Test message"); } #endif CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_strings_With_To_String_Type_Succeeds) { CTEST_ASSERT_ARE_NOT_EQUAL(char_ptr, "test", "dan", "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_void_ptr_with_different_addresses_Succeeds) { double b1, b2; CTEST_ASSERT_ARE_NOT_EQUAL(void_ptr, &b1, &b2, "Test message"); } CTEST_FUNCTION(Assert_Are_Not_Equal_With_Msg_2_Structures_Succeeds) { mystruct a = { 1 }; mystruct b = { 42 }; CTEST_ASSERT_ARE_NOT_EQUAL(mystruct_ptr, &a, &b, "Test message"); } /* CTEST_ASSERT_IS_NULL */ CTEST_FUNCTION(Assert_Is_NULL_Succeeds) { void* test_value = NULL; CTEST_ASSERT_IS_NULL(test_value); } /* CTEST_ASSERT_IS_NULL_WITH_MSG */ CTEST_FUNCTION(Assert_Is_NULL_With_Msg_Succeeds) { void* test_value = NULL; CTEST_ASSERT_IS_NULL(test_value, "Test message"); } /* CTEST_ASSERT_IS_NOT_NULL */ CTEST_FUNCTION(Assert_Is_Not_NULL_Succeeds) { int a; int *ptr = &a; CTEST_ASSERT_IS_NOT_NULL(ptr); } /* CTEST_ASSERT_IS_NOT_NULL_WITH_MSG */ CTEST_FUNCTION(Assert_Is_Not_NULL_With_Msg_Succeeds) { int a; int *ptr = &a; CTEST_ASSERT_IS_NOT_NULL(ptr, "Test message"); } /* CTEST_ASSERT_IS_TRUE */ CTEST_FUNCTION(Assert_Is_True_Succeeds) { int tested_value = 1; CTEST_ASSERT_IS_TRUE(tested_value); } /* CTEST_ASSERT_IS_TRUE_WITH_MSG */ CTEST_FUNCTION(Assert_Is_True_With_Msg_Succeeds) { int tested_value = 1; CTEST_ASSERT_IS_TRUE(tested_value, "Test message"); } /* CTEST_ASSERT_IS_FALSE */ CTEST_FUNCTION(Assert_Is_False_Succeeds) { int tested_value = 0; CTEST_ASSERT_IS_FALSE(tested_value); } /* CTEST_ASSERT_IS_FALSE_WITH_MSG */ CTEST_FUNCTION(Assert_Is_False_With_Msg_Succeeds) { int tested_value = 0; CTEST_ASSERT_IS_FALSE(tested_value, "Test message"); } CTEST_END_TEST_SUITE(AssertSuccessTests) ctestunittests.c000066400000000000000000000031561362133436400407110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" int main() { size_t failedTests = 0; /* This first suite is ran without counting failed tests to prove that the argument is optional. */ CTEST_RUN_TEST_SUITE(SimpleTestSuiteOneTest); CTEST_RUN_TEST_SUITE(SimpleTestSuiteOneTest, failedTests); CTEST_RUN_TEST_SUITE(SimpleTestSuiteTwoTests, failedTests); CTEST_RUN_TEST_SUITE(TestSuiteInitializeCleanupTests, failedTests); CTEST_RUN_TEST_SUITE(AssertSuccessTests, failedTests); { size_t temp_failed_tests = 0; CTEST_RUN_TEST_SUITE(AssertFailureTests, temp_failed_tests); if (temp_failed_tests != 71) { failedTests ++; } } CTEST_RUN_TEST_SUITE(TestFunctionInitializeTests, failedTests); CTEST_RUN_TEST_SUITE(TestFunctionCleanupTests, failedTests); { size_t temp_failed_tests = 0; CTEST_RUN_TEST_SUITE(whentestfunctioninitializefailstests, temp_failed_tests); if (temp_failed_tests != 2) { failedTests ++; } } { size_t temp_failed_tests = 0; CTEST_RUN_TEST_SUITE(whentestsuiteinitializefailstests, temp_failed_tests); if (temp_failed_tests != 1) { failedTests ++; } } { size_t temp_failed_tests = 0; CTEST_RUN_TEST_SUITE(testfunctioncleanupfailstests, temp_failed_tests); if (temp_failed_tests != 2) { failedTests ++; } } return failedTests; } simpletestsuiteonetest.c000066400000000000000000000004441362133436400424460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" CTEST_BEGIN_TEST_SUITE(SimpleTestSuiteOneTest) CTEST_FUNCTION(Test1) { } CTEST_END_TEST_SUITE(SimpleTestSuiteOneTest) simpletestsuiteonetestcpp.cpp000066400000000000000000000004521362133436400435100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" CTEST_BEGIN_TEST_SUITE(SimpleTestSuiteOneTestCpp) CTEST_FUNCTION(Test1) { } CTEST_END_TEST_SUITE(SimpleTestSuiteOneTestCpp) simpletestsuitetwotests.c000066400000000000000000000005011362133436400426530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" CTEST_BEGIN_TEST_SUITE(SimpleTestSuiteTwoTests) CTEST_FUNCTION(Test1) { } CTEST_FUNCTION(Test2) { } CTEST_END_TEST_SUITE(SimpleTestSuiteTwoTests) testfunctioncleanupfailstests.c000066400000000000000000000011701362133436400437750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" static size_t test_count; CTEST_BEGIN_TEST_SUITE(testfunctioncleanupfailstests) CTEST_SUITE_INITIALIZE() { test_count = 0; } CTEST_SUITE_CLEANUP() { } CTEST_FUNCTION_CLEANUP() { if (test_count == 2) { CTEST_ASSERT_FAIL("it needs to fail"); } } CTEST_FUNCTION(Test1) { test_count++; } CTEST_FUNCTION(Test2) { test_count++; } CTEST_FUNCTION(Test3) { test_count++; } CTEST_END_TEST_SUITE(testfunctioncleanupfailstests) testfunctioncleanuptests.c000066400000000000000000000011331362133436400427550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" static int x = 0; static int y = 0; CTEST_BEGIN_TEST_SUITE(TestFunctionCleanupTests) CTEST_FUNCTION_INITIALIZE() { } CTEST_FUNCTION_CLEANUP() { x++; } CTEST_FUNCTION(Test1) { CTEST_ASSERT_ARE_EQUAL(int, y, x); y++; } CTEST_FUNCTION(Test2) { CTEST_ASSERT_ARE_EQUAL(int, y, x); y++; } CTEST_FUNCTION(Test3) { CTEST_ASSERT_ARE_EQUAL(int, y, x); y++; } CTEST_END_TEST_SUITE(TestFunctionCleanupTests) testfunctioninitializetests.c000066400000000000000000000010261362133436400434700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" static int x = 0; static int y = 0; CTEST_BEGIN_TEST_SUITE(TestFunctionInitializeTests) CTEST_FUNCTION_INITIALIZE() { x++; } CTEST_FUNCTION_CLEANUP() { } CTEST_FUNCTION(Test1) { y++; CTEST_ASSERT_ARE_EQUAL(int, y, x); } CTEST_FUNCTION(Test2) { y++; CTEST_ASSERT_ARE_EQUAL(int, y, x); } CTEST_END_TEST_SUITE(TestFunctionInitializeTests) testsuiteinitializecleanuptests.c000066400000000000000000000006621362133436400443510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" static int x; CTEST_BEGIN_TEST_SUITE(TestSuiteInitializeCleanupTests) CTEST_SUITE_INITIALIZE() { x = 42; } CTEST_SUITE_CLEANUP() { } CTEST_FUNCTION(Test1) { CTEST_ASSERT_ARE_EQUAL(int, 42, x); } CTEST_END_TEST_SUITE(TestSuiteInitializeCleanupTests) whentestfunctioninitializefailstests.c000066400000000000000000000010751362133436400453750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" static int nFunction = 0; CTEST_BEGIN_TEST_SUITE(whentestfunctioninitializefailstests) CTEST_FUNCTION_INITIALIZE() { /*make fail 2 out of 3 tests*/ nFunction++; if (nFunction <= 2) { CTEST_ASSERT_FAIL("needs to fail"); } } CTEST_FUNCTION(Test1) { } CTEST_FUNCTION(Test2) { } CTEST_FUNCTION(Test3) { } CTEST_END_TEST_SUITE(whentestfunctioninitializefailstests) whentestsuiteinitializefailstests.c000066400000000000000000000006431362133436400447010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "ctest.h" CTEST_BEGIN_TEST_SUITE(whentestsuiteinitializefailstests) CTEST_SUITE_INITIALIZE() { CTEST_ASSERT_FAIL("it needs to fail"); } CTEST_SUITE_CLEANUP() { } CTEST_FUNCTION(Test1) { } CTEST_END_TEST_SUITE(whentestsuiteinitializefailstests) azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tools/000077500000000000000000000000001362133436400336565ustar00rootroot00000000000000kick_jenkins.cmd000066400000000000000000000076031362133436400367340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tools@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @setlocal @echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set build-root=%current-path%\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM check that we have java handy call :checkExists java if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! REM check that jenkins-cli.jar is in the repository's tools folder if not exist %build-root%\tools\jenkins-cli.jar ( echo jenkins-cli does not exist echo Downloading from repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar powershell -Command "Invoke-WebRequest http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar -OutFile %build-root%\tools\jenkins-cli.jar" if not !ERRORLEVEL!==0 ( echo Failed downloading jenkins-cli.jar echo Use the following link to manually download it into the tools folder of your repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar exit /b 1 ) ) REM find current branch for /f "usebackq tokens=*" %%i in (`git symbolic-ref -q HEAD`) do set "current_branch_ref=%%i" if defined current_branch_ref set "current_branch=%current_branch_ref:refs/heads/=%" REM handle detached HEAD if not defined current_branch ( echo You're not on any branch! Aborting... goto :eof ) REM Must be on a topic branch when running this script set __exit=1 if not "%current_branch%"=="master" if not "%current_branch%"=="develop" set __exit=0 if %__exit%==1 ( echo You cannot call this script from 'develop' or 'master'. Change to a topic branch first. Aborting... goto :eof ) REM find tracking branch for /f "usebackq tokens=*" %%i in (`git rev-parse --symbolic-full-name --abbrev-ref @{u}`) do set "tracking_branch=%%i" if not defined tracking_branch ( echo Branch ^'%current_branch%^' is not tracking a remote branch! First try ^'git branch -u ^/^^' to set tracking info. Aborting... goto :eof ) for /f "usebackq tokens=*" %%i in (`git config branch.%current_branch%.remote`) do set "remote=%%i" if not defined remote ( REM should never happen... echo Cannot isolate remote name for tracking branch ^'%tracking_branch%^'! Aborting... goto :eof ) REM get the tracking branch name only e.g., origin/topic -> topic for /f "usebackq tokens=*" %%i in (`call echo %%tracking_branch:%remote%/^=%%`) do set "tracking_name=%%i" REM find repo url for /f "usebackq tokens=*" %%i in (`git ls-remote --heads --get-url %remote%`) do set "repo_url=%%i" if not defined repo_url ( echo Cannot find the remote repository URL! Aborting... goto :eof ) echo **************************************************************** echo commit_id: %current_branch% echo repo_url: %repo_url% echo remote: %remote% echo trackingN: %tracking_name% echo **************************************************************** REM kick off the build! java -jar "%build-root%"\tools\jenkins-cli.jar -s http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/ build _integrate-into-develop -p COMMIT_ID=%tracking_name% -p AZURE_REPO=%repo_url% -p BRANCH_TO_MERGE_TO=develop -s -v rem ----------------------------------------------------------------------------- rem -- done rem ----------------------------------------------------------------------------- goto :eof rem ----------------------------------------------------------------------------- rem -- helper subroutines rem ----------------------------------------------------------------------------- :checkExists where %~1 >nul 2>nul if not !ERRORLEVEL!==0 ( echo "%~1" not found. Please make sure that "%~1" is installed and available in the path. exit /b !ERRORLEVEL! ) goto :eof azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/000077500000000000000000000000001362133436400333575ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000077511362133436400360520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. #this is CMakeLists for micromock cmake_minimum_required(VERSION 2.8.11) set(micromock_cpp_files ./src/micromockcharstararenullterminatedstrings.cpp ./src/micromockexception.cpp ./src/micromocktestmutex.cpp ./src/mockcallrecorder.cpp ./src/mockmethodcallbase.cpp ./src/mockvaluebase.cpp ./src/timediscretemicromock.cpp ) set(micromock_h_files ./inc/globalmock.h ./inc/micromock.h ./inc/micromockcallmacros.h ./inc/micromockcharstararenullterminatedstrings.h ./inc/micromockcommon.h ./inc/micromockenumtostring.h ./inc/micromockexception.h ./inc/micromocktestmutex.h ./inc/micromocktestrunnerhooks.h ./inc/mock.h ./inc/mockcallargument.h ./inc/mockcallargumentbase.h ./inc/mockcallcomparer.h ./inc/mockcallrecorder.h ./inc/mockmethodcall.h ./inc/mockmethodcallbase.h ./inc/mockresultvalue.h ./inc/mockvalue.h ./inc/mockvaluebase.h ./inc/nicecallcomparer.h ./inc/runtimemock.h ./inc/stdafx.h ./inc/strictorderedcallcomparer.h ./inc/strictunorderedcallcomparer.h ./inc/targetver.h ./inc/threadsafeglobalmock.h ./inc/timediscretemicromock.h ./inc/timediscretemicromockcallmacros.h ) string(REPLACE "./inc/" ";./testtools/micromock/inc/" FILES_TO_INSTALL ${micromock_h_files}) set(micromock_h_files_full_path "${FILES_TO_INSTALL}" CACHE INTERNAL "") add_files_to_install("${FILES_TO_INSTALL}") include_directories(${SHARED_UTIL_INC_FOLDER}) IF(WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) if (${use_cppunittest}) #windows needs to be build 2 flavor of micromock, one for CTEST reporting, one for CPP_UNITTEST add_library(micromock_cpp_unittest ${micromock_cpp_files} ${micromock_h_files}) target_compile_definitions(micromock_cpp_unittest PUBLIC CPP_UNITTEST) target_compile_options(micromock_cpp_unittest PUBLIC /EHsc) if(EXISTS "$ENV{VCInstallDir}/UnitTest/include") #flip VCInstallDir path file(TO_CMAKE_PATH $ENV{VCInstallDir} VCInstallDir) #pre-VS2017 build environment doesn't appear to include the path to unit #test headers, so add it here target_include_directories(micromock_cpp_unittest PUBLIC ${VCInstallDir}/UnitTest/include) endif() set_target_properties(micromock_cpp_unittest PROPERTIES FOLDER "test_tools") endif() add_library(micromock_ctest ${micromock_cpp_files} ${micromock_h_files}) target_compile_definitions(micromock_ctest PUBLIC USE_CTEST) target_compile_options(micromock_ctest PUBLIC /EHsc) else() add_library(micromock_ctest ${micromock_cpp_files} ${micromock_h_files}) target_compile_definitions(micromock_ctest PUBLIC USE_CTEST) ENDIF() set_target_properties(micromock_ctest PROPERTIES FOLDER "test_tools") #these are the include folders #the following "set" statetement exports across the project a global variable called MICROMOCK_INC_FOLDER that expands to whatever needs to included when using micromock library set(MICROMOCK_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "this is what needs to be included if using micromock lib" FORCE) include_directories(${TESTRUNNERSWITCHER_INC_FOLDER} ${CTEST_INC_FOLDER} ${SAL_INC_FOLDER} ${MICROMOCK_INC_FOLDER} ) include_directories(${TESTRUNNERSWITCHER_INCLUDES} ${CTEST_INCLUDES} ${UMOCK_C_INCLUDES}) if (${run_unittests}) add_subdirectory(unittests) endif() if(${use_installed_dependencies}) if(WIN32) install (TARGETS micromock_cpp_unittest EXPORT aziotsharedutilTargets DESTINATION lib) endif() install (TARGETS micromock_ctest EXPORT aziotsharedutilTargets DESTINATION lib) endif() if(WIN32) add_executable(micromock_generator ./tools/micromockgenerator/micromockgenerator.cpp) target_compile_options(micromock_generator PUBLIC /EHsc) set_target_properties(micromock_generator PROPERTIES FOLDER "test_tools") endif() doc/000077500000000000000000000000001362133436400340455ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromockmicromock.md000066400000000000000000000454551362133436400363670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/doc# MicroMock # Why? Micromock is intended to fulfill the needs of the (connected car networking) developers in mocking dependencies. The following are the main goals: - Allow runtime mocking by using Detours, since this is the main case where mocking is really needed. - Allow a less verbose mode of declaring the mock classes. The main goal here is that for one mocked API, one line of code should be written into the mock class and the line of code should resemble as much as possible the original mocked API. - Writing tests with the framework should not require verbosity. - Comparing expected calls and actual calls should explicitly state what the mismatch is. # Cheat sheet ## Declaring a mock class ```c TYPED_MOCK_CLASS(CMultimediaTimerMock, CRuntimeMock) { public: MOCK_HOOK_METHOD_5(WINAPI, timeSetEvent, MMRESULT, UINT, uDelay, UINT, uResolution, LPTIMECALLBACK, lpTimeProc, DWORD_PTR, dwUser, UINT, fuEvent) MOCK_METHOD_END(MMRESULT, 0x0) }; ``` The above mock class contains one static method that expects 5 arguments and returns a value of type MMRESULT. The method is prefixed with WINAPI in order to specify the __stdcall calling convention. Also the mock method by default returns 0, as specified by the MOCK_METHOD_END macro. ## Instantiating mocks CRuntimeMock multimediaTimerMock; ## Specifying expected calls in a test Specifying an expected call is done by using the EXPECTED_CALL macro: ```c EXPECTED_CALL(multimediaTimerMock, timeSetEvent(0, TEST_MILLISECONDS_DELAY, NULL, NULL, TIME_CALLBACK_FUNCTION)); ``` ## Overriding a return value for an expected call In order to instruct the mock to return a specific value for an expected call, one can specify the SetReturn modifier on the expected call: ```c EXPECTED_CALL(multimediaTimerMock, timeSetEvent(0, TEST_MILLISECONDS_DELAY, NULL, NULL, TIME_CALLBACK_FUNCTION)) .SetReturn(42); ``` ## Overriding a return value for an expected call with a fail return value In order to instruct the mock to return a specific value for an expected call, one can specify the SetFailReturn modifier on the expected call: ```c EXPECTED_CALL(multimediaTimerMock, timeSetEvent(0, TEST_MILLISECONDS_DELAY, NULL, NULL, TIME_CALLBACK_FUNCTION)) .SetFailReturn(42); ``` In this case, the code (if any) in body of the mock shall not be executed and the mock shall return the fail return value as soon as it has matched the call. ## A simple test ```c TEST_METHOD(When_The_Multimedia_Timer_Creation_Is_Successful_DoWork_Succeeds) { // arrange CClassUnderTest classUnderTest; CMultimediaTimerMock multimediaTimerMock; EXPECTED_CALL(multimediaTimerMock, timeSetEvent(0, TEST_MILLISECONDS_DELAY, NULL, NULL, TIME_CALLBACK_FUNCTION)) // classUnderTest.DoWork will see 0x42 as result to the timeSetEvent call .SetReturn(0x42); // act BOOL result = classUnderTest.DoWork(TEST_MILLISECONDS_DELAY); // assert Assert::AreEqual(TRUE, result, _T("DoWork should succeed when the timeSetEvent succeeds.")); } ``` # Mock classes In order to declare a mock class, the TYPED_MOCK_CLASS macro can be used: ```c TYPED_MOCK_CLASS(CTestMock, CRuntimeMock) { public: ... }; ``` Then the instantiation of the mock in the test looks like: ```c CTestMock testMock; ``` There are 4 types of mocks: ## CMock This mock type is the simplest. It provides the ability to setup expected calls, record actual calls and compare the 2 lists. ## CThreadSafeGlobalMock This mock type provides all the CMock functionality and in addition it ensures that only one instance of the same mock exists at one time by using a mutex. ## CRuntimeMock This mock type provides all the CThreadSafeGlobalMock functionality and in addition it allows installing hooks by using Detours. # Mock methods All mock methods start with one of the following macros: MOCK_METHOD_x, MOCK_STATIC_METHOD_x, MOCK_HOOK_METHOD_x or MOCK_HOOK_METHOD_EX_x, where x is the number of arguments for the mock method. Currently methods with up to 10 arguments are supported. A mock method without any arguments uses the MOCK_METHOD_0 macro. ## MOCK_METHOD_x ```c MOCK_METHOD_x(prefix, returnType, name, arg1Type, arg1Value, arg2Type, ...) ``` declares a mock class member method. ## MOCK_STATIC_METHOD_x ```c MOCK_STATIC_METHOD_x(prefix, returnType, name, arg1Type, arg1Value, arg2Type, ...) ``` declares a mock class member static method. A static method can only be used in a CThreadSafeGlobalMock or CRuntimeMock mock class. ## MOCK_HOOK_METHOD_x ```c MOCK_HOOK_METHOD_x(prefix, returnType, name, arg1Type, arg1Value, arg2Type, ...) ``` declares a mock class member static method and declares that the global namespace function with the same name will be hooked/detoured to the declared mock method. A hook method can only be used in a CRuntimeMock mock class. ## MOCK_HOOK_METHOD_EX_x ```c MOCK_HOOK_METHOD_EX_x(prefix, returnType, name, arg1Type, arg1Value, arg2Type, ..., functionToHook) ``` declares a hook mock method and additionally instructs the framework to hook a specific function (functionToHook) and redirect all calls to the mock method. # Actual vs Expected call comparison ## CompareActualAndExpectedCalls In order to get the result of the comparison of actual and expected calls, a call to CompareActualAndExpectedCalls can be made and the resulting string can be directly used in an assert statement. ```c tstring result = multimediaTimerMock.CompareActualAndExpectedCalls(); Assert::AreEqual(tstring(_T("")), result, _T("Incorrect mock function call result")); ``` If a call was expected and no actual call was matched with it CompareActualAndExpectedCalls indicates the missing call in a format like "[Missing:timeSetEvent(42)]". If a call was not expected, but an actual call occurred (the code under test called a mock function when not expected), CompareActualAndExpectedCalls indicates the unexpected call in a format like "[Unexpected:timeSetEvent(42)]". ## GetUnexpectedCalls/GetMissingCalls In order to facilitate writing asserts in a natural way, the following syntax can also be used: ```c Assert::AreEqual(testMock.GetMissingCalls(),testMock.GetUnexpectedCalls(), _T("Incorrect mock function call result")); ``` ## Arguments in call comparisons When comparing an expected call and an actual call, arguments are taken into account according to what has been setup on the expected call. Using EXPECTED_CALL states that an expected call does not compare any arguments by default. The expected call can be modified to force argument comparison by using the ValidateArgument modifier. Using STRICT_EXPECTED_CALL states an expected call compares all arguments by default. To exclude specific arguments from the comparison the IgnoreArgument modifier can be used. ValidateArgument and IgnoreArgument are mutually exclusive. If both of them are used on the same expected call, the last one sticks. ## Special handling for some argument types ### Structures Since functions can have arguments of other types than the basic ones, sometimes there is a need for specialized comparison. If a mocked function takes a structure argument for example, comparing the contents of the structure should only compare the members, not all the bytes in the structure. For this case in order for the framework to do the comparison and conversion of the call arguments to string, 2 operators are required to be implemented: - The equality operator - The stream insertion << operator ### Defining pointer equality operators In order to allow the mocking framework to directly compare pointer types, the equality operator for the type itself needs to be defined. ```c _Must_inspect_result_ static bool operator==(_In_ SOCKADDR const& lhs, _In_ SOCKADDR const& rhs) { if (lhs.sa_family != rhs.sa_family) { return false; } if (lhs.sa_family == AF_INET) { return ... ; // more comparison of the structure members should be done here } return (memcmp(lhs.sa_data, rhs.sa_data, sizeof(rhs.sa_data)) == 0); } ``` Additionally a specialization of the == operator for the MockValue class (internally used by the framework) should be provided: MICROMOCK_POINTER_TYPE_EQUAL(SOCKADDR const); Then any test can specify the arguments of the type SOCKADDR const* to be compared as regular arguments in any expected function calls. ## Call comparers Several call comparers are available for performing the comparison of expected calls and actual calls. If no comparer is specified then the StrictUnorderedCallComparer is used. ### StrictUnorderedCallComparer This comparer checks that every actual call has a matching expected call and every expected call has a matching actual call, but without caring about the order in which they appeared. Practically, every time an actual call is made by the code under test, the first matching expected call (that was previously not matched) is paired. The search happens in the order in which the expected calls are defined in the test. ### StrictOrderedCallComparer This comparer checks that every actual call has a matching expected call, making sure the actual calls appear in the order specified by the expected calls written in the test. ### NiceCallComparer This comparer checks that every expected call has a matching actual call, and it completely ignores the unexpected calls from the code under test. Also, the order in which the calls happen is not relevant for the comparison. Example test: ```c TEST_METHOD(NiceCallComparer_Ignores_Unexpected_Calls) { // arrange CNiceCallComparer testMock; FunctionUnderTest() // invokes CTestStaticMock::StaticTestFunction(43); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert Assert::AreEqual(tstring(_T("")), result, _T("Incorrect mock function call result")); } ``` ## Resetting expected and actual calls It is possible to reset the list of actual calls maintained by a mock object by a call to ResetActualCalls. This allows handling corner cases where executing code under test is desired and actual calls should only be taken into account from a certain point on in the test. It is also possible to reset the expected calls by issuing a call to ResetExpectedCalls. This feature is only provided for symmetry with resetting the actual calls. If it is desired to completely reset a mock, this can be achieved by a call to ResetAllCalls, which essentially resets both the actual and expected call list. Good tests do not typically require these features, so they should be used cautiously. # Non-compare actions In some cases it is needed to specify that a certain result is returned by a mocked function from a given point of the test execution forward, without actually checking that actual calls exist to match that call. A typical example is setting up the time for a piece of code under test. For example, let's take the case when the code under test uses GetTickCount64 to retrieve the current system tick count. The test needs to inject a known tick count value to be used by all calls coming from the production code, so that any time dependency and flakiness of the test can be eliminated. Also the test needs in some cases to inject different values of the time to simulate passing of time and test how the code under test behaves. For these cases the construct WHEN_CALLED can be used, as shown below: ```c TEST_METHOD(When_Called_Is_Not_Used_In_Call_Comparison) { // arrange CTestStaticMock tickCountMock; WHEN_CALLED(tickCountMock, GetTickCount64()) .SetReturn(42); FunctionUnderTest(); // invokes GetTickCount64() 7 times and all 7 calls return 42 // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert Assert::AreEqual(tstring(_T("")), result, _T("Incorrect mock function call result")); } ``` WHEN_CALLED does not validate argument values by default. Also WHEN_CALLED_STRICT is available, which will by default validate all the call arguments. If the arguments do not match then the action specified by WHEN_CALLED (for example returning a specific value) is ignored. # Custom mocks It is possible to write custom mock code directly in the mock class. ```c TYPED_MOCK_CLASS(CTestStaticMock, CRuntimeMock) { public: MOCK_STATIC_METHOD_1(, UINT8, StaticTestFunctionWith1Arg, UINT8, arg1) if (4200 == arg1) { return 45; } MOCK_METHOD_END(UINT8, 0) }; ``` # Automatic runtime hooks installation In order to avoid installing the hooks in every test, it is possible to specify in the class declaration which hooks should be installed: ```c TYPED_MOCK_CLASS(CTestStaticMock, CRuntimeMock) { public: MOCK_HOOK_METHOD_0(, UINT64, GetTickCount64) MOCK_METHOD_END(UINT64, 0) }; ``` Runtime hooks work only with the CRuntimeMock class. Hooks can be declared by : - specifying mock hook methods (with MOCK_HOOK_METHOD_x or MOCK_HOOK_METHOD_EX_x) - using the INSTALL_HOOK macro. The INSTALL_HOOK macro instructs the framework to hook a function every time the mock class is instantiated. Example: ```c TYPED_MOCK_CLASS(CTestStaticMock, CRuntimeMock) { public: MOCK_HOOK_METHOD_0(, UINT64, MyGetTickCount64) MOCK_METHOD_END(UINT64, 0) INSTALL_HOOK(::GetTickCount64, MyGetTickCount64) }; ``` All hooks specified by MOCK_HOOK_xxx methods or INSTALL_HOOK are automatically reverted when the mock class is destroyed. # Expectation modifier details ## SetReturn This modifier allows specifying that for a given expected call a certain value should be returned, overriding the default value that would normally be returned by the mock function. Example test: ```c TYPED_MOCK_CLASS(CTestStaticMock, CThreadSafeGlobalMock) { public: MOCK_STATIC_METHOD_0(, UINT8, StaticTestFunction) MOCK_METHOD_END(UINT8, 1) }; UINT8 FunctionUnderTest() { return StaticTestFunction(); } TEST_METHOD(SetReturn_Overrides_The_Return_Value_Of_The_Mock) { // arrange CTestStaticMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunction()) .SetReturn(42); // act UINT8 result = FunctionUnderTest(); // StaticTestFunction returns 42 // assert Assert::AreEqual((UINT8)42, result, _T("Incorrect mock function call result")); } ``` Test result: Pass ## NeverInvoked This expectation modifier specifies that the call is not expected. Should the call occur, the call comparison will return a mismatch, explicitly stating that the call was unexpected. Example test: ```c TEST_METHOD(NeverInvoked_When_An_Actual_Call_Is_Made_Indicates_A_Mismatch) { // arrange CTestStaticMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunction()) .NeverInvoked(); FunctionUnderTest(); // invokes StaticTestFunction() // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert Assert::AreEqual(tstring(_T("")), result, _T("Incorrect mock function call result")); } ``` Test result: Assert failed. Expected:<> Actual:<[Unexpected: CTestStaticMock::StaticTestFunction()]> - Incorrect mock function call result ## IgnoreArgument This expectation modifier specifies that a specific argument is to be ignored when matching expected and actual calls. The argument is identified by its index, starting with the first argument having index 1. Example test: ```c TEST_METHOD(IgnoreArgument_Ignores_An_Argument_By_Its_Index) { // arrange CTestStaticMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunction(42)) .IgnoreArgument(1); FunctionUnderTest(); // invokes StaticTestFunction(43) // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert Assert::AreEqual(tstring(_T("")), result, _T("Incorrect mock function call result")); } ``` Test result: Pass ## ValidateArgument This expectation modifier specifies that a specific argument is to be validated when matching expected and actual calls. The argument is identified by its index, starting with the first argument having index 1. Example test: ```c TEST_METHOD(ValidateArgument_Forces_Validation_For_An_Argument_By_Its_Index) { // arrange CTestStaticMock testMock; EXPECTED_CALL(testMock, StaticTestFunction(42)) .ValidateArgument(1); FunctionUnderTest(); // invokes StaticTestFunction(43) // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert Assert::AreEqual(tstring(_T("")), result, _T("Incorrect mock function call result")); } ``` Test result: Assert failed. Expected:<> Actual:<[Unexpected: CTestStaticMock::StaticTestFunction(42)] [Missing: CTestStaticMock::StaticTestFunction(43)]> - Incorrect mock function call result ## ValidateArgumentBuffer This expectation modifier specifies that a specific argument is to be treated as a pointer and its buffer contents should be validated against a user supplied buffer. The modifier takes as arguments the argument number, the expected contents as a buffer, the number of bytes to compare and an offset where the comparison should start. The expected data to be compared against is copied by the mocking framework internally, so there is no need to maintain that data unchanged for the entire test lifetime. Example test: ```c TEST_METHOD(MicroMock_ValidateArgumentBuffer_When_Expected_Memory_Does_Not_Match_Indicate s_A_Call_Mismatch) { // arrange CTestOutArgMock testMock; UINT8 expectedBuffer[1] = {43}; UINT8 actualBuffer [1] = {42}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .ValidateArgumentBuffer(1, expectedBuffer, sizeof(expectedBuffer)); // act testMock.TestFunction(actualBuffer); // assert Assert::AreNotEqual(tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect mock function call result")); } ``` Test result: Assert failed. To compare only the second byte of a 2 bytes out argument's buffer, a call like below would be used, indicating to start the compare at offset 1: STRICT_EXPECTED_CALL(testMock, TestFunction(expectedBuffer)) .ValidateArgumentBuffer(1, expectedBuffer, 1, 1); ## CopyOutArgumentBuffer This expectation modifier specifies that data should be copied into the buffer pointed to by a specific argument. The modifier takes as arguments the argument number, the data to be injected, the number of bytes to be injected and an offset where the data copy into the out argument buffer should start. The supplied data to be injected is copied by the mocking framework internally, so there is no need to maintain that data unchanged for the entire test lifetime. Example test: ```c TEST_METHOD(MicroMock_CopyOutArgumentBuffer_Only_First_Byte_Out_Of_2_Bytes_Is_Copied) { // arrange CTestArgBufferMock testMock; UINT8 injectedOutBuffer[2] = {0x42, 0x42}; UINT8 actualArgumentBuffer[2] = {0, 0}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, injectedOutBuffer, 1); // act testMock.TestFunction(actualArgumentBuffer); // assert Assert::AreEqual(tstring(_T("[42 0]")), BytesToString(actualArgumentBuffer, sizeof(actualArgumentBuffer)), _T("Only the first byte should be copied")); } ``` Test result: Pass. To compare only the second byte of a 2 bytes out argument's buffer, a call like below would be used, indicating to start the data copy at offset 1: ```c STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, injectedOutBuffer, 1, 1); ``` timediscretemicromock.xps000066400000000000000000031776271362133436400412150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/docPK! oSth'[Content_Types].xml ¢( œ“MNÃ0…÷HÜ!ò%.,BM»àg ]”˜xœÛx&U{{Æ)ªÚ*X”eboÞ<ÏLç›®ÍÖ°q¶×ÅDd`+§[—âmùœß‰ IY­Zg¡[@1Ÿ]^L—[˜1m±+"/%V+è΃åãB§ˆ?C-½ª>U òf2¹••³–rŠb6}£ú–²§ ÿÞ9ñ¶ÙÃî^,UЦ‹|ü/G‰ãÈp0Îhñ¤Œò¾m*Eœ‡\[}ÒKþÓGÁäpWÇ+nöWñä¸Ã¿sF#|%Èh­Ã½ÇÜ4ÐÚU}ÇÙ2ÝóCBšñè?JD,!‹úŠÎÓÝ»Ø>¤ôMP§ï|éH0H.l#6“°nØÇyÆ2O(;Mdþ.íÞM<„ ó¸KqOâ|½ò¢†FC¶P^TÇ[!Ùò"8¼TŠô¸%æ9Ò¹g!ÔÀ~¢å°æ³oÿÿPK!W $=7 _rels/.rels ¢( ¬‘ÏNÃ0 ÆïH¼Cäûšn„ÐÒ]ФÝ”‰Ûf4Ô½=ÙÀ¤íGûK¾ïg{¹šü(>1“‹AÁ¼ªA`0ѺÐ+xm׳{Ä:X=Æ€ öH°j®¯–Ï8j.Ÿhp‰Dq ¤``NR’ÐkªbÂP”.f¯¹”¹—I›wÝ£\ÔõÌ¿= 9ñ« oì ˆvŸJò_¼¥GÖV³–&fœ¥\È2»2‹huî‘ØhžJ›Ž/ªB ò<ÐâxøðoA»ñ Ê·Vmö—€æ€¼39Rì¸2ÑË©ŒV–~+ËÞ;7¡Í˜2>žñ'}}£yÁ]ÕYÂÝ!Wžœ»ùÿÿPK !d½Ïhà(à(docProps/thumbnail.jpegÿØÿàJFIF``ÿÛC    $.' ",#(7),01444'9=82<.342ÿÛC  2!!22222222222222222222222222222222222222222222222222ÿÀÅ"ÿÄ ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ ?÷ú(¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ (¢€ *½í¼·VrA äör61< §9à:²óÓzþ5á~øµ¯[Oá»{ó>³}®E…Ï ´;]I œGn_ÉÜ~ñã¥{åáV´T××QÛCáHI3ƒ>² À'—xÂŽÏ=)ž,ø™ªYjÚôöþ%{(m›N’ÃMŽ;iæ9¢*‰6>7˜ éÎå x¢¼;NøüÌö–3èö‹;½¼>}ή¸"EÏ›#ÇÅ ÆñÁRØÛÁKŸŽúöl3[øfÆ9.¬$½…§ÕÕBªÈñr¬‰½·FNÄ;ˆéÎpí´W’øWã,úæ·a¤Üé:h2¥¸žîßWˆ ò  $Rmf!ŽÖU,T‚>cŒùÄßüc…-íÞîuÕ¦»k…¿{XUÔ va¿x$Ëc˜ÉçPÑ^-áÏwÚfž‹§Ú]]ÝjI§"]êè·EŸ‘+$và†Bî·By¨5ŒÚ¶¯àÝZóIÓcÓ§·²Žéná¹^C5ÒÃåH­UvPìÏË‚=€=Šù¶ŽÞ!°ñŸç[ÌÖ¶V‹o¨ØÎ±Â÷A‘ÉØLxs÷G÷: 7uߺ…Þƒâô¨ô­:÷N–8ã¹]MgkŒË´µ¼m®äœ`04î´VG…µ¿øI<1§ë>\ý²!/—þr¦OÝ-µ~aц8`G8ÍkÐEPEPEPEPEPEPTõ-[MÑíÖãTÔ-l`g²ÝL±)b ÆXœDZ©/llõ+9-/í`ºµ“áž0èØ9SÁäøW1®ü5ðæµ¡Ë¤Akýk<©,ÿÙ1ÇngÙ»j¿ÈC(-œÔ@^+ðæ¥x–vþ•uu&vCäní“…'€OáUÿá:ð‡ý Zþ "ÿâ«ß t/ Ýi—WzŒ§\\\B&‘fš$ƒa@TÆ9Ï^•—mð7öréÒÛjz¤RéÒùÖÒ¢Ú‡¸0,ÞNdÁËc â€:{/ˆÞ ¿´K˜|Q¥,oœ,÷+ Œ9G!‡Nãߥ¿¼+kfóïiW’.6Á¥lù‚ò*ñ×’:zñ\„_<+ ­Å²ßê¦;»Ë‹gq´äms d÷ÚFzÕ_àg†u­FêöæûUI.n¦»qB0òXnò·ã€IœrN@:ïøN¼!ÿCV‡ÇýD"ÿâª9<áoaµ—ÄZr<ÖÿiŠFDOò™Y>á;•†ÏŽ+°ø1áÛ ­*ä^ê³K¥K–m,±þíRG—gʃ*Îäœå¸81ÉðSÃï§Ãbºž±1Ù $9’/´˜˜Ï>aŒp zäoQø“áËCD´‚çûGû^èÚA6Ÿ$sG€Æv ÇúÕÇ3‡¾17#•öqØØ'fæê¹s…8ÉÆìdÇÅ]DÜD·¼[Ü4‹;,Ùå2˜èùÿtPð|oø5¼r>´ð; fŠK9‹!#î¨FGN „Ôüvð$ºY»k먦Íö7´s)#8\€S'69#œIeñVîK4kÿ‡¾1‚äç|piÆTñ†;IãÂ?­I?Å9…¼†ßÀ4y‚I¥”Vlp $ ÷ÁÇ¡ ÿÂëø{ÿCþI\ñº‚/Ž^’òâÕ'Š8¶ìí%)6FNаÇC¸/¶zÔ“|Y†Ú0óø'Æ‘!e@Ï¥™‚ªòýKîH—âˆÚ–‚ÝþxUx°ê:^Hý×þ“œd` a‰¿üqçyš¤öÞ\­ùÖ’5GG]ªß)í» Ç W£WžÝü\±°·µ–ïž-în>ÍRé{œ€T °¶H~SÀã5ãø­¨›)^O‡>-[ €ÅرFm€áŸ¨ß¸d)àÆNÐéTWžÁñNf·®<ãHæ( ‰–]U±È X3ß>‚§“â[G.Þñ¡¡u ¥«2Wæò§*x88ÁèA Ýç0üT¼o#Îø{ãÝgÙ§Ù'Ë…\ãrýï˜í<—“>-}¦+Yì¼ ã‹i°ÆUÓx1•$2aˆl½ÀÁ'<`€z5ÀÂÒÿ©Çø(ÿìé’|R™^!€|hÈ_–ÒÈ*»O*2wÛF8à“ž0@= ŠÈðæ½ÿ Ÿ%ßöN«¦l”ÅäêvÞL€à¹?/8Ϩ5¯@Q@Q@Q@Q@õi/¡Ñï¥Ó!Iõ·‘­bá^P§bžG°:¨®x§âwÙ!Sðâ´žlŸÛìl¿jç+‘œeŽÜ‚wcѨ -‡Æßµ47ZoÃøÒÝàdÝÝ¥†ãqÃ7š#Ü›pp£?|TuþÕüM©ÜN5Ï Ç¢ÃŽu$¹ižQpI#¨À<㣢€ (¢€ (¢€ *7¸†6ÚóF¬;Ó~×mÿ?ßb€&¢¡û]·üüEÿ}Š>×mÿ?ßb€&¢¡û]·üüEÿ}Š>×mÿ?ßb€&¢˜“E.|¹ñ×kO Š( Š( Š( Š( Š( «^_ÚØ"½Üë±À-VkÅzMÖ¯c6Š¥•òw6* “’RvD͵Ö坸ItoúÃùÔ°ëšmÉ" ¥”Ž¡¶?!\ü úÏ÷!ÿ¿•bßÁÍË¿:0“G¦ŒŸSIErÝ’.O©£'ÔÒQEØ?„I-qôÔ×-á½qôÔ×Ò࿺—À‚Š(®£@¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¤eWR¬¡”õRÓ%•a‰¤s…Q“@O‰ä7/û«ü«"µüHAÖ¤ ä_åYóÏãËÔà«ñ°¢Š+˜Ì(¢Šéü#÷®>‚ºšå¼#÷®>‚ºšúlû¼Nú_ (¢ºŠ( Š( Š( Š( ¹¿]]Zi𽤒#—ÁÙé]%SÔ/l¬¢W½tT'¸ÈÍ\¤®LÕâÕìy‡öÖ¹ÿ?W?—ÿZí­sþ~®/þµwÿðhóñoÿ|Š?á Ð?çâßþùÛíÿé×áÿãö?ôóúûÎ*ÇWñlöw;,m·m-ÍÈMʪûƒ09f  ÝŽµr]_X„ÝÙ½ž«¿÷¯mt²ÂFN1›¦2HƒížÒÝ>â%–ZXÛ£¤ü@¦Ï§ZÇæ\Da8Ý$F~¤W7?¿~_‘¿'¹no™æÿÛZçüý\þ_ýjlšÆ²ñ²IspPŒ0#Œ~Uè?ðhóñoÿ|Š­®èrXÌ‘Ïr¼£&ºUúuøÀ9Ýúyý}ç1$“K»ÜgÌ1.séÛôÅGZıO|²Á)¢B¸ôÅg×Äãñ~bš´¬TNÓ†m‘ÆTÚL„sógŽ09rxã­H»‹6ð‰0¤å6õ>‡wçŽsÚ°Pm_õDØZ)p3×¾)jl躵®‘Ó]—ä(*¹æµSÆÚ#±Qsµ€,UÊ©ÀRÄàž€+ú)ô®zÓE—\µx#™"(áÉ`Oj±mðÛOVyo¬í.î²&IŒc*FxÇä=}n4¾©'©ÓWD–‡[ý¥ÿNWŸ÷ëÿ¯P\ëö¶B#uÐyÒ¬1yª|÷TdòǰšÈ‹Àú\0\E—l¢á$oµM¿j°`grò œœ çü+½ ³3hÖ¬YuÔÇ!I#9>¤Öö§Ý›^}ˆüU¥ËıÊ^;hijº²‘ÞŽ~PWæöæ£1ÑŒñ@.“Θ)Š?17>ìmÀÝÎr1޹™ÿ ÷EòÕH¶n@xîçG ®Ò¥® '3qó¼øIf·c¥Àd¶}ðÈo'ßµ³‘€ªgåÇæÝù‡¾hj¾'¶°ˆ£¤ðÜ2îA$]y­«[ˆîíc¸ˆå$P¸ý{Â÷ÛE"Î-ª«Ë$ÎÙlòîI<žæº"Äiº\ ’Q~b}j¦©¨'¨ ê9µ%¡vŠ(¬MBŠ( °¼O¤\kQCnT2¾âXÖíU½ÔmtèÖK©DjÇš¨7'ÉšN-Kc‚ÿ„Rÿžþt©ÏH:ëÿá(Ñ¿çú:?á(Ñ¿çú:ëúÎ#úG/ÕðÿÓ8û†‘.’ñ®¦7m¾uYãTf Ë»ÈØãžO\Õõðm宇‘gqr,â?»†âXÝS’ÄäFœ“ÕSíÓã Vf:¥¸XYVR\a T7¡ 3׬/ˆtDz[Ĺ jä…œ)(H$pÝ:‚? ÇÚTæ¿SogO–Ý3þ=KþzCùÔsø'Q‚•¤‹2pk³ÿ„£FÿŸèê¯i_e“Ê»‰Ü.Bžs[}gý#«áÿ¦r—Vm§˜­\’ÉçêyþµikwÝê?hˆå$~U›_mâ&ßs9¤¥dQErQE\¶ÖeÑ-x£W.áHo¥Eÿ J(n È%‰€$:ÀY¶7N0;dõÀbºz•k«G4WJņs] žk`Œ–’ÜB¬rBIÔþUõ¸ RXH¦µ:aŽÍ= X¼m¦ÍÄñëÆdWš_²Ê0UËc’1ëÉè)]|HÒàdX¯ÅÓx‚ÒC壒‡v2£…Ëz]öý>]ÿßßþµÙÿôùwÿúÕ½áØÚÓîqIñ;Oki§’g0Ñ­Š‹†ò÷˜Ñ·mÞ8\1•ÆCSþm§Úl¢Ìž]Ó*‹%|¨Øª3o3å(nô?…vßÙÿôùwÿúÔgÿÓåßýýÿëSæ…ö O¹Êë¾(–x–ÞkKÈ.P²Onù^H8"º­&øjZ\@]~`}k/[ðý¥Í«Ï;Í,¨¡U¤|íÉÿëÖÝ­¼v–±A#P£ç*n Ej(*ŠmÉèMEV&¡EPX^'Ò.5‹(¡·*_q,kv°üO¬O£YE5º£3>ÒUÓæç\»‘S—‘ólrŸðê_óÒÎø@õ/ùéçGü'º—üñ‡ò£þÝKþxÃùW£þ×ýXóÿÙ?«—¬<aojÉw¤‹©¥Þgv¾,„†”Î2ˆÝ튚ç i¿cÓmÒ0FØÍü’D£98ŽÐsÜ õõ5“üMw Ô–º óymû‚¶òmUX¹ ·B“¸·z/jߨQ^]ÚMizÖZMc**s‰XcŒuç§¹—µçÓs©û.Mv)ÿ©ÏH:Žêð<­$[PdàÔŸðžê_óÆÊ£ŸÆú…ÄÅÖ8Óþ×ýXåÿeþ®:êÍ´ó«’Y"\ýO?Ö «w§Ph®˜až%ÏÔqý*½|6:ÿY÷¹RµôØ(¢Šä$(¢Št·Wv–ìä‘$2Jzb«Ú/‹õ)džß^´‚Ên‰¹B7g8$‡`Cu~DspU€ÇQšéþÏüñþùõ¸ ©a#]{0¤Ý¥‘ÈD5ÿ"ᦻÐ<ЋäF—sífÜ7nmܹÆä‘Ó4n­¼[pÉåjú¢£Fÿº¸™‹NämÙùÇL7^Ew¿gƒþxÇÿ|Š>Ïüñþù¿:ìmÉæyêXxÂ+iñ<³F#®<‚#Ûæ# ’çqVR>\ ƒNñgÚlæ>#Ó|¸Ê‰í¾Ôq0ULþ^T¹HåÈÆ{zÙàÿž1ÿß"³Áÿâ§¹°‚æÝá1¢†à£5eT"…Q…ÕS¨¥­aB›ŒÜ›ÜZ(¢±5 (¢€ §¨i–ºœKÒoU95rŠi´î„Òz3 þ þ}¿ñê?áÑ¿çÛÿ­Ú*½¬û²}œ;#> ÞÖ† ."‰~ê$¤Þ’ãDµ»‹Ê¹yå9Úò’3Z4Ræ•ïr¹U­c þ þ}¿ñêŽãÂY·CmûÂ>\·zèhªö³îÉöpìŽZ¶K=Cìñ $q¢Ê³«ÑgÓ,®e2Ín®ç©$ÔØšoüú§ækƯ—J­G>mÌeA·{ž}Ezö&›ÿ>©ùš?±4ßùõOÌÖ_ÙRþa}]÷<úŠôìM7þ}Só4bi¿óꟙ£û*_ÌW}Ì_ýë ®¦«ÛXÛY–6ñ÷uÁ5b½ZÝ*j¡ÑòÆÁEV¥Q@Q@Q@Q@OU»›OÑï¯míò{{y%ŽÚ<I0 É#^•ÄÃ⿉Ÿáª;nb5¸ÜvŒòžäœÏûsHþ×þÈþÕ±þÓÿŸ?´'÷w}Ìîû¼ôéÍ[†xn¼¤¨²0`X«;‚#±WŒø—G×ü[¬A¨ë_éâ·0døQ±»rà£Ëç*IÜ9ÁÉÔ¾\Ï£‹/ám­¦ —ÒïXyÖXŠ“æ,‹p›J°ÁRw)‚(è ÌÓ¼I¡k o¦kZuôê›Ú;k¤•‚ä ¤œdŽ}ÅxÍ¿€g¶¹“S“á]ÜÍz÷ |EXU‚ˆÕV3INãÁ Æ3rÛÃ> ÔõÒu†PCáiîÒalšë±¹'tŠ]»G™)òãDÎG÷E{Ú®oz,§¿µŠè¢¸æUr¬áí'8.BƒÜ:ÔâxZáíÖT3"+¼a†åV$)#¨«`÷Ú}+Á¬>}¨ÛYê ~ÅçlŠãP·ñ&|œðÒ¤l͹,îéŽj¼~¸»µ°™~ n(Ä?ˆRJ‚= •R$$+1+ÉÝ‘“ô-óµ§Ã›å޾ø<“Nˆë ·ñ'•„°!¶³»ÇßÁÉ$tÂÃà²Þß…é,oŸí̆ðI3'K)Ž"€ÆX2’@fùTü @^ßZi¶’]ßÝAkm7Í<rp2ÇÉñ¨-uÝ"ûO›P³Õln, Ýç\Ãp{FæÜÀà`Nz ð©| «Çi}‡Â-ä¸Úˆ[ÄnÈ#¬Š&_3æRÕåà•É·}áocêzÂ×Ñæ½·[w’þì¨]™x•Õd;IûÙÉ$¶ìœ€zô2ð½ÕÄvöþ$ÑæžW qßDÌìN6I'µxËÂ÷WÛÛø“Gšy\$qÇ}3±8Ù$žÕâÑøQ·ÓVÂ×áÄòÜØÝH ×lõ•±žVI‰BI¼®áTn,˜Ýš| âÈ Ò‡Ã+>úÊè]=嶪¦BÁч—æJápq"ä’ÉȺÂWáÏíìÿíý+í¾o“öo¶Gæy™Û³ns» Õ´ï5‰þ£Oöˆå¶ â‰ä9ÜÏ)—Ì!Žà~R7½ÉÛá㛄|pŠŒ¦!â¥ÚÄCs‘ƒŒ>cxÀ¾™á[„·iPLèΑ–™T€Ä¤Ë“ÛpõªðjºuÕÄvöú…¬ÓËn.£Ž9•™á'@ÉB‹¥xß5ÒÄpü´M@"ƒ;ø…š"Ün>X”p7ñ‘ÉÇ1†ÚÜ0Å¿ t«™¼Ô’Y`ÖåD1¢ ÓäHFü•ã…a‚@>€°ÕtíQ7éú…­ÚºÞem,ÊÊO‘Æ}TŽÆ®W‡[øRîÓTµÔ­þ GÝ«Äðºx™VNÜàŸ”rrNI5é^Õ¼[¨ïOxb #ʉ|—ë7Ÿ'}¨ í^ å‰æä€žŠ( Š( Š(  ÷Ö¿nÓîm<ùíüøš/:ÝöIàFänÌ3{àn¾Ú_y?kñŒn<‰Vh|ÝL?—"ý×\§ 2pG5Ýj—ͦiw©eu|`Mÿg´Ui\»A Žqœœ`dàW ÿ Róû?ü+ßý·ÊÏ“ýœ|¿3w]¹ãvÜ㽨-¾ø^KûMþ ø¯,Ù$µÓ›YˆÉ"å#Û•*¼‚§fO„Ëì6íã­}tÛ‡%mg½o5®C™üȘ0]ùRÜÆç‡nqõÍGÞ.¸¶ÔÅC` †BL˜r+ûÉ$ìü`ÿ²:³ð+BiÒá¼Eâc2\5ÒHoSrÌÄ/!ÉU%º£Ò¥O…š øº=U<]®7ˆ-öþô^@f\q¯Ì<¿›äxÃn!Æìî爃Þ¸ÐäÔÁ½m&·ùn-žîå\–Ýå˜9•rª€ nÕ± øÛI8øKãMˆê„& KFÏÉ)ÉŒã# cxÂÒêî+¿‰#¶¹>~¡40j±Û*DÒ34†0¸UÉ;˜¥²p3€‘ü5³Ô|ltë’[<°Kito…ÌPù€T ´m°# áÅp)Ã[}RÒÇYøeâ=/í’ˆmZcq™ r¿wÌ p¦2B†9b ÓÚh^¾”Û'ÁßÃs-Іٮ¤ºŽ-˜$²d˜ð $p1Ôöìåø=§/‡àÓu_x™ìÂEDÚ‚¥»6UQV6RÝ´*äàà š±qð—J4½6ø˜‹XÛÿhF b6áÔó”2ª‚£ `QÁê.Šè£]DÖU\«9Ý&À¹ÁrrØä“Þ»»­FÃBÓá}[V‚ÆØ¾Ó{,qy¯Žçå]Çàß åÁÏ­»ÛÄ2:Èñ‹ë¬ÊRG™‚@fÁí¸úÔ_ð¥>ÿпÿ“·ür€;±<-pöë*‘Þ0Ãr«‘ÔU°{í>•%q¼ w¤è{ã´ˆÃû\ãbg#‡çæv<úúb»z(¢Š(¢Š(¢Š(¬O²Çà½jw{¤YK>ëK–‚PQK ²TäzêÈ>iÓhRÞÝÇñxZÞ[‰ï]]d·‘L`33¦ÀâTƒŠöë>5Óµ !ðï… Õ­žÕLwzùSåÁ ¬rë,àmïÏ)Ën«¦|<µ¶˜>YîuXgR¸Ù(sìeW¹ãXžõ¿@Q@Q@Q@Q@gм{7„õŸ"ãÃÍö–¶_i“P°„ʱ0fX(WqmÜdqÞ³/~0Zi¶wàïÚ[GóO¦Ñrp2Åð2Hz5ç?ð¸-?³¿´?áñؼ¯;íÙƒËòñ»~íøÛŽsœb‹Œzš]Øx;ÆV²gdÐi‚Dl2¹øW£Q@sÿ kíÚ´ÿøÆç̷̋?Ù¸Ž\Œ¯Î¾SÇ pjI¾'_Af7ü>ñi¾6ë'”–[âÞÈ/˜ 8ÉÁ;r9Ê‚¯B¢€<æ×ã …÷ž,ü+â«™-åhg† (ä’Dˆ²Nàn%X •8¯mñíº„Éià\YAº)¦†Ë|‘Ü)ù¢d‚Ilç½ëÓ¨  ÍXmwL[æÒµ43•Xu–9HÅ´1 g8ÎÆ'NŠ(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(¢Š(ÿÙPK!·%]å07docProps/core.xml ¢( ¤‘_KÃ0Åß¿CÉ{›ts*¡íeO 'ßbr×›?$™Ý¾½i»Õ‰¾ yIι¿{nn1ß«&ùç¥Ñ%Ê3‚Ðܩ뽬é-J|`Z°Æh(Ñ<šW—·”Kg,¸ Á'‘¤=å¶DÛ,ÅØó-(æ³èÐQܧXˆWWcËø«O¹Æ ,0ÜS;Ñ)øˆ´;×ôÁ14 @ó,ÇßÞNù? zåÌ©d8Ø8Ó1î9[ðAÝ{/GcÛ¶Y;ícÄü9~}z|îGM¥îþŠª Á)wÀ‚qÕd²4n§Þ |¦DWj°‚Hb:„:)ëéýÃjª ɧ)‰çjEnèlFÉì­cý¨ïÚ*®p#ÿA<ªÿZuõÿÿPK!FªÉH½2$¥4Resources/461A7FC9-496C-3298-DE7B-1B37E30FFE36.odttfì}`TUÚö9÷N/™™$“Ìd’Ì„IB $„’Ð2B¯a0„„$$(%¦ÐEQЊkEYŵ‹e2 ÆŽŠ½—U× «kYÅUײ"0ÿsï;'Vý¿ÝïÛÏu¿9'Ï}ž÷=åž>'ÂàЈí½aqkÞ¹lè÷ÖUü»³úìæþbÙe…+Fm5?þç.;±«oaLêW1vrÙÃ;'ífìªÉ°kÇ•WT~øÈW÷2&6nú´ªÅ #Îdìš×ßaW+Ëý¾cRéûŒU¾1­ª ð»·^;Ê1V[¿´®eÙÎíg1Vh@%/Ô¯h÷…®Ø÷c 5ŒiSµ4-ýæ›)Æ#¿1¥©®­…¥2?Þ?åíMKV/zlö#ãkò1fÝÜX×ðé;…ûQÿ<¤m†Ãz«E†}ìÌæ¥í«J¯5ìûŠ+xáäÆÖeúãTÆ.!½ÿ’åõuY~cmµŒ¥O]Z·ª%£(óY”ïFºoYÝÒF÷ͧœŠüo1fݲ¼­=âaÑžT%½¥µ±åäÛ%ôo%ÓÎ8¼Úî™Û¦>µÀ6òkæF7îýdí3 ?ýÆî ß:²Ùø©þN˜F&1 (§cGßgÚùý¡C;Ÿª5õ †‡-›McZ6ZbvVÀslSßË™¬ÉåÛjÐnסÊtbù¶Qb&Ù´’$idI³ŸI‘»%BïelJ•ÏÇèN6µA¥”ícü*%M¾K§ôµÇ±Xèt¯±[~é6ü§M#»ú—nÃ?tºM{僿®qøWÍ`VûK·!þûAzŠmÿ¥ÛðkÒŸØø¦ÿ†-ùŸnK,ÄB,ÄB,üóAº‚›~2­–ü¹²Úì…y„õïÍÿéAÂ6ÿÒmˆ…Xˆ…Xˆ…_WÐ,eçýÒmˆ…Xˆ…Xˆ…Xˆ…Xˆ…Xˆ…Xˆ…ÿœû=3b!b!b!b!b!~ÅAŽ"5úmƒõ° ¤%LÃ`'2;<(+ëæÀךVâsû²#5¿•eç呯‹|Ëîä)Ÿlzoì{EÑšíǽx¢|)ÓñOUã‹ã¿ë ~»¾!±Ÿ¼W}ÿŠPþdæ)?“¶å¿Û”ÿÍ ×ü„î?YáÿÂz ŒkX0ÿÄysçÔTgUÍœ1}ÚÔ)“'Mœ0~\eEyÙØ1ÒÑ£FŽ^R^W¢Ãn³šMFƒ^§ÕÈg*ü•µ¾PvmH“í?>O±ýupÔõrÔ†|pU›'ä«U³ùŽÍ@ÎEÇå PÎ@ONn÷d#óø*ü¾Ð³å~_7Ÿ3£zk¹¿Æ:¨ê)ªÖd«†FFJø*\Í徯õU„*W4wVÔ–£¾.³©Ì_ÖhÊÀºLfH3T(ÇßÒÅsFsUH9û$f°*¯ ÉYu ¡é3ª+Ê=5ª•©u…te!½Z—o±Òf¶Ù×5`oç–n;[X›kið7ÔÍ«Éu(Ô)Wtvn 9rCýüå¡~kÞw¡Ë¡þòŠP®•MšÙóÒfÙý¾Î¯ï?øé±žº¨G—eÿš)RébÏ0!]h†¶¡…è_F†Ò–ÍݶFhýŒj²}l¡'̹5!©VIÙ+RœA%e½Hé)^ëÏP¦ª¢6ú³¢ÙZ¿Ð—7£¯þdá龜]»°¾YáºÆNy9Û¬êP "PíkE×À䯫E'+Ã0£:Tào %úÇR8|Ê,®ªV‹D‹…ËB¬¶>Z*TPQ®´ËWÑY[N TêòϨ¾›Eöw öyv±Á¬FiG(© “’]ÑYݰ(ä­õ4`}.òU{2B _¿º±F™%¿=Ôo?^—¡¾Q-…¾—[dVz®Ï2øª%\£Ì¾J<ücG"ÁŽéRMeFÇŽôUsÙð–hES 9«l¼’$+EËÆ{2j2(üL“<Ñ6i³B†^uÙáèi½ç'›F¹•õóU4–÷jà1•j£ ŒÖöãí””±ˆ¾% ÊtŽIrv.|ªQ]Ê,º|!6ÝWíoô×ø±†Ó«•¾)c­Îï¤*ÿ¤sªÕÙŽ®’YÇX”^LVˆe YRÖ`e®GL«jSísüqÉD²¯ÓàŸTÕ©TîVÈ|ØAè´.{BÝæâøÁØš•8Ýü•u~ŸÝWÙY×Y¿°³+èl©¨m®ÔáŸÐÐ鯪éQÛ:³zgòªx6‰Oš56oΞ±]~~ÎŒ®?§jNõÝ8Ö}ç̪K\*«[Ó•‰´ê»}ŒT¯¤x§bøC©i& ƒšßsw—5U£:T»¾›3Õg>Îê»%òÙ…O‚OC¾€êS&ÉÕŒ!Æq[ákP¦gmMsgm²¹X¦?<Äý£YHòîâ’Î2ùdžÌþ±Š¿Tñ—’_§øõX<‰cp”3©³Ös ªšy8-EY©Ò׉̪ÎxÖs°&Km0§:dÌÅٯ͚ˆ|ãÔÂ=.´¾¾Ni V+eõYêk°lE…È2!dD Æh ÈQ©–Q–# Õcn0jùõ0BëkB5¹ÊK«רËÙbãýÃ1íT§6[yQAMg¼¿PÝ›Ø ¦¬M Ñ6VUML¼¬†IoAËëýHª¯õa´5¬¾ KÎR“‡<85Ù*Lžh"Sº%g™­¦1âGÑæ|eKj³ô55ÔxÕÚÍ€wÛCf´(»×PF `t4Ai ~6¡©JÖ‡”jft³™þU8Y”F«5鑲fM¨ÃáOåÍðø‹EaƒrF˜£uì#¯^é¹ã.gÍêŽÜà_Ñ+ä ð+ÊÂdž»±°YMçñŽÐÜܼ†ã½VÕÝÙi°þx/ƒµ‡§¯ŸŒ…²¯[:kÑÅ'BlâL!Îb½§ qšë„X+Ä©B¬bµ«„X)Ä !:„h¢MˆS„hb¹Ë„X*Ä!Nâ$! Ñ,D“‹„h¢Aˆz! Q'D­ „˜/ĉBÌb®s„¨¢Zˆ„˜-DPˆYBT 1SˆBLbšS…˜"Äd!& 1Qˆ BŒbœ•BTQ.D™c…#D@ˆR!F 1Jˆ‘BŒb¸%B 1Lˆ¡B b°EB 1HˆB‘/Dž„È¢¿ý„È¢¯ÙBd ‘)„_ˆ>BdáÂ+DºiB¤ á"E·.!’…HÂ)D¢ BÄ áÂ.„Mˆ8!¬BX„0 aÂ(„A½:!´Bh„…„àB°¨à!Ž qDˆÃB|/Ä!!¾âoB|+Ä7B|-ÄWBüUˆ/…øBˆÏ…ø‹Ÿ qPˆO…øDˆ? ñ± ñ¡ñ'!Þâ=!þ(Ä!ö ñ®ïñ¶o ñ¦oñ!^â5!^â÷B¼"ÄËB¼$Ä‹B¼ ÄóB<'ijB<#ÄÓB<%Ä“B´ž¬Ó‰N §[@ëÈZKt*Ñ¢Õá´1 Uá´2ÐJ¢D”ÖNVQ+9O §µ-'ZFY–-!:9œZ:‰h1Q3QÑ¢pj9¨‘¬¢z¢…DuDµD ˆæS¹ÉšG4—hQ Q5Ñ D³‰‚D³ˆªˆfÍ šN4h*Ñ¢ÉD“ˆ&†=@ˆÆ‡=Aãˆ*ÞI Š°g2¨œ¨Œh,¥¡r¢R*7šhÑHÊ9‚h8/!*&F4”hU6˜¨ˆj)$D4*+ ʧryDˆr‰úõ#Ê!êKUgeQ™D~¢>Tu‘Êy‰Ò‰ÒˆR‰¥´OˆþLΉ>"úèÊò'²Þ'ë=²þHt€h?¥½Kô9ß&z‹èM¢7(ËÈzèµpò  WÃɳA¿'z…œ/½Dô"Ñ ”åy¢çÈù,Ñ3DO=EYž$z‚œ=Fô(Ñ>¢G(çÃd=D´—èAJ{€è~rÞGt/Ñ=DwuSλȺ“è¢=D»ÃI¥ p8i.¨‹(Dt;ÑmD·ÝB´‹èæpÎk~Õr#Ñ ”v=ÑuD×]Cô;¢«‰v]E•]Iµü–h¥]At9Ñv¢Ë¨À¥d]Bt1ÑE”v!Õò¢ (mÑùDçm%ÚB97“ÕIt.Ñ9D›ˆ6†u ³ÃÎ… ³ˆ6„‹@gvAëÃNÆüô°s(è4¢uT|-•;•hMØÙZMÅW­$ZAÔAÔNÔFU·RñSˆZÂÎzÐrªlå\J´„èd¢“ˆS¹f¢&jÙ"*ÞHÔ@9ë‰ÕÕ- šO>‘Z6h.uzU]C/ª&:š;›^¤ZfUÍ$šN €¦‡•7L '*Ë{j8qhJ814™²L"šNĽ€O k<Ñ8rV†OU„7ÊɧƒÊ‰ëAcÃñ• 1D¢R¢Ñáx|¾óQd ;j@#ˆ†‡ÊÒ(!*;Ɔ…Õ ¡aÇÐJLTv RÎAa‡Ò±a‡²7 ˆò©x½aQ.UÖŸ¨U–CÔ—(›(+ìPF)“ÈOuö¡:3¨2Õâ%J§riD©D¢"wØ~"ȶÏ%‡í @IDN¢D¢¢x*à vrڈ∬DÊi¦œ&r‰ Dz"åÔRN 9e"‰ˆ±@ĶЫਭÞ{ÄÖà= ý=pø¾¿Á÷-ð ð5ðü¾DÚ°?þ|„ÿSà¤ýöÇÀGÀ‡ÀqMÞ?Å5{ßÞþ€o?ø]ààmØoßÞþ¼n=Ùûšu÷Uðï­K¼¯X³½//A¿hÍõ¾<<‡ôgá{ƺÔû4ôSÐOB?a=Éû¸u±÷1k³÷Qk“wÊ>‚ú‘½x><Üo9Å{Ÿ¥Õ{¯¥Í{¥Ý{7Ð ÜÿÀHÛƒ´Ýð…. Ün^í½Í¼Æ{«y­÷ó:ï.óiÞ››€€ëëÌyÞkÁ׿C™«Á;Í'{¯‚¾ú·Àè+P×å¨k;êº ¾KK€‹‹€ ߠܨo›iª÷|Ó4ïy¦&ïVÓuÞ-¦¼gËYÞ³äbï^ì=3¸>xÆ®õÁӃ낧íZ4¯ãæužu“Öºn׺7×âu¦µÁ5ÁSw­ ®® ®Úµ2x´‘-’ÎŒ ®ØÕÔt$v´wÈ_uð]¼¼ƒìàë°wø:dK{°5ض«5ÈZ§·®o µjF„Z÷·J¬•›º#{w·zÒ+Áµ­V{å)ÁåÁ–]˃Ë- ž„..n 6ïj .*n6îjÖ/ Öןœ¿ëÄà¼â9Á¹»ækŠ«ƒ' ÿìâYÁà®YÁªâÁ™»f§O N…Jñ¤àä]“‚‹Ç'ìW\¬@çYª=Õ—*Û•LMEK˜‡è xö{>÷h˜'äÙë‘ãm)Þ©ŸÍÍ˦¹ùr÷éîóݲÍõ¼K ¸ú ¨´%?Ÿünò_’5 ä~ù•,ÉžäK’Jß’¦ÌªT¹´œxе¯S’üÙ•6'·9½N©Âëä̱ßñ¹Cv>hÞ.ÙlÜf‹Ø¤€ ÙmqÞ8IyDâä@Ü a•6«×*)ˆUN XáQjìk™>«Òföš¥`©yšY ˜KË*漕Læ>ηƒdƒÒ îôVb_ïNâZŽÏó®YU¹¹“º læ¤aúÜ?'”U¥<3æ„tç„XpÎÜê.ÎÏ«éâRÙ¬P¢ò'¶ª}öÖ­llÚ¤PZUuhgZͤÐzˆ€"",­+‰­ÉßÖÑ–›Û>ùmí¹ê,Þ¡X¹ŠSùik‡­ÄÕf¹?(hAB»p¶ÿ|©÷ÀéüúCSþ’Á˜ˆtk6ggëÓÓ€uÀZàT` °X¬V@;М´ËeÀR` p2p°hš€E@#ÐÔ : XÌNæs9@ P œÌ‚À,  ˜ ̦Ó€©À`20 ˜LÆã€J (Ê€±À ”£QÀH`0(ŠaÀP`0( AÀ@ Èò€@.Ðèä}l Èü@ ð^ HR¸ $N Hâ`l@`,€0FÀè 4c"xÊ€p€±? ߇€ï€¿ßß__¾¾>þ|>>þ | |||ü xxø#pؼ ¼¼ ¼¼ ¼üxx xø=ð ð2ðð"ðð<ðð,ð ð4ðð$ðð8ðð(°xxxØ <<ÜÜÜ ÜÜ twww{€Ý@èBÀíÀmÀ­À-À.àfà&àFààzà:àZààwÀÕÀNà*àJà·Àà àr`;pp)p p1pp!ðà`p>p°Øl:ss€MÀFàlÖ0f=ÇþçØÿûŸcÿsìŽýϱÿ9ö?ÇþçØÿûŸcÿsìŽýϱÿ9ö?ÇþçØÿ¼ÀÀqpœgÇÀqpœgÇÀqpœgÇÀqpœgÇÀqpœgÇÀqpœgÇÀqpœgÇÀqpœgÇþçØÿûŸcïsì}Ž½Ï±÷9ö>ÇÞçØû{Ÿcïsìý_úþ•‡š_º¿òàZ0Ÿ1ý•Œ½ð˜¿D=ÄÚØzÄl+»=ÈÞd Ù¨íl'»žÝÄBì!ö${íŸü;à?Ž®Ö.eù.¦c ŒEE½èÖÆõò\+AãûÁ±G>;Î÷ÙÑ #ö£ÝºxfRËZ¥—àý+?9„ÏWØ‘¡Š-m‚¶©%¾Ð_yôö£773Ø6—Íc'²ZV‡þ7°f¶#s2[–²eªµ iMx.‚µ¹p–¨ú‡\ËY ÐÊÚY[ØÝµ”´ST»ƒ­D\ÅV³5ìT¶–­‹>WªžµHY£Ú«€ÓØé˜™3Ø™ªLž ì,v6fm;‡û³Ö¹=ª“mf[0Ïç±óRo=ÆÚ†xû ÖÃEìbv » ëâ ¶ã8索ÿrv%» kFI»ž«T¥¤ÞÇcw°ÛØíìNu,ë1j4"b\©cØ‚1X‹nèÕb¿•=£uú®ô­3ÚÓUðŸÙ«ÄŠè8*97 'ÕBó Ô²î¸‘؆>þ¡Gd]¬öÿoïQù9¯½Fæ ÕRÔñÞŸÒ—°ßb^§2ªŠú4©«TÝÛeOÞª} »–]‡¹¸AU‚És=ô ìFìí›Ù.v ⺷"¾ÝªÎ\ˆu±0ÛÍö`&ïdw±nÕÿsi?æßõ‡{÷±ü’ÈXŠ”0]ßÅ5x¾Ó6±Òƒ¥Xg´¸”Æûûd«Ï@‹õƒóáp(kK><¡ó‰­ß'ff&rGçCÊC9ÁMK.ضhcÍÉ»å™cÒ2äk3Ò*Îzð´™[š†þlPã¥ÊwÒ6¢ ÅlÜžμ¾®n ûX Lyy}›ËÁú iÈK2ËiÙ iÍöfm³˜eÆcÐãKJì %%ƒöxîÿ;ðINm£>Á—ìöÅ륣›5þ,B£|t»¤÷¹ÝÞx}¶k‰w@F½Ÿ†ZÜýR¹3“õf½Fƒ‡¼òðY‹¬3ê䵇Ïíñ>ÞǧŒø‘ÁÒéýS̾>ÊxGÉ;Ð×"`£îf&ɹg=×1Xù Ù#Ýy[j®ãƒ#’K¾ñ5$G{ªîõLBá+ÐÏWüÐǾ}óeÿ±S&Æ©lÿt999)Iî5G; άTO†Ó$϶e3¸I]W‰LZJíÙs¦ ™<È“—•a¯1é?uœ¸ø¼ÑS Ý ztN6Æ™¿ì_^rtZO'ŸÎHË®l3xvE¡Ýœ10óqŠ[zÇ?2×}ô6wA@ùÎemä ¼÷²lœ~›ÞÒÜì)Qv^‰²óJìvåÝX¢ìÁ’{ñ[:c‘ýÊ&.ˆnî‚èæVÙõ›–LSBF¥¹¤¯G×_ùc×ÄÁÝ\³;nŠv2†k—V mÐW¢û´¤÷öBk„ο¤dGôtÊÙêiéLL—”Á&ïÐ;R•jÜö¹õ[NÈ)\xÁ‚iúD¯ kÇx}ÙºòÒêançàÙc2F*ûº±û0LÃÊ)³§lèZØ~ïYã*Ê$³ÞªlJ«þHEÕ #® ”ŸÙ8*¾Ù e7lÇ óù)¬ú=-Cx¶-zŽÙ¢]¾Çfç“mуÎÖÍÿˆgœY>8Y öMVÀ˜;1ÛæôMp*C…£lä}è¿: Êðè(ýÔ÷ZDÑpªŸ:éIg4’Ó2îC†û ñtéâS““Òìú¬1ÃKÒ¬™iÌå…Ié£ÑhHÌŸ<ìHÈ`6h4xÈgÌF,!³aÃÐò¾6Ù`2ã<Êú/=*­Ñ9X& ÃF÷{ñ+2cyüÜ€Ýá]ê6Ê9¡¤S ¯°´ËmÑ-Qg¿D9“tÿõY:LZãÎp$Ùtu#ÇÎ-IñYP:hfŽÞ–’˜˜bד3.'s°×fI/ÌΜ/½o±j°¯Ç *˜¶xdeÛ´Üìlž¯5hdYcЭÊÏ÷ .ógVÉÈ¢ÌÞéiþ¢ÖÃòXöî>) ssBÀ’bÚ×÷”>6gz‹³í‡yøb_|IôDý‘ ªK4üþ¢¤Ñk f›ÓaKõù“´vj¬ÛïOvõÏö'Äe$é5\ó’ç×ê´fWNÚÑÑlÒvÉeAçÍI6h º¸d&qSäþ–v>s²~,îm–gн {û¹Ú3DÎŽŽ_Âñ׃ûõÊÇsj¼ÞÁ NªÇï4ÄÝ9^o?>5úy½9n#ï0X”y·ä{,ñ­Îâ°|_’‘ë1›=¹yn³Ù‡¹?9Èo×,P[â»%I ÌÇœRÉf{´k1C£ìûzú(Gž<ø§Úv±Þæq&yì:îÐ%d¦zúàà2&e¦¥f'ÉÙ©i™IF>Dù€”ñ"»I«5Û,‡}i}]f³«oZZŽÛdrçà¶vIä[ÍçìffÉÌÏú?È\ÒZ–Î,Ò©ø¸dÒÚ»tN£Ç&co=[XˆV*Q9šuÊg¤:‡ÚŸÐ|qÁÈáù ø#ùŠ1"ï¾%•ùå?¬°þroÓ®bf ›“DZÒgi`ôzºb KèŒ6̶ã\­5ÁàH6qÍÙfWf >·ÌÚloQAžë9½E‹‘'œžâ‹×éâ},Á^Â~/éä¹ø½Ub›åEÒåÚ±Z<Ùãìxmé³…½WKôúã×iY£Ó@?Òã5ʼn*G¾”¬ñ)6Öâ°ªÿáêȧþ*â¶M”tÿ@\ÿKG9ùÿ@Üöo¿ù騙‹±øÏ;&¾ulÔöE¬F¬ýâõ±‹±øñ¶XŒÅXŒÅXŒÅXü¯D7c1c1c1c1c1cñ×Õ?OVþÍól<5Ì¥ü‹ø| O‰¼Ï·ÈsÙ\y.ôr<·D^VóæI}ý«þLý7×Is§ZŠ–Xœ¬aâ_ÿÏ”ã£ZÓ+–¹ä¡Q­ëå׳òÔ¨6°þH!md>y_T›¤=ùÍl¶ü~T[XÍð¨¶J—iDž8¶Dw¸çÿP¨oŽjÎôúË£ZbzߣZfññÿ ÐôÊ£e£Õº^~=a´Eµ9õË£ÚÈìÆ‰QmâÓ{ò›Y®qNT[˜ÓxvT[ùd£Èdžš>Pþo ctœIÓ8“¦q&MãLZÓ+3i]/?3igÒ4ΤiœIÓ8“¦q&MãLšÆù&æc…l „§MQÿ~+[ÎÚ€E¬¾2õ› ôý…:xC-cùHÖ úØLøšX3ÒÚT«܈Ü+ðl@Î2”[‚< á[Œ‹Õ|uÀRÔÕ æ]« ¾ej•_Œø€:ä[ŒVÃZ ÕŽwùÔïK,„^‚¼>µÍ(Ý ~£I­ey´ÖväX}§’Ç>.WßÙ¨~ïBé˵¯‹à©S¿Ъö§rÚKå½Ôz¤ Pk^ªz–¨5ÖaŒÈ/Þ²õ,QG¬%ÚÊeð,UßJu*ýlïÕå-j_Ä÷Eh´©íÊ›–c|ê7%šÔQX¬~7BùÎI»j)=nï™3z‹Omû²h¿–«c»PÍùC‹{÷HµUj9êõɰóÕõÐ{6ûªµ-UkX­ŽCGtæ{·2cÔÿFµýJÿi^ZÕÕ 0½Q™kêhéé µ±)š§ ÖšhííèÍЊžYªS×H¼Ké—XÍõhIúþúèûóÕۤΕ’ò÷{`øßõzvtå,Ž®±!¨evÐO¯ôvõ êJTÞrrψ±ù±½×]×-=¹••K3¾ ùÕµ39êYŽ:¦ý§A­oœZv¹Z;b úQ€¸Rùêž:ö}ùÑÚ  W«+°Imu jX ¯2b‹Ô++õØZ…‘ú-©Vu½ˆújÔ>Ð*Y­În›ÚÂvu·©ûŽJûÔ>({àÿw.ðM•÷ÿN’&i’Zn- ¤ÜäfA@a 7…‚¥Vqˆ›¦´½‘¦Ð‚@¥ˆ¨Lñ2E¦ÈÔ¡#›››Ë*0¹ˆØÖŽ2 …`Í…2’fÈ<¿÷9IK)øÿ±ÿëÿzýû¼Þ'çò<Ïy¾ŸÏsKÉÖtjïÈÖ<œ­•mVk’˜AÜ"e]­ž„ÇO–¦É•1±8ò·‹æýÈ{Ã×jÞL,Ò4ÌjécYÚ󭇔´êWZ¤y‘ž®+[;ª#¥mÜêóðˆìG)Õ)µ7ÌnyÓõZ•wMÍ7®Ñ•Ú›gE{d^skíμj~¹6öæÙ¤m»F·R@$Kx–m^'\-3v–6gåisWÆFÖ9ã*MÃ#>?r G>/Òz^‘V2Kÿj4Ù-õ¨9s´QórèÿÕ¸¸2&k­QÇ@xæOÖ¼*Å¿¶rÛPû}ÎLW~aþ·ýî|WA¾+ÃíÌÏK¶OÈɱ§;çÎsÚÓ³ ³]‹²³’ïÎÈqÎv9íÎB{†=7?+Û•g/ÌÈ+´óÜ9Ç>'#×™Sb_ìtϳÍvçdÛ]ùEyYμ¹…ö|²º³s)™—eÏÌwåe» “íSÜö9Ùî"Wv¡Ý•‘cwºyGfá {an-ÈÌ(à\-’[”ãvPe^Qn¶‹œ…Ùn­‚B{+Ÿv«Í¦öœœüÅöy4ÜîÌ-ÈÈtÛyv·-£ˆ=ǙǻòçØg;çj‡_äÎ.vSع ;Ù ó–B{nF^‰=³ˆàÃívÏãýÙ‹í® bq9 ›‚¹ö¢õ5Ô8—;…Î%dwçÐ"5¤ ûâ Wnø]ªÌ™ó2\4,Û•œž=·('ÃÕâÀ¨æW?„8„c¿=yÄЫDw»2²²s3\ ÔÔÖ\qo.Z¨·3ó <Ï™]˜<­(³_Fa{V¶ý^W~¾{žÛ]0jðàÅ‹'ç6—K&û`wIAþ\WFÁ¼’Á™î9ùyîÂHVõ|N¯_ æ{8¿IJìE…Ù¼œ©í8íÊuºÝÙYöÙ%Z³&͘6§.í²ŠÂN,žç̜ת,ŸÎ¼Ìœ¢,Š¢X–³° ‡¨Z¸œdÈ$Wvž;ÙÞüîü<ŒìçìoÏέºRU^sæë¶HË®vEl)t»œ™áþÒòvµ›4×5Zk@?'o¡ËªcÂ¥vì¬üÅy9ù­_J›3Â-ÅxÂEcõ¤È]PäFöEÎÌl5ϼ윂6݈šƒ³²çdÐù“3 Š[¾7 %A¬×û‘ÈÁÎ[t&Eí"ÿ>™‘ýø.ZþE²ù™¨Ùf“È#ýìFóÇÄhù×Ýhþví´ü»o4ûöZþÐæ‹SóëÝhþÈ?Qû÷ÙÌ|÷Qó«ß>Mê¿­&uå[ÕZÑUŸ"úèCùF;’œãy>¹M™i­Êt¢L/Ê$SæNÊÜEΞ§·)óF«2](Ó—2C)32“Éy?Ïgµ)jU&‘2ý)s;e&Q&•œ?å¹ãê2Ú_~i.Ó2ƒ(óʤPærª^g·)ó—Ven¢Ì`ÊŒ¡ÌtÊÌ$çlžç¨ýËl–Ì–]»Þáç•WÌQ’Ùd6¯á§Ø¨—Œ†¥êY’Ìí¬T”J&®Öëu¬?¾T¯—ÌQ›7o6GKfëg¥Ÿ•n!m ­!EGIÑÔ×\¡A2F}T®Ö-IÑ‘ #5F«5FGjŒVkŒ¶HѶr~ÞÿÖøõZZK²%‹Ù`0¸×®Zµj­ÛdL‘JK-’ÎÕRk©ÎÄõúõd1Œ§bƒA²×ñc±J–˜rG¹ƒ·l~Áþ‚ýÒ*’Õ(©;麕[%µ¹r­öhn¨AR¿µ¹~«V¿5F²¶+O(OØÜos¿u“×MVÃÒü¤y¥Ùf’lÑ:~Fݳ’Ÿ{F™ ’ÙyE©MÒÙŒ¥m^b‹¼ÄÖü›I}‰-V²µ?ÑýD÷ówTS³wÚ»×~¾v—m—-Æ,ÅXôüŒž»Ký™;Z³¢úDyø'F§‹1–·üˆòr…[Ê”G饘(‡ÃQ^e”bÌÔ‰±E7Sè3K\9¢ã\Wö1*'ÃÇè±éô»ì"A¨cDF#:F®$úb¬è¤Ýß¡÷0¿u&駤¥M½Ó§ßgCLŸjc#yÔ¹°½è¢]éyC\Kíañ"1r%l̘ŒÌ‚Âñ¶v|O;~¤?ÖŽŸjÇ Øøˆ½Úñv¬ÐŽGµã íxF;ÊêR-.¨Gɨ»jÇdíx—v|H;ÎÏ]»@Z®WkÇç´ãFíø†vܪ··ÌhÿÛQºÁ£%ÕóЈÂf¡þ¦æÿß=>Äüן±âfí;³ú-o¥X/¶ˆb§8"êĉA‹Ô‰Vêï«ô”ë¨ý«¢êo+G…?׬þ2Ôª ý­aËU×’íòÕ×±}¯¾Ž‹¿úºÃ«W_÷ùáêë~mžèzõõð!"Z×úúb«çF!Ý{çÕ×ÓžáÓBŸî'ÒÔßñQf%R Ñ¥‰º·u߈Íú_ê)* nÃ[¢2êkãIoyÀ’!}byÊ*I{mím“twÛ±½¡+‰ÉŠ™¯ûKÌŠ˜µºÝ±ºX³îHlSl“îïB* ªÚ«b>¾n:L:sºUòGÒá뤋±=[R?Ò(ÒDÒ|-mj›bÇn‰ý]û‘´¹UzOMqâºÉ—Ö’ž‰ÛÐ’‚áßý:)™4¼ã«­ÒÛá¤=i“:î踷%êt‚tFM ×KñÉã;÷ëòL«´AK;¯›w¹Ôœ:&tmI#)åº)MKE>¯N¥‘£šo–*ZR¸ôñ„ó‰³ßHܦ¦¶µ'n¿^ מøÇĺHºx%©oI¼¤½«Tå¦i½Fµ¤i½Ò[RV$Í'•öšß{(i|Ÿä>{Íç˜Üggß½·Tiéb¿Y¤‚þ}Iƒú×õA]ÿìø†šú× üt  aPì ŽƒþDªHKJKž5øõHòÞV:¬ï°úáëïN;"aĬÅ#wDÒ§#÷Œ¬5€4rÔêÑÇÆµ´nÌN-]{ÇØ"éã1—¹þ`ìyíêü8Ý8ÝØÆ ÿÜøO'$OšI:~ï¼1ë¹ù<Î5e¬šoÊ´”ž)CRƦl›ÚWKiSçk©xêꩯs,žúéÄ´%ÓJ§¿¯€´1ÕA®´ÔC©‡¦~Áñ˜zFªK•S/M/ÕÒÖé´t|º ǧÓ Óƒ<—Óf¥K«»ßMZŸn'ßÖéÁð“ô%Óƒé§Óf¤=´gæÌŸÇÿ¼ûÏûÎ5Ì5·zî¥æÏyƒH;òÚçõ,(.XYP^PW ]8qᜅ —,\³pãÂ~¼p÷Â#®×z×6×…BQ_8¹pvá§…UîáîÙî׋*ZSä-º¸È¸hТ{}°èÌ≋/w/¾§ØQì*~½x{quIÏ’Ÿ•|\R]ri‰mIç%#—ܵ$kÉÖ%ÕK,¸ôÑ¥›–¾·ôØÒàãã_òø§ËŒËÆ/s-ûhÙže——w]>oùÖåòŠQ+ŠWl/Mû‘¹êã¶óÑÕ³Mé¢+IGJ7_IáäGÆ^JÛwõ8 ÷ôëÎ:Í3O«tõÜQºçJRg‡ÒŠ+)™oãÒ˜_7Åni¿1æpËœIÞ¸`¯,µlÌDZ›®Ìa•˜'jóo8WÏØ-Íê©wÕ¹XË{T}®å(H½Çœf&ßB‰£Zm‡iÝF>jéÊêào³*Llµ\Y ¶¨í¾föïšÙß™óŸÑæ{m–×ê¡tìDÎ75Ï„ø±-âsSxþ Ïo™™UײZfÇfG™ãRJëÔW<î•^ZWZGmj®‹åSý ÑN?SØô.¥Qï#„Ž'‡¹òig²~†rZH›„Žã>ýLå0ßÐßW.‹ÝÊeÉ!:H"]š-¥L‘$e‰8iˆ#çprŽÓç(õœòÚÈG^y-Z}>r5ˆhéQÑç½x>ƒç7ñ¼uõ¡®$J¿F{Ž +g;hoœþqÚ±Lùí¥?¥¼¬?-†è}b¨þ[1Pÿò•ÞÏ·]µöÃÔ^' œéô3øžÖl ¦]¢X´)¢=ŒýÅhÈR¾Ù0 •o…[¹(Š`,†b(6±D9"–Âã° –CåWÁ“°ž‚5ð4<ÏÂZøDÜ%þ!ÎEô—H&FK÷C:<‚SL—öˆDìÔ?¤ýöج rÄý q³þ a×—‰› o*G ›á-8"ú¾† ¨„*øªáïpjàüCôj¯|uB9õOa‹’9? ç•#Æ(‘bìÏç0ÑßxŸ9ÊWÆ\ȃ|(R¾5.´1¢mŒKmŒŠÑÆàÐ$F›ˆ¦ð˜èorÀlX.(RxÐÈ´^€7á-q—é}>ÏBœ‡F¸M€†æLÈ‚l(=¢…ÝQôÐúîúµE;û×›D'z­‡^ë¡·õ¥·M ·­¤·=@o›Mo›BoOî·é/Éú‡”çô?U–Ѓn§ß¼D ½WÙª?E?ó ½þ }ð;ñˆÖÏN“ëÛÌæQñ¨ܪþÉÔ¿ˆú'QÿrÏ¢î ÔýJ £îÔýõ}J}‰Xj9G-稥=µÜB-yÔ2˜ZSË@j¹…V§¦~Ô”E-C©a›é>Î> ÔñWêø+uô“SþD=ƒ©ç1êN=PÏ8É©|I]ƒ¥MÊ)ùgê3Pß"Z6‡:;в2j{V_§\¤u_èë­ß‰[õþȈ£ÖÔê¤ÖÔ:‰Z{Sc?jûš’_3òî#Ê™aþÃL¢Î,¯ˆ2E«àIX OÁxžga-|¡„Ä~8á| ‡á+8_CTB5üCQÄq¨…pêà”²_œ\PjÄ¿ç!Ah‚³Û¿y~ ¾‡Ëðø¶(Š, ´Yñ”~=ìgÊ9ý£|:”s†#Šlø* ªà¨†¿ÃQ¨cð¨WB†ïÀÿÎBœƒóÐà_ph‹áP”ýQñÊ~Óx%dš)0R•oMò9fñüxSd“fÞ-äÓnÎC1”pý8Ÿ¥|>«9 ðÁô<Ÿëø|^ä|¼áeê“û[8›ó÷9ÿó?™ðÈ„G&<2Õ(Šéà‘ Lxd:A™“PxdúN©1ùáŸÄ"ÃYå°©ÎñìÎUWÝÑw%5|#f²N&±N&±N&±N&±N&±N&±N&±N&±N&±N&ñ¦;X+{³VöfÌV0f+³ŒÙ“ŒÙc6À˜ 0fŒÙëi ÏûX“Xÿ’Xÿ’Xÿ’Ôþ®\@ë ìÏžSžÄÉÌç'™Ï‹pb2N¼ÃÓµôöIú#ì¤*”ô•b¶æ^ ¹’«šó9e9W³){„²_swŽç‡x^ÅóÑÔô4O?¢¦»¨é j¢åÿ»¶O<®ƒÂ"µ=¤Y¹°\à†gXéã¤rÃ[VR{1õìÓöF›EýŸÅíúÏð¿NôbÕ~€]b<+wWv‰½ôõÌ ßÑ?÷þ)ng=w)ŸQ¢3{ÊžêšNù1…l}þ1Eÿ¨¶ûš"biY7ZÖ–u£eÝhY7ZÖ–u£eÝhY7ZÖ’)™GÉŽ”ÌÓJÆP2†’1”Œ¡d %c(CÉJÆP2†’})y%ûRò6­¤’6JÚ(i£¤’6JÚ(i£¤’¶HÉᑒÉä1€³šÆmЄZ5êG÷C:< {7 {7 {7 {7K´úç´î@™´ÈNc·æÑIQ!õSê¤þ0 ¸’a0 Û`( ƒáp;Ü#`$üFÁh¸ÆÀXãaÜwÃD˜÷À½0¦@ L…ip¤Âtx^ƒ×á x6Ã[°~oÃ;°Þ…mðkxÞ‡à7°>„à·°<ð;ø=»µr>?SŽJ;a솿Áî®TJ{a|ûá€rF:‡àKv³ø¶ò¨rØð7v{àsØ ûà Øà Ri8_*•QqJ]TGè¡ $@¢Rg|^40¾¡œ1nUÎß…mðkx~Çý]|²Û4þóÃJ¥ñkòWsTêL7ÁÍÐ줜3õ„^Ðú@_¥Òt ôSŽšú}ÁD_0á»i(×Ãx6Z9cº“ÏtåœY§Ô™õ`€(0‚ Ì °‚ b ÚA{ ^s€ßÀv`®•˜k¥ßÂðÀï œ¹ü3Ø »`7ü >‡½°¾€ýÐv™¡d0KÏdhÇÌ'ë@;fÿ;™µ¿20ã˜ñ Ìxf<3žÏÀŒg`Æ30ã˜ñ Ìxf<Ãv¾£|Áoaxàwð{ø£rÖð ü þ ŸÂ_À …rø vÂ.Ø …Íp¾¶¨8a‰ê(¬Q 3tHVãZå¬ñŠl|žóœoR¾5¾Âš„Úl¶™gÄb|‡g´ÙH›´ÙÈ,müP9müvðÌê,÷1ùÿÀ½Oxþ'ø3ןí4ÒNmöûœë/x¶ŸÏÜ;‡àK8,lƯy7ßíŒ|·3Vqï¥I›)Ò6¾Ï¿¥,ßYŒ2çì®ì®ç€ï,F¾³ùÎbü\„‰­I9mŠUΚÚA{ˆƒ¥É”]¡t‡›„Åt3ô;ô6Ó-ÐúÃmÜÊç0`•5±º†g]a3ë„Õ¬DL`†h°€l±ÐÚCÄCè(,æNк@$BWèÝvši§™vši§9 zB/è }àå¬y ßÑÁ­Ì5;ómœ7ÏÄÃ9¿FÀHø qŒ‚iœß|Ï5O§\š²Û|?¤ÃÃJ“ù1Ú9‡|mgi¾ïšù¾k^ ËhÃrX¥äšw3þµY{#Ÿ›¨÷x^ƒw©o4ÏâïsÍÊ~¯4E åt´Ä^ɬÈÑèmá3Žû„M›ÙY¡¢»p/ù8º»ú{Iu¤GöUË¡•ÚmgËý<î—h¿GQ÷[ "J7Yù™þ>e»S‹ú»-žƒtC¿n8Œ€q0YùJ7EÙ¯› ÷±+Ÿ¡gwqŒÝÅ1ËLe¿e<¥ø-kàixž…µð ໜåyX/Àzx6ÀK°^†Mð ¼ ¯ÁëðKxÞ„Íðl_ÁÛŠß6Pñ =- êfòØÅwèÑ´?@ûºQŠötwóù´rR÷ ß]·2ÝJÎý–ŸåAx~™ÊIË|È<(7<¥ˆ-@lb [€ØÄ ¶±ˆ-@lb [€ØÄ ¶±ˆ-@lb [€ØÄ ¶±ˆ-@lb [€ØÖå¤u*Lƒû ¦Cܯœ$öŽP¾Á¡:ÍGe¯ö›Ãľ¸·éQ¶ë² žVÊÑ \ýþMìÛˆ}±o#ömÄ^NìåÄ^NìåÄ^Nìå–be»¥–Âð¤²v•Ó®rÚUN»ÊiW9í*§]å´«\LÀ'8iÛ)pÒ¾&zÐEzÐEÚYKKªiIµ~Æõ3°ºÄàÌ`V—ÜùŽ¿›Þu‘Þu‘ÖUÓºjZWMëªi]5­«Æ'Î8qƉ3NœqâŒgœ8ãÄ'Î8qƉ3NœqâŒgœ8ãÄ'Î8qƉ3NœqâŒgœ8ãÄ'Î8qƉ3Nœq〉Q ªQ ªQ ªQ gœânTp ‚/ö¡‚?öé&‹›ˆ>•èS#¿o}6ò}z*tF…a¨Ð†E~Kü0^íë}xµ¯ö¡F*j¤¢F*j¤¢F*j¤¢†5¨á@ j8PÃÔp †5¨á@ j8PÃÔp †5¨á@ j8PÃÔp †5¨á@ j8P鍑Щ¨‘Š©¨‘Š©¨‘Ša¢/\$b¿@Ä‹ˆ8ž—áb‘ˆF»Ñg7ÚT¡M:Ä£AÔ=O¾uÊ Ý °^„MÊ'Ä÷‰U§°êÁQ`˜!,`Ä@,´ƒöñÐ:B'è ] ¡+tSа а а аÁ:J9l w ã`,€È…<ȇX.(7Á"X ÅPK”O„žs¿FÅ“ºJ#}i•r~Ò$Òp!„ !¸„j;ÉŠdÅ ’#ˆÊ!T±ÂYa‚¬0AV˜ +L&ˆú!Ô¡~õC¨Býê‡P?„ú!Ô¡~õC¨Býê‡P?„ú!Ô¡~õC¨Býê‡P?„ú!Ô¿„ú—Pÿê_BýK¨ õ/¡þ%V¹ «\U.È*d• ²ÊY催rAÔ ¡nuC¨BÝê†P7„º!Ô ¡nuC¨BÝê†P7„º!Ô ¡nuC¨BÝê†P7Ę[DïVÇâ24]Nï^%bQûjסö9Q€Æ^4öÒÓëɹ­O¡õ)Ý®—)ßQê=_¦çËô|™ž/ãÃðÁ‹^|hÔ=§|Îø†ð #àFÀ7Œ¥Ì {ð¨*ñÈ‹G^<ò⑼xäÅ#/yñÈ‹G^<ò⑼xäÅ#/yñÈ‹G^<ò⑼xäÅ#/yñÈ‹G^<ò⑼xäÅ#/£Sxt NáÑ)<:…G§ðè#Df„ÈŒ™"3BdFˆÌ‘!2#Df„ÈŒ™"3BdFˆÌ‘!2{ñØ‹Ç^<öâ±½xìÅc/Wâq%Wâq%Wâq%Wâq%Wâq%Wâq%Wâq%Wâq%Wâq%Wâq%Wâq%W 'úpЇƒÿÂï¸xçŽâÜ?q®çp®çð߆ÿ;pOÆ=Y÷,÷~ÓÏ+¿ÁÁz¬ÇÁz¬ÇÁ³8ØH?ù .Öâb-.ʸ(㢌‹2.ʸ(ã¢}¸èÃE.úpч‹>\ôá¢}¸èÃE.úpч‹>\ôá¢}¸èÃE.úpч‹>\ôᢗp©—p©—p©—p©—p©—p©—p©—p©—d\’qIÆ%—d\’qIÆ%—jq©—jq©—jq©—jq©—jq©—jq©—jq©—jq©—jq©—jq©—jq©—jÅ\ âRPa.âB#.4â@ÔïM¨Ûˆº¨Ûˆº¨ÛˆºAÔ ¢nuƒ¨DÝ êQ7ˆºAÔ ¢nuƒ¨DÝ êQ7ˆºAÔ ¢nuƒ¨DÝ êQ7ˆºAÔiDFÔiDFÔiDFÔiDF1€™á23ÃeF¿ÌznÑ=Kk‰Bk=çaëý+¬ÛÝØÕu‡›àfèvH‚žEžl˜sa°ƒDë&´nBë&´nBë&´nBë&´nBë&´nBë&´nBë&´nBë&´nBë&1­ëѺžË´Xfø~FŸQà×ôoè~MÏg¯S³ñã½½?êñ£?êñ£?êñ£?êñ£?êñ£?êñ£?êñ£?êñ£?êñ£?êñ£?êñ£?êñ£e”QPFAe”QPFA™Ñàg4ø ~FƒŸÑàg4ø ~FƒŸÑàg4ø ~FƒŸÑàg4ø ~FƒÿFƒ‡ü8äÇ!?ùqÈC~òã‡ü8äÇ!?ùqÈC~òã‡ü8äÇ!?ùqÈC~m?¯ý)äx%ã•Ìl#3ÛøÐ^F{Uce4–ÑXFce4–ÑXFce4–ÑXFce4–ÑXFce4–ÑXFce4–ÑXFc5F™åÿ!îÎã«*ï}¯ì•ìvvÄq¨ÕZ‡¶zªujoµ-§­ÇcO[;ÚÚZm{ªõ@¥0 ­C­ΠˆC¥µ5EEÀ ƲÍN ‘Á,BH òÜ÷Ρ½öÜózÝ¿î½|^k¯µ×^Ïóüžßðýå•ìXc§5vZc§5vZc§5vZc§5vZc§5vZc§5vZc§5vV•|a ®ÅuàoÖØiÑrqß?Æ O»m ÒwÈ©;þO1B»_K£êLE[N´¥EÛ;"íP‘–.ø{F£×`‚¾üFcݺyv·»ûÅf·êÜëS§°ðî}ŸjêæÝݼ»›wwóînÞÝýÿ(Ûtó¾nÞ×Íûºy_7ïëæ}ݼ¯ûÿª**u+ý,µôï}Koï¿Öo—öD²mÛÖÙ¿.û×Ŷ¥Î¦h'*Ø·}Ûòßç÷éî§”¦¹ö`hc×6vmc×6vmc×6vmc×:v­c×:v­c×:v­c×:v­c×:v­c×:v­c×:v­c×:v­c×:v­c×:v­c×:v­c×:v­c×:>ÕŧºøTŸêâS]|ª‹Ouñ©.voc÷6voc÷6voc÷6voc÷6voc÷6voc÷6voc÷6voc÷6voc÷6voc÷6voc÷6voc÷¶ªÒ:ÇàZ\‡ë1ãBÛ€wí„þèÔühhêUŠó5~ùz˜”Zf§¶Ó}aJjWhˆeÎøãº×SÃÜøÌ°éï¿­üèÀø»QnÿïnÎ5‡åvl¦çÎÁk"àõO-áéo`©1—9¾šSËuºy£­t\…ÍÑ T»Hí£qwPB;±;l‹£ÐgP‰#tÿ§† ñia{|:ÎÀYaG|NXŸûQèÌ]ês?ƒ‘û…ãU¡97 rBn¼cãÐй_AÅÌÝQ™›âý{]“ûrSOÃÞ13ìÊ=éùs1/lÏýϺVë|£5å\kÄ ¬v^@³×-hu_WhÍmÇÎÐZ=$$Õ‡b(t‡ÕºÃêã]ê«iújóª¾%ôVß¶WßñDH¢ÛoÕ¢}êgÕÕ¬ÚŪ]¬º—U7²jUW³êvV]ͪ«Yskö°fKö°dKö°â.VìcÅ>VìcÁ.,²àj\Í‚E\Í‚,°`‘ ÿÅ‚EìbÁ.ìbÁ Y°È‚],ØÅ‚«Y¯‹õºX¯õúX®‹ÅúX¬ÅúXª¥úXª‹¥zXª‡¥zXª‡¥zXª‡¥zXª‡¥zXjõ~KYª‹¥úXª¥úXª'úpê©0>5?Ìc©—øàšÅ*[RëÂülLª=<Ê»¿“ꥴw…Ïñ³?ÇqX§Ãq.üœ·¯Œ‡„cãc¢ŸÆ'„Ñ<ÿÃñ)á ¬öï?ÏM?&ÄŸïÿí¬¿Æß Å…ñð°¸ôûKVõ¢œôª*ñ:–†µF|×~¬3â&#´{j·'®÷Ä­bé±ôYáSvìÕÐèS¥xùË@ŒlŽŽöé>ù¦On4·MæVå ùx83ä}òÕð¦O½ëSÏùÄ!>ñŽñþ:¿ºê>Fœ~Üù©aOµšå’èƒn÷Ø=æýÏüîòifsšØÛÀº½¬Û+ö6°p/ bo+Ô°t`‰),1…%¦ˆ¿ ¬½›µw³önÖâoƒøÛÀê»Y}7kÕ°|/‹Õäž‘‰æ`a¸&·Äñ/¨Çr¬Ak½÷WÇw•–£¶ÉQÛä¨mÖÞkí½ÖÞkÝÝÖÝmÝÝÖÚm­ÝòË6ùe›Ü²MnÙ&·lãßÛä–mæÚkžÝrÅ6¹b›\±­,kÄÉ<à»ÿŠÝ¿Çîß“ZlG_«aij‰ªø–†'xÁžÔ ×ó|«ƤքE©"šÑ‚µXnIýÕq=6xæFÇMhÃæh2o©Mux½<¯Ë1ÁÖpMªÛ¼îÁö0\nj¹ 2wAGŽZžÚã½½x/,Nís ªpR(å¯rÞVáuZžÊ†Iq•×¹0r Ÿ v<á` çðÖóyëù¼õ|µõæøÈp]üï…c¢ïÅÇ:~ÇÉyÇã„ðƒøDçÁG 'yýOøxø¢ùc™å»6Ù®M¶k“yûWåË;âOºçSøá—ñ§ÏÆ9abüÇÏâsáQq~üÏ^>\-2¾³ÿ7fŸ!×Åß/Åðð¶üú‡ÜðЫÂQ²G„Ü#Böð’ɼd2/™œ›ìý_â׸¿ÁíÑÐܸSÜ¿k`ªóixÐs¦;ÄñÑ02÷8žÀÌpsîwá:Õlbî)çOãx&œ'ªÎSá&òÀɘヹwÁs›Ñ^ÉñÃ?Ìu‚æ¶¢Ûd€ìðº?,ÎíÂn¯ßŸËñ9YaR5¿«æwÕqX\]îXÆÈcd‰1Õ•ÎÉYðÁê\x¥ºx=º~Æ!® •¾ Òªó¼ÃÝsŽÄp>èÞc¼ÿ!kü»&ÃÊF“ª'†>¹ú–hhµ½®¶×Õöºú6ÜŽ;¼wo¸NäO–©Î“©Î“©Î“&ËVçUO÷œæý¨g>áù3ÿ³ðûpMt¬,qµ,ñÇÊüÚ@=C&hñSDö%"{¾¨+jßTsûDìË"vƒ¨lu¢p±(luÿ"².IsEÌ"æ Ó&Jî%M¢à%Þÿ;Þÿ5Þÿ ï/ý¥Â'yüÛÑ¿ËWOšÉT¬©¹ªÔ|9á×à5uîuï- «dÏU*×+rV—Ê5_ ì2ÛvÕk¾ê5_þšiæoÈSíf¾\.ZbÖùf½|³ÞÌÛäë¼™o•³órv^>YböÏÈÏÈϘå³üfIó¨^+r?–i/óU°ù*Ø l¾Øì›]*Ø ñù¤øìŸOŠÏ'Åç“*ØŠÜ>wnÃía•¬¾JV_%6»T³ªÙ ~• ¿Jl>©šÍ›OŠ¥gøý3üü>Ý®žäÕ“<¿mWSò|µŸ.á—3ùåL~9“/¶óµõ|m=_[Ï·ÚùV;¿ZϯÖó«%jQžO-Qáæó©'U¸*Ç*þ1“´óõäb~ð^¥Ð–†Xz£êÐȾ ›·Èæ-üá-VmeÕVmàÏËÜëXv™LݲËXvߨÂ7Þ•›dã&Ù¸‰üÙ)ËeÙ"_YÃO6ɬõ2k½ÌZÏgVʦkdÑ‚ÌÙ$#6ʈ¬¾‘Õ7²öF°Ql”eÀF°‘e7Êz²^£L×(£d±¢,V”Å ²X½,V/ƒd°52ØÙjlU”вSQv*ÊNõ²S½ìT/;­‘•вRqVª—вQA6j²;Ëd–™¥Å.-³CËd—u²Ë:dlÑ"[´È -2C‹ÌÐb§ìTƒjÖÉ-vªÁN5ˆü;µLä7ŠøFß(âE|£ˆoñõ¢½^´E{Q´E{½h/Šö»Ø Ê[Dy‹(oå-zâÍÔqIWŸöFg‰²RŸõ35MDMQ¯ÙçI¢f—}e_kík­hé°¯ìë{:ÇžÎý¢ ß^L²“D@¿ý˜Äãûyù4^>—O³“xy?/ïçåÓxù4Þ¼‹½æ°ÓÞ¼‹­æ°Õ¶ÚÀ«w±×ž¼‹}jÙ§–}jÙgoÞÅ›w±Q-Õ²ÏÞÛÏ{§ñÜ]Ö\k¯‡;xìN+Xìl»¹÷…§øæºèH+Ûîl“•µ[Y»•u[U½<ÐaeõVVovÛÍ®ÞìêÍn»ÙÕ›Õv3ÚnFífÔnFíf³Ýl¶›M»Ù´›M½Y”zÙöè#õi‘6i“‘6³a©Gm0Z¯ÑŒÖ`´>£5­Áh}Fk`‹¶è1j[ô¹ÏÈ›Œ¼ÉțآÇè}Fï3ú&£o2zƒÑKýá&=Â:ùr{xÛªß6r¯[ä²2îj·Ô#l2¦¿wãÏüÄoÛö±íj¶íû‡}µóÂÀO:u¶]môMl»úýÝzTfå}ÑñqµWC£ÔRB-%ÔRbNÏ™Ós¬ÕG1µSL¥Ÿ®u±ÓÊ(±{íÀÓvài}äÁúÈÒoG–TO;ÕÓn^ÏQ7íÔM;uÓNÝ´S3íÔL»ù„pWÅáÁŠƒÃ´ *»‚Ê® ²+Ãá8­áîŠN÷t¡;Üþ>‰+Ãƒé‘ø9~1á±ôµ`÷ô”Ðn‹Ó:žÌ‰aqæ#øhx>ó1œŽ3œßÓ2ãÒpWf*f¢Õù;X{–ie:°Õ{½Îw„»*S¡¡2F9*¥XI)VBUÈ¡`0ÄA8‡àÓaqåÙø¡×?uœäø{ÇÙáùʾÐ0ȳB_–G‡@ö‹ÅP†à£øNÂÉø2¾‚¯â| _Ç7ðM| ßÁ÷pYx˜ç>Ìsæ¹¢ÑaF4×â:\qa6ožÍ›góæÙ¼yvùoÂòòÛp;îÀ˜‚»p7îÁ½¸÷ã<êsáñ0Û®?\±:,¯hÁZü­®¿ë؆Nïw¡Ûµ÷Âòt B‡ãœ€Áivà³Óg:~ÒñÇÅ%¸?Äpex˜ç<Ìsæ9óœ ìÀNì s剹òÄ\yb®<1·|sh(oG¶ º“ò[Ñm莥¼¥ÏíCsÅÛ³¹ #ö3b=#Ö3âÛë:{ˆ»¹e§DåÑAQÒÈ ƒPúöî*äJ_1‰pv44:—…ñ||<ÏÇÇðñ||ÁÇGðñÑXOFòó‘ü|$?ÉÏGF¿ŠG7â&ÜŒ[ðkÜŠßà6ÜŽÑÑÑ‹ØÆÙÑqvtœ½ÏŽÎ¶£³íèl;:ÛŽÎŽJß ½+ÔØÕ»ZcWkìjMÙCaeÙt<ŒGð(Ããø-žÀLü³ð{ÌÆ“x Oãxs0óðG<‹Zü)¬L}"œ:-š:ÓqÎãS_ פ¾Œo8&§F„+S?ÕáJšíËñÅa4Ýö帇ޣC]<&4Æ QEÜ ‰›¨Þ•ºòUQ6ÞfÇi‘MÑGãwÛJß ä¸%:¸|ttPù\‹ëp=ÆbÆãÔ`&âÑ0R¾)_Œ,_ .oB+± «QÀÑŒ¬{òöÞ^#׌¯8(¬äõã䘑[¢¬ü2^~/¿Œ¬Ø”ŽÁ·Ò㇅‘é“OÃÑP9edúS^_ÆËãåñòÇxùcŒü1Fþ!ŒHó¥ô8ð¥ôƒaeú¡¿ _™ù ŽÆ1øNÃa¶H'ÒÆ‰´šÌ¨hpæjLÂdÜ©®?êøxt´hªÉ<íu«ûßÁzð9‘sŸÈ¹OäÌ9³3]Ñ L‚­îïõ>ÿA5™ÑàÊ!ae塊Ãp8ŽÀ‘øŽ‚¹Všk¥¹Vškå±ø0ŽÃñ8?ñ¬Ëp9jœOÀİrPYX™½(\“ý>j•ى7Yq“7Yq“7Yq“½wb î‚õfïÁ½¸÷ãLÅ4<ˆ‡0cûdÃãø-žÀÌhpÕxÜ€LÀD°mÛVýâ»J|W‰ï*ñ]ežUæYežUæYežUæYežUæYežUæYeŽUæXeŽUæXeŽUæXeŽUæ˜;9|À dQUúO+ñÛ"eƒlTzUúî‘ÃR×Éf¹ÿ.F•(ýÄ,ªøûœl–£Š@‘(RE  H)€"P¤Š@‘(Ê|‡È|‡P”@%ÐA tP”@%ÐA tP”@%Ð!K^!K^!K^ýGH¢áŸáJŒÄÏñ \…Q¸ׄá2êU2êU2êU2êU2êU²é¹²é¹²é¹²é¹²é¹²iV6ÍʦYÙ4+›feÓ¬lš•M³²iV6ͪ»-ên‹ºÛ¢î¶¨»-ên‹ºÛ•~Þ1Oâ),ˆŽyPõ7Qõ7Qõ7Qõ7Qõ7Qõ7QÙz”l=J¶µée7£Ø‚Nt!ÁVtczÂT™}–Ì>KfŸ%³Ï’ÙgÉêceõ±²úXY}¬¬>–¦/Ðôš¾@ÓhúM_ é 4}¦/Ðôš¾@ÓhúM_ é 4}¦/Ðôš¾@ÓhúM_ é 4}¦/Ðôš¾@ÓhúM_ é 4}¦/Ðôš¾@ÓhúM_ é 4}¡ìëÑвoà›ø¾‡B^%Ê«Dy•(¯åU¢¼J”W‰ò*Q^%Ê«Dy•(¯åU¢¼J”W‰ò*Q^%Ê«Dy•(¯åU¢¼J”W‰ò*Q^%Êë%jõ‹ô‹ô‹ô‹ô‹ôµz‰Z½D­^¢V/Q[ö—([Våx;ʪb9U,§ŠåRg—þFÕñ‹Žç‡‰ªÙªÙÕìâЙº ÃU·÷UµÔÈЩ²}Ve¡²}Ve¡Ÿ_ž‰†×â—¢âWU¿·õóúô¦è0U®C•‹ãÕúûÿ¬t*Ýñß1Ùáú•gt”Sårª\N•Ë©r9U.§ÊåT¹œ*—Sårª\N•ËQÒ”t%ÝAIwPÒ”t%ÝAIwPÒ”t%ÝAIwPÒåSCR> â!LÇØGðh8Wå¿fÅ/…¯ÆëÛ´áX†‹ß wÇ›ÃÒ¸=ú@Ü¡ßÚvDÇDwî{=z:¬ˆ–„žþ¹ýßûIO?ÙÓOöô.v¨­›Œ¢›Ó•]Î6Êg2&^Æ‹ñÒ¾Îø•0_[¿Þˆ_wýF#÷Ç›B›ÑÏ6ú£ÇFÄè¯G•ñò03n0'|¼"ü$n â¼O­ ͪâZ:õéðgsû³;¿§v.w÷TwWìÛçîÇÝý%ut¾O\ç |·ã©f[£šPõþRê«*ùð0<õó(N=E'¿þ=µ4LK­‹ÎJõ©ÈC¢Áñ©áwñ¢(§JŸj4ÒRýh¯Ðk® R¥+<}ŸåUêñû+u¼¿'­¬-n·ª×·„®²ïFåaAT42¨Ä dQ…ªq‡…Ñ8;4GçàWa^t#nÂ͸¿Æ­ø nÃí¸“ „ÆèÅÐX– Íe1ÊQ42¨Ä dQ…jˆƒp0ÁŠ¡8 ‡ãcð!‹ã8p">‚¯‡µeßÀ7ñ-|5˜€‰˜„Éø%~…qnÆ-ø5î kÊîÆ=¸÷á~<€©aMêa^êL Ã7 ©[C1õ›PäåÚ•N~¶—ͳ|ìk|lo¼cßæx§ˆè™x×¾ñî}ÍñžŽ÷îk‹ß Ãâ}®‡pDyžÍåéð…òLÈ”WîÛY>h_sy6¤Ë«öµ•ç°òj×pßè° | ®Åu¸c1ãqj0ñÛÐ\þfâw˜…ßc6žÄSxÀ3˜ƒ¹˜‡?âYÔâO˜ÂÚòx ±‹ñ^Æ+x¯áu,ÁŠ0¯¼ y¬Ä*¬FkPD3Z°6̫ؤcðßtEX˜>Øñ‡“pÎÍéO9ÞÖ¦À4çÖ™þ×Ö“¶ž´õ¤­'=×µyxµx \ ±æž6÷t×oá/^×c9ÞÆ*¬kÒEïµa ¶¡ÛÑ‹>ì k3`0ÄA8<¬É#ñ…3CsæSæe®Æ$LÆÝx‡ÆÌÓŽ;üʄµ•'‡æÊS?áx¾æõ÷šʟxÿ2\Ž[]ŸæúƒxÓñ4ö„5ƒ¢°vÐAŽâk¸t$Ž ÍÙŸ„bv®ÄÏqFC¼gÅ{V¼gÅ{V¼gÅ{ö܉)¸ 曽÷â>Ü0Óð Ât<ŒxÖ˜} ã·x3üª Ū/ã+ø*.À×ðu|ãà U7 0“0¿Ä¯p#nÂ͸¿Æ­ø nÃí¸wb îÂ=¸÷á~<€©˜†à ¹“ü…È¢*¼•«ódþŽxetм¼7º?¦Gãqj0»BQÿ\Ô?õÏEýsQÿœèŸýs¢Nôωþ9Ñ?'úçDÿœèŸýs¢Nôωþ9Ñ?'úçDÿœèŸýs¢Nôωþ9Ñ?'úçDÿœèŸýs¢Nôωþ9Ñ?'úçDÿœèŸýs¢Nôωþ9Ñ?'úç¤ô-\e6Ï¥¡SÏÚ©gíÔ³vêY;õ¡Óô¡ÓôMúÎ&}gSjfØ<ðû‘ÿù[Gï¤v†wT³‚*6=~;:F½lUÁn×ÃM×ÃM×ÃM×Ãuêá:õp¥þ©¨*ꟊz¦DÏ”è™=S¢gJôL‰iº>hº>eºždºbº"Ñ#tê }@§> 3sR(fNø>ÎNÚ¿¤å‹tv‘¶.ÒÂE¸Hÿ&ôoBÿ&ôoBÿ&ôoBÿ&ôoBÿ&ôoBÿ&ôoBÿ&ôoBÿ&ôoBÿ&ôoB¯vÒ«ôjB£vVŽñìI^ÿ¾ô­i!¡7z³sÐñtQ˜FcN£)›hʦ\MØœ›€‰asõðNõ¡Šcð!Lvý‰ðN”RUþ ®Óqñ‹Ñ§ã…Ñ%ñËÑ™ñ+Ñáìû|ü%õzô‘xyt[_ ¯¯ >§·?8ÎG§³û_)‡£éœõ®nˆN¢. NŒ7Gçyîkû–}²‘^ O»ÿÞ1çyoU±0:Àµ7½]ú^Êÿý»tˆGÃþûïÓ5ŸÓDÇgŒúõðKæðŸWNS-wºúÕr¡jÙ1ðÅ[JÿÒÕ£œ}nàgЇ¹÷s(ý/‚w£»ãgoGìpˆ÷޶ÖÒ·¾]êãÑÑÙæÿZùgéµ”+Ëœ½ånµ‰&Üêl­³+£jg»-‹>•Gâ ¤‘A%!‹*äPŒxathü}ïR\iM éÀWèÌWCcùèhXù\‹ëp=ÆbÆãÔ`&FÃôòÃôìÃôìÃôèÃôèÃôäÃôßÃôÞÃôÛÃþÿE5uÛk¤µVñnü²,ý7“WÃsÔíkÍ&/š×bwY­µWG—5DÇ•5FŸ`™KÙá‹ñ÷Ýuqtq|éÀwÌ]_^-}+Q|mX?}2ž}Ê8‰>’™Sþéèôò³£O°ÖÅÑÑ>q´q䛣£©«4þÀHÕûÿ¯ÉÒø>}‰ûäøcÇÑ<¬!¬¡‘;éã]þ³*ªô©8J—þŠ»‡ºs¨;¹3qÇÖhh´A¥¡¢MtÓÕF*í鵡‰îî´ëƒeÜÆçåíàJŸòÌ’"®88ìÕÃïÕÃïÕ#ïÕ#ïÕ#ïÕ#ïÕûî5æ…asé/ž<ñ¤ÿIÝ—ÀGQdÿ¿:ºªg¦' !„$\áEÄ DÁÅYt½9ÅÔE@DUQQð]PPWqÑõBQWQñ9ä&ág8RÿoÕLbb!Õß¿ûS=ÕUõ^½®~õ­zÕÝoÐS´ã¶Àì¦ê%êìÌê‰Ð×Ö3ñyf¤ËÁulƒÆUCÝ{@5õFPï¾rë Þ,ûß,à–Œz=pÜŽ[Àq78†ÀmGü*òÑÏ®@ªõØ 3ùžýÓŸÒA‚Ä ”¹ Ìe²ØVezÅ:ŸÖ"¬CØÍ>€‡pèp,—«MsÑ hÑzˆžø½¿}aûôƒ<Í$1z1ÆýÛ÷™hñQckwo~6/¹Ú~1 ÑçR`åˆëHK Þ²ÁPc/™Î×]º"\KõX„É«p¾! rê¤íÆo.d³þs Ù~\ó~Hv®{?$;×불áãzøÖl±ˆ’œÖÍÅA± X Š PœŽÒIy½Ó¼ŸMäÞʵŽê÷¿]P_Whòµøíß@Å,ªÄËÆ„Œé@Æ*À»™îuìý[‚R)9¸W vµëÖ^ª¸ Zu7Æ»õ{jÜh¶9}[ºµ  ƒ»Î9K(z™t#ÂMwáî_ûÙr]‹0šiK¯–¬GKgC¦°/7ËfŒ“m©º—dvx[¶šªB_„Ûî@€0|âÿ ´œ—€óq®j0? ÷q ´h-z»Zàð´ÑFó½³Å«C¾<È—ùòâWo×”W€Ë páàrdL—½àR.ÖÓ¼«íÿA¾<È—ùò _ä˃|y/N ^t1݈pÂ`ê@÷" AŠ0Œ: ÆDÔØ ˜å¡…/fyhåKY¯£¥ßEK=ýzz!ôôbñ¦y ×ôFˆF1i0nYi6`6qµ†Ž¶–mÍb9:ȉ/S/‰.öVáw ~·"l§ª)©}èbÕáv„;¬|>¤Êë ë w÷ʶàF“íV#¦Bî×â¥Rã¥R!÷6”léV 6šùÐŒ>_ÀÜ Ûol½­°íVÉ&ë k} ¶!5)9²‰9 \û¬¹hçù8¨ÖÉLä×E¨‡ô(Óiolÿ•\–CV{…\¦CÖ òâ\,õrÈo¯ËúÈk€¼5Çõ¦ Tƒî¥Bæ4ðÍÀµÔÀݯ‰ºjÙëB~äg"¿ò ­!ò!¿1®W{S |S‘Z!Í,„ h,Y÷²®¹6ÊÔA™Lä×E¨‡2õQ¦Ê4B™ÆÙì} \»¦Q ä°-¶r¤@Žä\ÛÖÃyׂû C dˆØ»BÂ]{F¼cÒÛÖîºc9q©9%VV'Ðk·¡ý~§èí'Q´¢ºªæ¤¥ÈmHU•Ž€[3\u%õÔM¨ÊÑê ¸œa¯èØè îÄ·î>VJgÜØ­¨Þ8To"r 6I{qjÕ:‰9@µsE~Á& O/ Z&P­µô 6Q{jÕ:ÉPAPí\)ØdêT˪µ–)¹h‘Ð"MÑ"MeÎÓM3´H¤jVi„Vi(k#½Êe¢L]„z8¯r P®!Ê5B¹ÆÐš,·6×ÙÂþ¯ÏT³ÝÌt`Vq:æ ³1ÛKtÿ-4]KmXO:]G³ëñ{,÷+Ì8q%l‘«ÌtÌ<ƹªkz˜R³])ûH‹\jáÙ;Eg–ü,ö™yÇÅì¿Ûe!–+ù"j ›ô8j½9u¤Ë¨]IW!õÌåΤ›i$]DOÒ›tM§Y8û ûSô--¤§i1ö ´ÖÉDÊÇ7X Vƒ~fµÙ 4Ÿ]Ì:ÑÖ™]NëXÖ6³¬mc×±^”Ãú°ÛiÀž§\öOìlöl<öšì ö&«Å>cóXÞœ·d'ñVü4Ö’·æ­Ù©ü,~6;ÿ…w`gðóøy¬ ¿€wdgòN¼kÇ/å—±öüJ~5ëÀ»ò®ì|Þƒ÷`ð^üFv!ïÍ{³Žü~;»˜÷ãÙßø þ»Š?ÊŸ`½ù(>†õáÏóX>™ÿ‡ äïñÙìük¾å‹ùö:ßÈ7³÷xßÎ>ä;ù^ößÏóØ,n±Ï‚}!´ˆ²Ù"Q$³ïEŠHa?ŠT‘Á~uE=¶P4 ÙbÑX4eKD3q[.N'±•¢…hÉV‰VâT–%Z‹6lh+ÎbÙ¢hÇ6ŠsÄ9l“è :°Í¢“è̶ˆËÅÕ,Gt7°Ý¢èË D?q7'1D áJ øcÄXî‹©b*‹÷Åû<"¦‰i<‹/xTÌ‹xšÈ›y=‘+ o&=™ÀO•)² o'Ûʶü Ù_>¯”Éø­ò#9‹‘?Èyü%ù³\Ç'Ê Òð÷½°æß{ð¼$/™Ïõæ{¿òŸ¼eÞ*¾Ø[ã­á˽õÞz¾ÂÛàmä+½ÍÞv¾ÚÛéíäÙÞo/ßàí÷öóÍ^ž—Ç·x•Ç·*­x®JRI¼@%«jܨ4U[UW,ÂêuЍ¥NSç‹Úª³ºBœ¤º«Ä©êêaÑM=ª=Ô(5J\¯žRO‹Ôsê9q£«Æ‰›ÔD5QôQ“Ô$ÑW½ª^·«)ê=q‡úP̓ԧê¿b¸úJ}-TsÔñZ¤‹§ÕµD<«V¨•â9•­6‰±j‡Ê/jÒ\¼®µÎoêFº•øRŸ¡ÛŠùºn'ë¿èóůú"ýW±B_ª/kôåúr±V_©¯ëtÝC¬×7è^b‹¾Eß"¶éÛô ‘£ëaâ ¾Oß/¹~X?"¥~L?.•¥Ÿ—¾þ§þ§LÖãô8YU×dŠž¬'ËT=EÏÕõzŽl¢Ò åIz©Þ)OÑ»õÙIçk#/÷ùäÕ~ÿ8y¢’ìæ·ò[Éký3üÖ²‡¦ßV^ç·óÛÉü ü‹d/ÿbÿbÙÛÿ«ßYÞì_æ_!oõ¯ñ¯‘}ýüÞòvÿÿïò.°?Xô‡úCåÝþ}þrÿˆÿ¨¼×Ü)‡ù£üQò>ÿiÿiy¿?ÆQ>à¿îÿKŽð§øSäcþTª|Üßéï’#ý=þù¤¿Ïß'G…|rtH†¤|:¤CaùL(U—cCé¡t9)T#T[Ne†2å¿Â—…»È7Â=Ã=å½½ä»á›Ã·È÷·…o“„û†o—†ï ß)?  ”‡‡Ëéá!áárFø‘ð[òÓðgáoäºð‚ð2¹-¼"¼Næ†÷G2dA¤~d´—y:ò²÷däÃÈ,o|d^d§÷z ƒ4ï»àøà\oypup³·/¸-¸S…‚~A• ©ä`p0XU †©Ô`Dð¤Ê F£UãàéàYÕ$LTǯ¯¨SƒÉÁ[ê´àíà}Õ.˜ÌP矟¨ŽÁ§Á§êâàóàÕ)ø>øY]üü¢º ƒÅª{°$X©z«ƒíê¦`W°O ùjHP%5<Ê£\=•Q¥ŒúѨz8šMU#£iÑ4õL4#ZS=­m ÆFE©ñÑáÑájBôþèCjbtDô õjô©è3jJô¹è55úBôõNôÅè‹ê?Ñ—¢/«w£“¢¯«i #O"]H=ŸO[ƒÖûéУjaýN£_}èÓ/Žä6ý]ó6 3íô¿×B³§ÞH"žÿùíÿmü¬4~( ÔéÔ‰ìLèìxÚ'æcpø÷!ë_[vzî˜ÅGs©ù«ée:ÇKO(EÿPìUóoó£ù¥X2§îô DìIe¿™¡· ¹Sif‡3hµt« §Ò´N£_iu¤lÆèjÖ“õ¤»`Ñÿú[[žZ+žîæ·ò¾tìñÅ4”/åkhßÀ7Ð#|ßL#¬mNñ\¾—Fò<žGOZÛœFYÛœž‚m¡gDQ‡žÝDwzAô×Ñ‹òCù!Y«ÖÐx/ÙK¦ïÕêúA}¢fÑ\µT-£•Q†~¶6Í·6-Ö—èKi¹µéh%lº«h•µé(ËÚt´ÁÚt´ÉÚt´ÙÚt´ßÚtT›îqF°æžbJ?£Ÿg!kÓ±DkÓ±$kÓ±*z’žÌªZ›ŽU³6k›n';Öœa}á{¬«ïûav­ø ì:¿Š_•õò«ùÕYo?ïÉnõkû™¬¯_ßoÈîôÏòÏfwÁj»‘ €u6‚ ‚uö8lí/v¯µ‰Øk±¡‘{#£ÙýÖÒacƒ¤ ÍÞ Þb_k‚íl¶µ5Ø|kk°_­­Á–Y[ƒ­´¶[em ¶ÆÚl£µ5Øvkk°ÖÖ`»­­Áò¬Áò­ÁZ;‚ó„PB„ë„j Õy8a_ÂnŸ),rÜÆphÌXcéŸÐéi2R^Å®é5z£Ôè“rú¤ O3Ñë>V…V…¡Usþ-ýBZ€CËbVý+-Ãìj9e¡­ÎÕ¥lÚ¿{=ÚE{©>íÃÞ€öÓAjHÐÈ*N#k9N#§‘4²%ñ¾ÐËÀée2ôr9¥ò|Uå+ùjªÎ³x¥ñ5ÐךN_k8}MsúZÍék†ÓתÜpCU¦ÿ”­å8b£jÐ]8n>¥‹ô8Åéq èq7j$ºC›C›{"~tº±ÓéZÐéåÄä ¹Ž¸\/³IÉ rEdŽÜMµå™K‰r¯Ì§:ò ´¿¡ÓþºNûk9í¯å´¿–ÓþZÐþ¿PŠî ;PDŸ«Ï%©ÏCðÐ.BJGÝ)ë‹IëNºùú¯è'õÑO.í¥è-!×["v„¢ú*ô™ô™®TWwÓÝ)Q_«¯¥†ºzQ׋ª¸^ÄЋnU}'Êü]÷CÊ]ú.⺿€Zêà|7zZ=í^P ÑC>TEùaè{Q×÷˜]OA™úQÔû˜~¹£ô(¤ŒÖ£Aõ”~ ežÑc2V…$Ïëç‘‚þIaÛ?Ág¼ª zÒ'éIà3YOFÉ)z RÞÒSAû¶~íðŽ~-óþrN×ÓÑ&3ô Hõ…ž i¿ÒsÀó' ÍÔ 4tR/ÒKÀm©^I™z•^ƒ6Y«7 ®zÕÓ›õ´äV½èƒ·ëy·Þ’{ôäæê\¤ïÕ{!É>½üèàœ§óÀ9_çSU}PDíº´Fûÿª¾Gµ,šà4Áh‚#ÐG  Ž@&8Mpšš<‚ãq‹)$-¦³˜B0eŽCÃÃ)É" ËB "‹"‹)ù5²“’,ʰ(Cé@™5T5X¬¥”`]°Ž¢Áú`=¥ÙA6r7(-Øl¤šÁ¦`+âÛ‚m(Ÿä Ìö`;Êì v!¾;ØCAn‹2{ƒ}(s 8€Ü¼ Ÿ"AA`(-jM몿p”Q‰£U” ó©z4 Sµh$AÉ ¥šÀµªHI‰¦R†E7JºeàX#ZejGëPJ43š >u£õ¯­ò ¢ ö!؇”—¢ãQË„èDP½}œ'E'ƒç«ÑשšEC )É¢!%±þGÃÑØ…CChø<â/…ÃA| ñ©ôŽ´ høâÿ š ÀÁ@Ì…ÀWáÖï}‡ƒÂá`5‡ƒ©Ã«;Ls8˜îp0Ãá`ÀY"EYÖÇ>¬/Žw°~8ögýq|Œ=FQ ä¥ÄJ†€’½p´(q(r(™à01…oá[¨ŠÃÁd‡ƒUùA~& )$%û|ÄÃ"LUDÑ…jŠ®îM6‹}µöÕ׊k‘ÞýÝfq°–ÃÁ:âzqÕ(ÂÁl@ÀÝäûò)ìP/á^ª]µEÿl¯Û£÷ž£Ï!á0Î×çã$0®#âÝ„C7åÐ-MwÖ‘bÑMèËôe8^®¯@I‹qÒ¡[ªC·°C·  [O ôõúzoÐ7 üúF{ëÞ8Z¤óÒ…ãH×_÷GÊ rçë{ô= ¬£|!Ò G<†qè·Hç;¤éÂz¤ ª'ô“H±¨ç;Ô â¨÷´~éû|‡}õ„C=©_ê‰8êMÔY¿ D{E¿‚ò…ÃÁŒb8(úÀÁéˆÇ°o¦þñ/ô8Zìó}K·¨WÍ¡^ªC½°C½êõÒê¥;ÔËp¨è]z¨,ö¥:ìKsØ—Ǿ|`œpøÌg$bh¾‡Bá{Ã÷â84<”"ááÀ¦HøþðýHy(ü…NñÈÓ‘ˆ;ÄI ¶k’‚ÁNJvø’ä%Ȳñ}Á~J¦ Ÿ[L©QA‰@M G’ޤA’·R5Z=Ze,v¤DkEk!½N;ꂃŎd‡I;ª8ìHv¼ž¢@5): å'5’jpâ-·Û•×ÓÖÿåTºˆ®>Ô<ÿÿÍl0mˆŸ­*Ëî²ë»Öe–(w¸çRÿǶ?¸ÏÁfÆñ%eðË¢&ÐÁÚGÁõð[rØjñÔaj™°áˆŸ!ýXñ;~%¤*Þ÷Žþ]3˼>b&˜Y.u݋ޕš?,6®ró‡l77qhfÇ$³ ¿S⥶¹çmß"ÌÆž]råÚ!Y:®Í~‰±`Žù aR/2óÍw.ý—Ø,Â=Ѿ¦â’–’|c‰37†šÿK¹ÕL2}Í£v•ßô+Jmƒ´l¿+ýÔ‘ì3×ÒÏB7™Ïp-KŽ]O-Ô;ŽÁ ç…s(þ|¶¸ Àå¢g#öK9œ8V2VvC+EÝïSöys©ÜþæËec¿Ë1º­±R‰úX­wó-×N6†ñmU¼Õp4·˜¹î~ï%QÆ¥æ¥xnC?غ$€…OöÆr~|ûí9tÉç•…³;÷rãöZìÛJÍ=Wº¹g½½ùcWYÛïðl~©üüß§ÄÓÿ^v:Uä9z…7sS bïXŒ0¹ß‡ïـؿ̇±˜Ë+œŸ¹ç¸SWBºwÍG@Ìâg_š7ɾ4ÍÆ€œ@±/…³à ïwqœˆ=?K(Åókóù4Î3ÅžÅÓK ƒ1—ÖÑ¡—š_‹Î m—Õ6VhWÆfâÑæXýˆ½#ï?;"w7—¸³OÉ>Í»ánÄF›ç1ÖÝçRìÝ´À 3¸Ò^g†šWL_Äþ‹^ýŠéíðá ŒF¯ ?5ãÌÍ[sì3@weÓÍT31Vs|ÔÈ0ÿýÏl³Ve¬çžR‹Ï;ÍþX8òs Þ»]/z+¨ä(åÆé"Ë×Í|W¹÷Š¿qqbÉ7Vþ¨­äS\÷ÓÖò%qWTêý«?b+iÉÚV…ï*?ÝÝ9f–nE¶âóôke-Âï!žt•Ütôòš—Ìó3ÖÅçAß_¶oÊÄÇ¡Ø|qyaÖÑÕã85½ÉrT<Ö˜õ Ýøˆ{ºzX4çŽÝu³sŽíeÍ+\W%æÜŨ¿‹ÝUÈbqð‡øÙÊxÿ‰Kýçôç²6s“¹ÑÌ4wgCÍ@ uÏØŒÀL3ûp6ÒüÝœaêG[™»Í-GQWlþ˜yTòÆ1)fÓ½oørÉÜc¹™ÉÇ€‡ÕÞ…1TÇü¶ÔÝwùYæçßFá?wƒ4KÑçÜš'tØZŠE–Jl¦‹Ü¯ñ®ê½AÞ'‹÷\̯¦ÿ™òzCoëoçN±7]Í]˜ý‚ÞËûÔ—šMWó(b£Ì²XZ%ëúúèå­`»‹¿çõw+šãî<ú·+Ëz×ýXn±Ù!æßë0ꃋòÞQ>,íj”yÛ­ío®|MŶôcÂåˆ6Ì…Žzæjž:’”SGé0»=êuùct—Ê«e f¶ÿãžrì6Ìzv³–I> 9ŽEÿŸGTF1ïÉŠQÆ¿ì(\™ëž3Ì=,ñíñ²ïT¼Þ?z«Ì7¥xòiÈahÜj½])ŠY±¢gÁáÃÙÇnm7ú’ªx½Ž¾_y™l7vüö-YášÜ‘Úv:¿âµþ©[je +þä‰ì[ ö¹t‘eof¸ãVàs¹O#þ¯m˜÷ï9ô7ÅÊíûßËrdÛ‘!deGõ2¿•*·.÷Áoߺ'Eš.“¨°¬]«ªI]Ñçþ„­äÜ=†°žÊÁY÷$æOXï3;Ž!¯Õ_Q.󋣦î+'û}^¹åñ¶ßQ­.¤,Œ¹þÕñ”Â:Û¸º~'W±³G~ãY(‹ý^«”Tö«¬ö)Me¬v3μf¦}ÙA|Ms^‘-JÉûZÅë+A_‰7…ÌÏî©Ä·Eçî Ì7Õ?é;‚¯÷Qw™ß&—C³Þ­ZÙ‘Üa;û}/† áÃÍ/݈’HgÙ÷šeÐWæý‡ùö{Krcçî_5?<:į¥fÉ÷ _;ÌO.Œ£ê˜“nŒ?MZëÓN×n­¸¤å\Gì [1kÝô4w›×Íxç7 èÓѼ[AÎ_þ13f+ã¡ë1e=UŽ=Qü]ÚŽòŸâTvsïÈÄ‘ÙìÄ|b'æG‹Í’ßÈlAš}f|º¹Ò¿ Xhº›ÙöÜ|jž5_Ùs—÷L ÞË Ó+$QgÓ×Üo.ŠŸ¹4°·‹¿f&™~Ѓq˜­MÇÈkK|h>0ïÇGm»:ŸJÍÝ3çA¦K‹½8óê—ìý°^ŠÞ*±dö~Í_!y_0oÀVûgül®«{œÃù¹® ìÓ×wÌnó¹+ûj?þ†A\‹O©x­Öö?ù»t-« +öÜùÏÚ*óœ wz+[u(òp$cOU²ïï\æâ5©lÏLG»³Žun4©A'›è¡v_nV˜3Ð_zS`bãzÜNEïŒÙTÕãçïÆŸTp*úbÚ¥¿u˜ëpïV˜Áçâ+¦½éÐÑÜDUMl .ô¡1á\ÓÆ\aâ_6˜oÌ2÷¶„í±›0&­ŽÛ¯ÇS7rïJ~u£l¹^6“p|£è|ºµåJ¼Yqy<Ò•þF§SKç'¦¡Ë)~í႟M¤`¯)gšÛÌ{v 3Ã̃6®•¨6öØm•·¹×‡;ñëãpóA7Rÿ„{™]û’~šó R¸¹–5wÅyWfÝË/SŠf‹{#ÀΜ69mþçÒe‡ïXªD:Òsš_Ž».q?vÐ…Œ³jÔËy§ä¼ÓpÞéc]XwÍna·Ð³Î/Ýsl{Œžg#ÙXšj½ÓÑtëŽfXït4Óz§£OØçl}Ê›ó4—·â§ÒÖ;Íçgó³éëŽð yGZÄûñ»h Äï¡e|4†VðÉ|2eñ×ùTZÃ?äÓh3ÿ˜L[ùL>‹¶ñ/ùlÚÁçð9´‹ÿÀçÒnþ#ÿ‰rù|>Ÿöñ…|!íˆÒ‘$’)ßz˜#ã<Ì‘ó0牢ÓÎÜï¼ÊEÄ©âTu^åœW¹$çU.Ùù“«*ºˆ®,E\+z°Tû­K³^ßX†õúÆN”Óä,ÖÅz}c×[OoìFëéÝä%yUXo/ÅKg·Xoìo™·š ´þÞØëï µþÞØ0ëïÝgý½±‡½=^{ÄúxcOZol¬õñÆ&Xol¢õñÆ&[olŠõñÆfYoìSëãý¨º«‡Ù"ëÝ3ëÝKëÝ{Ö»×Ö»÷ÕD5‰'X¿n<ÙúuãU­_7^Óúuãõ­_7ÞXÍQ‹ySëÑŸa=ºñÖ*[mægZn¼½õèÆ;YnüëÑßj=ºñ{ì÷q|˜Ï}·ûÊ×ü>?âGø~¢ŸÄôSüþŸæ§ó‡ýZ~->¯ë×ãZküqëq´×ø(¿…ß‚?eý®ñ§­ß5þŒõ»ÆŸóÛùíùXëw¿`ý®ñqÖïÉú]ã¬ß5þГߛO²~×ø«~¿?ÿ—õ¾Æß°Þ×ø›ÖûŸâ?ê?ʧú#ý‘üm”?š¿c½¯ñw­÷5þžõ¾Æ?¶Þ×ø ÿ=ŸéæÏçßø ýE|™ÿ«¿”¯ð—ûÙ|µ¿ÑßÅ·X¯l|¯õÊÆ÷ù&Äø~ë•ç[¯lü õÊ&X(=T[D­?6Q5T/ÔD¤„Ž(j„Z†ZŠ:¡SB§ˆÌÐi¡6¢n¨mèÑ(Ô!ÔA4 º@œº(ÔQ4u u-CW…®§„nõ§…3à ęֻ›ho½»‰ ­·6q‘õÖ&î´ÞÚÄ=Ö[›¸ßzkF.Ü ¦Ø¯öÄ ë­M|è Q|oý´‰A×àf±ÝúiÖO›”ÖO›ÔÖO› [?m2bý´ÉjÖO›¬iý´ÉZÖO›Ì´~ÚäñÁä`Šlfý´ÉVÖO›lmý´É³­Ÿ6ÙÎúi“í­Ÿ6y¡õÓ&/±~Úä¥ÖO›¼5J†€‡m(Úÿy8Ëý†Ė˜‰@Ì+Auö*ÀÍîàx-Ý@í¨0´=0´fwa?‡úÓ ªF÷`O¥Á4 5¦aJgQ–@î á, ˜{0·1Rš°&Ôœ5eÇ!ýxv<âÍ€Åé‹[‹;ãx ù\ç/4u.·t¸ÜÒáòÉÀå!HÊ¡Vlž©k©GÑ©l4{ŽNcc€Ú-j·p¨Ý¡vs öˆ¿ ìnìžñà+öµa_³ïèLö=м­Cs4o…ã)Àtå0=Éa:w˜žä0=Åaú_¦Ÿä0ýt‡é5éoPþ&“jñ)üßT—OÊ×s(_Ï¡|&P~&ŽŸëk;¬oà°¾°þçñ3ø?âøp¿¶ÃýÚ÷ë÷j(¢@ÿFý›8ôo ôO£ãDºH§ãE†È v$@#5ÅHÐÇ&¢)¨0P3;€ªµhcѹmE[Ïg¡ Æ16 Å~k}¾ûÖú÷}õùîûê Ü7ÕçaœNgÉûä#Ä0ZŒ¦Dù”Cgȱòyª*_㩵œ _¦êòùoJ—Så”eµ´ÞD©•WèL;®P`Ç“¼$jïUñªP ;ºPKŒ.¿ðx (Ó[è-¤Do‘·ˆ¤·Øû•<Œ:˲Ü[Ž”Þ ÒÞJo%ùÞ*oUóV{«)bÇ$ŠÚ1 %7x¨Š·ÑÛHÉ™6ó¶x[Qã6/‡ªzÛ½íTÝŽU¨q·‡Ò¼\/—Úz{½½mŸ·òì÷ö#~À;€xž—Ggy½ƒà\ 8UUBI:KyÊ#†N åST…T˜UDEH¨@”¦¢*JmU‚J@Œ‚ö_ÝUUЦ¨j MSé(Ÿ¡jP²ª©jsmU›¬Ôº8ÖSõÀ¡¾ªò T”o¨š |SÕ”ª«ãÔqH?^OR5SÍ(A Nÿ“ÔI m®šƒ[ ÕeZª– =YLqQ×iê4¤Ÿ®Z£dÕÎTíÈSíÕ¹(yž:´:_™;«Kq]SW€wÕµ_§®G-7¨›À§·ºÚ©>êj¯îTýQã5ÎQw+ ‡ºG ¦Tu¯ºÒQÃp-ÃÕ}às¿ºP€ÃƒêAЍ¨ –‡ÔC(ó°zµ`ðÿ(;¨¨®{ßï93sæ€P$ŠHˆ!„B(QB(A£)!–PcŒ×zaf83 ÃÌ0 Ù¿ŒÖXk¬5ÔRcµÖc­µÖz­õZë3.Ë3ÖZ¯5Ôzõú¬µÔúŒ×¼ïþ ¡¶k½µÞ“µ¿³×ïì³Ï™3ÃÙŸ/kæ+›Î €•Þdåâ:q›Å9€M¼…­ƒâ Ë¿)â> ~Kü«‡Ä!\íÍâfèwÄ-l&Ï€Åx°fxW|ºSÄ»TÜ%î¾Ù|ñâ0óñ‡ØºO܇},þõýâŒü©x#&ÆÖŸ‹GXãê¿ÉJÁÿãOˆ'Pù@ü#OŠ¿ÂÈaqçó?ÅÓó¡ø!ÎðŒøkœóYñ,{ZüøöœxN<‡}Á(Øë¢x3$~„½>?ÆlWÅkÿ_âaüŸÅ¿bÌmñ6®ÆßÄ¿áÜîˆ÷Ø4Î1l8& ýtÃ$VnÈ4LfÓ Y†©¬ÂmÈeÏ6Ì`Ï€rž`Õ†"Óì%C±á)ö¼¡ÄP‚Êӆϱن2CfxÆð FÎ4ÌĘY†YØZn€w}ž=k¨2TáXÏžÇøjC5¶Î6ÌÆ±x¦€†3›É™ f‚‚™ `&(˜ f‚‚™ `&–Ù‰MçÌ3±§93¡fbÕœ™Ø4žUËJ¥yÒ<ìrBä„1 '(ȉUprbÏœà$›dc³ÁO,CrI]ŠÂ¾ (ÔAQ–˜'"EÐJQÔAT8ÆMú+—ÖJk±¸ŠÍWm@å- ï:iPúúß“¾‡cm—¶³—8i¡Òb©œ´  -(H Ò‚þQú3{Aº%ÝÂQþ"ýó€ºX§.ô?•>åÿ÷V cóS4)6›3@¥‰=›‚¬,%5%}9%š‘‚õ7ebÊDV‘2)%•É)“YuJVJ›•òPÊClvÊ””©¨OK™ÆÊSrRrØÓ)ÓS¦£Ÿ›’‹£<œò0¶æ¥ä¡¶Cl‡3ÛAÁvP°lÛAÁvP°lÛAÁvP°KålÇ^Û½Ê&¦.J]ÄÄÔ×R_Cqêbô_O}ý%©KY'?TV¤neBêwSw¢þCü‡1à?Œùß4L˜ LÈa/r d•ÉìNLàB¿,™=,/“—±ò¿ÊÿÊ&ÉËååìÙ(Ùc²I6±|¹YnfZÙ,·¢o•­o“mc—íÓ!w ¯ÈV ;e'ÆtÊ.ŒqËnlí–=,dÙƒº_ö£¾„å ´_VY®’ÃìQ9"G12&Ç02.àˆ+å7PY-¯ÁÌ`Pe¼úuy=ÆlßÂ9ʃ˜ç›òFô¿% ã‡ä!ô¿-sn’7aëÛòÛì y³¼™=ÉÉ•\·²§äïÊßeµò6ùûèïw`Ì»ò»Øú¾ü>t·üV"ï‘÷`ë彨úcy?+–"@å§òOQïBÁ»ÐŸËGØãò¿ËG1æò1V(ÿRþ%F—ã('å_¡2,ŸÆœ aÌV> ý|cÎËÿ­ä ˜çwòEô?’?bå äßc¶Kò%öge–V޲ܴXZœå§ ¤á*›W²’´¯¤áZ¥­N[ÍIûjÚWQy3m{*íëi_gµœ§QO³ÎÓ,‹ó48OCÁÓPð4Ëâ<Íf‚ìæO×O DÒInþŒ˜9§§³ÁO:‘q=‘q‘q&‘ñ"ã)DÆS‰Œ³‰Œ§=ߣ§ü‰ò{ô”ߣ§üžTÊïÑS~žò{Ò(¿GOù=zÊïÑS~Oå÷è)¿'ƒò{ô”ßóå÷¼Lù=“)¿ç‹”ßÓHù=¯P~Oå÷ä€Ô'€›Ó4iÄèÓØ³šMš“z%HýVE,þªæ5Í¿ ÎYüyUca{5^¨O7AäÏÈW²Ù`ñ¯ ÿ†æ ŒçDþˆü-6,>ÄæÂ÷B¤ù«ÑìÓü [9…¿Nþ"Qx-Qø|PxÓ…kào-øûEâï—Àß/…ó„!% M¢„¡I”0ô% M"Fÿ1úç…¯«ØžìÏ‘:çò§„÷…÷Ù“Â~pùcDä‘?!| |þæ,þ¨pZ8ú¯ÁßRjÑÃÂo…ßÈ?>‚ò£Ju+. ÿ‰ÊÇÂÇPží–GÉFÂÿn Ïó …? ·Ðç)GEÂ'Â=ôyÖÑ#Â}áS–G‰GùZV@ŸçjõZ=ú<ý(ŸÒ ´´PÉý—÷Ï$î/'î_¨®ÍEÓ©ö1Ðÿç´… ÿR¢ÿ2m±¶ým ôí,6 Nà9ô+µ•ìiíçáJÉ<£­†(Õ¾ }ós?PJNà5r‹É ¼FN`1y€:Ðÿ–îßÄ2‰ø³‰ø§ñWêöøŸñe³u¿Ðd5Äýµd2é)“)ƒ2™&S&S9ró(ŸéeòUð2‘<€Aÿ[x‘<€<@:Ñ¿è?[Y”Eÿ1*œûE"þ©Dü Dü™DüÙDüÓô£úQ(gú:bz1}&1}1½ Š`zѼh~Q{ñºH=“H}Ñyq¹¸<›¸¼,ß+–‚ÈEbñLbñº1 /Ë1¾B¬ÀxÎâuDáIæ6gˆ­ë‰­ˆ­3‰­[O!¶žJlMl=èyš¸Z\ ¦üªøUÐ$§ç*"æjqƒ¸uNÌÏ1Ï7‰›À‘œ•+Ä-`åjbåéÄʳÅmâpü» äéDɯÏ÷Š{±§ä ¢äWAÉû±ïOÀÊÓ‰•+‰•g‹ÿ.Å ¿ñœ•+ˆ’§%W%Ï&J®Oƒ’«‰’ç%W%Ï&JžK”<Ÿ(ùYñwâï°•óq’ŒŸ¯‹7Qá|\I|\E|üªx_¼Båd\Md<d<}ÎÄs‰‰ç5<ÎjˆŒk‰Œ_'2~‘8xqðëÄÁµÄÁÓ ÏžƒržO\kxÁðæä‰b”%¦§,± JË 1=¥ˆ¥RŠX#¥ˆé)ELoXhXˆ£ó,1=e‰ePŠØË”"6™RÄš(E,‡RÄr(ELO)bzJÓSŠX¥ˆM~ E,ƒRÄR)E,ƒRÄr(ELO)b”"¦ ELO)b”"¦§±É”"–C)bzJË ±œRÄô”"–A)bM”"¦§ü0ýùazÊK£ü° ÊÓS~XÓùazÊË ü0=å‡eP~˜žòÃô”–AùazÊ{‰òÃ^¦ü°É”öEÊk¤ü°W(?¬‰òÃr(?LOùa/S~X#å‡5=¦§ü°ÊÓÃÃLfUp,³yäOj¤'¤'à Š¤"°þSÒS¬R*‘ž†ß(•JQ/“ÊÆ|K…4SšÅæ“{©*¤J(÷0µÒóÒó˜‡{˜©Nú´^z³-¾ˆ1R#{VzNf¶Ô$-„Cx]z[¹Ÿ™+%#ÎÇ,™±W2‰‘;œZ8œv‹;œt©Krcžn©{y%/{Qê‘zPé—BxÜçT‘·™NÉäpª¥5Ò(÷9óÉçTKßp— ŸSAg¶ô¶ô6*ïHïàèÜíÔ’Ûy]ú¾´{qÏ3[zOzcÞ—vCç3Aº(ýúŸð<Èó|„­GáLÊÈ“”“'Y(Ÿ?ÀÖ“ò)Ô¹3™%(ˆ‘Ü“”Ë¿•Ï£þð$³àI~‡Ù.™ä‘3)“Gä—û“™äO>'ÿAãQ:` å‘Ë×äë¨ð¤À|ù†|}žXHyù”XByù”ø呿Éÿ-ÿ7”g–ÈŸÊ @J,˜ƒ)GðÊ&Í£4Á‡)›42 )S°„²I‹ÓÒÓ2Pçù‚…i“Ó&£ÂS‹(eð‘´ì´låYƒ%”5XHYƒE”5X–Ÿ–­[’ϱ¹ m1Ú²d}ìQ_ ¦qíFÛ‡þ¥ñZ²]E»1Ö?‹6:Ö¿›l6ÖD4---/96R@ãY³Íž¼NÍÎñkž[LãX³-€FKŒ=‡ÕÉãEÊÆžë:´A´McÛ·Žm¯kÕ¨áulæÏç Ú‘ñç’|ÎûТA;Žv í Úy´´+c×xülü-´;cçÇö»óÀöûŒ™uh©hѦ åþý‘¿~æ|´¢ÿçG!Ró÷׊?7séØkýÿÛrþ±Ñû{Uò8ô¾ÊIŽ£ã>ØÊѪþþ8>Gr^!Rú\´º±÷¶™üýѼm‰nÒòGCÿ°)ÞÉHERºª3º¶3º¡3:ÔYÝÒYÜ?Ì÷ -3mï, ™—_q4õŸ]~ݱ¸ÿ‚iWgiõxogMÿ¾5d_~˱¬ÿ’é@g}ÿ¥dLï8ÌýWM‡;IAQÿõOv.…žî4AÏuZ¡;•þ«|¯jGÿ¾ÃÙÃt¹Ó ½Öé‡ÞìTûoðzÈcÔ9<ý£¦Ûqè½ÎU¡€1Õè¿Û,t®%Ý@:•šk¡é[ YÛ¡9» 3:÷ößå{…ÂÍ…Ô!ãDGXÅ•í<¬2ãGB¹†Æ\ÇjUnžÙy ZÙyR•y%´:YÓ|Ç:5ÓXäT³›çtž×ÚÎsj6¯‡Öi©c“š×ÜÐy‘ô2´‰ú‹;¯A—uÞ„š;oCí÷ÆÕéBƒÍ—Úd,wlU š®tµ€f+«„]YŸ)¯„¶«;Ô²æ„+‡tÆg}^í0ÎuìV+šW» Õ Þí6Îu• _çØ§V7¯sÍ$­ïºæ@7¹j¡[] Ю&èn×bê/S«ù¾¡}ÆŽƒjq¡ãˆZß¼Ïe׃.sè`ó—]­7.qW˧蜤žñþqWgbqœQ5Ÿr…ÇõŒ+¡.2¶;ΫKÛ÷†I¤«¡Çz×AOöBO÷n‚žëÝ ½Ø»C]Ê÷´]îÝ=6º#ªÉès\Q­m×z÷Aoö$åýÛ½GT+ß:0×U±í^ïqUl×V'ÕuÜR•v©÷éh:õÓ©ŸÕ{šÓ;Ñ{ZØ{]Uø^ë wÐ_鸯ºÛKzoAgöÞVö¢ÂëƒÆ5NêoŸàZHØd\ïLUÕö†ÀD®í êO6r¡‹ùÐe"¨9P µÊU•ï5°µÝ¨ØaÜh¼¤ÆÛ=¹jܸÙ9Q]Å5R`Üæœ¢®mê áÀu-¯ ìNÖÇt§3WÝ`ÜãÌW‡Ú…ãº:°¿;¨ìÓýÎ"uKûºÀrRËx0ÐÝpA·|Ð tw ÝX9p°ý``MÈl<ä,U·· ¬8B³í«l„žâÊ+ÇGåêÞö3ͤÛ>ëóúÀ)ã g•z ý|`§z€÷δö œ7;窇ۯàÊCûÇûׇ ·G¡w' ÷Ãêá]à,45pA=Ì÷1žuÖ©ÇŒœ Ô“—þI§®ª'—œ ÕÓÆ«Î%깎ÜÀ ÒÑñ~~à®zÎxù\½ØQÔÇÆµ´OT/Gõróy×jÒuÐê_q B¯»6Ao¹¶Bï¸v@ï»v«—ù^¡#fk_è¸ñ®³]½fbN—zÓœê:H:…4×uD½É·†N™D§O½m]ǹò¾9ßu*”n’Aõž¹Èu†ôü?õK]#Ðr×h•ë:t®ë–zï:cÊtFC‚)Û¹2$™ë\w  \÷¡ »tÐ%]©!É”ç\J7/'µtM 78ׇ²Ìí]SHsIóCY¦‚®"ô]]¥P_W94ØUÅë?bŽvÍEeeW]芩ع1”c^Óµº¾ka(ÇTæÜ¬žæºnÞØµ$tËTá܆ñ›»–c†Š. WTF’õ1­vî Í0Õ8÷àܶuµCw’îéráÊðúóþ.VOê›êûC…æC]AÒè¸íZ =ѵ:ܵz¶k#ôB×f襮m¡ûæ«];Ã:Ìs(TbÊëÚ­q…6:OàÖ¡åšûdÿ¥–›îÓá ÆœÃ˜Ûî‹áhË=÷åðJ‹à¾^c‘Ü7Ãë-éîÛý7Œ Ü÷ÔKV·ÞhÉé–›KºÓÕFËŒî¬ð6cQwNx§±´{†šg)ì. ·”t—„÷XfvÏ ïOò†¥²»2|È2§{Nÿ0'ŠðQKmwmø„¥¡»¿ ÝMŸ­ì–¦îŤˠ‹qnÖeÝæðY‹¹Û¾`±w;×,ÎnOøªÅÓß°ºÃáÑ$Ó6 Ý P\’£ˆR,áîÕ`WâFK¢{tu÷ (Ž¿7î6›»¡–uÝ[#Ì2ؽ#"Z6uïŽÈ–­|¤Q×½¯Ô²£û`$3In¦¡î#ýÖÝÝÇñ;NŒjÙ×}ªÿjsN÷™þ»–ƒÝçqt{÷®Ã‘î+ÐãÝ×ÕË©î[`°Ýwp>gºïCÏ{tá5¦ÛžTÌ?â™ɶ\ñL ó+ɳ\÷ä&ßÛ‘Ë-O>æ¹ã)R+,÷=¥‘âV§é†Ö¹—šÙZçñ‡AÅ‘¡Öž`’#[Ðí UZкÐ….áÊ©5²+©­Ë=+“¤ÙÛjñ¬QËZÛ=롨£âòlLRkxîß5r€ÿÖG“Kj«Ï³, "œl z¶<Á¥‘Ó­QÏNµ±u¥gÔåÙæ<å9¶ä¯Ë¹¤¶®ñ\4ç{NෛߙÓ[×{†±zæ{΢¿Ñs!rÙ”ç¹ÄWÏÕȵÖÍž¡[­Û<£‘›­;=w#·[÷xYä^ë~¯Æîít÷6-õÊQ©õ7wc¿7;šž¼¶õæE³ZOx ¢9­Ã]uÑ­g½ÅÑÂ$˜Û½eX h•i½ÀïÛÉ5ºõ’·"ZÒzÕ[Ùzƒ¯¶­£Þ¬z¸kE+ÍÃÞúheë]×™èózoc(Çʼ‹¢9cëò6ïÒPºUôš8Kx­êe«ìUøšîu«÷¬™^(ËšíUqÜ Þ8_¿¼¸Zó¼kQ/ðneµ”y‡>[)¬ÅÞ-ÑZk™w;Î ,É´Vxw…‡ù³‹6X«½{“wÚÐk÷æ©÷Æ*€57Údmtî‰.æëTt™u‘÷XÔl]ê=µ[MÞÓQ'¿nQͰZ½ç¢a«â½ƒ{x4‘¤®áåIýŒjœ¾èj®ÉJté ?‡è&Ò­V·÷rH°ú½×B’Uå4ÂÉ$¼Ü÷ÞLö±ÞA±Ö‚è~×î°®òÞNrEt÷˜âY„Z×zïa½ >=¯Ö >!4Ã:ä“@àŠè>ë_z’"pVã4oóe…J¬Û}9Ð]¾Éó@£­{}…ÉU>zÄzÀWši=ì› E•c¾Êä*=þ€žâëTô é éyëI߬ÝXÁ£#ÖÓ¾Z¬ÔXÇ£W¬ç| ¡ëE_ô²o1V±Fß²Ðbºæ×Io]™k>s¨ÒzÓgÕZoûœ¡&ë=ŸG½l|èK_}"µ£½¯1ÞØáê[õõ-U×vûLªµ#ÚgUÅŽ•}Jb"Ƹ±uMŸ?1¥c}ŸŠ­ûâ‰ÜŽÍ}«ùÛúÖ mîÛ ®êØÙ7”(2®ïÛ¢ª{ú¶'J;ö÷íJ”wêÛ›¨ÂŠy@ÝÒq´ïplelj¾c‰¹Ã}'uIw`<ÑwZ=Ðq¶ï\bAÇ…ÀžÄÂŽK}K:®ö]†»ÚwmœÃoôÝL,ïí»þݾ{±= ‹"¥D»"Ó.%3˜•ð)ÙÁœDPÉ ÎHD“´½!XÏ•t:ä)”‚`IbeÒå)Ũ¸•²àLx.¬õ‰5í[ƒ•‰5EÁ9‰õJE°6±Q©6$ÚÛKøHãš`“êWj‚‹›“>«íppÙg~6é1•zò• íW¸ã šÇ¾#h‡’WRƒN8¦¤Ç¹yXYÔw3RÝ>'èÁüKƒÄ6Å Ãgá $v*Ö`bŒUÖ)JpµºEqשçp0±GQƒ›û“~P‰·&)«‚;G9ç$N(kƒ»á©á¬äg• Á}X5à ±^@¸†ÈS'.ñ£$®&U Ä3ÚÏåV¶¨~î7”]ÁãcýQÒ»œ—V°±+ ÷ºBSœÕ YÙ<µBNöI3•Á3êåpð<Ü+<ìŠlåXp$éXWä= íǃWpÅN¯COså3¼$©Ê¹à­¤¯\Q¬\ ÞQ÷*—ƒ÷¡¨£r­_—ô˜+ÊÐ Nq+ªIk’ªÜìO…s„\Q¯Ü¹¢Q¹×?E=íús¡R¾zΑÞ_”XÎ_—‹H—×ô—&n8²úËÕŽœþ*õ¤cFÿ\Œ,ì¯S—Ú$_8zŸ¼­Gtï‚g±¥û1-Ë·:–j}ë"™¶ß _;|›bm3¸¢¿56ÅVèÛË…î×ß¾X¾m¦ï`¬ÈV‰½¤¤§³Íñ‰•Új}Çcå¶ß©X•­Éw&6×–Ãwl‹}ç#7ùÝ2VGºÀõ„²lË|Wb mfßõØS…ïVhÄf÷݉-·9}÷cÒv~ŸŒ¹Æ¼4æ³yzt±`ÒgÙ=©±¨-Ü31¶Ò–è™[c[Ý“[דì)Šmä÷ÌØfÒm¶M=¥±Ðò`ÛÚSÛcÛÑ37¶'¹¦Øv÷ÔÅöÛöõ,ˆ²ìY;j;Ò³$vÂv¼gy¤šî¢’íTEµÚÎô´Ç†mç{\±³¶‘_ì‚Ié †jmWz¢¡9¶ë=+սɊkì’IÅjˆ~Ïšh In­{ÖÇ®ÚnõlŒÝ0±žÍ±QÛžm±»¶û=;£÷m%={bùv]ÏþX©=µçPœÙ'ö‹ö)='â²=·gX]kÏ÷ Æ3œÍ^Ôs6žm/í¹ϳ—÷\ŠØ«z®Æ‹ís{nÄËìu=£ñ û‚ž»ñjûB?‹×Ø—øÅx½}¹_Ž7Ú-þLh»?;ž9¦.žzÙîóÄÙƒþâXÔõ—Å—ÚWú+â&ûuÜj_﯉+öþú¸Û¾Ùß÷ó×7®Ú·™üñ¸}§Q|•=×{¾}ß_›|íìûýÖøû!¿^c?êwLJì'ü~è°_o±ŸÅ®Ûíü«¢Y¦z?–ý’ôª(¾Ë~ÿ%¾×>êß½ÛS?ÐÆü»"ÛDÿ^Ul“ýâ‡Û2ý‡ãÇÚ²ýÇT¥-Ï2~²­À:~º­Ø.~®­Ì9©n«ð_ŒUµUû/Ç/bä5Œ¬ñߌ_N¥­Þ;~­­Ñ/<ܶ¨Wˆß4‰ö"õvÛÒ^)~ÛTÝ›šÑfêÍŠßk³öæ mJÍmH¦E½XÛü½%`¹Þ™¡Åmjoå@V[¼wÎ@NÛªÞÚmk{ m3{›"7¹”$]Û†ÞÅ3Û†z— Trz˜Ã)e –ÿe !ùGÁX=ö—Šüí84ö·úËÀ@SÛ–^s¬ˆ¯ï‹¹XÆßæä_‡èþp§m»oó‰µíêµ‡ÎØ {¡3c½¡¿«´íuºì¶[½žgÒõ·è xøk^È6UsSógÆ4ÕÜf‚æ®æ¦Ó|*h˜(è‘¥™M& “Xšð0…e9Ât6IÈc“…"áIöðmáÛlª¶^ûËÖ×é¿Àrôn}7ËÕÿ\ÿs–—ŽöHúŒô/²éMéËXcº1}€}9ýÍôŸ±húñôëìé7Òo³³8›/1ýïé,ƒ¥°Il›À33{…YØlû*[Ãâl-û%دÙïÙ öM*ûFÖ¤±O5š‡4 ÿŽ“Ä?7©™ªYª±ir5mš„¦X³R³^S¯Ô|[óšæGš_i¾¬}OûžÆ§ó輚]XÕôêVêÞÐuoêÞÔ„uo龩‰èÞÖ½£‰ëvévk¾¢Û§û‰fµîgºŸiÖê~¡û¥æMú>æzÝi݇š·tu#šoê®èþ¨ÒýI÷'ÍfÝ_uÓ|‡ŠN³U?Y?Yó=ý‡úûší¢^,МŸŸÐŒŠOŠ¥š¿ŠÏ‰UšOø7<4ŸŠ/е‚N¬¿(ˆâ+â2!]l-B®hÝ Ñ+ªÂÓâWÄ5ÂsâZqH˜-¾-nø7'„…â.ñáUñ”xJè‡Ås‚[¼ ^úÄqDЋׄ~þy,!"þEâmñ¾°ÒÀ i›†LÃCÂÛ†©†Ç„w …†g…݆yE8lè6¬®¾aø†V6¼eÒ¦Þ5ìÒNæÿ¯ªvªádžýÚ\ÃÃϵyüó@ÚBï ç´å†ó†+ÚJà ÓΗ ¥=ÚEÒ_RÕþ>ý“ôOtüûr [ •Yÿ¶qÍî±&¡•°BÅ\G±×Ö¿t¶¶Lq*%P?¢„•D­Ò´VÙ§TŽÔPŽ+§”3ÊyeD¹² uA¾²zOY7¿a¾]T6)[•Êîùókñ®Òá=~“ÞãeͧšO™€wôD¦Å¶‡é“¨LxWx—i„÷„÷°m·ð¦þMø7¦§O¢ŠÂ¯„_1‰¾ –"|(œa©ôT™>}š&ü^ø=K§Ïfþ„ßþÉÒL­F«ÿ_ƒõZ‘M¡oŽek§h§°iÚlm6Ë¡OŠN×i‹ØÃô­°û|gÿù¾o{33ˆÂháAÁ(Q$JÙB\Hà—‹ð]Ëçñ‰òrÈ­î~@é^áG”r… […/?£tŸ°R¾°‡ÒýÂk”F {)= üF8Hík§T€ÿ û!á¸ðžP(üR‘ð>¥‡…(. QÛ/ ®Q¯Óë tƒÉ÷•âóã“ïË&áóãeº\Ý}ºûu÷ _Å÷=ËÉÎÀ7:ç ºgu.aª®ZW-ØðYr;¾ÝéÐuAÁ© ëÂÂt]R—fè¾¥[*Ì$ß¹\˜CÞóÛÂ7tßÑ­žÑ5è„gñíÎyäIw óu-ºÁ­Û¯{Ctmº·î·ºß >Ýït‚ú /P Í…æB!ŒOçEÌš‹…(>‘7—šK…„¹Ì\&$ñM¢>·Àì2SxÎì6»…¢¹=+ôB÷'ò/K(»-„ý„6B‡†#Žº„¯+-Ê~¥MéPŽ(Ç•.åŒr^¹ ô_ èfJ–@v '( Jeò€50#0;P¨ø¡@"°(°$°<°2°:°.°1°…RS`G 9Ð88è  œœ œ t..®ë‚bpp0+8<82˜,Ž N–'SªÚƒ3ƒs(Í JA% ¦‚‹ƒK)Õ××óÿ j¬6úi|Ö2¿¯ðä›~;(Ý-Ï‚–ß -ÿ´<Zþyhùphùhy´ühùHhy.´ü Ðò´ü~hù(hùÐòÑÐò¡å ” ¡ëc ëEÐõ±ÐõG ëã ëB×ÇC׿Hº®&B¿¿ý~Lw¯.—ôž5{4ûËÐì2|?â hódhóW ÍS Í_%mþÙÀóºçÉø[S¡Í•Ðf«îûºï“=°NÛñý´Ù mž¡ë =ž©ëÔu _3?m~Z˜ežkž+“¾×LˆïKûçšÒøÁšÉñvîwMEü0E=~Œ}'ËfÆOÖ̉Ÿ®™?W#Å{j”ø¥šHüJM*!ðøb Ɽ1¬YL뤶žÕ,¥õGçš:’SŸ0± Ü[“Z³>1Œ×¾µ6cŽúd2´5%½p›xm¬Ù”¶mMä¦çõÙ÷ÓÜc]¦5}Û–Åe5;i /UÁë5ï °«ë2¯WXé=鵘¯éúÖoÅ»5»£µ ^cÓëj5û¢ Œ¾5’×LmmÌ\+oX#µu2šƒ´Òcí£õ°¦=Ú€Þò:·OEŸÏ"ÔNâz,1®ædb"ÊÉÔœNLª9—˜RÓ“¨¬¹”p¢œm˜×¶[²#¶§š+‰Y!!1—}QÈ”pÁ.Òv ùEèÉa?J¾I³Ìù-~>ío²­~vÕç_Òí'ì7CÞóЈD°ïy®OöÊMÄB£ ¹Ý¡ÂDmh\b|8÷‡úš˜Xš”hÀsŸå´v…¦h~ô÷“™¾’ýcÚGfúDª 9\‡ïÑ„fÅí‘©ƒ‘Ý©vÇ6<߈kö¥£Œ|VèHÒ9˜:–Ž_"í©“¡e‰ýðcwD§N#¦ ŸÚž8ªM´¤c‚ȱÔ9ø4^ÿ9n`_w2ÕÃktätêRä\êJhâj¤g¹´À¹²`hTX0,jZ0":tA.b2Í_âYŽÍ´¸ 1O:FaYš ¾¶`ûKnW_l—ŽÃ.]÷Á@:†Ñb–ÅñXtÄ‚BŽw¢¹ Æ¥ŸG}êþ¦ñ‚Pߢ£LDÇihqâ è j±ß ÐÆµ\׎ÅÒè×¥c´b³h¡ŠÏŒÍ8öÊŒ¿8æJÇ]1·ÏrmLn²-²¿ÐÜÄÚ›ìʕ؎±BžÄæP0ÑȾ(]/Klg½-Lì‚>¥ý×a›#ýÃuE¢-Ôè@~mâHhCâ8#ÓÞB›]ì#B‰3ÐÏ]‰ 7Å1„PK¢ }dÀÙoµ%õ¸v$Íid›Of‡º’9}öÇ>èL2¾æ|rtèB²(Ô›,æµ' î/ï±`ÔçÐÕdIXŸ,ƒlòas²ýÔê‡-Ik8;9#œ“œÎKV±/ NV‡‹’¾pq2.I&xýÃÈþ‰b‚pYrQ¸<¹„ýqØš\Ž= ­…áÉ•áÙÉÕáªä:¯purcØ—ÜÂû„p"¹ƒÇ)¼(ÙÌõÃK’­áåÉá•ÉC²ÿOûæðêdgx]ò(@òxaÝoLžàqoIž 7%ϲž…w$»áÃhÃÍÉ‹¸×š¼ ’ר—‡¥Äpgjpøh*+|"5<|*52|6•îN„/¦Æòø†/§&Àqÿ¯¥JùS“Y"ƒS‘¬”=2<53225§O(çø#’Ÿš)HI‘±)åšÏLHE"¥©æì$29µ8R‘Z±§êút5½H¯Q”ÌLÕsÈœÔ.ô‚βÜÒ ÿø”¿£Aé.^ÿw©WÊ9rž$wÊ-­ŽÊ'äl-’ÏÊÝòEù²|Í#z{²<Ã=#=ùžÏXÏO©g²§BÖ§Õ°{fzæxæÉf5y$â‰P½ZÈ-âš|ßGoàsþÛ›H·§ý·œƒ:È6¦Sºç Ãpú9œƒ~ç ÃŸ w AJ98 ½§¡÷â4ô 8 ÍÃiè}8 ½§¡£púNCÄihNCÂih!NCÇà4´ˆl®C+tRz§¡Å8 ÓÐ/â4t¢ððŸÂ—„)•âLôqœ‰~g¢OàLt2ÎD¿‚3ѯêru¹B9ÎDŸÄ™hÎD§âL´g¢Óp&jÅ™¨ g¢vÝ·tÏ NÝ º„§p&:g¢_ÙèÓ8 M–þkáëº=º=Â\œ‰>ƒ3Ñgq&:_\!~Gpá—«ÅÝâA"»n<â9ñ?Ùo/¥NX(Ô^×U7õØ}Ì}Ò}Ú}ÎÝCé’û ¼I* “FH¹H)(Ť…R-¥eÒ ©AZ+m6KÒv¤QR¡4Nš(MBš®”œÄ³¤¹’‹ë~ éÍÃšÞ ÃûYcô4G’ö°®ˆ4þŤ=¬+&èÊ Ò”'I‡øÌü6ÒŽ¹¤C¬C CqN~;õ+@šÄÚEº°Šô‰õ`iÁVÒ'Ö€lá—”>  ¸‹æÿ é-Ÿ‡ßMsþiÏú=˜õ‘8¿—fþ¼‹9ÎÓeÑ߇ÙÍǼÞ¥›¯s `F¤ºÍh!N¹ÇèVÒ,aÆ,ŽÅ™ö#º_ëv ãy¢yRÆ|Šwº û'i‘´Ä=Î=1¤ÑîIZšÒ?IËÝ•n§š¤•îYîYÒj*é—¤uÒF÷\J.JNÒ\ƒîX:IMî…7'i$,t×ji™š¤f÷ ÷ ©•¸áæ$p¯uoèK›¹®–µ´½òo÷ïrïr·¤“ç‚{¿–Úú'‹»#ý.ÿ~÷J›©¤_’'¸{ÝÇ)ñûº8ù $ ]Ïà $¹çféî6_$´¥GÖ}^Mþ6÷÷#qïÍÉßAý»Ú—œ’¾/™Õ4ÀH’:%‹”Ý—ŽJ9H'®D:I§¤(·S‹YÿäÃ襋fì{™|Œj8å“òi’ÅV‹¡¦j+<»ËܳäsÔþêó%*_Aõ&’Õ­¯Pnœ<Ï#¸'yLž¡žažž\Ï(Øò,5y =ãØ^==“(MñT’µU‹õ8=³ð6z“g®{™ÇÅ6é!ÉT3è‰yzj=ËÜk=+4ûc lô4x‚¤kè[Ý]+Y¥Ï)dzÙÓèÙ.UyvÑüÒlÉõžÏ~O\‘TNmZ+uz:Ù–êTÿêâù"?i[CX¯®¶Mš¿¢ê»Æ$íŸm´¦ÙvªýµíÖÆd²¿d™Ë¥ù´‘_´ÑØÙ¨ 6–{N_m<ùY¬“é5ìtÆ8“» Êà{vZ/ìCµvõŸ§~sÔ·¦¤ç©N]íÃÔ¶ÙGd<Eí þÞ©­}ô·=W+Û–Ý ÿº|xËX_3ÖØ>ôd ßúÚ·^þWÖÉ\×ka¡ëú˜±Þõù,‚}Šv¥uËîÔlŒü‡Ö$;­AvZì­œl˜×Øm…jOvZgì1ÕÙjv¡ÙAÚ/²n±ösðOi©Sý?ßçûÛV?»Jû—>ÛªÓÚ¿L›óןG}²7;­Möµj»í´&Ùy êÒ|÷Ö ûví¹ÏòAýýø@uÒmÀ÷Ý3_ǧúºÏò§y7â&?™é+‹3|d†?DÝ<­N‰:죧“þL/TÁ± Ï7Ç4ÓÇie¤+ŽrʳÓâ—éÙ{5?Fs:uk™êÏ<ö<^ZL0½Róe¼þ¯Õüë­ÑÓIÞt’ç öN'½™Nò¦“žMg™¤cÓk5ÿ™ö—ÛµØ,7Å®ûQÈÒd ËT‰võ÷Ãý|p_ “öÃÜO–Å÷H§¦7d<¿BëÏDu¼sQߦ¯ÕÊ&e rô]@×þq]j3Ð?®KÇhÿ•Øl—ëÆøk¿ëzÜ•c¹´g[2Ƥ¿m‘ýÙ;\7Ù•ýˆ«/Ʋ³]w©¾¨Ï_QõÚ~^Ó§t9×éÕô¯äWšÝ9ÈÆ™öæÈV}„#GÕOÇèâ‚£HC± øA–_¢]Ë®Û Û„ƒÖ:ÇŒ û£zŽÙª½9hvT|êÚ“üQ“:NÜgGˆÐdS?‹´~jõ´§s,'¬$¬vÁ9ÖhçØBhR×?ü$ÅŽ„fÕ;ZU=åµÐq€pˆÐ©×Q uŸà8«Ž“£[­ï µÃq™pMÙÿ§}³“Öç`,ë é¶3Kw'ŠΑªž9óÕqäyth÷Æj2&¨¾ÜI1¢“âC'ûŠÇœ‡9)®rR<å”Ôñu*š£þ;#Ú5¥êƒ“b!'Å@NZ#œõ×õ‡}7ÇNŠ…œ 97iåšÏuR<àܦÊg;qÒ9)pîËÐÕô> ½FQÞyP­ãlWËøÓ·¸ýÍ|ãïé¬L,ò¿¨êÛ…_ <ÂhB¡˜PB(˸–¬„„Ù„*B5ÁG„E„%„å„•„Õ„u„„-„& ;Í„VÂÂ!B'á(ááá¬öÎîO¹^$\ÖÀõ¯ ‚YTË̓ YZÛºµ+õÁ<œ0’¯–÷] cÕ¶š'\ï³¹”0™PA°«rÌ3Õ÷™çæ$­\!D)U®y1a)¡ŽPOXCXOØDØJئ]wf\Óõwöi×MÚsû2î$´ŽNN_¿òø˜Ïzþ†kz,.©ãø·s‰*X>æë”V÷\?\QÿÛùô5ý|Zîm&ÂPm¾©ü¶aׯ· ä ¿°UÚœ¶Y¶¹6—Ím1ÛB[­m™m…­Á¶Ö¶Á¶ÙÖhÛnÛek±í·µÙ:lG(·uÙÎØÎÛ.ØzmWíz»Ùn±gÛs€<ûhü]D©Ø^B(³—Û­ööÙ¶{•­Ñ^m÷ÙC@¾ȾľܾҾھξѾÅÞdßA7Û[íì‡ìö£ööSö³önûEûeû5‡èìÈr wŒtä; c¥ŽÉŽ ‡ïSùLÇÇ<‡äPGʱر¨sÔ;Ö ˆõŽMŽ­¶ c›–vR(¿›Ò>ÇAG;åké˜ã$pšÒ9J=ŽKŽ+NÁi†:‡Ñšp÷€¿¸ h¿¸`Æ/. Æ/. Å/.Xð‹ YøÅ…aøÅ…lüâÂpüâÂ]ø­…»-y–G…{,ã-åÂ÷Å'a‰ååCa)~}aëÿÇ-Óé†é"ø¼J ÿoòùÅȳä—i(×`ÍÈ3Èjògky®W¥å«5ø4×Í'¯›O^7Ÿ¼nþr­îJ­>—­Îø{vݨaKÆ;›´¿wc¬í”[YOZOS:>mí¡tÉzÅ&ØL¶¡j²¶Û†ÙFØrm£¨´Êsmãl­§m“lSÈ&a•ÖKd—N›‹æêüÒ†€ßØÐã76 –bK± Zž´TFË4‹C„ßÛj™o©¦yð[½–˜%.äYY¾%ä[–ZþYmiµ´ –×-¯ Yº-ÝBáÿcéºkψ_%žKÚ¡»6ùÁÈ?Šü£È+‰'(¯Fù_I\lü%ò•È«Ï>Šü <ûñX”OCÃÏC~•8žÙø öɸˆòÙâfc’x'ê¼ÂïýùOö¢ KQ@~<ò㑟 ¶VãEà(êÌOþ·8†ø”Ö£1¸û Z…žŠ¡_~´ÜÇyÃqä͸+੟¢¤ÏÚPròOàÙvZò؈:QÇC<ùqÈ‹¥(WŸ (ÇÝbÜý’ø8³1€–”¢&çÇ.¢Ž:+!­Òx.Q®r x&êHÙ ™4ú§øú‡.âdÝúòO€cĵ\G§¿„úh§^`6xPó%£›x+dÞÉ%ºw9¯ûwW¡þ“¨ÿ=ä³!í#ð)Ô¿"þŽÊõâ›Ä3Å£üÎëþ„ø.ñ$®#ô2ë¬à?ƒ÷2 ¨9 ržæúº÷!¡ùŸãîTÔÿ ê"|ü*ê(†©¦ÝøÊ_f½Õ›Œ¯Sþ—ëªíħEÒ}×>4¾@ü˜ugµbC1ää€GâY¼ |—øÜý&åϬ?‰|+ø0ø%±ŠçÈô!¸Ü®÷0Aïš Î j¾hâßP©Fþ ðí7ëÀüì]¨yww ä8JjQ²IwÎ7ƒ›Àuà0ן†š‹ñ” ²ñ‡¬È¿„–oE¾¼U+i×{ÀåÔ—ýÆ:h‘oüž]¥q3¸ \f «0ßã:†uàï¡ÍOAÎ)n³îCcñ%ð‡Æ—Áð|04ÁØMîÂ|]FÍSàó¿8Àº’kp ®AÂ5hÅiÜ=’ÓZI ±}¹Ïx:ÓŽ€çƒßf†&œRuŒó¤i,ímä?¤˜žÛ@%úR©/ú·XKõ#Q2%#aÝ#Y2ñ›àhæ6êã"U?!¹¼J{–í"¿‹ÿ'nz×Ëàx>øMp7˜ežÄ³'1‡!í0ò/!ÿŠÆOí6} ÿÀõK¸µ¤É\r–-4ü^YÐòbÍÿ¼€šü–-àUà¦9oú.,w:¯2°Ü“¸Ûª±j¡œŸeƒ»Ý(éFûy„'šÞf_‡Ö¾Ì«¡îaMÌAk?Aù/1æ÷"Ÿ‡¾œæHI?Cdù¢…øGú»™i¾^€WáY[>nd[3<Šuð!fCžH%úßBòPó#Hþwäÿù©ßÁ#OÌ’­hsˆYØüyð׃Ž+Xþ㘩BHèT×_Ž£(Nø&¼kø D/çE½`}»w×£åoã]{!-‡{*þ+†c"~ŒùMñúnÎÒ ïp^|ù ô·½ø¾âcXbÚ o¯oå& ï·i­å–ä#_$Rìª{ ½þµHÑ n2ÚvÏBÛõ¥bmOÍâX?ËðGâ5â“$¹ ó¸K”X?õ?¢üQHû@c–ö ä|2‹E‘ø}fÒº{ŽÊh ƒ0?ÁS1ptàœÈ£· À?€'òIôýeŒóôQÁS€O‚ýÞ†gç€+ðìn”îIKMùÜ/S³¨p±Ó¸‡,ï2ÅŒ¼NUa¬"?£¾…GÕÔ»~­}zò>¸AÛ§¼‹ÙiƒN¾‹Y{#ýd+£Í3e¼‹xöDzÔÌEÍ·‘_†·ORõ sñS.10S”OCý÷ÁƒÁmˆäMgñ.ù Ï Í/çÏjŒ¹F~·ª9\Bš`Å Z1ã´–þ•ö•Nãfí[?ù=[â'¿7Ò,~„H©ÇD|Œ×Qæ¼á—à‘ã1ñxEԧؘã¢/àYâ¢j¾ÁûMñ-öÒì Oó~YÌÂÝ_á©3ºåÃ!á*xê» 'µ<†Wyl ]ÈOgóxŽÄ|èFê¿zÙ¸uÆC+r¸¦áÛ˜Ù?"¯àîC¸;ÚR ê^u¸ïzQÁ+X+xÄ ïc©ƒo<ˆU£ãÃ&D¤õXƒ6#>\Œ’Õô@Î>ðQð;à÷ ç ¸¼kÓ{Xgw3ß@¾¼Þµkпpü&ŽA÷ž–o7ëÀ=|—w^Æóÿi¨9ü˜éÄêŽ ;DÛÀu`–ðKÔ\ˆ§^åb.™Á%ÆyЊ*ĺ À6p‘a ñgö¤ˆ`ÅÑП×ð.Ô4Ô±/QB̽8ÉhÜ n×Išñ!Þ“š^‡Î¼eNO ´M`7ûS1}ùf›ÁMà:Üå~=Çc%îåü {M?ÏaùxJÔ˜Ç{Ã6Èúkü28ž†.qäfŒy5+Ø70¾Eù?ß þ!ÊiÏ¿ ~„õ wÛPÒ†’os¬kø[¨î[ˆ¥sÁ_/@l™‡}Ðcˆ]‹×C£@cë9ÔW@ò¯»×]hÛPþ–#ÚÐþ..ïÑøep<Ìöõ ·JüïaM?Quž-BÒ†€7!BX;ÊFü…þoÀÝ÷4~Ï¿‰:4žâ}üã|®HÌuöà©=Ègcz1J'ŒM°…\¾«2v¬gyÇ*žãã^n‰ØŒüŸ¡'"ê/6~ˆYP™w¯¿çÝ+kE§¸mc߃–ïÁ]Õ‹–‡³‰ž/ãݦ§(¿™Ë÷A“ÿ~Nó¥ìyZáKW¡Î Ôÿ),î°£!ð¨%ðÀë‘=0é=eÜyiƒLì^ «!¹ÒÆ ßÌû_ÚáòÝj¶2›÷²†›ì¶~É83¤zûßawS = zÖñE0vdžŸCÂO M_¤§Z!ç×Ü6çT"vÄ4¼†ÊØ Ç9OzÀGa×=ࣰÖðQ´öW”ÿ.Þ¸£t•cÃàÞ‹hÛk¼Gÿ'8ÁlÀɉ¡Ý´œ×;Xñ*ä_EýWðìwaéu\bò±70PþêŸ? Þdêe4—W:Ôù1kΠ{iWQ Ú<˜WqŸS‰s ?œ×sÛŒÝ<ûâ0ØÎbu¿ }Øf<ÄzÂåâûÚžšO,›°Çy v=•׈A•˜»w0SsÞ4Øx;ݽŒ5kïˆI{Ù'”óÝA•XY6±5‘¿j¿ ¿Ôæ5ÔŠs¤1(ïByÊÿ„ò3(åUö¼EÝy-ÆÊx¼‡ßk<Å=2á<Ö°;îÍXãÖq}ýoxM^n>Føc´™ýÒc¼×6Ý«ïuïc¦‘쀟y-aîÄÝ!ˆ‹†päCþðØÂËð|·\§y~ê]ø×yßMuÖ£|=ÚezžòÍhó“â=ÄÿƒYÌÃøï@Oÿ ³“B¯k5¹$û ßrÅ;ylÀ©²AݵÇ®í|ò?aFbÞƾì‡Ð–FòE&3žúÂ/x?nTDÚYˆõð±!<³+‘oäwé¿„7Vc^^Á®_Bþ;Ü£°%ßå]¹8í|õ/àh•qò‹yon#¯Ö©„‰àg9^¢¸‘­rx¯ háÐsu7ýhÂTôýC+õk.Ë1%À‹˜ÅMâÏá9Ù"¾ÊyãBãB´ŠÇsê¨ÿÞ±ÞÌÈw ñÿËÞ¹ÇëTm¬9×óì½µMÒ&vrvrWrKÈ!R.IH%éâš„äž:H*¤¢T*©äÖM§‹K’„$DI’ä~Ù$ñìßßµÎïÍ~û¼§óžóçùô黯3æ˜cÍ9æ˜c=k=Ï~èU,à§0ñŸ¾¬÷Ýv3ò½[·Õ›èݺÅ\ éHì ð†°„×LeüÃíÏaÖgB¸[?åI¾Ä{ÂŽz·îg§ã9GïÙí|ö‹©1,oÐûôÄûðF½°¿éܓň@sîÁ·Óë6½O·E‘ÑšËx~f„o¡?Äg9™dÎ^ÞÊ|{ÂZñ{K½ª– ×*½s7_ê»}˜ø”àùá6FØ6guF³ŽWéªùìõ4sДdœ“¸‹D2w(ãÙkã¹Ó¯wU¾Õ߉$ÊóŽz1–ÀwRUvðªˆx¸ Wá¡ –û¹×«¬š°2šh&…~Åúš2ð!î—¯å~ùZîÂêp÷¬Þ+ùLðö¦;–_sÆb¼ÿ¼ojß°1òýÑܯÞ<¢/ ÏåÊî#“ø‚Ùõý]¡ŒÏ:øfWÞ«÷ž~üÌŸ•ñY™™îg¦û5Vá ê9Ù8±> Y„‡7"ŸNÈM‰Cƒd b¥¼†û÷ÍzÿîgÑBŸ}…_pÞì -x8‚·zµÒQùÊ£|.,ëyK8ÂëSQ¹_ö÷×Ú:–DS?éå>¡ŽíB4ÔÛð\Öb<¤´+•‰ÕÊðBx¿öMTá,EñÙ Ö…Óñ6*ŠÀ DøØK+^Úr@zKâyœû¾;yJßKå´$W½ŽÚš(O„WbÙ¹«ÊiËÕ[zK}g’Hq?X‡yE¹Q›Un̺LFÎÂC=lféó{›Æ?ÌfÞ 7ÎÓ«˜Ý©³³s #Åf+¼^¥a«YLû&¦éŠ'¦£¯å«¬òh•Í>4u’µàÍ7,Kèjú_Ié»ÓÅQüU¼Ðú9ž'F³C>;Š<6)l΋æ‚f£Ú‰üE<—†Ì+Ý÷BßûT#Ä'†eõTKf1‰‘Ob´“›r<š#pšó”É%a6ÜÁËÁX þĹ¢ |ùG˜jäÙù,Vvd”“ª7s‘/HéÝ÷WÈuÑ“&M™$Ó’ƒ”áûx8¥HöR9±’µ~%ŠLÞsúi#öD¹·'Ã/ØüJ¬Zë®ô{ª8ù¯­ò©Ãºã˜éÀ˜æxž À¡´ÅÛPÕøxªþJôÕ¡ÄÌÑëòS1Õ²%ÑÞG>‡U˜ U¾BõöqZséu1#Œ2<—ÿ`s´"Ìôù(Ÿ‘»`3(­‹ª‡Æ*\OÄ¢ý›…\’È,Á~Iê2}*…<?§(-»Ø6#·ñ´²šÁ¹è÷h ƒ“Œ9Iô²™Q:QJ)}^E²Î‘XÀ(;ÆÌ¡ïTü¨ý|®£õ5H<å ³Þ §ÀÏóÎò<Å  yù\äV­òjF¾‹Ö*ûŠ1Ãk.£µœDëT"@¶ÛjÈÑNÏÖˆ™Šè£ñ)|Ï]ñÐÏâ(©U¶Uìë¥ìÖŸXªJùKñUÂÕðç¼Iä•Q Är –çG5³|žÝgï,Gþ%¯‰gt™FµùJc^Š|%úýøù™Jh2`eX:Ú³Ø,‡ïÆÕébO®Á læE;RÌ¢T›õ0ªä­áºà£êï),{?xö…Q­¨ŸÐ÷Gn{÷ -¾h>ˆe@tíè€=5ÄtŠ®)¬f’ø‡ãá¸Rσ7Y¯<äùð}×Fë…L$ƒÈÝ`K¢t ¹ ­ ‘›ÁëRÇt„èÀç88ÎŽ÷ot.Íüådþ1vÄu° ú%ȵ±¿o\w‚O8{ŠÜàÊPÉm ,’-ÈÁ1ªñäÙèÛ!Gu•ÕOÎ$£ è0¼?I–Â[T‘®c´ïäMÖϘð—z„ùzËà êp*Éx –'¨Ã™Ì%ºNeÅu5‡ÜÖÊPM=¢Wªr }Aâ°0¦Ö^‹e³˜êa­sbæpÝéI s§Ö¥ZWÁwèÛŠgŒ¹<Ã/ɓƒɷ½efüíývJm¾“sŠgËõ[ŽÁ¥™É翟pïɪàÇP¿™³˜;2>m1“gèNçœÕ*›‡›¸Wå3/}.íM9]}"a+…wèÙ×ô=†ÊfxH³Qi‡¯ˆ>_ò–ò2èN¯¦ÊÄLži$a•ð>Ý›x˜ú÷½¶Njk²-½ÚÀš|?á8L³uÅí½1»TmT6Ãõ/\LO¥íc·âÍ[Ê eP:ê…f2Ü«ô³PN³ê,ðÓXŸ*˜e‘ZÛ)#ðpn…cà[VŸçTRšVïîsô¾ÞGS$Ñžqê·È2U#ëT–o”Þ^åjŸ¨‡ŸzUµúý½rv¢®¾ÆØfë3mz½뢩 ö‰EôÚD[Û¡™j‡hµA_?¦~(Œ½MÓ(1¶¿«lc<ÖÊD®þê ²1F5Á"ZõÈ5‚í|cV¿ÕÖÊŒñ¼PŸº˜æq­ºæa¹yY÷µÊæ!óçP£ŸnµÆÃ6J{'6O¾ëhÆy^dG{¾‰|}?^Ž`I_s}G> oG4Kƒï8û s–îe£YÑÎgœ…5ÿ Ÿò›¤×44…t/›òº—Õ>h [+å¨ÒZ<4ÅÛu¦„ÖL³Ÿ*3?èUy6–-ð¢ï_wÂð<ư;8ß[V ô §¯‹^s2ÐO™O¹z-0Uµ®šá|j¯¿,»'ئãQ M1Õ˜÷ôÊü¨×\XVQzožòò8X$ØŠåVÝéÈßCôj‚Ï5ÁtÏ Á½éHä'<Õ‘˜“"ú-ôð 2™…ü=rA¾~ò%è_Gãý„/&½Ï°=l ÷*í.8G™ÈDRiBø(š ØÜ¬LnIJlAkiäNÈí°Ü‰}8F™V ¹<­Â\4œÅ~†Üy8l…f¬ ­©Oë§ÈÛO›ñp&­Ÿ ¿‰¼^oDÏŒì)úFÞVÁàð+,k"3/ûg¼y)ãÙw£y o]èUË•èÏCž‹<…˜¼‡<>+ÒëÅ4õIž­ŽÊá^˜­‘ʉL4'‘/‹ÖÍÑJ©lo†`¼Ý­½Ò¢UC&&ÉѪa?´2­šÛEXŽ…=¢øpöËáâ(&ªñ×D•£ˆçp¬Ç‰vpˆV"ià¬KL€Ë°®ƒWCfF™6…qž,ˆyÂ1òÇ”#÷2°ßÍ,äXF9Ö:eú,í›^”qZlšàá]˜…þf]ȬÄþ)ZÙ#ázz•á\ÄÖNˆö1ÜH_bŽåñó66UñO² ‰*ç~úFkʺ[V*I.Ù› {ÍŽƒdoÚje:Y‘àú• Û“D;¹'i ±·Ô([^£gÑ{ðÅ”~ZÔ6†{•vœ£Ld¢?©4!|MlnV&7bY ¶ µ4r'ävXîDƒ>£L+…\žÖa.Îb?CîŠ<¶B3VŒÖÔ§õSämŒ'‰Íx8“ÖOßDÞ¯7¢gFö}#o«àðø–5‘™—ý3Þ¼”ñl€»Ñ¼„·.ôªåJôç!ÏEžBLÞCŸ‡é{}ó°¹ ù Zû ß‚> 2—äx­cax9½sÞ’Œ09ó §ÁzôeÖÁ!Z™‘Y@_V?1.Ãþ¸^ £F+Ík(,‹æžpødM9r ûØÌBn€e´Ö ½ÒiM/Ê8-6Mðð.Ì¢õ)d23\M<ËøíÛ´VÅ‘1 ÑÏCOö&¢获(ã\ý=6f4š=´> YCl_øÞ¢u¼^ [Óº¹½ªÃŸà¯èÂggäkñÃÈœ%Q ËÇð3™XvV8„×añK­é|Zï„DÒ–àŒwA¢—†&<‡ ªÙFû‚œOBS²§,ëhñf¢=Î~4±§oؾg ª ²]ƒf9òVÎN&X2ܦy’ˆr>šÑBl `?M´²‹Ð·Ù1[ªMr>£Q±îáÈ.Yý€‘'‡Ñë^ìO ³wÂûà&ô¬©%þ‰èÙÝ!™`¨„a7ø6duU’ýÈÑJ±š–ø'É{$çí8H&ÿYëõ<ŒæòD,¿S&Ö)ý³iMW¹ÈûaUì›Ç`%8’ÖŒar'äœq6CWÐÚ?ð¿NG®#éæ=4 àÈLmSZšá©ùü+ìêyQJŸæà¹w<Õ£kdë+åúÎ…ãðƳM[µ Ë¥ô»j hm˜zÕ3%-¼¾06ÕTcFcÆó4Cò\4 UÆ¡o“zSóSíÃ¥´nÐV?w]L<·A_Ÿ3þsòNøqŽ`´GÛfí•èÃ\v¢¬ª½‚ZœkriüTMä„“O8FéßM)·¡)‰ÍNä"J{9£ªÉª-ã\ƒñÜnS&Cb[!ʼë4ëÔÆQþþŽ¯ì²°°Î%Yû*'®Ä&Mû(‰vIÎ’IdŠhÄ‚‡˜u»”>›íÉg HÝ 9–Ò§gÁ–œ}Ѹ¹“Z¹ôªŠ| Ëex‡<ý¢± }94Ghf3ÞÆ£i€å¥¯8¬W”‡Œ¿sùž1l#¢Lž ³öw[‰ë‡³R¹Ø§ðP…sÕ¥µ*ù³ }m¥¯ïº.Íbår`ž×Fñ£¡#oÌ\¶«bè ÂvXöŒÏ{’}q’Ü;L&D–·R*ûÜ>L&«Í-pš°Ìæ\ÙX®¦×2l&Á÷hmïßê~.IÆ<9~޾$üñt,™oïhÖj鳈§ÖdT2Žê4²šhhd‚îx~š:°ˆè-‰Ï¥~ª³RÅ¢JE¯ýôZ‚eŠl¯Šå<23Kådi)D¦ÍgÅuü“£ïõÖ5*oc„{ãŠW‚kžeU¼g'úÖ7¢½¬Þ|µ|šQU§WTWÕóHžï—.äU½¦çµöòõdÝnl¨6ÚGcéÛÒ|FæÏg5uŽ‹£Úˆå0ôm‰ü¥¯Kó©ZU¢™ÓiÍaÖ˜ïVø<‰çƬ×e°4lÛh•¯£V¶'µfú|˜Ïnz•¬8É'¹'ÉÕ“äóIÖBåãÄmx|+Fg=‰™Ö‹®bÔœý¬ÎeY”ÆUÆî² ä'5ý{ào©‡©ZaÚ2κdiUrx-YM-ò–Ó°Tû×Ñ÷IJ)òUè§3ò ȳÑ_™Zû°ûë{r=KjbÞvÖ«îVÖôjæU:º®¥>æóú¢:ZF>‚¹ä`Ù&Å{ú–”RÞgv¼²^>5G=‹ð;oêßéÄO•R}Õ‹¨&u“~Ë:Õ^¿ ŸâïAR«!WC®¡ßÓNÕÔïÒ{}ô3‘oÕïé7ó½ü ò~ä½*ë_ñø¾è¯Ü ¯©ßô~fñÛ,Gù}›Jý;ý;÷T–þ5G*Kÿ$õV²§þÊMÚýú+7*ŸZ¨rjDòqý•›´ƒê?¹C™vy‹úOÛ…ürdÓÖÀ²#좿{£c;µ-sòì§!G½v3æ\ôeÐV¦]ÆìªÀÌw$­ó`úK°lĹö¢_‰Ïêhê™Hs‚Ö›°ÃW¥pgoˆeeúªeUäªÈÕ“+ÐG®ŒŸH_Ž‘\\ùFülT¦§!óK>éé´Þ„f4ÞÞ×ßÀÁÃ%x¨†\ ¹†þ½¼·ÿ¹,J¯+suÆÜ‰UžÂLÒÊØ’¯ ¹~si=Ûó¢´×‘ßÀç"䱨¼ ŸD?yò¡þ ‡­æa >—·§ò‰›~’žªvêgÏ)ÖB?y÷šÃÚzj¡F2Ò¤†ÁH/Z˽r¿t–;ä. Çö%MΕ2r–\$µ¼—†r•´“[üYÛÈ}2ÂWŽÒGÊ(þÁ¨“t_3ÊJ–T•KäRiä«ór«¹Vþ&HW¹Sî–A2ZЉmÖªUSiÞæš«s¤SÛ6WåÈD¼œÍo†þÅ׿rÞc5©'—K¹ZÚËmb¥’´•¡2RºIOé+ƒe }2$GÊ‹^éþ*¥¥T–GЗÂ>çI¶Tð~kHm©/WHS¹Fn’Ž~ÜÈu2L”Û¥—ô“{dl<‚3å )-çHE4+¥™´’ÒIr¡\/Ãå!é.½¥¿ Ñß2í\½_g{=¼vƒ½á@8´sÇžýíCpœ§Ã¹ð½ÎûuµKà ¸®‡›á¶Î{õ±;a®24°0,/€u»ô¼ãöðJضéÒû®^a;x ì{À>p ¼¯[ߎÃp,|¾gÂyp‘wÜ1\WÃõpsÏÞz…ÛàN¸†ÇaJ™{ÞÕ¹g¢, ‹ÃR¾±o¢ ¬«ÂZ°l›Þ¥~Z¶°=¼ vƒ=aß»úvé ‡Â‘}T?ŽƒOÃÉpœçöók”˜?€Kà ¸nèwGïn‰oàv¸ ðD¿^û$€Y°¬«÷ëWµZ²l [À¶°ìâY=Ùö‡÷Á‘p,œàY#9N‡³á<¸.õ¬™\×ÁMp+Üw÷Щ_ò <O*Ó L‡®ß€>ýÒ²`6Ìåà°zÉ´Ú°>l ›ÃVðz¨ïƯ=YÿÂÑú}~Ž”üÿ’~8ôÿÍ„¯ _EÓ$ý?ö*äU$¾êågÁ?IëëÜüæò¿#¾zÿ1‹üiVÄx¯úЧ=z}Ðw‰šgþižû±ðŸf#µƒßQgð{û§´þJULŠÿ‹ÒÙHÆ_ŸJÿKÇó¥Ì¿t,+åþ…c௤ÿœÿ<&¿‚ÿsúS¬æßmô÷Wý 2]æÉRY/;$7ƒ¬ LP3h´ ºýƒ‘Á„`z0/X¬v¹&4¥L 3ÄŒ1“ÌLóYi6›Ýæ„-`³m%[×6·ím;ÄŽ±“ìL¿õ\éQÎÚ–ù^wÊ÷zl¾×ýîu˜¯=é·ù&I ~÷º@ÍÓ_gN;½¿;vºÿ¬ö§¿.*§û/š•ïu¹|öMó½îïu¾ùÝ|úëbò½n•ïõàÓÇ_ò…ÓÛÏ]púë²ä{]åw¯ýþ+[5_û^_ŠD3,ß*:Vˆfúœ+ækU¹X»6>nŽ;âãÁ?²®T3>ÖMãcÛÓGQiÌ鳬\ëô×UR§Û_Ôîô×Õò­Bõêù^×Ì÷zm¾×ëò½Þ›ïõþÓ_×(ò»,óB­¬|¯kn_«v¾×ùÛ›ç{Ý"ßë–§¯bæžÎG¦sð”t &Sm;ùÿÄïÔ $ 'ÎäZQD’™Í̦ܲn©[ì–xM2Øìóvƒƒ‡ƒÃb‚£ÁQ±®¡k(¡»Ü]šÆ^au½Œ)bŠzþ‘ÓñØ‚¾gÿº˜¿é+“e™l“A–CºUVfk1™M3Ûx6˼ÖSgWØ×ä·PÕßóÔs»ÄšÂ~L?s\æü–)ê_ïá¸Ìmã_mò\æ6{®ðsÕ Í–Òn›ëbßú=Çen»?.ñ¯à¸ìw–;bËc˱åO±å?Æ{ãmÁx¯f¼ÿhiIË5´´ú}‹[ÉW1ÂÕŒð-kiYGËzZŒ¤ÿŸßfgýævaSØGµ¨ªÍ¼2³‰úb·X’~LK|¤¬è?°²ÍÜÇîcÛÜ}â>±W¹ån¹má>uŸÚ«Ýgî3ÛÒ}î>·×¸5nmå¾p_ØÖîK÷¥mã¾r_ÙkÝF·Ñ¶u_»¯íun‹Ûb¯wß¹ïì nŸÛgÛ¹ƒî ½Ñv‡m{—ëríMî˜ûÅvðÉÛ‘ú%T® 8œðU,/ÈóÕ#aü}û,Á>K²ÏÒL¶É–tSÚ”– SÁT¶©¯ng$:%:If¢K¢‹LtKt—èžè.…}}¥p¢¢¿œ™˜(E\ŽË‘³\iWÚïñ2®Œuå\9)æ*¸ r¶«ä*Iqw»@J¸*®Šd»ª®*¿S_CJº‹ÝÅr®»Ä]"¥\WGþâ.u—JŽû«û«œç¸¾Ziý=Ÿú[Æ5qM¤¬»ÙÝ,å\g×YÊ»®®«Tp·»Û¥¢ëézJ%×Ûõ–Ê®ë#¸þ®¿\èºRÅ vƒå"7Ô •ªn¸.ÕÜH7Rª»‡ÝÃRÃv£¥¦ëÆÊÅî1÷˜ÔrãÝx¹Ä=éž”Úî)÷”Ôqϸg¤®{Ö=+—ºçÜs¾^OqSä¯îy÷¼Ôw/º¥{ɽ$—¹—ÝËÒнê^•Fî5÷š\îf¹YÒØÍqsä ÷†{C®to¹·¤‰›çæIS÷w÷wiæÞsïIs÷û@®r ÝBiAý»šú×Ò×Î¥r¯Ë¤•[á«gk·ÒWÛ6n•¯¶×ºÕ¾Ú¶uk}•½Î­óUöz·ÞWÙÜÍhç6ùkÆn³¿f´w[ÝV¹‰ßˆïà¸r³;äÉ-îˆ;"·º£î(Ͻ¢û«@jRk+úÜJ77{u× «á»á»b’§’§Ä¦×O¯ïëð&û| üoöý7ûâìË&û*é»­àŽä–ÿæØsì?”cA¢‡?_8(mjÚ+ÃvRRêJ#i.m¤½¿_èáß¿ñï,ÇÈ2I¦ÉLyK>%²RÖÉfÙ.»å°g/A2ÈÌ,6£_FÿŒ{8ÈÂq`ƽeüÍû{i(ÇþÃ8ÈÎq`Æýe<à¼ÝHŽý3ä8 ã!Ž3æ8(c´?ôvc8öÏx„「±f<ÊqPÆãþ8ÈÛãØ?c<ÇOp˜ñ$ÇA÷‰ñ­#<dŒò˜ñ˜ç #"O1ó~OÇ‘y&ŽÌÄ82ÏÆ‘™Gæ¹8"“ãˆL‰#ò|‘∼GdZ‘—∼Gä•8"¯Æ™Gäµ8"³âˆÌŽ#2'ŽÈÜ8"¯Ç™àçß/c*™NDfþ›y3ŽÈ[qDÞŽ#2/ŽÈ;qDÞ#ò^œ+ïÇ‘ù ŽÌü82 âÈ,Œ#³(ŽÈ‡qD>Š#²$ŽÈÇqD–Æù$ŽÈò8"+âˆ|Gde‘Ï∼ADþN¦,&"Ëþ͈|Gdu‘5qDÖÆù"ŽÈ—qDÖÇù*ŽÈ†8"ãˆ|Gds‘-q®|GæÛ82[ãÈ|Gf[™ïãˆüGdG‘ãˆìŒ#òS‘UDdÙD¦lÿ7#òs‘ÝqDöÄÙGd_‘qDÆ9Gäp‘#qDŽÆ9Gä—8"ÇãˆüGä·8"'㈜Š#’Šs%/ŠL‰"S ˆ"SÀD‘)`ãÈì""û‰H.9¡™¢ÿN£Ž›§ií¤b°ÎÉ´CíRÐ>gŸ“³ìösÉ*xqÁ‹yÊ-ÂRá_œð¼°tx~X&,– ËëÌüˆŽòt=z¿R2~6QYÛ|ŸèÙu`{þ¯E…Øâ}6e{ú ³Bý° a9ãwý¢óf…EÃbáÙañ°D˜­¿}çmÿÏy”‘Ba‘ð¬0&ô0=Ì „g„™aÁÐ……¡>ï ý܆ùAjþ5¬/™að¡8ßVKŠÛWì ;Û¾n—ÚOì2»Ü®°ŸÚ•ö3»Ê~þG×§eöeû²÷øªþ]³egùxϵ¾ŽúÈ}ìÏ·Ýîù_ï/{«Y¾õ;ß.° í"û¡]l?²KìÇ´Æxžâ½Ï°3ô™v¶÷þºõÕÙðsï]ç¡Þ«HÖzýƒy³íq̴ߟÌ.úi6ø~‰Þfž< #åAyH–Q2ÚïëGd,ÿºèã2NÆû]þ¤L§äiyF&ʳ~Ï?'“eŠL•çåyÑW€—dº¼,¯È«2C^óõ`–Ì–92W^—7äM_Þ–yòŽü]Þ•÷ä}_+æËY(‹äCY,ùÊñ±,•Od™,—ò©¯#ŸÉ*ù\VËY+_øªò¥¬—¯dƒl”Mòµ¯1[äùV¶Êw²M¾÷çÙ!?ÊNùIvÉϾþ쑽²OöË9(‡|5:"¹rTŽÉ/r\~•ò›œ”S’’<ŸÆimÚ˜kM[s¹ÞÜ`Ú™M{s“é`n6·˜[Ím¦£éd:›.¦«éfn7Ýͦ‡¹Óô4½Los—écî6/˜Mæk³Ùl1ߘoÍVóÙf¾7ÛÍf‡ùÑì4?™]æg³Ûì1{m³Ïì·g˜æ 9d›#&×5ÇÌ/æ¸ùÕœ0¿™“æ”I™<_‚ôÛöÖ†6a“6Í¦Û ÛÚ¶±×Ú¶¶ƒ½ÙÞf;Ú^ön;Ò>h²Û'í³v²}þiß¶óì{ö}»Ú®±kívýÒ®·_Ù v£Ýd¿¶›íûýÖnµßÙmöûðÒ°žþ»­áúð«pC¸1Ü~n·„߄߆[ÃïÂmá÷áöð‡pGøc¸3ü)Üþî÷„{Ã}áþð@x0<„¹áÑðXøKx<ü5<þž O…©0/Q0Q$­áÿ°÷`Q$k»U=ÓSCwO“sd = ˆT1AÄ,T kZ#‚" 1ç5§5aÎs˜EQä~]†Å]÷œ=çÞ=çÞûüO=TUw=ýÕWõ¾ïWÕÓM|‰iJüIiFš“¤% $­HkD‚IÒ–´#!$”´'a¤éH:‘pÒ™D.¤+éFº“HE¢!ÅBê)žô"½II$}HI&}I éGRI2€ $ƒÈ`2Ò0’F†“d$EÒÉh2†Œ%dO&‰ä'2‰L&SÈT2üL¦“d&™Ef“9$“Ì%Y$›Ì#óIY@rIÉ' É"²‚’•dYMÖµdYO6d“üîW²•üB¶‘ídÙIv‘ÝdÙKö‘ýäù•$‡Èar„%Eä9NN“ä9Mγä9O.‹ä¹L®«¤˜\#×É r“Ü"·Ér—Ü#÷Éò<"Éò””gä9yA^’wä=)#ÈGRN>‘ 5RcR@“%d)YF–“Wä5yCÞ’Rn7˜ å†qiÜpn7’Å¥s£¹1ÜX.ƒÊãÓøáü~$?ŠOçGócø ~?žŸÀOäâ'ñ“ù)üT~ŸÅgóóøù|¿€Ïåóø|~!¿ˆ/àóKø¥ü2~9¿‚_ɯâWókøµü:~=¿ßÈïâwó{ø½ü>~?€ÿ•?ÂåñÇùüIþš?ßåÏñçù‹üMþ6—¿Ï?äóÏøü+þ5ÿ†Ë—òïø÷|ÿÿÈâ+$`‚R`•p[¸#Üî ÷…ÂCá‘ðXx"<J„gÂsá…ðRx%¼Þo…Ráð^(>…rá“P¡A¬a4 RÃjT¢Qkt4œ†×FÔèjô4ú¡ÆHc¬1јjÌ4æ ¥ÆJc­±ÑTÑØjì4ö£¦ª¦š&[3O3_“£Y ÉÕäiò5 5‹4šÅš%š¥tõ™ÎíÓ9öÌ”Μç)Z¿ŸS´~¿ WtF—]ÝÐʦŊdE2ºŒ7 ]WLWLG·™ŠLt‡2û]Ê[÷(oݧ¼õ€òÖCÅ&Åfôˆ2Äe]e=Œè <Ãr,‡%VÕÃZ:Ç©º‡‰ÔÂ%t¾ý7ŽËf®€ÛŘr‡¹wŒu¢óí‹í_"d†ìóƒ@eìt†¯àÇ"F—™ÍÚÓ?G!( Ð…‘Â-V˜(œÑ…‹ÂmWhMÑnÊøg)㟣ÑÛye¾òzÄê³úØŒ}Ë¾Åæì;ö¶`ËØ2l©‚æÂVª ªÉØZ5U5Û«f©2quU–j>®©Z ZŽÝU…ª ¸¾j“êWÜTuHu·WWÇ]U—TWp7U±ê:ŽmPŽcU  Ò‰©·ÒïT;©ñµ‹ÚïSkÕZ|Pí¥ö‡ÔuÕuñayý Q7V7ÆGÕ¾j_\¤Pàcêêø¸º•º>¡U‡â“êêø”:\ŽO«»©£ñu¼:_Ô°_⢸h|™‹åzâ«\/.ßàpðcàÙlüxv~<ûâ¾3Cø.ü&RX ÜbFh&k²˜}Ÿïoht]qé‚ã¾ìÙTiFõê‹ö¨š¦/€$ç«@ÐRÞÚñeklC’ﲩ‰kB¯qÃn@wÞØÎÙ 7r ÄH‰3q&½ËæŠd-XKÖŠµfmØ*¬-kÇÚ³¬#[•­ÆVgk°N¬3[“ua]Y7Ö•X-ëÁzâ3ø,>‡Ïã ø"¾„/ã+ø*.Æ×ðu|ßÄ·ðm|ßÅ÷ð}ü?ÄðcüD©P*o¥ŠwŠ÷Š2ÅÅGE¹â“¢âgŸLQ2t¦AI­ Oç~Ì )$%´\u°ÔÉ÷¥¹CRC«Ö؇BâQSäID é¢N(ôaWH(’!ê ÉõC©È FC)ÉF'ƒ,°.ÖC–0F-5¶Á6ȆÞSÆkd ã5ÙÑU]{:RpN@Žô~™ª¸?€ªá4œczž€œðOxrÆÓð4ä#8 ¹ÂÞˆÜðn¼¹ã_ñA¤ÅE¸yÒù¦ZtäyQMÝ’Î:u¥³Nݿͅíÿ2æ -eÍh-(F/ÆKþmÓcK¦%(ÆvL;PŒ˜ˆÝ‹T xzƒbÏMDjn7 ñÜbn Òã–q…È€;Ï]@&Ü%î*2ã®s·AKã‡#;`1ÈQfä̇jÊ8ŽÜÇÏ#- w1ª ~y†ßFuÇï"oˆ­î£º€åQ=ÀóǨ>`úSð‘|ÿW}&â›-G¾Øâ¶Ø|gK]¦.|V¶HÁ´XFI-b©E*ÐwáˆP»Ô Þú"jGíÒP» ¨]FÜ*n X´ŽÛ„,©¶ÔF{î>÷UãsÏÀ.ÙR7j©–ZêE-õþ+€ø` D¨ÕþÔêfÀKoQ °R9D&²E-˜^_V_å_9ÆP‹Üeq;:îÑ·=ˆÎe2¸'nümƒC± l}ûŒ€´E¦´…Ü"Jêc–¶‹Š¶ ¡í¢¦í¢º· âhëðÔëm# ׉ë„DˆÌ‡#]ˆ¾¦ƒïgrÙÈ b°MÈ‘ÛÂíB^‰=C ¹Ü; bJµ0 uPˆÒû7¢YÀõ—Ð|êû-Ô÷[Áo¢_hØF{ÀvÚvа“ö€]´ìf†ö»¿@{áËÑ>às:Ç ]c‡®–qF÷@•ð¨Ô…>zo !DH}’#Hä+Ï2 ¶ò}[(„*ø£ãð?Öx.½ËQñ›GPmW‰öº6•<"ýæŠ~ÛÇ ÆtõÜèÛç¤àæq‹à›ws‡ ·½çåþ {iœýùzìè•H_¾o±øwþÓ˜â¢8„))())±‡T‡Å!5Å!ŠCÅ!žâ@qH¤8¤KqHâÅ!CŠCF‡Œ)™R’W¼,˜æŠ_ %þÙ: ƒ9lWi±®‡}qKÜ®. ÷ÂÉxh—t<OÁ3á[sñb\ˆ×á-x'Þà“Ð6W¡àü—ø«1`ÌÆ‘q†ÖõÂÎ`} h WZ†ûÉe\—–]q=ZvÃõiÙ7 e$ö¡enHËh܈–10òä27¡enJËx@Ë`T¹LÂÁ´ÌbMåR¹‰5£åfÖ\.Åj^.YCµ —ªEj -w¨EZîTëÒ²\­GËOj}ZV¨ äÔ‹!-ébú=½° .ð<[.‡ÛËÚð¬„>6j!ïŽ= ÄžGaÐ`[mÈc°䱸äqØW¾÷ûAÞûCžz«šCžŒ[@Þ·„<·‚< ·†|‚<›5B Øk ùfVžùø Ç€¥Ð«ÁN%ä;Ô 7ÀF•|7“š@þI­†¼B­ƒ° Ôºr‚Q|›<; A“ÐL4-B…hÚb&·|lþ­ÖSîI2öžÌ¦}…æò Ö„BØbL‘ˆ¡ø"sšš€Ûã¸îˆÃpO®#°Oøçya¦?3œÏÌRd)–)Ö‰Årñ“Xø:ŸËáp¹\—Ï-äÖîáörû¸ýÜîWî wH,Q!*EVT‰DTsï¹2î÷‘+ç>q<Àÿ3?ŸÁÏägñ³ù9|&?—ßÄoæ·ð[ù_ømüv~¿“¿Ì_å¯ñ7ø[üþÿ€Ä?áKøçüKjAGà^ ºBMÁEpÜwA´‚‡à)Ôj ^BÁ[¨+Ôê ¡¡ÐHh,4|?¡©à/ ¢FEÑP4߉ïÅ2ÑR´å5Èj4êC4ÒcA9§õb€µS!¢˜4ˆè4ôîg‘Æoº4*Ó£s¯úееÈ@µZµª6«6#cU©ªtÄ*ÈTŽU@ß\ãî"'9b53¸»Äì‘DÛ—P+ˆ¸¯ Ö”»ƒ(wSînC¹»-åîv”»C(w‡RînO¹;ŒrwÊÝùOÀÚ=`ê(ÊÔi”©GŠÆÀÔ£ÁÎ_Pø_ñè¿çÁ¿ÅO_=ÄÑÖD´5uh;Ðv´¤íèH-w¥–{QËÛRËC©Féð9òcé›þ ÞÉóº¾È¦rÿÿ}/þóþø¹ïÀôiOA´§(¨‡UÔŸ"õ§.õ§õ§>õ§õ§!õ§õ§1õ§ õ§)õ§õ§9õ§øÍY~¹zž+]½zóˈ•Ç<í§ˆöSLû)Cû©âËÿ ¬n¥ÿ5Uò ¾ŽtŠtОÌÒžLhOVŽbñ üø¢ôÆ’q`œ-Øh6–íÁƳýØþì@ÑNt«ŠÕE'±¦è*º‹Z±–è%z‹õÄbC±±è+6›‹]Å1Nì)&ŠIb_±¿8P,ŽG‰cÅñâDq²8Uœ.Îg‹™b–8OÌsÅ|q‘¸X\*. ÅUâZq½¸QÜ,n·‰;Å=â>ñ€xP<,‰'ÄSâñœxA¼$^¯‹OÅçâKñµøöî*ÿŸ{.ÿÝsÉ =Ðüq¬¡ø8¿Ñ_º§F"Zé`µ|¯Ì—»jþá=2ßî£s0>L×o1ûç=€@_c^¿F¥ Ñk3Þð ?ØÌ´e˜NLX• ¨—&¯iý(ÉëX•œåûäýÇ$¯zUNòÙ“ßïR€¼‚ö] þc’WÓ*'°åOðÁw lþ>uúQþø.A+}ŸºÒôÛvÌïRH½þ$%ÿ(ñŸ¾OÀZß'óß%ûïÓû>_/=ÃÿÌMüÉÜF×€?×7•JŸƒòõé'ò“P&¢ih6D?ùh)ZñÏ/h7ú" Óè"´ŸD×zÿÕÜûßʃÿü‡óŸgG(fËqj"ÇÀu&4z×80v‚8š¶ŸõÙxÔ3±üö¼?“Ÿ‹_@¼ò’¾ã ~ õRüžræ¨ÄŸ ^ÁÈo a%ô9–QA0òSSyâoFCßç¡Ç@ŒÍ0FP7fL n*¿ŸxÕêVŒÔíˆÜGùÍÀ±NPwfœ¡^“© uÆÉo4q…º#¿‰'›É†úbuaS[›àãq[o˜r§ˆ•Kǽ=b¿áÜ.uÿ7“§F_x6ÑæáT?ǘð3ãÒ¦%Ö/p¬ƒWÚƒíza…™Ï'tq‹ùuu5®6ÑÆ/|v™L;žÙ'mÞÃw¯¢›Rt~óÒÚÙy\ÇÍÓÄdk«,®Š& Š2Xj-æ¶Èm–áß355¹ž»{tJ‚[âW/ºE'%º'÷Ž—÷º'§$ÅôNíçN†ŽÝz`7ÉÛÕSëê]Ð >$…½fŒ•AR+©å×m‰Éhøå+ø£¯ˆMù‡çNýݰSÈ=§ ³WÂÊ ìxƒÛI™ìøûbRjŒ¿äãŸèb6ôl wÃ[zYîåkmžXþhëÌ'D{¯×ëþÊ3K.w­§ÊÑ+_¦Ù1¯­_RE™ónžöÜqMí¢Ñ]J.ïNòj±;œëð¶ßÍœW·Õ­ê7t/:}¬$Ø>¹TY…Y˜½ejÄxÑkf‚'Ù²leÛÜ“{¯N±7رïzú…°¼Òâç¶ôôæ—f¤&ôÍÞóüåÞä®K®$¶®ÓqnëÁOÖê^uUÇ–Aª5“œª,Ô›Zà¹ÀáÜ»i7J¢3§6d—º¯1[ßiÑê&!SÔ¬ž«óázªVVnË´mÃb ³Š çd:Mœ3mÜ£ù›£~ŒÊÿŠQ¬ùlŠ¥–¿Ç¨ ØÑŽßì·ã¡ñ‰±®!©‘‰É¿!”TÇ£¶‡TËC[WF(À§¯›Ò¨õÿ „ª.Uý¼iÓÇ/>¹glŠmÓ[ÿ zuýëx»z{Õòu•<ë6ÕV•>[dõC‹BbSÄGÇþSD;s´~Hþ‚¦ ‡¬hÖ7dâÀåuf Ç ËW0 C–UœZkM»ß¿O‰ÙƒQ¢á‹‘hg•Üõ•åeîÒ~!ª<¥r+?=“‰ò~vÖÓ ´¦ÏÐg+ý;Œe»àBt­yQSv®ºq)§îÛeíËOÜx¯¶á³ˆ»šÏ¶ð#½'Žk”ðèðÉÀ!é}Žž1î®6š0siçFõ7²MKtïh‘vd¢÷ö}{ëö¼èÚÑÂᩳž:ÜvRzÁÓSsü§-ÚWgôuMæ°g6ݘrqúÍ];•Þ+Þ¼<ù}H­Q¥Uµæã~ÚÝ>«|y«ÚÆåÎ:¼"$Ó©›KÁͪº1^®©Þÿ+¢é@‹°•Àk°Ãý<ÍÎö.=Íœ¢Ò{œuÓË;ü;°r¨õîR»€dîiã>¬¯¹f_íõºRèg°¨’ªrý3üþ%°ú|Xö"u"ôJ U+A•Ô¼T5økPõÃ3§þÁÕ?B¯f{Œê¬-N:Ó`îË! Ãç¶qaM-õ¶4ÍÛ8éu؉kì6Ä$FZ],yðøÍô¿|³¦ûÊÊž­Ü1bNbàF¿Õ#©C‡­}¿:“Ûºù×6ûÓ>¥åÍ=_½ÆæU¯¯:Ú~ÊñWƒ?F%îz\4fÍõ…Û:³›…¾‰²N¨¾8:°ìv^Ù¶ëcgÇÆ‡¬ÙÔ73¦ZÜŽ/"¢¶ÿüÚg^ /Òœðfª…_ufGôšë}±¸ßÜüã“Ú8æ,zü¦ÑÄAE¡s»T[ÔDUcu‹ýÚÍ|ró©õÙŠÀüN#¯”4ZÑà©çø#»ì»ŸŒ¨¯\ÃmÈLl°¤^pÖ)l¢5±ÉPWìv@¯E_Ñ˳šE/íïÑ«…Ngzµ 3^ºÄ`søBk.™~·S盫´®RÍÏãØñ·qÜ.) @|™kÛ¤jϤ”øÔÁ¥$ÉÛSë äé(åñeÓCÞüoJ¼5ëR:E˜K1»¬³ºÛÚúÎ’ÐÐò|RÑÑzšc¢wãz½ÔÑ›Ýs=žT\Ûëäp.]©Ý›pd•m‹×Ï{¶œ\°cp`ßìfäryÕëóû?±¼_ÓF]yµã¥×¢ÃþWW¯ô¹Q£ç‹%)ýÂ^˜Î¼S^{fJîùÝlúëmr²_gö—í&¬‹w¿lΚžêtk€{h±‘ÔéÝéÉQåGw жÙZÝðNcéDŠ“^ ûƒu‚|r=|¦ËóV K¯áÌzl¼}ÿ´kÔ Ÿû…jô6 /çTçIÕB YÞòeÀ‰: ¼s6 Œ(0Í™|TjXƒ=…:Ýg¾BMWh‘pIWz†²b%•°ç‡:ˆ§ÂIVM8C2Pé|‰"Œ±’¥':ø¶‘ÏR~Jt¦ÚÄY73»×_ªMZÜ`ûEWÉüÛ‡Œ¥`áÔ"?Ôä;p Ó»7«>çnUÃÎ7¹Yî,’Ú|·R3É?×/·IF£¿nß§@×–Q‰[h%`k.HM+›÷¿lò€ñû|Ö?ª/£Nuލ°úqRãµ{=Ýû,mQú¸[ÿ§­ê»^ð[É:úÐU»Ð¡hX›Ì‘v] }Ü[ý’¿4lÞíäm[6¼¼±EJiÃGMF¹)˜Æ-˜gëZÆ·ÙvÌõvËÓÛ“ï/Õä+ Ânl™Øáå,ßy/^=+¹Q¥Vƒ-aYÏCÆ:/J·šqk&±~y+èݤ¼# ~:dyzjÊ,羉Ùﬞ‡œïQd_a},ÒŽêëG‡5Ío{ìýÃ…ʳÿ¦îÝ^_^u6Ý£ÏÇE³ ï<Ž¿¿,ße硚zb씹WÞä—TÓ‰õžùbH•–ÛNÝ {prÐl³ˆÃµMºϰn1ÅuçÊZM­JôŒ-P—âÚíŽgÔ)+N N ƒ|†95Ÿ—rêU‘=O’v˜Þ!mæä\ËæŠðÒ {p©^O]ÝMÝK©cð:imƒéïÛ­›ìik#N,Ö»ó:éxÀÙ3¦ïWn8óÁåz•‰9…ÜÃêWÞysÙˆ€m¤{³ØîƒÖø> zº~Àà‹\-D«‘Ú*·ÄÐâ»yî6Ó[“YÑÆÄmØ.ÖnÈ­YMªÇï›1uÖáɳíVi"æ=Ï_•Ñs´ÐËuÛ€ÞÈzöÊ—&CßšŒvÜ:þD¯¥Í´îYWo÷õ¹€†G5;u|üá-febÊä= }V3{UÄgϾ¥·ToC6êóû|¤tü~ö¿MzÖ¢ømõßÀo©ŽTKÄ®í)É*D¦¼é)É›ÿ=ùûÏÐ{A^ÂÚëWšOwÖÛÍüæŽ[·ÌmëÐfåñb³ GÝ’SKNµZ™*Ùê?&çBg·˜ié;}Uf„Tí2êý`èŽ'ˆn©¨„P¶¨ÊQOÇqó_¾îaåòqèýñÖî-ÌÛãrdr™ÿ “]WŸ\ã«Ì¿8aF 5®„¬É8y·F€[õÂŒàöí„; —½¦M“úŒ{ÕIš_6üüœõìæ wÚð•zsHb» þÓ4G-›ÅéWwŠ[:çÎÕ¨–ùïÇ,Ñof¤“¾`ÌÓöƒ>á,ë6ê±HO xºùšCÀ¶ý®¡ VÛ j¢X”}½þèy‘ÌFkÍÚ¥ÙëðqûÀЊ÷ì¾½¶üWô^-²ä¡÷…áwè­W½å÷PK£2?ƒï¨iÒ¨É?†ß¼èE‘{÷L×¼Ò$¯enÁÊVý:¾&†n±ÿÏ þ_’²ÐÖzs&î‹P4õ*~¸aåÀ+Ç·m׺¥öíœ(®8¾sèÔ-ng ò'%FméÀ ²5l3·xHã[¶­î˜euÓgnôò§“Oêã’[;§rì¡ÉÍo=1.^1ýÎýɽÎÜsoæK•ûXÅßí“?¼ýxgÐ\7M)¹•¼Ý,hþ”Þ\ʬ-yuçõp=ÐV|ÑÈ$ó'ÛF·ˆ…Çû"mËZŸš)ü¡GÉ>c9Ãë{¹È)Ï/l1}ôÓˆµkv]¸ëñö4ÞwèÙ»éȶA±±)g$ž¾l”ù¦ÁÖ¸Žë]Ýï¿›QÔ6ìÁüä™ …u[};x×r³!QNÏò³j©ZDö±I¬’þœ?è²í„ßú»ïŸ¤m¼½hijí-Aú:TÀ7h7©ox€ŸÑöõë×´îqhoÅÈÁv#sŒ¥¸¾]-åØÛô{Xóá¶×Í‹\Î^ôÙªšssÇnáž-¾6wþ‘zI;FUOUé— °Û•¾§z覵½|&ä ˆÜÐ'Ïpñ®åÍž$•OôHX÷ézÛC“Çí˜o=Î †ñq]Ýiê–;vw7®9½aP({¶‰[›Â™k ­XŸ;»¿Å¥éã ûÛ»{,U÷Éí<©ê®ÜgcŽØl|8«¤ÅR›4O;è^ŸGKæ×:Uˆ:G\lm™w±Ì=§‘[{“Þ‡ –kÓ•s¤tå ciÔ¸ÿ¢^þn¢ö·iÞÜQûe•ö¥Ûê(´Bå9døÞß¶x­(U>j,kÀ¯ÿ¨Ôá³¥®a-¹·O=p@?Ǫsföv)¦Ò¿Ú0)4×yd ÔÅ£h”‚’è4tJE¶( FɰÕöGB­'œWm¤ãŸŽÑÔÁÉI=R"“{¶ý—(Ó12,½ãï½iý† lq”}Ù•‘:|·†s†6‹\•0‚ŒQëwŽìvŸÏÆnÚºøYSï_ÌÆso>,ë6ùUè±=³kx{¬˜·ü©æm•»b¸'æ#×4>]ÃÇsÙ«[Çfd¬ZÙtŲ[}j¯3Ü¡)œ³õt‡vÓç7rÙ¼sïaôÆfíöKWJöÔRF7™wðy•=|ÇÜYÑN÷áîðý§ÆþœwËæ÷Ü’sRñ´ÐA=Ö¯fÚßk¸âS¿²&s;'=އôydXjlÜñMëä3m-þ—^‰­øwÔ¡i&oéû…÷¦Iü=ýƒécw[ϲðm>³¾¦ÅÙÇ`Ò}÷!|A²É“þ«æy߯õi1[ØÄ$kÐÄ„¹l†ML\@!6pbl°Êe<ŽšÄH §CnÄ„#ÐF¸ «!?h¨ÌÀÔÐØ'536bГáwCYã¥íSȯ4yÉžûÖ|ÿy´²”@\·ÞI»ùómÙ Yé´,§lŸƒÇøNÞh¹—ýc9óòWÇíuvÚ-<)öÎõ§¥íO7õ~3¡·"öšéã××Õ÷ìÕŠ2xÐʵêßï´ë+>rD,èplëR2Ú¼•ûÄæu—úOxïQ.˜ww1³Ç†«rÎ5 Ïn‰NÛåÉq·2MK:øÙ¯ôâöç–íOJØ|Ëî)çuÿJæ0ó®˜\]ÆúÃûɺo7¿>˜ö¿ôÕçi[ìU‰g|¼îTÕùʳëÍø¯ÒuVy%ƒ·ÁŒ7'Kö»º] —bÓ–~d[ÛÍm¹¸x©¿çÊ®¼N­µº&9¿ÉâK’Üõµ'TíäMË¢ÛïŒ 'ð³§Ä]/>ÍÀÿÿPK!J_™©@FixedDocSeq.fdseqtQ Â0Dç[ðâ’*è‡D¿ÄØHjiÁÚÚ´àéÕ‹?V ›ÝYff7y>œ*u×Y™öªåÕ«]Õ)%ßÀyî¼JPÐVsp:5ÚÈrœV¥µ!—tZ<‘Ã4àš¾Å§¡kµTÂYQ%Zã¸ÓTæ¸Ñ.Gœs¢%>Û¤¸õtânq;RÅ âû¯ µ«†©îïÿ_ šÿÿPK!nºÌÜ9EhÉ4Resources/40146AA7-283E-3A5E-5258-EF245A214144.odttfì{ xS×™è9wÓ¾\í‹í+Y²,[²dKÞmly“-oØØ 6`°m Øl†@XB ih“HZ¦1I_iɤ)¡“™”2 Iô›Ç´oÒ&/MÓ7/_ëöeÚt:äwΕä…-L^æëÌ{þeéžóŸõ_Ïÿɵë2ûÕî%++* ¿*éH¾nÂþ›?M®,µÿÀÓÎüÓÿ¸€§¿«o[ÜÑt¨ª€c¹€|íéúŽpõÖ‹W u×;t©wx}ëõ$ < è]½¡ot‡}÷z\O ñûVm±äŸÌ ø¨Ï†F×lýôÁ]x 0?\Ó·yØÐ <•‹Æ+׬¿wèw×^]@é¹öáÁ¾+ÿà—hl9j/FÙrq)ªoAuûð†-Ûý+ÃËh¾¬ûîÜtO€._ÀÃÿ õi\?²º/óHþ}¬;gÙз}TÕ&DCáQôa¹§oÃà’S"zÉ@öîèÈæ-±FûQâöÑMƒ£»¾Òñg Ðþ‰k",a|:SÆ/V)Ê?F<oýâØ(~¾ÓøFßg_{WtR𠪊â€Æ1 à9ññÏ>¾ºNt’ŸiÐ^ŒQ<ØH4R ¼`-WÅüÕ ©,è4ÒOÑ~4eZüIþì'€ ’ Š$¨ã€ø}Xv&çné°XðÓ²'¾Á3„Ãà³GNÒrÜ(J<ÉðøÒú9xýËŸõߘ³Ùý’ïö/¶ö€ú û1Øv3<Õ"óúmŸ_ÿ¿ø·Ÿ µË®Ç‘ߺýúC¡¶Ü¼uŒü¶7ÝK×ñah¾i¿zòE׸åÚ/Ê;êwû¿/0ÿ0p«6æïÀ}%ÞN9ÁÝóÆýñ‹­÷ÿÀsà‰;èóÂÍðä›ãçÓ ^@ü¾e?Ê}k™}gçÏK@øfýè§æã‰¿™7ì#|#îf}¨+ñ~Ì‹ŸßÿNúÜ Ý³ç⢑·k¢4¿mD´Îm‡wu|û^°?©F°õÛJ¼?ëà'¨ž ‚ðgóé †€û‹ÐñŸîóïX€X€ÿ@|¦Ý²m9J°þƒyuú_ðû/½ ¤äóãœX€X€øÿÈ»À¾ÏëCý—[÷!¾óåß“,À,À,À,À,À,À,À,À,À,À|É@&Þ)‰_†^F5T"ÞÀ¿­µãßh¢2jA è}`¬wƒ°lÇažEmÙ3=Í—¡þÉ^«ù^À¦y½àô§L_žþ …Füò+ÃÖéÕ àW}¿ìKìÄ2³Ç”Äç,†ß9ÙHJh‚ip+ƒ»à!x> ø'¾ýO×ÿÖÕ‰Ä/c p{€³+Ü)#o†0µój·ü-DûŒS˜¨÷ ÷zôæéå1qšã­?úöúï äœâ–/kR8ôŸV[A 0ØîìXÒÞ¶¸µ¥¹©1ÔP¬«­©® TV,*/+-).*,ðzrÜNG†Ý–Î4¬R!“ˆEBCS$»ÎìµD½ÊakhÈÁu[BôÍAôF,œß'béå»Yæ÷  žC×õ Ä{fzB¥¥”ç¸-u6KäB­Ír.kïBåGkmÝ–È_náË”ƒ¯ÈPÅjE#,u†áZKöZê"Á±áñºÞZ4_T"®±Õ ŠsÜ *– ¢•"NÛh:+ _ œu¥QexÙ™Q×7ik磌5[­Ý<ÔðsE˜šˆ€ŸË²ï¹&BgOs¶tH(Dê{JixŽvv¸\M§ÓKš"¶åx0’Ñ?íË"ÌÁ/[Þ…ð+Ý“&dB¼kàë=ú(¨NmФvtEާv7Eö¢B¦Q¤Fu º{åf×°ùºòæÍø¹9QA[fš!zƒÄÓ•(»\Év¸uåæ-[“kðý"^3ƒ¡Ë°w‚gè äéØã8Уå×ÞýBAl=X ÆÀs` Øü…Æ'€2 üŸTÓW¦§bÏ£÷iZ>Ãï“JE˜ÄzM‹¦‡z¨yœ‚ïõ î;MV†+¹ö&ÂâX8ƒ¡ºlºÕÿ@ÀåøÁ3±—c/ð­ª~ñ¡”‚*ÐŒâë• V¡øz7ª7¢r?ØžËÁz°ì5  Ü…Ú‡Pü=ö€o >¼þ £‘kÀ(؆F‡Áp¼zPδÅó;Á8ŠÊ_Ã`#šïpEí=‰y^DÏQp/Ø _O£–Ô†W\ŒúoGsŒƒuhµÃhÜ6ü?(sð Pý¢˜P‚2ƒÆ€=G@”NÖÊ_Ô×¢-/ )HpBHÚ ²ÝȆ*)¼ï½ÿÞû*Ñ›U•”@ï{ï½?…K^¯r ½Þ»˜›Y+Ë¿5rB Ð0¶tQ™_è÷û*ˆ‚|‡-]Nð¸ü¢ ÒïK#HMSAðõ WûÈŽ«"î·WuåÓ:­X.¦)“V“Wåd»ú3+s-R@“´Pà,ª±Ö Õ¤ÀÈõ¬Ê `…AÅêåHšWþ™–VLíûl7©+_°Áo ESçõZ³'`o[ÁjYR¤JÕBZ%sT/»v_r†ÄgЯ#vmAœR¤äêÓY‘ጼÝ|†î•S•SÐ;uy Ñ©°¥; XD«‘!È÷ ‹É¦¶,9þ›ç¦U‡ *Oüê©ÖJ¶½úè›çüÞŽEÄÓÏýë·î2Û©Ãvó²ÿôÄÆZüÙ;U/áüüõé+ V/M§,7WïõŠ=ƒé¬=O*ŸöÂv‰A/óò< çlçª0•TúÖ_ ½—§|¬_‰?Ø’E^¿Ÿõçæe$ÎÚ œÄ¥Lhcg¼¬Ò=ôC$ \Ô24£Ð«”9CÄHB(WË䙯R «Ãi‡ªÚèHÕáI¾.ÖSÙH£”h1CQøã±ÏÖQHh$- ¨'?Û8ƒÿ¾Ý,Ѧ©?»JƒU#ÄìÇ”³ÓWx M¦€0g ,£:“Ú.ÅÔMù ÷ܵ ž[gwnMj‘•W#J(Äv3rË¢Çv %BŠBän•~*ÓÈŸmžÙÉ£„kå\‹$¯F;8EÙP¶í tƒ>Sê] è„‘8Ä—€##5;ó¼TªJT ÓØïª/6hô^6L±%%ª“Qùž)QF¬×iÞ$2I+‰yïpäAÞ(½À†/ÑR³NoVˆ˜«‡*L­IJÃí¤XeR+tJ©ˆ!ÂÄßÂG²j1I¢CAìŠ@Ì”X£ !”0$$)FD¯¿ökÄÉmÓ ÷PÙ dÔyIª;Ÿšþ;DœÏs¿%X *¯]žÂo¬Èçxí æ˜#¥M°®V“F`…æÍtÀ˜ß¸ªxÍwvÖÕîüÎpî²ær£€dDŒ$³º¿¶iW·Ï×s[UO KF#ÉUk2ÚÒ´ ãoîÙýÖ£MªT»Ñd©eŒÅa)ùæš¡ã÷”X2­Œ\ƒí.‚<Ô»ÈS'íî0]ÎËÌçé5·´;ÿ|»#ß­}ðì#¿VX­Š+Ïììv÷|uÓ 'î9Ü›K¤îû`‘#_äŒ û_ßÞud¤òêËùë'ÇÐÚD ­íž€Þ”yQdQ[Ô@d:ïp0Æó²ÌóL| XÚÐ{!îÿ| òÎñÚ¸‚^WD“#©]»Š÷¯2bI"ñÅZàŽ™ò~ø}¬’ùH#™ø&T”©¥Lì8#ÕÈ¥ˆo±­ŒTm%2}f!MÕå«à¢X9Èë"âÏ\SO8W-̾„?‘¯T#‘! 1äŸéx‰ÓÓèì»Ñ›x  á%Ö"ûÑZÅÀ0ù’.¹¨³ý$'G'þ Ð9Ó%lÊ ;c %¼Â\R^óÍÙM&doØ·žOÓH²Ÿ–T³JBÇ:“{æí>ÉÈXìòe ÎØ>øuì]xwƒM‚à®ýòF²bYðgÁ›»PŒ¼C÷µiZ$%(£}HêÅ *`uks2 Óe^qNNz¾ø"H/ÈÑIÈTÇ@ê°2A v²q«B¾‘kÀ޶¤d¾‡MØûí<¬NKû…JVȉ Pú¹Z* bÛF¦W±:9meôV“ZÃìëÌVm¥Ê2+¸cW{„ìZÉç®®žÁþ=g”h9õÕ_“:ƒU+2r ùCò+΀ƪºBå^)…ƒ’l½e@?L®™+9_B«l`™ÐáÈ´i°¨n$D§Óû=ä¬4Ésiª:£E{Ó½Ô Ð2­2NH+k`åBhò¬ò|‹\˲:)]ÌSRˆÜÖgÛíÍÍÍökOÍ¥¹dyŒYòí¥Ù]]].BÅHÐ1"0ÈSŒLBY)7Šû2±§Ð\i—ÄÆóŠ!Ûyzí žbNœÁ;Š9N²VÜûÊÖm/o)®ØñÊØÆÇÊ÷ÚÛXµêÁ%[û½½v؉”=¾ÚÚpðÍ=÷ýøpkýsW<³µ&¸ý™®UÇǪvÇž qx3Ò#?€ü€Y|!Oébó/9ÊØ‹).ö|Y™¾ä¼ö®"3¯C¤P&¾â¤Å æ2Ý\]ê×ä)¤6_•óF=ñqfu®9öHj~[Lóô'ćˆóM 0R}Ñ‘ïÈ—§^òÜ·J*ÞJ­¡]Câ·Õ†·èăÈãOžP¯wV"LR"ñq¦Î\wô0ćÅýZ}+šü(Â#F,»ƒ½å¾p…Íêéí ¹sïÚ\ë\\o2"碎|W0Ïœêéë åÀ”ú‘æ,µ9E.–²RÄ!Qª=Õà­qyjüÎlm_eÙêz§Ro”‹å*©\§š9³!»Äš[çÏÎÊ«YéNAv! [øØ„º¨SPÊóæñðüØ„¹uhâ’Éb—°m«u(0¹”tûÄÏùÒÇ&ÓÕ•3‚ø&ïùÑ9€žxõJ´úÝÈ‚ý`IÀi¿dr^ôý>zùÅ€Aj_ ©Åáæ :¤jnP=×½~¯‰H / ôxŸè’ñI¦Æ”Â"ˆL¿°·tµ¾H5ê'€äJ%M5è̬ŠI$Ó€)ŒZ}Š”ÁÊØ;"B‘ªWBêS…ìR(7à6R{'K®’ð~Ñjck¼HTrøøA¼EÄÄö p7f#QIcvdYÃÓ¿GÒYÞ²ú¾{¤ø…b"ïôôÿˆe Nu±š«MjB¨0 ºHŸ™™Øå•N²UÙϧÛR'<ÏétžÆEÒª «’?šþ8•ïOë)Á§8òÞ®•==®ž >Rs8 âá¥ç/H8†â-RWPßWXDZeZk-z|qýÆÖìŠMÇû ïª(ïmðбxc £7·gïâôm'Ö7ØV/«ßY§KhZ"¬nȨë_Ô4Ò˜ÑZÚ]ž†”“’°R­Ñ˜žªÊéÜÙúšÉÌií 5cM@üà? À` v({,{69”1–±?ƒ”(ÍJâ¨ä[B"1KˆÔ]2'å…äDžq‚ËÍ ä•ÜbŽÈãò8·}BÝè>!já½%‹¢§ëÏ–•=è èÁ€3Ç"ódâÖÉÌ‹ 9‚˜5wyW~µß_yÏã9Kê "š`Åò¬ÀòÊ}:ê‡å+js$X¼OKÕr‰É™¦®Üyj냽½„M±eJµ,UowÙÏ¿¾ê±U^‡Ç!Ph43Gèí(“](º«5ÐåÝ–¥QÝÐwGuèÕ*~äM¶Jè»C¦‰•õY6Ï„µ£±Ì^x"ÔÂ6ÓXò•×>ªô£7ï•øó!™Å^ó}¤|ÿòeÅß<`q89ýÚy\Òé‘ÅùEΉqñ 3“9‚âµÆ„ú¥È°*H3ÙêU©?Ï1©cQ×¢½ÍãØõü5äêµ*ÏʯôZK=i¸[Àj¬Ê¨Ê±#ðk2‘N `sĵØL¾s… ÒËÛ=•ý~™B#MÕ[3­s¹-¿^.BajÐU½©3—ˆ¤’«?†÷‹$’`D±ZûvÌ¢P&$DŸ¢7€Ý`U l[»˜Œ6-–¢þEþÅèµMãX6¹m‰méDã}öU'6µø òE¡”‰œ–š a×ÂJÿ”/!$>/áÅÃg²Ê]žRžc‘tà k ­6ÁW|`êæˆ‚J„aéŽùö{Çò#–jU¡ÐÆfçÊ •ò+å-†Ì4g5ŒÔh÷kW–›ï—+Qr)¸?ÅWïrÕûÌéE³¼Nåo 9‰y{O[Ž;¼§s ƒÒ"£ñÚ';׋¥bädz#J÷öÐh/Á8iZZÓ·(•+jõT./½Cñ!z7ò÷#Ù8@ Ø95:Ð<æÛï#r#=¥-èùç@¹´Œ¹÷» §R‹:¬1A‘Ö¨%DJ£’JÌ%Qy~¶ÞIu©5()É4Sòì Ccþ„¼…ŽûÕ)>4Fîã²¾„÷©È¥"ŸêB3±ñ\¿Šìd6vœ±0^&EhÇ2B©• ž^Þ?¾Ôéë?¼jÉÁjZ7˜mM4×õW¤J{ìµ -n N†±ºïkínÞ÷rÿæ×öCõ„5©ù×Z—÷V¯?lúÊHÆ*‰³åaäK] y–ª±¼ýyÄv<’õBñ¤óy'!²m„ˆ3r„pH0& Ôj«{¸ +Ÿš´¸Ÿ£¨ï„£irºh"¹Rt¬$2DÄß{=¸ŒéJÞ•öðáÁ-µÕ3 y.ȇªkG¬Í;º+BøAêƒhËï ¬ýæ=%e÷|}ÕÐá×NrüÁÚ5õ’ØÍûòuf ™D,65•;_ݾùÕ=5µ›vJÓß9Rލ~åx¹4‡2G+0dºï¦h£bî¿•!^Žï'CçÓH5¶dS(*ÐÁ4>MÑËé¤HTé9n+~ÏÜÿ'ƒ˜—›nÍEoä+^@ë§‘ß‹g®QqbÙ[e®7,s“ÙA|V²›Þ„$YÈÒåÁ¼ÒÑé`û®)âLõ#ê£Ó§C½¦Khg(%˜<ði€dã½ÌK«‡? ró@Ï%®q§Nv'œ:Êл®ß1Ü%d5&–EÎYªˆ=‰œ³ø¦Î™®Mtõ[øYD%EÛ†,¹­¾:Z [Тl!è:m‘Y[TK0µºZBX_ ATÁ :š–æG¹¶Åmhƒm™QŸr¢©Ñ>QÕXÌ)å4ç0#‘>•\îéA*ð¡@B‡çˆˆ÷¢ö6ˆ¤ŸNÄ‘ žÑÑø±'§õyMþÊû[p3ÌÀW›gùO[Õ•t׿*¼MÁôðÖznFˆœÀÚ¦¬þU×¶Ý3«&{—¶šój³òë]êò¡ƒÍI­yñÓ‡òÿ,2WKu^‡·ÐKª‚*"qN­DÓ”9ÙF{(É(U fÒeœ?+oË™ùŒÐ’%~S~{aÝø$?ÙØ½£iÖ’cçíÈBäô"ËÆ±áyD ΊWk3îÍ †¬cVbÈÔX½krGË¡»+K×jo}t]EéС¸tˆc|ìŸP;ÑUgŸp5:ZKH‹åÀ«+ʾz°àœÔñfÜçõ!Ž´€,½9¿¤Òq=ï3«ËKÒd陜”"!9¢@gH,Òû;]ûÆÜ¬$˜)'…‘@ÂßË…§O|í9†Ž4&”8 –€«"v»Ï'5GqWi£g¢H|‚í--"ÚXXıºò‰*3Õ¨›ˆóÑw]pwS>ì.çÊ‚ºã|úû¹Ý÷5y;k½:1&E’]¹´ÄÓ\Ì9«:–vT9íM[ÛÒkŠœZ>sDŒÐ’ßàõÖ{ôÎêÎ¥ÕNHW­ip(ô&MšQ¦‘ R¬)gevv©ËjË.ï,ó.opKTZ¥åÚ(èL:³Ðâ.w§§g•¶'xDw ˆäkà¾@mqdpE´j4jÏRï|(ª0*6T V© uÙr?hÙâ&¶‹W¬ 6XâA¯¥þçë—N[RLCO$r@²ñžû1d¡çPTâõ"†©Jâ¡äû—§yoòø½i¤H\Ï8ím='æ¿E`Jw@Š‘¤fdkpäøP/|}oM"|ÅrΜþ„XN}”‚p X¬”)\â2q“˜”‰SÅ„-'ª2¥ŒÉج, `9¶’]ÌRB6gÂJ•MèCy‚¸l/`#_ÙsKÑÛãŸâ³SWÆÍBýÛ‰€X.P¤:²55Hâ8<¥yÖ±²y¬Óš²ùŒ{?i÷ï_Oðô4¦—|ƒæü"_@d‡²×œž~¥¡ZA¶¹ò|!_B|©Âw…Þ*eÔ•–æRDÉWUHéš(+i&2ZDñ¨úRlèõ½‡­©/ '¡O7ç:Öúy¹O’!ä½2yìĤsȼ5OÈI½æê£3N¯d–ZÙíX“ ‘:Eý70:o•<êjíŠÊªe)è \ 5T*+³4ä6 ]r×DAH…ˆ^‘”8²g¾Á‘á9¯N*Èó`Vô×Ñ£E'é·ÎFo7Ó ê£Lq`ã,3ÇÒæ°’ŒÂœqsÁiþÆ«YRŸÙ4©\&Nðhë$2¹L*½ó  ÉïØ¿Þ\Ç#¯c¯ÄuŒúxVÇ6ÞÝZ=«cŒñXðs‹£ë|ëäëzzÖÉIsk´:D3Ì- Í¡¼Ëe)Î-&ŠóDFˆšÐ&\jB•ØüÕ½7w¦¼ °&Þ©îÍá½õ´ÖÜ‘zƹKD­ŽMžãH·ç¤ê32%[îP{ç àŽÔqÛƒâH'Êi¼`] t¿½ð jõ0}Ò`z èôéd@'±xÍ&£hË¢¬’’¬M¦†Ø™À’¿±í1Å/jÈã™—¶3?ºˆýsîmÉ›ÝÚι³å„PžªÓ"ê PN¯Ñ¦È fÇ>BEj‘ ©ÿù[J(Ók´©r(Š}˜)e%4]»#¶“OKX)ü|áã—µÏÀ~þ‹51+‹-Åùt3ñ6ᦠyüE‹@[z Ñ ò)ÔG<'™qÔb›:7o!7Ç/ Øø·çøKÕ©sÉÛXÏ4oq ;{Ðν„%ÜZ½Y“¹ªÄÊOu6 U (Ò‹³ìežTF¢õ–Uwè‡û]lMQž¯!‹øH,K Ù:ע̜Ú}&çµ(TZ6EêR\Qcö™Ñnp»nlQˆ:=­¹ñïÔ3މµGSÓ*6’GÝΣ‚-×§yuv܇1ñ óR"ôÅXW”=°?;4PªueeêQÞG2Bš¹ëí­áp»·Þ!F¦L~‘B"2ÙžxtñÆ‘ªTb©B*RÊ…d†qÝÚµƒ– \åІv:Ìhw@/29ÇXnƒQD:ê6úŽJgØÿÚ%ü3l¿Ó[ÄñaQ¦’Ò¹ýåUËŠM–ÀªJ8›–j ”ÎiÏÉ*µ³òôbWÖ’ÌnÙsC®ÏÓ:\ܸ8;Ë Ë(”“è#Öí÷ÛKY-evo¦¢Q±iSð€â@ª‡:ffY³ã0SyÔã1dµlT•‹Ž¼ço^|^èM–‰odf®\tÚy2™½p!Vå±Õ9 ö ŸU,(2s<¹†Ç;ꇪjz¥¬¥Z[œeNAÑmN0ψ|€RkÔÉ¥Bêñ¯Õ´d9ëzòe­&w©ï~q ü–þç™[–gSÀ11÷´Q9Jož{Ë¢¾!M)šsËò?(‰†ÅÌÄLe5J–âÈ0§d8ÌÄGØ7b†fäè”ÓЯÚF;zcmÝJ\"‚ŒäOÀ÷Lºä˜ÎöLŽøY Ã×£)ØÍüF*ã—á—Ñfâß×'“¨Lò&×E³×µNGi¹N©ÒÉEÔ%Õ(“;Uj¤ÔÛ”X¡U(µrF(=ýX0»aX{+Y&mCȨ˜á\Çt²×cÊ¥ :È@ZE´BÛ1O9{,%xL,?ZµÑr´dcya–o4k³~5ÿ‡½s¢ºÿ™Ùg²›IH6„%Ãc ¢‚¢0ÿïœÙ@@´Xíí½ŸÏçû;gfgΜÇï5›Sß_Œ|×þîB94ÁG¼–yl-¹ý’ž×õeOéó‰Îáòå0'¿küÄÁ3J»¦èÛ7{Ì¥3æç÷;²4ü¬Qn³=yΜ±c¬ÿªcµOºÏ—~úØÒ £‹ŒBßÀ“æžÐµK™÷p1dr` söm}µMC.˜¬ïšmêKû;ˆ¯™ç¡y1#ºMÍèäIÆÜ]¾…1ž0wt^÷ÁÏ{ܘë¾4X9LÛã71ʬÔú9üfQ´9½7>QßäŠûÏáÇ©MCf†§Í M0èÌKgL_6]¯íUrÚØ‘ÓFäYõ9—8>›Æ¡Ó¦†ç :£æôa³&O˜]:bÖøàÒÔŠ);dôÑ'÷*.™› ÓïriqfnQ}náï ö?ý5ߨKeÿr–²ƒ7`§×Ÿ•Ÿ“Õ¿xHA÷ýî=lÈÀœÌâ|¯SqþÉŸíw£·þ>#h>|­Î0”k¼nŸü ·iêå Æ8ÉúéùøÍÁàðáþÞ›…¿äÎÑãîì=Þ5èÒô;{åɵ;ò§çö+ÿ—ßöÇ»‡&ðFñÄcŠÆ—ö÷¹T—Û™Þ‡Ç ç䓇›5²ßèAs—Çé (%”Ÿ8¢Æ¤áù¾Ì,_ +=ËçÊÊÉ2FôØ;Ȥ㎚—æÏHdŒ\¼½ì§)Ì8QæœÌî!׃¢L œ+ôþC6çdúú× ÙÔÛ·)§n˜Œ‘ÖËœõ^þüÓûŸNt‹’½R>ï°7¸¼CIºÔ]å!·7·O‘vÁìùéü7¿Kw7YG›ôÒ>%‡Ë¥:Ò²sÒ=nǹ(ôqMW¹&›8°ë„ñ½iš5âáXÙW€¼mÞä!Å÷ Ü|0W»Wæj¾ô{IÔtßÐzÝçêWßë áÉ$­à™ÂÞvjvðëÝr4%¯ëw:<]¿õ—ãlÏ.??åJ=õ8—’Ñ;''?Óã¸áf‡GËë(ð»ÿ£Õ­ø{rò4cíµ?Ð+§ Cq=¦¾ã%Uµ¶ótº™-oŠO?Igãq‡5]ß{Àú× Ž-òÛ~Ÿð‹^¿1wšÃ†˜ôúóŠ­NݾÑWFu}ƒàEg<õ…ý­òß”:ûÑKä°^*¿ª}ø°b‹/ºŒÔ‹GÂçéE)2?SžuCL*zOöåý2˜û ŸkPŸ™Ybä¤DüHWá8ôs‡Ã‡òˆ+#7337ÕáÊ,Ì fº³=½ ä–öð(çv%ôŽ]VÆêòeù?ÑwP^ZZÞ ¾}禥åffÌ÷•MΓcê3ÙŸ·3˜û‚/«„QU Æ”õô±êJ+8Xê˜áÒ 9š;ÃÓ«_~~Q¶Ç“]”Ÿß¯—G)tÛÞÁíÈO'w¥ié_ ‚Öh‚½‹^o ˜W¹½ÊNE­™BÛ*<¾8…ü¥ÃT>c¯µõK%N%;ó‹q™YY™Žž |ÎØ¾Ö}<¹¦iîUkèå5Õ툊:ë'?Ž%êr|‹5×ÂÉþÜ­¾[‡ºú ž–5 ¥~¾Œ©¾rÔ©q&/W½ÄåÏÎв}®ü´^}²súôòØxØ©!ýWw½9)8ø;ŽC?—‘ai×5êïi®„Èý¬("îÍ)ÜœV°I[Ûg:wL¿÷9ΑvB¨¹r[faaf[Å‹[^|zݬËWm¼ÍYUuGåèœ|uk~ÎØò/˜:kÄþ‡î´¬ÿõ%g€ç–csK6»zm.´6èÎtú® 4øÔ†n¿ñ' ܶ¯’¿à7Xþ~ŸûÐxòòsÆäŒ“­Ü^Î@^°¾zà÷ÎÞ…} þ¬ä÷æõË>¥d˜ïcÇÌÁÁé>êŸ|¾4õáýç¦yÓ¼êö_fïè[4`\=¨Onïýã¬ß>R_Roe¤y"89kÜìÏÊò;ý›rÖzR¿€TÖõíí2ÝÝ*ïÜê­>ß»Á`AÒÇê>ŸëçùýË>È/„¿ayùŸS”¹ß²4}«ÒùÕEÛ­Üœ*»¥8²(ý–õG”ýÎÅÝÊc_W\zªÜ×­¼~¬Å}þQÊ}uñ\ؽxK½_x¿H»Þ.éÎi9õK¥®[é8²øÖûöt/þs¿¶üÂ.§*ÚøTùùÁòÌ‘%óøÌÿ¢ì=²d=ö÷K¯Ñ_Yî§|’}Nö¿§ÊÞì½9çS^ ”êey*wtîúTùü_QòŠò¦ô”žò”+¯|'å³|å;(³zJOé)²\ÿ¥òz÷RÝSzJOé)=¥§ô”žÒSzJOé)=¥§ô”žÒSzJOé)ÿs‹=]™†+ž.±RˆJ3)*)E¢RQÍKYæ\d¡Y‡,2§#Í(r¹”«å™eûyýÝf+r»Ù¬¨´“ÈíÈ,z³äjdç;‘ÛÍ%Äùvd–GšO#‹ÌmÈÕf y ׇäõ²·FÙÛrÙ^.Û«‘íʲŸé§Y(e‘”«åù[·p×näväÝ\ßÌ’íB)‹èín9»¹²CÙ.ûÜÎ5»…R™mÈÕŒs;}v"ïéòO3–©Ö˜´ÿjú½R:ä Š­©¶*4]É”¼Ê!ÿ–á¡k\ìÁŸRm7ç?Nµ=b¹¢¥Ú^Q"ºÚi"(®LµÓÕû•ï§Ú>±Ð90Õö‹çe©v†ºÉùpª­‰gâÁ¿½–çÇ©¶"2¼jª­ 7³ë¯ì‹ÏÞTÛÙí—ð{óRm7ç‹Sm8Ñ;2ÕöŠ\ÏÏRí4‘åÙj§+s¼ËRmŸ–¶-Õö‹Ü´¿¤ÚÊÌ´}©¶&Æù¦¥ÚYŒ­ëÞ^ÂåMOµ³åØBq¦¥öÂnÛ{a·í½°Ûö^Ømg·kì½°Ûö^Øm{/ì¶½vÛÞ »mï…ݶ÷ÂnÛ{a·í½°Ûö^Øí,¡¼·Úõ´x„žËåhdPÌÕ¢BDDh€Å"ʹShED½”圩¦¥|2E„(A1sKÄR>kGUÔU\½Y)¯ ŠérÖßêÿòx&È•óÜjúˆ ­^ºžo={ }†¸""ÊQ4¤Flͳ”yŽ:âþÝî?²çj9£rˆÊÙ[ã«•}×pΑõÉR9꣭ÝyÜÈêu]]A]Ëq9#ª–«Rú5O­åêJ9 kü ò®Ùª’×Z=.æl-í\Ñ´¬Y×4Òc”óÖèìq„é­¹DöR—ê5*ge?3,w§Bîv8µ~Öž!糘3–4r¾JÞ‘gBrÔÑÔ<*ød¸ì¹Vž ÉË™µ}¾ë)µr§,ªO2Ì™ZùT»OkžÑn#°žX/çbëc—6Úc·žTÇ ™¿½£Ö¨ìծ㯖3ŽÜo{Íì§åØÃ©yÙ»µH^yhÄÝgd­ÚJyŸ=ëŽK¿¤Cdoµ²‡UrS–Ñ}½»tÈzú ¹ªå©}‰Hm°jû‰Ö^SeÏÆã’Ô5–¶_–êÝú]F{‡–Ü¥r©#–×6¯.­`$åòù©ç—Ê•ŠòÄ b$e…,¥Rç×÷Ò”v¤½JîÐÙS==¬â¬Õãb¹_ÖNÞkHzkÖ‡®èêï\©»ö*®’³o«•ûÜ õÒ¾'({°t¤JΰZ>£»ÇéZéÓÄì~JêÞH·Olýª”ã9¤3+ä³*¤Ní¹ö±um…œKeê©öTÊÏë¥_ZÕmÝëåþ†S+o÷U%¥¥IGÎÛúÜÖXƒ»,iÙí¢ƒO:Ú¨Â_êùØ×èPï]^#˜²û¨wÅaö÷å¹wYÛ‘ã:±Û X3±çb{¡®89èÑ*¥M‡¥m—åLíu.?lMm‹¨KI{Vv»Qj^£¼³RÚ‡5›ªƒýXW†¤}Ý}WvqHãGÊÑXÝöŒ¥r¯êÅÊG‚e£F—gUWDêêGƒ§ÔEêë"åÑêºpipJ(œW½di´!8¯ª¡*²¼ª²4xjUCõ’pUepѪàÌÆ £¼ah°²*8=RW=ØÏ„à)å¡êE‘êàLëþyUKCå‘…U‘:–•Ž•ú|„ü¼ëâê†`y0)¯¬ª-Ôë£K«ºnI¤®±Þ:]QW[_®®j(=ìÖںʪH8ØPn2ÞêÅÁÅåµÕ¡UÁÕÑ¥Á†ÆEÑPU>•Õá% A†Ò­ªåÎp%]FÂŒ¯4xF4¸¸ª<Ú©jFªÊCÁê(Ϩhl¨-gE*Êëi[·Ô6†¢Õõtn¬­ŠpeCUTvЬԱŽÖ2Ò{(T·"¸”‰«vE4XF­y32n †ªÃ<‹i-ª^";¶­ZåæêšªÒ®åÒ¬-¯ V4²ö¸­ W­FÊ™K¤šiscym…â1ô¸„3 Õ—qy´Ž -·¦T\Q©µŸe-lÅÒò«Š”.Fë'Œ¹bÅŠÒÚ®u/e¹GFWÕ×-‰”×/]5²"º¸.mH]j¬(o'¬ëέkdˆ«‚ U ]±> –³"U‘ÚêhÔVkЧ-˜9…O#ò€õªl´WfÅÒꊥÝW„+¹•TV7Ô‡x€5öúH5TpUU8Zìzv]˜…5ª‡«jY7ê*ÜuñQG$/·TƒejˆFª+ìý;øtkÛºú:QÀ¨æ)¨e3KÑ*ëV„CuåÝʘË푲L·ŽG!£õQ,gyuE•uÍÒªPý:–½ ?²²jq9ÊXZÞP¿òà;8ð9žàhÿ)\AÆÏ‚Ç4…ý¶dýc¿;”{yϘB+W(JžÒ[¨J¡bЪœE{޲‘öÊ´7)›iß«l¥SÞ§ý²G8”•i¢tÒÞ«|F{Ÿò9í/”´M•g«ªêŠêRÝ´=*oAªOõÓÎP‹š¥ö¢­hçªy´óÕÞ´ Õ>´ûªh«:íêÚ†:”v‰ZB{˜:Œöpu8íêÚ¥êÝ´ïQï¡Ý¬6ÓÞ¬n¦}¯cºP§;ΰþÿY®¡¸.æë*tF{škºp¸Nw•Ó^䪦½Ìu)íˆkí•®ïÓ¾Öu-íµ®'h?éz’öS^E(^Õ;H¨ÞÁi5BI ¥…„#­6ã¡d<šñ¨pd´d¤=„üöä´!ÑØY­EkAþTû)²UkEnѶ ·j[‘¿Ô~‰ü•ö+ä6mò×Ú¯‘OhhŽö”öòiíiävm;òYíYämò9í9d\‹#_Ô^DîÔv"_Ö^F¾¢½‚l×Ú‘¯i¯!_×^G&µ$ò} «Ôöh{i!?Ñ>‘e‘.>t¼,«"!X©ªëCåѰh&uM>/(FM=ëì (>}Þ 8yÖŒSƒâ¼³çMµ²ë/•;e¹ä/ö‘"|"O H©ø“|Qœ:rˆ Q ôÔ‘Sh¢·˜:rá Å ÙŸ}Æ-²D1˜ÞgÌ™sº8ï¬YŒfþ¼Œ#uGô}y ²Žòß-©O¼"G‘ùÙGi" ú‹1¬¢¾¡^qJ™.e–”yRö•²XJCÊR)ÇJ9¡†¤B™,å4)gJ9OÊs¤¼HÊJ)—IY/år)¯°Òå)ï–r‹”;¤ìrŸ%Õl)K¤œ*åyRFjkjkÔõR6Iy·”Jù¨”[¤Ü&åSRîr§”¯É}W¾…ßR¦ ë;.kÇÝìŸWF ßÿÁó–md|çµ&ŠÔ_©ÏªíêßÔO^GÃpœ@|;DZԱRXßûMëE“¸[<([Ä6ñ”Ø!vŠ×D‡x[|(ö)ª’®dï‹•¥L™ LUÎTæ)ç)‹”eJD¹L¹FY¯4)w+**[”mÊSÊe§òšÒ¡¼MÔßGTO'juJÔ2u‚:U=S§ž§.R—©õ2õu½Ú$ÿO©B}î¯g×MÛõÚuë³vÝvž]ÿy‹]ïk×{5Y+Nû~%Íi× ìzÀ§v=f½]O}Ô®§¯µëK]·ô€]×c×—l×kÚõÆíú¾›ìú±ivýxêüî‹ìzOêþOód­*óìÚ´ë^Kíº÷J».ŠØµþ”]yÍ®‡»íz”=>u¬=~õ„ŸØõÄÙv=ÅŸ:ûÇv}öãv}î•v}aÈ®ÙãVìuW¯LõwMêúuev}«ß®7Úë¨Þý¶]ÿ05ŸŽ²ëV{Ô­ö>¨_b×Ï^a×;výZ½]¿q¯]¿iï£úöëvý~‘]”'Ò¤ðJ/£v¾Òí˜(²·ô°cGÞ¨ÃóÏ;ü¸pÚáÇ}ã‡,;üxôŸ™}øñI•"Mív|²Ñís²×9õ‡/`]¯: cYxCüÕ{{ÖÔœsŧö]ØßœlÕÃW–œWR9¬xÄ‹#:FýjÌú±·ö¸µ'Öÿª¦ä¼KNš9ýÀÌÐ쳆Ï}|¾wþ²ùõ ŠܲpáÂ7¾wîßÎßváyK—.]^#jÒkN­YTªY^sUͶšçjÞ®ù¸æ@È* M Í ]T{jíâÚ+jwÔ¶×¾.—…Ï /?Ž× R¨Së/«ßZ¿½þÍú}—.½ôÁKŸ‹Üy8²³!ÚpwãË_[±tUÞe£.;óòŸ\¾åò_­v¯ö¯.ºr2™däÀMÊ;DíiÄéi"ÛLŠ@.äA> 1;„C¡†Á¢ñ‰0ÃŒ‹™0 fÃY0æÂ<8æÃXçB¥Ù.ª`1,…jX5‚ZCÔÃ¥s›ˆB#,‡°.3câr¸VÕpYÄÍp+÷5Ámp;l„;à‡ð#ø1<ˆ9øÒ9bíßÁsð<Äáx^‚° ^†ßC;ü—Ù*Þ„¿À_™ãnÖíoð¼ ï@Þ…÷à}øöÀ‡Üó÷| Ÿ@'ì…Ï8¿>‡/`¿ÙªfR %0 †Ã(…‘0 FCŒ±pŒƒãáàD˜'ÁÉ0 &Ø §À©pLƒép:œg ˜ ³`6œeýôÒlWîf¸îƒûáx‚‡áÀ(ìÂ(ìÂ(-ðø)<?ƒVø9l_ÀVx‚µxÒ$rÁoàix~Ëùg¡ vÀïÌVu‚WOÓÍvõ 3¦Î€ói£‡*z¨VsÍ2¨ jLÔ_sÏãð¤™Tùíæ6u'Ço‰9êûÁ'Üó©ÙêpšíŽÑÔe0Î3cŽ‹Ì˜s½wÞ7¸ n†[àVh‚ÛàvØwÀf»sܬ©“5u²¦ÎÍÀº:ï£ßûáxÞluÆáøŸ½oÃ;„wá=`ÌNÆìÜcw~ Ÿ˜Ig'ì…Oá3؟ÀÞ9€i¶º²ÌvW/ȦŸpá'\ø ~ÂU½áUøO³Ã…¸x¶ë}s›ë3æÚÏñŽM³Ý-@\bšÛmv¸=fÆÝé Ñ. î }¹¦ ¢=†€C͘p£Çîé\!ç.‚‹áÀ—¸ÙK7¾Ä/qãKÜø7¾ÄÝQÀ—¸ñ%n|‰_âÆ¸Ys7kî¾Çlu¿¬‡ç{Š ?a°ÙꆹÍ3†ÓÍù2Úì½ç4Ú³`>œÏñ…pàã@o(„>À>{Yg/ëìe½¬³wƒa\ ‹ÌÖtbK:±%¸’Îz¥¯‚ËáM3–þ3æÃgûðÙ>ÖÄÇšøXkâÃgû^?˜­¾?BþX'käÇûvëâ{ÞÖÄ·Çlõ/3“~öÐ2cþï‰iþufÜ=`ãþ{Ì?úâ v6æÿˆšµÌð#ÛÉÀv2²ùd\gnËàþ îÏØÈ5¾1ߨ嚭Zä›­™ÂLf*p5þìX¢uœh'ZljÖq¢uü[Fë Dë Dë ß0Z7­×­×­×­×­×­›ˆÖMDë&¢uѺé_­·ýѺ•hÝJ´n%Z·­[‰ÖÍDëf¢u3Ѻ™hÝÜ­¿U´Þ@´n"Z7%Z7­›‰ÖÍ_­7­›¾a´Þ@´ÞðOŠÖMDë&¢uÓC´n&Z7­›‰ÖŽ1ZÇSÑzѺ‰hÝôw¢uœhï­ãÇ­›ºEëøQ¢õ¢õ¢õ¢õ†¯ˆÖMDë&¢õ:¢õ:¢uÓ?1Z7ÿ¢uów­[‰Ö­DëæT´n%Z7ÿ/ŒÖMDë¦cˆÖÍDëf¢u3Ѻ™hÝL´n&Z7­›‰ÖÍDëf¢u3Ѻ™hÝœŠÖˆÖMG‰Öñ¯ˆÖÍ_­›¾&Z7­›‰ÖÍÝ£µx†h½€h½€<‚<‚h'𯉦q"d’ÙI„ì$Bv!;‰bw]F”buˆ’íDÉv¢d»X#ÊÄ÷áZX ×Á:¸Öà p#l€®èø)í`Š2E€sÄDe.̃³a>T‹9Ê2¨íBÇûÆñ¾íxßvu–ÈTçŠ2u,€sàCLŒÀÛÆñ¶IõY®kçœåq÷‰2GPÌq'tÇv,¤}¾p9.†¸Ãñ=Qä¸Öˆ"¼c;Þ±ïØîÜ)Êœ»àeø=¼¯ý:ÿ¯ÁáOex8ËkÅñZI¼–åàiÚñ&q¼IoÇ›ÄñIö×ÇþúØ_ûëc}ì¯ýõÝ7ãñ1_Ü·ÃF¸îÆé»K”aq¬ Ý™XÂÿmÔ[8ÿªÐýBÏp‰² 7ôë̤–&Ê´tð2@e™“Dfæd˜S½ÈD/2φùp!\:’YÕBÏ\5:ÚHì.pƒ¼éà?d€†ö‚I€­9ç~׉ßu.|¯_âÄ—8±'»éÄbœXŒ‹q~øõ9;ìžéÆ–Ý9€=»K€à>žÝ!ïL'ïLÇ_§·ýؾП~2'–9ˆ™³á,ò/6©c“:6©c“:6©c“:6©c“:6©c“:6©“åN#ËF–ÛF–ÛF–ÛF–ÛF–ÛF–ÛF–»‹,wYî.²Ü]d¹»°ã2ì¸ìÌrÛÈrÛÈrÛÈpãd¸q2Ü8nœ 7N†'ÓáÆÉpãd¸q2Ü8n;nŒ 7F†#ÑáÆÈp“d¸I2Ü$n’ 7‰_Ðñ :~A—YÚ%Ô‡2µ62µ$™Z’L-)3µv> q(#k##k##k·22ì_Çþuì_Çþuì_Çþuì_Çþuì_Çþuì_Çþõ0ƒŠ“AÅÉ âdPq2¨8Tœ *N'ƒJ’A%É ’dNmdmd»RÙAÙA;ÙAÿ §2„8Bœ !N†'Cˆã7tü†N¦0La™Â®n™Â.ü‰Ž?Ñ»e q2†8¾E?JÖÄßèdmøŸ£“A´‘Aì:JÑFÑFÑFÑF'ƒˆ“AÄÉ âdq2ˆv2ˆv2ˆDŒ "IÑFóXÙÓ^¡wÐø-¿¥ã·tü–ŽßÒñ[:~KÇoéø-¿¥ã·tü–ŽßÒñ[:~KÇoéø-¿¥ã·tü–ŽßÒñ[:~KÇoéø-¿¥ã·tü–ŽßÒñ[:~K?†¬ IV$+H’$É ’dI²‚$YA’¬ IV$+H’$É ’Dú6"}‘>‰ßÓñ{:Ú¾ý`„O:þPÇêøC¨ãu"’ÈŸ$ò'ñ}:¾OÇ÷éø>ß§+Îoä!þû<á÷ßoæ¶}Å»o ž¡ÏЂghÁ3´üÏ`½ÃµàZð -_ã¬wµmÿƒh±vŒU¸®€Õp%|¸ÞÇõ¾k€qû·qû·qû·qû·qû·qûn‚›áàY¾&¸ n‡p m>Æà»ËZqp[oI>ðChV&hoæÅÀ:d–³>Ê" üž…6ؿþFCŒçó‡DÀ}¼ˆ¾†!0¸Æ»ˆ½ç¼ÿ%ØÉ~odï®Ææ¦f‡2J` ‡P #aŒ†2cá8Çà 0&À‰0N‚“aL†)0NSá4˜Óát8΄0fÁl8Ëú7¯p4ýpÜÀƒ€æ*Ãà‡ð#ø1<B ü~ ÁÏ ~[à°bfRy‚úIÞÑž‚ßÀÓðŒõoj9ÿ[s—ò,´Áø<Çùç!/˜ŽÑæ.GŒÖïÇóÅÏ›»œqxÁÜåêev¸ yÐÛìpßÌ×}¹ËÝFý"u;u'©AÂ`±z(°öÏ3œXÎþyØ?ûçaïÑý*·òàß¼ö.’ê4ŽÆ18ÇaŽÇ 8'a9NÆÕrøßcþƒµ‰ÉEH.Br2«Z͈.Q2+Jâóò»|\³~5¹µ&·Ö^Sd59RtÄ5y½&‡×ìµ"cVdÌŠŒY‘1[³vµãaíjêššº¦¦®©Y£ú‡pjõ`ü®úèJ÷­[#ýÐõ!Á£ƒê×m?ÃÏ]~rXùæƒ:jì’"›Á¥°/‹šXÔÄÿõ•ˆÌEd."s™‹È\Dæ"2‘¹ˆÌEd."s™‹È¼aOkØ3Eæ¬ÈŒG ?¿MÖ½¡w™Š9¡ùÚúMtf¢3ÿ]uœ(ÍEi.Jó µÐÄ®Eoâ½Ø ‹‡Ÿ 'jœ 5΄gB#š3Ñœ‰æL4¿|-XføüÀðÒ[ËÇrù8,:o—(-(ŸoǸ¢4Vþ”G]UÌnï=nWâ°%^…Wc+¼2H ƒ-æƒá¯ð×øŠ¥8 ‡ãã8SøŽÄQø$¦q4Œ08ÇaŽ/æÖaü‚b~ܸƫ47<ÉrœŒSp*NÃé8gâ,œ°è”*V•? ë]gÞuV>Y†8§â4œQšù­ò9..ÀEþæbÃÖ2[Ël5;m³Ó®lSt*o,:Õ¯áFD¸ _Ç͸+ñ ÜŠÛp;:E§öY\¯ÀcjS»÷ ƽE§¾X«‘.):c*±¥Ž‡ \¬ *¨bj¨cëa ÇBL`}l€ ±acl‚M±6Ç+ÀVd È1 c@Æ€ŒY°“¨Ý»à=ø#ìŠ÷b7,Æã}ø4ñ§x?dêàÞÇîðÞ‚=°'öÂÞØûI°?ÀÿÀŸáC8áÏ¡o†J0˜Ä‡až‚¿ÄG‹63ÛÌl3³ÍÌ63ÛÌl3³ÍÌ63ÛÌl3³ÍÌ63ÛÌl3³ÍÌ63ÛÌl3³ÍÌ63ÛÌl7¬YÚ5¬K3–¶Ç¯(:ãW‚'lm—ªÃ=åüa¬äb%/Ýð{øñ7âo*r;N8œ”wý$,÷ ';ž‚Sq¯ºÖeõÜÐç q±zðÌàR\ÆñËÝþ)—¯Òuü×{¬ñ:ûX‘¯u{숡ß¿#~GüŽøñ;âwÄïˆß¿#~GüŽøñ;âwÄïˆß¿#~GüŽøñ;âwÄïˆß¿~'üNøð;áwÂï„ß ¿S~§üNùò;åwÊï”ß)¿S~§üNùò;åwÊï”ßé¿ë·ƒ}žwyÞåy—ç]žwyÞåy—ç]žwyÞåy—ç]žwyÞåy—ç]žwyÞåy—ç]žwyÞåy—ç]žwyÞåy—ç]žwyÞåy—ç]žwyÞåy—ç]žwyÞåy÷%ž'<ï®ãy—çÝÒW‡ç‘²g³:cuÆêŒÕ«3Vg¬ÎX±:cõ WŽ™0;avßî´ŠÝ£{ŒN1:ctÆèL†^ C·Y±:+Ûë˃Ïìó2õ³Sf§ÌN™2;cv_-×._9ÌÜ=†÷*öX–g,Ï*ï(R¦gLϘž1=czÆôŒéÓ3¦gLϘž1=czÆôŒéÓ3¦gLϘž1=czÆôŒéÓ3¦gLÏôÛ±~;f{¦_ßg|ÊøŒñãûŒOŸ0>a|Âø„ñ ãÆ'ŒOŸ0>a|Âø„ñ ãÆ'ŒOŸ0>a|Âø„ñ ãÆ'Œ1:ctÆèŒÑ£3FgŒÎ1:ctÆèŒÑ£3FgŒÎ1:ctÆèŒÑ£3FgŒÎ˜œ29erÊä”É)“S&§LN™œ29erÊä”É)“S&§LÔ=&÷˜ÜcrÉ=&÷˜ÜcrÉ=&÷˜ÜcrÉ=&÷˜ÜcrÉ=&÷˜ÜcrÉ=&÷˜Ük´‡Y;csÆæAÆî_6üœ ftÆèŒÑ=F÷J2ºÏè>£ûŒî3ºÏè>£ûŒî3ºÏè>£ûŒî³9gs>¬®ÎPI5ÌÁ}¶òoŸ¥9óúÌ볮Ϻ>ëú¬ë³®Ïº>ëú¬ë³®Ïº>ëú¬ë³®Ïº>ëú¬ë³®Ïº>ëú¬ë³®Ïº>ëú¬ë³®Ïº>Ûú ë3l`Wήœ]9»rvåìÊÙ•³+gWήœ]9»rvåìÊÙ•³+gWήœ]9»rvåìÊÙ•³+gWÎŽ>;úì賣ώ>;úìè³£oöûf¿oöûf¼oÆû¥×Ú­újбòy°W–/r|®ÍÅìó{'7rnäÜȹ‘s#çFΜ97rnäÜȹ‘s#çFΜ97rnäÜȹ‘s#çFÎA™[ûÜÚç¥ÏÿG³™µÏ¬}¶N}ùÒì5ö|æº`˜±r+“±2+“±2ï6ónŸÏNÿU™iMm™­ÍD<Éx’ñ$ãIÆ“Œ'O2žd<Éx’ñ$ãIÆ“Œ'O2žd<Éx’ñ$ãIÆ“Œ'O2žd<Éþ/êÊÿì,•ÉR™,•ÉR™,•ÉR™,•ÉR™,•ÉR™,•ÉR™,•ÉR™,•ÉR3&fL̘˜11cbÆÄŒ‰Y0˜ÇãLáÐA31cbÆÄŒ‰3&fL̘˜11[7C­©+³u²SÆÐ¬´ÓóÆ=·Ï%kí±$ÿ%+øŸ8Ãw¼öÖŸÏç{—•É d„DFHJË,Ý7oýòòÒ–Ïgçóõ¼ƒ }á0÷ì`NçÍi®nDeß¼öÿ[2÷ÇJ[®ÍÞcƒœV–E+¨bj¨cëa ‡ç´®}ëÚ·®}ëÚ·®}ëÚ·®}ëÚ·®}ëÚ·®}ëÚÿ÷2¸™Ÿ7óóÖ¿oýûÖ¿oýûÖ¿oýûÖ¿oýûÁ`Çù8uÍ>#aþ­ßú÷­ßú÷­ßú÷­ßú¿x—°.öèlínÁ‹>/ú¥ÐʧV>µò©•O­|jåS+ŸZùÔʧV>µò©•O­|×ÊwŸÏÑË95øôã÷‹ÁîsãE*MURä H2 eÀ bL2 e@Ê€”)R¤ H2 e@Ê€”)R¤ H2 e@Ê€”)R¤ H®ÉËú¢Ò R¤,HYÐeA—]tYÐeA—]tYÐeA—]tYÐeA—]tYÐeA—]tYÐeA—]tYÐýwóóŒcwKR–¤,IY’²dPÅ¥ìHÙ‘²#eGÊŽ”);Rv¤ìHƒÁû™Â'p$ŽÂ'1 ý.;Rv¤ìHÙ‘²#eGÊŽ”éšü˜2$gHÊ”!)CÒò—Jii#,ÂÆØ›b§¢SÚ»Ë K°öÄ^Øû@†) 2Ì~ØàC8½X\:gâ,œçà\œ‡óq.ÄE¸¤˜,ÍàR\†Ëqn,fJî,¦Jwán܃÷â>ÜÐŃx=¬.Z¥àŸðCü ž.Ú#å‑ ªX€êÅzC€ƱëËG6À†Ø‹°16Á¦Ø ›cËbzäUx5¶Âk°5^‹×áõxþªˆGŽÀÑ8Çâ8,Ãñ8'¡Ep(‚CŠàP‡"8Á¡Ep(‚ÑsüÍù¸â"\\ÌŽ\‚\ŠËp9®À•¸Ácþþ_Èp¾Ž›q VâV܆ÛÑÁ718Ûò·‹hä¬Â¸«ˆÊ;ÉŒ}ŠÅå}±?*¦Ê“Žuü>Ž#ôŸ'èu½ßòé8硌Ê6aù‹î¿¡è”¿V´Ê7âfÏy dò·e§\îyΔ“b¦üh1[~Ü1ÃÏ=ÿÿÆÅdùIûL±¼ü+Ï÷›b¶R*¢JűZLUjÅL¥îú(Ö+Ú•1×­}e¼˜Ó·+E\Y`Cl„EÅ’ÊÆØ¤˜®lŠÍ°¹¿…ÇoáþWâ°^ƒ­=ßkñº¢UÑëVôº2f(c†•m]Þo›‹å•·×[]~¶÷œ;àíx‡ûÞ©GÿC·ïˆw©„ßí¸ÄkeÇ÷à]Pý ®ÁgÑÂçðy|_ľ„ÀµÅtõ:´ñe\¯à«¸_+B»Chwí¡Ý!´;„v‡ÐîÚB»Chwí¡Ý!¬ò¬ú-|w`îÄ]¸{øïÿQ5ƽx X\íâA<„‡ñ8Rý¾‹ïáûXÇŠ©êãøWü~ŠŸ?UþTûøžÀ“ÅÔ‚GŠtÁ‹dÁo†¿ŽNjcÃ_F'µÁw ^‡×ã ØÛÙ½vÆ_¸|0Á$Î/–×.)âšÞºö·ETû´£y¶†µ–ËŸÃçñ|sÅlÍ×ÌqíZ\ïq_˜­Ýèz„›ŠéÚ×aí aM¼ÖÄkM¼ÖÄkíN¹Ëýw»ïĸ÷yý‡ç¯ñ]÷§÷×û.ÿOàIü²˜®×‹¸>Šõ0† ŒcaÚ¡C;th‡ëƒoމ•ú"lŒM°)6+fë›ãد„8©‹“úÖx-^‡mðFl[ôêÛáMETßÁu±PGq@}GìêúŸ“õ3õýŠ©ú¡ÅâúaŽG:…OâX×Ã).ŸŠ³\>—¸|©ãe¸WàSn»Êó]í8‡ë\¶ÇÔí1u{LÝSÿ^Ѫö˜º=¦n©ÿ´h׆§ŠÅ£o-fG›ÃϲÂ1{ä˜=rÌþ8ö—ÅôØG‹HµªV±©";jøÛ«©±e8¡˜ ¼ÿÀû¼ÿ@žä‰À<æ!'y"'‚7ã-'y"Øæ&x;ÞwBžä‰à]x÷ð_BUI¨* U%¡ª$T•„ª’PU'‹ƒq–ãd˜³Àœ§ÁÞØÛ{{`oìí½=°·ööÀÞØÛ{{`oìíÁÅ0ÏÁ .Åe¸WàJ˜ïà*ØÏûy`®s˜ëÀ\öóàábª¡2jW´a‘4Î\Ö¸Êõ¿ÃÕEÜXÏàš"j|¶h7ÄPC 5¾à²øiÌáK¸¶X޸α]Ì6¾ŒëÝÿUä ¸ÑßÚû74ì} {_ã·ßêúm¸bºñM÷-Ø÷wø{¹¨!©¼B•W¨ò rQC\5îÇèzž=æ!ñaZô&–â0Žñ„g‚çÓEgÂ?q–ãdœ‚S=×iŽöþ‰3`ÿŸ8ËcÏv ¡¦™PÓL jš-JÕb®´5Ô1Šõ0† صK ±S±J»ªt°.ùLbð/½Á_þ_‹u¾¥1øÝß²båË~Sãô"RÑF*ÚHE©h#m¤¢T´‘Š6RÑF*ÚHÅÚU±v_ôàÁwvßVÌ•wÅ‹¿±Ru©Ž"ÕQ¤2Іßÿ=Âã¯ñØAås­ ç:=Ö Å*М h®|Ûð×Ô³åN±ºüM çç¹îRÅþæ~ùƒn{Èå‡Ñó¼?PA%n{\—¹<ø.qîuž|Ÿ¸HTC±*(SŪ XÔQá´U8m•K[åÒ®¨à*VLV>TLV÷.æªÓ8ÇàX‡e8'àDœ„å8/þ–Gd—ŽìÒ‘]:²KGvéÈ.Ù¥#»td—ŽìÒ‘]:ZóÍŽxø­Žç~W8øfÇ\­NÔ6ÄFزÈk[;>÷ÍŽ¹ÚöØ]dµ¿Á¡XŠÃðÒo{¬ý="jÇã„5ß{>Ôns$ŽÂ)`¬#²SDv‰È.ýÖ÷œZ$vƒdøæ§düKй±\ŠY¼ðŽHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdÜHÆdܨ±~1ר“2͇‹¼ñ1·½ðM• =gCÏÙ8ÆýÖ¶q‚ËÖ³a=§»í s^Ñoœ_¬n\€ q‘Ç\êo¯ò˜¿Ãõ²ôM2Új$xløXFËd´ŽlÉf‘ –/’•6Æ&Ø[¹ÿõþö±ˆd¦HfŠd¦HfŠd¦hb—bnb×båÄ{±ãý2Ôîn_‚=°'öÂÞÅj™,‘É™,‘É™,–É"™,’É"™,’É¢‰èd“!¦dˆ)bJ†ˆ×dˆYbV†˜•!feˆYÑÞí-Ñ>è/{¢|J”ÏŠòÙa”ª÷8Âí×ó"wJäF"7¹ñšÈFîÚˆM<î—þ&÷öˆÐžžeµ(m‹Ð¶m‹¦YÑ4+šç˜-Ñ1%:bÑ1+f>Åð)†O1|Šá1Ããu Ÿex‹½-ö¶ØÛbï –é±·ÇÞSg™:Ë’yvL±cvSì˜bÇ<3¦1Ï„ˆ "&L M¸ž)¹ï ûôÓ yÏóö²ÕV}ÞªGV=²ê‘ýjðí¼Áïºã—]Õ½­Ì>ö•}ñAì‡Ýþ™÷}Vk…ÕZaµVX¥¶Uj[¥¶Uj[¥¶UêX¥ŽUêX¡V¨m…ÚV§cUVX•Ī$ºÊy+²Ü t¬@Ç tÌ~lö{f¿gögh›ý¶Ùœi…Ùï˜ýf¾mæÛf~…™_aæW˜ùfºm¦;fºc¦;fºc¦;f¸c†Ûf¸mvW˜Ý¶™]nf—›Õåf41£‰MÌèr³Ø1‹±YŒÍ`lö:f¯cö:f/6C§{f¤SºÆÎÚ¹B;Whç í\¡+´s…v®ÐÎÚ¹B;Wø;Ïór§gº wãĸ÷á~<€.ÄCè™-µ¤]-´«…zþŽ-Ôówôü=ÇŽÚ‘";Q¬GïèÑ;Ãó€+½-¶Ã›àñúÖyýç¼j)ÓWÎës½c®wÌõ‹¹ *SAeúÂ\Ÿ•ë³r}V®ÏÊõV©>*×7¥¥-ŒvÞhçvÞhçv¾òV£{Ûp„óF8o„óÃѽð šy#œ7Ây#œ7Ây#›7²yÝrf4óF3o4ók^m~øjÛ›ŸU/÷ŠƒoØ™£Ä%æ(3G=sÔ«¼ÎíoU˼ ëŽæ¢pgÇÝÌÓËf[±ÖŽê£ºN-q£ãM,ýö‹GiÎV™³ž9뙳Uæl•9[eÎV™³UÞÅüšw1_Úúå~}dô=£ï­3òlOe_ø%Ò»ŠtÝ_ ]t_ÑþRÈýÃO¾ª.¾ƒ‘Þâ¸î¯qº®¯éðW7åÊA¥m*‡”¶)Ý¢¦™QǪ́ifT ³/{¦¶GñÏøüÂcžqüæñkü¦˜ÙF÷¬'ÙÛáMx3ÞïiÄ{Ù;àíxÞ‰?ÄŽxÞ°3vÁ{ðGØïÅnXŒ?Æûð'hâOñ~è{G>½ïÈì=±--YŠÃð"¹µh܆ÛÑÁ7ñrÿÊðþbæù3’Š¥8 ‡ãv|KþKǧ‹ÙÊ«¿ë{áÓô—œì…OÍWõYÅŒÚnF&™Y°HU½16:kÁfØ|ØÎ¨¸¿4˜žMËëªûfÔ}3ê¾÷¬Š{vxV¬Á§¼7 ~?è˜ë _¯o|¶Qª×|ºÙ~ºyP1c/™­ìx%~ˆ!õ¶_ÌÚ/fë?wùIäÅÌh¹ˆGÕ„£U,@ úùQýüèzPQh` 1õ±ô×£A5=vtiÑógú¾‡Õø'G` Áà¾ã'0ñýbF-;3<ÃÓºŸ€=ằªîgÇõ£ö‚Ù…3 7Á¦ÅÌ„Šcbä¹O„JÓ%£)MÉÌ—Ì|ÉÌ—ÌüËžKñ÷;‡âº‘µ¬4íx4ŽÁ±8ÇëçNÀ‰8 Ëõd/œ o`^‹y­uÎs¯±nÙàbÝGü[g›Ð%ɺ.©®K’GZkÎ,Ñ‘KZ:•X§ëTbÝB¬[ˆu ±n!Ö-ĺ…X·ëbù¡%?´ä‡–üÐ’ZòCK~hÉ-ù¡%?´ä‡–üÐ’Z:ŒxÍ™Zº‹Xwë.âñ­ñÅ5ŽŸ-bù¡%?´ä‡ÖH³T-• †:F1øƆÿ÷ÃX©q,ÄNØ-–Šó¥â|©8ŸçKÄùq¾Dœ/çKJË<ëñî;'â$,Çéþþ œ‰³p6BœƒsqÎǸ±´¨áQ¯óÏøüBÏó„ùIü9žÂÓ^ï™bš‰ÓLœfâ4§Gþ§PÜŒÌâïp5þ+ði|ffÄÌŒˆšQ3"jFD͈¨™Ã—ð¸liã˸_ÁWYü¶ÒXyW¼¿X*‡MÊa“å=J Êû¸m_ìIêþ¥Å´h˜ Óå#<æ·ß€ÛÝ÷-w‡Ûz®?^Z$:–ŠŽ°ü«Ò•å»*KU—ïªâ8-jØ\¹ß.ÜUßè5+Ú•ÿÅå´´Cå'¥EÕ½KcÕicp,ŽÃ2p"NÂrœŒ«‹IùrR¾œ¬>àzâ!<ŒG`|Õïà»ø¾Õ0ç¢qZ4N˵K°PT.•g—ʳ“òìä‚ùÒX­îÕ6ÄFØo,&kÛ:nqx±Tþ\*.•?—ÊŸ“òç¤ü¹Dþ\RãXíxp¬&RkÖºþد«±ý0 ,•BY`º~hi¬~$ŽÂ)8—àJ÷}ÊñjÌá‡þæGHÀ?ÑŠîPtÏŠîÙúOK ê?ÃÏýÝ“îç¢(Ÿ®?Uµ¿ŽÚ_Gí¯£ö×QûǨýcôد„qŽç¨qŽçèVx Dëèka¯µŒÛØ .Å,þ¹˜´GLÖ-°nu ¬[`Ýï'ð~‚Ó Îqˆ³@œâ,g8 ÄY Îqˆ³àB\„‹áõ¯x½à2\Ž+p%ÌOp¾SLËNÓ²Ó´ì4-;MËNÓ²Ó´ì4-;MËNÓ²Ó´ì4-;M7Ö/5¶ÃaÅRûÚdƒ÷ co{ãR—¯Çî{²˜—Æå£ñ-J ìw“²W¸PNZ('-”“ÊI 夅r’l6-›MËfÓ»”Æ&v--˜x/vÃbìî¶%Ø{b/ìãö}ñA쇿pÛÁ8btâÃ¥±‘ýJU{ÛÔPÇ(ÖÃ40Ž…˜ÀúØI½s©Y:Ýå3p&ÎÂÙqÎÅy8àB\„ýmT$Ãÿ5½‚* †:F±Æ q,Äàÿdßb#èGt‰#›`Sl†Í1øÿÚ_…Wc+¼[ãµx^7`oìƒ}ñA쇓°'㜊Óp:ÎÀ™8 g#ÄŸ3¸—ár\+‡ÿ~×)ï:üd³SÞû?Õì”Ïqß¹¸`øovò Ão#uÊëz½çŠ÷Tñž*ÞSe¼oÆ[°+n)¨èê+?.Ú•Ç/XÉŸýuå©â ÊÓÅ«*ÏAåWÏ>U™wù×ÅHå7nÖå¢x{uÁ³¿®ÖŠƒªõâUÕÑ"¨®÷ìSÕ1—ƒb¤Úpû¸Ë =nï¢S•}«Gã‹ã° Ç㜈“°'ãÓERý ®ÁgÑÂçðy|_ľ„Àµ¸m|×ã+ø*ÌIõkàL•3Õ›ðuÜŒ[°ßÀ­¸ ·£ƒŒ£‹a·¨>ŒG`~«ßÁwñ=|«‹Î‚ù¢S«@,ÔÄBmCl„­±-¶ÇŽ8¿HjÞ[ÍûªÍøkÆ_3öšq׌»ö0ÞšñÖŒ·f¼5ã¬gíNÜ…»qbÜ‹‡ñ¾‹?A¿Àx¿ÄSERõ ˆ…ºX¨ó£Îùú+°^‰w`G:üTºS? Ÿ~"Ý©Ÿ:ü$zðÉs§~5憟0wF— ¿e2ø l2v8ý²Ÿ»<#þ óø5~#Wüÿ~vùoà¹olf#w`îÄ]Eöüç(ÜQñ%*¾¤œ«ËO«×ùÜ+«{ÅØ‡ßD¼µ˜©Ü«‚»O.{¨Xþ’ÏT²jŒ{‡giHTZ‰J+ùg=_ûÊsŸ•dµû˜Õ߀¾–Õ½¾ )Q %ªšD5“ü?;ËöGŠlÏ>ÕC¢zHT‰ê!Q=$ª‡Dõ¨ÕC¢zHT‰ê!~îqÝðLÖYã~<€Á7~žžu§7¾¨X=¾16ÁåÃ3$ª‚DU<¦ê«ëÛ4ƒ3…”+:ÜŠú®´°•v©Üd¿XéøÒæÖb®r[iËÊíÖ#.ím]ö®<ྮŠûAöCÖëáÒ–¥z%që£õcH+5=gG ¾W¸µh ÖòùךtiP­?>8ûïˆ}DŸ0¢Oùà°ö9´ÔYŠÃ<Ï«KÍZ[=|ƒã?:ª1ÇŽVeTgÑ4xå½ís{Ǻ·üØ+ê½<^ÚÅ¥{½ƒ‡Œ¼â¶ŒzÐ-ìàÚ½^ï5÷Õ*ûsðÏŠU•aÚ³ÞZDÕ÷x¦Š[;ní¸eÙ7›qàZϵÃKc®Íï{·³©7kê0›:̦sðž5=KS‡ÙÔa6u˜MfSÕÔE5uDÍÊþæÿ@ó0wý&cøFÑõ¬]]MSWÓÔÕ4u5M]MSWÓÔÕ4u5M]MSWÓÔÕ4u5M]MS×ÑÔu4uM]GS×ÑÔu4uMGSÇÑTm7UÛMÕvSµÝTµ6U­M•jS¥ÚTa6U”MeSEÙTQ6U”ÞÓð=Gæú&3qs‘VìlF;ˆævå¶"Õ½M—Þ̯ÍÝ›»uÕp7¹¯´ÍÈý¥Íôæô-æô-•=ò ÒG+;âx¸y¶SUŽñœWX…+}¦n£Ú™«¾»´cu§ÒŽf~ͧÜ^kGvL[훇«27|µ`Íz>·rîžIL³ãÿPw&pR“÷ÿ’Ì$Ã$»³ÀÊ *‡€'(Š ÖÛj½ÀûDŠ`-§Ç‚®ÀzPAD´¢ˆÇÔ›õÀcUVqPñAE뀤¶[룠Ðj<ÖšßûÉÌ.»Ëb…_ûÿõÿš×{“Í$™gžãû|>™‚á;Úë÷P?À?Õ ’b˜>–å8¯f$Ç åÕ›OémœÅϦœFFù4Ú˜@k¿ˆOB$ŸfË,G©ö¥Òýï­¦6¯á˜wÃzÊpOÊpÏŸûBÑ/ÞN ³Î„jH5ó#ë€Òl}ɶ¯XjvEø3ÔÁûðìxd Ä"{=pœ½Qôsþ!†9_©Ù¡täû–K­!ÿ¾Y?ò0à›õ‹jT!“Å\—ÆZQ•iR³$Gõà(ÉQ=¢ÈQÈu•p¡–HâíÉ”C©žÁçžÉÞ#XžÃr2GI>ó#¥åù,mŸp–Oà u»P\Žt õ<‹cË9®Ü¸˜ý/áSÖ‘æOø$õn¼Yý‘œMEÞ®b4å?Î5ŽúHx–sìì9¢¸÷:Îë)/¦ÏøÿsúßDy¼, âëáË00ÇØ“`2L oP¢~“Wß6טæ3Š3Œ^}Ó~Ƈ¤ô#ˆ¾i”râ6ûÞ¤öZcCºÔQ’t­ã ^ô¤ FS‡ÇÀypL…i0ª¨ÇGÂQp4¼Õc³1îœIÏwŒ'f] —P¦ÓHÃ-ì·¯ÁYe ýï«OUóï'†Rw‡ÆPwñˆa±»á1,^ëaƒfö‡ñ0&Â$˜ªž´;gð~TRATFË]}/¹jHg5é¬.Ö”òbM)'½>¹±'ùå© ðwß„•ø½þø½3ïñ|õ, ~¯¿·~o8~ïü^%~¯?~ïÌX<_’eÁïUâ÷öÂï •‡fl»pßXè²Xg–]ÂÞ±®,»AwèÁ~Û³Üv„žì׋eoöëÃr'èîKÍðÍ–F*#‰ºHÒªˆ ‘~ª¾C¯g‹X˜q0Á‚´$Øà@ ”ÂÖüº³?Z{lï<øötô‹Í,Õ¯6OOë‡ÕxõyúÖŸ…¦¿àFåôÕÑÓ Òxç4Þ9wNãÓxç4Þ9wNãÓxç4Þ9wNãÓÛò«O³_yêÃtô뎦ñ²éVåiÇööÐðkO/Ö[þâ³3ÛÔ/>Y†-üòÓìWÃ4~1_LãÓx²4ž,ýÊÃ÷Æ›¥ñféf¿ôÜÆÿêÉ-w†é†_{ðZi¼V¯•Æk¥ñZi¼*e›Æ^FTœ Ó`:TáVÆ—ávp-~㸰”Ü;8mët‘òn¸7¢Æ÷l`ùsÆøàø6ßCz›ý gÀQø¸¿é††ûñE/â{–øž%¾g[ýÆG†ÙÆoû ëY–¯ÂŠènÐM)/‹îE̪ÔG)C‘ë³Äú,±>¥¬!5ãðØ*E×Á\¸ï1ŒÏ·UW7õ)[Ÿ²õ)[Ÿ²õ…:Ûp8N„“€^›²õ)[?º²¶4Ga–òô£«hSŽjÌz2õõw¢y·þ*Öµ7øvÔŸ:àS|ê€Oð©>uÀ§øÔŸ: ÊÝWW’(w¿ñjî‘ò÷¯(áX©~te©K*uÁ§.øÍ®4ÍÿÄ}ê„OPõÁ§>øÔ¿å•™Í®~\Ci̾uħ޸[º‚µª­Îù-´*?*…M­ªP+ˆ—ª¶!G[´*¿ØªüÆ\mÈÍ–9YhUÍr°Øª6åbóVµYŽáãÔüIËi˸sTŽDåHާmÍuïÍ®ûªk¼>ŠÈ¤Oª'!lݵÊf×ô~âzÞÿåõ¸º××vd}'5Ãþ®­µv MÓÕŒ÷êo N$·%¹-ÉmInK¡Ê€Ø'Tì#’Û’Ü–bn4fX’ےܖ䶺¢.õ¿Fó–KrY’Ë’\–ä²$—%¹,ÉeI.KrY’Ë’\VWN%¹,ÉeI.KrY’Ë’\–ä²$—%¹¬®zJrY’Ë’\–ä²$—%¹,ÉeI.KrY’Ë’\–ä²$—%¹,ÉeI.KrY’Ë’\–ä²$—%¹,ÉeI.KrY’Ë’\–ä²$—%¹¬®`JrX]µ”ä¬$g%9+ÉYIÎJrV’³’œ•ä¬$ge”§9|E“ñê>xq$}H†>$C’ç“ï¿…±€®h~æh~æÀ…pQä'¤¨Zˆ …ˆKàÒ¨çÍ#2Ĉ 1"CŒP÷\eˆâC†~Hb±a»nƒÛáHÃàN¸+Ì2Ä5–'Cÿ”Q-’X‰ÿˆ' ñ4Сt‡þa†þ+Cÿ•¡ÿÊÐeLÒm’n“t›ø ³"ò/QË6I·yiÔûfˆ bƒÓ’!>d¢Vÿ¸¸1¬óà&¸æÃ-P Àƒð< oÀJxÞ‚¬‚·áðàÅjX.4 ‚7x#ñ)|Êù€ _NLl€P¸c¥µ'ŽgÅ÷@Ÿ$~€yÎ ëõÑ0ÔØ’±l£'×ÇG÷××ë_ÂøGqI᎕ú3ö)|Ÿƒëá à˜ÇÄ6Âßcc_Á×”^ßÀ·@kŽ}õðžØÒg¶ «­ÃÃzëX8 ÔØ’Â-YkÿS-j E ´¨%iU°}2\—Â4˜ ³àZÞŸ”•EYY”•EYYD)ë6–ÃR ,,Ê¢,,Êb³ñ,x-ëcÀe[”‰E™4¹¦á Ëj4Fuñ ËÙ$iIVÂÔ°Þ¦ÌmÊÜæsl>Çæsl>ǦÌíwoÝm"»ý>|ÂÇàŸe¨2›Ï±7F÷ØÆÄ|Et- ëKÚB;è…;`êK†õ¥Ûa;@GÊ^û ƒ—ñÒÄ!¼tq:/Cü†WL,ã/ñ2…ËËëx%´‹µ‹EíVíV‘Ô郄­£#½B¯%ú}Š(Õ/Ó/)}º>]”é3ôkD[}Ž>GtÔçêsE'ýýÑY¿Y¿YtÑoÑo]õåú ÑM_£¿+zèßê߉Œ„‘=R#%z}Œ>¢1È$v21}cãñŒ''‹]ŒñƱ›q‘q‰ØÃ˜fL{UF•ØÇ¸ï>ØxÌxLìg,6‹ýgŒgÄãY|çP#g¬¿4¤ñ¹ëë'ÎŒ€÷<ËáŒg;#‘b„3Ê%Îq&8ÅHç"ç"1ÊYç¬ç:Ÿ8ŸˆÑÎgÎgbŒóµˆóœïïÅù©ž©žâ·©R;‰±B+Ù™<ê™ÿ©—1eí£¬Ñ&êJ$ÔUJ@ ¡¬}”µ²öQÖþO0ö…ý`CáøÁÁp ‡Áápüè¿5úoíW@®ÇÂqp@Ãh÷Â}p?,„jx„‡àaXÀ£ð<5ð< OÁâè7ͼöŸ÷2¼Yxµõ'Šà6}}pDWŒ¼ŽÔá5þ™¬†1€r¤WÍÑ«æèUsôª2—Ý0#ë”hKw³y Õó$f³ýZ˜ ׫9ÙØÞúì«¾ŽæÖðq5ܯû ô%l{6ÍvãGã¾WÀJÒ“‹\±ÔWsÌÖßô½¾¤×—úWœãëè÷[_ÿ¾F×yj¬·þÏh¼·"PãŸ|Ô£o Ú€QÖ¥áÆÆ‘ØÖ:Eã ^7zC?ÖûƒºeÐâÉ,ƒ8‡š™fH˜3d¿ÃBOý€ƒ÷qð>ÞÇÁû8xïãà}¼ƒ÷qð>ÞÇÁû8xg¬qc÷z:éB¨†àAx†Eð< ÁãPOÀ“ð,†ZXÏB–Âsð<¼ËàEx ^†W Mƃ º$ªK¢º$ªK¢º$ªK¢º$ªK¢º$ªK¢º$ªK¢º$ª*‡ªÊ¡ªrñ¶Ñ3¸Ôïæ™øvÐ:B'è …§…®XÕ¯Xxeú“>Æ´"¯]¸‚U]ÅðÍö‘ï.\Íê™÷7»ªE¿=| n|JøæWºZ[?sN‡*¸Ô=7s£'ðø&q!#swtŽkRF械ΤբOµÞÆJ±DK±lò¼Q‰ú•ó|ɹ©¨`uOE.¡‡™„1ˆƒ $  $ÁJ R€ÇK´…vÐÐ/ ôKý’@¿$:Agè]¡¯ ò5A¾&È×ĎШ›‰ÞЈ9‰=ºÄ>ѼèêIæê~|‹YvÜäXC%/Qò%¯î‡ò“óà& _úÿdFi×>ø¾ö±pÃ`8üïg”þÍT‰s’8'‰s’8'‰s’8'‰s’8'‰sÊáœr8§Î)‡sÊáœr¶šÃO‡†sÊáœr8§œSúq)z’üüaôÛ„çLeIßáT5¿ÂîÜýFá9hçN–èÔè¾2ÚƒžpžPÏîc½a ¥áëÅY\‡˜îÓbºójXç,bC¬qˆ5-ÆñùΟ8OÇKX=×Vâò$./ç Qï¢q³Ç'q|Ç'Kh%´ÚFIÇâܽ`f4ÎÖS˜åÓ+™Í-ï–,€âLŸÅgâJÜ¢Ä-æp‹9Üb®ôþ§/(ýÂèÞ¢LJ‹æÌðSÔ­ÔÑp  ÇÁñêùƒ›Í¡îEòSç³^Íʧf¢­uሔ(Ã+u}øï^޾·¾nr‘þ¨HÅ®ˆÍí̸]Ìrs;ÑÕìmöÝ̓ÍÃEäÂä#¢—s¹s…ØEhí^T®K[g¼û³^Ÿ´ö2«Íê6é²å«MZ½³¥—óFk¯ÂQ%î¦WËt”ÍSG—ÝZx©cÊ^(sËÖ•}UöÕO§_]½ÚêmkÚÖ¨#Õ'5¬Ÿ´­i÷«v'mù»nþ-›§½ÝˆM/öþy¹Ú쥾»Ê3E!Mê3Ö Ÿß|{á[¨ï¡ŽR¯M©ûW9ß<§ ï´IÎäta¿2WmoÈñM¯Ö¾ÁÏÛ«õW+Çn±ö´öÚüøæ¯–uzó‚ª5[ñúŸÐúëç}{ê¡^(á¦%ÝVoHm”C_•­#ÝMjºª½jÿB-n[#bÚH‘ÔÔè„Qp®HFÏ p¾Î7Àù8ßçà|œo€ó p¾Î7Àù8ßçà|œo€ó p¾Î7Àù8ßçà|œo€ó p¾Î7Àù8ßçà|œo€ó p¾Î7Àù8ßçà|œoðÿбÖáXk€c p¬Ž5ЖóÞ Üókð: nq­.nS9˺ⓠýhÎ=pU` kOØ öŽî¸‰îÕÁ¸8âF¢< pî!À=¸‡÷4QäJ5+Å´¢pëP¸u(Ü…«æ.ð-z`”®[Tºjµ Ôb€Z P‹j1@-¨Åµ Ôb€Z P‹j1@-¨Åµ ƒ›Z,¨Ãºhn…ÇéùÕü …¹\zm—^ÛuÖFs*øô¬uô=¤š_ÁO¡.R8™Ôx¸2tÅóÿõ÷vßN ºÒp'ÜwÃ=p/Ü÷ÃB¨†àAx†Eð< ÁãPOÀ“ð,†¡õÚ+[›)C{“´½9XE Ý4+„gô ëŒÞÐ'ªÑ5:h1‹†l¸¿ªé,Ôè`K÷‘S£jta¦×£ûÈÓ-ÞKÞšÚ¶‡`'è ›jvÃS^‹²µ([‹²¥–ÅZX”Ý¿í^sZ%5= ¦Ôô€šPÓjz@M¨é5= ¦Ôô€šPÓjz@M¨é5= ¦Ôt5‹ˆGM¨éj®‰:j»×b&¥OëЧuÅ'À÷œoþØ@¬ü¯¯õ¿§†Ýóà&¸øVÚ-° Šéÿ×­"¿…VÑüÙÆ›ZÅFZEŽV‘3v߬5ä!QŒÿß´µˆµQ«Q« ÖYÔ:‹ZgQë¬nQð¯ZJž–’/¶”¦ÏCnÚRþ}£2þý-e#­d#­$G+ÙØ¢•äi%jnÖ­$ߢ•äi%yZIžV’ÇùŹw|qèOÔ÷çÔõ,Æ™…zQÚ½aSOß´&¸Ô5g•»ÙìB %ìFO±nYj chš—ZÓS¹óx?ò-rEÍZ›'WòÑ8–ùQOÙ|ŒJE!n¤Ôý×ÇŽÛCØà_üZ_ ß&Fé5úb1F_¢/cõŒ¾TŒÓ—éËÄý ýM1Q_¥¯ê«õÕâ"Ã1JÄÅF£“˜lt1ºˆKÞFoQiô5ú‹ËŒ]]ÅtcwcwQe 1†ˆËŒ_ˆ+ŒƒŒƒÄUÆ¡Æab†qŠqª¸:vMl¶˜»7V+fǖIJâñÒx©x8þ^üÏbQü£øÇâѸ÷Äãñâ?ˆ³­ÙV¬Jñ| [w'bz w"n6w *‚Ê£ ò(¨< *‚Ê£ ò(¨< *‚Ê£ ò(¨< *‚Ê£ ò(¨< *‚Ê£ ò(¨< *‚Ê£ ò(¨< *‚Ê£ $ ÊGAù((壠ÔÕ2I/$é…$½¤’÷°ŽÔ +ô£á¶Ý9Ùt®¯ÊÍæúš]m«£Wί¶ÉhþZQÞx/üKѸ»‘z–ó½ ËÃ}E¸H_Éùrá\uŸ¼¾†å»ð©è×bþ°ÊÆ9¥¿ Óúw(ŠÂÓˆÔ“ˆr†Å2mèAK¢ù&3ô¦zSIo*éM¥±/`HXkÆòØ0kœ,’Æip:œbœÉþ#XžÃR}}A ݦûö 0o…Ûàv¸Òð¸3-S»î< ½º¤W—Û4/Ú¿¾ËtÓ¼ieáHÔn>Þ.¬Œ£âïƒW°ží_†5ñ a…_ÿ1”ñ/$@L´‘ cJYoÐ÷»G£{ZŽC¨0‰-æø%´“0>iN€‰0 ˆ &qÁ$.˜CE4ò Æ$.˜Ä“¸`PåyT¹š/Tù5‰Ï£Äó(ñ;õ …±ÑøÙ‘Îø°Â™f ÂJçBPÏO˜ÊR=3¡Éç:ö™ ×à ¼G¤z3Åߤ7:‹ÑâµðBäb$ X¢€¥“ç껳>LçÑ«Tóè9_óñ‰1Ñ“bšÎ«×|žøt4ÏÞÌèÙ 5 cepE²ä^|ý}¼ßÊü{©#ù©aa6uF˜VóËã jQÝOP‹êm‡v(B ¶~ ~ (Ñï×辰a±a"«ˆ].ÊâõñzÑÍ4̘èn¶3Û‹íÍ^f/±£9Ð(zšƒÍÁ¢WrVržèL'ïœ]œ½Ä~Ît§J’::u´8,u\ê8q¸Ð:´J±ÏÏ™%"Fÿ,H@H‚ ”@)¤ÂSD´ ³è,ú#‹þÈ¢?²BÝÝúAØv‰FÂƪÝ›EƒdÑ Y4HV¨‘Zä$‹É¢A²h,$‹É¢A²býï90~ £à\hy?îŒp¬ø]X%®f9f…÷ˆk`v8W\K?‡m×Á\¸žïpü>\†ö¨D{T¢=*Ñ•hJ´G¥XÀ{·Âmh–ÛáÖÓð¸î‚»á¸îƒûa!T“ŽàAx†Elå\±|TÃò q†xR\'žçˆÅb´¨‹§Ùþ ,gÑ‘KYž‡`¼/Ã+…Wa9¬€×àuxƒÏ^ oÂ[ƒUð6üÞ<¬5ÇÉ»³\ÖÿÄò=ø3ü6=A2Óì ’¢ ?‚axð ¨QúŸÁçàÃzø¾„ °þιþAž|_CßÀ·Ñ¼Í›Ý¿,~$a¸L ViÄ f˜Ö¬ð-.ÐÚ„sµ$Ûlp J¡,«µ…vÐÊa;è¡t†.á ­+tƒîÑ“,+µíaØ‘m=Yöâ3z³Þvâÿ¾@Ðhm@£ h»Ân°;ì` ì {Á ØöÁ°/ìûà À/à@8†CàP8 ‡#à—p$¿ÚœF›ÓhsmN£ÍiÃHãp84ŸÈò$8™õSàT8 N‡³Ã:m„謡›´‘¢Ÿökq©6J ÕÎ'k£YŽáýóм¿ay>ü6ÌicaûNdûd˜—À¥P —Á4˜NÒªàr¸‚Ï¿®‚ð;¶] 3a\³9fiºŽå\¸n€ß‡ó´ae^xšçÜ àVÒ~{è¢É]4¹‹&wÑä.šÜE“»hrMî¢É]4¹‹&wÑä.šÜE“»hrMî¢É]4¹‹&wÑä.šÜE“»hrMî¢É]­–ô< ÏÀ íjX ÏÁóð,ƒÂœÞYô{ýžE¿gÑïYm9¬kÑðµhøZ4|->«½É1oAV¡Í á…3Š÷n«¹ø*ÐøY=†¶]ÇßéÃñú pb¸L? Nfý–§Âip:œg†UúY,φpŒdß_³£y œÇúoàüè~p·ÅýàUúDôû$´ÿp!\D:/† Ò2Ð{ú%ìsi˜Ñ+a*ïQôé¼w9i¿®„«`ÛÇç\Ír&ÇÌ'é×¶]ÇÿsY¿>œ‡'Éé¿gÿaÜ7“–ùäGá^ò´~+ŸK×ïg[áé©jžƒeú³ð<û¼”…þ2yW-¯Æ³ŽÕ‰:ñO'þéÄ?½þʹßgù7ø z¾Fþ!Ç|Äúǰ<øÐEúg,?Ÿõõ,¿€/9ÇØÈúß½=õkòt“Êèß‘ÎïI=ûü=«#£ÿtâ_ôì⟡ƒ¯!þqÖ‰ Ïä‰ì¿ÿ÷…~á$£?ìÌú.°+ìŽ5vç5ñpµx¸Z<\­1ˆã‰Æ>ì7öåüû±Ü†°ïP–À/HϤí ÖfŸÃxïä0NáøSÑÆia™q:¨¹hÔ<4ãÃkð|jæ“ÀXÇþ…9%÷4>‹î¿¯ˆ gy>ª‚õÉ0.K¡.¼IlL‡*¸® ³øÇ,þ1‹Ìâ³øÇ,þ1‹Ìâ³øÇ,þ1‹ÌâÕ’U±ûà~Xè„:!†Nˆ¡bè„Ø"x…ÇÂÊØãPOÀ“ð,†Zx:¬‹=KÂI±g!Ká9x^€eð"¼/Ã+…WùÎËa¼¯Ã°ˆ5ø×Zük-þµ6öN86–‡Õ°Þ…µ@‰ý Þƒ?Ã_ þ.‹ÑFb´‘m$&áC Äh#1ÚHŒ6‚/®ÂWá‹«ðÅUøâ*|q¾¸ _\…/®ÂWá‹«ðÅUøâ*|±‹/vñÅ.¾ØÅ»øb_ìâ‹ÝfãJÂeñRhºxc7Þ>¬‹£YãhÖ8š5Žfw‚ΰÞ‡uð9þ¹>òÌjþÌ lÆÃSðÊY¼²šý ‹WÎâ•Õœšf{àg»Ïúzø¾„ °‘}þÄLÏl~ ÄLó–ÿ$M?BÖYž:Ä@‹hÙà@ ”†“¬”A[P£t‰V9àï,ü…¿³:…ó¬ÎкB7èºVØvb E ´zAo蛞c‘µÐ:Тì­]ÃZk7Þßö€´ˆÖ °Ê CØ~ .³+­#ÂëWœëXÞζ“XÒ[§Gc&\ëlÞSc&ÎeÛ ¶~ŽµÆ²ǾãÙgL„Ip\ÈûÁÅá)VûL†)ì ËKá2Ö§±œÎ² .‡+ØÿJ¸Šõð;¸f²ß,¸†õÙp-çŸsY¿ðXÖ7åMìGßl͇[@Û¸•÷nã{ÞÅ?e-b‰O²|’Eü³ðIÖð$<‹¡ðI>É¢/·èË­ ,å¼ø$ Ÿdá“,|’…O²^¼’…W²ðJ^ÉÂ+Yx% ¯dᕬ7`%¼ oAVÁÛ€W²ðJ^ÉÂ+Yk؆W²ðJ– h ­Ðê“ÿF~|ðJ^ÉÂ+Yx% ¯dᕬO)ÇÏàsÊÛ‡õaÚú"zžIÎÚÀyÑ ZÁúGô,,×Â+©ñ(Ö7äúÀBXÿôA]ÐÃl€ÄØ• v%@üJ¿68PIJD Ê -àñxüDyè&¶ƒÐ:Ag@$ºB7 M$h ÚD‚6‘ØzB/è }`·pF‚~?1öaýˆ°:qL8)qï©ç«àý“xÿ$¾?©æ=7¬LŽŽÆ­LJއ‰aErRXDS&'GOˆ®JVÂT¸"\–¤N&gÂì7n‚4là\ßEãZªmbˆ61Â&FØÄ›a#lb„] è$d£“lb„MŒ°‰61Â&FØÄ»t†.Ð5ÌØÝ ;ô€íaØz1Â&FØÄd£“ì~ÐÐI6:ÉF'ÙÄ›a#ì0ö„½`ì è$dï è$`Ó§ØxE¯hãm¼¢W´ñŠ6^ÑÆØxE¯hãmú¯h̓<É>(ûX8އa0NÓö‰@Ù'ådŸ §ý{g'EuîïSÕ=u†>UÓ¬²Š ¸Å]ÈòseXÆ•QÁÈ®8(›¨ŒÀ‚ÒlAIȨŒ ‰´F’0D:FqiÔl5q\b! ËAàܧªg˜†›+×ßÍ?ùÌç™S]U]Ý]çÔ÷ý¾]Õõµpô‡ë˜¦ˆiŠ˜¦ˆiê&¸n&©Á­ðs¸ à Ã`8Œr E.¡È%Ô(¸Š`4K¨»a Œ…q0Þ Qà˜÷º¥Ð-5 Šá˜ S`*”À4˜3€ØªfÂ,xôK%`Ì…y0ú¥Â#æeõ(,‚_¯`1 iªƒÇá Xeð$<OÃ3°Ð>…ö)´O-´O¡} íShŸBûÚ§Ð>…ö)´O¡} íS+íShŸBûÚ§Ð>…ö)´O¡} íShŸBûÚ§Ð>…ö)´O¡} íShŸBûÔj3Q½hŸBûÚ§Ð>µÖڧоÃùÍ’ÚJmtLiØßÂNØ5°öÀ^0&é °À†D! M  \ð âÐԹdž¿•*rÏ /UáŽ1/»øz_ïÞk ÜæMü½»eÒÒ—îbSæ–ÂãðÛZbÒ.¾ÊÅW…¿ŸÂS¹Ká7ð¬Rû½uÒ}Žõž7‹ÜLÊÅW¹+˜WÎ:+y½?Ѿ/1ÿ3Ñ}^ƒ 3Ö}çÿÞ`ý7ÙÞÜÅ›»x)/åâ¥ÜÕáï­–»ïÃPÉvÖ°ÎZÀϺ™b÷^‡8ä~ƶª˜Æ‡»xp÷+¶› ë&]úÇ%OuÉSÝl“ÕÝįån ïÕœr·‡•ã*ê*º»XNÌq關ԦÌ#öxä¤aÁ(mŽâ9 M—Ëã&Ì…õ“žkRþÜ‹CS3ÑkÍ¡EX°á÷óå^Öi íÍ"ÏåËt'ÖEG½¡@¿yô›7“íÎâñÜÚšZóÍHoü‚ù ãÓ{Œöq–‘‡yäayM̼(pÁƒ<à}å5…fÐZ@Khø›²6&™Gžœ×ÚC8v›â¼=°Œ)Ž S·Â{®ÅÏkVï=áJ¸ òÍ¢8:Ggã}¡Ÿy9^ø½ø5aýÇt¼?íõpƒ¿@!ÜÁ9ˆÛx­Á´ŒíøPÃMY|?ãE¦<>ö˜÷Â}p¿YŸD[ Àd˜ÂºSiK`<3M™°…ãÄD!ìŸÙWˆœèâh©ÈuNrNÊïŒnìÓØ—Âs‡¹ÃD+aµ9+<3á‰Î‡ús""j E8 !š@ ¸àAÔŸ‡H‹€GxGx”Cœ‡ÈÞ‘ïû>1PtƒàV(6]Äf¤˜L;Å‹©f©(1 1Í,Ó™?Ãä‹a&Ëg™Îâ!x˜ý9›y ˜sȧ,û,dÀ£L/‚_¯M¿tIó ´I<K ÌôOÂSð4<è“@ŸÄoÙÖ³´ËÄY"Iûœ#žçÑïÄ|ñ‚!–‹ëÄï™ÿ ÿ+X¿œuW2f 4K¼/ßÜOû r?ñ:üÞ€7)È'ù¤ Ÿä“¢¶°Ý­° ¶ƒ†aåò2±“ñ´ j`7ì½`LÚ`m ­ˆ™i1†­Sb9¦Ü’&aåB3Ñb [Œa‹1l1†-ưÕÔä[Í ¹dµ m ­àh m -´3#­öÐ²ç º[G™þÖÑ´ÇðÜc™îIJÎpÓÇ3ÿÀWZøJ _iá+-|¥…¯´ð•¾ÒÂWZøJ _iá+-|¥…¯´ð•¾ÒÂWZøJël 'µÎ…óà| ?µ.„‹ \ —ÀOƒšdÐ.ƒŸÁåpô€žp%\½xïùÐÛŒµúÐö…~|†¸®káFq¢U(εn³­›E/ë1Ð(.µn5EÖPæ“X£á.¸ÆÀXàöÅD¸îƒû™7‰í³o`MfÞ˜ %0å3Xþ íL˜eJ­‡h¦ÏfC‚þs™žóaºš’Úó …µç2öe¢£ÝÃ,²¯ ïLØÅî }L™Ýú1]@{5\cÒöµ´×…5 ìëio€a²îM´7Ã-¦ÜÈ:ƒàVÿnÛW0m…a0œåÄ2{$ïçvSdߣÌûNÍ6î2 ›q`3lÆ=ŽmŒ§e,ÔžgXdß÷Ã$(fþlw2í³ÀžÊô4ÓÝž3x.ãÀžÉô,Ú‡ØöÃf¢=0æ²lžéaÏg?- ý…)¶Â¼¿gLix×Öú{*×kH‡ç^c?¾Áü·MuxÎa û6Í>Aól4ÏFól4Ïþ>e{§ý|U<ïs¶ÿÓ_ÂWõb„½÷ùO¦¿ߌ´7Ò~›Øw›¡ši4ÏÞjòímfyXÃͳw„wÆ+³wšAö.ÚØ {øì{i)‹“ŠX´äÓ‘ˆY‰š‚ùtÄ1%ɲ\hÂtÌŒŒOGмˆÇzh^$nŠ"xðH3h- ¥ùI¤aºGZC¶×–ç·3C"íYÞŽ„£D¿È1´ÇB'Ó%ÒŽcúx8Nä¹'Á˜ÆßGNSM~ä4^÷t³(rœi‘³  teÝ2ïG¬÷cø‰ù´gÃ9¼6>-rœo&F.`Ý ™¾ˆÏq‰IFú™Î‘Ö¹šçÔU¸ÎèHqQŸ@;Œmâ³¼d–fkt°_6ˆÑ^¦0šoª¢½MQ´ˆéÑpÜ c`,Œƒñ0î‰p/Þ9‡ÂèãÀxŒ.2xž‚§áX ¿ß³¦{t$á9x~/Àrø#¬€rX ‚á%xþ ¯À«ðTÀë|Ö¿Àð&¬‚·àmx'¼V.MÁê°Î|—h%¬µ°>Ž‹èGðWø| Ÿ¹M”ã"Êq师VÁçÀq师r\D9.¢ëMAtü¾6Â7Àq师VÃØ Û`»)ŽjØßÂNØ5€¿â¢x(^ Ç3e9yÁµx¢cN3“ j™æ´äq+8ZCh ²~ý¹†LÎFžSc kÏ7:øˆÿæ|C¡ÓêÎ7tbúàs …ÎÉ&íœIûc8‡éÿ鹆a¢£3FÀHÀ¯:3ÍHg¶)ræ…×è%bó¨I8¿fþcÌc|9KLw§Œé'á)xž¥fˆÃØr[γ4ƒƔØr~ÏóÿÀc☳‚eåÀ˜rScÉa,9¯°ìUx *à ž³ŠõÞ‚·Yþ¼ )X ïñ¾Ö°ÎZXÇ{ÿõÒðW–}¼ Ó_3]t6Â7° 6C5ël­° ¶ºèì0ƒ¤4E2š@ ¸àAžé.ãКÚ&Ñ6ÙZÁÐÚ˜BÙÚA{è䊲#G'Ñ8Ù :'7 ä p¢Y$O‚ÀÉpŠIÈSÙ'O‡3yþYÌGßdWÓ÷ò¸€mt ïDš//eÙå<îizÈ|æõ5’X-¯ÝWo·LÞhÒòÚA@–ƒM9$¼Ž²@3År8Œ€‘p;ÜÁòQp§é,‹Øîh¸‹õïfý10Žé Ì#ç”䜒œSÞÇú÷9§$ç”䜒œSNaý©@Î)É9åt¶?È;%y½|˜÷6›ç%˜žÃzsȧ,ûËò9Ó’É¥´ä<ò·@Î#—±ŒœG>ÏÃïàXä<’œG’óÈP+yßä<’œG’óHrIÎ#_òIÞ#É{$y$ï‘ä=’¼G’÷È·_%ßw!«á= ï‘ä=’¼G’÷ȵÌ#ï‘ä=2 x‰3ËåÇ@Þ#É{$yÏAµ‹¿`ÿ| _y$ï‘x.@â¤x‰›ØG›¡¶ÀÖ}uŽË¤æñöq_÷å@ßr‰÷¹ÄûÜDxŸë€„\h1 Þ纀梅¹qh Í 9´¯mMæ¶‚# 5´¶ÐÚCà˜Èå˜Èå˜Èå˜È=Ž…NÐŽƒSÍÈÜÓÍÜ3MQ”¶‡éž;€e7›œO(ÝbºÇš‰±!´Ã`„éiŠb£€1 ãá>Sc<Ʀ~?–€9°6›ªØNS¥l3DE 9à€„\h1Pà‚y‡¦Ð šC h ­àh m -à}ÞGá}ÞGu„£àh@ú Ð…>(ôAáH'HáH §Áép°¿ÔYк¤ð@ê'€Rg›Eê8΃óá¸.‚np1\?…K¡;\?ƒËMwuЪ'\ WA/ȼê}ÍDÕ àj¸®…ë ?\7À0 á&¸n¦X ‚[áçp †!0Ð*…V)´J¡U ­RwÀ(¸Š`4Üwà ã`¼é¢&À=0î4K¡YjÃ0¦ÀT(i0fÀƒ0fÁCð0 ]*s`.̃ù°Ð.µ1eêQX¿„_Áb@ÏT)<ðÊàIx ž†g`) { ÝSèžZèžB÷º§Ð=…î)tO¡{ ÝSèžB÷º§Vº§Ð=…î)tO¡{ ÝSèžB÷º§Ð=…î)tO¡{ ÝSèžB÷º§Ð=…î©Õ¦@½èžB÷º§Ð=µÖº§Ð=õ‘I«¿Á'ðwø >‡/!àkØh™BÇÔVÆÒ6ØvÀ·°vA ìòµŒ)rX`C¢ë]b½K¬w‰õ.±Þ%Ö»Äz7âAEdSèkªÜ“iÏ£%Gu‡ŠŽîí¦Ú½‚Ú0ãiñï.þý s ±,['&8¿°È]Ì6Káqx”¸KÌ?åâ§Ü§YŽ—r—ÂoàY“ï.c^Ò$ÜçhéO÷3È]+xn9ë¬4]Ü?Ѿ/1ÿÞëðàÉÝ×Ùþ_à Ö“?îâÇ]ü”‹ŸrñSîj3ÑÅO¹ïÃPÉvÖ°ÎZø×ýÈŒtñàî§<þ ª˜Æ{»øn÷+>/¾Û]ÏzL©K,r‰EîF“r‰Cî&Øֽϯ­{Ÿv·›rW‡×ì¹ôKêƒÜ½Ì#÷ô„é‹ó”Y书Ô#yÄ!¯©)ðšAshaxxsoîáÍ=¼™‡7÷ðæ^{8†×9–¶“éáÏôP–ן_(öfñx.Ëæ±ù¦»·Èû=ò~cÖ{,¬z]æ=Ák-1yML—¼(pÁƒ<à}åóˆyÄÇ<âcï+¯•Iç­¡)Êk 퀘GLÈ#&äí6#óöÀ^0fd\˜²8û&~®)ŒŸoªâWÐö€žp%\ø½xoè}¡þ/~ \gRñþ´×à ¦KüF…pÜÌüÛx­ÁfQ| òÜøpSÄÓx‘Ÿ@{L„{á>¸ß$â“h‹á˜ SXw*m Lƒa¦) Ï/ · a_f_&"ökök"šÓ”Ü*'Ç'[rœaä&¹îPŽ8WXy£Âó Ó¬uö¥ýå”ä”ÔMËŽü}L59M½´ê½ì_ý:µk†ke·ÙðÝßÁ¯¼Î¿þ;ðYá;úü¼¥ìûoø~²kª÷Äåb–Ñâ¡ð¾áZ|_†¿g¬[i·Ávа¾5i±ÓdÄ.¨Ý°ÇdlòC{íP#LÚæyö·¦ÚÞ^s—!ÎgÈ{5y„&¨&Èh|yϪñ¬Ϫñ¬Áo ªñ§ÕøS?ÕøÓ4þ4?ÍàG5~TãG3ă ñ C<È2ă ñ C<È2ă ñ C<È2ă z˜FS4š’A4ÇtðžjŽ« ÇU†ã*ñæXHs,¤9Òâ=Ql|ñL†àÞ%S¡‚ª9Óa<3a<µUßÙ»ìÝ ön{×gïúì]Ÿ½ë³w}ö®ÏÞ]uˆ_4øÂß`…Wmûvoè×@!܃MÅ~W\0«ì‘á7†~P Æ®¢76˜*Ûgz;ëâæíð-w™Uam”ˆÑÇøu5R"1¦³u VqŒE®7µõùb‘B¦ofÙ-ar?Z k`-¬ƒ÷ýþ ƒá“°ÊqýÕ˜ÍMY¦Ïè¨`tøáUkƒiï€Qp'Ü÷ÃÃ0²Wˆùds>™œÏ(ª`U0Š*EŒ"ŸQä3Š|F‘Ï(ZÅ(ZU{Õ”O–ã“åøŒ¨ F”_{Å”OVããð|žÃóqx>ÏÇáù8<‡çãð|žÃóqx>ÏÇáù8<‡çãð|žÃóqx>ÏÇáù8<‡çãð|žÃóqx>ÏÇáù8<ÿ°îòú¼YE4­&‚&Ýáù½¦š¨è}¢ Ïh÷‰|ÕD8M„KáÒD¸4GÀ*¢šO4ó‰NŽŸ¨ä•|¢’OTò‰J>QÉoxv›£dGÉ*Ž’U%«‚š:DŸÈà|"ƒOdƒÄ@Ž„Ap+Œ55ÕÓÚO‡¾e Ò.¨Ý°]éÖò¬¯d×ÓÔØW2º³:¤94G€æ¨ ï2^cý7Ãê.šÑ^Ó°Æ£P3 5£Pç45UF…×ønÌV´«­ Wå ‡0xÿÎ8ŽXÍh tL¤cM #®†§CÝBKëjpÑËš^Öô²¦—5½¬éeM/kzYÓËš^Öô²¦—5½ü^²*¬ÝÅgsçÀóaU”@Ë«ñ¦„:¦é!Méø¦&~!\Ý zCèËþ=s¿ŠThG[jjïî__å|${{{x×õú*åÍMÇoMx§îºJãÞE;¨<¾-[}ü°*…gï ü겺apÑ{¿O±%TSÝèØÉ~’†cD£ŒÞû?PDm³~x>#«ˆá¹‹ýÆJó}÷%÷ôÿ÷ Ï*}È8Ðµã Øú°úÿyXÙ=¡ñÂ/¬9Ò5žWstëîŒ Ñ ÇE>ô†>ÐoÔ2yŠ8§‰sš8§Ep¯ ºm Lƒé0„™¡kH°×ìõDXi$[UäàúK¼1K³4ñ*è…Ä~5˜F„5Ë‚žÈÐ z¢œž(«0d+0TÐ%ôD†ž(¡'J"MÌ"âQq¨€¸£‰;š¸£‰;š¸£‰;š¸£‰;š¸£‰;š¸£‰;Ö`JЋ‰Ú»Ë•æ41Gs4ñFo4±F‡5”~A»–†= §ôt‚žNì»C|ýáƒúH‰ 61EO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDO4ñDOôaÕ[ îð½·”'‰ î£­‚ÑVÁhË0Ú*ˆ+š¸Œº £®œQWΨ+gÔU„wå~<¬€§‰#š8¢‰#š8¢‰#ºa¦Fî¢]BÑÄMÑÄMÑŒÐòÿÕ­úÿ0B«þGhÕÿr„V1B«þ3B÷¡UßûµÅi¢LPG8Ö¤ÃÚ@'…õÄëkXSš÷îðÞÞ»Ã{'Ÿ¨ ŸjM§œ l㘓Ã;P÷&­¿?á©pœÞTï²Yr6&d³d½_LØÈ¼o aö‹öïµ^ÈSR± ãü7Æ…}µK ÉfoÚW;ås àž1÷¸+¬i’rÇ3]WÓ„~w‹™Ç8vg„÷©rg¬°ÆI†ü)¸†?¨ÃdÏ~xÿÖì}ëî٪ɞ«÷Å {nÇ0ïxêL 3åFãGX7äbÇ…ptƒËÌòFëˆô"¦äÓö†>Ћ/ÜÅ‘XÓZ\!ú aŸmŸ-”}±}‰píí—Džý¾ý>q§Ò®Í¢Ó£‹æ9ërÖ‰¶9ç|,Úå|•ó•hŸ³'gèà4qbâH§ÓVåçœ(Žqnp ÅqÎgŠ8)Ö'ÖGü Ö/ÖOœ»:vµ8%¶6ö±8Õ½ß$~è–¸3ĽiÞ4qްÜ+C… Þlì/zyý_ý\§kî¤à/z¹ÓµÉîÆŸÙØ¶‚g6Üοþ«{¥àyN×àQðßé,ËÔ`͈Ù&#0æÂ<˜eð$<OÃ3°Bœ^ÿüzü6¼ïB VÃ{€Š ÖÀZH‡ßw”âOKñ§¥â+“ùŠõ€Wx5A,|À³ <› ›¡:Ìs“‡¸7ŠÇMàqxÜ7ÇMØýÑÝ0(ü¶°›Àß&ð· ›ã)Ô|´ÉÞ Î²Ñ:°·†~·¿›Âï¦ð»É >u ÝxÞdø­a´Á7†A]¼ƒï±Ö=ÒŸy×ã…o@×oäñòø&£[Ñõh4q!üîþkð­Š¢UQÞK”÷E¯¢èUt+lƒà ;Ý xñh ì¿Hà¡xèºTþÔddOè~gSŠŸNâ§r(‡á‡‡>_Ž„ÛÃc9Ðh‰FË LO¡å˜—ÓY>#¬5æË¹0æ‡ßH&äBÖ[+~—ô»¤ßåšðÊR:èÓÚžÕô¬¦gýÚ{®T¡}Uá÷‚AMÐ=äøÙz z_=Ð~¢W¤@œ…æ‹æ‹æ:—¢ç5=¯éyMÏkz^Óóšž×ô¼¦ç5=¯éyMÏkz>Èý}tËG·‚:–AÄ`èÚßóß5úŒMïkz_ÓóšžîE¨éyMÏkz>ø> è}ŸÞz^Óóšž×ô¼>è7çußSn φ¤Ñ—à^€š cÿc¿34#@34#@34#@3‚üÝG_|ôÅG_|ôÅG_||϶¾øè‹¾øèKPëͯýí ¦dД gÏ0z4£G3z‚ï2«Ð”*4¥ M ÏL0’4#)ÈÏ}tÄGGüÚºkUâÆCêÅáTYæ0š|F“@µ[?¬pÛ°‚ìöpt¤Õáy´lµØjFGõáT4¥çýðøÏV¿ôê—uÕ.Ué²îX?°Âå?x>=BoûôvÐÃûUyüWUk«òùûUá Î!ÕVÑcïW‹¹ÿ9Žÿsãô÷v,Ûâ8Q,f’OÌóÉmòíÞ¢™ÝÏî'ZØ…v¡hi§í´hej*ް«ì*ÑÚþ§ýµhcoµ·Švv]#ÚÛÆ6¢Côƒè'âH9X'É;ä(ñyŸ¼_œ"gËÙâ4¹X.§Ë¥r©8C.“ËÄ™r‡Ü!Î’»ånÑ%666VtUãÕTñC5[-ÝÜÏÝÏÅî×î7¢‡»ÅÝ"z¹;ÜoE¾»×Ý+úx¢¯g{¶èçE=GxÊSâÚ<7/O\¿!~ƒ¸!^/D«¬èô0_:õàº÷ßןÕä;]¹p¨c¸1·uxuë}ñ)0¶ª$_Uª½*¢±kN='ö‚1Ú`…ßa5¼*"[›¼0toYÅnxÎ/[›\“ëèðêˆz÷mÆð~çwššÚs~x.0«êÙß15º¿ë‡WÛzß9ÇPC²Ž°þ¼ãàÚèPw¥D½;¬«\åD]äx8mpÅEÝu;õç=ÑH‰FÊ-û®ßѵW[èý¢Ñ¿óÊ‹]÷ðÎÙ™=_ë£>ÚXUÆ¡kÛúá¹ÛNáUºV/³uk}uÆŽ·ñ«3ü°>í,ò-!Oðh-®]`_-<ûïög"ý4ú¥h.ï$ÿh''ÉbÑ^&dM].WˆŽêU*:yÒË êÓªSBUËÇúÏ~E4'Ïk䂼Q7ŠÖÐØïó¯`~è WÂUÐ ò¡7ô¾Ð àZàs >§às >§>ç-¡Æ%Ѹ$—Dã’h\K ú_<j]­K¢uI´.‰Ö%É,[’Y¶Dó’h^ÍK¢yI4/‰æ%Ѽ$š—Dó’h^ÍK¢yI4/yHÍûœ÷ø| äÿ"C»6À?ákða#|›`3Tà 梗iô2^¦ÑËtc¿G·_ãËb|Y-€8l‡-â°ÕÚ@[hg*-²5«ÉãŽ<÷(8Žc¡t†ãàx8z¡ÁŒ5‹±f1Ö,ÆšÕmÀÕp \ ÷°îD¸îƒûaÃ0¦ÀT(<çÿªâÔr^ïϼÞ+´¯ÂkP¯‡uÈ«™²/†øÊ+y|q¢¿Io’Ä›$~4uÀï’“Ä›”=Šuï„ÑøÏ»L…}7ËÈ´m2m{Ó÷° ½³Ñ;½³'…ç`Rö4–M‡™0 ²÷5õm4ÍFÓl4ÍžËüy€žÙè™Íx¶_d½—àx•Ço˜—í·Í'ö<^/ε7à¢6ñÞ6ÃVØzåTƒïûRÄÀ â_p…àªÚÌ&Y{MÌ*âàªHSñˆ‹ypPkhG‰#DZþ‰LŸ§²ütÖ=Ögèʲà~žÁ}„ìïAS9{LªÁï>SN ‚ß}¶¡m ÇÁñpœ'Ã9ý}gÊ!—q@!üÜøÎm€pÈr'çASåÌ4• * U9¿æñ“v8–œ¤ÑûÑa?:¿gþx̾sØwûÌaŸ9o0ÿmÚwà]HÁê°Zn•³†ekXêü•yŸ0r|Úð l‚ÍPÍò-€Î9蜃Î9Á¹ª<òš84…fppE¶Jy0îäIaí¾ªÚêkéÚ:Iy)¾ãòðÛµ$^*IN–ÂO¥Âß6åñ0¦‡Ãต·CóGÃÝ0&À˜ ŒOÉøÄO%ñSIüT?• s¸v¬b*‰‡Jâ¡’z¨°Ï  ˆ’!‰’þ—ÄIŒÀg¥ðY)|VŸ•··ÇÛÜ/ý½U…;ÕTæžN{¦ñsÄ4zW[)®2FÌscÄÛØÍ&»%¼_:†ÞÅFûO—ÄÓ%c›MM /­l ôI OÂQ8ï„ j4¨Ñ Fƒ Çâ=8ïÅû@ûÚ?|ô ÿÉ8 Ö—`} §dú¶Iß6éÛ&}Û¤o›ôm“¾mÒ·ÍÿÊùU¥Ó¿–v@5í”Þ—öJÇãTœçþùP¥¹ß?—é&Ïÿlš”>çvýùgËgŸõçœé±¥o¦KJß‚þQÒ?JlŽÙÊ×óè”N»%:j溋éëþ1@™ó„úO\Lg/¦³È«yEg7éì&Ýœ9zåý‹éìæ4â÷ñ{ð#—e×ùèŽ\‘NލåëêÈ'2=Þ¡Ç;ôx“o®rNÎßÒîèÓxiÚ-ï˜þ•ö^Ü߯Q~WvÔÖÌu@úÇ Eòå÷Èïåò÷äï‰òÅO‰ åÊ;Eƒå×—çEÅòËoŒ†Ê»”ß­åF.Êôuˆ^°º¯ÂØsš–õ_™vuV:/:ç`ÎÅy8Ÿ qq:Õñq| ãø|Wâ*\kp-®ÃõX„[ðY|M|·â ¸ ø"¾„Ûñe|wâ.ܯâëøÚø&¾…oã,ƽi•ª¯RõUª¾JÕW©ú*U_¥ê«T}•ª¯RõUª¾=è5aÒí‡m„ã'Ù¤©çz,»JE“"oRäMмI‘7sïLççŽÃq"NÂÉøNÁi8=£–Ǩå1jyŒZ£–Ǩ屙ÉDcÔòµ¡ç„ìjbã«Lè9Õïæó Š›Tq3ÅzftTþ,Mžc»ç§còXþ‚´–¿Ð{Xèöe¶õôèlÚÎòé:˦÷ÏË‹[^Üòâ–·|?Ãâü¿Ä¯°â7x ã·xÂïü$–ºý»lRN{f"ÿDþoxi:QÈ!´Z´ (§ó kb-¬u°6ÄFx!6Æ‹ñl–ŽQÑc…—¹½9^ŽmðZ¼Ûb{ì€ñ¯O½o¥ÈWL½?|à­éüÿ+ÓgnOÇ(ð1 |Œ£ÀÇ(ð1 |Œ£ÀÇ(ð1 |Œ£ÀǾéwû¾{°÷â;ø.~˜Îèâ~<€ñÄ|àaü?ÆOÐÃOÓ‰q÷qHðsˆÿ€øˆÿ€øSûUj¿JíW©ý*µ_¥ö«Ô~•Ú¯RûUj¿JíW©ý*µ_¥æ›Ô|“šoޤƒ£X{f²ËßOtY>Åå_à²|zËßOm¹$_¼×àút¬Ø°½7â&ÜŒ[=þè TûÕ>VüšÛ_Ç7ÐÆw=ö=tp_:Çéüxk`%Œ`Ô÷ËXkA>Çò9ž…ÙXs §c9o‚aSì„yéD¼öM«±þ’v(uü·†Þ¿;WmñœãÝ~?Ntÿ$÷OÆ)nŸŽùø0>âûgàL·ÏÂÙ8 <÷\œçöùXˆ‹p‰çÖl/õ½Ëp9®@Ýïñq߻֪x‘­u)þ ¬M±u)¶.Å֥غ[—bëRl]Š­K±u)¾-X›bkSlmŠ­M±µ)þ¬O±õ)¶>ÅÖ§Øú[ŸbëSl}ŠïÅwð]|܇ïÃúÄQT9Š*GQð˜õ)¶>Å“ÐçâeSAV=7nÅñfü{ßïŸ7íöSÞŸþë_ñÓéÄÞ•MÑØ%Oý­29£êþ±xo:øýŠ¿JñW‡?’N û܇àï&eü2!c~ƒA=6è±a3¼zlÐcƒ¶À–Ø ¯À+±5^…Wã5Їƒ>*Ћ9Œ&‡1Í]4¹‹fØ);G³¸‹f˜ÞÌ]4¹‹&wÑ »Fooжoöœ·¤cÜÅw1Æ]ŒqcÜÅw1Æ]Œ…·úüÞ†SÓyá4œŽùø0ä|óáLÐhF 4Z Ñh´@£-ÐhF 4Z¸ÃÅP¡†Kq.ǨC„Oà“éD å-h¹@ËZ.¨@ËZ.Ðr– ´\hà܈›p3è» Ž‚: ê(ÐxA-µÔRPKA-µÔRPKA-µÔR õ‚z ê)¨§ ž‚z ê)¨§ ž‚z ê)¨§ ž‚z ê)¨§ ž‚z ê)¨'ΨÊU9£*gT匪œQ•3ªrFÕ ž‚zâšR“CjrHM©É!59¤&‡ÔäšR“CjrHM©™MƒèO‚X>íaåIW¦óKWãZèÕ%½º¤G—áô§CÓl%z­D¯•¬u%kw4ÆqGc¥ûÝ?Å#Ù牒µ«dÝ*Ñ,%š¥D¯”žÀ“Xv~h³ô·Õx‰FQç#4ÊÈÓy#E ¹mÍ)CíqOUî©:2×ýõП¶¼±í1éüg' О\ÓÑÓÇ46"G¸¤*—T]#7:Œ€F0 ?tM¬…µ±fa6gµ.æ¤ÍlrÁê§üýTä‰2Z¶Ž”ÄhÔò!é¼ò¡8 4jù¼'_¦ÃËúW™Æ,ŸŽùø0>‚3Ag–ÏY>çÖ.ÓÚeZ›ƒ+ 8üö(ÍE…ѧFŸŠ†£ÜZ'gm(ZÕ¯"þ3Z³àFÞaäFë§SÑx‰Û›á¥x6ÇnœÄîØ{b/ì ïžKçÒÆ¹´q.mœKçÒÆÿéþçrfŠ<ú NÄI8«;o÷^¶†Kq.Çø„ç ·o蟽…›p3VìSiq_-î«Å}µ¸¯÷Õâ¾ZÜW‹ûjq_-î«Å}µ¸®Ö¿¸O¥ý÷©´#•Y #J>šÆS™‹›\Ý9c¹|:™+`ƒ("ÆÖÀ0JÁh¶/f2·ÖÆ:˜…ÙXs0ëaý4Ém€ ±QÚù—÷Ål–Nå^Š—as¼[`Kl…Wà•Ø¯Â«ñlƒ×¢‚×a[l‡í±vÄNدÇ<¼oÄ¿aìŠ7áÍx vÃîØ{b/ìvsûà­xöÅ~Þãþ8â =/w8ŽˆvËÍʽÃí£ðNïñÛãlå%÷<É=OrÏ“Üó$÷<É=O>ç}Mçgû›z’ƒžä '9èÉÜÅ~çKPÃ¥¸ —ã ÔñI¯ùÆñi\‰«p5®Áµ¸×£p#nÂÍX„[ð|ŸCŸÇ­ønCÿÔñ%ÜŽ;Зñ܉»pw¶kõs}¿.Ê݃ŸßÁwåÖ÷ÐÁ}Üô«Ó%ùm9Ø7`ùùõ»§Wç÷ô½½²ã*úsx[\}kf׊s$ßã±þì÷¦üû|ïølW³ïqöý}^ w5wŸp÷ wŸäOÁ©^sZ¶ïk’ËO¸ü$ÎÄYÙìÝI¿ñì>° ý+öƒ5òû.A —bÙ~°NþŠ´Æý·ów_Êßé=Ý…¯¥Í™}aýÙºýëùçò»'ž³lX‹«oåûÃîÎ?…?ùyöú¿xîÓÙ¼Ûþñï­‚Ú_éøfAÍÔ|¶O¬l«î9ýIN’ÓŸ\e?™Zçü'9ÿIÎ’óŸäü'9ÿIÎòÙýg/Ãæxy¶/m²°ev½óå³k¶Æ«Ðߟ¶ ^›íWk^g»-¶ó¼ímwÀŽþÏþ¾¶¡ž³¹µúýÀ>é4÷?ÉÍsóãÜü87?ÎÍsóãÜü87?ÎÍsóãÜü87?ÎÍÿ ×?_1sáÿǵ¸×£p#nÂÍX„[ðüOìËû&¾…oã,ƽø¾›íë[4ÐÁ}x4mqÿ-î¿Åý·¸ÿ÷ßâþ[Ü‹ûoqÿ-î¿Åý·¸ÿÖ¿°¯oÅ9¾keG|vg¥Sƒ³±.æ`.ÖÃCispÒö'žGuþ*ïϦ|Úvõ×moåcqt¼8ŒQ·çÚ®‡×m/¾/ÁfèϹ 5ŠÛaWâ±CqÇêö®îÚíúqQ?îÏÆ(ê§Å…»ÄörÈ¢Ü(~*]TÔ'‹ò (²ý‹r (Šr (Š7gû§Šr (Šr ØL»+íLŠ_r_ì‹b_ûØ)æE1/Šy±í›LŠ‹ÓNQœÿÉ>ÊEÅû=ç<èþCþÿIÏ_¶¯2).±} Sn?Žßâ <‰Õí¯œöú§ÒnLÄtALÄtALÄzD¬GüÃþÌþ±¢zDLÄ´A¬WÄzE,b¹Ó‰1oqŒŸ‡çãÐ;b½#¦ bÚ ¦ þa>ìËÓEñi'Þ[á•^·l.ì¢Xïˆõx;ڊw±ÝÃv_,ÛOÚÎÎC?ÆýÕï'mÅÄI8§aÎÅŠý¤­˜NŒéĘNÌÎ]ÿ„íçðeÐ}1ÝÓ}1Ý÷ߨOÚŽƒÇ0•ýÕcù©öÌþÒþ_=ÚCùtj¨€ ¢ˆCXÃ(a£(cM¬…µ±f¥ÉÐl¬‹9˜‹õ ÇÑsCjoH̆ÄlH̆Älè…Ø›àEØ[€^›¡m 3û^“™ù¥ãÃôþ0­?|dšdû^²]±ÿµ3ü^Û÷gûa[阙=3üd:=üçt:äÓ^(`ƒ("ÆÖÀ0JÁ(ÊXkam¬ƒY˜u1s±Ö‡÷¼ïà}ï;xßÁûÞwð¾ƒ\ r5ÈÕ`Í Ö¼`Í Ö¼`Í Ö¼`Í Ö¼°%¶Â+ðJlWAÞ†×Àºäo¨Àº¶õó·ÃöØÖ½°vÆë1oÀñoØ»âMx3þOûzßê3|öM;a?ìp ÂÛ¡fÂÁ8‡â0Ž#p$Þ£ü¬£A߆Ç»ðnˆg8bÞú*ˆkxއø†€O ôp ‡ƒþôß@z8ðR— j*¨© ¦‚š ¼Txÿ…Ù á÷~gõ¬qÁ¬qÁ¬qÁ¬qÁžÆ3HÓN)By0€Ack`%Œ`elœN—v@5mf3ôšÒñÙ9¿½X¢Kç¥ã¥óA¿”>æñOyî•édéjXgJtxÉ:S²ÎÌÌÍœ,Ñ¥[²ýÒ“3s3¥Ï§WgsânKÛ¥ X[JÖ•MQºË}ëJɺR²®Ì쳞*} ÷øùÖ–’µe•ý×÷yÜÚRú~ˆ®Ÿq¿ÇÀþ÷SÛGl•ÍÄœÌfZÐ3û´Û¥?f³-¥?gó.'G icÄ2²fÚY kg×ĺ{d6ÖÅœlVåäÈ&—?# ÒΈÏfÄg3B;ÐÎ#—¥í™•Ë÷mOŽÐÉ#×xíµ¾w×^Ÿ¶Vžƒ1:7팮‡õ±6:ú·4}´È(-RŽÒ©r;fÇ¡®2Koæ¿»Ëïò<9]–Óe9]>!/óe> Ì»•y·2ïV>#]TæÝʼ@™w+óåžË»•y·2_P¦3ÊÞW”£í£¢(¿c~Ç(?øóÁŸG…âPq((îUÜÇws£ŸÌþ2³c´`ÙWaïþ×àþñf«ûºfèšÂÞCׄ«ÂUýû+^QØ{Õg.ÿyÑ‚U_=¸ÿßU¿¢[£³Ò%ÑÙ8 p.ÎÃùø(.À…Xˆ¿Ÿþðótqô üý©6¿O—FÀ1§ W7Ïk5ó—äߊý°lúC¢ãâUæ}YMò“ÿuæ†ÏL½éöã.tº‚NWx;Gq0ÅáX1pÉ@÷ã<ˆ‡àç <ŒáÇø zXu¦ØbŠcñÌä›$~wº$>ïÏ&Göj_Ÿe“–d3Ç>n{%eS%S‹)„ÅÂâg'à<–.¥–Rj “Í%[uàbÊ`iNYü”Ÿ³là’pNÇ||þÿàÿgB<ƒxñ âÄ3ˆgÏ žA<ƒxñ ác¸~ïPÃ¥¸ —ã ÔὄOdS.Ÿû¬´[uŽß§‹³yiƒé’‘b6í²DygfêÍ’Ña”0‚Q¬4WMåvTnGåvTnÿèñ%åCqäIù¹y†LîÉäžLîÉäžLîÉäžLîÉäžLîÉäžLî=›É½t:ú)~†ÿÄ#H²ó=¦VsnGO†ödh/;·ãpÛþ¹ê“¶SîÿaÙùè…álnHKFNÊÈÉ•2°'{2°'{2°'{2°'{2°'{2°'{²¬'Ëz²¬7“e=YÖ›9g¢'Ãz2¬'Ãzté4]:M—NÓ¥ÓtéÊ36Vœïð”ç>“ÍXêÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êÉ¢ž,êõÏçñ™Ê†žlè­4ÏbzäÅé´ŒèɈžŒèɈžŒèɈÞjæRôdAOôdAOô¢dA[´eA[´eA[´eA[´eA[´eA{5ý¬¥Ÿµô³–~¶huS dA[´eA[´õ¨– hÏô¤þ$®E"Ýé¶H·Eº-Òm‘n‹t[¤Û"Ýé¶H·Eº?Y«ïhZúË"Qo‹z[ÔÛ3Qo‹z[ÄûSµÚ"Þñ¶žÒÒSZzJKOié)‹ô”EÏž­Ïùggè?E%ŠÓp:æãÃðsE»-ÚmÑn‹v[´Û¢Ýí¶h·E»-ÚmÑn‹v[´Û¢Ýí¶h·E»-ÚmÑn‹v[´Û¢Ýí¶h·E»­ö["ÝévékÓE"Üá¶·E¸-Âmn‹h[DÛ"ÚѶˆ¶£CE4ÑDDMD4ÑDDMD4ÑDDí‰hoyDE+­D´úçaõg§%ýH©ÏÉ•êsR}NŠZ"j‰¨%¢–ˆZ"j‰¨%¢–ˆZ"j‰¨%¢Ö_úç:%"•ˆTO¤‘JDªßý‘JDªß¹ûç%"ˆ@"‰$"ˆ@"‰$"ˆ@"‰$"ˆ@"‰$"ˆ@"‰$"ˆ@"‰$"ˆ@"‰$"ˆ@¿ë&>ýħßóÉ'>ùÄ'ŸøäŸ|â“O|ò‰O>ñÉ'>ùÄ'ŸDw?Ç3öV6KCÝ€qnƽéDô|ßC÷áûø~ˆ.îÇÙñm:õRz©N½T§^ªS/ú³„W>ãn,;î«¶ÝDþh¼ïÍ:tÿ캉ü“XvvÁÒüŸÓ»gκxö¬Û±h“Â!Ñq…Ãl°íõÿÜϬ›ø5~ƒÇ0…Çñ[øüKñ;üH'²#Á÷P»ûfÇ—ôÏ¢›Xé,ºEñq’ÇNÆin¯8‹n">7;f¤ÝD|.ÇXvö\s¥³çúG~/Š}¾±Ï7öùÆ>_+ÇR+ÇR+ÇR+ÇR+ÇÒþÙpÜú·>Á­Oü?>n‚kœà'¸Æ ®q‚kœà'¸Æ‰þ·+Á6Á…Lp!Ç"¢¦Ú÷0ñÏÎTËÎò]ÍÙhÑ]²¿"ûOýÙ¿¿ì¯Êþ…²ÿ<Ù¿ì¯ÈþŠì¯üÓýŽ«ÝßH÷§ƒÜ›6TAC4TAC4TAC4TAC4TAC4TAÿ:£ýëŠ&ª Q‰*HTA¢ ú×7¬¨‚Š*¨¨‚þ5 +ª ¡ ª ¡*ú^G4TAcfŸB"ûÿoáûô¨ç¦ÕB7mîOO(<¨/>”é–Š ¨¨€Š ¨¨€Š ¨¨€Š ¨¨€Š ¨¨€Š ¨¨€† h¨€† h¨€† h¨€† h¨€† h¨€† h¨€Fö÷½eÛë_Ç©¢* ¢*+ý¯¡Ùßñ>âñ3°Àýsq‰Û—Ú^†Ëq>î±þßò®´]„Ók¨€† h¨€þµ‹Äýžî³Uýž]Q ÐP PQPQPQPQPQPQPQPQPQPQPQPQPQPQPQPQ ÐP ÐP ÐP п6E…­¨€Š h¨€† hdžû:ÛëÓ†ì¯ÈþŠì¯ÈþŠì¯ÈþŠÌ¯ÈüŠÌ¯ÈüŠÌ¯d³¼êÑ'yÓÛåé@ô¯8Z-†¢?ùZ'\þ¸hVþ×ù_G³óÉÿ%Z·ppáàhNáðÂáÑÜ?LGëŻĻFÄGÇïŠ6Šß½0þh|Aôâ¸ßmÿ"~4Ú"~<þm´õð‚áÑ«Ëû”÷‰^S~[yßh›òþåý£JùÀòÁÑë¢ÜÀÁ™O~Aô–ÿÞWn@E×Ut]E×Ut]E×Ut]E×Ut]E×Ut]E×)‰*%QUÙ•ÝQÙ•ÝQÙ•ÝQÙ•ÝQÙ•ÝQÙ•=IuLF_ãîM»ª»«º»ª»«º»ª»«º»ª»«º»ª»«º»ª»«º»Q/Œ~ŠŸá?ñü£©«öºj¯ÏœeÞUñußUñ]ßÍfî¿Og8>S=õüOû{1•­…]] « tòˆuîÌŒýJa]à€LU¨£Š5q?±e]¼Âº¸Ÿϲ6^A5-¤šÎÃÛ*Üí­{t D[ëu£®cÔuŒºŽQ×1ê:F]Ǩëu£®cÔuŒºŽÑÕ1º:FWÇèê]£«ctuŒ®ŽÑÕ1º:FWÇèê]££cttŒ®ŽQ×1º:F]ǨScU]££ktt®®ÑÕ5:ºF]רë]]£;ã¤ê:GWçèê]£«sÔuŽŽÎQ×9ê:GGçèè]£«stuŽnüãh0þ Ä-·XÜþÎmÕgÎ*ïê$]¤«“Ôu’ºNR×Iê:I]'©ë$u¤®“Ôu’ºNR×Iê:I]'©ë$u¤®“Ôu’ºNR×Iê:I]'©ë$u¤®“Ôu’ºNR×Iê:I]'©ë$u¤«“tu’®NÒÕIº:IW'éê$Ýð{ŠÑªþˆþlô¾rýúWû þŠ¿ái<ƒ”¿C €â,Qœ¥C :KTg‰ê,Q%ª³Du–ÊÙL—Î̵ê:XJ­êb]]¬«‹u³ëlâ9˯ pÇ®O»:Z]G«ëhu­®£Õu´úè\Šv=¬ °!6Ên]§«ëtu®®ÓÕuºu£?GOGQ¾š?6xz †âz\BüDüDTЧãéh$<ŽFÃãrè…^´føYøY´Vx$<­~~­~~Í KÂ’hvøuøu´nx,<Í ‡Ç£¹á‰ðD´^X–Fë—þPúC´ÁÈu#×EŽÎmåÊÍÕ¥Uøås¼âü ÑšØVßÚGéGãø>D-œb{*NÃé˜n$âF"n$âFôÉš>YÓ'kúdMŸ¬Í\!¾¦OÖôÉš>YÓ'kúä®úä®§}wðl-ü³#£–àQpaÑoðô¤èqüOàI,M§²#žä™Þ—è}‰Þ—äòi7W€ž•D1†°†PÂF!Ÿrò)'Ÿrë`fc]ÌÁ\¬‡õÓNnlˆÒÉÜó<ö|¼/ÄÆØ/¦x1^‚Í¢áÜKñ2lŽ—c l‰­ð ¼[ãUx5^ƒmðZTð:l‹í°=vÀŽØ ;ãõ˜‡7àø7ì‚]ñ&¼oÁnØ{`Oì…½Ó©Ÿ”ã“roþØÏ{Ôësà@„wzü8|'â$œŒáð¹Ó½ßùø0>‚3p&ÎÂÙ8úkNÍ wŸMÿçèÿýŸ£ÿsû|/A —â2\Ž+PÇ'ýÞŸÂ8>+q®Æ5¸×áz4pnÄM¸‹p >ƒÏâshâó¸_Àm˜ð»|_Âí¸-|_Á¸ wã«ø¾Žo of“Ü·mïÁbÜ‹ïà»ø:¸Ïº»ìJåïͿ֚Ü?¿i×lòtþÍØ »cßÛÓÚ½W¶Î׬ó5ë|Í:ßÿ F-ÿŽìZS3G8MåßoÿÄ+RÚΟŒá”´—çÛòb–?+›¢ÜΟ“Å?•?—ÿ=ßk>Š…¸û¹— †Ka=Ì[óu·—¹´ìjá'ä?뱉´š¿=Ÿ¿ßð»¶ýßķܾÇ÷½ÿ|Çíx/÷{ü·Ì&ÝÔh‘…ÙQN?ÏþÓ¦IÙNËŽfš*²«]th’þ•¹»^­ Ž eÛ5±ÖÆ:˜•ŽfC-ÔrA-ôÿÂú¾·6ÄF°Ž6Æ&é¼Â‹°©ŸoM)¼›yÍKñ2·7Ç˱…û[ÒA¯t{k¼ ¯Î¦B'…mÜ~-^‡m±=vÀŽØÉsv¶}½çí÷Ìï >óhá ,›Å¸õÌ,Æ­—릙+m÷všzÎç:]éuWáj\C] ëã€õq p#nÂÍX„[ð|ŸCŸÇ­ønÃnÇháËø îÄ]¸_Å×ðu|m¨…oA- ¨…µ0 ä€ZP jaà¾lbQF¬Ñˆ5±F#ÖhÄX£k4bF¬Ñˆ5±6ðG¯™ÆSøþŒ¿à¯ø[:5¸f:=¸V4<8 ³±.æ`.ÖƒufðqÏy4Zÿ¼§•®b}³ç;mœ&Ù¹N/M§W9¿éX÷߃ãð^|'šZ<ÖÔâi¶§c>ÎÁ…i·¸0í/I§Š—ãÑpQ_+~Êí«<~íµÙTƒn±áö ¸7áf,ò3Ä«(^Eñ*6=&NEq*~Ñëõ¬¢žU§¢8Å©(NEñ)ŠOQ¯*êUE½ª¨W¿í5bR¼7›ŒÐ-ò&EޤțiÃâ÷}ï~Ïyô`ñ¡t²8é±¹ÝóØ’lJB·8åöãø-žÀ“ Ï‹ôy‘>/ÒçÅ?bÚ{íOVŠ1„5ÀgÄ%¨ëX]ÇeX£cktÜŸ7¨®ãY˜u1sÓÉx=¬ °aâB4?ÏÇ  Æc5o‚aS¨ñXÇ›á¥xw¿9Ôx¼¶ÄV°>Çê*`ƒ("ÆÖÀ0JÁ(ÊXêdhm¬õ2¤^†ÔËzR/Cêeh}l€ ásò9ùœ‡|ÎC/ÄÆØ/¦Ø"í må÷zeÚÚÆí]Ò©¡ÝÓîÐa¾wd:5üþç(Ûªí±8>¿á÷gßW½‚ñ/x¦_bÅÑAÝ@óš/Ð|æ 4_ ùÍh¾@ókE ù‚œ r*È© §Ýè¾@÷º/X+‚µ"X+ÝÖÇi;lˆð<</À ±1äTSAN9äTSANëF°n9äTSAN…WÀúäUWáÕx ¬Áú*x]6É¡vƒÏ+ì=±öÆ>Ø—×ÚûãÐá ¼c8‡àP†Ãq޽ð?zTÏ©iŸ­ñ³5~¶ÆÏÖøÙ?[ãgkülŸ­ñ³5~¶ÆÏÖøÙ?[ãgkülŸ­ñ³5~¶ÆÏÖøÙ?[ãgkülŸ­ñ³5~¶ÆÏÖøÙ?[›¹ºíôÌÕm§KÞwé[½zf2RRŸ¥ãq¢Û'§óK4ÑJW»=¡t–Ç/H—”.L{¥…¸ôi‰*}Âó?+Ý¿×â:_o«_—ôë’>]Z„[ G—ôèÒç³YÄ“¥;<·•MôŸW¢%K´dÉšY²f–¬™%kf雞C?–¾ kfÉzY²^–ôæ’Þ\Ò›KÖË’Þ\ú~ˆûñòš‡ÓN©ççë#¥GÒv)qûWi+;zç×¾?MÊΦ½eGìDÙUiû~»Æo×øí]³#xJÙ,ÕÎÌ´·I¾»Ás7FŽqß}n:=sÄNE2b=¹‚¯cÅ;ý«Ôøò_^ãËk|y/¯þ-íŒ>g¦r —sXv%Øþâ’òΠ›Êó@¯ö<«½³=Á«ÉsHZãík¼}·¯ñöµò»üïösª8ÇfGùL•õí²¾S¦‹Ë§c>>Œà œ z¹|6èåò¹8|L™‡)/̦ÔÅѾ¢þ•L£\þ«ù¯FùÁG Å#ŠGFÅ3ŠgDÅáÞpÏ3sk-;Ò'Žæ®ü5p8oßàí¼}ƒ·oðö Þž›A@ #E9=·?/²>FÖÇÈúY#ëc4';[k*Ò"ý(Ò"ý(ÚÖë¶Ã<·wÃîØ{b/ð…_Ñž_ñ…Ñ~ØÖ»èÐt:: ‡ã‰wdG˜ŽÎò»œs°çâ<,Û;r^t.ÄB\”ž} ÿoöÖ}ïãXþw)ÇàÓPƒÑUP‡‘<‹Ôbt®ÿ'“òÔd¤&£ÏâsP—‘ºŒnÅpx¿ˆ÷‹è¨èöì8€VÔï©×èÎþ~ ð~ïÑR-ÑR­Ѻ­©Ûˆ®zÎSùôš‡Ò©l:ßö?mý$;2eµ{zžÓßO–M3M¢?àÐ ¢§²«µÿÉ1Yÿ·–V®€ ¢ˆCXÃ(a£X3mæÖÂÚX³0ëbæb=¬ŸNä6À†°ææžgû|¼/ÄÆØ/¦x1^‚½ÓŹ}ðV¼ ûb?ïp ¡Ѭ™3·ŽÊiûŽhûÜQÑf¹wú¿–¹ÕÎ}'‚oÎñÍ9¾9w NÃéi#7ÿQw&prTõ¾?S]S•ô©žaÂ"‹öU4Šñ‚øÞõ=ÁTaˆ!„5€,²Iž¼ ƒ0l^¬‹Ž’ ;-;Y[4\8¨õˆ‰ZJ½ï9Ý3™™$f¹Ÿ{ïó3ŸoºÓÝÓ]sê÷ÿÿÿêªs`œçÂyð-8.€ á"è‹ùoó¹—r{\WÀ•›~5ØÛOûKÝ1†ž`_ þƒýü÷è=ñ|ÙÏ`«ò@p ÿn= ¾ÆíÁ0 ñçèõ‡q;ÝçÞšqð(î #ÏÛs³2ÞÁÀØßòÇ"ÁÅlÇ%p܃@ÌÄ\@ï<ä%Øà9ÿ~O@ŒÄH@ŒÄH€ðÎÁkð:à¡7G:: N‚7ý*OY@œÄI@Œoùï?Z3 #Á;~íwN€j¯¸Ùè)zÊà}(éå; ðç ¤•Nné_*h¾R/• °L„µar°².¬xÊ ž²‚¾+øÈ >²²%l[—•m`[îoÛüÿŽüºòaØ>⯢jT¦ø+¨•Ý`*|vçµ{¸UNÊ •ʽ+_)7¯|õÊ!pRy]øÅr Ü·l„3¹=fÁ©0NƒÓá 8Ð|ˆæC4Ò¿„ô/!5/¤æ…Ôý_’ÃCúÙ°®†¹€çû«©²ð»pÜ p Ü ·Áíp|þî,ÃïC ÿwÁà‡0w³ ƒ…pÜ ÷Áýð<ÁÃЀŸð·>ÄCH<„ÄCH<„ÄCø< ‹àx®ì Ÿ‡àEx ^´þ ^ŸÃ/`1à±Bô¢·½… Þt¢»Ý…ÚŸ²&32þÝã£ÎG¥oîìòWc™N¶§“Ïí,ÊοùÁ"|EÔYöDÿ§÷Žè»#úî¨Ë¯6­ ëq}ØŒûô4=M„‡ˆðѶ<¶_5l šôÁÑg€ØˆýˆØ…£KÇ 8αÑépi™F—•ƒÑUe#šßøÿÜ¢‘èfÞw€û·À­pÜh#BÑ–GwñºÀøÝórdDލÓÑB»ÐB„¢yî!xð(Ï=^6£'xí“ÜŠ×< ‹àx–×¼Àã/ÂKlïËÜ6yý+Ü.Íï±ÿ"ÃýßÃ[ðxrxþïÂ{°¤|<ŽËF<ÆC$$P|\\‡ °¸µÆÉq7L‚u`] wÄë52¦FÆÔȘü“?âÍ`sض,›ñV04Ãä¶°Ÿi²ïÀíŽð!hÍ8Ùˆw-³x |‚ÿïÎÿ÷ôk;¤þø†›r?£w“ûÛ³z«øpn„£ýñžx†??)]Áqžø$8¹œ9ðÝ1¾;ÆwÇøs›Z3Zâ½c¼÷ðñrQ|ùðq•ž¸×Ÿû4v¶Kw^Oûü§žøTOŒŒÿîlŸ…'Œñ„1ž0ÆÆxÂOã c ÿ\6Æí]Œ›^6«ø„*>¡z€?¦3XQT‡o”êI0r¶Mzª*û´z¡?Æ3Pí…«áºr@¢c‰Ž%:–ÔDIM”[Ã6@M”ÔD‰Žå°#|vj£¤6Jô,w…õQRåÇ€)?Ëûïl³ü|¾ÔB¹?›§Gž gÁÙ0СD‡ò< ·‘ô6’ÞFÒÛHzIo#ém$½¤·‘ô6’ÞF^WÀ•€e/\ sȧ>@òZø?¥‘ô6’ÞFÒÛHzIo#Ѩ¤·‘ô6’ÞFÒÛHz9·À­pÜô6-K´,Ѳ¤¿‘hY¢e‰–%Z–hY¢e‰–%Z–hY¢e‰–%ýDË-K´,ѲDË-K´,ѲDË-K´,ѲDË-K´,ѲDË-ËE«0›'Z–hy® W&ÛÁ <Ç&x”’°ÏrCBnH.ñÇkl¸&×—¤¾ Ô—„ú’PW’;à{pg™&wù+© þ:¹×_E•%ÁÃÐ(üB‚_H¨ õ"¡^$ÔŠä§ðœ¿bª‘¼/û«¦“W¹HˆÅ„8Lˆ¿¿™à5ú±äm¿:Iê®H,¿C]Oˆ³oY#ÎjxËZèÉôÔ"ˆË™µqüŸz]«ûó—ÎJÝ®­ïÑ4j“ý¹ií8î35Æ¢v¹¿šªY›_Ôúà:εž!t|ÙÓU Ô  øœ® °L„µ¡ÛÏä?|F×_ËÁ®¿ÁûP–ƒõ©å@}÷ÒÖ÷€OÁžþ˜Í@¸«wuâ®NÜÕ÷)u­NVwçÿü̳…ˆNf»k²¢ ý‘šnñáUûé8YÑ#+zdE¬è‘=²¢GVôÈŠYÑ#+zdE¬è‘=²¦GÖôÈšYÓ#kzdM¬é‘5=²¦GÖôÈšYÓ#kúcM¬é5ý±¦?ÖôÇšþXÓkúcM¬ÿÎEPôïŠþ]Ñ¿+úwEÿ®éß5ý»¦×ôïšþ[ÓkúoMÿ­é¿5ý·¦ÿÖôßšþ[ÓkúoMÿ­é½5½¶¦×ÖôÚš^[ÓkkzmM¯­éµõÙ9Àƒ¢³ã!xðx”ǃÇá xÆž#p¾Ÿe_ÓkúbMŸ©*Ýô…“}Ð[jzK]¡~V¨Ÿí™í5½¤¦ÔôºÂþ­°+ìßÊ®<¿;íïçßœI8³ý]ôÔöwÑSéÑ»)z7Eï¦èݽ›¢wSônŠÞMÑ»)z7Eï¦èݽ›¦wÓônšÞMÓ»iz7Mï¦éÝ4½›¦wÓônšÞMÓ»iz7Mï¦éÝ4½›¦wÓônšÞMÓ»éðiQ Á3¢ú÷¾Ë¥·Ðôzé÷©pÿgûé+4=„¢‡PôŠBÑChzM¡é!ýƒ¢PôšþAÓ?húM¿ Ûß*úM¿ é4ý‚¦_Ðѳ|Πܾ/ÁËÐú~TÓ/húE¿ é4ý‚¦_Ðô š~AÓ/húM¿ é4ý‚n?ªè 4}¦/Ðôÿ¯ñÿÿ¯ñÿÿ¯—ù®sKØ ¶ñ6@œ/û}&£|¿Â÷+÷}æÿ‡ßj<¦Æ_êÖw…¢Š¯ÔøJ¯Ôx9—Óx9—Óx9—Óx9—ÓÔs,ô5\QÃ5\QÃݬݚڭ©Ý:a¿%?…çàgü±ÿž„:)ªÔIMÔÔ6MmÓÔ6MmÓÃßOÃýsE•J!;%bEegb«3|•ÆÑ³NñöŒ¾Œwa¬“$MRQKžå³ºj=µ±Vm~m¾˜X?—wY[tTù{sf·‰°´¢"ˆaŒ‡*HH ]°:߬Éñÿ™e!NYp*̆Óá 8΂³áª²)záj˜ ø1ß϶Ö·À­pÜ ÄT‘ÁÜž‚§a<ÏÂOá9x^€¾\àÅ/áW«}Ü]›lÄ»ðXXR.w5?ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž[ê¹¥ž깡ž›öÊ6Šš®¨éŠš®¨éŠš®¨éŠš®¨éŠšî꣡>꣡>ê£ißÞºã0qBÇáâ‹þØöqp¯?æÀ9p.œß‚óá¸.‚ø¶?¯mE+Î4;ƒÇýÕñ¤?†lÛÇ­?†ü¿Ë"Ø ööLj›Áp$ëW;¹bÓ¯<óMîŸèÏ[ÓÁÉ~õ™çÛ3qÙà4¸ÿ_Ìÿ/¶¨‚Ë¡µÒŒ ®‚^Àïsyl^Ùh¯4£‚ká&y Ù;þ˜üÏþïùc½îê—&õÕRWuUQWµTQKµÔVvæùÃ.°»[ FL¡^Nñõò‹¥ gÂ)0 Nþ†¿!<΀3á,8æÀšS½¾, nä=¾ üÔhK¶ÔhK¶ÔhK¶ÔhK¶ÔhKVÔhEVÔhEVÔhEVÔhEVÔhEVÔhEVÔhEVÔhEVÔhEVÔhEV!±«!±¾ ¿ßÂïÀÀïá-`¼CÆ;Ìá`ÜÃwaåÇ9G®V©Fã|»,:‹Ò¶sÚˆ]Á1N‡#ŽqÚeŽqnSѶ<Þ:Îi£)°¢ãœä¾ˆÜ‘÷ðïa¢ï”M<‡;Ëâ9ÜyZÏañne…ßPø wn–Åk¸Õi^Cá5^Cá5œÏ°ø …ÏPø …ÏPø ‘ñŸað¡ðañaðaðað ¡ð ¡¢÷¼¯Pø …¯Pø µœi†Ž 6ñàVös³,5ãýà ¿ºŸj¯Ú\î1¿™<~ œ ³áL¸.‚¡cvÔ…˜ºSbêB{%Ñfü}Xäû˜|“ïcò}üŸù:(xc…ǹ†æP01ãÑ^iTÅèË­6Нp³Y¼…;IµWŠyìÊÍR¤ðªz‚?nÕ¬žg9¦JŽ©’cª×Á/Ë¢ú+¿jŒ–¡"ˆaŒ‡*HH ø:‰¯“ø:‰¯“ô{’~OÒïIú=‰Ÿ—øy‰ß“ø=‰ß“”VnÁÆðAØ6…ÉðÙRá‡~Há‡~Há‡~HᇔÜ×ìÀ—á+ðU8‚¯ÁÁ0 Cá0˜‡Ã¼Ç‘p ǹ\2Vò8`¼ä×áø|N„“àd˜ §À, ¯ËÙpœ^ºõ}›mKö·dKö·dKê»| Ö`ÕWI]—ÔuÉ~—ìwI^‘äI^‘äI^‘äIÎnþ òJ" ¨@@.IÈ%É8 Ÿ$ä“DB5 ·$u˜àÏ9²þ˜Ôñe‘ãrü¨ãQßñçY|©Å—Z|©Å—*|©Â—*|©›‰§™0Ésþ8’;Ç­ÐØLˆa·ŠmmBÙ¬­ý :Íác<ÔÄ+Â(ü«ªQÿjîjïÖŠ0ªv¯¿¹lŽ\Ѷ‹|ØE>ì‡táCºð!]ãƒ÷5x_ƒ÷5õ©þ8Ž­ï ŸƒÏÃàŽŒ›Ý&sÄyBS‚)"ì|¯ó=Ñ%Q"¢hr4_|ft¶':ƽàÝî¶bZë'LÜOtöò~Z½jôsC¿/¦xìwxeƒW6xeƒW6xeƒW6xeƒW6xeƒW6xe#ØobBéΉ1‚7ü¼?‡_Àâ2ïœàÏÃ6ðõ\QÏ]-7ÔruúÚm¨Ý&šìë¶«ÓŠ:íj´¡F›ˆQƒ"jPD ŠØîh–¯Ñ–í¾4ÛM­VÛ±ÝÛ]à¿¿Êãá$ WÅçp{.´®Ìãkàz¸ÃÏÉÓZ1vôõ|¹¿ž¯F}0ÔC}0ÔUý•Ÿå!—gÂYp6Ì>Còò<@#H4"шD#H4"шD#H4"/‡+àJ`Ûd/\ sȧ>`›åµeNN2ä$“çs’JNðç9ò’IæøããîœD7ëJ^‹ &G¸U]/òçìå]U@ ºÊœ<`ê课| öúHò‚!/ò‚!/˜eVx=˜ß‡Ú¬†Æ¯#ZѪˆVE´*¢U­ŠhUD«"ZѪˆV5­§ùÈZåY(ˆweÍP”,ÂÍ q・a?³ÄÏ AT(¢Â.Ñ ˆE4(¢A ŠhPDƒ"Ñ ˆE4(¢A­î (^¡x…âU[ñ Å»«œÒJW(] )ÙÏ14ÄÐÌnÆ7ÃÃÐìKü7l U*T©PåëúŨQ¡Æ– gûomJTÃJ¼–ÇþÅ«ÑÏܰÂÙ¦–j9 T(P¡@… TËÁaŠk¢¸&Šk¢¸&Šk¢¸&Šk¢¸&Šk¢¸&Šk¢8…âõáyêÃó¨Î¢:‹ê,ª³¨Î¢:‹ê,ª³¨Î¢:‹ê,ù\“Ïõð¬3;ÑcîÄ ´(Ðåh—Ÿ›äççQmÏB£†f¡AyM”×DyM”×DyM”×DyM”×DyM”×DyM”×DynÆ‹ò,ʳ(Ï¢<‹ò,ʳ(Ï¢<‹ò,ʳ(Ï]óÒDyM”×Dy å5Q^å5Q^å5#7ëê±äºá$ GGuÕ¹éV嶨΢:—].l¢º&ªk¢:w>¸EuÕYTgQEuÕYTgQEuÕYTgQEuÕYTgQEuÕYTgQEuÕYTgQEuÕYTgQEuV:Eá—P]µ5Q[µ¹Ùo, ³ä;Ê,*³¨Ì¢2‹Ê,*³¨¬‰ªš¨ª‰ªš¨ª‰ªÜyÅUYTeQ•­»s`Ý Õë‰ p5ŸÀÝ#Nq0 Љa_xX»³Ùù31©sIç±nçŸ;ÿ,Öë|? ÄúцÑFbãhj´‡Ø$úf4Sl!:ÖzËû£½Å•tè'z"zbüìñ½ão¿hükãÿRݾúùê5Õ»ªOU_­¾)«²[n)¿(gÈïÉûä³I5Ù0ù§ä+IorObk«Í¨_{¨Ö¬½ßµa×]=]Ô“úžâÆ¡O¨ú÷ܧGO Ýq™p+^=p1\߆Ká2¸¼ì%z™H‰™HÌ…y€Oåbq Ü ·Áí~¦¦Ö9·úógxž‚§a<ÏÂOL+È´‚L+^ôçͺ,Ÿc1–ùLïf†7Á‘þ˜“ËðY{îƒ,ÀsoûóýTðg¿‚°‹ÁÚs,"w$w¬$öª|MT+‹#*‡pÿPîÆý¥sôVNÂK=#¬àÝ+/Š#ˆÅŒẌŌẌŌẌŌẌŌẌŌXÌBzغµÎèiBzØ_ÒÓ‡lgÈv†ô7á;@¾ëÏÕqçé,¦7wU!£'w•!#N3â´—^|1½øbzqC/îεq³ReÄ®›ùØÐ“»Ê‘ÑúqC?nèÇ]%ÉèÇÝŒUqíf?Vôå‹éË }¹¡/7ôå®ÊdôɆ>ÙT]u9£ÌˆõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXψõŒXÏè% ½¤¡—4ô’†^ÒÐKzIC/é¾ow±Ÿû±ßK/eè¥ ½”ûÎ|1ý‘¡?r•'#'d䄌œ‘2rBFìgÄ~FìgÄ~Fìgâ¢!%R¢!%R¢!%R¢!%R¢!%R¢!%R¢!%4Ñ ‰M4h¢A šhÐDƒ&4Ñ ‰=f‘ÕŽ: 7#VJD¤DDÚŽˆtTDœÀkš<æfYš!oGÄž#"bh)DÃlôó0n§—}DBŸ¿‚õ¹2Eù)ÊOQ~ŠòS”Ÿ¢üå§(?Eù)ÊOQ~º†Ê×(_·•Ÿ¶•Ÿ¢üå§(_£|=Bù®j¥(?¡üt9ÊOQ¾›©3Eùn}dòõ2Êÿ=Îÿ-?3V:&R" %R" %R" %R" %R" %R" %R" %R" %R" %R" %R" %R" %R" %R" %R" %Ò•FÀ]t(H‰‚”(HGEÁt›ù5†"!%R"!%R"!%RÜ}Ž»Ïq÷9î>'2R"#%2¨&p˜»Úbµ"ID"Â85˜ïóŽâsŸ£øÅç(>Gñ9ŠÏQ|ŽâsŸ£ø\4—Q{ÞV{ŽÚsÔÞRú«åýñjÏQ{ŽÚ ùß©=¯à *øAT?s„êEõ‡¢îÅk îuç¨;GÝ9êÎQwŽºsÔ£îuç¨;GÝ9êÎQ·;ï2o+;Vö©ÜŸ K•œ£ä¼­ä%ç(9GÉy[Éf„’ݹ…9*ÎQqŽŠ‡Ô›£Þ¼êzÕÿ^õæ¨7G½9êÍQoŽzsÔ›£Þ<ùµ?æf m+xŠ] &¦<¾%ÜÄý›éWW¤Þå©5ªÿþ •?‘ëÜYÕ19†Þ3Üúý%"ä™%•¿ùGL¸uù*ÿñï¿Q±¨¤€¿‚[/Wâ$Cœ$¯lðÊ}üï>ó‹xdLrŸSvTþ":y´Ž<Óô¯MüçàŸýVü¹ýîîUèÑoѸö'´~£CŒã½>XYÂö´¶Û„‘¨¶·Ýmé'ÅDÞóF¶Tñª­yUÓ¿ï_¸ý+üMtWÜ÷*ø~~sk~³é?ƒ~ˆ¿¢&¢;¬¹wzÿ¿Ý“x‡ÖÅÃ[±‹¹7*Ö3jxû±ã)‚¡qdÛW2~þµ~ÜxŸ1ãÅ_¼ŠãÄÖ­`|Ä„ÿè¸ø¿oÔxøGFƒè »ùÌI¼ÛzÜ~€ßÜ€g7äþFÜߘÛòÜdn7çÿ[ðÜ–ÜßJt‹0\‡wÝ€g7áv 7fa7ÿsïµïîÞccî»ßß‚ÿó{"þ¤ Úϸwv¿ÛÅ3*\‡ÿ­ ë‰ÛÛâÞgc^©ÂMx|S˜Ìÿ[ÛâÞsc¿õM¶Å„ë³`¸ßú mÂc›ñØæ<¶…;JÃßÚÝÞ‚n^é¶Â¶ÿV¶•ÇZ[ÔÍo¸­²í¿µ*&´ÿ2ëÿæua=Þÿn븿ϵþRëÇbS˜Ìó›»-ä¾;·!ñã<ús»ÛŸ[ó™Ýþ3£ö+ßÂÖ³Æb}M÷‘òWÆbÌ~#>&ƯlßùWÅ+ÚþÙúšîCÿÛrU÷cû³Öp_òÛ{‹µþ£û“‘|UÔVwŸ¶ÇpûÕ?ûÝÕšño fì5ßòfás3ïµgÛó³ìý#Ͱ·¼™õ†fÓ;“ÞŠfÑšAoìÌyKʾ”Yñ†g¦9+ÝJf¡[Álsë‰wÄ!,¡VÙJI–ï »ÄÄÐ)zÃø7±;ÅïÅï‰]«gUçˆÈWä+âcòòâãòUùªØM¾&_ŸJ*1UþRþR|RþZþZü“|S¾)v—¿•¿{H#ø”|K¾%ö”o˷ŧå;òñ?jݵuÄÿìúS×_ÄÿªO¯O{‰Žñ§û#PŸ×´~Â}Ã};è| þèø=Z?Cϸ÷¸{Åêý¸÷ù3ôÎ+úé|@¼µ†«ZªŽµ`"¬ Ý@íXÖ…õ`}¹ªåªžƒµüó–—]1ruW|t«=®l.´Dwǃ¢Úñ< ø ,ç|âáÕ /óç65ÇœÛÔZÁoîû¹­Fœ'ìÎorÿÐ5¤ŠÉLGT¦q{·®Ó_ýÕòVvþÑꯖ7âáèÒRùUÝZçÿªáÜF¯Ô¦Æ¬Ô¦F¬Ò6tNNk•6·*[kE6µìŠlþÜߡٔŸ©u^ÎÐjlj«±-s^NûœßÑ«­-o~#*]ŒÓˆ·Õxwž©?§·Ú>§×¯æWèr+s¹U¹¦‹îöy-~õ­•­•°Ƭ ¤F­4ú¼YU›'º‡VéYf¥·ŠŽ;Oö "À–°D€%,`‰KX"À–°D€ f•…?ðbî_â×Ô´Á<FŸ ®õ³³YTkQ‹E-µXÔbQ‹E-µXÔbQ‹E-µXÔbQ‹;3ËeÙû–½lÙË–=kÙ³–=kÙ³–=aÙ–=aÙ–‘´Œ emõ?;e-£hEË(ZFÑ2Š–QtgÌy$GÃ1p,Ì€ãàxø:¸÷ú|N„“àd˜ §À,8fÃipºŸƲ7,{Ã;âf\±Œ¾­165ÆF¼Ú£Í§|jpJ{ÔÏ3òsË<èó×ü×úô²y0¡" ›“ã`[Àý P$®Ó _uö=é5új³—ü•eNY Ü¥;ÃÛà$ NÒà$MôžWÜè+Çv-(Î]­¯q‚f5®¢r³ÔÝú¨¯ú¸A3ê*ªÅ<¯Ê;†®˜×­òu/ä@T•£ªUå¨*GU9ªÊQUŽªrT•¯®—éx„¾èQnƒÇá x’|<ÂÏTj€×¨t‹)•I°N™£¸ÅåCÇ_ëñ!ÔµìÌýÃ.@üV>‚Â>ÆýOxæ•ýÅ!•ÄÔÊåâÊ´r1JÊQRŽ’r””£¤%å()GIùšø§Ïâ9Âgü<*6úÎOµ°ÌQP>ì­žäþ= ­krÍ@Îí;ðGxܺ‚cŽƒãa¦»þŽÇÝÚ”óÉ}9¹/'÷å侜ܗ“ûrr_NîËÉ}9¹/'÷å侜ܗ£Ò•æ¨4G¥9*ÍQiŽJsTš£Ò•æÿY*¥F¶k ÌQ[ŽÊÜÕº9ù,'Ÿå䳜|–“ÏròYN>ËÉg9ù,'Ÿå䳜|–ÿg¨ååä³Ü+Ï!Ÿåä³|X… ¸ŸÁX5>Áýå)ò%sjÔ^‘ù*)’1!Ÿåk Äœ\–“ËrrY>V…Ãj›é•eÅñ«±÷×¼ò¹9Ì—V¾¥*ج¤ò Žº–{ס|SPñ¨xþºmwͶ»þlå{|õ+˜«\CÕjé^mU©Ö]¡^Yá^U•ÚÕ(_åj´°lﱑÕgê38\}ž!hr&hr&hr&hr&hr&hr&èUöA#¯Ô\UO„ö:Ð^Ǿð%Ø–wåæjºâÖš+<Ú7Ò1ëQ~ªíž½‡}¤Ï9jM~ÑäM~ÑäM~ÑäM~ÑäM~ÑäM~Ñ«à—VÛq9’gZWÕù#yÎGé¶×äMÞÑQê+`Ë‘»+ë~ìs&鞪åÐ[W×鶯íÔ[Gò†®®ky¬ÖÕuÚû¬å_]·Œ÷Š–ø££ÿÐUùÛ¥Óä/í¯Fk]‰fÚW¸¯zGp§ï 4¹L“ËtÛ— wcŽÒ™öUí¾[XæÊ¿š}ÝŽ “„¨L¨¸óÖ¯¬/’ʦ•É¢VÙ¡²ƒ¨W>TÙIL¨|´òQ1±²[e7±vøhø”èŽ~ýN| þxüq±AuFu†Ø0¹>¹^l”Ü’Ü.6NîLî““$?›% ’b‹da²Pl™Ü›Ü+¶JM[×Ï©Ÿ#¶©ŸW?Ol[¿ ~ØNtL8Ó÷¯‘XgéO¸¾Ë^Ñ Ä0ÆC$$Pƒ.˜kC7L‚u`]Ø >{•M±7|>_€/Â>°/| öƒýáø*L£ß:wFùt8Ü_‘°8.€ á"è‹¡µ2à>âR¸ ®,ûÄUå è…«a.̃ùÐÇs×Àwà:ø¿ð/p=Üýp#|n‚›áøÜ ߇þ î‚Àa~?†»aAy‡È`!÷ï{á>¸€‡àahÀOàxƒÇý7£«;¯mŸxZóÚö‰Wàçð X\ˆWáßá5x¼Áöý~*ûÈî}d÷>²{Ù½ìÞGvï#»÷‘ÝûÈî}d÷>²{Ù½ìÞGv »ÝÈîd÷²ûÙ}€ì>@v »ÝS²{JvOÉîd÷²ûÙ}€ì>@v »ÝÈîd÷2yJ&OÉä)™<%“§G•3;N€S`œ ³á48΄³Ê~²}?Ù¾ŸlßO¶ï'Û÷“íûÉöýdû~²}?Ù¾Ÿlßßq1¿ómÞûRn/ƒËá ¸’Ç®‚^¸æÂ<˜}0Èk~?†»ad°î{á>¸(³ŽGÊ^z§^z§^z§^z§^z§Þ`'ØÍ_¿Ð|Ú_ðO°/|©ì öóßtïÀí—á«p ÿæÛÍ Û Óà8”ׯítÿøÐܰ}ÁÑplyG{NؾàŒrfÀ8ß‚ àⲟŠÖOEënbn// ¹½›Ûp/Ût<ÈcT“àÑòùàÉRÏñØ þ|ï}4 ¹Íh.Xì׿ë þÛ×àuPå¢àÿÇÞÇ9Qæyª’Ôê©t8ÂÑà‰€x!â…x£Ž3¢** Ш4  -âA£€rIsdÄ^5ŠQÀÑvwðÀGmÅæjTâ88Z*Z¨%Ø ˆÏ~R ˆŠ;«¯Ý×î¼x½­JRIçIž<Ï÷»Ÿâ¾±ÿ1ÖÁÃzq¦¹ç÷ ûŸÂ×ÕæF¶Ÿ…ÿ'纱ióKlÒ‹ÍÍ:k~Åñ_³ý†ë¶á[lç9}ÇVëtxžYƒ-}:<·MÃ:²éˆ¥kw{¶‘v#6¹>ÍLž¦nÍÓ‘¤®ˆ4F4E3¤tw2dwfû,³}–Ù>)%?¶æþm¸}ì‹ýE—ÈlÛâ ]FÆ,#cŽtàòÁèÈÏ8‡²Ç é’Œ$ÉH’Œ$ÉH’Œ$_9I’“$9I’“$9I’“$9I’“$ýB®ÀJ¬B«ñZøP?^ç5-ÉI’œ$ `Î’ÌYò]Þû€œ$ÉI’œ$ßçuþ.ÈI’ùH2ÉMØÌå-´—yG2ïÈí:g®¡â¨‰ž‹§&~¦® òÈÄ/ÓKlr®MεɸT!Yû ý<•H†J$c×öµøá®i›÷Æžˆ™ºÊ®Â,Të*ERô!ERÌ)Š9EuÄ!`NQÌ)Š9EN8qºàhƒcÁœ¢˜STW0§Pe¨Š2TEª¢ UQ†ª(CU”¡*ʨ›u/u Æ cARô'5dtEFWdtEFWdtEFWdtEFWdtEFWdt53pècª ³0s0iÐÏÔݘ§ÓŠÌ®ÈìŠÌ®ÈìŠÌ®è{ŠÌ®˜gc‘bžQÌ3ŠyF1Ï(æÅ<£˜góŒ¢*ú¨¢*²¼¢*ú¨¢*ú¨¢*ú¨¢*ú¨¢*ú¨¢*²¼¢Ÿ*ú©¢Ÿ*ú©¢Ÿ*ú©¢Ÿ*ú©¢Ÿ*ú©¢Ÿ*ú©¢Ÿ*ú©¢Ÿ*ú©¢Ÿ*ú©Ê…¿÷¯ÖpM+ú©ÓXW9ŒN9FhמWgšs3[æg‡ùÙ™¤ Îd0G;3ÂóèLsîÅ}ºÂÉàAÌ׋‡tµÃXí0V; 8–qÚY„GÁÜëÛñ´®Iž¤«’g£ÎÁ¹8ÌÉÞ vHR;$/µC’¹#y1ú†k¿¦“ c²Wr‚Ú!y)®æ±ó8ôµä Å0]‘¤æJ2V%+t!IíƒJŒÅ­¸ãƱ¥¦HNuEr"ÇÞÁv¨±’ÔWIê+aŠˆYk¾,„3Õ™.ÌdÏdÏâJ°'†ßHDEÓTâ¿X‰ˆêrƒ‰8Á†‚ƒJ°óL¼MõÑ )4G ´D7*áq6û=pÎÅyè‰^èóq.D\‚z›ˆ2\ŠËp9Æë®bnÇDÜI˜Œ;1S1 Óu;1wQyÏÔÝEfa6æ`.ÒÜö'Ü­«Å<ÜÃ~5þ ÷â>Ü Àƒ˜‡°âÏÜO² E R´ E R´ E R´ E‹'ñžU«à“-Ha‚&žÃR<¿áE¼>Ýâe¼‚exuX®ûˆX‰UÈa5^Ãëxy¼‰·@JkP`ÿ¶¤5Á ,˜ÅZïáŸxÀ…G›Öc>Á§ Jñ>ǰßñXZg ¦îjDE $âh (AcÝÉh‚¦h†š£Z¢JÑšcÛ`ì§Ûû㈶8íÐp0.äØ>¸Tf•™q¥îa\ƒë1 7`4nÄM¸c¸o%ÆâV܆q ¸q&a2÷¡SÙNÃtÌÀ]\7U˜…Ù˜ƒ¹Hc1Ç<‰§ð4žÁ<‹¿â9,ÅóxEWËt™ñ*ê°+°R—«Ãj]nvÆ1覗˜§²ý-[’†y®®7Ï ¿õèjöÆùTõ€×ÈìÃö"\ŒKÐýtólûc¢Œc/e{.×Õæ3Wrù*\­sæ0._Ãm#t…9×êÖæu¨ày\Ïõ¼ææ <¯Ñ¸7…gÏéaòº›c8f¬®4oÅm¢‹9NŒ1Çsýí›·³ÈãÝÁ1“u;óNLÑeæT~Þ4ö§³Áýî⺙¨Â,Ìæ~st's.·¥ÙÿîÆ|~öB}£ùX¸rEÚ|Z7ŸÁs<þR¼€õ6s¯ÝŠðl¿ù×½þíCW“Ï”ÉgÊä3eò™2Iµæ{º»Iª5ßÇpuIª5?bÿc¬ƒ‡õâsmù„}*'Óç¹ldû>§_€Êɤr27ñ˜›yõ¼¶[ðµÞßü†×q·}‹íàshò9Œ½$Âç0b"¢«#QÝ'cßÒ“"’ÛâhÄõŒëž¸k$¡ÇGJt¿HR÷ˆ4F4E3¤´Š4G Ý.Ò­t¯H)×·Öe‘6l¾éÙ_ôȶ-Ò"íОc:pù`t侇àPöÃá8‚c:ñóÔU‘Î8Šã»ðœŽf{Œî9VWFŽã¸ãArŽœÀ¶NÔ5‘“ØžŒShÇ©<îiìÿ†¶žNÛŠ«A÷Ñnä"ö/æöKPüïâo{¢ýƒQü½šžº<ÚK¢½uhû×cè›Qúf”¾½ 7ãŒA%ÆâN½$:S1 Ó1wa&ª0 ³A2‰Î ükôAÌÇCÈâa<‚XˆExÆcº]ôqÔà ü;þÁbŠyV1ϪŽ8̳ŠyV1Ϫ#Ð G¢3ŽBcp,˜gó¬ê æYÕMWªqNÆ)8§á7èŽßâtœ3ñ;œ…ßãº:¼êœ‹óнÐ[÷Qçã]¦˜¯U\„‹q ú¢þˆþ€(Ã¥¸ —ã žë éÕU¸ƒQŽ!Ša ï+Þk5#Á{®®C¨™TQ(êE ¨Ôͺ«ºcP‰±à3®øŒ«q &UÔ¤ŠšTQ“*jREMª¨I5©¢PÔ¤Šù@MÇ P(>ëŠz@Q(êE= ¨õ€âó®îÆ9Î!Ã9ŒÓÎY¯kœ z‘CýâP¿8i;µ‹ó9·/uw§žÇÚÊþ×øŒÙÎwÜ:%!ty‚±;a†gìÎ&¢ˆé® R·KĹÌû•àýJ(]“pô¢ù.‘DcÝ'ÑMÑLW'R:—hŽá7†ÙD+”¢ ·1V&Ú†gû.O0$&êúïW‚÷+Až NOP&æò3Ó 6LP&øÜ%æóøé>%t× ÔK% ”€çRÒMÐÍB+]QRŠÖhj¤’}ñ-÷ÙŽï u×äIº…ø ¼ÇQÞãh€/± ›Q\Ký;h]ˆ5ÖnŒÏml®‹­Ó¹ØF.óÞ[`£JÑp0:â0]gˆþìÀ@”a¨v­a¸ôYkªÎ‡k‡ÎÔž5÷èÚp ÑØoXõ¤`eÙ`†+;í¾Ê÷ëŠ>®ð´sE”®+ú·½ˆ—P\g£aÑ`ÏëŒò<¾_g4¿Û£ÅUSòÿÝ5F¥ÔžŒ£l(8HàÇkòù|>d ÍÑ-ÁçBò¹¡ÚƒñO2þíváÚç®Ý¹Z‹<•ãÎàòºNöÓùç.È!\¾£1w`fcæ"ÍqwsßÇÁ€ æ’=œ¸ ‹+W7œøûµQÏ × )Ä/Ó.ukŽº5GÝšÛ}­TjUZÕ£V­£V­£V­£ô¨=j@Уô¨=j@Уô¨=j@Уô¨=j@Уô¨=j@Уô¨=j@ï_­ÍJž¯#ÏבçëÈóuäù:ò|y¾Ž<_§Þá˜w±ÿÄøÃÃ|ŠàuQA˜¹ëœ!Ú%wçÈÝ9òvŽ|#_çÈ×9²uŽLí‘©=2µG–öÈÒÞŽ¿ÍñÈÒYº¸ZXž,] K»déâzOkÉÑkÉÐùÙ#?{äçµ?ZÇ%/{äeï‡kÌêZ²r-Y¹–¬¼–¬ì‘•½âz³ddì[ ïÖ:›ø™›Ùç½%÷æÈ½9²m޼ZG^­#¯Ö‘W}òêZòêZòêZòjŽ\ê‘K}riŽ\š#“z‰9ÚݹŽmâöΗ[G­+i® %-ÐrkÜ2'’ 俵áz·Ã´GÞóÈ{y¯–¼ç‘÷<òžGÞóÈ{ŵ«jÉ{yÏ#ïyä=¼WKÞóÈ{yÏ#ïyä=¼33#ï=i>% çrgˆ8£œQÂrÆ;ã…†5?L€Žh»çÆý$AŸ$è“}’ OôI‚¾(ž9¡#Á¡8 g£Î³=éÐ'ú¤CŸtè“}Ò¡O:ôI‡>éÐHmQ†KÁ§JðIúÑÙt]QÁözŒÂ žIפÁ+%x¥¯Ôq¶8W<ŒG° ±Œš¤N—Ôé’:]R§KêtI.©Ó%uº¤N—Ôé’:]áéz±ð >…ø Ÿã øùDê“H}©O"õI¤Åu $ÅI±@R, $ÅI±@R, $ʼn/OâË“øò$¾<‰/OâË“øò$¾<‰/OâË“øò$¾ü‘Ö ¤µi­@Z+Ö ¤5Ÿ´¶ó Ážy6ú‘”Hð$6—´æ“Ö|ÒZñÜ_ÅT–'•åIeyR™O*óIe¾ù"·5œ5¸˜È|R˜K sÃ3åÏrŸ ÒSôT !åIHy’P$T H9…ÈÅÂŽ\"lŽOÂñI8> Ç'áø$Ÿ„ã“p|ŽOÂñI8> Ç'áÏ*ìEïG&\o¨@z)^ ¤—é¥@z)^ ¤—é%OzÉ“^ò¤—<é%OzÉ“^ò¤—<é%OzÉ“^ò¤—<é%O:)N ¤“éÄ%¸¤—tâ’N\Ò‰K:qI'.éÄ%¸¤—tâ’NÜèWº>Z-ØŠ¯ñ ¶á[Ï9S<“ŒÖ~x–ã5ø'Öí:ã±ûB{¤ß² Ñ6JÐ ¥hàóJ¢)žÙ#Õø¤ßúúc¢ W1ã3YƒQFø=œ%ÙµFÏ¡5:<;r1ñWKÏ“bò¤˜<©¥@j)Zò¤–<é¤@:É“Nò¤“<é$O:)®z^ qHGÄQ qHyREžT‘'Uä÷ ;’BaÇ™ ]‚»#ø¤WÕõr®ÁpŒ@×óüI.ÉÁ•·€ ƒôàÊ;¹} ;H.)Â%E¸¤?<£aÙ ]’„K’pI.I•qŸ±Œ’ñaiÂß‘$Šë6åw¤Ÿôà“|ÒCô'=äI .©Á%5¸öG¤ˆÃ>Ï Ÿg†Ï3Ãç™áóÌðyfø<3|žÞe†w™á]fx—Þe†w™á]fx—Þg†÷™á}fxŸÞg†÷™á}fxŸÞg†÷™á}fxŸÞÏHßphï'g£gaæÍ3óæ™yó?8ûü—»Î8ï2›ºÌ¦n‚ª7Ák¼ë¬ó ³fžY3¿cÆt™1ÝÝÏ0¿ãìð1ÑWôÂjmµQëXëXaY—[W i³Æ %Œøéá,6Áhjìctà¿nF·èúؼ]ÿæï¶¿‡k¢ë‹÷0º÷­+­Ñ²·Ï—ßî~DÜj8¦á¨>Æž®‹wD—Ý:ïû{üôÚ¿§ãÉ?aFú‹¾‘KyÝÌ𬣗Š+½Žìu ÷Ž`ïñ©a2;DÀˆlÄ`A"ŽF°¡à PÔÁ9ß çä|ƒœoó r¾Ñ ¥h êbƒºø¿½êÝ…Ûáb\~ÇñKW¸óŒy<Ï{P{q¨ÇŒ Èh=ΠÇô8ƒd` ’A20HÆ"<Š?ƒÚ×à“oO j_ƒÚ× ö5þ΀»¯˜çþÌŠy +×[ì'z†k.d[< ϳ¢4²Tt¤w©Ç]êq—zÜ¥w©Ç]êq—zÜ¥w©Ç]êq—zÜýßXA/Ö$¬c=êXÏb´³x ©a‹õ«»cõ<—ZÕ¥Vuw[9¯X§ºÔ©îVÍ+®FìîqÕãaqŒ±ÀX N6ÿ!N1×›ëÅï"ûEögEŸŒ>%þkk"zÄšÅJÅ9±­±­â‚Ø7±oÄ…ÖÝÖ<ÑÇÊXˆ‹­ùÔî}­ÅÖbÑÏzÎZ*þhm·¶‹–¶´(÷•ˆ2y” Ž¨ãêø€:>ø5gõR‡„ÃÿK´çúûz]ïÁ¢§QŽ!ÃåJŒÅ­¸ ã0p;&âL³'õ¹O}îSŸûÔç>õ¹O}PŸÔçõy=õy}x–âg(ü“= ¡$”€„P£ÔèAX£¿ÄcÔrÿ—ñ ˜­Íhø¿(ÁnÿÅßíLÇù×ÕsÜl Ï|ì™ÌTâ%Û8á Õõ?X™úÆ¿ŽlAqòïWô©û}ê~?\%¿k¸v¹»c…ü“v¬ïF|hKt ¦‚6E§cî}&JŸ‰Òg¢ô™(}&JŸ‰ÞG=}?2ø×+]$§€äœ’S@r HNÉ) 9$§€äœ’Se2ƒGI6¿æŒÍ?ªõ½õRXï¯Óµ¾G­_O­_O­PãÔøõ}@}PßÔ÷õ}@}Pß×ïªïûsy¢ ÔqÔñu¼GïQÇ×SÇ×S¿7¬Ï~OxÖ’âÿ‰HwcKÏÝVîHu;×bHsi. ÍÔñþ®õØ~-ö€´ÖÒZ@=ïSÏûÔñ>5|ñœìAxÖê~a ïï¨áƒ]g­Þy¶êŸ©º¡6¨ÍƒŸœ¡ú}ë¸`  &÷©ÉjñÍ\n¨ÅjqŸZ< ¨Åƒ«‹¤º€1²çîg¹¦¯§/®öÒ^@Ú H{i/ í¤½à_‘úWÕãƒvÕä5y½3‚íHÜÖçõy@}8S¹m¦cFø {®~EwèãÎÒ]kؤπôP¿ûÔï>õ»ïð\á³gSC-ïlåþ|Öì~ælª¿Õ_‚ê/AõG_ü­€? Æ/ži& ÑÔøþ®³kï^ã¿ï©ë“}I¹—…ß|»Ôý~rbñœÏÂ6š …0ëÌ:a˜«ÌU´Æ[ãEÄéçôQçJçJs†;#„åŒvF‹¸s“s“häÜâÜÂŒo4êÎjR´ÚýŸy–HŠ3Ecüü·Û9чàPòˆ8¿îw Ê™ñÊ™ñÊÅÕº £C0Ãp †cFâZ\§+D…ž$®Ç(܀ѸI—1c–1c–1c–1c–‰ñb?1·c"îÀ$LƘ‚©˜†é$¦ø¹ßÇÈâa<‚XˆgDO±ËÙ_•X…Vã5¼Ž7Ç›x |¨³ÌÀYfà¬X§«µžX øŸÂÇF|†Ïñ‚pÆž$6ñZlÆW¨Ç|­+™Å+™Å+™Å+™Å+ jnƒšÛ8Œ‚£‹q:áHt³Álc0êÌ6Ʊ8Ç£+N@70‚'ádœjxã4üÝñ[œŽ3p&~‡³ð{P Ô‚µ A-hP Ô‚Æ<]0îA5îÅ}¸<€1ý'swçH]ç}¼’tWz:éi@ÄT¼ÏUwq}ÖcÝEEQu¼våXÔ6Þàͳޭ…«AË£=â>´@PGwKÝÈZ…ðk=ïªé/^»Ïó¼æõy%“îžéN¥¾¿ï'õ¯j,ãƒø>ŒóÐÇGðQœ °‚áB|Ÿ(Çg±R»¸Ö.Áç‘à ø’Ç¿ŒU|_-VvZ£qŒV±I«ØT?<Ú¯~ŽÄS‹¤¾ÉísÜ>GËZÆ’–±¤e,iI}Ýr§ue»8F«Ø\­ÇûÚ«¢Ã´ˆD‹HÖ×b,k§i ‰é¿bú¯˜þ+¦=S*‹qñÓþAg¸=¹5^îó>§|¿8³ñ-þ‡˜àªbt³Ö?œSŒgÞŽsa›ÌØ&3¶ÉÌÿ‚í¢1lÒ6i ›L÷Ó}Åt_™¹4Úof ßÄe¸WÀÏ8s%¾…oã;ØŠ‰6h‰6h‰6h‰6h‰6h‰6hÉŒ†5p®Ç/ñ+Lñkxk KÚÂ’¶pÌìîÅXcXž•a³2lV†ÍʰÙ[áÖ;ŽŒÖ×=£MlÖ&6•ëfãk‹bG¨¡ŽÙè‘q\ŒâæNë#6î´Fb_Ÿs[Üt­Ä]‹M;YíbÍÄ1ÚÇ1ÚÇ1ÚÇ1±œ‹å\,çâa3N,6k$›c9Ë9ÍdSlŶ‘v²¢i¬Ä¡z¯gÜÜ·ÃíËßmZ¬h+Í‹a󮸇ûUG†ÚÅJµ~àÐj A¢a,k§iKÍ££ý´Œ¤yœ6ðx>^€âx;/Šlnö9'â%x)NÆ+|ì•xû§â ¾æ8ÃcòTKI´”DKI´”¥æÛ=^®Ex—Û>Ê5 Uë­%ÑZ­%ÑZ–µ–e­eYkYn2—&siþ;äfóGU“9M“9­ùc?c†Ÿù÷¯ñ¹å‘“àþuÑ~suí¦Ì"FsØ€y´ÐÆ6b»aw˜sfãÜ-‹ñÜžØ {ãV¸5nƒ}àõ0g{ÌÙs¶Çœí1wÜûãÜ Ï¨ÖL¬ÜhÍ„çR³J4«D³Ú¤Ymjí×:/ÇNçºå¹n½ æ\Ëœk™s-s®eε̹–9×2çZæ\Ëœk™s­Óñf¼¶KëLœ…·âl¼ çÀ¶i sLkK´¶DkK´¶DkK´¶DkK´¶%­mIk[ÒÚ–´¶%­mIk[ÒÚ–´¶%­mIk[ÒÚ–´¶¥õÆvŒÆ¶©}JôÈ­‘x'¼¦5¯Íke}m²Ƶ´0í·£¨q%W¢q% ûãÔêZœÛÖ œ]¬hW§iW‰v•lÜí·q-´±€Ø³XÒº–´®¥ÅHêáiÑ~‹OÇ3 㟉W+åu,£¿ˆÑþÒŸz|D|¤GjÍŸïzÅhíÚÈ«,ò*‹¼Ê"¯²È«,ò*‹¼Ê"¯²È«,ò*‹¼Ê´¡‘64Ò†FN¶Ëcûþe>~L-g¤åŒ¢S|ìУWU¿=#D¯ÁkQþî%ý3: ¯ÇðFèÑ>îóߌﻯÇk#¿û½äÝåÊÑÿÿF¦adF¦adF¦adF¦adF¦adF¦adF¦adF¦adF¦adF¦adF¦adF¦adF¦adÕ{&½†‘i™†‘iYí‹EØå{ž—úýŠ­uÏAÝÏYT4Ž‘Æ1Ò8FõC‹quÖóá8GbŽÆÎ«D%tÝë¤þ:Ø–u?KÝ÷]?¿X«Êí§«ö1ª'šÍðEÿ²¯ûj±Zƒú7ý{—¹½å ѱ¿_‹ÞÓHë¦m“7¢bÐhbªß3™7ö¬~ÃVÚ8÷.Bã>Øùý‹ûW¿ÝoµñWnô9Ûß·8Œß{ÏxÏøþg¼Îg¼Îg:xNÂÉx9–pJµ†a¤…Œ´ÑÞc¸´3kð³Ì\†Ëqü,3Wâ[ø6¾ƒ­ÕZ‚WBŽ4†Lc¿³1üØÇ~âóx§¦0ššè&IlM…ØTˆïˆý«õ£Ø¾{bÛÖ”™ò#S~dÊLôÌDÏv¬°_Ç/ƒý:öóÆ~ÞØÏ¿çâåïm*¯¶Mṳ́ÏLṳ́Ïv¼o`?4é³æÝŠÐ¼;Ê÷|&þ¶÷žê±í+½†šÇãÈ›æ+ܾg \!øv·ïBÿŠCŠïïâ8>Ci2”õÕaûêÀæuEø/œ¸™‰›™¸™‰›™¸™‰›™¸™‰›™¸™‰›™¸™‰›™¸™‰›™¸™‰›™¸™‰[¡Êª÷6ÎÀ™8 rÁ¤™´£ÖIEhŒ—c §ÀsÓòÜ´^ÙÚ’­-ÙÚ’­-ÙÚ’­-ÙÚ’­-ÙÚ’­-ÙÚ:oÆ[àym‰³ðVœ·áx®[çâæ¬8ô<µen{S±Ö~n±ÅT™ª£6sn¿°Xmû˜×Yû$÷½¶Ú^[íW{ìM¦k§ãÍ>v–¯ñzkËÈö‡‹´}AÚr®}¡ûaç÷Cì[í­Kñ ÷Ë•ƒÁíõ>öË"[°Íf‹°£Y­Üù=‘laŸ"­Îf9µZ÷•ë6n(ÂÆy´ÐÆ6b§ƒ;¦´±xˆ¿? ‰‡ãÑÅ`Qþ/ÊÿEù¿(ÿåÿâaÅÊâáEºx'T« ‹O+ÂâÓñ ÈÕÅg¢|¿Å¾±x ŽÅqÕï0\]ÿeU ˆ£Ýý‰ê׎jõåúrTŸ]›]‹ñ½ã{G3ñƒâ—×·æC¿á=jÌ¢ÖÀ f£‰9lÀr$öýľŸø“ø§¢ü­ßãxßKì{‰}±ï!þ¾âñ¯ºý¾Ž¾©VJŒâËp9®¨VKŒâ­‘ñÝf0«ãŸâg0¯ãWã¸×B^Å×U«&FÍEØ·šö­æ­ŠIóÖ¸ öÁ¾Õªüí3vbÆNªÙz°ÛûV¿…|Ü| “«›w Ì@ö™uÁ¬ f]0ë‚Y̺`Ö³.˜uÁ¬ f]0ë‚Y̺0çu1÷ü-žU­ƒÍ¹Þz tÖµÅcñ8†ÃåþùÕoi·/Áça¶=‡mÏa{T™Õ ~eeJåûÑ£…sŠÑÆ_ã?ñÅHÖYŸç~éõ¨YûZíQ4fƒ¤[ˆ¢ÙøÝñ»£8þdüɨ¯Æ«Ñ\óžÍ{G¢Úì~Uî=`ûŸÚ[wþóÛúÛ“"ÏHäaDFª#¢›q"^Œ—à¥ÕQÒ” ¥l(eC)J×W÷þö^º­…§öÔÔžšÚSÓZù{Í¤ŽÆjÜå ÝêÈŸ=2µG¦öÈ´l¯Zgªu¦ZgjHí©="ÕËVÖF¥±­®ý•«CƒÆ4¾ ñ…G•|ß_yt)µ·¤^ÍéN«8·½²nhoéú+,­VFþ?4mM%>mŸRý®çÔÖLmÍ´šÈ¡š¨¡\Iø[S앞Ÿ”“N8iओN8iओN8iˆäx$Ç£‡G󻨹­‘Û¹­‘Û9?Ýõqk†[޹å˜[ŽvùÎõõÕ»×Cn9ä–Cn9ä–C[sbkæ¶fnkæ¶fnkæ¶äÄ–œØ’[rR+ÓšO<*¬oÑmÇ‚­|iÌ—†|iÈ—†|iÌ‘B]¦W[<á`_@yÌ÷Ë•ûŒ9ψóŒwú­å¯ˆ‰WDyæYÆa²†>Íc²†þÐУùLà3Ï>øLà3Ï>øLà3Ï>øL¸Ñqد¯¬‰WÖ„Ÿ ùÉŸ «WÙ<å†WZàþøGà{„êX§W÷Ü#üžWbsÀ=¶ï|§,ý—*ë&^‘¯ÈÜ+2÷Jœx%æ^‰1æ#1ä Cn0æcn0æcn0â£ïÂéªÜ |7nÈ ÆëïÆ ½¢':xÐÁƒtð°ã8â•ÅPêÁC=x¨õà¡<Ôƒ‡zðPêÁC=x¨õà ‡õ½#è¿å™îA× zîV=w«ž»UÇ ÕÙ6T½¶<;fbšØƒ&zìXê¦ãõ½h¢—ŽôÏ¡þ9Ô?‡zgÐ;ƒÞôΠw3èœAç :gÐ9ƒÎ¹Uçëœcs¬sŽõÈrýnyvJ™¥¢»Dw—OžÍÖ/©_µf¿7û½¨7ãf´oŒ7FãGÅŠã¿vk¿³ýÎhϨÖȪ\ÝÝù÷üÉ£W½è5x-^‡Sq^7àxº8½XŠÞŒ3Š-Ñ™8 oÅÙx–íćðaœÓ;2½£‹ý47ãøWýð¢W?G¢:žR]mÛñ”òø‰Wký…2ùxŒ}ì»c@õ¬XÝé¸É–òœÕ†=¡:n2ïþ‘Åë×ÏÚÔ8Êý'cÛ:­§4žV­6+×j•kk<«è6žãŠž=x©ñ ]Z¬4.‹ž?siÑ›YÃ7q.Çð½Ì\‰oáÛø¶âf×h>¢ØÒ<ÔžQ¾tÑ«Þw?Þí xQ±ÔÜìc'â†÷؇L½ÇÔ{;Þc?Ãý›¾·þvëß~—Û>.pÿ"_{Ó÷Õ¯+z;¿ßÌ~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ì·Ç~{ð}æ_ië\‹€ëp=~‰_aŠ_ã?ñfb„êh`³ˆÑÄ6`-´±€XÄÕÅ–…¨Xe²=&Ûc²K7zßYê.ÜÁÇ÷—wvû^ßñžsÑc³=6Ûc³=6Ûc³½·bº·ÆmÀ‚7î‹Ûš×O+zl´ÇF{l´ÇF{Rb.ú~ôC¶ytýè¨Q¿¶~m43»ÇìÑló)ͧFqó_›ß׸®i^µÛ¿hÿ"Z`žq• Ñ¿óÏõ7Ó=ÿسý׸ç÷\ãž«Üs•{®rÏUî¹Ê=W¹ç*÷\åž«Üs•Ç­ñ¸5·ÆãÖxÜKx\Âã—ð¸„Ç%<.áq Kx\Âã—ð¸5x\àqÇx\àqÇ…Ú;¢ùÚ;ÑÃ?â]x7Þƒ÷â}x?>€e|‡qúø>ŠóqVð1\ˆãT˜pÀ„&ë¸ÊW9à*L8`Rõί÷óØ!(×ø>åþþtÿ[å«üo•ÿ­ò¿Uþ·ÊÿVùß*ÿKø_Âÿþ—ð¿„ÿ%ü/á ÿKø_Âÿþ—ð¿dv÷êwÇ—gr¯ÅçºÿŽê÷ǯ­;^r#Ç»Ðß?ŽOúø n·ÊíV¹]Âín·¶îv«Ü.áv ·K¸]yVö¯[«ÎÊÖfyÝ*¯[[÷ºòÌì5^·ÆëÖxݯ[ãu«¼n•×­òºU^·Êç>—ð¹„Ï%|.ð¹ÀçŸ |.4oÍ7÷Ãíp{Tý.ùmwËh~nOì…½q+Ü·Á>ؾ~Î×Ïùú9_?wÜûãÜ ¶-[ãqÉÜ3ªßI¿Êã—ð¸„Ç%<.áq Kx\Âã—TgߨãVy\Âã—p·5Þ–ð¶„·­ñ¶5Þ¶ÆÛÖøÚZåj_¬}1Š÷oÜ?ª5ïÖ¼{T_‘ë¹>‘ë¹>‘ë¹>‘ë¹>‘ë¹>‘ëAŸ(W¬Nô‰‰>1Ñ'&úÄDŸ˜èAŸúDÐ'‚>ô‰ O]"èA—ºDÐ%‚.t‰ K]"èA—ºDÐ%ÂMŽ^†F`a†Ö^å #g9ÃÈF®‡äzH®‡äzHy„¥\=ôíGZræ3‡\/ ÕÑ–±ûW¹¯ë!A™ÜäˆIØéˆI¹ 44b·ÛW‚îÊ.-r}#×7r}#×7r}#×7r}#×7r}#×7r}#×7‚¾ô o}#èAßúFÐ7‚¾ô o}£<ê‘³ŠœUäåÑýc¢ý#¬š}®‹äºHy„ ×Er]¤’ë#}$×GÊ•‰}$è#A úHÐGvu¤!°‰À&›;iÈ×46‘ë1¹ô˜0_¾ƒR‘ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹“ë1¹S®r zLÐc‚ô˜ Ç=&è1¥Ýäì&g79»ÉÙMÎnrv“³›œÝäì&g79»ÉÙM^½ue(å;íùMÞeÏu“\7 ºIÐM‚nvùŽ;Cd4eG :JÐQr%×Qr%×Qr¥\˜3žœñä»xç|¢«äºJ®«äºJ®«äå;çÕ1ò­Qª¯\S¿F;ùvó{å9õ3·üýéýZº¤Ò%•.iT®s<§áõxÞˆ7¡[]1)“*™TɤJ&U2©’I•LªdR%“*™T)Í$“&™4ɤI&M2i’I“LšdÒ$“&™4ɤI&M²h+¾‹ïá_ñoH«cä)3‘2“ßs{*aR “J˜T¤‘=.²ÇÕ"ÔªÄI%N*qÒúQUêdR§<§<“:™Ô™HTê¤R'•:™ÄI¥M&m2i“Õý¿g²~îx¶ý¼ðÆÿtSu<4•&©4I¥I*MRi’J“Tš¤Ò$•&©4I¥I*M2i’I“LšdÒ$“&™4ɤI&M2i’I“LšdÒ$“&©4I¥Iy%™òŠ$™4ɤIy¬q²~¬1•&©4ɤI*MRI’I’L’d’$“$åñÇT’”çg’$kÚÛ¤I*M2i’I“LšdÒ$•&©4ɤI*MÊs3i’I“LšdÒ$“&YóÛølϦíÙ´=%ÌDÂL$ÌDÂLvqNrÚü¹ÿÛ^×¼ºJ™ÉúñÌTʤÍßTI“IšLÒd’&•4©¤I%M*iRI“JšTÒ¤’&•4©¤I%M*iRI“JšTÒ¤’&•4©¤I%M*iRI“JšTÒ¤’&•4©¤I%M*iRI“JšTÒd’&“4™¤É$M&i2I“IšLÒ¤’&•4©¤I%M*iRI“JšTÒ¤’&•4©¤I%M™2™”™H™T²¤’%•*™TɤJ&A²õs“3 ’IT‚¤$• ©I%HyÎr*AR RšM*-Ri‘J‹tñ™Õ:æÙèÊè;QÔ<­ùúh¦ù¾æûäÅÍoEÍæ´9-Ïanüú¤Føo>‚–°˜„Å$,fÈb†,fÈb†,fÈb†,fÈb†,fÈb†,&a1 ‹IXLÂb’Ú‹ŠŒÉ ˜Ì€É ˜Ì€É ˜Ì€É ˜Ì€É ˜Ì€É ˜Ì€É$L&c2“ɘLÆd2&“1™ŒÉ”«ZBíèáñ.¼ï­Éùšœ¯Éùš¾UÓ·júVMߪé[µ>>‚â|\€| âãøRæõÅ€É ˜Ì`Ýd†LfÈd†LfÀdëG³Ê#XåõÉWn†½ Ù˽ Ù˽ Ù˽ Ù˽ ØË€½ ØË€½ ØË€½ ØË€½ ØË€½ ØË€½ fwßqt*‰ÏußsÆ^’u{ÜÄ^ìeÀ^’ìeÈ^†ìeÀ^ì%Y·—!{°—{°—{IØK²~T*c/Cö’ìtT*a/ {IØKÂ^ö2d/Cö2d/Cö2d/ö2`/ö2`/{ÉØKÆ^2öR® Íýp;Üa‡½anOì…½Á~æØÏû™c?sìgÎ×Ïùú9_?çëçî€;B?˜;wªŽB•¿Û>a/ƒ9•½ ÙË€½ ØË€½ ØË€½ ØË€½ ØË€½ vqjÈ^ìeÀ^ì%a/ö2`/ {IØKÂ^ö’Tö²wmï(ª=¢öȨV;®öü¨ŸŸÅñÇâɈ¨Y暇7¯’âUð+þ¤Uqgc c¬aŒ5Œ±†1Ö0ÆÆXÃkc c¬aŒ£OGóÑ^šÆXÓkcMc¬iŒ5±¦1Ö4ÆšÆXÓkcMc¬AL5ˆ©1Õ ¦ÄTƒ˜jS bªAL5ˆéV€=µW«Àžãö¹Õ‘©¦0Õ¦šÂ¶Õ[WEóÚÂX[k c aÜxjôÀÆÓð <'£?yÕÔì§Wá?ðcdø ~ ÿŸ–0ÖÆZÂXKk c-aª%Lµ„©†0ÖÆÂX3˜V«ŽuûJ¤Í—à¥8ÛW&½ÎýSqFu5’±V0Ö ÆZÁX+˜V+–Îuûª¥ Ü¿ž{­`¬Œµ‚±I?5é§&ýÔdŸšìÓr¥’©>6ÕǦúøÿé* ¯S}lªMõ±©>6ÕǦúØT›êSS}jªOMõ©©>5Õ§¦úÔTŸšêSS}jªOMõ©©>5ÕË#Ó+rv+Æ&úØD›ècÓ|lšÏ œ©i>5ͧ»Z5S­ŠùM­¦÷U?Ê4vó9ÑlóeÍ“ì©oi¾%ÚÐüyóêò죙´ÚS7DûÞôOí {h×Úµ‡ví¡]{h×Úµ‡ví¡]{h×Úµ‡v£Ó‹ÍÑ›ñ»]`bOØS'öÔ‰=u}ºEC\ìþÍ9gÖÀ /¼ ð‚À Êw2^ñ‚lý݇ßÞ«¯/¶Ú³ƒ=;سƒ=;س7H¹AÊ RnÚÓ»öô®=½Ë Òê\ÖMî?»Úã·Óú¼Ê2{~°ç{~¨Îk}~±µþ‚ʺõïçÔS{ÿUŨžÃÎW-Ý¡<ƙՙs9¯¿[±µ™ÞÛ®úYž³š5æ0ošYÄ£ðdl»ÁÁë×!8¸ñ¬â^gã¸â´õDéJ”®DéJ”®DéJ”®DéJ”®DéJ”®DéJ”îÍ<74H” QÊã¢ÙºwLªs%Ÿ\¹G¶þNF0ÝêœÉãÝž€›¥ÌDÊLvœGy²û¯ð±Wbû9•o)ÏZð÷ß>·2Hšîºt%MwÝ?&¿u®¥ääþøGùGÆ?2þ‘ñl§w8¶¥ÒOŠ­ÍŸâgû¹ïA'ç!)ÉÖÓ*H«.Iw>Sbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbu%VWbuÿˆó:ƒÄ +H¬ ±‚Ä ­òX$VXAb…ö…ÅÖöªë&•>’I¯Ðþ”ŠŠ¡ëJ±îB³ººöøFç^n»Ba¾°'öÂ>ÅÖ]ÊM´ô…÷Vþvœw¹¡èJ¼®ÄëJ¼®ÄëJ¼®Ä /H¼°xx±uñ<OÀSʳŠ®ìJÁ®ìJÁîâ³d„æ]îOTÿûúßGµúÕõ«£zó‰Í'FæeÍËe㯚¿ŠâÖ­qùÎÈÂcª;zJí9nÿ®X«\{¾Ûñb¼/E/ÃÉÕq¹6»ÂfWØì ›]a³+lv…Í®°Ù6»ÂfWØìJíõ¾æþß7¹íât¼¹:V·Ìp—î€á.3Üe†»Ìp—îòÿµó6¾—OâŸð)|C\„Ïà³ø¶T׎íê:‘5¯Áš×`ÝÔ¼ë÷)–«kGâ¶¼~äáEÇ\ï˜ë3½o¦wÌó¾yÞ7»ûf÷¨~R±V÷üÖ_×âõÅ ë^aÝ+õ÷ûwÎ3ÇîÊçÚvº¾d¨_R®\Óú¿äï—V SÍþŸù·Ž_=s‹9?2ßû,¾ÛX,Ö»awì[Àk‘Ù÷˜}¯±¿ï‹Ûâ¸#àÀb…õ¯4îæþÝqÜÓ×Ü«X¾Ñ5+àñâÏð`<ŽC|îÃÜY<±ñDÝáIþ­£ôˆ'cû1ÐãŠ3uŠ3ÿ®ƒ\=eæ°byæˆbmf³Ûñb¼/E/ÃI8/ÇNÁ͹Væ{u“÷áýø–ñA|Æy0ûg>‚âü¢7sVð1\ˆãàSÅȨ̂1ÄEø >‹Ïa þã| ¾àgý"¾„/c_ÁWñµ›\oóÒ¢£wuô®ŽÞÕÑ»:zWGïêè]½«£wuô®ŽÞÕÑ»úzW_ïêë]}½«¯wõõ®¾ÞÕ×»úzW_ïêë]}½«?s­ÿ3à:\_âW˜â×ÅZu {ÜqMΟEó³Ób¹ºg£XŽÍ¶x¶8f—׿ÜÃÇní×èÜßý›^§ón»{µ¶m9~ âþ®¯×âç]Æ:r|l¹î-š_\ËîÅÝ¢ŸQ¬Åg—Ç´wœ_3Žßíñ÷VǶ»ñŠ•xÙýâCø0΃íÛÞñù°­ã }ÞÇñI_ûOþþ©êØw7â"ÿ lߨö/ö±Kðy$ø’¯YÅW|îW}Þ×|Î×1Â7ª3{DZÙ›]ñå>~…ŸÙ ‹¿åþV·_÷c÷m»Ø¶‹m»Ø¶‹m»8÷øÕ°ßÇ×àZ\WôšÍb­9‡ ˜G m,`c±Ò\ÄnØ2¡)š·ÄžØ {ãVÅróÖ¸ öÁ¾¸é9Iò¢)/šûãÜ©º^é¨y”×)½gÑoÞ ÷ÆAÕùIãæýôÚâ!;Äç?Â÷ûÈê:¦=ݾ¯Ëwtù~ó8û˜SÍà…8ÞÇNÀ¶US=ý¾§ß÷õû¾~ßÓï;ú}G¿ïë÷ýæ|Íq†ÇÎò÷·âl¼ o÷ع¾æ]nû°_ë÷=ý¾¯ß÷õû¾~ß×ï·è÷[ôû-úýý~KóþÍâß¡S4u ~¤ÓôöÎÙyLž¿¹à‘Õú‚•õóšF7¹~joþ˜beþ8xžæO¨®£Úç }ÎП7{çÏ„Ù;_þ¦&Ûªe[µl«–œoÉùÖ¸+ä|Kηä|랸îûà Œûâ~¸?ä~Kî·ÙßzL±Òúø^[‡â±xÃá8©èð—éð—éð—éð—éð—éð—éð—éð—éð—éð—éð—éð—éð—éð—éð—éð—>éó—>éó—>éó—>é·w+–Ûw‡,i¿´µÍ–¶ÙÒ>¥8æF×€=·:{¹<ª¼ÊûZû=xäH[Ž´åG»À¼à8£¶žÑÖ1ÚŸ­Ö{tÛ—àóH|\Ö·e}[.´åB[.Üèš²ßô±Ëp¥ïñ»níïܨÃ:ë+Õú¼¨Ï‹ú/êð¢/êð¢/êð¢ÎÆ_ûØâ7(ŠþâC‹åÅ¿ÁßâP<Ãáň38Óˆ3øR‡/uøR‡/uøRgñy¾Þ~¼h?^ôú\Ô}_Ž%œ‚Wà•ÅxñUnu¢Å×@/Z<§A¯\Ô)»Õz—:yQÅ'ÊùZT›ûçe?DwŸèîÝ}¢»Ot÷‰î>ÑÝ'ºûDwŸèîÝ}¢»Ot÷‰îžéî™îžéî™îžéî™îžéî™îžéî™îžéî™îžýÑWx=0š­ÝwÃÝqÜ÷½q„ƒq_Ü÷Çð@<†ã!x(þCð0ü%Žÿ¿Â#ðH< Æ_ã1øü-Åcñ8ìú¼«ŒWd¼"ã¯ÈnÆUi³?x”럣ùÚž‡Kðy$ø¾äñ/c_ÁWñ5ŸÿuŒðjýÝÎW¢üŽ+ÑfÕQ«ƒ¢ùÆÁ¸/Ê+ÓY<\í裛^{³zŸë½ÅD?œè‡ýp¢NôÉ~8Ñ'úáD?œè‡ýpòßquÚ™¯Gó3#|CϺe4;»'öÂÞ¸nÍê;™¾£ßTëö2Ýf²~åÚ‰3Ñc&ëçfm¿zm¶~nÖD‡™ìâ ¶™Î’é,“]^Åö_ü?ßt{Yuý³¬:6®Ž†•W´Ít–‰Î’é,™Î’é,™Î’é,Ù®®h?Ãu»¸²í®ŽŠÝ9šoÞö§¦ý©y÷m_=#Ó3²¦ý§yßjßDϘèÙ\=šk`³ˆÑÄ6`-´±€XÄnØ{àðÿ˜ÇYuÜgUkýþ”«àf²"û'²ò[WÁõœ¶ÿ7.Å•åù²òû†«âfò8“Ç™<Σhv±†ç•ç”WøŒµ‹í1QóÀê99Ø³Ð”Ž§ßô‚Æn7üYlÍÓh1š˜ÃÌ£…6°Ï)6GÏÅßáEÅÖ¨Sä#‹YÄÈ"S325ÿ˜+O²ç)sžÖ]l®ÿ5ó5aê‡îâjŽï÷9çyü|·ŸbÀŸ®ÎèÙ\O˜ïðÅbkýË>þÕâ´ú¨8³þMŸw™ÛËq“ÞvåÆP¿×Wkõ²ï|?¥8§ñôâÖ9eœSÆ9eœSÆ9eœSÆ9eœSÆ9eœSÆ9eœSÆ9yë|7Þƒ_Épsu%߸ýY±uöçìhZLÙÑ”MYДMÙÏ4¾«¶7·á8®ØÿžàÄbkübxžã—Áó|£+žS­vùƒWûÓ§ZàT œjÓùhƒ?ÔoÎÕøv+¦šÒ´½ Ç›ÛÇiIÏ/òö ‹ÓÚÇÃó§A…öIî{¾´¨iûÕx“&ÔÅéÕïÈ9­}–¯9×çý#~òØ»(IÊ*íã™YEEVeÓ4›(*­#Š à‚J+ÂÌ ~ ;*–ÐX%  ûÒ;¨ Rl2æ(¦ Œæ8£H» KáX¢)R‰Z΂­¦K¶ckÇü2*»»z›z¾9ç;ß™Óç"r©êʈ{ïû<oÜ7ÿx¦{þ¼¬3¸5¶Éïs›êvÐ[§sÞ‚leu¯¬]}öÆ>xS6F¡¬¤PVR(+)”•ÊÊêATI÷›Üî7˜7‰ôa‘>,Ò‡Eú°HéÃ"}X¤‹ôa‘>,Ò‡ƒ¹Y3Ø ó°5¶Á¶ØX‡¼ÍêŒ,Fp,>ìœsp.ÎÃâ`G2œw)ÛË6ïT,(¼ÙóûáVÏ­í<Ö,ÜëµozþAãÖAÙ°hÍâyX4‹æaÑ<,š‡Eó°hÍâyX4oV7±›‚K7ã–`Ǿ9Á‚¾G²æÚŽ[ÿÊó¿ÆÊl8_u¬˜ Ë€ávÙšëù­°ºÛÖ|ûtÚ v”-ÃeÇ\Æ Ë˜áòžö7Úu+XP>'á}8ÍÏžÇxNLWgÃ2cXf ËŒáǼþx°£(åÃü@³òÞ`AåÏ9^¢yxýNF´öŽ«»‰Îa‘8,‡Eâ°H‰ÃÝ{Á wî ‚Â× _ ÂB³Ð … ÅÂ#…G‚RéÆÒÇçõ=Ä•wVÞTªVìÞëQœé20 *6ü·<¨ó‚9Øè•?µ'6ç*À»ýÜŽÅÓ›+1Ϩ2o³æJ¨9ÁPw5,P{*"P*"Pƒ*"hçŠÒµ+÷ùœ‰Õó%NÌ;椅/y~õ7¨÷æßœNçßœ>ì\x2˜7{þDÁøTøsÖ2>tò¹‘m?ºk">;ؽHÕŸ—«ÆNO-ßS‹ÇoÖ·›3Ï‚Z*©ç%j©ä󗌫%wɸZúSwì¡׬–c¿û­\_0ïi­”³±oÛN øNÄIxu5{ŽGwn‡q::Žyô>¼›ç±z~‡ã9^ÌñèÎíØÔœŽÇ¼ß¸ùl‘8‰žÈ»Ò¤Ñ/ó.¶k¿™=Çã?™g!³*K‚y¬òB)W¨âŠq±’àçÙx>¿âø·¬5X̯H®_±-vÈgN¶Ö¸îÞ| .9å’S.9å’SãQ'Ÿ97ØV5¸»pwP.ïYÞ3ˆ8,诌VFó;ë‡6ÖÕ终àR#ƒËq>ˆáÃXŠM]yÛè·Þ§»åá·=¾ßÁwÑÄ÷ð¾1‰à!´°©ÕÓþŽ'ð$~§b9~ INOÉé©ÞŒëÉàwø=:X‘_Ûèz¶…ƒi¿Cp8†³Za‘í»mGpÜz´Nô\·&¼ÏþûéÅ“Ñòþ™yT5u Ö»‚’öºaugIÔòNûGæW+ºëÈtaRz0›*Mâxãø}¥GñCü?ÆžÈjr½&×kr½&×kr½&×kr½&×kr½&×kr½&×kr}J®OÉõ)¹>%×§äú”\Ÿ’ëS³»[åߢÎ|ƒZ‹ŽX§Ô”ü¬ÉÏ)ù9%?§äç”üœŠNÆ)XûMjMžÖzߤNEàRû—A\Éשèjˆ%9[“³59[ëu’šê}›:݆µß¦ÖäpM×äpm£³µóþÇñsˆy=5kÆöd”æß®æyžwŸ½ÎSSr½&×kÝ{ZÏɦâsqc |ŽØçˆ/„¼‰åM,obyË›XÞÄò&öùbŸ/–7±¼‰¯ÄUø|æx ×àZ\‡ëq|îøFÈ u¦¦ÎÔÔ™š:SSgjêLM©mN×§ø·Y;þ~Vàø7ü+ñ'ü«ÑÓBPD }(#B?¶ÀbT0ˆ!Tó{PÒî7ŒÝNOƒ}´ws²š:WSçj½Wü„×gfˆ×Ô¸ÚÐÙÔÐbT0ˆ!Ì^r»¬=´=žðL<+¿÷dÝúxd6U= !Ÿ«G« µð«Á×ÔË………A!:=:=(F÷F÷y>ܲ”Wʧ;Tz]PZµ<èCú±£‚A ¡ºê®`æf˨}ª[cl‹d šªAS5hªMÕ^›ì©Níg¼à@„ƒqÅa8oŘ­©ÎÆ9èvì>‹óÙ¡Úþ<µ=TÛ_®¶/RÛ÷QÛ÷WÛCµ=TÛCµ= ®\u{p>’M¨ó#êüˆ:?¢Î¨ó#êüHpƒ×>Š¡†¿ÅÇqnÆ-ø>‰[ñ)Ô³Qcè±aÔØ0jl nóüíø<¾€þ_Ä?àñ%|wà+¸ÓqêêÀ¯Úÿ¾ŽoàŸpîÁ½Ç}ø&þß¾íï¿ßÁwÑÄ÷ð¾1‰à!<ìgÉ×H µý!~„cʱÿ þÿŠŸ"Á¿9æÄJü ÂB¶(,¢„>”¡[`1*Äæd£á–˜‹­0[cl‹í°=žðLìˆgã9x.vÂ|<ÏÇ_à8ãŠÃp8ÞŠ·áí8GúÛéÑp!Õðè`çð˜`^>ëCÌ…ÇfÍð=¶Çáø¬Žâ½8Éó§átœ3qÎÆ¹y§­Ñp1–à|\€ q.Æ%¸—ár\‘wÛ 9É“ ¯ÌÎ ¯Ê»o-¯Æ®Áµ¸×ã|É{¾Œ;ð܉eø*¾n7ävÃÂLÿŸ$¼÷b÷á›ùÌfø-LàÛ¸k¾5öÙ»ßïºj9ïÐ(ìeû—¶]ÿðf쇃³¦ ‡f…Ãp¸ý·Ú¾ GàÎF ï´=Ga!yßѶïÊ×z¡AF ÇÚFý^Z³@GÓ!#…s8vǶp.ÁÙháƒXŠ[ýM_ÊÎâ[|Kƒ»_–{—í·üb» ¶ b» ¶ Søü+~ŠÇð8~Ži<'ý¾_Ø>…åøeÞ_c„æ)´íÿ&_+~„öiVÚÿV!Ë&Š! (e#Å>Ûb¿XÍšÅ9Øs±Ä{Q¼Å{qŸ‰gaG>éÙxïô\wg_|AÞ)m´øB¼È>g_|qÞ5m´øÒlqq7û»ãåx%^…=ð¼ ð:ìåýo°=<{uñí8Ëü½_ËEDZøUïÊn+ÞMïÉ–ïÍ.*&Ù©ÅÇü=gIñçÙK‹Od—‘ŸÊ–•Zµ¼tHÖ,j{NÇ8gálœƒsqc >˜5øÀØà|`ƒlð >°Á6øÀØà|`£tS0Pº·àÙ¢Ò'q+>…:>Ïà³ønÃíø;|>-} ü=¾ˆÀ?âKø²ßy¾bÿN,ÃWñ5|ßÀ?á.Ü{p/ÆqŸÏ/ŸJò©$ŸJò©$ŸJò©ô¼k\³ÔÄ÷òÁ!=ÒÃ!=ÒÃ!=ÒÃ!=ÒÃ!=ÒÃ!=–~’M”ÄlIÌ–Äl)ÁÏ vKb·$vKb—n¡›Gèæºy„n¡›Gèæºy„n¡›Gèæºy„n)©á¥UÈøßÁl¢o]_¼É–ñÇ þ¸‘ûã_wg¯¬ZÎ'7ÊÅUËË´C¹oÕ]ürƒ_nðË ~¹Á/7Ês½¶¶³¿=æÛ¾í_€NàåòÇ/òü.Ù²òn¶{`OûoôÚ‘8 ±ëyêò9ù̕ѲP¾:k–¯Ë»í5Ë7{ü‰¼ãÞ¢ò­Þó)ëŸÁgñ¹¼ߢ²˜(â¡,Êb¡ü¥¬Sþ²íPWËwz}ÄAY”¿îw~â ,Êw{Ï=¸ãy§¾ÑÞÕ EåûíßEßÃÞóÛ‡ð0É÷®–§0íçž²M±¿Ä¯ðk´ñü¿Ãï±ÎaÙ9,;‡Q”5£~lĨ`CÙhT…ñ72þFêP¤Eó°5¶Á¶y·¿ÅÑöxvÀ3¡EêP4ÏÃó±¶O[½jR´K>›¥¹îU&¯©IÑ+²EÑØÓs{y¼O6Á‹ðb£ÑÁö³o܈ŒËÑ1¶#0ðea4jû^¯Ÿlÿ|`Õí¼Ø(/6îµ3¼v&ζ®çγ]Œ%8ßû/À…ö/Ÿ—zÿe¸ÜþXŠ+qµ÷ŽÙÒ‡¼Ûï6»D7ø»>êµíßdKòoaDëEz—‰è½ˆÞ‹è½ˆÞ‹è½ˆÞ‹è½ˆÞ‹è½èN,ƒ¸Šè½ˆÞ‹è½ˆÞ‹è½ènÐ|ÍÑ|ÍÑ|ÍÑ|Í}÷ã;ø.šøÍÇKŽð’#¼äHôçh¾ˆæ‹Z0.FÆE³Ác6xÌÙà1ѯ|Îßz­c»Âç3ÆEƸèÏÙD¿ñ­ßxÓÿ*ì›wdí­RÜ ßh÷c²ÑQœ€÷eÍSpZ~?Ñÿ9ÂŽ œŸM 8—âêUËÆp jx,x<ˆÅZ,Öb±ÿbã_¼3^±‹µX¬Å/ÁKñ2ì ã`lŒÅ\ü  ccal,Œ_×ä]#GãýàïÅ_|ýÓüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqȇüqÿM6ó 1ó 1ó ±x‹y˜‰y˜‰y¸ŽOã3ø,>$—±¸ŒÅėÄâ2—±¸ŒÅe,.cq‹ËX\Æâ2—±¸ŒùX\Æâ2—±¸ŒÅe,.cq‹ËX\Æâ2—±¸ŒÅe,.cq‹ËX\Æâ2—<ÿÏ?Âóðü#<ÿÏ?Âóðü#±¸ŒÅeü¨óþ#Lá_ðSü Ýx˜Æ“x Æ£XœÆí` 2gÕòÊ.Í–åßQ+*tF…Ψ,YuWåò¬Q¹ôFåc¸)kVnÁ'al¨*Æ„Êm¸=ï:Z¡¥+ttåëù}›‹*÷à^ë+ÆõÊýyÑÑŠÚ^QÛ+êzåûx?ÀCxzí'¶Æëбºbœ®Ð–Ú²BWV~…_Ø\ù¿»ã½ôX®UèÉAù6HO–òž[á`ѪÛû=6VV1'Üs±ÇÛc§¼×èà{³æ Ï?èó^™w7í®¨=:xÄ×à­~æSÙÈÐY84€ b~ÿÐl‰¹Ø ó°u00´ ¶ÅŸ²Ñ¡?c²l´º`Õòê~ØoÁ8‡gUÞ ªÆWߎaðÕ#³°z‚/¨ãüžã³fu>Cõœþ«ª¦TùêyXŒ%8?ïÈÚ¬^>¡z1x…êe¸Ý«MŒ¥X{ßÉÓXåËÏ-Ãæ¬òµé^"k{¢>+[3ß‚'Áïð{t°ðm¼÷H3ȸÜa~ßÊDX„ 9¶°Œ2,Üàâ (äPÖ…s¸ç-1[a¶Æ6ØÛa{¬;÷- Ÿçà¹Ø óñ<<ÔTHMmtÙ"Nüèà ð]Á¼ð˜`ÇðÝ«táyÞßíð»çã\ˆ‹p1.Á¥¸ —cf~Y+¼c¸×â:\òUÁZáݸ÷b÷a#÷xvÍ–öÈ:½û:–æWß’ßÛQ/‚ÃñvŽ}¦›e}Öê`­õú¹ŒNÂö?ˆ¥¸ÕïûR66랎´p翵æ~Ž:§^_gŰ™0­Þ‰ñ¼¦óÆi'œvÂi'tÂA'\sÂ5·Ö¹7c/Ïu»e®¾ïâ„®»Í––NÅi8gàLœ…³qÎÅyXŒ%ؼû+&¸Ù nv‚›àf'¸Ù nv‚›àf'¸Ù nv‚›àfn6áfn6áfn6áfn6áb.6áb.6áb.6áb.6áb.6áb.6áb“õs©u.µÎ¥Ö¹Ô:—ZçRë\jK­s©u.µÎ¥Ö7s³ÿð ízýtZ½UÊf®Ø®Ì–öî£XZV·Ë}Y}÷Q,-o…ÕWpwÊû/ÝȽKó•Év³Ý{nâêî{²¤|އ.‹á²\>çúÝça1.É;m$3s ó{)ºs '8Ò„ûœà>'¸Ï Î3á<“|ž!õÅmNp› ·™p™ —™äs ©*Ž2á(Ž2á(Ž2éݱz~aÂQ¶¸É¤7·p‚›L61·0á&n2á&n2á1á1á[œ`‹lq‚-N°»ŠZ‹ëkq}-®¯•ß» z÷+Lpxë­¤ÖšÕ÷¨Þ[ImÃ+à'{íÌܯ°‘•Ô¼vÖ®¤6sUü#œäÕžßp5µn_¤úÌjj¶·aS«©m¼/Òº}œ7vE}í•·$J!Þ#ñÞë™ÔŒÚø fú<'½žIõÈ4k~d·›yk½û*á ’uV?»:[:0†kPË–r1 “p1 “p1 “p1 “p1u.¦ÎÅÔ¹˜:Sçbê\L‹©s1u.¦ÎÅÔ¹˜:Sçbê\L‹©s1u.¦ÎÅÔ¹˜:Sçbê\L‹©s1u.¦ÎÅÔ¹˜:Sçbê\Lý¿°JÚÓïÅ4'[ZÙÝÕÒÄNEÍ­¨¹ŸkY ×ôf&¨‘•/fãü?AÁOPð åžPî 垬sÿÀ£ù½ñ^ßën¿§:Å]ß Ëí½ÖVÏ^0~RÕ Uô®ô­îx[§ªëTuª®SÕuªº>»ÔóUdK«{Ù¾{cìç¹ýñ€qp6^=‡BžQÑu*ºNEשè:]Ÿ™óJOu»Ðuç¯}?éûI–÷-ïë¹Õ]è6¸# XEA¦dJA¦A·;÷eði)È”‚L)È”‚L)Èt3ûSNP{ÔÞ7EÁMSpÓÜ47MÁMwï*¦àš\“‚kRpM ®IÁ¥\JÁ¥\Wm¤ÔFJm¤ÔFÚëY™®éY9Ób‚âhRMŠ£Ùë[ÙÌ{j·¼žÌê]ù{ïíd“…øC6Õ½C´`$*¹¢èö­ìvƒ/öcõê]Ý.s*\¯Ó\jäLœ©‘35r¦FÎÔÈ™9S#gjäLœ©‘3Ý̾•M#cÓÈØ42Näý*g:=L¨¶SªmSµM{=+S•5]Ó§ò|û`uJªDM7Ò§²©‚v»:¤ªgº‘Þ”*ä„ 9¡BN¨†Sªá”j8­N¯¹ËëW0⨆©jØg;¡N«†Ý;ÀRÕ0]¯Weªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVªj¥ªVú_èUÙTµšªVSÕjªZMU«wWʚƓx >»ªÕTµšù]Mαª2¡ª4+Ôi…3©¬Ê:ƒÅ¼Ê¤ªL:oЯrrpkl•"¿céy¿Ê©Yý*S&UaR&UaR¦;¸©Â4U˜æw½#¯©j‘ª©j‘ªÝy¿“yßšø-„…~¢½£½ƒbô·ÑߥèöèóÝÕœúËkG9Øfí¿ð@nj’›šä¦&¹©Inj’›šä¦&¹©Inj’›šä¦&¹©Injr3ûÏsSãÜÔ875ÎMsSãÜÔ875ÎMsSã!µRûá‹° ^ Ê?|)^†]±vÇËñ ¼¯Âx5^ƒ×bO,Àëðzp á°7öÁ_â¯ðרoÄ›ðf©C#uh¤Ô¡‘:4R‡e˃qÅa›è™wT°/¸3x=ø.ðL.ðÝ›±²S·^Â&`Â&`Â&`Â&ÿÍ;Œf¯òÔ½{~œóç¼Æ×[å)Yï£n-=•óå¼F{ëœÙ[›àÌn÷ïâ’`ÇâÍ5Ø£x7’`çâÏ‚wóÜã^›öø ûOûaûT°€«šäª&¹ªI®j’«šäª&¹ªI®j’«šäª&¹ªI®j’«çªÆ¹ªq®jœ«çªÆ¹ªq®j|óVŒš}W'côï3ú÷Éé>Ž´o{ê{uO¾™»’ºýø&Ë·ïî­5É-Lr “åF¶lÖªQãå;<¾ÓóË@Ùr ã³Vï]‹šäÆ7\9*¿3iv¾¤w-j¼×§oò?èÓ7Î=ŒsãÜÃ8÷0^¦nË+ò~}믕p ‘p ‘<;“&9ŠÉ™;“(eõ²¿„>”¡[`1*7ÓÏÍôs3ýÜLÿ\l…µ}üš½;“ÆŸæjR“Ôä$59IMޝ»šÔ:w&÷îLZ½šÔº}ý‚,©†8ÎþÌIåpçpç w w ÂðãáǃBø¹ðsA±|Uùª Tîtïþ ÂþﬞíZ:eÖl×m‚‹‚ùÁŸ—â2\Ž+ðA|ÆR\ì\…«)°1\ƒkq®Ïg6M2%)L dJpg°{° ›3[ýgYƒâkP|ÀH<£e𠈲 …Q3 #gÀ?FOê°NÖ¨ÃuX£kÔa2£ Ç(Ã1ÊpŒ2+Ì/‚Ñw´]=Ëýø¬AŽQ€càØLg@¯?ì>kfûõ× úêù¬öÙ+Í¿3{^ñH•iõŠó‹<>ÚãÕ+Ï?¼¤øý`~q2ؽô`0¿4‰à!<ŒGàÿ+=ŠâGø1¦°y³Û›% ª´”r‰R.Qª%J¹D)Sˆcâ…8F!vW7ŸàÉ'óYèÃó TâXt|0¿7+½É“7yò&OÞäÉ›ÑÉ^;öåÉ'yòÉY3Ô'£ó½vÖÎToòäü¸ç6ìH8}Ôó7ú;n²½ _ȯ€Nn0{ý_ý}?EqÃ{7yï&ïÝä½›¼w“Ú¬S›uj³FmÖ¨Ì1ʲAYÖ(˱hE0݆Áüø\œ‡ÅXìï/„܉åN,wb¹ËXîÄr'–;±Ü‰åN,wâ+q>Ÿ5Ã5¸×ázÜŸ7¾ÿyÃ1ªrŒª£*ǨÊ1ªrŒª£*ǨÊ1ªrŒª£*ǨÊ1>u‚¢lP”cƒ}ÁüÁ2¢`ßõ:NR‹õµÝ ƒùCˆQÁ †°u6F-ŽQ‹cÕ#ƒùÕ£°ò§zt0ÿ+ËÿPe9Ue9UeSYš*Ë©*Ë©*˘ÊÒüßÊò¿•åÿ÷Ê’3õõàÔÌ]þ¢oFž iú3õ›ÍìpÞá0;f‡Ãìp˜³Ãav8̇Ùá0;f›Ãls˜m³Ía¶9Ì6‡Ùæ0Ûf›Ãls˜m³Ía¶Ãƒ‚yáÁ8‡â0îù·âmx;ŽÀy~ÿb,Áù¸â"\ŒKp).ÃåøŸùûÇPÃÇqnÆ-ø> g tÂ:>Ïà³ønÃíø;|_@/âðªÓY‡këpm^7ó6×ÖæÚÚ\[‡këpm.­­rÍëÝÑ÷ŽÞ}ï(ž´ÝÍÛœV›ÓjsZmN«Íiµ9­6§Õæ´:œV‡ÓêpZN«Ãiu8­§Õá´:œV‡ÓêpZN«Ó':9©'Õ.ßhÿoòë.í^wóκëïó8©'Õñ×.ßáñÚ.çmNªÍIu8©'Õîu9osQ.ªÃEu¸¨Õæ ÚTw}¦6çÔîu8ïpNmΩÍ9µ9§6çÔæœÚœS›sjsNmΩ]^Ìãš:\S‡kêpMèYªÕŽx6žƒÝòë+«;š·ú·Æ6ØÛa{<;à™ðóý~¾ßÏ÷ûùþçb'ÌÇóð|¼$ksBmN¨Ó¿P5;&ksBN¨Ã u8¡'Ôá„:œP‡êpBN¨Ã uÖëhÞæ„:œP‡êp?mΧÃùt8Ÿ6çÓæ|ÚœO›ãéö-…É– Üp.úÊw8åò Ç¢Û¡•ç)˜;ó/‘÷‰¼Oä}"ïyŸÈûDÞ'ò>‘÷‰¼Oä}"ï§åý´¼Ÿ–÷Óò~ZÞOËûiy?-ï§åýôfö¨_ˆap°áKðR¼ »b7ìN6|^‰Wa¼¯Ák±'àux=ö°7öÁ_â¯ðרoÄ›ðfüì‡ýñ€qÏ0Á¡8ls 6¯GÍÿkÊÍ|S5Þƒ{1Žû°ñoª’ð»hâ{YR¸8¿“`v?œdýp¦óõè6쇳ñí8¨‡‰z˜¨‡‰z˜¨‡‰z˜¨‡‰z˜¨‡‰z˜¨‡Éÿx?œ-óž8}[cl‹í°}>“z:¿N½z=»µ½q’^oœDÝLÔͤÜÀº½qu3Q7“MôÆIÔÎä¿Ðg:_ã®å½k{ã$êèôÓè3P^‘_Ç^¿7ξÞÝÚo¤"yÝûF*‰^Š—¡»žóßûV*Q‡“hÏ,é/ýE”Ї2"ôc FƒBsàœôÏÅVø¿·ÆÞÚ¾; =~ú½w¦ÕõD]OÔõä¿Ù{g bvï»dmý…cF ¢]µ·öžÄÂÃA‰ëCú±£‚A asfÒ•%ÁE¼âŸ—â2\Ž+ðA|ÆRˆ^ž4áIž4áIž4áIž4áIž4áIž4áI“u:àϬä½AOŸõ¯c†Çâ$œ†ÓqÎÄY8çæÕú魪…†ì¯ÄUywß4”¹áPUBU%TUBÙÊÞPU U•P‡ßÄúßñïšÕ ¯ÈnéÍúªå³¾öÏWO æ«y5 ‡àpÌ\M ‹ì¿ÛvÇa¦[ÿÚ¾E'z®» y·[ÿûq2TÑÂàXΰ=Ó{œ»Â9;#VÁˆU0bŒX#–ªžŒX…K×]m´p%®ò7~ÄÏ_1\ƒkýÞë ‚ 7xüQܘÏ>«­™yö-gfœ5øù„ŸOòÕþ˜¯#’Uš¢JSTiŠs±¨‰"5Q|¨ˆ"Q¤Š/ÈG–™•N_d¼¯„¬-î×À±-.Àëð•ü ¬V:˜*Ó¥SퟆÓqÎÄY8çà\œ‡ÅX‚Í™¶+£–îós⥤ꗾ… |*é;ùuñFi?ÀCxÀq-=ŠâGø1¦ð„QñIüO!ÅrüÎCÉy(µñü¿ÃìÞRs×Ì«õfŠÕÊjËšÙasío…µvk™V+ï†=°þL0±X>ŽaÙq+Ý`ë¶ŸÆgðY|.K׬û•|tœYùÕh]6Z—Öåñl¦‹Üú+À¶Œ^úáïŽüÝQŒ ó.pë®ìÚ]ýAüEó°5(šhÛ¼ûl‰Áˆ’(ÙÈçŒÄ_$þÖ¹î2soNwź$:ýÞYÇg轟l{ ΰ/£óí_€Kí_†™¹HnE×â:\nï­zþ&Üu3R7#u3R77Xb9§óKtûr­;w »ò\­ð;œçþÝŒÀûæ£Ýø:3¨z«Êœ”5Ô”Sò9É€s6p®Îjc¸5pfÝ^…¬QBʈÐ-0€ bUÌÁ–˜‹­0[cl‹í°=ž²$~&ž…ñl<ÏÅNpŽbç(vŽb±‹ÅX,ÆÔhìœÅÎY¬fÄÎ[ì¼ÅÎ[¼+vÃîx9^5%VSb5%~5Ô•X]‰ãXm‰Õ–øõp¾c5&Þû@=ÿ  Ç6~#Þ„7çêá?\¥77ñáx+Þ†·CÅï€q ~'ŽÄQXˆE8ïÂ10FÄÆˆøX¼ÆŠøxŒBüÅ'ÀXŸ„÷áý8§à8§átˆÑØ9óøì|6\#>ça1–@üÆâ7¾4ALÄ4ALÄ4ALÄ4ALÄ4ALÄ4A|%®ÂG Þã1\ƒkq®Ç óñ bz!÷±¸Å},îcz!~›Ñ[.¦|cù‹b9¯À@kÄ´FLkÄ´F¬öÅr%V+´F…Ö¨PD }(C©¨3u¦¢ÎTÔ™Š:SQg*u¥š÷³«Uvâôw±}­óP1ÖTŒ5ëÍÀK*7ÙÞ‚OBM¬¨‰µ°rnÏûµ*tG…æ¨k+ÆŠÊý¹Ú\»ª3wPá*à'ø©ß;³úIZéäk½6˘“%ƒ[bn>O¦5HW¬™·ÔsƼÁkó{_ò¢óƒÆù|õmCÚ"k Fƒ¬~zCÆŠ!cÅÐ3`Œ2Æ=+ŸµW«¾>kW÷Ê’ê°7öÁ~žßoÁ8g­ê!8‡áȬQ= A'U}T¥ª>G•>ªžÚ°ª–UiŸ*×^åÚ«4P•ªÒ?Uú§JÿTéŸ*·^õù«>Õ¸_íÎÓ ƒBá€ÁKƒ°ü•ÕëH–‚¾c×þë>ÎÛƒ¬ ÁS<¥ÁS<¥ÁS<¥ÁS<¥ÁS<¥Á»w¦¬ bŽÆ»pLÞÿ²ŒàX| ëÐÝàlœƒsqw×¹îõ@û™÷=†Çók3«×§Þ@7Ó¤ðŸñ-LàÛ¸Ÿ¶Û5×£iáMôÜ›=Þ/פÝ5«›ëhÍ“r}—>ŸßQ°²p¯×é—Â}ð» ÿì9¿»p6Yhzm¦Gf³ð0ÄaÞ í÷ö×]-ª;?0)FèǼ¬SÜÛg+‹Ücq×î|wÇËñJpt]WÏ¥ô\JÏ¥ô\JÏ¥ô\JÏ¥ô\JÏ¥ô\JÏ¥ô\Zº)ë”nÆ-ø.šø^>'pv_Íî¼Àfßrü*ëôý+s ”Ò@]í“Ò>]Í“–_Èu¿(ŸùžÒ9Ýî+ËÇáxŒâ½y¯ÍfùDOËïÃi~æt8§4P§ìœ–?†8ëa¼/Ï×ÑnöVŸZ݃³i¬oë›Æú暟֮eÝ盽^œ©q:5N§Æét౬3ðx>oszq¦êVZ¡Ý*#xoÖ¬œuÔ°NåýÙdåd8•slo5-­È©Ê‡Õ!¢ÂCT®òÚ5Þk¶²ò…|vqR¹Ó¾˜©øì•ïãA<’÷éìÎùköjUg½U˜’ÁËfÖž^¯_gª†tÔŽÒQC:Uñ¬Ž¤êHªŽ¤êHªŽ¤UcîFÖ¢Nº«.©õ££~tÔNÕ¸X½À¶»’ôO+»È²8‘ÅÝ{ÍfgY’gW7“ºÃìLæ´dNÒËœ¤ððæEº(îv†M6¹³£–2¡‰MDh²:2× 5Q@MôÎ|Ë™o9ë­5g}Ýî«­îßÄ™I6qfšÁaŽrËQn9Ê-G¹å(·å–£Ür”[ŽrËQn9Ê­àÝÁ¾ÁŽÅ‚7Ñá´åÈ· o öÕÙ´U¸×ão;;Â-G¸å·á–#Ür„[ŽpËn9Â-G¸å·á–#ÜZ¯+é¾}Ëñ«`ç^'Ò'î|ࣨ}vv³wvŠ+2Örm/WÑšÔÒ>›g©¯—¶ÞVG ŠÔ`þÕkWj5l(Eu’€TQ¦VÑâßjž¯õÕÔÚ^-h;µbíhý{ü³*x£Ä3ï;³›¿„ë#ïO?|¾3“ÝÍ’=¿s¾gwÎ9’³.9ë’³.9ë’³.Ë3‹JμäÌËä—ý÷¢Ù0Ãq?’¥ÜÇè’Þ¥XÒ´÷úç<×êh6ÌðJuIïRîsýó×yìðs¯¿Åß²¶r¼а“R:|=sI¯AÒkô$½I¯AÒkô$½I¯AÒkô$½I¯AÒkô$½I¯AÒkô$½I¯AÒkô$½I¯AÒkô$½I¯AÒk¿ž¹˜d¼ x xm¯Ë < Þ‚·áà5½$-Z?=¯{–سÜ{=s1eÈzæ+–X±ÄŠ%V,±bYu˜T5“0X‰ÁJ Vb°ƒ•Ñø’­‰$pßI´I¢Mm’h“D›$Ú$Ñ&‰6I´I¢Míý<–QÉñÏM°¶ÃèI´I¢MíòˆV{pD+N8<‰.I´‡N}ŸÇìÙpT*I´I¢Mm’h“D›$Ú$Ñ&‰6I´I¢Mm’hitåð$f‡Êãç9PJ¢Ê»˜} Œ>úÎ&‰öÀè»Uï5â.J¢]qg“D{Ÿ#î^çÿÞ>pîIb–$fËIÌ–“hýFm’h“D›$Ú$Ñ&‰6I´I¢Mm’h“D›$Ú$Ñ&‰6I´I¢Mm’h“D›$Ú$Ñ&‰6I´I¢Mm’h“D›$Ú$Ñ&‰6I´?~4Û˜’è’Äl9‰6I´‡2 G˜ý\d‡Œ&³I¢Mm’h“D›$Ú#’h“D›$Ú$Ñ&‰v”ĉ=aSGù¦eÇ)QIС€ðŸiÈ@`Y8&ÀÁpL#+´êÿg3iõøf=¾Y/Îçgz‚ޛ ­ôÞmœ ',è ‹‹àbhù<>Ì­°~ aQ0çtzœÓéqN§Ç9]Øümmа –Õ°~ WÁÕcžÍ{ .Àß¿ 6ÃþͰ|W1æé9çé9çé9çé9çc¼O1Þ§ïSŒ÷)v4Ô@-|0ÌV› _€/ÂcÓ‹ÕÁ…ãàË€©Å¾Çfû*ü+L‡¯Á×ápü|¾'†Ãðb^ Ëax£^Kõÿ鍨ÃAWì‘ ;öGø¸ðgø ·?ëáqø+õ˜ž¸ n‡¿] ž„§ùÿžgá9x^ÎSâEx ^†W cqÚŸ§ Ÿèƒ ÈÓg­¯C«Ïžº²‚º²‚º²‚º²b"˜Ñ<²â5ˆfžçq[a[0½âÃÒ,ô}Ч-ìÿŠT’ú:‰¯%éM™ã€Þ·ýßd Ÿ ûÈÜ6ò­#ƒéÉ£¸ý³aŽý—€,'ÉçÞ3Ùõô©ëéS×Ó§®ORß&©o“Ô·Éù€³'[¹}Pß&©o“Ôµ×Þý,芮³ ¯­[Ïÿó?ó¾$‹Ü^ó6ò·Ãƒ.ý˜tëGÂÑ׈”^ ŸƒÏGs të”mýËÃfÖG¾Öës‚åúÜ ¯û¾Ũó p_ θßßßúeÜ~9ô÷7úçXÅm{õ;øVs{8 ÿ­ì ƒ³ñèwð·m¨ç÷1—Àr} ^uœ×wðØÒUÇy}§HUj¬¤G^I¼w¯¤,TR*+O¯ÄÓ+ñôJ<½O¯¤lTV½íJÊd%mxåÿ¯Ä÷+ƒ®+ ôRœ·”?5°)˜žÚL7¨3 ê ƒ:àÎ0¨3 νÁ¹7®ÚgƒöÙ }6hŸ ÚgƒöÙ }6hŸ ÚgƒöÙ }6VÂ5p-ðÿüÿŸqü®‡€÷ʸ>¶Oä—¡¯ÁØ›AÁ[ð6¼¼GFoO©ôg!~¢Ô§çÓÓ¼¶4¯mÄj 2MÒ‡§!\%á=¿#Ègð° 6¢/&3Ë‚ú!ó te~,웉T®V…«UájU¸Z®VuP¯šùjA,ÓDªú$°àd8¾ s`.œ ´MÕ pyÐÍ’uFüLœñÐ!ÎhsœÅ³8cgÌâŒYœ1‹)eqÆ,Θų<:+ªÅT1Æ>îˆëÃA0†#`  GÁgá8~ïË0¦u‚‚:ܱw¬Ã%î(qG‰;JÜQâŽw”¸£Ä%î(qG‰;ÖêŽ? g&ã“ñÇÉøãdüq2þhâ&þhâ&þhâ&þhâ&þhâ&þhŠ•¼þk`ßéã‘>éã‘>éã‘5xd éá‘éá‘éá‘éá‘éá‘éá‘éá‘iá‘)ñH‰GJ”œ.9ÝNQϹøœ‹Ï¹øœ‹Ïåð¹>—Ãçrø\n„Ϲø\ŸË ñ9Ÿóð9 Ÿ«Ãçjñ9Ÿóð9‰ÏI|NâsŸ“øœ‰Ï™ú|1§óq:§óp:§óq:§3q:§óp:‰ÓIœÎÄé<œÎÃé<œÎÃéjq:³ìt&Ng–ÎÇé<œÎÃé<œÎÃé,œÎÂé,œÎÂé$N'q:‰ÓIœNâtu8]N7§›­¿Ãk|¶òÿìàw¨gq»ZÜÎÄÉ\œÌÅÉ\œÌÅÉ\œÌÅÉ\œÌÅÉ\œÌÅÉ\œÌÅÉ\œÌÅÉ\œÌÅÉ\œÌÅÉ\œ,7lÝ6ÎNæádN–Åɲ8Y'Ëâd“q²É8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“™8™‰“y8™‡“y8™‡“y8™‡“y8™‡“Õâdµ8Y-NV‹“Õâdµ8Y-NV‹“Õâdµ8Y-NV‹“ÕâdYœ,‹“ù8YN69M]¾¨oOúb ŽK_žz O˦—Š©ÃÖª» ?»VÂ5<§LßÈã~ÆóÝÂþÞp½jn»Ÿýoa-Ü.‡ÛåÒÏðsÉï,ü®6½‹ý•‰C…0q=3£‹©øž‡ïyøž—ÁË3xyfB´J–•ù$>øÏÑ7Åuýkæá€9°ôp@4q@4q@4q@¬ÅkqÀZÜ/[ýßðº¯Â¿Âôȳ¸`Ìâ‚Y\0[=#語É}§Âi0+òC?4ñC?4ñC³ºŸ¼<ÈEŽØo±VqÄF‘0H‚•p¤À€4d  ªñêÔÑ?G :qÁic\‘¯Y|΃ù ‡Â¤ 3öOp|>ÿ “á_àp8fÀL8NƒYp:¿?¾gÀ™P/fÄÄÂX£øR¬IœkæçÅAwl ,…Ëàr¸lhƒvè€e°~Ìóà%1Þ£ïQŒ÷(Æ{ã=ŠñÅnÀµŽ f–¯fŸY^!±Yû.vÌÄÁN…Ó!ùÍ~`ä7Ëñ˜ `|?KÙ­­€«áNžï·AçU›µGÅ´òÕäVyþÒþâžö>÷ïÓ¢â¥Ùs:ãÃD˜tDŽܮ6ZÅ£sÄ kâkƒ¯Ä7Šl|SÐ#XŽç¹ñ·øЇ3‹Íf&òÐ à‡°~‹à¸ÃX cù,ïVQ“¸ n‡ýŸ§3q/tÁ¯á>ø ÜœËÄAwâ÷Ð ÂCðX ëàaxþž¬Ä3ð,<Ïà À{x^‚—á(ÀXFÍ“³D¢¦bœh®Ÿñq¼UL«ØÆ}3ËW£ÏLRO&+ð­Q?Óã¾aðêô™{–'j’GqûçáK0êgx¢9ù}¸~­bZrP&F+iÔ$¯ Ö$¯†Û œyè® {ĬCÉû¸í7ð;óü<8ëPgò!àÜ'9÷É¿piÆ¡Îäüü7ðàIx–ûžƒçáœô%Sà¸4ÓКd¼ïÂVؽ‚>‚5ÕÓ‚™Õ''Ã)ðm˜XÕsá\ }ªn€óñ•ÐÏÂQú±Ês†øÙÂîÛŽãŒíì;‚ŽS[^9ï+8Î8ñcn¿ ®†k¿±ð ¿±ð ¿±ðKÜÀ}«ág°n†[àV¸ n‡;àçp'Ü]±aáDNdáDNd‰_rû=ð+¸WT‹.ö¿fŽó‘÷‹)â·b’ø·ÿ<ÍA_G]!äø!ø¬…uð0üþ.ü…¿Àc°>ºJÄ¿,üË¿,üË¿,üË¿,üË¿,üË¿,ñ<¿óBtµˆ%^dÿ¼ ¯DsÚ/¯Âkð:l6âz›`3lÇ!GûžvW°^|»áCØA'& Î@Ó·];N \mœÎñlöß3¸ÿLögýfíös`.œ^©ÂcØ7B3÷Îãøß£¹Ø;µ\°^»æÁ÷¹ïBö’ßáuj¼Nשñ:µ¼¯ÃØ›á P€oà4õÚöoÃ;ð.lå9·A/ÇÛ£«a,mG°D£.×vñ·óÚµ¹}ôA€·Ä@‹f\µâì ð‚ÙÑgYONüïA>þtßö8ý¬ø³ÁôøsAWüyn ç(çöÄ3ð,<Ïà ÀkJ¼/ÁËð àÕÀM𺼮¯+áÃFàõ%x} ^_‚ׇXx…Xx…Xx…Xx…Xx…Xx…X ÞËDÁúŠLàVTEŸuêÓ—vÉ¢]²ô™ÑU9–þh¾ìN}Nàèsƒõz?xŸôïõm×sì/àqsÜyŽ[aAtµŽE{eé‹¢+v,}1û%°4¼z‡Ç^WplC´õ7홥/çøJ¸Vµüÿ«x¼Ã1™§³hç,Ú9K¿¿k5÷Q_ë·²'çú/Ù“_ý¦Ý³t2¬ÿîƒßÀýð[ Ã:Öɰþ{莮²t2¬“a ëdX'Ãú#@Žur¬“cëäX'Ç:9Öɱþ8üž€¿OÂSÑUGí®E»kÑîZúsÜFŽur¬K |ë/Eó/Ñ_r¬“cë¯ó>lȱþçd ô?÷çá]Ø Û¸½ȸþχ§”¿·[¯ïäÜP¶uʶþëJÊ6mµE[mÑV[©Ëø™÷%Õ^åԷݸÃX ¼ïŸqPwm@ÝmtÀ2XW  î6¨» ênc%\×ï§áÀOà:ø)\7ï§q#ÜÄÿO]nP—Ôåu¹A]nðÔåu¹A]nP—ÔåF'üw¸þü¨Ë Ê‚AY0( ƽ@Y0( eÁ ,”ƒ²`P Ê‚AY0( eÁ >7( eÁ ,”ƒ²`P Ê‚AY0( eÁ ,”ƒ²`P Ê‚AY0( eÁ ,àNaáNaáNaáNa”CFó‘¯7^†¼`#loÁÛÀûnðž½Áúô}@=‘¦ŽHS?¤©÷ÒÔ{iê¼ôVØ­„n¥q×ô»›Ÿ)iê· e Cý–I@EßöL*9¦~ÈTÃ8¼â0&ò³Í;®ì^feÖ„W‡>aáVÕ}Û«R`@2Pª>ΆsÂYƒû¶WÏ…s6¥º?cN¼AÄ’¥ÙÄ+èoj!l‰À*áHiÈ@`ó›ÇÑ¢~†êù@ŠVXعÀvÅ"n¿.…Űöç oj;qMdÝ‚¥vLøÍPô­P8†¨K; †^^}}'÷Qz£qCFëŒJZ½p¥ÞµGïÚ£wíÑ»öè]{ô®=z×½kÞµGïÚ£wíÑ»ö·]‰ÛàöðJ–ý»:;ãSßÓU± >¤GÎ9½Ênz=HžcøMA=Ež¢GOÑeˆF¶É¸ˆf:g¾/ÆuŽ+£õa¥UQZ¥UQZ¥UQZ¥UQZ¥UQZ¥Ue–{—c °kÄ&¥ký»®õ/­VÕ«ý€]Dpqø >÷¿¬¡ZO4OHÿuÿëHÑí¤¨7ZC"%É%Iëã)z,§õñÙÜö8ƒã3á,QAŸ½"Þ<3†93ö{œ [ (Íñà™ã¡týÿàý×þwíuí8·Ã‚>h_Ä@Úã4íqJã@i(¥q 4”ÆÒ8PJã@éêh½ˆ^’»®ˆŒºÊëDôu#p`ôMa8æ½7óiî;îˆRÜ?f`ô1í¯Ê„Cà“p(|*Z+¢—t÷’î^ÒÝ;ÚØtR­i³´Y¤úe­€ÿÅ’mƒŸ.Ånޯѥ'‘Q N†S ç7¨eµŒ –Ô2÷äDœez,WE Ž-eM™~ÃObøI ?‰á'1ü$†ŸÄð“~ÃObøIly´ò]öÅÀ׎‹Ædöh_coÏDW ^-äXsÆ+×>u†¯áUÚ|h¥•Åi5ÜK[Èsýs[Gôm’Ôð íªh–:©á@Ú5<ϵüŒAh„†Ah8†i×sßj~÷ÆòÈÜ?pÛZx:Xº²ˆ²]A4…:çHZò±ŒAçoJàf Ü,Áß•àïJàf Ü,›%p³n–àïJðw%p³Ä@½œ ^N<_‚¿/±†Gàð'p£ˆû5Ïðµq¼Š7påƒžŠ¢ñ¬¥QÄø^2}ËRM<‘c3ßÚ“üö‡ÃÀ96ÊïKâ}I¼/YÍ**“´¶É߯!ÉkH>žÄðH½ÆÁ'¢«•½hL|¸FÏÑ7 ¥«Uú¯PÙûªo”«O†¡ß­2Ž™÷*?͇®(&Sd'EnRXKŽý<¸0á8äŠá#¤ ¦2€'x²õXŸÁy38ožlàÉžlðú ^ŸÁë3x}Æx ^2²pL€ƒslpŽCà“ü?‡Â§`üŸ†ÏDóÌHƒºÁàuÔ uƒAÝ`P7Ô Æ©<æ4˜§ÃløœgÂYp6œs`.œ õÐØ‰ÑX±çÁ¿Ãùð=Ȧi„3¡bËÆ…ð¸.†˜y ¿ÆÀF ÑÀEðñWµì÷ZB´G>í‘O{äÓù´G>í‘O{äÓù´G>í‘O{äÓù´G>í‘O{äÓù´G>í‘O{äÓù´G>í‘O{äÓù´G>í‘O{äÓù´GþÀˆùþÑñÔiê¥4u@š²ž¦¬§)ëé ‘m†óxîjáñŸ¹³¤ÈÐGËPGe¨£ÊmUéJ–!kÑ>ù´O>í“OûäÓ>ù´O~4 ”÷ÑÜ&ÿVñ¶ˆ%¦]Ó7V‰M:ؤƒM:ؤƒM:åë9lÒÁ&lÒÁ&±2è×ÀªÀÇ*}¬ÒÇ*}¬ÒÇ*ýQÇ}ÿc쎾OØÿY÷µîvZ¹÷`¼E —]^­HëU¤õ*Òzi½Š¿APŒ ˆQóÏ ìÕÁ^í ~.ÍÀç ÌÀGé¦U*Ò*Ë3ï…ë`¯îÀ w”´h=Õ°?¹;j1†¯z¶¨‰Ï“âç²o`ß|%Þó‚îø“¢su0Wsu0Wsu0Wsu0Wsu0Wsu0WgŒ³½©é‹ÔôE,Ö/3÷ujij×"Fë”g-s0ZGŸtg^šÁ¬4ÎÜÁp!³˜…}Hg”YÌÂ~¤ƒéú˜®ƒé:˜®_k>|F³ÑÖ”¤w o·¡WH+êôuú¿:ý_÷œš¼ˆ);:¯oèÌeزƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زƒ-;زó¿1‹U‘­HV¤F+R£©ÑŠF8c‹úÿÔhEj´"5Z‘­­ŽÆ{J­öQ ×ÉèA爼Ҹô¨¶èŸ­ÉÁlÌÖÁlÌÖÁlj‘"µH‘Z¤¸×Êgs›u°Y›u°Y'šþ.þ ÝÒ-Ó»õîpÄl|× ÓŠÝÔ".µˆK-âR‹¸Ô".µˆK-âR‹¸Ô".µˆK-ÖŠš@Q(jEM ¨ 5¢&PÔŠš@Q(jEM ðÓ"~ZÄOÃyzH¹"劔+R®H¹%å.)wI¹[N¹"åá7|Š”+í| -#튴+Ò~ò£H{8Çf/ÚKêÃÄ+¯ðÂðÓž’®H¯Kz]Òë’^—ôº¤×%½.éuI¯Kz]Òë’Þð›1EzéU¤W‘^EzéU¤W‘^EzéU¤W‘^EzéU¤WáiE’«ô3áìh® ðÓžðÛ.Ez]Ò~Ã¥H¬"­.i ¿½R¤U•Ó~S¥H«"­Š´*ÒªHk8Ý%©á·AŠ„*ªH¨Â¡Š8T‡*âPáüC=¤±‡4ªai¤d’Æð ·œFEU*ü(ì¿^ ‹a ,þ>Òè’F—4º¤Ñ%®~»C¹!.itI£K]Òè’F—4º¤Ñ%.itI£K]Òè’F—4º¤Ñ%.i ¿ÙP¤Q‘FEiT¤Q‘FEiT¤Q‘FEiT¤Q‘FEiT¤Q‘FEiTøE/~Ñ‹_ôâ½øE/~Ñk„s#î†a|}ÐW †H‚•p¤À€4d  ªá¾ÈŠÔŠÀ¥¿ýP¤_‘~EúÃ9Ú©W¤Þ%õ.©wI½Kê]R~›¡H½"õ wèÅzq‡^Ü¡wèÅz© z¨ z¨ z¨ z¨ \j—ÚÀ¥6p© ÜÈ#~¹ƒü?6$ÿïîçz¨céŸúäß'ÿáÊõ½£åØ:§ÑÈ”hÓþ¾¦?"ç^ôÕEAœ¢5Nûáêè½ap k•Ž¥?64çýW÷ûåŒ÷D} Á5JK}¡Á5JK}¢Òú¤#ûEjÄú¤#ûH>ùöÉ·O¾ýÏŸÂ|ïˆVc3Ý3´/ô^{ôãú cÉs<Ès<Ès<Ès<Ès<Ès<Ès<Ès<Ès<Ès<Ès<Ès<Ès<Ès<Ès!úü꽨EWk›í„ŸU \½¾ÏõK‡æ¹@ž ä¹@ž ä¹@ž £|Vµ×š¦QžÏ×ÏdÎt1EÌ ÑÕ$û ¢}Œ6C,ÕîÔ^·ÅoŽß,žMä·‹ç*žI.ÅS§¥b¿O-3b±ÇÒãÒßо–>;}‹ö£Ls&§ý!³4s•æViU•ÚÓU;«vj/VO«>^{IĽâSã0Št|…xMˆ†J¨‚,‡Ááp4L±Ööup<|N„0ÎF8.„<,‚ËÊ뀫‡Y¶–p¼:B[Ö+8¾î„_@ü*ïÿ•÷< /Áëðô”oßÎs]Ë~ô ÑH½Ø˜‚q0…Ï”þÞÆ)P _„ãà«pXp*œÁs]k]K8^wÀÝð+¸p°eãð< ^…M°¶Aöm¹•PÙèùEã\h†\ àRî?Þ‡FÊAãrX ×ÁMp÷ S9î„{à>xÖ‚Ë}up<|x/‡§x=m°‚ÛfDÏÃ+àÛð.ì€ÝB4Ѽ4%!]Þ‡‰0 &ÃQp  ÓÊŸ^þù›p Ì‚³ Î+½'Mó€rÕ´(Mm°â?ÙóÞ6q¾šÖïÃrÊ^ÓÝÀ{±œ÷´é~膇Ë5¼½ãñ¦ylŸj8¬å¼öº¦–üãÑö)¶ £ã%ùçÙ¶å_a»"ï³½6ÿæÀöúü»Ï7­Éïèx¥áð–yíÇ7Ý‘ßÝ~|ÃÑ--í_o˜Ú²°ýĦ»[Eÿ6¼¥Ão¨kYÒ>£éW­I¶÷·¦ûÃÛ;Þl8¾¥­}vSwëøöÙáqÇ» Ç·Näøë-+ÚÏiz¸uR´=õÿü~\ݽ3{çÎÿëÞ¿í{SìÓ퇳däl9Â%£«Ü‘í¹rtp¥¾Ý4éRêÓ´+Ð^ Ç×Ú‹äDØ.’ã —Ê)+LÓÁzÁ4ëêm¯’Ó!×ÊYËG\/›æ]ýír6æ\Èzܦp›“ ‹rd§\ Ù#W¸úÑUÁÍzŴ謘V\Ãí!¹ ò¹òE¹Ñ5ŒúƒÛõ½¦5×hû¬‡|Y¦‚»õý¦ ×xû™CÜ>„Û"ä Ù ùªì|MA¾._€|C¾èGW÷Û—å¡àÃúAc†kªý¦|Ù5U?lÚtÍ ‘õ£¦m×\û-ùŠk®~Tžf ž¶¯ÂžùZ(ª~Ü´ëZ¨Ÿ2í»–ÚïÈ×ñ]ù´ØŠm¿G'‡êgL]«í÷åeÌ7!?@m#oAVËw GÊw!ÇÈ÷ ÇË÷!'ÉBÉÆT¥ÕÏѤkݘáP»ÖëhëvýåÚ2žvDBÎAŒzB™õ«t¬kǘçˆÁùj£þЙúu:Áµg,v$¹öP;tÖXæHõÍÖߦ“]ÆJGæÓÚÕŽÈuŽ<ÈZÇ9ÈG1d“£ 2ï¨t kCùõ[t´”:Óuh”Õïà.Gë°~>£¨êè³J„ÑçÐb6äu®P)m( eE…ØÓÀq% ×PD+püm®òwÞ‡zà}v¸÷¹Æ=®Þ¹”( t/œÛ§ƒ|ˆ¸IÅÁÙ¢~wqSÇ¸ËŽÚ Ut¿RÕÍ ˜åGÇ)¹ä®r:‡Ffqƒ³¹aweS.7ꮆ÷Tj²¸qÈô0äZzTil*ঠ!F=Fz\ÑÞ™'õ»µM¥ÜœÛÐTÁ-ÀñzzJ¡šª¸%· µá§µÜª›o èü\ë˜oŸ´áÓmAnäv ë¹=Èw™ã!‹f|vx-|^Žžƒ+)Ò ŠØä4G@ö<Æ!s´"68é%%¢ÁC¯*Φ æ8̉ø¢9Eq6„èuÅÓ4dN‡|ós–â9ÒçÇ¥iœí–P®âîjºjÎ…y Ìܾ¦kf˜K4]7Ã\¢é†¹ÔÝsÙQ´u÷5-›+\g›nš«Ü(B¹/5Ý2׺jšî˜Ý#(¹Çšîšõ.¦éž™r1Ø‚&›î›¹›ú ¶‚é¦fQÉÒ³²Úì9ÑX¤-îYm¤9¤TicÌÜóG«ª7_T ´Iæ!÷"Z7÷Š6Õ|Yqj3ÌW'Šb¡Bã%GŒh0š„JŒ#Ÿ«ß8æè<éè;ñùÈ{=ÆiÇô®³ŽK®Uì»ÊóŽèÍc¡óÈ;…jŒ+ŽIè‘ÖÓJ„ö´y½¦Í1_uohóÌ×Ü›Úsæëîmm±ù†{W[f^vïk+Í7»j«Í·Üá˜;pLù®‡ÔjÍ÷<­Á|ߥ5™xbµ<< Z‰W{’µ]|¤'Mëãc<™Ú>Þ½¨íã“<0;âS=gë“ù ×YíÚ“¯­äs<…ÚK|ž§D;ŸSâ´c|±§\;É—yΣ,ÅS£æ+= ÚY¾Ú£ÓÎóužví"¯õ0ÚÞà:Ùyç]3Ú ^òÚM¾Ë#k·yŸGÑîò=ž€vŸïóôjòžþ£<ùkIü%ÏàQnÖL¢Ì§YÃ(š£ø1Ïps,?émNà§af˜iÒzÆ›“ùYÏx#ÉÏ{¦šÓøEÏLs&¿â™k>ï¹4Ígù ×™æ|~Ó³p” 6òÛ]ÛÍ%ü.är”÷6Ÿç÷]ä×rø‡®Øæ ¹Á¢ß®³DAn·ÄºJšKÌëÖ,Ép>‚% ²lÉT²šËWTsÀrÖ³ÔÜkÉ÷¬6÷[ =ë̓–’c»Hj¶”ÃûŒZλ˜æqKçvó”¥Á³Õë9ßé–k±/§å’µÌ—×2b­ôk³VûŠ[&éB_YË´µÎWÙ2K—x»‹[æ­Z%gM×ÃhÙW¹ÍÁ§ÅlhY´”ì–« ®Ûš•‡+ sŸ©eÃ*µáµ¨§Å2ß²ií:ÊX|殣ü¤eÛꃱ·Ñ»Ö¥¢eßÚs˜±ø|-­Gù‰Ïtœ™ v]ãõ’R«'­#5Ö±G¹d_>Ê:y”?øúô±ÖiE¯O°ÎBN¶Nž4ë¼Bé3é)߀þ äK¸=rœ @†óG<¦?k]„YÌ |“ú|ë Ì`†à›ÖZ×”}‰ur¹uSqêÏ[·}³(úûæ1/­†¾Æº ¿«Áº¯ˆzõ!Ù.’Jœž5Jã‘N7³¡†zÙwaÆMÇb·+q×±(5î;6ÜóÆ‡ŽÍŽ"Û¾mJãØ µSQŽýCÅ:†*ÁI†d*Ù© )Tš3* 2±Þ!êŒ3!ÔKu&»w©|gZ¨¿~Ê™ˆ¨Ÿqžq­R…γ¡AªÄ™ïJ£Ê…¡aê¼³$4JÕ8Ë!ªÁy^‰ tŽÔÐ8Õî¬ MQ Lof(Á© Ü?Êö)ÙÙš£'Z N!´Dõ:åÐ*ÕïTBëÔ 3ºM ;{C[Ô¨³?´C;C«ÇûÜ+Îa¸³Ã{+j í\¨çhhšsŽ{4Ô‚sÊ5L-9gàÎFÿÐ1Ò9:¤V Ý*jݹÔAÝv®†ÖÛCxä–s½;šÚqÞîŽ;ÞÍÅ9·íšõh'KíáÝë•ö"´¯tîœ|»1ƹîȺ©çd<£ÁyguØ©êNiêŒpv¨:£»Ó;":㺳:¢;»³;â:S޲—àfGbgºkµ#¥3K‰èHïÌîÎíÈêÌí.èÈî,è.êÈí,ê.í(è,í®@™OwUGQg…Ké(5Mv×bnì¨è¬rõvT™f»õ˜)ÌÚ¹w‹è[º˜=ížÎZ×VGm'Üew4vÂ5Úe{k;ôÔIqwePÝ:(¼’p ÷ì»/¢}q÷P×ÉuáöeÌW:ÄNѵÐáìtÂ=òx§§{¢½´3t²/~›»¯vx:/¸Ö;B!_è:ÚÉGw_ë¸Øyê ܽ{:†:¯¸v:.wN@¾ÒyöLt^=ÙɾÍÝ×Q^çŒøÆw\í¼cÜ¥*÷:®u^ï^F{Õî›×;o(ªŽË—;oÂ5¿Ùy+ÔŽ5ó.âî[õ½wàšÜ²¸ö:îtÞuvÜí¼GÞë¼ï’õ‚},Ú›èe1{°ØVÄߊ> &ûÖâÄ4߆¾WÌ„ýýâßfC¢xVÉÒŠù¾í–I±ÐKA.ñRúa±Ü·«Ï»òõãbo_?%fúêgÄ?©Ÿu~~Al÷Gé—DFáô«¢àÕ÷¢Ý"bè+Öõ…þýmQö'ë·DÅŸ¦ßþLýžØë?£?ûýgwÄA¾þPö¶ªÄQ¥±¿äÈ[žìÝÄqyk„8å?ß-ÎøÔ­q✿¦5Q\ð7´¦ˆK~]kº¸ê½Öš%®CÎoûÛ‘çô3˜…Ö\qË/CÞñ쵈{~¥µH<ð0È£ú­¥â¡¿·µÂ¦ò÷·VÙ"üƒ­µ¶hÿpk£-Î?Úª·%úÇ[)[Š{³•³¥»S[E[–ªÕiËöí¶zl¹p![ÂÁþ"ÿLë[©®õ¢­Â¿Ð:d«ò··^¶Õú—Z¯Øý«­6½½õªòßn½fãü[­×m¢§õ†Í ½è¨ÍãÊo]¶…à·Ü´]ðïµÞ²]ô´Þ± ù[ïÚ.TèÝ"ZïÙ®¢[ïÛ&<í­lWq`»H4¨m×)†HÛ@º!ƶÈ2ÄÛn² I¶[\CªíN Àa»(2œ¶Ý ”rlpG`ȳ=TÎIÀ¿e(–Ô*C™¨5TJ1FCµ¯Äê¤$w¼A+¥*郔ÐLÒéeड़g¤¼€hè2œŸt.à1ôHÅ¡O* \0 H•~á’T¸h‘êC†1I¸l˜” +†iɘ0ÌJ<œÕ¼$®¥.WšaEòA^“z× RŸ_1lJ·…ûë†]é’{Þ°/nJcå6Rš ÜÔ/IÓ ×¦‘f±-JšÜj‹•wÚ¤•Àݶdi-p¯-MÚ܇#7áÈLiÛ=ßvFÚu­·•öÝemùÒCW{[¡ ç™F§4Áº¶);Ô¶ÍØ… ¡mÎ.Mm v%È·-ÙA K@ÁÙBÛª½7ØÕ¶nïúŽ¢|Ûmû`°§õ‚µ,Ø×¶e‡Ù»¾ß>€~ 3xé(ÓÚǃ#-“ö©àHÛŽ}&8Ö¶gŸ N¶Ø‚Óm‡ö¥àl»Ê¾œo°¯ßÿ.»=íX ž'v‰ÿ ñKbÄâ×@Eü†$€šGÆ’ ä à2…|Ù§ÞW’ýá üiò[á1áÏ‘þ|øËä O ÿ9þjø«ärøkáòGátx/ùoáþ§a/†=| ,)ü­ð±°Ôðñðɰôðÿ~5ìcáÓáßûxøß…/‡½þOáka¯‡¯‡o…}>ügá¿ ;¯IÓL„5i~ñÔKa{‘ßœS½¹¹¢zùiÏÓUÚÓ}O÷©^‰úuÔ¯Ué€à ’ÐߨaÊŽQ Q Ò^ÏdʘJ¦š©{]`´Œ11<#1]¯Ï1ÓÌ,3Ï,Å1+̳Ál2ÛÌ.ã+☞ò}¦¯h¢h™`.1#Ì3YÄ]Ú¦‚º¿‹uÿ—€ ~CüPÓQEž/’Ãä0ä[ä[€ ¿M~~6Nþ #¿K~œ"¯“mä‡ä†üù#h)?&WA¹F®Hò_Èöòò' ŠÜ$ÿ7´šŸ“?‡V³Oþ Ä„aˆ ƒÿçÂN…©AÒG~/,>,$„½–^KK/"=Iayay 9,?,¼VöHïü-ù­ÈoÃùG1xåz ˆô½J¯Ó·é-z‡Þ£èCFÅD0ÑL“Ȥ0éL“Íä2LSÊT0UL-ÓÈèŠá‘q2&Ä\`.2CÌeæ 3Á\e®1×™Ì2s“¹ÅÜaî2÷˜ṵ̂ê'¤‡dcØx6鑤²ìi6ç1ÉcϱÅlì­|LúØÈÕl«e ¬é‘ð¬ÄvAFâc/±#ì;ÉN³³ì<»È®°kì»Én³»ì>û#Ño=e€ïðKGÿƒJèGКÄC ‰ý Õiàp dB ‡¢¹PžyP"@>”€Bð:\Í/@‰åƒà@5ˆµPbð¿ø,ÐA‰4`ÀsÀð<°Cù=Ð %ú©7Á àëP^% ü%¸ >Þ‚òƒ’þÊËà¿CIß…òaðwà:œß (éÐ'Þkà‚ ð¿ d‚…ò1ðS(Y`üÎýü?ð på“Іƒl"‚ˆ¹ÄÓÐ3~zÆh=cÈ'’ˆ—Àï//ƒÏBO™ ¡¯,¯C_Y Šˆ¯uàsDѾ@h -(…Þ³¼A(#Œ„|‘` ý«z„T@Ϫ€*è[½à?_!zˆðUâ"qÔB?{ü11MLƒ¯³Ä÷A#1OüÐÿHü#Ð? A ÖßVèÒA“¡ÉFM–& PšOh΀M¶&К\M.`4ùš|Àj^Ó¼8M©æ `ÖÔiêEó5Í×€¾Û-°u?¾=@Ç@ÄC$#õÇ8 ‘þŽ¡ãé$:•ΠOÓ9t}Ž.¦ËèJºš®£µP ´‰æi‰î¢}tÝGЗèzŒž¤§éYzž^¤Wè5zƒÞ¤·é]zŸ~ÈP4LË$0ÉL“ÉœaÎ2ùL!S”3ç™f‹i`tL;Ã0#3 `z™~fÊ03ÊŒ3SÌ3ÃÌ1 ̳ʬ3·¡ì1Ì!úMºS §Z`püjT-ÔXêç–~¿åƒXË£±–?ƒµüY¬å±XËŸÃZ‡µ<kyÖò°–'b-OÂZþ!¬åÉXËS°–¿Œµ<kù‡±–§a-kùGÀ"” ¬ëźž‰u= ëúDZ®ŸÆºþ ¬ëŸÄºþ)¨ë$ÈÁúý*Öïÿã}Ô{¤ÙyX³?ƒ5;jöW¡Þ#m.ÀÚüÖæsX›? µÙmÀNØ¡ x¡6ks1ÖæâOˆ?ö€tºêôw = m.ÃÚ\N,B=® –ˆ%ðš/k¾ *5ÕšjðeM‹¦æ-D´íƒï)®ý!\ÀÔ1q bä¸o bbbõ©ž1õ LÒo“*¦˜…KLÆ“ÀýÃÂs"GLG0 cLÞoc&MSÂ4sîm ?›f„Y¦¢LÌ2Í óLåoCWXÏ›„E¦ZX4- +«ÂSwÜÖŠÙtµÐ´.l˜n ›Œámà?›Ä\Ó–°Íð¿xŒ$˜v„]Œ=aßt qûÖƒ'ðÀzøN0û¢“y(z ªXR áŸñÂ{Íçߣ#˜H1ú]ˆãžxþc0ñbâã`£Ä‹'¾ý _|ì+O|+ø 6A¼ü¸y¤'¿×“÷r¼>l²xådÎlš8ñļ /±8¡O¶oñùKèØ†‘]]°Ê|²½é»å"ÄüH·‘¿f3Å«ìñ{V¼Ž}6Œ3l¾xŶP\FýèÙØñ&[.ÞB¶Ážï°5â ¶A¼ËêÄ{(°íâ}äÛÑ3³Œø€l€•mjV±E"ŸÌl1ÈÞØ^[<ÛoKbm©ì°-Ç'dßì¨í4;nËa§lyìŒí;g+fle8F¢„âZÃ%1…]µU²ë¶jö6üî-[»c«CkÏîÝÅ8öÀ¦em{NbícïèÑ=ŽcÊI,àT6Š\„ç¢möó'ï‡ïŽ‹³u!ÿÆ¥Øzгqé¶>¬'ñÅq¯QÜ~ÇÏÌeÁµ„Ï€¾ç$£Ÿ\¶m=Û;cìÉ»ãr… cOâê ¸aáQŒD1ó86rE¶K8^>#ãä ¸Ra,ıÆC®ÂšŒ€õŹô#`ÿõ’«²pµ¶1®Ñ6ÉémÓe›å8Û<ÒQN´-rNÛ ç±­q!ÛÖe軑Í"pl›ÜEÛ67dÛå.Ûö‘/â®Øb»8±ƒc¿ˆ|)7!‘ÈÏqW¡þÛwMÒ ¿…®?ñï²­wØÕ#ÿrl[Üu) ùMî†Ë-K ÈÆ]Æ£g¹)%s·¤4ÉÝ•Î`Ü“Îr÷¥|îThR‰Y-•ÓÒùß郎çeŽ<òãè»O|÷£1ÇsÆÏúüèy>Á¿÷]ïáOÍ1GÀíø£wq‚wùÉÇ}%ô'>òqˆÆâûÀ1xžpíÌI¢éˆå²”óç(ø^Ç÷@Ÿ eŽ¡Ò¡ÃãNr»“<¬ömŒq’ÃçBµ£åcBƒAÏ*h£ëáxdã‚Á! &‡"ðŽ€ 9z….G?ƒòÆç‰Oà¹àqî÷ÐÜNrº÷ÈëŸcðïÊëNr´÷ÈÍ„ž#üÎÜìÄç<žsç]OäXh®èZ4}†žÙäcúiN•jNò¨'ì*Cj0Ÿ¶]ÂÈ‘tæ<©Ý|Nb]W, æ2IFºýÄýàŒJI1WKsÔkÖJýfƒ4ˆsñwÚô ¨ù 3/š%iÜÜ%M½+0û¤ŒiÅ?l‹È†aŽmî“ÌÒ²?ó%iÕ<"­›Ç¤Ûh?…æˆî‹ìÊ<)m™§¥d/ÈvÌóÒŠ=æEéùQóŠ]…í=óš=¼a6oڱ͚·í‰è¾æ]{ ƾ=ÝüОœöl^cÏå£ì|¬½ˆO°—¢ÜO³Wñ™öZþŒ½‘?k×cŸ}4²#äùB;‡æÁ—ØE¾ÜîäÏÛ=xÍÑzÁ5äkì!¾Á~Ùßnâûe<^°_áeû¯Ø¯¢د¡œ ïµ_?ÑM¾ß~ƒ´/c;Bû øóÄñÃö›ü¨ý?n¿ÃOÙïò3ö{è34݃Ÿ³ßÇ{·ãwË/ØðK2àWe5¿.G"ÝâoË1(†ó[r<¿#'!_ŒÖÙ¿'§"]àä ¼‡òi‹JÎA÷²DÈy(·DËç,qr±%Q.³¤È•–t¹ú‘Ï…ï×’%ס9Y²e-ò“–\Ù`)M'ºz¢£–"™·”ÊÖg¨– ¹ËR%ûPކ~3=J‰êÁ¿™ú¥ÿ@e%ü3I< ~ƒë+®¯hp}åy\_IÄõ• \_)Æõ•/ãúÊWpM…Ã53®©XpMEÄ5×Tªoªþ‚èR©Æ /®¬pe¥WVÞÄ•• ¸²òu\Yù3\YÀ••!\Yù®¬ ãÊÊ_áÊÊ®¬¬¢Ê qUVˆ_¢Ê ñkTY!~ƒ++*\YQãÊJ®¬$âÊJ2®¬| WV^Å••ÏàÊJ :¥$+Ôcê€ë+¸¾bÂõ+®¯ˆ¸¾bÃõ®¯(¸¾âÁõ•7q}囸¾ò¸¾2Ž++³¸²²ƒ++‘¸²ò4®¬<‹++ÏãÊJ"®¬$áÊJ®¬dãÊÊY\YyWV*qeå'¸‚ °öÞ®kÁ2^0^4/¯'ŒW׌×7ŒËÆ›Æ[Æ;ÆZ,w÷Œ÷(`l<JMER1T<•D¥RÔi*‡Ê£ÎQÅTUIUSu”–2P&Š7ŠPœ”DuQ>ª‡ê3zŽ„ .Q#Ô5IMS³Ô<µH­PkÔµImS»Ô>õ°ƒ4êO¤CÓÕۑБl¤Ž¤#­#³ãLÇÙŽ|#Í DŸ¡o„߀ÎùŸ…ºýùÿ”sÐ7 m|Ê3ø4Ÿƒ>‹ÏAŸÃç q@ôày`€’€OC_À§¡/âÓÐáÓÐd|ú> }Ÿ†¦âÓÐãÓÐWðih:> ý> ÍÀ§¡ŧ¡™ÐæAX‚ò |zŸ†~Ÿ†~ Ÿ†æ€Ÿ‚ŸWÁÿ’‹ÏD?ÏD?ƒÏDŸ‰à3Ñ×ð™èg‰$" â3Ñ×ñ™h>ý>-Æg¢ŸÇg¢%øLô øL´”°vPF8ø>ýÿì xTÕµ÷ÏÌœ3‰‡HCD@Š)âð!"R®"M‘FäRÌwÉ‹fÎLâ|¤ˆˆH)*R¥ˆ"¥¹ˆˆÑ—¯‹ˆ1"EDD.¥ˆ¨H‘RIÞµ~ç0Ð[Þç}ÞçyŸç^¶ë?‹uö^{ïµ×^ûcŽC>w¢܉qªß¤¾b”x^õ¼j æN´Œ;ÑrîD‡šSÍÇŒa2ÓgÃÍÕæ«Æ™×›Œ‘æ!ó/Æ(™¿' ý¡’Æø³¾®6º…«Ã ‹ÃËë$Õ„×…7‡·…kûÃûÂ5EºGzFzGúEHÊ”ŠçŽÀ+âxŸð‘ð±ðÉp]Ä$eD2%eGZ æD‚‘.šÔo¼Äo®sý¦õ«ÇxeŒ®ïQ_1ÅþÝÄ{ÔWüøJšxÊíâCzg~‰xÇ`ñ!õKñ&Ü“_&ýºO00Ž‹Ì‰NŒN‰4‹NÎTKGgGçEF—DWDW‡s¢k£¢[¢Û#ƒ£;£{¢û£‡¢GÃ#¢ÇÅÛgFOÅŒ˜?Ö$Ö,Ö"Ö&Ö.Ö1Ö5Ö#Ö+Ö'–+Œ Ž ‹Œ{RæÏÌðöX,–ŒˆM’Ô+65Vî{"ötxŠö‰¹XJΙÌ™±9á±ù±E±ecOÆVŠü¨|®‰½ÛÛ*%2b;b»Â9±½±±Ã±/c'bߎ­‘8©Â[‘®óµ"P‘%©eE[™­[Ѿ¢3óRjªè^]qSE®¤¾á ý+UQªÞâÎ?Ç+FU„+*+ª*&„WÇzTL®˜V1Ã^1«¢ºbAÅâŠå«*jì}ë*67¼× þ¯Èmx¿Ar×9ï8TÔªª;cE¾jç퉊ö•Gc'ì“•ÇíºÊSâfttd¥¾M!uîùöÌ›íîïiÃ; oN¸ïIDFÞ?FâÄœ†·$¢+VÝ?õþ'ô]ŠÈ‰ï¾+‹Ý¿U"Ù@‰!Í"þûwHtyÿ.Ió5G¤‡¾Ey‚h‡“s1F"Þý‡#}œ7,§â^‘É‹§ßß+ˆgI‰&ýã-#mâmãíããÝâ7Ås#]ã}‰~’âýãƒ4ÒÅ‹ã!IÃã£âaMåâ•ñ*"šÔŸ0ö`|²F³øäȦøäø´øŒø¬xu|Adoå<7riì:___¯‰¯‹|)-Ú,£Ôº²u|[¼6¾ÛnßWq0~0‹‰‹ŸŒ×%Ì„™”ÈHd&²íÜDëÊ鉜±ÁD—D÷DÏDïD¿Ä€D¾<)M IŒHŒN؉xbœ¤‰öâÄ»&1=131;1/±0±$±"±:±6±!±ErnOìLìIìOJMÏŸ‘8•4’þd“d³d‹d›d»dÇd×dÄÄd/{U²Ïý‡“yÉÉÂH^rprXrdrL2–ÔÿÆ''%§&ŸH>œ#eæ'%—%W&×$ß´‡'7%·JŽ÷KîJîMHN~™<‘üÖîŸò¦ÒSTVªeªmª}ªsª[ê¦Tn¬kª¯=9Õ?5È®L§B©á©A©Q©pª2U•ššœš–š‘šUq2UZZ\9=µ<µªbBª&µ.µ9µ-U›ÚÚ—:˜:b/NKLÕU™UU™UÙU­ã»«rª‚U]ªºWõ¬ê]Õ¯j@U~U)»©ëþç„ùßè„9ʰy«![аs P–ÝSRo»w¤¤¿ÝOÒIù’JíécG}O»{Ú¬Y…lˆ=ÓaP™=Úžm럸¤q’&JšbëéÎø©Ô‘ɉÆàDãå,ãcÏkr–±8ÅøÙó¦qŠIçs '—K9¹4aÏ`ÏÛ”=o&g–Ë9­|ÏðdŽÈ Ó'Þ;Œì”>õÏ=òÙ˼ü® »ëÅPþÓò™ù_P¶Cù‹º«õERŽPðÔÅ¡ü7å³ûEÒ¡ž.õv©ßw)—|® ”>åÏÒ‹£ü/åsˆK#„F7"ûoDãþh¢Ð” Ðt¡™ ÙhÞÅQñnù\(´äÐ ‡Š8t×ꋤµî5¦-•l—Ï‹¤’òÙ@{\Úÿ]*Y‰ò‡.\o¡Úíè?§)_¢üq—NÉØÈjÒˆš]<©oä·8Ÿ˜/ýΧü6¨ÝÅQA[ùì(Ôõ<+h/ÔÙÍ×ã"©—PŸ PGWçMò™wqT+ŸÏ¡Âs¨!O÷sP±ðƒÏÖu.„\~ØÅQÁðF:F6¢1çSÁ(¡°ð1ù¬t?«.ÜžHI¡ñ Iúß@S¿Kì³ñûÜxÛ+ÝV0ùl|)˜öÝøqÆOÎ׆qi°ÏŒsl;ë»m:SÎ sØ[ÅZÞõùÒfßõé‚j¡B‹Ý˜#ëLÁ6›õ¥`•+—>Ô­sæFd»“§ VH㘬ûl'¾k :&tÒ&&Ô9ó­Ð{J=…Ùgm¦ó»Pâ{¡è/”µ©PÖ¥B±aaO×¾ öê:Y(mìtê.,uHõ4èÐõ­PÖ‡BÛmWãqj4FgÖwœ uÝÐ6(¯kÂìsÊ—:cW8ʼno…3ݾ5ä¹Àšý:g]¦]Χ…öÙõõk,kk5^cÖË ¬“Eóú§ëäDû»kátûìxÎz§ýW¿,”µ¥Pü¢PúS(kB¡¬ …‡-,”˜^(1½Èp}ÙïÌY¥"á‹$v‰oµpbQQC|m˜n\ÔXZÔÎs…gçHQW'niù31°ñÜj4¯ÎÄwnõp?%®õqçyCùaN}ER¾HëQ~°KZ¿è)’¸T¤ýIºåþYüiÇ/”§¡ÍˆÇghð9ôêú'ñ´a,ÎPã8yn¬œtNŒ<7&vtËŽwŸµsb´úH©ŒK©Œ©îmÔ?tOS*ÏK;:cW*TÜM>Å¥½?+›”JÿtßQ*6gO!¾T*ºK¥¯¥b÷RéO©´¿Të*•v–Jý¥Ú>©¯TÚUú„ÄŒÒ9BâûÅËåSâ[é2¡•nütã¥ÆHÝ›Ù-Üúöœ£èruè³RÙ7—nró5ŽÃbð™=LCÞj³+Ýáöu×9å:s¼t¯ØÉÖ~È>¸ô„›gá9´âÔx/¸å´Ý>»§»À¾®ôÛ³tÞ¾ÎÝ£ýßìÍbÎwö\î¾ëÜ=–¶•²-ܸ7ïü¹U$cÛ°:w^Í9ïŠd¼‹d¼‹VžSnЛ®oŸ«o¥K2¶E2NE2FE2>E{¿=o¾ s÷éâ¯E‡…d¬"{ìó÷1#¾u¨Øë¬Ì=õq‰›ÅéBgg ÉZ¬{Ç]NU¯Î«bÙ+wvæ sGü;²ß¡â\'oq_ÇNÚçˆÄábÙ³»åCŽÞÈQ‡Še/U,ó´XöQŲ‡*–}M±ìYЧ9{‡bÙsDd¼‹eŸP¼Øé³ÆhG‹W9í(–=B±ìŠ7»6ßëØ°Xö ŵμ*–}BñA7¿öOö‘Sΰ¸ÎÙS)•˜g}³DÖÔ’Lw^rç“JĆ%²––ˆï”Èš_ÒÅy¦ùUGIwgÝjÛÙO”ÈzZ"¾T2Àñ­’|g /‘u½dˆ‹‹‡;s¨d„ã %£[”ȺYwusbw‰¬“%²F–H=%ªgö91WÆ×6Ü6-tâ¤ößöŸõÕ3>*þj7qüYÇÊn挱ú‡¾qÙºË6þÏÛÿîÊÌŽ¦þN|ïãEÃHk/ÔY¨›ÐMB¹B}…ú * %ªªš 4YhšÐ ¡YBÕn¾B‹…– ­r©FhÐf¡mBµB»ÝÏ}BÝÏ#BÇ„N ÕFº)”áÈÓ3…²…Z å…ºuê)ÔÛi[z?¡BùB¥BC„F²…âBã„& Mš.4Sh¶Ð<¡…BK„V­Z+´Ah‹Ðv¡B{„ö :*t\è”!ÓGÈ/$óé’fB-„Úµêè~vê!ÔK¨PžÐ@¡B¡ÁnþaîßG Š %…Æ Mrú}ÉT¡'„žš#4_hÑñ¹Lh¥Ð¡7…6 mÚ!´Kh¯K\:܈¾t©áï'\úÖ¡ ¯KéŽï`{¡Œ@#ÊjyÎg[!ñÅ ñÅ ñÅ ñÅ ñÅ ñÅ ñÅ ñÅ Ñ—!¾˜!¾˜1Êx±¬[ÙMe¹e}Ëú— *. • /U.«,«*›P6¹lZÙŒ²YeÕe Ê—-/[UVS¶NÒæ²meµe»¡}eËŽ”+;YV§2ˆ2ÊŽ…2%e‡Z‡rBÁP—P÷PÏPïP¿Ð€²Y¡üPih4"4:d‡â¡q¡‰¡)¡é¡™¡Ù¡y¡…¡%¡¡Õ¡µ¡ ¡-¡í¡¡=¡ý¡C¡£¡ã¡SåF¹¿¼Iy³òåmÊÛ•w,ïZÞ£¼Wy}.ò¼òå…åƒË‡•,S+O–/ŸT>µü‰ò§/HsÊç—/*_V¾ÒMk$Ë¿é¦M’¶–ï(ß%ü^7(? })鄤o‡x‡¤ ÉÒrHÛ!í‡t–5áÊ þƒáþC:¿ÄÁ/14á—üC&¿ÄÐŒ_bÈâ—²ù%†+ø †+m7­7ú×þ-0Êøq`L jܨ ¤Œ;ãw&1 O^3Н֛ŸùU†…ÿ·Ìãiæ±y_eÑÉ0‚âÅAñâ xqP¼8(^,vI<9(ž”h”¨”¨”È”¨”¨”¨”¨”¨”¨”ˆ”ˆ”ˆ”h”h”h”h”h¬uõJD J J4 JÄ J$ J$ J$í ‘´ƒDÒ™Ž¬ƒDÒI;ätxð—ƒO þvð·eÞ²tI²¬²–emËÚ—u>3Ûœùvq³m³þ{ü‡Áooxùí _ [ ›anô3¬À5ÒøŽ&¡á2÷î3® ÄFÛ@Uà#'01ð°Ñ>P¨1‚7oGGŒŽÿµ{ ýã©+3ïl=(x)|ü æm‚¹â;žºîð­_ ÞhR‰U)x³9þ÷úÔœ)ØMZªeÁWÀß ?ˆ²× vquŽlæy£¢U¦­²žúÖf7‘̱0<§'šÔOO…það1$O™7 ÎTͧŸ…Ÿÿü4ø§¨÷Fk"mVü³|T°“ù#ÁÎäüÊì"¸Ïi§õ Z[ª}q4èSÑs·æ§­Ÿ öBÞ þóVò«ænXµ›e#ÿò~о½È›J]ÑÚOc üÄì-¸ßº_žÞ§½«»Ïº‘Ñ)Q´~*Ø w°‚Yȳw7 hssÁ[ÌŠÖHÁ®ð]á{š=‘¦m=hÏHZ¢ØIøøø)ÕR·8?G>Ôü€§’Óøœü?+½_‘³'|žæ÷¼‡äø÷Ñ6~ò\Ê~¡èkÿ¸|üû͈ä¼ÝZO;ÃÂÖŸR¹§ÌÚ¢ý5ÇŠË_K|‰w2’jÿf±ò^}*3´ûk/ªÐA[¾l@~+¦š¹ù‰ý¬C‚*ÊÌɤ|^ÑÄ/ë©·¥ŠÑ0¶ƒ`ÿ<Á7ÐYEþ*âÛßÕ ìÔ§¾ö ‘g!˜NkÓá[Ò¶íàŽ´E:Ó–ôižz/ïuщ?ÊûÐÓÞ¼W°½oV=¶àc*9É\[¸ÕßJÛ‰¯>ÉÓ¹`šÎ8Ï]Äœ%xﳺ¦xæ(Z«˜eTƒ•Íè{‘Ô‹ÞÔ5NSÞ„—Ù¡»»>XìNk:óô ì/»t;Ï6z±NÛékÅHíg/gÒ*>Ô³ƒg3}y×¼OWdZõcðMðwè™Gþ¶ð­Ì1"=7k]Þ¾ÏSæíÚ*9xj¨e—‹ªù1tÐùÓü̳®ÒU+=Gþ'ÁÙ~9zÞ1Õ¶»eUþüèɃï€WlÂ'—a½ÎxN° Öøü|ÅÖèO-™¾÷ OÝ@ëREÿ-†çôÇzxúcKö9¾‡Ù{¯Ñ]¢ù#]ÓMv’¾ ;s¾î“ÍYì?p6»kƒ²yì®KÈù’žyÍWu…ò±{7_ƒßж<½Å2¹]1¡áQÅ´KTîûmìí}óÉ3^wÚÖ÷²ZÞ÷|o¯6¿§£if2F)òW3ú[­‰äi_ù4§o  >̨}_ŠüJ4œÄ÷ZÂÏH½7°ûµžq|wj\õíb=HÔ}™aFlßÓœƒ$ÏPôÝ$ÎŽôcô¼¾²óñmCÏpx+5k®o̓Â{¿f-ŽèÛlÊþ —_.§€Gõ©ÞX1ÿJÎLðGþŸ >ˆ†À5..§€ªa9c”Z¦A•Ü¡+„·8·:ÿÞ >ÄÝE9wC9tײžßèÁ¼ïZJyà½]ñåâ-ȵG¢–æ.®ƒS@Ñi]¡÷*þWð¥W¬lÁoÐ9,ÿˆNΘ¦c½\\.§ðTûQ»™+”O»Ôÿ°Tô<¶½.ª­þ~¾ÚÄwûð±.>ÚàP¿Ò=³Ÿ}¯o89‰Þ–×úáwàcôžßÇ-Ì/mp(¸¼^=§ë¬Còˆž\|¿Õ¹ì sº¼ÊÿRÎà?àîâ Î8âcEøðƒºëö^ægàïÖ³†œ÷¥…žû¢{ÙŸì ÏÕi~Ÿ½Ç©¼©‹Ï68ÔÙ×J[h6Õûÿ‹ÎŒÐùâ݃6ÎnÒ ÝÃŒvwªêE÷0;fðt›‹Ï68ÜH±°Ù\k±æYU æ¹‡Ró\TÉåØäkì¶[k‘ùÒF=ßAnW>HÓöÿI%ÖCì±_€ß@ØËYx/ùÇZxš‹z»òºÿGØD=-aN …Ê¿?öÏS‰gºÚß¼ÿì^aeÉÓC:ŽÖåþ»D2ùßðó·Á*$O£^$“ÇšLþ ææ&æÚ̬+‰ácœY¦1Üj®¥¬YŒÑt>BdL¬žŒþöè¼ ÞÔ›÷ >n3|Ó@îÃ}ÜÞ¤?­3"í8§ì¥®¿¨_¥ñ=ˆ1çSnV­˜qkYw^c>r»kî&þ¼­|úÓª3í¸ù‘Go~¢óô÷ÏÌÖ¦zë"ãUËÞUoc†)/Ñã(XKL8 Ö2Ó‚µDø—„ç6ÕL¨NY_Õõ…=L¬{•Ù½—ÖnÑ›óE_?Zr·75øÃÿd][É?þ5JÍBsOû8Ö{„;¨B-þž¾D©¯Ýx¥üV0|ÚB1m°®­äT}/í·”âNp*Žê 5ýz#Þ(b¶¶Z ÿ’ÚZëžóGæàÝÌëoN¾i73â¯0¾×(ïO·.SK²JÎÑû™ :O2ïº(¦ÝŒ†§užJl\n$ú­uíîÿž‹*ù3·¬{ȹ ù¿ g‡Ö"닞/㮦ùXÖå·ÀyÜ M'‚m§_S´_Öí»Åºì[¤w5Þ]<åÌëùƒs6¤ï¿ö« w)zWêmŒÄÞ¡ŒÑ:ðú«1ó6½Ÿ±êˆBg^R”qÙJÜ»ž^(nâ©×ß¼E÷z7뛫QB"˜>ÞKìBâ­Å’+ôNFòÌF>›þjäœèŸ+üBz´ü©ÙJŸ*šÜɘÏÓ#nŸ|µŒøuðÜSù&#Íå‚庌q1}]oK|¿F2_ÏÚ²{Ñ·óÐ#X¬?ü,¼ëp*–?nM“6Ÿ¢ì+Ôëçɺ[ïj¬<³5ñPW‡Ÿ£íçÜW8šçkíÞn´ß^nŠ~Hßïå¤ü"ü5à=V§]GÞ"Þâ·¾ë¨w;®\ø{ôÆÆ÷3j©ã6€;_x’Zæ{šwÃߨ»Dóqi‘y…à1ÚcÞ9·"³ñÀkhçv_"e/UôãÃþáÜj~£h5— þ'³õnå­ÿ´’")Ãbï’g,ñ„;gÇÁý`®®ÝVtÇí/Õ[ßFø¿éí¯|Joo<°À³ôý€¶Ðú>O¹m3[™W Ÿ¯½3ø¾ìë3_ñÓuöÉ/ê½ïkóû ú[ %.ÞMíªí!½«±jÍ;ôÆFö½b«ûü•ümÁLëcCÏz—þ!’QøÛzø)ء͋°K‘5B}»'¶½ ðí§´ŠˆvbŽÿ ÜŠoä¢a‘ÞÞHT×¾ †?'Î_J˹Q4ù&ż—z3#.aç_ÉÎÿCô/Eó20‡±¾“üŽg\¦ªŸÈ\SoáÜáy ?ÄM`{J½ÈˆüßÇI™Ó±ïJ‡çä8гá(=‡ÊÓžöÇ4N¾I·Á—­GtLá7ó4 þ6ÑsznCOoòïçüÞF%f$›L6Å'=Î ISp,÷$½¸'éŹøœÍÕ“¬ïqÍïý)9·P£¡ûï[œéÞà× ÍÍTÙ~”ƒHè©IOMz*(þc> w;V =h¶7ôÎMõ_K]Gà¯s,¦w¾ÑÙÊA4·Bs+úþ1}ÿXmhþDõû[Z;À‡uÑóˆƒXl ü±Ì•þXOñ'ÜÞlöWÓ—ºÃ1ߥ^á­[ÌÑð5Ú4ÿç´íMpœyàs"; ÿߨÜüOm°øWs’¡ë ¶íjò°²øþÂèìÄæEß­ÅŠâÉŠ£´¬ùÖâûmßçŽå§æŽH*Ðùü|ô<æ`í<÷´.þŸö¬Ú!ý¬ú:'ôßÐõâÄí|cr÷9MÁvœîÛ`½?Pª3ö¢|Ú³ª9ýÝú¹›òý™žöfLsýÎŒÔøVðÍ9é{Ñf’ÿ÷zäë@;oÖ12}ŒÔ#´¡•ÕQðŠÞ÷©åïºðeb“{Èùزm(• ïeôý*±T‘“Â#ŠÎ½¥¥wcàÊÞà¯õ÷gjdFò7õñ1åç‚+ÐNß÷è‘W-/yNÒþ“Ìw}sæõÐ7p@_ý[ð²8}¬¾\ߪ—žÞQÿŒð·ÖoÔwÌê_¼ þ®úô]©úA Ôuú%žëGÎß¡á<}TߪŸDðô×õ1}·ª^ßJººNÚsúÝú¨¾OE]]µ ’¡Èÿ¤òÓOÕ/§ìr4¿£ïÕoE"k\ÝŒú«ÀÇÀhI·úí‚O!¹¤~œØðÖzý¡øK0 ökÁ*Eãø’EO¢¯Ét°LçÖë÷}iäÜ:eo¢ìdx/O???ó4lä3ðs$CÁn´ ‰áÔr\ÉÓ¯Àž`ò÷àïжyÞG2\€<—V5Gò¸|ÜOžÛáÿoÀcO3p_úí!¿qD%¾ŽäϳTb8íœÞ®çéVø šÇó’[ënը댑òÞÞàlp®3:ð9Šž:øθÀÿ |®NO%5ÈÓÈùð žn¢–ÇžÂg;cAž“ð§þ’ÿJ§<ÝFk?PÞ`¯Ýžjλ¾>]tŽçé!J%yz:ï9ØðÖ:½] ’ñ>íôþ)øÉŽçg xy6 §åø6ÿ ù$ä­Ákyêø9mó:^ôWø$x’–uú-ÛN$êt-þ)r<Ó7Ƶ¶æÁ¼?›ÖéíÐᛀ?$ÏoỢa/xDÑOíþMæÿñã™Ö2zQOÙƒà‡Î\sƱþYÝC¢á!G'uEÀ ’ÝXàgõ-U”RŠø¼÷æÓǴ䂤|1؆q ×µUPô¶«xZuú¤¾)ä:×…÷  Eä™ÎÓn<Ý®ϳ~‡xú9ƒÏÃãä©kµ/Çg¶:±ˆÞýyOðnäÝáŸ%笷 ùí…YC_Ž:Ñ©.[ð9ò¿X§oµª“¨×™ÑO!ÉEÏ"EsÜÇ\ö6džÏÔ}*øx53â]§w§w«MœˆQ×’y¡½3±ä)ø+˜;û‘¦Ôô½#üPp8œN¥l J­Çnë?OËÏLñÌGò’¶MÚ =ú’¿€ëÀ¦h°hùiúÕÖ‰KX8‹RM‘dÖë;-7Ãw‰6b¬AÄHÕ‡ö÷a>ªU»`gf­§¢3¥h€Ïqx´íÇԩΗ±ÏúÒþUò?Q7_[¿Šü¬AžÙu“°€Ž…ÍÓï#w4—P{:mc¾xyj|AÎmà£È;;~Å|$˜kTbâ ¾åøÀ%ŒÔ§Z—ù8|?ä}Ðp'ØÜÑ µ}ÔèÍ =›Áw]ëýPÐ7Áß‘sØ ÉëÎl{€)ä{@"¼ÇYg~ æÕ}¡~ÎÓ'+ï€D~oxb‹ç×´³/ò6`|£’§‹@, «ž¾AwjÇ>‰:ýð”º_ª€¿lÖà·kU»í½™<¶çºÞ®O;€h‚åh8JžUð/£y’jòü/joY?UЙSÎZÀÌòÒGãsä'è…³B­7R¶'9oû×é]¢Qß'ë²gOǪë—çC$=ÀÛÈ¿þt&,ƒg‡àa^Èj®ž9ÜmÉDý~™±ð“Óßêõ]ˆßÿMþøÃàË࿃Kˆ~¬~v¾ñdVO« oƒ¥´mí_Q?G¿/Fþcg>Ö=F½Ê;;·NHö9uÁÃÊRL<| ù«ð¬&žO5z;wÖhðr$Œ ·=c÷:øŽ»^´etTò9ÿÃõÅ­äùв=ɳÇ •ç²±^ø.Eþ‚bݼ'ßì`NÓÊ€WñÛ4îüp~5ü•þ—·—{è}»/Ê{‰]x¯r7·|+ÔUÿ¿ÏzEï“ÜY-ç)7„ž]¦¾ÕYËwâ[9Ýóí­œæ.Õ~ñýìÊ{_€ËÜ%uýoöÎ;ÌŠb[ô««ºööÔ$Š Q’Ä!ÃH‰‚€˜‘Œ ™!ˆDDT ’D*bBEÅp=ÈEELˆˆŠ@T”=¯ê×}¾'sï}ßû®ç¾÷ÏïûõêU«WW¯Êö(žÅñGI/µYü{ûÙN_!ÎÝ€WÅ?!u²:dÄñÏÐp×ñ-o)ï{8ªƒÉðï´xÙ,AsÂ3¬º®ïý„Uëâs…óA_þ*þé³·ßá™è€ÜæÂ,βÛ߇Q¯éëüÊZéWš^VSý7°j¸§¢]o©»‡n4”ÍžAOõ®¿3&oy9Üá©GÃ;õ.u>ïBÞÏfþ¾™zŸƒ°lïi®ÄÛçðMx\«ýÝÎJžj3rY‡Jý„&ƒ§3´[£ií5²M¯w|×S=‚¼ÙÛ›zѱ0—ÔZz­1õbß·xKõúýžáÈË`3OScKyš×8ûgðù8‡ÞÙúßG¡ÿ¾­§:ÎÃæ,4irõ¥gð¤~ÀéKx}ø*À´%ßÃR‚|Çô ò·žÊ ÿêW¬*!þ»ªç¶Ê÷–U•›Uª¿©»oW³œŸcÊ­dƒ]ʯÁoV”¬Zí{-oÜ;)·uw'ëþ(u§âM~5ÏñíÖ¿jr%Ÿç`‡÷ÂòvÎÛŒcoEÆOð¹ªîÛyøBæûUÖ÷ZÊ÷9íUqß'(ÿŽÇZª…Ò¾÷P•|ï}[ØÍa/«ýQÎÒËT9—ú“ÚáänÈ_+?XáíƒÕX¶ÇÃ!Oü|$ð^G¶UœeÀ?Yƒý~L ü›*'‚´ûT}?²«é¼;TÊÏú‚½~è4Ue¼F=ëçNk;ª,,kx:o޲y.Ì ö¸ÔRžÁäíÁTßóãó•`ã‚àc?n’“¹ÁA_gð³ÏçG½á¿¶ {&J!ŽœCm)†Üýchœ·pFÂy;Á=õ7ðQOcÐõ  šŽ& ›Ë<[°<¶"µ8rävXÞ÷ /ƒ~ŒgFY“ú2|n…_Ã7±éŽ<vCS“·ÉÛÙ¤>ˆüçÚ‡Í<ôk‘— áùè¯çZJ¡¹¾Š¾ò0E€3êÍœ›à4³ð]u,‰Œ>ù~ä[ÈÕ=È—ÂêØÏÈéŸPDeáåðcøCT"^6ÍQäü¨D¼¬¦{êËਨ,°ü%*<•6÷Á=ø)㙑Dó2|ûs°Ç[xq|6"?Ë¢k÷šà{dꌢÔÂñÄá=är¤î%õqH½Ò¿“7êYŽeT¦D)Ø…¼6‡‘ÛÞȇñð"Çf“+ÊKQ‡~»aˆ}Tc+pÔ“ð7Ž¥f†ýÑCM9fÎô>3©á{Ó€ºÊU'Ž@K~ª’Z’‰ÎȇðIÛÔ‹±é@+£Yó`3r{©…hþÕjÎ{òJ<rí ŸF!Ó~Q{Y£VpFùÉŒZ>O§öÞÏ•îE3Ïo`¹ù*X‚£*¢§VëÉhªÁ¾2R´¦à5ŽêGÞ†@z›ÖªfãȯÀ·ÐG1l bCo¦#¹ŒÚ>17QŸÉµ‡-ñó~¨™ê[¢}"Š y0±§¬ }Q‚zÒ.Â0ê‘êÁšX–ç¼Ôê0F¥ÖÞÄ_ÇM± œ¯Ô^ý ¼F½qTCZ@ìucHÕóØDeJ G ‡Ã¨d)#)µÄ6ŽêÌDø¤ïÒá"âöö#H¥©+Hå(ͨN…Ïaÿ ò¹¤ùð6dú"µå è©E&ê1¶RǦPß>¤í̃×Ór£œ¿·s,=¼Þ‰L¯®Û#Ó½z@?– &†~RŸ„DLÓšt ŒAš¾QG­>Êùˆ‡ŒUž™´GÃ(– çɈú«[Ñ\‰å9Š ­@„Œa‚|+= Ò—šÏ‘é£Dü 1œ‘öÏŽ;Á=õ7ðQOcÐõ  šŽ& ›Ë<[°<¶"µ8rävXÞ÷ /ƒ~ŒgFY“ú2|n…_Ã7±éŽ<vCS“·ÉÛÙ¤>ˆüçÚ‡Í<ôk‘— áùè¯çZJ¡¹¾Š¾ò0E€3êÍœ›à4³ð]u,‰Œ>ù~ä[ÈÕ=È—Âêe9êRóÑBó ©Ä!qšH1l„å2òð=¤ìÑ ÇsÔ{ÈåHÝKêãòÕ¿sFÊÑ,Ç2Š-¹ v!o„Í!‘1½‘ãáE4Ùø¤)<$vÃ˨ÎTÀþIøGQ7ÂþhÈ›&’™3!uÌ`oP[¸ÒÄ4UaIH9f·0ŠíOȟž«»’z ùäê‚chV“J„õ8ä¨.q‰Îȇ8Šz®cÓ³WF³æÁfäçR Ñü ^Wr,ú«Px3 ™VˆjÝÕ¥0ÊI&œ Gâç x,eER©?z2šj°/$žŠº¼ÆQýÈÃHÛ ©Ûj6ˆ^ð | }¥¦°!6´}É=`ÔRˆª‰z®1l‰ŸïðCýQßrÕØ'¢Ó{ÊËÐrÔÚ€Qû­kbYžóRÃ\•Kxg|K4aÄ&p¼RÓô3ðvõ]Qh±×!9TÏc•ý[‚þ'£¤Œt¤ÔÛ86ªáW0ê ÂEÄí#ìGJÍWWÊQš><œ ŸÃþäsI%òámÈô*jwÐÓ uÞDy{n'•OïD¦—Óí‘©ÕŠ^. ?IpÕ†>JŸ„ÄDÓ"tõ“ôÉš>JGm3ÊÛˆ‡ŒUž™´)C¯ž Ȉz[Ñ\‰å9ºvê¹éWÃù$z¤O3Ÿ{Šè„ø·¼Þr–åySî°¾ÓiÎå̇^¯ó¹ë5Vïp\Èý¨Ö&é¸ÀßöMà[e¸ÖQ{:ˆ~n˜ÿ‰¿÷»×óÑ·GÆÒlö +£ßÍ÷ £œ÷yñ÷!õ="/Åò/§Óv*Rÿ 7Á~ð<ŸA¹œ‡×áÛäa WÚMõ´ÿ^›X%ˆ'rx<½Áiúáç™Bÿm1ì÷Ą̃žP£Ž#Ÿ#Îÿ:M9xžxfDìŽÿzXú:Pœw›— ¹ÒÝ£þRg2~dž!?pÞ³H¥ÄÕmœë3jÅi´îÑ|ÌÙ÷ÂòhN#’¤ýS¤ÁÈ÷!ëôÅâßuëûUØÏ[(—VÈ=½ep„£ê"Åò%<܆< ýl¸.7[öšÃh*#Âò]|Þîåà ©¹ø™B>o†QmO±•\û[ä'ÁµG1lç5aÝô³þ«vR¹öàÚ~sÎR€†(%áó:íð]OUÿ[¢þ‡‡×ÒÞ¤5=ã-ƒÔœkyÓ>ÓåÙ[Öá\%üûz ïÚµò _¦–"ôH*¯ÐþVðíš³_Kj19Ÿä¥)‘âèûp]Q­‚\ "n¥½½¼G»ÈAþ”£2âÖ7–þÁ§RÖÁ\ä‹ál4Æg÷>·pÔFRÃøÜÕ1Ú×P8Â3H#ψúUä­ÈÃáÕÑxAÙõKïsò7”Åûiÿ+C´na 2gR “Ú7jG…ƒü •Ó_9þ]ü¯1…Ô 7‡"¿Dù¥•݇çðÙÿ´õ#|„^Wg|èõ ô§¾nc3ýW´¦ ø_ûZ‹’*÷TÞòYʱ*õy;ñ,‹æì§ÛÖhêcÿ±Ý‹¼ÖÛ‡ô¨êJ<·ÀCsR—a¹y5ú|ÿ¶‰šƒ·|Îø,6ïsì€B73þʵÉÏÁ“pRacñ÷ü±µ9c†¤RêB"óPÜ |ÝþŒü3?ÑM8ö4Ì”‚h´-õ‚»±YãiÆt“á½…™´£!œ‹ïÆóÎxñžßA^„|¤ÐÌyÔê^ËôN—ÏÞŒ¼ Òþ ,ãôÄ~n¡›{op®kÈÕâgþôäáa¼E}#‹nä½¹9a¾ã®ú4R£±,šŸ”Æ[V4vÀ¨>Ыè®Äm:×Î !`^aÖÁ=ÕÛ…u]êÌ6û²Æg/E!W§)Ý ½Ì¯ƒHfkÌmÂ'Å¿/1‘¶Öö€·sFæx²?½Ù1õºpÔ\äÞp’4w>ljBý˜4ô+wôƒè¯òÿ4¹ êŒbþ0‚+Z“zG&ú{â¿X_èí‡séïI5x£÷Ö•¢£gF¤OGî…gÆ5C¢™É Jp©Ìú‚°Fsj‹:[¹òrsICÍ >ƒDLÍÇfqKiv‡¨Õû‘Ksì*lÆ ©Ÿ¥çËp3lDí-“~Üq–§þ€ÒyˆÜ^FùnŠÛ¸+» µqCÚ­¼Â[°ÉC³³Ð­mO~çWZK/ñ³ýÁ.5šcÌJûïÝ(5y$ý>½n§9/í×w'¥…ø¹¨ÿ‚¸×û*q‹z½^xWJ—õ>Ukï_„_bÿ«›&›;Û%¡pß;Í=ðèy.úðaR£gRw¢áù—â™fÈ“ˆðïhx #ÙøÏöþŸéËý—†i~‰1] 9™oÞÓÍ#6ò_,¦óüש.u,úuÈWùwøýw¯i¾ñtòÈßyÙqïŽÝäX}žÿNÄùy˜_F=&þ7l_ðäwØÄÿV^a)ÿUNzyÆþ×k¯zfüŠü:òaäõȇ?F>€üÜïÏ뿘vô¿Û(c€« ¹vÆ`ÿ½ƒÏÕÉ¢Ü&ü y«üUs ‡9ö y>JjUôÅ=ý¯ó¹«« q½3I} f oêÏ’QÞÿªjÆwþ7rÛü¯Ôby¢¡gF ÿ«­þÛ–ôÞÒåpþç8–B_5£$›FxOÌê®èrÿ¶r}䆉7Ðÿ‚\?‘¾:ùé‹\ùRü|€ýIäÝèÂËÑÜFêsŽMñÐ xùä/‰žï8M®—Ó¹Èܪ׳4Î#ÿ Éÿ@Êý^R]éŸüÁÀÄ.êI$G¾ ¾⧬ÿ¢$ã1äÇñðò\ÇAþ‹ïto³À“RxسãèêFú:·bðôõäkÿüÉC‰yþXÿ&^:8YˆÜÖóâßìM78ù“žôu¸­—Ó—Â Ó#}9Fô寧|þä‹>þ^“n¦Œ¼Og“‹ÆËßÂoÒKÑ´åXoþë§ùä“ïz/ù)ð¿É|’z˜N:vNWóq;ù –{çŸôõv\ œüÁòkDZžõ®øâ/°¿ˆtíø‘RjØø!×G(,–gÅ´;¿W®ôi×£w®TîÔ«o®ÜÚ½k‡\9Ø»W»ÜÀÍû ¥Œ”’l©#M]ÿÕQ.”K]ß5^fÉ_œïd™üU“çäù‡[IQÚƒçH3©(ç»>î2"܈6ßåçFY.kåqÙ$¯Ê[²Ûßyàˆ2’”ºnìË•NÒ[.—¡R ·ÉQ2Mî•ä y^^“ò¡¿—Àe%Gê¹·’t–>r… sãÞY(Z¦Ë yP6È ²UÞv«íýñ§‹•úÒR*K¹H®”«e’Ü.wK(7É}ò<)/ºqùùX¾Œ(çæ³ ¤•T‘®ÒWúÉp™,se‘›«Ì•²Nž’—ä Ù)ŸÈWþï³ÆG•—ânän-U¥›\,WÉ7ß!÷HBn–ûåayZþ&—wåSùÚYëÎ={v’n½ztÏ•Á}zuÍuò~N—3¤„4’š’/Õ¤»ô—kdŒ\+wÊb·¢m'3e•¬—²Y¶É{n p€£²$OΕêr ‘2UÚË7èËÉ™RRK-i#gK¹DÊ(+×É]²D2Ý(v‹¬–GäyYÞ”÷å3Lj\TÓ¤‰Ô–¶RCzÊ -ãäz™'KݹΓ[e<êjÒÙ.»d¯|+ß j8a™çÃ¥p\7ÀMp Üw0²À|÷Ãà/ž “° Ì…µ`Þ †$òa'Ø ^‡Â±p*œ ï„‹ 56± >_‚ÛáGð<î™Â’0Öì»Àž#Ç ™ÙöƒCáhX¯‡3áwÐøÌyp\WÁá£ð)¸ n†[áö1þ¼;án¸î‡áaxþ`&´cÆU –‡¹c½¾:¬Âf0v€]`OØ^Npu/ëj8N‚7™p.\—•ðÁ ÃGÍz>7ÁÍp+ÜwÂÝpÜ?aÔ ±YáqÏl-,«Ã†0v}'L¨ß { ÇépœçÃ¥p\çØ0{Ü·Àmp'üîƒáx±Q1³aIXV†µ`Cضƒ]óŠõ‚—À~p0ÇÂIðz8ÎvlRìN¸.…+áZ¸n€Ï—à«&œPl|À}ðü…'<“2aâØ ÉLÂ’ðtx¬ kÁú° lUàjW²ì/€}àe°? GÂñp ¼Qü_ôòãä¿n«Ý ¢£ÿg¥l7{HþJÆýO¸Q4“?Óôÿw/d/’©òXüOR»y’ÿ{nÿo¤@*ÿ,ý'©ÜoÃ?좊¤FÚ žÿzæüi–úÓ¬ôxÚŸ¤¿RîbÁÿ|ïTí?Óä]‰ÿ6C7?,çæ©gþ?’ËDzr3âêÿÒíÙnvû¯ÜÖt3íÝ6Ú‚œ^G?ZdK‘ýïŠìÿðHw=©ú‡ý„Hb¬dØ/¶óÔ}ÛæÔã‹/<Õé_NÝ/³âû®o8óÁSÓÏÉP_ª/%STßI–úYý,I­³%G§tJ¬.§ËIJWÒU¥¸n¨J)ÝF·‘ÒÉþÉþR&909DÊ&'%§ÈÉ›“7ËYÉ%É%R1¹"¹Br“k’k¤Rrmò!©œ|.ù¼TO¾ž|]j&w%wI­ä§ÉO¥vror¯ÔIîKî“s’’¤nò`ò{©—L»‰X£œb9ŤIN¥œJÒ4§zNuñOô뺸–‘ú2^–ËV×ןJ¹²Ìt¥[*y¡¨d§d/ÇÎÉÞŽ¾/)îf¹nœ®/M\5> Zweû Û­ö Û–vûß²Ýjw‰r{»·ÚßpuÆ÷奲ÝëÊ|³KýœíV»Ïm·¸ý/ØnýƒåþØòËØò«ØòëØòŸùíJ~»‘ßîä÷Ÿ)Òƒ”žL±ÛÈávrø9ügÊÛ¤ì$å=R”+ß ÿ6ž*¦ü³Ê⪸+ýÒ®vêdÇäù®ön¶›%áòäG--~4 t ZŽë Ýñ7»«šávSAJ¦åƒ 2=¨Ô™ÁeÁrK02%³ƒ1Á™Œ äö`N0Gî Kd^ðcð£ÌŽÇeAð[ð›,ôMLîV •E*©’r*¡JÈbUF•‘%ê u†,UUTY¦jªš²ÜÐ=å^U &ÊKj²š,›ÕT5U^V7¨e‹š©fÊ«j–š%¯©…j¡lU÷¨{äuµF} oè×ú~×y:OÒºî …º³î(}¯¾7ÐaAxšAfPÐÐ 1C‚Ff˜ä™áfxÐØL0‚&f¢™45“Íä ™y71;hžÝ;{@p({V± H'‹'ÏS×&/O®På Ρ~Ê™–3W°ÊfêL[ÉVÒ)[ÅVÑÅm5[M—°gÛ³uI[ÓÖÔ§ÙÚ¶¶.eϱçèÒ¶ž­§Ëض.kólž>Ý6±Mt9ÛÌ6Óåm ÛBŸa[ÙVúL›oóuÛÆ¶ÑgÙv¶®h;Ø:×v²t%ÛÏöÓ•í`;XW±CíP]Õ^m¯ÖÕì(;JW·cì}¶gÇév¢¨kÚÉv²®e¯µ×êÚvš¦ëØ›ìMú{‹½E×µ³íl]Ïαst}{‡½C7°wÙ»tC;ßÎ×ìB»PçÙEv‘nlÛź‰]j—ê¦v¹]®›Ùv…nnWÚ•º…]eWé–v]£[Ùµv­nm´ê|»Î®ÓçÚõv½ncµê¶ö û„ngŸ´Oêööiû´î`Ÿ±Ïèóìsö9ÝÑ>oŸ×çÛ—ìKº“}Ù¾¬;ÛWì+º‹};¦»Ú×í뺛ý»ý»înß´oê ì?ì?t»ÃîÐ=í;ö}¡}×¾«{Ù÷íûº·ýÀ~ ûØí‡ú"û±ýX÷µŸÙÏôÅö{û½¾Ä¶‡õ¥öˆ=¢/³GíQ}¹=nÖW¤Z¥òu?W…0ã€ÿ¾ú„ ƒBׇe$¤µZ[‚Ö–¡Ê«ò®—­¬*»^¶†ª!Ùº“+Š™f $Í`3XrÌP3T¬¹Ú\-)3ÞŒ—â¦ÀH 3ÉL’’6׿Êi¶²­ìZzU[UJÛ궺”±5l )kkÙZrº­cëH9[×Ö•ò¶¾­Ï_¶m$gÚÆ¶±›È5µMå,ÛÜ6—ж¥m)¹¶µm-•ì¹ö\×gùѬ £YU{¾=_ªÙ+í•Rݲƒäl;Ä‘v˜&5íH;RjÙÑv´Ô¶cíX©c lœc'ÙIR×N±S¤ž½ÑÞ(õít;]Ø™v¦4´³ì,ido³·IžkçJc{§½SšØ¿Ø¿HS»À.fön{·4·÷Ø{¤…]b—HK»Ì.s½ö½ö^imï³÷I¾½ßÞ/çÚÕvµ´±µ•¶öû€´³Ù‡¤½}Ø>,ì#ö9Ï>n—ŽvƒÝ çÛ§ìSÒÉn´¥³}Ö>+]ì&»IºÚí‹Ò^°;½à®}Uz¸t«ô´o¸>ôB»Íõ¹½ìv×çö¶o¹>·}ÛõµÙ®¯íkßs}íÅv—9.±»ÝÈq©ýÈ—Ù=v\Î_•½Â²‡äJû£ýQúÙŸìOr•=fIÿøÞ…ŸgæÑãÖsuËWW:õ`ˆá3á3¢''Egægæ»Þø_Sû\OøïÚ÷ïÚ×¾òÔ¾ú~î O|üï:öï:ö/ªcáVGŃÊ*Ow /‘3¥…´“.¼'0PF¸YüT7¿œ#óe©¬’u²A6ÉÙ&;å#Ù'创ßK’YSDgMÈ*Ⱥ–íĬ©l'e]ÇvrÖ n[à¤ÙdMc;1k:ÛIY7±œu³ÛNtv3ÙdÝÂvbÖ­l'eÍb;9ë6·äìæ°-ȺíĬ¹l'eÝÁvrÖ]n;ÙÙÍc[õ¶³æ³”µ€íä¬ëE¹Ô޳f;NʺÓqòŸˆÈÝ\ù„¬Eqdî‰#³8ŽÌ’82KãÈ,‹#²<ŽÈ½qDî‹#²2ŽÈýqDVÅYGä¯qDÖÆy ŽÈƒqDŠ#òp‘õqD‰#òh‘Çâˆ,t×?!kYCDÖýɈ<GdC‘'ãˆ<Gäé8"ÏÄy6®+ÏÅ‘ÙGæù82/Ä‘y1ŽÌKqDþGäå8"[∼GäÕ8"¯Åy=ŽÈqDþGd[‘7㈤ëõý“>ªå4q~SÁÛþÛµB­ðoY뮢ôúÑz°"¡¾Z—„¯ÇK¦.Ð’¥'éIn&0EO‘búz}½$õúfÉÑËô29MoÒÿR9sK 7¿˜#[‚CÁÁÑàxðkð[V¢B•PÙ*©Rª„*¥Ê¨rê u–ª¤ª¨³UÍTm}¾î ‡CëÃáÈpt86o›¦¦¹iiZ›sM[ÓÞœgºšn­?Ä­ñ‡›1fœ[ßOtëúkÍfº™af™ÛÌíæ/f¹Ç,5ËÍ}æ~³Æ¬5šuf½yÔÙ­Ö§¹Uú-nu>Ç­Êïr«ñ…n¾Ø­¾—»U÷J·Ú^ãVÙºÕõz·ª~­¦Ÿv«èçÜêù%·j~Å­–_w«ä7Ýêx‡[¿ëVøUðÇnõû½[õq«Ý㮜·üW÷<ƒŸƒŸ%d>h‚߃ß%Á¬0C¹nöçç†YÜqÊf†XLå¨I2OÌQ%UI±ÌSª¬*+Å™3–Pgª3¥¤ª¨*ÊiÌK©ªÊÍþ˜E–QKÕR)«ÏÓçÉ鬙˅ÂR>’3Â!á93“ áðp¸œ^^#ÃQá(É Ç„c¤R8.'•MžÉ“*¦‰i"UM3ÓLª™¦…T7­L+9Ûä›|©aÚ˜6RÓ´3í¤–é`:HmÓÅt‘:¦¿é/ç0“­ËL¶3ÙúÌd˜Ñf´44cÍXiĬ6YmcfµMÌ3EššÌ ÒÌL3Ó¤¹¹ÉÜ$-Ì­æViif›ÙÒÊÌ1s¤µ™gæI¾™oæË¹f‘Y$m̳DÚšef™´3+Ì ioþ{ßUEÒ­[¡ûÔ¡Ã9d”$¨ "È$0‘Œp0G@ŠLj Øã(ǜӘÆ0瀊9gEy» ttƹ3÷oîßZÿªeNÞµwßþª«Žib Š Q˜˜.¦£pq‰¸EˆKÅ¥¨¦¸L\†j‰+Ĩ¶¸J\…êˆkÄ5¨®¸N\‡ê‰Ä (RÜ$nBõÅ-âÔ@Ü&nC ÅíâvÔHÜ)îDQ¢ö¿:7÷‰ûÐwâñЉ‡Pñˆx53ÅLÔLüÜz:\µ În¥Ûè/t;ÝAwÒ]t7ý•îùV~Á[_LCë4Z_N—Cë«((¸ÃLh]³Ck½²þf«ß°ƒ÷YvaŸiŸû›™ ÿœ–‰h?H:‹FÃÐp4D£P* 9åh,‡Æ£ èG42ÌÉh šŠ¦¡éhš ùæl4Á“‡æ¡44²Ï…hJG‹Ñ”–B.º -G+ÐJ´ ­Fk 3]‡Ö£ h#Ú„6£-§nC¿ íhÚ‰vA´ÿŠö ½hÚ ƒèä°GÐQ”‰Ž¡ãè: íitEçÐyt]„üö2º‚®¢,t ]G7 Û½‰n¡Û躋î¡ûû>DÐcô=EÏÐsÈ„_¢Wè5zƒÞ¢ô½G¹èÊCQ>„1†¼±!iD¢Hcò‰&MHSÒŒ4'-HKÒŠ´&mH[ÒŽ´'1$–Ä‘¤#éDâIéLº®¤I$ÝI’F.‹ä¹L®«$‹\#×É ’Mn’[ä6¹Cî’{ä>y@’GT"É*“§äyN^—äyMÞ·$‡¼#ïI.ù@òÈG’ °öû” T¤:ʨžšÑ†´¢iKÚŠ¶¥íhWÚƒ§#èH:ŠN¦3麚®¡ëèzº™n¡Çèqz‚ž¤§èiz†ž¥çèyz^¤—èez…^¥Yô½NoüÝë„JBeá”pZ8#œÎ ç… ÂEá’pY¸"\²„kÂuá†-Ün ·…;Â]ážp_x < …'ÂSá™ð\x!¼^ ¯…7Â[!Gx'¼r…BžðQÈUÑ’Ug5X ea,œE°š¬«Íê°º¬‹dõYÖ5bQ¬1ûŽE³&¬)kÆš³¬%kÅZ³6¬-kÇÚ³(qP:B‰g ¬3뺲n,‘ug=XëÉ’Y/Ö›õa}Y?ÖÊ6 bƒÙ6”¥°al8ÁF²Q,•fcØl,ÇÆ³ ìG6‘Mb“Ù6•McÓÙ 6“Íb³Ùö›Ëæ±46Ÿ-` Ù"¶Œ-g+ØJ¶Š­fkØZ¶Ž­gØF¶‰mf[ØV¶ý¶³l'ÛÅv³_Ù¶—ícûÙvb‡Ùv”e²cì8;ÁN²Sì4;Ãβsì<»À.²Kì2»Â®²,v]g7X6»Én±Ûì»Ëî±ûì{ȱÇì {Êž±çìËaïØ{–Ë>°<ö‘å둳t¶˜-al)û™½d¯Økö†½•úJý¤þÒ÷Òi 4H, ‘†J)Ò0i¸4B)/ʃäÁòy¨œ"“‡Ë#åQrª,‘3åcòqù„|R>%Ÿ–ÏÈgåsòù†|S¾-ß•ïËå§òsù¥üJ~-¿‘ßÊ9ò;ù½œ+?Êù R°BªŠ¨è”›Ê-å¶rG¹«ÜSî+”‡Ê#å±òDyª*ù*R1¤÷TTR?¦êU3UReUQUÕ UsÕBµT­TkÕFµUíÔ"jQÕ^uPU'ÕY-¦º¨®jqµ„ZRuSÝÕÙêõ'u®:OMSç« Ô…ê"5]]¬.Q3Œîœ ÞDk t0/<„Ì#óÐ|þ¶w­ jô­jômN[ K´5mƒ®pþÍ¢Ýiwt 8r(ºN'ÑIèAg Û\‡ÞáLw—3Ý=Ît÷9Ó= é&ôsÃcY0*± wl'J¢„ÃDsчó·Ãºº;8™XyBµ7ÅD/’f;)]ÚI<¥CR‰àï‹ûð7ÅÛŒÅÅÉ!È^ 3ÈnŠCn Ú}ðÇÀvŒy"†Cü¯åü/mŽ9²EŽòØ?/„íEùl/ËG?_{þÚô…9SIäQ0ûA¾¨—/Ãöˆ|¶™ò5Ø—kŸ4Øh-lµ vZ‹¼­<Þê§9f°·Ï Áö€AþꌑŸ1çg,¾:S„Ÿ)ÊÏØó3T¢‰˜€pƒˆö•H%DH8 G”Ô"µ@ê“úH”&K“‘NÚ$mBLz&=ƒöˆ¸¼ýÏ0ô×üüÿ#;›Ÿcè?rôÿ Kk<ü7³¸”O-Y,ëÀ:±ï4V >­Ë™®!°ÖxΡM?5æ,à͸o0f­or怿`Ë?råL`ÉßøñKîù߯•Ÿ¹Xs°û—œYr-3)ÈK´¬¤ä%ï ³’\ÈIšA>2—g$ó yÑ ÛF‹ÎOÌJº~ÍªŠ¹b¡X*Vеb£Ø*vJ¥¨b¯8(ŽŠ“â¬S\W¥¸RB)©¸)îJ)¥´RFñø&ø6Ì ’Aþ[œ¼ü¬l0Ì àæòAùgè£ßäèóÀÒåËòUùÚ'¶6Øì8c?þSÎÎû#kŠŠì•æÿ{ÅÝJÞ?ÍÞ€öu0Á6ÀÝö¸4²Æ pcT‚Ï+[ã8TwÄ‘ŽÇñ¨<"œˆû£ <OE¡xþ µÆ€÷Û“$’Œ‘Þd J“Qh4M¦ Id™‰æòqéT¡–h!µ¦ÖègjK=Ð2êI½Ñ.êCCÑ^Îû8ï_äjñ’°@8Žžˆ¢vÔFµ°“6ª…µQ-\LÕÂ.ºÑºqØU7A7»ë¦êf಺YºŸ°·nžn=öÓmÔíǵtu'psÝ9Ý9£»¨»ŒcuWu×pGÈ òp‚.Ÿ•Ç£X«„·³`VïÑ—Ñ{àýzO½7>¨÷Ñûà£ú}ÎÔWÐWÀÇ´Ùø¸¾š¾>¡¯¡¯OêÃõáø”¾–¾>­¯«¯‹Ïèëã³ú&ú&øœ¾¹¾9>¯o£Áôñúx|ÕL0p–Ô^ŠÁפ8©¾!%HÉø¶Ô[êŸ·ÎÆÏ[wâ÷À­9À]nA¹•ÜŸtÐFÙÈpež’MF¨ãÔYäPÁ WP±+ù,V¸Cá‘_© ž}‚_âœG(1#bEŠ'âBÜ4Üèe4ƒŒžÆ@£·±œÑßèkô1ýŒåÕ×ê+cic)õ¹úX}¡¾ÔV¡ŽBkãϘ<>æLùh³ÀÇ™E>¬ãcËŒ*ëùx²O–øH²ÌÇ>†¬*áJ#dP©‡‘ƒš©f"'5KÍBÎêuõ:*¦f«ÙÈE½¥ÞB®êCõ!ädß}J‡¢mWBŽ“Îkmo{áÞvØ» åï>DíD{ÑAtDg±˜è"ºŠÅÅbIÑMtK‰¥Å2¢‡XVô½Är¢·h}D_ÑŸÆgðY|ŸÇðE| _ÆWðUœ…¯áëøÎÆ7ñ-|ßÁwñ=|?Àñ# }CßÒú޾§¹ôÍ£iþÿÍ1Luøj- >V EŽPè¹R`©'†¼¡è¡W+BÖ[Š„ª@‘Q( C ªÅ€š@1¢f¨9d»ÚHž%Š…b…:A±F=Q2²AýPd‡C)ªýW-ȱ9r”±GNØ;#g>Wµ NäˆÓ¹òÙUÅ9Ö”À]pT’Ï^uýpoäŽâ€J£ñhTÿ€Ç"ü#þyÍB^€AP9¼ ïFÞx?>€à™ÅG‘{+ÏuBÇ”Ú|®5kûy\poḠô”ñ!>ÿÈCI(俵ImˆíF¤ÄvÒb;ŽÄAlw&!ÿM•Æ ½4VúÉÒbi 2—–JË‘¥tN:l¥‹ÒTDº&Ýe0@„\‡£’»¡2ÀnóQY‹7pÑ9ä tù ]CÀC7Q pÑmêñ.ª|tUNzˆ*/=i³Ú+‘–Ÿm9\h‹ö48eKR®Õ,¢¤¨4[$r‹t«6‡çT³K9hdÆí’¸]*·Ë’Ûe-­”VƒEk¥ÈÛèÂm,.Ý•î#wé¡ôìÒ,-Ç-õá–pKƒ€ÃÓAí,ÍT•[Æ­Žn}ƒê³æÎÒ,ªE gA5€ç³·ÈŽÜk¿­[¥ÐJÿ«<àÉíkâš_\Ùû¢O«þ´cy£?*“ÊÐZ¯ÜÏ"ïïÆûFÏûÆ òøV€[ZÉÜó ï'Uj&5Ci4AUNÿO‘f#GЖQIi³´€Â|ŠªHÏ¥¹Ð(Ô²žQÈr–£Èa6 ©³\D?ArmæQ°…GÁVÈGn m<~á±°Ç ;y,ìâ±°ò”§èWÈUž£=¯ä¡½èÐqÈØŠ ó¥¹¢k™y »cÉè)äJèd,öè5Ÿ‘n{¦Q ©¯ŒQCù{% ]6ƒ^lxkxÕfÚâý|íýÍC¨ïã­ßQc(¿y(à7BTƒòÛ•àèoÒÞcSýà€ý ý ¦­ù¨BÁ¹js¼‘I›Ë–Á=½Ekµ{mXpOÐËþ_Á_ø¤ G+ÄÑ s´¢­ŽV"G+G+ÆÑJÏÑÊŒ£•ÄÑJæh¥p´2p´2r´2çheÉÑÊŠ£•5G+ŽVv­´ßÛ¥q7‰DÕAG­<ôðrP½¿Fýz4ê#С°€lqIì‰ËãÊ8×Åá鈅»IÂ}ñ <o†çà8¯ÄëñVøÎýð]§ W² àgø þ¤­‡|ÀšØkÙñ$¾ þ«`í™* }áÅëæÀ‘ZÝ Wàuk\‘×mp%^·Å•yÝóº=®Âë\•×±¸¯ãpu^wÀ¡¼ŽÇá¼î¼«Õ‰¸>¯g‰vZ-l‹ðz“XT« ¹zY«E+½¢ÕºEz•×Ûõ^ïÐy§7çõG½¯óõ–Z Ù›¯«1ÿž\°ÂÙ=OØ6‡œ@Ëš¼aÛ›`Ûûâ û€%À:ÀW° P,ƒÈ»aÛ×ÐfjâØvÆa°íY«j¶;®Û¸6l“p]ØÎÂõ`;GÂv¶hØkÛM¢6Ú“«îK!ªÁN¶Ûõ•€:mÁö£^Û|½"`ä}`@N@eøïñÄ¢.ÀÉþ"ž çà`K\"¾$öÀ&QU05âª9XßlùúlôÓ2^·ÂËyݯàu¼’×mñ*^·Ç«yƒ×ðº^ËëX¼Ž×qx=¯;è´,uÖj°µ¯·ë]x½CïÊë<}q^Ô—àu¾¾¤VƒÝn¼®Šçr/ÎãþKãþ›Ïý·€ûo!÷Ü"î¹tîËÅÜK¸ÿ2¸ÿ–j^Ñ[ó~·áýnËûÝŽ÷{ÞïEy¿Ûó~wàýî¨õ;϶!r¡n¤Í­t+8XóÓx¶åÑeÇ£¢ˆö=Ú8.úù¯NZìð¿¦}>6ÿ¥Í>7×~?Û`íùÔЇpL¡|Ä´8‡›àf¸)ŽÆ¤¦ÀLÍ FÆI/2ˆ¤’©t]J×>ò  ùÒé'i®4OJ“æK ¤…Ò"i—´[úUÚ#í•öIû¥ÒA@Xb Á tfÐKï¤÷R®ôAÊ“>Jù2ž½Úl³ˆÇ,æ1KxÌÒÂÏ*¢ñ‹ÏÜä3"|zêµV žÕ"jÆ£˜ø¡þ_¬†5Æ;ã]ÝŒ‰ŸWÆ0425¦‡‡GGGGÇøËõ²C>¯˜kgì`LýË•³žÿòÊY dàãO|ý¬%u NÈŠ¯¢µ¥¥h)dO=¨r ÞÔ9òuµN4€"gZ#¾ÆÖ†ÒPäÎWÚ–â+mKó•¶ž|¥­7_ikâ+m}øJ[_¾ÒÖOY¥¬B|½m_o[I9¬A••3Ê9T…¯º­ÎWÝÖà«nCøªÛP¾ê6Œ¯º­ÅWÝÖå«nëñU·‘«—ÉJ¸—aJoèp?1J¬§ô!›Èf¥/ÜÍ\²z'[¹§ÊÊG蛟G#óµ7*‚Ý©DÞR£rŽ…{> l¡Úúà%J†²TÙJ‹ÓÊ6¸ÃlZR¹½RMS %1¯:"7ˆ†.Èbá{䞌 †¢@ðÿT0Ž‚ŸC®™ Ž(Ä‚ØR‚”¡µ>Ïþä3?ÿ—Ï¿üÏúÂÿ¬¾ù±ú†@v(⢕!2ɪku¡¤eõº+_¬Ók3× ç¸ý—3Ö>Ïjƒ6H0iýyÔ¨àHàµO£.¿A9 ·ýAV"!p¬>iH¢I3Ò’Äv.¨½#þVÑÞ Y •¯KЋöùË¢½sþf ù] ×ÞHUêÿ±ho§¿,`ËŸÈ5¾*`ó×¥Ù· ä&_襯Kk^~Ûý]é%áOK÷oùã×r¢¯KÑß•â_—B 🱱¿«Œ Ãü} þC©òûò'cZ¨`n**üu4û$¨­ùQdŸ`J±ï 3óYsä[3’–bßEŒ}d“™N,k Ä^D¦v:©¬ 8%`!-ÊÔÐäùÅÇÎCù0~eTµG=Q"ê‚âP2üÓ†õ«˜\¿hL°vßìxfF÷ Ô!KVG윶£ç½±}ÓRlL)ÂRS ˜F &ÄJû…úÔf†Ê ‹e'tä÷ŸjR?ß-á¾úñÛ¤ß :+ò]”•ÉBÛÑ[IMÚõìß­crb7s“A;ȬX£¸Ø®‰Ýb}œMŽÚÉʦ^|LRbÏÄÉ.!‰IÝ“Ú%ÇÃ'J˜\µóÔÊþËó±q.Qñ»A«. Bª›œíT_S o€¯ÉßTÞ§9ìúù˜>ûGîM5ÉÚyÙJ¨W¿A£O—Ó?¹Ü”‚‹ÙgXD4—H Æh]rò‰”Ê£–Ì:3~­PcÈt·r·ª›ÐÆêÅú¾3†ì/=èè«§Ác+™¥]°Þײõ…¥Nƒñîu3ôyôñÁ€°ãƒo¸ö ?<ÏØyYЦä½Mœw<«™Ñ¯ù5ÃlÇY¿l´A‰Ÿ0üXï¾Ï7sÙY­O «)¹ÅÔk}ޤÝÞd© ~qð».«vç&Ø–:øz]»›9_Ýʬ[¾K•‹»¤lëþ{}>ø‡Ë6©âÿ°ë8\mœý¨iÙÆ>uGo š“;žL¼\ÜxûDÀÒÍa'<>L·»m¿ôÔ5o~L£Zì9ï½¶ŸÅ…âÚ/cѡՠÁbÿžcŠõq;³´ùÉ`BáÉX˜‚ GŠš¬ /ÜÅ$éôÝ¢È(59i ÀuÖî-ª´h5­MöÛ>©ƒ[‡E5Í(×b3w “ã|A „ 1ÓöKEL¶C¬XÜ;|j½mS|(°œŸ­í–º³¤b¦hí‚bB}S=S´Zi#Ã:%'w¯èí“Ô¥\×O^,“ØÕ»{çxí¨w÷¤ÄØ^1É=½ÁɈ†mLA^~>^¾&S9¸ÈÔüÓ=c,DšêšjÚ7‘‘U ¿¢OŸ>ßúЏ¤ÿ²íäß=vT‹cVµZ©Oú. Š_›PöÌÄÜN#V6Ýæ¬Lˆ~?óüáé¥êÞ1¾_¼ç­íÓªÞîÞaúTS\™û/mì—Ñqgü+ãô›’qç“i½Ë¬-~ÂoþµV¬\›·ÓíÁÓR v=,šc›vî٪çÇ Í}oÍ)kÝÍ„®Éb/M›âÑ2¾s±ÇâLû+÷â~Nu°™jzQÃiyßM͉7ÏZY3wpm!O‡Òª•‹²bÞ?{°gÝÚ‡£.ï Z±±ç©¾±¹¶è\é\hñWC¥— )óƒ2ߣGJ#ËI_²âmÖÛðYÇB*Üóˆz|¼Ú­>©5vFØ^OHxºÄ~\Å`?á›K «­V ÀJjGÆ×à Zì÷ÕçÁWhðàùí|ãø®q^QÉíºvÿ¡|L|}}ýýƒ8B™ÊÞ5 ]÷?P¥Ln»ÎÝBâ»wŠKr s ‹Š¬îï QèT=0ÀÇÍT¢À"ÇoZ—Ô;>&î/mÚ£ñõÿÚrêó‘rðÎé!{êÜlÛÑÂ×S.œ ÷6¯–%/jÐÈ2UéïUõIÍnL¼Cw{ÔoiB‰Ù™íçf&,ªzwaH~ûˆùë·†¾¿Vm÷ˆÆƒî¥-ñ )1»Q1_ÿWgEÏÓç{Ó\ÉoD’ÃáÚºe^neQîÀê±Ï'„ÔŒ7ôw‘o¿|º{ë«u2ƒ&äºþ,uawâðÝ‘t—ß° n{6Ÿ³wÏ¥önõ¢Ü¬ÛMÈu¸þèmÄþ!awü£Jô9¼úꌲvõò7^Z×5¸·ißÚÕq=ËÔ,uá×S«‡Glë»õl2Í:_§èÛ¨¬¾—F¾m—êî·>bZãT›²ž½>!šôˆøxyß ?Øét·úk]NdŽ|ñ¤æî_U‰ò9…w—WËí»®ìê=þ댦Æ`Pe¨J òß«‚Óš¹!*9T5ýª¨L5¿€ªÊª¾Ùrò·\ÿ-ôê™?°ÜO™ãRËx³µMûÚ?Óo ‰ÞÛ²¶W§ ïjZL|i1gÄ#Ë3Óz- šßlp¯'û_—¿ÐxQö‰£¦/›ÜË49 Qžƒ?¯æ¬Ì’m)¹TôÙÅzu¼þ¾üœG©¹Mo7mïòc˜w«°¥ǯÔÕ¼Ô¾:dX®ëê_¢ã{ÏËn^[Z­q®2GìÝç¹[–Q´kV­ó/Õ®£wõÏèPwÓ:ýÏ×6•½¸Ã#!ïš¿ÝѪʫºã‘SJƸÈåJ®ljÙ¿åÕÀË‹ÂÖM¬hÙdà͈ýNŸýª.[s]ùù웳•\ßp&Çqðyç"¯&f6\2#ñ@¯EŸÐËÏÝž£—ÏïÑ« ‡Él’ûèÉ/ÊÏúµFd‰³Iè²iôá•.µ^=ë´¼^qéÛûÕé1;‚]Ês»öS¯Ôã?÷ |~èå—Û_,:Ô2ìʪÁ×Kwšn¿$=©gôs»)·òü§$¥ëÝÆ¹OذA¶'z¶·vl4.}m¼÷¥¢òÇIÉe²{{7¾jmj–sj\û¼#‡Ú„û4ØRÊêV5Óñ¤2楋Œ Nó þ1s~nDËÈè”Ò¢ï¦:çëÇÜ=åÕþyXðÝåzô&|þÜ“-ƺGÝëÿsíáÇ+Í]ß§eºÝÜqG,&DW޽ܬ =ý jZC47µGÏJK„D…ê ìùf$óÄIËšðH“¥Î¬PNØ`Aä |>F´VòNúDžv3õÆŒ¶•2|Wþå‚—©è独‰ 8K( õ ‚ªn†å)m«E—š~ÛÍêƒÇ )jj³[‹L À­–)–’V}dÕ¿nŸO'Ahk¨Ä­ñÀVÓn ýØ‚þ;À¦=0!­þ1û"5«Pe°{øª‡‰ÕÖønHxhðî–QëíÃ6½×­äu>´ö‘û^> KÐ`Æ×V˃½ën]=çf÷m›×çôÛP+ém•Õ¾¡ØÅIŸãâõ^n°7:ÓëfíS¿t¿›¡. éÑ×7©ÓäÅÔsž¿|úäæÈbå+oŽžõ,ªÄE)Ž“³§0§Ù‘9cç¾g•>1ò Ã© IS=ztmŸãø,ê\Ç£Åó[:e.»½ÔÚ~1Ñ¡ f¾»¿°iôÕÙ$,ԻͫK+Ϥøvû°hªÕ­‡ñw—.ðÜq°¬¹!nüÌ˯¼·t7‹ šò¼±ÚÛNÞˆ¾w¢ï´"-ùÛ¶¹:Ù©Öx¯+ʇ:>1·±G­®ú·p=6ã€Ù“†±õ»¬"ƒ”©9'éäË.‡w?꾰ɤ&§ŒKs¨I›¿=¾°£”œðØËÛîà¤@ËW‰k*wLy×hí8?Û8gØ«æY±¯…Ÿ9mw¿ß^aýé\ÏkÅÆÌ].åZ•ª¶âÖ»K‡ocm#âÚV‹\]ãQäãu½û]Ê›uuâS,ÛÐøêíù¹·#ÌWÄÎÈo`[nÀNѵöÔê¥â÷Lž0õи ³]Wª-ç<[°rd§aJ‚×¶Þ‘Ó´/l¿c;¬ä–Ôã >Þ³®Üì| jqòXê¡ÍEÞ’Æí^¼ŠTKÈŸ=-Û<Ã|}`ý¹=Á¦ü~ú ¿m;•çøíøïÀoS ¤•€Øþ~¦ ~ûð]?“¶ûïKÿ ½çÍï²æÚåš“<t.WôÆöì›ûf6,Ñ`ű«E"KŸœ\r²îŠd“‹ÅCv¶ñT›ZSjLZ9£¥éÿHíCö‹ê½o:Ùù¿ó±ÌøÐyFþ´±JûÜO_ÒetþT?ï}õÜoñƒÊÁ§z¹žç¼·þÂ'–E?—åLN¿®qÇ-xCÛ…§nzêkÚüCƒxž0ëüΚ0Á ¯ýs¤ÁÜ_uצo~¡8½îÇ%áÏÛƒsƒ¶¸N˜ïÁàåž&¨®™¶bú“Ël^‹~¶,tálšßò6´âã,ÙŽV··Ûï)»í>¢2½\…£aù™Ù÷­›'/LdÚ*Ë»ñÏ÷Ù›Ï)y‡üÿÉzø7¬ô^ ‘åøJo¬ C”Ò[¹ôŠ04΀¾ {±¿ “—$Òb–ÌCYƶ5»+>u_xcÍøîѾ~.Ö½>‹Þõ_=éÉóÞ¬« ŸMùĦßÊür¢–ŠRÁïožTÌÔãýÎþ¨`„ßܾl®¢©;ZÎI×=È÷*)Æ^lF·‚ý#v)£Ÿg ½Ê mµ‹¸O¼*°ýßÊ%|ÿWb߇ë;Ä_ûu×5ÕŽ[¼ÿõžZn§ê+ÁEŠï Ní®H‰fçá»tKdÆW›i›uõŸÿlm;öbnÁ”œ5–>W¾Uî_%Q•¤ù~ÑlM¶r©¤“¶r¹òM¸ëì>ï¼ùéÏ7µ[/YQbºÃïh¡²Z·MPOa”›³ÈžÍ›7ø¦Ÿ˜ïô¿¡R±až¨AÚ '¡8©ó”/8¿Ô~¹û‹Ç+7Œ|Ô´™¶w®l»P “­îúÈþOŸnÝp*yKEëG½€5S6,­X½yÁ´R©›“Ú…K•ôVpä-ˆîQÝ¿à}Ë)Åk¯åüOÎzçùà;cj~'wí‰ÌÏò^-Ÿ~ÎPó?ßÑè˜¾Ò oüÒŸg¯*–}Rxñ_Ã&–EM,ó˜ €ÙmàÚËØGl¿ €škÐôËÉlȃ<ª t‚ÇmÈg€,+ j Â4² ¥¡Ã..Ñi|(ù)Ïùíí$)Å>ƒ$-<†a! ´4|2’ŠòÁÓ {æB* €¼t x"•ÁP¹P­Agf-©,ÈO/J,ȨT@«TXš€Å\ÐÓXç2¾Èϧ¦RTìýÀ(/9±“i…é“®Ë/ÛUä7ùõ2ol°n9|L/¯ÈfãÝ”»¼Îêµä¥…ùËIVN-qžcøìÚÆ{‚JYíáQ)Ûü·Dzu¾»îèÒ±Nå„ê'“Å^Z>ÌŽ‚2zy‚”zΪ۫$òô¥úÛ½7S%¹õ9—ÓrpÐmžöîÈTã}¯›¸b~ÿ?¦w:ü´“|·Ðb.„Ýn'Þ=xâü„Ã:æO˜p£ì†MÏß 6gXþï4Kœ'd\Þ¦°uꪭ ×]p/Þñ[p½QîÒ³ßvveiýÿ»[^Lä^cà9;ãíKšL{Jg©©-lb’7hb’FÄ›aPˆœ*[¬€20‡”c $S"7b„h'\†Õ<ˆfal`hajid…‘ƒK”t>163,.¯+Ú¥ƒ7­˜%‘-‰¢5[·­uç9›(yùAºK¤çÌŠ׸/ã«Û°¥~csÏþ*…F†Í΂+46®ÖÍë´yÊTc͵;Îùôt¾lß¹îe,Nö²å3?ïþ½§ŸÅmSï¬yÉ?™>>sJ/¶Ú½òæìØV—Éùì“Êçì±àÞÒs¦?eÁf.©~;nKÆeÅùßÓQo«Ž½šð7öá©éWÌ&ª<Ÿ­T¨¼³À×Yè°á¤õêO춯Þ`áû3ÍâXb³Bè‹Ê­•KîLx% ½Ij^âÍ{Ñ‚'œÖüöy¿²uóò*ku‰'ñ«—|œúÞÏdÿG±'Ÿþ·ÖœI^î°tºÂôì›Ó³§ )20ÿÿPK!°’ùN3*H¡4Resources/26701648-7FEA-3F97-6F1E-BA61160C3A35.odttfì} |TÕÙ÷¹÷Î5s3“d²Bæ&“ì$a Ù!¬¡ Ì$™$Cf&ÃÌ$J©EŒ;îj+Öjj ô‡é§ŸFk)¯FËk-åU_Ë«o«B]©–%óþ﹓˜ õ³µýlûÎ9ù?ç9ÏÙžåÜsîðËs£â혻o›ûöò¨êrû¶{joâö‡o[ðÞÇÑ 3š÷ôGNB6‰„p¨]±|Uý5 gÒc Üc{kWÙ*zFÎÏ$ŠÂÒ³|UQ‰ë¿zKaBš[Ývo܃±ï’·›öÑÖÞ€X60½Ùhfžm÷v¸½g®ØFHáቚ¿ƒ—<*—Ü‹dKÔ„æX–Up¬â¾k%âecs/]%Š”¹GÖAu›%æn:éA^,% …@ ÇF0/ÿõI9LÿºuøWIŠ¥$øuëð—$þäßG_î….?ü=’"‡t}Ý:DÒWOì0¹ÿëÖáŸ!±¯Í8æ}Òó7V%’")’")’¾BbïdRÿlÛ:|ÀФÏ$NGnþºuˆ¤HФHФ®¤¸…ìüºuˆ¤HФHФHФHФHФHФHФHФHФHú Æ”ðoƒúPÇn ²u2G[ô$,%mèqO(–ˆ$Lè !¡ÉO˜äPkx¶¨‰+q‹¹Ûˆ’9Ekï_üÛ§¨³áßUeÉ'fÂ|Tõ—tf’¿ íš¯ªÊÿçÄýMgû»ì «ÕÑh[½ªaåŠåË–.©_¼¨®¶¦ºª²b¡uÁüKæÍS>{ÖÌE…ù9Y™–tsbœÑ­×i5j•’Wp,Cò«-5Íb0«9¨È²ÔÕHu‹ûAsP„¨frŸ ØL»‰“{Zѳý¢žV¹§u¼'cç‘yùbµE >_e3kW6‚¿¶ÊÒ$OS~)åY´¢G%- #ÄêÄÎ*1È4‹ÕÁšÞÎþêæ*Ì7¨ÓVZ*Ú‚|2¨ÕÕ æX¼ƒLÎ|†2lNõœA–¨õÒ²A.³ÚÞ\±²±º*%-­‰ÊH%+¨¬ ªè\¢SÒ™\-æ?ÙÍaii΋j³´Ù¿ÙäìÔÏU÷÷_4æ§Yª‚Ó¶¾‘“Á|KUu0Ï‚ÉêÆ`‚|¦Á"öŸ!PÞrúÔd‰=,QfΉ•LwÚÇxÝ !ìKK“t¹ú°•´ ܱ²Q®‹¤%å ±å5Ùf©åɱ“MjÙ1Ö2>¼Ù’&…ªº9üÓÛ™ÜÑ"äÃûô'?hƒ\VsKk§TÚý–ª*Ùo«ƒÖ*0V{ØÖêÁâ"ô·7ç䆕Á"‹7g©;@ J1p®j¤CÂÂq•AÒÜ,ª®’ô«û›«d¥¹,+#¥¡×ËÄ”GJIi’ôÆW"(YÕýmíAssJög»Ø˜’´6Á}M–FG“%‹!8íu,—FW¤£`ÛE½Ç:K–«2Õb#›Â5IÑ‚@¬±TÌCƒá¢U)¢óÄF&…ŒuÃ*á7iT¸ÌÊ:©‰“†VÖ¥¤5¥Éé TJ ëÄgÕæ2@0®“¼ÎŸUMî-)4M¬vTMPpÒ¤|XÁðlŸ¯'+ù"¼0F¨¥pÖ5q™xr!c1 IQLƒd…ØhqXš,ØCÖ’m’¯i|ëWYêW®m¤Ñï’Õ“jrûìñ¶0d+±kòRÆbJëµ´>^­»¨yÑX³Ø¯¶Ô¯ê—f¶„'$"X¬ÌZd¿zvLžËm–»E4ˆ5ýöá-ýƒVk¿·º¹sŽ4‡eQ[¿eU㼪ZCã¶”­ÒR1¤ž©_]Qƒ§bÐÂì^9hev¯ZÛø˜q÷êÆƒ,ÃV6W4 f ­ñ1‘+•²’TJQªH35 ¢¦ýS³²ƒ¶*¨€Ö[3„ÊÔc2†´fe™aLÆB¦eV*“"”Ø ÿ⬭Û¤Ø\ÞÔÙßÜ$=Y$qÄd,óIµÌdXeTPkqTu– I¾@’/åJI®Â®`âx³ºÓ2æ+Ku§Ýq0Œ)Ö2{!Æ™ĺWsò@ÈüÛÁù?nÞdþͯ Í'^vš¿´ßüë—óÍ¿zy–ùÅ‘dó #æçG~l~nd‡9z„q›GsÙiþÅ‘kÌ??2Óüìð2óφÍÏ _j~z¸ÝüÔ°Ûüäð36 ‹Ãœ[.f%–•$ì\q˜ù¿CYæ'†æ˜j0ÿŸ!·ù§C~ócCß1Úb^1Ä=ùÈÐÖ5´ìôÈ¥m­\VÔH¥54TTRsh°Þüèàzó#ƒ­æƒƒÍÁÁ>óÃ;Í?\gþÁMæûl5ß{àóÝû§šïÚ_nÞ·ÿ&ó·ÛÌ·_Slîg®²}—Ë3_ÁÕšw®ÛaûöÀÛ·Öm³mØf+ÚÆm[°­{ÛÝÛ^Øڦܲ®Ï¶y Ïfïî>®Ùj»|ÝVÛe[mÞ­Ìîu»lWì²™w]¿ëî]Ü.Îg[ÑÛÜËö‚ñ´»mA7s©»Ûý-7ç†$°ÎgóølV_³ÏëÛáSøØnÛ¦uÝ6ï@·­[ɘ7B)gm‡­s ÃÖ^Ûfs ´ÙZk[löÚf›µ™ùfíZÛºµÖE¶o ãšÚÕ6ÛÀjÛªÚ•¶†•¶•ÊóòÚe¶e\¦yim½mÉ@½mqmmÑ@­ŽÍ3×ÖÖØj˜ÏðÌaæ†ÁÕ«òòê«B õAõŠuAfw0s•D­+ו»ƒÄ¶v]ã Ã\×t0Ðjz4Ðúw¯½–TL­N]Õ¼gjS}p«Ä„À©ƒñ¤¢iƒ?ï³Éï÷K¥?\ÁO`¼™H¸Ì óyycíLÏ gl Ú¹NÆ3y‰ð"§º‹ws‡Go’^êxቿêí²–l ½ä^Ò@üÕøpâ{‰Ž$J‹wϳ¡Ó£?ó ÕS1£<&¤ ý=b©,šöz_ê5z˜« J:VwáçJï³™œu}h&ê²WJ¼!Æ/ðiƺ„´äX5cS0ÍÚø”4Ó‚1V©‘Ü©QrûϯWë$'s÷žo—3'éLæØóorñ‰i&M’Yòpè,燕¥ÄJʬ)Úç§òŒe/dÍ5ŽLÉ3™;7¡üˆØ–¶ðtLyÑij¥N:ƒ™ÔП˜#|#1‘i$ɪ‹ÿ‰hzDÇg¦,1¢¯ŽL<€%u¸1GÆ^t¥2ðzS4ÂÌëùhܤÉÑÊU\ZRrZ¬J›–œ”§bšÆâÍý{”Q§àu†¨sS2ã5šøÌ)S²L) Ñ ½ËÜ®øÕ)ÅL4½ 3äB+'N†g¾¼VÛy],¥ž’ãbqéUÆ© ©1*ULjBÂT£ŠIVÊþQr Úh‚×Úóq‰¢¤˜˜”§VÇ¥C«›¹¶—P­’­Q¦GuiNãS²j 5åó%PêåÏUê"I¼‰mæ£bôBŒŽOÐSbbSŒªÑ[&‰²ÍÜ·Çžæ7c^Íž,Óë¥]¶“ý¥"Ž•ä’l«)w?oÜŸ˜¹KTFsqSvÅùu~Ö?áö¢~#Jz—Ê—U½«”ŸÞ®ñ ±¥±3)g2*ââEs;ú+ERrJ"7ú[&Á,ÆO©ÌÍÓ}ÄFg‰µq)ì+:†=p¡I£Ö¨Ùû/|S#Õ&™RÓ.Œ°Ó3SLIp‘[þ12óO‘WüòÓ_>³³¿öü³ýÌ™ÿóÎ/È/Er$ÿkdEê¤ìüʇ"9’#ùó3¯äHŽäHŽäHŽäHŽäHŽäHŽäHŽäHŽäHŽäHþgÉDþþZ(C”Òo“2×0É¡“`JXé—cåïJÝE)G{'“GÃóŠ }x¥ŽóJÈÓüŠÌU…y51©óbPý.Ìk™êa^Gò4Cãß3iÞ ózf‰æl˜ÈL]M˜7@·±±F«µa>†êÆF¡ ÇBæåXȼ ™—c!óŠ }äXȼ ™—c!ór,d^Ž…Ì˱y92/ÇBæåXȼ ™7a|¬‘hÉ3äÌ\-§ƒJß¹s’Vâ#ÝÄ´“d•à|ÄK©'8)DËBâBId¤m~Zs t w/híYEeR/•‰¤…l]Bz°^æõ“i¨·¡U$µTƒnÌ÷Y}æPìX׉9| Ò,cëKkw`NzøÈª…?¬±dg!ì,¾h|Á„ñÏì¤Ùµ^ÒÏMçî‚LÒHjé¤Zžï:h½ÞëÝŠÒº9©W ¿`U7z·Q+$ýýt”ŸrÚWš±R7xõh8I#©Of @.i'ëáÁlNÐ:KwxÖµJ^ÓC£ÓJ£í ûOŠà"jO;$ÒèÜAGø¨ÄEµ„íhEK>ÙM%.:£VËò±UÜ4RÒŽò†µô@⦫ÊsJv&h ­è¥¶Èûql7ʺK+uÃ"ì—#*i%{»•êï¤Æã-ûL^E¤º{ÂvÉÑj¡=?Õx¢E’×6Óq²Õ]¨~fwfÓÙÜt†-Ô=á'c¢¿Çö´zõª=Ý R)¯(ÅZ ï(ÙYÇŽpi·o Ï€r„zÇ£d§{DÚÁîIvíØVhb§ë·†×/¤ž `Å9¤¹æBºç&ï÷Âðî.¿…F¨ƒÎäÅ [ •fl§ñ’"9yV= $«?í16_Ý»²·PëýÔ[g?Ý—ò‘Î íµÐIטxâŒyºšØðÜ/ õMh‘÷WÕçÓ=ÓG×j¥{êóÖ•ëRßVjK[xU9m´ÝKÏ¥-üî¥ñõ„=/Ïå TÚIÛ-µË;6£¤óRzn[ÆWú<­<Ÿ™ùËûèÓÙÇN 1üܨޭ“ž¿ÏÚ>ö´]¬×Ü ,‘m‘O¡±{Æ7~¢µÑgÚCŸmûŸµTö³}’Oå'¢;Le«d¾‡î¼:²>’5Žñy¤ž.úŒ}Q„þVÏŧ;¾ˆj#èòÉXHcå%›KЧ—ˆK­¾nw{@¬ìöy»}ö€³ÛS(.t¹ÄgGgÀ/68ü_¯£­P¬røG›Ø²E\ÒÓšc÷OÛb­¯»;0>ϱÒîr¶øœâi|ƒ££Çe÷­qøü˜X,)œ^n/ íc~Ñ.|ö6‡Ûîë»ÛÅ@§c‚v¾î¯$nív{í§Ã_8i¨»»Íáóˆ~»Ç/B_g»Ønw;][Ä>g Sô÷´\sxÚœž¿Uü‡#=m˜Òç~…⢀Øî°z|¿èsØ]¢3€5Zýù¢ßm‡GZí^ðÒw+àôbJOÛáCO¿#@'ð‹^_7ü(¹³»\Ý}b' P»5 :=b@²šaˆèrz°ÌjqvЉå…ŽÍ vv9 ÇÜ™íÝvϱµÁõ–<äqô‰>;lñ9a6ÚÝ"…e0c$~çVttà^É$»Øg÷¹åµ$ǶvÚ}PÌá+ì ¼sŠŠúúú Ýc~/„»‹[¼Ý>»·sKQk ½Ûð‡»ºzZí~*ú5u÷@Å-bßÕ©E´Ã#ŸÛÈGRºÚ¶d!Z}´µõÈžéët¶vN‹Òéiuõ´a(,hsú½., éîõ9Ñ¡½ž@¡8¶v·ŽÍqNîiЧSyÆ:®F´»´5à&Àçl•ã7¾º¶±¹æRrœX[Hzf|ÒFkëîó¸ºí…ÎvYSævc)О€·'€'§×Ùêút:\Þ‹ ú2± Ž/js´Û± í~ïæñÏtdôœôwý>'1è7~|BP…BDþ´ñ­Ì]øœ±œ‰0L<“DX&™É?Y~s ø[™ÛÀßÎìó(øCÌ»àßcÞ'óóø3ÌÁÌü üYæøóÌ(ø‹µ¥?ÚG–g•àU,>±:6 ¼ž….¬5‚añ™•5±ñàØ$ðÉl ø)løtÖ>ƒÍŸÃNŸËæ‚ÏcóÀç³ùà Øð…ì^ðw²w‚ßÇÝþ.®–0\·Hú>øXÂðq<ìå“ùjð5|-áø:Þ¾…w‚ßÈoïãûÀoæ¯ÿ]þ»àwñO‚Š ü°Ÿ²Õ¬:“°ê,Ma4.‹p·þÂèÔ?H8ý€þ)ðÃúŸV˜J!U€¯„…a¢I4CØh6ú:ÄDþìÎ’øö=êÕ3ÔŸg%O2!êCžzOGýf 3Q_%S/¥Sÿ ‚Ü"X*ÙÒÚÆ·¶óí Ò—´$»| >ÚË÷†5dQ¡aº€y„ !4KÈÍ0§+ÀçB¾o …B!h±P Z*”‚Îf€Îf– å s…¹ ——€.€.‚V • µ""¬Öƒ¶ ­ ÁÚ!t€º¨Gð€z/h@€¶B¯m…ÍÂfÐíÂvÐÂÐ+ÄH¸R¸ô*á*Ðk„k@¯à[áFáFЛ„›@o°«…Û„Û@ïî½S¸t¿€.Ü-Ü ú=á{ ÷ ÷‚Þ'Üz¿p?è"+   … èAá è£Â£ ?~zX8 :$ >.<ú¤€# àÏÏ€>+< zD8zT8 úœðèˆ0ú¢ð"è1áèKÂK / /ƒŽƒžN€¾&¼zJ8ú®€§Rx_xôCáCÐ3º£$hÉÜK„kÝâs‘¸Ÿ£‹ô»ìÙ‡÷W¾¢¶A$ÅËW‰$½®aHæ/­¯ÉÚU Ò[ Á©¡ s˜ðþ"×¢#ñ$-\cqž$ôp#z’(ýÍSZS$‘ŒpÇù“L2å¿J%Jb )$ ³q‹V¬¨# Ë—B›Õ õÐ#ÜGEŒd >I5ŽÄ©xã“[Ô$–¤âÍO®iH1“\’×êõ{¥ZJ ”ÆS:…ÒtJs(-¤´ŒÒ9ôo¬Z)­¡t ¥ ”6RºÒ6J7Rꥴ—ÒË¥×f'¥{)=HéQJORzV¢l ¥¹”VPº–RŸ»ËÝÅöSº‡Ò½”~ŸÒ)=Hé¥Ã”¥ô¥'hÜ™¯@ÉW¤Z"ý—q%⧦7î¡\z6ôóR ©ìaö{œý=û §æ¹n6î·F®“ÛL¤÷« ýdÙK¾O$É&GÉ1r‚œ$o“ÈY†e´L îût&—)aæ0Ìb¦YË´0³•ÙÉô3{˜½Ì÷™™ƒÌ3ÌeŽ1'˜“ÌÛ¸õÏâV×âÖNÆ­“Ë–°sØ v1ÛÀ®e[جÝÊîdûÙ=ôÿ]#ìërùÝ™r¹ç€\þ0C.ƒGäòkåò·åòý2¹üX %£Ç3…\Æ}S.Ó>‘ËÒ~¹¬xP.kwÉå7Âý:Gå²»Q.·Î—Ë﬑Ë[^”Ë»¯“Ë×Èåaùï6ÈåûáñŸÄËÿ¯Ó —jQ.r™´Y.S}ri–Ëìr™¯”ËbY?¶LÖŸý#¹œ·L.Êú±Ë~(—«žË¦ír¹Þ%—-²Þ¬_ö;»=<ßÎpÿÝ%ryc”\Þ"û‘Ýû¶\þ lÇCÅr”ãÀ>*Ç}¢Y.\.—Çâäò„W._¿K.ßãȾýš\¾›*—Æ =Ôô”aÿøò„:n‘ 'Õ¹øâÉõ„µ“ëÉ5“ëSF&׋J&×§_Ô^ºlrý’6¢a'ÔççLhÇÛë ïäº ~Ý1Jï².ò:ùoõÍ†ŠØÆ¸ôĪ)kÌ q™´x²6ç®ÍmËK/x±àdñáÒþ²fìš±kvNyLyqîÚ¹¹—,©]âZ–¼<å«Õ«7®öÚÒm7¬Y³æ5húýº¡õç[ã;;;{»H—¶«ª«¥ËÕÕÛµ£k¨ë¹®·»>êuE¹’]e® × ×w•»Ý}¹û¨û¸ûmO¢§ÄÓèéõðŒt¼BUy·zõ>ë}Ã{vSç¦ïozÎwï€ï˜?àßÛódÎ-ñ[‹·.¾ìG—¼ìð6嶨m©Û­x“ô^Ǽƒ[»÷t ‰ "±@`â ;t’äÓ€\ ˜ƒÛx.P!K€¥À2`9°X 4«€Õ€ X4m¡ãÄ´€Øt.À x€nÀ l|€?4D@Ð ô›­¡Cä2àr`°¸o×7bÜà&àfààVàÀýÀ€ÇÈ œ¥+ÈQðÿ<<Œ//¿Žÿ¼ü 8üW(HÞÞþ6þ~û=ðð6ðp 8 üxxxøc>Ę€3À?A~8œ.„‚LNè3 Èò€| (Š€b`:P”eÀ `&0 ˜ ”s€¹À<à`>°°  ¨ª ¨‹z` °X,ö†Ž3wû€»€»{€ïßî÷ˆƒ0ˆƒ0ˆ3üxø1ð0ƒÀ#À£À“ðÅS!Ü\ÀÓÀ3ÀÏ€ŸC~øpø·Pa+ºÐqvQè[¬}Èb²NôÙt.û=DâØÇ1æ à©Ð)öiÈž ±ÇP‹¬`ßEý=àCà Æ| rŠÐqn:Ê X:ÄmRô‡FW××××77{€›€›[€[ÛBÇ·wð©>UÀ§Šýüª¸óÞ|x>TŒ/¿GÛ[ÀÛÀ;À)à4ð:+ ³â}àº+>΄N)þ| |ü 8 œÎØwŠQ  ò†ÐqÞÄ€Ç9ÁãœàqNð8'øD ø5🡓<žkóø÷B‡ø ¨¢ W€X€'5Jeè¤RhB#J- €OD™LAŸ©@&ø, Ȧ…)ñ (±•µè¿² À¥@3€³D‰X*q–(q–(q–(q–(q–(ý@ÀY¢ÄY¢ÄY¢ÄY¢Ä9¢„Ï•ð¹òÎPPù"ߨ°¾*0" ª²œÐj~:ä%à{U5ø¥Àj`êë Î8• ó¹Ð x?ÉQAUÐl.vWýès5€sL…sL…sL…sLu愾*<'ªŸ8ŸT8ŸT8ŸT8ŸT¯£ý·ÀIg”ê Ìñ&ðßÎ(Î(Õ[¿ ¼QÞÿ€³HõÇPP͆N©9@ð€Pj@hèˆ €À½¢Æ½¢Ž W›€x H’€d @œÕð³~VÃÏjøY¤ È.ZBA-î-î-î-ü¥Ý\¼:¤}3tH‡3[‡3[Ÿèà|¢ƒOt8³u/¿ uÿ¼ ü'?éà#ÎpÝïøE÷p€OtQC§¢Ã(WèPÔ·HMÔîÐHÔUžñ¨;C'£°_¢~ ðŒE}ˆ¾Ô«HŽÏŽÏŽ>€=ú+CCzŒ×c¼þô¹ÀÙ¨ÇÙ(˜BA!H£IèT4|çÙ—¹­Gp[à¶Ám=‚Ûzä+ÞÖ×â¶¾·õµám½·õnÜÖ»q[ïÆm½·õnÜÖ{p[ïÁm½·õÜÖ{¾æÛz诸­ƒ¸­ƒ¸­ƒ¸­ƒ¸­ƒ¸­÷á¶Þ‡Ûznë}¸­÷Enë¯t[_‹Ûznë=Ÿs[ÿ5w'Y]Þ{ütuOuÓU=0lbˆZ‚%‹ÊAal7j„qKÂâ´ ²3,ƒpX†¥Y”k½B&Á‰ZF*hßÈ12.¥Ð ¤@*Æò&e’#ÉA=jhÇœû®r€@ïÕÜüñyUuuuÏ©ßïó|Ÿç7S5 ݺ¡[7ž¡[¯Õ­gŸc·^«[¯ý5uëYÝzV·žý të†nÝЭºõÚgÙ­ãÝz­n=«[Ïþ’nëÖñ&Ý:~Ýzv“n?M·^«[¯Õ­×êÖkŸ¡[ÏêÖ³ºu¨[‡ºõ쯱[7~ ݺñÿ°[·të–nÝØØ­[ºuã¿a·žÕ­gŸE·nèÖ Ýº¡[7të†nÝЭºuC·nèÖ Ýº¡[7tëÆÆn½V·ž}šn?C·nùÁ`û ïVÎ –VÎÆ9Xsá÷VüÞʰ¿û[±¿û[±¿û[±¿û[±¿û[±¿•+p%\OÅõTfq ®Åu¸†ë¬Ü,U±*èVWÓ*á¨ê5noñøƒA­šµ©EÁÒ©2¶ÇÅEºx³`éâITPÅK§÷ ¦§÷ÇX^Lóbú-8ïÀ18™~'Ž jÓÇãœÔب÷‹PÆ8&°&QASX̾Wb?¨µ±»crwìTÈÞ1Y2&KÆT̘ÝS1c*fLÅŒ«-ØáQø3Ëj¹¼%Ôsygèå½í޹sÒÜ9)¯'õíªÚ¯î¿§ê÷L/ƒJ˜>úÄô¡8Ì\3¡&kj²¦&kj²¦&kj²¦&kj²¦&kj²¦&k¦ÜM¹šrçM¹ó¦ÜySî¼)wÞ”;oÊí˜r;¦ÜŽ)·cÊí¨ã¥êxé¯8åΛrçM¹ó&ÜØ„›pcnlÂM¸± 76áÆ&ÜØ„›pcnׄ;gÂ3áΙpçL¸s&ÜÔ„›špSnjÂMåBM.ÔäBm8¥­tûĤ6oRKMj©I-Nj]ßHF<1‘Í›ÈæMdÝÁD¦þk꿦þk꿦þk꿦þk꿦þk꿦þkê¿ö+NP± *6AÅ&¨Ø› bTl‚ŠMP© *5A¥&§yÓÁ¼é ³q:˜7tM©|¨mœbBlBˆM± !–5¹Q3)hRè˜:›L yR“'µM&†ØÄË–ÚÓL ©¼©™æeNMæÔLó&ˆÎÓLó&ˆyļ bÞ› bDl‚ˆM± ¢k‚èš æLs&ˆÔ1o‚˜LOµM;´ÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜªÉ­šÜª=‹© 5¤¦‚ÔTš RSAj*HM©© 5¤¦‚ÔTš R~^§Ÿ×éS¹W“{5ÿÀ§tüŽß}¼ÃoÔäaMÖäaMÖäaMçOuþTçOe_MöÕd_MöÕd_mdì9%Äo.ž8ÿ>·dˆžáìÛ” MÉД MÉÐü%É08Ã5%CS24ÿ“dœÕ¢ÿ’¡)š’¡98S=%ç†H24ŸU2üß§Bó9¤ÂSÏO— ‘Tˆ69W479W4ÿ›¥BS*4¥BS*4¥BS*4¥BS*4¥BS*4¥BS*4¥Bsc* æÿæã©ð!z‰Ð”M‰Ð|ºDš¡.ê¡.ê¡.ê¡.ê¡.ê¡nfXffX¦Ú몽®rc•«ÜA5öUc®sÕ˜«Æ\5æfþ%ÏЫë*²®"몱® ã'õçUÁUXW…u•«¼¾9~‰ù}…ù}ÙèÛôèßÇ1X‰w™íß§Îó÷u•ZW©u•ZW©u•ZW©u•ZW©u•ZW©u•ZJ¿UR¬’ú{l]ÅÔUL]/]¦Bê*¤®"êûbýuö×Y³ƒÏb®HG¾èöKÎh_ÆWÐÆWñ5ß^tFîÀ<îÄ]øºÇïFŒ{ŠþèîEgt)ö€5’~±ä‹Çî.:c1î):‹žWô-ÁVØÛ`[lWôË7Àë-´è”çÝÞë¶ë6—H¿…ðÛx!vÂKQ׫_û7nÿÆwÕËí߸ý·ãön|©ï»¦qû3QÂ(ưeŒc›aT1…Å˜Ææpí[`Kx ^Ä×0á5Lx ^ÃÄó±=^×<áš'\ó„kžx^Œ^‚q,Þ5üW°Nõ¸úÚkžº®èOÁq8'àDœožýrpP‘ãŠÃ°‡ã¼Gâ(·â=E¼0ü—¥5ÁY8ç`5î,z¦ãžé¸g:{¦ãžé¸g:{¦ãžé¸g:{Á£E¢ÎéŸsúçœþ9§Εö)²Òëð¦",ýn±¦t–r‡š`ß^ôL·=ÓmOOÓSçôÔ9“m¯´ªHJ§šh/*:¥+}mz+}Áï¹ _ñ»îsûÿ?+ÓnoìÒ"» —c-®À•¸ Wc×àZ\‡ëqc±fìO°ßó;Â?ã_âa|þ,ÓoÏôÛ3ýöL¿=ÓoOžÓ‡çôá¹E›á¢*²E»ýa±fÑÏ‹¬¼&±-¶ÃŽØ /E/+Ö”ßáö‹•8±ËïÃ*Ì ÿÆ~i¹§·Ï™{¦ßžé·gâí™x{¦Üž)·gÊí™r{züœi¶gší™f{¦ÙÞøÃE2þ}ü`x^›äÅ$/&9aBí™P{&ÔÞä?k&ÿ±XcZì™{¦Åži±gZì™{¦Åži±§ÿÎé¿súïœþ;§ÿÎé¿s•Á¿!'xÎÊúïœþ;§ÿÎUO(Âê‰ÅšjXdÕK`¿ª·‰~¼H¦À[p$÷ Ôs žõ¨ç@=ê9PÏzÔs žõ¬* ¡Ù\Ī V±*ˆUAèÞèÞø\zº‰37qæ&N“¥¯êögXÀ¿áçE^ÒWJ{²woÕ O”Þèþ›Š†*‰UI\:„ñ‡zÞSçƒ?Âq?'àD¬òØ©n/ÄE¸¾X(é *¥QºcpNô}“[iðo^+ŠþØ)ø NÅi8gàLœ…³qVã\Ü(Ãÿëðg’«\…ä*¤aZÍ©.UÒP%ñ¢ù.Ëö¯,[˲µüâ"-ËHÕ—åzY†—õZ•ÑP •ÑP²½+Ÿ {W6×”Í5esMÙ¿o7­ƒgš>ì{›ÎHçë¿GßL¿û>~àþO†“o>˜£&¯.ú“³¸ú²ª‰UMü_9_©È\Eæ*2W‘¹ŠÌUd®"s™«È\Eæ*2W‘¹ŠÌ«zZUÏT™ •WW ÿþ¶_µïUggÕ™š˜sš?6¿©ÎTuæÏ4Ç©Ò\•æª4Ÿ6 MïWt§÷ÇX>ü;áþ´gÚŒ3mÆ™6ã¨æT5§ª9UÍO? –¾00¬•\­äÁܯàoÄ߈¿‰Êms¸Ïá~éL_ŸƒÕþ„sÝž‡óqêc.›ç†>_«ÌƒWc×àZŽ_çñ¸ƒSÇoÞëþF¯“É÷ùcnO®úñ;âwÄïˆß¿#~GüŽøñ;âwÄïˆß¿#~GüŽøñ;âwÄïˆß¿#~GüŽøñ»Ïï>¿ûüîó»Ïï>¿ûüîó;áwÂï„ß ¿~'üNøð;áwÂï„ß ¿~'üNøüR¿1X‘ñ¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;<ïð¼ÃóÏ;Oñ¼ÏóÎ&žwxÞ >Ëê”Õ)«SV§¬NY²:euÊê”Õ)«SVÎÊ1³ûÌî3;ÓæÙ2ºËè„Ñ)£SF§ŒN%ô" ÝbuÊ괤חÿ£ÏKê&³f'ÌN˜0;evf–k•>ãûŒï3¾Ïø>ãûŒï3¾Ïø>ãûŒï3¾Ïø>ãûŒï3¾Ïø>ãûŒï3¾Ïø>ãûŒ2:etÊè”Ñ)£SF§ŒN2:etÊè”Ñ)£SF§ŒN2:etÊè”Ñ)£SF§ŒN™œ09arÂä„É “&'LN˜œ09arÂä„É “&'LÌ]&w™Üer—É]&w™Üer—É]&w™Üer—É]&w™Üer—É]&w™Üer—É]&w™Ü­¶†©²9eó ±»S×ÿž ftÊè”Ñ]Fwƒ·1:ctÆèŒÑ£3FgŒÎ1:ctÆèŒÑ›s6çÃéêB“ÔEÃ ÎØ:Èߌ¥9ó2æe¬ËX—±.c]ƺŒuë2Öe¬ËX—±.c]ƺŒuë2Öe¬ËX—±.c]ƺŒuë2Öe¬ËX—±-cXư]9»rvåìÊÙ•³+gWήœ]9»rvåìÊÙ•³+gWήœ]9»rvåìÊÙ•³+gWήœ]9;2vdìÈØ‘±#cGÆŽŒ™ÕϬ~fõ3+žYñ,x‰n•™A'K—A¯,]éö³h®fïÜȹ‘s#çFΜ97rnäÜȹ‘s#çFΜ97rnäÜȹ‘s#çFΜ973fnïs{Ÿ®ifïS{Ÿn2_>5½&O®µÃÄÊ%V*±R‰•J¬Ô«M½ÚÇÓé7•LgËô±$âIÊ“”')ORž¤±ó‰Oì|bç;ŸØùŽï<žÑ«95øÛK|ïR ºÏZ·Wš4M H3 a@€„ƒ‰1a@€„ $ H0 a@€„ $ H0 a@€„ $ H0 a@²1—‹‚I$,HX° Ã‚ :,谠 :,谠 :,谠 :,谠 :,谠 :,è° óKóùͮ㠸>–$,IX’°$aÉ`ŠKØ‘°#aGÂŽ„ ;v$ìHØ‘T¯gïÇI8À)pÞeGÂŽ„ ;v$ìHØ‘°#Ù˜ Cr†$ I’0$)}*Ø¢H‚-±[aklƒ}Šv°/’ ãŠÃ°‡Cƒ„9Gáh¼kŠåÁ…ø.ÂÅq .Åe¸kq®ÄÕÅÊ`×àZ\‡ëqk1D¸³˜ îÂ×q7b܃{ñ ܇îÇè¢W¬¾ƒÿ¿ÃߣG‹ÖH©8zdcX„2Æ1Í0‰ ª˜Âbl^¬y¶À–X‚­°5¶Á¶Ø;§Œü6^ˆáŨá%Ø;á¥øƒ"Y…âTœ†ÓqÎÄÙ8§Up¨‚CªàP‡*8TÁ¡ Up¨‚CŽ\âg.ÇZ\+qUѹ³¸×â:\cÎsþþ ŸÃ­ˆðyü5¾€Û°_—ñ´ñU|­èŽÜ^D#w`wâ®"*í#!^‡Ã‹å¥#pÞ^Ì”Vº}Û÷â}Xåüy–³®×[Zƒá’"”8¡´ KŸôý¹¢]ú\±¾t+¾àwÞ Rº]:Ýç~×ïüNqt©_Ì–¾[4J¹Mñ¿ÿ‡øq±²ô?ûÓbuég~ßÏ‹ÆhPD££nÇŠ™Ñr1;:îë lV´F'}mïG§Š¦ópktºˆG7Çó°¶Ä’âàÑ­°uqÊè6ØÛùùç{þö¾ÿü^„£æ÷½;ëGuGu%f(1ÃÑÝß»b·bõèË]×+Ü%v÷;—bìé{{9£ÿŽÇ÷Æ«L¯v»Ôëè2·¯Ák=w?׳¿û¸ÿú¢5vD]ZôÇ.ƒIal-®À•¸ Wc×@º™™Æ®ÇŸGýnÂǰŽãø$šøþŸ.N»-ü%nÁgðYÌásE¨;„ºC¨;„ºC¨;„ºC¨;„ºC¨;„ºC¨;„ºC8Ƴ±¯ávÜy܉»ðõá¿ÿGc1îÁ}Åò±îÇø&GÆþßÂßâÛèá{ÅÌØCøgü R<Œïƒ?cüËð#ü?)f=X$‹þ©è/úùðÓÑýòäð“Ñýòà=;b'¼uì¢{í‹w¸ ŽÅJ\^¬._]ÄegëòG‹¨ü§n­³N–×»ÿçø8>O¢Y4ÊÖ¸lËŸÆ-ž÷¨Ùò­¾Žðùâ”ò_Ã:ê aY½–ÕkY½–ÕkùNϹË÷¿î{w#Æ=¸×ŸÿM×ó ?ã[¾ŸxÞ¿ø:sÿGø1~‚-N/âñ l†ITPÅ¡êСŽÞ9¦VÆ—`+lm°mÑßÏÇöxÔɸ:¯á%Øu¼ ;Ýñ]°k/õµZß³8z|oìçë7+Çß\ÌŽYÌŒW,?ÁíInOÆpš¯OÇyܿW»Ûkq®ÇGäw><üÜÛÊjî9úú§ø÷bv*€~5µ¨X>UÆ86ó˜^5UAÕ÷6/f¦ž‡-°¥¯·ÁöEkêE¾¿N(â)ë7eý¦®þ^h" §nòü3‹7+–/žDULaq±|úð¢5}Þ‚#ñ¶"š~‡ÇÁ±Ðӧ߉ãŠîôñ8'â}E«q.ÎÃù~×nõþé ¡ÿO_ä¹» a¦™6ÓLfšíƒ±¢,Bã˜Àf˜DUèÚÁbìSÌ›bçƒcœ’ÅJ þ¥÷]x76}—ÆàsgžökŠÈD™h#md¢L´‘‰62ÑF&ÚÈD™h#kÇÄÚyÒ{‚ïÙ}eÑ,í‡'¿cƒé(2E¦£Èd ßÿ»ÊóoòÜÁäóiÎÍÎXsż ¨ij–¾<ü4u£Ô.z¥¯bø9?¿ë.Qìg¾áD~¿Çpÿ›èú½ß1Aõ=öó]êþà½Ä¹?ç‘Áû‰‹¾i(6¥¦ Ø›€Ú&œ– §eri™\Z£&¸Ñß+V޾µX9¶¢hŽ‚âTœ†ÓqÎÄY8ç`5ÎÅ“ßåéÒ‘.éÒ‘.éÒ‘.éÒ‘.éÒ‘.éÒÑÆwvÄÃwuüâs…ƒwv4Ë£àDy l‰м\sû‹wv4Ë»coüa‘–ÿÇáxœ€§¾Ûã±Ï#ò |&ÎÚø¾çãt›“p2ÎcuŽH§ˆt‰H—ˆþÃûœ.úºAøžæG$þÕEsr× 'ÞÑIÜHâF7’¸‘Ä$n$q#‰IÜHâF7’¸‘Ä$n$q#‰IÜHâF7’¸‘Ä$n$q#‰IÜHâF7’¸‘Ä$nTݼhVwÁJIóÎ"¯¾×cO¼ScCÕ™³êÌY=Õ÷ímõ,÷ígÕ~V×xìB?sY‘U//zÕµ¸WzÎ5~öÏùcÜ"¥?/Ñzèã{Ãw|Ä-•hmiI³H‚¥SK¤ÒVØÛãE¾¿†Ÿ},"ÉI¦H2E’)’LÑô²¢9½_±az€åx“„:ÈããŠÃ°¢èI²¾$ëK²¾$ëK²X’E’,’d‘$‹$Y4ý.'Ù$ÄŒ„˜‘3"Þ˜ Ñ Ñ Õ¾^µ¯WíƒóeW•Ϩò†*o «ü8gUÿt± rgTn¤r#•o¬Ü™aå>V±}ÏûW?“{{Th×™¥§J[*´¥B[ª©¡šªið ̨ŽõªcFuĪ£¡ Ÿaø Ãg>Ãð˜áñ&†7¾ž½ëÙ»ž½ëÙ;˜eºìí²w=SLm°d3ìhl´c†3ìX`Æ #˜1!bBÄ„™¡ ·0å{¾÷c}úQ†üÿ^,èe=»¾`×#»ÙõH¿¼;oð¹îøiwu…9\_9oÁ‘x›Çß%y_o·ÖÙ­uvk]jÙ¥–]jÙ¥–]jÙ¥¶]jÛ¥¶Zg‡Zv¨ewÚve]éÛ•¾Så‚YmÚv mÚV?¶ú]«ßµúƒÿ=¢eõ[Vðÿ/­³úm«¿ÎÊ·¬|Ëʯ³òë¬ü:+¿ÎJ·¬tÛJ·­tÛJ·­tÛ ·­pË ·¬î:«Û²²«­ìj«ºÚŠö­hߊö­èj«Ø¶Š±UŒ­`lõÚV¯mõÚV/¶B§»V¤ܤs…:W¨s…:W¨s…:W¨s…:W¨s…:W¨s…Ïøÿ¼Üé7Ý…¯ãnĸ÷â¸ÜеZfI]-ÔÕBgþ¶Î:ó·ùÛÎüm)Ô‘"(vFo;£·‡ÿÈO‹Üy¼=ìD“Ã.ê¡.ê¡.ê¡.ê¡.ê¡.ꡳ\ÛY®í,×v–k;˵åÚÎrmg¹¶³\ÛY®í,×v–k;˵‡ÿÏÄ‘ns^9ÁíInOÆióÜ?fg†¶äÚÎ mg†¶3C['‡ÿ‡Än›¸yøÿH´ÚÎ mg†¶.šóÛæü¶9¿-ùCÉJþPò‡’?”ü¡ä%(ùCÉJþPò‡’?”ü¡ä%(ùCÉJþPò‡’?”ü¡ä%(ùCÉJþPò‡’?”ü¡äÍÚm³vÛ¬Ý6k·ÍÚm³vÛ¬Ý6k·ÿï‚tŽ¥s(CseÛ\Ù6W¶¥r,•c3cÛÌØ–Ì¡d%s(™CÉJæPª†R5”ª¡T ¥jÌ22ï±û.ÂÅq .Åe¸k±ég¥4|§ë`^Ê™•3+gU>ü<³4bTΨ ’³[ú®ù'UǃÏ0?6ã<:|wêuœ«ãùÑQ†•Í=ãîOÀ Þ|³Ú|3k¾™e^μœy9óræåÌË™—3/g^μœy9óòág’ñ9äÁ»Aså,ÊÙ“³'gÍà 9Cr†äÿá3Áy쟇ïÝ y7 ?ûûH‘³$gIÎ’œ%9Kr–ä,ÉY’³$gIÎ’œ%9Kr–ä,ÉY’³$¯ Þ]e=Y’³$gIÎ’œ%9Kr–ä,ÉY’³$gIÎ’\roÜ]§’løÙ\k(wré=°£/ïÚÌ’Kò®HæÔñä>¾ïm_l`MŸ5ý©?¾³3gLΘœ19crÆä’}ƒdß Ù7Hö rlžE9‹rå,ÊY”{ó¶ìh²£ÉŽ& šv»i·»v{Ð+#;Ò´#M+Ý´ÒM+Ý´ÒƒÏO6½š¦Wy5‘W¹â®+îºâ®+tÿn0R¼{ב¯ùÈí¸ó¸w±hI‘˜Ž“ÑíŠrjBNGw÷øRì½°¯ïPdcw³$Æ=¦Óâ^;½3vÁ®ð|çÖçÏÓRê\¹àì˜;;æÎ޹óbn‚JMP©sa;gåÎY¹sVîl•8GåÎMI°½«]pµ ®vÁÕ.¸Ú…ÑW¸ºW¯pÁ.¸Â…áÕ=ñ šW¸à \á‚+\pe ®lÁi9u5 ®fÁÕ,lüÓ†ÚîÖgþéþÄÁ;ì¬Qßõ­QjºÖ¨;º£Ç_a–y%6½š½Tá¾n°NOw5;«ˆ]ðØUÝäªn6KÜêöó,½ýÉWiÍæ­Yךu­Ù¼5›·fóÖlÞšÍ{ _ÅBP{ºO¹ú®«ïnråé&+ûÄ'‘^U$›~iøé¢{‹Îð“B¾?üۆϚ‹ç0¸ÒÛÜnúiœŽ¯7^éðS7¥Ñ·õÑcƒzp›™fÖL3k¦™56žöjû.þÿˆyÎOÝþ ø7ü¼˜©;=;ìŒ]°+vÃËá5xM#»c)öÀžØ ¿ƒ½ñ*¼û`_,ÃkðZì‡ýq–ãux=Þ€ñF¼ ν#o†³ïÈÁ8‡â0,9'à‹E4ò¨;8)ªkÿߪê®jºª§qC\@w‘ŒÆ¥c"(Æ%‰œø0/`\tØÜ"‚JÔQ@cG†vÁeÜmâ‚´¸J³Œš‰ñª”h%b¡¡Þ÷V÷ 3Ã`„gþÏÿ§?ß©žî®®[çž{îùUWZ6jÏÀ"(³ÐÕ¯ Ç„ mÉ΂: ã`,&ÿŒåçaÎØE]×·ñhz§ ` c¯ØÃr»"IC¼†¬zèäYñí`ûH6q«+ ¢jZl—¼¯¼¯¼¯Œ;GÆ‹ªb©£¼ªëYèÂ=Ðýa¹!9cåèfcttsTØÀ\’³F³œ ‡·AýÍ|‘c¾ÈYó|-aCBÝ9a"q0=Ÿ@Ï'ºUÂRPi¨†î€¾Nô²éäQÓVêuxšá- 6m°Õ{¬†[Ø´Ç^6Ë6DžÚû”ÿi+Ù}.…e.ÈUm6Tõ‚mÆ4GZ+YAk­X^`yå–ï²–âÖÕPl?²êE–å˜À…0 =7¦ÀT˜†&ÛX Oy^ÏË·«sçV¼®^Õ¹Ûªºu·†y¼2Wæ#ï[‰—m¬§¼­oË«Zp_YómÓZoy[™ŒÞÍÔzëì¹õxn½‰-Llç;Ô Cïây§ŽèVîí|çZ^ôt}k}.q- ÃEa¸( …á¢0\†+òp'ÜwÃ=ð"¼/Ã+àÂx^¬‹êpQ.ªÃEu¸*há 2|A†/Ðq'ÐqÄÆ<±1OlÌóÄÆ< ÅE¸¨·R#O ÉCò¨¥P\Š‹Bq+Õ/Ѝµá¢6\Ô†‹ÚpQ.jÃEm¸¨ µá¢6\Ô†‹ÚpQªZEžØ’'¶ä+Õ*\ ¯E¸•jEÆ|%âZY@±£D\”ˆkMé€:F¸(â¢@\bDâ¢<\k`#Ô‡‹úpQî&Õ&PIÄ¢…J²PIÄ‘|¥²D‘X’G©¸(¥â¢\Ô‚‹ZpQ .jÁE-¸¨µàòć<ñ!O|Èòć<ñ!O|Èòć<ñ!O|Èò( ·RÙ!ºpQ.êÂMõ…;Pd9/t‰yâCžø×2"&’"&Xu߇dtp Up …1a㼎q^Ç8¯eœgœgœgœgœõ|ë$Þ› S`*LƒËXÿ7p9L‡+`Ì„+á*¸fÁã¢Fà¶ó.¼ÿDó|ÊŒ¼>ƒÖÁçlï‹0‹'fñÄ,ž˜Å³Úï˜ 7Zn[á6øÜw–ѰŒÆ¨Ñ5£FcÔhŒm>Ü ÷Áý€7hð <Ã#xñþ"©Ç„uİZbX­>BÄõxíÇp2ÔÂY¼_f YFCV?›Ïü‘×…E¼·˜õžçµ&þ_-juŒŽú—"Nfy1*¬#»<È8e–Qƒ7¯1 —ÈoКÆ;ÌÊïñ܃ŒEMl¤HƲ0&Âp!ÔÃ$˜ S`*Lƒ‹àÖ°–xYK¼¬-åÿ,ƒå°V틽oÀ›ðWhlÎhÌ2³ÄÚº8^Ȩ¬#ÎÖgk‰³µñ‘4 À÷ÌÐúÂÀ°ÖÜ“å0Æ…uÄÏ:âgñ³ŽøYKü¬%~'~7ñ1sàc&#Õ¤¯­ ì »ÀQ¨# Ì d­³DÒ:΃‹á¸æòÞ,o…ùðwÖy$àŒîŒîŒî£;g}$âÖ?àcÖ[Ëûø"£LÄÓ‡Ã÷á8–׆Ã8އxýÇp"œ?çµÑp:0FÓ¿Ií$cn‹ƒ $ $ÁRPi¨†CÐÑCEF\ÆóßÀå0®€0®„«àj˜¿…kàqÖ-„RÓÁ€ÄÁ Ð ’`ƒ)¨‚jè= ' 5T¢Ö ¶…í`{è;Ã.°+ì}¡ì{@ 'ÀáD8 ¦Â4¸.†KàR¸ ~—Ãt¸fÀµp4Àõp̆907úý®¨Ù,ê?†“££šE}&ï] ³¢ßìŠú£ÑÙHE}5ª—}6Ø'ƒ}2Ø'c „}`_8 ž O1Põƪ°ÑxŸåjqªlXo¬ GŸ‡;_„¶ñå†uF Ïׇšñ/^ßÀó0<0ß°>f†£bV¸s,Ú±nÖÅ’<·C-æðzŠçU|ndXŒ}c`"\B=L‚É0¦Â4¸neìø#̃<Ü wÁÝṗ{á>¸€Fx‚‡áÀ&±ÇŸ‰á3±ðxž„§àiXÏÀ"(ÂRÚQ‚eÀl[+ûÆ^‡7àMø+4‡ÅxKX4 `,˜Œ³ô„¾°'CàêPšì›É~™´ß¤ý&í7i»I»MÚmþh¯I{MÚkÒ^“vš´Ó|^‚—ápa ¬€•ðxð!¬§°>ƒu¡´V cÁÂ?,|ÞÚv„Þ0†ÀYÑQé¢uœ‘.Z—DG¢Õ‘ç¢u+ÌŽ0ã³LÔ5°29øL²®‡\X´JûXàsö8ŽÆÍ²Õ‘i|ÁÆl|ÁÆl¶g³=ûR VØÄ ›Xa+lb…M¬°‰6±Â&VØÄ ›Xa+lb…}-ЛvشþfØ ìƒ}SXtˆIÎ^À¶¶í°m‡~qð ¿pð ¿p°»ƒÝ잢ŸSļ1/ÅXMÍUu–Âbq¯Š¸WEÜ«"îU÷ÒÃàX#à88ȹӣát`L§A|3Œ¥ŒÈeŒÈåb¸½Ëã._¿„Xÿ"V|Û«Ë? å36}íyx^„—B¿í8 ¾CÆ'Éø¤„Íúº°¹Ýq/ß ímÎD\6KÈà^%–-§u:¦âÇ\XUidZ’LKn¶êyë1”ò±ß|‚èÊ@ßêÏó-¶O†$É„$Y$›‘ßX•í3B¿Ý±Iö É$Ùƒ${d’ìA’=H²Iö É$Ùƒ${Ñq¢JÖ¾ó,uÆÏÚ¨êNSª&lNm½`vTÑ@’H²ÙV©úŒ°y“³iT¥Ý@áäw¢Ê(ˆaÆæ‹§X>-¶§/æψ>Æ"úÃ#é—‘ÆRÞ+‘q/#Ã^N­}„eH^}‡O­âË÷E†ï,’ƒ` üê˶mÕòLeë«Uõ_]C'hèíÄ(÷Hjg‰ŒVcùž]DÆl$~”åŸY’c&'eÄhÏ0F“ÚòH湑´£ý+«ØÂûa Þ¡I¶ùû²Z ãÙö`9-7xm­Vjaÿ-a{K+ï™ÆÉøàOÃŒŸA–o]b‡òM¯yµÈ+jd?ü×ÄãD’ÿZ¢÷FafÐff…™Aaª{žeø– 3ƒÂÌ 03(Ì **ƒŠÊ ˆ2ÆÉØÿTì?ÆñÿÚðtXâ[K¨š ª&ƒªÉ j2¨š ª&ƒªÉ j2¨š ª&ƒªÉ j2¨š ª#ƒêÈ :2¨Ž ª#ƒêÈ 82(Ž Š#C¶!ÛÎmgȶ3d­²Ö ™j†L5C†™!£ÌQfÈ(3d”2Jö)Úç¶^€%ž=ƒ™ÖªÑÜh<z¨·¬ØÿÚžw^}!²cOíU1@{M ÁÒ§`Ó}±é¾Æ©|r”cŒfy:ËqØ™™Ê˜ÈwΡæB!\ƒ§ Û™;X ‰"†`ùÊQn¶5ïÈÒÛOD½2?Úš]éÏrÏÆ;µÅ;^¥¥Œ+£DÛ”_®PGø¤Ï'}ãçøÃ/àU»1ÝhMÀzZäģț–ò¼D¯ó‰h}‹­ù|‡ä;$ŸV#(Yö»0 -§Uê+Žç•%|Ÿúö×°ÜRlÔ®ÆJ>¬´¼õ»j¢ï*¯°FR}g´U‡O|2à“AÛ>¢öÚÖZí‰Z+µäHÁXïÂ{ðãõKhõð/UARŒÔëXŽ…qªj$+÷W?¶ÒÏ8oü9ýTÙiŒ1žÑ~[H$ŸÚúÌÅBj|©v/å½exórÖY¶Ð‡ƒèÃA1¶Û¡ï!FZ£`´ª©*?òüm@›­ym-Ë@UW„7¡Þ‚·xd¿Ä#{5‹ì€õì5b€ó©é¬UÕ¡lËþ¦*½Öj¿€=€ öl@äQe&+V—ÆJQ­UhçY’µú°–d­>Qä([]F=\öI¼=™þoíÕSÙî(>=šåé,'°–d›ïª\žmy¼ö>ß²:,àÛehbÍ&CÝÏÆbÝÖ«1Îçó°•U´ù}¶¤ÞwðÉ·©È»£CÿŸ ¿uõ1°³î©|rtåÓ«ø^Oi‰0g|Àÿ2ÿ*jâÕaÿ>sŒ‡³á×0&†Š7H©ßäÕÞºmm>µRaôühOïÐÒw!ÚÓ¨åÄm>ÿa;ï/ÆÖv©µ$íZÅ7xÑI±¿ƒŸ ¿„I0¦ÀT˜†?„caQäÇf[ÜÅÌw:Œ#fЧShÃ>7î g ¬ŠåyŽ÷ÕVUýáƒÅ0|wXìPu» þ FÆ«á#øDŒ4Â8gïa²ºk0ÀûQO‘/Œ®ô»Ú/¹igžvæ+žRSñ”ÚëcAØ/²­ ÐwëÂzôÞ@ôÞ(ãK4_ ˲ޫGïˆÞ;½·½WÞˆÞë†æK²,ë½zôÞè½b5¡Û&<(Ö ¶…íÂêØö,wûÅvdÙv‚>|ng–»À®°Ÿë˲ŸÛåÐ?<ˆZ`ÏDYF’ì"ɨ"‚FùÃ0µQ¼ž)baNÄÁ Ð ’`ƒ)¨‚-ùuçrí¡°¿ò ÛsÑ/6‡±T¿Ú°>:=§ßæÑê úc<Úÿ‚S¾ªÈÕ—Ew7È¡shçÚ9‡vΡshçÚ9‡vΡshçÚ9‡vÎmͯ>~åi sѯ;F˜CËæºü•§¯÷„Ö_{úò¼ó/>{òšúÅç–C`3¿ütøUçº0‡^Ì¡sèÅš,‡&ËE¿ò°ßh³Ú,×á—ž›ø_ݹå–0×úkZ+‡ÖÊ¡µrh­Z+‡Ö"KÙªk ''Ø ÓP+­×—¡vP-~ÛuaÏÑsKQ[s­Ó­DÊÛà¨u}Ï',¿Î5>(¾M®ï¡½®ý`f@Qø¨¿ý5 ­ç㋾Ä÷"ñ½H|/v¹ÇDŽŶ½]Äó"Ëgá¹èlÐ-¯ŽÎE,ªÖG-###Ö‰õEb}1jYkkÆ¢±U‹®†Yð[´ÇH¶7v‹Ž(n¼^Ô§o}úÖ§o}úÖêÛN€Ép0kÓ·>}ëGGÖ‰jéO?:Švý¨®ù#¤O}}iTWpËb]ÉzW{‡øø€øø€øø€øø€øø€êw_I¢ßý¶£I¨Gúßo;¢„bÅüèÈÒî,Q¨ø‚/øŽ4ýœÿ‰ûø„O(ðñð;™ÙäèÇ zc&°øˆø›;‚ª-¶üfF•õÂÆQUî爗ª¶Â¢F•_U~›U[­ÙÙ’åQÕÁ‚•QµÑŠGÕ&CÇ©úI‹˨s²I–#Ép¤øé–÷Þ丯:Æë“™ÌâIu'„-;VÙá˜ÞWÏû¿<—aSÛñµ]y¾‡ª°¿™ck]CÓtUñ^ý ĉX[bm‰µ%Ö–Bõ±O¨ØGÄÚkK1+ºfXbm‰µ%ÖVGÔ¥þ·¨n¹ÄÊ+K¬,±²ÄÊ+K¬,±²ÄÊ+K¬¬ŽœJ¬,±²ÄÊ+K¬,±²ÄÊ+K¬¬ŽzJ¬,±²ÄÊ+K¬,±²ÄÊ+K¬,±²ÄÊ+K¬,±²ÄÊ+K¬,±²ÄÊ+K¬,±²ÄÊ+K¬,±²ÄÊ+K¬,±²:‚)±°:j)±¬Ä²ËJ,+±¬Ä²ËJ,+±¬Ä²2²©‹®hw=€:^ÃR`)0‡į°ûYPäõ‚œ_ó r~AÎ/Îsá¼HOH‘Fˆ`„ˆ àÂhæ-# Ĉ1¢@ŒPç\ˆâCyH]Å csà v#Ü¿ƒ›!¿‡[àÖ°@ (Ôµ<æ§‚‘Ä‚B|š$DÐ@‡Þ° Ì_æ¯óWù«`Òn“v›´ÛD™ÙH¿D#Û¤Ýæ…Ñì[ 6ˆ êš–ñ¡úÄua‹h€ëᘠs wÂ]p7Ü/ÂKð2¼.,Wá5X èC± –C´¿m$ÐFb5|Jù€ ÿ”˜øÖ@ùŒ•®î8^_s’Xÿ"òŒ [ô1p&¨kKêx™\_ߢ ŸÀ§•ëHÊg¬´ÄP˜±Õð|>|ÿÖ‰±Nl üX7¶>£÷XŸ£9ö%´Àz =± 2göóÖÑa‹5NumIùŒ–¢5–ÿñ@ ´ð@ ´èI+ËëฦÀt¸®äý«€¾²è+‹¾²è+‹(eÝÄòXô…E_Xô…E_lr= ZËzPÙ}bÑ'í΀i½Ã²º#_¹Ãr1I[’õ09l±és›>·ÙŽÍvl¶c³›>·WÞ&ºÛDvû-xÞ÷À¶ede6Û±×DçØ—¯‰YKt­[RÝ¡ô…ò0-©yaKÕ6DØ^°-}¯‹C„ÁCˆÃyhâºøCü7˜xŠG\,äaŠ&–XÅ#¡¯/ºi7j7Ф>X,l}¸>\8zVÏŠ”>QŸ(ªôIú$‘Ö§êSEµ~™>CtׯүÛê³ôYb;ýý±½~ƒ~ƒØAŸ£Ï;ê‹õçDo}¹¾BôÑ?׿» #!v3ªŒ´èkìnì.v7ƒÅÆÆ¢¿1Â8Íx’q²ØËgŒûçˆýŒ)Æñcš1M|טƒvbÜoÜ/61‡6þ,†£;‡®±RüÀÆ‡â„Ø€Ø1*v(Úó4g´3ZüÜ©ujÅhç ç qº3Þ9[Ô:ç9ç‰3œUÎ*ñ_ÎûÎûbŒóó8ÓùÌ Ä///ůһ¥wg¥÷Hï!ê„–Ú uOÈÿÔÃ8€ÌÚ'³&7QG‚ ¡ŽR¹™µOfí“YûdÖþWÜQÚG'ûèd죓ý­RV›»6ö""ÒÅp \ ÌdDMIÔ”DMIÔ”DMIÔ”DMIÔ”DMIÔ”DMIÔ”DMIÔ”DMIÔ”DMIÔ”DMIÔ”DM)Ô‘5foÑÌ6þoÁßámÑ5 ’h*‰¦R¬ ½Ê}ð$QR%%QR%¥ºÆV¨9ñKhõ€†Öô°I3 q0ÁRw „n@î¦Ùà@ ªà랟°ì½a§Ð×ú°îΰ /i»A_è»ù“Ö„yMÛö‚½aØöƒýáÂ`ø|†ÀAp0Ca ߃Ãàpø>GÂQp4dàÀü­1k?æpm8Œ€ãàxÀ?4üCû ü~OѤMƒ‹àb¸.…Ëà7p9L‡+`\ÝYÄ×n†Üè  ¡´Ûáø#̃<Ü wÁÝṗ{á>¸€Fx‚‡á‘è7Í’¶í=‹ Ïv}GÔ¦¯ ƒèèÁa‘Ö‘úpþW•ðGñ| œ dŽÌª.³ªË¬ê2«ÊèºìÖŠ¬£:–M›Ô1T÷“˜ÉëWÂ,ø­ªÉÆë]W_õurn}.ÿWª¨¡~}Ôo ?ÆkÃÆj7~tÝ÷sðíq#U,õe¬³œç+€|ŠY_2ëK}-ßñYôû­¯¯ƒÏ£«ë ÞGÁû(xï£àý­¬XÓ»ÔÝIçAî„»àn¸æÃ½pÜ@#<ÁÃð< ÁãP€ðxž„§àiXÏÀ"(B»ëAȺ$Y—$ë’d]’¬K’uI².IÖ%ɺ$Y—$ë’d]’¬K’U¹dU.Y•ï݃Kýn^ˆo½`[ض‡òÝÂËG¬Z*G¬ ´2óŒÉcZ‘Ö.ÁªŠŽbøfÏHw—fí]3ïorT‹y%º;ø0¤í.á›éêêÚú)|çT˜—ƒ:çfVtß$.D×È܇ÓdÒGæü°Ù¤?Lúä?LúÀ¤Ì?Eçá4™ØÞÄö&¶7±¹‰ÍÍç¢sqšÌ—àex\XêÎ>Ì/æòÊy9oðZst^NSt^}`Ò&}`ª#ŸDçê4™Ì/æ§°>ƒ ,XÌ Vª¡;ë­>°3ìŸP²ú6³Vî„ͬA†Ã8ŽW÷ܤ>†:ÉOÿŠçÙèÚ¬Rz:¹µ.‘Õh¥Þbwþ;…‡£Gÿ.jr¾~ŸHÇ.Ž]!z˜q3.v0kÌmÄŽf?³ŸØÉü¾y´è“œ—¼Wôu.r.{ ­ÇÓJui«Œ_ëñ~W3oæ»åÊËÎn9õÎæ΋]=Êk¥š6>:·£ºA­]}cù¡Ö©~²º©zUõÚêµ_Ý~õíêÑ]ïÞØ½Q­©¶ÔúÜx¿{cõ8ióûºé^vl{Ñ|úëYµÃCí»²™¢Ü&µÍÖgåíw|½¼j?ÔZê±±uÿÎò-]~§[®üý€¥ËŸ«nR¯·Z|㣫=øzŸêúÑź›õž®›®ßñÑÙ×ð›'•×lÁãßl¡ëÇ×Û{üP/÷pûžî®·¶6²ÐÚêU´»§+ïUŸ/{q÷FÓjERSW'œÿ%’ѽ0”o€ò P¾Ê7@ù(ßå |”o€ò P¾Ê7@ù(ßå |”o€ò P¾Ê7@ù(ßå |”o€ò P¾Ê7@ù(ßå |”o€ò P¾Ê7@ù(ßåü?T¬Í(ÖÅ Xk€b ´Å¼÷êùyxÈnQ­M¨M¥,›+w*ô£šû¡ªö‡PXƒà@øNtÆMt® ¤ Ò„iŠDM ÔC€zPê!h—‘«¬Ye¼An3n3n@†«jø30™nS%ÓU5 šÈ²Å€l1 [ Ȳŀl1 [ Ȳŀl1 [ Ȳŀl1 [ ȲÅàËËÙasT[áf~U_¡\[¡‰Y»‰Y»ÉYÕTð™Y›™!fHU_ÁO“]¤Q2éqpIØ$žøÖŸÛý;<èfÈÁ-p+Ü€Ûáø#̃<Ü wÁÝṗ{á>¸€Fx‚‡áxºö^ÙU¥ íeÚö ¸°ÝXÂ3ú†ÍF?Ø=òè:UÑ­çWµ¯¢G›;ðèr¥¢óȳ©r.ùNxjØv= ?lôìÖ»¼}kÑ·}‹—/,úî;לQ‰§xz€§xz€§xz€§xz€§xz€§xz€§xz€§xz€§xz€§«*"žàéªÖD3Þîuª$¢òÓfòÓæÊ`ƒ¶sÎ7½l ^úÖ{ýµxØuÐ×à À^is`nÓÿ¯GEi3£¢ã½7ŽŠ5Œ —Qáûn2JÆÐ(ÆÿoF„ŒFÄÊhTÈhTàu^gáu^gõŽæ€7RJŒ”Re¤´¿rû‘òÍ]•ñÍ”5Œ’5Œ—Q²¦Ó()1JTmV—QRê4JJŒ’£¤Ä()¡ŠüJí_ù^Ðôu¼@ÝË£­²P_z»lœéÛ{Bž jV5mR]¨µ‡›¢»XwîµÖkh:öZûSÖy Š¥NVQUkKX¥]Ç2;š);^£’-Ç´:Ããþo}ìø]è«® ti©KKUÝ{—–ºíZªj»«Þ*åim@KZêÒR—–ºQK»já%ê¨TtåÆ;¢&z6 z¶ö´¨Ñžƒçáx^Rµ `(jb¯€ ¬oÞ¬j4‰kè{ŸIœ!j^w^ƒ¥¢&5[Ô¤/QÛÅÞb!Ä~â þ;JüH8š®¥EO­—ÖKìªõÑú‹Ý´Úžbomom±¯vªvšØ_› ])Ô®Õf‹êé‹ãõ¡ú¡âýpýûâ$ýhýhqŠ>AŸ ~¢OÖ§ˆŸêé—ŠSõ™ú•b´~µ~µ¨Õgë³Å/ô¹úMâ ½QDœ©?¦?&êô‚¾@ŒÕŸÒŸãõõ—ÅÙú}‰8W_¦/玑罌íÄccq¡ÑÏè'êþÆ@1ÉØÛØ[L5ö5öÓŒ¡ÆPq‘q¨ñ=q±q¸q¸¸Ô8Ò8J\fœbüD\››)®ˆÝ{TÌŒ=+ŠßÇ«âUâžøñ7Åüø»ñ÷Ä}q/î‰âëãëE£ÙÝì.4{™ÛЇÌÍ]Ä#æ1æqâOæ)æiâ ó ó Q4gšW‰gÍÙælñ¼9ל+^0ï0ï/šóÌyâ%s¾y¿xÙ|È|X¼j>fþE,5Ÿ2Ÿ+ÍÅæbñºù¢¹D¼a.3—‹¿›+Í•BšžùxÇ\c~&<óss½ð-Ëê)ÖXÛY½ÅkkͰ[ƒµ˜u¨u¨O Lì©™‰ýûi‰Ä?Ôº%†'†kÉäèähÍNž‘2}¤Öœžœž¦ý-===]“é™é«´w„–ý’s¾=mµèA„ì d€‚ P 2@A^#˜¥³”ØSEQ8„ñ8¶æ|è1a­8~ ÿÍ,ð+r4‘¨Sµ M$ÆÃÙðk8Î…óàü°QdaL„ àB˜fÅd˜SalI¬ÇÅQ€­«‡U/Þ…÷`ËÎDÌmæLÄMjg‘A•È JdP%2¨T‰ ªDU"ƒ*‘A•È JdP%2¨T‰ ªDU"ƒ*‘A•È JdP%2¨T‰ ªDU"ƒ*‘A•È JdP’ Ê'ƒòÉ |2(Ÿ J-“ÌB’YH2 If!Ùvû1a­þÃ0« Ãyý¸èÌÉöµ¾ê7©õõëèh[3³²[9Ú&£üŠš¶sáF×ÝÕêE¾ïYX6êÏ…óõ—ø>7œ¥Î“×—³\«Å€NõÃêÛjJæô/È(Êw#Rw"r ‹eº1ƒ¦¢z“fÓ³©d6•̦Ò8ˆ`hø¨qËaÑ8Y$ŸÂÏàÔðcŸÍòt–êÚ×'Ű­:o.æpün†ün‰®–ÉÆnƒ?†Y]2«Ë­ª‹öïÏ2ÝX7­:¬%Û-Å{„õq²ø[ ®+øˆ×?㟄Yu}A|C(ã!ZH€:˜äF´^{PÅóÖëzóþNÑÕ=¯CÈšÄs(ü:_“0.¬5ÇÃÙðk .˜Ä“¸`žÙèʃF“¸`Lâ‚IL +/‘•«z¡J¯I2ñ™x‰L¼D&^"—dâ’LÜ'WG[•º.‘u«ú²Sí¸úJ½Èrí¸®Ï´Ý|=¹gÚni]¹zëm@¼ÙÌ™¶åZ•Ï´Uµæê+g򾃿Kdü%2þ‰Œ¿DÆ_"ã/‘ñ—ÈøKdü%2þ‰Œ¿DÆ_"ã/‘ñ—ÈøKdü%2þ¿ìp}H»:vÉwÃlRU}úOÔ³S÷P¨‹®Ÿ­uÆ…Yg|XtÎ ësAÝ?a2KuÏ„vר8ÿÃÞÇ7Qí?3I焜ISöUPÀíº"(^7”«âJ*®”M¥,U,BYR–²”%ˆöŠT…ŠT¥(¨DÅ‚ T¼×ªDe*2Îï“i‘EïóÜŸ¿åùçyñz{¦3“iš9ó=߯IæLeŸLÃt¶?ée½¥ÕïIWØ+ÉÅK°Æ«bÊÉ€ËÉ€ËíOø™þnïÖ…Õ÷ÑËMÞGÏÞÏÏÕ3Æx3Å_½ï_èÝgo‚7·BñÑïÊP•‡ž¡®_Èö?¸ÿ^ø]î¬cá;uaòþòÔ%dÝåÔ%d½µÈR…0/4[ e¶3Û‰¹È\$RýýEØŸã-ÒR*S*EËgùÅ)V-«¶hfµ°ZˆÓ¬VV+ÑÜjkµ-‚ƒQÑ2X\$.´Ï±[‹¿Ú£ìˆh¾9|³¸6|Køq0 ðr•zâ’ÿŸ~ÆßX ‚P°B*Â:C¤¡–Ž‘ÄÈ?bä1ò˜H~ûLœ…³ñœã}®ê»ªí½ÏãÆÈAbä 1r˜H~S‹×$F#‰‘ƒÄÈAbä 1r˜¸—ñ·2ѽÐ'7Og‰q:"ÆÓNÀD½@äc’.“ï§°n* 0¿a:fèµä¹ä¹ä¹ä¹ä¹ä¹b.ÛÇ¿ûlć(Ã&lÆGøŸ` ’÷8ù”ÇlCœåí´Ÿás|c3H–ž0ƒä×ä†ßà[ìDß!ù-ý° vãGìÁ^Tà'޵×äg쇋øÅ»oóï>¿,Žð<´^k0uÄðÁXºÐzÐsºÀ²NÁF©HÓYFMÔBmÔA]ÔC}4@C4ÒyFc4Á)ÞL–¹F3œŠÓXל¶¿£%˧ã ~>\×€Á5`p çâ<œ p!Zá"´F\ŒKЗ⯸ —ã \‰«ÐWã´Çßp-®Ãõè€p#nלÁ5gpÍ\sלљ瘎.<çÛh»¢Ë¸ÝqîÑ;Œ{ECƒ¼ÉÈg=Å0£—¸Âè-º}hû²ý>rÞûi@?]fd¡?ûbý<‚¡†\ ÇHŒÒÙF£1†ßÿ(Æ"ãX70ù˜Äc¦ðœ¦Ò`¦c†Ž3åœWÍæ5fcæâqžû:NN''““ÇÉÉãääqrò89yœœ¯àU¼®]£«ñ:ÞÀ¬EÕ=½cäï1ò÷ù{Œü=f¼‹õº„¾„¾„¾„>flä1¢ ›ÈÍ/$‡o£óª?»¼_9~Ì$#·ß`Rß™é:Ëì‚ÛôZ³+º±œA{;ºã܉»tļ›öÜ‹Èdßž´½Ð‡í}qË÷ãïóàñ“>1‘¿g“û?ˆ‡0˜çù0rx.C@¾geŸaºÔÌŶÑÌQlÍsƒG1y¬ÇïO;ÇLÒÙædLaÝT~.`yšŽR“”™3Ø&¢˜…Çx.³y=ª>K^h>Îï%Ž›‹XW5{jò>kÍUxƒ}Ö€sa¾ÍkWõmùä÷Y³LâŸIü3‰&ñÏÜ/9ö?hÿ‰¯¼ù5ŠÍ¯yÌ7,‹Hà;™?Ðî‚ÃònÚ±‡cìEË?|Å›u?¯é±Z¨Ô<Èó<Äó¯dŸ_½¹:JMâŸIüóæÞ!þùLø¨kˆ¾–‰Gçäñj¦ ë‰ÔOe¾T¶‡Y—†š¨…Ú¨£s|uQOçúê£êb_#ŽÓ˜íMp šRc5éÞL®E¾æhÁãZâtö?ƒŸÏÄY:Ûw6þÂò98çé,ßù:z\ WB WB WâkÃ㉾Kد-.åø¥½ —³ï´Wâ*žO;žÛÕ,_Ã>ײ­Û‘_}<þvéë®Ó|w y/šä}hè|j¾äO\ßNö¯º§äE¾¼ÏßçøÓi»PGå°<`(†!ÃAmâ‰Qˆ`4&ëõcŒú1Fý£~ŒQ?ƨcÔ1êÇõcŒú1Fý£~LÞC2â_ˆEX ò?y‚Ÿ<ÁOžà'Oð/Å xËt®9ŠñVàe¬D ^Ñ;ü¯â5í_…R¬Æëxk°oâ-¼uˆáþæw±ïaÞÇ ÖP¿–P¿–P¿–ø?ÖYþO°[ñ)¶kÄ¿Ÿás|øR¯õsø¹Fü\#þr| ®?׈ŸkÄÏ5B]¡.ŽPG¨‹#ÔÅêâuq„º8B]¡.ŽPG¨‹#ÔÅêâ8uqœº8N]§.ŽSÇ©‹ãÔÅñ¾'ÒkSRQSÇ©ã)µõŽrÖrÖrÖrÖ”hˆmøvbõs¥W3'c‘#[):ƒZ9F­œ¼ûAŒZ9F­œ¼§fŽU‡š9VýÝjæ5sŒš9FÍœ¼ßf²fNÞ !Çj ÆujçäbÔÎ1jçµs̺ŸÇ?€~ ~²úã÷ßȲ tž5SY³1OÇ©›ãÔÍ%ÖÓ¬†uô3k‘Þa-ÖÙV??‹çð<–`©.µègýÌZú˜µ‚}_F‰.³^á8¯²ŽqÌZÅöR¬æç×ñÇ¥³è[}Ëz‹}ÞÆ:İžÇÒŸ,rOëößÈ>¢ ›°™ç¹…}¶‚¾dmÓQ+ÎþŸ±ïÖ%xÜ.Ö;,ïÆØƒ½¨`ŸŸ@Ì´¨™­ý fZhóœŽ@ëRRS@ ”Ä@©`#„T-ÃHCM$¿¥K ”u@}'©ï$õl £²!¡1šà—MÑ §‚(‰²Zât›Ç"&É%y äÜËsu‰<íçã´âñ䀒ø'Ûèˆl‹ËYßíõZyΕ×ëbyÇêĶtÖu¥eü–wxß™ˆË{Ø–üÎDoÖõã³ì§³dmöÀ>1Ùx±}0Ö2‡}†àöJ; ÃYI;Š6‚ÑÃþb,Ëy‡ñ˜À~‘Ïò$LæøSPÀò4PcÉ™<.J;‹ý›ålÌAò{³mç|Zê)¹”–:I¾ê$Iü“ÔIò%¬ÀËX‰P'Iê$ÉX.Ëe)Vs\ê$I$©“$u’¤N’oZIR+Ij%I­$©•$µ’¤V’ÔJò}|€øe؄͠V’ÔJ’ZIR+É­¬£V’ÔJ2rI®ð‡3!ÿ“×ã+”ƒZIR+Ij%I­$©•$µ’üžóøvq¾ìÖ…òGo>“2¹—ã’+Hr¹Ï› +.©•’ßG‘x½È$ù< òƒyAÀÔ±€~¤€Ø v ~ˆ_!Ëa¤¡&¨ñÔø::¨‹z¨hò‚@c4×D€k"À5àšœ†æh–8çé¼ã~ .aùz]訳=Ø–œ_…Ú?Hí¤î&ï7Ú[çûxß[ÉÀ ÌÖEArÊào†èH0#0F¯ Ò'ƒ0“ý¢˜…BìåX½ïµ)üHb„"F(b„"F(b„"F(b„Jy’"ORäIŠ¡ˆŠ¡ˆŠ¡ˆª¢ëRÕ§ )šáTœ†æ F(b„"F(ò$Ež¤ÎÂÙ ORäIŠºXõÅ}¸ ²Ð0ƒ@-¡¨%µ„Œ‡‘ƒ! –PC1 ¹Ž:KÄ(D0Ä-EÜRc‘‡q ˜ˆ|LÂdLc«*À4LÇ ¿T³ðfcæ‚ø¥æá ½V=‰BüOa>ˆijžÁB,ÂbáY<‡ç±KAìSÄ>EìSËAìSÄ>EìSÄ>EìSÄ>EìSÄ>EìSÄ>EìS«AìSÄ>EìSÄ>EìSÄ>EìSÄ>EìSÄ>EìSÄ>EìSÄ>EìSÄ>EìSÄ>EìS›tDm±Oû±OûÔV| bŸ"öý™ï,©}œ¯ŸAS.àÄ!TâWÆh]l 0áƒ)° @ ¡`#„T„‘¦sìæÞw¥rì+½ïKÅìaz­M^o“×Û£u†ÏºI ¿·ç±íIZÎ¥=_Ù °‹8Öb·É«lò*ïûSäTöR¼€e:«úÿ[Û/±ß ]h¯Ôe6y•½Šu¥ì³šß÷:íXÃú·tÄ~ëÓ¹ö;<þ]¬gÿ÷8¹¹Mnn“KÙäR6¹”½Éû¾U‰ý>Æ'g ûlù¬½]çÙ;ø=ŒCöW«œeòp›ÜÞÉqÞ|†Å6çǦNµ©SíÝ“ÕÞÆ›\ËÞçÝ«¹ÌÞïÍ;:S }ˆíŒ96çǦ& ]bì Q“z³úiStVȂԡ?×`}Л߸8dë²ùy(Œ4 ÕD-Ôöf <þÿÏ—†°OC4Ö…!r®Ps–[°/q4Ôœ·ç-TÀq§ñócÕsjÍÑÙ¡¹xœõóÀõz†v!Û¨ÃBÔa©5tVj 6BHÏ+5 5Q µQǧ¬.N¥NNm„Æh‚Sð«ÎK=Œ#Ð:/,t,lx÷\Ï _å}×,'Üp nEº. gÃÄÙpWtÓkÃ ß w÷指÷è¬ð½èLôDò=ˆø]ýhéÛáþ€º(<ŒŸá]I; ŒÆ<ªKÂció0ã1}'Òæc¦¢@ SH1\D„0o4o)þùþ"`m-”5Â!ìà—ÁoEÈ`u…Ñà"ï‰hù¯þY>á×™"$¨ l„ŠcïCÄEm£rAŽ"ÈQþÅûUwäûï~¢h*úâ>äéÖbœÎãi'è<1Q/ù:*&éB1™õStº˜Š¶OÓ-ÅtÌàõœÉº(fá1ÌÆÌeÛã˜Ç1žÀ“,âïx Ä$ñ4ˆK‚šO›Ä",F‘î(žÅsxK@|Ä'ñ"ÇZF»\\$Ši_ÃÄ ~zYÌ+Å Q"þUPÿ‰Uì_ʾ«Y&f b–XƒµxÔ~‚ÚOPû‰wð.Öã=PŠ÷9W`#>±Kl¢ÝŒð1>Álŧl¤è|ÃÒ¥†ÔQ#€:bЇ ú°A6èÃ}ØHÓéFMÔÒ}Ú´uPõP Ðt¶ÑMPõD£™¾Ë8•ö4Ûœålk‰ÓY>ƒõg‚¼Ò ¯4È+ òJƒ¼Ò ¯4È+ òJƒ¼Ò ¯4È+ òJƒ¼Ò ¯4È+ òJƒ¼Ò ¯4.5©q®ÄU >5®Æ5h¿áZ\—œ“ pnÄM¸Ñ ·àVtæ¹§£‹Î5n£íŠnü ¸Ýqîg™â £§˜iôÞ¢ÑG\oܧsŒþ¬§.0†à Å0äb8Fb¯E£1²n,ÇÍãµÇë5žu0ù˜Äö)lŸJ[€iz1vçl&¢œßYxŒåÙ˜ƒ¹xBO¢Oa>žÆ0Þ AÞ`,FžÅsxK°/àE,Ãr?/a^ÆJ”ð\^Á«x «P ò ãu¼5X‹7õ\ã-]h¼uˆá¼‹õôÍ÷°ïƒÜÂØÈßñ!Êè¿›t¦y!Úèüê÷2«ß_H˜7ˆ¦fG]hÞêÝ™°µÙ·é"³+º±œA{;ºë¸yíÞœ‚æÝ´÷à^ô@&ûö¤í…ÞºÔìÃ>}q?ß~›0nöÇ d;c™™ÍóyPç˜a°Î2ÆŽñˆŽšô“~`ÒÌác-}¡ú}†Bs ÅXä±~ÇO;AÏ5'²®óÌyXÄó[¢xwm=vOå£ï5Ľ÷Öñ:®gýºÂ{Ïa ¯mœ×„˜góLbžIÌ3wàKŽ÷Úâ+”ó¸¯9þ7,‹Hà;1ÈüžçùË»àèls7íØÃk·,óÌ}:ÝüY—xs8óÌÞñŠÌƒº¯yˆ¶¿â0ûZ­‹|B—ù ZêiŸOÏõùu†zÚgé|Ÿd[5Xêlõ´˜ç ±1ÏÖ9>rp_MÔBmÔÑ—úꢞî૯!o¤³|ÙÞ§ ™èæ;¶9ZèÖ¾–8å3p&Îâ±gã/,“ßûÎÅy:Ýw>¿÷]è»­tÔwZ£ û^̺Kد-.Õ}}¥½ —ó»ÉÓ|Wâ*ñµcß«Y¾†¿ãZ]ìë¦[ú2Øçvst;µë»K\ã#Oðõ À±ó·¬ÑK«æèàuù^ôñwÖ™þt]îï¢sü9,Á#ŠaÈÅpŒÀHŒB£ñçÞsÈô/ýÑ¿ExÏáy,ÁR¼€±Lwð/G1^ ¼Œ•(ÁkX…R¬Æëxk°oâ-¼uˆáþÖw±ïaÞÇØè}V.ê/Ã&ožùÖþO°[ñ)¶ë¿Ÿás| ¶ñs]ø¹.ü\þr| ® ?×…ŸëÂÏuáÿNgø¿ÇØ»ñ#¸.ü\þ ü„}øûužßÅü‚ƒ8„JßûÉüä~r”.JIM~O4M©©‹“s™¦Ôá纨‡úh€†ØÆþÇÞkH¤ìæ1•:³úý†L‹<âÿð~C¦UGßohÁòïßkÈ´ÎÑq«m[\Îò¿û^ÃÑÔˆAÈùªU ³­™:Çší}F¯Øb¬³žÔQëiÖ?Ã:ú—µXw°ŠX~Ïáy,ÁReÑ·,ú–µ ź¯EŸ²èSÖ+<þU~f³V±­ô)‹>eÑ—,ú’õÛÞÆ:İžÇl`¿÷ñÛ7âC”a6ó¼¶°ÏV|Ês߯~q|ƶ¬K°¼‹õÄEk7~ÄìEûü„}øûA\´è¾Rê@ ¡`#„TÝA†‘†š ¶Ib›¬ƒº¨‡úh 3eC4Bc4µ¢lŠf8Ä8IŒ“-ÐÄ8y†ž+ÏÄYºPž¿àœ«£ò<ŽAŒ“ ¿ˆõÄ7Ù†Ÿ9÷òr´ãí½;‘¦ËëÙv?wÒe:ëºê ÉX-ïøm¾Ý"y¯ŽËÞ´}Á8,ûéÖ2Ëûe† óä@ B6ÄClŒ‡uK™Ãq‡àöÊþÃ0œå‘¬£æ”Ôœ’šSŽaÿGAÍ)©9%5§¤æ”Ø"¨9%5§œÌñ§€ºSR×Ë<·™<.Êò,ö{ ³1sÙö8ÛæñwΧ¥6’Ki©yä‹ æ‘ËÙFÍ#_ ¼Œ•(5¤æ‘Ôßb'¨{$uüžÇ’Hré€@’È=¼F{QŸ°ï·yŽ‹¤ËÏx½÷%ã¾< â[€ñ>ÀxðÁÆû€‰j Æû€ ba€X# 5Q µ½Ï¶ê¢ê£¢£ ¸&\®‰×Dà44G ´Äé8Og.ÐYV:'p Ë×ÓvÔ=ØÖKÏ=éý„Ò`oÝ!ØGG‚Y´0Hw fëœà`ÐGƒ¹1º(H Nù~0ŠY(Ä^]<¨Ë•©³”~¤À‚D5„‚RFj¢j£ê¢ê£‚ÜG‘û(rE¢NñAñAñA‘)r uÎ9"Rä@ê<œ p!x½ÔEh6¸ä@ŠH] r u™.T—ã \‰«ÐWã´Çßp-®Ãõè€p#nÒÔÍà|¨N¸·¢3ÒAî£nCWQÝÛÑwàNÜ…»qîEd¢'z¡7úè<Õ÷á~<€~ÈB«±J«±J«ÔCŒ‡‘ƒ!xC1 ¹Žºµ‰Qˆ`4ˆYŠ˜¥Æ"ã00ù˜„ɘ‚©(À4LÇ »T³ðfcæ‚Ø¥æá ]¤žD!þާ0Ä3µÏ`!a1Šð,žÃóX‚¥ î)âž"î©å î)âž"î)âž"î)âž"î)âž"î)âž"î©Õ î)âž"î)âž"î)âž"î)âž"î)âž"î)âž"î)âž"î)âž"î)âž"î©M:CmqO÷qO÷ÔV| âž"î©í:®>Çü_ák|‹¾Ç.ì±LÇÔ>úÒÏØð â*ñ+¨cÔhc 0áƒ)°ÀXo3ÖÛŒõ6c½ÍXo3ÖÛŒõv*ÂÉ‘u¦Ý\—ÛçÐ^IKj÷Míu…ý’sÃŒ %·Éß÷ÞÂt¶UÍ“|¡ÐžÏ1`!é|{±Î²É§lò)ûy¶“KÙKñ–ét{9ëŠuÔ~‰–ói¯Ô}í¬â±¥ì³Z·¶_§}kXÿÏám¬9¹ýÇëÙÿ=Zòq›|Ü&Ÿ²É§lò){“ŽØäSöGøŸpœ-ì³Ûø½Ûu¶MnÉÏ_¡œero›¼ÛÞÉßKÞmÇ~ßë6c‘ÍXdïÖe6ã½{½yïÓ«ç½Ûûu©ízŸÙϱ9w65¨ÍdaµgHèìcQˆ±(Ä9 1…Rtë©[†‹Bœ³ç,¤taÈÖ BŒC!Æ¡PšÎÕD-ÔÖsCäæ!ró¹yˆÜ,Dn"75Æiüžæ´-tÇÐ,÷gû±÷òBÓøù1¶Íæ8st‡Ð\P÷‡¨ûC\³¡g¼Y¯‹B‹ø]‹uFj Ý:5!¤‚ç•Êø˜Êø˜Êø˜Êø˜ÊóJ­«ã©õP tNjC4cB*cB*cBê¯:;õ0Ž@ëì°ÐEa^›ð:3|•.ßLÛp nù^¸ nCWtCÈÿÂÝq§. ßE{7îÑ­Ã÷¢2ѽXÿ¿«Ÿ. g¡?¨sÃuNxOÃ9:+<’v"1xTGÃció0ã1}'Òæc¦¢@çxï/ô÷ aÞ`Þ |æ:sð§¤Q[¥¤8TK–5€Ú$`÷犳…‘:Ø{a’Ñäè?óú?ú—’Ÿ’tY6åß7É¥ç«ÍÉVm®úwlŸê=½½ªŽyüþûýoKþžÿû¿“å=£ãßïTõü>U{ªÍâ&1M»bºwßpW|ƒo½ï3Vˆ}´?c?\À/:.ê„8„JüŠÃ:aRšY´ý1ƒtÜäqæ/ºÂ<ä}æ.Aœ NP÷ºÔ.uDuD‚šÀ%/O³ºä¬.9«KΚüTùiù©K~ê’ŸÆÉOãä§ òQ—|Ô%M0$Œ ƃãA‚ñ Áx`YKǨ2zGŒÞáxŸZëGûãaŒÁ£˜™¨ú„˜C5çPÉ9ô¢½(F/ŠÑ‹bô"‡^äЋz‘C/Ú@/ÚPý©)‡*Ç¡ÊqèQ1z”Sý‰)‡ªÆ!ÃsÈð2<‡ Ï!ÃsÈð2<‡ Ï!ÃsÈð2<‡ Ï!ÃsÈð2<‡ Ï!ÃsÈð2<‡ Ï!ÃsÈð2<‡ Ï!ÃsÈð2<‡ Ï!ÃsÈð2<çOÝåu…ÞÀhZÁZLïŽyïÈÑŒŠ£ Ã(èÐÛF¾ F8—.Îg„‹sl`TsÍF§WƒÃ¨ä0*9ŒJ£’èä0*9Ç¿»ÍU²«dWÉ®’ É9uF‡‘Áadp’wD‹¾¢WB_܇\]ùGói‡~aŸä\H‡P‰_q˜¸ÒÁ›ËóØLvt¥y ½»*¹\.W€ËPéÝ5dÖ±ÿ{Þì..½½òø9¶è….½Ð¥º)iº<£¼Ïøî®šÑ®zN¸rk !<k8Fx=Ö¥·&ã˜û»8¶[WÒã*éq®·ˆ¥Gçàâ,»œe—³ìr–]βËYv9Ë.gÙå,»œe—³ìr–]Îròû’åÞÜ]ümö,¬ðfEIƲd« Mðâ˜Ër9Cn¸® _kÐéè‚ÛÐ•×·Õ 3FüÁ íÄ–Êê»û›å<›W{¿w×õc³”×Òå\¿•ÞºÎ4~ò]´“3ÿ\5ûøŸš)¼êÎÀÉo]V? ¸èrÂ_ñ“MÝ?ì;UÉñ}Ä%2ž|ïÿdDtMö÷ÞÏ¨ŠˆÞ{'ô•Z¿Ý—Ü9îüŸ|ßðªÄ9¤¸Õý ù ¸êü¯Àw¨z%\ra—\ØåJwÉy]®n÷¤û#'û…ë]ÑÇ÷‹ttÁmèŠdn—œËä9Æ9—qÎeœsEò^;ÉÙmó1 “1SQàe Q^õ(¯zÔ›i¤jV‘ßÏ¿ÄocÌr³\Æ«äYˆž0Ó oβä™Hp&¢œ‰RÎD©7 CÕ 1ÎD>g"Á™ÈçLäûjèBÆ£ Æ¡ Æ—qÇeÜqw\Æ—qÇeÜqw\Æ—qÇeÜqwNžƒ)ÊYŒVß]>9Ӝ˘ã2渌7.ãËXãzs(=N;K½3åLG9ÓQÎtô·;Ä»3|r~¤hrn$Æ—ñÄe)šùjø”8ÕŸîO-üßù-e{Ù^œ#¯•׊såMò&qžì$;‰óeWÙU\ ûËþâB9D­äP9L\$GÊ‘¢œ 'Š‹å,9G´•«åjq¹üHnWH-µ¸:8,8L\.ÚGGŠ¿w÷ˆkƒ•!nQ›Ô§âvµO=li‡E–}¥}xØþÆþFŒ ÕŨPZ¨¶jj!òB‹C‹Å¸ÔÆ©§ˆñážáž"_)]½Jü 1öÿÍ?£Íj.±0Òp1ãr´Áæ¦"9‚G0ÃëÍG\Fn[Fn[Fn[Fn[&F3BŽAòŽycñŸ‰cÇ*J‡Š2™ß8'W†Þ]æ6âC”añ*9S²µ¶Œ¤í~›¹Œ¼¹Œ¼9æÍãt|쫪(“y‘óÛ=úªæX*3—a9Ë%Ä»×X^…ªy•ËÍw¼Ycrì˜ù1²L—ü{çæFuïý£‘vÎZg´Â½Ñ `:˜…f0ÕÆ Ó½wƒ ذÁreßk–"Ê’0!(€8$CYŠŒmaÊBÀ‹aêÜÏÌj½»öúûæÞ¼ÜgŸGm×ÒüÚ÷§3çí5î“ï´ÅÜ^aþ ;Q4]høÝ€G‡®ßiÇûCÇúáêw=uµŽsöEZ€v»š`-sñÊý¡?öâ ÷÷VîT×e  aÓ í ´U´Ÿxç^@«î)Í{×yï:ï]ç½ÓOXôá^Óý þÆ•0®‹V  ×&í\Ÿp;ØvˆÖõ»Õƒö.¹½&´wÉ~·šð)}]»_rØñ®º× }J%vœÿƺ°rï’It³'¬Ü»bœõ@áš1­Æ¹pQ´§IŸœÛ{š`wããõc\c&ÌŠö8i¥ ¯á÷a»g/Z¿µ}]ÇŽ5[}ºç¶•5$잇Â&<¶„ûL:åëG´oÈjÇ>°/Œ„ƒ‚RûˆŒ¢¦Œæx$Œ±ÐS}YeGjÍ@qˆ'„¶»¶»PÚ~ÚþÂОҞ ÚkÚkÔ[³EïÄ ‰[DŸº%uKÄືëÞCê>¬ûP ­û¾î{±¾ÞKOŠ ôAú`±‘¾¹>Ll¢§O›ëÓôib«ä˜ä±ur\rœØ&9!9Al›\œ|[lgL1¦Š]ëÅOS3R3Ä"feøãÅ =ý$îüé|Tߥ~jø“8Xߥ×w=ÿfO+üÍ®çŸÿtüOáï黄÷Âõ]Âçê§vyå;bvÐ*ò0æÂ<˜E¸î‡àAxB ®~‘|ü¼ ¯@^…¿¹P¼6,‚ÅP¾ïhBŸ6¡O›Ä‡Ü§óZM Õ°ðÍ&Ðl‚NX,ƒ¶¨Ï5×°6ЇÆÍ£qóhÜ<7ÆÍkYòîÉpJômaú6¾Í£oóñå|r“ö±®‘ë4r„¶<Ò»MèÝ z·‚Þ5Ãý©ÃÜæ5£o ]¾1 ÷Å[}µãY;-|y}"÷çþ$îŸÀ}òVâ#r4u!λÿ< W%ÈU ÞK‚÷’ _%ÈW‰åð%„ß@ø°Ðቯ-žø¾‹¾È£¡óhè<ºIþl/?о30Ñéf—¹ží9ûsþö—üNûÜÎ|’÷”¤æ%Ão*ñ3…Ÿ)þ?Åÿ§øÿÿŸÂÏԒ軦<ú:¾Î£¯óèë<ú:¾Î£¯óèë<ú:¾Î£¯óèë|”Ãù>_+—Mèë¼Á9Gc›hl}m¦ÈÏ©Þ@ D_WÐ×ôu}mF¹r3t÷]hí»¹ŽHÝ}‘GWçÑÕùÕr^ø â‰h¥ËÄ,ÑOÜ kÞIÕ#="Ñ#="u$‰ƒÅ3Ü^§hDá½À?»{Ĉd-Jl"dp—qµ¯xî”K"ú¾Üƒ×gÅiñ‰§­‹w×õÉÚx^»Çr?ôÔóE?<ÓÃ3½.žé­ôÌU=²sç;ouoäo¾ .ðÙñ4O³å—"¹6Þ…§Øí;w‰dJŠ~ݼbh`ã^‡õ±¸Åm,ncq[ÌÁÂö°°‡…=,ì‰ù‘},ècA úXÐÇ‚>ô± },ècA úXÐï¶ÖÔQôȃyÐ#zäA«úXÕǪ~m<è‘=,ìcYËúXÖ«­¹â’ûÜè{ÁpOÐïéñÛ÷õWî:NŒŠÃÉy{’óö$ç…y®‚å},ïcyËûXÞÇò>–÷±¼å},ïcyËûX>ìý=ò–GÞ ÷± ÷A =À¯Íç¿kôðëûXßÇò>–×"ô±¼å},~ZßÃú¡å},ïcyËû«Í9ïøžòóh4¤J~ ×ôñ?ê?Î;àã>àã>àã>öïùÅ#¿xäüâ‘_<~ÏÝ ü}ò‹G~ñÈ/ù%ÜëÍ«ÍôÈ)­ä”°goÅ{|¼ÇÇ{Âï2]rŠKNqÉ)ÑÈžäãIaî‘G<òˆWÛwÍט/Öe—e>ÞäáMÞ*»ÝzÑ·]wý*òŽ*žÑ£µïÛ†w´­ËަXÞ‹â¿}÷K/Úõ²c·Ë5ítÙë«îpù¿E°¶‡µC wÛåñŸí:XÛ•Ïë¶ _8†TÛE³ß&æþ_ÿ_£üY,kbsq˜I?1[̧·­)zkã´q¢¯6I›$úiU­*úkKµ¥b€æj®¨ý]ûD Ò–kËÅí[í[1T ´@¬Ÿx=ሠäiò4±•,v’+ä 1\~'¿;'/M^*vQ—«ébW5[Ý&Fïï‰CŒOŒÏÄ¡ÆÆb”±Âø‡mü`ü ƤDJˆ±)-¥‰q©DJãS*¥ÄÑ FCƒ8&}\ú8q\zRz¹*–¸!ê—¶[}ßûÕO¬×Z]¹°¦îIm­Û¾õžX ø– + üK•jWEôtÍIãxâ?& }‡Õõªˆö½É'Eê­=cwókߛܧ×ñ£«#:³¸§áÃÝÆ¿¾­zÑX`{VoŸÇîѽ¶W<¬ÛÞÖ+Ç£Ò®;ÇO«U‡Ž+%:ÕaÇÞÈWNtTŽ[¢1¯‡½’ý芊ۺ\Uævõ¸ê¾ÉžäsI>—Ħ›v¹â¢ãºÎqOr¤$GÊ/V^¿ã×®¶ð»U£ç•ÿ|ÿÝu³ sdûx­GnôÈWe¬yo[/»Ý,º*ïåËö}k×|uÆ=ÆÛóÕ^´?í,ú-!î÷po1?†6^› RÚß´wE:±4ñè#ϧÿ"§ÊkÄP™—yrjI>!6T·«&±YJ¦êÃýiÕ¶QVk[¬ùG{Fô¡Ïë ô‚¾QÐ7ŠÐÓüüCxüP8 ‡#`Œ†#a Œ…q0Ž>§às >§àsŠðsžå8“g’ãLrœIŽ3Éq¦Àþâö(×™ä:“\g’ëLrIgÙβ9Ï$ç™ä<“œg’óLržIÎ3Éy&9Ï$ç™ä<“œg’óÌ5æ¼÷xïÃ@ÿ/Z9~ÃßáðàSø >‡eÐ_5—|Y%_VÉ—Uòeµ§ùè1ü+†Åð¯X_ ǨÃ1êpl ‚Á0$°ctk±õaîoÈïnÃ&°)l?Ía ØF‘ƒñµ¾Ã×bøZlcd=í™PÑöƒCÑ•‡sÿêD60©7&õÆDVV™—lRo*Úy¼ö|¸ýyQ`ió¶F§­]Æí+yŽ|§‘ï4ò65ƒ©h3xî˜ ³ }]SO#§iä4œ¦Íåñy@>ÓÈgþ¬=Å랆gàOÜ>X¨½8ÚëÜÿHì©}ŒŠúœ÷¶ –בV®tù¾¯B ´¨á‚-µÎƬ]ÓBl‰÷ ¬xŠºØè€ ØH ‹oÎë‡q{+ØŽçwàµ;B×ývá¹p=ÏpÏÜޟDzáh¥îû ÒeÞgEOB8ïsÇÁ°9l[Â0Øö€öù^F?&Á¯O?Ð:½“Nï¤ß¸úÌÀ«ßÉý{ƒªN,éfàëœGó¨ÿžÇã>çNçÜéœ3s¦?Ïã/q|^ ¼í–ëê‹xn1PKõ·xÌá6:H÷8~ ŸÁç° Úxþ Ïéä9<§‡cU ô5iXzÃê;²ÙrKÀïäVÑÞ}nm÷µjmS€î88úvÍDK™ôdôT%šÛx:÷Ïàö™p·ò¸€Ç/„‹á¸¦ÁtÀ?%þ‰ž2ÑS&zÊDO™ÑœÃÛ8> O5 e¢¡L4”Ù£†z‡¿ó.¸@ÔIØ_R#$5UAgUÐYUtV5š·÷%÷¿Šz¾ê¿lW¸í»~Ž;^ýnÜ&ßÕvг“ÔÜ$57I½Mž´&OŠÖã«&Éwɳ€s„¦3ÑtfrYðm-­44TÐѪtP½ §(rŠJ5LQÃ5LQÃ5LQÃ5LQÃ5LQÃÔŠŽ[6€ a#Ø6MawØö„½`oûÀ¾0öƒý½­ðu ¿€ƒƒª:8ê08Ž€Q0Æòú5&ÀQp4Ðת, è0…>Qè…>Qè…>Qèu2œ¿bT£ŠUĨ"FÕp&œgÃ9€öWhu> ÿú_]õEQ_Ôe‘¾5Ñ·&úÖDßšè[}k¢oMô­¹.ó«ŒMƒo½ TŒsÇ8.‡ë¹?ˆ ãfî‡s™àõ¿ \ãan›®Ö±öY¸Î9Öx6h5žò‡Aþ0*Ñ:f]÷ó¨o¶ŽªíëÑ‚¾¯ªÔæ …ß'¶ ³[ÐÙ-)ü*…_¡³Mt¶‰Î6kW@w¯hAg›)ú£ï;ÅûNÑ?¤æFû|Ø©ùA5E,§¨«©Û"=^AWÐã&zÜì6'ç»Ànø~€ °Ó{ߢ½[Âqô©Ñ¨åÚ> áµBõâR~„v˜v˜ˆi/h/M¿T¿LÄÓ#Ò#D]zßôH¡§÷Oï/êÓ¤½D,5+Ò×JlÜÓO<»V«e­ËjW×#ŵpLƒép=Ì€àF¸ fÂ-AIàV¸áÿÁÀ¸šà.¸î{¡‚ßÀÃ`Âoáø< %ø=<Óðx ž†…ðGøü,xžƒçáhƒª>‡ªÏ¡ês¨úª>‡ªÏ¡ês¨úª>‡ªÏ¡êsb ¿óT¹ý&Ç·à¯ðv´ÒTç\ö]*L¹‰"7Qä&ŠÜŒý2˜; .„‹àb¸.…Ëà ¸2È¢–³¨å,j9‹Z΢–³¨ålme¢,j9‹Z΢–³±üÎM0fÁÍP‚ßÃcð8<exþOÁÓ°0˜­æÓu%ŸÑÁHíH”´±0ŽÛã9N€£áÈ9íXŽÇÁD8&ñº8ž'óü)ðKnÿ Ú稘¨bUl¢ŠsÑ®+ô\í&ÖØm…žËyoœT±‰*6µ)(Ö©âdí»uzÇi0#È¢³ÚA^»‰Ï0“Ûs9‚S¢Õv:V×i_½¤†Ý4ì¦a7 »iü Þwá}ø>„VøþŸÀ§ð|Î{^mÜþ"Z)Ǫ­È_Ò¾ƒ Jñhrñ:Ž ÒÁäøzÐú@_ ëð l [À–0,È¢¢³ñ­¹½ l »ÁOág°;ì {Á>ðãW½7ã¡È;W½Ÿ”82˜ü¿²úÌãAžEgQàYxžEgQàYxžEgQàYx6ñ,ïí9x^€x^‚—áõ`d†E°–À€ÍoÂ[ðWxX”Ø=ÝØ=áÂ{€ýØ?ýصŸCíçPû9Ô~µŸCíçPû9Ô~µŸCíçPû9Ô~µŸCÍ›¨y5oÖ¥‚R]ô©­ì²êŠ.«¸üØ\:VoYuÕ–ÙÁd}Ü÷Y½Èñ>¸€áÿPíYT{V†Û‚?ƒ/óØ+PWƒ¬”ÁdY½ HAϧa=è ø³ÄŸe?è` àÓŸ–›ÁO`s#ƒ’ cƒœ$¿DsÀ&¢ŽOâö)@î§#eŽã鼿\nŸqÿbî_—qûJ˜ WÁÕ7®sqS.çùpœÏí|>ò—$ÉïƒR=¹+ZEã€`2ê?ÛmåŒ÷Ï€³ƒÉÉó; øs(þ\òê ”ä¼'§Á*+eü²BÆd…*|P‘c9V ƒ­€«È±Š«¶ƒíaØv‚á°3ì»yX‘‡UÈÅt&†OwaÒ]˜j„Hª}D?º S'«ýÄ%t&Ý…IwaªÅ1ê 1\ý‚×dé.²tYº‹,ÝE–î"Kw‘¥»Èª#9càò`¤º®„Épàó ŸWS¦Ðh ¦Ðh ¦Ðh ¦Ðh ¦Ðh ¦fÁÍp *s`.̃ùPâ@Ý·%…–Sh9…–Sh9…–SćBË)´œBË)´œBË©"Ü÷Ãð  ïq¤ˆ#E)4ž"–±¤ˆ%E,)bIKŠXRÄ’"–±¤ˆ%…ÖSÄ“"žñ¤ˆ'E<)âIOŠxRÄ“"žñ¤ˆ'E<)âIOŠxRÄ“"žñDg”£3ÊÑåèŒrtF9:£QŽÎ(§ˆ'E<Ñ!™tH&’I‡dÒ!™tH&’I‡dÒ!™tH&’I‡dÒ!™ÑjáJ«=t]éaA0Ùh‚»\m« r´Ñ A¸:4šÍ@¯è5ƒZgPë莲tGYº£¬±ˆû‹a)¼­â\2¨]uË@³h½b|Ë }~¨i|ÃmbÜ@£¤ˆó%•€º`dJ‡znS³Ri öèžrtO¹Ô î†pµåM9žL^¹Ú“®é:¦,S6…Ð%åè’r ½‚‘ IP`@ €¿ß°ô†>ÐúA:«000£• z^µ`ÕU‘Kitjš:’> ²€FMŒLO„ãš>Î &§ÑáiòW™¾&ÃUp5LtfúZ@g¦§Ãõ€ÖN£µÓhm:¸xò¨ä1B4h õ"Þ°¢a…HŠXïK¢­^ éþ“˜ è?E_è|BÁ'|B1$ðÄPØ’ÛÃ`+ضCè$…Ãàp8FŸž.­‘.­‘.­‘.­‘.­‘.­qãk³O3Š\\ÁÅp ô4ow6½læÀ\˜óá6^;¹}_8{ €¡sL¥L÷U¦û*Ó}•é¾Êt_eº¯2ÝW™î«L÷U¦û*Ó}•éºÊ?rLÅZË1K‚J(Pò‡QWíiÎXL ª±8$ tP½ HAC4Sõ†>ÐúAa †! ëÃAåGÅ ¼ØV°5lÛÂv°=ì;ÂN0v†]`WØ ~ øì{Àž°ì #`ØFÂ~°?ü€á ø ‡À¡pGÀ¨Àކ#a Œ…q|Æñ0Ž‚£a¢Ø06 N‡ÄNýb'qûdø%ŸñtŽgqÄ/éž«tÏUºç*Ýs•î¹J÷\]뱦Ñx“K]¥ƒ®ÒAWé «±[xϳ!s`.̃ùP€Ûù; þÀÐwÁÝpÜ E¸î‡àAh†‡à×ðxLø-<¿ƒG!Ÿú=<ÃP†'áð< £q¬ž×õ}>h޽-ð"¼/ã[¯@^¥›Þ%hÕv§ƒÝ:æ×4i‡óÜÑuá:¼eºúrmŒ«sŽä™<®ýqvPÔÎá¹s£ñ.‡ÎÞ¡³Ǽ\ºû&º{—îÞ¥»wµËàr~çŠhì«J—ïÒå»Ú˜ ×DkïVéð‹+ÇÀnâ}tŽƒµ[øfCæ@û8XE›äéþ-íV´§øLOÃ3Y ×Ö ÷ókÔÞཻ¼¦}<¬LW_Ö–CçxØBmüƒ¿÷5¿ÿ ¯ý>Zï6¼þ½'ö»\oƉù81‰¥9÷túU:ý*~µÛ8±Nç_¥ó¯ÒùWéü«tþU:ÿ*uåøÙÖ° l¥UãÛGûw¬]Û;C8ž¶ü4W³â?ã¸;ìÁëöä¸ìÍÿ޵íÄs´n-ù>1:ðéþ«tótótótótótótótótótótótótó?bÿóÎ5îâÿ¸î{¡÷Áýð<Íðüþ'Æòž…çàyxZàEx ^ŽÆúšx> Êtÿeºÿ2Ý™î¿L÷_¦û/Óý—éþËtÿeºÿ2Ý™î¿ü#Æú:çøöŽ®ø¬Ôõ ¼ºþ0  of]•ãÛ¼ÕY÷aЮMQ÷=Çž÷m7uüQï4êIhàö Žƒ¡sßöF} ؆A¸ÎZCß„ãxl"“ §ñžön'ëäãpm |ªÏä±Ù羡ãúA³NžÔñ?ˆÆñÐñÐŒÆ=ÐñÐÍÀî2þèêqÛëØ^Çö«Ebs›ëØ\·¢±IWo *:v^Ãe³¾ˆ×,†%܃ÿ¿ÊëÛÇ*]½•ã'àqûSø >‡eÐÓx¥Ïï¯l‰.è‰.è‰.äIŽXm<3¼V”!Ñm É’\!ñ‰/Ht¢D'Êõ;Ê a#ØÈ’Ü!Ñm Ñ«­»mÐ,· *r{Øvâ÷Ú×…m–äIÞ{ðøˆèšÕ²<€ãaÇBû8©ÍC?û=“–å…p1\WÀ4˜ã¤e‰N”èD‰NŒæ®ßÆñaxÐ}Ý'Ñ}Ý÷ß'µäßáð¢o=:Ö‘²jã¥á·V½xõqH@è ¡zA‚HÃzÐú@_è¸õýa „A0Èñõè¹zb¯›Õc³zlVÍê7Ma3ø lÛz­ÛÔïØ 6öêÖÖ/mL¢÷“hý䉽žÌ±süµ’<›ãyÑ8l9y)\µµg’Ë?ùuà+-pTP:H¨‡^¤ Ò°ô†>ÐúAa †!ÀçV|nÅçV|nÅçV|nÅçV|n…¯*|U᫊š§¨yŠš§¨yŠš§¨yŠš§¨yj{Øv„`8ì ø­Ú¨{ ÿU î©Ýùû{Àž°P÷ÔØö…‘°ì?‡à@8~ÿl¬÷HÎáTÔ8à(8ŽbF ÇÁD8&Á p"œ'ó·Nô­úœ §öT§6UgúJaWuœ ØWôi =¬ÐÊü«È¿ =¬ÐÊ^JÑK)bJSŠ˜RÄ”¢—RK`Ö^PËyÏÄ¢Æ)jœ¢Æ)jœ¢Æ)jœ¢Æ)jœú~€ ¨b AP:H¨‡^¤ Ò°ià{A.0£5È5ƹќߊ^4ЋÆõA£1Ð/ÆÍ<~¯]T& Îèpƒ:cPgjëfV t†ñP4.]­­›Y4~4EëÄ=XF ¨-uÅ@SOsŸºbPW êJmÌÚ3žƒøûÔƒÚÒmüúU§¶¯Áë`ó7ñøbx“ç–r|—ã‡Ñš˜ÕhM ´DmLÛ2¾ŠÖ¶(_Gë]VSñ ˜¢†¤Ö Ê©ÞÐ'Úkaª? €ÑZ•ÕÔf<Žÿ¤¦•ç&ŹI¡ShçÔÜÀª­QÙ1¶]M¡“Swñ»wóÜ=üî½A¹ë: ƒ‚JÃ`Ca} ?mø.p¾´HZ$-/ƒ½£ëP»­¥W›ã·0}*¯Ã§ÓøtŸN_4¦éÒôiz·4½[šÞ-=%hNÓ»¥éÒôniúô4^Kï–¦wKÓ¤Ñi>—ÐDØSì%„¶·¶·ÐêÞ«{OÄõz½^$ô#ôÑ<k¸=úffo1­ý'>*ü©/‡õôSWý]ñQõw©;ÕáýÎ߈êþÊŽ¿'¦uÿíºñá¿ÝÄ#âš U\ ×Á4˜×à ¸n„›`&¬ºúÃ{A‹x>€pU›åA›ø¾VÑØÓz^=¬'ت ã }õ‡pEÇ–në}QM´*uC-µUo*ñqtdº8™.~ ű0&A皀­ ÁbXo/ñ&¼…·Áîkе 8Zj+߸ò´ Už çE+G†Wµ·Ê)оÒAk´æØ­@s´ªd ¡…ЂBhY¹Î'Aj  5PA T¢uɺ¯Ø‚2h ×)“+ø;í붪+àJ˜ Wÿ¿âÿWS{*ì©°§Âž {*ì©°§Âž {*ì©°§š7Ã-ÀûVy˜sȧðYÔmÑ*—k¿VÚ#dŽåAK´^Z]КңÕ.Ã+Ê+µUoZ’ À€4@—uÕˆÜ ‘[!r+Dnxõxkz"øIú|s žìàÉžìàÉžìàÉžìàÉžìàÉžì¬ôd'ðÅRø¼ï‚Í÷ðz˜Ûáà¡êDs;&q çªW9zÜÿ²}>z<­RÆ#«xdµ‹:x ƒ:x ƒ:x ƒ:x ƒ:x ƒ:x ƒ—9x™ƒ—95/sð2§6gÂÁÃ<ÌÁÃt©.õÑ¥>ºÔG—v]c£s¾Ã ^ûC´Æ’ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ƒ9x‘ÎçNqNñopº¬gá§¶|<ÂÁ#<ÂÁ#<ÂÁ#œÖ¥pð/pð/pÄx…Xx…Xx…Xx…Xx…XxÕC>+“ÏÊä³2ù¬¹§U ð /°ð °ÈQe<Àªå¤p%®f,mai K[XÚÂÒ–¶°´…¥-,mai K[X:\Y+ìhÊä—f¬nau «[5«[XÝÂâáªZ·°¸EN)“SÊä”29¥LNi&§4¯œ­OçÍÐ_Jº®€+a2\ü]¬mam k[XÛÂÚÖ¶°¶…µ-¬mam k[XÛÂÚÖ¶°¶…µ-¬mam k[XÛÂÚÖ¶°¶…µ-¬mûe,mai+²ôÝA3¶°°……-,laa [XÔ¢µ°¨…E-1‹ºXÔÅ¢.u±¨‹E],êbQ‹ºXÔÅ¢.u°¨ÓaQ¬åb-k…ó°ÂµÓÜÐRÄgµK|V‰Ï*Vs±š‹Õ\¬æb5«¹XÍÅj.Vs±š‹Õ\¬Vp®“‹¥\,å`)K¹X*Ìþ.–r±T˜¹Ã¹D.p±€‹\,àb ¸XÀÅ.p±€‹\,àb ¸XÀÅ.p±€‹\,àb ¸XÀÅ.p±€‹\,àb „Y×å컜}‡3ïræ]μ˙w9ó.gÞåÌ»œy—3ïræ]μ+®åŒ½žg³‰£ûà~x„ƒ’x ^†W ¯Â_à5xlX‹£ëÛJdê62u™ºLÝF¦náZÂ]gÜe£ë¾ÂÙv%í8ÎŽ2t8»®¤-ƒöÙmÚ×ÁÂÚ¬ÛÒÊY·Y±Yü8qVüxŽ'p ¯ú_û™u¥ÄÇðwø<ø>ÞC‚÷hƒ/`9|”¢+Á#vÇF×—„³èJ]fÑ5Ë áb»®àvç,º’œ]3Π+ɹ0æCûì9³Ëì¹ðÊïfÉù•œ_Éù•œ_*G•£ÊÑFåh£r´…³áèÖKtë%ºõÒ¿y&\‰®±D×X¢k,Ñ5–èKt%ºÆRxÅm—l%º]H‰Ž£™"œ©V¢{(­i¦Z4Ë·‡Ùhâi¼?ƒ÷_€÷gðþñx÷_÷Æû3xïϬqܱÇñFq¸:È‹A‘((E¢ H‰‚"QP$ ŠDA‘((E¢ Üg4ÜWÔ% \¢À% \¢À% Âý 3DA†(Èáž…¢ H‰‚"!ïUˆ‚"QP¬)¸x1Îÿÿ ú5ÔóëA.nf|QpA| yñH·dˆ€ !2D@†È" Cdˆ€ !2D@‘(E" H‰€"P$ŠD@‘(E" H£ï÷Ú¿Û ÷qÊE" Cdº|W$ŠÑ÷xWóø˜Æýé0›Ûs8Î…y0nå±ð»¼›¡ó;½"P$ŠD@¸w‘K¸2Ìéœ[" ÌÙ" H‰€"!2D@†È" Cdˆ€ !2D@†È" Cdˆ€ !2D@†È" Cdˆ€ !2D@†È" Cdˆ€"P$ŠD@‘(E" H„{S„6Cdˆ€"P$ŠQÏ}Ç{ƒ"ÞŸÁû3xïÏàý¼?ƒçgðü žŸÁó3x~&ZË« n§7}?Mˆ7ø‘¢U´‰zñ~újgig‰~ÚÇÚÇ¢¿öö?6~¬ŸŸ$%¾Jøb°<@(†ÊSä©by†VüLÄÇF}òÆâàÿÞO,ADˆè] ¢ Dtˆ.Ñ"º@Dˆè]@IäP9"»BdWˆì ‘]!²+Dv…È®Ù"»BdWˆì ‘]EuTÅ3t/6ÑmÝ6ÑmÝ6ÑmÝ6ÑmÝ6ÑmÝ6ÑmݶpDX ƒwà]paõN¤@´ˆöBm–¹MĈx›ˆ·‰x;Zsÿ2ù‘ê)hKÃQEð¢Zh“l²@EûRÔ‘ìÚû™øx²À„HePGjâ8lÛº8Ÿº8 ÷£6ÎG5ÍD5ͬ]Ã[Ž¿*F‘=*ñÅb8£@Æ(1 dŒ£@Æ(1 dŒ£@Æ(1 dŒÃ&cØd ›Œa“1l2†MưÉ6Ã&cØd ›Œa“1l2F…ŒQ!cØdŒÃ&cÈÔXެQ!kTÈ6YÃ&kTȲF¬a“5ìZ'U sØd›Ìa“9l2GÌQ!sÈ2G…ÌQ!sØd›Ìa“9lùWQ'ßì&±›Än«t[…Ú¬r›Lb“Il2ILR “È$2ILR “È$2ÉRw&pRT÷¾?]]S5ô©žfvDeQÜ×I0Ü÷âKÄ-q_PÜ¢HLTDDqc\@-•ŽÑ7×hEC"å®ã®ã2 ¥ ¹ñsôZŠmäE©÷­3=l‚îç½ûîg>ßOwWo5Õ¿ÿò«>}N•LR%“TÉ$U2I•LR%“TÉ$U2I•LR%“TÉ$U2I•LR%“TÉ$U2I•LR%“TÉ$U2I•LR%“TÉ$d’2I™¤ƒLÒA&é “tI:ä?è© r)äs£çë?!_MìsX_À—°2ü½€8Pè8:ÎÀ‡F ë è:ºÎ€®3 ë è:ƒŠÓ¥½¾6@• V¥K@ë ‹uÅ:ìzCyLךóØvkÖAF«’Ѫd´*­JF«’ѪMýèhûÃ`ÛáVÉtU2]•LW%ÓUÉt}ÄgâK!œ ÎDÑà~éf¢Ñ¯úU!ý%þøÆ7¢,ß”oŠ&ù'ù'Q‘‹åbÑ]þ»üwÑC¾-ß=å;òÑK¾+ßÍRK-zË÷åû¢ü@~ úÊ凢Ÿ\"—ˆþ²&kb@ðið©XžWž'5õnê+6…J´îQZÅw7pÅùI¢;|—¼µ;GÞ8N€Óá,º…©\ž çÀ4˜¸¸!O†äÉ<’'CòdX_!>$O†äÉ<’'CòäžäÉ=NCüàÙbXßÈ( ï.Lü|ä$ñ!|Kàc¨e©ñ„ÎÈ}ŠÜ§È}ªàd…"³ àÐ J !€24z* §z*ô‚fè } /ôƒþ0 k/ „A°I–³mSØ 6‡!0†Ápض„¢TØ ¶†m`[ض‡`GØ v†]`Wø|FÂnðø.ì£à{ð} {À` üüøŸðCØþü~ {ÁXØö}a¿,-à“ ø¤ÂOá8ÿ‘\_8Cá¶ŸgÀd8¦ÀY0ð…iü¿Óaœ 3á<8.€ üZ ¿ZP¸”צÿ/Ðÿèÿ ôÿ…+8¾WBWÁÕp Ì…*üšý¾®‡ßÀ p#Ü7Ã-0n…V¸ n‡;àN¸ î†ßÂ=p/Dð;¸î‡ßÃ|öåðGx@ ÂCð0<Âcð8<OB3ç|;‹r›s¡ýêÌÂÿ^Ìs.Ù0®àu¯„®ê¡C=tª\ï¹Ô¹Zø$ç¶ÍÏ&8dÓð$ûÚÆû=OsýYîçÿwÚ¹þ*ÿËB¶/âúëv¦›^d¶åôŽ=ÓFOÒjG8uŽfJ‹E»ÚE;=I¾2wG¯V$Ž‹.»Cè ½ 9;¼Øˆå"±\$–‹äÿâîƒ` Ž‡ÀÐlLq çõ©)Å-aÏÙ ¶æú6°-lÇííéƒvâúΰ ìjg…VÅos}$|¾ £à{ð}Ícöàò<îÀŸYñ^ñP蜋qçú\Œ;wõMõ•¶óÑNéÿÖéžw#Ü7ÓÝÔG—úè¶Âmp;ÜwÂ]p7üî{!‚ßÁ}p?üæÃ°bx‚‡áxƒÇá xÚ€XpŸbÁ%\bÁ%\´à .±à îËvÆ¢1¤G éCzÄ1¤G éCzÄ1¤G éCw)Ï1° þ ŸÁç°¾ÈÒ†î™iè!J ÍÐú@_èý:Óð!YôhùïžV[ÅzÒÊß; É”ý­ÓV™Yã÷M¹ýs8~gÀd ¦zSšêÃå4˜ÂeY‡7;k÷®ÌRï¸V”<òšw×odûÍ\Þbg5èðZ¹~ÜwÀp¯Áçåñyy|^^Ä6>'ÏÉûÏ'gyä,ÏÉãsòøœ<>'ÏÇãóñÈU¹Ê#Wyä*ïžÃgâ=ogFèðð&ÞÄÛxô†Þ+Ü·Ç,úAï,ñ¶½ÅõÅlÓv–„/åú‡ð,þÜ£?÷èÏ=úso)þ×|f%¡à3| ×>qíW€íS£ý|¾AâÚo†ÞÐúB¿,ñûÃòDÉ ›Âf@Œûĸ?†Áp Æ}bÜ[ÁÖ¸ûm€÷·ƒía >ûĹOœûĹ?vçúhø¡]S(Åg„þD.ÔIŸüëÿ2Ë× ñ!¾cO=ÒÊQBó5øÄž™ñªÑ¥Æ"¸ÐøÐÝ (CT ;'=¡/ÄK#ñÒH¼4/ÄKダãÜÈqnä87rœ7‡!0†ÁpØ.koÜýÚ)kkü6ט¥c³ŽÆ£¸ï˜,-‹ÿ9ŽË \N„S€ãW:ÍÎø¾æ ÆÃ3½ «FuHz>IÏ'éù$=Ÿ¤ç“ô|’žOÒóIz>I­ô|MI4%Ñ”DS’¾OÒ÷Iú>Iß'©’Z!©’¾O€Y››À`Ø6ƒÍa )‰¦$š’hJ¢)‰¦$š’Ô IÝhJ¢)‰¦$š’;õC¢+‰®ä®ð- ~Hê‡Ü ¾cgrè{ÇKî ûÀ¾°ìൄƒà` ‡Âap8GÂ88 ކñp Ð/ü_ÕsvâgCülˆŸ ñ³!~6ÄφøÙ?âgCülˆŸ ñ³!~6ÄφøÙ?âgCülˆŸ ñ³!~6ÄφøÙ?âgCülˆŸ ñ³!~6ÄφõÕmM}u[ð'sI®®Ï̯â38&s}J6= 'ZmµÛIÁùl¿4ÓÁeÙâ`6ÌúÓ€(¸–ÇÿnàöMp Ìcû­\’¯òu@žî‚»£ƒßÙ¹ˆ“`íŒþczÉ€^2 fÔÌ€šP3ƒ§x ýcð P3êe@½ È͹9 7Ôˀܼ ¯ÁBXoðœ7³ö`1¯O ÞÎÚÅõ¿g±½ó>÷;S¶íÍŽØvUÚÜo‡øí¿½§ÁعTÛë³½%øîVÄÛ‡xûoVNä=Nâu&ÀÉ0ÑŽòI+äí y§B_\™Óaœ 3á< _®\ôË•YÐø˜ ¦2ÛÎR狃ùùJ¦¢à<æ<&œ†÷ÞEo¼wŒp½™ÞLá•—óÈBΑ>¾è·úŸ{4Þ¾oߊ·oÅÛ·âí[ñö¸@š ’µàí[õQPõQPõQôµ¿ÖJùHùHÄwyÞî0†ë{ÁXØö}_(ð…‚ÞSà ¾PõNŒËŒ8 ކñp kÏ#q>ûr\Á,hÎoGZÄ¥p̆9Ù$q9\ñ5ßV¹ïWÐuI\ÿ~Ä ¸ˆCα(æÁ­ë™)˜Ĥ¸îâR—â>¸~x?÷ôQâ; 1àýñ*ο¼ŸÀû z)A/%襽® ×ôº‚¸ôU<+ßë<ç,µ³ó½Éå[@o þlG¦¬ó›ž :Ò9›©ŸÂR ˆevõ±¶õŒÉZû\K\(‚ àÐ J !€24A÷,*ô€žÐ š¡7ô¾ÐúÀl~a jna0—›Âf°9 ¡0 †Ã°%ì—=WØ~?…à@¶Ã!p(ŒÍõ_nW8†ËcŨÂqbDáÞ«ó—[m…3`2à› øæ¾¹0ÎiYka:Ì€sa&œçÃp!\³ .æ9—ò¾—q9æÀåpÛ®„®‚«á˜ U˜Ïcþ„`Äð <Ã#ð(<–%ëœði;;`[áYxž‡àE¶¿íð2ÞzG|6~ÕÍå¿ÙKós -ÎO€øw°ß£·8Ä¿s°ÁV9äç0ûÝzäÁå‘0޲côZœñ\c¿sïœqð®ÿ V·—Ï:ÈñvÎŽ­s¾=Ñæ\Ì~\³aÌbÎ!漋ó„=—`œ×ìwø-1â#1â#ý³CïìüÞzh'Ÿ#Ú!Nœ÷ì*O±Cœ8ĉCŒ8Ùï?:g$FœOìÚ ù˜U_q³ÍÁS:xJgdxù8v¬@TlàÿRDóÅJÖVì= 'ô‚>Ùüb_èô”EzÊ"ú.ÒGé#‹[À–0"k-n[s}ضãõ·çyôÐÅaø–ýU[q¤ýU[ñ»0 ¾£yìù*'Y÷âAÙØâ!Ù°â¡p¸¨‚Ó²ëÝý²V÷'Y›;‰Ë3`2œ Sà,˜ gÃ9€æ]4ï¢yÿââ_\jžKÍs©û.}‘Kwñ³nWÁÕ@/àε¿¦ŠÝ[`Ü ­pÜwÀpÜ ¿…{²ùî½Áïà>¸~óáöcÄð <Ã#ð(<Ãð$´ÁSü¯Oñà.ñà.ñà¾/A;¼ ¯e-n,„Eð:¼hÍ}Þ‚?ÁŸa1Ðc¹èÍEo.zs¼èÎEw.ºsµ²132~íù5ƣ⛚쯱Òö§÷mXžµ6|iWkõè+¼†¬Åó¸÷öðݾÛk²«„µz½ ×ûÃP®ãi<ùÃ'øCa ‡-²Äߺf˜Ü¶±3M¶ùÛq¹=ì3N¶ù»f±?vçöhn±k;DöüF>åþvFïÈ'÷×gõVþ±\?³ç?Zü v|R´žó -þipz6iå,•“í à3UNÍR;[%}·Oßíϰã[ü™@ßíÓwûôÝþ…vlS猖ôÞ>½÷Êó)ä"ÎÊó*-~hÇ>­=Ûe>¯¥>þ©Å¿ÑŽjñéýßÂ=õñPô„>=¡OOèÓúô„>=¡OOèÓúô„þÀÃÙY3é }ê“O}òé }zBŸ:åÓúô…>}¡O_èÓúô…>}¡O_èãé|<ÿ"¼퀧óñt_™‰_çÓúĶŸ5ϧæ­s”ʺέšù\ù©]eµÍÿ:Ç–¯:ô³´s ldž<ã“g|rˆ=¿DÍkÜ.›ßømøaÖÖ86km<&KJô %ú„ÒAöœÎüÒ„¬µ4~‘µ•NƒÕgÛÄS•øLKÙs<­¥®‚ë³V‰Ž%:–èXR%5QŽ€­€š(©‰Ëí`{Øvj£¤6Jô,w…oõQRån@”?æõ÷öYî ûÀ¾@-”ûÛÑ<-ò˜Óa C‰åy€·‘x‰·‘x‰·‘x‰·‘x‰·‘x‰·‘sàr¸У á*¸®¹Pô(¯…_g©ÄÛH¼ÄÛH¼ÄÛH4*ñ6o#ñ6o#ñ6²nƒÛá¸ð6-K´,ѲÄßH´,ѲDË-K´,ѲDË-K´,ѲDË#ѲDË-K´,ѲDË-K´,ѲDË-K´,ѲDË-K´,ѲD˲ýÌæ‰–%ZÞ¨ß+ƒm`‚=Ÿcz”€%à3 È ¹!¸Äž¯1Ç5¸!k n‚[€úP_êJpÜ ÷dQpŸý%U[@­‚G«äãÿþ&‰)BxgzSòßdyƒì™šf±ó7û+LÅ#+<²Â#+<²Â#+<²Â#+<²Â#+<²Â#+<²Â#+<²Æ#k<²Æ#k<²Æ#k<²Æ#k<²Æ#k<²Æ#k<²Ækü±Ækü±Ækü±Ækü±Ækü±þo0Aáßþ]áßþ]áß5þ]ãß5þ]ãß5þ[ã¿5þ[ã¿5þ[ã¿5þ[ã¿5þ[ã¿5þ[ã¿5Þ[ãµ5^[ãµ5^[ãµ5^[ãµ5^[ÿ?Sð<. OÀ“ÐOÁ3lžƒçáX{ŒÀv–}/ÖøbÏTÅf|ao@xK·ÔEêg‘úYŸÙ^ã%5þQãu‘Ï·Èç[äó-îÊý£Ùv sþpRý»èQõï¢GáÛñn ï¦ðn ï¦ðn ï¦ðn ï¦ðn ï¦ðn ï¦ðnï¦ñnï¦ñnï¦ñnï¦ñnï¦ñnï¦ñnï¦ñnï¦ñnï¦ñnï¦ñnÚ}I”ÜvxY”¾î»\¼…Æ[èUß§ÂÜfÿñ¡ð ¡ð ¡ñ¡ñ ÿ ð ÿ ñÿ ñ¿ ëß*ü‚Æ/hü‚Æ/hü‚ö^á}r¹^‡7 óûQ_Ðø…_Ðø_Ðø_Ðø_Ðø_Ðø_ÐõïG¾@ã 4¾@ã 4ý¿¦ÿ×ôÿšþ_Óÿë¯|×¹l #Dƒ¿ç_ý>“íh€¾_Ñ÷«üûÌÿ¿7Ôô˜šþRw~W(Jô•š¾RÓWjz9M/§éå4½œ¦—Óôrš^NÓËiê¹´5\QÃ5\QÃóY»5µ[S»uÀç¼ ¯Á›Ü^l¿'¡NŠuRS'5µMSÛ4µMSÛôÊï'NäúLQ¢RÈÂ3D¬(îDl5¸/¡Rß{%ׄ¿-G_ú»p¬ƒ "Q^὚Ê-åÑ£<·¦ÔÇ”ú˜RÓúùí…ñâ”±b?{nûd˜Æã§Ã 8fÂyp>\ÂE0 ZàR;®m}+Î$…gá9àó*¼`Ï!›ú9dcÏ!ÿ([îìcí9âÄ9އ“ìjg«¯„˜Ø•g~ÉõSí¸5íœnWŸé¨ÏÄeœ³à"n_ÌíK€}£*gt®4cœ+!ú}çj¶]“µÕWšQε0í«ŸCÎÏ¿/F9Kxÿá°ÔžëÍý’P_ uUQWuUQKµTQKMq'îßvÑùj0b$õr¤­—ûeÆgÀd8ø\þw*œ çÀ4˜3`cΩÞ-wo„›àf^ãà¤Fj´¡Fj´¡Fj´¡Fj´¡Fj´¢F+j´¢F+j´¢F+j´¢F+j´¢F+j´¢F+j´¢F+j´¢F+j´¢F+j´¢F+j´r‰U—Xu‰U÷=xþ>€>„€ãír¼Ý|w÷Sø×ç9W_­R­qŽóãlyÃòÌÔÏs]Ï9N㇫ã4_9ǹU¶ÜÛšíç97Öwž“Üç‘û<ò½‡¡÷H½ë²„ž#¿eè9òqZ†žÃÐsä+Ó(ú E¿‘Í2ôùê4Š^CÑk(z E¯‘÷†>CÑg(ú EŸ¡è3”G¤ÏHé3Rú C¡è/Rú Caè/Rú‹”þ"¥¿Hé/Rú E¡è/ý…ò–Ú¾BÑW(ú E_¡Ö±"M×¹Á„ÁÐ#ä+ûå³,%þp¸]ÝOÕWMÖyÎoÛÏ€3a œÁ,è:gG]ð© >uÁ§.ÔWMü{áA ßûä{Ÿ|ï“ïý¿òžoƒ‚wÖ{ž«k…ÔçxÔWU>úÊW¥¯Èg-2ôù8$U_)fõsWù,EŠC•N±ç­’ÒYp6cJä˜9¦t=ü-[^z×®£e\h|h„nP ”¾NÒ×Iú:I_'ñ{¿'ñ{¿'éç%ý¼¤ß“ô{’~OÌŒ›À`Ø6ƒÍaü8SôCŠ~HÑ)ú!E?¤è‡ý’ð˜á 8Cá08Ž€#aGÃx8Ž…ãxãáøœärɱ’'ÇKþN_À/áT8 N‡IpLòºœgÁÔ,_ß7‘h[òyK>oÉç-ù¼%õ]¾±ê«¤®Kêºäs—|î’¼"É+’¼"É+’¼"É+’œ!óù3È+€8P€\K‚F Ÿä“@Be ·ènÇ{Njb¶< Çäø5ÎG]gÇúRC_jèK }©¢/Uô¥Š¾4Ÿ‰' 8Ákö~'_¡1 ˆá|Ûr÷,)÷€žvdå9jâj+Â(úWU¦þ•ó_{w®£Êóxü­Y²úжMäÃ&òa}H}H}HÓ&Àñ¡÷Mé}Szß´2ÊžÇ1•±°7ìû‰vŒL>»'fˆó„pF:#…Û°´a©hð/ž7ÄB_|Ž7]4ŠBãBÛín-Æuþ¹AþçM_×_çö®G­y_×óŸն}@¯œÒ+§ôÊ)½rJ¯œÒ+§ôÊ)½rJ¯œÒ+§ôÊ©àsݳ|LL*Èób =ýq\'Àé¶ß5ô»†~×ÐïúÝ|¬KJÏ«èy=¯¢çUô¼JÌ`û¹0΃󳚸.„‹`´ÀÅp \ —Ál Ÿ—ÛßÊÔDlçÈùêJ²;Ò·Œ´}Vþ¼ÏRôYÊÙÛÎjPs~BçL$5»’ì<î›OÂÓð¬ý޼漟ÛYIVŸ''-޳ëläãÎSú˜”>&¥IécRú˜”>&¥IécRú˜”>&¥É{EO¢èIò_×ÜX‹àuxx_÷Mx þ†ÅY­¡»‡6,±õ\QÏóZžRËS¯ÁÖî”ÚzClÝÎë´¢Nç5:¥F§5È£yÔ ä±ßÞd[£ 5:ÿþ1õØojµòØoýöØoïBûýUÍ?Nr•.—3¡ów€5ÿWpÜeçäé\1vÍßóÕìïùèÕ¨)õ!¥>¤ÔUz×ÎòP“çÀ4˜3€÷¼‡<ЈD#H4"шD#H4"шD#È9p9\ì› á*¸®¹PöY^›ÕÈI)9) N¶9I§ØqŽ)y) fØóãù˜Ä|Ö•ZÙŸ‘¯ê:ËŽÙ«5•@BehÊjä´‚þ*{À` à#É )y!%/¤ä…ô++¼ÉsÇÁQ€6+ãÑøõD«"ZѪˆVE´*¢U­ŠhUD«"ZѪVFëY6²¾ñ,DMþËš®(Y53D>+Ä<¶Ó!;À;²ÄÎ AT(¢"%*òhPDƒ"Ñ ˆE4(¢A ŠhPDƒ"Ñ ˆµ¡3D x…âŠWuÅ+Ÿÿê WºBé ¥«.%Û!ºfƒèšù!Ÿñ!Ÿá¡kv‡eö6…*ªT¨ò¿týbÔ¨Pc§ §ØomJT+•x-Û~cÕhgnXïì £2µ*¨P B ªuÎàp ŠKP\‚â— ¸Å%(.Aq ŠKP\‚â§Pœ¢>tP:PAuÕTgPAuÕTgPAuÕò¹&Ÿë•³ÎìˆÇ Ä 4(0ÏÑy~NÈϨÎÔg¡Q]³Ð ¼å%(/Ay ÊKP^‚ò”— ¼å%(/Ay ÊËg¬1(Ï <ƒò Ê3(Ï <ƒò Ê3(Ï <ƒòòß¼$(/Ay ÊS(/Ay ÊKP^‚ò/Ÿuõ$rÝ©pàÑQAuyŽÌWå6¨Î º<æ¹0Au ªKP]>Ü :ƒê ª3¨Î :ƒê ª3¨Î :ƒê ª3¨Î :ƒê ª3¨Î :ƒê ª3¨Î :ƒê ª3¨Î :ƒê ª3¨Î :#sEÑ/¡ºµ%¨-Amùì7…òFe•TfP™Ae•T– ªU%¨*AU ªÊÇTeP•AU¦’ÍW¨î'ÒÕ|GìNws¢8MøÎ|g¾èéVÝ_‰^ IÛ¢wò†e¢oÃg Ÿ‰~ +²ýÑXqs1êúóž÷žï6¥[Øm^·öníöyiÛÒ>¥_•î+½XúKé=Y’Ír ¹Ÿœ ï–ÈW‚R0(ø~pH¦¼[yBù‚ò夼¢iPÓaM-MOW‚Êqs×;TŽþú¿üݽ绮‹'‰ƒ˜8ˆ‰ƒXä+΂¸.Ká2˜ s²8™H‰™H\ ×}ªhÍ‹Ûàv¸î´35u޹}ÜŽŸMÅ ð"¼íð2¼¯™Vi™V,²ãfó,c11;‡ÛLŸÏ Ÿ:ÇÛsNy†ësÄ=‡ó±ï§œÏì Ây TŸó XÜžXܾx¸Ø«x„(ÇâúÑ\ÏõUs„ÅÓè¥^‡éÝ‹‹ÄqÄbL,ÆÄbL,ÆÄbL,ÆÄbL,ÆÄbL,ÆÄbL,Æ.Ö%¸ùZgxëÒ¹xz—ýtÙOã~x÷S;V'§³ožW…OžW†˜8‰Ó/¾/¾/žâÅó±6ù¬T1±›Ï|œâÉóÊãÇSüxŠOñãy%‰ñãùŒU1qÏ~¬ðå‹ñå)¾<Å—§øò¼ÊÄøäŸœ–òêrvë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ë1±ã%S¼dŠ—Lñ’)^2ÅK¦xÉ/™ßžÇ~LìÇÄ~ˆ—JñR)^*ÿÎ|1þ(Åå•'&'Ä䄘œ“brBLìÇÄ~LìÇÄ~LìÇâi¢!""¢!""¢!""¢!""¢!""¢!""¢!"4Ñ ‰M4h¢A šhÐDƒ&4Ñ ‰½Ö " 8‰|F¬ˆˆˆˆˆ¨Ñq Iؖϲ*"4¡Vˆ1«ED×, #‰†)öìçx.ɪDBÕþ‚õµ,BùÊP~„ò#”¡üåG(?BùÊP~´‘Ê×(_וÕ•¡üåG(_£|½šòóª¡üh5åGëP~„òó™:#”Ÿ¯¬Q¾þŠò?¤óÿÈÎŒ­Ñ¿Œ€ûpŸdš(ˆˆ‚ˆ(ˆÖˆ‚¸€¡vF®Hˆˆ„ˆHˆˆ„ˆHˆˆ„ˆî¾Fw_£»¯ÑÝ׈ŒˆÈˆˆ ª ŒÏm±A‘AID¤DDJDЩÁ\›ÿk(¾†âk(¾†âk(¾†âk(¾†âk(¾†âk(¾&’¯¨½VW{ µ×P{§Òÿ’=ê¤Ví5Ô^Cí)ù?W{­HoP¤Dõ“VSýѨþhÔ½x#Ô]CÝ5Ô]CÝ5Ô]CÝ5Ô]CÝ5Ô]CÝ5Ô]CÝ5Ô]CÝù¸ËZ]Ùµ•Ê>“ëS`•’k(¹VWr %×Pr %×êJNWSr>¶°†Šk¨¸†Š»Ô[C½µRîUÿkÕ[C½5Ô[C½5Ô[C½5Ô[C½µàïö\X>Sh²RÁÝQlè ›³} ˜Çõ[ñ«ëSïºÔê'®XXü'¹.Uí“cðžîˆË„Ë=ËŠ_Ú-©;"Û“Ê?qÅ;EƒJ–ï—AWéÒIºt’<²GîoŸû2÷¶³¥-½ó÷É ÅÏE[·›hàžÄ>6°ïCÿl÷â³ú«çBvëïÐùŒ‚häµ6-.c:÷;u=Qªï{¾§ß=yÍ›ÙSÅ£Fð¨Ä¾îç\~_Šæbþ½ }?ÏÁ3ûø!þ‹Ä D³[Î_iÅcv¿{ó {ä¯Ü‹]ì‘{§˜wÖyZ¹îÚÇS8]Ç‘}ÿÇÏ>Ö7^g­ãÅü {·žã#ºÿg‹ýÿÖ8vËÇA4¹Í¼go^­—xæ@îÄõM¸>˜ËM¹o—ø=œû¶àú–¢Y¸n^u ÷nÆåðü˜¹ÍÜÊ_k ¯ž¿Æ`®çÏÎmž'¼•ï4°~OþÊùs›¸G¹}¸Õú‰Áõ}É_g0Tîfl߆p»s_ò×l÷>a_R·?û1€O Ö¦lÛŒmCÙ6ŒmÃó³4ü¯Íõ=hæ‘ù^˜úÿʾ²­sšyF¾W¦þ¿–D÷úfìÿÜúñúò½ãú&Ü×ùŸ{,6‡!Ü?,ßC®çc{œ×|ßæúû–ÖzÏfûž^ý‘©ÝÃÎ{S{+û™)_p,Öú܈…ÝD·õÙÙGùëûü콕ý í³å7ýëﵑŸ%Ï+züg?OŽä_DyC?Óú1\Ïçjï½eƒfüÛˆûÖ˜‰o]³ðå3ïÕgÛ³³ìýwšao]3ëuͦ·öLzë›E¯k½µgÎ[–ýöî:Š*ÑÿøíªNߤouBØ]FÄ pGp\Þ¼— â¨#D•€{DPAPÖ°´Œy£íÒ.8˜™• (Ø‚aiTT2ji—B-Ôl—ïûV%‚xÏÿýÿÿw‡ó±*Ý•N÷­[÷þn[u+ñ¿eV¼3Óí:+Ý/ÌB÷3³Íµ[Ä7B9ãúªœ©iåóÂ…¢(ì×èýä§ÒÝå×òkqlttt¬8N½£Þ=Ô{ê=q¢z_½/zªÔ¢—ʪ¬8I}¤>'«OÔ'âµIm§ªÏÔgâ4å(Gü^}¡¾½ÕWê+qºÚ¢¶ˆ3bűVâÌÂo ¿ˆŠg‹PÁ­Á7Pÿ!î«ÿîî›÷RÞKòø‚Óêÿ5>ãÿó÷·Ø»þëíú¯ñ•î_ÞKâ‹ßxWËl¨9ŠÐÅ  µBk´A[ìzWË_{ÖžÏ[þé#÷öŽþÝi.´—Dqh™ˆ†–ãe¤ñ öp>ñŽ»N ÎmªÝíܦú;øÉz0·Õ.ç ûç7ù#ÿÆkH/Ð2]a`9¥?Òßû»åýÒùG{·¼]ÎŽLÑÙà®nõçÿfwÜÁ­éÚ²»Ý©-»Ë]ÚÏÉ©¿K›W¶ú;²ezG¶àÜ߯;²eƒ¹‘êÏËi¼[ögîÆö“órÎùmz·µ=ÍoDO'I²‹ˆÊCýóLƒsz£ çôwH îÐåߙ˿+× QÜp^Kp÷­_ºk”ÅþÙíBÙ&w jzÞl66G7Þ¥ç'wÚñï¢ãŸ'{)G@Ž# ÇãÈqä8r9Ž€G@Ž# ÇãÈ#´œ8™õ{‚{jæŒ9Á}Ž1/˜-G­ÍQ[rÔ–µ%GmÉQ[rÔ–µ%GmÉQ[rÔ–µ%GmÉQ[ü3³ü³±rìý{9Ç^αgsìÙ{6Ǟͱ'rì‰{"ÇžÈQ’9J0G æ¢×³óä(Å¥˜£s”bŽRÌQŠ9JÑ?cÆQCp%®ÂÕŠ2 Ãp\ÿµ®Ãõ¸7â&”ãfŒÀ-‰Q¸5˜&ÇÞȱ7üÙWüWr”~.FÙÄ(qÙ^—6Õà¯77”úèÝJ~¶vDpMÁÿýR¤½Æ’W%`"ŒË§sùt.ŸÎåÓ¹–ï CX¡)¡é¤Á›DØiŒcŒ1Fä3ŒY¢ ²,²\Äd±l-âùGå%ZD‡D‡ˆbe¨¢¥ê§‹ã­ÖFq–¤¸#Ä ÿBNý¿ðˆðˆÈ&ÿŸTл ·ÿstÛÎbPx„¯~›úuÿ§ÿõ#9ä1‡<æÇò˜CsÈcyÌ!9ä1‡<æÇò˜?W¬ÃQâp”8%G‰ÃQâp”8%G‰ÃQâp”8%G„ÃáŸóíϯá·üG‚?¯„CîpȹÃ!w8ä‡Üá;r‡CîpȹÃáÈq8rއ#ÇáÈq8rއ#ÇáÈq8rއ#Ç §ƒóxŽÿ.¯ÙÁ!;øs-:Iþ9¼yÁáˆr8¢üóvŽ*‡£Êá¨r8ªüssý¹ Ž,‡#ËáÈòçtè£ýóOýyïœèð Íq¨Ù5Û¡f;Ôl‡šíP³j¶??˜CìÐû­¿C t¨~ËïÄü9’bO¤ÙiöDš=‘fO¤ÙiöDš=‘fO¤ÙiöDš=‘fO¤IÆÉØ!;$c‡d쌒±C2vHÆÉØ! ;¤a‡4ì†Ò°CvHÃiØ! ;¤ago¯ÎÛ튶´Y¬+Í–àï“NÒ©?3ë|³#:{¾ñŠ6ÖU›tê÷‡¾P'I¨Ij’„ZL:-öÿO,5$M ISCÒÔ45$M ISCÒÔ45$M ISCÒÔ4ÉÔ!™:$S‡dêL’©C2uH¦Îo¹z4ê×¢tÃhijQšZ”ÞqõÙ"Ö«A$u:;®:[Åc«ƒÕôj³·ƒ+Ëüš•&]úgx;$I‡$é$È×Akz娱:Mó¯Ö·I‚Î^\EåÏR7ŸÚ—¦ö¥©}iÒ Óä*ª:žÏêùWL‰Ê_}Ý m µÊ¥V¹Ô*—ZåR«\j•K­r©U.µÊÝÛ,ZÁ¸h%ËWQƒUXM{¼Kž1c k˜Åâ³%Zi—çRãÜÆŒ\ëÑÚÕG±~4Žǯy5¬뽂Z蚊fq’y‰®3è:j’KMr©I.5É¥&¹Ô$—šäR“Üß’ŸÂdŽ0™#¼.˜G%¹·LµX»Ô wG¶ZÍúnù*òê¯pƒk\–[°ÛàßWp· &c¬q8Ž`ý˜†L6X»;2Ù/å%ÿ|gŽ*ë– ±48çÙÝ5GY¼/ëu¼õØ Š­\0®²U|¨(Ž—a†£Ü¿þŽÇý{SÎ¥ísiû\Ú>—¶Ï¥ísiû\Ú>—¶Ï¥ísiû\Ú>—¶Ï¥ís©¥.µÔ¥–ºÔR—ZêRK]j©K-u©¥.µÔýŸª¥Mj#ïëgj Kms©eþÕº.í™K{æÒž¹´g.í™K{æÒž¹´g.í™K{æÒž¹´gîÿD-¤æ¹´gnPóø;´g.í™»£.b½»×ÆU¬ï©F¾Íc~m´ƒéþªI™Ðž¹¿¡&º´e.m™K[æî^ wÔ¶ò fåÄð½Øû¿½çóç0ßÙóí¬ë…ô| ›\Ë}lc{£Sôx)z¼TpݶͶýÙ/ïñ½ïÁüž«±·Ú¹Wë{©ú=Ú´‡zçg÷b“^©¡7ruo´X/lØc»ö> é}îè}ÖÑØ´6mM[`ÓØ´6mM[`ÓØ´6mM[`ÓØ¿:íz¥æ¯ÍDÔ½u/Ô ötåæ^¦âú+4öÛ¾]³Ý$O5¤ç C5ý¦ÏOÔ6í‹MûbӾش/6í‹MûbӾش/6í‹MûbӾؿ"/íuâÞí›<§þªºà›.>NŸŸ ¡f·ã׈hµó_¸­ë ‘‡$òQ€(,ÄPˆ"´@1Z¢Z£'zál]+úàœ‹óp>JР.D\ŒŒ·¢þåƒ08¸"¡DÜ… ˜ˆ»1 “QgÀ1S1C'ÄL½PT`fcæ"Ás÷á~Tâ¿ðW<€‘ÄCxàQÌÇSX€§Q…¿ãø'žÁB<‹çð<éù¢‹YK°/â%,ÇËHã¬ÀJ¼ŠšàÿŒîí¼¶ ±õóÚ&Ä;xï¡N§Äûø7>ÀFdñ!ïï#|Œou‚Ö=Aëž uOк'hÝ´î Z÷­{‚Ö=Aëž uOк'hÝ´î)Z÷­{ŠÖ=E랢uOѺ§hÝS´î)Z÷­{­{­{­{ŠÖ=E랢uOѺ§hÝS´î)Z÷­{ŠÖ=EK^EK^EK^EK^EK^ºR—‡®ÅÍ[0£p+nÇh¤µOÒÚ'ií“´öIZû$­}’Ö>IkŸ¤µOÒÚ'ií“¡Éüν¼ö–S1 Ó1ƒÇf¢³0s0 ,d›gñžÇ"Tc1^À,Å‹xIW‡Vè ÆNŒ*;U0vª`ìTatGÏàú… ãôà†£/.Ð £_ðºKŒþ,/Ÿ$ø?ßþܰ ã2 À@”²Ýå,ÿG¼qnØ„q†êù sÂ&ŒÛt¹A9ã1“u’-I–4á=<©§ Y>Ïr–ðž–bÑ›+õzcµÎoðØ›ÁùÞ%uΠÎÔ9ƒ:gÔ÷¿›dü›å؈¬Îò»±þ1>Mâ,ãSÞßg¬GW›Y~üŸüÆycÆlÕ m:e|Íöß±üžÇ<ü€í¼§Yjî3bIîmS?lÂŒèôŽ{Ïè¬%R§éÉŒ[“äÅ„×åf34GZ X÷&Cö¦·OÑÛ§èíSf[òc;~¿=Ïï‡ýq 8Ú<ˆe¬Kɘ¥dÌñfg~>]ø‡â0ÖÇ8’×êÊûëFšèîÏ%¤+W0® “&ÍãXÏv' ŸåD–=ÑKך'±<§èI)ó4Ö¯ç›gì8Ï>m^\ƒXæCý< Ὰ<\ÎòfŒÀ-‰Q¸·ávŒÆŒÅ=º6|/¦`*¦a:f`&*0 ³1sA[JêIz¤ž©'AêIz¤ž©'AêIz¤ž©'EêI‘zR¤ž©'EêI‘zR¤ž©'IêI’z’¤ž$©'IêI’z’¤ž$©'IêI’z’¤ž$©'~…Ϻ+ñ*j° «±kùl¬Ãº$¼oâ-¼  Ž‡ÿ…wð.ÞCÞç=SÇÃÔñ0u<œÅ‡ Ž‡©ãaêxØÎÙëùióhcó¨yEz~Þ]‘÷‰®ÍóXn®)ªˆÐWG X‚¾8B_iÃzÛàú¢ŠH'–qº×UDõ+rè£#—ñø D)®"e‘X"CAZŠ Ã")VEfêòÈÜÏï=Èϱξ%5&#)ÖÃãxOb~0·l‚4™ M&H’I’d’$Y¡½$I&H’ ’dŠ$™"I&I’ÉÈ2ž[Ž—‘ÆJ¶_Åv«Ùf ϯEëðï…>dYE²LE6°|‡eKÊt™"]V‘.«H—U¤Ë*Òeé2EºL‘.S¤Ëé2%¥.—ù(@ b(ÔIRg’Ô™$u&%키]Åh‰Vh6ºJ¶ý¤¿“ôw’ö@ÒȃÑÐYWËCÀ>‘ìy8ÞI¯ ÒkBžÊ6½Yž©Ê–õsÄ&ä¥z¾Ìrh×åP]"Ë‚3†ªä ¬ßˆÁYCó¿&ähŒÁXÜÁówbëãq&g5Îýš“1Ó0“m+‚3šÎ÷zÏã½=ÀòÁàŒ£ɾ–ìk¹ ¸çBIN’ä$IN’ä$IN’ä$IN’ä$IN’ÔId$IF’d$IF’d$¹ ä$IN’ä$IN’ä$IN’ä$IN’Ô ¹k°¬ÃkÁP»Ïóšä$IN’µ Ï’ôYò]öý{ 'Ir’$'É(çÈ‚œ$é$ý‘ÜŠmüü Ÿ—~GÒïÈí:‘O_È£*¿[p/žªü³t9#dþ ]%çFɹQ2.£Tô ý"#‘$#‘dô:]½MçpMDÙ7щ˜©+¢˜…J]¡¨CŠ:¤¨CŠ>Eѧ¨.8ô)Š>Eѧ¨#ÑÝÐGáhƒcqèS}ŠêúFEIFEIFEIFEIFEIFEIFEIFEIu›.Q·c4Æ`,¨OŠú¤ÆŒ®È芌®È芌®È芌®È芌®È芌®¦a:f€:¦*0 ³1s‘õLÍÃ_tB‘Ù™]‘Ù™]‘ÙuO‘ÙýŒ¢-Rô3Š~FÑÏ(úE?£ègýŒ¢ŸQÔQEUÔQE–WÔQEUÔQEUÔQEUÔQEUÔQEUÔQE–WÔSE=UÔSE=UÔSE=UÔSE=UÔSE=UÔSE=UÔSE=UÔSE=UÔSE=U™à,¸_šÃ5¡¨§V3]aÑFXe¸^g­‚ûêLµncIÿlÑ?[“t­5ôÑÖôà>:S­¿â]n%ñ0Ñ ­Gu¥E[mÑV[O°-í´5O¾×zšÑnÛü]W[”‰õŒÎX ±ˆß%ÛZ‹u©E¶µÈ¶ÖRç³3JN0JN0JNY¯è´µ+ÙþU^‡~Ö¢Ÿeôœdôœdôœ´Öé-Úmëu¼õ¼Î›lóèçQWYuü÷ù9Ë’þÔ¢/µhÏ­Mlû©^o‘-²¢µ9˜ó5a}‰¯°…¿»UÏ·r¼Î·”Ãw #Z£Öü.Ù0&teŒã5F6Œ™:c¼ËÓ%±ëÄ”ÎÄ,½>Fß‹g!îœ ¶þ~=ÙXo‹ö8ˆ×ëÀ²3Ëaº<ƾˆMîÛS›£«csu2–uw—9aK £P°C!ø{…ÍÐEhbüÀïlÇк*~’®ˆŸ>8çâ<ÐWÄû‚±Cœ±CüB0vˆÓwÄÿ„K‚¹_ñ?gL–Ä` ;Ä/ÇÕ¼öP^‡º†á¸F—ÇsÅi«âåº6ÎØ!>c0wàN¶Ç’1Eü.0®ˆOdÛ»YNc¬8ã«8ã+aÓH¯aM±¦ #~~ü|&Ø.ƒo$¢¨¸ÿ/¯P„u™ÈCù(@ b(Dãx‹tµhb´D+´FOF½p6ë}pÎÅy8%è‹ Ð¢?.Æí‰(Åå„Á¯{ˆ»0q7&a2îÁ½˜‚©˜¦;Šé˜ÁÈ{¦î-*0 ³1s‘à¹û0OWŠ¿à~Ö+ñ_ø+ÀƒHâ!<ŒGð(æã)üßãH¤hAФhAФhAФhñ,žÃó`Ô*8²)LÂÄ,Å‹x Ëñ28ºÅ+X•x5X¥û‹ÕXƒµÈ`^Ãëxëñ&Þ)Ml@-ëÿbIZôÀ‚XÔé¤xÿÆ؈,l>Ó&|ŠÏð9%ŠÍø_â+¸ø?òZZ§B!ºGÈDyˆ@"ˆBÁB …h¦»†š£-PŒ–h…Öhƒ¶hǶí±ÐCâw8p0:¢:ã\ȶýq™…™…®Ô}B×âfŒÀ-‰Q¸·c4¿;cqîÄ8ŒÇ]˜€‰¸“0™ß¡†¦°œŠi˜Ž<6˜…Ù˜ƒ¹H`!Û<‹çð<¡‹ñ–`)^Ä =&´R—†^E Va5Öè²ÐZd°N—Ýq,zêjãT–§³$içêœq^ð­G£/.`Tß”‘ÑŸåEø.Æ%¸T÷7þÌò2 À@”²íå,a°®4®`›!¸’Ÿ¯ÂÕ:c\ÃÏ×òÜõºÜ¸7êvÆM(ç}ÜÌ㔹q ïk$FáÖàî9} ÊÝÍ6cõãÜ)Ž6Æ‰ÑÆx¿K;Æ–y½»Ùf²îh܃{u©1…¿7•õi,§ó{3xl&*0 ³ù½9º«1—ç¬ß‡yx„¿ý¤e,f®HÏëñÆ",áõ—b–kÏXIÙ­îöëoðØ›Áµ= Ž)ƒcÊà˜28¦ R­ñ¾îmj°Y]ejXÿŸÀÆ&q­ñ)Ÿå3Ö9ïe3Ë/ð%Ÿã+0r29[yÍm¼‡eû ¾ÓßSŽÏý€íà848M¡«MŽCÓ€©+Ͱîoæ±Ñ“LÉsù(àqÚuSw îaÆôx³P_jÆu³š£-P¬•Ù­tG³5Úè³-·Ó¥f{–õ߯ô1—˜±ì€ƒuW³#:±Mg~>]øÝCqë‡ãÉ6]ùûÝt…ÙG±ýѼ§cX«{›Çé1æñlwHÎæ‰,{¢—®2Oby2NásœÊëžÆúïù¬gðÙüÙ ûë¬yëâù‹áŸñíŸí=„Ï?þy5çë²p‰® ÷Õ}Âå¬ßŒ n†©›aêføV܆Û1c0÷èê𽘂©˜†é˜™¨À,ÌÉ$<78üGøa<‚G‘ÂcxOàIÌÇSøèŽá§Q…¿ãø'žÁB2ˆBÁB …<G34mФM‘Åh‰Vh6º‡l úwIÿ.éß%m‰¤-‘£#:á0=FŽ#t©c0w°ÍÇúxÜ… ˜È¶wcë“q¯y/¦²> äTIF,g±ÝlÌÁ\ÜÇãóø°$JÚIö”ÙS>ÍsdOIö”dOIö”dOIö”dOIö”dO¹Õ wJr§$wJr§$wÊe {J²§${J²§${J²§${J²§\…ÕXƒµÈ`^ÙS’=%ÙS’=å[;}ž¤Ï“ôy’>/Ÿ¾.ÿHÝ#¿›¾.Ÿc5ÿxÖÏÒ}òûèŽQÆQÆQÆÑAº2:˜Ç®ÐeÑ2–Ãq­î½N÷‰ÞögtnÃ:eÿE'b&ÛW`*ñ•®~§k•¡Û)aä!‰|  1"ŽfhŽ"´@1Z¢Z£ Ú¢Úë2µöÇ8¿ÃAèŽ Å±¡86ý¬¢ŸU]p(ègý¬¢ŸUG¢+º¡;ŽÂÑ8Çâ8ÐÏ*úYÕô³ª§£zá$œŒSp*NÃïѧ㠜‰³ðøþÔÕÙ`?¨sp.ÎÃù(A_Ý_]€~ºTÑ_«þ¸Ÿ—âϸ 0¥¸ƒ0Wð^‡€L¯®ÂÕŠ2 Ãp\ò¾b_«ëqØçê&”ƒq€"“*ÆŠq€b ¨Ûtu;Fc Æ‚c\qŒ«q`Lª“*ƤŠ1©bLª“*ƤŠ1©b< “*ú5 ÓÁx@q¬+ÆŠñ€b< (ÆŠñ€âxWóðRŒI•7)ƤŠ1©bLªhcRŘT1&UŒIcR•ÂcxOàI0NU´жBÑV(Æ©Š¶BÑV(Ú E[¡h+m…¢­P´жBÑV(Ú Å8UÑ^(Ú E{¡h/í…¢½P´ŠöBÑ^(Ú E{¡h/í…¢½P´ŠöBÑ^(Ú E{¡«*ƪŠöBÑ^(Ú E{¡«ª·A{¡h/ÔV]®¶ákäð ¾Åwø~Àvü­Ë- ˜ƒ>ߊ@"ˆBÁB …ˆ£™.³:3¬•Y'³,E™®¶®×9ëŒàç‘z¼u[0ß_™El¸Ãv­5‰í&ƒLhÝ«]k:ÛÌcÛ¿âÝÇJâa<‚Gu©EÿoÑÿ[OèJ‹¾ßš§°@wµžÖV•îoý]±þÁóÏð7‚q¡Å¸ÐZÌ6Œ -Æ…ÖR_¦{XËñ2ÈwÖ+ú:kÈwãD‹lg‘í,r€E°ÈcD‹`½Ž7°ž×y“mÞÂþ.ÙΪãï¼ÏÏÙ6Ë:9Î"ÃY´ÓÎÚ¤«¬Oõ|‹ñ‹ÅøÅÚÌggìb} Úmk‹îmåx­oYÿ߃6Ûú‘ßcœº,FÛ3‚;v§baä鱤îËçgöWŒýSº*féù1ò],Žfº¬9ŠÐBWÆŠu&Ö­‚o S±6h‹öšÂr*¦a:âY<‡ç±ÕXŒ°Kñ"^â÷÷|ßtèUÔ`Vë´ÑSgŒÓñ5Î îé[c\!ª×eºÖ†á¸†Ç®c»Û´mðÙŒñ˜€‰Áœr;æ¡4–ðzK±Œí_湕ºÚXÍϙຽŒñË·±!˜£¿Æø [y/_ó÷rºÎøß÷l©1¶ëŒ)t­ijÇ ëS²ž‚`¾K׌±,D\Ûf34GZWÇïœ ³=?ï‡ýq: 3Aã<™‡±~8Žf"Zovã±îþ¼™:mcp,¯u<ÏŸ€ºÎ<‘eOô⹓XžÌã5Ocy†Î†ûj;|΄ïÅLÅ4LÇ ÌDfa6æ`.ö~Fÿóso¾Â{_•x5X…ÕXƒµ:Î`6éšð§ø ŸÃÁf|öq˜}v±[± þ\ê?BëÚ¼f:›Çq›·A×ä}¢3y›ù™})@mÐЇ  ×5‘^¸ŒõˆR ×ÙÈ5¸ÔÙȽ>˜;t¦¶#sp¿Nsˆ>Äzý¬'µ‘ëáq<'ƒ™v eç¼¢Ï3<5ΈÒt^Ñe<·/ßg£~žQwÏóŒò>vÎ3º~—9FýYSÖÿÚ9F¥Ô¶ÌG¢P°Ãîsr|HŽYŒ–h…Öà¸ò`tD'ÐþIÚ¿]î!œn¸‡pºq¶y*ÛÉÏýt¼T¯o¸‡p­ÆÏ·`$&ânÌÂlÌÁ\$Øn¿û4èGûÖ0ö­aì[#?àµ6" ú’=ܸVú3W×ßxçܨgsÔæÒYÆ­Æ­Æ­™]çJe¬j3Vµ«Ö0V­a¬ZÃÐf h3´ÚŒmÆ€6c@›1 ÍÐf h3´ÚŒmÆ€6c@›1 ÍÐf h3´ÚŒmÆ€6c@û—æf%Ï×çkÈó5äùò| y¾†<_Cž¯Qÿb›wQ‡c#>Äǰñ)>ÇfP.Ê 2w5LgÉÝrw†¼!_gÈ×òu†l!SÛdj›Lm“¥m²´ÝpmŽM–¶ÉÒþlaëÉÒµdé,Yڟ祈]G†¶ÉÏ6ùÙ&?×í6O–¼l“—í¦sÌê4Y9MVN“•ëÈÊ6YÙöç›%#ÛdßZònÚÚÊßÜÆ:û–Ü›!÷fȶòj yµ†¼ZC^uÈ«uäÕ:òjy5C.µÉ¥¹4C.ÍIíØmœÇ6öëõ÷Ë­!Ö¶Ôµ…­ÐzsÜÒ'’ kÉuÁ|·×h›¼g“÷lò^š¼g“÷lòžMÞ³É{þÜUiòžMÞ³É{6yÏ&ï¥É{6yÏ&ïÙä=›¼g“÷òŒÆòÞ³Æs"d ¶†Óak¼5^HŠ<$@KtØó¿Ðƒ$A‡$è’ CtH‚ŽðïœÐ‡â°ÿfîL Ü¨î|}oIª’%u+fØš=ã@ؤ–ZFWUõÿ¿ª«*ؾ_…ýnjìPc‡;ÔØ¡Æ5v¨±Cj1 k› ýp°U ¶¤õ®¦«ÄBnÁ±pŸ]I7Ø‚à“|R‚Oê}®§Ä p#Ü7ÃϪ‰u*¬Sa ëTX§Â:Ö©°N…u*¬SaJĉ«àEø¼^†?Ÿà0°a#Õ©ÆH5Fª1Òô¼@¦aЦaЦaЦaЦa|!Æb|!Æb|!Æb|!Æb|!Æb|!ƾ­EØZ„­EØZ„­EØšÆÖÖ^!8v¾30% cSØšÆÖ4¶–^û+µ²+ ±²+ÓX™ÆÊ´ó Ï _5852…),LeWÊK¯r’¶ ì)ž" )ÄBL(„"L(Âr¢ÜtQÊ$JŽÆp4†£1áh Gc8ÃÑŽÆp4†£1á¤WŽóWÃ5Ùù†"ì%Â^"ì%Â^"ì%Â^"ì%Â^Bì%Ä^Bì%Ä^Bì%Ä^Bì%Ä^Bì%Ä^Bì%Ä^Bì$ÂN"ì$ÂNv¢°…(ìDa' ;Q؉ÂNv¢°…(ìDåßHlÞÂjXoÂ[з!½æLz%™$ÑÙUŽŸ€gà…‘+«Â+IŒÅhׯA zaL„á£ÀöŠÑ¤W@ޱÕhw_˜ ³`6ôÃwèøT#wÌ*üWIVî±ÀvèŸ]95žôlé!b1!Öa-Öb-!va'!vb'!vb'éYÏ#Œ#Â8"Œ#Â8"Œ#Â*B¬"Ä*B¬"â®)DÝ+* Auí@cÊ›—Xï{p$óa!óþ1…9(ï$ a`Ê;‡çÏj¡°…E(,BgW4¾’¡Â$&¡0 …I(ï9^ó<¼Ôú0†Mè®I¤çm »ö ±=hì!ÂBì!ÄÖ °Uz‹x>ëð!>¤Ã‡tøÒáC:|H‡éðНèðНèðНèðНèðš¯éðš¯éðš¯éðš¯éðš¯éðš¯éð:»"ýð ã÷\ž:Bç é¼!7\çêó¯Ž\q^ÑMÝTõz{øŒG®:?Ü5CºfØí˜ŠŽ©F_a¾{uø‚8XÌÂän!òîžîžÂuu¿-11w¿˜LWäqEWäqEWäqEWäqEWäqEWäqõ?q½Âø,ÇÆäØØ¥Ú¹|†dØ4¿ªîÙóYU‘UÕ¨3ç¥9U‘SÕgÍKÏF¬Æéà@ø:|ƒOk~«Ó³T2‚)¼û)Ù²¬fëæ,nÓõÓ;‰;DS9AN¹…ÜBxrWùIþݽäçÄxùùE1I~Y~Yl%¿*÷}òkòkb9S.¶•ß‘sÄNòy„ØE.à“ÛUž+Ï»ÉËå|ÊËä21E6dCü\.oŸ7É›ÄßËò.ñg•³Jì›ëËm-öËß“ÿ‘ø‡ÂøÂxñÕÂ_&Šý k kÄ7 oÞÓÜ+ÝeâŸÜkÜkÅt÷z²ûÁnÓmŠî¿»÷‹vÿìþYÌr7³½­¼mD¿·‡·‡8¬è‹âðb¹8^Ì+ÖŠ“Ä1Å­ŠÛ‹J‹J‹ÄiUQ•b±îå™C•Å6cýÈÝà~€¯$†ÌoÈü†ÌoÈü†ÌoÈü†ÌoÈü†ÌoÈü†ÌoÈü†l“íc²}L¶·äxKŽ·äxKŽ·äxKŽ7äxCŽ7äxCŽ7äx³1Wõϒ߃糣DcçïÿîózÏSå\8Næ÷:œ§Âi°N‡3àL8 –ÀR {’Ï5ù\“Ï5ù\“Ï5ùÜÏ ù<&Ÿ[ò¹Í®R¼ö ÅsÞ“Ñ †b0ƒ¡2º!£›,£ÿ„#àõ?…‡€ní< ÃGQ̨£(zÔ•ŽóYþn5¬É®|;tªœ€ô È·EèÉÎPm×93õ6Ô¿ÉÜ~ Òs”¿{V@Mî×ä~%¯ìÜåª{†üOwϯr³0Æ’?ÎÆ”?.€ u&Ï:“gɳÎäYgò¬3ùåäé«áøà3]ÌÉ`Ns2˜“Áœ æd0'ƒ9ÌÉ`Ns2˜“ÉÓÁótð öiÈïšü®ÉïºÂ{­¼œ]1ÛT^Îò•5¼žm½'£¯œMúë!ýõþzHdütÖ†!ã2~z¥ƒÑ2¾¹ºö茟ØêÁXî·²=ߊܯ«g¥×|%çfçf!œ–ÓÒyÄyD8îéîé"W™Q™!ò•oW¾- •£*ó…[9¾r¼(VN¨œ ÆUNªœDÇ—ãöκš'&ŒþqöU±ølxïv[L†ÁN°3à#âï`ãæ@Ì¥ãÍ¥ãÍßM"1æÂ0¾GÂQ0ÀÑpL²P,L–ŠEp,Çà I?³ŸŽÙOÇì§cö‹ÓEŸ8΄³` ,…³á8΃8cº64cn€á&¸îS…?çþÃð xÚðKøü'< !üƒžMéÀƒtàAñBÒd=± ^„?ÀK áeø#ü ^“uì¥â5>‹×á °°ÞLêtñ:]¼N¯ÓÅë’Ì-ÉÜr'  Jª‹Üv…Ý`w ÛHº¤êHºÜ> Ÿ‚½àoao ‚ÊOÃßÃg€ /?Ÿ‡/Àÿ/—`Øöƒ/YP’%YP’%YP’å²$’WA~Ëáj¸®…ëàzø!  p#Ü7à ¸n…Ûàv‚;àN¸ îN¯ñ™ É'¾|~üþƒÇ-ø9<œ š£1«èÇ*úDŸs LƒIàôs{·‡Ãœd˨cu,£ŽeNSÔFÍËHíb.V±0›ñÚÅT,"À"‚î\ŒAìa)ÆÐý‡èþCtÿ!º=I)½ŠqrÝ~¯ÜlnOJÚ¹“ù»û±€g“‹sÏañÏC /&íšÿpEå¿WË$Ï2ɳLòÿ ,Œ¡cèÇúéîCt÷!ºûPþQÑ—á×ð<OcÌ? ¿§àiX «’°°°°°° aå-¬†5ð&¼xXϱ…:¶PÇæÆ'Æ0X †¨ajXV˜GŽ´»óæb ±‰þtþCá^›$‘+@‚±ë&m×5?¢wÔ‰-ù›­`ý¹KúGYh1gb.ö1û˜‹}Ìu©s.uΥιÇÀBX”,ÄHºÔ9—:‡™ô»,#—e„ aC®ÍöõD^l Û¤×6M†°‰!orâ{ƒsì] eóö쾮 †±è{sD–xó°ïÁ‘ṗW¦Ï•éseú\™>W¦Ï•éseú\™>W¦Ï•χ àB`¹”/†KàR¸ .‡+€eS¾ècX[€µX[€µX[€µX[€µÕ±¶:ÖVÇÚêX[k«cmu¬­ŽµÕ±¶:ÖVÇÚêX[½kls1¶þÊ)bŸuæH\¬Ó˜×æ5Ô›0ˆqÕ{ ¢¯ÇOLƸŒ+À¸‚žíaIv.Îá9—%CØÕRì*À®‚Þq¢¯·e¨@ô¦Iëªc]õªÀ°$Ì}ÕY0¨ñÕCà´d(=¥øŒø,îôy~÷@wHgŒÊ7k™`-¬e‚µL°– Ö2ÁZ&XËk™`-¬eØPjcCm Gylÿ_èð'ðü‰@ÀrÚXN[œÂs§Ž(gWϰâ 8Òk/áŸb)œ çÀ¹€ |XœÏß_ÏrÇF6|ŒžÊ;æÌÑÿý†¡1 ah CcÃІÆ04†¡1 ah CcÃІÆ04†¡1 ah CcÃІÆ04†¡1 í£ ÓcÃІÆ0´|(±cî»àsq>‘¬tø Æéì›XŒ£q´1޶³eßz>„iÐs`ô,Q*´Ãzâœ,K‡±8¼oç¶$tþÛ{3ûh;fóSxˆßÆëNZN;i:¿æß{ŒÛÇ!!ñûðî> åÐm2yN$ÍœE—]gÒä6Í®°¥r;Àn‰Íí£÷_ì™]ݯ•û"·Óø›µû-¦’ïYÏó¬çyÞžõ<Ïzžÿ8N„“àd¨Ã)Ù†6ÒÆBÚëìcx4±ùKþ1xžÆ’~OÁÓ°2›K0z&dcЃݠ1¼Äs/ówäNL¡]èÐÑé$.Û¸KWpé îv°}6Ÿ í²-¸|.Ë–.ߦ˷éòmº|›Ž®éèzd®Ûµ{°]»Œ×e¼.ãuÏ„+aYzݦôºJ0Üé5^Óé5^ì7`;¤Óko§Äz;Cº÷@ÇÞŸ0ƒÇÖÎdòÀÑ@½ñNåö4¸Ò‚ßçv9¬€ßÁïAÁ³cÇ'¡x$”îì@»vv ·:±ÿWÓq5WÓq5WÓq5WÓq5WÓq5WÓq5WÓq5WÓq5WÓqÓ#T:Û·q\ —uNÛ¦Ó¶Ë'&¶|œ u8ølÊ|6åÅ@m-S[ËÔÖ2µµLm-S[ËÔÖ2µµLm-S[ËÔÖòùp\|®å‹á¸.ƒËá à³._ 3ãÏ©BÍ­ô'aåðäºj›®Ú®œ+ó“VeËs¬g•¹ÏºUaݪœÎcçÑ]à|¸€ç.á5¬ojdå¦DUnOl…:W¹“û÷Áèý!l[••<¦à5î§3-·kxîÍD÷°Ì{ ‰íqÁËf ŽÞ'¢{¶HTöm–%Ù¼Îwè—ØÞ”¡=Ð £f ŽtizDõ³üþ9ø<|öKšUê•ú_¥þW©ÿUêuj2T= QÕáëðl–a³:3±ÕY0¨«ÕC Ýß¶Q GÀ¼ì†­îþ—àŠñügŠ3EHgÐN!,„"çîæî&òî^îÞéù­ÉCï?ðã’d!s‡¸àAÆA ÊPèj•›À_A 6…Í`s ‘H‰œ[À–Ð[Ã6°-lÛÃ@b‘$Ib¡[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸¥[ú¸•ô y_‡o$é숶Ěå7a:x‘Ä‹ä)p*œ‹át8΄³` `Œ’¤,/Lby\ —À¥p\Wdß±ÝþÓßcú{Léïñ˜½ u°Y‡ôcùåX>9–OŽå“#æè¹]`×õöõ–ÇfdÇCûò×ÒŸ®ƒëá‡07ÀpÜ +à¸n£'ÞCpÜ wÁÝЄƒ{Á‡ûàÿ¿Ãýðü?ø1<øB>X·ÇÒ-½ÑÒ-½ÑÒ-½1ÝOÞvgÖ£èÍîuÙ¼·¶Ëûry_îm@qy?.ïǽ~”¤WýŽ\x/.ïÅå=¸¼÷?àç<þ0·¿€G  ¿„_e3%Úîcð8<‘Í–h»+é¾Ä­zµûGøЯ]¯Âkð:¼Ô+wu6k¢íUmËcÛò&$±7&Á°e6+mé±qÖ[§pû7ÙUÈ#ïS$9‡~—ƒ‹ñÙ‘£J¼oŒ/=º¤ØZk³5‹sxÍz×ÞTw SÙÌÈçàyº-]‰¯*§d×zV,MÅÒTYG¶YGµéLÂ÷t±Óø|™Ô’I-™Ô’I-™Ô’I-™Ô’I-™Ô’I-™Ô ê¸ Ž‹/ˆÒKð4 Kð4 KÃOÇ>nÃ-#²eD¶l¹çzM¶÷Ú'[údKŸlé“-}–fÌÒ4,MÃÒ4,MÃÒ4,ɘ%³$c–d,Óã´ô'r”í.ÑácÁûgy)"/ùä%Ÿ¼ä“—"2’u¨éÙÈ`?…ô˜ïϲì‘yÚdžhÔUËcÖˆ˜5"ýæ™&Ãè>MŽÑ9ü!‡G“g,yÆ’g,yÆ’g,yÆ’g,yÆ’g,yÆ’g,yÆ’gì:ÇaIbÖ¬˜5+&ŸøäŸ|âgkÙ&ä”w×4Kþ°äKþ°äKþ°d›ëd "{X²‡}Ÿ5Ѱ&²‡%{ *Zú«¬ÖŬ‘1k¤a4¬‰1k¢aMŒÉ¢M†ðÉ >Ù "Ddƒˆl‘ ÚdƒöÈ^8\•lîóÉQwoœÏãà·8¸ÅÁíÈqÄ'öñ`öñ`öñ`öñ`öñ`öñ`¶x°ínÿM¿énq]‹ç®ÄsWâ¹+q\›}ÛæöÌkÓoÇÄlA1[PŒÇFx¬›FÝ­(ÆKÛø§úø§wZ¼Óâï´x§Å9-ÎiqN‹sZœÓâœ+qÎçŒpÎçŒðÈtþnúí”´–Ž-v¦>Î‡Š‚ó ó (ž)<#*®çz¢Çíu{E¯»¯»¯¨ºßq©\U¹Jl*dNguµW|ô}~Œ8=iˆ3àL8 –ÀR8Îsá<€ó“º¸.JÃ%p)\—à [ã p#Ü7Ý[нÅÍFÿrHÎ0 ²ã)Ùù؆§¤ÇOX[ùÔäñÜoyŒäè¤5ê¸ÉéwVsl Ùq“÷§%;tÏŸÕŸ›Îýƒ`xžÖÁ¹™Ùl³t®V:xjî[É@îP˜—4Ø‚ë¹_òØ£ÉPî1qdþѤ‘á×ð<Oï%ÿ$üž‚§a%lÄq ïKÉÞþlé>ø9I#Ûタۣᘤî-ä¹Eðî>vŸ¤Þ ©7Fö±_Äýõ÷­ŸÇ®äß^Îí ¸û÷ñÚõ÷«¯N£÷7“~¤ßé·Aúm~¤ßé·Aúm~¤ßé·Aúm~¤ßé·Aúm~¤ßé·Aúm~¤ßé·Aúm~¤ßé·Aúm~¤ßé·ñû™_KTùux,¬†5ð&¼xþ ï@BO Áä¡.xP„qP‚2T z¡ ¯&ôˆ¤E’md$Ùú:û©º=ÛòüöTr{-¿ìsN¤Ùi¶Ašmf¤ÙFï’îD˜¤àÞ-a+úõ̤AmF¤Ñi´A•(ŠgÅó¤Í9ΑsÞpÞùÂ&…MDÁ;Ø›!\ïwÞ³×ëÞë¢Ry­òšè!yºY}è;lðgÍFfÏ¿ôÛþ!Ù3${†dÏÙ³Eöl‘=[dÏÙ³Eöl‘=[dÏÙ³EŽ Éq!9.$Ç…ä¸ãr\@Ž Èq9. Ç一ãr\@Ž Èq!9Î’ã,9Î’ã,9Î’ã,9Î’ã¬\&Jò*hÀ`9\ ×Àµp\?„A¸n„›àfX·À­pÜCpÜ wÁÝÐÌ2`@ È€A7¶È€-2`‹ ƒì[ïäëÜ'xì³Îñ éþ>|þk‘ÿZä¿ù¯Eþk‘ÿZä¿ù¯Eþ Èù/ ÿä¿€üÿò_@þ Èù/ ÿä¿ 0>»v|úMîн’û˲ëLJ݌¬“ñîä÷»àž7ÛµÈv-²]@¶ Èva7ÛµÈvÙ. Ûd»ô[Ù!¹.̾•Í’ëZ亰›ëÒof‡äº\’ëBr]H®k‘ëZ亹®E®k‘çò\@ž ÈsyÎ’ç,yÎ’ç,yÎz[‰’×[Ã6°Gv-ùáW¥â¦°l`"L‚-`KàõE^_äõE^_ܶƒíaØX¶ä¸ggפo‘ãr\@Ž Èq9. Ç一ãr\}xÝ×"Ç一ÝBr[@n Èm!¹-$·…ä¶¼fYí!ù¹=s{ éíäí,œêœê‘¯Q' ÕùÕù«]=–#óû}ÀÞªqø„Á' >að ƒO|ÂàŸ0ø„Á' >að ‹O¤3Vc|"Æ'b|"Æ'b|"Æ',>añ ‹OX|Â⟰¸„Å%,.aq ‹KX\Ââ—°¸„Å%,.aq ‹KØõŽ^Y†%aX†%aX†í½2$ CÂ0$ CÂ0xˆÁC bðôK:{Ôâ!k´’ƒ!9¼ÄfG["î¿È}l±xH¼Þ;êˆI: Ôæ\n×Î+=<š|Ãàß0ø†Á7 ¾að ƒo|Ãàß0ø†Å7,¾añ ‹oX|Ãâß°ø†Å7,¾añ ‹o¤G= ©Â*Lz´ÿˆñ‹ØîÑ‹Ù\Äà"郋\$ý– ÅE,.bq‹‹X\Äà"éLD‹‹¤GÒÙˆ±¸ˆÅEÒ£ 1øHŒ|$™ã#±øˆÅG,>2Ö‘Kš°¤ Kš°£Ž4˜î‘Kš0xŒÁc,cKéüƒÇ<Æà11xŒÁc cðƒÇ<Æà11xŒÁc cðƒÇ<Æà11xŒÁc cðƒÇ<Æà11xŒÁcÒYޱxŒÅc,cñ‹ÇX<&M7†tcH7†tcH7†tcH7†tcH7†tcH7†tcH7&Ûÿj–PÒ=íf½½ì71¸‰ÅM,nbq;æw"‰&u‹£XÅà(G18ŠÁQ Ž’ÎF4$Câ1cì9qƒ«\Åà*W1éžóìùJ¡ð•××±“§¼gÒïÔçkï_]ÄÛTEuQT%ÒyŽK`)œ çÀ¹p dgLÒTMUÑTMUÑTMUÑTMUÑTMUI“‰¦šhª‰¦šhª‰¦šhª‰¦šhª‰¦šhª‰¦šhª‰+á·ð ü~*;FSebªLü>ßcWTE…QTE…Q‚-N°ÅI2«8ŠŠ£¨8Ê™žUMÕI¿S®©:šªSuUGQuUGSqÕFSm4ÕF;ü©8q÷»ãzí÷ÂsÿÌýþìx¨¢š(ª‰¢š(ª‰¢š(ª‰¢š(ª‰¢š(ª‰¢š(ª‰¦šhª‰¦šhª‰¦šhª‰¦šhª‰¦šhª‰¦šhª‰¦š(ª‰¢š¤g’IÏH¢©&šj’kŒ»ÇÕDQM4ÕDQM•DSI4•DSI4•$=þ¨¨$é÷Ž5•D{lmTE5ÑTM5ÑTM5QTE5ÑTE5I¿ƒ¬©&šj¢©&šj¢©&Ú{ ž–§ÇòôXžT˜˜ Sab*L<Æw’•÷ ÿo¶:ïÕ¬ÊÄÝ㙊*£¼w²J£©4šJ£©4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£©4šJ£©4šJ£©4šJ£©4šJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ£¨4ŠJ“VM•‰©2ŠÊ¢¨,Šª¢©*šª¢© ºûÝdMÑTEQTEQTEI¿³¬¨ Š ’&EµPT EµPÕC²yÌñ¤xZo©w¶È{×y×Q/žð~#<¯ãuÒï0çÞþ€ªaÿ‡ ¤˜€b|RŒOŠñI1>)Æ'Åø¤Ÿã“b|RŒOŠ H1)& Ť˜@“h’L“$Ó$É4I2M’L“$Ó$É4I2M’L“$Ó$É4I2M’L@’Ñ$M’Ñ$M’Ñ$M’Ñ$™tV‹•WA~Ëáj¸È¡’:/©ó’:/ñ-‰oI|Kâ[ß’+à¸nƒÛaî€;á.¸šT™³“&I¦I’iv“ŒO’ñI2>I¦I’ivf¥G°Òó“mDzñI/>éÅ'½ø¤Ÿôâ“^|Ò‹Ozi’^š¤—&é¥Izi’^š¤—&é¥Izi’^š¤—&é¥IziÆ Ü+¹ÏgFz ºé¥¹^zi’^š¤—`TzñI/>é¥Izi’^‚nzñI/MÒK“ôÒ$½4I/é%è•Ò¤ŸôŒ:*^ÒK@z H/éÅ'½ø¤Ÿôâ“^|ÒK“ôÒ$½4I/MÒ‹&½hÒ‹&½hÒK:Äz}°5l{ÀHzIlqSØ 6ÒO‘ôS$ýI?EÒO‘×y}‘×y}q[Øðƒâ°cv*½¶}@ziqTÒ‹Ozi’^š¤—&é¥Izi’^š¤—&é¥Izi’^šc…òI/MÒK“ôÒ$½¤—&é¥Iz H/é% ½¤— K/›ËÍ…_’û)çÉ#EνؽX¸îîÔá9¢èàUŠÅ¸Çã‰5+î¢$Â0" #Â0" #Â0" #Â0" #Â0" #÷Š’ðõÓˆ0Óˆ0Óˆ0Óˆ0Óˆ0Óˆ0ƒè` ¢ƒAt0ˆÑÁ :Dƒè`uf€ÍH¢lØaÜžÙè` L¡ƒ) ÏÞzQ”°…[ˆ°…Cˆr3ħr3a6G'í=kjÛé‹ðx 4¼ þXB„%DXB„%DXB„%t°„–ÐÁ" !Â"Ì “ÍB:‚ûkg"-äþ"8އ“`í̤³¸¿.ÊÎFaVaVÐÉf,]Éýµ³–nçþ}ÀgDXA„Dtú¾C§ïÐÙ;töN:S‰®ÑÕ#ºzôÿuë ]=¢«Gtõˆ®ÑÕ#ºzDWèêºz‡®Þ¡«wèêºz‡®Þ¡«wèêºz‡®Þ¡«wèêºzzd£32#ç#IDGèè=¢›Gtóè}fàtèæºyg¬Y3Ù¬˜w¤Äû§;Ó鿇z‡‰‚w‚w"[ê…Þ…bœ÷Š÷júí£¼Ê¶ÔqbËõäl¡l¡l¡l¡l¡l¡l¡l¡l¡l¡l¡âüd¡¸6œb¶Ô˜-5fKÙRcqoÒ>ü˜ûóY¶r%Xr%XrAº÷A“ 4¹@w÷>¼w«^“¬d˶lÙ–-Û²e[¶lK6PdE6PdÅ–>À–>À–>@6PÙwYû¹h¶Å§õ»YFÐlù–-ß²åÛì{­G&+£²¬0àü6¹ÂQlý/&mG'þ¨ï«¦Ù!=Æ©’³Crîî­X™tïá³~¦ßYÕ¹"”èæÓ77‚áóL鞇`Jî[É®¹Ca^²´[Q¨(T”ÿâí\àœ¨îö&ÉÎ,™É¹jµXÅ ŠW´¢‚/jßÒZ¯ X5Uñ/µ*"ÃQuPâ…ú¾S¯8^bmj‹ÊŠ"/•ˆ¬¶±íT ê b5X£{ÞïÌfa–·ºÿˇÏ÷3“I²ärÎsž'sÎo,ÅBQ,ÅBQ,ÅBQ,ÅBQ,ÅêæÚÐ*ŠREQ‚ó¢~=wTµ’§‡Ùïÿ’QEa¬pÍäl¯„«äxT¦‚ÊT6­£œÂþ î› ík*o V-p{뵕U”ƪç ¥±êù£²ÕZK”“üQ%TÉUòGð ‡OþðÉ>ùÃïð G›*­“eíSXϱÏx xrrˆGñëjUE­,rˆ×q &Še¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe¡XŠe}‡uU«ŠbUQ¬*ŠUE±ªzp®·|(VŪ¢XU«j…õðl€¯H‡i‘<-’§Eò´HžÉó>’§Eò\@ò´HžÉÓ"yZ$O‹äi“²¿ó(ãø"öŸæ±ôõ%«‘åÁÌ5\ÿKÜ^z3û×ó·?ƒJ›q)ã¼Ëøž#Å[Ѥ,E{ÂvÐ zm‘do“ìíèŽÜÞ ~»À®°ì ƒdžÔŸîÍþ`Øöå9ûI§SÍÊC8>ƒÃa8#xì‘lÇÈS£§â~Éß: q:´Ÿ'³xŠlôC<ÈGâŒØIÒ‰–¥Øx¶Wø&‚ “`2L©0 ¦CwjeÞ7yƒàÀCð0<cì1ø<.íØï!€'àð'XOË|l14Ã3°ž…ç`)<Ë`9¬€¼À{}^‚—¡¯ÀJxu‹z›«¤‰ï2ñ]&¾ËÄw™ø.ßeâ»L|—‰ï2ñ]&¾ËÄwåð]9|Wß•Ãwåð]9|Wß•Ãwåð]9|Wß•Ãwåb_òVa#|ÿ‚¯¡ßÈR¸††ô¸©&çzo¨I'¬Ç•ŽÊئ6ÈL—µ9{q_oh¯Ñ9ý-ëtîͱÁáÜ6G ÃØïº^gU½H—*Y½$˜÷&âê„ð\¶­Z2§Î—%õŽàœö¦õ5-꽿?<·m©ʼê°ÿ< À£À÷­ò}«ßµúû#<ÉsŸâöÓá¹oKm†g¸½ø~U¾_u÷-‡P€—xN^á±+yÜ«<æ5páõpeo‹ÊØ¥2v©osÿÞ3c˜ú.ûe¶ž÷ û|w*ßÊw§òÝ©|wêŽô{õ ø6J[ÓdIk„ H@“ÌkIè Ûš ¡ Zè ý ?l/møì;Á–k’Ð ½ÐÂn°{X¯ÔÕö„ Né¾2§íûÃáú¤í`|íPƱ<þ§¼Þ‘aSoŸÃË›xùœ6Žû.Æ)írø5\Á}WBÛ¬)oãïsøûþÞÆß›ø{ŸÃßç´yÎM0Ÿc·qûv¸î„ßpì.žsÛЯñ÷6þ>‡¿Ïáïsøûþ~)þ~)þ~)þ~)þ~©ö>óøðžOïâé]|»ùmŸ_ã!02œ_¯¯kr·¨ŸjÇ32|Nñ+Ã:ª92CŽÌ‹3öƳÀØ®ÔÄw¥ó]é|W::¯£óú Ø Ðy×Ñy}_Øö‡à@ÁÁðc@÷ut_?Ð~ý2¯ ¼Výx8N„“`L–&ùÅ$¿˜ä“üb’_Lò‹I~1É/&ùÅ$¿˜ä“üb’_Lò‹I~1É/&ùÅ$¿˜ä“üb’_Lò‹I~1É/&ùÅ$¿˜ä“üb’_Lò‹I~É‘_rä—ù%G~É‘_rä—ù%gô”Ž1Ðc¢t ƃ±Å˜.3jÀÞ®^ÖOUÞKÆ}ð #:b FÆ 2Žkà3 <†ñl8ßÃ2–à (p?Zo õº`  ºÐ©¦ì[Ü·Þá5¾Ç–þN62ÉFf}¦ZŽ\”#åÈA.ÈN\"K‰Ù"¾©æ,^,q÷Ý)ó‰°Ç>(sä"“\d’‹Lr‘I.2ÉEfÓ7Ü÷-´‚”¹äpé$…ãàx8N„QÒ%3¹d&—Ìä’—Lò’I^2ÉK&yÉL^ÄóéÇIúq’ö™Äû$§Â4˜3`¦lI^ËO”¼ðEÉÙ0ð•IÞÝÇ»ûxwïîãÝýï\áuhPö‚½a0ìûÂ~°?Â8†Ã!0…ÃàpÃáøGÂQp4üþ~ #ágðs8~ÇÂqp<œ'B×ë®|r…O®ðÉ>¹ÂïFUZÿßžåz^Ä•e¼†å° ð¼Äñ—¡¯ÀJx•Ç¿.¼οëX‰¶²J´~xÖê@ƒ ¨L;F5ñ£æ–µ7Ãß¹î—üaXÁVð‡üaXÁVð‡üaXÁVþ_T§½&â1^Çgõ }¡ô‡íaÑ€ßññ;ø›pÞž·©Ô+×Vð1|L¥¾6«½z­__›UÁÃTº¨`ëãY|ž¥‚gññ,>žÅdzøxÏâwUÑV­ò6vQÙ¶«³b{ˆ¸¶'П4ú“¶û|¿ø Ÿákôí pž_ŸQÁgøÑÐ…4€ 4Bˆƒ$  ’жƒ^Ðøý° î¹á\¿ïS×Gû+hí¯lU—ÏÔxVÁ;ÁzYô{sU\=öÑc=ö“B4$¸(XkTøQe=FhƒÂÏdŸ‚†:ÎÛr A´çæõcÍ"&k¢TРz@t0 Mp¾/Òp\%Ë”‰LȉL0j FÍïRy’ô\#9×"?—ã#Ç|a"ÇwQÍq!y”ã³}š¼8\Ñ3>R ù¾/Êräeî_)çD\™¼ÅãV³}Ö¤Û*7V#á«p®ž¿é—ï3ä‚èYr©³F⬑8k$Ή³F⬑8k$Ή³F⬑8k$Ή³»‡Ôy/Ü+Ž+®c»^–>#ÕdtT#ÕHA5RPôSS÷ÂíïÍö@ ãäxõR¸ .‡«eY|Îê$àsîT)pA8ÛåßVûÃÖp5\` X‹¿ü7Øj|=e §T3ÆÂ%r¼1—t™Ü`üZÎ1®>?TÕ˜Ì>Ÿ.ªfÌ‚›qBÌ ¯‘3ǸçÜÅãî†uá/ÀmÕóûÈj¢/ô ×¹•ƒ z*ç —µä¹!y$GÃÏe‡RáÔp(5J ‡RKž„+ ~É ~Á¼‡–ž¢¥§hé)ZzŠ–ž¢¥§hé)ZzŠ–ž¢¥§hé)ÑKº¢7ô¾ÐúCWòºUO i¸®Ä$˜ S`*Lè!©°JÙ¶a¥21º[è«u·xqÝ-^Ü­_»3Ï·CÏc¸¥ï?ƸãuÇWcßc.qÓÕrØ~•k}¾×•rºúµmŽïR¸ .Ç]uœãÌí`œÖ.>sírø5t5Ï£}~Ÿ—ÆçµÕ`nǶæt¼Ïã—4Þ›F;ÑÖ†Ui|íÓ°Šíæ_D:Îñø7ó,èÙqcºè³ÕU^pÊ®Ø`\4<øPÂù_Á¿dK"ž‘Ü<¿¢?ìΜlÙ”ºëó-HÉ>)Ù'%û¤dŸñ¨ÎŒì%ú£Ë"Ë„ªS‡ -~JüÑhdŒL¸²¾©«®d¾Yø®ëàz¸#Ř 7ÂMp3X°­3o]žq«ÏqZF?|…Û+áUx \xÞ€7a”à-X -°­Õ^ÇZø>†OÀ‡uð)à‘èÓeút¹>ãº$¾€/¡ óq]^Ï62 ï7Æ@JÚ‘±lÏg›†‹¶¨ u)ÇM¸œý_㯀ß6ÊFìú¿^ +˜%a‡•öÏ ÏVב ’¡[%˱¼«ámXü½Ø;ð.üþeX+múºM_·éë6}ݦ¯Ûôu›¾nÓ×múºM_·éë6}ݦ¯—éëeúz™¾^¦¯—éëeúz™¾^îXÝ*üµíT[;½S¨2ýÓ¦–éŸeúg™þY¦–µ+àJØüKªM?µë¿¤–µ™pû³vE-kó¶DŸµé³6}Ö®W’*×M-k9ØükªM¶éÃ6}Øîr¶öû<þøh+ôër‡Û%Í] ûyX}ŠvQ¯tÞ‡~-ÐotúN¿Ñé7:ýF§ßèô÷§óþtúN¿ÑçÁ-p+ðžõ,Ü·Ãp',Þ·~Ð7бѱѱѻ;UŸôÊ úð%Ta#|ÿ‚¯¡ßÀ·Ð ?-@D!  ‚Ðâ ƒ h‚d¸Å~a *=%ðÞ*ô”6:g£sv]ãìÄýÜß6CÜFãì¦²Ü H@t¼äörCÓðØv‚†kO:ë㙲œ< Îúsòt!‚>#– —gGÎm‚6ADµÚ W¶‹…J!é6ÅŽ±Öu¢TРz@t0 Ml}^ô„^²·k¾ÐúÞ2§Êã©òxª<ž*/—¦†NËþqp<œ'ÂI0 FÃÉp ŒSátèè©&Ád*vO…iáì mß mWÐöƒÐö±hûÑhûqh»‚¶+h»‚¶+b^ëcâ¸UÑù4:ŸFçÓè|O£ói±€û~ÿ 6üî†{à^¸î‡`!<ŽÌ06d2Œ ƆŒÈqü1x~yø<„?Á"xž‚§a1ŸSàŸa < ÏÁRx–à (À ð"¼/C^áõ¯„Wá5páuxÞ„UP‚·`5¼ÍsÖ„×HO‹wؾ †¿@™Ïþ=ø+ü þü‹Ïük¨Á7ð­ˆ+9V‰B @ ¡ÄAÐ=eFÙzAoè}¡ô‡íaøì;ÁØ~»À®0vƒÝaØN‚Q0N†S` œ ¿„Óàt8“׎UΆ±"©œ#)ç‰>á¬Úœrt• Ù^˪’Kà2Ž_ à˜&L‚)a¥­Œ2 ¦Ã ˜ ×Â,¸®‡`6̹aµ­ŒB’TH’Ê uÙ!Áö'lƒüp  £¤‚§P"'ËbäÃþ©l §Ã’éȯ؞ gÁÙ0–ÇÃöÜðZïi÷ÉGjì­ e1ª@b2m`«m?š”n´'l½ 7ÐÞ£´÷(í=º#·w‚ÂrÒÎð#²Ó.ÜÞHöÑ=ÃJi™è^°7û$ûè>aÕ´Lt?9-z ûCà ø1Cá08†Ã0‚ÇÉvŒ<4zœͼÞ%2åsŒ>×úNôy™‹.“¥èrÙ]!gE=9>ú>¯çéE?”ûE×Ê9Ñe6ú‰lŽÔº.6Zº±ñl¯† p L&Ád˜SaL‡ež˜'æÉyr`ž˜'æÉyr`ž˜'æÉyr`>vˆÇî…ûà~96ö,„Á‡àax…<¿ƒÇe&ö{ÈÃà ø#ü Á“üͧàiöC3<KàYx–Âó° –Ã (À ¼úSŒþ£?ÅèO1úSŒþ{5¬çÆ\x=œ¬à‡ü°‚Vðà ~XÁ+øa?¬à‡ü°‚VbïÉbŒ6£ÍÆh³1þ´Ým7FÛÑvñÍi|sßœÆ7§ñÍi|sßœÆ7§ñÍi|sßœÆ7§ñÍékIþMÈbC¹¸7¬‘Íäã<ù8æãÏ‚Ù+­ëÈÉy5ÚºNÅ;¨ ­Ï“—óäåìœW÷"ïÍñÁ²Y=íPÆþϸïL8 Ά±°E¦V'‡3W2* Î—®zGXmÏUïåöýaޱêBó ·n?Ã#ðhX‰o¬J›PÚƒJ[Pi ê"YUŸdû «êbîoÚJ;PŸåo>´•v .ã1ËaÂJ}™úÙ ±êJö_…×À…×á óÛÕð6¬‘Óêgƒ2j*<ï¶>¬ƒOa=|àsø'|_ÂFà;TùU¾CM“®Ö= :€&™Ñ’Àø«1þjè†i} /ôƒþaµ¿iÚðØvtHC‡´°ì›ë´yÚ^€&iƒÃÙ,nç³L܇&i˱ÚPƱÜ>ZÉbi²XFÅþ)ì3nhŒËÚylÓÀx@.S´ ÛK¸ÿ ö¯„«Z#‹eÈbm÷]Ã}aûS86•í4˜3xüL¸–ýYp\7ðøÙ0‡ý¹`Á<˜Ïc³lñ‡d·4Ù-MvKk x]¿á¾»Ø¿‡-žü¦hx=íw€ß#Ë¥5üž†ßÓð{~OÃïiø= ¿§á÷4üž¶šv¥á÷4üž†ßÓð{~O[x> ϧáù4<Ÿ†çÓð|žOÃói¯ÀJx^^‡7ÏG–L“%ÓdÉ´¶šcx> ϧµã¢Æ¸HÆÌ“1ódÌ<3OÆÌkëyŸÿä¾*Û¼?Æ81NûVßo‘aEÆLý*Åù8þ=ŽwŸ'3ñ ŒƒË¥¿®×¥ÉŸiòg:>Cã|ñ`~ëºxnÞñø"®ÓÖtÚšN[ÓÿtÆ?}ì´5¶¦ÓÖô}a?ØÆAqP§Íéc¡ÎX¨3ê‡ÂaaÕÈŒ~,ðúuÚŸ~œøGÿH>VÈÇ ùX!+äc…|¬ò±B>VÈÇ ùX!+äc…|¬ò±B>VÈÇ ùX!+äc…|¬ò±B>VÈÇ ùX!+äc…|¬ý¿dQ'ƒèd ¢“At2ˆN{ÓÉ :D'ƒèd ¢;ð< À£@Ñi—:íR§]êäv©Ó.uÚ¥N»Ôi—:íR§]ê´Kv©Ó.uÚ¥NÑi—:íR§]ê´Kv©Ó.uÚ¥N»Ôi—:íR§]ê´Kv©Ó.uÚ¥N»Ôi—:íR§]’ùÓdþ4™?MæO“ùÓdþ4™?MæOë´Kv©¿Ã÷þg(Ã_áïðÚC>‚O€ñH§êDÜèٺΠÙþFÉXaà3 |†1½õycŽÌs¿aü7Ü#]ã>x ƃ1ÁÈÁcaÅÐŒ—6ðÑÆ³áºÍ±ÆrXŒõ㺱2¬"š1Ðvm7ÐuãMXoÁjXïpß{l¯ ÆjƒqÚÀ[xK_i¬‡Ï€1Ùø‚×]å±_s›¾fà'ô·~2 kn) ´ÖÇÜf¬N$¡§L'¶ƒ^°=·w€]Ã\™Ä%ÒMðþ¼ÿļ°ºipEíLbо y΃2ÝÔC*MqÐÁ€4¿©'l½ 7ô¾"ÞÔúÃ72Óô-´‚”™äðÖuÉcá88N€aŒ,&ÉI4>y¤€\ÐúAØv€ÎsßÒAuîÙÀ»ÅAú8Héã }¤ßÍú”EÜ^·WÄÁ•qp\WÁÁUpp•`U1ÎÅÁ¹88çâà\œƒóqp>.p>nÃÇmø¸ ¿^³ÒßT³²­:DÇáâ8\‡[¯[é†5µ[¸ßëP»òK[•¥ÈFøJ–ƒ¢F¢¨EP·2¨Qˆ6BûÕ»‚*s(\½ÒœÏÈé3rúŒœ>#§ÏÈé3rúŒœ>#§ÏÈé3rúŒœ~7ëVºŒŒ.#£ËÈX ëU¶Uz(¢¶eÔÖEmýzÍJeõ7Õ©œÁþLh¯Q‰+AAý.êTº(hPÕÁG=ý.jSQÈ" YD!‹¨a5,£†Ô°²i•×z`ÄA }Ô0˜g[D +¨a°ÌG ý-jUú¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jù¨–jùß¡V¥‹j¹¨–‹j¹¨–‹j¹zp¥¬ |ŸïÕrQ-7\ÕÄwŒªQ×À$£UVÑPe|TÆOè[Õ«,%úB?@)ÂK÷‡õ*ËêUú(ŒÂø(ŒÂø(L0ØEa\ÆÝjåÑ¡Zø¨…Zø¨…Zó~KaÝš[ù'"'GNJäÝÈ»"¢¥%¢ÚoµßŠ˜ö˜öxp5§†SBíPE¿Íÿ”IS%ÒT‰4U"M•HS%ÒT‰4U"M•HS%ÒT‰4U"M•HS¥nÖŸ+¦ ¤©iª@š*¦ ¤©iª@š*¦ n_Áí+{Ã`ØpþÊ~°?Â8†Ã!0…ÃàpÃáø -(GÂQp4üþ~ #ágðs8©Fj…‘Za¤V©Fjå$Ù¬Œ‚Ñp2œ²šyg‰‘¤ÀA¤À;Ig'’ÏïÆ•‚:z Ð#z$@è‘= GôþWu¼ÊS°z¾@ò*¼ [\åÉÛb…Q ¥ãI^’W¦~}‚‰õkL ªG§‹Ñ{¹ýŒ]žý‡8#ú>Ç>ྠ·×²ÿ‘ý˜í'b8©ªDª*‘ªJ¤ª©ªDª*‘ªJ¤ª©ªDª*‘ªJ¤ª©ª@ª*ª ¤ª©ª@ª*ª ¤ªB÷®ÕqUI†Ñ¿Ñ¿>Ý@"mØ÷Ý^“¯mURP¯¤.çׯU"-”H %5/›;\5ª >ÅíÅoœ-©¡ÐáªQ…ú¹¨É¡°õ•£Â•IkôyõsQ…z¾ÒÿR§¯@z( ¤‡é¡ ânÕa½¾-¯å‘"Z™ðQSà#§ ? FOÜ¡ƒ;´q‡6îÐÆÚ¸Cg˜Åfq†Yœag˜Œ#£a „UÙ¶Ïr¿Xæq€Y`˜m« Èý‰!f¶qy\ŸÎjïx¥ù_ÉÝ¢g¢LíWœËís¸Ý~åù7ľÑ7ÅÀhI ‰­c%x VÃÛ°øÿbïÀ»ðgø ”¡{³ÛÝ*¶pÊ1œr §Ã)ÇpÊ8Ä,1‹CÌ⃫›Éä¥pzŠÛä\bV»X ¬ÏJwÉä.™Ü%“»drW»‚û®„«ÄH2y‰L^ê0C½¤Íྙ°y¦ºK&'sl늄Yí7¿‹×qÛü><ZÚjöúßx}h7do—ìí’½]²·Kövq›nÓÁmÚ¸M—™ÅYæq–6Î2«m;W0õ)0¦Átàõë¼~ýZ ïèô¾£ÓwtúŽNßÑé;:}G§ïèô¾£Ïƒ[àVà½êY¸ n‡;àNX¼_ý.ø÷ ³¸Ê,®2‹«Ìâ*³¸Ê,®2‹«Ìâ*³¸Ê,®2‹«Ìâ*³äÔ"Ž2£Ì&ÄÀ„ š¹E%ÃnÑÙ\ÍP üöîL’²>üxu÷L×0Õ3 K/Њ$êF9ÜPãFÑè& ²+]"áÀì‚ËÑÜ7 rèFÀc“H"ãÍj@¥E×£<¸J‘ÒA¡—¥·òéšÙkv7ü™$ÿüŸÿ“‡çKUW÷ôNW½¿÷ýþ¦ßú½ƒýˆPÂ1=]̳ÅÅ僃W—Á¡?åùÁ«ÿ·gùoêYFô,#z–Åz–XÏ2¢gѳ,Ö³ÄÿÛ³üoÏòÿ{Ï’ýeê_‚[ÙÌ·ü—ï—;’ãô›þËÔŠ)V8ïÈ0;2ÌŽ ³#ÃìÈ0;2ÌŽ ³#ÃìÈ0;2̶ ³-ÃlË0Û2̶ ³-ÃlË0Û2̶ ³-ÃlË0Û2ÌvnŸ ’›ƒ}±öÇŽÏÅûq ÂéÞÎÀ™8 g£Žsp.ÎÃù¸û™OøÝ?‰%ønÀ¸ ŸÆgà ä\ÜRü-þÏãfüþ_À-Åñ%|_Ñ;]˜vdmY[g¢šy[ÖÖ–µµemY[GÖÖ‘¥µõ\•‰;ú>0qGß ÇûL¡ºy[¦Õ–iµeZm™V[¦Õ–iµeZm™VG¦Õ‘iudZ™VG¦Õ‘iudZ™VG¦Õ‘iudZ™V§Wë”IudRíâõö?‘}ïÒž¨nÞÙpýÝ "“êȤº3þÚůy¼®Êy[&Õ–IudR™T{¢Êy[Õ‘EudQYTGÕ–AµePÝõ™Ú2§öD…óŽÌ©-sjËœÚ2§¶Ì©-sjËœÚ2§¶Ì©-sjWYSGÖÔ‘5udMðz«ðøCì–}¿²¦¢yÒ7Û`[l‡*^†—c{øù>?ßççûü|ß+ñ*¼3ðG˜™¶eBm™P§ïP½Ù‡Ò¶L¨#êÈ„:2¡ŽL¨#êÈ„:2¡ŽL¨#êÈ„:“*š·eB™PG&Ô‘ý´e>™OGæÓ–ù´e>m™O[ÆÓ­ Ú“ÛG´ÅQ×¢·ø5W X\å\t«1$Yü÷ÓÆÿË/î›â¾)î›â¾)î›â¾)î›â¾)î›â¾)î›â¾)î›â¾%î[â¾%î[â¾%î[â¾%î[â¾%î[S¬QÓŸÛ ;cÈ`s31„×cWì†Ý!“ͽoÂã͘…?Á[ðVì·áíøS¼ïÄlüþïžø ¼ïÁ_b/Ô°7Þ‹÷aŸöÅ~Ø3s ¦V£æÿ5åÆÿRÕŸûnGßŦÿRÕÌý1~’6óçdw¬_§¹™z8­l=ºëáÔ â lºNSØÔ6õ‡MýaSØÔ6õ‡MýaSØÔ6õ‡Íÿöz8[e5qú{§cl‹íPÍfR·²ï©×¬g·®6Ns¢6NS¿ÙÔo6‹£Ø°6NS¿ÙÔo67S§©ïlþÔÆiekÜ%^»®6NS?Úz µqú‹«²ï±'ׯyñõîÖýEª?בj†Cx=ºëá¹þ•jꇛá[Óf_>èï+ ½("D¶@?"”0€A”±%\“¾iØÿukì­«»s¨Ç/½öNK¿ÞÔ¯7õëÍÿdíþrë×Þù–¨ Â×8×¹pp®íE^wObþž GÖ‹"Bôa ô#B ÄTfÒ},mu¹â98çá|\€ q.Æ%¸Z¯œ´)'mÊI›rÒ¦œ´)'mÊI›rÒ¦œ´)'mÊI›rÒæðÇWòÞ¨¦Ïäï1sGâ8,ÀBœ„“ñ1œ‚Ó²Þú¥­ª‡Ë]Ñ» —gÕ}Çr"7÷5èUrz•œ^%'zs¢7§WÉéUr¢8w&ÿ×tIþéM³¾–d³¾jÙÊâÍüû²Õ¼FóûâŒÛÌϳ¸íø0Æ«õ¯«[t¬cÝUÈ»Õú?Šã¡ÍŸç"’íÉ^ãÚåOõعȱòF¬¼+oÄʱôêcy#Vþ¼ WÍ_†ËýŽWøù+±WájïûqhÁùk=¾×g³Ï–¬yö}ÇgœÊç›òùf¶ZÀsÙ:"Í‚ž¦ §)èi Ó°5ØDM^Q`æPxm6²Œ¯tº³ý]ð:¼ ¢¶ðfü œÛÂxÞ¡'ß']Ò3‡kÓ=#ö`!NÂÉøNÁ©8 §cÎÀTf£MaeÔžïú9í¥G¯ßó},Ç çïùQö½øhϸ wãÜ çµç¸÷ã—xÿfT| ¿ÁãÃø-\‡ס§x+±~m©ikgŠ-™˜)¶¤¨oY;;lšý­±®Âî’MÌ [RÜ oÆä™`Úbñ8‡Eç­øitW€]jû·ø;ü=>ŸŽ­] öëÙè8¾ò«Ñºh´.­‹t¼ŠÜä`£Wˆ>ø½C¿w¡„¬ ܆+»vWÐþ ¦ƒÑ„ÛfÕgÇBm0d²!“ }ÎPû µ¿ ¾w¿7§»b]3<5Q;ë¨t4<ÚããmOÀIöÅcx¦ý³pžýó1>—`4[áÕø8®A·öÖuŽß€›¡ß õ›¡~3Ôon´ Ä2ߢ[—kùÝ•çÆÂUÞÃuîÛͼg6Ú56˜A5±ªlÿqiܯOé?!›cÐìwÍúOÅ•é’þŸ K 3ëïÖ È§qT@zQDˆ>l~D(aƒ(cKl…iØLÇ6ØÛ¡Š—áåi3Ú¯Àøü!^‰WÁ5Š\£È5Š´ÅH[Œ´ÅˆF®YäšEúŒÈu‹\·Èu‹vÅnØoÀ¡O‰ô)‘>%šýJ¤_‰\ãHßé[¢·ÃõŽô1Ñ;1úóèÏñ.8·Ñ_àÝxOfÿá*½‘v€¹x?„v}Æèƒ8‡àPÌÃ|†Á#¢#ñ×0VDGaÚ_t ŒÑqø>ŠãqNÄ`!´ÑÈ5\óè”l6ÜhtNÇ"œí7Ò~£³Á "Nq‚ˆDœ â'ˆ8AÄ "Nq‚è2\Ž+ ½G‹q®ÆÇq ®…6]¾ñ…H»´ûH»´ûˆ/D÷` µå"扇ÈX‰‰hž׈¸FÄ5"®éû"±éK\£Ä5JyЃ^¡Ÿ)égJú™’~¦¤Ÿ)égJú™£.•³zvKJ¯’éïbû6[סd¬)k&ÍÀk–n°½ Ÿ>±¤O,é K7㲺AI‰w”8GÉX[2V”~˜ÙæºUe%ÙAé^ü yßñÕOÆJl­×Ñ"¶L›[aZ6O&àkgç]ê˜1oàêìÞ—l…èãü€q>[ýD†6 CÜ"ìG„0ˆõêé +ƒ/ƒ1~Ð?øŠlÖÞ’òÛÓvùOÓfùx'fc/ÇkØïÅû0'MÊûb?ìƒÓÑò!8<©<ü¨ÌÊ>G™•7,ëËÊܧ,k/ËÚ˨ÌÊü§ÌÊü§Ìʲõ²Ï_öùËÆýrwž^.Èçß;p^+~}Í:’=Aï‘ëþë>Îʃ¬âàc|Œƒqð1>ÆÁÇ8øãàc|ŒƒwïLy>8ó0‡áCYýË88GâĴû;Á)8§át,ê®s=Qía¯{fßͬYŸz#oæ¤Ü÷ð},ÇðCn·kæ£cùwó¹÷x¼Wæ¤Ý5«ã \ó¸ÌïÆò_Èî(x>»çùKþ»ðÞùï9æ½ó?LïÌÇž¯‘çïv˜ÕB{Æþ†«Euç6 !úPI;…騦Ïd…]»ó]<ÞoÀ› {äu]Ÿãsc|nŒÏñ¹1>7ÆçÆøÜŸãsc|nŒÏõÜvznÄMø1bü$›¸~]Íî¼À¸÷ <™vzŸÂó™q ®ûŒqŸ®óŒw’uïœÍ|ã9ÝîÏ?Œ£0Œ£³Z›qñXO‹Á?³®)ê]Óâ'ñS™õÎØ¯Ã²u´ã‰Õ§ÖÔàŒõ±±>6ÖÇkW|Z·–uwœ'jqŽ§ÇŒÓcÆé±þGÒNÿ£Ù<¼©ÔâÓo•¸[鯥cÒŽ>¬Súhzgéx¸¥Smo}ÚXIL•.ÑÉ!JrˆÒåž»Êë?›>_º%›]Ü,ý³}m¦ä³—~†ŸãÞ¬NgwÎ_<ÑWu&­ÂÔ8|íéIõ:Çô!}HGÒчtÊÚ³~dL?2¦ÓŒéGÆÊÆÜM¬EÝ쮺¤ÿèè?:úŽþ£S6.–ϲí®$}ÐKŠn#²(nŠâî½fëGY3‹®n$ÝnM…ÙñÈIDNs"ršù{¦ÖÒµâneØæf[îú­–h¡M-´©…6×´ÌÉ-hm+`W>qåW=Y{Õ7¬¾št¯øf®Ls3W&öw–g9q–g9q–g9q–g9q–g9q–“àð`Ïà‰ƒ7Sá4qæ“ü»ƒ=׫lšäo÷øŽ`Gg8q†g8q†g8q†g8q†g8q†g8q†g8™T•tÏÞ'ðd°ãD%ÒÄYOœõÄYOœõÄYO&*‹&Î|âÌ'Åc‚=‹Çâ8| ‚‹ Ñ­zeš8û‰³Ÿ8ûÉzCW¡[Spωj¡‰3Ÿ œìèL'Îjâ¬&Îjâ¬&Îjw{˜ÿ\þsA¿%Kë¹²çš ß{Wï]A_q‡âÁ¥ù¥ùAéœÒ9Ù¨gn|Ìïòë"±.ë"±.ë"±.ë"±.ë"±.ë/éîä©Ü•ü0ÿ|b6‰u‘X‰õ‰;Zëëîhå„FbC$Ö7¸;õ¯y6¨tïJ‰u‘X‰u‘X‰u‘X‰u‘X‰u‘X‰u‘XŸÒÝ•Fbeûò<>ã‘XÏîÊ;ÞölúH¬¯½ûîJûÝq—Eb}⎻ºH¬oöŽ»_û·BνH¬ˆÄÊD$V&"±¾þÝo"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±.ë"±þâw³M)"±2‰u‘Xßà.³îfŸ *ëÝMV‰u‘X‰u‘X‰õI‘X‰u‘X‰u‘XÏ"qUÏ ÝHìÝzß´œo¿?èE!ú°ºÿE(aƒ`*˜Žm°-^‹±XA`TÿÏUÒNçñÍy|s^ðaeÂì-0V²·ÀÈ„™pðQp¢×¤sƒXˆ“p2NIgË8gË8gË8gË8gu¿Û98çá|\€ q.Æ%¸tÊÕ¼§à~ÿGð(^Zýƒ 63‹qDæ<"s‘9ÈœGr®SÎuʹN9×)÷:ÌÄ^†™cu¹Ýñ¼oƒéåfáOð¼L-÷6¼Ì4÷¼³ñgøs¼ {â/ðn¼ †—cx9†—cx9†·É¹Tÿ—æ@徕޿¾.Ë}·£ïâ{ŽËñü? ús?FV!1èÏïŠìÛ0Û¬Âz:/ÿžtv~/Ìql_U]ço¶kýÍë†Ó‘üÑ8]û¬çׯÄþí®á{ÝȾ…òÜx5ö5Ž—äŸñܳé]Ç+ì–ŽvÇ0>w}Íœõá é¢Â‰Žë‘ ·å·Óy…Ÿ¤Ë ?3*ÝìPÐ §K òÅV°{áñ Ò³OÐß3‚Xˆ“p2>†Sp*NÃéX„30•oœ®Åuàq=ŸÀ'!_ëù|*û«Çìžq~œŽöÄø ~îß»wán܃{á<õü÷á~ü`*Nûâu FzV#MGä¬óºóÐz§Ùê+{õ•½úÊ^}eïv¨fu ’Þ‘Už÷º'ñT:»÷ùñ*ô½«‘Êiäïæ¿AQ]äkEÙäz5dgŽo5ßdmWtsdÇ&£µS:»¸³ã»t38Û7C,ÅçÆ•ìÓyrêyrêyrêyEýmQ[ÔßOg/.p|!ô·EýmQ_»vîÝ'ÓÑlž]wnÝrÿÎO=v]ŠÏuç¼Mžãöšt4|-vL—…;áuögýá^ݲZËBm;|ë•õ»w¾Î N/IG£<×Í-6YgÀs'`]Åý5ùFžéøYX“o¬©1p¥cåþëïVá¿Áöf¬«Æ?)ïð»=„&ôó›©%pAø¬›u<®ôÚñYÇ#᪠¿/Ÿ&}2ò>ywïÓú´…¾>ðô>žÞÇÓûxzOïÓ6úÊm÷i“}Æð¾­ÿ çòý¾ÃÒÑI+ ¬Íú·þŸ KðH:»ÿÑtv¤Ïˆô‘>#ÒgDúŒÈ¹œûèlŸ#ãsd|ŽŒÏ‘ñ92>GÆçÈøŸ#ãsd|Ž.Ãå¸þ½È¿ù÷¢«ñq\ƒkáZE×ãEsªt$ºàA<„‡ñ(Zx ã ¸FQ;)mô—vÁp÷/é¼Ò1éì’ÏVòÙ&­–”Ä@égø9º«$<íõ+Ó‘6ÀÃ&åbÉÀùé¼õê Œ|&½`]nôrµA®6ÈÕ¹Ú WœžŽ nƒmÓ‘r Ëa ¿¼jØïÅûp0Á¡06•çã¬t4«’u`á θýzÎX·_áŒÎXáŒÎXጦTáŒÎXጯ®å`÷`KLK›Ü‘ëc:¶Á¶x-vÄNØ»à-~î­˜Ò:Aé,î8‹;Î⎠wL¸cÂî˜pÇ„;&Ü1ᎠwL¸cÂgmÒ?Ö­<žÎà3øã þ8ƒ?ÎàUþXåUþXåUþXåUþXåUþXåÕà2ŸÿrlÞ#›<²É#›<²É#›ë½>”y[%ÿuÈÖ[oªÉßfåéhþ»¸Ãþ÷ÒÅùïû¹®~¡»§«æìÎëfòº˜×Å^WË+󫲚V³òÏù™ß§5žD\a:^Ÿ.)ìŠÝøÝîxfyüMÏÝÌäxK9^Ìí–š¶ú²Â¿¥ÍÂcYõæ1~Wáw~Wáw~Wáw~Wáw~Wáw~Wáw~W™ÒúWצ ¿Kø]Âï~—ð»„ß%ü.áw3øÝ ~7ƒß ó»a~7Ìïªü®Êïªü®Êïªü®Êïªü®Êïªü®Êïªü®Êïb~ó»˜ßÅü.æw1¿‹ù]Ìïb~ó»˜ßÅü.æw ¿Kø]Âï~—ð»„ß%ü.áwCünˆß ñ»Yü®Áïj<®Éãšãkx9þ$žJgð¸Jw /—ð¸„Ç%<.áq «ð¸J±7ØË5¹\s½µ½š\®Âå*k×ö2s¹„ËU6^ã+Áå*\®Éå*\®Âåš\®¹ñ_é,.7‹ËÍâr³¸\Âå.—p¹„Ë%\n—›µÖåôÅSºÕ–ý;×§ N×àtÃãóõ1îtÙӭ zù\ƒÏ5ø\ƒÏ5øÜ0ŸæsÃ|n˜Ï Oò¹ŸæsÃëù\“ÏÅ|®Æçfñ¹!>Wås1ŸKø\Âç>—ð¹„ÏUù\5<1ØÓ59]“ÓÅœ.ætMNWåtUNsº˜Ó%œ.átUNsº˜ÓÅœ.ætCœ®:átUNWpº&§‹9]ÌébNsº§«qº§«qº„Ó%œ.át §K8Ý,N7‹ÓÍåtsÃ'|ÆßâIÿÎJ?£ŸåvCÜ®ÊÉœ¬ÁÉœ¬ÁÉœ¬ÁÉœ¬ÁÉœ¬ÁÉœ¬ÁÉœ¬ÁÉœ¬ÁÉœ¬ÁÉœlxƒuÛœ Ns²˜“U8Y…“U8Y…“Íàd38Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“U9Y•“Åœ,æd1'‹9YÌÉbNs²˜“ q²!N6ÄɆ8Ù'âdCœlˆ“ q²!N6ÄɆ8Ù'«p² 'kr²YœlFI_]úèêJÇCW:ÕV¿ÆÓ*¥3‚Ý7X«î~v).Ãå^Ç)K×{Ý'½ß§loé®WíØWl¿Š[!¸Ý0·.Ýéñ¸ßÕøÝPéYÛߥµzƒ*׫„Áî|/æ{1ß‹xù/Ø&[%«6ðr>øêì›âYkÖÌã€ÃpŒ9`Ì«°Ê«°Ê«°Ê‡8àâ~•òŸòºwà˜¹`… V¸`… V¸`¥¼O:Zžã¹}±öÏü°Ê«ü°Ê«ü°Z>ŒOž•gŽxXáCAn‹ëÖsÄž” ˆ}ØýˆPÂQæúÔMÿ1]Ê÷˜âŠ|‡GàHœè=FxÌ,ÄI89[Uffp*NÃéX„:o:'½48×ö<Œ×N]\˜. .Jç;v .Åe~ïËaÌãv1·‹¹]Ìíbns»˜ÛÅÜ.æv1·‹Çk§ûLíNgŸå<Š>ÓÓ>ÃJ<ƒVu]ÍgxÏãü>˜9Ū[qb¼zлìï¬BApxxp°GxH03”Ïe Ž·='rµ¯[€uÕâðLÏ…5Õ®´¿Qïwã×{ý ¶7ãûßÀFUü¡ }zø˜ßç7xœŽuýÐ{­t\¿vì¯Jk}â¾ïQK—Mªº´رc°^U‚þ+Ó9ý‹q–à‘`fÿ£ÁÌè/ÓeÑ^ð>ÑÞx/Þ‡}0§¦µè4œŽE8>äóGgÃøãcd|ŒÎǸÁø#ãct.Çp΢Ÿ Wãã¸×Ây‹®Ç‹V3ðûßð ÂÃè~®äÏÑãxÎaÔf–¶Lç”vÁÑÁá%}tIßVÒ·•Îà„“ÿ6÷ζau§¥%m¸¤ —´áÒ/2§‹KO{¯•ÁÌ^ŽVDÈÇ6¬ŽÐ]çxµ·»&]6p->ãØÚŠ im°JÀ ¦3·Á¶x!]2ø{¬Fš.)ï‘Î)ï…öÆ{ñ>œÖʇàPŸÊóña¾Òõ³î]ú¹¾®çg[õÕ+8ΖÁ¹¶ç¥9Ž34±rÞÛ8ΖÁÅŽ_‚KqEÚà75~Sã75~Sã75~S ®õÜuø$–àoð)Ü€q>Ïà³ø\6c£Æ‰jœ¨Æ‰jœ¨Üìø?à ¸%(£¶_´ýÇùrP ¾ì|5Ø!ø'Ç¿†¯g5èçñ¨³ƒoØÿ&þ·â6| ßÁíh໸ßÃ÷±<›%Rã_5þUã_5þUã_5þUã_5þUã_5þUã_µà?so6[¤üÂö>Ü_f5í¿Âƒø5Bs½Gð(VpÈM}Oûlº<øžÃóx¿Çj¯OÓŹ¹nšÕ+òûb¿´‘ߨŸkû~èùƒl?ysþƒ¶ãÚ©âµómÃáž?GÚÿë¬ûÒüpº<4ŽÁ±ž;Î6ñ3>gÞçÌûœyŸ3ÿįñÁ£øW´À78ͼüolÇø-žôžO¡mE6¦–_™.ÊëËóÏúÝ}öüóŽ¿€ÕHyKù¬âj­Ðk!NçfËúiº¸ð³t¤ðóÕ+ ò¬Â]éìÂÝéháǺ5Êï¹wán܃{á3õü÷á~üàWi£Ççêñ¹z|®ž&†Ï×ãóõø|=>/¨ñ‚/¨ñ‚/¨ñ‚/¨ñ‚/¨ñ‚/¨ñ‚/¨õ¸–=«‘¦Ë{ÒFï`ö·£¥áì´a\ª—jáœlVN-|V/{ixpº8<$]~Èã#à:…G­^ÛíuÇÛ?#ö`a6[§f¼ª…§d3vjáé¶‹pFwöŽ×ž…³í×qÎ…þÛxV /°!.Åe¸Â¿¥×/¶/æs5ã\Í8W ¯õ{]ç9ýuxƒ­8o¶¿á?B ÷j¡¿ˆ/áËø ¾ 1ŠáP ‡ÿŒeÙ ¡Z(†C1ŠáP ‡b8ü6Äq(ŽCqŠãP‡â8Ç¡8€âGø1bü?ÍfÕŒ»5ãn͸[ ïvL‡â8L }‡÷eõ¿…¿„8Åq(ŽÃ_»¡ q>æœük¾Ÿ{Âyø-žÄSŽ·!ÆÃ§½O™øÞny¸Ê¹Ñ¶Cm;ü=ÄuŸ¶m¬®«kÆêZÿ™».ýçug9­^†Ó±gÀõ‹\¿èl軣s ïŽÎÃù¸â"è»#}w¤ïŽ.Ã帮g´Wáj|×àZ¸žÑõø„__éË#}y¤/ôå‘kéË#}y¤/ô呾`óÁ[Œ¨oņ÷#i,ÀB°ó€í§8~*NÃéX„—2Ã[o\žÙIJ@F™ßµûÍPö­P÷¢Ñü^Xvwöõg=§õf÷ Ý‘­3šõº+…IJëXvË®cÙu,»Že×±ì:–]DzëXvË®cÙuÜsC:Ús#nêÎdyi³³³{|Æïïí} Ï˨ pÎe•Ëd± 2–9v¿)•)Æ2ÅX¦oâ~žÑâB8¯Eçµèœf3´×ÌÎ>1›:>ûÊl ódílëUY¶Ë6bÙF,ÛˆûIGûMGÿ'gO3ÿ˜ùÇ÷ùŒ2ÿ˜ùÇÌÙڙϡ(:?ÝÜ,gÆÝ½÷&fÜ1ãŽw̸ãMÎxnhy--¯¥åµ´¼––×ÒòZZ^KËkiy--¯¥åµ6{oÁÔªé·xf‹gv«æ'ZlK‹mi±­‰jø­µÕð²?^ý>Ñr[T¾Ïîp¬c» ¿ËîlK AVé [ù¾Sí÷eëô´Ö–ÖÚÒZ[ZkKkmi­-­µ¥µ¶´Ö–ÖÚÒZ[S©rÏ“ZÙýûgw‘µ´ÈÖDEû–VÙZ¯¢}KËl­­h¥ýÉÕì¯slü–VÛÊîظ¢}˘ß2æ·Œù­µw¡¯´¿*mMªRßÒ²[ZvKËniÙ--»¥e·´ì––ÝÒ²[ZvKËniÙ--»¥e·´ì––ÝÒ²[ZvKËniÙ--»¥e·´ì––ÝÒ²[ZvKËniÙ--»¥e·^¬J}vgm·â|6×?me•æ{Ó–ßÚD•ù±éØÝ;g×U–o‰ˆ–ˆh‰ˆ–ˆh‰ˆÖFw¯~ »ƒµ%Z¢¡%Z¢¡U>L[Î ô_8ÿpëŸß??È—+=J¥îzô…¯lXé+ø·—T›åÊô6Qt›(ºMÝ&ŠnE·éÏýy2¥{žTÃd|®ÿèÚ¹þã«UµóA5ßýßó¿J—’üXV'dͼÿÛDÑM¢¨­!QÈ"©!’–úe,¤ó s{?´>ôÊÙ{ '¤wN¡fÆK¾O@„Ý–Ý0^㡱^‡ñùÿëj<¬™û?ºÑÜÿnm‡ë½Ïšú·ØŸ<çÿ‰´-šÚÝÚ “æõÿOÞ—ÿÏë:£•x¬Â³øžƒ17z¿Çj¤Æ—9äa<.K¨ÄJ¨ÄJ¨ÄJ¨ÄJ¨ÄJål½ˆ¶È½mÍ:A::±NÄš{Ý×Ý#°uöMa÷ž÷öÀ+=÷|:‹â5÷ lúžöíÒx°Š—á娝ÈÖŠh‹î¶èn‹îö¦îMÕÿNÜ÷‡5•Þù¾ç$& C)C)e(ÃXJ½”µ^¯õq½\Ö:ÔZJY–e‡¡$„B!9 !„çäwpÎãZ×ëXëc¹>ŽuY—õZÖZj³^¯ËP†º,W¬Ír9.Ëc‘Ú”k-ÞÏ9At¦³wwæŸëû|>y}sNNÎçûý¼9ç}_š®¡k êÿEÏÁÿQŠÁg¿.Qo¤Ñ¥_‡F+€o•€8ί @”!ˆ2Q† Êx/×%Mœ»¢ž-ÿ5e(ø þ„‚?¡àO(ø þ„‚?¡àO(ø þ„‚?¡|ÒÊwKôŽ'1z·4&s‰þ +ž¼'Ý1ôìn¡‰¬93±3bˆ1¾Š¶VdYxZÞ‹¶ã½º^´qÒÕ¤>ˆI³ÔÍÐð@ôÞçþAÃAÐp4< DÁsGñÚ¿X™ûC´]¦¤Q‰;‹p.Kw!æ|™üãŒAÇ>ÉáÍäðfrì—û%‡7“ÛÉáÍäðfrx39öKŽý’ÛÉ/ˆËrÄeùß—ìŸû'ÿ0ü¸ üˆJ#?úÝ<ï_gbÓ¼òoŸ,mú4ž51Š~O‘,]eIŒ&ÎFýÓÒøÖ%ÅçðX|À1zß(cø>|Ÿ¾OÑ(Í*:£@¶Uü5€Ï ÀgPÜþ˜Þ…{€T¾¤ŸîVžÆÄ‹kô´IWw«<½Cå÷ïJ™ø»OÞ?†þ—Ò*câ˜ù‰¤/Ióáˆ+ŠÍ$C;ÉÐM²®EG`”F8>wGÈûGH§ÐðÏÈS)r>9>9®/®/Ç-Ç->9>9>9Ÿ/Ÿ/Ÿ/Ÿ/%@\JÉ^²€O8Æ)8Æ)9Àgðwr—<à³@>ð P Í33“‚؂ϑ‚؂؂؂؂ØRmþ¨þ¨þ ¨^oõÀ›@ð- Pp')M\q \qŠht@+ à4SÄ™Pá–SŒ@`:3`úM±p£)pˆ)pˆ)àß¾«å#¯%„|C>Š!ÅbÈG1ä£òQ ù(†|C>Š!ÅbÈG1ä£òQ ù(†|C>Š!ÅbÈG1ä£òQ ù(†|C>Š!ÅbÈG±óOGÇ#þ¥".¥"¤â\OŹžŠs=õ’Ûç;˜xß]-Ø~3¶ß†³DØŒ>ÚfĨ͈Që¹*q'Ësk!?ÅŸbÈO1ä§òS ù)&Âÿ÷ÒÜ&_Ýô/„’o~M_* n’‡›äá&y¸In’_¿Ÿƒ‡›äá&y¸In’'‘'ÃdxëI ®2Wƒ«ŒÁUÆà*c:îûpŒcÒõ„>Kà¿¶î ²Ü¯€‡À¯8€^öúŠhqd¯8²WÙ+Žì'ð÷äÉ“8E ‘ÿŸðp¯<Ü+O×áÿ‰øøøpv#+Å‘•âë3‡{nÌp‡3MZOUìO>’2Æû×F}ƒ|Qö&É“} *<ªŸügY`x2&{—|Ε‡såá\y8WΕ‡såá\y8WΕ‡såá\y8WþcÎöG¤#ÒÇábcëãÌcJDiD×8-¿>kGË+-O†Ÿgž˜Á,1Μ‡Ã埛ÅLìCò2‹™Øäátcpº<œ.§[kþþÍ>lMIô”‹À¿KÀ³ÒâJô•èÿ*ÑÿUâ;G$Ã)óJ|¾çg.ƒ[æá–y¸en™‡[æá–y¸en™‡[æá–y¸en™‡[æá–y¸en™‡[æá–y¸en™‡[æá–y¸en™‡[æá–y¸en™‡[æá–y¸eþß1‹U-ŽˆGD‹#¢ÅÑâ)âŒ-€þ?"Z-ŽˆGD‹K«£á;EÔû¨<.¿Yùdø3:M$Æ¥KÑâélM<œ-gËÃÙòp¶<œ-(G‰#ŠÄoå³7Ÿðp³<Ü,7ËÃÍòÒ ôßC!Ê e¡”cÊ1qĬlõ™§%E¢ˆ"QD‘(¢HQ$Š(E‰"ŠDE¢ˆ"QD1ˆ"€H ˆ"€H ˆ"€H ð§qøÓ8ü©8ïÑT.@åT.@åT.|ˆÊ£Py*®«\€ÊÅ+|T.Ð:¹ j vjù vqŽÍð  zQñ/ÀŠ¿ö,AéÔ…z£PoêB½Q¨7 õF¡Þ(Ô…z£Poꯌ P¯õ P¯õ P¯õ P¯õ P¯õ P¯õ P¯õ P¯Ÿ‡råëÀÒ\Aâ¯=âÕ.êB½â.Š Ö(Ô*^½ Va]­â•*j Vj VjÇ¢G¡Tñj… P¨… ðPqx¨8 ÕG¡ú(T…êÅ«T/@õ¼Ãx‡ðàÀ;<€wx€h°„h°„h°„h°„hE4ˆ"D ¢ˆQÉGtl>ý_Nÿ÷?âz¨§ƒþcп¸rýƒÓÿûÖ9•F¦Hkœ>íkÆ> ó é7*Ó“9è|NZãôYÿO\ýØük•~œþØó:zwl]ãKRèÙ¥‰¾Ð³5J}¢Äú¤ì XŸôƒ}¤ôƒ¾cÐwlã÷'Qߥ՘EM/=ßúÿ¼öè¿Õ_ø8zžƒžç ç9èyzžƒžç ç9èyzžƒžç ç9èyzžƒžç ç9èyzžƒžç ç9èyzžƒžç ç9èyzžƒžç ç9èyzž“~¿ú•”Ñ…µMŸïˆ¿Umܽþ¯®_ú¼žç ç9èyzžƒžç ç¹ù­ê÷Ö4•ô¬S¾ŽGq¦‹"RE¿e{ ímté£OÓÿ@NÊÞ–½M¦åŒü»äg›ÞSø(YòŸ$«¨${S(êzjzêkôWRßH=AwoÖlÖÓ?ÜÜ·9DGÓè´$z*í7i¿¡ÿñÅ=/–Ò³„Êõ¼œG‘* Ÿ¢JÒ€L È b`;¡¬f<îJ}À  ¨ê5 Œ8÷úvàa¼vÀ…úQ ´w ~8 œF€‹ÀåõÇ«ÀõõÇ `˜î ÀÒzû ÞëW5BÔˆ‹êd Èr‚Äþª‹€`°(Ê  ¨Ã{‘@Yí€ õãÀ)à pàÁ¼ãÀ5à&0Ìw€y`XâÀcBûh H2¥÷'ê@è`œx>Èð=¨q¨}@8 Nâ¹b`;êÃÀ9àp ¸DñÜ. Øà»Pß&ñyÚª¤mˆúpˆ÷€ûÀCà!MH/M uý1Èò€-ÀV`°س¾ýÞõÿï*à ÐhßI“ÀyÕdpN4 ÿÇ#¾Û&¯¦ã¾ν¦3¾ ¾Ó¦Q` _ǵuÜü¦Öñôÿ3븳Žùu,&Îyéüš–?€8ðøÙ£† # t¤Áwëƒ&4Ð’ZÒà;Ô@K|W¼§:Ò@Gšò/4N™3Õ‡-w%^³,OZVÀÖUð9Ëø#_b’ÅWqõ&;Ü8cÎ\n¼cÎŒ«£L–ĹõLÁ`\|–;Ö8oÞ2øX=É >NÔ×yѼ•¥Õ·˜‰w€oKõ˜T¿ÇìßgÊÀ™rð#¦‚¥ÅWq'ÁÛP_6ïd“šS V0uàT¦MÛ¹áÆ¸y›Ö”ÁhÀÙŒž;×øØ¼—ÍlÊcLÛ$v‚·0ðVÆÞÆDÀ;™Ãà=Ì16S|w¡i/s’PÑæýlNÓ~f˜ÍQ%™+Ù|‘¹Kª4s [ØTÉœ×0¸±…»²Þ~¹ÄEU™æƒl±*ÇÜÈnojd®l°–‰²ÛÅvîF“<©Ê7kÙ]Mfæ†Ä“`»Tw1·ÀƒÌmp€‰1÷6øsŸ»ÕtœyÈÝVš liÓ)æ[ª*6›Ù}ªíf;{ éŒ•Ã:4´Õ°ÁIV3ëPéÌçY·1«ï®Ä /sûVÀ}«à¢¾5p‰[ÞáNfÝ⫼©ÆÝîôð”Êhe9ccCÆ2wVxÆXîÎE½Ü®p€«Ícá;*‡yœåuî"pƒ»$4œ`•Û|=jÔ¸wH¼¬—ê&©ns—îr°Ç]ö¹«Ù£â«Âó*Î|“=¡ ™§ØÓƈ»|ØÝ>æÖ°§Åöð¢Š7ϰg'Ýzð°Û^V5ßaGŒçÜ6‘'¥º|Áí_rûÀWÜpÔ}|Ã}Œ_Ž'Ý'ÃU':¶²·ÜÃìEÕió<{Yä­:k^d¯o»Ï±WUgÝÂ[Å–Hê—вê¾IS˜—Ù몋æ8;aŒ¹£|Ï}ÚA{$Óxß’ÉQ]6?f§Ý“ß?ëÄ}¬pÇÀ©î{à ÷}p¶û!8Ïý(’ß±¥ŸD UW-4;Û±µ_ÁΪ®[’Ø»ª K»Ð±­?¼Sd±%R¬š¶d²K{ú3$Îïëb{d»j֒îtìïÏcWÄzdWGeÿ–À¸ê®%Ÿ]í¨éß*ñ¶úÁþàÆþ=`mÿ^°¡?ØÜ_ ¶÷×°«âk#¥ªK!”²d)f×:\ý?ÀƒýìšjŲ“«V-»¸äŽ@¿VbÃFýP¿™KV­YJ¹ôŽ#ýö >ÞïâÒÕrË>.K“fµKìgJõë 8ßZ‹­GÀۭǹ¬7Å"¾Ö‹¬`=åU¨“-¸\uº¥Š+ДZÏ€÷I|@â*ëyp­¥Ê›ªÎ²ÔrEšzë¨7C£¶Žy³5:ë8W¦ÎµÔs%£õšÄ7?Pg¬S`‡uì¶ÞsÖy®D|•7O]`Qs;ÔE·[².‚yë2ø¨5>a}ÌíV—XŒ\™æ´Ägm´w‹z‡…áÊ5#¶$‰Ó$ÎäÊÕ;l9¨_´åƒ/Û ÁWmÅb»…ñnÕ\·mGË„m—w›z·ÅÁUh¦m¥àYÛ>®B]fqsr‘½;Õ6ÛΦ.·pØþ®­ ¼`«õî[ð>K¶zï^ÍŠMw®°„¸juµ…Ǿ­Útà5‘›å6ì­ØîÝßœlc¼•‰ººÎr”«kN·9$vop–çÚBà.²‰[–ØN€wØN{kšwÛÎzâ}Np êÛ¸ÚrÜ`9ËišËlÁå"‹-ÞFµÆ2ÂéÑrùý,¶{µÍ¶«^Csµí:¶×[.r¦æ:Û„×,ÖñlƒmÚkW›,—¥Ï5+ñݧu|º°Æ¶ÖÛVÀ&Û*Øf[;»äøìx->¯ÍrGÒi¹Î9›=]É`ßséJçœje‚KVû,Óœ§ùpW–Ĺ|¬«€ó¨#–YÎ×|²«<,ñ¹®Η8ŸŸ/ͺvx]¢Wñ6_êÚ ßÏà 4_é‚—hŽvÁK4ßèªðJdv1Ûz4OvU³»šouÕy‹Ê{ªùvW[ßëÒxψ9È{¾ù^—žešïw™XFRÐhóÃ.ÛSM}¼"©`¬ùQ—“+Ñ’.XÑå{zÆŠg‹w\›Úáê´]‡½×GU›ÝuŒ+ÓæuôÞ›wJ»¥k˜óh·vãí)ûßíû^.K{Þ¾ßW¥µWújE—â«×ŽÙk|jí¸ý O§½foôµ7íZ£²ØZ°¶÷Møä¦<û)߉„7k¡EçÓ’d?ÃnI³Ÿ÷nÉ´úζäØÇà ‹ÍZßHK¾}Ü7¢¡í×|[ í7}—[ŠíS¾«-Ûí3lRË.ûv{K©}Þw=á[öÙ[Ø—ÁU¢ïm©µÇYºi§ý1›ÙRßMƒÕÝIøëºî4°±;“=ÐÂtçÀ×ÍtçcÝ…`ww1WÒÂuogÓZBÝ»|-|w©oºåh÷>ßlˉîëºÈk9Ý]…÷9Û]Ë2-#Ýõ¾»-»Õ¾…–ËÝ:ovËÕn£o©åz7ã[5å[m™èvÀùÃÿûÖDöîo™îvûå-³æ-þd‰Ó[ZÀ¹-Kæ­þ‚–pQËj7çÓµ¬u‡|guònžM]º¿D—Ü}ôi]âºôîþݺ,éHÂcûËž9mîŠ.·ûtÂ]'Ø_®+è>ë¯Ðuø+D§í¯Ö•t_Løjï‘„»Ù_§ÛÑ}™-Õíî¾ .뾞pÂþÉ_Ò•wOø5¢ûõëuÝÓ~“®º{,¶ëuuÝwŸ9á§ì·‰Ãï”Ø“`]C÷ü-\®ß§Ót/ÁÍÂëú#:}÷ kÔ™$¶u¯²ŒÎÙ½¿ ë?,²w§Îã³¼ÎçHæÊtGº/MwØ‘Å. %-ÇÞ ÝIG‘w^7ì(ñÓsìàlº ŽÝþ“ºKŽ2ÿ°îŠ£ÜNuTø/$2…š]ÒM:êü—t· þ+ºÛ?ª‹9ôþº{“RwßaóßÒ=´íòßÖ=r8ý±u_1âðp剜ÕJÄ,ÈøÏDZV…Ãç¿×šêˆøï·fˆy¼5ÛqùTŠ`ÍŽcÞñÖ<ÇIÿCͬc˜«hÝâ8翵žñW¸²Ö­ŽK¢Wq\á²Z·9¢¢[pÜàJZw:&¹òÖ=ÍE؇Ç-13:ncOö:bœ¦u¿ã²žÓqÿij­t<ô?j­q§gœß3Š–ÂžkœI_l¹8®ß>%ÕϬ;0ö_äóú]=7á à £úÒž)x8„À˜~_Ï —¬?Ðs\Õ3Ïyôµ=‹q1û®I|3q4ôõ=Ëø[êž8çÔëzcK£“æ²ôŒ3‰Ó$ÎÉŽ;ýãµÊÝ^XÇ|ÿÍ0éXìŸ E:–ûgBñþ;Þkûç#:Ý¿X4%õ/GŒ¦´þx„1eö?Ž8L9:â6å{’"œ©Ð“ ™Š=™þ“¦ížœoÚåÉ÷.›J=…‘£ª‹žâP²ê²g;;mÚçÙ9a:à)e MUž}‘Ó¦ZÏÈYS½§*1©=µ\²I׿%2b2zê#M ìÍe“ã =L¸}“ÛcŒ\5q&rÝò8"&ÞãŽL›Žz¸È¬é„'¹k:íá# ¦³ž£‘%ÓˆçDdz½Ÿ{Îs=;©oeº(ö\L—=g#+¦«ž_’éºç"{Ú4Ṍž²dµ#Õs5²fšö\’›f=Cɦ»žéȬ1"m¹à™J7-yîe­÷æ²< ½f½Ø“5­H½×sÆr±_éYzú×;2<+`ôȆrM«žU°´?Ïöjm@>T`<9̞픤u&d •t¦äíèÌ(H¸—ð|gî@;ÝY0PÂ%w ìÚÝY2°{¨¬sÇ@ÙPyçîò¡ŠÎ²Š¡jÑù Õu–T³\g…yt¨AbMgõ@Ëw֙LJô›$¶‰=÷!§øW†<ûŒ¾v¡³a½ìNÍzÖb/ÛßЩ0=­‹<ÔÐáN“t$ÑGFŸí»9G‚UmÉ΋ÁÚ¶tç倢-Ëy5Xß–ë¼T·8'‚º¶"ç´ÿJ[‰s¼Ãy7h#g‘ØÑ¶Û¹tƒ—|+meΕ ×Vî\õ1bD †Ú*œkA¾­ºW<ÚV×›<ÑÖЛ<ݦéÍ žmÓ÷æGÚL½Þù6[o‘wK›³·$x±ÍÓ»#°ÜæëÝ}ˆô–q6´—/·î­^m;Ö[¼Þv²·.hlîmN´ëÕ§Û.ôꃳm—zMÁ»mWzmÁ…¶h¯3¸Ôv£×ƒ(z¶×Ç–¶MöFðWnõ®´Ýî=\m‹õž ®µÝëÉÅï.”Üv¿÷\(½íaíQï¥P–ô^ å½ÑP!µ÷F¨ÈÑ;*1d÷Þ í0äõÞí6lé…Ê [{ï…Ê Ûzï‡* ;{Ñ#0ìé}ª6ìu‘à‚a¿Kª3TºRC †WFHc8èÊæ² ®(ýÎ3&þJnl¿ØÇ„µí—ûaCûÕ>wØÜ~½ ÛÛ'úBa—ø»4"¹…öé>><Ø>Ûw4Hdùö»}'‡Ú÷T†´/ôÁ½ëö G(ŸJø1ý‰¾‘ð™ÖѾ‹á3íK}—ÃçÛWú®†GÛWû®‡ÇÚ×ú&ÂãFyßtøš1¹o6|óßßË6¦‹=VB“OQËÔB¨_SqBS¨ß9õ„¦ˆ‚ÞD+È t JRètúd3ýE^¤sèÏOÐô«ä“týòý6ý6ù”l¿ìk${Sù¦¯’œMæM’»éÇ›~LòÒPÈgÓòÓ¾AòÓªÒêIeÚ·ÒXòFÚ[i?"ž´ëiKä¯Òî§ÅÉ-ìÍŸ9I%„¤‘É ä¤†¤Z¢&ß$$õ$L"d"ïŽüŒü‚Ü ÿDm&ÿ@½H½DÑTUD½@UQ5T6uj¡^¦Z)Žú”:L}:J½MÕRC½KÕËRe©T—ìK²í”]ö}Ù÷)‡œ‘[©¹[î¡zå>yrËß’¿E Ê¿-ÿ Š•G>Bùäå? ŽÉ$ÿuBþwòÿA}Gþ÷òw©Sò)ù{Ô÷äwäw©ÿ&_ÿ3uVþKù/©óò_ËCý¥üwò'Ô…MŸÜôIêo6½·iº¨Ø¤ØBÅŸW|ž¦_P”Ð2Å—»é{eôfÅWûè E¹ât¦â›Šz:W¡Rhè­ ­ÂL—(¬ ý‡ ¿"B¿¦8¤8N]ñÅ0]§xGñ?éFÅ„b‚îWL*fhâ¶â6TÜUÜ¥C A±H‡KŠeú-ůé#Џb>ª$ÊÍôw•Ê—è¿T~Jù*ý×ÊBå¢Ç•_V~™žTþ‘Ò@ÿTiQòôï”®üsÙËÊo+Ëò”ï(Ï˶(G”£²"åW^’}Q9¦ü±ì”?QNʾ¬ü™rFöšrV¹ ûšòŸ•¿‘Õ&&]5'ýê…Wd+©?N½*%u2uJþêfßfŸ¼pó‘ÍGäŸOûmÚoåE„"â§’<ñަr5ÀARøZ1SÉÔ0™Æ×Œ–10fÆÎ¸˜Á×®2cÌ8s¹YžÅL13ÌfžYd–™@¹9TgŽ”_(ŸdŽ3§˜3Ìyf´ÜV~g›çþ²tîÿšPÔê ¡q¦‹Wäiò2}š>Mýý¡èïÓßÇs#ô_ýCú‡d¥ÿy—~—$Ñ?¥ ¥¼GO“dz†ž!©ôÏéŸC/¿ AÒèyúC5¿¤ ÕÄéß %£H¦ ÿÈK²M2ÉÏG’-Ë’e‘O˲eÙ$GöY.ùŒ¬HVD^ÏS’'Û#ÛCòe¥²RòЬLöG¤ßù;dKêwS¿K>‡ýO¥2¤#'2±L§eÂ2m™µÜµ,X–,+–UË#g’™t&‹Ée ˜"¦„ÙÁìfʘr¦‚©fê˜FÃèccœŒ‡ñ1æ0sŒ9É 3ç˜ Ì%æ en0“Ì-æ6cî1÷™‡Ì#+±*ÞWYS­ÖlkÞFÙbÝjÝfÝù\ÙcÝkÝo­DkÍsåˆõ8ø µÑªµ¬æb·º¬ƒ`±¬§¬g¬ç­£Ö1ë¸õšõ¦uÊ:c½c·.Z—­qëc-Ž2zÁ€ïð T"ŽˆÇ$EFr‰8Cu!ù<ÙDŠQ”äP’Èn”È”dRŠ’Bö‘×p4¿Ž’Fþ åEò:9HÒIJ†4cà'‰%“XC^"ÝÄA>EúP>MPr§Þ"Ÿ!ßFy™üW”<ò=2L>KÞAy…œG) ?@y•ü-ÊòC”Ï‘Ÿ(öïJbâ-ò2Cþ‘l%s(ÅäŸP¾H”²B~…}_%ÿ‡|‰¬¡üGÄ@%ÙA%SÉd7µ‘ñÓÉDÆRJåQ¯ÿB½J½J¾‚HYDö!VV‘×+’rêMª‘|•RSjòuJKiI¢g+ùe  ¤’ê :È7)+egÕ£<¤‘•#uˆ­~ò:¤Bä êuˆ¼I£Ž‘ÄÙÿËÞ×@Gq]iV·ª›¶"·eY–1VE!¸X‘e¢`+2ÆD‘ Áúiõ‘Z2QVÆÐUÝU]ýÿ#…Q&c-a‘ &„C0aa0‘ ƒe–`…!c–‚1ËŒ ! áPöÞ¯ª…þl³»³çì93~þn=^½ºõ~¾{ß­zE³SxÖ´Ë´Køºié_„VÓ>Óæ™~eú•ÐfzËÔ'<þ>OÞÁ!,°Ú ÉVd+dÛöÁk›b›"(¶2[™ ÚÊmå‚ßö„í A³Í²}EØæÚ¾&„l_·}]ˆÐÜž®‚û¥4{‚’EKÈ30Þ@¡bB©P¯d)c•\/×?®ƒëƒë€ëŸ'®›…Rðû à÷£´Þçï™ÙÓÀìÇÁìrbvñžÙ\6?6O›Ÿ$6ÇȦÙÀ·‰Í_›+Áæ*ÓK¦—ȘӳˆÓ?'{`6Ï›ç˜úˆÇÕ¦ƒ¦ƒB­ÎV'ÔÚl Bí9Ûs·˜2“™Khž2hì?!˜Â½‚à[IXCXGØh”m!l'ì"ìá2ñnߪð5ï£:㣾îð:†Z8(_Þ¨J£†oSx‹:í£Áu|[ÃÛ};»Ôé·Àöõ„÷¨•„ÙÑ"ßÞð>µö£Áu”êˆÓ·?ܧ6„û|Ç#ácê\ÈÏ‹NQ*"3|ÇÃ'}§ÂgÔ·€?û¢e¾³áójð£:ñh…ïBøp9|Õw-|C]¤ƒó¾þˆY]r ügEŒØÔåôˆ]]ùñàzJf$[ɉŒS× …’ÉW "ÔuC¡8"“Õ· EJnÁ¶ÄjeJdªR)4~Œ€/¾ž¡ÌŒTÝfEæð€+âf„š“Ë•æHËí Ôš\©´FÚ€ù GÔÁÍO® ÉÉuŠ v_-7¶D‰F’‡–ÜŠ&·(‘N`qd©²,²bº"«F`u¤{ÖFÖß6˜"›†örDçò`(›#[‡`[dÇí@Ý©ìŒô(»#{GS·Gg©»¢Õ¨×Ù[89¨ŠÖ·‡°/êRŽFŽßÔ¾h³r"rj§#gÀçŽE[‘?¯ž‰ÊʹÈ´wÔóQ ù‹‘Ë·õR4:DǕȵ!¸éõj´C½]¬ QÑoŽ.ÃÑí­=ÕMW3¢™#ÍÒêØhî`øíÑÕ)ß>ľ2åãüÙѵ)äÝ0Ø ðdð¼¦æÅ~tsªÍþ ÑmCÚE¾$ÔA>…l?´X÷¡e† ³]uE’ÁüD5ó=´š°69Àmö×þÉÑþ’ènÿÔh/|6­3þòè^_ü3¢‡¸œû毊õωž`Ûð;£§ýîèKôœ¿-z‘׿'z…};÷Ù¯F¯ûÃ1ÁŸŒYý± öÉþ¥±,¶7ÿŠØXÿªXž¿;6Þ¿>Vˆõ‰Àöíß+öo•úwĦù{bÓý{c•þý±ÙX#y âuÇð`´À$Vë?kðŸ¢{ŸÍõ_ˆÍå±÷_Öuðç¿›çï-ÀÚ“ZkÍÑ€N†±¦¤ÖMŒùxmÔÒcA-3‡ŸOÍ3×§¹Órb‹Ø¿i±åÜ7Í[ >¤Ök^Çi½æu{Œ>kE4–Ô¾Oj-æ#C›[Ã}¾Æ¦æN+ Ÿdð›ZWSÐ*—k$¯™ÆÚ¨ÍŒ­c`½¼Fëd Ú,Zi-ÄÚGë¡VÉg€·¼Î9tÀ¿/5Wl£ÖÛ¢µÆ¶kóc»49¶GÓbû˜£Z4Ö§uÄk‹cÇ´e±“à2ùn¶Y†Ö;£­Ž×ÖÆ.ibWÙi›c7`);0ü"ûRm[ÜÌ~NÛIü7lDÛ·±ßâëS>p„m ³«ÿbØ–Ö·³ßÔijµCñqlã×s}îËÑx¾v">A;Ÿ¬‹—ãSµ+ñríz|F@ˆW¬ñ9ʶ¸óc}Ñ®@†îÇùÞ)ß=PÇh3ú:Ìô‡ýp v¯Qüi Kòcõ¹Ha„Ÿì+É?¦|ä`Èu¡‡ê 4v¼èbæHhCrWhsrÇ6ÌŽiBÛ’ûB;“}'<½Ý‰˜Ìð—ì'96 W¶»q?ŽyŒº |.<»½%\ÛÞ†z©Ø.‡5ßòÁ@*†1bpC»‡ã±ðÜv•ûž×¸žê³‡´'þöÎp°}i8Þ¾"¼¨}êpܘ‚'ÁðXЈý†€Û–ŠéF‰ëÂKÚ»S×¥b´Qb³ðr›¥|Îà˜Ëˆ»†ÄXÜV¾–ëð9î?Ûä ~ÆÇÝ©8jˆ]Æ[űu@i¼-0-î L«×UÆÃÙñ$s{ˆ>ªÔÆ; ñ¥¹ñyñUñnÄâÃí|—³Ïã›ñøÖÀ¢øŽq !°$Þ,ïåõ¶È6L1v`e|`Mü Û_`]üH`cüx`Kü?OqY/ÛU`{ül`WüÛ ÛN`_ü¯=Œ@_¼ŸýhàpB„ýqŸ%Ò'™3 Ølà|"—õ.% €« GàF¢(hNL ÚeA{¢"˜˜—˜Å±CpBœœh–$ZƒSóáÈG³±?ÎHhÜŽ`U"œ“è:‹1æ<^4†AwbY°%ÑÅvô$ÖÕÄÔ'6“‰mÁÎÄNŽƒK»9¦bW$zSÜ ®Jv'ÁŽø9ƒŽ)\Ÿ8Ü”8Üš8Ü‘8ìI\äs\Ÿu÷&®àÙ͘ÛàþÄõàÁ¤<’´'3˜[ÁSÉ,^Ãg“cƒ’yì‹y\؆‚—“ã™ ÁkÉBŒE²8$&KYW(=9cðPfrz('YÊMÎ$kCŽdÀϥù %çr›BS’óØO†Ê’ BI_Š«)ކf&ƒ¡YÉ8øLœU'…\É%£ñßL·wÚ—ão¦>ó°³’.¼cÊ0Ý)üû+&ì¯Ø°¿röWr±¿Rˆý•Jì¯Ôa¥{*öTØS aO%Š=•$öTÚÅ—ÅWL‹Ä-âVÓ·±³²;+˱³ò"vVº°³ò=ì¬ü#vVÖ`ge-vV~ˆ•õØYù1vV6bgå﬘®ðΊéßxgÅô7ÞY1ý;+"vV¬ØY±cg%;+ùØYy;+_ÀÎÊãØY©â·”æjëë[æì¯x±¿âÃþJû+Qì¯Ä°¿ÒŽý•Nì¯,ÆþÊ‹Ø_yû+¯`e+vVö`gåvV2°³r'vVîÁÎÊ}ØYÉÅÎJvV&`ge vV¦bgå)ì¬Ôbgå]ì d &á‚pùÖ>€Ô,,–I]Òji­´AÚ,m“vJ»¥^é€tH:*NKÍH礋Òéº,H­z’­r†œ%•óäñr¡\,—ÊÓäér¥<[®•ä¹òù°|L>)Ÿ‘ÏË—ä«ò ¯YšŸJ^›×îÍöŽóæK²ž¼¼“½%Þ©ÞrI£Ämâš|ŽïHwà÷üwn"nùßå=èWÈ6¾Jén¼ÍÂ{Ð{ðô^¼ÍÚ„ùÂ}ÂJãð6ô¼ ý$Þ†~ oCóñ6ôÓxú¼ ·¡ŸÅÛÐñ6Ô·¡ñ6´oC'ámèd²¹>¡H8Héa¼ -ÁÛÐGð6ôóxZ*üOá„÷)•áècx'ú8Þ‰~ïD+ðNô ¼}Ò”gÊfàèSx':ïD¿„w¢•x'úe¼­Â;ѧñNt–)fJ³Mí¦vá¼­Æ;Ѽ­ÃÛPÞIýg¡Þôšé5¡ïDñN´ ïDŸ—ˆ/sÉÒW -âNñ5¡•ìzŸ0O<'þQh#û½*ð¿â·¸êéJ<ÝžõžMž­ž”z<{=û==G<Ç=§~dà=ùÔ¯ç‰ĬLâ‹Ä'æA±`ñ‰-ü¥{Á€0à>šÿ^â-¿¿Ÿæü¿ÃxÖÀ¬çâø'iæÏ y˜ã|S&Íñ§1»˜×Ï`FÇ›ž5Í>‹}fT&f´o¹'™–Ò,NÆ,>„Y,Â;íÏ™þÙ´S(L¶RÛ´[ó±ðšx÷Âk#R¿Gô¤{2RŽ'×S€ä‘Š+_ Y>Jº,_“ûSÉ+zÓS‰FÉ›Éüöæ0s½¹Þ¯ÃÓå-òNñò–y+˜Þ é†w¦w–w–ìñV{]r··™d¹·Õ;Ÿ3Å+ƒ³½š7*­ñvxKYÞeÞ.iïjïZïïfï6ïNOw··×{À{Hjðõžðžöžó^ô´z¯Û»¼×}‚ÏêËðeùÆúò|ã}…¾b_©ošoº¯Ò7ÛWëkðÍõÍó-Xxì§ËsÈçó}qO«o¥i¾%¾ZO…o¹o¥g1÷ ¶èBÍ.Ø Yog–oo£oËÂk¾íT~‘Ž»|{|û|}tEºï°ï˜§ÀwÒwÆwÞwÉwÕwcaÝa–ž³bc{UìJ6¥qJ>Yk‡n±Êe2ì’xv*S•rJ3<½J•2GqÎiUÜJ‹ç„w±alW”6Å£¨JXIzvúJ•Ne©²BnQV)ÝÊze“²UÙ¡ôȧ”½ÊþÔw ÄO±¢<õ}Õî׿qPŽ0™Áú\¡^7CLP3 øBº¡:hçþ%„öºT™?Îø"b>ÁšyÎI±Zn1¾À7ÄaNåênUV{‰«›äþfBÞ¯ež’<¥=¡LP/ú®Ê×Ô+r¿zø(zçKÛùk ºç)bè|éÆÀ—ãý…R¾¡H}9a|'!Íó/ ?±&õ•„·CÙá_â_ÎßRHW‡~+áóùûÈ“Í&’%Yý‡É;Íó£´ŽkH¥ü…´Þ FÍ5ð1äñüç¥éúžëš™Ê/I•šÍ?M³kÙtE†R¥“ò´|m‚6Y+ѦjåR±6Þ’V¥ÍaO§957¥­Mópb/§©Zî¤%žÕ:Ù›iÒ>­S[ª­ÐViÝÚz餺Öð\ì»®j›´­Ú­GÛ+]¢í§YÊUsµƒÚí¸í‚vY»¦õÄ€(- ¤29ry W](Xx6à¦Ê™Yj:ã 4Zór@ D)uÈ›‹åžÀ²@W`u`m`C`s`[`g`w 7p€j  œœœ \ \©^¸‚Ö`F0+86˜, KÁiòŽàtÿù`epv°Vª 6çç}Aþ?\\\\\C׬ n n nî î‘[‚û‚}Tã°nðXðdðLð|ðRðjð†\2‡l!{(;4.”šš* M •ûŠC3äÎPUhެ†œ!w¨%4'Ôò„ÔP8” u†–†V„V)×BÝ¡õ¡Mê²ÐÖÐ%ê í í   ]7….‡®…úÃb8=œÎ çjÇÃaG¸(<%\®Ï Ï W‡]ˆ¦úÏ'Ìÿ@O˜m‚Œ¯rH r¹`"dËe”*ä ©Jª’gRšE©š’K^¶pþÂùßÿñóÂóÂ(k–»äV¹•Ëäùòj™ÿÓ(E)uPZ,óÓÙ>ÛþUºG&žh<јñ,“†˜WijŒO1VļcðcÃSÌxrùž\2óÚóÞ…˜7Ï,wãiåÁ”ÙšéAŸðÝ¡t”úTJÇtœ&ÞýLº\|;¨^IÇÌ@ŽŽê:žÉ½M£ HGõ:N¹MôÊ T˜9ÕÇè¸0‹P=Õgèèº=T_¢c³VÂüaG6 Ñÿ t‚e„®Q°zÖÞœÇ鸰ùC°MGÝÏì¼Mì6æh8è¨?DÇÛDýQ:¦pÂÀ顨§²zΟý¾µÕôöê¶!ÒëÔ!°£5 æ”¬ûwîïYÂÂeÂ5>¹¦_··Z‘@ãUK÷©Í¹5flßµäßkI-­Mµ´.ÕÒÖ–ã›OC^'k©íÒQýÞµ.¬'¥ƒ×·ZZje£]ÃçiØ ¬'Æ<ÕòºÁmà<¯ «]ïÒç®v±îßj»Œ¾¥êŒ²fÁ u}(‰Ú ò­õu”5kk ÃרÔz9Ê:Y·NÇÇ®“òеp™|k ´Þqÿ™—µ´¶Ô/j©?µ´&ÔÒšP{Nçh-q°–|z-ùô:Áà²U·YFåëÈw×7ëÆê¾¨.å_Sv`øEö¥uã ?W{ËFêŠu¿Å×øÀá¶5Ì®ü‹a[u¥Æ‘üjÝtÃÎS×ÏÕïWG××ñ}8ß`€ïOzêÈ/Õq‚Æuç†ûñÑê¤Ú<Š?@à |ؽ>ÆŸ¦æbÃýä`_¹hì kãÆ¹ñºfޏh^\4§Û0?8¦qÑyW¡>w.‚³„Ž4®i:Ï\4&.êÇ.sÄÄ%évQ_]4î.ê‹Úïâû‡\ÔNÝßÅí£û¹¨]®åò®5â¾s+É¿¹¶¶þÓð—ì#96“Ç÷;qËB—¡ƒÏ¹(nví3ê ÷ÃÃ|ð@ “òÃ}2â1×a£¯Ç]Q·q×I“Ìý 8ØuÕ¨³a¶‚á±àQpH¾Ó×¹n܈¸ÎˆÑþob³”Ïsq×à‹ÛŠkÇ~oíHÛª£¹MÅQƒíªnÍ-WGó]Gó]·}Ðu»{ nÖ·ÝÍmÍSÍQÍOÝI·#ìm®§_ëÎh®¤òÈ8†}Ä N³¾þÁö˜ãä76‚]·!g6ÖP'ÇŽÇô6²^¶+'ÅŠÎɺ½ÀvˆßÒiÎr½®s†>NÜg‰ü°“b6§Ó¸Þ­ë•.êpR,å$;uRå¤ÊIq“bçR=vpRÌ!Ñ|;)NpnÒûÌ>šíˆý±s‡Þ'ÅNŠœû1?©¡“bçÝ®œ'8Ïõ¹#H×õÐÙ¯ÇTŒzñ7ëiM­Ï4ìâœaO†?ª§1¬§µ´ž¸SOk~}‘~Žë³Žú)úº•šÛzŠ'êi=­'.ÕÏÒ¹U_­¯áõ´®×7ë¾ØÙ¢ÛP}«Î…úùúXÔÓºY¯º¢ºï®§u²žÖÈzºO=ëY=ÈçÒüʂѦ ºŸäþËÖ[\à(ñUÎÐùÌs%gésÌüà¯1îÜ{ç›ÿù5Ƥweb¡È¿Ÿa> üTÆL L&”¦Ê 3U„9'ÁMh!´<•&$ „¥„„U„n£ÞzÂ&ÂVÂ=„½„ý„ƒ„#„ãÆñá¬q¼@¸L¸Fè›HH×Ëm™„B.¡€à ¦ÊzÛl3 ³Õ¡™ÐJ˜O !Jè ,&,#tVÖ66¶vvz ‡G '§ ç W×2‚•@ötGa,!0žPh‹ ¥„i„é„JÂlB-¡Á¨?×øó<‚$Ä ‹ô~ß±„°œ°’°†°Ž°ñ#Ž[Û »{û}„Äc„“Î8? — ¤þ|ÕÀ éf6;{Bº}² ãó ÄÅtâb:q1¸˜N\L'.¦Ó‰‹é¤/¸˜N\Lo~ÚXÒ8µ±¼qFcUコÑÝØÒØÖèiTÃÉÆÎÆ¥+W5v7®oÜÔ¸µqGcOã^Jû6i<œj<Ûx¡ñrãµÆ~†[l<ëNo¼ìΤ”ãÎu¸î"÷w™»Â=Ó=«q•»Úír7­îùnÙ­¹£î÷b÷2w—{µ{­{ƒ{³{›{§{·»×}À}È}Ô}Â}Ú}Î}Ñ}Å}½Ih²6e4e5mÊkßTØTÜTÚ4­i:Ÿ§òʦÙMµM Ms›æ5-hò5›âM‹š–4-oZ9*Ö4­kÚØ´¥i»‘vQœßc¤}”úš7£üI#i:\¢t•Òfs³­ÙÞœÝ<®9¿yBódZîõ—ã—lø%†tüC~‰ÁŽ_bÈÄ/1dá—²ñK 9ø%†ûð ÷Ûóí Ø±Ï²ÝÞ&|ѾÀîž²«öð´=nOÏØÙÿA¨±¿hÿ…Pgݾ[HÚ÷Ûß:ð« þ?n™É”e’ñ½Ê.a’ 8ˆÅb±ƒXì ;ˆÅ§b²ƒ˜ì oé ¯ê ¯ê Ïå ¯ê ¯ê ¯ê ¯ê ¯ê ¯ê ê ê ê oê oê oê oê oê8bè%ê /ê oê é Oê Oê O:‘<éDò¤3õ²‰äI'’'X Lj8Cé|Ã¥†« 7n4šm”ìÙãó'4N°6ÝÞnÏÚöó¿W€_àðÛfüöFš½Ä^"ˆö§ì3‹ýËö¯cð;ögí-4ÏÙŸ>i÷Ù!ß¶Ç„{‡ý›Â{½GpØiÿ¥0Ñ~Á~A(ü¬Ý$ð¦þFñi’ –ÉO ŸŽüÃâ“$ˉ;¦þ)ÈZ¾Eòq—XT’Š-Èÿ˜ÏŠ]$K¨¥|íääE~®}d‘¡3Nr4»ÅGXZ¹U–M‚éï¹b •¬±ÄÓÍqÉßñæäÿùoB¾€’—Ä©$»XóÍï#¿ù_ŠüK¸ï#–´™åÄéÈ{IN'95ÿ,‘<¥·ÓAk]Ü]Ÿ%=_ãúhçdË!9 åÓX|õYs FµÄ"£ü”Ïd™våwѽþÈw¿ùWË,’ïŠ$O[ütöyî]ÿó–G0;õ,-_%9#<Ñ ™òl”OkÐæ{I>&–²´Ì#YŒ|1òebÊç£m¥hÏ<´„åt”LG¾ùäÁU%¸ê1=ù4ê<:_ciy=-ƒæ¯ƒ9=$?ƒ.0ò:V`${ gôpþäïA¾#ÐÊÜ ÞU¢wtöæž»›— ßÇ<¦AN£`Iå-˜Ù.Ük1Éω‘g™šù¸6²s]#V£=<ão Îâ ØË“”¿ù§´WXŠ'“ù óxË\’ßâ¹6{¯€@ýÇ!ÏAngiþ3j–!_ÉõM¿EÉ—‘Ú^F~=ÊËqíŸX¦Ý‹ü;¯BþõO‹Õ|ÊòÚ顼`ù%å¯s¹©Ñr€û+.¤òl®#œ¶´ó÷Ö,Mï%$Ó ¡'2×~ r)d–øwœ%k5½ÁÒ܇ü«½/‰nžAëû$Ÿ|ºƒ{gÝ„übÈ‹,ÇŒ¥;>¤Ï2j~ËÊ¿XÓ€|d¤2ìÐ`‡†±¨¿g7£¤%(yYgçIî€Ü¹ò"$×/Ã,«\ÓÔù7Ë?’¼&,ƒ¶eèÅwtF¡dd7ʻѶn´­-ù•XÖcY îµ1ë ùä)È?Aà †Ü¹ r1$ëy£ÔÉuÒ¾ ÙÉuLïBûÈÿùßq_L§-}ÌIÈÓ–@ÊÏB‚-– ¤ÇŠ9ýj¾ù!™cÑ0‹nB^±ìeF¡Îuè¼סó:®:…³§PrÊ(ÙER@ï·ô‚i}2䳿a þÔ™Éyâ'jÒ³¦IÐYúäq–Äd:kž™Í=570ÏÍ9(ÉAI¼Gß…ä›»ÀáÍ4qáhóR\u§…mjìå.^‹Mw뜇žlèɆžlC’¬­×ö’G¦:{‘ ù’zg>€v>1¦’™<¦|?‘ï¦çk“y‰å˜}.‰ë¾ˆë˜ÞåšÁ›s]þcx½ã’«º£Ä¢Û&˜ÐË%Âû°Ü.Ø].äƒÐ¯ûÕf«ƒdå‡à÷þ ù ¯¿¦¿ÃÚQ²5'áZ+¯Ô¦ ° ¼èH3Æí.Ô9û¯¸6ò‡Å–ç¨ü(ê\Àÿ yŽ¥u3ÇÚΣ'¾ÎuÄÙ<†Öµœ·Ú1žØÅXÍ>ôâ'°ˆëºàrëO,ÛH>'náD·h´vzô°î‘¬Wxô϶ s'Jº­`Åœ7óY²Ð#îE:%hs /½(¦¶ù®îý,çH~›%YÖ<¬Aœ¯+2¬´žšgâ*'4̆l†Ì‡t@æY×’ü%t†Q? ÿö7}5Äå³inŒu6@ÚÐZòãжC‡Çld³Þ‰ÏV2ëÒ4ä͆ÔýçÓ g‚aäÌ÷a z[ì†÷8ŽqÉ5ØÚÈß Ùg}€Û ®¾ˆ³/CŽa‹3=Ÿ³ìý>¯)¦5,-;`e½¬Á’ƒÙ7£¤¾h¯qÄ4ö`;2½ÊyË>žwÓ^ø¢ë,É^tù&<—¿ˆüOù.ÂØàÜsZòM´ë¦÷¥ùeßu }ŸÃ-OËæšiX=MÿÃBѬé{ÈÇpí§Ñè4F¯ŸÆµa4 Çô²õ¯<ºW´òÙ\”¼xÚú6¯ÑÜ#’ís–È›ž…ŒBþÈú]’‹¬ß!Ù…’ ë'I¦clÍoÀCöâ쫆dÕg ‘|þªÈ: >íüÃŒ!ûÆoZÃyôî dÖ‹Ÿ!öÀ8˜þŒò“Ð_òwa~: &Éù¾¿íÜ*Ž3É?·Às«2±œÅU“ Çb¬¦bô¾eyq û´"È,ÜëßDòWæÈ· þïq-Ö“¾ÖÌÀ}av.àŽÅè]KaònÈ2±€Jú±äâ.÷ãªnèÙ‹’z\ÄOR¦%8Û ‚”!¶ïC> y #ö |ãiq>4Ÿ!ù)h1»Ñ¶o£d&®ÚÀR|‹ÇÐ’ÁRL‚{[¹…ißå³iïs^Dž¬ƒ£»é±§-Ë`§Ë1þ¥›ù›¢{¹i`¦N#–Ñ*ùt‘žLûї߈ÏóŠŒV}rä g-êç#ÿ€¸€Ê_‡žGù^æÒ´H†Ä§¸U`Î ±•d¿øE*·¦Ñs©w9fHÖütÚ¡óK¢Hòd¥å“¼ c”~€ú/B®¶Òó é×"íwk¹ü·Èz*‘ŸVì'·`ô&ƒ9yEw!ß|² v´Õh!÷Q³p/¶‹w†¤õ^Xßå1è)C^A_zà©~Œxæ]ÌŽu2¡¹Ò޹~õwᬅ¥p¬èĸ}ó !6²ïúòïYdz´üòmÈ×Q^YEWý ž/ª¹¦¹²ÌÂÏ/ÕxºÉDÉ£ú3´ýòMÈ· ó è|:ÿ×>‹«žåsJJP2C&â¼ð·ŠäÛ¯£¼y~깊皇p—íz«Œ¶ý#‰ç&”̬Dy%k#ù:Î@2+ª,¹Û71ï¬ùmhþ=äË߃\ùŠÈñC94—Cs94—Cs94—côÊYÚ½\3í^ŒÆ«Ðð*ò?Aþ'èÑ{ÖÙ$_³:IþTï;—P ©Ä<ÏŒå(yR²Ã¬½Š’Ï¢ågŰ ·a¿Ÿ#ù9Ì]@¤hÄôGÔÙ’B<9n’\‡’®O~æ-Xë[ðc|—#x¢´b<7³f²¾7á'Yþz~„üë¯@[ òç¡á{?7ž@Yny]þ;÷ÝúKñ³\Güå5*ÿ'Î[Ÿ±ð“NÆ­ £Ú†hØ ·½,-x.¬/aF¾ˆvŽA«~ ¾½ Ù‰VMBù)qÉ¢%ï{•ÿWÁÒ¿Z¦±çaIk ·ü7È/e¶ÓªÇ5ÏàÚ˸6 šU´°Dg2föZ¸ åF›ÿŒk‹ò7?ù=ÈŽÁˆigY¢d=äŸx–Ó,È¿cH°ù-:'¹„8V>Tá.ä…®´ß ¦þÙ–O°´>&˜nþßÞüƒ…✴o"öÞÅQ¢ø8¯é""É´mˆüÅu'‹«ê‘p¢k×V"º®GÍŸñ3¯ø¯PiˆÞÅ_ ßm•üKÄÛq#4|›å˜;¸<í/ІØ>mê? Ö}ƒÇ6íç<òi¿B¾¬ïáÙ31G!ÔïÆì`ié@±àU×L[€ òÌÚï‘w¡ü~h¸îCþeÈvÈÏã¾#~û¯üŒ“ö4ûÕ´cXO;àuŽa/{ì´•xJÀ¯`™ö5”hˆHÿ=?ƒü$"Ÿ´ƒÐsräóX©±æ¦ÁÃ[Ö"?yó_°Kc‹w!†ÿ¥‘ßù¿ˆ;p«¶ñ¯çYϳ÷qlg:Ž)'Nâ12¥CdŒ¨ÌCd8!IzIÈôÊKÉ¢dÈðRdª“"I¦ÌI^3uöþÖý[ûý_çûþÿ뻾Þïû.×õ;÷¾×½îg ÷ZëYëyö¶Ž…$UÎ ü£ôES,a­@;Ãáxx®q  ÅÃ*,k¹h EÓH4þÓD‹=Õé «ÃW9»x†³‹ŽìG*K^g†ì¼ÜD×2®˜GÈ銮M´ 7”ýÀUòǸ.c¡ñés•ÀZbi­ŸlxŸS`¸ Ÿì1=ÛzKc\—À±¤JûK»y«DæÌ€O? ðv,Fi«¯çK›èŠÜ‡÷ñ˜ ;BâJî™Ü÷ê.X2{û®ÿ•‘÷c§äœ_sJ`Æ—e&ì·À$IÝŒf3šÑ²sÑïÊXvú±Êï…¹ÃÏÍüÎ. °ÇNŒ=A —»n÷<¿ÜYöf¿oJè¼È}Q/îOöb³W|zÅ©ÑwìÊÃ1¾3aG(£¯ˆ”Ð ËyK`…2^Ü#xcïfj!÷0½cwªEÝSHÝã;0v„[°1-ìå—«øóü¡Plº“k^Œ¢ÉK›\¡ÝÉUÌx)&‘oÉéÊ÷A)ÿ¢ñ_å{)ò—ÌÇØ þ¯O¤Å(§+›µh‰´½”Päo‘çQþy¢q&Iû{‰Ï2°€ŸdRÏH?úy-Œf ú[Äù7p(šÉÌQ+˜±ñÇ`?±¹•±V€‘Uˆ9¼e2‡ûù%—?>ê†ÏÑÌÌ홫Çà? ŸE‘=9™Ñœ'hN3ôDÈy¸æô&nšŒˆàUvÙM¹ÖY‰« ÏAKØŸr²êeÄ}ʺ³ñÈé®wˆùç‘㦉ÏàUo43œüü‚Ï—©ïiFkXN]LíãÞUNc:‰lf ps¸‘~îc†_mdNS½ŧY×ÉúB^c®[Çè>Fi·ËÉŒ·T¨R’ç8½ÙH<¬Œ‘µû)ÈÈ5?öœö Zo4gP­en ´%u5¹®Äæ+‘wÀ 8-p]l/k+öã$ö‚¹b¹„àx<\êäÆD£‰ïn¿°‘¿E³EJë_&rv1;3®o ™ìoo¢÷X³ÜÓ°»ÝwìÅŒÁP³ó V§Ç×Ò¿¥DÄùy¤%Y%gËù‰ 2NgÜ•«ãašŒS37®‡[˜ýÖCY»+#£hNsÊzËè«âg¯\Ŭ/²ÿÍÃYÍ>ô}Y—¿†ó8šÄ ¶›z•zù#¤î>ë²^$g5îARÙó:‹íÞº¿6<(t?’Ó3÷v¤6ÃÔWæÌúr>ãG˜…Ž3Ϭš~ÙÁ¼÷µn%Õ Ô5å~@Îfõ\™%Ì &©`/æ.4î>Zr•œÉ›™ègR_™9Gæy!5ú6óŠHªÐãLÆ[@8}ÒûèñrÈœSéQ°‡·Òð;Ðåôûút“œ–è·ÐÌ—½¶¹{‘·}4škŒ<èZ ÇÓòWý‰¦Ì·É»–ë:Èœ ù嬯Ïðîf>”Õ¡'Þzr^a=Ï—«»é”}Œ“¢©{/vÊ+KÁî~<»YG¾f¾%nu9®Û;®ÚÈÝåÄF·ã*N8sЩ0š}Œ÷ ž!W’»DïóÒ"¯€áeÊ?€qgOEf¥(çn½QHÞÜÂ1èÂ©æ ¡wÁ[fø3£µ³ÈþÏþ£yŠÛƒM_æΜM?¶5< kËÚí‡ð™@? üOÊ©‹Þ‚|KNot:òKrz㌠fQ÷SRB¿8©œ¶yE¼BFn)µóšè‹† ´‰7o­¾,'êÜ'¯s}Å+%ÞžÆCÛ;suñöªœÕøû„^#9±1÷½¦eü9´Ï5ìS`¢\É^@ÎÒ£y–xûy,íðž¡á.ŬÛ5hÛ¢´O?M©˜ñàýŒñ[p±Q‹äôÆÌêR—æ´aOæùÜ”œE')^/®»„‘‹;ÿAÜùÆÿ2.žó‰¯,ò³–h¨©GM=jjhâÇ{EÎvüÔèq/MÉ™›ø¿—kG.g[LÎôq|±Äs<¡îÇ©ûqiCïQñ(ìï…¯I?âg´%-ö8òƒ´L¡@ZOø(§7Ûs¨K¹Ãñöp]#û5½Ãx¸‚7±ÿ²eÁa^)ÃÞHî4dþ¿!z¯©™° ¼æR²JÙJ`ÃÊ¢ÏÒ;hsG¨ ý%BÉÂg%¯wC®¢Ä[qÎXγk.ƒf >_AžŸW`*­Û­›øÎ’vˆ«H«nb‡ÞŸ't±ã¶OLqž¢K²»/Fë-&WYÚ¿ƒÈÁYâ9®¢Ü8›Ò§©iú4•Þ/KO@.‚œŸ¾‹7ûä,H—¦œÕ¥Èý„îQä{Uà›23£¹%‘`bLä¹pþñ©ï¢F®´¼±¹Iùo2ÞåÍ™{¢‹å ¨£_#›û‡ìËÑgä}¡¨)aöÞèÛF®Ý"ï˜E?6lÜ"ZQÞ•Š6‡æZÙ«I½/ú>–ïãa1©ãäý¨è|4†ÙW¢äݪ¨¼•T"bÊ“½'ú¼¼Oŵ*HŒýB£ÿAôÙS£+É»ÏßÊ»CÑhÌ™=j8N€)Izt·áT4¹¢ÃLÖÊ„’ðuØÖûàP¡º /¢I:¡nfœãàܨ<ï b¹Ú¼`5òŽAvIý†?Á«¤¶„ih~…¿¡éÓ)e¯r~Dê?` ˜þ;äFR6g?š¹ð=ôµ)U~4ßÃep)<‰Í#È¿#+dZÆÉOD$þ“(öê¼htì“a’h”-çDØ~Aêä/ÅÆ™Š¦n¤®Ìº¶DvëÀ™p®íäT¡A.hûù¯ðˆìJ6¢b¹^$u+WyÃÖ9Ùö67‘³m}±/dëHêNJû½ÈŠ~TWb5ËVŽÆŸ!õ ¹†šŸÝas˜JÖÈéÊ}X!î4[kä©Èclä`³f£O† Xú6–hó_ÑB7¼—Tç”͵Qt y,€¦pDž²@sDÖâfè‰LÝ'ÖÚbC<¸=a8"§C»CðAlÞE®€‡cð¼0ÀÕ¯=Æ&~D¦¿œZDÉû çê…£ã 혲k#Ë¥Žê7ôש…]¡>‚[È[Ëš°qDÎ팺Öeç=Rû"ÿ$ë—sMXûeÈ¥ðù"šåÈÜ!8Œ ³šKdv‰•d¤<_¦/XÚþ=•w!>@þûVÈçàÇðïðCf?Vwú8‘Ìêé?…Ïoà“”­å_-Ï‹Ñ?lÇcd×ÙÞ¹Ýæ„½ò V–6̇ЯCf5q~’™Ð±í|Õ®Ñ0/zÐM£ï6ÁocëE ½#šï°ü*?ÂØüƒ¼5°9ë Ñ×f b½Ð¹Ñ/F*ñž|XÚ›(#”7‹òÄm"gþïq^¹P`µ¡}{¹Šœ·ëçy/±<ïUât"ž§Bä{ÎB÷oœY­$•Bç 'ouîã™øv÷<½5»¹ÜR/žÏ~&²»ùkï ¹–˳øË’Kµt³”¼·oôE½^œ|©ä ©‘Ý‹¾2Ü#ô|NwŠ¥Ú/t:“«”wZDög ¹-ôJxfG +ˆïäòøœ#o>è'¼[Jž>‹ý.a r=˜sq•ƒrãnÑ/ËÎZÿ,;M‘Ý¡òX·—Pw×f¶ÔM=³ª,¡“,t¿““1µSdo—P÷ƒ“ô_Mê|¾|ŸÕäÜÌ]‹Ï®XÖúÏàíGø |.ÔrÚYBèf!*÷ š OgŠj³GÓZ4j»þÐð;¡» 9Kìýl^˜Bj½PVL=]æјTÑŸz?!ςՄ~y“„þ®~nˆ•P<Ü­Ÿ“9 ýQ¸[5œŒM14Jõ³ÐY­?0ú¼¢÷6â¡(|EË*¹KåÜæ{L7‘º>ò-Ù±º%ß«ú‡ñ\וٲ¤kî*ÝÏÜ7 '¸¯?×\³“u¸²Í¥gÝ2k‰½3f¸fjnܬ;K.w’Ë›üîdÃrÚìÝ%È%¤ÌÎ.ñà\Är×­FÞ1Èøq~tÓd¬Q†ŸÜ»dq ȬåÊœSßM”9Á•w<J-Ü®–ÙÃ-!³öuaC4—Dvÿ!¹Œ¥Èn!“zÅÝeä&ȧ]¹˜#öÎ,ëãá¢PÇ#—9ÒÂK(ÃvçcyŸ#O<甬)޼©rÛ‰ÈÚçV•ÝÁ»CIr×çœ}¢Ð©ê&‹ÆýDî3vÜ0Þ'4Þ Õ ä‰0s̤& ÍÈ;œ¡2óãó ç=éÎaY7)ÉDçœÄ ~NJyÜmòm;¥¼KÂ@òÈyˆ–ÜÈUѯ@c¼y#Ƴ— õY¸\èûè¯ èŽ@“ ›öÂÀf,‹À‡HMDn\˹ðúdôý…Á²&õsø1Ü OÃo°iŠ<6A3v£l?P¶{I]„¼‡kÄf2ú…È3wÁZðQôèKš'à—èïCî m pEÅu±q¾Gó:l­ËbIËè‚Èï"¦To#·ƒiØ ö‘'¶/Döà ¶GDö}4W‘kÛÙ!Ôía_ÛXÞ´=‚çÓ¶/°™ á'Y ¡ù~Œ}9ìñæµµí€ÏJ”g–­»hœß‰—^óÐû ‘z‚Ô•¸ÒP6âÇŸ¥íSZÉ9€¼V‡OPÚVȗ𰉼ñ”Šþr‰a?ƒÐÃÞFlQr­†¿“—Èô:¡¡„š~Œ%>ãˆp{¿"±J­—aå)Ij>Ê å×ÂÃ(rQ6Ïöø䣰9¤M¼ÇH}’ò°£¶½fÇþéÈý¡†ô”~?6þiŸ@#䋸dlêéØ4 „©h>„•a5Jû8©Q4ŸÙ¨æº/#Ïéuwñé»ÈŒß€/S¡·¡-OœAø,Hô¾KMO éƒçmX.@îó’«8z¢Z¿ˆ¦lé#—Ñäl!WÊÖ2ÛxŒVw,hyç ¸½mê0f3måfÐŽ}ÚÜ·s&u÷jâç<~ˆL÷WZû€mÊà7Äž¾ö™‹ĉǸðÎ@;#=KcY˜ëÕ^ ´½V¾Ê¿ÂgY„ÏA¢W¯… m„Ô€Øë!%t7`cû”;ÀŒêõ‚¶gé#Òkíäµ1óü2wéspívûÞ¤2‚ܧI%—fUò†ÂuØA~˜TZÞ‡Ì\äÚ±¼ =QäÛc+16„xû±3cäÚ’ï‡;ÈË ¯÷"3«ëúÈŒ—YÝa Ð&>ó¤Î†´˜f4éÆÐ® ¬Aš¹QÛQoK>â!8_ÇxôYÅÌøÙ;¼X'•øÑ/¢)Û@ÚÓ%öœ-äê@ºCƦGl»cñ@ë9_Àèm+U…éØ0öµ•›A;RhUßÎ0ÔÑ«‰Ÿóø!~Ü_©5öÛ”Áoˆ=ýå3rĆGôzg ¿ÀÒXæºD —m¿Ô¯rů°DãYVásHÓkáhç.5 öúAH Ý ØØ¾c~ 0ÿx½ íAúHçôZ`;yml¼v68§Ñn‡°ïM*‘ï>M*¹4s¸7®ÃþòäÒòÞ8df ׎»Uè>1ïÛ²í‡;HeÆÓ{‘™åt}d¢Úe–s˜OÔÚgŽÒÙ6ÑŒÝÚy’9Y3Gi;6mÙÆC<ç ãS>³z€y hg1hžA¶e¶u'Îuȼê('­¡Cæ4ÿG¡R: ä-¯Æ²0oÊ]Ò“ŒæaN`~½®Í©W¦Þeø&çQµüáTß—±ï;2*½…†Z4î9ô½ˆ’o‘È9Þ¢q¦ ¯Œ¥Ÿ%ôRÑäûS½«\wƒ’sÈ[2ÃóFt/lö]ÁÒ\ñ|¥l¼ü†ã½’†7µ|[g:ú‘ð¢''«ƒ8Á;Ï ^-ôÇÐ\ãï:'roÁVZÞþzÄË+룴ƒÛPNíœYøÿ›&œÝeâçÜŸ…³iO­Gy”œhéÆ~{É+z÷>9»sÓµ|oâ–hÔ5ÎÄâ8s;«ÿÎ7‹½_*æG؈ÔÚ°²–wμÙFïrF~¼ Û#ÏF9‹š>u?Cn'ç'î‘ä Rë!Œ¼ Ëþ";g}R7‘ë$šü°5šòlKÝÂÆ•\êr¼ÕÄf1ü}òO¤>Ÿ úwDVQ‘(Wÿý“X¶Ã²4úxø„Ôþ"GZF¯›~Œ‘7i+“ú*dxydDbl4š·„:Qôº^äsÝÓÈù` xS51î7¤ÖÄO**FþwKl$‹ìNƒ¶ýG!ÿ@®ƒÈáØEÁª\¥(–áÿ#<Ÿ$µ.|ŸéÈ3±\&²S±Sœ|®‡à2<¡_Šàá+¸›2 ¡¦5ѤEäûÚ´•“—öDö®GVMü¬Ê·hsc ÆÙ8!¢®#—SAc]M!8Ï—…A˦ø˨Ä@ÀåºÛEö)•njçHÌÿÀ†¡.pÝb¤Òãî8®uœ¨¸‹Ñ½ Ía®~Fs-ùxDž"uCž‹¬#m•¼ë’)ó*l†çÍôËCÈÍÅÒ¹L®òÈW±ü㇣߅ õ2wË¢¹„&ù"–ßás‚ÈÎ9RSð3„r¾m´‡i±yÔ}'å PwÛ†õDã•|"ßj'•º;kûÕ¹Ê 4´R`>_–Öö¾ºeñ¿ÙÎ?´a/øcáFÓZ±tÎ9/ñ¦s¦)³X–åZyå}H=„wízŸI”É­•Õi´¨Œk®þ©¹h“GiÚ´Òaz$}kêe£®;rx‘vË/öjã"òQrc£/“ùARékg"r[8M‹ØÕÅçfr­!u:\ƒÏc6Æ_=`o¡AiçUä­È½à³v½ ï:DNù,}±?"¿2ÄèV¬AþÝôB[RÛØqí*;t<¤F~1üZɯ1\…Ćc×ÍÈŸÒ¿WeÅÃ:|6Ã?cÁý\Æ¬Ž‰iæCÝ5rTb›>èa4 ÄÿØšÔ2ôTrl¦ËOèÇ’ÄóÚ³š/°NÛÖBSû´í ä…bï1£ºÏ๪“: ËÈ Ð×–·MÜñx«Í?Áf?y;G͹ó>u§%<;«áàèƒJÎ$ïý\1=Ré ·-³86 $¶S~îOtò®EÃ’cWÛDȪ缅Í{B¿3íÏšîÅ›Ç8êεèqï-<ï­ âyò4ä¹@sÏãv&öjFöšr¶bå‘'°¬wª9ö£æÞÛÙÆµž£T(¹óg&÷.áÍÎQ¬,º’x3÷„µ gPë»Hµk™½?É·\ví€6˜Uôc´Ûê΂Ã}…¿˜©vGË›Ôï¹CÈ’¾ðnà³¥ÔÈ£vš~Ñ#³dDª½[ãÞÆ[­ä}‰k•`38+r§NE² íª×˜\‘[ÁÁªºñù¼’'Ô+TºìÜÑwe¾ªíÈÓä:hˆ—û‡Üe4¹{Ô rV ä;Få×~¸–þÔÉv­Á³·.a[=wDº rK<³®ùÌ!šû1u›ìJ*w}ÎFìíjN´¸÷º¦¿Ì½iIŸÈqŽCZÌ‚ÍÚ9“Þl ÏÕ§ó“w>6ýчŸ0óoIJ3Ì‚•ˆÞäÈJÃ×…ú{zg1¥mOÿ®qÓwN¢qUÄì¼¼ÑØTF³7jö¶ÙçeÇ¡µj©än¿›Iµ÷¯GäûnôšZÙϬÛÀh‰Èþ.[ÕPr/*ß Î ¾_Ònvöø‹èïJéâÓ­%þ•â—Ø•üê¦ÏÉv>¨8÷ŽpnŸç¢÷–’jŸIMBÃó/—gšO"¼¯ÑðFÅã?^ü+|Fž’oFø%ÆHnäxd¾ó©neXI¾±©,ßN5©™è— w”wøå{¯¾ãiä ÈçE–oÜ›¼ë Ë£¯,ß1~–ò˨הü†íF!¿Ã¦ä·ò¢Iò­œÈìàÓòëµ/…Á[È_!_Bþù"òaä3È¿ÃSr]ùÆ´¡ül¥`gy« ùþ`7ù¾ƒ”*û-m@¾ÑP98_jM-*.‘÷e¾JjIô‰Bùu>S»òð"õEêG0ˆ¾ª\%XX~U5x^~#7°]~¥û§éÂ` ùÕVùnK¤ˆXšÎÂÿxÃ$ô%ƒùh±á”÷Ä䛡¦FOÉÛbÈÓÛÐßD¾?VŸFyÚ —Fn‡Ÿï±ÏF>ˆþ*| Í8R×VÅCU—-1\WäH;Ø"ÒGúÑRÞKÏÞ½IÚ_4‘ŠúH|›4"ÿ ÏFf¢©K^±¿ ÿ"üNröRß¡<ƒä7™³‰ÃHȰQ¤”´[öXž0œ’-q;.€³€—±RŸªmj¯:¢~‘ÿŸ5–«°J4+w-UR5QmUGÕÛ¬ÅUo«€zM½«–ªÕgêkõ:ªNkݨyó Õ¤e³¦)ª[ë–¥˜?U•WUR¥UmUJ5UÔsª¿zIMRÓÍŽ¶ž¥æ«Õ•¥¶«}fp†\¹Teõ°JS«Îªªê«³è ©»U>õ *£ê¨{U3õ¤ê¢úªLõ²zCÍPqf­¨ej­ú\}£ö«ãrbD)Šª»Tu¿ª«îSÍUWÕO=¯†©Éj¦¹Ö#jŒzO-7‘´YíPÔ õ«:ß5}`W<œgÂùp \×ÃÍp;ÜÛµsŸAþ!x ^€7…†`2Le`å®vÔ†°%|ö€™p('Áé]»öÍ Ì‡+á§p<ÏÀë óÁX¾[Ÿ^=ƒ5`ذ[¿þ}ƒM`Kø$ì»ÁÞ0†ÃàH8¶Ç€Î]ƒ“àt8~×À,¸îƒÇàxÙ¤sðaœ ã`BŸ~/ôK‚…a Lƒea:¬kð1lÞ§×>qm`Øöƒƒà08 Ž7™ÄM†Óàl8.‚ËáGp=Ì‚[áŽþrݽð <OÁsð¼ÿæraLè? [¿\I°0LÉ}, Óa5X6€asØ> » 4±—ëY˜ ÿÀQp"|΄óࢽúõȵ~×Ã,¸î€{áAx žØ·kf®sðº0Þ… °0Lƒé°6l Û X¡b|Ø€CáH8N3á|¸Ä0=~\7Ãíp/<OÂsð2¼mX)· ãa>X¦Â20Ö€õ`cÃʹ[Â'aØ ö†™p0G±†UrO‚o™p\?„«à'ðSøåÀº ̽î†àxžàUx[R_È ÀÌ Âb°$,+À*ð¡A&ºBõ`|¶†ía'Øöàø%ÿ£—¬“ÿº¿ÚÜ7kô¯oîBÿ­’oþÌ*ÇÓô¿ûÉã“•uÏ¿c⟤6÷Iòÿ¹ýÏHŽJý0ÿŸ¤kþéØ_ïŸ>;ÊÍ‘jµNìþW˜çO3éO³Ä¿ã]’RSN±àüéNíÿISwèòþ—é™ûÃBæ>õîÿ!¹pLvÍqÚ¿ôï½æîö_ù·´¹Óþ×ýuÔý‚” dª óOŸsï½ósB;ó'¾y§ÿü7ïüœ<çŸ>›¹áîEw¦ß}ûÎëMÈñ9åNû¢õr|n“ãó˜Ÿ÷Ýù¹XjŽÏs|pgýJ¼3½ÔÕ;?—ëãs§Ÿ»ÜYÿòiw¦—Âg×Ü=ä³5®ÐÐþ­OŠgÖ¾dsÿ’ÓnýÝû{$ö÷Üd]©FìoƒØß汿9J]iáµ®ÜòÎÏÕâï´¯ÖïÎÏ5rø«Ù:Çç½TórŽÏ9Zõ¡„Ÿs|®|ççZ9z¹vïŠZ#Ôí“ãó¤;íëNÎñ9gúüŸßËñyáŸ,1=š`Z®«ó–êáÌf¥ìbþ)çMçMåø‰~^î&ò©@¨QÂÖPF— Y ›&àüæüfì.9—ä©»sY¹Î5çšÒ uê*/¡~B}sO'ñâêGt†D•›ÏÍo4q¼S#ïÖå1Ÿ†¨êá‡Ãõà ÂÃ…›…›‡[„Ÿ· ?~&Ü%Ü9Ü5Ü+œ~1ürøÕðøpð#á†áGÃázáFá&áºá¦áÇýÃχ„†…û„_ ?î~)<<<4Ü2Ü6üd¸]¸}¸uø©p‡p«pÇp'sÝTw¹»Üôß]y‚ºÆ]gÊ·ÅÝ¢îI÷¤ º?»?«8÷œ{^åro¸7THÇëx•G‡uX%èBº 뺤JÔé:]%é:ºŽÊêꤒC]BÝUÐàÐU$ôZè5U,4#4CÍ ÍQ)¡÷Bï©¡…¡Å*5´.´A¥…¾ }¥J‡„¨2¡£¡£êþЉРU6t2tR• QåCçB¿©Bs#V)Oî<¹U•<%ò”PUó¤åISòD¿¼i×dUA P³ÕV3×ßv’L_Æ™ÞM µPn(#ÔÒ°Q¨•¡Ì%‰æN"ŬÓTÆg”vMßžåïÖ„sæo~óùWþnM8 \óé áÖ„C†ÛLÌÈLPX¥&œ0}žeRäïÖ„“æïfóùߨû()Š®í[U]S3jXÒ’sfX–¼äŒ$Q‚‚–$È%gÉ9GÉ9IÎIP QrÉ9ý·/ ‚â¯ç ßù¾s¤}w¦{zû>uû>÷©®š=KvÛkGžóŽ<ïyÁ;ò¢wäËë-O×[®÷ºÞ—{*ÒžJ´§òë{ô.ºÂ=t…ßѾܳŸöü@{ÒŽý«ÜÙxÜâî³Ê‚½£SØ¥ìÒ½ôðá5¹¬%ÀeS&2Òƒ©?ß½ê/ƒ,]YKÝXF–z±ZìCèÍš±æÐµ`-`kÅbá 6€ €¯Ø(6³›ì& a÷Ø=ʳÇ0̽Å`8÷qŒà6·a$ÃãÀ(ž€'€Ñ< OcxžÆòL<ŒC†® ãy,oëx;Þ6ð޼#läyØÄ{ñ^°…÷å}a+ƇÁ6>’„í|? ;„ƒwß)"á™(&JÀsQV”e\Œã™0bÉÌõe}–SÆÈ–K6’X¤l"›°Ü²µlÍ¢dÙ†å‘íd;–WðõcùÌwͺìºÙ×bì™b—äìì |ÓÀiÊo;]ü‘æÚ/ü:•N%‚:N#Bt:NÄÑtWgÒ™D=IOùõ=EÐÓô4QPÏÐ3D!=KÏÑúý(¬çê¹¢ˆž¯ç‹¢z‘^$Šé%z‰(®—ée¢„^¡Wˆ’z•^%Jé5z(­×éu¢ŒÞ¨7вz³Þ,Êé­z«(¯·ëí¢‚Þ©wŠwôn½[TÔ{õ^QIïÓûDeý½þ^TÑôQUÿ¨ïêÃú°¨¦ê£â=}LïëSú”¨®¯ék¢†¾¡oˆšú–¾%jé;úŽø@ßÓ÷ŇÁ‚ÁhQC¸.±¸ë«!'ˆ¹¶º>„ÌQCA権B樥Oê“ðýUÙõu}jë›ú&ÔÑ·õmøHßÕwácoì­3#)ã†clIV›ÕÆ·cX 0c…±¸ï©ï)´?³ñ&ú0þ}ÿDŸ}a}níÊšøŽýcÿÄØ(ƘlŠê(„¥æ‘¢”Q’B~(åhž@=hŠU|G¬/ÀSàX «aì‚à'8WàÖ÷À|Ì´hˆ t Û&БlÛÀçdÛ:£ÅŸº t%Û&ÐlÛ@w²í=ѶÁãz‘ ô&Û&ЇlÛ@_²íýѶÅã |A¶M` Ù¶AdÛ¾BÛL66ð5Ù6!dÛ†’mè÷öÀm›@?ܶ |‰Ûvÿ"ÃÉóÖ2#=dFyÈŒöã!3ÖCdœ‡Èx‘‰"“QT•DCÑH4ŸˆÖ¢h':ˆÎ¢Ÿè/ˆ/Ä@1µðqVœçÅqQ\—ÅqUü"®‰_ÅuqCÜ·ÄmqGÜu¢ð¼A¶ß][Ã'ð î,kQ¸¨(*‚ D ¢±h>ñ™ø ü"VÄB@´m±h/Úƒ%:‰N`‹.¢'8b¬ ñÄj±BÜNnȈõÅØÄ®³›ì»Ç²Çìnp7¹Íƒ<å xbž„'ç©xžg f¥EY£žÑÀhh46šÍŒO–Æg2·Ì#óɲ,,‹ÊⲤ,/ë¢ÖAßD¶­Pß·A]ßAv‘ÝdÙWö—_ȯåP9RŽ‘ãäD9YN“3ä,ùœ+çË…r±\*—Ë•rµüV®“ä¹Mî»äùü^Þ•÷åCŸm¦73š™Í¬fv3ÂÌiFšQf^3¿YÐŒ6‹˜%̪vM'Öië´w:êT:N§3èL:‹Î¦ÃQýG¢êÏ‹j¿ ªü"¨îK ª¯ƒj¾!ªøæ¨Þ[¡jo‡j½+ªôިΠ*ÿ Õø0Tá£P}CÕ= Õö4TÙ³P]ÏEU½Õô2TÑ«P=¯CÕ¼ÕòvTÉ»QïCU|ÕðaTÁÇPý^CÕ{ Õî=ìçM6æÉî³û`P=(Ùö|T*Žÿ°úskÃ8™T!ZÜáØT':<. šªÅ OÈBÕŒqxRžâò<Ä£ú1”§åXýQ™€ác ¡()JB"Ò̉ºF]3êõ!‰cÄ@R£‘Ñ’MŒ&ÜøÄøRÍæÒha´€TF+£¤–‘2ÒÈ(ie^™ÒÉü2?¤—eAÈ £e4d”EdÈ$‹ÉbY–% ‹,'ËAVù±ü²Q%›*Ùpªd#¨’Í!?•ŸBNÙR¶„\TÕFRU››ªÚ(Ù^¶‡<²³ì yeWÙòÉî²;ä—}d( ûÉ~PP ,C´"‡@a9BŽ€"r´ EåX9ŠÉ r—“ä$(!§Ê©PRN—Ó¡”œ)gBi9[Ά2rŽœeå<9ÊÉr”—‹ä"¨ —È%ðŽ\&—AE¹B®€Jr•\•幪ȵr-T•ëåzxWºÕ¹šÜ*·Â{r»ÜïËr'T—»ån¨!÷ʽPSî—û¡–¼'ïÁò|ÊGòÔö9>ê˜éÌtð‘™ÁÌ›™ÌLP×Ìbfzf63Ô7ÃÍph`æ0s@Œ™ËÌ ÍÜfnhdæ1ó@c3Ÿ™š˜ÌÐÔ,d‚OÌÂfahf7‹Cs³ŠY>µkØ5 …ÓÚi -6Nhå´sÚÁgN§´& K¢ iˆ¶¤!Ú‘†hO¢iˆŽ¤!>' щ4DgÒ]HCt% Ñ4DwÒ=HCô$ Ñ‹4DoÒ}HCô% Ñ4DÒHC|Ab iˆA¤!¾$ ñiˆÁ¤!¾& 1„4ÄPÒÃHC ' 1‚4ÄHÒ£HCŒ& 1†4ÄXÒãHCŒ' 14ÄDÒ“HCL& 1…4ÄTÒÓHCL' 1ƒ4ÄLÒ³HCÌ& ñ iˆ9¤!æ’†˜Gb>iˆ¤!’†XDb1iˆ%¤!–’†XFb9iˆ¤!V’†XEb5iˆ5¤!¾% ±–4Ä:ÒëICl ±Ui~ð¡NMDÏѲB$f¨ôØÜm8ªØôdÝWÑÞ«h|UêÐÓ›,, f²ì,;f²¼,/f²Ò¬4f²ò¬šƒ{W‹5â[±V¬ëűQl›ßV_ÐÙgˆxöYbž}®˜‹g_ Pàîų»~¸gÏ¡o=ë[ü ÌÎx˜¹Ÿû›• }έDÜ/$ÃwAO轡ô…~ÐkÊ/` ‚/á+ _c…9†Áp#aŒÆzs,Œ¼ó`"L‚ÉX}N…i0fÀL˜³±sȧ°aeº–Â2X+`%¬Â:u | ka¬‡ í›`3l­° ¶Ã؉5ìnØ{á;Øûá{¬hÀAøÁa8G±¾=ÇᜄSp~Æj÷,œƒóp.Â%¸ŒµïUø®Á¯pnÀM¬„oø ÷à><€‡ðÃx Ïà9†1ú± ¯ÊßåÕø{ü}^×à5y-þÿ׿uøGüc^—×ãõyÃòF¼1o›òOx3ÞœÊ[𖼟Äð£ü'~Œç'øI~ŠŸæ?ó3ü,?ÇÏó ü"¿Ä/ó+ü*ÿE˜üÿUXü:¿Áoò[ü6¿Ãïò{ü>ÀòGü1Ÿògü9Àî÷ca)|B ¿ˆ*¢ªxWTŠÚâcQW4­D/Ñ[ô}ÅP1ZŒ Å"±D,+Å*ñØ'ö‹ïÅâ€8(~‡ÄaqD?‰câ¸8!NŠSâ´øùïg0 ?ŒƒÆÆ!ã°qÄ8jüd3Ž'Œ“Æ)ã´ñ³qÆ8kœ3ÎŒ‹Æ%ã²qŸjüb\3~5®7Œ›Æ-ã¶qǸkÜ3Æ#ã±ñÄxj<3žKGÆUEU1U\•P%U)UZ•QeU9U^UP見ª’ª¬ª¨ªê]UM½§ÞWÕU USÕR¨UmUG}¤>VuU=U[ ¶FØš¨¦êÕL5WŸªª¥j¥>S­U¬j£Úªvª½ê :bë¤:«.ª«ê¦º«ª§ê¥z«>ª¯ê§ú«ê 5P R_ª¯Ô`õµ¢†ªaj¸¡FªQj´£Æªqj¼š &ªIj²š¢¦ªijŽš«æ©ùjZ¨©Åj‰Zª–©åj…Z©V©ÕjúV­UëÔzµAmT›ÔfµEmUÛÔvµCíT»ÔnµGíUß©}j¿ú^ý ¨ƒêGuHVGÔQõ“:¦Ž«ê¤:¥N«ŸÕuVSçÕuQ]R—ÕuUý¢®©_ÕuuCÝT·ÔõP=RÕõT=SÏýàgjºš¡fªYj¶úFÝVwÔ]uOÝ7ۛ̎æçf'³³ÙÅìjv3»›=Ìžf/³·ÙÇúÜêdu¶ºX]­nVw«‡ÕÓêeõ±úZý¬þÖë k 5ÈúÒúÊl±ÆZã¬ñÖk¢5ÉšlM±¦ZÓ¬éÖ k¦5Ëšm}cͱæYó­ÖBk‘µØZb-µ–Yë­ ÖFk“µÙÚbmµ¶Y»¬ÝÖ^ë;kŸµßúÞúÁ:`´~´YG¬Ÿ­³Öyë¢uÙºj]·nZ·­;Ö]ëžußz`=´Y­'Ö3ë¹ 6³¹-lÖ¶Ï>kŸ³ÏÛì‹ö%û²}žjÿb_³µ¯Û7ì›ö-û¶}Ǿkß³ïÛì‡ö#û±ýÄ~j?³Ÿ;à0,ï…c8K?åø€c:–c;Ž£ âÄqâ:ñœP'¾“ÀIè$r;aN'©“ÌIî¤pR:©œÔN'­“ÎIïŒuÆ9ã ÎDg’3Ù™âLu¦9ÓÎLgV0=±à‹'Ñ®íJÏ…»ñ‰|"L¦§½SD9T£‡Ä;¨FˆZâøIÔÁqâß“¢¥h §#»Ãi1D sb”çI‡^ ¦»HLw‰˜î21ݱ\¬€«Ä ×\faÌÈgägñéÙqBiJ“•”!2„•¢§Ã¥}?û.°§*BErá>)æ~³¯9–'4§›ëyVs§ù€—¦çÅíèIñš`ê`j¾k…[Àê&5Ö6Q»AþX‡¹aõ®wÒOsé'wŽA$€¤Öv|}ØÚÛ£ÖNܳö¼:ö0þ´ü^Í”2¿˜ý`uß·Žáv·u·{­S¸Ýg]s?©ã»gÔ Ü3ê„îé\Oé¬/çðÕVmâv»¶Þؤ=!´'Î{ўĴ'ŒöpT‰< 7/w¿Ã¡/œ—â¥@ð²¼,¼¯ÒjŸ¹Â\ʼaÞÀóq¹{û¿ÃÐoòóÿEv~;?ÿÆÐäèÿ–vyøoVqÿU>«¨†ª±úÙÉeՒȧˆéª k}IZùÓeμóÆ,ûVÎìôlùG®,ù?¾Î=ÿÛ¸ò"kŽBv3‹bmâV&/ê·*©ŒuÉC¯*yŒ5IM¬G&PE2ë‘G½ïcÄ~äFçKfåÍßdU;ÄŽcǵãÙ¡v|;ÐNd'¶Ãì$vR;™ÜNa§´SÙ©í4vZ;ÞÎ`g´3Ù™ßÊŽßÎÆ: Mmý-NžûGVÖA¢ãü›·[;¬ÄÐ{ÞÊч‘¥ZǬÖ©—l­è„ÄØ×þ”³Ÿþ‘µu"X‡Ùµþ%ö~ƒ»í§ÿmöÆl_žq¹;Œe„PV™Uƒ44,#«Ãb kÄA.Ö„5Hö k¹Y Öò²Nl8”`cØx¨Ã–!ï×ãŸñXèÂÛòÎÐwå}¡?ïχÁ>‚† 4.=EØ".L¡"¾ Df˜#²ŠpØ rˆ°…xÿñþQR‹?SŒ}ð«Œ#ã°¤î¨KæŽj±äî¨KáŽj±”¾þ¾A,•ï+ßP–Þ7Ü7Šeññgᾉ¾¥,—o¹o+ëÛáÛÏjùù±ú¾£¾c¬ï„ïk„UÁSÖÔ÷\E²¾*J`kU!U˜mögògfÛüYýál‡?‡?ÛãòG±½þ|þ|ì;w¶Ûç/â/Âöû‹ù‹±ïý¥ü¥Øþ²þ²ì€¿‚¿;è¯æ¯Æ~ôW÷Wg‡üµüµØaÿGþú숿‰¿ ;0;iÖ3ë³SfŒÙ˜ýl65cÙy³­Ù–Ý@nËn"·®g[pLîÖܶj[yCw”÷²'Úgxog3†ï|1ÃUì|š%P›5ôÞYþÆ;°ge·Ùö” àšÇã‰x2ž’§f¥‚Ù‚Á¼Á¬Á<Áð`ö`î`Î`Ž`T0W0Ò¹ëÜ f fpn:ל[Îmwš7 íŽ?3yæ4æ,h´Ù qfI#Ì>[V4ªì§ñä'›4’lѲMcÈŽ]Ê® ÚÙéì‚$Î^g/$sN:'!¹sÚ9 )œ3ÎHéœsÎA*çªsk²·>MÇænçc3¬ûj­÷j-¾:íï>퀺2L&‘Ie2™\¦)e*™Z¦‘ie:™^fe&™Yf‘Ye6™]†Ë™C改ØvýȱÃì;Ê~bÇØqv‚d§Øiö3;Ãβsì<»À.²Kì2»Â®²_ a➸/ˆ‡â‘x,žˆ§â™xþï¼g +§QƒVkÅ¡q°DØ$Åf rÐӬ؄có#ªù±ê-ˆÍ„hl”€’`Cylªc BM¨…Õ®;’`‹±…Bkˆ…øÐ:BBèŠ-±û§Z ŒY$Á,ÉXr–’Ó\Õ˜q*CJÌ8µ Í®JM¹& kÆšAZš½šŽµam!=ëÌ:cVêÏúC&ö™Ù`6²bÙ0-ƒìlÛálÛxϲ=‹ÆÞ"I'DQN)G#puhîãWã‚[¼qÁ\ˆT2žƒçÀú7ŠGaý[‚—Àú·/‡±]•WÅØ®Î«clÇðŒíOø'Xÿö3€ßhËœa΄s¶9⚇ÌÃÀÂF6~Â&€u|mÌ[.Bõ¼M89fM³&h³‹Ù‚¨*‡`ÿ3ÇBRÔ–Ë!­¹Ò\Q¨0¯C´yÓ|1X õ…æXõ †ŽXåÌ…XÃ,ƒáX³…ñXƒƒ•«( Vc=ò3¬¡Xø–ba-ÅÂ:Š…õ (6br6a­r6c½ò¶`uâƒ}X±%‚ÃX¥¥‚SX™e†‹XcYpk¥8p +–0¸K3Ò#Ðpõ13Û[ ªXŸÛ%á˜æ:›¡ïëGl“;Ó–m£µâ·‚†„q”‹;TÃö[EýÖC˜!Š`ûíȪøîo=ä>Ç.ûá5 ûa"ûaLc¶¦Q…W–Êã î\n˜ƒ×t»×„ÚðÅ5qÌ^aÿJþÅOƧl”­e+AÙÊ l%)[ù([)ÊV~ÊVÊV&e+‹²•MÙJS¶ R¶ ¡l—²U<ÊV¡”­âS¶JHÙÊý.° .wóŠPuô@ÔÊãPÏEÕû-æ¨=¨_£Fýuèf0›…²¤,-ËÊ"YAV‚U`Õðîh€WókϺ°^lþÖl›Âf±ùl)[¿sþ®•“ˆÀvƒÝcO´ýX„ò0·àYyNTÿÑ̽§2"ÙÈÖBŽtmm–l–ŸìG¬ÙYA²uY!²õX4Ùú¬0Ù¬ÙV”lCV‚lVŠl3ä]×¶`•ÈŽ‘ ]k,—‰È®‰]«û-×Êx~Ûµ¾i~‡ìZ¿&»Î$ûÔBö™?Ùçþ¸®Åê-ÙÂAF¿§)Ë„¹"ˆÕÇWYq[ k·j ÇmÛX/ŸpôY½ÃüоaVAÏ0rѯ<¸mÈŠ¹35YqÜ~ÂJâ¶V½*ƒÛ–¬,n[±r¸ýŒUÀíönÇ±Š¸+C£¿ñq»Bº£=ýÈÝè)F5úiàv­«ôÑçÎ=ö+Ü>óûqûÜ޾a݇žaŠcM!}Oh†œÜé/âÉ›ƒÃâ²DñiYfÁ¢0ªŠaN­ˆqU ½oˆ¾|ƒ˜Aœæ­Íæ’­Ãæ‘ýˆÍ'û1[@¶[H¶>[D¶.[L¶[B6†-%ÛП̵èir×¢¯)È®õ§$»ÎŸŠìSj²ÏüiÈ>÷§u-úŽla6zq"õß$ê¿ÉÔS¨ÿ¦RÏM£ž›N}9ƒúo&õß,ê¿Ùn¯øC ÷ø„{Â=!ឈpOL¸‡îI÷¤.îTmc䢭êέÄì‰y°ÌËñ6–€¢+!EE"÷÷¸ãx,ñ«Ÿ»±C?xõÞHúÉ}â~$‹ÏÜ¿òéfN9EÐ:9Œ ­´ß|h>2›O̧æ3ó¹… ÏúÚb µ†YíÖHk”5ÚZn­°VZ«¬ÕÖë[k­µÎúÉ:n´N[g¬sÖë’uÅúÅúÕºaݲ•í·¶i[¶m;¶¶ƒv;«ÍÎn‡Ûv;§ËŽ´sÛQv;¯ÏÎo° Ú…ìh»°]Ä.j³‹Û%ì’ÚÖŽÖ:®Ž§CõýP?ÒItRí>¯MOºHËJ¬,Ê#Ÿ4åÍÑcQ³Ú¼3jV‡Ö*iZ«$%B£ÎqÄ"±âúøB<ß ß ˆï»ï»uËS ‰§Rš'Íó‰Ø*‡Õy=¿5½¸u½1ú;Äè‰Ñ+£W&F¯BŒ^•ý]bôjÄèOŒ^½†õ ¹¼¦‚ü]ø»3ñw7ù»'ú¹jÿý×zð¿ÒOÔCxÍ̇xýÖ¹ŸÐLBh¦%ÿ³‘ÿQäò¿Õ/Õ©¨õBùJSº£C9pÕq1Hþú½ðûˆþóØ|Gx†85@Q#¨·}Ô·šú6H}B}‡ú6.õm<êÛPêÛøÔ· ¨oRß&¢¾ML}†}˜’xWoIýÚÕk¬K½»×M@1 ³Œb–SÌ ï³¶ ¾öÙDX›¼Ê/ïz÷,/îŠjIQ­(ª‘I*ýÅjØÁ˜`ã`“`óà§Á¯VÆv vv vöö ö öö ö ö~ñ—ëe»½Z1;08(Ø0Øï/WÎfý—WÎÆMãOqhýl\‘D$ƒx´Š6È 2@˜È,2C.Â!)­«M&¢DH.ò‰B’ÖØ¦%D HO+m3ÐJÛŒ´Ò6+­´ §•¶´Ò6­´ÍI+msÙ ì‡ÖÛæ¥õ¶ì]ön(h´A4­º-J«n‹ÑªÛâ´ê¶­º-I«nËÒªÛ ´êöZu[ñÅêe>¯¥§ÝñXŽ×Sßn`ÇØíø ¾ÒnW3¯BtÎØ—Ë~†Ø\y5ùÜ}‚àž1½0ù}´‰ÄxÍÛíUÂ]<Óže϶W‹Ô"½¯ðŒHkŸFTЏj£¤>öU#H‡ÑÐ Òc,|™±çºBFBwȃý?ò¾Ga7±Ö|ŒÛ<OÀ“ð4<“(ûjö'Íüü_>ÿòŸõ…ÿ¬¾ùO¬¾áXJÖPÆÓ±’,ü·VšnUï;þÚZ0¿;sÍ›ãöÿ±öjVžƒâu^½x§<òÚËQÎîÁÔÛ¹QàÅñ½J¼ Ÿ×äòÈ€-‘K;»ÏˆßÖÜç¯7<Ë›-ï›ûùõæ>s~k+þ»VÊ}"ýF«ôÇæ>~½¡/Ò°Öx£¡Ïo¶šokX›¼Ñ¥7[j¿½nð»Ö[Ó?m-ßÖ¬go6¬‰Þl‰×R¿Ù<_\1៱±¿+I°Âü}+ô‡ýûö'cZðbn*xߎöÚPzšFôkè dîS¦Ï}‡)>©GXu|ë]ÎX+"à“Y´àa"êúÌ,>f°y83&½Q%"ëkï$’¼[RÆ/• ´†Ð b ÿ»ÃúÑ©^;™š~eÒƒ£Zæí×mæÂ`ïõ#Öµ¾4°ý¤ñ£"z³#zˆ¯' Î8ç~C}¿šº`•ÿº3‡roÿøl¶!ÛȾÌX³ ÷Œµ¢0„dD…d7ÄhŒe´`D”I›%¤±Td?)•¤EöJQÊ!!%Iž{t*§ç9çùãüÎë÷×Ìu]ßû{ç{}®÷}Ý_ð[^"°êÛj¡àºèËË„oEp¢`[I8 Ä6¸QHgPr°ŒøÙN.—ƒw%Ø' H³=HÔj[²•Jñ¥¡ j…êA#ƒW(vŽ’\÷öA“È~Áà¬h{‚ +¶ ‡ôñzx@ÐÁíMmðÍbãþ–µ­xÙq^Âv³½Ã×áðÿ0`@åWî”g@   c@¡J­ƒaxè\fçÑ „iLº’æIÛI/=wÔLUdFÌÝ5Z£Þé'¯çau‹ÜqÝÙ}^&Z_™!e1ñylŸy{ô ÿƒMg+y .Ón;ËÞ˜²,¢ïèçÏ’Î,ºÖèPÍGN9ضgëÞ%tq„> ¹¤öG4³†ë©ÂœF3[w—Ö/ˆª4¾«ô|Ú&% ;;Ôj£³{Qh¦î.…àz×et¤Ço¿óÝñ &Ô˜)y(m@ Â&éªAöÂQØñyá½ó5úæjŸÒ˜õ»öh&–¿¿…¹4tiUÐ…ºøxæòu;ÍzX.*~¸uà#¬Œ|TÜ ‚@rrƒêæàà‚ö“|Ö‰(»lpqKs˜‹HŒÞiNÚV¤éR³œ@(t €Ã¸b9¶­€DcDš…F›V‰nƒÞ××Ô½b“‰”œØä›[`ËŠEL0÷§ÑBÖiiyQwk}Í¢¦%H+$Ìöj…P)Þa^´P-0É A‚ t °Ú8,Àšà `Ç×5C¡;À°þj°„ ¿ß"""âg·ð¡þ×¹i(;8[9}ÆV‰ÇàôóÍ ÈêÇüã/m«•åKqúxº«)]Åf4þ(¬1t=mãpˆoz*à£Zr·©ø½È¯Ž<+>ˆ¨›L W­ïо»tĪäRÅbÒØû›ã$½X/Ķ—N·OÄ%–?á ¢9x?K;¥æJ”{ÍqZò·QŸ ‰R«S%lI[ÜšúÁ‹yV„¯<'Ú±Ôà[‚,½TÐçõqj¬¡²büPσ’_CFzM`\×?1“Ÿu(T'¨áËUÛÃ0m¾(u ³ð\É\ßœEfaí¨éu»ñPD¢iQôy¡^À›s’ÌuFÚˆ÷JhVWAXå}ÒvÔtªrdTÄßÂ̲ÐÀÂÿw$ù`I4 „Âkñx¼®®Á2¡o&[ùA(@é‹)L ‡øûPÑf$s´9Én….T™¾¾>ÖÀD_§(|ùEÒ?ýE$j8ÙËçO‰–6q”hëxË55¦ËŽ×¨.аip—ŸÔ–¯û…– qo½ƒp"/! »qÒ2Ø÷Þñ—ð¦à úù…¬VϜր‚#ù„%ObnÕU³ýÆõñŽFYç4 YrxÝÙÏ™Ng™^{¤vh“0š?…J¦Ñ—)Ú8<·VR ÿ»‰g›ÿd‹÷g¨© nw•¼ëd2w¡Ñ¦§ÃI»7H=¡´4O~N|Þ¿Ž'yY‹…ŸXê»ej§ð˜ éÑuF&5]B[ÍNùÛnb^§oÚ“Eäz¶¨Ô&,±ýB¨YtWlÏÛë3z÷]Í+-1z¾Æ?]ò\!5ÔiZìÔТî)*ëI¸»l„y\¼hG¨ ÇU?faYë™ïç4Õp-Ç^`û‡‡LÏÅæûî8û+*¨!c ª*¸Fþž¾ ot¬5×€3ÞÕΉ±FyS×f¯‘‡XÏis£‘bnÈ{‹Üœ.ÉʤѨ Ö3íú†9U®…b9Ìf¡'Ãúbwø£¯¨Ù îÈ@€]z(v#ÄÀÁìùiÄ»Ü8±»&h ÌÉóûëÄj(‚cybðqðÍcϲøg÷Hùpꋌ]ë‹p”_ ¯uc‰oƒD`>Y$„ _A“àÆ_ÌØe줒>¬„ú¤öIJÝ>TØ›@ÌY–IÂÆ¿·oa*(m6•–Áæ¸l–€`¶lÿ ØØCø2ë¿w_0(dûÚ ÑÊ¥ããr|uÀ8¿Vp‘Õܸ{Øk›õØ.ø®Ýü ‹ËWhÙgŸƒq+6Ò²¹šWä”=R[Sõ^mEÛ0fÝô‚OŒÜ\˜Æ~䵿íÔŠ´~x-d¤hU¼ÐéyÍáMÎ3©¦ÙÓoßL&ÈéÖ8eN‘âÕ Ò'NqÉÌ Ø}HÎmE·k”z˜BMUÛ”%ùAzŠôįE~ÉU¦5/ùºJÝËÉ,oKëü«ümN½Y0s3-÷Ùg—:øàO©¨¡qòÈù<ê‚ü>GO÷¼Ëû(¬Ìãcpj:JκöÁ §ÑŽÈ4q×ûº¢î½'e¬Žbo”è˜IO ®–„¸õêº`Ú2îñLÆó'oâGÙíSµÌ¦>x»»©~"$ßù„óþSL–”%|Ç\{¾’V¨÷«%Öø’ª/›»»¼¿Çò„Ú¾@M‰×ïœÞ¢`_ÒÖ+n§(0ùàÜ›€çz옺Úê””é‰K®€ò3HàèÞëI\süˆŒ©¤¹fmÅCgffý¤5>íI”±ËÏ­W 51?š·ótì,í(3EäÍÿ²û¤_ךß,He Ãk,4UŠ6ouà‚k,;z»8óñÀ“ôÊQLúQo¹/“‚ªÌµ„X}…TT}‹Ò‡qÆZçÍ<'Dáaœ=øzkägh¦Œ=w÷oiLV¸ï{ýŒÌ!ao˜¶t{JÍf¸º¬É«*Ò‘£ÓDÓ¾øTYaäÅJVZ˜äÓ‡PaòZø"î`–K²RëÍÁ&Ì“qÙÍ÷3'­žÏA}(I¼ûÉ/ƒÇÎ¥·áT—øï¸¸vÛJåvÔÊÙ¨¹U4ð>*Ç@ä D Àrûçú域Ø~?øeÅÞf·k¿ë—Žã[yª .à»Å‹ãVFW³›Á¯"p ”B„:hľ˜ÙÅOxÝã)‰9 x¯¸„ç8²ÔbÖ@l!dˆ„ ¡,L³ÿÏâ¡CB@Ëô{€ßü!ô\åÅÿX¬4zÅêâOGÿá¡‚`€¸“uv#„óoÛ”z ƒaNAå$Ž'ÁŠt‡?zuHQ®ÂŽ /Y°á®f0Õ°¼×»wÕÍV̓Á¾N›e%è©4B6îå“ hŸ|À!g`‡÷¯›«¶['Mv™˜%^RlTšÑÉ·V³‡2…¤?1ùä“Ûn ¸./2üJåõõ§>±¼ZÜ[ CïªcãÒ&o§jßg ]?–îj6;7 ›ÊížÚêŠ\³«ÖâþÞúÆöc Ü7ëM(ÇŽu‡w&/3lA,]ÑóÈÖŽH@W_SºP é27yΛ_³ TŠ*l}åp€ÚÒb­œ¨H_ì–¶ ÚöêUa×™Êʹ ˜À€I}Ï'Žã]Ü˪ŒÿǺ€æVHÑ _©DÞï‚÷üáÀ ,¢h8ݵxýÿ&DÍI^caIEÐE©u‰«œÿ€i¶DhjâÔâê_Kˆ|­žû™m7´:ýs3ñþeUÑ— qÉuQèXH%A¨hMùElp’¡È0lß:díNBs: íb8Ât㙈ÓokgyËøRÌ̯yØôKS¿ÐuµçŸf¹Å›¤$q•{Fd_3à­JnIñfU"-Síjz$vìÜܧ¡’°×íñ®E·MézÇG²ä÷(\ ±%7àN”ª m¸|±ÌÀvÞ×`RÔ#½u”^D/øíؘ z…$KÓãiŸ‹P£iñ‚Í›ó)ãÎE­Wr¿X0åóÆN§®ÆDthf)~_‹×gãÂttzƒ8G¥_`ª0ù—ÿÿPK!V<æ¶«ô‚4Resources/5DC37A8A-612D-6B9D-757A-E33E636C794A.odttfìœ `E¶«ºçž“;!„LŽ$„d929 rå„ H W–pÈ%q ¢ ‚¬"Âd˜ (à‰—ìzÑU\eÈÌ÷V× º»ßžî÷ÿTòôûVuuu]]ÝZï¾wü¨^—fM];)>íöµ-¶èϯìuÆÿ‡µãºéõ`øï\[·òþG„ÈÓzç,pïÞEÈñBB*ßé]P”~²bûç„öjCH‡! ’úؽBÝD)5¡¬jRÍÈV„Dï DýÔ¨iSÌg²^ïGH¿½ˆû®3®òy‡X”§SV]E"ˆç{ǛƌŸ1ú…½-÷’÷!Å*+ÊÊ¿8>žÆa—J$ès´ï"^Žx›Ê Sî ÈŸ÷=!’ŽËæñ“F•Ù>ô!›¯T:¡ìÞª^a¡È¿ùÍË&TÛ]þ !ûKñX5©zŠëG²çßÊöWM®¨ziõÓé<žÐ„"U÷µýTçFøöøèq„=gÃ;0}ë÷{ü®/n~L=N‚¨ŽH„§¾Ô|‰W¾¾Ø•§§”tKÐÆ°ÃvRFT¤+Ž“ˆ‰$ B¼ü•óR"«FÓ‡‰šèÔO¨­(2’«ü>-^2jô’¤’%U‘Ü6rÝbõ¬ìþf3±rMâuЖHR)¡ë>=‰£¿V‡³–²Ò‰()0€§@ ˜ÞG<û'­¿| ÁtÂŽóìÛìÉ;ˆ•áI‹þâ\wÂ_ÀØÌë=ãÏÆ~ªgN ÷¤oóÀ.âIgse½§Œ7<ûS=ûÒA4ÈÝÁ3¿RÛÈ?3÷n™÷óþUuú¿Ðæ\‹þyýùrü¶ø·ÅGþ­:ü§êò ¸Š6>æóë€êbÙdŽ1gš«ÌÓÌ3ÍškÍK¯In·Rob&íÈ]$ä¾$Ÿ FÉed²§dç’Ò‹(¹7Jˆ’ý¬ä)(y6J~èEÉÔýo¢ûUñC/¢ „Ý£H=B¹W»Sg?_–üü§i@S×3eg¼Ù!g¼Îx©=ß[¢_¦ÜÖ“ãÿ¡þ¿ûæHÐR)Î¥5t±´…Óá´„N•*¤Ji¬t4N/M Céô¯ƒbø°’¡CŠíE…ùy¹ôï×÷î>9½³³23ÒÓl©½zöè~WJ·®]’:ÆÇµ‹‰nciègòõ6ô:­F­’%Jâ²,Ù¥fGL©CcÉɉgqKÊnI(u˜‘”ýÓ<s©’ÍüÓœ6ä}[NÏi»‘“šÌ=Hø8s–Åì8’i17Ð!yvø%™–b³ã‚âû+^£D¼‰ŠÂæ¬ÐÊL³ƒ–š³ÙÓ*k³J3Q^Ñaɨ0ÄÇ‘:ƒÖçhg©ª£ízQÅHí²îª“ˆÎ›Ö!Gg••;róìY™áQQÅJÉPÊrh2Z¥,óXVg²Ø\·¿ö¡YëUn)/+±;ä2T+gÕÖ.pøÅ:Ú[2íg~Š&W8â,™YŽX ë›ãÔ¡Ž6Y̵?TÞrá럦”yR4Ѧ³¬‰7º û…'¨jˆöEE±º,n°‘‘ˆ8jòì":%x£e¯JIPâ£(QÒt"’Q O3‰4 i*žfSÒXÀ…V¢±Öf™ËÙØÌ.®¬--fW Æ8â—:¨¥qH–^uTÒx9 –Št‡Ñ’ÎÒSYz*O×°t-f ¦è¶ Õ–Z°Ha6ÙI8åóPfEšÜîB{Ô‘ð ÅQ˜g%`ˆÝ¡ÅÂ¯Ž¾ùz3J‘ÜÛQ3ªŒÕƒÙÙ±Úè>£Š1gEÈÒÇ¡G zO È‘­Ãæ"…±Á*Ç× â¨)vDz“ÚÇ+sÙä 9–»0ì¼Lu ;QBq­¿%I¹0q¢0Ñ£n¤ÀÎSÂÅÉŠy'i½PóQìUjFo«È¨Ìs¾ÂyJÖCUL…‚!ܳ“°fÉÑFoƒCßâ—ycGv=ª£µÅżòJl'ÎmrQ£˜[ºÒsz»ú°ºàwªÊ²`Åä5|˽XVX¥•’´ØíðŽîS†•ŸoDŠ¥›8XÇ£§Œƒæ¬0g„iæ´0Ÿ ó‰0 ó‘0æ÷œæCaN sB˜ãÂæ¨0ó¾0ï ó®0ïsD˜·…yK˜7…yC˜×…yM˜ÃÂæ 0¯ óŠ0„Ù/Ì>a^æ%aö ³G˜ÝÂ4 Ó Ì‹Âìf§0;„©Æ)L0a¶ ó‚0[…Ù"Ìfažf“0Ï ³Q˜g…yF˜ Â<-ÌzaÖ ³V˜5Â<)̬f•0 ³R˜Ç„yT˜Â<"Ìraf™0K…Y"L­0‹„Y(Ìaf¾03O˜û…™+Ì}ÂÌf¶0³„™!̽ÂLfš0S„©f²0“„™(ÌaÆ 3N˜{„+L¥0c„-L…0åÂŒf¤0e” 3B˜á ¦D˜¡Â cf°0ƒ„)¦P˜|aò„Éf 0„é/ÌÝÂô&[˜taÒ„± “*LOaº “"L7aº ÓE˜da: c&I˜Da: “ LÇzfÒºJ’ri>)"[*ÍCìÄÞÖ’l'í@FŽß"í¢²MÀv;°½ñ*¶•jpô\‹m ˆ [¨²4ÇYžVÔ ÝçLsG6J³¤ÙÎòHß´8i6I“€Œòf“O;v6J!ÍD|&â#¤p3ྕîÅž‡•í$ekb[iÎ?ç7ak–¦Û¦J“iZä$9-r¢”96¾²hLü袊øò¢Qñ#‹Ê’J‹JSK¥IË"‡ì"U 9=D_T”ZD ã ŠR èþºNùÍÏ+ÊXT5& ¤ërhUÝŸC'åP[ÍŽÏ*ÊŒÏ(JO+²5HzßìFi¼4Ι‰ø8%îÞ/®×{e¿·GªF•mÒoê»fc÷oœ-£²$ÙÙªu$ž¸PgD;Q„º¹¸¸4s¹Îåš³e,ä*—¹\áòg.—¹üÀå{gxäO\¾ãr‰ËE.ßrù†Ë._sùŠË¹|Éå .ç¹|Îå—ϸœårÆÙ¢¤‰Ëi.Ÿrù„ËÇ\>âò.¿çrŠË‡\Nr9Áå8—c\Ž:úC>àò>—÷¸¼Ëå.G¸¼Íå-.oryƒËë\^ãr˜Ë!.¹¼Êå.¸ìç²ËË\^â²—Ë.»¹4rip†¦A^䲋ËN.;¸Ôsqr©ãâà²Ë6./pÙÊe —Í\žç²‰Ës\6ry–Ë3\~Çe—§¹¬ç²ŽËS\ÖrYÃåI.OpYÍe—ǹ¬äò—G¹¬àò—å\沌ËR.K¸<Äe1—ZgHoÈ". ¹,àò —ù\à2Ëo¹ÜÏ¥†Ë\.÷q™Ãe6—Y\fr™Áå^.Ó¹Lã2•Ë.Õ\&sù —*.“¸Lä2Ëx.ã¸ÜÃe,—J.c¸ŒæRÁ¥œË(.#¹”q)å2‚Ëp.ø”pÊe—b.vgpd0—A\Џr)à’Ï%K.—\péÏ¥—¾\îæÒ‡K—Þ\²¹dqÉä’Á%K—T.½¸ôäÒƒKw.wqIáÒÍ4Ò•K.É\:s±:ƒr!I\yb'. \:r‰wbI§q\bÑ\Ú;ýٚ܎K[.1\¢¹´ábáÒšK³Ó/É¥—§)Ò’K8—\¸„r áÌ%ˆK —.þ\ü¸˜¸ørñáâÍÅËéÛbäbà¢ç¢ã¢å¢á¢æ¢â"s‘¸P.Äæ†2\ \×ÀUð#¸þ .ƒÀ÷àOà;p \ß‚oÀð5ø ü| ¾çÁçàø œg@8 >Ÿ€ÁGàà÷àøœ'ÀqŸüÈcà(ø¼Þï‚wÀð6x ¼ Þ¯ƒ×Àap¯‚WÀ`[µÛ}àeðØ ö€Ý 4€Á.°ìõÀ ê¼GF:Àv° ¼¶‚-Þ¹‘›¡ÏƒMà9°< ž¿ÀÓ`=XžkÁð$hÚª½£"Ÿðš¹¬ƒ•à1ð(XËÁÃ`Xj¬\¦´ªEM ©*¬&LJM *G†$„¤†ÈëB¶‡H¶ðÈìªÀšÀ÷Oªjèzmpï¯7ÅuʆÚZ›"[gWùÒ}¾t™Ï:Ÿí>òvŸ}>Ò>Ÿw}>õ‘m>½Ò³1‰êƒ©šâæQWXÛ·AëÎïëÐåuÐ…Žè¶µå qh:HÑ¡ö:J—×Q)£ÐáÇþ,«Äç/YBÒ#ú:" ìŽõÅ}506fÜ0$¢.˜¤ÇVO™Z=56¶ººšÆVOR]=…Äþ÷úkWàßÐõÕ‹™‚Ñ€™2ejìÈ]0Õž0…Ŧ(Q–¹:¶Ž°¿Õ§¹%/ €rê.Ð ®«àGpü\?€ïÁŸÀw฾߀ àkðø#ø|΃ÏÁ9ð8 ΀&p| >ƒÀÀïÁ)ð!8 N€ãà8 >ïƒ÷À»àp¼ Þo‚7Àëà5pÁ«àpìûÀËà%°ì»A#h/‚]`'ØêÔØ^[Á°<6çÀFð,xlOƒõ`X Ö€'Á`5X+ÁcàQ°<–ƒ‡Á2°,µ`X¼Óùà€×_z?˜ îsÀì4¶f€{Át€WM:TƒÉ`˜&€ñ`¸Œ•`  *@9F‚2P F€á`(CA1°ƒÁ`(… ä\0 ýÁÝ Èé Ø@*è ºƒÐ t]@2è ¬ $‚N t$å¿Î•û¯ Å¿vþ¹À¾!ÚñrWWÉmßwäöÿ=©%+ÉFrœê¨ã_Mæ“õd9@Þ$©†FÐ~ÿз#·u8ñ'Äýk®ûš»½ú;×9W‰&Ä­QŸtÊ_ó}êùÄË5Ú}Ù5×uÊÝ^õª«ÄM4£ÝíÝ%щT³ˆ?Ò®¨G«ç«7©ßG»Ú+-|ê¨VôÁR~¸Œ'UÐ2Œà"cû úc ™Ff™Ê×DÉtè}ä·dy,D¼)|ï\r?RE·|·u?rÎW¾çZìIY]¦äeeð¯½~ú­×r²#"¾žá_~­øùW5d­’ó§ékþjþ§È:ŒíÓdy#¾‰lÆ8ó´›)[ÈV²Ô!}ƒ’²ÇOq‘kä:ù–\Â<1PÚ³¥'íU£‚T*½T‚^›H¦’Iè¯j¥sI ZÈÚ6G郹JŸ±þáµ¼ÿ¶ïÝnöÀ#JýW¡¬^+ÐV^÷ß)i¼}?oÛûìý¿Ôþ 7ò<Ö:ˆ“Ô“dy-߆¶;Û ÿZÿ¼§G^Àz…çÝ©äÞt˾í?ÛÛ |Ó¶—¼„+©4±­H{™ôÄyìy)‡Èaòy›AŸ„{¼EÞ'£Jü9C¾!Wɧä<ÆácŒÉ9ò9ù‚|E¾Fú·ä"¹D.cŒ®c¬®ãÊeã‘ Ã5ÑJù×\Éÿ‘°òçIÒHú¶t¥Ù¥½±Šáú_!÷”Ð*÷E̾²ÔUŠd/M'Q}Uý-1ª“‰A.½ã¾Lj>#zM *È}™ VþOW*bÇÆëŠL´$’$’’Fb¡«ñ¾Þìïá&“®…öeÜÎ$€ ŽPjµ™T’÷*“©]ØêšÇå4_3^“w´S­¤$µù“æw°¹àŸ’p&|Üt¢Été°_JBÓ¡cM‰¨_”ŸB dÑZÚZ“’;w”,–dkR+‰&±ôÖ¥äν$•Ïõ»e{³JgN“£*×L~¸C¿q6Kû±«+] щÞ!fÿÈŸHuøÕsêðkiª‘מ’¾ˆ/JkûÔõyñ9Öðrkޘ毬ў|þþæPö-¬­.A«µpå6ƒ¬Ò«Ô:‰ê)1k5zƒ/ä¶–’,ëÛé5ˤu‚J«IS«U”ý/¯Thª5ÁOùMµ¢±ÃüSºYL’hX‚ÕÚ"ôHÒœR&vвÈQ²…ZdYUòÊÐæÓ%Ôù}ÉÇÓ×Yuøõ§¥=ÍYì+m¬àòÔÌ´"íIF]XÌ<¿iˆ?}f§·Æ`ÐúŒÍ/RÓÁ;¬):ZzV›sVƒú\HUz=…šNkB—û§ ï¡ÓY§FùE™ý5ÚV²¬ô¸Ÿ5©— lùJŸû¦º6ÓitgÅää9¾í1z@ƒ³ç¨Þmc;äVçìÚ»z%]0|yygu¸ë•{VE:õ«¤Ííz[[¹Æ´è’×ü}Rn×V®^“ %%î‹òYu,iIº×û´lÌþØ«ŽÀ„ Ù1Їúø±?sÒÉ€,aÔ§NÊÄÌ9q »€ê7™N Ë¢53ñÃL°&‡ÅÄXZûHAþ¨mWùìÚ­®¯\'óW}øàÐ59½W )y¬²Û;¯>Ñ;1ö¥™k]u¥‘æímÛgÍ{i†Ëåjka£>¾õ"Á¤]#!ôГ7õd=jÐ…œÕ§ž×ñ®dÕ86¬Ié>•Ò}DôœYaýèÁ9®/hM¢ñ{:ß³~üêùôeiÍð­Î”€.:äÚ¾xÿ´äëAè70¦œ×Hë4v¶@¬L*B½4gõzª>+¥ÎÑ›Cˆs|Ð?E½(œ:ȃìh“Î7¿%E67IÉêð•®q+]½Ø·ÛGp†m8ƒžtØ!ëµ’¦n²yk ÒµZKÏéÒ´(ýFá—™¦ e¼X ÞÖ|\òiþn—Ô¤šç²?Ö¼eQÜÅø\4kNÅþz­ÖSV}Q{ÓtçeYk"ƒ°ÂSYá©Ôt8áÒa^sŒÂ­ØZå+Îæ?8R´S²7oR‡7Ÿ”Ú³zoÅv+gh·“ê**¾Ñf4jŒçôj‚ŽA§$á—&\:~ÐôñAVëdO‡$GÑS®£²ë(¿þWÍ_¹òzÀªU(w F:åHv½A+ɨô.•QõËÐà¾è4èµ îÓè I¥VëôiXÖ”+ÚÏšjµâÂIéæ—Ò&X¬¬³%±ÆP¥-¸‡¨BN»BœNúéÑæëÒýÍsÑš§¥Í+X{¾D{Ná¼jö•‹Š>gÓª‘ÒTžÑEßiRƽ"Ÿj6픺cÝšƒ#Qãdåù®Êáí¥Ó ¾þ~²ŒãÕ¾¾jU¨6T²ém¾ îma¾zI«’uZ/Æèïçí•f0)%FÖ Ïªdeë’HJ7¬~þ4¥'–¦ÐƒI)l‰ 5yŒ²6ÉZÙ"·•eK€5 ¤k€U•¼­…±çY =U!›lG)]OÉ 4eWóúý›®ÆëŸbŠn܈×nÔ}:Z}u÷&);¨Nm0²% ÷&Ì_wšl :mš&ƒ²‰’”šjMI™“0;!4•&4%4%ù¥¤(,û±.¦~˜/¿pÍ›¸ñ7o#ΫižàŽUòºë¸´/Џ–S𜠎'¤-i³—*glÅ.dC»°/}Ó-_¨3o\È Êu,i4üæâߥ »áhÙõ¬,*­$¶ª –¼4ö¾=³zä/٠ݳÑ2`ÖàÂbÚôŸ9¨pæÀi¥ÃMžËºõÏOn£0%[.?W½¯¶_Þâ=c§ì[ݺ‰5܇„ŽlyµÞW¨eWŽ·.4ðœF£ hÒ§én»&5yk »&• ƈå¹Ç}npÒª2ç‚ÜÆgݵñ©-òâܵ³û»bÕá±¥«¦Þ÷`óçµ8÷fÌ£pœ;Œ´!}mz)Œ’°`=Áš{°¾…!R¯¬>†è`íAs˜9ÌÐê¬1ÍA=—0«MJ¿‡° ]:Œ8æ*Ÿ$å5c7jmppˆì©!:/üWƒ;&§¶-tÒᓟ›Ø¦÷ØÌ®ýÛ ˜7}Óé½ÛÒ R£MleI2·Ï Åi¦€%ÍØJWnDJ›G“ÜßÈç0¦É$».·‡ƒÝxÔÛвKÌnêKÚº÷Û¼ü‚sÚv8 ŽJÇR¼ÃèóGµçöÊ6Ÿˆe½y°éØ¥ƒžÞÄ·Mf•ÄÓ†&Y¹£´’ø-EƒÁ×Èçú-ÜWÝÿÂÖ}÷L4£¿¥{鬚Y¥Ý»Mk¬‰ê?°Tÿ'rV?ìI¤#‡=4¬£ÎˤßÚÒžÜ/1¹o÷ÄÎ= ªúgü¶¢—Æè£[2zPr¿‰{±ûá Œ‰IyÚˆ¨#[áôj™ªÎiÒde `u;|é°² £{“£T&ל®9ònÕ¼ksTóV±¾™€¾¹Š2BØl'˜íAÄ[™í¡!iÆ4ÿ3|¶§*·­¦›-OÆè)Ó» œ|µç´-“fn—èŒHÛoé'}müöY¶©ÏTÈ“®¯ë?e@»g“G°óÅ£Î)Êz´p‡· +rý|§ÖGe2¡çwQ-~fÓ“;«tT§òo Õ6Q©MF•Ùð²ûCâå>MüÜï_,µþF_?/ƒJãã£e7#L¸4eÂaö{V(?Ïz¬É„¯2MM)~¸*[´‰­Ql¡âkÛ¨Rìç7Ä'¬ütÈ&«oêS³võTufƒôýÇžvai½¾àûw鹿+[wÈì:doϪÊý&ÛÖÁH´YG´xô£½J¢ƒ¬ÕPâ­Çó —iš4U†Ì®Ž¨ëŠNò³*_eÙ¢øµ²_Õ€&×+®ŸÐzWÕQKã¸&I¦æ‹Òi®+~ݼˆÿ×)ªÑÊ)«‘hè©Õx©dØCO°'|L“,½tjªRÉj6CÒ~ÊÒ:!ûþ“: ‹ß¾FÓgó¨AóÇ9ÇL_‘[i]ºŽ6Õ¼¶¨·—7ÝxuÖË÷ŒÎ™×0kWý´)ôƒÀ vŸŠÚ]Ä\eoA¶z/¯ ôÏ®úÈ öx}ÑÔ!òÈ2.‘mÞo‘ë}ÜK{Ù”Ïï쎪tÛ%<06)”âÍ'*PÑ®Ab®òÛ€¶‹gÄå‹’ÔœºuCœ=¿¯¹w}éý»§§ôœºyüØ “RvÊæŒòô”á™ÔRltRðÏj½|õËòç˜yÏKË Óg¼Ÿ1)7>.·*ÃóßZâ.¼ó2¤Ö©ñ:é´…û^Zì䣾lôÕéü ׈tٯЇ+U÷c¹·ÓaÓ‰w9¨¼¿¡/ƒ‚­^mb;…¤ïgíÃrtK¯ûõNk•˜Õó.µ>¸Cl¬Ù)·[¤¥Ç€LÛtÀîEë1<¯áú % u¾F¶ry!y»Í—z…™ŒêkA¹>Æ<’'Ìn®[x³ê×)öN¢eKmpüÚ¶Áy–žé¬Û¶iÚüÚ¾:ª*[ûœ{êÖpkžRS†J*óTIUæT†˜™C „0ƒŠŠ ¨ŠˆlE¤YN& &Î<1jwó|–¥&GEl 1UᮘÉ„çÔ¯©9µî’"”ÊÔ¦´9 Þj-Ò˜ÄÄDQ,aì†3<(U# y+v\ݬ6oÇ+uÍû›î¹Ûì[4cüʆŒ„ÖÝw>1µn[Néô\»5¿£núšÉÑØ”ÝPš©3Yv;œãK\) É.‹bk ¹½)_kØe1[<^—+5)ÉîÌŸØL9- õ¨½m(»Ç ¥ž&(J›^iW~ÐÚjtÅf¹D‚I–ÿ‹#ŸÑ6%ËRXzOãj´1—õƒ©é'…÷–¾ó¦ø5v@Ø‹WÞšqû8^ûJ§ÙŠ-iâ{[Ené½z(Hû#ò Ci=¢j"÷µ€N°qÈZ­©Ö_yÖŽrÐ3R@ñ$èŠ]–äA­ûÑ3ò´ÚšÚ´]Ïîßï..÷dÎy¸{bèÞ¯Á7‹¹0fí ØJ”ÐóPý¹• BT‚Ißµÿ ¨ˆBY+—óÔ°|>o‰??og¡6ÿ15/VbOÙÀ`vîwï‰w}L¾Z¸g·ýªƈƒ1ÊØ ï^&—k4j… ¨Õ*¥ "ã8½Þ`0!–VÐ:V@ÓâùÏ´x¦…tÀ¦6hôFA¦Ðj*eµ\QËáZ£ªÄO_#•´?D_°×G+kÖÅ õüŒÒë§jê²­'º"¢7ëz¹Á”²õž_¥é§ðYðÞŽ¥b0ÖÔ½4Y¾¡“{ZÎDà. ¸S£=eßµ¿"=ÎíBÊh•@çSª y5!²ZŒ©þ¨¥R“uÀÿªêš²\ï hØ~{ê°!e£î¨ážÊ£ÓQ½Š•ëô*öFŽŠ^Ãêzz {£‚ßž:tÃX €^ÅÞê±W)ð“¾/ŠßÁÄί°“SâF|Ÿ¸_Â߉÷âDZz¢Bq³(;ª h-f;r›Té:œÖ¾k>¯©ÒÐ Úk8C†åMf‹Å´/I~~^°—•Ô£ý¨ß)ÆÌÎCí¬\,),B|9û¶‡wÏs&;²"2ê+ǻŢ¿àÿ€Þî}dà¾"Ž{–ðá%퓨]>³›Ûtî<<tª7` H¡äx,(Ü ò_Í©9å%ª¬s¾<úC»jG}§Ò^ $O´ £É±«§¸Ü¡SÜå¡ÜÔ{¸Ó[7 y¥ú‡|ù›9QýAï² -¼ÑUæa¬â]†+Fºè0Ìèª0Zµ*û \ÐÂkøP&D§° 2„zzŸ±‰f¶Á¹O¶ŸöBÑReRùà5qíþÞÞ³É~¸¤hSÑÃ\ÖÕbnpHà»Vò±Q¿ÃhY³îÁùh˜Î-ŒÎI¤ vJŸC£Ó¸ ‚ƒÆe¯5(µF‹ hÈ Kƒ¦6ضeÔÑdí(£ ’+6ƒ¤ø­žëH4z0±D¸yèäI ï¯§K»ª_»úì2Oî]·¾‹Ñ·ê“µÆË[@+Á|Žéò92œÏñ¡|î{®ú—æsÁT›Z'ͬ+à®V:†qÏA“ES±N˧ƒ94 ò4{þüæ¹ó¹òÍRc:^M°¶¡É=JžÖÁ½Ik“–Âa°›äƒJƒÁª±ÑbØÚ Nh˜Õ…*bVÿ§áOR iS3f‡ ãáºW]ý Ž ÇÁÒøhg'WÄŠcJÙµoe™@Y ªíµêÔ´ ŽŠ‰q#mš;5F3¨<‰z‡ÛèH¹‚øÁư­¦AG]hª’gÊG¡•ì´³”.µ½¬#@ê;0Rƒ/Ët/¸ Û&Äã“bJÅ”äwܬ¬qKk¼â8¡xå¾…ÙŒ“VjU|Tñ¬â׻ċçéÔÛ5BÌ”µÓñö®}í;Úýz=µåGÁO³žCš(Õt¬›ÎºIõ)IRβzG0`É͸0 a #,5æãç¸øiªšJvÄ• mÊG·¼²ð5(íM<*gA,•µù>ïsÞ×¼ïyeÞH×%§m0²êá Jw…o%rÖÛqSljL¬ð%ñ`?i¸–"¥k^[QÛ=.fj}cÒ½]Ñem¢»ý¾uãg>s{`v„ŸŠÛ¡‰ÈŒeò7I!íEÒŒ[Y:#ßÁ¸Šm||1‘a¸æzáƒô+X„S°cà0 cš#‰›Ÿçåß’þo ªp6ØÄWR§¼Ç¬¦žNiQƒoÕ£Ëfݰg¼GG¹•ß윒¯ ŸªlÝÞ‘Ó{ǺˆñÆGF‡9ÒçîX(“_Õ=²Q¡5kB¶Ç¼jÄöôz°½ƒ¶×ðÿßö8qIÛð ©”Ö¹.TzÐb°‰’¥³Û§-Ün9åa4#Sj¯Ékœÿ5Œ€@ƒ×£4ÒHsXj„Ê3Ã?À<>!­jj/Θ—˜±<-»~re*NšzêùfOJyº]P¾¬7‡eNÉú ÐÉGƒëB¾º(í€ÖÅAîÑsØáäŽZMÖÖš®)jpµÔÖ;ù†á~ÔpFªgS[Úï˜d+,ʳ¸'–æKg×'Т6{J¦Wi•ûõ<¦¸>sè>j§m )*• TsH­–§ÅÊ©X4¼2}±òd}Š)%ׄÿà²FÕh~T«õ#ñ¯ä4CA6-%Mו„Äh¢ª¼Q“>Fxî°‰7»arUꌖú2OK6ÕkÓdµMkŒ2dÏžZhà¦N›/ •´Û2§æˆ}‹çÙ¶«Ô¡ ƒ¹­œ5½"‹¤OÌ„ ¼_æŽã2lD?²pÜ!$ Oú>œÒ#§É]œ6>g “ºÇ¡F ‹çýsnIˆ0Dû=žÒ̈âÕ‡î>Æ…¥’’³R}ÉÖôx{DQKqýÓwM¤¸{Æ:-i¥¿¢8 ‘ ÆìEĵäCΚ1C—°Á?û©áÇ‚î囃ó£ò’Žä¼(wn²Ýžœûôñ £®qÓïÐ)Æ×ÎsÇ‚ý(Oï Hë=ú ]d¤½É=¨FêGA:3pc0¶ËËùÇPãó™ˆcÿsÈsaoºŽãB +ìmÄsééoH¹I>¥ħ9iÅ1ž"z,Â…ÎôbOŒô!ÆSœî¤s …×ÎËRÐWŒßBTðJÄYàw$Œp¡W(Ê¥¦ÕyèÁQÚŠë öäB]¹‘=¢/þg>ã$STªÓ™e ñúŸ?ÓaO6›Ý©;¦9~æ3HN‰?%­ÜJàÕØK0éÇJº³í˜TÖ¡—¹&üéÞk×°’«ƒk9¦ õA°‡WAîdéÚŸü Þªðå^3'ëÃñtu¨žF¡ÿ%°4‡xÈ 6°Óµ3r±+Ãcµz2\ဟ±ü†+—eò+·Yc3]¡ÿr´q+¯%±Ù‚ìaÂ!R¹éˆ¶2€l?«v¡búh¨n·Ÿßðã^ùLŠc©€®müq¤E¶^­’£›«Šeà”®&¢ë1[4˜kCF‹ÉÆý(ú3—¸¾¸îèûâLü ǯ¾øí·«ˆëÅô¿‹ ïÒ{Êàž£ïyð ZÑ„–]wOºâ%!Ç”mÀx>–ºøÀ¦ù¼/ÞǾ_ú÷]¾wÁ¼÷oøx)§ŠÿAÚ乜߇:à³ >°Ï÷£àØAÖó/²yë˜È>¼)`1Å;4¼É­9®V#ç;–Æÿ7jµ¬Ó{tà³£Ò¼5ëu…VÎBaöõ&”DE˜ÕhñûÉúÊ#o‡åΘ’rËÌ,K⌮E•…?qòo…bÇ¡>Üœ9%;|³=srÖ¹†³ýùÇwQÖ!ñå³ÎmJ´tÆó‘1}øÑ€Ñ¤æÝêã ¥­h[:š¶£è4µ™öÉYŸšÒ%+)@qn<êñœe¤Í¤¤ÍÒZ¶.ª,úúÄɳEü‹‡ú¾¦LÜ#‘†[¾‹´]={öÚ5ÚïÉz¹¤¸‘J(ý=ù}ÞĤº—ˆz~2¢I‘ÁH´}¸)àÔ(TJ™Fc2 zšç°š“ëáE4`Õ¬ró…šb‰øýTÐ>ßg4ö)âÌ3Ÿ—Ë?‰³ñäÈxñkÛ–0ñL ö‹Ç&`—}‹»&)«Þ_ÆMoÞùÔÎ;ßÁMâËï­¥«‘Ø!ëÁÖõ‡G¾Ç, }SÖqe'üwÇà‰y´3¯P ø·‘ ÿƒÍý\)¡ô¯ÇtçXÉ1Fç™ÏƒÎ ?ø«ð½\üâ7ˆ)´œÄ'á>Íûtl\4ò¢Ê{ }ÈŸõø;X„ Û[ØŠŽÃá£=Æb‡Ÿr^?/âÓÔug ³+`™®hÍ¡5‹^]SV¼úðjz|'C§ôé¥õÙãWLMz\?IŸ¨óÓ\çŽzæVï÷ï¸Ç_‹cÊÝâü¬æOÙG6G‹ÀOûŠcÊÞ,yFXòž ΰ^üÏϸŒEÊ—ÄÏ0_W6R"'HGñ¤3=ÆlŽI,бXbÒF1÷COe®ý½í-å¹oþ»ÛZ€?,X<éN‡tµÃ™î±Ðüb4—lö¨“Íu²Ù£Ñ\ýâÙ£Ÿ§ýgI«ÞÐz–Yçc2èwj]»$?Çó#ü€²MEú°³·Këx©à%;sôôë$FÁ¹èrسW‡kÄx÷N»‡¼ùòö/¯Ð q¶±Õ¥iÈòé\êÛ‡F‡ÑÕ‡ÿ7 ÁÑí¿dJd™ÇA½îêAÒ8´ª â8œi¡Ëq$;XR%Ë ÒÑäÂÕp]ý‹3§©¨~SþœÊ#÷OÛ²0?±vmÃ9ní3¸¦îîyÍþŒieñ•…+§¶fµ=>½êþû6Õ~M#εóäP—ƒZúA+[Z¯Ïæµy½¶X¢/ë DU¹>ûGÆÜ×lØfKλ}!yžò;•æUݨv]ZEóüÏχLœ™cYÆ8ú¯_m%­ð?5ñ±Ï:§®Ë÷hEÛææÄŒi«+ž|ªpûו=V3eÊdÏÂgç¬l÷Ï«ÎÄMOÝV*(ŸQkö„ül˳w–OØò?O¶¿½ïÑy¹ÝyOLOŠK+XðÄÜ¢¹åq:‡Û´þ7 Sã* PÌ•uB4Š[¨>l‹µ{d÷[¸ŸÝ~º©€)N‹<Ø ˜â¶ØcáÅ'\Ð/p]ø)L1Pƒÿ P‘TÃ@E*ºeºÀºƒwÎeÝz\øÊÚò>B†þ龫µ|É䤡7‰ŒÓ¹ïš9~iU"W¶æ‹=³+¶ýiÇšSÏ·VnûãsQ%âêÊ–ì¥{ÖEGà•-¹Ë^¸ž3Š&“úQ>{ 7—J·€%*Ñ›øZ"`ñHÀ|y.Œ–YÃÈâýÁ8î`¹·ðò[(/®ò[)ƒâé±À2Ìäê?HL6¿°®ØZÒôüºÉÀéŠ+Á‹×áJ_†+ý Wú®Œfê—ãÊÏ’þ³”†pE¶þßãJÇÿ3®8W®Fqå ðò(®¼Ãp%`ä¯#cÐ^ˆ) ²,àÜß…`ÅöKaEÏE“3W{ñäÚùyW^}níCù­UGnmìZTSuWã@7§ ¶†ºÌÔš"OyÞmS2g=Ô0î®;Vv„!†,ÑäЗ…j$dQgØÓì±±ö´ ®8Œªì¸ó€%‰€.6Ÿ¸@y‘bÊ¢PoÍ hbZŒ!D1ån5þ$ž„X‘ð¤bû_væ-Ë)ZU´´{v Å“·ß¥xrï·lžTò«ªù»eß±0«£&ó‹Ù{î,Sðݼ2¾baiACŽcKtqS΢…vÛ“a®Œik*o£P2u1µÀ”kI²LÙÚa,aPBFc‰N£’À«EYˆF¦}>iÀñC£ßpÔH+Ƹ‹%ëÅqóN2çên®o¨‚!I4ùƦ™ É!Š$*3#R1 áH:T:I¦£2GSЮëÚÞ MÏýy³·=ÙêÏ+pÑø;@ÎÏ}ñžIpFÇÎì¤g@3Ç®9ÈÓ\‹›14nî`qsG@%8úôs=oð³ƒÍ³›öŒÆFMòtöìM •÷µfgÍ¡ÇY9½¾ÒØøÒÌpv,Ë?ܾsQNÚÜî%í»ØñöÚ…E¶ÈÒùôU:ŸF‹ÿ½–DVpð¥Œ3·ÌDŽD~P¦„¨©œ£"ŸãÖ`vLM{ý§¥õxÚÀVÐ`é'+†vÿ²çmþäT>±ôÁg†ÖлÂÝWÏ‘ÔSøý7´º0xE„÷áïz¤ëÒ P ã\þ% BãŽW •F?mvfçÒXcnü¢à–d}y™f\SΓ %˪ÓÃóroÇëOmy1-àOs¥ŹçF›Qä­›R™P·alM´U9tþ.?xlóÚâãm^BÓÁ÷f£:ÞÓ—ê³€è˜:W­ë£º?f] sïMâb(̹..gc¤…€R\lõÍÝ:'¢ +Õ³¢hÆR‹wjAÝä̲D£Î›˜³<Í^XR¹½³¬0¾8ÕfËk-ãdrÙcJe~–=Á¥_oŒH°š£lZ“®S¡VòKš'Mw ‘)46ž‰ws¹,6‚ÐWËT÷áö€IÆÓÀø ßâ!ËžCZGgÙ½§/~Èâ¢æØ¼ÇêÉÆEâ'Ý›žÛqóÙMâ—ß~;±«ë |Ntà™â^iÈ´ ÆBÙìv+z Ì[œxnÀ ²Z9¼ãÂæ¨4ýAIŸô8ó¹´Ôþ:h JÆC+‹‡mù oŒ››•97cA[XæÔ¼ý'îœ8aõô¬èÒ¶òAÙ¥ÒçD$ØÜ÷t·)³…Êâ<д hr¡$”ÛK7VêtJDÍÜ®Œ:æpðú~Ýœ„þ ó1ìÃÞ‘:H×p§ Ï*­ ®èdOdUæ´»+ž}!uÑo¸sý„Y…²ðÞíOîŸ8Ù’’£©œ2~rÔ¸¶rÏ«½ó÷Ýè´¥”$*ýºµã躌¥3J©·ì»VIŽp¤Fž^50‚·å2•\ý`òú†|`zÇŽ‚Ž€²àÂ~öLèñãWÅOpî«8¯Cü+ïÆ.ñ,•Á¾k½äÞÍ:Cö€ ç–’“S´ÍKíhèÙXz+räêYâ¢?X»M4m½6‹Id5ÉEVÝkUúðŽ7xµ°ÜêF+P‰ÓqÌ^â8†íÞ‹Ÿ°Õ Ù¬…ª#lù!‰[ù›•Ë{ûèô¤Ô¶ŠIé¿òÎìioìïÎ]Ÿ´bÃŽê¦g6,‹Glî%‰è‚#©­¡‘VÀHËoIš U$HYT.ƒ‘ò3–¿¾¾zî£Ít¤Y$Fz·õ†‘(ž\»@ž&Qž SO F¯ 6 OØ™A8³’]ó¸t¢ÆÒÊÎl ^s®é&: OØ5qpM;Ó¼æ<œYÅÎпAu ø„$ZVÇzuá-æáH=W‹kY¯œv޽R}‹=XVwµc/…¬Ëká ðÝT,3É8°¸5Èo¹L¦Ñ*‡e`"dž|R“ï[î2ÊFd&qÕ«â*üÈ«ø|R\ˆ»»ñ“âú|N&gˆ#d# Âcþ’‚\º¹œ¹º—̤?ÜÃÛDã66w{ìÕ‰†õ"߇ÿy€#¸•…@N¿y˜ “ˆæp»— }ÕºœËä2WˆÚE7*7ò‰È†r ^Âõj4Ö>üP2S»# >^QppÅncÀ¨*m… ð*¹\ÆcÌ÷q$ºü^HSè¢/{¤ÒMŒ4|ØnØ“­ ÏJBV¬ô‹Ÿú—ÿëÉÔ5kdÖ­[¹]â<[|Üô=Ò^eT*L&-Ä­ŒQQñö>ì èÚ¸N‡Cß)·w*ò P¥Öú9|ªÎ ?ì÷YGmå`ÙÊÁJCXaRÕ’²O}Ÿ_‘dÛ¤ÉOÛ“—f·¥’æ´76ÈNgTú]Ü®=9Sͼ=!c‹Ç¡ûHãL´'º´§ó¨>=2- —÷¡p”uP§ £[ròá_/§3Âá V×Ç=Ì:§Kõ¨ÌÎÁ[ÚQ•‡Âí«…7ÏÙµ/½qu•ZbB“ÏW›uÛRï´Y†ç¥_×<Ð’i4Î4[cÊZ‹ï[o1!ç‚$§€$éÎ ñôIÎŒ^­uï*s§JeéT2±ÁÐçç‚‹«©¬Â¡m.ÈCl~ýò‰{þãÕ—GN/®™p™_œÑ\5.ÕÎízþÕ‰s "]‹„—ÂxZOr*¥R-“©Õ*žªKË©:årïä8¡*¡ U{ú>´¹‚ô"Zq6~^ü§ˆ'qžÌÊíª¨ûSh Œ£BÞº­¢7`PB݃”\'ݸ¡S©T„ìÁÈF ÷)Óû‡ #Œñ‹Ex·¼õ³ñKnÜ9îœË8ÈêGjì=È Q¼…½H‘jãJ%/Èå!³—l>ÄÁ9Ö•Ù¼!w±øûE‹pÖb™{Åã`áÿÀ6ƒÚ·‘‘0µ``C­– *˜T!‚æá“DÄ„Y‰F¡K(°ø~û¥—Äñ/ÉgÕ׋êúza6ŒÐ #(»‡°›x¥JEýX ±ÔV6Šð^&#º¨˜IiäÑÒú x~ñb¬Y'~|Lûßâñçq' Æá‘«2*º»;'ëä$ýú%›b:¥%¶,ÆETC}ð]-|·¾kBMµV©Ñ¨éŽ XèÃé‡ÔFb2!J·c5Q*õr¹Fm4j4X=L¶—­rd½Q?Ÿú>°B¥Ä:¤l‰výeöÛl¹¹~Ò¼@'Y6~‡Ó¶Ç®Ÿç²/ÜLí~n¦8xmÁ>q·ëJcã ÎÔeuZäïGZœ~k4tfz@-×h¨ 4 :ÒˆÞÑf@ÌTCfÉö“ìÍ'¤ã‘ßM&t´ âë'AˆwuãùïÐu™’xƒUFI’—Zhû,ôç€p¡×{:y.Æ8ê¿/š3ê–ݲd’Ç[·¤ø–%ž[Í©2½å©VKÊø ï„T+?¿å¦¤ôæ{«§ÃÑ;íÞÆ‚Ùã'ÎÊ.˜=!Ž”ºP4¦»2döÈÍÔT”È€V¯‡Bwe€X¢ëpç$Kb¡—Šâº £'-Ÿ E|E DTÕ"pÑ-ú¿ì} |SÇ•÷Ü—$Ëò¿Û\Œ1¶1¶ñ cð¤=lË–dIP‘ma lÉ•eó!,a)%”¾$%@S²4!)MÂRB)?‡Ò,aÓ”¦”eùø(qY–PJ)%<œï̹W² Ð$M__p˜ÿ=wîÌ™3gΜ™+ù^egìeªv‹`²Óö±OQ°½Œ"šX¨á4>vsò~v)Ë®&<»nF™ÈGÕ-¶å%$sU—üUEßzÑå)˜ž˜L÷ÌÇû?¢zb|‘_Pz?}>LÚ2Ѭ}õä•‹øGž(·NNýZyÍðñãóF¤jG‹•EéÜïë—ØòbîÖ 'ò»j»æÆg–f2$R4Ñ"k;W¨‚=òb|]Cè{ñÓÆðo1U°ŽaW×ÄÇp£8–B÷ Çs\¬xÔMu•pŒ óˆ¯âö«@²¯B9:)ì}YC¯+@Cssv°‚›ëJ­®œ”¿´ê»ßÉ5wÍÐv˜²¿.ÔÛ J>#9;ºÑ¡PG*|Q1/=;­ÛQœmðY¬³Lô·lG2ïr„J2‰èántÇH43¥o\®zø^Yi7Álž0Ž=)™¾ö¿&³oŒÎTÑו§×fꞎóÕ>QûÍZ®–ÞL-cH\lœ×ÇãÃ=#ÓõµqµqS,8fEdDÅ2RŸç©ì?ÑÎÇ[ÉãùêøGb?š ÿéÒÛBù‘0÷/ H¾ó…YYA”n;ŠÃ_0޾0@Z|¨ ¹Üø„±Ó)Ï‘W˜µµ°©:3Óü¸ÓÖýð¨¼ìQ©Y©)#Ç=üèä䨫ƒ MM¥3rb§Mß”8"JÈÐUi«t•º*þtâäÑ…õåéÑšXqXòHVÁ&eWdå'NÉ­3¡fDryZöô´ÔŠüºòtsÜþV^Z̈̄±Iœ*:91™¹0µ¼¦dj}‹SÃãžRÐÝÒ¤cˆ*‚WÊŽÏÓgÄ™:-àïø=©Zz\œ—)Ž=Utø®ýîSßüõ“O21/ þš=Æ÷pÍ·/2Ã?¤ï)ƒ––BË!3_OI ?Ü(F¼ÅL¦s˜){æBubδü­¡Õ¼–ÂŒ[MÒØ¥o¤ˆ I4 %àì{‚ =æ] ñáø#!Þ†ÿô±¡’ÐCÞY÷zÆnô9f|TBÒð¸Ç’’"RÒ›/ÄŠYÉ%51é9#+Aó#U1eÙƒ_g~"¦iÄòñƒ_gÛzÆLL®yH,ʈ›9s°f"3±zCFÑç¥ œíc™X¸Å®|C5lsÔ^vißÈͰû\.8ÿ¨Šd²ÃÈŸ&JNÃ5瘻MOoÌ©˜Ö?ÿ5»µ`Ú¸8»¥WêÚ ^ܤïm*ØúB{{F…)ÇC‘ÆWægœ4I€˜P%i’¨NŠ #©ŽJ²9 »”DBŠ€)0:,ÊÊaööÛý±ÇÃ6Mw<[þhµ»°) 5U\¹HYØ9m’­<‚mâØì é£ Å¹­|”屯lA5ø ×ÜV]œÛðÕ:—G™’7vðœ&zý$êmömNnÀ}uÙëQ°­¬‰€ûB¢Š!ÊX˜æ}5šnØfN6>ù[@ß’G7zô>_zð—>è6IzÞ ïñŬÆÜÇÖ¼ùæJ&cðô†Qúöj•§“™Ð¹säÛƒ¿y2‚.ÐL:Œ[…P Ö*~!4úÄÃmJåj–$ì i ñ˜ÍÂ>hœ ·IþÂð}$}ö˜¾z¦˜«XÌO˜5¥¨±B\Ù•kóÏì±–É¥©å¶rfÃàSëfLfèrýÌ€%Ð®Šˆo*ˆÈqÊý ^A(‹.%ÕÕÅÌð‚)ï¾z¼—ó?Ï<'Ž~ö›·ŸJ=-næÙÛÏCÆÇÃ0ŠdÐ}`Õ›Š¿9’Z-5d5éN"d­O?ã6?¡}â¦íš™Š[r²çNÈÑOSKk óÉb?Œ‹yáyÃB[~tÌ’ÄaËͥåu…‰Ã@%ô¥[QcXþ"€¿EG…ŠŽ¥&*2Rµ9Z"ØÍ`Î^yÆÒÛ ü|ëíÛ??,yZØKfð‘E\8¹nÛÔõt£µêðálC{MMðƒøoÕw61¯tήœ]5Šþ…6ÛÃ2®FMŸ$å%GçÚÒ7XÕf¸‰~"ôÇþb|‚”z‚´âö ~ùíà+Œ‡=æbžïlô‚ÔdZ¯ˆDϤïG™‚ïG™ò&£IŽ%Â`Ö c'Qì"šO›( ½&EÞ¥ÜxäJ"W¿¤ròðñe™K–Õóýc¼i#S Æ >ÉU^~¤"A'Ìã|æ°¿Ç¿œ„ýuĨ·˜ÿ ›ýXªBBjÜ7‡ÑŸ_‹zîqûèô»è•ýáOLJw;q£KÇßnK—(.ƒ¾Rµ¤%{‚âÆÙƒÿʬÍ)§«BΤIÂÈÛ?¬š;=#6º7!Ñfe޵þ¡ #.-1ª`tFX%¬2SzýkùfÊnÕ0VˆK¿½>fËã`’e0ÒGñÁºoù:ôé문1L¬¯^\åõ 1ÑiãS‹Út #;«Ë{{ƧGUêé³Â; Õá›S«k¢•ôk'žð K8å[ÐŽ ¶¶Oìæè;(éXjº|¬º¸¦QJQQlÌŠ¤?WÅÇÍaV ã~4£oÓ³¯<¼²pKïËyÐõ7çàKlÝ` ³|p9ó[hùçÌIîih9…×Ä2IñI6,"…$1ñ\‚<û`¤6?ªN–î–ãŠãñï‰8úÀtÆ]LsO_ÛðÈWgħÇÅd&fT”$¬íËÌùWPá·Ý¦1l'ËiÒËrA•%_™Ã<)½lù1™Ž0¹L/ÓÇüŠªf}—íç2¸ÙÜNî ô€Ðz@H"BÈ6ƒ¾?kmE¤’Ø›d^Cr—e>ŠÝ¨!óѤ#¢OúUøW¤N—y†¨Ô 2Ï¥æc™çȰ("ó|Xh¢†É¼",_I¦F’yIT•ùõ™W³/‡ÊG’ñQ d^C£ž“ù(¦6ê™&eÑM>B¶³ÄKv–xÉÎ/ÙYâù°2’%^–/ÙYâ%;K¼dg‰—ì,ñ’%^²³ÄKv–xÉÎ/‘‘B2P$uÄCZˆŸøH7¤y$yZàü¤ Ñ9à¼$®L#@"±@^i‡kÝx憣J÷¶BI-Ö ;@-ãAtÁ±ˈЕ/’¬KKx»P—6l¹ˆæ¶A¾޽pæGÉxezQžÎÛQ zDK¶€ìNüEQZ¦µÉB¹”ëŠP‚J¤ýï‚ó–0í¼h IszÕrçA’z9déB[ •Nëм^lGÒŒJq¡îT È ùypÖg 0ŸZ¬k,Æ‚,OHfê낲A»xPGÚ6¨ëúTŽ«;ÌÎ]² Ú/j´\3Ž•H-Ôh?žwaÖ i¿mrèhJ#Ö+ÛÍrZ!g!J²c+Z² =b1¶NmGËI5]XÆš´¡/,ÄÞµ‡¼BòÈ ?JzvàÈI£^ıô£•:0ÏMaû/rt¤ZQº'Ìܺï'êá=86´í M‚^ìYw˜ý;ñè–­Û)çSßl†ÒÔ"ôª¤—4¶t>вþn´ª[ö`Ÿ|ØŸnœÁn,C51ãX{A#ɇ¨nœÉ=ò˜J³Z¯¥Š²mÚÂÚöËýõ†ò¼8ŸÜh½2Û–fx;ê–‡cHgb 4ª’Ý9*KPŠO–,C¯Ižî•ãN¯=ŸØ^Ë7ãˆöbTX²`0ÜKïf,ÑÊñƒjLclÔêÀRŸŽÚ²O†G]»¬¡Gö“RS QÿþÑyhn¸q¬üwXFÒý^+Fž÷€M‚¥%ï¾xä>ÔB‰’mæÈ³]$c])zÓ1ꂾ-DÊÇ5àÎöòeér” ®] a1äÒ<4kï”ÌŸ‡óÎó9(o&öAа‹ÃV¦@hfE3Én’tb$ z¼4òAk=Dš ßÓÂü6xEŠi­h“@hý[ˆmµ`Ô»W»ž{ÌÞ!ŸütŒ•<© {ê•ýZ’%­ t.ÜÝoz]ŠHÙP+cä­­÷ÕÊû)ÉŸßFCÒ‡bŸ§¨wË1ÿÓ}÷ÈQýn½Âc í‰Ô—¶ÜÝPùR_¥5Ë‹ÁußžJvvÝaÓà,–phB­J=¯G^ÿܸƒi‘}ʇQ׿ÿÇGèÏ5/†æDjCç@ÆÜ|«.²èe±¨pb‘Xçiñûº}ó¢Öçïòù]Ï›/Nëè-ž¶ö@·hqw»ý½îÖ|­ÏÛíëpu‹žnÑåét·Šó|~±§Û-z¼b—ß׿wuvz¼m¢ÛÛëñû¼n/Twy[E_ Ýí[<þ–žÎî€ËÛâîB–[t‰>¯¯»ËÕ‚â¼*¼»ËÝâ™ç&Q–v—ßÕpû»ÅvW¯[ab·«Ó-.ô´ÚóÄÏ·èëh‹»Ü ýZ2Oìt- ºxÐF›Ï× b|ž7êÜ%|^W*×ÜÓíñº»»ÅŸßïîîòy[©†ù¢ ÚñtBÇ ó¢Ããmõ-ì–tlõtwu¸‹®ŽßB¸è[ÝÝž6/hh§¦CR;‚ÌXO øD¯Ïß -܋ЗW ø]­Z rï2B·Ô'­¯Çïqû©&Ôä´±nÔ¿Ó¦kñup5w,ýn½õÍA¾ÛÛ ‚°%ŸWìnñ»Ý0¤æ.·×ç¹]è) [KGO«¬êmÃÚ~h×K9oO§Ûïêèž"vÀ·»[óÄV_ @» “»²Ä ž3s\`t/ø Ow»«Ë-é颂š¡ÿ µ”¿ÅÞÒáÐ!’ Üáó- —QÛ0K3 p—êï§€«;à›‹½.ÿbª õ!ÙÍ.¿äh Á?ºó-î¶ž—?äÚbÐuí ,.–æÝáÎ8îN—_R¤MŒ6¿¯§‹fƒÅ»\^´PÛÓ’íêÎaöûÀ½®Š‚‚… æwëåCñpI:/ºÚ´ph墔Ÿçjö{Ðr3}=à°‹q2è`£›n`N:OÕz¨©vÚ–ž€§µö´èü[Øîii«ë /Z2ä±`¤.¿ ´@)˜ ùb°mŸ)Û“#ºÁ¬­á¢¼ÁÂ÷Ô‹£÷OüžÉóC­Cõ,É[²=ÐJÀÝIÃß­ÂÌòvø\á‚Î.IS:Ä~9„øz]=0ÿܽt*C™vwG×]ú0•OÅÍÌä3³ø,À>p´Î¬D8§å/@º,鹬ì¬Pb¼Eˆ‰•újRÉ×óB‰˜¢±Æ ±ÒœyE².r}Ì{Óˆ°#´mʺG~Þ}ÊÝ}Ì»Ïõ"Hå¡#;«\Ö¹ ’’R$»|>[>o†Ô:²³ª$ÝM^©Ô.¦¤%_0-¿+­’ÓZÙoJ‰ž‡'¼–î’Ã΢ºo€´QòAÓ ²å#ê»ÒNH¯Ér΅Ɇñ6í‘Ç-ØÆ~öúÃSŸý8à^ûq}­é€ý¤Þbê·Ÿœw0ÿ=ÌÿÀ~øS˜sñ<â%Ä«aü еQ!ózK­ùxÄÄtÄLÄ\ÄBÄ2Ä©ÐîÒÚÈGß\Q{"”³ºö4àºÚs€ÏÔ^ÀÖûì×õ›j/Ûõ[k¯A_¶ÖÞB¤üŽ:úèàõ¯Ö©°ýX«ŸÊ¬‹FLøOquÝÚVØW—…µÞ¶¶Öå̽uE(¿åàPC­*(y N‡Œˆ !~E=”³ºn6JnFÉí²…¯C]/– ȶ~ äô×-—m> ÇtÕ+Ù®® ኺµòX Pt$Aþ¼ºq–y!”³ºn;ê°s^|¯n#UÿAÝ~Ghrr^­;B:šTŸcXþ8â1i|ÙÀŸ”GZ¯;ƒW/†øuWB9«ë®cëƒtëù è!×õKëÕ4çÒöN>)„}õ©€ÎÚé€sjõ€­µõ0Fsjm˜? p~í£ö‹Àϳ_‘ËÌ©íìªõcÎ"š£ïÂòËW"®A\vpÖ>‡¸s¶öÖ¾VrânÄ}r-øSõˆÙwñgëóÁkëKB9çë+ä¾\×;ëk€¿T?úrµ¾ðâz ô<|N½ëÎÁÙoEœ¶¾ Ûê æHýRÙ>×!gØòWß_¿xEý3X~âVĈ¯Ò‘?[߇’÷bþÙ¶× šú~,óȉ¯å [{®Bœ1¤ÔŸÅ2ç©ÿSÊLèU³QƒOµ2Óø³Öœ–QÈkΟwš 1§ ZQ±!jh(B,‡2 i þcä@t5,< |–HkXÖ0K6cN»£Ê{±yíØŒ™†£<¬q¸.ÞoTžhŒ•WÛëúÕI4r6Bô3œnÌùç³óõ[±ä…Æ|ÇjÚÆǺàªÑHc‹´’Jë´ÒIíJk“ÔúºFy¤U`]ãŒP _×XK-ÐhAiy ëçÀØhl•,àxFß×8_ö½làiD]Ý1Çp¹q©c“áZã ÇVi-ƒœÕŽMúSë;Ðo_…òÏH»ꟀT<°W¿¢˜Ø‡¸[‘JBt2ÜjÜ–ïk|圂ZKûd>q/úÿÞàZfº„m]«W@Û½ŽÈóˆý Æ´¾Æþ`yà¥]Ó ¬{ëÞ 2i[põ=Ä츆RÍi_NÉ«g…‘m„¸gT5žÇ’§Pæ%i=Ź™BeîÅYù¢ÄïÕ¯h¼*í©°–´Ë¥¼…FÂ¥ û,äãåq©@ÌÖŸ²¤Ð9k¡Qñ€â1Ú’ sWC¡¢¢1ÁRæxÏ8Â2Õ±rhTVh™…k¬†Æp>jª°r΃¾ŸuvžwúM5¶KÎE¦¶«ÎeÀßp®4Íh"ÎEÆ+M ȯmÒ8×è4AÔ5YšRèx5¥;×S¤vn¢ñöLS.XxDS!Õ­©ŒZ¯i*òÓÃPXhsjg!ÿ(â<ÄD?JXDýªiôÂÙqÒ4§ FÓÔÚ´¯>‡%aŽš V›æ7½4ÔõÄ“³ ói|ã›öÑ8»é úá¼zv,¦ü¦÷¡Å®¦ŽX|óÏÉ>@ù ax‘îç4Ñ}ã;Eóí*z_f§wâAL ^jÇØbǨbϲ‡î¶ì°34õÚ‹œÏ™–ÚËéLiºàH2­°W94v=¥»6à˜c”ãÞ Œ–7èý sKè~p͇;ŽwÍé¾o òèÏöç6Œ34gâAÄ鈰W7­¶žA~–ã†iÝNçKÓ²`Æ[Ê×˳ã¥àlz|[Ú?#bL¾/–$ãw_¿õ’¾ïbåoºèw\~»¥Àïµ”ø– ¿ËŠÀo±ÔøýU$~s¥Áï©¢¸}ÜDä~É}H*¹ËÜÇĈßMÙx ŸF\|ï$ÝøÍÒ¿àwJGð[‚Ÿª§¨§Sô÷“ OÆBÆ‘l’ArÉ\’‰“:‹, ÛI ÙA¾K¾M^&? ß!ûɯÈkäCò9A~èÈÿeç²sÉMöûKr‹=ÇAö"û†aÏþžØ›ìmFÁqœ‚‰àâ¸aL7œKeb¹ .ƒIಹ\&‘+䊙î;Üw˜T~&¿’IãŸâw2þ{ü÷ÿ}~73Ÿÿ!éâñ‡™ÿþf1”ÿóÿsþ,ó$ÿkþó4‘¿Î<Ëßxf›#$0¯ IÂp¦OH2™=Â8!ù‘P 2o ¥B)óc¡\¨fŽÓ=óž`LÌ ¡^h`~)ØsJp 2ÿ%´-Ì€à:™_ ~ÁÏ\–K˜ß ÿ$¬d®«„5Ì5áÂ:榰^XÏÜþ—ð<3(l¶°‚°UøV!ìv°jáeáe6RxUx•ÕßÞd£„}Â~6A8(d“…#Â6E8*ü‚.œþ›+üAÖ*âñl½"Qñ5Ö¬8¢¸ÆR¯T¯a‹oùž¨!éô“ü’H#)¾IAFO§¤[*%*1êV”dQÒ­–Ž2½¦[Gô{ð‹|BÔÕ «ž>ÂAns†9¾ú!ó!øêyæ¿ÁW/1—ÏüŽùøêMæ&øêmæ¢d¬‚¨Ù6†D² løçpv8‰bSÙ4Íf°$–ÇŽ#ql[@âÙ‰l1ÆV°$‰Õ²Z’LG†¤D<ñý;ANc/ãé÷Úƒ¤Y{P{X{Tû¾öÐQíií9ííeí5í-«Sé¢!%èFèDíi]–.OW‰Õ•ëªt:Q× ³ëf߬k×yuÝÝrÝ* µº ººtÛu;u¯îÑí‡:CtjJÔ¢UatêH´¨jVŽéŽëNêÎè ¯$®Ò]„³uW /Œf}Ñ6ï>ÏýeþÔ¾þ¹mø—ÐóAzþA½ËàÓùl¼ËxðÊÿŸ¡l';‡>](}ŽèKŸ+ÝRº­ô¥Ò]@ÛJwî+ÝU¼¸ƒÅÒ-4•.>^z°ôhéQ8¾_|¼8@ r((=Q’Qzºô\ñõÒ pv¹ôZÉœÒ[elé‰2UIFY4\=QRS–Pâ,±”Ô”8K¯•©(%sè'êrúļ|ëÀ{ØY@©øìhù*Ð(¼«ÉÂýl9 4•\%¿'•ä@Õì%ö7¤¼è™ÎäR‰|&‡ÌéN2'Ìé$£diizi&M”ƒD™a” ×Ò'ΑòñZ!¤2È^ÏE­'ƒÖ‰ÿ½o¯ª¸þ™=ûìC€$„@ É áB„œ#E„"†ˆH5¢"¢"Bä¥"""DÄ@1RAÔ!*F¤ˆŠŠ¨ˆ/ #hÑ*R >ý(µˆ$ܵ~{Ðøè-ý÷¿ïþï%óÍo欙Y3³fÍÚ³÷9Ù‹F­ñÖ~QìânÜÏ¿&¥ iV­…-â©w‡ê¶1âL -ñ?Í­hN·Š81ŸB¼¸B‚¸Bq…D±H,¦6KÄ¢X*–‰dñ²x…äQO!@sÿ†ä!}Úçÿa~Á±êHplðÊà¤à´àÌàœ`E°2X\¬Ökƒëƒƒ›ƒ[ƒÛ‚;‚ ÁÝÁ=DÝG¹Jjó£*&¡Râ5 ü~B£‰;…Ðj_C½ü(„ÆQ[¯_„P>õŽš@£øI Þ6Ó¨¶adBåÁâËcüIÍ8Á‘J½P‰p x(x„ðH°)¤ƒBþP\°š0‰ò)¡ŒPf('XÀ5BA˶ЀŸjÿ(„f¡=B¨447´€æyäÇ!´8¤½€þ…¥W„â¸gôí…¹ßóçÒ”Ÿ¢¯ åPCã£z(´6´zƒùütŒÏ„òM`‚×Ë X9omªB¯„ê ×z’Ø.´­Ç ü¡z )¡@Û@²f>KCŸ††Ò§½Ái¡ÃTv4¸1,Â>Zã|šEU°: ª '„Û‡Ó(ßîBŸwó*„³Â}‚ƒHŸö…ÃáþááBO—Ò겦T‡‡SÈâÁŠðÈðÔþĘ«Ps#4€V9| ñžž‚òÄ,ib>õw=ëw¨><›ÆHžÇ³ /4ºn}¦ Ò%î/!ݯ…þ¯Ï&)lö´xì O;€ Ìâ}á…ôiÅìoTRÝC´&áUá5áu¼ÂÁÚð“áMáuá-á×H²´ÖgvðHDEÜP\øsÖöH+Óu$‘eé`4¿žùDÒà OH!ÒBv¤[(‰ƒ×†ZdPÈ$ ¨MðHs)ÐN©§•¯gYyzF¥Q°î— ´R"})Diµß£|…Aa) #%‘Q‘²HYhmdläÊÈ$*ÆH¦39ÌŒÌ %E*"´s#UØ£I‘å‘êÐÑÐÑHM¤6²žÆ67²‘8nŽl¥°-²#RÊ¤Ú ‘Ý4bšICdO(?¼3²´¢"r r(¸1r$ÒÕÁª¨?MŠLâ’à¾hJ4#ª£ÔšZ VFIÖ¡Ìh0šÞœ ÍŸ-Ž–‚Æ;,%:::&:.:!ZN‹Î ùnæG±1:‹Â\ØQtA()º˜Úøƒs¢£I—Ñ4E3¨vV¶€W:º4º"º2XËReDŠ®nˆ>}!úJ´.ZÝý€¨{£ŸFFGöý|ýb#U‘ª~ ýÚ÷Kë×%2ª_V¿Ø~}°½0+4 ×¢üSç³ÿ‘ç³+é à—S ‘;[ÈÜM"1w&…9¹szî}8{nöÜÜŠÜ ÎçVæVöêBa$JA«¢°œB5… µ^È>œ}¸Ï%}.á<ÿïŽõ®õþgiž¨ Y Ò¥’N>Q%î-ètu<$[ü¾uËÍ¡åS¤t€:Ò3'7x*žŠ§â©x*žŠ§â©x*žŠ§âÿ‘Ÿ÷ãÍ §ž÷ÿO¼ŸTŠß‹{ì»§Âÿ¿øoÿÕõ·"¿´¾ïÿ¹oþÙ„_Z?‡_ZïÁ{{>ƒÕ8‚o ÙŸx¬Ú*ÂI¤Øbº‰ÝLšmò})F)PD±ˆb‰©s2é¨_ —™8–â•ÍR.ŸdÒŸy ÓL»éÌféŠ+)Vz…I—S¬¦XcRþ\Û¬|=ŦŸÍ·'Ê·QÜÑ,m ¸ûè{þI½Ÿ¦{þIù>Šš¥<žCPlÂÕýÞg7Î|N¢˜òCÊcv3¼9º™sþÍüIÌ7q€Ï4/òçæeÍâÏø ¦Xì­§[êÉõDбަ8†â8Ãcy3¾´nî³.'ø—‹ÇÒF¥•Ù_Sø†â1Ÿò¹ic}ÝÒ®L›”6-m&âœ´Š´Ê´*7!m9Åê´ïsZ-…õi9úJì¯Ó6sJjÒ¶rLÛFqGZCÚnª»'m_Ú´CiGÒš:àÄ¥U’)Œ@¦Or|e` ?0ÀÁÅR¤£cãåÎ,Ž'Ê]_`Ê8Î"^ç–VVRú¥k“ÏøJ/^1¡ŽBó|½ »»lAs¨ñÕ>øIØØK3ÙøT×¥ò ä88š.Ò}Ô¦-§ùFùÊÒc}%é dŸ:ü¢}:ÓØ' ûdÃ>ù`ŸØ'ö)öÉO–i—hA–i»Hµ“}êm5YÇEH[Ú²Rñât¤Û‰3uŠNgéz°¢ õHq¹¥ÏSÈzuÓ`½–ãÿDÀÿ‰¬ý¿~|R&Hï"6‰žBÄÓNŒ§Ý41ßÄÍòi—Ä›|i3zð"í˜xÚ1ñãšñ™`R¦•Sœa>Ï2éÜfq¡-¦¸ÔÐVˆžñ:~tü§ñŸ¦l¥° ¸5eQêRRv¤ìæ2/¤ì‰×)û¨ÎŽ”)»)w(åÕmJÕ©~„¸øºÔ¤ÔÊeðïp½ê]º^IëMë-¡¬Ö.áÃÿ µ°¾¶þ&Úk~ TŠŽ¡ëX@'è¶¢“î ;Š®zˆ"ºëóôy"S¦ë[¼{,ëÿ_É'? À<ƒ+€Ûà Ÿ2ô; ]=ƒÑ¾—)ú.Ð`ôµåPPj? JW`?PDþLä5ðlP–"7ò·"?ùÖȯÞÊ` à«À¶À·€­€Y¨.éç[ú F»Ž(Ë8¯–qž( È' þ¨_œ ÊD`8žp0òø½t„#­Ñj*øß…!}pádÌ«…™ÝzÔç'#¿ ù?3ÊÇíZHò 8û<ÊûŒt:àúÌg2êLö}ÆœMýÏ@AM{:(‰¸]‚‘`ä6×loÆy#ð6”buì@Ò«Œçn•qM«”ÛZsx$ÖLä×`TË Ã !¥€©_ ìK£edòø=™;[€Gxlv Õ|ØÞ€¹œ…\:êkÚV9F2ý^îk$” ”c}Ÿ35irŒïlôÈô/!«ýÎE„7Éc×8ièë:äãY¶Ž ÊÂ9ÎÕà†1`T-€z+e?‹ÒÁÀUTç(èïÝCý8¯çi½>ÂLiär+ÆŸgW Ælïƒî}„½ãÉáèíèw%Ú²e*Ä|y½¹ô€YÇóÑj p*ðFõ,ö¤ª×¢f æØ <¹ßK¸Ôz;k„f«2ÂÇ+ò8Û Ú5d—¬¥ö$ÂOu[ä¿îî½0 ”ÀßBþOÈg(G€O_} 0ˆõÕÀ±ÀåÀLÔI/ ¬µ¯'üù¿±ä­¯9¯Ïæ¼ z è€Òëëпî~àq@Ûä¾úç€> x:èï2ªÃ¬íZAçטüÇÀZàûLg«¢oÆÈ»¢æ_P³­ï7„© ¬2X ä¶{¹Žåõf !SŽ€²{pZ3ø1°ø>¬–ÎGMØ4ëOhÛ‰mˆî‹|_Œ¹7ò×üX ä~½ÙMf+§˜µëHùŽ wç¿"ôlÅQäûüX :í($s£ì:Q`&æøkµ¶ ¾ \Ãt¶¨ú×X‹ÎØ ÚdëlóêÊ×hÛ×à»À5ÀEüNSÐ#ŸˆVC¡K¯³µ$áÒ6àó{à»Ø}b ·ûRØ$ak!Ûëq´Šr^·aK®ÀVÛÐ=g*FîG¾|>3ùw<Î%¨ãcû¯K¡u;ylºôÔoÂrZÛ5lt!_)ôÅèý ØŠ×Ñ*rˆÁ,^‡$çç<ÐSQçbà9™ÞÚHÀC–Ø Ìzsk)ðtï_´bŠþ+_•t6òËQú¶/‹ë0jØCë,¾fi?(¯ëOylȯqò0þ,¬/ëÒçŒ:Zçǘßó-˜§ƒÂu>B¾_ÝÈ̇0å/¨Yƒ:÷¡ßo@ÏåkŸŽ|_`ˆeEVh.ïVÔ øWìß(êÜÄ×GÝŸ¯z}•nÅŽø¸uî…&¯€ {¢í0èÀDäg!3öW5s½±;¾F~j^¯ŸÂ*p>ŽGk½cj¾Ý÷>öÔûÐt7” ÌÂbеvF× Ç&¾ Ûm™ŒÖíÉ'Øw_¿Fýn¨Ÿ…|>öø; \‡==ÃX$Ƨ¯{èŒV³Í»Û÷(•NCÓWcÏžƒšÀ˜;óy†öøŸ1æ?ÃVóÞ/ä3õ6¤gf±ƒîMIŸ‡Áa?¤ýJ‡¿>Üüò_¹}ùû!É/™®/ý4>)iXN²±Ìóòžåécóû­‡£æÙÀŽtÌ»o>ø¯Äÿ½si{ôûà=Àí ‡€9àïáË|Ö¢ñ0ý\ðù˜Ï]Ö³  žÅg!=¥÷£œÄ¬Àݘ]#léG°öA>µàßo³(Çê_ L¶ùÝ@&c‘Ob-Õ½PzPÂn(>ÅéNÐá]¸Ž ÆØnÁì"ß+å`œŸ’ JP^å<ä÷ñ¨ôuÈãtª/¡{SæÀx•“ ËtwÖðIEÍ«øìª¯âÓ£Î5ý2Nã»6}!ë6ÕgJkðøœÑ>÷þ¥qÀ_P³”lo7]™(èÉQÈ¡8”íÈ·Žâ³+]Ýè쪫aµ.CàkìÀh>ÙÇ]Ïñ9À'q¿|¼ðQ î%ã$ßô òóëEòŸqr>þgà&àQ'…ï;Ž…ï'[óšbùîÃË7î…ï;–y5›nÆòùÜÔW@¾×~ÔPnæûAÎËMσ’ôñéÝЋ(?õW7I”. ’OèMŒV Á„üXÎËà0cÈkê <„Qâ;3r–@‹FÜÏ6á® c¸ù¼¦r¾?2£u1›Uîõkf}0ˆçà6†€ÛH#ïx+¾“BÛ÷¹•Ü nåV„,Ÿ«)nGÑ*À6Ö“jãqÂ?bŽ…ÀDæc%ïä:ï1ÊóÐ3r<]i<Æë…¾F˜^ îU}¯àî ënós1ŠulŽÍ§¬RM6Öš§Ù'@¹®b èËeÀX`£€üýÀÅÀÛѪ\³×‚`Ðæ|¥Öç ­ÌX ße°“ç[dc­Èodjðx3(ð((]…V…ÀñhUf}ÈüÁ3Ýjàñ Õxàb`p9°¸mÇ£m:ò…Àrp.·ñÀµèý `žÊBWùí„Ø¹òKä#ÿòÓ€¿òó„Õ\“äϸÎkeU¡Ï=d_àA`#´BVù¨C'7ñ±æ•.Ù,•t=•S?ÿ®¶R>õ×)<¿’° ÜÖŠãp ›à»x(|Ÿ5ÞWÃèL$,æD~ 0²-Ç:Æ"?×K­ÁŠB£Qº¥é9Öh¦Wzü;Ö^É3ÊÃÀ PÖǧ¹ë¶È/å÷×Ðè9ŸÏyk<êå £µ8”nÈ7—×¢t!Ú¶B~skÚ‡ÈÏV{c`Ôx{¿5”‰ÈÇ‚C“×;[k±WÊr¦9{cæ:1l£¬y°TaЇƒC9JÇp}ÝŽ¡4¡éOÇ®BiG¬à.Uk@Y ,õf!x]²@Ùkö7Ô×ÌA~‹VŸ Ç%ž¬À?|0^>`TÕ쿇ôª5äɘÜ Ù¾æé•é…ÇsÚ.Å,fBû›Æ²¾¡Î~H¾3*À/½‰÷­)ÑuÔÓ=´íƒÑbÖ4N¦eòÙ^¿f$ü\¢˜{—ß4=Gø¹·‚M¿ÆÊ¶rÍ#óÚ¦û % |¥Ðxxl«¼=ÞTÆ×ì¦ èñSÐ? äÇ5ñ³ÐÑf ¬~2öõÈwfžžvÉ}Тq¼vLWÛ0†³<žÐ¢tU…Â3Zäi Æ<ƒgD{„¥:šQÇÒÊä7bîÈ—ëPg!ò³Àá$¿8’|ùi˜éFPÖÛVpø„ÏlV–¸òé Y­‚-ªƒ<™²­¦`¾‰ löì$·ÕøM8ŠvŠŸó„œ°ü><Ÿ| èâù¼kžØó™-O¤ó|ûÇUÆÁ Ðùpß>8g &Ι¾ûAÁ·6Nw ¾O±£´=(ø.À qunCJÔù ˆë©³ 8†ÑÅ7Nƒ>\+ôeïDÏýÀA¨ž®†N.ßÚ¸øþÈ7 ”Läñ½ƒ“ ,ný@ömõ–¯-£“$ø;þÖiç‰>ŒÐn¨“çÜ€±= º”ÓA9L8ÄûÖÆÁ÷JŽú{ÈEþq´ZÂ+…çç€O™géÇñ Qã'Ø;¸î7⚎=’ׄ“m#¾qkÄ÷Võ CþÏqõoÄú6>„UlÜÄw tîž?#Yîù‘?£™ðg´ö{FQxJ„›v"MÄŠ®¢‡è#ˆ|1X‹Rüßó81A”‹b–©M³íE@´ü]d®ø•8M g‹sůÅÅârqµ¸V\'núÞ/R"þŸ9Y¤‹V¢»èI?Pô…b¸Iûä1^LSÄõbö÷¾“ÃwÒhøNZmû@ï ÚˆN´×³Ežˆˆ3Åéb¨8Gœ'.—’%a_Ý7ˆ›Qß':R¿t¯ÕËx_JÂûÍRˆSg/2EŽÑü‰Q$JÄ(Q&ÆŠ+áßr¦˜cúl!l‘J-»ˆÑ[„E?q–8C #Äùâ"xóf7Š[ÄÜË.8ÍjL¦»s€avTh‹€%ÀQÀ²Ë.»¦Ü ,ÎVW×7Ž›xÕÖVà6à`øI“¯±v÷÷›ÆO¹ô2­±ÀD` ° 0œ8ù²‰º?p °X2iú5Sô(`p,ðJà$à4àÌÉ”è9À `%° ¸X ¬™lbôi L"ŒúR€ÀL`0ÌŸ:}ìTßà``1°88fêôò©¾qÀ Àrà à,à\Á¿ûå·œ|*w°ÿÚß{sÿÛ>i|òò’ý»ý"¶ûæÐç$:ÕÑIn¶XNZp€zwi<‰1¹BÅdÆPê50ëD‰Kœ&×'”+\:¿¹êû?JbQÒªyILOpË·^͹Åä ¤7Jú DÓ¸h·f¸„Eómr;rêò/…-ç}NåÔÍj¦™šS3ÝÔìdj:dßÚÃ[{:­õw3HJ¹TÞ™Sªß…Ò¾ô¹+§.ÿN™g’€™$b&Šô–ýæŠf~IUL·˜îÌdkûƒþ õc‘lÓIÂÞµKPŸJœUÍüÊ*ø•µàWVï¬ ¿²>ø•uàWÖ…_Ùø•õïl ø•…_Ù–ð+Û ~e[ïlt :¿²màW6~eÛ¯lüʶƒ_Ùöð+› ¿²àW¶#üʦÀ¯l*üʦÁ¯l~eÓáW¶üÊfÀ¯lgø•í¿²]áW¶üÊv‡_ÙLø•í¿²Yð+Û~e³áW¶üÊæÀ¯loø•í¿²¹ð+Û~eóàW6¿²!ø• ïl~e£ð+Û~eóáWö4ø•í¿²§Ã¯lüÊž¿²àWöWX¿X¿3áWvüÊž¿²ƒáWvüʯìPø•-‚_Ùað+[ ¿²gïìpø•=~eKðÌð+[ ¿²ç¯ìHø•=¿´EÚÀ÷?|šGáfQAaŽX@á²É ©„ßËt«X'Ö‹ùb‹x‰JvPX(Þ â±ÂoÄWâk±¿%®Âo‰ïÂo‰—â·Ä¿Åo‰ïÆo‰—á·ÄËñ[â{ð[âø-ñ½ø-ñ}r‰\/î—äâù”|Jl‘O˧ÅKòYI×ù¼|^¼"·È-âU¹Mn¯Éír»x]îQmÄ6Õ–lÈ1•©2E£ «°hRÕ@q\¥Î"ƒS¨ ¥TEªH*õšzMZj›Ú&µªSuÒVoª7¥OíP;¤£êU½tÕNµSƨÕ ýj—Ú%[XÏYÏÉXëyëyÙÒzÑzQ¶²^²^’­­—­—eœõªõªŒ·^·^— ÖÖ²µÝÚ.­·­·e[k¿µ_&YŸYŸÉvÖÖ²½õ¥õ¥L¶¾²¾’¬¿[—­Xÿ)Ö·Ö·2•=SË4öI-Öqë¸L×ô';iŸöÉ R WvÖ-uKÙE·Ö­eW¯ãe7ÝN·“Ýu²N–™:U§Ê:]§Ë,¡3dOÝUw•Ùº»î.{é,%st¶Î–½uŽÎ‘}4™«ûê¾²¯ê ÌÓa–AÕQÒù:_†uÝ_Ft.Q=@ýô@=PæëAz_Ÿ/ÏdÚrûΖg±×l9˜ýeË!®åZ²Ðµ][uבEnŒ#‡¹-ܲØmé¶”g»­ÝÖr¸ïÆËsÜ6nYâ¶uÛÊn²›,KÝînwy®ßöÛr¤ßñ;ò<Œ?FŽò·ð·ç›“+¿?,‹Ø ï áw ñiu°:eßcß#,¼E]Ÿ²™§lf3›ùƒu€eྨÒ.?¥'§ô¤™žH{Y–8™¡‚Ö`=šîÔòÅ@:ÝžÌÏ^ñ9î}„ôÉXçl:7:CáH‹œssJ;¥”¥Ü¹H‡:#‘9ç!æŒBZ쌦´ˆêýéPç¤EÎ…H‡9eH‹1”£z#ê\‚´È¹é0g,Òbg¥ÅTïr¤CñH‹œ+s®DZ쌠óëPç|Â"ç"ÂaÎe„ÅÿD&`æ…ÎÕF2d®1’™d$3ÙH¦ÜHäZ#‘)F"ÓŒD¦‰Ì0¹ÎHäz#‘™F"7‰Ì2¹ÉHd¶‘È#‘[ŒDæ‰Üj$2ÏHä*š¡3¹¹ù?”H…‘ÈmF" ŒDn7Yh$Ri$²ÈèÊb#™ßÉ,1’¹ÓH¦ÊHæ.#‘¥F"w‰,3Yn$r‘È #‘ûŒDî7©6ù‘ÈJ#‘ùÈДßB"÷þ‡Ye$²ÚH¤ÆHäA#‘‡ŒDÖ‰ðßî_Hwæl‰Ý˦6öÊ µ‹‹m:%Û#ìR›NÁöyö(þ-¹}-Å©ôy†}}=ÕºÓ®"\aÓÙ¾߮&¬±$|Ø^CXk?Jø˜MWzûyû›®“öKöVûeJ_µ_³éúg¿a×ÙÛ©Öö¡|q¾xÂ6¾DÝmþ´Ö=ñôLÐÊWÒš/¦`AS4®É6­ñHkêEƒˆûÅg¢­Ì—ù¢½\M»9Y®“¿hÝ6ˆù¬|V¤âIW¬K0Ï':ñ›‚D†l'‹Îv¶-ºØgØgˆ®v¡](ºñ›|Dw»Ä.™ü&ÑÃ.§ûÓ,~{èiO·§‹l~Wè…ç9ü®ÑÛ^m¯}ø]="—ßÕ#úò»zDž½ÙÞ,‚ü–²_±_a~WˆØŸÛŸ‹(ž‘ôã·ôˆ|…¿Bœæ=Ù·V@ëGÁÖ[n/Ú÷½qÍâ™ ÌTšš÷6¯)Ÿ ­}û—å  9(Sÿ¾ïë§“ý‹! îMš•K«­ô´v/Ñz½ï-½Õà·‚TlHÅI8„‹YÆ`–~̲fK\.YÒOû&ƒvJ,íV´3âhG$ÐNH$ÍïBß4=´;$O#m½´´if1éÚý¤c“n=Fµ•´¨Îþ‚ô¦ÿ6\YNhËF[ÆjA[4ô¤%Æ=i‹ÕOÂê·Ãê·Çê'cÝ;`Ý;bMS°¦©XÓ4¬ikšŽ5í„Ùf`¶1Û.˜mW¬i7¬iw¬i&Ö´­À “è´9ƒÎ›³éQ+VEp…¨&Kö=×Ñés#Y³hü¯Ñ v‹ö!D÷ÑYô 8,ŽŠ&©È®Åþ̲Á:Èþrõæ§èÙ)IVй*%ÿªEº’e’d—$Y%)ù¿ø7Ì?Ø#)yÄY{ò¯ )’•! $ÉúÈ–‡lŠ$‹"ù?­Œ5‘dK$YeŸKvDÙç7³"ʾžÿ¿‰,ˆä7õüÆþ&²’¬†$‹!ÉZH²’ßp@6B’…üŸˆ°]þkÖ«žŒUï€UïˆUOÁžOÅÚ§aíÐîthw'ìù ìùÎÐô.Ðô®ÐnÐîÐLèGèGô£'ô#úÑ ú‘ýè ýèýÈ…~ô…~ä™ï÷®PSyW“½ºÖPÆ“ýþ²M\ªŠÔkj›ªSoªª^íT j—õœõ¼õ¢õ’õ²õªõºõ†µÝzÛÚo}f}a}i}eýÝú‡õ­õÕh×Zû´«[êÖ:^·ÓÉ:U§ë ÝUw×Y:[çè>šŸ`‡uTçëþº@Ðõ =Xéb=\—èR=RŸï|ç4:Ç]éZ®í:nÌÿbç\ ¡ÜÚ>ï˜aŒhä~¿gxgÜ‹Ü/ån$¡‹Ë`„cÜ*Ååär$÷4nQ¹DŸè"H!Š.é …t%ÿwt*u:ß9ß­ó?ë¿ÖçYÖÌóìýîwÏÞÏþíçÙï¬Aq¡¸Q«Q¼(,J%ŒRD#ÑhN4`Æ€´×ÚDÀ °Óÿžóý÷œï›ghhåv°G' óÙùþÒóÖ¯Žw"i+NŽYÏÂK¿äœÉ}ÍþP¬ï<É,XZÕ—¬ F‚¢ß s9,ÊP8Hÿ¡ ¶~+ÐUßJæïEÿV »üX ¾&k÷ÿFÊ~/¨’oå•GÀ–³/ßQòüåÌúq"Nìœ* V sÜœÉ1…L†pÀsœìȵת8·Kx ¼4¸(˜šsÞ 6\æÚ)¹šÖy·¡\‹/!¯ ýë÷”çü˯„w˜$ó7LkPÄÆ â¯î%öI×èã°ï—;5•ü¦öÞ¼ž}ÙÄlÕV§×óÔy©ÞƒÏz$À5šjìÛ†‰5Æ$Ë`·&òÞ¥æ¶ÂÙ QÌÄ¡±ÐXŠË#VhväÔH$(Î2ò@¿¨Ï+^•†K‡Zyc ú2]σ—'P|5@1œ#”dé²!P0†ÿïxÇí:AW ]GMCPð¼M.ZtaUD؃¶ 5s#Ó2ÁÜŸN§®SW÷¦ª}žE5oJ:u™eU§Ò(>aÞôPuh’!G„ÜòÀ .N#@.¨UÝ>÷v  ¸é³Â6üv‹ˆˆˆÝ‚Dû·mÓ¿[vl,Ï)u׬´Ë#ó=¡$ÁóÈ­>4¥ƒ÷ ̃T…öô)©cG¶ˆ^áÒlHZ|v>ã9þ×€×aˆÞ²ûÛ×±`Or7ç;šR–ü2ò‡»öÎÈUkuÆm›º‰¢½ñ’zËÛÐá‚WOP6ë7¨wÞ¾9e/CCHÂOXç5¦zäÑÎÔàh3 )œ¹ÌRÑïñ·p@zÙÑ …/ôµÜ™DÂéžAÔ¯„uZP“€×cŠñé³ ÆÖþ_J”ÿ¤J›’©þ$š”Ñ\Êœh·NÏ\G§«­i‚5ôÌðò ì§O$öÃOD$ÑÂÉÞ¤?%ZïõÄ¢ãfÅ»OÛº„“"NéÙlX< /&ž\ê9+ÓK žåÁ¶ xÂZ$™áë¡ð¹ Á,ÿ`Jd/D Îs¥gýt§û4øæÖì™®4ßTêx¿·f¾—EJË™Ç÷ ôޞܼØ5ñ«vÚcü¢Õ{SWݤýñüÏÚ»­w3‚oô ìDñÊ(w7\×n(¤î*Ý‘¤{¡õŠžÿÎUDö… å&u˜Qú¢'Ë<=¾³U'nˆ;{o[ï¹Ç9ÄHÔ›§²Ò^ ndáEêÚö-Y}PŽy0exZÿ…ÆÁŽ‹2;»=Ö#ªÑuÙAúeëìs{A^¯$ãp(ºB^€èUò™^ "ËôÂO¯ËX@s¦+:2«ê ²As×|cäü2Ux¸öÓ:–ûºŽ(ÐÜ‘}ÉÞžt’”qÝŸB#Ó£–)‚ºx% D)Âo*¥þ“!ÞŸ¡¦†¶ÕCô¹(ž»SJÊ$'œ¸Aô.¥óÆËg»>f b­£Ç‰4¨3 Ï—]1±“½Cƒ=ÐÚ‚>ÔqFjãëÿ [ëäÒæ(ëú‚°­zö+XTMRŒÎê&yÔƒË7ÎMî{a³×oZÉõñÆ_,Û¹×!;Fz[…ºÍ¿ŠÊ]òŸP›ëÞEÕo¤Ímxf¼¿cxÕòÒ|)Ü—ÃU—›¸'›n_ Ž•s±•º-|ÿÔSé“½ä ¨¶÷"Rz÷ÈQcErë‘Ô£íÉyÒg¸=ògŠÎ$øÇ­ À5…gVÎ îy+'wþ`W@¹%^=÷ᓃ~Ø>/Ëž[Û…xhÉ—‹ ªàFKä¼ÌL9¦NÇu·Õd°s@üžþÌoAÍe~‹ýüu@M"¶–ÈŠ2¡ “¥j€,õŸ ÿŒÞÇ Ï=°JWÙ»KMx¸yäI[Ž£¬Cå­A!;¹ÕS=e=6•tPŠw’ãŽóQ¢&ég²=@…û°]ã{šŸâX=ǃ€RÙNÉr‰Çf_û‰©~Ø3vPüÙ˜]qáeYbGò‚yg÷öªîjDÑü‰À#~ýJ-ˆÕ ÝO•,Ô+ì7;­eS}–'¾Ú [Øw7«v\:kß»ÛØW¨bSyÚq+Ø&K_^Eeßò¬Ñ^öØMEóÊx-ù9ǼØùÈw@ÅÃ0 Å‹†G²MWqÎÇ«$"ñyCëãŽzÂëŹÏ~˜Ë«nÉX;/Í#[¯Hq}¦÷ihDÊþ½~CoÌJzC›ý ¾±i`lòñ[è]âù·»'U)X¸‰YZiêúš«FúCý¿ÊBcÉJjõ`3Óœ¨«Œxp+ÊÑ8«FqZ…=}«eOj£Z_Ñá ¯Æ-ðvRX‡œÁÝF#[šª\sņńЦÈÙŸºŸ¯¦FZRÑÈëÉV#3DAûÓé£cÉwb.ÿš1Ë®Ï6ñ³Šœ õýÛ£‘9jÜs#Ô BvÇRv¡iG õòýpmŽ<ϼ< ³’2á!Ìwâ7…ã ÖÒ¸®?£,Å£±CWО)3ýk&í~Úߦµv{ñÅÉ Ñ\&{úˆ4é)°£)’äá¬AóóܾϟýFÿ¼¯k-N}l>>¡ÓÑeü5#°BϦïmÔÅSB»½”§‹ò”5Ù#D¼Ú $‚$3\¿¨6u™Ö>]ÿ¤¤œ®Õh×"˧Î¥ït8ÄÍ”ÿBmmµ­ßõã&K1QÒ1 ï¸ ßv‘ë2Òݦk'š^[uªö blT¬äv¸=s™>ñ(çXÇ:Js¬"w*\úb㲢󹳇 Ã=ë‚ ±'.ž²œá£,&k>9^?,ÛîÛ|L<‘Ïn€«ÚšÚ8*ý´¾ºÃ».ÒÙg¬æP‘Q]yº–™&r/=&£N(G3ÝË_dNè¾;)aßž;µññ@¢⊾N¾þk𳲬[xå%ž6w[ÑÂõCµÍ‚»Ú±Å‹x" d ŽÀŒMüãåoj¿ó2c¯²¢´ßÜ–“ ¿jå2t߯ž\Y*ÀŠ?_ˆÀC,š³¾!D:¸é]Ýv%){â(^; ôYqÉ*¼ èÌT‰Q‚ÙÂÈ0o FY>†ö…ÑaR0gXŒ i~Ýzç‹*Tˆ‘ûÃ5J¢RühžTÿ(©ïö€ ¸+Õž~‘aèy>!Fuô-‘ŠoQÛ&¿`Ô,¹U56åØގÎÍ„™‰ òeâ|o¸¦©JïbÉ'¼ Û¿Ùg_ï5G±„ Ž#§R͖ȘJÌCpÆ8Ìï ÖFÞÉ¿gÆgfQTdgt á±…¯â½=JCÊcƒ•J‘®«“zËšáV‘r-9/““«EîËåk[$‡UvüâÖÕÃÀæ=a#55&q³z&ýš†Î®×G RF¦G*ÃN2ÄRòü»¯‘¦{µxÖwö×Çà=ªÆeµIEö(µ‘Þ/rpÇízTÛ—›.¤ù¼‡s£ÈYó:÷oa0‘ÌB\dÀWL.;žGC&öegŒÿÇ6ÿoÎã8~sEæ6Ph¥r}}à@wüR‚įf•Zx('ÕÖ€‚˜ïÝPLï9mý(äÀΤ×ûŠ8-ov }Çf–ƒœ‡ì ¿Z3ËojvõÖ¬Þ„=³´^#«Ýÿg¹ñ(Œ‡Øý]ý¢-Lp<-’=öÊ@CÀ9gù¡(AÏs¾ÓÝ÷¤+ùÚK¬,kœB­@aémËT¥tË_ÎÔ„¨ð“OG$ê£B%n3î•{ð']¹6¸ûœHÙ¬ (z©ÉOpF–Ð×£s¥×Á&šÈ×{©&^æÍ¦‚Ò纉«ŽYH˜c‹“yTT}/k_³c^:?¿MH”Ê™+µuÑùÔÛüÏm×gažJnc¤gȨ^9 ô~Cû5±ù_ň~£Z›@+~5']c¦ížiïçÔ-—B_×Iïà4aÇܧÀ`ÿ#ÿÿPK!|ŠÖY€Æ˜¤4Resources/3E01724F-0CCD-1AAE-6812-9456B8194A2C.odttfì} xTEÖö©{»ÓtwÒIº³u’îÐ$, KX$M6–°…¤! [BÂ*;ãÄe\qwTt±ÓˆWTÜwÇmtTÜ·Qg“|ï½§ @‡ùæ™þùžTç½ï[§ªÎ­:·ªn5&Y%‰Í“Ï·3õ¥i–´QgìÓÿ›É×^7vgÒÛk"ú-h½®žÄf3QB~QþØ‚­CŠo$qÞåDæ5# ‹Š?{ò"uc\¾9qBÙüº¡ç‘¸},‰­#ËüùªÚãgRó*ˆŠßP–Ýïç÷ƒ&ïQuí¢š¥eŸn´õK&2>]»j¥'pÃþ׉fÛ‘Ož³t~‡òA…'Í­Y±”’É‹û7 ½}î³æìÛ-È"zû­y³kê}ÐïüOCùÀy0Øîµ¢½¸ ù®ó­\óNö´r"%—(û/gÎ^¾Ø»ÇÓ…D5lŽç.©­yè½Y$ò D©ãÕ¬Yš60}*Ú7£½gqÍ¢Ù‰÷,;›D½‡È6|é’+Û\´ý©ÖÊ—.Ÿ½ôÌû”V¢Úíì$@ÆæIž¹Å7ÍŒö#%"ŒH}µîE_xw×ùG´l?dzÙpRˆÚ…Q+‰ý·=räÖðCº§vÉü‚f‰Ê ÛÈHkHEK;eÓl¢èËq_¥ª!S\ŽR³q«1.S™ÕWi£BfR¢ŒŠ¢TÅp€”6íhãû+óxÈGtÔÀ}0ݬdxHÜ¢•©{Œ‘ÚHá=òxoÄ+D†Ûð\þÉd¨¢†Bª9eÙ!ÚÑ>¯~Þ1ÿkI½÷Ôõ ¿·+†ÓóuJÿÓOÝ6ìí_÷iKµÿÌ= ]Žû2Tœ‡{iä)ûõ)Eu¸gºç´ï×H]L©tÆIönÔ~SÿQ{õ̾2 t›ú-:eÙlÌëöþ:æµé6Ãy´ð$kŽ·‡~ÛÊ£¥V†‡ü>Çm”§n†û^qê2Ã=4çtú.“úû14Ñõð q˜@£OÙ¦»bû{n¡[Nû~-”6œd‘ªçŸü\ÕùTØ!ÿ&M;Ý{ë_ڪ΢ªS•™–PUØû€àrÔ­îp¿£4ýtî¡,£ô°ë)Ýü&¥¶CßÒÃ(ýtÚ‡­:½zÒŸV?,÷(8ùZ™áðq›©;¥«ûiÀI¾NkȶUjñ]øúƒ:z}C*]$¾l{Sƒ–Woïàgë©Ú†ÕÑÖö÷;©/¹§~f¿Z?äK—ò|G¿j•žªqgG»²“Ò:øü”Ò õm§¼7êc)ÍT‚ùý§\_«ƒ~^õêɤÞD]ŒÍ'?Cu5õPo¡.'Ù{På¯ùRvP¡ò -TÆë§êÎe£Äßq†P‰r/PÞ£teæÈ‡4U¹‚úÉzÊ—ÇÏiâaª*þ•¶ÊM”+~¤¾Ê$¦Œ¦^Êr(ÅÔO)¥>JîñóÔéÖûw$õ*þwúïL©3uLÊ”¬|F—ªaT¥–Ð¥ÊÝÀ%t©V¦N¥KÅ6Öz]ä ‹BeõT¥¼ÃZ¹¦( T¬L!ƒê€>HI†"ê¢ì†ïÍÿí¤3u¦ÎÔ™:SgêL©3u¦ÎÔ™:Óÿݤ}ÇÔù³ÐwÇÐ÷LYþ[ß3õòzþï¢Ú÷Mý»fè{¦öóÿÝ(:SgêL©3u¦ÎÔ™:SgêLé_JjÉü·â'ä ÔCdïÂ0‘|dÔK؆ï:=¨7 ¢!”GÅ4当’fÒZº•î¥]´WôU¥d¥ôNé›2 epʰ”|Ý“èIñdx–zV{Öz6y=—5´µé÷¶‘‡ºS&õÑ=Ž Q4–&Ð$x¬Ñ=Ûyì“Ò?%‡ë“u+áq=®é;VSØ=ÃhX¯,O‘×x©ÐëiU¥Ð[ ½•žÀa]Óµ!CÏØIKC OQ¼BO@T{ŠÅ«æ5UÂ_“%¢À[0;¢W5EX -PîÞ¥M¢ûp¡ ¥{Ñ&…Ì6í¶5½¨¦.0±´¢¨Ð•–V©Û¨@÷+˜t_žùZŸi³§)k_ã%ÍvšUi­óÖÕL«¨5hÔ¨56n Dgzx =Ö~œ€!Ïdy ‹™^8+™tì"`L·{=?:ï=|¨£¥&d K·ÿHšÔ†x,L(—šÐ7ôãKKÓú²¹ÙG³ 4”VpÞC³\AòegV”j­dŸ,qúµ’Yr¬yµ7M{TEÕ¡ŸUó ³<½²}ý'?(÷ÔŒêYµó4®™Ýè-,丕W|…¾šÐX‹šúd£~M51_ CiE Û»4àðæs<Ú3˜_V¡7 5 8 T]jÈ.*Ôúå)j¬.äj¾¼¥{)§í@SkWõ§J­¸<”Œ¢ÆŠº9wµ«ósŽ§Â•ðU"|•ÞŠÙ•ÚSòÚ=àviúõVÛ µeemä¦t³§Bq©•ÚÓ‚ÁSŒ‹7 ìx\zV{¢ùÃ<ÂE²îª¡©~QÓ FiEªÖ´`”+­2ÓotÉê“1=`nçËñ>ñ}~µk\[ëPOÑìÂvìàÔê`ÈÛ©û©h±Ý-ÌÚã%‹Ôt¬\ظÑMÚSLðh¢§Â;Û[éÅòM¬ÐƦÅZ¾%eÞ’Òª ýi‡fIy‡—çr.@i(–¥s°8Ó%«ž©çeGP… UA.ÁSQÕ\zšÛÚÊ+Ò^r®LÃT›TUÂ3±÷ÓÇ ÞH Õ0 4ÔÖhý …ÖÖ”>º¶ÓV:D•Ñpxy@b½6ѨÏPo߀L ¡2P™©Ý´b~¥>íå‚ÇÎ>Ú²+c¼ýôµ‰¥‘¾I£pôÊ*ØâB7«ä ™¬èy­EµÕDÛ@µe˜ê¼—F¸Ø2[¢!c¶ŽW¨´a©é[D ¼7âGÓ–ÞÚ’4¦›*+¹óznS¨îmXУŒv¡ 5@tP4Zë ~6¡«ZÕÇ57¥Í4É»;‹ÖiÝ“ Å[úèlþÜÞ‹7W66k{„%äc?[MÚÈ­ˆ»š^ÞÜv—÷¬´v©W–W{9h“\{1±©²ñDC`jf¯,ó‰V›nnl4ÛNÝ€ãe¶cÍè)Â[ƒ(®zš• îOc Ηâ<)Ε¢AŠs¤Ø Åz)ÖIq¶k¥8KŠ5R¬–b•õR¬”b…ˤX*Å)K±HŠ…Rœ)Å)æK1OйRÌ‘b¶uRÔJ1KŠ)ª¥˜)Å )¦K1MŠ©RTIQ)E…S¤˜,…_Šr)ʤ˜$E©¥˜ Åx)ÆI1VŠ)ÆH1ZŠQRŒ”¢XŠ") ¥("_ŠRø¤È“b¸gH1LŠ¡R ‘b°¹R ’b ¤è/EŽý¤è+E)²¥è-E/)²¤È”¢§=¤è.E7)2¤H—¢«^)ºH‘&…G ·©R¤H‘,…KŠ$)¥H"^Š8)œR8¤ˆ•"FŠh)ìRDI)…M «)"¤—Â,…IŠ0)ŒR¤P¥P¤RPHˆ6)Z¥h‘â)ŽJqDŠŸ¥ø»“â')~”â)þ*Å÷R|'Å·R|#Å×R–â_Iñ¥_Hñ¹ŸIñ©ŸHñ±¥ø‹Iq@Š¥ø@Š÷¥ø³ïIñ®’â)Þ–â-)Þ”â )þ(ÅëR¼&Å«R¼"ÅËR¼$Å‹R¼ ÅóR<'ųR<#ÅÓR<%Å~)ž”â )—bŸIñ¨Hñ°Iñ {¥h–bH±[Šû¥Ø%EPŠ&)RÜ'ÅN)î•b‡Û¥¸GŠ?Hq·wI±MŠ;¥¸CŠÛ¥ø½·Iq«·Hq³7Iq£7Hq½[¥¸NŠk¥¸FŠ«¥¸JŠ+¥øWHq¹—Iq©[¤¸DŠÍR4Jq±I±IŠR\(…<öyìòØ#ä±GÈcÇ!=B{„<öyìòØ#ä±GÈcÇ!=B{„<öyìË¥ç!Ï?Bž„<ÿyþòü#äùGÈóç!Ï?Bž„<ÿyþòü#äùGÈóç!Ï?Bž„<ÿyþòü#äùGÈóç!Ï?Bž„<ÿyþòü#äùGÈóÇ!=B{„<íyÚò´#äiGÈÓŽ§!O;Bžv„<툂]šÀ©9˜:Ü3s0Õ :sçS‡€8wÓ†`ª´žsë˜ÎfZËtV0ehM0¥´šiS=—­äÜ ¦ål\LÉ-eZ´˜«,bZÈtf0¹´€i>Ó<¦¹Ls‚É… Ùœ«cªešÅTÃTÍ4“i·›Î¹iLS™ª˜*™*˜¦0Mfò3•3•1Mb*ešÈ4i<Ó8¦±L%Lc‚®Ñ ÑL£‚®1 ‘LÅAW ¨(è *d*`Êç²ÜÎÇ”Çí†3Á4ŒkeÂÍ3å2 bÈ4€õgÊa/ý˜ú2õagÙL½¹]/¦,¦L¦žL=˜º3uc×Léì³+“—© »Ncòp;7S*S S2“‹))˜4”È”LšŠgŠc£“ÉÁÆX¦¦h.³3E±1’ÉÆdå2 SS8—™™LLaÁĉ c0±d`RÙ¨pN0‘N¢©U¯"Z8÷ ÓQ¦#\ö3çþÎô7¦Ÿ˜~ &”ƒ~&”þʹcú–˾áÜ×L‡™qÙWL_²ñ ¦Ï™>cú”«|¹9wsaúˆé—}Èôßgú3Ó{Lïr•?qƒñS@oã'ƒÞdzƒdzé5¦W¹Ê+L/³ñ%¦™^`zž«<Çô,Ÿazšé)¦ýLOrÍ'8÷8Ó>¦Ç¸ìQ¦GØø0ÓCL2íejæš{8÷Ón¦û™vãò@Á`ÜTPS€é>¦L÷2í`ÚÎtO0ûµø{¹›é..ÛÆt'ÓL·3ýžé6¦[™nag7³—›˜n䲘®gÚÊt7¸–s×0]Ít—]É^~Çt—]ÎtÓ¥L[˜.áš›9×Èt1ÓEL›˜65  ƒÎY  ˜Î:ç€Îc:7èôƒ‚NlÆâœ s hÓzn¾ŽÛÍ´6è¬ÅÍ×0­fZÅTÏ´’i»^ÎÍ—1- :kAKØÙb®¹ˆi!Ó™L ˜æs»yLs¹gs¸ùl¦:®YË4‹©†©ši&Ó ôtîÙ4¦©<è*v]É7ª`šÂÝÌ7ò³—r¦2¦IL¥A‡41èÐî0!èЦ÷ø ã|и £h,W)atà\ FsnÓH6@EAÇ&PaÐq¨ èhåcŠA#˜|LyLÃ1x¿‹387,] Ê4$­MÁL¹Áè‘ AÁè ÐÀ`th—õgÊ Fgúq;Áhm`}‚ÑÚÚÌfêÍÍ{ñ²˜2ÙYO¦ì¬;S7¦ ¦ô`´¥®L^öÙ…}¦±3{q3¥r»¦d&SSbÐ>”´ÏÅí3AqLN&S,S 7ˆæv6F1E2Ù˜¬\ÓÂ5#ØÎdf21…qM#×4°QeR˜ùÚ¢f¹5´FÕº[¢êÜ¿@Ž?ÃöwØþüüüû_ïQöòßß_‡a?|…²/‘ÿøø ø4r®û“ÈyîƒÀ_€`;þøxù?ƒßÞþ¼c;Óý¶­¯û-ð›¶…î7lî?¯C¿fËt¿ ¼¼Œò—`{ѶÈýôóÐÏA?k[à~Æ6ßý´mžû)Û\÷~´}þž|mûp} xxĺÌý°u¹û!ë ÷ƒÖ•î½@3°ö€Ý(»e»` M@¸Ïr–{§e­û^Ë:÷Ëz÷vË÷=À€»»€mÀ–^î;À·¿G›ÛÀ·ZÎtß}3ôMÀÐ7À×õðµ¾®ƒíZààjà*àJàwhwü]1Þ}YÄ÷¥sÝ["ît_q—ûB5Ý}šë>_äºÏó7øÏÝÞà?ǿ޿aûz¿e½°¬w­/Yöúíëß[ï‹ ‹Xç_ë?{ûZÿYþÕþ5ÛWûT6ÒåBß0ÿªíõ~C½£~e½úC½Ø^/ ëEŸz¡P½½ÞS¯ZWú—ûWl_î§å—7,,7 ,?°\¡å"¢¹mß®å®Ôb°oÝr›½x™‰éö%þÅsù ƒósçúçmŸëŸ“[矽½Î_›;Ë_“[ퟙ;Ý?cûtÿ´Ü*ÿÔíUþÊÜ ÿÔŸœ[î÷o/÷—å–ú'm/õOÈïû¸ÜÿØí%þ1¹£ü£·òÌ-öað”lOö$«v­ã“Ñr‰ü>.Ÿë€ë[—\×>—•äNRzD%Š‚ ‰bIâ9‰—%ªQ ¯$(¾„YÅQñ¯ÄÿM¼!Öߣw1ÅÙãfÅ®DE‰¨¨¶(Å…êQ‘îHE»´Eª¾È¾ƒŠ£ln›¢]ÚljœÏ‹æ±›ubyq”ÅmQüy– ÅgÉ+(öYzõ)&Ux„ a©f­Âé.ƺÞ'Œïó¦ò²ÌÌ’f3M* ˜'N ˆ‹éeÚÕWZ»(@þª©MB\ZÙ$”‚ò€Cû/¶zþÂ-[(?¥$RV¸5¥²$ÐáÓD¥4ÅQ~eæŒõ+23WÎÀeÆŠ•™úr¢^ËejFígÅJäµO½ž§ÌßL\ 4sÒJi\ùÛ­þOâ?ÝÿþÔDÚ/ŒhS. :å|à<à\ 8جÖgk³€5Àj`P¬VË€¥À`1°Xœ ,æó€¹À`6PÔ³€ ˜ ̦Ó€©@P TS€É€(Ê€I@)0˜ŒÆc` 0ŒŠ" (ò€È†gÀ¡À`0 €þ@Ðè ô²Þ@/ Èz=€î@7 Hº^  x7 ¤É€ H ˆœ€ˆb€hÀD‘€ ° Ì€ Œ€aD®*  ª°‰V ø8 ~þü ø øøø+ð=ðð-ð ð5p8|| |||| || þ|>>Þþ ¼¼ ü xxx xxø#ð:ðð*ð ð2ðð"ðð<ðð,ð ð4ð°xxxØ<< << <<ìš=ÀÀnà~`š€p°¸ØlîþÜ Ülîîn~ÜÜ ÜÜ ÜÜÜ\l®®®®®®~\\\\ l.6ÀÅÀEÀ&`#p!ÕhXÿë_`ý ¬õ/°þÖ¿ÀúXÿë_`ý ¬õ/°þÖ¿ÀúXÿë_,°ì{€À °ì{€À °ì{€À °ì{€À °ì{€À °ì{€À °ì{€À °ì{€À °þÖ¿ÀúXûk_`í ¬}µ/°öÖ¾ÀÚXûkÿ?½ÿ—§ÊÿtþËSÂÌD¦›‰Z¯ìð[Ýi­ |6Òº’£÷hµ•n¥mô Ðãô½}Ú¿'~©õ,ã"²ª{(Œb‰ÚŽ´nÝ4#ÛY®D.Öà9ni³·}}‚íëÖ+Ûì­Ía1¡·µ)¯ÃúWÑÒvïWäÛjyet”Þâ;ÓÍ­÷µÞuB J©Š¦Ò4šNÕTƒñk¿·>‘9“Ò"Z¬ç£l.®sÓ~¯{‰®×ZBKå´’êi>K¡W„rZÙ2=_O«ñY£ÿEÇÙ´ŽÖ‡®«uË:”¬Õók€ tžÌ¹tž®$³å|º€.ÄSÛDÑÅ¿™»ø˜j¤Ít žó¥tÙ¯ê-r—ãsýóá*ºš®¡ë0/n O°^«Û¯§›éÌ­ìjXnÑ•Vú0=M»i'ÝG豬EÔ8"2.sô.E Öa„ç·ë1Çoõ±hmÀص±5†FºöóÚµXŠ£Vó|Ôd/ü4/ëOˆÄåëã#âÜÕúø[ÛGå·¬27¶‹Ì zNS'ZM_C7aÞ†«UMýšÕ-ºno¿ùXÝ[õüít݉gq—®$³eô]t7Öö=´vàs\·WÌ;é^ýɨ‰‚´‹îÇ“|€öP³nÿ­²SÙw…ìÁc–½ô =„ò(íÃNó>Òòl…¬ûu矠'‘×jqîiz;Ôóô½H¯ÐSȽ¬_ŸEîUzþHo Ôkô®-ôªñcŠÔþGFÆçi>FìJ+Ô×±‹¨d¢Á4ŽÆÓԇɆ×} »w; ͽLâU®‡3 Qà‹2(¶=IIyÞ=¶¨Ñ£›E¯ûóL[pÌÍkù ååì–Ç Î>,²ßÿèƒìß½=8;ç£7>êÛGD§EëpD*&“#ÌÛ¥·2 [ÆÀœœ~Õý3¼]"ÝÖà ájN¿TEuHËpEË õõ_ªÔ -aÊoÞäcjR”ÃfT’bz K·—MMÖ;ŤšÂT£ÙÔ}P~—’…E]Þ5E§8ãRbÌæ˜”8gJ´©å=cä‘ï‘G ^¥† –×U½.¬šS{M=9*Ön°ÄÚ£ã̦˜hk÷Âi-Éšd§“}µŒCX¼mG ŒêBtÓ^êÚöùýV»ëm‰Œæ¶oï·@X¤ˆ€ð%i*Ý®]múÕª_}ÝEºVœeãºz3Ò°Z¬ ]R¼6g°’ÕnUîó>æ}Å«z­^kLʤ¿ÑOyyy1ƒggOŸ?82:Ç~¸_t"ž9_…”™™¦‡¼›š¦FªÞ. Žs¼É«¦êÍžîv§Ç†–´|º@ˆõ&§¤G ³l‰ÝR==“" g‹ÅgĹ" ªÉ.†¶>n 7#]q† %Ò¬ªæ(Ë––³µ¿3ÝAd˜]©”I¹ô¬/É`ãÜö(íbÃ%ÁŠ‹cÕþ±¯{’Ó‡r§åN§%K«œ¥UÎÒ*gi•³´ÊYâ;!µíÛ M9ˆô.Ô»+*Ä6ÚeÕùó]»Ïv«eŸE±$uû¡o_SWý_¥Kû7 K“©œòçéóv°Èžþ‘´~od²€93s0kÕið¦uÉÝ`N¢çÔæsª*ú÷V¼Þhm2Ç—áÎP»ltëÎø=âEÆÊ«jûÅeŽè9`ZQ÷Ö–¤Üª1Áý“&ŽOyféËG†VdˆgÌ4¼§ÓÝÍp^7wVùÚq½ËGæÆD ˜´XÙc$·N÷ÐòþŠaîÖÜäA“HPMÛ·«1«xÖ®dšŠJf(*àCZTÀ_kQÉ E%óQ|ÇŽ¤‘Mi”!²‚±e†‡DO@}Dï¦ðÉXÒoÖ ²yøö·ö÷í“îˆ k·,Ü¡eª-`§#UÑÆ­M+ƒU1š¾™gÞðÂeãÊ®yíœÜUÅ.³Q5˜-æÈ~–M˜¼¥nЀÚ˧Ž[QÚ?ʦî±'ÄD:zts•ßñÝM·ýrß4§§§+26)Æ‘Þ-»[ÑÆÇ×ýÈ9#2²3¢S±µYvfY ¹iµ/%/MÄj3'V›9±Œ96ŽMÀhcÒf%ql’B±I ͘¤ÐŒI Å&é!|ïGl¬ÁÈRW³Èh2ò,‘±xCΈéÚŽÖaJ˜ÚM€Ë&ßùí¶Ö¯õÇŸ~÷ç7•îî¿äž÷5­»gù`åú»Þ9‰ô”Û?ß:÷c~‰Þð¸ö7Œ™º#Ë¢UMIÝBO´[¨×ÝB½îêu·P¯»5+ѾððXO¬OjfŸ­!Cì˯fˆŒŒ°Dí?ÐØJ»šÂŽÍúéË–cXÙú6bÍ~ý9+'ÍtoZô R]gˆ°™[®ÔF¨Ì1ÛÌF#.­a"hÆÖ`‡¯³-Â02ÆcæÑšc\ŽW´¹uA¸=96&ÉnjíkŽvéãn;¢–cÜÝhZ“)64îØÐ¸cC㎠;64îXŒ{·-…RSLÚ®ØØÄ°fÑ}W—ÒDmƒ ½‘²÷G>6:qÒ`äÛFW-ÇÀL­ˆž ×µÏìð$%tq˜1Ôbݺ?6£e²»œ±®èð–OL6“ш‹a§6ʔЈ ñ–Ȧæûóú ¯54(khPÖР¬¡AYCƒ²j39¾«E›ÑmF[´½Ð:mF[´]-ž|Nl…¾XíbÆ·sÊ)^ûgvhüÊâ{N–—å‹Úg¯Z…µãûSàpžÀ>÷†žPŽO…ééÇ‚Ó>N¼Î°Ii˜hv¤%$yæ–]P‰Z¬ÌŽ. ‰i³2NT’ÙªÉjV†·KЫ$µ—œÜg¨;ÎPwœ¡î8CÝqj¿›NáQ“œÍ"3´EöK²;íVܱÐj±«(¼e|JñªöÚ-q¸bñžvÊn½-<:9±°L¬¡a´Ãg¯¾t¸bëÓ'>;;¢wBBRóin€ÚìKíÚ×jÐæ_„6ÿ"´ù¡Í¿mþEhÑŻؗ¨…ºëÀRKB¼-;¡oï0w÷R·_N¯¼Lr0PùFÅéÄ~LE>#;'G;¯´{^¡QpZÞëR?®ˆíà¢Ç',Óìp'ƧŚ•ÖÕâLq8S¥u¤À\KLðÄš²\ó<}º&„‹ÕF±Ñ’äÎH\劵¨s^eŠ0©¼~p Üz̾­gWkRw×/SÔm©=-á±)Ní¯çÚ>7¦áÛx7ZçKrh¡qh¡qh/‡ö²qh¡q4+9¾põÁwW•RC1O Å<5ôBNýÖ¾¾òÌ{.ÍèI3ºïû´,K–lËò¥ñ)Ù–íØNì\Ž“ØNIˆC’æ åÊQŽhÓ²-ý–mw»»mCœà[ø~_ ¥-ýøöKÛ¶°¤ÐC”t·-DùÞwf$+Ž“rlÄÏ3ãhÞÿÿ9þÏ󼣈 Ù!bîx$d9bFÃOªG½ÐF$c—'‰ r™8æsNE&Þî{øõ#Ÿûñ½]}G^?òÀ™ÏvŸ®ùÂìì&ÃÕŸ¿qç×…°Gÿî±Éñ¯ýåñ£ïkrìþóŸnø·{—ß÷ÌæŸ¿w`ùÏÂü ¢ñw%Ù0²ï˜BŠ !Eã!Eã!Å…ÐxŒ¬Âc‡ðØZ‰æíPÁÙávA„õÏ£òã$Iƒe*Žë‡éŠ@-¤VæòXí] ‰Š4‹—Ûû¯û–iÝfèUT_5°e{>|¢y|¢ú+_ÜÜãÃÞðØ -Åš2Ãßy(cfíþñ¡ëëTχ²Sˆ°bBVÜ€t!q¦†MIÁ]§à*Rü*RpU)Èr °üTêÖp†…P€3V„†¡aEhXn#´Õ0 7ŸœåPŽ3¶N¸‡¢»ð Ñ+thZ ¼Œ¯Á¯€Ä`tà¢5j ´. JBDAê|‹[§ öê£mË›w•ÀÂD[Ûnéß5ôv¬M»ê¢!Ýn•´x±k™9“|軦:œÀ]¤ —34Z[7žñ^|µ "Hs\Ù8¶£³}óP“Ni¬-þÊgÇïÌo1Rd1ïn^"RöRŸ~Ó‹¼u iå‘<í"Dí"tü‘æ‡; –(Ñ ÅoÑTÀ 'Qª“ȵ»3ÈtñÛm‹Z‚K2 ¿xQìA¢¶°Q,c°ª œAÁ†þZª¤x¾/¾×ãàUŠ©BV à×4p\#_q=ÏѰóXIÍ)Ú2ZÏÕÂrA–5&RÚ²%÷ ]/-~N!QÝ¿A!9nNX0c­yWh=_˜‘(пËΊ¾†ý ÒF€’²x_ýîæôÎú)¹Š‚„à¿Ö÷k"¼6„ôŸ0ƒt@9¡œÌpkŠ€|kæ$à·W߃µÝŒæ:ÉubmW`5iÔ39 r—&ma^N€š(“tS—w ¾+ˆÿŒÂ™€Ûí×Iññ"7Bȵ>›Ý«Â¤è‚6f¯I£âŸÆ¾…nn1@Ó#iYá÷2º£M¿ PQ8ŠK@B»µ(‡}Á¯Â¿˜p‰}ÁÖcä3Ž('f8óX+X‰Âüem-å“™Nþ™Ú\ÙŸ;sœœeÎ&®ÞŒÃ—lÆáoKv¯˜j/þ/ϧCC“7Uk} ÞÈ@ÚóG}´»åŸN¤ÛCúfkj´ë;¯×w%íh²n¬;áaìnü ·ÝÓ5ÕìjŠª¤U+Ñ/z›B†âsÖhK±?ÒQc*>aˆ´[Ü~é]üv"ŽÔ#ÍOšà<ÖÆÉiÃ1{ÆŽÙ=󨈎MØ{®Úx-V[=Ö£¶ÀFÛDÿdß¡ÉFTÈ{âjM6üv©¥®w"µíÉ[z²·ßïk¶È@1C)™ ®g×pullooëxkHIJ%øìn‹Û¦ÍÞýÒ¡Û~xcs[¼n…•:}ŽÔæG'6>:tx$¬#1ž« €+Ø]ó<‹h±4l a:N&3WM[ÏK6—ʾÅÏëô¥aø…Þ{¾÷ÙxäÙ{þçí]ß­¸kÛCn:¼ªsÞ÷ÃÃíÈÝwö.¸c/RsLÂÂ;ÖØ +b³J㬑øÀ5m¼îò¶TL4gòZ-)ö®Z]ÜÎ’4¼Cš,>(ÕB  “PÏ«ÕøÏ}®âœ”1k5pcË¥ÂJ¤ø÷Ýv7ÄrÛ¥wðwˆÂ!™ã‡ÚŸoBBêy¬‘“×{ÿl–€W\7x7mÒS=ß"â lÄŽØBù¹` )Ö» à @É” K6Œ¿#¡d„º6¿=?vφºÔÔÝÃ5‚(áN\ ë^¶|,|ËK÷õ=øÒM7®Héäø}Z+#µûí-×?²j㣛ë zÔ †ðSvgqJg§4­"ß‹nùуCz§Sëx*2²\Ý1/ é2úðƒcÕŒz¢ìŠP »g Æó!z^øO¥zÀ‚KG|×Á {^n“Ù¥“¢¿¤t.>ËË|±ØT:ÇÿT6¶)ôïJçˆpïh?¸w=¢ ܳœ™áïpPykå¶Ué­eð Á[—ßÿOR8#/]Òü}t­äN,€|¸2‰Xþóò.½‹~¼[ˆÿ¨ðnv•wÆc“d‹Ð£Š-sN^VÑ,ÜÁW,“YK_kúÝÌ*9õ}¼Ÿ{äþ¶Á„YKçÆe*ÅŸªºb–âP™Æ¸ížÍíP‰3 wœ ýÖbÆ^÷¶DÌÅošcŒo½—ÞÁ.Fû‘þSH¦9¨ Ô©ìð™uDœ_ÉÉÒmçí’È&ìØ“.m\‹iATòËo°h~ÒÍ/ÿêùî<ìBó¦ûG““ùz†’`^Šhφ–h>åŒô¬žX­ª[{0W5ÒY«â.£dáÖ‘d«6UgW¯[­Fƒ}»‡ª5V£`ôŒÎ®“Ù½vC¸9nù«’ÝÚ¹-}aÆ`V+X£²Ýb·èýI{¤­&Jt­XØÿm€â<†€îã5Á€¬rÜ:-¿NlÄ>÷BIn^¥ýÖ¦VÏÊ4n³Å©“Ï–„0ö6äÿ¹ß}áP™¡›¥,ÐÂV–‚éE¾Â«Ìˆ¾g¦qÊ€éNÈ3ÌŒu!He©k4ÁðwZoøòÆÉÇv4k2YÜZ©·{2^×å–j]&»SK¡_Üýù-É™GnÁfKùïâcfº< l[‰í( q„~îσ$ŸDŒÀ þxÂctÉz ‡9¹ÂhŸ1HDµ{|å,”Í|Í|µ_þß@ȧ§ÊDÅ/‘„Úçrzu N` ±Ét»Ý­$(‡°WFEã/¬J~/Í…¯âkåJ±‰…"©KÇdŒ“Åä4ÒÓ‰yô]NÞBMJ¿×K{æ1ÇšèÔLÕLÜ ÛT R¶©JwnŽÁjßÄçš´0H—/ѲÒ&µbËJ<ƒK#Þ$”–Ã1)ð7ð3 ú9] Xçÿ£PMÀåpk)ü¿°?àRÛnóh(ü=ôW¸T —¬ÂHqÉ ½QB«-_~áø¨B ¯*eþY8'TV¾[Õøz`‘DÆŸE|X#bABÂÉædÂ^ˆ ~@ƒ‰æ› ,B»:: µÎm¥44Ç’1‹ ÐÈ3™Ž z†9[ÙÁƒ¾D[Kk\hñ ømj\v:¹ä7 Åo…Îkq†4¸ ­.þŠ–hB^»G/—¼ª¦Ïr-d5©(þªÍbRJpÎÑOÅÛ¥°G¢4™Ð×Ðð àŠ[,è:Ø=!U]1 V{?»øÞOìb›’¶ÀO†ð™Ëe´sÆDjfÈ’¹ÆÎ¥ WxµŽÕ£˜Y¦õÍÀ™Šs4¥x~½Œ¸€ý0T¯ÍãWIè#Ų›£7cCB‡Èß8úŠTA„Ú ­µ Ôè~sÂHý)„Á6œtéÀ Àa‘»øàcž–x߇Ò6Á¡³b¡^Q§Ãø“BáY)éyTxpw™œ„”Q¢¿,ºŠ#l­¥I\ª¦‹n Q©»5 Zt:ÜjƒÑªÅ^vû´02©uʰZ¯7k/Öz@–\{©€gðïóYòÛœKÝáìˆuà ™±Ž¦Ñ:8!¨ƒÃ:v¼ëæÑ¿r*$T#(ÀÒ$Ϊš`;Q)‘ï’7ÍcRNÇ_@ê˜:¬ùù:©CëêjÚ«æQ+§~Ńz<„ýw5}­¿ $VÚ‹»u±‰ë&JCßÓ‘uiq_Nxîº ?/>® õ‘¬‡x…à'%$'¬Ïñ c³Zœªæ‡†³»†£m»ÿqËACí`ºuCo--¥eeíÛT·á3ËO|¶kºÃ¹jYûŽVM“$M¯Îôø{6µçgûü=uËê­ 1I³Úl·xíÚê7/?mŒfÂ=£]Ý£ÝKv"UH+rç ‰äî±ýÚ ¶cD¼à÷<^ óè{œU#ôˆ îVƒøGàÔ&Âð›Ø09'Côò†z7!I]r2ÐgíaòipzL2À§¡1] G0+OZ‚ú+³ëJÚ˜b ^Èü89õàD¤·§'(ÕXõ:›† (¶4ÒP.Úxïxè›úº1ÎÕÆu»v¶­L™Ñ·ö½ FKÒÕ––ïœ]KH¶÷átúÆz…¾lMS¡+W—÷å˜üîJ)˃PR´§“¼*IžM-øŠ\…¤%ÉQLiW‘Àdp<(»CR tH–"d¤,¯5¶-«aO óÔb<«ÆOX“a£ G)Öe? ÷åzƒïý‹JæÖöî`çÁ®¶•KIf☛ëFRW%aýÄáa‚¢(¹TNËÿ†¾æY’î‘ìG4ÈãÈ£sGŽìx²sâàädߪ)x¶C»#QÀ4'ësõí¯ƒ ¾¶qÎú÷|<÷Xᾞ٩ƒ…ùOå·äWåºó…Õ¥ù¯ÂèWàsúh™¥E•Šþ#ᆰ [FË©RO}¯ÄO “/i,4@>­€OƒŠà§5€ÎO'¨€’¼tgƒ”ÖH¼È€hžG°ê§KRܶØT|¹­Ùê½øž\)Õ»B–¾ôÌ"ú0φ‰;DzeW½±l>2¡Q!#^̧~85u¥ù\iJ+àß®–À¡µ.;ðþM³ãb|#ž6³™Ëf=£>·jh4çrÆ£AÒÉiauv47TÈôx ±B:ÎÛò4ÄDâa$;< ‰Oò£&Ñ{@ÿDŒ¹.ÏCÄÖ—ß|é#BÄ®F:õ2¸½ŠqÙ¤Œ ↅk"ž$ "åvdÝ\2™‚£Îós«ŽNèvOn¦Àáä@¶sFkf ˆÔ_×7Ù,ŒfS…\k>š3‹UÀBl„ÀËIaháÕ@lýW/Ô>v„k@’pÔQ†r™ÆÃúq#(þVÝ”w›¯Qœ}Üh(Ô}"òRXò#È]sŸùÌÔ‘iñfGGÛÆa®šzdªŽ|mtÛxÍF`/Æî<°{öHîÁ­=Óã³…¹ëóùœÑ’Îûóq@ÐS–>¶'[”l?^-Ü]ìǶ¿]dÿ·97V\"¦eè[u°ß-ÕMSMo¼í¦.À!|¾„O|ÑÔ'ŠkGÓRqìC”ç  ÉeŸ0 Áø>~XYtëFžÁn@äˆøÞŠaä_߯ΠZ²®êBƒZÒ äͼÃy™)”X=›xíÜ™³?ºrºŒ*.ë"éá>!ü¤Ìt؃F¹Ü´;‚™æ¸f·tª}V9I`\Öâ·u7a”ÅLüЀCÀfó›e2³ÿƒÚk!$$©L®`L¬ËFI)æ¬&AϽ/9Ç£tÙ9·lYtÄf®z¢z;NÊ«Á+í„!ëàÚ(Ÿ :[Óûrj‰¤swa*»6·²ÐÛu¥ ¹d¾`9€õr ÆRßâG¼wh*EÝ51½¼Ä©áJÌ%çdÆJÌ<æ¼·þ-«v–Œ:læ3F $ê”H0¹’Ò˜Öîf@‰åCSr5V^‘K®ÂXñaÑ®7#ãÇÆE»®!n³Ç³y*92å:Úâº-S¦Üda0›h+äryéˆcæ!!‚%DzØdR`èe°€­¿xU^ÄY° Ø>±Ý›Û®Ò…}6…ÇRNÊÌa§=jW?xÿÂÚÝ£5à—d †a4V†’ɵÑÞ^¼å£yEñaÑ+@öÏ:´îþIè[=ííaðM¢fBíz`]ûºöÄž[—%º?wOᦞɑ­…=jÉžÜL~e¾@þTãPM®jA+‹ºˆþË%½ñ_\ò”X\[vÉjǃ®ô”‹Jhñ¦jŸ™_I±f>oñ?CHà§j£Ûb:ÔÁ©ÄL±˜ÆW–¦æB>WbW­QCvIŠôÖãË>²‡ :Ar(´Èì\WW¬-÷ô<²Ñc„D|@)ĶƨylÛI6^˽óØg3¯[¹¼±0Í-/¬Ë æÛrUyÒG;òt/ÒSš½–Kú²(à%Á¹ÄÙ2µ—oÉz¬åJýD †€ÃÞªÉc6y °·z ¥åR-ßÁU“Å;K´`RJ¯þ¶Ž«Š:N²^½ðïKôTeK6o?º 5œ xà£Èç;±m'˜œlÞÚ•\.1øù®C󶿇ŸlÝ( ž3ì74ƒWN‰ò##ùÜ É=½7÷8 7f·æ6Vö´Är…‘\G¾>ïϱey]NW™Œ(±´ ír5wµ–[¯-Å*´â"3‘Ú¤ZeH>‘"é˜@ä‡l‹¼P‰õAƒ/‰Dt9lÐ#ÒËU*`D;hÅÒ úUƒ^æÀ‹Å%mL° ü à·Ë¶9§ÓÛ#‡±y™Ù ñ.Œõ÷h ™¬W(OÍ9II’”ÝÑ ýŸ¸PŸøžÄWDæOà'üfI!Žýð•½È 'ÇœNƉõ±XËv¾ÞÜ;‡ðØ{¸–<›²“¹5…|OÜÛRèÉ5ä+pZp†2XB± c5 ¶oó’ÿ(6.¶þ6€=TQý˜ÿ-w‰vP…þ‘ø¾Sºê×KLzÆëEêffèž•IÆ/CyÀé'¸\2×ÔdˆlÙ>„.r$?fH"-“² `ã4$CSz„âšW6KÿÍñzý ãìö>ƒ¦pœ”J¤:Ø_NºÔè£R8µã›ðYUú­†œÁoÓSà"dŒ#3d§9;^s•–²beú' 룩ŸˆS#ùDijd÷0*éïß5ˆ©lÉ·€Å?ˆškk³ Âû‰àÚµÊm*X½X†,ûo‡æ^¥Ü®´€Wð¤6ÜŸÛ–Ûµ«vSaEv0—+¤zn·ª‚…Úœ;¯Ëß•1UÚV‘X(_2Bm_1µ[\Ü—^úð’k)f>aä[2Æ î™æ×Ò[°Ûìr‡¸l8€ñeáÀ«„¬ÊHJgçX…pÀ¿N%æMžU`•$ÖTÒpm?Y’âñuw‡U*ñ2øþòÔÕ™‡ÏÐÕƒŠçnü{H2ˆL"¯pzM4 '{Y) ¾¸-šÏ&3ó—Þƒc—Œ8ÓÇ7NÂe¨!pÊ)Õ4?d%ÔqùU¸ø~·V}›×–˜¸u05eÕÛ~ß9;RS·õk;·ÝX͸k]µ±„ßé«[{[>œu¢ Ë‹3ñlÌ8³¦63ŽNÿÖ6ÉîøTÿL›ßíuúÆcƒûF«íMÃ[ƒÉ1wëªæ¶Ùµ~nU»­1i6ç«[×ü–GeRwñÜÚÍ®ÆÞЪMÎTî⺦ &5GÃ!}{§=ÞÆÏp³áßGZA.ï{2áX½Q©8AT†ìÈHco¢m™ƒð¶Ã-#ÚÊ)ü„7oú½D\˜;ðUÔÙÓ¼O.ì…¸¼ ª¿ìñ,ÌXö¯+籩m_ÝV;5Ú “ÂʶÂz·tq:\á¾l6Xц³ÝÙpiRtÅÖ¿ýèúj…F¯T3:Ž ´f­¥u&?Nûþ?g_ßÖUæ{Îݤ{¯¤{¯–«}ß-K²åU¶cËŽcK^âÄIš}+iiÓ&±ë¤…¦´Ð”R†î,Ã3å=`Ò8nâty…á1’¾–iÓ2SúÚ3”ç m¡‘ß9÷^Éò––G¾ºR"ómçû¾ó}ÿ#ŒÞqòÊ©'ÉC¬ZlÌ–ßQ¶m{ÖÝ~ Ëœ\ÛˆìÜ‘§ó5zäPÚÓ ë ´ÍÆd( ) ­3vŸ š¤À')ÈIÊV.ßãT¼$_’t>›Š TÓÌHzaVƒ R‹Éò‹Aƒ–¦(—f3ɯ-J'ÞÒ¯®]¥”lðó¥—OÿÖÖU2º¸kþOp#6Ÿ=Û  “²V‹¸£À¢\ß\‚e b||ÎŒS,)ô¹8—Òv¨µÝþ••,دÁÊŠ´v/%€¥¾³#…UwêÔ ë`CG]2@å1J4UHwéç{×F¤dOq´òZ•a• æ_)? úF@¸ûôXc\*EŠèúŸXÞ¢•" ~‰/ŠIŸ2íßÕ4î«òXíàÇ,áœNË`ÙÌ ŽœNøKV츨Ì@ªrA©"P¥É(½šE^Üj°H\7ú iKARÇ꘰=˜õ™*.…¥B@áÀñÍ)=g”ÌFŒeG[ÓÅùíåb jlDRÁS<3hü±EƒÖä÷]f˜0´ËHÓ'òdI›ÁÃCO+L6ÂÆ‚Ž6Îο¨¹Q+jiÄ|0(W¥¨¥ñ)"BÀ qcuô:d\]r: 0sT#+‡x:Qò T Jrá<2«YQ©ôȽY±#»WÊ(¬– oYHܹTíáf½VSÇqMÝaãÊ!û‚¡]9Ì®Ø D3((HtG$º•á%¤U±U[µ:òÜêkahÚ(è‘°¼]p›E^÷Œ)ˆ&qÎdb,ÇHTQ–j°ß®®>ŸŒñÈ|9ÝMÁyS Þ”…çÎnÀ¸8º—CNª» šò)ø.Z¦EÈLEð~®±w¨{ Ý^J8kø_ o–×°®P¡ánàõV9ˆçr‹îj«°MëyЄ…~Q]Œ‘-¬ïÏä§”½[QËõk3ù£Õµ·jÊ^Q7òW¥öíý bzãð`dë%ÿÂ*Î/Y¥—¿²°ÈÜ´eÌ•íM4ö×YÐò=Rñbsà¡‚ rÿÒš¥\Zñ—ËûxQ¬ø5 @d 6$|÷¬æÚ(»é\z¨Î)UHýòªoSÁZÓ¨ý!Û98U">:úÎ"B!íÃþ ®‡Qw»~«àéI„&%ŒO3À˜Æt°NAÄY[ïͱõ°íËr«í ,í{’à0~ØYŒN 69ñ tÂPxZU®‘×H–­Bñí®üù v[òŽ©ïÞpäï·æ§¾3…®mÿàî>8†\é »çàXñ`þûásw÷Ý:sº¡ë-¥Û¯Ì7ï½}tèöýùæ=·ãîŠòCä+ˆ6¸»â“¸»"ØÊiRÂiRÂU¬§ÍžSÜ`›ÚX¡´X((jjÅŠ%qlÕΊ•+V‘Õ+Ø“èï-Dj„Åjs›uÉ‘Ñi\%ö¶&¥±b ÞóÚîím.ø«Ÿ¾cP 5‡ËÝ[Hýª(|¼®;i¹óä±uŸ:ÐeA‘BùK›¶u¸E¨R"*L­» nD.?ŸÂ “â •&ÅÈ¥pElhRŦQúm Qº‚4]A”æ œ-Zâפü”˜Áu`®¡v\+Žâ…|åŠØE4k‘>|Æb5ó[uÕBºÜGîß›X7X‡AÉ­+\å™ ¥à…d>,T*cÇXÿ¥–ƪ5W•‹xLéúÈÌD Œ šP ÚÔ…Šp šÔ X¸Ì5àiXÊ€ É\´À¦†b‚-P²ÍÜ+ ~ªMÕ–u®dh!bˆÇ†ÕëíÞˆÍÙÐÒ^jf¢½y¯1ñ(’WÊ>‰eY½53Òvéñ冿ŽÖþ¸@ê9Ž5)•IççˆÐŒKà…‚!;Ü3<6|ÛðÉaº ð0¡"½¸ADz¸P,„¯ü*J¡‚OˆEL)Ä…¯Øæ¸Ÿ„T@S9ì ¼?CŸ×c8i ™Ÿµq¿–6Hû¤ ‰TÁÿ#É¿T•± C¨îưr5 „ ÑØ_ BH¼Ð´çöõ [×5È…AS=W´×õçÜñ†- ñäøññH±#iÓ‘¤²Ãj-eë I[¢0¾eS!Më®Gü¶;­¿ùî€ÛnÆšþPªûŠ®–ý¥zƒÙ&YÄ9²S¶„<ñ–D T×µYã}ˆ>< Úáëà*° Q¬LÀ7g"IËñ»°Ûß!8…C½WõZÁÒ{5ú)0z¼èŸ;6оëàÀð¯Ç7ŒïŸ'3ã™ñ­MÏÅmýåÀè]œ³xö´YÕš×¶"ˆ8M•W’ü/Ÿ7«ù)³Z¤)¾á ´FEfõ¦b)9m—%M{É*9MúAé þ„’8öÌÿðfg¦/™XÛà {õØógC-Cµ<¸<Ó®ëv¦Ì²½a×›ÇoÙ\÷M±’«Ö²š’,ñ¼PÉkÖ6%4$ Cž€oæu\žõû×ÅÆQŒõÙ¸¨¢&³‰{³C¢¾ :À®™$ÂiMãÒš&¦5MLkæ8­Ù¤´²`7¦çÂE¯qÎ^l\H_Ï]ÀF§IëH¸p>W›¡^š‹^…Ä!½Hfì Þ[U>|¢â¦ÿon! ¶ Ú#«žféÅya•~—Ëè*ó¦þL ÛŸïíÍhÂr®÷Är B?Æmë÷ìašbëç¶Ûð& W­ñå9fP[¢qžgèÑlÏkÙù ZÅ)Þb_œW×–˜U¶©.ßgS!Ù.*…Öââye/$Õ $ÍŸS7@þ©b¦Ë©â¬NIòìBm½’%7ó«Tâ×î„¥UI=?)Kþ†Î1ø-€Žˆ4Š“¯#Iëk¦³½"ŽÒR>_JÀÖÅ@¶¤z‹bj®³¥ˆ#óÓÑQVmr¹€lÌ*¥[8¯£.ȶÿÊ}Ë'WºÆÊÙI·ëýGÿbhÒõõ2¥ûÐ\Mh®Ó©õÛ”Ú5cŸÑƒ~@Kj3X_ì-vvŠ E¢¸Í”šk)šñÁÌÑÑ]5Ê„eìünuè<Þx«ön)äX´÷#/ëPY‰ PZÒJªG½¤—Ô½³_¹·†R©|‰•iŸ­dB”¾.³é­ƒÕ½¸Þ hâ4rÕPQ²JF£q5:BXÁk,Ï/Sa…ƺ}Hƒ?>9}åѵ˜Æ{>Çéû¾c}¢ ;»=¶±¯%&˱–¾4¸fÏñÃÇ_ÃÍüTñhqmܵgîÜ­JMoÅ•iOtV;bTÊçÔ¬4¢9Öqu•ªÙ„ÓDòƒ:eV–Ò-»5 «îÕéöQ4ËèlÊ®™_¨öÚ˜ƒê>\} ýuR0¾?õbð¹ _ÆûwÑÞñƒ»uVÑ©6µìV¬’²IT‹ÂlR,ÊŒjQh¢bQ˜^¤eÁÁi÷˜bHæšîÞ}ÐDº×㪃¾FœšŽº7a n?0Zé.6S©@{C;Ñ>ÜsÑ"…Õͦ¹(š²õ¨k¶< ×vg• ᅵiÂdÁ«j9#ùW±I œ!ÖzíJ‰ÂËÖp{A{ÉÌ*Ø—£ýê6oñøC¸û‘|äÀO3äãØc<ŽñãJ•”|ø5¿Â¯ùèú®Ûà'§•É´`ǯùø~¥RÞ’.ÅyÚYŠ ¸o¡RÓÜï—kRXËZ —$û[rýä_ëÌ^›Ý+1£(©“Jßž-6t_§³úqúž­fTnÚ²¾ë£÷\I„ª™ù?Œí]ݶ…8VÝæP‘ŸÉãˆ>õàçç@xþÝ‚' ý rÔ}ꔵyÚ´«u!}¨\ÍUûùßÚ0¾cŒ‹0AÃP½°&#!ÄO{‚0„åÕŒ`\€7a·þ±’­  ¨'ˆñ¤YäÌqß%¾ÃœâÏ7 ÿL”‚¼«Ä,`ò¦ð™V»•ÌKJý« «tLjÌ)å”±ê!5!vÉÅGÇ!Aå ¬/á4Qå(ê-~»7la©2Eþ™à,A·Ý'éȯR,gнÿß0Œ ¥7qäVƒ™%‘˜è{Ée0ÿq[=©Ý2ÿ'úNDíuàs`…wkÐÔÚñö|²¶ák4cA À˜Æ|0æ…qLP0IÂŽNØÙ;Ó°«Šµ <|-pH\ÅúQÐ^ÆW¾XÀ/ ½%åßaböˆcâñ6‘ f¹(6•¢¥ŽÏ×Ãzü^=Ž:E‹\ühýMõÄ:ôª}Dñr^Á”Ü}¾§ç¢¤Jï8oÐ[ý£š©Ò¹ž£‚ ­@òš§ô]~‡4Ú>Ó@>C'I£+éóÇÑ]ù=d7wä !·ç§ñ#‚5#±÷›õÄ«¼H°– ËáÅlÑY…¦÷±ì¥© VË#錈C,‹8„«;ð3ŽÊ¡W°“H;†¿²àîs FÂ]ÏØnd°ÅèÌ@’Ç3Æíšm+/ÉÅÒZ‡óþøÿt؆­<ä8=‹¹Âó ÉÆÕ.IլЖž­"¥cáUå7•+s䊀D5pDkõ–¸ß¶ñÔk¯R¼-äñF%ÈBGù=´ÄÞ°•£.¼Hq’ßíš ¶ü^½Éb IŒésUùËÁ‹6XLð,|Ìd1R$ÃéʧàƒOEá­B£Š…Ê‘·(ûVãç€͵k¾&ÝСl>8`ÌÔj"â,tá”F‡ :Û1áœÐ_rr–7La-éÔSªÒbå ’êTÛ,1 ¿Ø\ÅÕ²¨ÅõVÑô1¦1ç Hs +’ågõbÄç YYBò]F <‰)?!J´Áj‚yÊÌ‘»lMê㥠qÑÂÓxÍ@3Ùñ*y¤@ç9 ¢™ÈÉ>¦œì‘Eï7³ý,ÁF¥YHœv…¸’ü®‚í¾€ìŽ–"ÿÄ"5¾ÊèMúKmn,ð¾òm¢ŸåCP¼dÐá×ÊÇàߣœÀ Ež`È$ËN‘8Œb85Æ$K“Ãî/=¢•nã~â‡Dvƒ4Ї§u¶ŽYxÅ ÀUt³p{Á+DܶûØ)dˆL†s?œ˜l{;JNi9Iå°'IAa\(Ñv˜WZHSÔâ ·/èŠîî¨nõ'†¯_»ÙèoŠE»Ò>½Ñlê<°¦wÞu÷x¢3fÎÕ×÷DˆŸ ¼±!š”ë{ê2ëÒrØ]ç1šmRØc±úÞÖÑì' r@ŽÇ#q<×ëÑ\¿ÂX@ ´æiÎßðÜŠ7àg °ø9Sýã¡Iç!ÓTÓ)úh%IÏkà’ùEÒKW]UÄtÚþ†MÍL_ÁHž\&íp‡DÙD3¢Ëju‰tn{SaG»ësF.È&“áœ_$ߘÜâä°£Ë`ÄU1¤‡ÆÀ~èWù¹t4»á`´¿%l}&“ö7¯Å8YhFÚ @bÚ¢³h&g{Ôú‚0I~±>ñ׺£µgî½|^ƒ8¯2 &aǨ\PæA8JÚÑy÷gRÃ×t[S‰˜gH¬È:.ÑJõÆxÅLÍF³‘s¹olj8Âð’Ä™Ì&Þj樠}ßþ};½aVr êÑXof$¤ñ- 7Í:[ž‚Û››†÷DÉÈÉ’‰ÇåÉÜ— 5’•W1ýªõa1,Ýì J²Àd÷wõíÌ»½{{Ç:A¡?s"1˜ˆ ¨ÂàËÅ"¥ ño*½{³Ù±k»¦ÆR±ÌÐzŠD†Ÿ.oÊdÍkÑ–`ªKÒ šËa¤5Q}§2È¿þôŒ[’ܱY¸µ`nËC&›¹?€AÉ“ìÃŽ£DñÉê¦æZœî*þ‚l[Ä¢ôâ°ËR¾ßœìkŒõä‚§7…Rm‡Ž]×?€üáOSëúÃÍ A—3¾¦NæƒÅåqš ,ýÀÓëë{Z¥a{¢Ù‡W©ñ<|’ñ€V1›Iž…Û R],¤¤ápèQùѺ#ž)Ó%^œS d—;¿Ð9SÍøÈ+•s·.dÂ' Š!™”{óÇ &#cr[mˆëy¤ÅëíC9{£¥ úŸMfŽ0ÜuÞv‡Çë(÷ ÎP˜=ðû¯ÇÑÚ6ÞâÒ³z£W.ÖÁwˆ«t°Üó,ØûA˜á82Èë঳)ôu¯™…›¦u`«¼l†WQê¡ü‘ÄÆ‡ ¶ 6ÂV¼_ÈèÈÖ>Ê.P¸¿u2°n½¿€ p¥ç‹AOj÷ܤÊC4Í]Ü=—מ^~c© Ao)XyXrغ¬â=tË+F»#®2²ÃfS°ûŠ»™3ÆfFš=áÒ‘áâÕ½¾ú¸'vÉÎP÷Ö&OÖv†çŸéhs'ÝÆŽfOÊmÌ´d?v ÷§:Âõ¯NÙ’rdŠ9—ÑÀÙE³ƒ`[¬=”XÛì•c-D¯Ï˜u…;ír>•-6¹ÚñÕ†6É·64‹ÞHù ÏGPÆ'ž'nE–µdO%̘ÆÀ#Q€GJØM§R“¡Cö)zªR—_ Ø«šÒØåK߈[Ñ’eµ ëÙÖ.&iÕ”2“šÙÑб1'ÿV•–öâ`6]~¸r_kLë‘îMy¬Éû‘ôŸ•º·ð³@†ÿð‰w[•FV׌SœPFýFÙ²l|m5õ=ÿE .[eT6—@C ™`(Ó\á`ô A _gë|¾di"1ÿ|Ð8BÈ¢$P<ÿe:iØDÚA=t‰y'¬_¤oÄ6DËù¤SJùrÅî­<,Ìéb«œ‘Ñ·óz†lR4¢Ü9|¨”lñyšëëš½{¾K|{¬mÓþЦx¬V`Ãî*×õS´{B¦:ƒ=J¹HÕ\ܵ¤àA¶é–zƒªš"yßÖRØÞî öîëv¦ë3F¥ Sõƒ&ÅØ*3zäwk.¡â˜«ûÎ"‡P‘rø’EÅN‡\@Àn ÁÅO†›oÂ6µP«ð»óæüâŒúrÙVL‚/!'œÖóÈZ hi—kµÔQ [LAY‡<ÌŸH“ŽfhÞ‘ð–¿µX¸ý »žÒ3&;eñC8‡FÙƒO˜ÍÃÍOêõç,ÜRðCÝýo6þ¶‘hl}À™§£“Üýß“^”I~€>Z‹h¾{%Hóš éVåQ‹7µèÍh.Ò³½%Йñ’ÖQœ7ÑMw×u—z’üÆœ¯)îâiôÍÈ‘¬?—Jõ õÔ‘7¥úÒ^ v›Ñb E³Š{‚v{¢ÐïJɬÁÈ¡w$mI—/ì£Ýx £ùž¤¿r þ4ûã˜+¢EàýGâ:ùG-GR_Ô©}AiÅ;ÿ»¾R!-ub9º8T¯Á“ 'û‚¾Íëyž7Œ2Z„q/ºãï Ô¹b ÅÐ)Ê´òR»öÀvb?AëiŠB¿>¡¸¸ÿ·1'P¼Y‘¤·ÒVä¤O±aU1¼Ø^Ja–LNØ'W¤*\å áQM>X^”&nu†Ív#ÝpUSçÆF™A>•Õ)2mù`1Y1¥Õx(§˜F8¨êÀ”ÿq°”MÃë+÷˜Ê~âÇÈ·‚8hš6ý³ðÄŒ%¨¢µnGׂA£kÂ8&TY—G>ú9nÓF‹|%͇¢¸ÅY>Âou z’z’ä¬!'lãȧhš=VÙcfÈò¡Ý´ñ,Ë&=î¢ÓózøŸÉ § eØ{-øuž!Ñx뉓?@ã] ¶œ ålÖšFƒ.ðA«¹Óª×­YcíÁ¹IgmÈ®±’îÄ„{ª2õ“*º~^ABWÏ@[:£øê“«yJÞŠ¤FGRß$õ– Ë´±ÄaH\E²V|gåÈ¿¥Hä²Ú=’Žø8AÜu¢Ófsšò“qÔK* xÁTCƒ« †ò—(bù*E øu•z¦¼›×î}hÅÞ¢œå·åi‚3À"h½a3ôì¼a~vFæ³<7 Ï"?æ“ažöNHÕ…\!Ñk]}dm=Šk'Ä5·Yâ1.vÍñÓéˆ 4.‡Ï¢'>ö ’EþŸ+ 2ßý…€Ëé•ôäÑ)R/¸m.¿@0_%~ÍtTêùç‘QjÑ ¡¬7¢ýÌÿ p4¯3²Æ2‹¢Æ«Ñƒ {{gNëõœ}ÞóDP°²uÞ[0p²gÂÆ ì äš{²º_±Z¢±\È¤Ö »¯'Suv¯©Ñ×uÐäs9K=DÜM0’×áð &#OéÜ)B¬ŠÐøò1Þ§ãÐó(vû%øåû†s@„¯ñYÑÍŸx6(}ÑyD‰¾™éï¡¿µ@èpQZÑ®¦Ñ*ƒ…T1aÀ‡+•?# ùáts?çMг´W”8áí÷”S4ô‚Õ¨“mNDޏÜ&to¶;-ky†Æ‘8‚ñ³J ÀŠO}šœaX#—½qfߪ¦Õˆn¬ôé”OR´~†ò)ü9TÓw-|ÎMÊçXås†ëóíu©|{ªümK%ÛÚÑçœäæÿ_§÷ w) Lè=÷¨ˆá#~V 4DƪM‹}9ø 8l6Y'A½-ìq‡mzëLøýIË:’~ÂÉÂc•zHòIƒÙ@3Èâü9L¹yÞ ÓNžw¦•Þª?’[ÑHšAÄ ¦HÄÏZOÓtÛßwÿà©Ëög/HêÙŠZzE§Ólº2J­Ô‹XŠÈ¾ HfknÇ­£ºpÜæ3ëˆôÆ,÷îÊ»…ý}[ INÇë)ƚ߸¿ùº/h(ŸG³ñ$ð¡Ù‘ÿ{Û‰}­ôïol@›ÝkÑ%ûwåò{×Åœ>’\Ùá´ø]æ5×|öýÎå³›Ÿƒ'©½ ÝO™8ÀFäÏðbâµMT<¿Ä‡Ž“Í«qâa¨Úd·È@‰±D<îEDzrÄë‰ÙYÖóx#2 [0R.‰~ó‘£i^0¼ðÆ<ïˆ{½ 'Ç9hl7ÏÏ‘u´ƒPz䉫Ð2@ÃÏHkÑOÊ3K˜ ŠÅøà¿7Ëß@ŸÓ<Ê»µ1cöˆ8Ó]õ€4‹¦0K+½¯Â,fEféõ×hdËÝÙ‡œYôÌ.ê;Æ›dWó†Öæñ®˜MŠ"HZl*mmØybgºügVŽz½1Q!æõFe–ŒNnÈ2O(ªJ³ú—­Qn/%ÒC-^‡×¡CË:/XÁç27^qìýÿ³”0ÈÆÔ•ß€SàMàÜ4o÷ñå j{Yebm–*G¦;)ÝC-N‹dç uœ;ÿWþæLÚù¶]ŠìX>éà9€íÃSóïÀûȇ• |÷)`%ŽŸå|aç- q¡ç‚Rް<¬’– Ä}X ¬‡‰€_•ÜE÷d P¥²>JãkúR"¨¾€ÄÔe0¸ÒxÆ¢ñF3æý>Žú{gð±Ó,9ðPRßWðªšÃÙî® ~ÌfÖ¡Î>>2ÿõ[ðþ uÏq ðq˜Ñœo9Ë …Ü-àÏljºË)Ñ|ö­ÅM¯ò^›íêÈàüA?ëìLÃó•×®ÈfúWx`^’Çàý1ÄKñrÍg±Œ~VÒ1S6íxAgP68Yh¹Í03Œ9€+VêÈŸ ox…`È`7âí ò&2£|c0Î0!9‡¾M}ï¢ëÊê¾Â«Ê®Üßóö°Ã’yÆh?MÌN³(s.ÛWxÃÆSÔà­Ú¨\¾&$zôœzz^yn•7°$¦È›ˆ—ª£åãö¦êh«TRÜ’*,ÔŠÄ#^ƒ9AÍ<òNÎvÚÃ2_þRÍhø”ò=÷£Ñ8.àƒýð6?”U‘ÚK×jo jŸ _FÔÅÔÞv£ûù2?¾ß‹¨Á:8Cdˆ5@¦ ãç( œZªí+¨â¤ìfÌRyý«7¢àö½¸Ï‹ùÉ…>uÑ>å¡#o@1Ç眯ü æÀ„'€Žû…Û —°LQzd6KäD©|1ð…C!œ¾«üü=}/ÒPÁFâo—¬“Êæ(ióów\x¦ˆÌ xÝl¯“!éPEþfïî½;ihò:Í.‹lo÷øóãM…²Ý#ô•Ï•·_|µ¼ãyƒÄÓȦ¯~鵟MN¾þÓŸ|”b’á_êf4¢_ AÓ9`V+RÌZM0¾>GfÆfàxàâÔ¦rê± TvÏ[Í-ÍDÕs•Íðžö­¤Áâ2»¼FHïÚ³gEˆ»Í#é‰#œ“?{í¥«i=Cмdø'øØ«ácϱ"‡FÇPÊch|wÎ ðR3ˆbÁg‘¯÷5ÀúŒ AN#‚\¨÷»‹o]|k`Ö öý‘¡‘eô9ÌN OÖ÷¥eG¦¯Ž@AZÒŠúÜ7Êß:yªüí¿ã$ŽÆ.òæïœ<½k÷ÌãßÞŒBs’æL ½ÐxžTÆ>‡ÜæOLÛðaFæF7‚‹S„†#^|ë²ôñ‘ðI{}_=Á#ÝuùŒ*G(RðÚQä£'êú2øÖ®Ó'¿ƒ¾Qê›ðŠS'á¶o°&Ž&)4Ào?>ƒ­Ï]ó’ª_"ù¿Uч›Ñý/”ûÛkt/y5ñ%úXÅósÇE¤à=j—Š¿¡[òŠl#î`D»Ùì;g ÚA+ ËŸ^ôZCŒ¼»Ú ó¿*ÏÊ‹_E4–½ósT Õ´pÊâ€rÊâ€rÊ¢<-ìBq²|ŠÞû²ØÒuü©[o?{c¾~jöƶéÈÈÇ6N%"#7m=:– ,‡~ô…ãþèØõøúÀnÛúèD¡ëº¶n}d]Tò#ó"*tÁÊÎÏ®Ó@2ð³°ï´g'rW{z.]PN³¬í†×1ŒºaÕÕË(h°ìrÀÆÿ —OâÓœ`eÜùÍ:'«, ÷àolÙÁOÚ‚†¸’¦ÔSè”Séî¡9½”7Ê&=Å FhÜÑdq47ujàä*“´^êÜzCß–;wf]ýSÛ~M4êŽ.šÝfV'ù¶€Ó¾ݵoú`¼qâY$“,ÅHÈ92Ð|åµ7<˪˜ÅËeòãh¶;Àç@Q*7lIlèKlØè#ñ ƒ×ž&ËËGû,t¸á-™ùPˆÞ嘅ÎSô~µ]';—Õ6ÅU 8Q¨½$€rœbµcçT!‹ÍG’ï¼á¿Y7µµÝ€âh òÍãGÖõ}¤?T¿éã#7–¢õ?Ñwm)îjÙÐÒyåPŽC!$EPz[ç–C=;NìHºwvôÞ”½uã½×tÉ~?o´ùd‹S`‚±@¨ûЦÖm=!ä˜Ú,N‘ ÷loM–Zýád˜ݲ K&k4lÏl>6°æÚñvAçÆã•;4ÏQ9*ê@ä§3Aq–`fâÒ³}VN‰Áw|ÚŸwsû¨Ý@Û°HH°ƒY9˜µê´TÅ¥Ò.aç+ ƒTÎbþ1>дè.Íòf#ƒ‘á»´5˜ö‡}¦ rù¢œ†¯ †¢ñáL´Þ »ˆ$Ànõ{<"ÙËâºb½À¾ÿÙðÿ£íKÀÛ*εϜ£#éì›–£}µdY–äEò"oò–ØNâØYgOpvHB–,@ @KrÙZè凖^(P'Ál-SZh¸l¥½\ú]hËß´¥[.+ÿÌÑ‘í¬@ÛKx|¤Ñ6ç›™ï}çûfÞ!J>Íkû‘0ílÓftšf-øéáÒªÒ*Ö5‚O=ˆ±þ€ g³dÍh8X>h›hôñsN‹¡×’³ï_a3q¬&:•±œ Öu^ýèêúUý M¢Í<%mC=-ëg&‚Ó.ŸçKEÊ[õyp/Å3¤EÉ7ºÂ¿¹¶úðúû7Ö VÕ ˆ‘RÝvÇÚî–ÅÍ^‚48KpÑï7+n%\š¿Ã@Ô,ÿl©íp¦õ6éǪ°)Xö@¬iï8Ä:lõÞù8Æ&OÖÕ‘ax³•m#ÀZô€7™šœ6è³ÝSœL§m-nŠ};sу›g]µ¸%")©™Û¸(:½5%™‘¥èH}oõ’ëçÅ g[ï@ź[FSëÛJ¦OmqrKs­Ëš½à¾¹÷\Þ]Ú³á¦o-™ýðÿ¹yu#ÅË’¢ºhæE~ÆÎo/¼ªP?t󲦥m!Îî“wî[—¨ìÒÖiÒÄvغ>,†N®[3l4Ú¥¼g³“Òhv2ËôC3ǃHãkKµEy…þXh4{LmZÛß³¦Õ£6jW/.oÐñç üùáö¯nlÉ®»m@¿"_¸zþ{ 18–+žÀb¸3'H^‰ÿ0U‘C cÐ^–¢¯ÿ9„¢â¤Óý|uà,°¤mý î5Òœil‘‰eŒF8 FA~®ÂY‡fž";Ð3èÙ)QøÿÓÀÊ.©c|¶VŸ^EINXoȉ‡6Íbõ±ÖI…à?,3‚o;ÄØRFD¬á²EbfVéÇýž¨"g¶7SÿNÂ6ËðVÁDÐ ÔžÁJqùʦ•Óª8’¡HÚÖ2¸¥eÁî厎­ƒÇð4ôϧcTËò¾)áƒþÒ€Yr+΀-r”NÛÐV;´nŸVC|ºÞÛ§J¼'ÇõÎŽôæ"½½‘ÁC/µâSƒÔ Ùj4|êž]~Òï'»Ù¾0>Õüƒðtkóև׷nÈ f#ÁsTföÆŽ¶ :‚ñÙÛf\ ïŒNmÖÀ)ÝŸÉ.Ÿ^E£%©iâ³s¶´~i!§Á†ö}‰ëö®®µz½oñXÃ._Älž[]³`š‚¹µ±®_B“à²Iv™åÃa×4™Òýëá8óÃqÿ ™ê Èdב ü "Xu%áX;d@Ð=@õ?LÄ/,ò­f% ^4öc8™0¢›à˜ÁâOø>áVÑ–¿äÁ §“×nñ:UŽ˜nbµEÍæOo,lû!ˆLwjÈÔ9Lˆ“t†œDQkž X9–ØaHIÊO£$§†ÆÎGE‚ÆsÔSvØÐ¸aNFDY38¦Ë¦®íjßÔŸŒö_5¯i ¢T¢`9ï uWl|`cýÁ5ߨ˜•*ÇINIvIf‡×ák[ÓÓ¼´ÅÇž P$žY~âë¡g|"ŠÊÞõÖsòÙœ]Àg,ëñKZÀªÐÞÒ- ÜZFðöœ…u»Ù+2`]LË€lÄ3Žøö#›0€¦ºhé¼Pky~ VÁvää‰ Ÿ°Ù“d¤wgÀ]|ñ›ñøâÅïkkà5äÓU¡Eͧ ñóà3é lî¿jQS‰('g^öÀE%Óså<¤gÀÄPL¤fF59%œ­3æU®Ý» ²Ï^!°§B`Ë’–Ü’f¸î½ÛN…@Af8Aá5”øé;ÒAðÆeÙ¥ma‚»ö­MTô¡ž´ކýÚùíã(h…(¸z³’2BAõs àx܂د`’ìag0"áFðáØmŠ!ðÏç€ÀÒpD@ØÎ«a;¿3k5¬Õ/œsÏÁsî‰wê!E¾ðþ ™ì¦‡7¡ë¾Ò©+²CíÁèÔ 芫»^Ù;½õº—¿¼ë•=Ós×ýøö­÷,+Í®»s¼ÆÖ݉ìä8y¼cˆŽÏÀ”á€6kv΋û2Ð9f`ÅERà’T»Ïjþ•he!e§Í3ŠÝ%«>ɤš <3±ls»d—XÃ×MT!ˆj±âYÜP…5b-Ï–OÌÀ®)ÎÀÒGªmÆä*4ýÊ0ŽÜ-¨œgúU{þé— þ¨™3}‰·rF’–¹×;ª-öD{²zNKœBÛà„Bªé]ž™wõ¬˜³uëÂÁ;²4ErÊ”:c«×aç^ëØ88=l(W]A':æ³HœèõX˧]PŸ¾`Ëó¿E«ôa/(Ñp­áZݸ–ËÙŠÀö1µ_"P[eû¸Ð/΋hàŸF´’솻—×.é®à e¦¬mqSvA£²ì)#rb 9ó†ôü– RÖ–ªèL mõÈ:b-´Nïeý1ofz¢qY[”u]:+!Úh˳ÅЙj+-ëL:Œ¼Ã";xÒYÑóׯTgÐIòE°Šœàu[Bí+𫿶'h‚,kC›°ÈÉO‰Ý†0tùp¶UFÀÉCQ’ÄR#࡜`‹º*ŽQ¤Ctá¸è”\pm2¨Ï5/®¡ÚnY¸ÇdñÙÐ>À|9¤9$b]àF£Å÷“^îØù{ñü×À:о_Ìú¼OŠUv«vïgxº°%ç2“èÀûÆÞƒ­¿üä ú£6,‡V¾<0ŽlÙ²Á¹¶˜cË› [½üuR«Ÿjଠ9sÖ…F‚~À¡vn¹{^żöœAjÃŽŽÖ÷U·-Ëù¾|½³4äí§ü)'(–ÊoæìN¼hïÊ ˜7÷¢#YhFr*¢7I6É_73±l Õžp»ÌkU¨üï@|æ&Øvü±Žé*¬k:kÁ-Åù—%§`lÍɤBú|¹ðqeUîïºûÓ¨¿ø,r ­©Z¹gQ÷æÙÙ(ŧ¬Ý³ÔÛš‹fÜH›é@e[YïÆ©!ÜZÛÞØ1+úðòÕž¦†´Õ[ÛŸN÷V©`Îôë–ÖZ7]ß3õ–k6Í®01‚èPÑ2š¥³Ë·w°6‰NÍÚÚ·h5%Ùø•»ûƒÁ†^ØÎ©“'~wZuÜiB¸g™aõfÍyp'}*îðH‚ ‰·…¨D‚ÿ;.I²ˆïE1fâmÙí°³Ÿ>ŠÎ–'Y‘!ÖFÂaÁ€öïƒöŸ íbA”­¨ãÇ­9Šu—V•üÏYÇpNÀ™Y¶èöuÍiŠH±…·¯_óoƒ±G5ý5-})Ù•é¯méOJ¸|åK{gB ßvÛ¼«~´wfÏÍ/Ý´å¾•Éæ ẇ×DÓ†; ¾½}9Äœ$V†f]òã^ N¸ârîHh(&ýM÷ï(ú7ª ãÓç[Õçœo•“c{’dB5C¾ûKÉÊP»3 ¹ƒ¬zeã÷LðÕVÙ!˜L‚C–¢ ÿû5|vÉg-÷-96}º`ï…”‚HC[‰W)ô|ôåIèËÄkòSYØêN "÷þ–æ§’Ç ñŸ*ï Š°‹RvÕ§˜ò-Œˆö,PFp•Qö–ûfâ.ΚÁó‚… ,x­xÞýk¤àV-ÕÆâ+©0ÒÇÖúñic?Ñf^ÐG%Š>ªú¨²tYù¨º‚Êj>*ÙüKȽ“¨ûÂ>êl¡!ÍIéÔ;ÑpáÝË—N)cP»l\Øš]Üö¶­êòUÆBÈM©èÀOJS}Ì/rv”.Ù»´Ì™·{aŠ·X(VrZg²ÀÑšî¯KM©p „ÍF ›‚L‚3Òüp<Þ·I[}¯ä¥2âÐK‡φ^ Ë [÷ëd’Œü z¨ôñòÞéT~|êúÖñ¡”X²gYϦYuAŒ¶¯Ù»¼¤³6ÂI›Ñdòg¦–÷^4ÕO”]?oá•Óýß²$zj:·”¹jú3µ½•60 §…Zn¾¶»ý¦k/ž[mf†æVq F†cêWììr”¥æníKv§ÝQÇŠëg…KgÀ^ûiëDl(§Ç†šõØPfØù9¼Ó¤ØP+¬0™ßBrÐ=£¢|kì#tä¥Äã_å$zÜA=°&ÝAÑŠK.¸¨bn‚ `¬‹=YñôQ>(  éä<ÝS¾Ÿ: 7¶ž™žhÙþÌÕW¾´®iûÓ;®†×ƒe3·ö \Þˆõm™6ÿòi|×ýÎÒyÿÆ×Žï_:ïáã÷±{_ÚÕ0ãÆg6ë×ñüi‡ìØýÀ¥e—–qÏ"碅ƻâ3*æ®k²y[‡ºêæ6•ª~Ó?°|þCÇï»ý¸výÎò»/[ëèûòÓþíåÙpû’‹wss’دsá°„= ì!;AØ,Ä4ÛËH‹¡B;ß™»`È´XLW’‹ééŠ01Ý 1]ì!6÷ªèC*ƒþ2’D„×7‡áwJHRԞ˟E_¡I¥Pð÷I@BĽe84+&ŽS|w×åKŽ¢ãÎ51ìø še±ø„âÆâÿåD ñ³;èB"EDÀj0È„ŸìA‰”b&EC×Ûs\¬Ľ æAê%¹‘b86l¨Û´%C6¿¦’'Æa¸`ëú'ñS0ƒ´J¤]ü¹á©‡ê­÷>LS%ù¢`}Z–æ“ùkëew¦/Ý´¼»’EÓœ4« Ö7ÀúúGñêóƒuiÐ,{­‚Mä­áªõ•{ö_¬µ6g8FÜŠÐO`ƒÐdnd²APi†F©D¿R³[%²[%t^9Áy¯ª€9¤’o‰ ñ–q„7‹E]Qí“.ôI—Þe!ü'k‚$˜¦±Ç7¯wM^ïí”]ª€Xô†Î->Ée‘ÔODËA8 ÂPâiªD%v±ˆD,â lâ0 ÂwÍ[Éo•°©ðÍ/êçyÎñxïqt·;™GN~šóÀwˆhø‰¨GˆHKD "¢¥|âS¸„E1CÁW  ágÐ$…àËCEêü¤Gת‰ëJšñ* å¯#ð´ÿ>/5"Þ@ 2KA+rìCVäH´·¼N*Þro Ò+Þ*Yóß(P£MHþOEñ+ E¯ª È2!£•ý$äGŸþ „ÿn,[È‘# {.ÇEkA´F'4u¤à°ju¯T‹¤¾ØÕkŸ„–*…¦/…¥¥h\”ò3«6Ví¨"ª<ȼd^6à]Ëåi;´‡µÚÑíç…m¡çÉ«&GUKÎ䎧D*ð·£³®ž7÷ʾHi?ºÎŒÞæLu”Wu–)®ŠŽxUG\~zÑíëê3«ïX:xǺlÍê;†fol÷D»Ö´Â«;Òµ¦§¨—àÝ(‹÷ûiaŠ  »/'¯Ô×Qj¡ ò|Y¼K̲ í5ÝÁË4Š)šž$ýg1Q$Ê„oí3á4Z ÇÑäF`ÀZ‹j1íd ¾Ú¦+Z毇D«ÁÛr4eÿYé66ý.9¿{èe…=¯µI¢M‘˜;+zs5jªÑb³»hsÉ+ï¯ëM„:ç®éÒ”%Zaû.€÷Ћ²t ðzŽ›ÒžRž2%\GðŽð—œã{Êr6gWÙþW½ïyq¯—¬x®u›íûzÓkÎ/^ÿÙëNjNg5“Ò8ã´èGà â3·LIM¯õ£8ÍýUí±é³ÔÊ®Š.´±À`¢M³›Â-•H‰q‚d˺"Í‹›<½3J;ÓnkÝ@£Ÿ•$#Øe›[¶Hµž”_4òÚYXc[C²F±+ª‡“9е[xwzj¼ë'<•¹Â)òøa¼cRŒ7Ñg[ïø¹ÐJW6Àç$fo™jÍDXƒ@Š&G¬%mMª–øÔêHÚ) Š lÔÀÀsùÿV’ê”5ÁÊÜŠö™—h2yèIM‚Ì ÁšR…7Ë60Ãn1óvÞã?„_Ã\Ø: á½Ý ûmNŒ[DkGÀc‡hU¥S#`Î'Ái1ÿ) ÒûÊÊÈà³Ò¶ÆïMºËÅ›'G´'9­3ómghãw‡{6t͹(çb½é™›¦ÙSe~ÖŒ¼…Ù®ðÔͬV°aÊÒFçÞŸŽ$fx•pmI4’µK§–Ö®üR_ÅÐò¹­%¤™emVÉÊ‘f³©¤u~¥ÅÎ-h fBŠj鬱Ûठ¶eìË`[ú°(Ú‘úçBž üúAÈ?u^Æ\ù9²l:¶áËÂlÈ¿GpŠ×êö Hæ¿Â±„‘6‚?B|#qo•efì«fÊÝ"gÆ·úÜÐ1šIÎ^Pøß‚ß ¾kã;à6Œ€ks”…u«–ýf7©ê£cG«õ½ezÿ/HÓMlï/¨.À?øÝó²'ð¾Ì<óco ày™÷zœ¯Ñ C¿æô8=¯ ¹ªW<èw—å÷ƒ•øOÐî´Wc»¶Wc'Ú«¶ú˜ë°–ÑI›54 ¨âæçS÷j,kÈ6Ö£Z«@á¡LH’Ãé0svIv°þø¥'®¹ö“mˆ¥âÒм}×µ×íÚÑ‚££áÍ ¬Í¬Í"­6a´Sc»¶S<ªíÔØ9,8éBuÐV"6ŽïtªA¾oòVEr($(ÁÆÛT†h¨¯oÀqVU$oÁLXù~ǵ»¶7Úàˆ4_ññuל¸ééBχ·ìØuu'?‡ð; X“-˜—À±_Øá Ð~òØÿ7ÃÿAê¹7Ÿûì%7øPpÊú®î5m¾@Çúî™ësÎ/‹š’P: *°®¥Õ>L±}AUrþÕ}ÝW ¦k^Ñ]7?ëq×Í®ëX˜±zfC+Už<®Åo…XíAX½?Gk`ý©{¹k2RŸw½ÍµfÉeE‹© º¾§ g­”öŽ6PÿO¯‰ ,,§ ØrR7B‡î„–©ÁjR¿y!uAµ!'R¢Ø÷—îà|Ð]ì'v"+UifšœDø˜íäèüJV@{|fwI•—«I3Q'ät$AòÑLkZÈ%źk—Ïe܈ي`•êŠP:YîˆV‰ B*Éb-2ëªêˆZÚg$ú4ÌNÀváÝôcKf縮á®l¸«+œ%ºÈOr~ŒÍdbb¨x¸Ý±oûÁâó‘í;|`yDï b¥Äc›áÿÅòYÜpžÉ}Í©–˜˜ÚC K»V5[Ò%‚‘¢Ìî²Æ²P¥O£Íåm&º ™Ò:µ']ïIÇŠãh» ÑÜÈ ,ç*óT¥Í‚8Iõx\7à¨èÒ"-á Ø›Ëá(m=PRhm³Ñ°q÷F£Nü@i))úÿAèÊê@ÝCg»·3°?'–G&Cy"ض´±cY“ÇÛ}ÅBK<âaQâJ;VÚYÙ^¦_o¢iVµýæT£¯Õ-xnOÜÅÿ$1»¥$Þ·µ{Æîõ¤‰aà´ØÂL&£7Ý‘-¾LOe¦^ªzRvÙ/¨wãlAGþ†ŽàoåXÌJŠ2÷©W3¨ëÁNwŠër&§,•ß…›É㣠•å"ndþE†ãpXEžÍY$™Î³È9(Ö N:=^•`¬(óR‡_Ž‘8ÏCB7À’J|¸–tÀ«^҈߀;µ÷Øô’ü”¨•Øõ ¾ o"-°DÕKªà{ÖÙàÐK*`IBû”S/ ÂO Ú{PRüh›)Øâüf9XöŽö k”u&QÔÔ83 U}Š">œ³1Ò¼9?b–ÜV‹G‚(Ž6iÎ ºÍ’jŒq ‰ç—lÎߎNf$Qjœ *2,ƒ ÷Fœ¾*k§¸ñ£ø›äïp£N~áó[ðWñ{á<Þh>¬ÅIñð#䟰j¬ú ¦F&¬Èͬ\Zùn%áªtUÆ£ò~ýplÔ¼U_ô…Ž+©cyXcQÉ@W¥´Ù „)Z”ÔÒTÂj5q9üt&e-}å½;V§_ÓÛºµL¤x†r2Î9©¾l`Ó§6UŠVŠa‰9~k²Û¥ê n[ºâëêƒ!>hñ{E“è/éZ×yóõ'šhÖ¦ÝÕkøGÚ]=®ßåkø€ö|D»Ë[ ZÉ_a.,~€ä^k¡0 9Êq’aTÁw4•$}1*Žêû–'©8Mv1x+-å?:)rœxÒxNpD“ßöøÞ³<ÁüÏxEáñç}O¡>Gñ£Z+<¥×ï(PµçO×·•ü>ÿžþü?‰wÑUó³ÚóAü‡„‹ü|þ¼þúËøvíþ^ОχϷiÏ ÝïتYòX'Z£Û‡+ÕœsÜã0N¨ªíõd 5­]—‚?×  pÈDZqåV¢öõú\X礅ÝÌÐBÅ6GÒ]ˆâٲÆÅn^¦;ãd_´ÂÓÐeT»Â] á’¶ÁW&fh³µ3–æDMÆ­r‡{²%Äpý‚&Ÿ m ²Ií’É$ tCÚõ:Y)’™V“î«q›…¦m–žd<™ˆ3âsÀ×jz5 г4k¼¨[ç|ŸfíjÖqÂ×HþÎÜ}”¶þA Á£N@l)ªüŽ«õD‰³Éž¿` Äì^™!Ž›lÐoQŠøÑó„IpÚ]†4á*, {àß³¨,§ÁN¬ªù± þ²!EþÖêGZ­Ü°VwÁZ¥°ò#šx’ ¶Îî#Œ=2Høpx\1I;×OÛß„’lg(µ+g«2_ÇRl(`w fÃ<@RpîíÐ4ûÆË,ÍÀŽîiã=÷f^µúB,ŽLP68›@:ÎÀ•ÿ5¤=ª0t[p7ç?”‰1ø™ü“…»8Šo„wÀʇ­æ»ÜAÈŸ`õcf+|#2³A3³vÐIj2XÅÑ5^s߸Ò´öM¾HÄÿ:mbü^«S¤ «S+ ” *þ ¤M<ÿK¢àß¶ªÚ@lþ¿—\üs3g6@k#(úA,ˆ•`žÇã!ËÊšUåq*ÈšŽM6h40¾;]yØM½BÆ«ªnÑhhËЈC­ª>€Æ)Hõm^‰Æç¬zÿ;/R8 MÆáh?a–8üç&Ê€ãÚxwþ?‘&ˆî1/‡ü¨c؉Eª¿ æc œ”݈Y±rèyŒqFF_­UUæ’QUºzÔ|ñD ŝ޽y :-©^W¤+ºªIœ–Ð诵 <þ¿W U5N-]p8ù‘®ÅM~ÞYêðוªOs®òÐü¥þR'—”Ã5¥k¶{ãA…8n®Š89EÅ¿«*®êi)wu<Ä  ¨·UöDz¯,ÿŒ;îÞç=1d{Ý;ù¥ ?)à&Øá`Á0ååÐÝ8Gë‘XxºÓ™|Úô.$iõý(½ê¶¡oó.hÕže•·¸² ¶ÎoðV¯ºk¨ VìUÉ\ð•Eµ+»JÇÞv®Ñ@CÈÔÒœQ„"åW0Ê9újD"F½&ÑbM4»B*3|AëÔÅÖ¢y¡15b3 1ßËX;°›¤H´ŒÌÿ× Mc þ9ÊIÄ8W6jjì¢`L?0³*/ª¼ñ“h×1 bô Bìüÿì} xTåµö÷í½ç>!ÃEˆˆq¼A4‚¢ä@Ä€hРF‰‰d2d&ÉHn™„$%0¦è &m§ž/9žj¯ÚÖzê±UÛÚI¡‰ÚÔjÕJÕÖh½ õµH”ý¿kí=—öxž¿çþóö—o—õ­õ~k­Ù;Ĥ@=Â•ÙæÏ†GUŸƒ§/u1?{™½SsãMüIJ¬—9çœxæ¼"ÊÞãàä ÙßË=#{áêE9ÓO/:uÖIór².qX†NYàÎ=¾tíÉ‹¼ÙÊËF¡rÚ™WxêÌÉGS¾¿˜3C•öSÎ[uÆ‚ OsÛO8­0÷³g€ÎE.U}v:Uz™|ò§ìIôS²äuæL·ÎØ}bú˜ðz¸ûÐoŽ<¡Ô;—ѵôy~c™NI9Ýò[úÚ“j±kÊéüãp¾='Ûv¨-e[Jhöôd¯‡›¥ù¼‡OÔ+œÂ‹¸É³.1_¹‰ Ð'˜|a2Í—˜Ã~/ÖòŒå>åÌ+>Wº¢qÍYVϼãf XÌÉ_6Á²3æX¦Ï9kí>\Ýzå‚Ó/kY-÷% þdñâËÏ{ΚsäãÉ>þ}XÆÓŸ(§þT,Yg¢pžêR+稦ìC¹Èøé É'¼sS?ôÜôÃ^%^®Oœ}\îL—WzçŒçÌ9 7Oi2;÷øãODUP¿¬X§pž]­Ê]êmª%;wý,"UyÃá¤/K:rrRI¶•=ô<ƒrÛ¡a¥ˆþ—@úWÇC¿RŠé‡8«vÏ4A×× ‘ ?U^W6fÈo QËŽ"ÿ‘í–û›òNZ,™bñ)ÒGb;ß{æÕbÊ'GG£ãPRœAçs‡‹kÙ§Ê÷ÜÓ3äjS¾ù8«5%O²|2U¦YXÖ@ýiÉÞ”ý|Z<§ŠlüezД¿¤eÆY¦l9ª<9óš”<3ëô”l5丳?U†f¯MËœù9Žœ½9{ßfÈ\ïQä'´Ï‹ŸXtâþÜñ“úŽoàH9yöɳOqœòü©¯ŸÖdÈéE§¿A2ÿ žHJ^eJþDrÆú#ä g|áÌsÏ|äLýL=ÿN–—ÒrÖÏϾbмtt)ˆDºÞdHaYZ]fÊ!çDÎÙv„ì?÷;‹ïZüÝÃå¼úóMοoÉÍI)š]ôù”¼)ÿPþ/Í^Ú¶ôË–.;T\Yüµâ¿^P}Á-ËËk–ßsᬠ»/|ªduÉÝ%W\½âÏ+×­üþJýÿµ\têE¥Çä˜ü¤Ÿd•jÊU?­úÓÅÙõw^¼²rè’k.ùþ%ÿqÉÏþSyù’½™Rê0eméÝ)Ù·z1KñêUCnù»ÈžKO¸ôV’*³–õ”=A²&gMtÍ«—o½|ôŠõWZ®,c¹óʗʯ(ß{ÕåW ­]±öf–g®>ëêÅW_ýo×Müš=$ëòÖݰîÕk·]ûÚzßúúõ?$©ØxÝñ×=\ùƒªðõ ®_xý“,Ï_?zý[×pýÁ Ú†¬ ³YNbÉÛ°hÖ ¿¨>¹ú>_¶¯Û·¿¦˜¥ƒå~›­ÿ«þƒÿiãþÚµ¿Ìc9=PX( \X¨ üW¯ŽÉÿPùi`Wp~° x~°²5x3Ë—‚·A¾ü6侺³ëΫ» .V×[÷—ú%Ç䘓crLŽÉÿJùdýþ†% q–B^–ŠÐã$7x öm:{Ó¶M9&Ç䘓crLŽÉ19&Ç䘓ÿß…ÿ=Y 1kHH5êÂaHhb†þ>°L Ðk€ ú(0¢Õïvé7Mè#À„þpX^hêåúÏ€ëD6°B¸Uú€ÕzÐÇí0ôOšþ60 ?Œèo£ú^`§þ,°KÓeÍ‘ùŒŒEŒ¥ŒeŒŒ Æ!Ò KÐV×鯫uú¾¸2ý]`@8Å ôV‰ë€Õ°p†êC;ö¼ ÀëسÕ?v꯻ô?ˆ¬}X›s AVëï}hσ†}ÀX;;Ž«aÉ<©èz`É<9»Ì“¹ú‹À<=Ìg,`,b,e,cìæ™}¼j€4ÃÓ§€ƒ¬s˜Úàóu1»8žÎgçc÷?;aÕ|Øð8l˜ÞæBç|è§ž>î‰ëóáãb`…~!|œÏÞÅž.‡þ}À2ý`1°±ñ,0¢7£ú-À.ý:±Þ½Ìg,`,b,e,c@ä,‡G?ê‡õË?ÓU¤û.úÐFaUö}H1S†÷;ÁUöE?bà¯Àý#Q_žVÀÓ2øâVƒ™2xäë¡- ÖCÛGÀN0°zö‹õ`ìY G8l¯cÏóh­Ìg,`,b,e,cìæ™}¼*ŽHX/¸˜V)ÀŠÉƒÀ*Q¬Y@·Ãú.QÉçX)(Â+qޝÜŽà¼*á5vÁ¯JXõ°[ÿ=0¡¿Ô_"¢ž¾ ž«¡0Ê=ú‡À.h®ÆÚ·€ƒ8åj¬}STƒÌT)†«Á?µÃà*m5ÀØ1 ‡€Õ`/™'à £àíJà\œZ^,ÛY§ßlclgìæÑÜîãùýÜŽëõÀ¹Ð¿ ÔïéßëߎèaŸÀõz°B?H¬Àêl ÛaXÕËŸ \0ó%AÏN ±/¯«?ˆCDàË—€ýNà\ý`®>,×ïÖéOÛÛ»aa¾P»ç÷s;›#ð…Úȱ,¿OD` N–ÿX¡Ÿ ¬ç}Œaý_D~Hy……„Äv”Ï. zAQXø0WX®?¬ÓwÛÛÉÂ(,¤vÏïçv6Da!µˆÛ(ìüµˆÂÂ<`…~°JLúÃúwE'¬–1Rœt†g¹¨–°á°9Þ‰½¨µ´»POÙÚ‰3ý-pYÖÉñÖÉ‘Ö ý?]ð½8Cÿ9°LHU¨ ^w=º8Wïæ"rºPs~ Ìg,`,b,e,c,GÌtÉ ÈÊ.ðs70ºÀµÛ»{]`‰Ú}¬¿ŸÛqÔØ.xñ,ðAîIè?²æ!ýà°þ à"¤ ìá“ç[¬Ðg«Ä\ 1¬÷I6ÿ˜ÏXÀXÄXÊXÆ8 ¿Ĺõ€CÜ3¬¿ dè‹2zÞæ301–2–1Æõ€ú`‚ÛƒŒCúóÀanè¯ÉlèÜ'=àù=`70úßæ301–2–1èû¤9—5çBó+ÀaýCàˆþ¶Ì¥ ,ó yУ?œ«ÿ˜«ÿˆO|`>ccc)cc¹¾Ø­?ìãµqýu`Bd…8,œ@Ú1§Ð¬Ð;€U¢ X-Žú¸Önð­Êg«òÙª|¶*Ÿ­Êg«òÙª|¶*Ÿ­Êg«òÙª|¶*Ÿ­Êg«òÙª|¶*Ÿ­Êg«òÙª|¶*Ÿ­Êg«òÙª|¶*Ÿ­*‡U/=ˆ„rXõ0'R.ËÅL`7â¡;R?òK–ãÓs°J\ Ä' Їv%GZ%GZ%GZ%GZ%GZ%GZ%GZ%GZ%GZ%GZ%GZ%GÚhž ôCÜq»vþèÑŸÎÕæê»õŸû¸'mØå#àƒú²ž> ÛØ¶6¶­mkcÛÚØ¶6¶­mkcÛÚØ¶6¶­mkcÛÚYO;ëig=í¬§õ´³žvÖÓÎzÚYO;ëig=í¬§£€ƒú8pQÑÑýÀœi7ÎîE¹ƒ3ngÜθœq;8ãvpÆíàŒÛÁ·ƒóbçÅθœq;8ãvpÆõáL²LþèÑ_ÎÅh?˜|XÎínýe`·ñÌL úc. ÅX?,,¢n«D°Ï‹ý8)j‡«qØÿ0Ÿ±€±ˆ±”±Œq@ ˜@\ÅÙò8,ßqXþ®ŒÃò×ål~èaœ‹U°y°Ñ>k©g@ÿ³€=¥ÀjX;{¨Öe^’†=£só03'.ÂÆ"ÆRÆ2Fb&½Þöñª88Oà¹Ë L7pq˜q±—K~`…^¬ÅÀjÊ«¨ÖŸ–ƒ°ê- :aÕ»À\Æ„½¬Àaÿ´ ô1†õ_ÊaèyèÃг˜ þ‡á˜ÏXÀXÄXÊXÆXΫºyU#e÷0s>ÌÞ ³wÓÃìÝ0¼kVèøÔ‡=xâgï†aµÃ¨½#ôÆôp{.|U„yˆÀD,acc)cc9vU´¶WŇ#`€Fà‘L=ÃÔ† ó€>¼G]Žö©@pÞqñ‰gæÏ#z0ªßìN`—Þ¤®CæÁÇ<ø˜óàc|̃yð1>æÁÇ<ø˜óàc|̃yð1>æÁÇ<ø˜óàcð|ªÿ‹¦'.`>ccc)cc‚q‘¦¯{¨[骩ãú;ÀCú¨ú‘f£¶æFûzÞS ýž:®~¤ÔÇú_‡Àð¸f¡~ÍIýš‹ú1ÿIõcŒ>­~ŒöÓê'ê' <¨OÁ—O4õ`z0ç9õ ôO@ÃAØó6ðcn„þƒØqHkbGÌÔ¬4 k1S³sÛI3af²Î õ€ÀqØ?m“Àƒº<¤ïU'4+BF¡£Ð€Q¬Ý«‚=¯ ÇAËÀqš‡ÔOY‡Ø—C°jðð¨‡`æC'æC'æC'ækšÏž‚m˜¯¹…G³ç@p®Yˆs 8׬Ĺf%Î5qç@pçš8:©Ÿ8‚sÍNœkvâ\sç@Ø ošƒ8:©‡øÑœÄ9œÁ9ðcnƒs 8ÒZ'q´Ò(q´sÛI3‰s étç@pç@pçš‹8Úh”8:i”8×ÜÄ9œÁ9œÁ9|qç@p®¹‰s •æç@;Í'Îä©›8çhôÛÖé:[9…~à·Œ*…sßQ[ÓTÍl«â4u†ÙÖ2æXDŽz¾Ù¶fôÛD»z…Ù¶‹3Å4³í^u·Ùv*;Só]âZõ5³ígjKÍv–r‡–œ3M4Z'èk°|ck0ÛRØlf[6û>³­Šö÷Ͷ–1Ç"ÜÕl[3úmb™#ÛlÛÅq¶³íÇefÛ)ËSó]"ßQi¶Ýâ8ÇMf;K®q$çLç;߀%’~ê¤é-µ ž¶Á³Ñ6x6ÚZƃg£mÍè7x6ÚÏFÛàÙh<mƒg£mðl´ ž¶Áó=‚~n¡XôŠËEHÔŠ°hÁ§L‹¨Ã§ŒW\„VX´2úÑB«Y`d…h„xÅZôÕ‹ŒEø.ˆ¿ƒ˜Ý `æEX׈9ÑÂŒÏóã¿&è ðÜfÜEÐ×ÌcÆú,ðâ??æ… ¡w›ÑŠb/šÓQôqG6·auãͰ†´´˜Z£˜ÑdîI3¼ð±…÷¤]"ìË¥ìkzÈÇ6ôyE˜{Ùê¨éG-FÎbÍMÜÓÈýàÈèOîÒ=ÌX«ie3zšxWC'ùͰ€vle_ ¾“l¶ÓN-`À ÿ ÆÉª&Ìõcÿ(ß‘ÇÑÔyœ»xÙöfÓ¯æv#ÏL[œé±ÖÁë ¯7á¾€ã!ó4°¶&ÖÐÉ<´™'ŸÉ7˜áí'ÿs s4Ð߯ŽtÖ^èhMycØXoΉà®ËÔ…Æ µ§NÉÏ1âGoÓ¿’Ñ\ Kü¼­¹Gl=Ÿ™KðúZ3rBfŒ-KAŸéQÞ3À‘H»lJA’›£å^½×­©Ù¹Æ‰7c~cg fÔŠ<æô Ì °¾R^ÛÂú£Vø±²™¥€sjê~¦ö…ôµTŽÀz¶º:ÑKŒÕ±Ç©Sµ&û)[ ï7¥ô]Ç>QÒɧa £ÇÎ;cµ—} ò †x ŸáF^›dëb±~¯0׆3FŒü 0'éœØÌ{ÕrÎm_ãžæÖâÛ˜Ã@*Æ<ÞÊÒ™W­ìi³Y†® #eÊá~Ó¸‘‘yXE'EѰ1µÓѬj>Bógç(­=Y½f]‹²ÝµSêË‘¾'«Éáv-Ë`€<1|1ªlòs"œªØ®YÍ\»üŸê©Á³ §FÆ·˜hxe´Û8òÚxe€óŸ¼ ¦ôÐÌFΚ¿uB¯¼HçÄB¶†rÀ¨ü|V­¢ãï9…‹Îñ^ª ·DZê¢Þ‹Z­-a4ÔÒ\à]ÑØè]ªoˆF¼kƒ‘`¸=(¸ÈßÚyC¯ßÛÔ†›½sÄ‹ñP·ÎßjìônE¼‘¶ÑÆ 7ÜÒÖ5×G¼-˜ 6aesÀ[Ûn†#ÞK£Þº ?ÚF¼á ¿ÑŠbÚÈYÞH“Ôú[Ѧ%MmÑP+T6·5Ø FYAÄÛnÝd6´76¶lö6Àpo¨©Õ_õ†š½Qò–a‰·1ÔŒ½Zê¼Cõ¬ØØ(ìˆbqhS°Àkº¹ âmò7wzkÛà¼aw´û7{Ã~øÁm,ô7yÛZih¬GO$Ô…éÑ8ÔN.ù½›ýá&c/¢¹¶Á†aÁpÁÚ`}[£?œ:¥É­¯9pÇ{^Á’s¦ ûÁ&xy@Ö¤O¯\·Rwm o#kÚjóü‘3¼ ·4ÜÒmˆF[—.\¸y󿂦äºL_ílm©û[:ÖFëZš£s*µëüØ~Í»®¥ ”tzÛ"AlƒhØëÇ ÃM¡h4ðnìd³.^·fFÃ|ƒó ´'±¹!TÛ±‡škÛX Æ¡Hk#6 ®ZÃ!L¨Å¬`s´À›Ü»¥™:ÃlÚH‹Òªš““jO§PıD¢áP­/©Ý)L’º–±y!ì‚¥œS`Z677¶ø37…Í~ÃR<ÜÇÔh‹¶¶EA{{¨6Hs‚­‡9ôY΂Oba XçGðø#­©÷&¡çˆ›ÅÑ.‰xò3…M×ñÆ¥˜oBæá¿"ã{IþÆ¥i¸Ýs”šÏ:?+‹æ«w|ÖùÙÙ4_{ê³Î÷xh¾ÕþYçOŸNóm%ŸuþÌ™˜¿½}i<ŸÞ>W3NYb†˜+rð\9O,óñ –¸uµŠ¾¯B¬B]-=b½ø²¨w‰j¼¿Ä1² uö)TÜ?¢"€'D]*Ò-³å鑧ɹr¡Ì•Åô¯f²\^#+¥_nÍ2$?/å-²EÞ.Ûä7e»ü¡ì–ÈòW²OþNöË—e\Ò×ì÷Ë)Š[*sä’'‡•såˆR¢^¦”©—+ê:%¨®WšÔ ¥C½NÙªV)ÛÕj¥_õ)_UÃÊ]j—r·ºUù®ºMù‰z»2¤¾­<©¾£¼¨¾«ìUßSö«cª¢¾¯f«¨óÔÕ3Ôêùê¸z¡ú±ºZ»@½ g^5•7Õ÷_äíðv;xû&xûwðö(F~ Þö€·×ÁÛ'¢KÚÀÛ,ðvx;¼·KÀÛUàÍÞÁ[xûG´noßo?o?o·gÀÛ(x£)—Š Þ<àíð6¼-o+ÁÛ•à­¼5€·vð¶¼ío_oÿ Þþ¼} ¼ý¼=Þoƒ·?€·WÀÛ»àí úžjoÇ·SÀÛBðV Þ.oWƒ· à­x{¼=Þ~Þ^oˆ¨tˆNé¥[oÅàm5x[ÞjÁ[¼mo_ow·ï·‡ÁÛàíàm/x;(»›Ü¡Ì”}Ê)²_Y$ãÊàíRð¶¼Õ‚·ðÖÞ¾Þþ¼ÝÞoÃàí)ðöxû3xÛÞ>ojXµ¨]ªKݪNW·©§ª·«ç©o«ËÕwÔ5ê»j%xkoíàm;x»¼ío÷·‡ÀÛ/ÁÛxÛ3•7ç½¼ÞòÀÛðv x[Þà-ÞzÀÛWÀÛ½à¾sçwà팎7]Dä4𶼕€·+Á[5x»¼u·›ÁÛmàínðö#úWðö4x{¼ÉEÈ6ÄS»r*x[Þ–·ËÀÛuà-Þ>Þ¶·>ðv;x»¼ý¼ý ¼= Þ^oOÔ Õª^§f©UêlµZ=Iõ©yàmx[Þ.oåà­¼5‚·Ïƒ·[ÀÛàí»àí'àm¼=Þ^ocàmB»€~‰6k*oÓÍàíð–Þ–ÑwÄ·*ð¶ ¼Ý ÞnoßFï x{ ¼½ Þ&D@ºEƒœÞ–€·µà¾¯£¼ÝÞ¾Þ~ Þv·gÁÛ+àíY©(rb*„˜jTƒ·‹ÁÛµàmxëo7·oßo?o¿oO‚·ÁÛ^ðvH«N9¢ÎU/S¨—«Eê:äÕzu-ý; x«o-à­w7‚·[À[¼ÝÞîo‚·aðöðvPÆU‡PçÈÕ2¡ž'Õ5rH­oŸo_ow·ûÀ[¼=Þö€·—ÁÛ^ðöxCžjVµKs«[µ™ê6-O½™÷6xyG«PßÕBê{Zxëoßoƒ·'ÀÛ‹àíMðö!xÓ…°ÐORvþxNæ„YÁMÍNfwܱÛ=Þ’ÔM«ÝnN+,,/#b8°8DÍ‘¢ŽãfÜîñ×[œ@CŹÃýQ£QâMXÀŽ".?=µ±¶¢Uäʪ¢¿sj9¤Ý5ŒÝ ù*„Ñn“vGѪ\Ø/•U¯s‘b™lF¶9ŒlC𤳠7élã‘d¶7f¶á&m¸Ig%E*ÛhÄÌ6‹"œœm%U8µúFÍÄf6«—3Îëp‡Ã.fAˆÊbÃ*vÒ;ŽøwØpW¼’[YLwŽñí”=£89—¾g-4“¦MLšiMÞŒ;œÒáNàúzÉ×Kneé‡8ìÒá,^y#]ؘŒbƒR&ò]/JoLŸ½Ì™Ã&¶Iy¥ÌàlfIÁ xK>“ïvápIG¥å-fb.ŠQb‚‡ýÆ•§–sÚi+od½f{<6‹´Ñ1u >Vé´CéC»aÑî‡hÈxèmå!MÓ¢ýêÚ¬ÒFŸÞ±Ø§&œ–T~–`¦Í¶…N3† StÂEæÏÌј[Õé$Eš:-ÒI ÝKyïuJéL³³9¤Íý€áêfbêNµÝØÖìßýUº5m§Ê©I›™¶1jS ªñxF©ÔX’ž²>V‡‰&ÊI$¥Í)l®U%«JÎŒ‘Lǧ1ŒÁòò^gÆT„1ëóP9¥âLÖlpÀÞR¾z‰|¼(¥RÖ·)‰cü›vð^µ·Þª) „¦hXj]Ç5‹@cõê¸T¥f•61i›ÌR¥ÓâÍÈe/÷PøHƒ P7£ÎLh¾3Ú;nŽÙ)%KÒwF|"vm9yy«W÷NØíɤARÛM-Èj#­yæ„FZÙÈk—fäµ&\–Qh3[5xH1>>=øN‡p"vÓ™½ ÑÎÅÝ&NÊà §·ËWήXN·Î‰N¸1J8‘Lç &=•Ý1žLuž~XÄÑZ[ênÂé’άDM¢epçW¼_AžÝâ¥|s:¤ÓµÜ´.y­ÀÛoN–ùž2 ¿}{|ÄšÓ&œöTÆ{R¦•ƒÙ82ç킬š¶Ý›ü8Nç½cFÞsâ³úTâ{ÌtѶ ¼]Vé¢,ÍL}›™ú<¦=÷]tnÈýTòÛ0¶•0†§Ÿ-SÕþ§Ùï²H³m¦¿KJWÆaü7å?¹ÚÁ5wì¿;ÿ]Rq%óŸh`‡)¡>Kp`1¹ŒàJ֗ͨÔH×»˜´ëÓTéʨ”ûÜ•.fpqà@5ßLj?‹â´{SuÀÕ4þlŸHÝv€L³Æç¤Jßn…£Å%f·©bPbS…[3÷Á ŠU€ºÇ’m*ËTìfMp9…ËéÆû=Éɒض”—ÄJ\6é2“‹Ë‚ËŽû\¿Á@‰?—îã7…¡çæqŽN* feHß3Ä\ér¥£OψÄÃ#“–¦ëTeIWv"'‘³3og^|u|5ÕÖ›ì7Ù{ì¬už¨R,Và~ž0àGÖš¼7ªEرÎÚ‰Y—M¸2ê…ç0ƒ3ëÓF$áOìd&ŽtCØÖXv±Ç<2z§§ÄSâr—ƒåÆžzÀ"Û°7¿{›ïó¨&È·MºFÞÓóÊ¼úð¨‚ké%4zÉR^[´Š* F-8ø¢tI¡cµ§kJϖÔ÷ô5;Åf–ª;3ËŠ7á¶J·=£®lwKéÎ<¾˜Ý%íÓN y·g¿?%7™ò2åJpyáû¤7pŒ_©Ìú3„©Æ£ÄÓçvIɸáZk56 æG}ÃJ–VÅ/¨3®ÌéÈ™äÃ3²'6î–Š;õdJÜ0­½ÈÈÃk]*ô")/6n³Ø¸“ÅÆ,6îd±±$‹M¶*ÝTl’Õ-/÷q+Ym¸Ü¸mTn8´ :“Œº…åq3’'ù¾c;¸Ô¨â¤ïQr¡O¹íž5ë´U«¶ëpŠÇš£ð8ÝE'­RÑ’ue'+]vd–5UvŒöáeÇín×41MœÀ²(¶(V“؆GzpÛ¥Û9144´{bh×®]Cn:N­±‘Èôœ$ÜNévOŠ]x[Od\ƒ±]±IÁÁ=I÷Ü;™î˜4æñòô2=SGÂ­àØ§t`¹=ã~Ò=Mº=£óFç?uÖžÆ=­ÙÝ?ܿ˽ËívIwÖIâs¦_I©I|.» /ÙAC7y9!†Ä.–!Amãn0Æv×%£ó¦Y­#n»p;ôœôu˜#éË»P0߯Þ$Ä·Á<;[º§Z­»n®í¯í¯©9ÏâŠâŽœÂœB6s×®ººâœœâºº]»ÜNÝíðÇü±sé·ˆ‰\ˆ;%üZµeÈjÝ:4ôd{–]f9É„—ÞØE×/oulW]1«¸–Õóxý2z¹ƒ›CC8ÅYVDOqMMÍxy¹i|BchKb+Vl=|‹]»²™¥%B¤ðhz–¥°PˆÂô5še“YÙ36¶gddÈ\˜q9ÜÒ‘ýÒè›…CS„ß@Sûï£uÜ®+vgŒ½ñ*u¤üƒ¯ü,¿g4¹½±vì¦cu÷wÐŒ5ínë6÷9ô–J_•ª$çCæAÓð‡Â­6§þŽÀ‹ï/˩ɩá·T>7:6÷Ñ׿@ 1áÎÉ)D|Ld)JVFЃG檣ßjµº‹Àx´¨R±ÀÂD Ÿ< Ñ-ˆqúÂℎ‘ÄHó²Œyè°ŸR722b±‰,{]]ÝH¯Ô¤Å:&bÒ¡ÇQ)êmšhkEêND« õ÷í| ³ºqFãâ°æãÃ+›Œ·z†|«YwÚ{›÷øéïSúœþ¾}êéïÏ~ñô÷½8ýý…g\ïwÎéï‡0vi­ß7´ºî¶_^yúû‰rL"§/êÿ à™êb-C,×ÞÔJÄkö?Úÿ( 󯋢6_9¶Ù“nLú½í䇸޲ÃÛÎ{­v÷fï+ÚâäÉ3µO’—'?®å¥h)nm_JcJ£öµ°å˜Jgqò?Y (eɇZ•X¢üDiHéÑR.¤ £Œ¡Ì´ÊÚ3KrAʺ”¿µ[“(¯µ*UQËÞŸ(Ií3ZÊ£íW·³¹¤vû‰22¤Ã‹­Ê›ÍźrF鰹Ζ²§ãAÊaU:9~ª¤ì”ÚéÂζ*«­²õ'KA禓¥K‡.ç´”1‰2þ'K†U¦$ާ—œÄOuß6«¶”æ§t©Më—6#í•´ ªœY{Ú¦Ÿ*͵§ý#­2QNõ)iMÖgå(ÎØsXK™ØsrK™‘(3)9=göLÝ{`ï1=gòs`ï­}v\Pl•ë_;™Ý·e@ßʾq¨ìûC¿ý_Q¥oeÿûÇúÇ8¤ è0à#JáÀ‘”ŒÓ½œ(ÁKr.ísitÈ3—¡ŒÚeè´¡YWlN”¯ØvEá°~”+†­¾„Ó*OØj•ã#/ùN¢|0â8ïßYk½«¥ÒF¾3jÀè'G|ÕÀk§Rüò®O5ßͱ¶ù®q#Õ}ã&Žï1þâñ#Ço˜ÐÇ*fZ%kÂÊ /ó3ËúWN\21gâëgSÖ¤grWFúžô=òù¹_½¢T¦ëéM“r¬²~ÒV90I‡“Ì Ç$“ëzÆ´Œý•7̧<3ù|î[?Él¾2yÉ$sò¡É57eLÙ6uêïR×íw}îtÜ9íÎÒ;›Nï@Ù<«Ý¬³³f?0{ËìÊÙúlsŽcÎà9cæÜ1göœ%sž³fÎ;s>˜“7gßÜÙsŸ™»aný<1/uÞØyÓç}<¯xþùÓ翼`Ê‚‡4,t.°ðº…ï,<¼hÌ¢¦¬nY×eefÍÍz9kSVéâ‹»øƒÅ¥‹›–x—tZrÅ’«—ÌX²~IéÒ~KÇ,½eéÚ¥—î_jÞ7ú¾%÷}œíÌ=7û½ìmÙÇ—³ì®eë—éˇ-ÏZ¾)'ãgƪÎNmrž*jÉyíTiA~¦ï?³ÇÞOš3ý'G“#O«rúØ‘³íTQ£CNá©Ò<.¨1´ÝÆ.Û:¯f.Y˨iÁÖ‘ñ¶}ãëÚ”uíÖ$´Œ™ÜÛÞì9C=›üAÊÚScg³JŒÎc¬ñ·ù®)ëNª§Îª±Øº·L]·îO(H½$b$_ÇeVm´n Ç2«œšbgÌ cZͧf‚uªÝ?ý7þhôOJŒùZã½5Ê[õðtÊ^¯=9âdž„_ŒMÍãOóø–ð‘1‘P¹6£et<é(c\—ñ9•ê‰S÷œœS™SImê®®e¤Uöœüãœ`,l5¢þÄ8Ûz\ýñ˜š¹·YÙÔ<ŠN<9~ªq3|jŽž¶3“»d\>$}O'Gó{jm=“ª¶X³fbÞl5s¦RÙóäêÓfÇ‚ÄÌØádë¹ÞÔüéêó'dt<Øe í9M}¥šÒ§ZõØ“7÷D¥fs¦ôœÞã•›J‰.^´üÞ ¼iÕ«‡¥m"Ö“3las­9z—œ½¹¨OPÇž“•+êUs¦©cŽÞ{`¯ÁÍ4Ïp½[³R«¢f¸æÙÍšÿ‹5§¶*?¾Ãši[•ÄŒÛR~ü„šiÿ»bÍÅÿqi™±¦œ©”*-óøÏkfÿK«aíß–3Õ±Ö(­Êõ³Ö.­ŠÊûf§ÿ»òãšÿ}ëþ³Ò¬³Z»¤¬áßcÄñä2µê±ÊSÖ§ZéXïžßC­×(¬ ®P«¦æ³jìW¯T±VGS­••ZCÕŽ¬µÖG¬ŽxµuÄSÖê$§e£ÊúI9éû'娌õn}bÓüz=« JuF­hÔsé‰b­xæ[k#îµ®®W?Ó6q÷zµšb´è“¾ßZwe%J†u¦ZuYï2Ò÷«q)qÂÊíbÖjj…¦ž[Ùü/VMÈ·Öi³­õ÷Z+µ–õÚ„ŒQš¥Èq¥Å ó›•á´â¡ÅÍ-oÕ­>i¥U—Uïé=ñÇŽ¶Îƒ Š›ß §Ú7Tíªv U{…ª}AíA1T¨Î ¬]-Õ+ÝÚ¯ÏfíÛ©©8­ý7=âmy\äÉã¶Lq¶í÷b²mºH³Ý&|¶¢½ínkÿÏ!jKû=ò_ÂF=UÂÁ½^îmϽ^îM²ê sWhkSû#eŠž\¿‰ëçr½'uõ¦.O¿D{¨†äfµ;¥ý>Ú‘-ÿN{‡Ù«äóöCâb{X ¶GDû¹×ãÛ®ª½ÀÚ}Ò¡ö|T;>ÒšÕÖYâ,1^´ƒa¢¯3ä^q;ÜjoËù²A,€…°²`±ðŠ%rŸX ÷A6,ƒ\ž_ÂJx†GàQx ‡ÅÕâ#ˆóú¢¯M€ 2ÄpÛ 0n„__L²m݉ØoŸ"®´ß¬ö@{ÄÃjo2ûýâ|{®8ÏñªÜçx ^‡}¢¯ã+(„"(†(…¯¡ B°¾}Û´“{Û”ûÚ|+¼mt^WC­Üçl#Æ;ûr¼Tôu^Îñ¹×y/Ì‚?Àq.´q¢mœKmœïŠáÎ÷àïÐ(†»ú‰î®þp«èëÊ„é0æÂbÈû\OÁÓð*¼.®v½Í±j ê  Ý·Á ¸ˆîm…Þ¶ƒènåîakÿMõꈵwfG²6@Öȶ>dÛUdÛdÛdÛt²mÙ6Zív©ö´´O‘Oª]-Õž–äÍsjK{P®·W‘gaa·&ˆ›­<;dígÙ¾¥WÜ"µª,õ/¤þk©¨Úu’ºW«}'Õ®“Ô½Fí5I}Sß‘B-G©å(µ´£– ¨eµ ¢–AÔÒŸZ.Pû§©Ý!©Iíº9ØÚREºÓÚ»± uü‹:þEÚn•QÏ ê¹•z†PÏÔ3Jí¼H]ƒlkå?ÔNŠj¿Dê[¨vLTû%Ò²\µK¢½R6к|{”ÞzD\d%zl{jíG­~jJ­×Rk/j¼Ú¾R{IY;ÿüõ$F˜Œ$jdyAäJ]¬€a%<Ã#ð(¨=q‡|»à Ø {àK(€½°¾‚B(‚RøFJqÊá T@%TÉ]â„¡^†Ä1úy`B#Äݾãz|Çáü@[¤ÔmlÖ¨XeŸF†ýVµßÂ1Su쓺ã+(„"(†(…¯¡ B°¾¨Œ;Ž@ ¾ª¡ŽB-ÔA=ƒ -Ž@Ê]mRå.×hw] ãa¤ËˆëWo‚i\¿n[¥îÊ„ép7׿pœ óy½²`1ïïã˜Ãñ~XÉë‡\«8>Åñix–׫á9XÏSÿ«œ_Çë7yý6¯ßåõ?\xäÂ#¹BRºö¹ðÈ…G®ƒ@ %b*ó¤yÒÇ<écžô1Oú˜'}Ì“>æIó¤yÒÇ']Î\Ù‹¹²}¶>[HŸ-¤ÏVÐg ú¬AŸ5è³}Ö`>M¥Ï†é³aúl˜>¦Ïâ·˜À¼9„~ZA?-§ŸVÐOËíÓEûmpXÁ<Úy´;óhWæNs§¹ÓÇÜécîô1wú˜;}Ì>æNs§¹ÓÇÜé£/†é‹aúb˜¾XHß3ès…ô¹Bú\˜9ÎÇçc~ó1¿ù˜×|ô•0s›¹­}%Ìüæ#ÿ ÉÿBò¿ü/$ÿ+Èÿ òß ÿ æ¿Tæ¿Tò?LÎ’ó9fô1ÿù˜ÿ|Ì>•ï²­ëYŸ=)ıŒçŒç pb,Nü‰«“í×Ú÷±’*”?Ø‹Ät˽w—qW)3æ“rï¦óì>žýг£yöIžÝγãy¶ç~#œ‰~ôkî,âÎBîo­¯TμeÕt;×Gq}׋¹>œšáê{Ôt55åSÓÅÖý_[ëÄÖOS$ÙÎÝmÓà¸þ³aÌ…ùð(3}{µÇ«ÚÏUíæªvnµÖF¯‰ÎöŠËìŸâ¥èɬ}#«ÄTfîsX%ö´GŽÐ‚ç¾—1ŸÏ•ŸòD'Ö”=ÔœÎó÷ˆqÌ`ÓÔ|bœýkõ5N¤Ð²®´¬+-ëJ˺Ҳ®´¬+-ëJ˺Ҳ®´¬+OvàÉY<Ù'gYO&ód2O&ód2O&ód2O&ód2O&ód2OªÝß/áIµÿû%Ö“^žôò¤—'½<éåI/OzyÒË“^žô&ž’xr‘Ü,úñªŸ¥qÀZ#4ªTÕ¾SpL†áW"‰µ[k·$ÖnI¬Ý’ÚªÿNëP;œª}1+<Ë£ Qh»PVÚúB?èà"ƒàb¸Ã¥0.ƒËa(\¿€a0®„0FÁh¸ ®†k` \ ×Á/a,Œƒñ0&Âõ“àEx ^†WàUx ^‡uð¼ ‚õðl€?ÃFxÞ¿À&xÞƒ¿ÂfÀßà}Vk[8~*Ël[á3ȃÏaç·Ë"ÛØ ù° Ô¨»a|É bßVn‘ŽÏYIlƒí°vB>ì‚/`·,rì/eQ›ö²²Mè 3t4Yé\/8_‘‡ëåQç[°þ áoœÿŒ#«Mçç¼.Eί¸¿”צ¬t çAw8|ò¨«ô„^ÐúÈ"×p¡,sõrÁE.¸ðÝ5˜÷—rm¸<캒ãdyÔ­ÉJ·Ðœà7´…$ð€’!΂v@¼îT8ˆÛMÜnâv·›¸ÝÄí>ºB7 ýnÚï¦ýnÚïöAè ½ 7ô¡Mƒåa÷¥ð YäÃ97®ƒ_­Ü7ã\»“ûî?Ì„\ˆe°r`çßàþ·¸ƒ,sÿ™÷¡žs†¬lkbm{¶,jKm;ÊÃmÏ'‡–Z»ð¢Ž ul¨cCêØPÇÆ6Ô±¡Ž e¬½zÛC*œ  #t‚ÎÐÒ@íæ«öòíçƒz@O轡\ öëæ[v_èjÏßp¨ÁÅp †Ka\—ÃPP{ÿ†Áp¸FÀH£á*¸®1p-\jGá±0ƃÚ[x"\é0 ÔNÃ7Àd¸~7Ñî)ðk˜ ¿µëï2X9p?<¹°„•ð< j×bµgñÓð < «á9XσÚY÷%x^Wá5xÖÁð&ü Ö3 mü6ÂÛðü6c­±ÖöWØ ø›Ú1YíF [á3ȃÏÕ~¾°vB>ì‚3G‘›äïÕŽÊÌj‡Ù+Õî¾jçbµ›²ƒÏÁˆç`Äs0â9ñŒxF<#žƒÏÁˆç`Äs0â96ñå]xþ ›!ƒ÷á²Úñ!|ÿ„á¿` | [á3ȃÝÂëØ_ o›ö"©MáiÓ:AgèiÂã|\V;Ÿºs¯×ðz­Œ8_`NÂk4{kÄâü×h³“6;i³“QÚù®<ä|6s-j”û€ûÿι¹þü“÷ítÒNkôÛÎû|®íâøçvÃø „×ùŸÍw;'ßíœÅœ+‘ÖHYFÛø>çŒð,ßYœ:¯Y];Y];ßYœ|gqòÅy À“Øå!WЬví =t‘®48ºB78W$¹Îƒîp>ô^×p!ô…K87˜ã¥À,ëbvmu…×­ ÛhNP톶ðB2¤ÀYÐÚC*œ D’»#t‚ÎÐÒàè Ý€vºi§›vºi§Û= 'ô‚Þp¬v÷ç;Ú¸òž•‚û^Ÿ‰‡ðúr WÀ/ˆcLäõõÀ÷\÷$žËyî`2üF6ºo¥wpß™£4ßwÝ|ßu/‚lÚ° –C÷?ÂgÓÿ­Q{ ǵÔû¼/Á[Ô·NŽâosÝÏ~/Û y¨­Mý¿FRo«þä=‰c{Ο-¼ÖÈÎ Õ¶3çº@0·í¦~/©zzb]•­v·Öh[[ÎÏRût[¿GQë­ÑF+k¿^~Æê4Iýn‹kÕb€v±ŒiC`(Œ‚±r¯6NîÒ&Àõ¬Êo’X]ìgu±?iªÜ•4 ’±¤‡áxƒÇá à»\Ò*x ž†gàYX ÏÁxÖ ð"¼/Ãáx^ƒ×a¼oʘ·¿Œ ;-5µ©|'žËwèá´ß ý†6L†i¿¡]ÃñY¡=Êw—›ÅEŒ_q箤e8éW0~ ·ÉФ™pÌ‚Ù0’±Äf›Al±Äf›Al±Äf›Al±Äf›Al±Äf›Al±Äf›Al±Äf›Al±žñ²Â3&Âõ“ nÄnàáPY‚C_h–r‡õ›Ã7h7ËMÚ ¸‘[Ð@í„_Fìˆ}±o ö ľ…Ø·ûbßBì[ˆ}KR–Ü”´–Âýð ÜD»¶Ð®-´k íÚB»¶Ð®-´k íÚ"®Â?øi[øi_#Ô@5ÐÎrZRJKJí7ýÐ`ŸúƒÁì’Œ3ƒÔ¿o;ƒßñóÈ®²«Ö•ÒºRZWJëJi])­+Å?ÎøqÆ3~œñãŒgü8ãÇ?ÎøqÆ3~œñãŒgü8ãÇ?ÎøqÆ3~œñãŒgü8ãÇ?ÎøqÆ3~œñãŒJQ JQ JQ JQ güâTÈD…L¼Ø‰ ™ø±S+Î%út¢OOü¾õ±Ä÷é~¨ÐIíé¯þ¥#µ«â·Ä¿Á«xµ¯vâÕNÔHGtÔHGtÔHGtÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔÈDLÔHGtÔHGtÔHGtÔHGtÔÈ.r¡ˆ½Dü4/$âT"\F„‹Då¡OÚ£M±Úß^ííÎÕg‰?øóˆ?øóˆ¿˜ø‹‰¿˜ø‹‰¿˜ø‹iG1í(¦Å´£˜vÓŽbÚQL;Šé+~ùÖã]ƒ¸H»1n*øçf2ÆÝ ÷uÓâƒ-c]6cÆr¹Ë³TÆ<÷A6,ƒå÷à +àAX ŒÆFc£‡±ÑÃØèalô06z=ŒÆF㢇qÑøèa\ô0.z=Œ‹ÆÅ”¶Æ<5²Ç¬¶ôñ0},€…°²`1,‘ß[ñ4ÑÒ*-[Fˆå¶ZÕø¦'¦isÉöy°€³YD¹–Ë-î‡`…設”ïj«¸ï)yP{žga­üø>ôhò Мà7´…$ð€’!΂vÐRálè¡t†.ç@WYƒ†5hXƒ†5hXƒ†5hXƒ†5ža²À3®„0FÁh¸ ®†k` \ ×Á/a,ŒƒÄq;ÜwÂ]à‡™p7Ü÷Â,ø̆90æÁ|X adÁbX"?2ç*~…ŠÚYG.­õäI£ÈÀ…8.Äq  T†U0ã˜Ì8&w˜¨Gå83ŒÉ c2ØÌ0&3ŒÉ c¢~õã¨Gý8êÇQ?ŽúqÔ£~õã¨Gý8êÇQ?ŽúqÔ£~õã¨Gý8êÇQ?ŽúqÔ£~õ›P¿ õ›P¿ õ›P¿ õ›P¿‰YÎd–3™åLf9“YÎd–3™åLf9uã¨GÝ8êÆQ7ŽºqÔ£nuã¨GÝ8êÆQ7ŽºqÔ£nuã¨GÝ8êÆQ7ŽºqÔÓç’ݪ/f£é2²{…HAí*Ô®Dí£b6Ñ8H¦G¹sZW¡u•¶„÷ÙòOÕ“ù:™¯“ù:™¯ãà |âCê´'åvz@ = „PB(¡/}Áذ Šð¨‚xÄ£ ñ(ˆGA< âQ‚xÄ£ ñ(ˆGA< âQ‚xÄ£ ñ(ˆGA< âQ‚xÄ£ ñ(ˆGA< âQUáQUáQUáQUÑCtzˆNÑé!:=D§‡èô¢ÓCtzˆNÑé!:=D§‡èô¢ãqƒxÄã ñ8ˆÇA<âqáqáqáqáqáqáqáqáqáqáqáq‘ðã`Ã8x ¿·ââQœ+ùoq®çjp®çjðß‹ÿ›qOÇ=]{ŒsOàô*ùŒâ`£8ÅÁj¬#O>ÁÅr\,ÇEu\ÔqQÇEu\ ãbøÆÅ0.†q1Œ‹a\ ãbøÆÅ0.†q1Œ‹a\ ãbøÆÅ0.†q1Œ‹a\ ãR .ÕàR .ÕàR .ÕàR .ÕàR .ÕàR .ÕàR .ÕàR .Õà’ŽK:.鸤㒎K:.鸤ãR9.•ãR9.•ãR9.•ãR9.•ãR9.•ãR9.•ãR9.•ãR9.•ãR9.•ãR9.•ãR9.•ãR¹¸—L\2­ÞØìB.ÔáB˜8 ¾7Õ¡nêÖ¡nêÖ¡nꚨk¢®‰º&ꚨk¢®‰º&ꚨk¢®‰º&ꚨk¢®‰º&ꚨk¢®‰º&ꚨk¢®‰º&ꚨS‡:u¨S‡:u¨S‡:u¨S‡:u¢#ÃqF†ãô~ùà‰³y¢‚Ï+·ú/ߪ­>Ü~zïÉŠëWY»| ­¹„¾W…º ¨Û@ß«Bá–(,é{U¨Ò%V¡Ä*”XEÿ«Bí&ÔnBí&Ô–ô¿*ú_ª7¡zje£|Še{ÿÂH´ þ)çyó8~»a| eð ×Ê9VPG¥œ—,ä¶ä6rS²\àã}˜Éu¿\E¬Âͦä5²2ùyX /Âå&á!#ëÉÆJœ¾”Ñç£Ï FŸ¸>”ž~‚ž~‚ž~‚^}BtÃ奉öµh_ËSNƨ:ƨ:ƨ:bo öbo îZâ®%îZb­%ÖZÆ—:Æ—:Æ–:Æ–:Æ–:ò»Ž±¥Ž¶6ÐÎZÆŠ:ÆŠ:ÆŠ:[Ÿx?°÷·àþ3¸ÿŒö ŽáS¹]ËcVü¶Ë7È‚ïµ}œ/$·Jåíkù±V!ØßÀùV᪨óÇ0D *î'[ZŒ×ß‚NæUs¬£ržV u¼®‡cÒÏØTÀÈ]ÊÈ]JžÂµGûžkÇá„üDû£d¶jürmmxídœJ’9v¯½ò^k<;‹c;h©ÐA'[Ç’­cḘֱ́+íçÈÿ!îL £¨Òþ}»«—¤ºÂÂ*ûî¸Ç%£FFGÁqGAQG”I„ˆÄqY\ bY$¢² ² ¸²TB¥³LLIw:–„$$ôýž*ãüuþó}sf¾9ç;žçTWÕ­º÷¾÷½ïû{s°{†Ò{= —xXéñ/ô#æõ‡òe çƒ`0çC`(Ÿ/ƒËåíÄÈ'ˆ,›YµTV-•UKÅÛG/ßR®¥Íup½|Q¹c,Ü(ç*7q¼n‘²+îT~Åç[åsìŒ[ÿÅìfvÈ e¬è¢Œ‡Iò8ñõm’ÌÒ&ÃÙÌ.if‡¼ÍiÆKRñ’T¼$UKåþ‹ð¼oÀ|£½ `!íßãÚXÊy,ã=Ë9ÿ€ã*™¨­µ°N¾¢}$gÍæj9ߟÀf9’]5’ 7LÅSѯåæjŸÉµð9ívrm7íöðy/|ÅõCœáúQÞû-×¾ƒï¹– Ç ‹weCäÒþm (àžˆÞxw*»v¤V"÷°sG’Eç²{ïd÷ŽÔʹ†jø v ðC­ r¿†jø¡|P«…Óp†pÎó¹QîÕšàŸ/>§ásD…yQø]~¥È½Q.Žn™D”H"J$EEpIôPŒÒäþ¨(hÃç¶ÐŽëí¡täz´4Èô™ÞˆêÌûºÐ¦+tƒîÐ.¡m/î÷†>ôß—kDX¢Ñ¼¨¹2‹žõªˆ‰b­£Xë(Ö:êM˜oqï9ƒŸJ¤I¤I¤IH%ZŒZÎ{V2îU¼s-ï_ÇùG°>–ÓD¢ÄsD‰OíÌ|ÀÎ燉•ìø…ììGÙÙ;ص[ÙµßsëÙ±ûرåìÊlvã·ì½ìÂ\vÝì¬ñ줭옷Ø1‡Ù1•ì’÷Ø%¹ì‚¯ðþðþ{ñþýx¿õ*\‹Ç ^m`$Ÿ±rœ[ÉR;ˆ _rm' ÏäÞ!™OôÌ'sí'fÕ¹vkm€ìµƒìµƒøµŽ‘&Nù1bÑ!Fmoʈ7eŒ¼’x­3òZb¶NÌÖ‰'‡ýfbÁfbÁfFÙÌ(gi²WŽö‘ö)¹ƒ ¶ƒ –CÛÁÞ¬aoÖÁr؟؟5ìÏ ìÏ ìÏ d°í%ž{Þ„ù2Ÿ¨žOTÏgoÖÍrÈf9Dø|"|>{sÙl{s{i3~¿?ߌOÈ':ùDÇoä_ েðËuøå:ür¾À×Êðµ2|­ ß à[üª ¿*ï‘‹t|ên>µ —CæÈÇ?Öáü£ ¹?ø ¾F¡‘_bé“d‡l|á6¢yѼø«–bÕ,¬š…O|Aä.Á²G‰ÔEXö(–=ŠoT㧈ƹDã\¢q.>r>Ò@”õeýøJ~RAdÍ$²fY3ñ™<¢iQÔ r泉ˆÙXý$V?‰µO³‰€ÙDÀl"`60Ëž$êeõ²‰tÙD4ƒ(æ'Šù‰bQ,“(–I3ˆ`D°¢UÑÊOtòüD'?Ñ)“è”ItÊ$:•üD%kTÊ$ù‰FÑ(—Õ9Jd)"²±JGY¡£D—¢K ¤„hQD´("2Šˆ E¬T+•ÅJeJˆE¬T+•ÅÎ/b¥Ž²ó³ÙñÙìølv|6;>›ŸÍŽÏd·g²Ûýìv?»ÝÏnÏd·ûÙíE¬b»¼ˆ]^Ä./b—QW¡Ž-]}µlװˬ:ëOì¨4vT;êë<]Óĺ®g]3X× vKu-g]·°¦[XÓ-ìˆFvA#k1µ˜Çhd=æáñxy^ž†—§±óðòF¼¼/OÃËÓðæ&ìµ;mÁ››°ÕlUŽ­Êñê&ìUŽ'7aŸ ì“}2°O9ÞÜ„77a£ l”}¶à½xožÛÄœ3˜ãAùÛÀ örvޱ×Ëøf‰èÆÌÎqVÁÌÌ,ÀÌN3«Lâ@™e2³LFwŽÑe2ºLFwŽÑe2ªsŒè# 0¢# 0šsŒæ£ 0š£ÉdV-½è©žž è©‚ž*è© Z5j–býî½—cY¸Šº°†ã98Ïgö¶8‹-ÎÒk=¶8KÏõô\AÏô\-ÎÒ{=½×Ó{½WÐ{½[õa5B ñòœ<άÓs=ËvqOq­úà ;âzhU×ZC[ÿ¦+•‡ÄÛr¥Ü)âN©}fÕvͶÝ­Oå,ÄûóyÿÔ°¦ aá ÌSÅÜhRx¡ça¥<Í;Jì•ɦu!YÄcÈ;sçKìw–wí¢Å©Ÿê{;ßâ‹"@•»˜Õ}ÌæIìx;–`ÇìhÕ×%Øï,cØÅ3†ÃŒá0¶üeÝÝzü¬þîCûþìÅWÒ~׬šÛÁœMÑ™ñaLgS5cªný N-£0®ZÆUË8jG-c¨¥ï3ô}†¾ÏÐo5ýVÓo5ýUÓ_5}ÕÒÏú¨ýyûnfÿf~ôgQVÇΛéé¼UUû_Š¼Üº–Ì~’õ/z~Š>Ìø(½î¦×ÝôºûF+Òô¡er´"ÆJÚþ}Ĉ´³è9t@µµ‡u#§´þëŽãôü°ý/FG0îZ~ÁªeRä3þ}XiëÏ"ˆ• ,µ’µ¶òî)¬µk­d>ûx뛼m «˜‰vËÇ‚+±àJV2+®dGìƒÍd~ûØs,aŽ%̱„UÍDƒå£ÁòÑ[ù9 V9“UÎü[äèÃ;úË•Ì}ó.a•3íèÑ«bõBû¯õD‘&yQ×`ùBF\È­¿áÔ`íB¬]È(ka V.ÄÊ…X¹+båB¬\ˆ… é© bÝB¬[ˆu ±n!»ªž¨{ì‡÷àaõrŸp’/ ”š„‚9ÂÙÎ*EÎLj˜Fô‰‰>1É” dÊ2eCë߃h–ÓèøF2^L$Ó5éÐëd» ½]a¢ÉÉn d·²[º»ÝÝHfk ³5 ;L2[ía’iÈ4 d—I.ob$+ÈÝ&9ÛÒu§èÕdײ‚kí¨I¶¯S¢‰$—Ë3Ð*¤\#Úa¨yÄpú1„‹÷œä=Öß\­0cÍþ BÐj%¢ÙO×ÈF®[•¥Ï•‰NœY³¯cöu̾ΞùX´Âx™÷³™×1ó:{ÖY³! ¡˜3«cfu̬Nô¦·cØ·ûžÀ¾'~^™Ówˆ^*°m==TÐCÅߪñíö_ü*°m=¶=mëQ¡Ÿàܰÿ hWêØö½W`Û?¯Ö…ƒ™×‹þJŸ¢å*Ô’‰Z2QK&cúœ1}޵êQL“õ×µìT22YV`+°‰:²u¤õ¯#-Õ@õ×稛ê&€º  n¨™j&Àx>GÉP1&cúE@QPÔD@xͧô|Žéñ½5ÑÛwôöèÇݰ[%c,`Œ´<ßú7ìÿ·B× ìnįoÅëd%6¼€ /üm•¶s-ƒów£´ŽpüùªàÜ€ŸV¯˜6¥´/“¿XŬVŠÕJ±Z)–*ÅR¥Œû¯­“*Å"¥X¤k”bR¬QŠ5J±F)Ö(Å¥X¢+”b…R¬PŠJE7æYÌ‹™c1s¬eŽ:sÌe޹Ì1¥jy].óÉEUQ•AæRŒ²´<0—¹ä2—\”dyä2\æQÌŠ™C.sÈe¹öÿEÙOyLôib‚\&ž‚§aš\-fÉÅ"fC Ìr™&NBœ¥M“\$.@3´ÀE¹È1Xf9†ÀP¸.ƒËá ¸†ÁpWÁÕp \ ×ÁõpÄÂpÜ ·@ü n…Ûàvˆ‡;`$üî„»à7p7Ü£`4Ü “DgÇ~¹ÏñµüÂqÂ!8 Gä^ÇQø¾…ïä^×*¹ØµÖ@&çÇà80WW¤\än'—¹;È47*ÛÊv£²Ý¡ t…R¹Ø¢M œ–‹=CàZHË<‰ð < IrµçyÀîž…2Ë“%÷z¨x¼å^ï ,¿ðpç7ÁX™æãå"ïRX¥œÿeÀšyrµ7µÜ«ãü¼\á”Y ¸À @)F #"Ahm -´ƒöÐ: roD,<Æç§9Îãø1ÇtùED½ÌŠä]‘ÑÇŠò˜èD?Ñ b 3 ‚Á0†Â¥p7Ü£`4Ü ¿…ûàwp?<ùÏ]ç®Àsçˆér¥H‚ça¼³d:ÞœŽ7§ãÍéxsºë yÌõ&̇·`,„E°Þ†wà]x–À*ž[ kd:«¾Â}BsA1üJ¹~Šc%„¸_§¹vQóxÀ ‘ Bè ` `vÀ;Ò=Ws¼–ã Âxx ‡¹ÏYç¬ÀsVà9sðœ9æëa¾xPzij–mÄb™%Þ†wà]x–ÀzøÒal„oá;ø2á‡,ȆÈòÀ€r¹˜°˜°˜ð8uP硚äVâÄVâÄVâÄVâÄVW•Ìr Õª— µpÎÀY bqÕõ\¤ÜÊ~Ûî%xÙû^öº—½îeŸ{GËo¼pci3ÆË­Þ?q>’`¼³áxØo^läÅF^läÅFì§­Þ9®ã¸•ãnÀ^ìàÅ^ìÀ^ÛÎ^ÛÎ^ÛÎ^ÛÎ^û†½ö·BP˳u\Çì»­Ž+„K´nðX?‘cý~D‚õíÝ>Ðìߢn/Ú@¬ˆ7™Œ'ããÉøx>>ŸŒOÆÇ'ãã“ÅLÞ0K&âç‰øy"~žˆŸ'Š?‹¶â%x^Wá5xÞ€7a>ì=Å.(—³XÑY¬è,Vô]V4MgEÓYÑtV4]Xß Ý$SXÕV5…UMaUSïË<ÇrXÀ*X kàCX ëà#XC:l€° >Ͱ¶Â6ø¶C|&óœÃD[çp㼚cÜ)“wÉiλá>Î'ÉTçd™àü$È4ÛÝÊ89Ýv·òÇéò[%If+Y­d‹h%Õ›GUž/T¥\¦+'Ñ"b°rŠc¥õÝ@«E×tÑÞ•Ïà xfÂ,H†Ùs`.¬’‰Ä‹DâE¢+G´uå‚y'À€ðC!A1`O¼=oO!Ö$»ÛË<¼~1&Ñ]-TâK2ñ%™ø’èní= à[žÐúÁ™èÊq8\%bˆ)‰žëøœ “‰ÉÄdâG2ñ#‰ø‘Dü˜Lü˜ìÁ—<³_ò,“yž÷íÿƒ>Ï{ ô„^ІÃh™ÎN›ÅN›ÅNKñNm½ÏÁ„µ°N´õ%ÃlH90°­Ûú^ö·ýícûØß>Æécœ>Æécœ>Æécœ>Æécœ>Æécœ>ÆècŒ>ÆècŒ>ÆècŒ>ÆècŒÚ¥¢m›HPÁG|p*ÇÙ)åD#ë“õÝ#3ˆfšýëðB„õû! Z?¢Ôú{"QÐ:H? Àð£ü(? Àð£ü(? Àðù:ù:¢‚( J ˆ¢‚( J ˆ¢‚( J H”œH”œH”œ(þ(M1 &ß áx¦ÀTx¦ÉIDÔ)DÔ)DÔ)DÔ)DÔ)DÓx¢i<Ñ4žhO4'šªDS•hªMU¢©J4U‰¦*ÑT%šªDS•¼[DÞ-"ï‘w‹È»EäÝ"òn‘°þÞ‘`#ì]‰¼]É¿&ù×$ÿšä_“ük’Mò¯Iþ5É¿&ù×$ÿšä_“ük­§­§­§ŠJjÙ*@ª!5`B-œ†3pV.%²¯'²¯'²¯'²¯'²¯'ªÏ$ªÏ$ªÏ$ªÏ$ªÏDÓhzMo é 4½¦7ÐôšÞ@ÓhzMo é 4½¦7ÐôšÞ@ÓhzMo é 4½¦7ÐôšÞ@ÓhzMo é 4½¦7ÐôšÞ@ÓhzMo é 4½¦7ÐôšÞpüVÄ8îƒßÁýð¼/u2‘N&ÒÉD:™H'éd"L¤“‰t2‘N&ÒÉD:™H'éd"L¤“‰t2‘N&ÒÉD:™H'éd"L¤“‰t2‘N-‘A-±‡ZbµÄj‰=Ô{¨%2¨%2¨%2¨%2¨%2ß Õ‘ Çà¸PÉbYL#‹iÎXëÿQåx;Ç;å\²Ùh²Ùh;›“!ç˜DvûYVs&Ê™íf2Ûd2ÛÍd¶ÉÔâ •ir³²[P¾m”¯É~ǩ糩ÓsEg²\,§('¨ïÌtn2]û;&ƒ\¯&óLYN#Ëid9,§‘å4²œF–ÓÈrYN#Ëid9 %DIQÒA”t%DIQÒA”t%DIQÒA”t%t-•¦+ –Áû°VÀJøVÉx2g<™3žº+ƒº+ƒº+ƒ,ª’EU²¨JUÉ¢*YT%‹ªdQ•,ª’EU²¨JUÑ™&:ÓDgšèLi¢3Mt¦‰Î4Ñ™&:ÓDgšèLiºêeÈu šà4C °'ÈÌ3ÉÌ3ÉÌÉÌ:™y*õŸAýgPÿÔõŸAýgP%ø©üT Aª?<Þ}RšT ~*?™|"™|¢›1¹=žŒ®Q5øÝaÎ¥4=àEhdzŠÂOEá§¢ðSQøÉü™_£²ðSYø==h{ ôãÚα–*Ã2ˆGhžaÜÇQ©:ü(„x‚Fåá§òðSyø©<üT~*?Êa"Êa"Êa"Êa¢‡8ê!Žzˆ£ži0’ä$ÔÄ$ÔÄÔÄTD<õ¬’ÐQºçû™b<Ûà3û[™b<‡9fÉ T†îa-©{ OƒˆAqè(Å¡£8tjá já já=ÔÂ{P :õðêá ïB¥&Π.0© LꓺÀ¤.(B¥¬§.0© LÔÊTÔÊTï#2ä}ÆË™Ô¦7Ïì)ï3ð,L©¼ó9`^ÔEÔ&µƒIí`¢pTŽJ aRC˜Þ7hÿ¦ý­‚&ªG¥ž0©'Lê “zÂDÍD©¨ ®Ô&Jh&JH¥¶0©-Lj “Ú¤¶0©-LÒTÒTÒTÒTïIÞ]§€Xï%Ö£š–¢š–¢šÖ£šÖ£–f¢–¦¢–Ö£–f¢–Tj}ƒZß Ö7¨õ j}ƒZß Ö7¨õ j}ƒZß Ö7¨õ j}ƒZß Ö7¨õ j}ƒZß@ué¨.Õ¥£ºtT—ŽêÒQ]:ªKGué¨.Õ¥£ºtT—ŽêÒQ]:ªKGué¨.=bcº n±ðï~’ó ð<͵‰ÿ“`2<+ƒ(4…¦£Ðôˆy<³ëÓ6]î‰ØÀçP/H!bPpz$s‹ì(3"; U½_–«Àƒð²­>ÂçdH Éð“ÒKåóËðªÐP|ŠOCñi(> ŧ¡ø4Ÿ†âÓP|ŠOCñi(> ŧ¡ø4Ÿ†âÓP|ŠOCñi(> ŧ¡ø4Ÿ†âÓP|ŠOCñi(> ŧý*>íН“X orŒ£‹ûOˆw8ž79&ˆß;ï9'‰•1ò6å!y«²K®W¾’£”2ù Ú0Z!Â)§äb¥JQ¢»¤Þª–çE/± |Pl’9âÌáí·´~ìµ¼ýRÞ~)oÿ•c’(ÿà<"Óœ%âg=9Z´U®”){„F–¾’|JOG¨G%‡Z3O~F–vóö03ÒÉÔÉ­™Zi­IfV©˜UëÕ²Æñ{á’;…<à…ˆ| A´¶r·h±²PÜ–ÛÄKð2¼¯Âkð:¼oÂ|X€ wÊl±Kf;œ²Ð¡€ Üà/D@$¨àƒ(hí¡t„hè1к@Wè ½ 7ô¾ÐúÃෲØqüî‡ æÀ\˜©ð"ü^‚—áx^ƒE²À±Þ†wà]x–ÀRYà&·9¯†8¸O~é|]úoH?^>†U ág-øØ6V"„Ý‹µ(çÃUJ;¢Qz•¦pƒr!\¨4KÒ®T.Ê8%Ìu)»ºÜá*—GÞæòJ¯+"ÜàŠ ºTéqù•.Mƹ¢¸Þ†vÓåNW<3à˜ ³ fC ̹ð¡,t­…uð¬‡!6ÀFØŸÀfØ[a| Û!>ƒð¥,ví„]°öÀ^ø öÁ~øÀA89r›+tȃ|8€ ¡Šå6w³ÜéQÿõ¸ånOŽ¡ …áp•,ô\Çq¾,ö,4Ι§ç#>3óñ0óñlåÚ6Øðìäú.Ø {€±{»ç[>ßó9ŽÁqȇ²Àãç^%TÃ8 ç ê¡A{Û@[hí¡‹,ðv…nÐzÀÕ²Ð{L•Û¼ÏÁ?, "žäþx ^çz×—Áû°6A³,ˆ²8²=GöW$û*²ô…ê“Ò¯N†x¦Àt`¿«ìw•ý®²ßUö»Ê~Wß‚°ãU߆wà]x–ÀRHƒeð>,‡°>樮†5ð!¬…ur›ï7Òï»îQ0î…ßÂ},¿ô͆˜sa¤Â‹ðgx ^†WàUx ^‡7àM˜oÁX‹àmxÞ…÷` ,…4X&¿Ô.•ÛÚDÊ/Û¨à“_ ¹b‘?¨ä‰+ˆË-â=1K.É0R`4I?õ³ŸúÙOýì§~öS?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlR?›ÔÏ&õ³IýlZßÂåø ã<"CÔ¬!jÖ5kˆš5DšFšFÝ™KÝ™KÝ™ë\'«ìùã¿:úÁÙ  ›d±åÊqÑ‹|YJ›O ·œn95Ürj¸5\ˆΪŸüÔO~ê'?5“IÍdR3™ÔL&5“IÍdR#-§ZN²œšd95Ärj“!Dm`R„¨BÞ¡Òï½Ôþ>ÎÚßÒò~t¶míG ûÑÀ~ô¯‰þ5Ñ¿&ú×Dÿšè_ýk¢Mô¯‰þ5Ñ¿&ú×Dÿšè_ýk¢Mô¯‰þ5Ñ«!ôj½j¢QCI¼{Ÿ?¶¾5MšèM½ŠŒf?=$ÓИihÊ\4e®–"«´90WVEEË¢:A ô‚ÞÊõµòá$«|B^GÇ)»Ä Ênñ¨²O\­ì]°ïÊ”ÔA1H9&FcëÑÔõnÃ-Ôö]ŒÀîE9ôDç”qµ\ E/ŒF/ TªÄHÞ{ õoÙ—ÒÓ×ríß±ûÜÆ½É¨ŠÝ¢ ×¾áì¸õ½”ÿÿwé:&‰¸ü}ºŒg8»ã&z½‡|xcøñÊp²eWo#[î&[íï(®¶~’«=8»Åþ›bgÚ` Öoœ—Óâ ÎŽ‹8fͽžÌÕúÖ·‡d¦2]Ä2þ®›ÑkN®åì;Z“›Ð„µœs– ¢8»ÀÙQ1H¸Dœpƒ¼‘ ‚4ˆ‚6ô8FtRÆ¢ñÆCsÚÜÎüZf»¦‹8W<3à˜ ³ fC ̹"ŽZ>Žš=Žš=Ž=Ž=Žš<Žú;ŽÚ;Žz;Îþý‹(Ôm=3‹SÊ>VÒú5“¯åç¨Ûjæ>›ìb\{iÅl™{”èàÈýÙb–nWÆÒjœ§Œ·¿cnœ’ ¿¶¾•Hy^–)KĵÊRqý˜¬ô”Ì× b„+V ÃZãDOžèI?W³šÓEozª±ú·{Šjý]“#Ê#<ý(íçøÇéxX–,@#‡ÐÇM¶ÿ䋞R„Çú%ZÇÐ2†–‘´4iQ+bD9Q %*ÐMÏÑ“µ¦ÏË\twˆUoKÄͶߧ³‚y<Å;-Eìî [¨á[¨á[¨‘[¨‘[¨‘[¨‘[¨}[èsŒ¬²þ'Þ8”âµß–'ëDç_ôù1ëqHdnÓQâÇåFWËÖYí¨”ƒ¼ù"cÚleQé䌣X 'O5Òw±+ŠÏƒe«Eø8-*éϲ”Ÿ•¼Ó²’ŸwœÆº·^¬~ë:ñô?Y»­½.´ý'ëÁÿ—ë@<ýíO”ùÛ9þ7ö¶ïüC;‹6®héêÄøºÕÕ·uç™h†KøÜ“{½¸×—{ý9À½ÜD>p¹bè¡;w{sÀšh®hΨ!\é¿=t§'ë]=¹Þ‹ë}¸ÞŸë¸Î{X«µÕs÷ÖVOÖ»:0.'w+\1\é ]DOÆ×–¼³'ãs2>'OU¸zs¿ôåzÚ àÚ@>²~•œ·3Vk†NWWÆÚM¸[ßb=]Ìø­:]ý¸×Ÿ{?>íd¾ÑÐ ß‹aÌ]xo7æÒÕïA_—Xóâ~/î÷æ~_î÷çÚîäþ æÇ,X›N¼7†«¡‹Ìg a¬SæêÁZ^œ{Ò¦mzs¿ô¥M?Úô§Í@Ú "³Yë¤Ùví"¢‡e±FÆÍ8|ŒC³mÛ—óþ¶C4cðY«"{îÝZíüãè-ë)ö¼|¢¶uÔNÑößõ v­‰ýþÎ/ØíWЍÕ7xj˜ðþwþÁÝ¢ãÊGxÛeÌúßôž,Úÿo}…·Ü`Íè?ã/¬Ä·ö:þ[>c熨Õoì¨>X9I'âô ªR.„k‰jw(-á ÑgQ­7Q-Ö刨zÕF¹"õDµ;\¾pÈ4¨Ö›¨ëŠŸÇ"—c‘!Xdˆ« ç]åeX¤ £ŽUb•®ž\ïE»Þ´é}9ïG»þ´@»´„×DR¹iÔ\qŠõ»>EGÔn4J·?ªâz´ÂaÔ^[û·…v9Æ‹‹‘Ž'Ä›Ž?p|’Ê}Œ\¡µ¥J¾\KM:TÜÊÃÄÝâ~1\<(~ÏÕ‡Ñr7‰?Šùâ7bØ(ž»ÄWœíç¿Åâ[‘/Þÿ­ÅT'«E%oÜàèîè.r=—‹\Ç=ŽQ¢Üq¯ãQáëxDT;s<&LÇŽ ¢Ö‘àxFœs$9ÒÄyÇûü×ͱ‚ÿº;>࿎ ŽŽKûǽœÃœ#W:¯v^çáŒuÆ:®uÞâŒs\ç¼Ýï¸Á9Ò9Òq£óNçÝŽ›œ£þ‹ºï€¯¢Øþ?3³;³÷ÞÙ$$’ЋA¤£ vE6, ŠêCDDŠ`£) ø@Š€ vPP°€Š]‘*é½wæÿ¹711Оþþs?{2;;íî=óï™Ù=á—³&üJ~5kʯå׳óy+ÞŠ]Äoæ7³‹ùíüv oËÛ²fün~?»Œ·çÙU¼†]Ç{ógY[ÞŸf÷ñ¡ü%Öåﲎü}>ƒ=É¿æsØ>¯`¯ñµ|={Ÿoæ[ØD¾ïfñ½|?›Ê ö¹àB°/…!›!’E*û^¤‹tö³(&²Ø/¢œ(ÏæˆŠâ6OTUÙQ]œÆ‰ÓÅél‰¨%j³¥¢®¨Ï–‹³DC¶R4g³Õ¢‰hÂÖŠsŹl8_œÏÖ‹ËEs¶A\#®g›EKqÛ!îíØ!Ñ^<ÂIt]¸ÝD7®Ä`1„b‚˜À£âñ‰Ib×âcñ%Åb.ÏËÅz^^ì†W÷|/‰×÷Ò½*¼‰×ØkÌ[x¼gøµ^ïC~÷‘7•ö~ð~â/{¿z+ù(ogø~Ôòï}íkþƒŸâ§òýYþ|þ‹¿Ð_Êçù+ü|‘¿Ê_Åûküµ|‰¿Þß—ùÛüm|µ¿ÓßÍ×ø{ý½|½¿ßßÏ7ø¥Ï7J%“ø.™"Sø!™*‹r#3di!d9YGDe=YO”’ äE¢´l.[ˆÓekÙSÔ—OʧŲ·ì+n–ýeq«|^·Éå‹â9DwÊQr”¸OŽ‘cD;9NŽ÷Ëñò}ñ€œ(?ä4ù…è.¿’_‹'äL9[<%çÊyb \ ˆäb¹D¼(WËubˆÜ*ˆaН)¥ÊŠ7U%UWLWgªÆb–j¢šˆyêo@Ä‹xÞÀˆŠD½A)î ‰dF2½1‘‘ÒÞØHÙHYïõèÕÑ–ÞÑ6Ñ6Þ»ÑÛ£·{ïEïŠÞí½½7z¯÷a´]ô~obôÁèƒÞGÑŽÑŽÞÇÑÎÑÎÞäh—hwoJô™è[Þ´ègÑo¼•ÑÙÑ…Þ¦èâèJoWto,Ë;«à— ŒöŸ‹MŒMõGÄ~Šmó_ÓJgøßéjú‘¾^ßåïÑ÷êeD·×d²î¨;ÉTÝYw–Euý”,¦{éçdY=@•õ@ý‚¬¢ëQ²š~E¿"ëë±ú-Ù@¿­?Mô$=E^¨?ÕŸÊfzšž&/ÓŸëoäåú{ý«l¡Ó¿Éõ=O¶Ö ôÙF/Ó[äz»Þ#;ê}ú€ì¢…$»‡<ä²gè…R>a(ŸSÂb²_˜fÈAaVXR¾–+Ê!a¥°’v»Ë‘að)9*ì>+DžχƒäøðÅp°œ¾¾$ß ‡…Ãä»áËáhù^8&|MNJâIIò“¤Ô¤ârfR‰¤Rò§¤ÝIûä¯Ä£àïDúÜ"WP*K')˜Éf…YE5ÍÄ/0Ç!3̼ÏfÓgW˜V(3±5‰ëkÌ:Èe‰³]ùÊÛ«ëÌ|þ¼¦ hg;Ž íïc8>Í“²-³­6ÀòB¾ùf?â3ùâ|EÞ>f›ÚüÞ,5›Ì¨a9¾íêÂúx!@­ƒµÿa6˜feâl[¾Ö×ãXd–˜Yf¹”"¸w§R¹\×Ö˜Ù‰ßnjø³ç¸ÿ`,ñ«ãÌ8Ò8r~ÿ”Þˆc¥Y€:ãÔϪDg#VÆ]n~4s ?ÐØí·ÿ¦yÅŒÀß^8Î15Ìæb¹îcö·GlC¾Ò‡ÌWf54è+óúßÁÞ½¼¥rò~_È­ Ø©DI.ö\"eêþ![7skE"e¾ù6ÜûßÍvðýd$ÕůӺYï~¡õÙ¹ó•ß`ÖbŒmʾãveÔý]˜;OaýNä[çìßyξ9º:j¹ü M3sñûfn!-ïÎ5¶kÑ…ä~˼nG´ùê¨û”·ü*«Vgó]™}¥ñÍÌÓ.6ñ¯ãÙÜzå¡#æ‡[‹íïv¬Á¼áÐô Ü×ü!8ª6›É5R/ ¨aÛÑkU¥k~=®Òï89×"ÇIuŽ¢ýUñ¹Ìì‡m?æô¯VÆq•k%{Æ[ÿ$®—) LU|ÊàS5O/_Müý)þ9BùZ–OÜ]hÉN ÓÎÃuø¹Ñl‚-ucÊjõ—>È].m>3SÍovF?Lù¹â})ø5·#$‘¶sÔüXœSf®øÌ<Ét µA|B"mîÞ/‡ŸU³ÛwýÊG€>íHnÓß3o“0“[þ¯Zèƒ=µEú³‰ëߘ¯qÿ¿MœåÇï}¹â}P:“.'Ë„ÎI¤}j>F ÿ=lûœ~¿˜ÅGs¥ù—¹Ý4O䙯|O Ø8ó_ó³ù-W2§ÖôõCì9êoß™¡· ¹hØášJµÝªB}ú’æPšO+©­fŒ®gmXzýUÔÁÚòÔÑZñô¿‡·£GaÏ£®üw¾‚ºñ5| =Ã×ñõÔËÚæÔ‡ï⻩ßÏ÷ÓsÖ6§þÖ6§ça›Çh(#ÊÐPq£hM/‰6âæMô&’µj ðSýTú^~(?¤ä§r*ý(— égi¤¡_­MG³¬MGóÔêJZdm:Z›î:Zjm:Znm:Zcm:Zgm:Zom:Úkm::›®/#XsÏ3©©¡,bm:–lm:–bm:VDQcYšµéXQkÓ±J°é¶±Ó`ÍÖ<ÏZAe7:Hb·E‚4v{P4(ÎÚYAIvOP:(ËÚ‚S؃ÁÙÁ9ì!Xmw°‡aõb`õe­ýų6ëbm"Ö5öXlëa-6D§è 6E¿¥ßbÓõ ½…Ͱ¶›em 6ßÚl¡µ5Økk°¥ÖÖ`+¬­ÁÖZ[ƒm±¶Ûjm ¶ÃÚl¿µ#ØkG°ƒÖŽà<)’ã*©hRqMÚ“´Û=…¹Nc˜Ó ‹bý:=ŒÆ"e>Š^¥71K‡>I§Oúô FݧЪ¨Óª(´j&Ò¿¥ß(F³ñáв9`Õói!ØÕ"ZŽ1¶:WŽVÓVŒømø”§í´›*Ð|*Ò^:H§Ð!hd§‘¥œF §‘Úi¤†FÞG)¼ôR;½L…^.¢b|1_Li| _FÅùr¾œ2ø èkI§¯%œ¾f8}-êô5Ëék7ÜPšý§th-‡D ¢Ð]…8~|ÊèqºÓãÐã©’h m® mnƒø-ÐéÊN§KA§ó{+‰{«¼Õ$½5Þ&Šy›½TÚÛéí¢do·w€Êx¡ý§8í/ç´¿”ÓþRNûK9í/í?ÒÕùê|Š© Ôä© 1|Œ‡K‘ÒL5CÊeê2Rêru9ê_'0N®@Ù+1Z"n´Äì …ê:Œ™$Œ™VTNݨZS²ºIÝD§¨›1ŠŠ¸QTÄ"†Qt/JݧDž«öHyH=D\uP£•Žª#j~#-†‘öJuQ]ÞUuEþn{¡{Ì®§ O/ÕíöQ}qµ¿ê”jJ=¯žGžAj0R†¨!èÉP5)ŸµãõŒP#Pj¤‰ô1j ê«Æ"çx5)o© (û¶z÷áõî̇êcôs²šŒ{2EMA¯¾T3ÐÛ¯ÔLÔù‹‚fªÙ :©æª¨íwµ„ʪ¥jîÉj ÚZ«ÖQyµ^mÀܨ6QEµYmF‹[Ô6ôy‡Úœ;ÕN\Ý¥v!}·ÚžìQ{Qÿ>µ5ïWûQóu€ÒÔAu­R‡PÖ(cÿ¿jàS)‹&@H  $Ðh 4š@M &Ä€&Ï@ö z·˜BžÅbSHSº@vv§‹,$€,sHÇæÆæQ›ÛF)eHX”¡L Ì JÓè?(]¯Ô+)Ô«ô**¦WëÕ¸ºF¯¡ ½V¯¥’zÞˆø&½ ù7ëÍȳEoAžíz;â;ôNÊÒ»ô.äÙ­÷ Ï>½W÷ëÓ‡´¡ŒÐšÖi¿ ½ÐƒôCI©@±€Š‡‘0JEÃXCN†T¸–†”ô°eYt£b@·,ÈaIä)–¡ô°lXõ” Ë#^!¬€üʈûìCÊËá´22…R£ÃѨyL8uŽ _£¢ IX4¤‹†”Äz7†ð } áPć…ÃA | ñ ôäÇm~†øÀ@A3€ƒ88ˆ9ø*Üú}àpP8,êp°˜ÃÁ¨ÃÁâ3f:Ìr8¨Y2K¦µd-!ïcí `í!;°}X ’Ww(JÞiQ2æP2âP2Éab:ßÀ7P‡ƒ©ÓøA~’¦Ox” ì Š(-EK*)Z¹'Ù,ö•rØWFÜ$nBúÍîé6‹ƒ¥–·ŠÛ¨D®&ÜA°ïEêe9Ô+fWm1>›ª¦½çªsI8Œ ÔEÀ8× q‹n¡›tè–¡š«æH±è&ÔÕêjÈkT ä´ç9t+æÐ-êÐ- èÖ†´ºUÝ y›º ùïPw@¶Um!-Òé¢ ¤ë : åa t¨GÕ£(ÛYuFþl¤ëŽxãzª'·H8¤颪Ÿê‡RϪçbQ/p¨§¨7P DºÅ¾Àa_–C=áPÏS/õDõF©QˆV£h¯¨Wßâ p8˜• …ÃÁ88ñ8ö}¢>GüKõ3¤Å¾Ø·q‹zEês¨u¨WÜ¡^†C½L‡zYõ´Ú®¶£”žbû2öe%°ï0N8ŒÓ ‰8ZE;E¥Hô±èc]£])ílŠE{D{ å©èSq8Åcc/wˆ“®7kRôV½R¾¤8dI²ìF|ÞKÉÀ”CçSŠ„"” 4Q”äp$ÕáH:$q‹ iañ°8òXìHK…¥^&åPƒÅŽT‡);Š8ìHv¼Œ:G†#QjL8ùÇ5Rjp⵷ؕ׫ΫO—Òõ‡ãùÿ³Æ¬µGâliAv—]çqk}ÇZ÷v…ËYÞŸ¹óß³Ûtòç„õ¹ÁÚŸÎ]`–›ÕyWt o7{…ÎdÞ@lf"O¶fÙ¼Óü”~LíüáttùŸçvÌ,Ê•ãY·d×Ê—¸ØèMn„JÜߣý}ݪõòÂó{€¦åª×ì2pì³k]æ`ž|GÚ—ú?þæ1Á ?ÂWPßrª,}µ9T!‡­O¦€ G½‡xâsÅ_êËÓ«Ücï(Ë¿g¦šwûéf¤™êRWØÙ=÷ì}\üa°q©ã«7qhfç$³Ç'rmrûmßâ˜Ïê¼+×É2){mv:æ‚™æÑz©™e¾sé¿ÅY„ÛѾáØ{š¯çkóœ¹9Ô¼›+å3Æ´3½í*¿iŸ“ÚiÙq—בìžkþ½Ðuæ3|—'o¤fëƒÇ€`Ù¼p&%ögs÷¸œ³7b÷X ©ù‡“ÕÇã ¸K¡ûû¼ÝoÎwµƒ™ž'oüï"Ìn+¬†G{³­Ö;¾åî“a~[š¸kænó£û½w“(` ©f¾:7alLì. Gö®ÓîøÕŸßþ܇λ_™ÍR,÷róöølÊÇ=—8îYÀhÇh>ÉØUPø žÍÊwýÀ_Séÿ.8Žeý˜ƒ¹ó ÄŸ±èežr7;x߈½n&ÆcîZ6?sûø¥>>ŽÞ½g>b~˜8›nÞ$û|Ð$ÇäŠMJd³àÍ@ßï8ß?KÊWç׿C3-Qgº=K¤çAc޽·®F©™Ÿs–m»,³±l»2ÎĢʹúF$1~¶9Dnm®pgÓÈîæ=ˆãĘ¡˜ëIÔ’ëÙÜ)¦óqôöÓÕ¼bÚ!öFõ+¦­Ã‡g1½‚û<Í 7wanÝl÷Ý7›l&˜Qñ–³F–ùâ/u®6s`UÆGn½œX‚wš½ñãèsžºw¸ñžóTPÞYÊÍÓ9–¯c¾KÝs¹Ÿ¸¨‘÷‰•¿+äÝÅuO0m,¼'îå{þêïy-Y{W¡ÃÛ ÃO÷ëœ4K÷XBnþÑ`­¬¹ø{˜îœœëN¼¿æeÓŶâü±ì õ7Iq›6çyÃÑy¯žÌ`Æž„:¬öΉ£:øm¾_ß]_n~ýsþgzó;Æœ[ó„[K1ÇR‰3]\ýÇažUý»úû\î‘ ~5ùŸìÏáF[ËâOºš‡ÀŽ~Ãè‹_›æäïæcÓÊôF¬¿YO;ζ¾>ñþc‹;r?çõ7äpÜm'þteAϺŸÌg‡àß+1넋žQ>bÙ£Ô(ó¶[Û_ü-å ™'¥–£ àB'Ì\Íó'£'…´‘@:°Û^—?I¿Ra­¬³ý”“Àzvœ´;“zý8ãýoÜ8mïY/™x³#{]äG·Ïðã ߟÈûα·ûw‡ãy"_‡Ý 9B·ZoWŠâ–p|E'g/8z$ûØ­ífR;’ÇÞ®+oy™Õnîøó]²ì5¹£µíbtѱ·ú†bÇ[ðØwžÈ>Õ`÷¥s,{3ÅÉÀçBw#þ¯ðþ‡g"W¾=ÿû¾]8:„<ÞY½Àw¥ mË=Að练nÇ"G³¢ÊÎkתJR+Œ¹ äåîqÔ€õTκ˜`½Ïl=‰u-£ÄŠroUuo9ÙôŸ ¸ZXÝö=ªeÙ%³cn…Y"%»Í†®­¿ô+×Ù3Ö™Ýû¾V¾^Ù·²jÙ]šã±ÚÍp󪙜óX"fAbMó§œ~ÔÊ×ßW½½<åãI!ó«Û•ø6çÜ=¾)z§ï(ÞÞ;LÛ¾›\H™UnÕÊÎä ÜÙtŒ½82DÄ/ÝŒ’LgÝûš”?žçfÙ÷-ݱ+~îdbÕüÈèø.%ó>oýÚj~qÇp*Nº6±›´4>¦®Ýsì=-ä{ÄwØrYë¦yļfF8¿9Ïô˜fæ½c¬yúߨmߎ9TЮr|Gñ/i[ ßÅ9Þàž‘I ³Ù>± ühžYð'™ H³{Æg˜kÝùûЀ9¦µ™aÏÍ4ó‚ùÊ®˜»kƒòÔ½(;ý˜zÔÜ´3=Ì¥‰3ƒ¶uñWÍÓz0lm2f^›c¢ùÐ|˜µíê|1ªéöœ;™û\ZüyÄàÕ/ÛßÃzIÈy (ÏZÙ›ý6ÿ1õ÷%ólµÿ$Î~tmw8ÿ£»v÷õ³Ã|î2ÄßÚOÙÚryž¬¸&iEWÑTÛù‰9Å]ÉýÝ£‡~5±C»ÝLù‰¹×¼oç0ÓÍeŸ³Ÿh¯ÉkѼ.¯O?[ït4‹ŸÃϡ߬w:šÍ/áÍh.oÏ¢¼”ò|-æcùXZÎ_ãhŸÈ'Ñzþ1ÿ˜6òOøTÚħó´•Ïä3i;ÿÿH;øÏüÚÅgñY´‡Ïásh¯Ð"¤}"E¤ÒëaŽŒó0GÎÜ/*ŠŠL9só*õE}:¯rIΫ\Šó*—êüÉ¥‰–¢K7‰›Y1û®˰^ßX–õúÆjx“¼©¬¥õúÆnµžÞØÖÓ»ÓOñ‹°¶~ºŸÉî¶þÞØþBëhý½±.Ößëjý½±nÖß{Üú{cOû;ýýìëã=g}¼±!ÖÇi}¼±QÖÇk}¼±ñÖÇ›j}¼±iÖÇûY¶–O³¹Ö»gÖ»÷¬w7î[ïn\Yïn<£äždýºñTë×§Y¿n¼¤õëÆ+X¿n¼²œ)çñªÖ£?ÓztãgÉÕr=od=ºñ¦Ö£¿ÜztãWXnüëÑ?jßãÝpÞ=â± Æ{ÉA "HÒùSAFÉŸJ¥x¯ \Pž÷¶×x_ëq÷³×xÿ VP‹?oý®ñÖïdý®ñƒ&AS>Äú]ã/Y¿k|¸õ»Æ_¶~×øHëw¿Ü´åc¬ß5>.ètà¯[ïkü ë}¿i½¯ññAï 7Ÿô úñ·ƒþÁþŽõ¾Æß³Þ×øûÖûÿØz_ãS‚÷ƒ©ü“à³`ÿ&˜Ìå ƒùÁï|q°(XÍ—kƒí|ƒõÊÆw[¯l|O`"Œïµ^Ùøë•´^Ù‹dFJ‹Ðúci‘ò‘*"=R-RC”ˆÔŽÔe"õ"õDÙHƒHCQ.Ò8r®¨9?r¾¨¹0r±8-ri¤™¨¹<Ò\ÔŽ\¹^Ô‹Üi/DËF+ŠFÖ»›hj½»‰K¬·6q©õÖ&´ÞÚÄ£Ö[›èa½µ‰Þ±kb·‰ñö­=1Åzk_j¥“Å÷ÖO›˜­[é»Äë§M²~Ú<Ïúió”õÓæE­Ÿ6/fý´yE­Ÿ6¯¤õÓæ•²~Ú¼²ÖO›WMÕã½êÖO›W×úióβ~Ú¼s¬Ÿ6¯‰õÓæ5µ~Ú¼K¬Ÿ6ï ë§Í»Òúió®ÑËôr¯¥õ²æÝh½¬y­­—5ïVëeÍ»ËzYóîµ^Ö¼vI<)ðîOÒIIÞÃI©Ié^'ëYÍ{,iwÒn¯[2%3¯;q¶¨—‹/™RˆQ|¥bö(s·Yý¤WÂGQeÌ‚UJF€‡ Iíÿy8Ûý ‹˜I1“˜×¢Ôuøn¶F7ÑmÔ„n†6†¶sxŸs©u¢¢ô(>Ũ3uCËݰ@XM™,dI”åÞ.ÁR€¹§s+#¥ «B5YUv*Ò«±jˆWg:,®,nyùç/4“µ.×v¸\Ûáràr¤weÏP]Ö‹õB½Ô%€Ôý©>À^¤l0P»–CíZµk9Ô® Ô~ñ7Ý5Ý30|ž¢†ìkö5bßÍ;4ç@óºõ€éÒazŠÃtî0=ÅazºÃôó¦Ÿî0ý ‡é%éoPþ&“Jññü¿TŽOÊ—w(_Þ¡|Y ü'ŸëK;¬¯è°¾°þÈøeø?CþÜ/íp¿´Ãý À}M§ˆè_É¡‡þ•þtªÈ™TMd‰,:ßΈc& ª˜ *CVUQ óU·óJ%΂l(âjcÑòlq6ò`n€ÄÜ€û®õEî]ë‹ÝûÕ¹÷«/vïT_ˆy¢;í=î=C ³ÅJöž÷Ó™Þo(¥y/y#è,o¤7šŠ{¯xÿ¥Lo‚÷!eaF™Dµ­7QªkçjdçÒv^LñS¨©_Ä/BµììBµ1»üFŸíϦ²þ%ûsý¹äùóüùäcÖYˆ”Eþ"¤,ö“ò—øK(ð—úK©¨¿Ì_F1;'Qhç$ä\㯡"þZ-¥bfZOÌßàoD‹›üÍ”æoñ·Pq;W¡ÅþNÊðwù»¨±¿Ûß¾íñ÷ ?{ý½ˆïó÷!¾ßßOgûýƒ¨ùä”&…ôèléKŸf8E˜,d@¡ŒÈ(%˘Œ‘ZjÊ¡ ©±L’IȃYÐþWw™†²é²(ÊfÈLäÏ’%(U–”¥PsiYš¬ÔråeyÔPAV@þв"òŸ"« UY•ŠËSå©H¯&«‘'«Ëê”$O“5Pÿéòt”­)k¢¶Z²òÔ–µQ¶Ž¬CÚθh«l€ô3äYÈÙP6D dòeSyr^(/$%/’¡ÏÍ啸^Wɨ¿µlƒÖo‘·¢•Û䨧­¼—šÈûäÔT>(; Å‡eG:W>"òQÙ™ŠÉÇäcèm٠ߥ»|õô=PCOÙ5‰Vž’O!ÏÓòi´@%, š`ÏS]9P¤:–P&xÀ\*‡R–|Iä09ŒÉár8îö(9 r´|…j[°È®€ÆËñoIh©œ ' ìÛòº@¾+ßEÍïÉ÷qu¢œˆ²“ä$¤$'#çù rN“Ÿáêçò ª†ñÒ¿–_S ðŒ™Èÿ­ü)ßÉïó{ùrþ,F~‘¿"Ï,9 =üMÎFŸçÈ9tšœ+çR9OÎCYp”Z,£æ%r J­–«QÛ¹ù×ËõÈ¿UîDž]rîÆn¹}Û#P¦å1T<&D¤;Pi0ËGÞIwB:ø%dݲ«îF%uwý8•Ó=tOä|B?œOê§Ðb/Ý)ýôs¨­ Ô!ég°‚>ÕCQÏKú?ˆÓÃ¸ŽøËúeÔ9BÀÕ‘z$UÖ£ô(ªj™+UsKÕô8=ŽÎׯê7S¿‰<ãõx\}[¿ ùŽ~—ªë÷ô{¸ú¾þW'éèTý±žŒ”)z RÀw!Áw!?×_Ð)úK=yf诨’þZœßèoÐÊ÷ú'¤ü¬E`莞9WÏCžúw\]¨¢žEz1âKôª –¼ µ-×Ë©²åÊT\¹'• ŸŸ¤òáS!îxs/ªöq¯Â~a?*>>‹”çÃT-¢ó-ŸF ø4U·|šÒ-Ÿ&nù4$ø4$ø4¥[>MµÁìš8>}¡ãÓÜ1é8oÎfÌ–'9~œD7à“ä˜ñÅŽ_ê˜qªcÆ—9f\Ì1ãâŽg8fœ™Ëïü÷Îïü÷øÎOÔùïñÿßùï ÿßùïñÿßùïIvþ{|ç¿'ÙùïñÿžKœÿžfÎOšóßs¹óßó/ç¿§¹óßs…óß“¦oYè8z&ÕcY, Ú2õ3ÀÔ›ÓYŽ‹_ÍZ°n¹xCv'» ûaö0dGÖ¼¹ y0ò^Ô\¼7â}Y_ä·Œ¼ùj.>œš‚…ù!ûÎeÙ4\µ,ü:ÇÂÏs,ü|ÇÂ/ ¯I±p‘‹ ðïóÿ¾ü»™cáÖÃç< q†Š8CE‡¡"Ž£_é8ú™¼7ïCg[ÏþtM‚©[^^¿Íߦªü#ðò Ž‘ŸâyeþÿüÛrñrüWþ+Ògƒ—s^‹Jñù|ù¾Òz0ªî¼ºÊÿà+‘²š¯†´¾ÝJ;ÏFùF¾ qëߨßÊ·!n½UáûùÄ­¯£2ü7TÚy<*/˜àˆ[¿G•„/|Ä­÷£òÎûQE1¤$ƒý×p¼¿¶ãýuï¿J”%‘nÙ QìÿtQ 쿆cÿ5Å©âTÄ«‹êµDªK âgˆ3è4q&ìΨ%Á¨!Îç ~kÔp–@ g \ë,θÖÙ‚ý¦$ðþ”ê†cü%ã?ÛÆßŒ:5öfxßÓ¹Ž÷ŸŸË'“ï|2%;ŸLiÎ'ÓθÔYM¦fÎø¬} T[ç™æw…tuƒeŒ1!B!„PJBŠ)!„PB%ÔñPŠ„Bè^ éê!ÄÕ/2u)C<®K½®ë:^¯‡:^ÇãuY×¥×ãq9”ã0^êuYê²ÔããCY—2¬ã¡û~¯ÁI§Íœ³ç;Ï£ÏßýÑýyõ½Ïù÷u1ø‹@©øx=€=@ª%ªÿdÅœbTþ¼â70Bu?‹Šÿ TüÕ¨øPñ'£âR±¤X¦š¾5½5}júJÔô2–M¯D5¯D5ÿ$ªöJÔëJTê ¨ÔŸDu^‰º\‰º<uy%hqð½l(rµxjñʨ /` `ýB¶Ö§Z¼UxDs+Qg+Q[W¡¶®Fm€Úºµujë'P['£¶~Õó“ì;šò›ì7AMRõ\ŒŠ¹„=À€qª˜_FÅü {˜= :’jåBö(håÔÊÛQ+ïd³# ã*y;ªä·Qïdϲga+ª’ Q%¿ *ùÕÊ…¨’·£J.B•¼Ur{Tr ªäWP%¢JÞ‰*¹ Uòk¨’_fÉþ–R}QÆ/³÷ØE¡ú¸õq1êã·ÙUv*UÆ%¨Œw‚2~úT—¡&~EùŒò9RŽÊ¸•ñ;¨Œ_Eü êàwPW Þ®ü¼òóÀT¿† ¸BùEåaŸ´¢Ø¬%¦ÀZb[°ŠØ¬"¦À*b±XE¬«ˆ)°Š˜BY¯¬‡o§µÄXKl V{«ˆmÃ*buXE,«ˆ¥`1VS`1VÛ‚UĶm¨"¶«ˆÅb±-XE,«ˆ)°ŠØ¬"¦ØPELUĶ`1VÛ†UÄR°Š˜«ˆmÁ*b)ªˆ)°ŠØ¬"V‡UÄX?L±¡~˜ë‡mÆúa[°~˜ë‡Õm¨¦Àúa[°~˜ë‡mÁúa ¬¦Àúa[°~˜ë‡} 뇽õöaý°7±~X-Ö{ ë‡Õaý°¬¦Àúao`ý°Z¬V·¡~˜뇥`ý0x˜m¤Ësäô'åÜóÜóà ²¹lÐú/r/’".—û ø<.Æó¹ü¨o)ävp/‘×нr…\0õ0ܸ/À~¨‡)ç*¹×«¸7`o5Ü›°N-WK^æÞ'³“«ãêÁ!¼Ã½K©Ÿ)ãÔœŽGËia«H%Fêp*ÀáỨÉ㬜û±q6ØÊÁ9È«\×#½œ΂úœbô6Û±rc!:œn¦>ç5ô9%Ü·8˜%Ðç¢ÃÙÉ}ûŒ¼Ç½ßNÝNºw¸¿áF`+êyvrïsïÃ:ÿ•; üwà|6q3ܯÿ7xžMèy^GÏSÎ-qK°gêyй¹áì¨çÙ„žçmô<¯ ç)A·Sˆn§ÝNác›ÁᔀÃÙJÊÐáT ÃyÎkàp’À=ñX2¬ù$8œ"ô6ÛÑÏ”ƒŸy¾%üÌ&ð3À…ï³ =Ì&ð0oS÷² ÝË&t/¯ƒ{iˆ:êUvƒiDÇÒÛ#­±­¤4Ökb`s¬Øk¶ÇÚi-º­X‹n+Ö¢{kÑ=޵è¶b-º­è|bÐÛ|yÓöMä/6Uoú2)ݤÛä& X©NŽnGçEpÔüˆæUx˜gT*#(uê[žAÇò"8–Nè[TVpN•F¨WyVÕ£ê‘^•\ õ'Ï¡?yýÉ àOöÂÈ7À¥¼€.åyÕ_©þ Ö§þäEÕ·T`é·ÁŸ<þä;°7êOžCq&Ï¢3ÉS}_õ}à÷TïSgR€Î¤^õ7àL>Îä$Œ¿¯:EòÑ™|ÉKèL À™üŒœUý=ùŒêœê¬ùCÕaœú“Ϫ.€?ÉS]T]„¥—Á™ä£')@OR¯º¦ú,WMÀ8u&/©>P}kROR ú…ê&ŒÿOð$/'ù%ìmœI:“|Õ¬j¾—ú“èO>«úµ 4VÌÅz¤9ª»ª{0B+f¨T‹Ð§õ³°^`Ö ÌÅzX/ði¬Gš¦ú7Õ¿ÓÚ¹ª?¨@bÁLæ ±ŽàÓX›4 « >…µIÓ°¦`ÖÌÅÚ¤9›ã6oqZ_0kó¶ÍÛ`„VÌÆ*ƒOoNÞœKi­Á\¬5˜…µ³±Ö`ææŒÍ°”VÌŠƒXq0s³q³‘<ƒNì9pb~tb›÷lÞ­Ü×sè¾^BßU¾ë[Ð?°y˜ä£ûzióÁÍ¡O+faå§°ra.V.ÌÆÊ…YX¹PN˜í÷S} ~U1{Éÿ"DÓÐô \럌e>%@°0888 888 Œ®Æ×Ó€"ó]CÍBæ›Ü€þ]À"`ð€Ä)€ôÈ1´dý;Ÿ¹‘}µìˆ‚nS(Åe¤¥P9^Üæhä[ê»M‘ñè§Ìw ÁXNÎAÿöúXw Ñþ ÀR´ÿ ?‰‚¨ €d@Zd]&®OZ´Cä:µ˜×¯ydÝ\´Øn€ŽžÃ@äûüùÑsÝŽ.?]^E ŒÁ}l¡çspiý\"ç|pp p0˜ÜÌ棟÷6|®­°ý¼ÝneÃòUB´r@, Hýè“Þ?m ûSÊüåÝ+znÚ¼è½þ"åQ`|ï|ÆUJd=üÞ(ô¹¾È~eþ*/TFã–ik>úÔÖvË·6Ïšª{'5¡N‚Ì"«€÷v&u&èL>Ô™ |´3§w’nåmÒœèÌ÷j›çMu½7šï™võÞÒœê,D.YïŸí,ï½E—z Í÷MM½·5£U½·#ý(¯˜´½w4cµÈ ÀW°ûãÀ×;5ÀÓzà™N¡÷ÝÊk6@Õdî]ÐÌuŠÀw;]À‹Rï÷ÚÕr“½wI³Ü~ع×ëVǚܽZdCÈs-ÀqG;O§tžNï<Ûû€nåõµduŽJ‡Ôñ&ŸW¶sL"ê$SXb){ÃêTÓ€¤jÙÑy¸¨s\RÑï@d<ʦ}R‚:Û4,%·”v^_çŠÎi)™Ž{÷E9ÏtXJk©îœAž®Ãþ®Î»ÀM‹ÀÚÎe`CçÃu6[dÞá»…óV˜ŽI™-nKœ”‰{Ë‰Žø,‰kLG¼ÇÔŦ)¿%lIAN_ëÓqÌtZ*l°dI…´ï=­.³äB¿ÒtN*iÙgÙ\´Þ¶”¶T³TXê€O[va¿I*¡ÛzÏ©kL¤ru½é’TÕr΢]ç ­÷BË%‹AªRï6]•jÕͦ <3²}½Õâ†#Ñ™¦¤†– ‹o§,a©Am4Ý”;ƺ}Èaäà+Ýû€Ç»‡¯wžî><Ó="5Ò­úÜsݧû|j‹iVÒ¨¦yIßq·ûðb÷dÚ_î¾$ééÒ¾°Úcº'±»¯J¬Qfº×7auÀt_Œ\÷òpöã°ŸØ}8¥{8½{8«ûž$Эúö¯@¿ß´*‰ÆÜîûÀ;ºW€‹ºa„Ž÷ «ÍrÉe,uS®pÇöVï7ÇJ’±ÚOÙÆ~p;x—;¸É ¬uçÜ’D·ê;f4»‹ûFÔÕ·¥Ñî.“Bê#æxi/e¦ú¸9I2ºÝ•À>w4DGúNGÆ£|Òœ*PŸ1gH‡Œawý:¸wÃoÆûÎEù¼9[:jÜçnFÖ­÷‡ÝFàÃn ð1·xÄí>íŸs÷÷]0^pzµê‹æ<é„ñ’{ß%ÜÛ©èÈU÷Aà Êt¤ïªú²¹@:kœrA>¾Ö§ã}êkæbiÔxÓ}R¥ý¾)ã¬ûLßMõ¤¹L3ÎÕvŸ_ïßs_¾ï¾ ¼â¾¼êž”Æx¹ûp¬û–4F·í›Uß0WJWÔ·Ì5Ò8ï¾ý1Nrß‘ÆÕ·ÍõÒuõónišOu/ /­÷3ܤiõ‚¹Yšá³{È:çõ°ÒŒzɬ“æZnZ÷ÏbÞ2 |Ïrø¾åðŠexÕrZš£[y/iå–sÞ«êf£tWCÌiQk¹œ„œj¹$-Ò¥Þ kvJËÖr•2ík3,Þ8Êì‘j³-SÈ7?ÖϳÌXæ‹-÷€Ë,÷¥‡t+ï”&ÁðÊ4Éæ~/§­´¬×XVë­ràÝÖX/§I3zã´ÍÈ:k¼÷¦&Ӽߛ¨5Z“S‘3¼‰šLk6ô-Ö<`§µØc-¦ã°þ¬6`-ƒ‘~k¥w^“c>èMÑZk€÷[ë½)š|óé:eï=íAënï}M¡ù8¬ÄÚ {(´ê(ÃÈld<Ê%æ“ÞtM¹ù Ûq«ø$ò«® _Ñž·:!{b_Se>ïÍÒ^´zë|ÙÚ|Í:°­ÖËÞ¬VÖzͯi4ß𵪬“Þ"Ú÷%i­0¢Ñ˜oáyEøöZ¿5Áz8Ùºœf]δ>Î p¾È¹ÓmW4zómo©F0ßñV´Šªq‰˜à­ÐˆæoµÆe^òÖµ–[öQ“×¹JLóÖi$óï®ÖZ1¸¹QÌÖˆù¾TªI|­z±ô h_v« –ôÞiÅr`—XÉà¾<š}­’X+¥µ†Ä)f"_që^±‘f%Q ¹ÆWÖ:$ê¥ÂÖ¢ù~/¾ÊÖC¢(ÍѸõÕ´]ÒÃÖ¢|J EbÌWOï¯owëYq¯7KS%Ãuð5·ŽŠè5GÎtL< |E<á­ÃŒ3Ïô¨ ûЙÿ_Ü“ |YO2peOZt~¾Og¹¾¾¦'S:ª>ß“Lç™U¾¾'ŸÎ9=…À0“„åü=š{Ê¥iŒüÙÖqñ”O×z]<ë3¶N‹£>KëŒ8æs¶Î‰WzoµÞÇ{o·.Š×}XgÖYg|և✯_'ïúuœ¸èÛ¯‹—{Ô5âC©\—h“ùêRlœïˆz·-NªÕ¥Û}ÇÕÙ¶ßIuž-]JÓeÙ²¼Wu¹¶\ßÝÛßùˆÞÐÙŠ|u¥¶ÒÞIª(|—u¶ ß5]µ­šÞ[ÝZf×ÕÙv!7ï‚c›Ô5Ù´¾:­Í໥3ØÌ¾Û:³Í³ÛܾÛæó-E4m‹ÌÑQ¨Rt>ÛhWÔº°mð€mT-Z°nŸí˜Ÿè†m#~VwØvÚ¯Ò£kªå¶s½KºÛBD¹iÙ.õNêNÛ®Âo5ªîœm¢÷NKŠmª÷î‚í&|»Á6 ×á’møªíž”©›°Ý 6b[㙲­ß´Ë}ƒše{,ìÖïOÖÍÛ“|“ô øÓt÷ì©‘ØögêîÛ3`?+öl©P·jÏóç´ÉíþüˆÂl‹µû Ûâíeþú»ð—·%Ù+A¥ƒV÷WE¸-Õ^QàþÚ Ü€Üˆß¢AÖ·eØë{ï´eÛw÷.´åÙ›{—¨¢ö mv]´/"»èïË/E¯$èay/=*ÿP[±ÝèŠô‘´•Ù-RB[¥Ý zT±ÿP[ÝÑÀþ£ø(U»”ÙVoï¦LU«ÿT„Ûšíý¥ê?Û¦³JùmFû~`‡‹ý`DµúÊ>bÿ(ýÕûǯD¸Íi?Z©¼Íc?Êt©ÿz[À~Rªmë·Ÿ¶ØÏƒæœ°_mIïËt„Ûí—ý3Ú û5øuÓ™9®m¿}²g†ýôÚoùç4iöÛ4#Øïøï¶±/xï··/ùÛNÚø—ÛÎ8ˆÿaÛyEçvœ½5U€k»èH€ÙØåHÄEf¶ˎ´@bÛ5Gf ¥mÒZHo»áÈ dE4€Öèȇ\€Y¦í·#9ºí¶£0ÛvÇQØÑ¶@³mÛ’£²ÌZ"í¤£*PÔöÀ2(ÕîwÔzSôÄÑH‰æåãŽFoœžuh¨–pè¥9½Ê!Мú‡Ë›¨OvHð½·!š¿0êÓC0žé8àMlÍwZËúÇÑ@…>ßqŽ ´„?A_è8囤g¨Ö—8ÎFfZÜ1 û©rŒA€œ¨ÓךÏvÑ<hÒ78®´úFÇxÀ ×8®Ìôºì¸·^ï˜øô‚c<ÌápDíPö5GxM՘ʑ‘À>äaz ÃÈÇô¢cÎ+Ó»w½œ^¢j„*_³>äXŒô!ßÃV #tÖ Œè÷:–#º"p:Êp¾zýã!ä ìãyè8eÞtý!'ŠtEàœþ¨3.¢"à¨Ö90¬=îLôæêO8S€O9Ó#ö¸ ?ëÌŠdùÀ%ý¨3×»C?æÜ ã0rÅYÉò«x‚æ©Àò0òMý¸³r7dðÀ¬þº³25äñÀ¼~ÚYí­ÖÏ8ë€çœ» ‹Õ:›¼»ðšßC¾½2wZo‘~ÑiðVè—foþ¡Ó.͵˜îÀ ¯ë© ÇòÆžÚP-oéivö4JC¼§G#éù@^bùþ!눰t°ÇNâ÷÷H°ô`O(œÊéÙÎà÷ :Òs@ÚËŸì9ÎVïï9*Iü™žá<þ|Ï©p±çl¸2æ¨t”¿Ü3ìç¯õ\ —ñ“=ãáʈ;P_ë¹.ò7z¦Ã5ü-÷™p=»g&¼›¿Ó3>îNÏÝu¾Ð³næ—z–¡ÿ çaðŒ@<²°N`=\Ø(¨tÀpÑ%ø —]bèášË<é’BG 7`Ó†[®½DM• –á¶ëðסÐ)Âëhè¬aÉuøAWqh´ƒ¸Nùg:X×Y‰íP¹FCc ®±Ð•Žd×IèHs‡Æ;2]×C×;r\Ó¡éŽ|󤿤£Ð5,î(qÍ…f`Í»°f¹k14ù–Ž*×rènG­ë¡o²£¡[ZÔ°†li¹£±› -kJºã¼éšîÄÐÃ}wJŸ¬CèNïã:Dƒ§Ó4tCvîpuçö–ëÞáÝÕ!uõ%v„ºKûR:övWô¥w uW÷eµïè®ó/Rî˸þŽÝ»úvtênê+¢ê¥¯”ª”¾ úW”¾êÈ/ÿ‚1ýKÅ£¿Ž‹Ñ¿à_úê:ŽvkƒÙ4¿÷í¢¼¯‰FcŸ6ò×!œV:N8‡aÿ¨Ä:Nu¼SíYÝfïTô¯7øw•޳fKŸ¡ý~·½Ïqý£Ýî>;½×¾z"#O0‹Ìÿ!„ù=³LdÌæC"gþ c+SÈXò˜l“LE6Éâe[ÉfÙã²$²E–"ÛN¶Ê2dÏ’m²lÙ äqÙweß%OÄTÅ|‰$+*¯“…¨°‘TÅO?!iqÐÈÓqéqo’ô¸º¸&R§Žë#_{7îÇ$w5îùÛ¸…¸erŽæËDŽÿûAÙB#[IÙDv-y‹èÈ7Hù&$!2D> aòÏäWäù5Kþ£b6“?0[˜Ç†¡ï8qô¹Iæ ¦‘igR™&Ìä0ýÌ~¦Šf¾Ë|…ù{æçÌWcÞyŸqÊírÓ%÷ÉL·¼_þ Æ#Wþ.ã“[þÆ/ÿžü=&$?%?Í|]~NþCf@þcù™!ùOåÿȼ‹ïcî—_—À|[>#Ÿe¾#Ÿ—ÿ sHþ[ùo™#òßËÿ•ù>}ŠŽ9¦Ø¦ØÆüÅŠUæ«`3™)öyöyf‰}Íc~Ï~ž-f>¤ox0`_e+dr¶’}SƲo±M²8¶…ÕÉRY=+ÊÒY+É>Ã~”}žbÉv²ßc˪雲zöû3ÙÛì;!³²“ì´Ldo±·d=ì,;+ó°¿aïÊzéóX2?û;vIf—ÙUY¿’(7ËÞU&(—}Où„òYÙ{Ê,å˲ÓÊW”‚lLiSî“ÝS~Kù­•òÛÊC1›•?PžŠÙFÿ_Õ˜'”ÿMy>&U9ªüIL}(&KùÏÊé˜åMå|L‘ò_”ÿó—ʼnià~÷Ø31¿Šû0îC9}_N ýÀ*’Fß6.?È%Y‚¶jE0TT}éFE¾`ì‚»jVð á ¡nH8'\.UŒ W… aJ¸)Ì ó5±5Â@SØ÷ZõkaX8,F„Ó5¯U@TÉ!Æ1ÆOæÌˆ ":žÄÀ²§ðIT"ûì„‘½/{––ý-‰‘ýHö#¢À'QYÙÏe?'¾ ö˜ìÙ‰ÅgPUøôéfÙ¯d¿"qøÜéÙoe¿…_}²4!†‰aÖÿ×`E K’ðͱ䘤˜$òdLrL2IÁ'E·ÇdÇd“§ð­°´˜’˜’Žï€=Só ÉÀ·b2ñ™çàøUL^9Ê„¿L<üeþ?Éßàoñ·ù;ü¿Ä?¿$°‚JH’iB¦Ã/ùB¡P"” UB­Ð 4 A/‚(¸I {…!á€pH8Š8!œÎ £Â˜pE® Ó›i—0#Ì w…Åõ¶,<4ÉL܆gJ4¥˜Òa4ë‘ÖdÊ‚usM;LEÂõf*5U˜ªi«3i…E“Ö5›´&»Émò™Â¦Øg–iŸiØtØt ΟyLˆÎôõ­xM’¡ÅThr’Ež' ’ MI> #ÅÐ#%ÐbI)´M¤‚¼†O—¿³}ïr ùKÒHâI3´˜wtd1@K$6bÇ7.Ýø®¥Ÿ(’˜Þ%ÛÉ·¡=Eþ´4òŸÉqò4ù´gÈ)hä‡Ðž%ÿZ&ù´çÈ?Ëp|× eãÿ†ý™&¿ 9ä—Ðrɯ¡}†üZ¹O~ǾBþ/ùY…ö#c”¤€‰…¹¯ŸÿÌ}ñ¤Ÿ/eÒ˜gÈ™g™gÉ«ø¾ğuøFg#©d¾ÆhÈ댖ђ7ðYò|»óMF`RËt2ä-ÆÁ8IÓËH=Ìa²fϯ“¿d¾Á ¯2CÌù¾ÝÙ 3éy¢fF™QÒÊŒ1?!:æ óDÏüóOÄÀüŒ'¿<ÌÙDàr¸Ò‰OçY¸Ïq;ˆŸÈ³qÅ\1±s¥\)qà›DN|þ®‹Óp-¤›kåZIÜÛy²Œ±_H+KÏFc€+€ñ(®G1 ˜!ïGcÆ+Æqãuã´qÆ8g¼k\4.?äe<-ŽOäSøt>‹ÏåwðE|)_ÁWóuü.¾‰×òÞÌÛy7ïãÃü¿æóÇ ð§ùsüþ•Ÿà§ø›ü,?Ïßãïó+üªÐ/È…X!^HR… ![È „b¡ Z¥P#Ô »¡5 :Á(X§àÐ…ýÂAú?ˆ*´ŠH‚_‹kÆú ¯ý‹ï7¡mÁ(Ç(ߊQ¾ £<£üqŒò$ŒòdŒòŒòíå©åiåOc”§c”g`”?‹Qž‰QþFyFùóå/qh9ë/b¬çb¬ça¬c=cýsë/a¬¿ ±.#…ßŸÇøþ æ)& âžFv FöNŒìR|?â‹Íeͯ`4—c4¿ ÑÜ ¿/ã…ß}KâuŒæ*Œæj毙¿†ßé|?âMŒæZŒæ:f⸞™`&ÈÛÜW¸¯®‘k$_á:¸ú¾v¼/~/Ü'\ûM„±6CÜíJѱj@` ‰ŽÉ· ¬…üõ? \gZœ2[KŒeÖr~æQÐ1c¥µŠŸÜoRk¬µüâŸ]ÇXom0î¶6òËþÛØlÕð­A&ÎuV½Àýià:qâ¼Ñh„D«`´XE„ÓêRé¢ûYâ=!W¼oôX%cÀv|üw‘¸bì·îJÿ *ÄU¡Ú&7Z‡û­Œ­‡„ºhŸž›°ë#๱š¬Gé'â¸õ„ ýó ëOZOÏXÏ †Ga°>¤à‰(C°"Gaq:OÒÏN³c„׈Z^%Æñ bâÇañ8ÏðÉbÊŸƒ%à<ûHÓ™bŸ#æ>‚|qÇ'P(=‚±ôS£\¬à«ÄêO V¬ãÄ]Ÿ@£Øôèy v[,¯ ¼ šÿ(`™à¶Å >[®'ŠöO—èæ%Ñ÷ Ðý…¶T>$†? „}¶ ~¯8°Ž!qß:èòaÀa[6öÙò„[@Æãý„Ó¶bìÿ9çleÂ[å#û8*{'Ä‘O€n{ÉVßO Wmõø9aÛýÇŽçßÅYñ?*^øÆÄKüñê'0.Nl„0ek^›Û7ÎÅksåúwÓ¦[ŸƒfmÆóÈzœl¼¯k÷eíÍÛ,ë×öžÍ¹ñ˜p.é‡9~û–ÁÈ`Ùùýâïê ˜‚yâÝrpÜyq-ž-'ᾇ.îÛ<Š- ¬ÚúMrÛ Í/¦XÛ~:NÏÍo;hJ²¡ó«)ÕvœÎ“¦ ÛIS¶í ͦ<Ûy:·ã9C¼› l׿gS±í²©Ìvž·©Ò6I¯…©ÆvƒÎtŸˆzÛ-ÓnÛmS³íŽIg[0mK&‹íÉi'ôúb¢×®¡Éy2šÏLÈ?Ñëlê‡ý ÚYº\¶ß®2´'м³žk7Ü£õ}RDsÊZ. ÇDs£éˆ=í¸=mí>ãútî‡{yržÛI{&3^Í×ôú>‚šH^¦ù ó1|ÏZ.¦Ÿˆ<·åXü.€é¼U¢ 9v-¯®ÁtÑ:D±ž#iÎŒæÆ¹ò‘Í“k0]†<÷säCÓ5ë(Æ-Ís#XŸ³¦ÿÇÞ×@GU]mß™¹3D~F¤)?1И"biD ”ÆÌHyi cæÞ;?ÂdÀ™)@#M)EàSŠˆÈG)Æ(R "/Í›F H‘7R¤F ¼òAøö~ΙC\Úõ~ßZßZí:k?w³ï>ûž³Ï>ûü$ÆÃÑ ëÓ| ÷ˆÎ÷ŒÎâv‡3¢ÅáþÑäpîõ!<8º0<4ºõ¾,ÿÈv…GÊ<ž˜ã šéÈ6£¯-òqS8'苾õù4œ'Ÿž›¹OMÔ2O6Ï•œ9²yN$]Øa~G>{ÞÙßÙ¯bâ½ 7ö5»ã‡!£œ>³GöÅ'ö/‘ªøépItòí;"‡ãg±§ œÞ½.ŽV$ö‘ãñ Èi¼þó¾sÝéx=¯Ñ‘³ñk‘ ñ›á=Ñ[‘ú™JäÚL[äæÌöÓ•™¦ÛfvÞ~fìÉd¾D]Þ›É}ö<‰= Û’6øÝôN3{r¾äv5ííû°kws0(±‡‘{¶Åû±é]gfð~gz™ýõ¡OýÁ¿É_˜'Ô·é=g†Œ÷ ’ûÄÏQ˽ Üû}ޤ_[î뚈÷b j¹¯KìÑZÙ›MÏô¥{3Þ{5ßñž+±ïj¶Çâ¶¢.ëHŸÜ3·hþ…'E—ß3¯¼ÑU‰=V؈® O–q.Jè…gD7q\‡gE·"žy€uxÎQüá¹0z ¼$Z ~yôhxUô$Sóù^=Ã9"\=‡øÜ½|Ï>†(\mQ<2arÞ:3ãYKJÌAžᓱäð™XJÓüãt.–†\s1Ö+|9–nˆeñÚ“ î/Ÿ±0ÿ¨Ïá[±ì"sllSþ(JŠå ŸR¿Ès%ÇÆ¥Ä&¥Å 8õŠeÆEY±pQv,ÊëÖ@ÎO´'(›]”›Ëù¸È[€3 ­…Ecb‹Š&Ä–ÄV°¿Š c«‹±u|N(ŠÆ6³ŸŠfǶ³~ÑÜXeÑ‚ØÞ¢E±C¼äüŸÈÍEËb5E+bÇ@d׎í¢Õ±Sì÷¢u±Ú¢òØy޳¢Í±:ä0Ç¢í±+xW»{cœË‹ÅÕ¢šxÛ¢cñŽE§â‹jã©EçãéEuñÞEWâýØ¿E7âƒÇ¸ÿñ!üŒ¨ñ‘¶ñÜHǸ+Ò9>6’ŸØ?´çýG$=>9Ò;®EúÅCËœD†Äã?š'‘ñ9‘Üøüˆ+^Ú«‰s@b">26¾˜u"㯰L1+&ûûEù×OPþ‰~‚R§\¹ûs­A™ª§èiz/=SÏÒ³õaãT=Gwèc'èZƒ(z“^¨´[¢èa=ªÏÖçê ôEú2}…¾Z_§—ë›Ç-Ö·ë•ãvë{õCzn—eè˜~JO–¥V?¯×éWôz£¡mŽFg#ÕH7zýŒAÆc„‘«›…4\ÆXc¢1YOÅÐŒ!½8ZÈ-bM~Çߣ/ð=‡rŠíüÿ+÷ nš£©<€{ÐN¸ýîA¿Ž{ÐÎJ@ )]”©TRpú nC»ã6ô¸ MÃmèC¸ ý&nC{â6ôa܆>‚ÛÐÞ¸ }·¡¸ íƒÛÐLšsÕJ?¥†Ê܆fá6t nCÇmè`åSå/Ê·”KT†àNôI܉~w¢Ãq':w¢ßÁèwM=L=”܉>…;Ñ\܉ŽÂhîDóq'êÀ¨w¢.ÓL/*Ó<Ó<åi܉ŽÅè÷p':·¡h¦ÿNyÆ´Ó´S™„;ÑïãNô¸¢.T¦xñ— ÕêNE£y}@1Ô ê_”Íßò¥I™¥ßUõØwÜwÚwÖwÁWOåšï&9Þ¦µ×:i]µ(†6U›¡ÍÒŠ©”h µ%Úrm•¶V+Ó6¡ôÔ2´þÚ`m(ÊH`žæ!§MÒ¼\8nÌ}(núʸé„ïsĘiŒ¡èáXQÉÿY=+6ÄJŠ”§(†øÎü>ŠŽICííqOÞúõEGCGŠ…¥O( ÖSŠ[¾ïFcþEúƒõTÜw§‘¿¨ôÀ§™:Ò?„ÑMǸ~#ÚÓ4ÅäUƈ>B#Qz›â4¢¸åîcZD£˜‰Qì‹Qì‡;íÇL¿3íPú+¦¤ÁIC›G†ú€/£eÑfks}ý}ƒEëå*ËÈ–E[àËóyDÑùÆùÆiËHÒ¢h+´Õ¾IT¼T .Ú:<§úf$ŠVî›uoÑ6ÃÂ,_±,%¢hÛ} } µJÂ%÷m¯o¹oUSY˺²”ɲ©e n nõmõU$ŠqÙ·G–-K°ÂWøVpï(•µ$iQôA¾ßI*ü½3\½5;=Ï¡Š^¯uß@.,HxÖwQ”àßeßå`aý%XMý»ÕT<š¹©$‰ÒЧi5š]Kn*Ç´”Sw=‘(Z­–¦õJŒøy-³E©#º¢e¡dS¹!åºJ8¬©G_±ÞV˹·è5‡ÞY£Mࢧj¢èéZ˜$…Z¡Þ[+lf§©èý|µ@S kÑDÞ÷¡¡øÖ‡ vóôz.ǘîbOèc9>ô‰ÄMFo3uM¡E!ôUXâH9ŠQªž žA4œƒ÷/ÂÓuz„æNòß`ßP=î+Óç—íú|j_©¾˜bÙ«¿Bñ>K_©™õ5ËK KõõZ6}w1ÅI énзè;|·ôÝú>½ŠZÌñ¿D?Œ^ziÄùJôã¤áÑOëgÉÏZôšb®ðè–øÆé¨ýõÔçk$_HzƒiÖ-Ôo×_Ÿl(¾¡†Íhot2º=Œž˜ËãD12Œþ<_ÁÆP*#<š­SÅŒ5<Æ8|¾dLò•^ž“Y&ꩮ c–Ql”ø– åüãXf,1¦R¬Ùo)ôv¹æÐ²UZбÖ(36iÆV_-}±Qaì1ç2µjÓr­Æ¨6Ž’öI*g´,£ȽÄX±Šö’qŽè¢–Csx‰Ñ@ò¨qËo6Îø“üôm²?ÅŸæïåÏ$_‡üYïþlÿ0ŽßáÃ1NžÅ˜û'è½)Ú²ýÆT!•€?¬ ãBï¢þ,ÿlêC›@oæjþ§„…þEþeþþÕFOÿ:ßE¹ðo¦x sßüÛý•ôÍBŠÐ(÷/xÙ·5ØÐ(3ì Þ¢ñ9CýÉ¡xY2‡’( ”…ì”)Ëýu¡d_W_Ea•L(%”Æóšb†¼êÊ ee¡ìÐ0ŠPÎ ”ÍØ;eÁŠ`…Ðð- å-Îwˆ`hŠ,CL¶Ž†¾å¡1¾M¡ ¾š™ô*¨=—CÄmõ„ }{ô!þ¬ÀP E‘e& Í"³ú³ƒGƒGCsC (Ϲ.´(´ _£/…Vø.†Vs6#¼ZZ*mtQF÷ˆÌ…Ü•¼ª -Ò B{¹%þ½4N;þCþŽQôÅÔîþcœ“ü§hŒkµ14:ç)®2)dúëÈ×ëüW´aþþFŸ' (ïøÎ::VVRi×QÜ\öÍ ¤zú†Fh…Æö»o«–È ¸|—csÉ4{R‚ iaúþZÏFÐ ¶SÎ*¤7‘@<0GK Ì”^ñkI•5õ¾£ -š=°›¬ÚûU¾“dùLà0µÉNm988¸¨\£6V“í$ßeÒ¼T‚6ßÂ`{Ê6h.y(nºRLŠ•ì`Šßº`Oߦ@o¿N_ì¯õ1Ž3‚ýƒ=ÉæàààÐàH£:˜ôÇ'½A#˜§9è9ÕhÎÎ"íâÀbM°$¸P‹——W×Ët »©¾ÿ:aþ0J¿ÕЙÿo2Þ2Åô¬YIö®£RNe3•íT*½•“¨x÷z÷N99å¤÷•o dǨœ¢Â²Z*ç©P½‰õë½uT®xù k¶{ì£éq¢Qp¢1ã,cÁžWÅYÆŠSŒ {Þ68Å$ásN.ípri=¯{Þû±çíˆ3Ë8­|M1uÔ:†Ñ'üÞ¡wbòºè9„žcÕòÖ{s¿ 9ôÜ@´å h‡ G ¼Ý_‘öUµB‡9¢ô<þÕÈ1—ž§%•tAPþñt¬ ZM|=ѵ{ÉQNÏ›_NŽíD•dW‘d#jÿyBßZP~§Ôõ D=[¡ŒVì2õoAƒ¿yÈïùC‰F~å ò”ïùŠ4ŽhR+ää¡qË7¾yhló§Jš!i– Ïñt×Òó(Q1Qɽä¡È_øåä¹&m,‘´œhU ZÛ •µ Mÿm%ªh…öh…ª[ÐѯFŽóô<éÅüh•裎èŠÔ;÷é"ÑåV褴ÙHφ¯FN•ž·î’Ã|—št:Êgg¢Tz—t÷[ÍÉ™.¿oÿrrö&ê÷ùúŽä”Ò qÝAôL£çùÑz{¾ˆ½ˆ2[¡,¢ìVhØçÉ™Û,7Ï·‰|)ó˜ÓåmÊ/αÞÏçDœ4Wéï&MlæÛÉŸoSSNižsXÎ-^31?ºk‹˜nïQˆ("r¯/Î9BÎ}rÎ'*ùÕËãEyÒù ÑJ±8×Èü~SÄ»“|’ÈÏNZÓœ[D;¤È&çK¶ b»4žNÊ‹Nò“Úàd»¤¥?¹.ÖÉÄv¶™ŸÉŽK6ø‹Ö W{Ù®–ãÔbŒšÖ”Ä8•еÑÕI´ÍÕµYý›¢/ø÷¹öÑ¿]=¤lC3ÚÑ µ\—·BÇ›­¯ÍÖØ&ªoF-Öצõò¿³Nöð~~-ÌðÞ]›­wM9‹È5R>iÝryä£üá¢5ÉEk‹Ö—!å4‡yýÀ¼ÍóÉEëŒk†ÈE®Yr^ÈyÈ‹[l‡óòSbޔмÅõ›r`˹Õb^%òKÓÜ*•í/‘c¾ðn}èÓ|sÑÚäZ.Úí¢5ÉÅkЙ“¸´¹6Éz_–ƒZæñÖtmn%7½KºK_˜ë¾,Ÿ¦}žîÉ“ÍseV³Ù,B7Mêd pŽMñ3:Cïmx¼yO3º¿”Q¬¸sˆç<&÷/£ioäjyŒÆt4ÇV‰Ègnö=ûKî FçÉ\Æëÿr™ç8þhMöF“=7µw4ÅÍh²7šâl4Û¤],óg"_n’{³Ä¾iÆÝ< [ÒÚX"ò%ÚÕ2·ÈÁM{˜Dæ~²-~G15zI³ú e aÏE}½\ʆ6£¼V¨å^ÐÛ I¿¶Ü×5Qq3j¹¯KìÑþ;{³­ÞÏï¿öxïﱼ²nE3Ÿ´œ[4ÿ\ÕÞ{æ•먷iåây}F䢦|uNĵ뢌§„œudüñ“òŠ[Î;7Í1·]PóùæN9Â"âÓÝ«•} ‘;SR– äA¶Ÿ-ŸÃîÎAžnZëÜcšÍ?ÒsOóÍMk´»( Öž!• ?qŸÝa¢¨´MýpÏ–ý”ún:Ó¹-"ZæE.r¯ ¢3œ{Q¹Xÿ˜'iOàÞL´]äcw¥ˆS^ Ý{‰ÕH#:%Î îóÂOî:¡ï¦µÃ}ƒ¨Qì9ÿ'r³‡ÖO[Alë Ŷ§£ð»‡ö žTgžtáGGOoù®Ÿ´1Härí=´?ôpî¡ý˜‡öaÚWyh?åÑ„=!™Ç¨ÿžˆ|ÆE{@nŸjŸ®WKZ×ì›åòß›•>Ž**‡Ç§g©\žuÔS¹æ¸éTœ6g{QUÎNήÎΞ$Í ygç`ÇYçPçHš“˜•Žk4/=N/ÕýøK þƆcÃbϲg)ªý){®bµçÛÝJü½öö)öB‡ ý9¥»}†ýy%Í>Ûþ#%Ý>ßþc¥—½Ò^©ô¶¿gOyÔ^g¯S2þ[75~_ý.á$ŠSc;ðmÁ?ü@5p5 y!ä¿¿ˆ0Ëúø<ð¢îðcP÷1Â~RðÃu³`¿@Èhý>ÿî“u6ñÉêHFkŒp tÞäïÞ{Ú0òçÀ?ü ÑZ‰³Ó¡C6oÿ/µa­ìQ¼ý>Z…žªO _A´<À¼å$ø$¼UPëmH¦¡®’ûÁGÝ™°v?Z2h…Î`è„ýÁ÷Ÿ¥<~0,@ˆ·Yxû-õIFëshÉh2?Ðr:‹`­Öx,SË ˜   6·Ã&yÃü4ÑÜ×ê%|ÉJ³Û?xÒ:ƒ°˜uLfà«ÐG;Í £Å€æ«VázØ|€%¦Ì›®âíRè?ý—Á'ÃÚU`-ôoªÿAr³ºŸp¬zŒ¿Â¼é3H õáPÖQMàß»-hæÃÎxÖ7} eà7âí(èß~øóÀ½Àm螺¦ËúïÄßà¸5Û¬ïßÈrS¡µŠð¬J‘`Naå’uá1šÎK ¡% vR€©¨«—»¨wðöYâ?`4Ÿ_ < |U-à1²]n–KõŒmºÒ·‰„æK6þ*…à‡;H,–¹nhîÃÛÍœ„¤’5bÜ™'Ü,–묟Í9¨¥´¾ÆQþU´|=ø àz))–ë9Ô—=ÖRDQ€_?¼ŠºK%n–Kla)¼ñ2ëXV_F›¯ka§–Ûlºd­&¼¼d}N"¬ud¡ Æë4k%ÎC ì娀¤a¡gñö,$g¥¤‚Ђ¾ay p©¬ËóâyÄ|þ?qÓ·ÞF€S€ûu@¶yuOÇaí0øWÁ¿)‘½W…v>݆­u(" üzÖw1²Œ#¿½ þ’íÛìaÜ*:Ó2¦@~#{’-˜#½€iÈBß^²õ&|òO‘‹®_Æ+ˆéÏÈiD>dMS[«ŸðkÈf%À.ðÆ&èdb.|þi`™Ì´¾˜`ß܆Ñv„Gßö3ö†¹Tõ²Ol;˜·e2o¹€Ø.Cœd!z«Qk‡u ×U7¡Uü6$ò¹3gFš›Ç0§ŽañìxüR¼ý³ìãóhº¿†þ¯ágdëö#åjF1^}m´>šãÐï~ô‹eö(G(åÕsЀüUàÀ‡ñ•À;mòx4ÛlÀwùíS<Ê4s™O–È6—9y5ñ]“G Iž²=Èã‹|û&âùäí­œE­G“‡YÓÚ±—Ä;ŽádÎç¦j1‹é¬L+Æå({˜ò@b¬³Rà~Ì— à~¬ œ«S¸.ùó=Ôš‡4qÈ_‰q«,ùüÖ’/²ŠJ{SwÌñ‘¨µÃvùõ³¹µÉ,9Ï3"üC^YÐò,™æA“¿²¸¸×öó¶ŸcæŽæU3÷4ÞVJ3”ùq¶>x[IÚÏl;¹­}ƒWCÓ°&¦ µ·!>ï> }9Ë;%ó•íרv ¼{4wc¤ñš‡¬Â£¶}\ÍsÍ2ë࣌–4•$æßÃòëм Ëÿ þ?Á‚ýjöáYd?Žð…ؽ\TCèÇÛ7ñv%Z~ßÚk)ÜSõì +|¢^ÇøÆy}·tfk–™WŸŸ‹þÖ£ב+®c&¦ ÈöæJn¡eú~Ÿl-·$|¦J{WÓAôúw*íM#жC¨‹h7Q§òG­q¼6³ü•ðõ)²< ã¸UÕ8>ͯ Ö>•ÈÖÞ„Ça3KU ?a¤¨ë®ð®Œ<`i?¼…Z3€KTöÞ&Xè üìxÀÇÐ÷7àç‘ècµ>žÙc´Ëâ^Ìç]+ñ÷qT` šk…hç8رY—sÑȽ{í¹iëÉh½ ü¸ òt ƒs‚Øs²¦¹?pˆõÖæsÅ.vŽÂÎAØ9;‚¾}ƒ%æ$C!ñˆ]+óJ·„ðCà.ÈÓÁ³~±³ÅWv Ä>*vò¹®y<øñ‚g;„» Ov‡$ñƒýl~k×€eÀÀ *¯€£`slŽ‚ÍQ°9 6GÁK£Ø²%ƒ5-ðÀ^XØ ~ømÜ òêj´Ÿñ·¢¿ÌSÛVÃÎjÔº ,ÉF;¯K¬ÂÌâ6Œµ>†ÙÊ£3OåÝæy:à¯ìWcÎâtÀšŠØÉŸÃÞ¾NyÀßÃZ7Øon@݉À\ÔÝù§Àj•¢Ô–Îý²•3ª!ÖQk¬;i¦ã[¶V^§ à«<ðwèÛÙ«¶rÌëhíÄÉ'À%òœr£s1y£vžA|ò,#ô⑲v!\…3‘š= y| ¾>TÄÆâm–X,) äùÐÿxX<€|™í<¾Â’;<.4¾ÌŸ—ˆ±¿CDK(AFœÎÑJ‰åt®ôXÛ1ÚèÜzûž‰·?°Ò([^ÇN©Š}¢>Á뎪3oyø? /ãý˜ú&²"ôioÌû¢o ®û¢ç ù>Ÿ7Õƒœ¥-8?ZÆóyY툷¿E­_1¶yòΰp ¸ú^ÄI1…eûÖrü(à@F5ÇHMGl”Bÿ=DÔGŒÖuЈ¨HaMËO1²ÂÛGñ¶+¢%ÄYu0ߎ]Á›XsÙc–O°‚”"7îêq€÷'–5Ø‘.Æ´ûÃ9¼„]M=ìì~üvÎk€3±6}„uv£õ}ðÅÀÈ® Xƒ~Âû7µvqI~;°X ¬ç·|ò²^„ÿó¡Ùø„íßʼn 'DËN‰åÀR [xš³PkKY2†%ÖɈŠìugÀv†3°ÿÌÅ™;Xµâç]| š–RÎ¥*$„Ü‹ °ü°ÄíÀr`)¬Yå3©í=ÄÌAkgªÕÖÖ}@œOÕdôýðÛ%n–Kñ–ûõûJÝÅ|›î¶×€Ù>j©Ù?8#X6°,ñë›#ñ `8ˆXâ›­-ÆýÐÌåÜh}ØzøÏ¬ï¾ùq‰àà~àcox{’ü”÷º–ßð 5ý{éÀogbo™†sÐØ»fbW¼5»˜÷æ\Xþ-øpzÝŠ¶} ùÇlGu¢ýgX¢>(ñ `8Èóën•ú >ÃÚÞ1Ï3Â|ÖÚ×`‡0ó(û‡éˆÿUxû‘Ä7€àà~è?Õ‡ø+Ö÷ù^‘uv¢ÖNðÉð@¼tÊZŽ¹Ðƒß Ä‰õ<ŸXÕ ,±îâ–¨ÛÁ^Eœ¨ÐŸc½„Qȧ×øôJÞਨQç¢m± øhùN¼Yt°5™Páñ²v³=MüZ–[B$ |AæRÎ<•È¥K¡³úocÆýó¨2j62ðJðïr¦¸¢ZÖ=—°‰Ó«e,Oƒµ>à·óù—N¸ü6ÍJƤ]áI N[¿€eÜ™´Ùþ?pº)Å ½ˆ´ ³ãq NÇ–°ð¬)êKT«v~ÇmSqO¥âDLcÁk¨Ž³ðóÌ“…zà1Ìëzà1ÌÖzà1´ö·Äÿ_Ü/Ýâ=€åud§ƒ@m{—ÏÈê/QF nN,U¶¼Þa/¿ úo¢îÏ1ÓKYb p6°=ùûЯŽ®±50¶™Ä+t~őӿAðaíô_A›Ûòê vâ{*õ1k â‡y3·ÍZÇ£¯vÂÜ™#Λˆ‡ ÖC',W?‘gj¾±,Çç ÌëQ¼F´ÉÃØ}ˆ‘z’y[[kz{kÖN>SôrNÈá·mò°²¬áÙDùª¸y©Èk¨÷H} ?ùÈ?ƒüäA^kã+âä5+ã1àNþ®µ–{dÃ}¬e NÜk±Æ­`}ó¿óùš²Üxø:ÚÌyé >kÛ:`Ö×cvïf$OV#Ï<†–0Öàm;ì‹Úñ·òámÌ…71øm1°Tf®uyã=>w“ÎJÈW¢ýÈW¶‰ßŽ6?¥>Hø?Õ4ø3zú'ŒN:ÏHM–ôÀ9è÷ÜGõ>#[p«l§¶“8µBNþ!üŠqï‹sÙkˆ–®VÊE¶$ÔºŽÂoø£v#Éj´®å3Â- êEþ)í—Ø>˧uê·çA>³[ÂæóÙ‡€Ïð9ݺøo|ްüoî»­3<àÀü,jyùœnù:øÝx{ íù Z¸ò¿ágiì[o|}p ú;8Xî-yUí†ZÕ|r7ÿ‘Oî–ŸÀ?ÝpX‹> t`t~Šqtò¨Qôš7B’Šv®Ä)f)p¸àqBYй¶'¥|ª¢·t±>‚õhþ¸Íúò!óv S ,8aÁ £ Y³^–¨} 9ÉJ•FÜ„ºæžÀ8/çåïáöÎw¯ñY‰"ôÍh~„/vÆþ³/¬õåºjøy!™ÇÖwAž쎕{RûÑ Øì›}ÐÓzô´ž}¥>Öm9Ö£ÀsÁÂfðO!ø<øa¸Í_1ŽÆùýŸß©.¾ûRà».Ì ?ÁÂUXsñjÅ­¢ÌÃøºú0ádu>Ég!£â¼Lçk~ûS`*$ÃÔâ#*·­/$È·jwŒÅ_c´T1ZkÕ¾Ày\×Ú_ù:læ‡×ÁZ©ð,|ì ¿œÆ¯ÍAö@’þ¼sßs¸¥ŸÆ|V½gù­õx¸ š9àuæÛdkIÞ™Xq|ý±‘QÎÁ¸¬Ÿ C¡ók¾°xÙÿj Fa3bã!^Å,ç¹w–à;‚/†Î`_ÔJ&c4;s]ëZqë:ÈBó-ŒòO™7ÿ’'lƒ¯p¼A³&ÅÉKÈŒ‡asø‡Ñædøð‡,'Íhí ÌPü¤þÎÛŠI±Üù=øü³l`Ö·À? ,埒˷o×B6x]K!u7ßk€Cò1ø“Ð!¹ùé;|#Úø0< ,f4™•kdF‹þUàzà’矜@Ý«,>…Z/ƒOÆÛZàMHðóXH>/ìÅ×€áíß»`Í|àxÈ?‘<·¡ ’Œµ2ÀŸîn^‚¦ ü ð6ðÀ®À³¼3D{ ¯üK,Â3©À–˜ÐkÓ3À ? ¾x:Â{O7~‡, cÁ¼y8p5pðY@ø*p}#ïN÷ÿ³ÄôàU¼ý,¯½ßEx:ÐyHô’Z´ê<ø#²/ßA¿’¨îlÔÃþ1½ͬFz±-_‰Ö®DÛ—Brx ’‡Á§S€çðÅ^À4àà§ø–ˆÀeàÿ LiI8ü×0²%"&YnÞ>³‘Oß‚9¢Â܆цH³ÍdTwÂÂmö€móÖ*Œõzá™;¯óO¡ÿ3°¶ m¸¿ÃWOó¬¤9ÕñϸDŒòí+<ãÐÓ¸D30° p8°o‹a­˜%äO–çBžT$¦ñºþU‰¬é·OHϧaV™Šå–—ñöj=ŽŠ¿†Áÿ¦SbDÐÓ7E<ƒ× ³^:*²ûJ=‰ù› >žÙ ý½#øV |vbàß`´`[ò7à·¥x‹Ñ4u‡üûÐt m¶Á{)èQ¼ÔÈHq%xî#|eúPÄá³ÓPw5ì°þ°yoߟÊeôú"ð àî|ð6úØ’wÀwŸ†Q¾-¿€·Ý˜§ŒQF’xû.½Ä¼ÈlÕ˜×û0[?Å( «˜TxþIØ™°ø—;Ù“à«D„æBh~Sä@|åä˜}ê\̃à¯ßEíëÈZd›ÙWê“às!¯‡ëà‘ Í÷ûÓÅœ…ÎAàïdvzœ+…ét¶Š D0¿/ ƒÎ1 Èˆ[3Öò*),˜û¦·€3€"Wôþƒ< ~$0„|ò·åZÀñ<_òì±v@9Ä\(ÖŒ¦ þï \ üX D>7½ƒñºþ]àMÔ=,Æ <\Á:ŽOÌšOµÕIï7§.b•c²®n,ó̾6´&†i Ì»ÛÂÈ[ïäW 3Q೎b¬Æ²…n_1Š} tŸNwA?þÇàh=öìÖi7Ö^0Èg€t<ðÓ ø8% ÓÜ`h$Kë µèV Cò8àÛIeÐÅÑú 0ŒÂ߃n z°>8ƒ} Z°VTEëfÐGaO2ï¡uèOA_Ö¾>fÄéèëkÛ | ظ’  1/¾_½öìžçhkƒ^• ¹ü{A/=>ù tàL`Iôš-uõ åóWÇÐö`¦¿F†v1] í{ ~¶ç«`DxÛºŠVxR¬‚D3˜ ùYÀ]Àg€˜µíGÚtØ9òE¡>wl@üˆbˆ½hÈŸ„ÌbÐBÒ±ê@e0j±é• v2dž‚†åÀXðóaÖ%à™-ŸˆVì{7zÁXð-Oð÷|¸}á[; Xz>‡L<ôߢú.»ÌñcµÆòwb?ö ghHŠ‘èu2ã~„À{ÜÃdŒ{/|µÔ uœ©ËÀ ïNР¡<ð4ð7ð‡a¬Ö Ÿ…ÌËÁèNEHކžÉ áyü`Ïö>Ä~„¬Dë+@¬ çň݀ð¼ǾŽûïç4ìAÛßÝØ¹N6pr‘QÁÐ&üL…¬"®@}íDà‡À…àû¹4ïg#èÃqÅØ;âz!ê7ù3Z ™0ä§ã¯ûð〰™‘3C# Ó· QabOÙˆ –‡¢×ëOh÷îkÊð¿Ó |ä(YËF<du»päS3ƒ?~¾ZD.r°ø-püÌy }ý5ź3V*„Xâ¦@ì5 DôÊí£ê—ƒhÁÛs¡Õ†<#GñCÀzft"óÄžaÞ-j¬¼`Ï?2èxà§6ðpJ@¦¹ÁÐ>H–ÖAk!Э@7†ä)pÀ·“ Ê ‹£õ` 8…¿Ýô `}pû´`­¨ŠÖ͠ždÞ.BëП‚¾¬||̈ÓÑ××¶ø°#p$@c^|#¾ z=ìÙ <ÎÐÖ½*Ar ø÷‚^ z:|òè>À™À’è›}3!óèqhíºøˆ¹„.Ë¢u°ðqôZ‹qóÃBßrÌמ¬‚¾˜µu­˜‘X…¾X}g0ò³€»€Ï} ý÷ç5X0wGA'ÖQC DCþ$dƒ~’þZW¢WZ£rÁN†ÌSа‹Ö‰ ™önÈfx†a?ŽÖxègD5ð—èuüèm~„û±º |Ȉ‘àœGëx VGÀÜ8Úüu|ø0°Zw‚®€^å§¿? :[ƒ~z`¹ƒQœŠ =“AÃW;Ëž ì |2þˆ?ý5]‰ÖW€ð$çň݀ðžǾŽûïgD¯íï ļ“ œ@ì)Æ:2´ c?Š+G_;ø!p!ø~VÍ;ÀÙú0FG$0"\\C/ĉãǼ?£Õ C~8þÊ®¿!0›Ù&4:}«°îö! vÕ·`yh z½ùTÐØ;và~𱦠ÿ;ÍÀÇî¶ ™Ðn\Dµíg’K ý•Âj2üB„pS bžÇ{r;âkí Ÿ;ˆÕ|(1£ZmÈ3ò?d‰dNE¶ëÖ"þ9ÖœšxÝÝΜ6ðœ$ÔBë óÝX.h>ŸÆ“q–" Gœ´á›Xù¶…á43èì2h—?}»£õŒÁPÐí€5¡í’/‰q§EÈœQ˜×†3Àœx”ÁwëÌ)JmœŸ¤â<$g#KÀŸkúŠà´Cë$Ð.{bîžA1hdNHD2N-@'ðrÓ×ÈP&Î+rç'阑qÊCOCôª’ʆcå´§i~îàld Î@–ࣼ‚žahΆ×ò™¹*ð8© 'CòˆAg—AÛ_— 5Ê •ú0ò™ÑÀRÀ!hí &€nz!F<™~ 7¡µ3ô„¡pn`¹±¤8_³ ˜ÄL¹&Z8ƒ2V⯰Ík2ÌI`AhîØ`ø?™5âªé'ô]  m8ñ'Áiddìbæ³j¢µZÆTGóc SÎpÄßfhžclÝ ÎjC[cÁo˜ñ©‰O#o¯Gë^ÓªçnVǃæ†àçÎ1°?_fª¶s0¬½Ûš^NwÌåø³uL/«"ÆêºôÄg¤á„4ãO`’Aý4eð(8ù!s tƒü8¬JÀª%c¬¾ÐÜ5²áÛ~„d>g¢ÎȈ†c~GgHì2;ÆÌ%”ò§ í< œ&~ÂÛù1ŠÏä0³†aÖ3ÌÙlgX¸t8ãcæ´3'°.FO†7žÝÊHZ)èú&$“¡a,èQàï…7¶‚_ œëh}œƒÐö.8Bò²Aq°^~Âþ:˜Ë1Øp‘àGò3ký*à0¼„uÂJ¥@>Ê`¬ÊhGü¿’AßÍºÔ d žD ì‚æ¾ÿoËk`.Gá«ÜàG€!Ù97 û" ±w ‘àK¿0´Žíkˆd#Ó8œ ‡±â ¹½’!3øZëû·¼žK6/÷Ÿø ìéàKb¾]ýYIE8µFD…¯ÎATÃÆ3Vhž„<°Þ[Œeô”ÇJåö3z]B¯uÌ@´ÇCr"3ÖСB” ‘¶+nìŸæïè`mͰFE€/àAÆË‹ZcFÙìÙɺõ/m:[N‚UåÑËÏ«Fóœ_¢6ˆ«6¦¦g6ÐôóˆºsA`Bߺâ{DþJ¬¦™ãZ?7Br øàù u^Z‰\a²Š¿" Qh-ˆYWÇ|GÓ ¹Öë1`!`í@Æd¹Á:šÌ6ÞäL+±› *ÒðNnb5 ñœ†µ0ô-ømPPÅò‚cf=3­âW1äœKXU%¢H¢ÊðH¶¢ÆÑ‡úøgäÀkÈ&Ã4‚•¥ñˆáˆjä"-9’Fþcð;C²&è§ÁŸ Ë÷‚^þ“»Ý±û®™gr3JÆäÌãX¯†f·bMŸÁ¼ ùu-ã;¼_ŸËX Ëc.!Ù0Ï<蛟 hqÁÊj:ý#£™¿óF¶ùžNpÒhÂà‡ ŸÈp2ššOYg41Ÿ„ÏÀ÷A2 Ë.º‚ùœvF‚ù,½æwè—ÌçÇÌ'ó5½ô%Ð m¾Å£û®0¿r~‚ù4 Ö³¿Ír¿o³Ê ù‘ùž{F¬ù6GF¬ù>HÆg¡ÎæWn䛿Wn ¾ÚЃCc̯ÜÈ+Fè¤Ayô!£_ž}´/ÓX’-mÌïÞÛÒú6‡ÞƒüÐ~¯s°9ü"àÇ”ave€—1ß!h]”à?Éêëø[ ³<8•៓ŠÖ¦Oˆ[à¥Tà@Œ^ ’÷¡¯‘Œº|hø·@ß=>¿,ytIÐ/BÏ>ƒQ4~É'* ­MÁ m_›ßÀ†¡¡èr +˜ïËkù@çæB¯'`syØÜ «<3½VØšÎKÀ À´Þ¥±¬üô'йô(È|þ2л@_7š_áÐÖš8¬€÷å9=4üfÞIÏ(—~ÖØ“޵0ï¼kÎ5Óš¾ÚxÒçd ¢4”K_IôMǬӧƒ> ßÞ úZQéÀ9 =æ8DakDÔ9âÖ¯õèL±í{´}…tn™Ø•>#ýÊïÙ†Õ ’~e‘™I¹È£å§Â”ƒÊÐô=Fµéj®u4 ×éMjM©õ¢á|„$ÝME('•¥ŠZK5zšS =jCêOƒuæèDÝ©7Àßôû(ŠÒ9£(ÅR<=HSu_¤—Hгô½Eméz•úÐHÊM\«~ýšT»a½g R«F Ÿ.H“¡å.üfè=:7ÓËQzœž¢g¨ ½LL¥¨  !ÔŽ:SêKIèM©8™J÷Õ ºt½ ~ŠÑ~¸—⨄Ö[*QUz‚jR=jJ-µÝ¥é9HC©=u¡žô ,ÈN.¢|TRkH GéIªEõ©µ"‡î§çi £Ô•©Ÿù-ÓÖå{¶æç-€í€]½Z·ìœÈÀcS€sK_µnÙ³-¯nnîmݺKw>L1h ` °°4°r›ÎÛÛOë¶éÚ­‹ÝØØØ ØØØ¿]–­íÁÀQÀIÀYÀEÀeÀ5ZqK{p;p7ð`箽ºØG§€€×€·€»s·Ö00˜X@7öpŠKãU€Õ5»=u€M€/Û;{tëѦ«Ó88¤»á'Ç'§ç—öÔkä,®®nnîíÙ±k;ç'àqàà%` 0µg—ÖÝC c€%€å{öŒ/ª¬¬lll£±|¨30Ø88 8Ac…Ð4à\àà2à*àz ¡­À]ÀýÀÃÀ“Às={µêº¼ L3(0 ¨zöêÞSÆã€Å€¥åµ'e%`U` `m`}àó@ó4.tî‰ý'®¬÷y>Êÿ_¢,üpèÿ1E%Eý·ÝÙ¸óiKg½¬ù‹È:ϹøÍå…²töþsÌñ—Q`E„ÖjîpÚcêƒyJü˘ý/ã݇1 ÂRÆÕúšü‘§þ!²®T¹)Ï?IÝJèúT蟺¦"ÿÔµ(û'®–®¤ÿÿ±O,]Áÿ1fûKXN?m$êª?æÒ2ZO»é$¥X¶k±¬V#«•h ±&Xs­eÖzk·uÒJ¶( êˆ~"IL‹Ä ±EçD*‡9ŽKqe®ÍM¸÷ã$žÂ‹ô4cEù1Ëu³Ü·Êr?*Ëýè?ÜÛYÚCz›ï'iýá>œpç½7çÎþêæúc›ÜyŸ‹îÔŸ+6Ë}±,ò5³Ü7ËrŸe>¹ÞyŸ»D–ûúYîûÞiþYw¶ß½êÎû¢¥³Ü—ùýÞEã³´ƽÐù!‡?Ãâõýk æ¶Ž¹Ü:W ¸;ƒëÁàz2¸^ù3éR Áµjp­\ÝiE©¤;gy_Å;ïËdÜ)_¶ñ÷岬BùòYî²ÜïÌr¿+Ëý…,÷—ãQ¦‰Š±Yî+Þ)_±R–û¬íµ³Ü×Ér_÷ÎU|¨¶F¥=ÓÚšHí¬iȶ­ô?Ò;uYNŒ“µ"…¼Z*Ù«©Ö«µj愬‹ÖE-wźB–uͺFºaÝ VÕT5²Õãêq]7M<~‚Íz ‘CäÒó "eìáˆîYFßçÖ¯FzÐ4J¦£”jÅj¢´U±^^M¯¡ÆZÞ³ÍìbtN.¨_-Äë×¢­ÕÙ¿}+Þh"†Ðz1\ § b‚˜@Éâ=ñmsÅ>ÚÄ5iœÀ ”ÁÕ¹er-®e žÎÓ-¶íÙ–í´vZ[å¶N[«‚ÓÞio%8ŽÖNO§§UÑéåô²tú8}¬JΡÖCágÃ-­Ëáá®eex1Þâ5¯©7C|ié$®GFF‰T%TG©{Õ½œMV…9FUE9»*®ŠsUR•äœê>uǪûÕýœK•Ue9·*§Êñ]*A%pUQU伪’ªÄqª²ªÌùTU…󫪪*ß­SqU]Uç{T Uƒ ªšª&ß«Z¨\ÈüIa.¬Ú©v\DuP¸¨ê¢ºp1ÕMuãâêUõ*—P½T/.©ú¨>\J½¦^ãûÔ@5K«7Õ›|¿ª†r5Bà²*I%q¼zG½ÃåÔ5†Ë«qjWPÔNP“Ô$~@MV“¹¢š¢¦ðƒjššÆ•Ô 5ƒR³Ô,®¬æ¨9ü°š«ær5_ÍçGÔBµ«ªEj?ª–¨%ü˜Zª–r5õ©ú”««ÏÕçü¸úB}Á5ÔrµœŸP_«¯ùIµR­ä§Ôµ†kªoÕ·\K}§¾ãÚjƒÚÀO«j#×Q›Õf~F}¯¾çºj›ÚÆõÔµƒë«ÔÜ@ý¨~ä†jÚÃϪ}j7RÔ~NR‡øyuDáÔEu‘«+ê ¿¨®©kÜD¥¨nªnª_¹™Þ–È_„ÌeY©VªÎb™V¦ÎŽÐ¯°Ïì³ö™q"Ž¢D!Qˆ¢E Q‚Â\Sg7×iå´"Ïiã´¡ˆÓÎiGÊéàt lN§Å8‰N"ewz;½)‡*¨ RNUHÒ{¼ˆ*B¹T1UŒr«ªÝ¥J©R”G•V¥)¯*£ÊPœŠWñøú ”_=  »ÕƒêA* RÑ=êaõ0T¨Gè^õ¨zTg+“ #ÿQO©§¨¨j®šS1ÕZµ¦âª­jK%T{ÕžJªÎª3•R]UWºOuWÝ©´JT‰t¿ê­zSÕWõ¥²j€@ñjDåÔ5„Ê«áj8UP#ÕHJP£Ô(z@V£©¢zW½Kªñj=¬¦ª©:_OWÓé5Sͤªj¶šMªÔô˜š§æQ5µ@- êêCõ!=®«ÅTC}¤>¢'Ô'êzR}¦>£§Ô2µŒjª/Õ—TK}¥¾¢Új…ZAO«Õj5ÕAþ{ù¯®Î멞ÎÉT_mÒÙ³Ú¢³mCµUgÛgÕvm©:Ë>§vé,û¼Ú­³ì j¯®Õ~]3^TuÍh¢«ÃÔ¿ßL]V—©¹ºª®R u]]§—Ô uç^þë+‹kKêØr¬æVsÍnkµ%Ë^n/'J¥GUªªóðOôéøïèûwôчè+ež¶¬Ž¡CÿޱÇØSŒYN'ý<c ü¤Ý˜òSeªNµ©!5ѯ:éç÷~úÉ2‰ÆÑšC‹è3ZAëh í¢ƒtœÎÑ5ýdOVÈò¢ûG÷ŒNŒ~ ×^Ñýpíý:®}¢ßÐ×DM À51z ®½¢áÚ;úM\ûD¿¥¯½´Ü\£‡âÚ+z®½£‡ãÚ'z¤¾öÖrI¸&F¿k¯èQ¸öŽ~×>Ñcôµ–‹kbô»¸öЇkïèñ¸ö‰îOB·ÖØ+z„ÆÞÑ£5öù<23ï=)ðÌ{g&žy?ðÌ”À3SL <2=ðÈÌÀ#³Ì<2'ðÈGæ™xdAà‘…G> <²8ðÈ’À#YxäãÀ#ôü{FÏ€GæÂ#‹þE|xä³À#ŸYxä‹À#Ë|ÄÊ×gVžYxfUà™ÕgÖù&ðÈ·GÖù.ðÈúÀ#l <²)ðÈæÀ#[|xäxäKDÊZx$ù_ôȶÀ#Ûì<²3ðÈG~ <²;ðÈžÀ#{ì ü¿Á#x$'ñÛ<Šßѯ‚ó >É¿ð)>Ígø,Ÿãó|/ò%¾ÌWø*_ãëœÂ7"ÍßQ²vZ;õ3Ì·sùi~š×åºÄ܆ے͸#…¸÷ (NäDŠæÞÜ[? ôå¾ärîOà·(ÂSy*åä¼b#DÀ)C…íö=vAû^»]Ø.bµ‹ÙÅÍÌ´E7pºî?¯äÎ&î3mºvmqç¿I”$J›³)î¬[ÈŽµÍ/€•°Kû‡~þ¸±v.;·}—ÇÎkǙ߾Ӳÿ9® "”ÍÎaç´;dK;ÊŽ¶Ã¶k{vÄVv6;Æ6ç]¶žÛ@m¤é#ìGìªäÙÕìj¤t[EÊÃóy!/áy=oàdÞÈ›x3oáïy+oû3›Ó2žÇó´Ææ{ͼ˜k/eGµç¾ÓãçóÓ>OK-Ö­+x%¯âÕ¼†¿áµü-¯ãïþl¡}>Ï×ÚòBó‰L^¢µÌ:;k ·iífF{ŠýS­2øìxà3Óï/Fú™hÐýœ®b½ECh( £á4‚Fê}ý6Â_Ccé]½ËÇÓšH“è=šLïë=?•¦ÑtšA3iÍÖàšKóh>- …ô¡Î‹i }DKécú„>ÕÙásZF_З´œ¾¢¯u®XI«h5­¡oh-}«3Çw´ž6P2m¤M´Yç‘ïi+m£í´ƒvÒ:«üH»ií¥}´Ÿèsˆ~¢Ÿé0¡£tLgœt’~¡StšÎÐYÎÓºH—è2]¡«:]§ºA7éWºE¿Q*ݦ4J§ ÊÔal‰¢¡xV4ωçÅ ¢±xQ4ME3Ñ\´/‰—EKÑJ´mD[ÑN´DGÑI¼":‹.¢«è&º‹WÅ,±_Å!ñ“øYGÄQqL'ÄIñ‹8%N‹3â¬8'΋ Å%vÅeqE\×Äu‘"nˆ›âWqKü&RÅm‘&ÒE†ÈÔ)È|ÚžÙf‡C,9Š£¹7äg¹7ãæü2·ä.ü*á¡<Œ‡óx~Ÿ§ñ'ü)ÎËø+þš·óÞÉ?ð.þ‘wóÞËûx?àƒ|ˆâŸù0á£|Ì~Ø®bþn«½ÛÞcïµ÷ÙûíöAûý“ý³}Ø>bµÙÇíöIûû”}Ú>cŸµÏÙçí öEû’}Ù¾b_µ¯Ù×íû†}ÓþÕ¾eÿf§Ú·í4;Ýΰ3ˆ“CV“Õå㲆|B>)Ÿ’5e-Y[>-ëÈgd]YOÖ— dCù¬l$Ÿ“ÏËdcù¢l"›Êf²¹l!_’/Ë–²•l­ÿµÕÿÚëe'ùŠì,»È®²›ì._•=dO™({ÉÞ²ì+_“ýô¿þò 9@”ƒä›r°|K‘Cå09\Ž#e’|[Ž’ïÈÑrŒ+ß•ãäx9AN”“ä{r²|_N‘Så49]Î3å,9[Αȹr±\"?’KåÇòù©üL~.—É/ä—æo¿Ê¯å ¹R®’«åù\+¿•ëäwr½Ü “åF¹In–[ä÷r«Ü&·Ër§üAî’?ÊÝrÜ+÷Éýò€<(ÉŸäÏò°<"Êcò¸w“Æîf‡Ü­“ݧ©o)J?Oä¡ú  ”ÿî‘{ÀðÝC¿wÖ¸Í=¢q‡{ÑôT¹ŒF•ÛhTwЕ­¿¿G­ï6¨°ÆÊ½£%ZbÐ’ýŽ–¯#õ%—¿×NÑåκéÅxÙ½^N/ÖËååöîòòxy½8/Ÿ—ß»Û+àÝãôîõ y…½"^Q¯˜WÜ+á•ôJýiµúçõVE«°rÿRÕ]ò÷uWeS1*ûßUßî&w3jðÖ?­Âût>àrvü^UnujòÅÿcUNÿûº¬ò¨¼*î¿Tï¨Í^úÿBu®k +—~)g• X«¾Õˆ ã=÷V «-Ýgµ·ÚS«£Õ‘¬W¬.ô€ÕÍêG•¬þÖDªaM±¦S ë kµ=D"½!z‹7h(Þ¤â-1œÞ#Å;4VŒãh"Þ=_L:Ûã5þ ö8ÍäXŽ¥ùœ›KÑ.Íei—ã´7*þ¼zÛkϱwÐ9'»“ÝÊãÜtnZy[Î-+ÎIuR­|!í.+hdèëîИÐx«Phbh²U<4%4ݺ/43´È*ZZf=ú2”lÕm í´ž í íµZ„ü{ßÅ’õ_Õ3=4=Cƒ Y’(Hè!‰ " PPAPÄ@$‰ˆâÓ§¢ òLψ¢(FDTÌbö)Š9ÌÅ,Šßí]ßîÛýÿ÷Ûó³§u«{†î¾uoýîïV×tK®áÁ’JÉMÜ GJ€¤+9)uÀÛ•\•ÜðÆ‚±Äû+ÆdŒaœ'|”iÇ´ÃåÂý3|ŒéÄtÂÇÆW0ÞŒ7>Átcºá“L¦>Å0ø4Äá3L0ŒÏ2ƒ™p|މabðeeHûñ6Œ ÇWÙHv(¾ÎƲ)ø›Ê¦â*ˆ³9ø)ÄÙ½ø-ÄÙ÷¸^JIPJÒÒ1T¨l™ì5^e†Êbêàçõ-“;.qTãž­Mö`ÔI¹‡9pø¼ŠP+($RØ*kÜ*ƒ­J(Â*›6¸ x ¶pçŒá˜]p.>؉q6Î&«lŽ¢PZ—Ö£õiÚnAÑÆ´ mJ›Ñ-isºÝš¶ -é6´mMÛж4O+h;ÚŸÃçñ|_—ñ|_Ã×q%¾oâ[ø6¾ƒïâ{ø>~€âGø1~‚«ðS±H,½ÕˆÞ‹>ˆjEEŸDu¢zQÃÿË>1¨"¦ÈLƒ˜üZ¡™ûц"BúPÄÐs­@S+$¬K³…Â@¯¶žè…E¡HQgä…dÈ ‡‚ ¨¢þ(øá (ê(Š …¢F ¤‰ÒÐÔ‡¢£“BºX«!=£ºÈbCdHVÇ´€ñÚ Áx FÆä®® ©¦8Ç!3²^¦%‰S‘9‡ÇÁ˜ž†§! üžŽ,ñl<YÁ^Œ¬aoA6xÞlñøRà \ìÉ|“yN„Sw'³NƒÈ¬Ó¯sa‡笡§ (¥ÆèD9 ¿ £:cìNuÆØ‡êŒ1ˆ B4ðžH$Æ3 ãT6 1ìtv6’²+ÙUH]Ã!uö"{ i±WØëH›½ÉÞ.=Vú+2†è1™ ‘Y@dÈGmG¶€ã‘л9‚ßDN€áwQ[ÀñûÈr«‡¨`ùcÔð¼ uL6Öu B¾êr¬QÐÅð;]ÚQíໂF"ªä2b¢M4’¿ FJD/ØÛp¤Lôb‰^*D/u¢—[Ì–€F›Ø­HèhDt4a²‘9[Å>½Mmˆ¦ ¢©ÑÔâ_!ä« Ëp#Z{­»@\z‡| *ÕAf"hÔŠm¼û*üÊ1‚hd+èˆûq¾îAd.“ÂCq§¯û(€­`Kãë÷`ü¤/\(è ¡GÄÄÆ4é é%Ò/ éeà½KzGJ¬.#}¤Âögû#2ó_‘*d_sÀöóؤ9ØVdÆng÷"'ÈÄž£ŽìKö=Š1Å[˜Æ;(Béû· ù믠¥ÄöÛ‰íw@¿vØE<`7ñ€2â{ˆì%°"ûs´¢ûKt"|:ñ\‚NÇÑF×£Àe,Ñ`%RT ì¢z 1^2@BȆ#$dÈC˜e@½…u[È_ú‹Ì „ÿ1À‹È*GÑ7‹ 0Ò¯<ñº^M,³ @¿î£P'r÷\ãë÷($b—°+àÌûØ£àm¤‚ÿÂ^’g¾cr%|ãÙ)8‹î¿‚¬ðŸš‡Á!LpHDpHLpˆ&8$!8¤Dpˆ!8¤Lpˆ%8$%8$#8ÄR%8¤FpHàœàÁ!M‚CÍ  ¿+>Ȩ®¢Ðÿè> …Y¬Wi‚-±n=pwÜ®. Çâ$œ Ü%OÅ3ñ<8k^‰‹ð&¼ïÁ‡ð1|úæ:ôÃ#\ßàZ %£Ô)mÊ2£,¡w°%hßúšÈ`ˆ~‚ˆÛ9·'r0î@äìBd(v%2 w$2»#O‘ØÈ(Ü™ÈìMdDTA&b?"ÓÍ)ÞJk¹Ö$÷‘‘ ’–32AJV0*D–1‘{U"ë5"ë™fD60ê‚ö"'ÒM“óÄb @UˆólYA Ñ^à€ %ø 言z¶ƒ:ÛC†G€nŽPG`'¨#q[¨£°‡°ö{B= {A|­ºB„»A=w‡:÷€z1î õì u­(ÐWêm´0óñ‘À¦àÕ §ê2øè(V31JP×3 Ô Œ2¢@7`?Œ²€Qñ6âìX4MGóд¡R´âX:®CæÿÆvãý<ð$mðu3ð%;að¦®Ø2ôŽ-ÖBo-†ZGä@\Dä ¼žÈÁ¸˜È!x‘a¸„Èp¼‘ÈP¼‰È¼™ÈH\Jdc HÐÑP e "Ë#"÷0ÆDÖ1&DÖ3¦D60f‚[é†s‰ý–ËåËåËË-'6[AlVH¬¸’Xn±Üjb¹5‚= Ò㚤ǵH7'=®Mz\‡ô¸.éq=Òãú¤Ç1«"²ª[D°‘‘ŽU…ŸhOòõ%kê[#;ˆÅ3QX‹øZsâ#Ú¹…£`¯­¡‚' Ø x²€ø ©…;dX  aMÈi0A"Šà‹Ó´Ñ4Üáþ¸ÄCÙ~}‚?Ï S#©_©©Ô|ÑbÑÑ&îWÇÕs €¯KÙ\v›Çæ³ìrv`í~ö{=Äfÿ`°G¹ŽâDœ˜£9 §Ä1ì¶–ýÈ~bëØz¶A °'ý]:G:W:O:_º@ºPš-]$Ý*Ý&Ý.Ý!Ý)Ý%Ý--“î‘^•^—ÞÞ’Þ‘Þ“>>’>‘>•VK_H_É”dŒLYÆÊ¤2™LEÆÉTemdV2k™ÌVÆË2;™½ÌAæ(s’µ•9ËÚÉÚË:È\d®²Ž27Y'™»ÌCæ)ë,óâdœ ÇqꜜÓàÞs¸ZNÓç„{æ$ëC$Ó£9ø@L‹¥â j§@F'£ÆAF§BV?s$S%Y™™{m&Ú(ÚˆÔ%$%H.Ù&Ù†4%5’àm« æB®üæ{Y °™©»ÛCξyB¶}õ€ŒûêIb·/‰Ý~$v÷"±»7‰Ý}Hìö'±;€Äî¾$v’ØDbw?i=Díþ25ˆÔa$R#‘z§ ‘zè¹ÿ‹þkü·Øé‹…XÒ›ˆô¦2éGuÒz¤͈æÖDs'¢yo¢yá(AŸ3?š¼éÚÝ‘0¯ë ›úÿ^üçþøÙwà͈§ â)"ba ±'Gì©Jì©FìÙŒØSØSNì©Aì©Iì©EìÙœØS›ØS‡ØSìÖé5^½”æš\=|³qÄ cžø)"~ЉŸRÄOEÿ+£U›ü¯6°’¯(ðe¤ä £€x2MBÌwûKkÊa$âXÉõ&+€a­L㪚¿»Fæë:8åJ úš³Þãô%ç¥ðTÝ‘r†oxÂ>?ª7Hõ§B¨Àª$@½qÂ=­Ÿá>VÓGù¾8ÿmîz5-Â=²ŸÏŠ·pí»â÷·E¸›Ö´€.R |W@çïKÿŸˆßè¥ïË R¾mGüP¢¡ÄþIIúY‘Ö_ j}_t~(&ß—Fý>_/9Âç&þdn£?] Öw–@žƒòåé'“P²Ðl´²Ÿ´Cþ³íC@t]†þãɽÞ¶vþ—j¿¥þéüÇçÙˆBރ܅\bÉ„{[@MA´Ÿíx!´³±ðöî\ȼ(¼?ž‹_B¾òмã-~íüÄÌÐþ„ë¡Ý@ o ¡(1øMI ­D OM•RS*ä}j䨔:¥mMJ ÚÍ…÷s@\Õƒ¶>e m 27ÊLxóÄX h[R–ÐnCµ¶e…„7šXCÛ†ÞÄ“Cå@{ µÚK©¥ÐÎu!Oqí†D¢î´\xN úÒº´—ðdCº Ñ]éPá9Ýt ´c…·C¬íÑ£è :Ú™ô>$¼áx?´0€Ì Y$Ř+CX9N˜žr¼Ê„UÖª@Ö«²Ne?´¨†öÀT1g›4í3áíQé7°Ÿ¥Ò1FÕöŒkfv7Sr+ª¡ë–æeÔ½R™Ý‹äŽãl¦\òÍ߸ÊÓ¶&2WqÛNáU|i¿ÙdãK6[&ÿZëxÎ_ÿÒÖÞ†~'£vTm“Qu!ëWOyw̤ôÂ^fäÛ¬¤Yá—žg>žåi|nʸÙñŠRO9{´[-°(ûÅ´6l0Wd®ùÒu¯Ö¬ES©ƒü¶ýÒ!-T“+.n[í¨ž™“/eÌ0³6`Éþ×:ƒ=f¨/3p›½­•|’Ž]ºÁë+SÎor)تäwÉlmõŒ·›¯Ô~hç·êñ« ýû¼¹îžcÛ,)¼òɵ/ãÅjþö»6ù¾í¿É=²KBÛw»çh¹ÿ>ÌfÁ€XžŽ  Gtx9ô¥AK±Œg% 85M+‰D¼°“²­¡×‡{ÝÌrÛ¾i›Mt=¿ ßŽåþ Ä€ªÂ ×ÄÕ&ð-„mS±6¯5Aãx³GÇΖjõÃåmmìµ´vôX̶à…/´ûñ=yŸ¼ny]2½†¦¤$µ·µ O޳‰ÿbE›ðÄxÛ¤a1Â^Û¤äĈ‘á)#lÁÈàˆà†àƒygk{…µ¸  |‰þrÍ‹}ù|÷/Û<•Ù±ñ£FúÙ)"“ÿî±S~v"Ás 8Å­÷͉Q¿›˜EåÄŒ:‘ÜzêW¯x+í_η¶•ßé«w@ê°-«îÉŽyO•bߌŸ[uuP{I®ZÝ•²%½=¢ç-¹}jì ³ÇŠI«¯îKtê¶/˜ z7âvîë»Lm+Ξ¨ö3Iª· VúälŸ2•sšg¯´}ÍúÞy§\Ÿi¢^vðfú¥ÀüšÊ…FAjjK«‹2Sâ†çìñê@Ò U×â{¶í·¨gZ§Óƒ[GWéùzKJ¦[´X®6«Ð~™é…÷[¼ÇݪÏžíÓ‘^m[¢½¹ÿŠ îþ3ZÍÚ²¼½¤‡¾ÍEïÀˆ¢ÅE ³-²ΞòdéVÀ¨€Q_0ŠÖY@°TïGŒõoÁcâh0ðµ¿}iퟟô ¡ø¶vŽv¼ƒ¢€Pv€O_6ù‰›ÿ7ªßòó¦a‚gLÒÐÈd£Îþ^F^þ¾íÛyµu¶vvrð°æíÛuV´äM?k¤ÿSü#“ScÂ#ÿ!¢;ÞÁ¿`YçåcÖõ îŸ5jmÛ¹¿âŽuë¨åþkÎl49Œf?™P­ýh"'?|9íi‘—ÚA¬">,Î[ýÉÓ_’/ïÎɦœŸŸ·W¯iãúËóõ^Aó–] wXæ=sOñ­+¹íÞ­é[wêᨎòç!övë§ë©ÔÏ9k|†FÜ“òÓ>cÒŽŸÓÂhL›·z€[ûr7£qñ¶ýtÇËrÞ}ð@»¡—­ûéš>³Tc‚¦§>;³ÐkNFÅÁ¶“nªd=|në­Eþ—G3oï›+…eÇÆèÔ%}ðw˜XÓR¡“9å·}}×­íá¨Y7àñüòuþÙƒ­ o·T8üª¤ÕÈ/ˆ¦ =B7¯4Ó‡ù*{úZ Õ¶K¾øú¶“sðw`eêðþJï$öY§©7·)9è¸Y•ø VU<@UžW¦ç?VŸ?¬HŒ^I ª_¨ â»6*—¿U?=rÊÏœùzu9:q€¢2ñœË¢Wcâ~](ïeE7×SÛÞ9Ëô7§ÊJŒK#âCõ/W?ªz;§Ú³@»óÁÚÚçë·†Œ_ï³Åóc«ÐÑLÀØ6d³¥)‡Ö>²îuh\ý8ßüE[µÞV|ùæÆY“Lfž|ö)T#~oUÅä’›Ëw  ·= xf×je¸OíÝüÚ]73DÆø—lžaUvøeHØîß߸.ññ@*§œi óàë–´ÏøØEΗ+G,*89½—Y·nY£+ lµÂ]ÒzC·C¥}æ=½AMЍïy¾Á§à“Å„kÕnë\žÙO=¶×dÈéâ¶4;ÞeU{¿Åg°V³°,÷T`Wôn@¯_ÐËÞ\— —âGôL`Užc>mî+«¬£%[(tøæßíTþj*…5ßæó86û6Žû$&H€íb¢bÂCS"ÜG¦ MLŽII#(ÅóÎö ;%{;@)»ÆM;aó?IñþÔlJî¢ÃGì5X<ÄÈÈcQª\G½‹‰Ç_>V¿PKíÖÍö)“t·ÙæÙ=m¸qÀÃ×ôB2ºæÄN;VlÔíÍ‹¡E=}f–¥ù Ïé¢tµ®åÍ¥#§žZ;¢óøK¯½.{å´¢<Äëú†õ®·Z]¨»ª0yDàËæóîÕ9ÎKλ˜:Øp”פ g­Ó#Ð;£ûÌ(Üc{UGZ?'ÅâNªm@¥ßÿýÙauÇË{+zíh%¿×‰?•l¡ÖÚäH[_×<;×Ù'ò%!¾é­-i»m>—üžµ{éåú°ˆAï¼ósÏ ˜nîÿhÌÚOµuqÎ-RØq춬yÌñÂ%FÖµÒ^‡OXßí~vwÒÃÕ*¢ÂÀ[Û³|‚^Í÷Xòòõóê»™-\¶.~áoša¹"]îyJ¯îø¾Ÿž쑼ðwߣzgg%Ï·Ÿ£û^ÿ…ÿÅè “†ƒÓËZmJ ì\ÐûćÇËûVæP^m¿¹Z|>Ý.áÓŠùò{U1×Xí9ÚF‹œ¹èÚÛ‚ZusåHçy/Ç´è¾ëÌíÀG§G/Ð)wÔ\9× ÛLë=ë:ëW«iꢕŽŒOfQ®Îà¦ûÅsr_×±]—$ŸywlÿÓ¤åAs‚ÆÍ›‘§×U\sjy4›RèôÌÚ¶ùÑÉmÕß$nt‰NÿÐgÓ {­HC.«RíFěēÞçÏ5œvH\zî£ÕÍY¹EìGy«Nëï}¸½f¼÷.¥!]"‡tò-ñxêûlsjÚeÖA9^‚¢Å. ò~þÇû]ÔÖGd7ôÒ²»—6sg¾{«˜ƒsgÍ/Ÿq9ǸX%dÉ‹‚âÌ¡“d±Ö»R‡!ƒë_iýòNk’ÙŽ©§bWwQØ.¾~w¸ë%ôkX—3'§–o×®å’gì_îºêÛ“³àŽÚjµÒ¶½˜‹]ùt‰à÷ó/ø­5Ôà·þ¿ù¶¼ˆíhÏ ,H¦°iÏ ›ÿ9úûÐ{Y~ÜÆ›×ºÎ±;ÌFçvÙ»‡õ6íµþd¥¶¯™jõ™Ugz¬OášU)]˜¯ÙmžžÇœâìÞü*öè—²§Ó”Tk81¤²-ŽÛ›MYúêM´¾Õ§_N5xòÐwyþ~Sÿc3j½N)Ÿ´át‰‡¸àÃʸ¹Ñ—Z_÷ö/É<}¿µ·M«¢L¿¾}d÷DVcgÏæ¦¼îÏ/­ýõâÂÍŒþúþ¬ü5³Í?¾O©×ìe]Q÷.QÍZYD­^xïœdb÷‚“W5뢡œ¾lò³¾£ëñbƒ^LR㽟m»aê½ëuÀ² †£Ý£*rnv˜47?”Úb ²ñSMÎ&|ÒÄ' á}ð€‘ô z¯ƒYõ÷Ðû§Äð;ôVkŠÞÂ{¨ù‰ÙŸÁwâl~⌟Ão~øŠÐ»{¦«¥­×ÊïžW¸¾Çˆ~o”ä6‘ÿgPÿ/QYèkµ…YCD*—®uídZïžx£MÊðñ2ùº“{~™µÝæ¼zÁôø°íAÔq_#y¯E•c:Ý Úµ¡ßbýÛ8³h×èW¿~ÚWßÙ3‹¥Îèzç…¿f¥ßº9÷Έ½0aÿƒy¯$¶¢Ç¿[š™$}|÷éÞèE6*5Jw’vkû.9ŒMž¿=¿Ý’hëý¹'a!nZÙ¿¹ÝQÒµûP¡èžªpm“,=ú$ɵ!ƒ•ß<À†Î|qi{ó*ß߯vl3hùÞªÝ㤿œ÷O6®æí27g5¸³W5²ßºìˆê·ÙÚöᇌ̊ޖ&Í‹+j×ãü»´½kµÇ„Y<ØÛSc÷æÍ%=£.óh˜fH÷h®‰ñiÏÇmïzÓµÂêüe» =Ì-»š ~ø|åEKµO,›Ø*EÒ¬:ÕxoNúþV[7ƺNËO -MÈ—¯Ü»¶Ë õĺ,»¸Mõ7{nZU¶Ô`Šzåj½¡ÿ¬í÷Œïo)9^::€>ïnÓ«h^Iáèu›óŒÔ½2gŠ|¤‰­Ýj&!oÀô–{óžO>f|±ÊЯ|qu·[582qštÜј£ž¬ZxRaÑÀr¹§^þåZÛ\7›¾ZÃÊåËëéâ…|ºx.…1?qÊ/7Qûmš7oâ!¥5º­²H!k:‡ çý¶%Up|ÓO5øåÅ À"|¾Æ:°;û®ÓٌÇ›åêÈÎÙÍG4ù™"ȳœÐõD1(%£D2 …R @i( ¶¢a(´†¢´|ó f:FSÒ’£“C“†¦ýKÄéÉkîyY…oÝ\ZJW†™Ô^› ,ïì¼S{*ûöãšÁ3^œ54§µ³½úº%kŸ©¼kqZûTgBI§³­]í7i¿¾sbnfñúÎëÖÜIpÜ$/S)Z¸ãlÐ(ã9Kݬ¶í9PŽÞnÜ}åZõ~q¸ûô¨#/Zìÿè1ùÞ†>ª÷:“ñ{þã΋ª/ð•³FGoÞ@õ}Ðq]ýˆZ÷E«Â¹1 Oä5ššýÞöL:×[÷‰ÖêúÃÒ©Œ|þhøÚµšÇßS/Ëœ¾2hkÅo£¹ ÚGYW¿Ê w¸7ëBÛ„¤šó‡{LvÊO§ øtª‰q%ŠtŠ…]âŒÿ±àÿÝ|œR£+æ äµ›ú¡ôÛ  güú ­P¦ÊxGE[ÈIìÄüè†5 ûÂ)óŒöµXãðX)(þYÛ½§~ÀfÁA¼¶\ºòáYêe½¨Xa=ö1âÊ/O¾1ìý*Ѫ'GܬvØ%Ÿ3ðúõ Çõ:._èèótöŒÑ/:Þ­ºÔjw™e0+ƒ][ÿ1jû†Ñ/™~ySÝ3³Lìvúo‘Ý\|vÖQŸÝ¦I¹•ËE]K.zŽ5zpUsÁÎnLeZ”¥žÿƒ{Ý£GLÉ>¹roØÍW;ÞW¾^\Ÿ²D¤²zî/©ô{Ÿ{Å﮼½µ aä“× JóÊÌã»ÅÇÆœJ;±á쳬¦kïÃg?-OÙëå}6HW)°^U×q¿IÛ-Qè×mMVÂeŒq¼õ§9žOc¹0o§÷5/¿Ò.ùZµ½b¶ªRÄ K#Ž#ô?ÿÿPK!a‚„¹‰nl 4Resources/416B13FD-432A-47C2-AF64-3F7539173759.odttfìœ \ÔÕÚøŸóûÍÂlÌ Ë00Ì00ÌÃ&¸0" ŠÂ¸‚Šák¦©äR¦ÕÍŒ4Ûl/mï^3‡q ÓÌ̬›Yݲ[ÙfûjÙm»i̼Ïù=3¦Õííïû~þxæ{Îs¶çjج7ÆÔüÓr^QYõñ“ߟGˆ_7¶îƒFv#0Õ(`·¾=¼Î[.Ê3N€po@Õá±u9ù?i¶™ØkÐ4}Nó¼ÆÇ&®ÈGlþô ÚsFŽðPDÌœwΜ»>+ h5€*úœæóÀ ìߎõ 眻dfë•‹ª&V̾³µ¥yÆ|ˆíOÂü¢VTèÖh¾Æô ˜Nm³pñ{óÒ–¢ÁÅ9Gf·Ì?/aK–ÿ°?ŽgÞ¹s§7+G~y`ÿ¶1sšÏK”™ÞÂúXß~^󜖷«Æ]ðÙ½ºIóæ.X´ÀJ´xþ¼ù-óž>¶Ð P¶ öv`¨•wŽ7ŸwɵSõƒ¾ƒø^v~~Ñsœo]tâp×Õʧ°¬  €õ¶O½áÄáã+U_H-õÏrÞ7á4,k šp–¦c¿抲‘Â.Ìß"/À&mDñExT€ôJA”ÉDAv„  R¿£ëìv@ÿž‘ Ê;—Øzž'î‘Gò‘bë‘'­a/àì½qð¹ÖôL‹÷NÿO‚ò¯·%k¢:â´Ó×U`¼ò³±»ßKNñÃ3Pvºrâ÷ í™–—Àê?Ú–3ÙpPÿžzâ˜pÚö®å{ªG¹µ½Ógl¯VÊn‡†ŸµwûÉú‚á—ÛÂ|óÏêË©ŽðÓéë*ª±ß§OŸ'; Þ_³ûLAæ<ÅsaØéʉ‚¥W½‡àO¿·Ï^íͯ–ù†ÿ®¶¡útzå2¨VF@µ"’òe5PÓ3_¦„‘¿¥}aÄw×yâ{!^¥‚xÙÜ“ú_ Ší¿­\¯:£ñ„_÷ó>x[rÓIr ÄãÚ·œZÿÔ±†t‡ãì˜ýk6`™‹O§_íÕÎiË(.…‹{ö÷3[FŸ~Î~K^ëÝ®˜#NWN~¨·^Øßû¹"7@œló¯?kx¹â”í(é¿^ž—Á±/ùµr¿%ˆÏ‚é_)/<E+ XøJ…§¡”½‰Âí`NÀ¶ÆJù{0~L „Q¾ƒ’î6Ó¥0ˆÇz'zŸ«Âýì³ùkÀu ì½ÿ´}¡/ô…¾@A¸ >:cÞ,xá´úBØ 8`Ùÿ;«zôµrùwôõ[ƒxéóî }¡/ô…¾ð7ˆÑ'#ΆÅÂ#°¸g>óQZøóÎŲ[a±x]ï2¢óVá½Ê6q1œ÷ï±¼/ô…¾ÐúB_è }¡/ô…¾ÐúÂÿ¶ÐóŽ)¥ç=SªËïš}÷̾ÐúB_è }¡/ô…¾ÐúÂÿ­ †$‘þ.€ÂÆÄr±\TdÒo:ê ÜP C¡FÀðB3Ì‚¹ÐK`lbyÖ,kžµÐZjj7Ø—ŸƒR:l![ªWõj`<Ö›³a~z¹Xo€µLªX¿“Œ³ŸÒïÖÜE³1ÁéÂSPøùá¯÷§½Û ¡¿k€|ú-Kè/I)~‘ØçéC9ïD)Þ$Îð~˜ƒ°|ŽpLÐÊ ,ÙX:Ç&°Éì\6—µ± Ø2¶š]ÃneÛX&s³á¬˜Õ€‚}/µùý©Çi!ôWür š’E§,nåiƒxv¯¤Lúä㡃…ÐøÎ`ÚÙ{ä˜î»T"4þPù§e\ÿù þ¶b|6{£lfß.ùw xª¦N™W“OærTWgó´£Í=M>;ªªz—ñÙ›¤böÞ%=Xræ)%=TÒÓ]’ìƒ`Pv–½Òa÷¬pØ;Ù„ÚŒ¯©p4Ú}G¥øh).sI &’“±†½ÒÜZa÷±&{¥¯ê‚Ööʦ l¯C£æÖ¢Î΂µ£ŒùÒó:Xú&E„ôÊÒ"t¼[Ÿè¬lžáWÛPYaINn”t0Lj˧æSJmÙgq›á*{GÖžöÕ˜Ö”©á˜Ñ<©Á'6c¥v±²½ý Ÿ1Ó—á¨ðe,ýÀŒCnñe9**}™l¬f|wÌ'wööïwý¢·¦9¤Q8 ßò!v» óÃq@ÛÐB_r2·åªNLÄoEm¥í0ÍâONf£Ohâ9{Â9±^ž³"œÓ]½É‘̧ª²)ô}A«Ù·bš=; ½/};ñóí>ÑÕ4mz+gsK»£¢‚üVßàóT`ÄÓkeGn–onÂAÌân¨mðå8æùbåTv>³ê¤*¡j¾˜a>hšªåË©¬àvÙ+Û›*È@Þ–£¶atô·[¶àÆkävøLÃpR\•í 3fú’š,3p}δ7X’}žFt_££¡¥‘Ï’ÃàË8‚Ý%K=Jµpl§”æ#W:#ì ‚Elä³… {~8Êa†§KJò-do`Ã^B%x¬W;˜êy–È««¶$7&Sø“,!›äN_D¶ ¨è¶‰ú9£iTš”a¯l©èa`¯Få!C­ÞNû"Ô1ÖˆàÓYθsQ'`3’ŠÏ¢ÙîƒqöG‹£ÑkÈ3®ûZšßš:GMí„i¶C«¤¾WŠò‹)åƒdÌ'„a¸«2-ái•ÒÃ¥tw²ú”ìál{{„£¦®7î5vÜA8h…kDóUÅQýqkVá鿍jvàs£ª½¹3¸bZ{‡ÇÓ>¯²©µ”·á1£ÝQ×0È"Ù:¾a™e)ï* jXM}yvž=嶪¶ÃÃVÕMhØa°¯ªoð LÖTÞØ‘Šy ;ìx¶KZk¹’'ì<Á[‰©¼e‡`…”+“Rzz'IÖ1˜Þ)ÎÖ ¨“‘Î#éxÀI2·¢‹ñ¸­´ÏàÓsQck{S#ß\`©ÄoæcŽ!àC:˜ ÐúÔŽ–rŸÆQÎõe\_Fz×+qa0Cçð3©½Éç.¨°0ZŠ"oÒÞ Ö7$´mLÆ¥6 eBƒO•‰g¿Ü9Ë çÒ„êá¾Ó›¹àmàu•ÎÓqÙ†Ä"#|*lAjKTIuørÄJÓqnp¥ú+0á[ÑèkÌä6Ìj”–³ÁÕŽRœvjSîâå4¶G9ò¥½‰[Aí¼‚C…¶A]i,˜ÄÎÉIJ-Z>ÝYÓ›ìèmL¯Ã¥Ng©ÚBš<e®IÔ–P&ða‰NNíS¹±Aüæq›oI¹SÙØHÆK©+B°oƒOƒ¹z¸2T½ƒY#¸-ø}šÊ‹>Á›©í„ñŽÅx²p£¥–”˜íÓ9G4ãáOõ5¨q‡+Gð3Bjci•|äZô»è¬ï >àX’Ü#dg9øÃ/L°ìÀ… í§*|3³³"NÕê$u{{„îôÈ_ºn¢:Tb§ð£ßfMêþé·e"~ð۲߾#|KyßPꄯ Ç_¾¤’G _òsÂg„O Ÿ>&|DøðߦB¼O©÷ïú­Qˆ#~k<â¿5ñ6á-›„7¨ÈaJ½Nxð*áï„W‡/^"üð"áÂódÄAÂs„„g©Û¿RÉgOöž"ì#'|Fø”ð ácêï#¿Éøðß„ Œ½OxÏo*F¼K8â7 C¼ã7U Þ&¼ExÓoªD¼á7U!^'¼FM¿Jø;5ö 5vˆð2á%jìoTïE „ç  ÏP½g©é¿ž!ãŸ&ì§þžò›Êû¨Â“ÔÑ^²ú jláqÂnÂc„]„„G©éÔt'5ý5½°°•:ÚBð:¨[a3áajzá!ÂFÂ_öÇâ¹ËôÇE<@¸ß;qŸ?v â^ìXÄ=þØñˆ»ý±Ä]TdYOEî¤"wPÞíTò6JÝJ%o!ÜLn"Üè‡XGÕo \O¸ŽLº–J^C%×®öÇÖ"ÖPÉÕ„«íþ˜Ä•þ˜FÄ*Ì$Äþ˜Éˆ•þ˜‘ˆËý1¢¼Ë¨ä¥TäÏfä1}eÒW‘ÕIG´c’ö¢<²åqÍYI~”Êf”‡Q6¡<„²å/(Fyå”ûQîC¹å”»QîBÙ€²åNukÒ­(· ÜŒrÊ(ëPn@¹å:”kQ®Qµ&­E¹e Êj”¡*á'á8œI d+$±åþh¾/öGñ¥µ°ÀoäKk>á|Â<Â\Ây„9„s ³ ÿEDè7p”JÅ„„"B!¡?¡€ï×óušGÈ%DŒAOˆ$èü8)LKÐÔ!‚ ôëøT+<‘_¢Eùås”ÏP>Åé|åm”·PÞDyå0Êë8-¯¡¼Š²å1”](;QE¹§âv”N¶‚<½ÔoäK~ 9g1aáBa¡œü0”à!”†Óc 1„hŽ¢( ~OÒ½»E¶¢ìCE [.$ÔѬ'Ëj ãc c£ £5„‘„„jÂpB¡’PAH!$“ñvBÁF° B!ž`¦aÆLžÛ](?¡œ@9Žò#Nð?Q~@ùå;”oQ¾ÁYýÊ×(£|„ò!Ê(‡ò.ÎîA”çP <‹òW”gPžFÙòÊ>”'Q:QÁߎ² e+Ê”Ûøì ]äãe„‹³üF|b­„sÈ-3 -„„é„i„fBa*a a2aa"a¡‘Ð@8›pÁK¨'äÜäêlB!“ÐAH'¤\'ÍM*ÁAd‘ íHðÜ ¢P>AÇþå”C(/£¼„ò7”Q^@y½årÑ™ô'Ñts']Z½Â{ÉÆÞåÕ˼o\æÕ,¸¬f™¨YfA\¸lã²7–).ª^ê½pãR¯liÌRA½¤z‘wñÆE^Í"¦½ ºÍ[ßöAÛ·mbL[}ÛŒ¶…m7´B…òÞ¶­mûÚÄÎàOT[ñÀªm×´ 1˜/@Ósur›&²jaõ|ï‚ó½²ùýç ¿ÏŽÌgBî|6n~Ó|Km™Ÿš^ÅKÎ7%TæçÎ÷Ìϯžë·q®wìܹs—Ï]?÷ñ¹òås×Î6cLðÌUéªÎ«žã}gƒ]B ({„ _TÏÝ)€ÁWBÀd³Ñÿ…Ž˜å>ÇÛºñïL÷ oËÆÞéîiÞfw“wª{²wÊÆÉÞIî Þ‰'xÝ Þ³±üYîz¯wc½·Î]뿱Ö;Ö=Æ;õ£Ý5ÞQk¼#ÝÕÞ«½ãªÙpw•·R,JÂ'Øð{žm…í˜M¦i²Î³ ó¬G¬Ç¬â¼Äc‰Âr Ó',OX› êñC ø¤øµñëã7ÇËõRDÔ΋Z%Ì3®0 ¹FñE㣠ŒŒ‚~­~½~³^«ŸªÿJÔË6ëÙæÈÇ#_ˆÇFNœ)ê#yZ4x"ÝyUz]’Î3è?l­8g”§:al‡G;p6wÂ.x vã<îÁ™Ý+é¸&œ>sIú|öÁS°ž†g௸2Àspž‡~WÎSÝžzþ/áZ;¯ÀßáUxÞ€·á8ïáªûâgù¯a‰ÃXæ­P©w±Ô‡ð)–<Š%©•ySÊýDjáÖ=°øŽ p‚ã³w£4C·HóÈgÏν’Ÿù|lÆ4Ÿ¡ºçfúxÎ'Oñø­¡ÙxËv Ãþ;½×žÍù{–á¾à9C¾x:4¼ÝÝuHy~©ÞÞîVOz”FøJï¼ÙÇÂG’gÈ{”{Ò{¼ÄX†{™·ÑÛ·ïa]ò>¯Ëõ=ëð¼Ã˜þO‡/ÐÓœŸK3ñ9|Üÿ8”¾„¯à;éó|çÉ7ð-¦¿GÍ1Lý\{ªæüú'üÇq‚®©®Srº €s Œ1‰8;©•D†¯ <Ó"˜Š©™–éX$Ó㫈ò”MwŽñg9ÚÓä©$M‹f1x^Æ13K`<7­ÌÆ’X2Ké‘ßcÇKeÎPžIªß]7 KÄõ(›ÁrÙ"ü俇”ƒñ<ÖŸ²¬5Ù˜ÎÇt)æåJ,‡q0 Î…ãòO„ç°ýgÊäóÁü‚eWìÛÇÌû¦L¦h^.¾¤Zz›±Gþ'½ååff6:M&š·41Y):R\®¢Œ&+Né“eZ…©8¯ Ä¦•H/ÓY 3ÝýcZ¶Vap )X•fTìe°¹ÓRûÅÊE•AÇd]‘Ñ™"®ŸCv‘1V#ŠSôþ®ÃèÝ52þ¿vGAœOÞ}¢…Ûð1 \*0‡†hÆ[³GYk1ó”…ߨ=òz šžYv4“ÑD§üÖy¹|¡:’S\…ÆþEÉ8Dy·àpùz•í™üð$gg'³Q›¾¾ï¬À±Ì©ë–\~å¹7LÏnõwm¨IË’µf¥Õ®ÿìžIw.úÓ5Åç?ˆ·E“¸Ç”>QGBZ§pG¯Š¶GÛqL fZ”ð(¾c¹‚Ÿl×±Ñ.—"¾3dw¼d·®6M²;ÿ´À£èa7NY&oNTIINŽOœeûÑ$:ÄyªCb%…ñ”(O­Wu]À}#¬TEªåru¤*Ï®Péy\¯ ,a/ñø9¸-5ä&u|š 7§&°O‡ÛÕ§\¯1§ñßì\<ÎÖá‹…~á ÛVZ!±üç]=VË9( ñŒz/ðथRËAݵ99;4» òól-.Œ›Âórâ+M|Íâ|Ü=ƒàu²Î£Ñ忯åä¨ÝfsB§0ckjžV«ÆÈ#ZT¯Õ˜w²lð€;xl«Á!ŒÊë óØy,ÎÀ?uô—“›çV$¥×&y»A~ òÛ?þòóùœÍ7ø‡±dpNA±‡½íí¥×Òu0~ÈâqË=VbâyË øò|©8_cÍu¦æ&j…À•²¨¤Ü””ܤ(1p£ ±å Þª)Ê~È]žk×2³Œ¥è’2Š–´ø;Àzâ\ ¢œ¯‘Äïwë/)(Ò;JúýÔ%²~¥©úH¬Þ#ò( Ûh¶§éÕn½>†ÿk´ÍØ ¶âñÜQz—0*#Ý¢5ð˜V£Ðw²eàžO©÷ºùh»W‹´1ŽKJ2ñéS’I^GŸçÉÝþ? Í°Éµ¸÷&SìÏmã \=–¬¬Ó`qFÏsd¦Çv'–Æ 2™ÆâNu¸ÔÒ׸úg¤FÿdÊLwE1QÔ&ºSSÜñêIq©fM¤³,_˜\´l`õÚQ]Õ´Õ²«rrt¶Â´@Zf]ݸôª›+…©jƒV.×âA$H>k½*àòòVƒÛ˜¡Þ)ìÇ'àá6F™Qú½·!|˜:™s‹Ç78¬ÜÉ2¶{’kã ŽoI~2e–àS1ÿ>¹Wе¿¯•+6Mt‹ŽÞK59ßgùÓA‰îŒ3™XWšË~ŒŽŽ°•æ÷Ë·je cÓó<ýƇÎh->VÇ”[Æ,;Ûì™2ÈZ=G¯l*-)Ⱦ`eq}qbŠF¯Æ0jYrÞ¨‚„@t÷ª½)+M&jŠÎ^4zèìú!Ñ‘é%#ÜA—Cœáiˆ’+×Zò*ø*. ~Š+'Œ€á³n¨pÓ¶ÔüÔ|­…ÿ¾hÝ|c5ËÞn€_¦Aa— êdÙíP‹<£Î${&þC~ü¬ð±Ç]¦‘Æ£|!KÏd~Vî÷Ôlø=%Å- ¿&Óû´[J+bCóÁ_°ccl qõ¨Kž>lAÃÀ ÑãæŽÈU˜˜;zZë´Ñ¹•mëÝ“Æ ‰QÊQ©Óhr«& ÈôdÆæŒÑ:cL.ûÓÌ[ÏéoJJIÈs'õKÐ$§'ÇõâÊ*ËËÌì]X;yÍdw¤ÙçH°¦'h“-±ÎþÖLÊ_€~׋ŸáÊNoè [ÌFETØQlâVµV+­7>ò|–³¯ë _¨¿XªûÍíä:L_"¤gÎgÒ+È.þÄáOÐÀ.5½¢¨ÅkøK‰ìnkF¼öÄÑîŭϰÚúÅk4ñýøªYüT¶ Ÿ™p6Y¿ ìÂ5¸#MÂõ­Ú5Þ0¾û­rRÏ™+ ¿†z4¿PèäŒö|ˆ ÍëÉÃhSÕªg.]ºwåpmn|tº†Ov°ûNr†«Dì©W‰lÜP¡£2~.a•‘*™LØÉ.C•¼Ù‚·s²Yer%ZRãÔ`Ä’à4©Uœ“ïÜ•xî¨ÑztÈñÉyÇ#‰-r\ [ŒÆ8Y'+ÜbŸÇµôúŽ©}Ʋ™Å(z[xÊsNTŒ»Xš&—sÓváKº w¦O4Ä' ÝuœÓÂM \ª¦bjq—+5›[×üLf“ Â×È[l6½™ÿ&'¤ëw p—±(ƒƒ©¶ÇËñ+WÍ«£tfL'Ô‘;+ääîG ®]Ü|9¡UÐk½ (tœ<ù{BIo™á5.³ÈU…±`Ìy555æçžµxxR¹e§½Œ³¡dKmɱ&G}ã”앯¬WÛë—Z2a^Ü/IJ‹ã 8wŠڳ.mÈÒé«cSRcUéÉ1ñN¥ÎdPU·¸ä²—®hÉÍŠÌ„gOôïphù¯¸Æ¥jpr¶B\¿m'›ãQ¥¦žrØt¿†–ó§¹B%Ÿ<0Mx0:ùtáÄH1>AN~{ºRŠá{G’š–šÝh ÇÅ»o±+ÙÒpøÛƳg‚•;¸|ˇ:<ÊH°®g½ÕN$vÚ¥¸VQܱff¨>|O«ÀÔ5L r%ÖÃTIÇG#Ë®†a éÞžô†Ùš7]E;Ša¨Ìr»£&YŒý;ÃÌÈ~âëwb(†¢2SÈí ›dƒ6„¾2ðh¯}€+Ù«XëÅÈ´6]uëècœglbÌ‹¾T/$߸XÍSÀjj?ô:ì/ÂØ±g1©ÜírCÜ´Ì7¶–yרâÑE§JþÍÝwýðÞõƒàþŽ—ïçªïYºgË»{,–î]ƒC{ŠVÌuïÏ+îþûÇïú»G+Ýw¿úäØ'¶$²Ów¬ßxÏ–xvúÐo}}HWØô¾ïåüæ|RV·Áí l§š:kX½€Jæ:; ùT~R ï~j) ãVõ¯fÕÔµžd5|=þí숆ۜ ¼¢°ùâ¾!^Ó6à•Ð 3ŸÙÛani3…|nÕFRZýš-dŽÞšî éµ’ÀE !ýu Ïjªoò<ëus†3›Kí*ÒíòÿƒÕ†ý5áÑUÿÎ×e­ÿÊÿÆC€•adü{HvÇY¶mSØàÆ D‘8ÂN Â/mÜŒÝ (uÖÖO„waÐ UËÙ—gO5öÄל<9Õ~ãX^+c¸”&éxi{·¯#dômØ´¡7йçÓc±ëR* ãJF…ºÆ®´WìßxÃÆ¾ Ú òиÊdÓ(õÆ0’V·EåˆXÝI¿+.íì:<RèM*…Ám2»tRƒÙ ²úw‚uûS¥ …í@œˆã4"îmŽQŠ@ž³ì"ùx£žßÀ8£…]Ï¢äe»ZuºÒ&¿"•CFäR“ÒÀØþ ýàåK]Bßö,üàûïzÚF¼0_¹ƒÏW>q–dgT3–¦Šô,U‘µR@÷±ïÞ¶ÿ;Ǻh[Ê«öüh,VÉZ){‚ Æmúô‘/ÝÒ‘Þýä]ؾºí½ü—“²[vd›©?ÖG|^æ3ø÷vë9m†û9¼Fè È73F±fF ¡Ò@ët9ÿæ%Õ›|c©±V~f2-æ52 ¶Ox«¼zQ+ײ±¬CNü¤ép¦COkÐ{«_l8þ=X¯7 #p©’®[)Å ]Ðô¹tå]ü(þ ¨ÏhPÈýÎÈ @·Ì#~?Ò±€­/ªÔ¸ý5,Ðmèmhœ6“Ñr´ÜÖë - Æ¢å—nÿ˜û!7Vt¹·»q¥ÛáÆh‘Û-²-\ùeQAƒ¼ÐfT¡Ûû±!Xƒ)ÊÀƒ®·‹tE„ãõÂ|XèÏLMMOÁì+ž:xiê ð"±ÂšNQùÿy5|uºA–mo¯5ý ü¤Ûk6·öŒˆ—(‰ ³ Sñ£ºp(Tgº®tìúD×íóÇ®Wû{=;Ëi_Ú¶l;ÐyÓÛ#ØÞu]ÆTêi¿!æP¨$•¢ÔÙç¼…94ìÍ„zB:«Ûª0³‡×æ±kƒïÝú?4Þ´+WÌðÖŠÖÊ…¿ÂìZíŒñ¿€F ¿r€¤«ÞJó‘Yíèû(‡$’…V’>À¹Û¢¬Âçñ—ï‡A~zœ‹)¾âóç~’Pg·ø-`éÄ‚¡/ÊE]8!1v ]ÛóÔ-Ùþã_»1Péogd®S©Ù6.uã^sº’nαr-=kö•—YUüØüá{_þD·Âhg”F©#`ûücÜ­C>ë -¡Vq9‚šÛ3=¾ ";ŽX°é9¿Z÷6HÍ?ŒL#aÔV¤”Úþ½£çw©]ÜÆóàjËH (’›+ˆw—°ýT9ñÆÆ—_¿Ô“†ÿÞºÁÔ[¯óUJ ë‚z·F üõKšO°lÍð‹V†G¿DÆS€׋¾ÕwïЖUÜ´5éõ%­´†Í±É™úC™•jŒ1VÈàuj•;µ>YÃr¨Ý °”ŠpBÊä¯ã‘/î»g½Ê­°3‡ÎœÈnî ©ñMÅžÂÞOí¼ü&)0$z¹w¨Ý6Ðù»õgD`¨)”wÄ:ýJÆc鈛f»ÏN™Ã.³Ç d\Fž­SÏÏ„©é=t]’ iZ`H| 0t ùäÜu#Å C¶È~ÛŽÌ 4à‡AvcçÎÍ2à6BžÇžÎ ‰>72C7‚T°¶­äù÷`ìw®Ind­É g+ê2Q†áI“%HZ)ÁY_N½­j¶Ržñg0´´%&¾DÙÒ@›K#®¾±„& Û¤iÇM‚&T&ѹ’|;J¥¨¾ÆhÚ‚M¦7èÕÀRªBEö£PõÁèNZÃ¥tk«ÿ½ÕÙþˆ7ˆƒÈÈóȱ›Fñlë<—U€ädºH¥»Ò£àvLÇn^ÀÉcå?L\ÿÞÐÜ~ÈÓ.d˜»­’‘”cNÑÅYá¶€h¥µž–ðQpOúRªA _,à©ã{[ªW@šxQ U­;¦××0‡q ÓB“¨¢°‹ú5s‹~`2´í}rϮǦc qÕi_ŽuêœFDLJE”ÚËÛË·rî]Z„|§Ö—÷yr~½Á+#0JåN¬K.±g­Ö¯¸ï ?gêôœLÄ7ßsÝiزñêÁ©A‰L"Ñ{­‘„ZAKØÑã»Ñ³ñ¬-` Û¢ë# ãÏ{ÂÝ^¥Zµ‚%tµÚL@mN ëtà >x•ذ º}¢æI(Kþ<¶ (X»­Hj]TÞo)Bõ 6ðÁƒE™q¨·ýmàÑ|QQJV«gÃ<Ÿj \ºì£~Fko±ÕkÄtxC9yʲø«¤1hwLÔúÏoÝýÐ ôMŸ(À†£/a¥ßÏìÌ$Ka½&¸®ÍœLgœBSˆôΡ‰Ñ{çv{á^®«ýu½éu¹m—œ˜iÏí›L)ÝÙÄmàvÄUa¤ %Üæ´ZWî¡ ·` çÂ#Úf‰¼,‚!ŒAŽV‘J„•ÇDÛEØÓ¢gE˜HdDæ”hÞà5ñ·Ù!ã¿! •Sã ™‘F+2#xìEkÝÁ†_aË¥Z3upÛTøÒ¶)˜x½ øÿÛïæ;bkUµýž' ~.è½ü+KçToß®Á„7Iå›÷›;ÞÙ}ôûfŸÚø=¾e:QŠ›0ôýX$?ÕëÖ´ËÄ8¥ÂhPN|ÿcÇ^<5ÐwäémÎ}·{»&ãÀ™®¼}x’r¨Æ £B,ÐÑ'B>¸‰¹LÉÌÖ¥ç\1Á9Ë*®Ñ#LA7~1}ùbú"?C^ã›Zº ¼<¶Z ffÔ0;Båû‚HJ‚XÀä6Xüfú«2Þ |•¶¦¼Þ¤šÕj ðÔo娏 ãý÷l­D"•¨}á Á0\ŽÕí;ö3Á oy`KL®”›ü&¢$N ;-ó¥’{Ò 7«ÇhÚfrƒ[ãÖ ùtL À™ß\šäFá=&.ô¹<,[Ë4ÇW.¥R0æáñ¹ pš¯·Ôê¶ ã¹Ò•»VAè¶6ßìj>-úG¹`ãÔw¤2¡×|­î1«gi[rF¾Ê‘±È€‰ wiŒ.]G f+GÆÃ%¥”ŠD¿OÄR17¹q9lË!ìÛ|ÿ–˜|–ÉoK‚÷I'K£[îߟ¯0\Ń@Öö#»æÓéìŒ:¿Ùnï§ Àû£Ypw®RêŸÑš@Ö\™ß;4=à‡"8YÊçæ(’®«åLµâËÃˇ'¯¥…: ĘWjßê¤Xüá¤ÎP IÔµØT<ÈÚ°S ³u”E´„ôÆhÁ£ø¬àìž¿óµâ¸þÔ6Kw.lTà¨Ì” zÁûúîÜzGÅí^#h¼W 0Å5¾BpU)®l~`KT$‘Éh™ ¸;h‹«Z!Eü¥¹~ydþþûw~vÀûììädwåz¨ð;ŸØ òÜíEY7ݽÜfÃljóŸå2þ‰]×ÏB”'¸}å©r…3˜óe_9É2©JàU§‰çó¡~S ?µø! ŸÃ ʰ Ðk$WáðCèö¯Až’lÄ(¡RK2àKØèÞûù<Á–ò_žMÜØNóNщ–y"­|‚T@Uû\‹ª-1G+«šH Õð%•SKùZ;{†«ÙÎàGÖL蓡ÓP¢Êôä9"ñe¯†¯_šR]ªs \*ˆ8º¼‹_3‹Ò]=l]‰p¹3 æ\r¹+ frm+Ê‹ËW><ÊDvJB`”J¬Ô[õí ô}–ýÄ—vÈ厴ϛr*ÎÔŸÚÖ‹·ZÀÍP ÆcNøEb˜@—W@L<Ì#vòÉù±±èqˆÓ|d*r ²€]8GFÀ-ÏŸqrÇÖ(ô²þ®üq®†ÚAô†š´³´•Ûˆ:óÐmôsérІۀ‰ñTÖzòõS^w4­­¿51^nÑ nd9âa¹+ f] …+ e]€ƒšTç¯"óëٚț\º<ô.€"}ÜߤȦË$Ð?±þk¦hñV(–ù|P ø ÈÑùuëâݬel@ô o#^`ã7Ç% sVÇÁmƒg{nÞ´mÓ†Ô‚]%n´êmÜH¹› •Å^Ú^¦‘zG¥æ“Z¬oë.§.5,ÝJcŸúRèà£ðCЗ $œõ±O5ÌmãMÙR|-ifÐ8%¥¼‘°~±§ZL!喙:B5OEÌB õÁoWÈiiJR‚¥Éó‡wY5/u;бÏ!ÿå{È)ìÜÙÏLOwÞ\€öˆ ‡_úªÎ[:?˜»¡ Çbng:Á#]E™(s÷PăƒwÂc6ló·•næöÀ6 â$žàúÊíe§n„ ¥ëé©…Mwè[ì°Vk¯~dŸ´²*6Ýáy‘Þ ¦]ZqõueŒ’>ÑkvI¾ÅIðƒyp³àQ©ˆìœË•J(N4åZ‘íä•ä­j[Ùüà–ô‡4]÷‡+J› %øo€!ýó‡g€„!ä˜ÉÅ$ŸŽh¡Âö”< ÜÄuëÚðU¯×”Ò÷gG†øoÖV¬BÀ¦bñ! ûÏPˆT-Âç€îCn-Ê&'q‡ƒ0ÙöSÐ1›NÀ'Š…Ûxæw—¦¹-ð‡ò@ÂSàãì.SnA¬© Ø„8€§Ö|(?² ˆsЋ”‘Þÿ9!xK¼çþäÑåÏÎ?ƒ¼ò82ƒLŸ.Á耞ñx¶™z`SvQÑ# h©HNWŠ\šëè`¢ki¡aµáÄe¤Æ¾§Gð5€’‹M}ŽiM”[snW£Üp• úÍe9vùè¸Ø£â0%«M.8G'„ÜÈF׫}ÑB­Ú'!(­;ž±ÂjöûU²pÁ“·&í?"UA T«ëM 6ëz%%fGO ?–°@þA>5ßÝm…Œ³þ­[å·(`œf5ß~7Ä]/ß/7ƒ›ÿãH2ì¿»…;t(¹"½±4Âa;›¸Û¢ðÃÒE’s•uåû-§%>·éáçøkZÛ´X—&7 ÃkËV¢èÃ1'a!ÖYë0ÀºúÝÕõVJ‚œVJZ +è°¯|t‚ðCz% ×èb¬ð”Mø¬VzMj¾˜{¢•µµ¦¹´¦…ëReË[£r…°Y=Z`Å*_!´qu@pÄR}ÿ þs¤A¦Q¬¶kdT™à9ÏPzèå!Ü1„ýêÇ4j¤QúÇ“¨}5N¢“¿}Mô(¢Wé1¥^¿=‡ÿ±À…œ‘¾ }Ò‡ö½–RnAUø–W‹ÎQazwzÛTÏ¥©)ÚòPØ §Þàï4¾z»±õ›©!ôê_ÞüîBß«}˜¨U®ùýÛš+X´a|iÑS*Y¿„ôŒ¡6£_ϲ°öŸÉÖ;Œ„úhÛèÎvcÚ6ÖïWàµGøWÕMŒ¶mÇÂ#zZ›ŽýCùØx¸ãðwÜö{âjWÂŽgžPöÆû'BjQë«Ï úr>ÍX‰Íù´\Ϝ١ÏlÍ$tøöDÌØå¹}2¬WȽŒÍ‡Iq_ÿ¶Bß‘ëRÞâ í®B6e0ŒÆ;wø=7ŽœÜ%e‘ê¹1S8ïX7j e/_M`„Öã´«Rm6Î×ç,¼Šÿé‘Áô™”}lÛ6(È,1Ë6d"7˜ê³‹<½ðà¤èÐðº¾HzÊä¿é´^-¦]¸òËç4zNkü#1 §…Ã/ñ£—†|:nm½ûVšRi_4i‰Zº¼ìÞ{û_ÝÒyÓd»tÅ´„Žp3ý2_oïz½( pAÊp8‚FrY-><ûåíJ£“« ½ÕK4 “Ï_çN9”#§žÝqäÂ=%•·#4]WÀê[ëJÉñ]m¹}ã)¥;Ãï¿»DS?#f‘²¿¾K‚ñT*¤Ü=djÝ6R)ÊŠÑ!ï_†ã÷7 ;E„A&¸çÚ^¿x ßÒòNc&¥V ÂV·aZï¢JLý¾V¯Y£„FxêŠfU Cn¾ò>ú1‚è²¾¾Á^D¬|VH"ôäÙ¢I5(¬þ °øæ^Óå¿[qc¢F6Pß`?ìÄÒ•k»7lììÚ¸¡ÐX;~„»`¥à*åŽÜ`¹3/°„žÀ_©O¢nŸ'ù/^}uÙ75¿àŽúO5öÏöÛš»!“àÊÝ þevn.eøÜJQD7E­ê|¾Ô²òm~ÿÃJ/kÝHt »!ñóµ4$®¿Xz-0/q%A^â A^ò'4ò’•Z¸MÖWË%x\Áõ둞šïPÊõ(E¡‰Ê”Ðl;ÜŒ: \Jm3*? 3e™«?½ò–ÔÕ9h.LXƒXìÖò­Ú~œƒ€ÐnO ©M·ÿ<`#…¨ZëÌðw¡9mRôôuDsƒÑ²©÷–MÒy¸{Üñâûg}ØUôw5…Öׯ·êq½Œ¶ÂÑX¥ö´û¢[3|Áà¤vg¼±­ 5'ÍA‡3d ‡ËnZŸR*ÃÃþN ;xbêè…_þLSî÷ŒÂ_¸Û¯-ìy°Ò°‚€ƒrWƒ‚nç!bFí7sZá]7n0n!“w°‘F@(Ìc7€þ0ï¼6˨¿šel@öÅÉ«XÆE°8v»È]yW$hÀ©ÛÆÎ|v„Ÿ½=go››ËÍE™rÈcŽ"@­gŠDe¥ù×úŽÖýQ«ÍïŠ 'N{öp®ëÄs'?{(W½¬OMöä€ûd’ºó2fôÝÛ.Ü?ÔwçÂÑÛž¿o¨÷Î…»úLÄ‚£Jà>9 pŽççýfkœ³JØ¡³’tq—ã$lûöÈt²HÃC¬RïÔóœÕõaö“/ÖØ&¯þú%ÍÏ•èåDŒIå¤Tg²kô¡( y ¹žî\Î*·;!ÂðaoÌLÂXÚ[ˆ\~}9½R½¬—ÈHZW?xå]ì=põƒÈ»ÍÝ‘±ÆîÈuEàD14öv˜Bòu¶…8ëÌb8¿¥QY@ p«®…ßÖø6ÜÒ8RX9ZFT%bÞkÐ ð©íkœâ'~§§Â*Ø7˜Z´i²èüOþ¶°—{/¿÷áÉÔ.ÁÐ")-£ÂÅw»_ç몌Wº|©m÷m#Z©Ç%´TÆæ‡î”SÅvŽv³¨½|xį4õшͣ—˜ìf…9`¶‡Vw¤¸¹§xs9DkôJ¥Þa°¸u½Q¯0{tŽÓêŠoX"¾LDC>÷"’ÃbÈ ²[‡ô"³Xÿ¼7¨=yŠÏi•&åþÞ™^­R©íUîB*'á¡Ö¢õÈ@në¾ÿ;±áw&bàv}úmvßÐõï TN)ᢉ{f·2>»åËcéæ\6Ü:ÌW~@ŠkÏÁs'„9¢· }S ¡‡xõ1!l)¢ú5h[%µ%¾Œ‰¥Jw Jž›4z‚RÊöjýyŸ§#Ș¬2\JAÊ­4¬MbûÆ[²:·Òdl¿éK»w>¶=¾RrkuëåŠFz[#ZeôlÆ͙ۂ+ð×µ6ûý7q>B¤ëg‹·NÄZg—š .ÕÆF:Ç=}N­–wì11È£uÇ…E"g“ןC~ \Žˆ%5õ&ö5Þ0§/§.¦„ 0[Ñò!‚¯Z>%¶ØÃ”ÆS«MÜ,L}í[ZU€#bxJLœˆÄµK`_£À£E8‰ãÈ.dÛÙ‰ÞÞÔ®4¯#V6…¤Üà&ß4²‹Û¶MœfGà•mâ²àÊÎq•HÙÊ1°‡-.Õê<°Òk<ª‹µúÎkµ ØËY\™©%x«”=ת«Ã…g}•£lÉç/¤2±Äd¬“¼eœƒ¯$W÷·´:šøKÍɾÎ"—­2ÓZT[nø×û¾¢uÄƢπ`@‚ùøéRwQHi/Òs&Þ«‚·°ÝVÂ1¼=ÜË©ÂP²:Û9À{ÎW‘ñµÌž×.Á£7„Y,xl’µžÖpíàýSÈÕ¨thˆÔxWÈëþà™•aˆêW‡A2©èWÀO«…õÅ3á‘MPÒyŸÜ nH{x2Âõr×¹I¯ýL;§Jä«lm–y!{-Å/ÂncP“ÇbQõY6-¶W) RJë‰e-° [½«&œ¨Ü±•B?ÞÔP¾æÞZÖ=‰ét «­.F)W¬âêÛÓÿ°ŠÍ“< ´øaä¾37î‡øn»Ë…ªïHŸÊ 6°ŸdÇûÚY†aÛûÆ dï¶[OÞzr/[+’÷—îâsý~ó6ü^®ßT4”Î*ü0š áB5·§¶»jºàæZй5©¼Ú´ÚÊ‚zÍâëZþ£Hò$¬¾Â²,cÌ@mÞ­&åû[X µÞ•X%5¾«rŠ>ÍŽó+eøÕ&æZU$Â4Tä5§Iz³Ú/Øñ ¼M™l ‘¬Ûñ7–íCöœqtòM“}©}Š}SSû¸eŠE_öNÎø,“°u¢ØUáÊÝ\’Ë壈’ïãDPÝôµøFP6¾u" Vð|óDÇùÞɇ§ëìúµV‹Ý¨Í¯Î V ¹›ÖlIEàûý*½ÕQ_Ýܵ¶Rò·ÃIgü ß\ËŒ(¿0æì$(µÑA?E˜½ÆzÁ`É@²°Á¤~|M\q-/_izyÉæ´L¶9Çü*i :\A#Hp'¶~¬ââ©?ªµ#[Ÿ_v·æ¶{Ø5ž¨JøDo©†1Õ'ðypÝ^doíÜ#T&S fõ+zÍNÒl\À•E…Ù1h"µƒä°h®×Gzø#2øjB†&ÏJ„Ð+¾\´ .6«…§„±m-Ü`@Ìè$ØÝ·ÈÆ*„““ë‰êkrc>NY’Ÿá/‰µ‘l8o‘V/š‰Ê¨FÃb“oóøôRœ6. ÛaVK¥ŒÏëì6CØù¿ÙÛ}F¢ïX@ÿj}Èô;E­Òé´è?“–ÏfŸ ã‡x'Í÷@Ø(}­^G…²æ*›¾šQ|ëž/l† G=®ºb#®ÀèÑÑvÒrº¢Rèúo.r{z/´»“yÀíLš°_*ä´’u ÒNDõ½COjôêDÈ`²3¦ö‰Ü§¥j“Æf·Â¿žÃžÇÌ„I ígŒˆo=WTúÿú·ðL¯)â_,\y Ö÷#oHóõýE§ ¼¾²Ë“A±°~žÌŒR÷¦üCEÇfûµ!¿¡„m§R¹3iËu ž KËd"oטԔÞú…‡ÇŽVX bJJmÐ(¬F¥Ø¬©Œ \rƒòÒxù’˜r׎¤ÎÈLíçÑg²EÑù¢JíØo’áo3Sß¡[iÙ4P'¾¶©@×Üq£C'‰î(¬›Ê›]Åí=±²§acÙ_Û3KÀHÉ ~«%çÁ~­P‰¤”$M$Ço)p‡&Â.ª‡§œàÀ U‡¼¬9”±Ø³!‹;\¿–ŒùÒ{:¬ï³óµÚÂ. ß.‹B!=ô,û‹±¬1ø¸ó ì‹ÆÃÍcDx1«‡ƒµS9“òŒ~EÍ9yìA‹¥úŒÒ“ {Ó.R.#-lf úôS¡±CCC7¯s^ÀÓm–€YápØm»RF“צ¼=úEîÈX8PÚ‘7äº4ŽÈ’û!úŠØŒdø¼Fƒ(@jpº¨±néW·º¿Î|=tÀzHq€#. xO5óé³ÒI¦ÙïE_Á !viÔ¥x‹B©OÉŸÍæ3Èúàa¯©mŸ?BÏ=ªŒIð̳ôK4FÓÎ⣙ƒ×?â<Ú` xÐKo]Ê÷ÔÎ%ªŠ¯ðÛw¯ÚÌ,kG‚ÿ%ËÛ‘bqívDA(™§¸5g)¤¤Í|_ûh»90rd¤|ózgÔo±ùì&»¯okÖ–f.PŠw#½]GFüz‡Žt°žÍê¶”;d&E?ñ8h‹2Æ¥LR©TM)Õƒop Ý¦gÛ]¾~3´º» º®X|°Í";¾à Èõ6¥‡¥õ–ê.†AEz«Êd 5è97c?ÄžÓÀÅO4P­DG‰XÕƒâtø {¿áqH˜Fº'—j’Þ¨²k·Ã°§®Ú¬@Bas»w›•eH’a­6# mŒwN¤ì× éˆç2^wõõǸJ,h¯¸úŽÛííÞ˜‡z; $> lì…9/ ú/`éúìs¤ã_LªY~Éo-;b¡±¸lk›Ë.Ó ",3À{½Lë-Fã=½Ñæª0””ค”~¿=H·uüøµ!@b“è·àÙ'Eñ ß~‹Dÿ<6˜f­ûÕu$k@¾^;³¾¿´Nð™H"Õ8Á* 7¬²Yÿ=$>vÖqFhÓúÍy„=œäÿfcâ’™GLyÂw|DÍ‘ðvOæÑ°NxÒ‹¤ú³lÎëF¯¯?æ« èï°‡ÀŠ]ð”-}oN*% º;Wt1N£[@Ÿ+Ò$cÕË”³²Ûð£HKj×LìxQª¥nY¼y0I¶q0 ú¸XpŒú9‰kÃ>·ßH‹b;1p»ƒ:TŒ©ÕrHÔ¿a›JŒÉ4êêEí'•2¡´0Ð/#øKüŒ …ЈÎ~¼8/–áp“á[¯ÕH‹çEª”T‰^­ÍT¿?GÄ¢'‰gšŸó÷üçìZåsNvŽuÆÆòÕSD´”ˬÿWçÁçüÏ+¿Åb/ðfAÄâlq"zìásá³TTp;Ä›?­±ÚÇxsf±UC…’¦°Ã2‘¨™v´à9c„Ü•á÷ûðû2®ÿËÞ—€WU]mï}ΧÜÌ.IHBBB\ 28@% )LÈ@"™¸¹ ˆC­µü6¥´Zj©¶ÔZmqªÒ6 M”F´€5ˆÊP´ù0ŸÆ{¾w¯sîÍM-íÓçÿÿçù¸¯k}ÎÙû×Z{87Þƒ?îÿ¿%äMö»Áh·µ`Œ;!$$Á=&mrbHH"íaÞPNó.]5q{éÄí/Xi`WÁ@͹oð +÷ÇÞ v´DqJ‹6Ç™‡OHOÏa¶Åç¤$«¿VINɉ·ñ2³]|}€½ÁaG8¨ÙÂ}¹£Õß±ŒNÎÇ\0{Dùœï”Ÿ¢¿¨{†E¼$½ô¢%>1v®>ž|}úëô}Ô¥Óþ%”v:„q&޲ÙÔ£cð¹•æN Ir§¥OIr:“¦|ý´ÉâÂä´´©â8UŒ‚õàóOE4˜Ÿ5ËsAA}X ›¹hÑŒ™‹ožÑº|Æô¥+fL¥¦òïKni9 a¡Ï2£õe>Šé˜x¢ö^£QjqzQ›;*ÆW˱…Úôü‹)™ã&»3śمM•F¢¦O%£ìÁŒÑ 5É%Ò»úµþ¸Š” 7J2¼0F?,y¶s6âêõñpÝ‘!]׿ãKV¥½æÈ„¸a‰æÛ° —+c˜ÅWiŽHŒ–iâÑ\\œ™-?àÿrŒÿÉÿ…™oæÀk‘‘â}R§ô•þ”d0=ÇÿFéM9JÿÎ_ôŸKkèü%í¼“»)ÿ.ÿ¹t„ÎÿÈ=ÿÉ_—@åÛüçrœþ$ÎwÊ¥ûíôÝèi¯4_ž]Ç®}!ý×9¶_……‰[-"ú9bAt„„#',',ÚýØ5qúä—$ß³ÑOè_’”¯ÞJOWÿ†0^¦LÞ¼(JÁ¿šT_ÿ ÍOÏ_ukú¤L»Ýi–­6sBî¬Ì)yÙ7.¹1;cn±{X^nŠQgÐq£Ã42sJB<6QÙsn™“-üš‘›ÓbvFº†%cù‹;*!}tòäÅ3'/ž<Üä³l¡±ÉñÎp§#*Ö–ž˜4ñfX!VØLVè «TK{d YñU&Æ¿æ%–„Q6wƈÑö‡#**%Ù–bµÊ²+).etò.{ÊH›Í0Rüë~áÌ L’#^:6‹¿Ç½3Nüet²ó5õ EEi¼äV<²†kÿ8†œ“"ÓëS&$¤F›ä,Ÿo¬lŽH™lÐÿ]gNMLÎŒ³ê?¶P·E"ÍX‹LÜ/^íeÐGÛ¥gl£$™vß¼¯E?´è?K{ÅнaüØsæ¸]váÌa» š3ìµW®ŠyT”1è5qQ“*¾ê•˜„„˜×nß’“;±=jâ7¯ËŸw‹{˜®¬jëʱqñÒ¯FÄegçl*žxKžË—7õVÄ™×x Ë{&bäKüØŒcLHL3Fìj‰o—âãuỬ‚ÓÈ]:?§K^럴w©FÒ»VÕïs@Q|‡.­ ó• ‚ü'Îðp§ïÓSaaâåa§xdX˜?v”Êp丱®-#ÇFLJžň!4fgÑZü30 \+ *Óƒ6mŸÊÝ©îÉ)©nwªt6$44DzÏêÐjcO“ž‰³‰¾†„ 6z´……YãâB\Q"fô,Dñ‹ ìgö?.'tò€gxñÜÜfhxÿ3§,ž9˜¢’G&¥F[tû›”ÉîÔ}kTbüÈ”(³#ò¯ŸÚÒ“Ør™lF>÷Çꔎ:ññÄó¡ØÏ@™ã‡ûÎù¶E„ižÂŒÂÂØˆ—Y?&&há–.¿[Ô÷j»BPƒ’®‡í7Ç$¤MÌÍ€Õå„q‰0öna—¯ãR-#f'–ÎfÌ0'0—Ã4jT”á~aéäG_Œe ‘­)q¢½pÙJíå Eûß$ÆÕä°þïCékïä†R7Pþ÷fê’Ü’wSrƧé_ÆþjtŠkM|z|”yë6sä°¤Xoj‚æAÛ×çÃl!!RÈןÓùs ‰xnñ-ä¿‹MŒ¶&&hÞ3*›À²žK4ÇŽ{…?Žt8üùØ1QãGßê°eðû6ðÖ#í;¬õø)Q‘—pŽ—£“'$çúm*Ç¥˜0".d·Ád4è¤Ñ¹G¥ŽX›4,Êþ -Ôa3q>zBn‚lwÅ[¢SFðÕV§ÍfŠJöÝî sH;GŽ4E¸b|GçŒsŽ´òJá}uv µëd.Ë.É9Ê"þawÆÒÄ?å>*Û)"74*){g[È›!Ý!rHHxÖ®85vÃÕþ‰ºÜÿþÉœqÚÛ·/ ¤7øwRL'"x£Äë'ešW"ÅSèQCdZR|R„Yž=~ìð”)˜ÃñéÎ"ÏœÙÓÒ®µê?‹›=uÒuj<Ë&›éwS²}§ÉQ»GÄI’£rù¼Ò¸ÑE?‰”tÃÂÏқȴ¹žE1×3L>=ï´êl]á;Ñ nõ•Šû¯TTù&ú÷ QÒæpç‹bh½†4Ö®ß26éëßPÓ·$Ír‰ØÖÖ6‚ßz£>ö¬ 3€ˆæ.Y=9‰ÖüØ«>¯èGb·Š¤µ*F§ŒÎ¹O$/K¹)eù`¤Æ¥þøŸcŒá2¨¦¹Ó~šÖ—þbFDÆ-ÀîŒÏÆVÝ—i'f7nÜ}ºÿï#K—•zWñ@ÃìíG¶5;ùß@~ö¢ÿ~yWñ¿OžË~EÃ^à/Ù‡²fŸÐð·ñeã«Ç7\ÅU\ÅU\ÅUü¯Æ»*rFæÔjøp!7!÷žÜÓ~L¸uBë„7®â*®â*®â*®â*®â*®â*þÿý=™3¦¯„þX¿¥]Át¬D)„.WÞc:¾UÙ Ý¡ìe:y) ö('Y Ó)oB—('XŒ¼T9ĆãÊIèÊY6œKÊÇÐNq…Ç)BÇ+ïC§*¯A§“Î$í&=›t>éõ”s+•êPþ†£Å.–‡šÏA—+Ÿ°<Ô/´Sy:N9 O:œóP¿Ð™¤Ý¤g“Î']¦œ®'Ý@z½òô&J·ŠVÐúëÐÏÓ•eË#ÓÐßÛ¡Ë•lÚú:t&i7éÙ¤óIoUÞîP~Ç–‘e–¡h°ýz½r º­,ƒm-lÙpåYë'Ø ´ÛËJpý6ñ† å"t ‹e%°@)´S™§TBÇ+   ”*è2åAèzÒ ¤×ÓÝM”nU¡Ÿ§t‡ÒÆJä[”' —*‹¡=Š—•£Å×X9®|Â%ôô¿ ÓIg’v“žM:ŸôVåSèå(w‚ÛèõÊE²ç ÓIg’v“žM:ŸôVå íD+•¨ù t¼ò*ôz¥ºUù;ôVتANðÙÉë©•zj¥žZ©§Vê©•zj¥žZ©§V(åo ü ”¿ò7PþÊß@ù×C_à›Àí´S9‡Ö7ÛièåôzºÒJºƒ™ù&Xl.4ÆoE‹‡N'IÚMz6é|Ò[Q[+Ú:η¢­³ÐNåchaá­hë$ôzº¾-nEÍxr‡v"ö:(g±êà©ðZO'IÚMz6é|Ò¨­užnU>‡ÞJ×…Ç;ÀÿnhòÆ›Ž…@—(^èr圼=ê‚N'IÚMz6é|Ò,z«rºCÙ)/EmOÉçÐé¤3I»IÏ&Oºãš±±R¿·ŸÒ2ÍÂ:“éÿK5ÉiZZf™²NKë0ׯii=Òãµ´é9ZÚÈä•ZÚÄÒ˜CK›™KîÒÒé‘@[V¶DîÕÒ6–¦›¯¥íÒCºF-í`•F§X'è3ÞØ¬¥93whi‰éÌ¡ZZfÑ&Ÿ–Ö1›Ù¬¥õHGjiÒ£´´‘M5ÕÒ&i¼[K›™Ó\®¥-¼ Ж•¥›µ´Eš©¥í|®ù%-í`­:0á:³fg5­ÚYM«vVÓªÕ´jg5­ÚYM«vVÓªÕ´jg5­ÚYM«vVÓªÕ´jg5­ÚYM«vþ s±ñ,‹eC»Øé&ŠÊUĺ54᪰bYBDïÀZý×ÅV{¿:Pß7©jä4‘Ç눡—b»ŽÆ¢ZÚE}㢔¼ZAm”’_WRY¿µn`‹Ñï™ZYOÐuL•MúÇÉZj«˜ÆÑPíªç"o1]ÁÖc¦½óïƒ\bÛ¹“=ÅãØNÏijüAŠ7𠾞Oâ›øµ¼•Ïã[ùRþŽ»ÁñMpìdzàø98~‰±$ähœÄq8NÇYà¸ËÀ±Ž¿Ç]àØ ŽÇÀñ îä:X,”ÇópŽ3À±‹Àq 8ÞŽ?ÇÇÁñypÜŽo€ã1œý {å9’I¾EŠ•—J£e”!?(å€cÞ@Žæ{ƒ8ŽG±—ÉÇ[Á± ïÇ_ƒã>p<ŽçY9—¹Ä]à˜ Žyà8o»jpü8þ w€c8ÇÓàøß$éy«ηJ£øóR6旅ã­àX Žw€ã]àø]pü¡˜ÿLFÅdŒ‰ÉK*ÛPVf22“©·³ŸÎ^“ž™ ½mmø¯­×$¾*iÓ>&Šuvuõôtuušt̤×nô˜ÌÌdÙÝrø¢å­–÷Z^¨ÖöO>9räÀv*ÛÛÙÙÛÕÙÙIMÔ¾ÚÖÓóP­¸cèËR?jõÓlÐ3ƒ¡'¦±««Ñ c}­h«– Lj«âºÈRÛ®&bÒeöŠ*5š»ºjÛ»z¨XŠ]f‰™Ñ#¦uI½¥öi@g &f°\<*>**­µ‡O­Af]·šWe×]›ÕmÔ)FJ"‹2S±F“–,¨Í9‰›tT, 3>HJ‚¼­#ÐuݲÌMúGy„,âvWVVúÚaE.E8Š_ÖQ<ÈQ"›v£×dæ&륎â&s¿£ø9J0Q‰t6í(³™6›­Yäi6À#ÆÆÎ¾¶¶f³^1ëÜ…C¹ŠÊ¢Tñ@_™õÌ,:¢öK»ç÷–…¬_µt¶ùAÍ©µh-QÁ®g°Ï(” ýN¹©\ó§™%nVæ÷šn(¯ Ž"ÊÌÌlN“ÒD,8Ål#Ûݲ»Åläf³:Ð0ÒÌn6öµ©ì j@t9Mí]=ðC»YÏÍ~¶õš­ÜlïÆç\÷_ û f7[öžøüÐÑ¿¼Ñ±WTN¡BŽáÈîZ7©½oìÛ×ÖÛlÛÔ×h11‹IQb´1Õ\rCžjÛ>ø¸|ol¤¹¥ÑjäV³ŸÔÛîkPíÞç÷5[õ̪w7ª‰Ñ¾Ñ´Ax¤­s8}9棨ä~q[G[;Ez»UâÖ ãPض(Á€ÌZm”n&Rj°Š• =m…Y=^£›JPY_Œa4!æËòòb¢m\&$™ëõÝ"¬V3³ZüÃ|" su ïn±š¹Õêc ÛÛ²;€½- ó1ê´Ï'ü‹–|¾ £˜`3 ‰žÞc:¬4¸Û×gµskH·»ÛÝÓØCËàë½þÐuÄtÄP«ýañZP`ˆZ-"0ÚûúÚÛ÷îµRdt7¡a51kPh¨Uínˆ-±s¡É¿±o悾JZ0D=mûúmFnëؘÖxÈ×¶Ç×lÓ3[p¬Â&Ó_g_c[ßøŠ«Ñò 9I‹¸´‰ ýñ‚€±IÜ0m&79Žu+='iœ¨ þ:ý”(jhuìêíVËêEWzÅr×Û#f5Ü pÔER‹ØÊD‘£…ŽM’lùÙ;ú ØÑSìÔØ±QìØ¬Ìfs0ö®Ù-Ù-Û6¶¶á¿B›…Ûlˆ˜<¸s»[”#+‰øñ0BpµÙÌÜfáÖÁ°c¬8†ÔÖp ØPý ¸ƒÛB»‡wïÉëÉëªìªÓcǦŽM{m{m6+·Ù»1·÷v+ì,l/ì(Ü[¸»{ww[·hG r‚õ±vJ‰X!šyö Àò†{&f3EX õ²í’Ïñ¶-Ó­•;{ „Åi9s7„Û5»í&n·ÈøLÝxRL]§Ò"–·áä^¥íøÆiv=·‚­Ð&äéeÀìÀ ¡o…53ªN´ü¾rB 5‹â®Md¡È ÌÔv‰Û½ÍlãæÁ¡×®®¯šDiÆ¥uÙ~mÔI %ŒH1 Å,èB£;hîPî  3ÓþBL?Ù ˆ¾’dïGÑ ±çT2("uÛ¶=Œe¢m*Ó¾°°_HKñ Úä©d«<¥«Ù”Ê"o5›‹;üæ…׺Єx«’x®1à9;B;ã̈xޤëêìJY‹ä ¾Á’.˜çbY‹æ»0¨yÄw3N< ‹3-„j×1+ Ãó§z†Éƒ…ã‰~Xqm]-ÛNú ÒO“~ô.Ò{V—zªÙ«¤>Lú]Òݤ?!}V|qÈÎ Í ¤ãHg’¾–ôÒ·W­®ZÍ7¾—ô¤LzéÇHï|ÃòÏ4¿Bm‚%±Á„µñ8ÀÄ_•ÿß]“àû¿|t`›”ÉÒ_Ÿîb›Ù/سl;È>dçñLn¦žš´Þžeâoë²xÿ ïkÇó*Ÿ¢ï;¬¶5¨ âídÜ€s®÷<7lxn¾à¹-lày|ÃÀóQƒî'lxžñ83KAçc+ƒîŸþûç7H8ZÓ©¬ýq Ì]0U–TÀ6JÛ¥·Ù#òÏ䟱Ã:¯îQö–þá>.[n¶ñ—-ß±rþªÍi»AºÎö-Û6©É^b¿]úƒ}£}“´Ï!9LÒAÇŽ/¤w¿³@ØÆpÈþôض¿„4ìŸ9†äÓ€ÂæÁ°ïw<ìØálÕ°5Û _…P]èœî } €aQC Ȍ؄m*èÎ Dü6bO¯F¾ t|C!,5Ê•}†ûƒ°…°gH¼ý¥11q\¯aÎ( ,ÑŽÑ¢i‘¯p8µôû1=±i±%±Ûb\{쎡 ÖûRì‡.ôC´û%µÕ"dÄÜÄÌf$Î `©†€7qER2;:a´;qtÂè’w¥ì'œJ”Œ‰\cŽŒ9 92æ|Ú®ôÍcޤ?þ>Л!e˜2v¯fŽ®Ïœ?®UóÙÞœ¸œc¹÷NLÆO²Mš?©Òý˜†§Ý;ݯN‰2¦4LíÌ»(pMó5;§¦ÅOÛ¢aÛ5§p¾eZuM;l™1£aÆö™Q7ÌÚg\Ó¬æÆ±KÍuc²Èwcî Œš<§5ßApç/$\˜+Í™›© l›g˜W2ï⼋ó‡ÏÿùÜ -X4·z¥Hå < Z „Œ‚ù„‚jHaAcÁ]¸ï)èºiÙM…7¿éüBçÂmÈ—{tgaoAãÍ+o®\|à–ë—YÞº|ëòí«îZÕU¾¤¼Ñ,¢ü‰Š¬êª©½¸†­™¶¦pÍík¼kîZóôš=k>ZóÙš^ÁáIóäz®õx>«sÖ%×ÕÖm¨k­k¯ëöNñ.ò>ëí®«?\ÿeCVCYCcÃֆ߯[»hí³å÷7þ¾ñ@cw“¥ixÓ¬¦Ö¦ýë’ÖÍZW¾nݺ{Ö=¶îéucÖÝñìÍ†æ˜æ9Í%Í;šO­O[ï]¿c}÷†ø ¹nßp߆##6.ÛøøÆOZ†·üñ2³ÖÓƒg¦óNËGý3JðK’Ô¹ä2£oÎà17p¤¨±>äü㟃‚0p¹3·b~¸óÚ~¨3ƒ˜MÛcÚ£·`F><­ ó'ÍÆtÄÌ:3ífÇÃÎVû~ÿìú€ýphOâRQÖþ´csÿ,ªZ óô4š‰Õ\Ãû­'®Ò¬,ò÷)¿fAÔû´ý}Ìé£Äaªm?صâx˜Ð¿N|4h}˜´"ô¯  Þ—¬Û¯˜ûuÚ¼ƧzPÚ1 éÍþ¹þx\óf'uRg8͘1 ¯- Ì~b–‹™#ò÷{8qê÷/àzAì‡8¿$0šM‡˜cƒçÔKçSmÖn§8RgÐþ¹SÌé¸2KÔ‹óY1S,Šô©+±jE‰µÊeÃ:¤­<þ%,*Ò׿ú¨ñ(Ö7‘?Ò'r ôž(›¸#®ÐZ†+â^X”}¿?Ncâp¿- Žè{茮÷¯¨ÁkªàDë§ ¬¡X3mC¬™[.Y3ßTWJ¬‘þ¾àþ—*brO¾;òݘëÁm€7„\¿ÅÕ)l«FLâRXŽð­°KLAÄòüãÂSA£;3vGXT`­=¬Õڢƃð‹_±;F'$%«¢®jIÉ´A¬jêŠFkâ¿ ZGƒpiZ]ƒ ­²\Z‚V× ´þ^1«ôe0ØRµû2 ÕüŠA;Œ+Ä`ëо$—Úö+A‘®zú_Ã¥5ÿsvWÕÎb¿âx8ïâË5§ì‡ÅN‡Ð,®ä]»qvMó‹Ø÷¨÷°kÊ;%õ*­EgTÐŽhí¦Ä¾©kZí‰Ä¾© %ši?bì[2 VÄž…Î2´šÎÀ¾§\\¡Ý ʉ£€Èª­îf»¹3Äþ)Ê–ïX°RìµÄ>‹à¦+±Ï¢3÷‚•b&Òîbš;2Ú¡I´7D~”;8ä»±þýY¾{Ú²Ç)a‰›Î«vÈ»H½_•çÜQ3í÷$Q—ZïÀqx©?ƒ£ e¿zÆ ¼M9 ÏS~+/¿6`!â7WòÙ&áÎ_è·H"uV^¬œdú¿™}ˆ~‰eeO*Ù>å"/d‰¼ˆ-æ+q,f©¼„ÅóÕ,9oBÎÛäJå5ÆQÏÇL‡¼!ȼ!Èk¡úÎ"×9fæ+XîÅýÛpîE]ãQW*JÿšøX‘z|ãåfe·¼^ù9øæÈ'”GåØXùc6^>‰{§•.ù žvýl?d:¤F"6OŠßâ°FÂ&0'd ŦBJP)¤ R§¼Ç¼`Ui€¬…4Bšð„»Nù3»Ò YÙ¹›Å²{ ß†Ü ùä>Èw!÷C¾ÙyOà;!½Hû ‹å Â!ÌÍo‚,„Ü Y©` x;‹Fo“—°<ù[Ì&ß©dÕòFôôN–(ßÍâu?Wþ¬{ò(ä ‹Õ‚†¼9yÒyò.ä(ää=«w*]únåÏú¿1þ,ÒŸBz”?ôl‚a Ž9l”a"Ž•J—¡ R ©Ô+ï °¶1À6†uØÆðsž†¼ù‚¹i,Ú˜¹Å !+!k H¤r'62¶B~ù9äQ–j|ÇO!ŸAz ç ç!_@`CS1¤R ©gÑfÆÜæM±ûýâM¤NÓoÜ"µûµûm‰ˆ¶|DÛ]ˆ¶eˆ¶Ûmˆ¶o wâåZy båå ñ‹5ÄÍ}â7kò•­ò ÄÙÇÌ"¢üI>Íò)ÎNŠ_±±ÐÀ¨XÁò‚ê¿ õסþŨ&r¯ÔêÞ‡R× îGP÷“Z}ÌT‹µLB-Õ¨%µäicbXžDM7£¦ –Ôð'êé‹”ŠA@@©ü6e'êÉC=¨'õ,C=³x…ruåñ‡”çQòÔ†úšÀ¬uÆYjÛ,¨œ»}ò)Œ¬Óˆ¹3Úˆµر¨u¼6úň}Kü #ožò3įUaÄwº¸þû »[9Ëî|r/ä;û ß…Üùdd¿òû ¤ò:ää È›¿BBACÞ‚tAÞS|ì}ÈnÈqȇÊ›ì#ÈÇóÊÛìså8»ù/ÈEÈ^å-ößÓ_B¾‚ôA¾†øÀEQÎrá4+~"/Szä[•‹ò  •‹ºƒÊYÝ!ÈaÈ[#·!]w ïBŽBŽAÞƒœR¾Ò†œü rò)ä3Èß!=sóÏ! à¢óAŒÙ0åMã å+ã 9|È|å¸qŽ‹!Ëpÿ[ÊŸ·)g…•Õ¸·GÄ‹ôZH#¤ çÍ8¶àx'ä^¤¿ŒßDZÇ@~ˆôÈ ?†<ˆúŽë¿@z;ÒO"ýÒ¯@à##|d„Œð‘ñ¨â3ƒÀGFøÈ»Áñ8äC|d<­¼m<ùúrò©ò–ñ3ÈßQwê>9¹€¼ðñ"®søÈT )”Â_{€EÀS_2™= ¼X½ô8{gâ·†ëå]ò,q\½È®GdAdAdþo÷g]æ}üîL›&MB8 …£X ”£€"¢rRwq[|V³ H+ "D¢[‚"rR¡Pä H(´EŽ-»4ë!”–†Ð4´Í´ÁæÐ´ÎÁNf:ÉÝ©MWî}Ïläa}í¾öùëùã³sº×õý^×õûÍØ°I•™T™I•™T™I•™T™I•™ttŸJÛ­Òv«´Ý*m·JÛ­Òv«¢œŠ)©˜’Š)©˜’û­v¿ø?ê„ÂW£?Æ¿ýQÕ$UMRÕ$UMRÕ$UMRÕ$UMRÕ$UMRÕ$UM’“%N–8Yâb’‹IΕ¸–äZ’[%N•8•äJ’Iªï¦únªï¦únªï¦jŽª9Š–(Z¢h‰ŠI*–¨˜¤b’ŠÉJÇ®&ÒòT\eí}ÔÚ;?Þ;Ø;nµ©è›ÓwsEß;¼ú¨WgÓ÷†ÊßsÏ´N&¬“ ëdÂ:™°N&¬“ ëdÂ:™°N&¬“ wšn­œj­œªgûôlŸžíÓ³½zv‡žÝ¡gwèÙzv‡õ´AÏöèÙ=Û£g{ô,¿MÛ/Óôé>ÍéÓ!}š‹58&þ5\\6¶ŽlMX;Ö΄µ3aíLX;Ö΄µ3aíLX;Ö΄µ3aíLèŽأ{ôbŸÞÛ¡çúô\Ÿžë±Æ%¬q ë[Âú–°®%ôJµ-am›ªWz¬o õß§þûÔŸúïSÿ½ê¿WýïPÿ;¬ Ö¿õߣæûÔü5ßc LXÿÖ¿„õ/Á©™ÑP¹ê娷íÒî1½/±v}1ê3Õöùù±Ô§ ÔüŒøZÏue¼Û:Vöpƒ£{µÑ¤¾'ºÑ«fçö8·üîecëàjçNwn§óÎ ª¹À‘s9èÈ~GΩì²Ê•³¨r¥/ùüBŸwú¼\#Ÿt¥òßø>áJÓ\éuW:¦r|®²[ÜRù¿%ë_ƒ½à¥¸ ßÄÕ¸߯µ¸? Ž ö÷ûJ¯?Rþ‹ëòÝ+Î>ŽÖàÄxís·çØ+6X¿öŠSâY;«?yo›Y¼ü×ÁΘlg9¥¼²;ÿª ü/-/µïúRð¹ø—+{0«´È¦‰lšÈ¦‰lšÈ¦‰lšÈ¦‰lšÈ¦‰Lõ¹Ç—ìØ¾ìñ+Á·*g&œ™pf™ g&œ™pf™ g&œ™pæ gžåÌÎ<«rfƒ3œÙàÌg68³Á™ Îlpfƒ3ÆÎ<ìÌòåKûо*k¼¬²S¥Ö`ùo^­åŸÇðwøû Æ®Æ®Æ®Æ®¦¦üw²ã)¼·sæ”ÿB»²/{´5X?nZ´eÜQ8Æ1˜ŽàX‡ã1'àDœ„“q NÅGqNÇø>Ž3ñ œ…Oâl| ŸÆ9ø ÎÅyø,ÎǸábü"÷0Ácø%ÇøžD žÂsð|Åý¾êñ Ÿ}ÝqWb6æàzט‹qnvì½ÞÒñO;þ™¨·z¡×‹0ì½Ñ–šqÑ`\kö‰’5ò¨Ù7ÊÕ¢†nS-qŒÇTa"ªQƒI¨E=öŒÒãöÂÞØ ì‹ÉØûc ¦ª°DCãÆ!8‡ápâH|¨üßÈ0kŽÂÑø0ŽÁt|Çâ88'â$œŒSp*>ŠÓp:ÎÀÇðqœ‰O <Ï>‰³ñ)|çà38çá³8àB\„‹ñ¹(;îóøþKä÷EüfbæÊåFÜ„›q ~€[q~ˆávü¾uŒûi4:îgø9îÃý˜‡ð Êÿ­‡‡ñÃ/ñ8žÀ¯ð$Zðài<ƒ…°Ž[Œgñk<‡çñ^ÄKxKð{³¼ ¯a9^Ç ¼UhÇ›èÀ[QÞÉ›"yS$oJßnJ_m˜bòŸa˜bú—ÿ 3Æ›xãM¼ñ&Þxo¼‰7ÞÄoâ7ñÆ›xãM¼ñ&ÞxoüsÑÐøçñ^ÄKxK°ÿŠW± ­ø7ü¿Åïð{´á5,ÇëX4ŒïÄš aÂ^Á¤ ‰` ûb2öÃþ˜ìQuW4Tu·)t¯çx>?JW=Lªâi–¯zÜgr©zÊgb®s•˜«Léªç£lÕ o•xM¹|Õ+Žÿï½êóeo•x«ÄY%NÓ/_õ†cÞôY‡×oa5:±]ACÕ:÷ö ¯Ê7¼ª¤÷6D£&e¾ê±ùVW•vî6ÏsžÛcWÙcWà›KUÑñÃAˆ(Émg”¸G44±{b/ìNœ‚©8â `ÒÄà`‚#í ?„i8 Ç{o†Çp¢É{ NòϪcÁÕqŒÇTa"ªQƒI¨Eê±°'öÂÞØ‰`Rõ¾˜Œý°?¦`*Àgµ8«ÅY-ÎêCqÇø Ì™êãq:>âùq&çñžÏˆò&q¾úDÏOÆ)8µ<™åq.ðüB\¥«/vÞ¬h´ú+b»Âg_wÞ•˜9ðM·Ú¾²ú»˜ë¾7â&Üìø;ÜOÏ›Ôùê<Îw­‡ð <Œ§]ï,ôù",ö^è¸ÎÝÖQ¶f\0©¦Úä¦aÍ${yŸ Á4Ï×X•jöóÞþ˜ ÕLÅå_$ËÝ=¶—ºCWVöe¿{ïýÛÊÿ™Ê/(å=V1˜;7úbüÂò/SÁ¤ò¯Z•ÏŽ‰¥b'â”(;Óã¹ÑúØyÑŠØù¸0êr¥v);ŠÔ¤™ÑŠI—âvÏŒ;ð܉»p7îÁ½ø)~†Ÿã>Üyxb>Â/ð0Á£x ¿Äãx¿Â“h‰RuŽRA\¤¥ØL߆ËñŸ.þPüaì´h£øÃØÙïˆ6Ç~m6·1³qäŠImœô÷ø"þ¾mž4Wá[¸×áö(”[(·Pn¡ÜB¹…r åÊ-”[(·Pn¡ÜB¹…r åÊ-”[(·Pn¡ÜB¹…r åÊ-”[(·Pn¡ÜB¹…µŸ6מ p!.ÂÅø>m–{ÈÃS¢ Ú«øµV~‹8Xî‹å½8ö¥¨5v¾‰;¢v´—¿È}±ÜË}±Ü˽]îíro—{»ÜÛåÞ>醨uR3¾[ðèU\íâjW»¸ÚÅÕ.®vqµ‹«=8‹Mh[ŠMâUAETç;"É`ü’wwŠ·aìÛÌô±o3ÓÇ~#ܨºŠª«(ºAÑ ŠnPtƒ¢Ý gš8ÓÄ™&Î4q¦‰3MœiâLgš8ÓÄ™&Î4q¦‰3MœiâLgš8ÓÄ™&Î4q¦‰3MœiâLgš8ÓÄ™&Î4q¦‰3M¤À )0HA R`ƒœi ΦB#y±† üX;7˜*ûY²ŸÅ­øöúÄØwèÆÖÕcÇÖÕcǾ7òj ¯Öðj ¯ÖPc5fQc5fQc5fQ£‘Ôh¤F#5©ÑHFj4R£‘Ôh¤F#5©ÑHFj4R£‘Ôh¤F#5©ÑHFj4R£‘Ôh¤F#5©ÑHYÔ˜EYÔ˜EYÔ˜EYÔ˜EÆ`¢Z(Êø(ß(ã¹2ÞW†WËðKÁ½HŸiÓE›.:4Рü¿-’ÿ‹òQþ/ÊÿEùwÉ¿Kþ]òï’—ü»ÄÑ%Ž.qt‰£K]âèG—8ºôÊlJÿ×y7L}^•Î4ëf›ss̸oà*|+ê®ürñ×Y7×̸)ZQûý(UûϘ‹qnÆ-ønÅmø!~³±Öl¬5kÍÆZ³±Öl¬5kÍÆZ³±Öl¬5kÍÅZs±Ö\¬5kÍÅZs±Ö\Ü£“Pkæ«üúUŽ=Ôã=z¼G÷Э–nµ•î¹!êÑ»=z·Gïöèݱ‡bÅŠ={(öPì¡ØC±‡bÅŠ={(öPì¡ØC±‡bÅŠ={(öPì¡ØC±‡bÅŠ={(öPì¡ØC±—gÖÌhµ7R¸õ½™UÎhS0CF->ÿ£ÏG¹QâF‰%ǾãØã{†N™$Ói:e’l§©£»Ë³ŸC%•dÙ"ËY¶È²E–-²l‘e‹,[dÙ"ËY¶È²E–-²l‘e‹,[dÙ"ËY¶È²E–-²l‘e‹,[dÙ"ËY¶È²E–-²l‘e‹,[dÙœ$“fÞ¬æÍêØì`2VËàrÓ[dr·L”ÉÑ29P&GË䙼À»Õ¼[ͻռ[ͻղj–U³¬šeÕ,«fY5˪YVͲj–U³¬šeÕ,«fY5˪YVͲj–U³¬šeÕ,«fY5˪YVͲj–U³¬šeÕ,«fY5˪YVͲjÖÇ3+}|ª,ÖÊbÉØÿ[ÞW,jåÛ.ßv¹¶Ëk_9í[þïÌɧ]>íòi—O»|ÚƒªØõö@°gl¾÷ŠvÕ€q>€ƒqÅa¸ —ã |Wb6æà¸ ßÄ·p5®Á·q-¾ƒëp=ÄWû]ˆ©VLµß‹vUòÙ%ÒTlnTK:v”=(þKcךkßÁõÞ½A–͸)Z»·à¸-8(ö£è·±{÷Ó¨7ö3ü÷a~´J~«jcfYã1U˜ˆjÔ`jQ‡zì쉽°7öAûb2öÃþ˜‚©8 *Ò°HÃ" ‹4,Ò°HÃ" ‹µ§EkkOÇø>Ž3ñ œ…Oâl| ŸÆ9ø ÎÅy¸L—ã |Wb6æà¸ ßÄ·p5®Á·q-¾ƒëp=šð]Ü€f|/ZŒW9›©8@Ålìh·Zº-ú“:Ù|Ž !Â÷UR·'oÅÉ;"Oå0VÞ¥}-Ê[aòV˜¼&o…É[aòÔ©R?¤~Hýú!õCê‡Ô©R?¤~Hýú!õCê‡Ô©R?¤~Hýú!õCê‡Ôÿ× þ¬8ÎǸáb|ŸÇe®q9®À×q%fc¾«ðM| Wã|´¡nHݺ!uCê†Ô ©R7 ª©Û¯ÂK*<»Q ß$¨=HíAjƒkhÜFã6•žrd'­S´Nž§SçrâFgÞmWùÛUþv•¿ÝUªøÐÁ‡>b÷˜˜?¶è€-:`‹Ø¢—Ö› í<êæQ7:xÔÁ£uð¨ƒGGûÿ?å2\Ž+ðu\‰Ùà¹srÌÉ1'ÇœsrÌÉ1'ÇœsµåZ¸Mø.Ô›srÌÙã6ÉèÿöLNLJæm¹ÓKfjéë{÷&{ìÛÔñÔëžße¯t¯oß{Q.O¹|eW>7:ê6w˜û?ï}z³¼:uTew;ÏóùÑ0…‡UwAuTwAuTwAu(Ÿ§|žòyÊç)Ÿ§|žòyÊç)Ÿ§|žòyÊç)Ÿ§|žòyÊç)Ÿ§|žòyÊç)Ÿ§|žòyÊç)ŸW}ÕWP}ÕWP}ÕWP}ÕWàÌ0g†93Ì™aÎ sf˜3ÜæÌ0g†93Ì™aÎ sf˜3ÜæÌ0g†93Ì™aÎ sf˜3Õo+;)ÕñÞ÷–b¯|¯ñMšK»ƒKh›¤m’þ¬¥;|º‰µôÍÐ7S™÷ré~ežÒ|;؇¢,]3tÍÐ5C× ]3“ÊkC,JÒ5I×$]“tMÒ5I×$]“tMÒ5I×$]“tMÒ5I×$]“tMÒ5I×$]“tMÒ5I×$]“tMª©‚š*¨©‚š*¨©‚š*¨©‚š*Ð=C÷ Ý3tÏÐ=C÷ Ý3tÏÐ=K÷,ݳtÏÒ=K÷,ݳtÏÒ=K÷,ݳtÏÒ=K÷,ݳtÏÒ=K÷,ݳtÏÒ=K÷,ݳ˺o£ñŸƒ½cKUr[´"öšº\]{#z26½Ûý$¶+z;^ ƧGÛâÇFÏÄOŒÞûwÊ_ ¦Æÿ¡òßTo¨üj~I¬…Ïé°×Tÿr{Ø×9±oè´Uœéð¼Ó^t='»=&‘ öe­b;œWrþNŒº[õÇ'¢ÖFwOÇ÷þ œ€“¢íñÓ£-uQ®îò¨½î0ê®öH:jÔ™uß÷87ÊÔ݈›p«÷îòÞݸ¾ïÔÝç½ûñ çª§î×h‰Ju ]ÿy¼m«{/yïe¯_õ(§º.ï½µØàõFüÁóMpÜPÔ_7‚Q}"ÊÔï‹É8‡àïωÚëoñ\\õ·GÙú»£mõóðž´cù옪›y´›ª¨ÚKÕ^ªþ…ª›¨š¦êªSuU7P3OÍ5s”ÌQ2GÉwR±HÅ"‹,Pp37Pp7SpÓLSp3Ó£àf öR°—‚½LSp37S°—‚½Ü@½õ Ô+R¯H¹ÅŠ+R¬H©"¥Š”*P*G©¥r”ÊQ*G©¥r”ÊQ*G© cJm¦T/¥Š”*RªH©\phlQ4;¶4z–R+Õà¿Sè9ªdb}ѵêìæX6Z ²gÇÂh™Ê¾TõÆãÑÆxUôp¼.úq¥Òѱñƒƒ9ñF·«úOÆ?}j¯©ü Ô\küãÑ“ñ³¢ËÆ~‘êûWÉsâ³£ßé‚Ö ÎÝ“|Jºû[î¶•î6èê9Wqµ¤«õÐézè¬`q—œµÖY»œUî’xg8{ãXfÄ5$®]!é )Wèê+™.·sz#zÁ'8c³ûmrÖ:ívæfgÈãi^…éöW'òýLÏÏŠBÑœ'šóô\Šº»¨»KÏ¥(¼«îš Q÷mØ©QanÝ÷=ŸÝC‰{(q¾KQ{µwP{Gݽ>¿Ï{÷ãA¯çã!ç=âZyü5åžCktkÝëßÂjt¢ï ×gý7c0ºµ>ˆ^«Ÿ-®¯ÂDêõ‘˜íâÀ=z/ÅÍõpäAÌÇ/ðh´ØŠÜV©ÄANŸcê¼kê¼kê¼Ëõ³uø»:ü]þ®n~78EÚçhŸ¢}ÊYõïŸMr/ʽ(÷¢¼SòNÉ»œkJ®©÷æÊ3SÄZgêý3bÜ$w¼^üû˸+÷oý†£¿E›n}=˜[7ÌuºÖûåù±ÑªØãÛ÷;ø6¡}Ñí±~ƒØ¢þ¶zü#ÒÈ·¨–—bò|r®1ä1‚ûnGÑóaŒD7˜IëLì´‰Ö½³Ë³)¶Û{ÿŽ¿DëcïzŒtõ8ÄPž[ãUÛÏ«¢çUäuñÚJ×ߤëâ Ñýñ=±öF":Kµ^ªZ/U­—ZSŸOà³qpðñC=†Ã£ Uò…*ùÆø‘^Ó¢™*zfühÏÁôè fãu¦Êj®-âÚ"®-RíŸ3'—ÅOvÌ)85z9þQ§áô¨%~†ÇáãÑ=ºâÒø'¶×[%VZ%Vª‡ß©…§(]°:¬T ›æëLóò_AÕ^ª®¥êZ5ñ’ÉÝOÙ.“ze»(Û¥6Š• =9Zo¯7׫‘jd—)ÛcÊöŒí׺LÖV“µÕdmU3kLÓ·MÑU&çzq¥‰¸’ꪨ]0Wš€+MÀ•&àJp%e ¦ÞJSo¥I·ÒD[eŠõ˜b=¦Ø*S¬Õk5ÁV™`o›`o›Vo›V=¦SéÔc:õ˜N­¦S«éÔj:½m*õ˜J=¦R«©Ôjõ˜F«L£õÜé2YÖ™,ë¸ÔÅ¡.Ó¥ßté7AúM‹u¦Ey2¬3Ö™ ë8µ–Sk9µÖTè7Öqj-§ÖêüuœêÒù+uüJ¿RǯÔñ+uüJߪÛ[u{nïÑí=º½U·÷èör—¯Õåëtù:]¾N—¯ó=8cg\ÞSŸ'é²PG5ê¨y:jžŽzƒÏ-ºf'_ðu_è–4_ó|]ÌÓÅ<]¬#B]ò¢…-: ¼SnQñ¡*Ÿ§Êç©òy¼hQå¡*/ï”ç©òyªy'½Ói±jÞI«Å´ÊÓ*¯ªwÒ+¯’wÒg}Ðg}òªy§jÞI£4Z@ŸÅª7T½óTîN9/ãòèG*v‡ ž÷jDì;¢ÇÔæÆ`ªÌ ^õȬ_fý2KÉêMs -³7eö¦èÊßÎÞÝ›¢+ˆîMQDTQ¿ˆúEÔ/š‚h ¢éM¿hÞEAýÁÁî4Rù^Rr·µKü‹}rPÙ½Ým»•W«w+×Ì:wq·òª4B‹w¡Åˆ;¸s;÷¸s-FÜ}ÄÝGܽÇÝ{Ü}»¸{ï}Ñ#2_#ë5î\tÇ”Yö+wƒ‰»ÁL{ÔÄíªUûþTû‹¥éñ™ÁáÁ4]žÖåiGô;bë_¿];²_&%™têò²n2é”E§H뀴l:eÒ)“’LJ²(逴H뀴Hë€ôù滟còÞ_¿îùQ§jN—¿íªæ´jN«æ´jNW¼ýƒÈþ\ñv‚WÕßTvaÔ$©*ÿ5’]ÕÉvU'Û«o”C.òYά2;‡ÌέfçV³³<‡ÌÅ!sp««õUêf}åJñŠ‚ÅàH×Xê“W¹»Íµ–9bû{ºØCÐd=¶Ñc›{,û7–Í\ÞFŸmtÙÆåm´ÙÆÝmbX&†¥bX*†¥œÞö_49ÀëñWMuü^éñQÇÿ²ò›I.'ûb°Ÿø¶­s›Ä´©Ü¹býÅ5(®Aq ŠcP ƒî½Í½·¹wù¾›Üw“ûnr¿Mî·É½ݧ|MÁ®þ´ì—ɼõ}k@ù»þ2wÊWfþ¤Ê¿Ô¹o¬Ò6Uv¶×šc³QÆ­îú´»>í®Oÿ·s±<u\yé±<ÏuìßγÑü‹ú*¿6TUþ.vŽ;¯qç5c'´2˜!îŽ\εNßZRâ_E¥ßQi•ʱ¿¨¢ËJ-áuyW§Öj-‘Ï*W}ÂÕ–q±Óβ¼/¡àN–«|‰*O«ò4G;å·Jµ§å¸QŽ帑«vˆ);Ä”Ý`y…^Fée”^¦êÓ\îär'Õ—Q}™ÜWQ~‰ÜWÉ{#—;9°,8€ê]Tï’s» òþ½¨ËÊw‰8/â¼èòÔî¢v—(ó"ÌS¹‹Ê]Tî¢r•»¨ÜEá.wÊS¸‹º]Ôí¢nu»ô׎èç´YK¬ ³"è§c­Ù'EâöJ«+¿®õ‡zµ£ò«åáfÜ8>¶Ž[LJQ²†o³£*ŒýʸÍ:¼Í:8ÄÊ¿Ñu+]·þÍ/Âw¢é; ¹ÃÐû~¹r—!šÑt+M‡þæ×Û!š½÷ëm¯c¼4 ß÷‹l0NÖapD¼¾âøSöp#öp#öp#bzEL¯Pj§}\Á>®àèáÊo}gúü¬Ê_ù-¥üRsøs¸üï©Óöb{±‚¸^±ç*Øsì¹ ö\{¬‚=VA<¯Ø_ì­FÄôŠ}NÁ>§`ŸS°Ç)Eó’;‡•_ËžåΗDmîÖîÓÍtëã&1nrdùõ?Ñ/K¿,ý²ô ßÎòïT4ì£áNî¤a–†YöÑp' û剆}4ÌÒ0KÃ, ûhØGÃ, ³bÞDÃâÝDÃ, ³4Ì“©ÖOµ~ªõSª—R½âÞ$î”ê§H/Ez©ÑK^jôR£—½Ôè¥D/%ú©ÐK…^*ôR¡7˜*ÏŒ3rÌTÔ8Ö•·"ÏÀ 8U¿¼`N½ˆ%ž/Ek”±ß–K§\:åÒi;,NytÊ##‡Œ:åÐ)‡ÎÊßp–ÿµñ”`~p™Ip9®Àw¢g‚ïE? ¾Æ\܈-ÑSÁVüÃŽÙÝŒb7þ‰î7-Z7î(]þÿmŒc0Á±8ÇcNÀ‰8 '㜊â4œŽ3ð1|gâ8 ŸÄÙø>sðœ‹óðYœ p!.ÂŘ|`Üï£öqmÑëã^Ãr¼Žx«ÐŽÿ îLÀ£(òþ_ÝUÓÝÓ™É`GƒN]v%²ë#ꪻ*ûŠ^‹ ˆ+®"‡W@@•(—†ChPA]Ë®+º BPXW<†#ã1Š d8‚ÐáN½ŸîDWWY×]Ÿÿ?y>é™îêªêê_Õïû ¤çmxG¯VOéij̇÷x‡µÀµª4h=5ÔD/ eé…¡l]jÍ¡´„Ø¢§…j)³öêiVgø Ö‹¬!0n‡aú9k80îÖT]i­Ó«­:]iwЫíŽÐ :C>œgA½Ðî ýôT{6,€-¼ÿ ª€{fïÐÏÙ;aÇöó¾NOuL]éH ¿;!°ýê _ò·Cþv2 QÈ„ÓrºCNwšÂzµÓnàõÙÞÇöY¶ÏÁ]¦®pS½Z\/²ˆ¸¦ Í 9´€ŽÐ :ÃÉp ô„‹á¸.ƒË¡\WÂ5p- Ћ‰ÜÅDîb"w²(À# ƒápŒ€Qz Ѽ„h^B4/!š—¨É:®¦ÀÃÀ¬PE0¦Át˜ÂL`ƨbxŠóæÁ|½„»¾8´YÇCÌ®P>…-ì¯a›‚ZŽï†½ìûRÇ- ÐÕV\h 9Ð:ã`1DÇ«Û_±=“m¸úÁ ÐëÅDÎb"g1‘³˜È™LäL¶¸^‹ë%‚–8·ûc#¦£©fÀ£0fA1 ·„¯·žƒ?Áóð6¼ïÂ{‡µ°Öè„÷a#$ Z/eMXÊš°”5¡RàyÄ~àÞ bWà}X'*X'*X'*X'*X'*Ôv]©vÀNص€gRŸ:T¡CúRQ§¢NEÊ?/ ZW0ß–Ú¬6sßf®ÛÌu›yn3Ïí«àjèC™¾ÐOW؃x_Ãà£á!˜Ì7›1²#›1²#æS…ý4Ûl_`» ›q°›q`®-e®-e®-e®-e®U2×*m®É暘s̹¥6ãÁ¼«0~.j$Øà@\ÈÿC9¢à?sº»è"΄º„/!ÆKˆñb|1>ŸGŒÏ#Æç‰‘"‹8/$Î ‰óBâ¼8/üÏ’ÊåP­‹¹£ÅÜÑbîh)wtwtwtwtwt…8$Žã®qW‹¸«EÜÕ"îjÑÿ«¿‹7O9fWÑÅìÆöø.1ÿG›=¡—hiÔÏ›·éÌA0X?€f*ûê‰è¶¡ò¶8™aäéu"&׋lY ɲ›D®¬Ör+ï·‰N²&xªCžÜÉv—ˆ©‘«†Áp¸FÀH÷Âhca\ð­BÖ‹BÖ‹Âû-¢½ˆh/"Ú‹XkJ‚¿ÉÏÒŬ1…¡]"‹õ¥„õ¥„õ¥0T/r- Ä–•M!:ëBëd¶]á4Ñ…5¥Ð:׃u ëG ëG ëG ëG ëG ëÇ<Öy±dbéë¿õ¯ÔUßù»}ÿoñ/Õ+˜iÅÌ´bfZÑ×Ïáúê\þ³·f³¿áù[ù̦¢à\[(ÿT1ÇÌ)eæ”2sV0sVØ»Åqöç°‡òû9Nü1ƒŠüçtýd£ÿÍg}}ãoíý¿£w{ëb—ërÇèÜqÀ¼q™7.óÆe޸̗yã>E0¦×ë΀Ga&Ì‚b˜ sà1xJ`.<Oãã΃ùð4< DNƽ¢eÆhcaÜ÷Ã0 áAx&ÀD˜“a < @L…i0…™0 Ša6ÌÇDËÈ)"'3,Zfº!Z¢×2 ªƒ§˜¬ ž|’kÞÃjc5‹±šÅXÍbÁ'&„Áÿ¼Ê ˆ@2! uÛ²¡4‡ÐPÐ(€$ ‰H²òå±òå¡R(J …H¡R(J …H¡R(J Å*YÀ*YÀ*Y nÅi „Û` †!0n÷ÿ¯:Ü wÁÝzä÷®¨£tVÓ¬¦=XM{°šö`5uYM]VS—ÕÔe5uYM]VS—ÕÔe5uYM]òn y·†¼[CÞ­!ïÖwkÈ»5äÝòn y·†¼[ÃÊ›ÇÊ›GþõÈ¿ù×#ÿzä_üë‘=ò¯GþõÈ¿ù×#ÿzä_Õz:«õtVëé"¥kÅvØ;aÔÂnøöÀ^ð`Ÿ~‰•½Œ•½Œ•½Œ•½Œ•½ŒU}<«úxVõñ¬êãYÕÇ£éhúš>¦O éhúš>¦O éhúš>¦O éhúš>¦O éhúš>¦O éhúš>¦O éhúš>¦O éhúš>¦O éhúš>¦O éhúš>¦O—‹£\WÂU𸎓‰âd¢8™(N&Š“‰âd¢8™(N&Š“‰âd¢8™(N&Š“‰âd¢8™(N&Š“‰âd¢8™(N&Š“‰âd¢8™(N&Š“‰âx‰r¼D^¢/Q—¨ÀKTà%Êñåx‰r¼D9^¢ÜxW¸Æ{‡µÂ%‹ÅÈb™d±˜‰ß!“ÅL< Ù¬Œl6€l6 Èf}u­9êÙßÌjæàé.=Èl·‘ÙzÙü§$½ ïÖÏÊed±"*_×äZý"Y.F–sÉr)²œ+7ë*2]i㳋rƒç\îdÿ."ËÅÈr1²\Œ,#ËÅÈr1²\Œ,#ËÅÈr1²\Œ,CI§PÒ)”t %BI§PÒ)”t %BI§PÒ)”t %BI§Ôlí©9ð<%0ž€'á)݃ÌÙƒÌÙßUŽï*Çw•“E]²¨KuÉ¢.YÔ%‹ºdQ—,ê’E]²¨KuÉ¢.:ÓCgzèLé¡3=t¦‡ÎôЙ:ÓCgzèLé¡3=u@ת:8‡à0z8 Ì 2óx2óx2s™9NfžŽÿKàÿø¿þ/ÿKàÿ¸„$.!‰KHá’dð¡­ÚÃ)$q I2y™¼ DŸBô‰ŒÞƒŒÃ5$CiÞkíY 0AŠ™>†£Hâ(’8Š$Ž"Iæ‘ùc8‹$Î"iµ¡ìñǾö¼ï¬µ¸Œ$Ê Ê fÊñ®lOy¸Ž$ ¡ !†óHâ<’8$Î#‰óHâ<’(‡”CÊ¡åP`±ŽZ¬£ë¨u7À0=51òk5ÁŠŸM $â(‰¸õ¤p­DŽõ"¼ÌëWÙþí:]ŽÊˆ[ÜK|oÂòŸÈy¼Ž£8â(Ž8Š#Ž.Ç —ã…+ðÂ(8~¸?\nŸ)\}: ÎÐåNw¸ºoâý¸þȾ[ØÞ á6¸]§PhqZ…wî㜩ì–²Ïé çO¼~èDXˆ\<̵…›êòp3áºWêJ_è^½õ”Ý÷:^еîH¸¾Rz÷óúA˜ b(¾Š/†â‹¡øb(¾Š/†â‹¡øb(¾Š/†â‹¡øb(¾Š/†â‹¡øb(¾Š/†â‹¡øb(¾Š/†â‹¡øb(¾Š/†â‹¡øb(¾ØÿGÅû–âk&Šô…F?ÑÇè7ŠÆÄÆMârc€`þNüÆ(Î’WëkdoÝK–ër¹BUºm˜-·Ïx/·ë¸Ü—Ú‰ßÚ¥ëD[Q”Þ.JõV±Zo¥ö³ŸH{9µŸGíç5>I¶ÎV4­äЊK+gÓJZ™&_ÓoËå°B»r%Û×uµ|ƒÚWé§h}>-×ËmAë—Ñú\Zwi})­W GÆ)±Ž>áäåú^©×È÷Ù·‰Œ¸™úö}{‡’ýÉqJϧôDJ7£t)¥¯!VpÆXÎ/NôŸ/Ioç‘ÍFöh^B&¨6‡úÿ·Sœh®ÒÃÌ¿ëùæ'âLó~4ýü ýŠ|ì»BœÊ¼EKåøQWn¼hœ,£öz®h ™zbc¦v=©Ë•yrWnâÑ™ÃþÇàq(R¨×kÂBW†cËü 3¯Âäè0ùÙ½ nƒÁ0î€`¾»Ìw—ùî2ß]æ»Ë|w"˜ Ó€þº3àQ˜ ³ fÃx ‡˜ OÀ“À5ºó`>< ÏÀ=)ã"Ïè Ã%Àµf\—C/¸WÏÏ c`,Œƒûà~xÆC!<Á˜“`2L‡á(‚©0 fÀ£0fA1̆9ð˜ž9EOÊ ëù™.dèùB±ú¿ÈÊŸ’Ée›Éc³Ä(ÖÏ{a4Œ±p˜µôÔÃQø’µª“öðÏþÙÃ?{øgÿìáŸ=ü³‡öðÏþÙÃ?{øgÿìáŸ=ü³‡öðÏþÙÃ?{øgÿìáŸ=ü³‡öðÏþÙÃ?{øgÿìáŸ=ü³‡öðÏþÙÃ?{øgÿìáŸ=ü³ç?ÌxS'ñ¬µxÖZ Ö>Y'íS‚§úOõµ|G[ÇÑÂq4pýë¡=ô¯‡þõпú×Cÿzè_ýë¡=ô¯‡þõпú×Cÿzè_ýë¡=ôj-zµ½ê¡Qý't&Ñ¡´Ýé¡7=ôfm8['ј ј Ñ”I4e22FWEÆÂ8]ÍÖ»£Í 9´…à~ö?ü玲zy)ËÅir™¸IVˆvr¥hÅø¾+ßÍä*ÑQÆEOƺgàë7ˆóðö1ù¾ÈgÜkýßb£sªØ[-º z¿Ãöÿžaª¥áwÙù´ôº.£|YÐæ‹+$íub_¥_Rd— ×èWÀ•p ù¸7÷æ;7—æ†ýO]Uô'—ÙqVðLdò!}hØ“K¶L±·Ù²”lYèAÜ8-W£„vˆó‚ß)úeóéƒÿy5ô¸áùÉÁS¥}Mäÿ»Iðü¹Þz½,`l^'†Î1Îí­7ðîcJ/G ®ÔxWÅ»Áœ·RæÝÑQ(j682 QȤūÅq²þ»ìƒÅez5}JMëTÈWÃ`8Ü#`$Œ‚{a4Œ±0Näãåóñìùxö|=OžÿÎÇ{çã·éKÐ×r4Ý2Æj¹þLV0‹Vêhqêös®½@œBLÇQÏ®=[dëÄñÆzѾñÿ¥Ý,ûPªáIͧøOj–ƒƒ¿ézGGß‹Îr6”ëÜé“P2/©3Äɪ»hÏhõ™œ‘I;¿ànp–ëÏié ¥(-종¸¼Žö¯Gög{#ÛZY§?F#×¢ñ³I„8Ë–ÿi,”Ρd%s(éQâ€h.ªYEÑPb[ÃÓû‚‡³eஇXqÔ·ŸU÷gx~¾"eé:<|¾\‡G®Ã#×á‘ëð¾u´y5×Ú›Z ¸sqÎòkócÚâ[m^Gýýaˆ0‚¶×2òëØ¿žö60ΕDÎF”ù&‘ñoµ›ÑØnµÅ¸Šzj¬¢ÆZjô¨Ñjüí[(È™”ödï Iú‘”w÷8ÛÒrsC_ê83ƒ¾Ôs¶ïP<ñsQ-N[aĨ‡£ð¥è@Íý·tóìzqµìÏöF¶Cp2wQóp½JŽæNé³™±¨ƨ]po6è—‚ÖÞ×›™sÙ¸œ£ÄH>1’¯¨[¥A‹¡,qºÝúB?ÑÁž ` ï?ƒ* Ÿööíg[GßÂô¬Žu¡7]¸ÖìÆ»Cveø÷x31ãGZý¯`dR”ÎftRœ‘Íù”ÓÏÝŒÌôÕ£¯‡üq ΊñÉ="–ó˜»uÄsžÆJX%Z4èuâ5ÅÝñÿNk‡^|’Ï’”rÙs€~|õ„¸Æÿ#ï&Fîaþo'v0þVã3íSœÃÚÆÔÀ9b=¹þwŸ`PGâô%Néì t5-.Žc;Xƒß»’Ϲ¡&:ª…Ý:e †!0n‡a0œz3?Ág’š“òn®hWZÅ}«Ö;¹Òà WªÒëzZYxïôÏ£ýó¾ž%}¨©ÜM߆q_ª8³š¾û>ºÁmúW·Åÿ $úçÑ?þyôÏ£ýó,ÿßTºœ»¸þ£x/Œ†10–š>5©3kTfãsèýç<Ö¨ÙŒòRFy5qYN\žE\^(Ÿ'^«èY5×ô†<•âžm×Ibòtbòtu¶N¨§D5æ‹.¡&âÂжµlwÃ^ÑÅêìÿÛ' ZC`(Ü~ÿœÆ{äÇL¨1fBÁ½ª " ~ûPJ¿5–Êi,•C¿=Jæ}óï¿%§Ÿ•‡ô¼^RÙz^.©:¥ß¢ÏƒÓ[Ø[Çž:ÕIÿŒZ§7Ë:îT=g¥¦/u• éÃÊÕõ =BÉ*Jv Î]ÂÑ{Ôv 87.°Nøç~I4hÎ ;87‚ËdÛIçŠ,J¾E+õ¸RžÕJÿ…×ÓêQ}„3×sf­ÖãF=z\«PEÔr˜¡¦õÔDÓŸq§ãcj9@-õÔ’öû´ÝpöήçìtÐ÷†>„DsÎLªäAÆìÛÃŒ*¹ñÊòKætZo£¦Ãô¥JY"‡Úª¨­N…Éò #Âõ‹°ŠêmÔ|˜>=âgÍt5úc’irŽ\JEyÝI‹ Ä Á9”j¸+á ”g60ºÿt¿Ð÷‰³àþeƒûBÙ¸¢É{DäÇŽ?Qü;1~ŒñŽ|ï8‹L•-ÕŒZ[ Wµ‚֜ӆóç5jUµåØI¼ní9Öc}U©šSGkŽžÀ¶½?*›wxÕ‚2­‚£^PW.ûÛòúD^· J{~= J· Z=”8)hå€È¢_!ŽÖªæìi-E.ý‹Q²–:séõB[ÞŸÀñá$ö·£L{öuàuGÚȤ–}õ¯0¤rh½•µøg§è¿…!•DZvk8;$šÐ—³wWÚ’z[Qª5£×†ý í»Ô°;“8ÞŽ}í9Þý~Û\õ7ãhs½Wµð¯•ˆ úÀ½lC»Ç³/—2mÙweNôÇ€2A_(Ó2Yéüû Ƶ¥Èn¼Oõô#›~dÒX0¶'ñ¾á>ÕÓ‡lúéß•`ôBgíÿVïýën8cÿ×½Žý§1Á¬}ŸWÿÌö¶"úccƒ³ò˜¥ÇˆŽš¢éO#ÔÖŒ=ÿaœpvD÷߯ µ4÷¯è§‰îÄ‚à>þG1\QôÇÆ mBÍ֥׳vaÅQ¬j]å‘ô VµÖòhz«Ï2®gUk¢Béõ¬]X«ZWN¯`Uk­2Ò«X™ÎPÑt=«s0ý#ÒŠ‰2"QÕ2ý#ÒLµJ×ЫvŒŠbTL•K¹¶”;2'ÂI”Ë£\;ʵ§\Êu$jÂ8µëBéŠÐª@Õg£rsQùþïíQ{9Á'•ýÄ™Fq¡q£˜büíMœåîÐ5úoò÷¨¡ÞznðéxÿE©¿¥¾úÄ¥¹_¿{ñëw¦ÅwBt爓ñÜç‰SEOq¥è*®¿gïµè¶³Ä­âaq‘(Ï‹ÛE¹XÁ»•|Oo‹Mb†Hà9ž)#&þ×hm´›Œ\£‹Øl\l\ÂÞËŒ«Ä£qØcÜ`Ü ö7ÄÆ`c¨8h 3æˆ#Æã|çsùnk<É÷ ÆŸŒç•ÆZ#Ï<ÕÌ7N3»™§¿2»›Ýîæ¯ÍsŒ3Íßšçg›š瘿3{çš—˜—盽Ì+ ÌkÌÞÆï̾f_£§yƒyƒq±9À¼Ù¸Ä¼Å¼Å¸Ìh5.7ï2‡ט#Ì F_s’ùˆ1Èœjw˜sÌÇŒæóÏÆ(ó/æßŒ‰æßÍMF‰™0«Rs»¹ËxÕÜcî5–™û̃Æró°Yo¬2µƛҔÒxKÚ2j¼-c2ËX/³e¶±Q6—­ŒMòDy’ñ‘l'ÛIÙQv6>•?“]Œ*ù ù c«ì*óm²›ü•‘’Ý噯Ny¶üµQ+Ï•çŸËßÈß{äùò|c¯¼D^fxò*ÙÛØ/ûÈ›ŒÃr°BÓwÉ{Ì-G›r¬kFd±œmFå¹ÄŒÉ—åËfùª|Õ˶2Íz«‰ÕDJ+Ëj&•ÕÒÊ•Žu¢ušŒY¿´~)O²N·zÈ<ë2ëjÙͺÞz@žiZÉ­IÖ9ÀšjM•·XÓ­òVk–5KÞfͶæÊAÖç 5Ë9àP³CÎ!5'Ìb¦ «°R%a;l«¹a¾ÔáX¸‰z2Ü4ÜLÍ ç„sÔ3áÖá6jA87œ«¹Wº}Ô³n·¿zÁàP/º·ºÕŸÝAî õwˆ;T½ìÞáÞ¡^q‡»ÃÕ«î(w”ú«;Ú§ÊÜ îbµÜ]é¾¥ªÝîǪÖýÄݦö»‡3Z©£yÓB¹32æ‡Îx%cEhnÆÚŒ}¡…;Ò2´&rJä‚ÐG‘Þ‘[Cu‘A‘;,;rW¤ÀŠF†GFXM"£"£¬¦‘Ñ‘­ìÈÄH‘•™™fµÌˆÌ´:DŠ#ó¬Î‘§#O[Ý" "‹­_F^ˆ¼lý:òjd™u~dyd¹õ?‘ŠH…uQäõÈ[VÏÈ»‘ Ö•‘÷#ï[}"›" «oäÃȧV¿Èg‘½Ö€È‘CVAäHä¨5*’Ž kLÔŒšÖ}Qµ¬û£áhÔ*Œ6‰6·&E[F[ZÓ¢­¢m¬éÑÜh;kf´C´ƒUgÍÞ}Ðz":1úˆõttzôQë¹è¬h±U},ú˜õ¿Ñ’h‰µ$úDt¾õBô™è³ÖË™ff¦U–™•ÙÂz3³uæñÖ»™3Xk…~€Œ"2Ê›¼&:жâ'ùÒŸèOEœ•Ðë¿÷x½.ÒKø®Ó#xwƒ¾Y/ÖKyU­Ò)~~ÖX¶î;gûGSÚãûDz¿Sjþ`O'Ÿ¿ñ>AíÍüŽùåê#~ïô¼öÿlÑ÷ɯkØþõ«ªïio½þXïÐïð]¥÷¢ÖÿÛ¯Ô9/¨¹Z×ê5_µ®k¿Órm0jµ:Éèß(Z3býž7­ÿ¡†ôý¹Þ§·ëm_ïjÊÞσc/s÷bú^mýÞs)¥wÓzÞ!üQËyâ܆Þsd“ÞD´|ê¿:FÛOê¹þUêap©þ¾_OàÕ§_ßõÍ«ü§sëëOhûuý7®ÞãN…|ðO%ßüÁ1Ø/#MO ~zzµ7Fá7Fæ«ò±}úÞH¹‹‚«=“‘oì¥Þ©wòsGcÙCß9{cVãÇH㼨­‚m屯öýN~ëÝ o¼~íß«¯Ÿÿ£EîX¥é?Ъ?w6¾9Ytû—eéÇý8ñcèÇémþ]çÈg?xî^¼ZüÏwÐ_~àìj(V¤ÿ1óÿÝ/¢ú@ð³ò{Æþ­öÁ–Ûnã¹+·KÿƒsŸ~¾é_ÿOüÕýÛÞÞp_õaÖÒÏdíÿzTO‡«ƒ6>køÙðÝxôû²cg¾ÛòÝù[=\ü\Ûðý/Îîú½g×?wëý¬]ûÕUŽù«ÚNý‘?ýsÖð†œÇj·Z¿­ÿ~̳¿‘Uõ$q"+ò%â2^ÿ)ØSIžzM'Žyö7ò–žAÈà<™AÁž˜ «ÿ±:«m?ƒGþÙÝp­ûu™~•{Ìuék}ãWŒñëÃþ‘ÁÑåú¯z¥^ÑXv÷wÎþFfg¤bAò³ÊÅÁžÕ´^®ËÙö1tAÚWïèku/=H_ÝXö;+™žÄ¸¾¥ßÓŸ~k1E?1‡.ðëSý¿:‹ED,¯ŠNbÞ=?ðî¿«ðî§‹ðî=qé†èmô7ú‹»qÏWˆß7‹á¾c÷˜·™CÄH¼oBŒ1?2?cÍ*³Z<€Þ. Íæ.ñ ï†Å³Î<(&™õf½˜â»añ°ï†En8CL“þ3‰fÉëäõ¢Xö—7Š9êõŠx©EI(+”%ÖXK­¥âmk¹µB¼c}d},Þ³´¥ÅZß?‰u¾íËí^âCß?‰}ÿ$’¾ŸúþIlóý“HùþIl÷ý“¨óý“¨÷ý“øÿ4Ýö£öÃò]”ñ]”õ]”‘é»(£‰ï¢Œ,ßEy¾‹2Nö]”q±#ÑÛq×èëDœL£ŸsœÓÔ¸Ñiæ´08­œ6Æ-N®s‚q›“ç´7†8¿vÎ1îÀ9ÝlÜ…Cšh Ã!M1îñ=1Â÷"ÆHß‹£2î͘fŒõ†13Ò$ÒÒøkdqd±ñz¤:²×xÃ×øÆ:_ã›|o|àk|ãc_ãI_ã[|oló5¾Qëk|c·¯ñ½¾Æ7úúÝ8äëwã°¯ßtf83Ô™Í2[˜Væ¡Ì#f˜¸ÙÄÄIÜ£äg‹ÇÑ7%b{òm‹EâyáˆR¢Ê ¢Ê"ª^a±œØrƒØr‰­5ì[¼/2¨u#çnâ;J´},2ERT1Ǫ‰¼DJxÌš}|Ÿ(¾ÅIâßyâ°øR´iâò¸ .Ûq)ƒ¸Œq!.‹&æ¢3DgÑ™ÍÍOˆÑ¦Äh•haV©­ƒHmDj‹ R›‘šDjSS›Z4•‚xÍ&^M~ò%šµ6¯¹í¢¥ ÁÙA·"‚¯íåõÄqâ¸?¯o$š;Ñ܆hN C}¢¶ SÕ¨”°Ôvõ¹ÈP{Ô~q¼: êDLTGE®ú’¸oÄý AÜ· â¾M÷m‚¸oCÜÿVdÛçÛç‹ ûû¡ì ™ !fÂEìéi÷dÏÅöŶ/±/Ž})3ä$fÈåœÛ‹yæIÆÿQ÷5p6Uûûß½÷ì—9³ÎÌc^ò2ÞßÇ$Íx×UW.%½\Éœ™‘ºøÍ9sF’3œ3sÕH’$T’pUH®$IRI’+—•$¹Þ’²Ïúž3ÇA”Qþ¿ÿñYÏ^³öZk¯³ÏÞÏz¾ûåóäršwâl‰ÅÙr7Õ4ûš÷PœÙÏìGéfΟJ|þTâóGÁù3­›Ô)4½()2‹H5‡˜`+CÍ¡èùAœc18Ç|hUl£|„9õGâ¬sòY§à¬+CÑæ£Øîœq8Ÿ@Éxs‰:O™“P2ÙœŒ‘L1§ g&9ä™IòÌœ†V/˜/ |¦9ýÌ2g¡æ\s.Jæ™óÑö5ó5ì‡æ"ì™7Ì·0Î¥æRì“·Í·1ªÌ1ÚUæÇèóß&ŽIósG£¹ÙÜŠÞ¾0¿¢kÌæ7Ø'»Ì½ØÖ>s?Õ2¿5`O~g¤:æ÷æ÷Øâ!óÆ|Ô<Šš?š?bí1óÊ›Ç1’æOèÿ¤y=Ÿ2O¡çÓæiªlþlþŒ­Ÿ1Ï ­mÚ#y„Ò$Á#@ð<Á#@ð<)޶F“*Ù„¢$›"Ù„ؤ8Âá§xÉ)¤S6‘ˆÙ³…œ1ÿ‰9Bñ’_H“üB)à—o¨²Ø%vQ¢ø¯ø/9Ån±›’ık÷н”,ö‰}TMìß!PDýïÅ÷¨sHBÄÈ?Rª8&Ž¡ÎqquNŠ“X{Jœ¦qFØ”ìÄéO•%s£œQ@ÝiPøËAUœ1ÎÔN'U—UFI¢3‰R%£Q­*°š3 uj8¯¡DgMgMôPËYù:Î:¨ŸîLG|‡rðJžwNCÿ/8§£Õ‹ÎÑóLç,ôùçKTE2 1R¼d@ŠK½bÀñø§…p òÏû4æ>Ì7ùù´ø-e\üûà=>÷ià¾ÏÁ•›h3ò[ðÏdîÓ˜û™ûª0÷E3÷%1÷%3÷¥0÷¥2÷Å(qJ ¥Ò8XÓ)nÅ ¢ ŽQÆ€ûnUo%•™Ñ3öJft03ZÌŒNfÃÊêUþ¿’+1&¨?«?S,s_œ¥EQ%°ž…¼CsP¼ÖGëCÕ´»µ»©:³^³^ ­ŸÖå9ZÊ%¦1ÖÐò´|ªfÀ=¤ûŽ’ Ö;MÑÌw©ÌwUäUQœŸÍΤ1¯™`´›’Ë4æ2¹,ÙìiöD‰ä2ͼͼ ØÛ¼5%‹Ua‹fK‹¹pnç™yÀ|35ï5ïÞgÞ”Œf2£E‡mˆ9%€Ñtæ2Ó|È|ˆm8êKF3Áh~äƒ\VjþyÉh&3šÆŒmŽ5Ç¢Õãæ8”Hv3™ÝbBì6Áœ@sœÉ—Ê즙σ״¯M7§#ÿ¢ù"æ sjJ¦Ó˜éR#˜Nc¦3ÁtK‘—ìfšËÌ÷ÿÀ\”ìf‚ݶ"/y-‘y­ óZ4óZóZ2óZ óZ*óZŒùƒùZIv«Âì–Ìì–b·Ó`1Y,ÆR,…´ 9†9"Ëásø€##Èáðƒ}ŽG Jv÷ÊM¸Î1û¿—¼Fy±¾åÙíHó_ÛËËdôÂWOÉ+dÁëEÅás¯`^< ­ßZ¸ü‘ý^ûn{*/ü¦Ú;íu2Úû­×Ñ.ÚÏsóò:køZÙD};í/åÞ´7‡kýõBW®yŸK7€'ksÙ×¾ÿÐ#4’È­ÆQ{.Ûqþ¯o¼ðzŽžÙÛÇ+rlþúÇ^Z~:’E¬û¡|ô<Š_ø=ím¿|.ý.#»ìžíéöd^³×ãÈøi¾=ÑÞúÝÃãç+‹ëq ­®Ðù~€"îBï›D¬kíѽr$ˆÃvNÐ/Þí¸Ò~ɳ£?Š}uI^5:~N­ý¶ü¿ö _óÚ÷ÛŽ•+e¤KöýKW›/^{•ý†½Ò^ y ùà•Í¡k”ûµvŸå¶Ëèû yý2Ä}ûùÐa0ˆ¼+2?Ø?þþËdBþœë™ö\’ü”Qþ­ÀºÁR¨–½9x'ÀþÆ^ÇËqåWø®ìyw+x÷È~5ü÷óö@ûQÛe¿‹|ßpig{°ýÏ4çíõ_b)|ƒ¥ö»8Æ/zí´‚ã>ÂL½ ïñÈYëpä•q{ë%{[ýûŽîr>`£Ðý7{ÈykVÚ‡óá G„ä‹]˜Y/ù.²5ɘò·à}ÃÇçþÐ~ÚðvL¾|þLÈOiEö%ÀvÌYÙSHüZwø×öùoëY¦Œ¸ VÎA=ŽßÃÛ:çÈãómÏóûŠÞWªè'¨J#þ¾¨ú‰¼ƒQúöï;žˆžo¿ŒÊ|ŸÇº§x gôny‡Ð^`Ï Þ)e…Ô—¼«ÇÏÈã£Ï€ðQ¾³œ‹Cù/)ûœãè\mVóüçþøO¤†”÷äìïä¬Éçéû«ó9ç¾&ßY·¿»´ã½|u£4ŠÜŸ8~N°ŽúñÒñsLÆyñûÏ—ÑÇUÝ?ö4{”=ÎÊùˆFgÛτְ?ãåw`âïÎ*· m¥³=í Çùb¯u¡+1»ìMöÚˆgÈXW#âùÔþ!üü@Ŷò+×l.Ùö©½±<ƒ´ú<4ðóòÙVü{fëê}ÀÚ.[z§ð_âï"D*9Ë=`Ÿ²ß´Ÿ´³0‡¬‡O¯Ø/gOáE+iðwý ôW(Š ^  ˆhêÊ?—ñ\×Åz8Ä{Pòð>èÕ ~e¬ß*£¾ß;V¹Ü”Õ>Œ"îÇqz(bÏ28Ž×â [ó‹Í¯Úãœùì xéƒÿw£ù¥}¯ÝW2¤Œg€ãð÷û_œE|8Þ´o±Ç’Œ¿vTì»Ú¿ŽŽŸ®î/ïSÎúö·>?z½ü¡×ÀBŠòæ¬ï¯ì:_E¯Èû¿±ækü´ñùO‰]î§Ö¶ÿÍÌñWp­Ï~ò÷ÉE¶âwûà•üò¿çÜvÑm|iŸ¼Ú×,.ÿc/á˜áJ÷Gýße0ØçJßlÀLS»5|-9|õ‹Ÿ.?·?ËX#ס>dV`‹*ÂÚò×?¯…®þ¶§Ç?£üÿÃ'µ"ä5ü ´Ú9³È÷80OûcîBþè×£¿>cÙ§+ÐóÆŠ<¡ÏÊß9•ïËèK´’Gp*ÝŒcô*d4Îïã8àëK3_¿Ê×m"GyEý|J^°ªaè]‚Ĉ÷.§çO±ß>-ߊÌq*¢|{Ù¼¥sÆñWÙÙÞBivpñ‘ï<´”K{iðyËçl´›Êsޝ}/ }‡ò´wñ o¶¿ûc®æó!Á{U[ q6":Ý}~3†ïØÈ+ùí;øï5¶µÚ«ñÞ´=¡ëšçÜÓâyä^»GF3½ö å9Çï O¶ß°WØOÛ9öJ>"RùÎö†òˆÊþYFuåÝ!»ÈvsÙ1ìó¯ìéø.oØ ìWBwpι†ÅsÃöSç,{UøjÞ*ûEàœùÆ^h?…²C¡ªÑ‘Ó/{Wûs5îÈðQ|^á‚ãý*lýË ÝÛGW`BG߯÷S )ºr>º¾Õ–ßg–ü~ÚPðÑN¤=8ûöàÌ鞈³[qý˜ðÖFØ]CÙàç•á÷9ÍàÓ/¡zK.2ö ãMßóŒcûí[íB¤‡©¶ÍUBüÎo`·³;Û÷Ù÷ ÷ŽLßt{Žý1?{ÜZMªG±Xò»å8âçþê~¸pL ‚)ô×R|§ˆû¡§k2 4¯!ùñ•¿G¾<¢NÒ™#¶°»Ø»ÀKïÚnô1ŇïµÔ~„ã%øŽ°ŽœÛþ›ý8C[ø‰Ogó#"!~ó<ødÀoÖçnqÿ…ï4þ†V‡Cç.G¸|ïæ2xUÜ%æwÙ"•Úâ÷WéÃ_ñêò*¥?+ªR…ú³§Ð0öÍžBc”>Ê=4^ù›ò7šÈnBO+(chŠ2V™Ló¥§-•žBô¶ô¢eÒSˆÞQÞS>¥wÕjKZ§fª­i½ô¢jµ}&=…èsõÏêÍ´YõªE´U¦>DÛÔñêS´]¥Î¢êKê|úF]¬¾Iߪo©oÑwê2u9TWªÒaõcõcúAý—ºŽŽªëÕÓ1u£º‘N¨›ÔMô“&4'Ôâµ:-}Èf_ b_ ]K×Ò“},öŠÑZk­'{ŲP<{%° Pe­v·’¨õÓr”$ùî…’"½z”ªÒ«GiõfÔr¥ôêQò¤?r¯ôçQèñz%å>=QOUþ&]z·téQ†J—Å']z”béÒ£Œ.=Š_ºô(ë?ê§”G¤3ò¸tæQ&IgeštæQ^Î<ÊLẹ́̑Î<Ê;Ò™GY.y”O¥3²I:ó(§¥3bKgU•Î<ª&yT]:ó¨†1ݘ© éÉ£ÆKOµ’ôäQ«JOµ–ôäQëJOµž±ÑØ¢6“n5&‹š€Ñ¢Ñ"s_[j‡9µ=ØM0» f7'Øí´ºÿâÀq÷ ï~”ýC|çÅvŠð¯ ¡aT™¿DN#© ùÁ†I`CAÉŠS‰¥~;,U‰?V?ÖGI¥5U*PÞXiŒ|ðf2óf3ðfOà-`ÏŽìÈ–¬ÜmÎÚœ9´8´å#”2j©ŒVF£ÏGÁª©`Õ'(C¯¹3r-fäkÀÈˀ«3/×a^N/ÿ ¸ì| Øy=ðßàèêÌÑÕ™£kƒ£¥kN0u]fêúÌÔõÀÔ)ÔPKÕR©‘VU«J$k#Ö¦`íúÀZC´wScÉÝh•¥e³µl¬m§µ¶×Ú£xG‰|Ï®3¿g×…ß­ëÌïÖuá÷é:Óý”ˆ*#Ì>žœQOFM¢k£&GM¡JQÏDM£ÖQ/D½HU¢fD½JÉQó£Þ °ÿ›Ô\úµQK9P9CÎÀx=žÚê•ôJÔLÎÔ3Ág¤éŸëŸÓ5ú&}9õÍúfŠÒ·èÿ!3Ä6”|©‰’íúv2õ¯ô¯ÈÒwè;¨²œ9(FΨ³WßKqú>}Åcþø–ý€þ¶uPÿž*é‡ôCTEÎ(ØÖú”¤ÓÑõúqý8FuB?‘ü¤ÿ„üIý$ò§ôS”¥ÿ¬ÿŒžÏ*U24#в ÝÐIÁŒ¶Ø‰ïâ7è§Ä(A¥F)zeŒBÿcí#Æ#ès3¥Ê¹™šbn~’ZŒ ÔBÎДŒz2ÖN1¦PŠñŒsßxÎxŽÚS©ØÏÓéÀÔ\:ë¡>fqô0ט œgàÈ4æóÑö5cu4þiü=/4^ÇÚÅÆb´}ÓxåKŒ¥¨ù¶± 5ß5V`í{Æû”!ç~”l|ŒškŒ5Èb|‚:kOQg½±#ÙhlĨ>3>Ç87›¨ª±ÙØL­Œ-Æ´‚V@ýíÆvôö•ñêï1ö Ÿ½Æ~ÔÿÖøõ?¢Î1ãöÀqã8ÆsÂ8MÉROP è 'ò±f%ji&˜•)ÕL4“)ÃL1Ó¨•YݬIÍ 6êS³Ùn0™é:³‰Ù%MÍæt½ÙÂlZš-Q3ÃÌ@Vf+¬Í43Qžefa+Ùf6j¶5Û¢¼Ù[‘ï*RµPs©Z€P-@¨ T ªÕ„jBµPŠT-”*U ª…ªJÕ‚:ž2 {*S›èÄèDj]%º ]/ý©etÕèªT5ºZt5äÓ¢ÓÐTµ„*ºb½½ÉpÜî¸ù;w §ãNäïrô¡©™PRæ˜EªãŽyÈC9!å„:PN¨óSŒBjŒS•ÚKýD™Á7a¥~"Uê' ôðnq7¥‰¾¢/]#î÷Pœè'úQ ‘#r¨¶p Õ¹"—4‘'îE~€€ú÷‰ûPç~q?ê ƒ,þ‡êˆQ€:náA¯ðbm‘BÕ¡ÉDù01 åPfÀbQ !FR5áª)JD)jþ]ü5G‰‡±ÅÑâ1”ŒãÐ3Ô¶2AL>%&¢Î$1cž"¦ ŸgijÈ?'žCý©b*òÏ‹çÑç41 k_/P=1]L§RóQ}h¾YÔHüCüƒ:ˆÙâäçˆ9¨3WÌÅÚ×ÄkÀâŸÔX, ±öu±kßK¨¡xK,EÉÛâm”@)¡ï‰÷)]| V¢Î‡bÕ‰PsµX­¬Ÿ¢d½Ø€>¡#Ñÿ&± ¸YlA­â ¬Ý&¶¡Ÿ/Åvä¿_QKè˯ÑÛN±“êI•IÕ¡2K©šóïÎQTËù°{ Šs45v>êľrŽuŽ¥ÎÇ£äIçjä|ÊùuJ%P¢ÔX*QJJ”T©DP¢ÄJ”¤¥æÐDMX‰va%ª² *Π֌‰P–Nú+þ9YSþ‰5åšòϬ)YSVaM™Äš2%Âõ@g׃]tv=ÐCŽ/Òõ@g×]ìz ³ëή:»v=ÐÙõ@°ëή7°ëAWv=ˆg׃›Øõ »ÜÌ®ÝÙõ 7ŠÓ©8YݦBÝâe²Æm ÛjRªØžÊíÊ_Q.UìõÊe] ýúp¨2œ²”bhÙk¡eGS6Tì£È?¦<†úRË^ -;™ÚAÅN¥öЯ‹€o(oPe±ò.ÖJýzë׎¬_;±~í ýÚ‚¢X¿F±rcååŠ_ÊõÏTY½úµ2û2kbÙ—!–}Ø—!–Õí_XÝ^§>ªŽ¡¶Òu˜na›ÆŠ¶±úšú5T—@ÑÖa-[—µl}õõ(W©bk©Ô (ÿʵ{=TSÿ£~ -û•úPú>4bœê.õ¿(Ù£îJ/œêìQ[ýN=ˆ¼t…HW«G—ÞõÔSêiä¥CD õŒjSuö‰¨©)šŠ¼t‹H×tMG^zFÔdψÚZŒƒ’8èæ¦¬˜[²bnÅŠ¹‡VMKC¹ÔÍMµ:ÐÍÍ´zÐÍMY77×io¢!’‚†nEÐÐ×!ßFkCM´ë¡¤›²’n¡µ…’nªuÐ: ©¤›²†¾•5t/Öз²†îÅê¹ tó$èæÉÐÊ•X+'±VNe­Ü:j1´òõÐÊ+);êèµÔs§' ,;Yij“EwÖÐ7²†nÏ®]YI·aÝl²b6Y1;Y+›¬•“ô]ú.èàÝú”H}\…õñú8‰õqŠ~T? ” ¸ +`3Bwa¬°ÉÚ×dí›Â· «[3Bצ°–íÂ*Öd›Ä*¶ ”kS¬=«Y»°Z12LÔlm´FM©Y»°Z jS“õ¨ÉôO¬AoŒÐ f šÈ´ kÐ$Ö )¬5SŒ±ÆX(×ÇÇ)“µfÖ—YÆ$cÊ¥¾¬Êú²½1͘FYYf3 ,³XY¦²²Ì6fs¨ôå|”HMÙ“Õd¶±ÈX„VRSf²¦ì M¹mß‚²LeeÙš•e¶ñ±=|h|ˆú¡¾T–©¬,[³²ÌfeÙÉØ`l@R_¶g}™Éú2›õe;Ö—Y_V5¾4¾ÄZ©,Ë5åãJ¤²lÍʲ +ËžÆã e±¦ÌbM™ M™Œ¼T“íXM¶7k™u©kÊN¬)ocMÙ‘d{V·±‚ìÄ 2ռμ(dgVÌfô)ýVû­èì·"ØoE°ßŠáÕýVtö[ÑÍ^f/l]º®èìº"Øu¥+»®Ä³ëJwv]Ifוdv]ÑÙuEg×]W»®ÄG¸®v]±ØuE°ëJ2»®èìº"ØuEp]ÑÙuE°ëŠÎ®+ñ캒̮+:»®v]IŽp]ÑÙuE°ëJwv]ÑÙuEp]ÑÙuÅÁ®+‚]Wtv]éẢ³ëŠ`×]W»®è캢³ëŠ`×]Wn`ו®ìºÏ®+7±ëJ7v]¹™]Wº³ëJ2»®èìºÒ•]Wº±ëJ÷×]W’ÙuEG  Å_—Ú³¾ï`Õ·êS6T~ʲ[©µÕÄjJ™PüÍPÞÂjÒý™V†ÕŠ:³úÏ´Z[m€2ède[Ùè§£ÕØÕºx“u3zënýuzX=3ôDÁÚµbÊe„!6Ѝ)cƒVâ?b+Ê¿@lØàKô¶BuŽš‹b¶+ã„–'4ßh-öj Ä~q%Òÿ¨¦8(!/]ÒÙ©&» 5b¤šì‚Tƒ}Ôª‹ŸÅÏ@éˆÔHØJŒ}‘jC C‰±;R öT«ÎIÕœ–ÓB^:%¥³SR#vVkàŒuÆ¡\º&¥;+;+£Dz'Õcï¤ÎgU¬•JØA)”걃Rm'þa­ôQJg¥šì£TÛ9Ð9ñŒˆê""*¡4DD8œeÎ2ªˆh,Êe”ÁñOÄ?O#?É9…šs”á|Öù,òÒ)ý˜ª±S#öcªÇ~LéA·6RªI `)´1ô‘«’ iÒ`$/Ò°ðR)œåÈPÙ(¤1Hã‘&!MEšô2Ò|¤EHK‘V ­BZ‹´i ©¥œÈµ“Z:i8ò»ö#B:†tš(WE²bƒÛÎMDªŠT3bY/âï&Á¾r3Ú µGº!bÙ é¤;Bmä²/RÒýHWîðR- pR ç!-Dþ‘pY0EšÊGšÊO ¥Y¡4iÒb¤eHï‡ê®æú”+Ç,— EšÀã Ö]Çõ(w Ò4¤YHs -mï3ä—!½$ë®C’e[C뷆Ҕɴßg Òòðw¡ÜHGN !Ê‹Br Å÷{^RZhYûì2\¿AðK®ü;¼¾R&RRG¤®HÝÏ.åï—× é®ˆe?¤þËHžðR-ÝwÞÐàwË+õSzy‰ëÈ4*˜ä8Îé¯×yi4Ò¸Ðrôý¨¥rl‘ž þ6yÓ‘fG,ç!-Œª”“UÐÕ?ĵÝ}Z¢Ge´€»<±ÀýžDà!OUà1OMàiO=ÿÙ*p4Wõ4 œÌéXÐÝ?<§kA/ ×òd0¶ çc=íý¹¶„rºÜå$7Ñsƒÿ‘`>„½ úùÇæVõtc¼å¼|MÏÀzž¾À&ž<`†ç~ÿXÙªÄȹ« ¿BN¿‚þ)¹m<Àöž!À<ÃýSdy‰Èé_àñOËíæ oñ\íK®ó¥²Õ¨?óÕ({9g}Á¶@|Φ‚¤[}éÀ¾FŒ2¿Û×"$×–ÍÏÙV°×¿`à_kÿ‚`>„; Òñµeì|^þ„ï&à_@Ú (_o Ã×'&[•-ÊÙ[p4P;ç`ÁÉ@ƒAñ>0É7˜æh ËË–æuS Ù Ú>/°oXÙŠœ“n#9¨™o$ã(Æ1ÀLßx`–o°£o*°«o°»ïå@¦lU¶jP/ßüGvºÈuS kÐ]¾E,—áŽËÖº„;!ÐuP?ßR`ߊ@WYR¶!XÂwJ »+Å]#ÐkÐ@ߪ0z|k½dyÙ–Öp§î4Ô·qK8_ìÛ,õíŽöíŽóNô>ë;]¶}Ðôbµl—+ÝÝ(ÐoÐìb+Ð{ë*™W[޲¤l¿«‘»E`à …øí€Å‰åyY^vÈÕÂÝZ~¯âª?òe-)®‰|kwÛ€gÐòâzŒMÂù•ÅÀ5Åm€ë‹Û7ßÜVÜ ¸³ø–€G¶-;æjëîêêì¾)P ôNŒ–­J\yC g— põvŒsõqLÌ+.œ,eÍ8®pa`¢\[2Øår{Ϻ\…K$Ê|ÞÄÂåy®îaþ yÏ®d\s^~zázàìÂMÀy…Û€ wú'ÈV%^×`÷ÈÀt—×=*0;oIá^àòƒÀ•…Gk Of»†¹Çæå­gÜ䥒a®‘îñ…yÛ¼£`L,tô¦ ¿Ó[¸×›<èm$ËÝãKFæõ¶@ÉIoë’Q®QîI%ùäm 4¼K\cÜSËó…{jɘüïMå®ñî…ù)ÞÀÞÞè%%#Ç׺&¹_¬tMuÏÌËO÷ö c#¯ {å%“ò[x”L æ]3Ü‹kò[{3zÃØÖ; ØÙ;x“w°‡w °·w<°wRÉŒ|—wjÉËègi`}þïŒÀzäW_v¯Â{_fœQ¡ãœï^Ø”ïõ.:eyÉüüaÞ¥%‹òGzW2]‹ÜÛòGyW¶É|ÉR×"ïZä—º·ð7ÚÀx6ßÈ»8Æ» 8Þ»8É{8Õ{ ¿ÑDïi|w´Å÷]áÞîßêZåÞØ™?£H ãËŒó‹¬ÀN×Z÷þÀ^×÷!y Å2&–cþ¢¢ª8¶¸æ/-ªÆEõ€«Šš”¬È_[еdUþ†¢ è© Öæo)j㛿½¨=pWÑ ¡|ƒœK¶äï/êæ_¨èÿjž‰¶ç+ºCÎJE}ý»óO¬)ÙÕ_-ÊóŸéoÝï?ÃçËþþ±E8wäq{èÙûú 8’+Ϭ¦Õ0 ƒ†a0Ã`†Á ÆËcËbYÆXff0ÆZÌ0˜iº>º¾è®®®. i5MÓÂÁ°ZÌêd¬Ór:ËVè0ÖaYæt,Ë*0!³:–Ð)°V±Žu³œLà{™Ý>Ç£ØÿvãÅïUQ••ùË÷^>²Àœ`WÚûÍÉvtšÝâØßc;æL»ß3×pÆÞúÁk0çØûqŸØA“'5çÙ‡@°{ÎbÓµÃÇ·zÀû€åø¤V¿'…OmíÑÚ´Ï(lå±|vë ç(¿¿uÈsÛ™@_Ð:ŒmNë(h°$d¾¨u¬Ç¡Ö 3ÿ˜Û\lõ”›KìãÞ(s™}Âk®´Oµ¯˜kìÓís}¶Ýon´Ï{ Ì"”aìËÞd³h_9oV쫞fݾîM3{ìíƒf¿}»}ÝÜcßõfšû£7Ç<¨D·›‡”8ožyXIô0*)í³æq%Ý[lžP²¼%æ)%×[Œ7ÌÓJ¾·Ò<«zkpDq¬Â<¯ôÖ™•R< J¹·1èÙÍËJèå(èU¥Þ˘×³W4o(œW1o+²W7ï*ª×ÓdTZ½þ¦hÅëí Æ´ß®Q0ú$v F)MqJ¯w/nTN´6%*'ÁS7¼ƒßžUN{›R”³Þ¡¦tåœw¸)K9ïUšrIÉ|e²}º©P¹äm:¨\óRe®]i*W@W)×Û{šŽ*7@×+·Ú‡›ÌÊhN¹Û>Û$+› Uå~û|S«ö:LО€#t¯#Þ;þí2GRûPÓ Gªw¢é¤#bèïTÓiGvˆÛ Mgû¡žsŽ‚öݦóŽ"ïtÓ¤ãw¶éŽ0›®8{ç›æÞECâ‡-ºß™ þÎ}#DЃÎ|ÏzÈYľ1zØy0Ex Xû.Ý÷^†³Ô³Ÿ–ƒuV…<þÖ¾‹ô¸óhÐËû.ÓÎzÏuzÊi ×áÊ´“ zyß ÑW‰¾†ý”o‰è>¢oÒ³N|7xð3=ïTÁSƒ÷ݦ­ž5zÙéõ¬5^q€½ž»¤Ïï}ôÃzÅyÂsƒ^užôÜ¢×§Á§“(”Þpžõäó‡[§i|Eë´o‡¯n dòµ­ó³|Cëb ‡·´.·ó|ë )³ el­ë÷j­<Þݺ8ÀûZwÅ|w›1PÂ÷µEC mq2þT[b ’?Ó–â9È´¥jø±¶¬@¡-üæÅ¶ü@#¹­°}Ÿi;`‚«þj[©§”¿ÖVù«­i]×ø¥¶ª€Âßl;нj[}@Åá·ÛÌDs ï´É¯M øù­¶Ö@¿Óæ ô †¶@`Pˆjë ±m'ÃÁ¨5·í$¬¹‚+²¦ÚNFƒ«´¬’„7‚S°=unèFwL`ÚšîŽ÷ä Œ;)0+ˆîÔö~ÜyAqgc•® ‚îΆÚ<îý¯àw…wQ`9¸ú݇+ ûp`Ç9uaÈ]~ VÖ ¢·…awup½ØÅº# ëcX7â»'÷:ÇǸ¡ÿ…Q7¬……q·Å“‹×¿Ç… 7:O!:ÇKÇÃ= «×ã¹DçãV/¦Ü¶ã…äü ѥ´[ó” ³n7¬^a {¼\˜wû‚+ÖãA}”hXWº»¡ÇÝ}aטÇv°>n–ÝÁuåqNXqŸòpªû h¸WÖÝ#Á5&ÜëƒD“•æq²f<®Ý*l¸Ç`åëÇã^aÛ}Ö‰°Š<vÝ=E£û2èh÷ Äx&÷UO:—ã½DŸxwÓ}íøI1νä)Ý7=­bŠû¶Ç+¦»ïx¢émç9OÀÒí<Vk×9 1ªVñct^ê¸ÁD;¯ø¶˜8çܱ&ѹpLcRœ°vÛÓ7|;LºóV§ôÑwAg97;£˜\çýÎX&ß¹;YÓYº55j¦Îæ ә̔jñi–l?±†»”kI™L•mgst^ã¦+8¦^Ëè<À˜µìÎb†Óöw–0²VÐYƨZ‘ç Ö•ØNvÖ„ÖVD3­Ú¡ömÆ+]è¬cÚáÎF¦W«èd˜Zu§ÈœÔj;æ´Öú¤féÔ™³ßé!ÚÏœÓl= 5Ðç5·w´Ï;Žmig?3©uw2—´¾Î!æŠ6Ð9ÌÌi§:G™íLç8¶¢Ìum¤sй¡ydæ–v¡sšYÓ.¶/3wµË`Ë´™ÎYfS»Ú9ôPXw.6,©ÓË KڵΕ`äÖ4§-u®2÷µ›ë,Ònwn¼Û«ÝiŸeMÚ½Îm6FÛêŒbãµÎ]6ÉeðÖ°©®(¿‘ÍpÅú£ÙlW‚?ŽÝïJö'>\[àJó§€Îô§³E®{È•çÏe»øóÙ W±¿­v•ø²µ®2)Ûàªô—³W¿Šå]uþ£¬ÍÕè¯ÍøÍ¬æýëv)~™õ¹ôc¶Ûåñ«lŸËïoe\=~oHŸrõûA¶4nºý½ì×ÿ;âöŸdÇ\£þÓì׸ÿ,{Ñ5á?Ç^vMùÏC=ÓPÏŒkÖ?É^uÍû/±×\‹þ+ì’kùØ{ӵ⟣w]«ž9ö¶kô׆½çÚn_½ zK7ú¯³;z´ÿgÐãü·¸(=Ñ¿ÆÅê)þ»\‚žîßä’õ,ÿ}.MÏõp\¦žß…¸½ÐsËÓvnsôÒ.W¬—{ǹ½ ÚFî•éG»b¸J½¾+¾¡Z7w%54èœç$W£Ë]© ºÚ•ÑpJoíÊíõ,puz k?èÞ®ý cú‰®®Q?éIoXÒOwqŒ~¶ë'êçºsŠ~¾«‚ÓõÉ®jöŒ~ z tWmpÕÏyô+] œ_Ÿë"y›.«tÙ¸ÉÝ¥gŽ1Že‡2ÎŽ‹Á\A03ÐÙÏõë ]nìß»|x ÞÕâ$ÉáܱnP¿ÞՌĸ!ýèaýÖ1[({Cò*ŒQâ»ðìè:\õs£úZײêÜBô uú¿Q¿§à'ê>õd¤þh É°Ï`BÏž7Ä ç q†Ñ †— ‰è#†dëèECºá ô’!Ëð ô²á{†ï¡W"G|%í+Ý÷”¼Ï¶ÏŽRöý|ßÏQj,úXlZì”[[‡*bßíDߊ}?ögÈ;»Ž~{7v ]‡Ö¼ŒäýÕXôôzU£çQ jD_CfôT‡þ#êE>Ô‡~‰üèЯÐú'*ý/*†zý‘úõ2EQÉT…÷/R¯PµM¥P,å§²©u‚:L Rߣ¾Aý7êÔ·"~ñCJ5*Få4zŒ^Êe ¿Cµß7¾OyŒß5þ5uÌø}ãßP>ã˜qœ:nœ0þ„ê1þÌø3ªÏø?K½OÞþ;a¼fü%õ]ãMã õׯUão¨SÆßK6þÞøÏÔƻ٨á}/í{‰ú¯û~¹o—1í3eP‹¦7MoR›¦O˜r©ß›>o*¤þ€ßT þhú’©Ä`4•šŽL¦¯™ê ±¦o›Ì†“Åd3¤™&·áS¦ã¦^ÃçM}¦S†?7}ßtÖP†ß0T™ÆLoøºiÞ4oh6-˜– 6Ó Ó C‹iÅ´bh5ýÚtÇІ÷KŽ™~gÚ4øM[¦]C E¾`x?2>òeÃ÷#_‰|Ãð7‘™‘Ÿ3ŒG~1’7\Ž´GöÖ#ÿ*ò¯"ð^ŸS/Dþ r,â%üÿà"^‰üqädDJäÅÈŸG¤âý:™‘ÿ¹‘¹¹q ò7‘ÿñå¨Ì¨óÕQ¿{îõˆ_Åþ!öFüÆ cP*~#ø‹÷;Êd¢LñÌW9qD/|õœxQ¼,ΈWÅkâ’õ¶"ÅJ RòÛRš”)åHyÒ©¸üþ‘Ô¯œ©˜oAâmñŽxOÜw$ÑԷz€UFàø=Âñß#Šú#õGdFÇ¡øì5²#~`ø¢ ?4ü>7üE~jø)ÚGv„š ¿0üE‘w™ž3üÒ°ˆ¢É^в ôï ¿B±dÿçG ¿5ü6üß¿"¨jï¿î‹0¡DòîSRDbD"úhDRDJ&;6_ÈŠÈB¯‘÷šR#Š"ŠPy‹éõˆƒ_Déä ²gããÐþ*žôÖHLA?ˆéb–˜+æ‹…âA±T,«Ä£ ëE³È‰2@[E¯€ÏzÅâIñ´xV<'ž'ÅKâqN\¯‹7Ä[ ×Ä»â&|¶)Þ—Q™ñ–Ñ®QÓ#rY‚XH‚¸gO*¤j©VjxH,/Ù$MrCÙ2#]퓺¥>i@:µ'g¤iLº@ä"Ôw ®HKpvSº gw¤{Pg´%íÈ©žŸzŽY ü^ù‹¤O’@"P ˆe¢7Ñ>”‰> … AžCE ѨäyT‚¾LÞ| ¬NðÍÁ¿@µäÍÁz¨Ï òb@)èeäB:zµƒ|u€$ƒ=z½Š¾ òúO ©è¿ ³ècè ¯£1tô7ÐÉ@?ù8úè ´o$‹üÿÎO %ô(ýoôO ŸB¿ÉEèwÐömôÿÐgÐ.Èg)‰ò©h°}…d÷Ÿí‹CEdw1•J½Ž¾@½A½¾DÞX,kX‰¾LþÏ])õÕ€¾B5Rè-²§»œ¼Ÿx„â)UP%¡¯QJE•TåEU`;ýè(XÏãè/¨ïP=è[TÕ‡Þ!ï'Öƒ%DïR©‹è=ê2õsd¦f¨¿Eê憎C õ÷ÔUÄþZÁ d!>*;*Id÷œõ™¨<ÔLvÌÙ£ £ ‘UUŒä}•ìsF5D}¹¢Þ‹zµÀØ®¢-Âýü÷n„x@ Èa€"ôM!IH2„la¿P  ‡„ÃB…P-Ô ‚EàAlMp >¡[è„SÂaD.…ËÂŒpU¸&, 7…ÛÂáž°%ìˆ(1VL“Å41SÌóÄb±0#–ˆeb¥X#®ˆub£Èˆ¢¨ˆºèýbØ/‚ ‰Ãâ¨82!N‰Óâ¬8/.ŠË «âº¸ÿ/Ú¾Æ},8Áwbë±àç¿¿€|„°<ްüEÂò—ËË_&,O$,O",O&,•°<…°<•°üc„åi„åé„åo–g–œ°<“°üMÂòO « Ù„ëŸ$\Ï!\Ï%\ÿ4áú~ÂõÏ®–pýsÀu* üþ<á÷ ^£R÷˜ÙE„ÙN˜]LÞSøaóAÂæ/6"lþ°¹ æ@;Õs¿­ðÂæÃ„ÍeÔ_R ósºœ¼§p„°¹‚°¹’º <®¢æ©yôõ¨oD}UGÕFÕ¢oD±Q,~ã8Î× ã}ÿ<¢”óñÝ€>Àà\›„ãÀ` p®]2¾È÷(bÆŸ)“­æòýÊ)~P9#îø?¤Œˆ€"5ƒVÆÄC¸ ?ª\àÇ•‹âáÀ?óÊe±P­òSÊŒXû§AÊ4¨ùiåªhQ®ò³Ê5‚yeIä6µ”œkj¹èV«øEå&¿¬Ü}@~îVò+ʱïC0 Ö“:V•{ëÊ¿¡ìˆ§‚Àçü¶Ã žyü3¿ëˆGQøˆ!±â؇—¢ Bœ#Y¼ð(„DGšâÈ/> !Ý‘#^~!Ë‘÷,°ŸÐ¯ ¹ŽB¾£ø©(t”`ØOê×0„ƒŽ²gB©£R(wÔ|ì§õ%¡ÊQ÷,° »nGõ†Àì1ìgõ›øh[ÔcìçôÛçPÙ¡?Û¸kMPžƒý¼~Ç>©ßZ~¯£G8úA¯cð œp =‚“ŽágÆiǨpÖ1þÎ9&„óŽ©'ðx_O:¦ŸâŒj.9f…+Žù§>¯ªœxM•I¹9Çâ3aÁ±üTîàú–7UU¸îXyˆ·ÕVá†cu·ë{ÀŸßÜS½ä|K ˆ;j¯°æØ í} ’A=AÎï:¶? R”zRŠUO?RǦc÷ÜWCJPÏJÉê9©ÑRšzž3Õɧµçƒ šÔ81FM|ñjŠ˜¤¦?T5ëaH9ꥰmćleØÆIyê•° ’¨sÛ‘=ž<<®áq ÷Q±º°×·%êõ‡ÛDlÉ%°)ÀGû• /ís¡9ŒçÕ຾…ùn¿¸¥ï„ùl_ƒ#ÜG*SoH•ê-©F]“êÔ»R£º‰ý‹Ä¨÷ñuòlà#$щ°/‘§IÒ1’Ç/ùIR3Uêwf`ÛŽŸYtfKCÎýØ>KÃÎiÔY$;» 6÷…4á<Œm§4å¬ÀõJÓÎjiÖY+Í;¤E§EZvòÒŠÓ&­:5â#±Â>÷ẚ+m8ÝØIÛàÂý¼ë¬N®&G;»å8gñ=a_ûÐíÕ‰ò)a_€Û…}£œèSœ§ät白qÆåaìðØËYÎ9×9&ç;/ȅ΋äÚAðáýA`ýö#úe¹T¹@ü1Ü'ì‹ñ‘øCží1‹r¹rûǰ_ C®RîaìùHì3C¾ña_ù° ûÉ0ä£àÁßþP®w¤aÞb?—„lv^Ƽ”9çŒ,;¯’sÕyMnu.΂ý½Î›rÀy›|Öë¼CŽ'œ÷ä“Î-¯Å’yž!»ˆm©<©%`;'_Ûš#ò-Û-üý° |bn=6¯öìKhná:°Ý”çÔMyAKÃmÜû>”ÇóM¾®eÊ7´ù––'¯iä»Z1n7¶IøäM­D¾¯}Ç٠P»šQÈŽ‡íÒÒCeBm&Ïú˜=Þ{l‡Ãø {}€=m6…Ž1j4‹0ž°“ÛJlÃ6ò!{ˆË’zpl› šãÕsö»-<ÆöÍ–(üœöû-± jIPL-Éø:±Y²>¢Ä´¤‘øx‡Ë*ñ-™$Þ€¸CIjÉ!1Ø4%µ%Äi¡˜@Éh9 d·cÿ¯ìo)Á¶N)h!¶P)j©ÄÀsT9ÔR£n©S*Z±Vª[¥¶E$1ØK¥¡E!ßµ´è{1ŽyB1 ©+TþLá[<ö*½›´+Û…cƒª6˜ Äb\©ÃÖâ·%»ªÈwÂßÇ屯?c^à>ÀϦµôk8n #'>‚g‰qÛÂ1ÝCqÝp<Æãq]8F{Jl¦¸ƒøÐØ Ç^Ç_8æ Ç]ÇX¸­ø»¸L¸OBs«9I«$ÇT­¦9C«#\Å1Ox^ekÍû5† @›‹4¥ù¦7Ö<ÍšŸ Zëi®Õúæ{sƒ6H`цðüjæµáf›6Ú¬iãÍnmâ©ó ÖÍ>mª¹[›nîÓf›´ùð|k>¥-îŸÑ– F´ 2÷Æ´Õæ Ú:9^Ô6Âs°ù²¶Ý<£í6_u÷æÌ«æk®hÒž%W¶YÍ7]‰Ø÷„cÊæÛ®”æ;®tòÌ÷\YÍ[®\l»°ýhÞqåcŸ.o3¸ mQ®ƒ¶XW©-ÁUŽùhKsµeºêm9.³-ÏÅá¸ÀvÀ%ãzpÿÙŠ]ª­ÄÕJb[[™Ëk«tj\½¸ÏqßÙê\'l®“6ÆuÚ&ºÎbÛmS\çHyÝuÞæqMÚü®K8´õ¸®„m³­ß5öK¶AׂmÈu¯Gl£®[xMa›pݵM¹6mÓ®û¶Yá~´Íë&¼Á¾Û¶¬Çã:l+zgÛªžŠç•m]ϰmèÙ¶m}¿mW/°õ"{´~ûwü™=N?Œç)í¶'êö½Úž®×â¶Û³ô{®nÁcnÏ×y{¡nÃÏe?¨köRÝm/×}Ä&„l.¶“ö£zö•öz}ÀnÖOÙ9ý ¶wvU³·ê0wqás»W¿Hø \°ôËö^}÷#2 *ÖۇпÿåßÐoPÖÑÆƒß°åˆgeVe[Y/`{ÙìIö4{–=ú<;É–‡D%¸Ä^a«B2Ç.°×Ùì-v­fнËn²÷9Ä™jV¹.þ›‰\RÍ —Êšƒ%\—ÍrA©™ýf·Ÿ+¨™àЏCÜa®‚«æj¹ÎÂñœÓ87çc†Jts}ÜwŠ­ w†áÆ ÜÒ>Ü"\†ïwÀyþFÛ_ýWɃ¹ñ5I4žäA_"yЗI41ˆC¯ $™dC_%ÙÐ×H6ôc$šF²¡¯“lè$šA²¡'ÙÐ7I64‹dC?A²¡Ù$úI’ Í9wå¢yÏlhɆ~–dC?G²¡è×è7èóèÿ€’œèŸ‘œèŸ“œèHNô ɉ~‘äD¿D¥R©¨„äD¿Lr¢¥$'ú’=Lr¢_%9Ñ2’}‹äDË©6ªUPǨcèm’­"9ѯ“œè7H6´fúÑ7©ŸP?Aµ$'ú-’}‡äDß5v¿ƒÈßÊk4N‚Ì0¯gŸfü b`þn!<~r?à*“€ò˜&™Ic2™<æSÌ”0eL%SÃÔég™!f˜g&˜)fš™eæ™Ef™H#Ã0"£ïç0:ÑÆº¤ æá“À›O…xOîc€1z؃¹b„þÏö`®˜W")_áœùsÀŽZàæÇó„1$Oþ<—˜„Ù\xø„y,8 | H@?y™0 ‘0àÿ+À[œÿ(Œù?Ãð¨¿JF=…äÀ_ƒ‘¿ƒRɧQq0Ư“ÑM'ãúÑ ê]ª}œŒè›0¢2Ê¢TÑl’åþ$Õ£˜CFñS¡¿#‰sÚŸ¦~LM¢ýˆŠ*ˆ*z0tñEºæqa¼L€®£éž 0½ts Í<.ÌIZ¤• 0§iÖ™³på1aÎÑC´Ä¬ó<9öÓƒaa&¡ÌÂ\¢‡¡†Qz<$Aa®=zêIaèizvOü–™°ìÕì\¤ËÖ^zž^ ‹4C/‡dåq‘®B«Vƒ"]£×éu&®<&Ò’t“ÞnÓÛ »X¤;â½Ë™è°H÷˜¸Çz'@³Eô"“˵ H[L “"ÝaR´ó¡ïXú˜ô°ÐÛLVX Æ`ݹÌõÇäs î“¿'kL!Kß“OÍÜ¥“™ƒ{‚Ë%2¥É&à>SN¤Š©bQð:kbcàx4X;6žMbêŸ6•1³ Gøâa³ñca÷³l‘e‡=Äf+ÔóPÕ–kñIfT¶6(LkPØÌoÖB¸+²Q­÷Á©›ø>žÉ瓸!>•Ïà³éE~?_€¿Áñ‡øÃ „ã…l7¹ZÍ×ò LoáyÞ¢ñnà0–BÞÇwó}Ðj3íáøSL ó”áÇø üEþ2?Ã_åaÖòKô ø(ãgãoówø{ì!`¨Êäò[ìeè› ö̸e9 lW½¸ gÊ9ôªœ|Þ¥·å`)âäbö¶\syÑ2#—‰ âž×t‰\ÉdÉ5rÜÈ•±©R ôö0f%X3lŸ¶ñm¡”€Ÿfe,¶w„ÁÁ’ØÂq)¡×eÅÒ'ëÀq\Ï‚r‹`¯Rdüy¹Gî‡6ÊCò°<*ËÄ ®ËSØÊÓò,Üm^î—‰,ƒ3m7!“»a˃–kò*¶fò*ÔŒK®Ëò¶¼KOË=AËElWœl„>MÇ-±®ñ;þoQB¬jDH’-#À•ÓBš‰mÝ(äpŠÇ „b«W(aJ…2¡R¨꘣B£ÀÀ'¢ X×]ð~#RéOAVå3pÌ}6”_ƒc~…! ÂR<–ß܃óR@ù“(ßcÕ‡ãHT¨Ž£!àúÍ{ äÇ þ Ð ð>@ïSpâ1œ|6T™àxpöp.ˆª˜ Þ:ÿŒ˜\ú`TÅÃñʳám̹B¸DURðø6ŒOU*œßÜzocž­}8ª2Ùp~7„MÀýGQŽžÓcˆùú¢<é)€ç)Ïx÷uyö³áÈ8î|à³#Å€’P¹¢gÄ¡§s‡Ô묄ãágÑ8Vȱú!„Ë4†Ž @„óÚ÷zG”ÐyÃÿgïL ¤,’}_õmÝ,–‚­".4Œ¶l² *¢,¢BuWuÛƒ¸!­ýPAq@@TEqFQ¹=.Œƒà‚¸°¸! ¨ˆˆ\ÄQA‘¥xñÿå´Œ÷Ì{çžwÎ;ç½Ó'ÿDFFFFFFf~_YþûÒ{¸•›öÓQ¹_ø¯¥÷X+·}åKÜgï)¿oÏY†Yõ;eŒ•ñ¿SîúméýоÜý›|»'_îÉcìË/½ŸømþØ'ÕçuϼìñÑSÕ|;ç·6íÍ)ÕcsÏÞ³¶¤+ŽùlÙ~q­ùœgå5+K¬¼[9ºX6ØþÒ{•ãkLÚ#z¯©d/©´Û{“•­l³bãOkßê寛¶½*­½Êæ%mmÓÖ&­<08Î鿇ô±._¦[8½iÛO*­>mûGÚrJÚt¥¥«Oìß=þ´¶Ú'ÓÊýÒÙiŸŸ¥+=ÄéP]Úryz´³ë_æi¿9Ú»ŸÄó$]ÚÓ–÷Ó6Oé{«µÏº¹Ó¿Óæû´åñ´­»ôŒX&¨Vú²ÿ¾|ìûö×j{ìÞÒ£ZÙݳ_þwöÉ‘•¿Ý ÇUîÛ«íwé..Ó–ÿÓkcÚb.½9ŽY‹·´åòôv÷ïâDüi¹º¸¶[·ÅuÝzÒ¸Š-ÿ[þ-.Œ×ÅžuçEåÒâ¢8Ï•í[#Åí]þRû½9pÿµµßºÚ›_âµUçbÅñéÎÆ½íû¹õVlí‹Õõ]lù¯¸Ÿ³›¼dc(6}Åãvÿ.ÿì—ÇWfÍ¿“÷–¾ÕÊÕ׿ɧš‡ß”ýódõ\9¦Zެž[ÅmGÅuE.Ggû¹9ÎVºqf­¿¬Ée‡9¾rVÆb'kí8¿Œt²Yëƒó†;²Êukã|vW›ñ™ ;ÉŠåíÿÙª8ÏMwz³3]ÑÍζò’•W\ÎZN˾çOË—ÙeqÛ••ûÎLïWË£3÷éà,µÚì^ÛµÞ/ï=ÃìÉÃ3cë*G—Ü·ÙÓ~ƒËÍüû1çÆömÌ›V­Ìøò¿r\X¹ïL÷~åÞsÝÞòYµ²ÿ¹nÏí¿s6«[ùÛóW£Ê½ç®ßìe â¶õöùdÏÚ*jÝMªÜwæ‰×U±ÅDqU\,ŠÍçÅ6Å6ůÄÅb øí߯{ñ²¸¬të«Øæ¹Øæ©Øü_üÏß_oÊÅ?[±»M‰g%ßz+IU£ âÒÀ­½’£¬4?›í[ƒ%­­X¾+é\mýÙ˜Kº9{JÎr9«¤Äí={ŠÎ”%vž+9ß¹ÄÎm%\îRþ(¹Òí){äKì¼Vbç°;‡•ŒuñXr·;O•اäw.(y"Öcþ+±3IÉ—5ÿ%v†(y-.KœÏ廵[nÅÎ%k\î.YËÛ¢ÄÎ%Ûܰ$W¹77g‚}ûRÆÎ™ƒÜ}$ÓÐÝ)2¶GflÌØ¹!ÓÉù1ÓÅÝG´wgz9™¬›çL·®2v‡ÌØ~˜±ý/#ݶ×eFºýºÑn͉–ݛ׌íy™{í‹¿Ì47çÉÍpãÊ(‡ÙzË,p9aoε–YêöÊŒ­³ŒîLŸ¹|—‘=›]ìÊ_¢3[\<+2æ×lÂùQ߯8àµÞøÿ߯øéYYP,ÔUoibV"‘w”•¦VšYimåD+«}v‹?ϲRb¥ÜÊùVú[`åJ+×Ynå&+c­Ünån+S¬÷Èov>åsUÜn@µú-V¶ó¿øNÔˆ¬Øz­Qwß§üS£ž•FÕ> ­Uûle¥ý¾OÙ\ãd+§Çí{þïæ¬z9Ëõÿ}õö+i+eñgú_õÔèk¥ŸówJ+«}^ceXbVf|æ®Ì¤ÌÔLUfºJ4,333;óRæ•Ì¢ÌÛ™e™•™ÕÑÀ̷̺™f~ÎìÌzÙ|ûKe ² ²Ge›f›e[gOÌvÎvËž•-¡”gÏçßý³²Wf¯£ ÏÞ”›½=óvöîh`vJö¡ì#”'²Oeçdçe_Ë.ɾ›]ž]eíÖd×g7eÌnËæJƒÒš¥•ZÚ°ô˜Òc³×•¶(m[Ú©´KiÒ^¥ÙÒ>¥–^Rzyé`+CÔ¦tdéèÒq¥Jï-½¿tZéc¥3JŸ¡¼Pº t!eiéû”¥ŸQÖ–n(Ý +ÝÿmßK‰Þ^–ˆÿ"û«ÝVV×øŸ¹¿²ze¬Ô++´¿"ûkUÖ¾ìäÒ-e§«”õ,KÛžPÿwq!ÿâB>¿¸P“_\¨Í/.¤øÅ…ƒ<ýâB]~q¡€_\8”_\8ŒßZ¨Ÿ:*uBâðT›T·DóTEj@âÔÔÀÔÕ‰î©ëR×'ÎNJݘȤƤnI”¦&¦æ&ÎIÍO-HÜ”Z’Ú˜ͯ/<ö±eÉdÝä`¾¯òRâøD¢ñЏØJo¼6.â²¹­b«»ñö˜^«ÿq»£ £¸ÔŽ‹­ôB[A…¶º M¨°ÈɶŠåÅk_íß'ÇŸ§Ç¥ç¾> Óîß…e‰ã3‘ýÕÎÔÍÔË4²¿ÂL­2í3'gNÏô̤3eüõÍôËTff®É 3î¨Ì£Æ[‹¢x5ºõ¨•X•yÉæê@~i#ÁolxüƆŸjjRÝS=aêÌTïD¿·Q;uQª¿ÍÃe©+G¤®I]›8*5úTdZÐûùôr ½œ ÝÚÉ·G¾Ò°t+èÖA'°=à€màwÀKÂ+è¥2¢ÛøShµÉëÐ\= ú]èÛ¡çɆ\ä;ÃoŽ1l ¶a¾ÚÝÁŽ´º„~/_L$½áÃÎá8Ã[BëÝ}èƒ+Ãû ÇJ2Y¼ŸV­Á„пɪð/†³Ã '¹NtrµS‘¿ùiÐmÁt~ƒLãà-ÆÁ†Ù`¹zü\ ¿2øØ0-Éd>x!­<èùB¿É øƒ$ŸÌ¡áyèùÔ–SÛùî´]þ\eü^¡$·W…Êâ'û‡K ¿,r¼&’Iìç'nŒ9†þièi6¥í@p xtøj/–—„Þèà×àäà|ÍQÞ 'Œv‚Ëá4/°¾F¹Dò–h—æú0‡´:ŒV‡Ñê0dž¢ö)8+ጅóŠ„dцžP —Ãi½‹x°øô.A~$m[ÃI@'µ 8Ç‚Uð«ËlèÙŽÆÂÙX8{fG–=ü÷×ÑDàÑȷêuà‡áÝŠ.j§¢m*Ú¦¢m*Ú¦ÊKfƒO¿¾ë±€VŒî´}ø~µíÎ0\.g;©µµæ×g·!¹ Ü n —?+fıu´œî—i–‘ÿ_;ŽZ%ÀªV¢;$cµœî– ¼¤‹=ÑÉÚ6†¯ ÅIìÈë‹ü—²KšhDÞNlh §)œ¦XØ ›ºZìol¶‘^ä"9Ü¢¦—)´=Ë/ކ ³œî¤ßvŠmÉû¡Cüù58m“ñØR­,ËHUDõbÕ!=Û!š§B _À¼ˆc³3σùpãeÍ ­÷uø_œÄOGðLr`ýðqÃo¢^†àÿ$L‚¶:g–ÿ®Õ g%’° À¶èi-ô'@W…“°ÜZùíÐ'm» ÿ%t ðEÏdÎçÉ¢_° òĶ+6¢éò[x„ÚWÈ{Ñ¢£´hÿ"¿ñü‘0/Ðx£{ƒ5²–èƒß®•=¶Óø¼%XŸ·ëãù–`}ü߬Ïzl Ög.Z‚’ߊýÑܱ$·Ì \'Sµ5l$K’;D'_ef;ç§ †¼½’Vc]ŽÂò±¬ßÖ.Ϩֿ‘u}#2UàÑ੬èuóžÚ]]=ªö"ç2Ã4qlo’þžÔ¶uY‚¶ßäý‘±Uàµ;Ÿ$s œ&Á¬Á_ »°^~Œlçõ^ßVÄ/d~[É è§•áÃõ¬‹„äÃ2òÀ÷pê“s³ÖjäY>L¾Ìz ˜ýíšMËHßçß³Ò¿gå~¯u#kzyÀÚ”oPøƒáBÓ°ŒV.ÿ(Ãlf,£d³Ÿ_6,v¹ŽýqãêŸg'(ïF7jåÓ|¦Æ.ý–yšhd§Åùpö§8Œî·=¦qZP.ÚA튕%J£?“CÚ±f…]óŽa§þ‚õž´:¹0XM_??‘g¨}Éá‹Èœ-Ã[þ68ËðŸÁ̲h;úmÞÃxß½p«(?Ìþ.=m9¥â«nôò!ø6òo¡á-—9é½ܪ¹HKæ¼€|þôÝ`Eh'L¯úË™µ£Ð³™?¹ ü :¹=¸–1Ž0, V(Ÿ ó(#Ú(;“¡a𯶓—¦B²bÒò’ió¿ …*Ëý ³\ŸLõKœ©WK›¤,´ÝP£®Ë¸>>3ú„àM£Ÿ‚ÓK~oÀ†UŒ«tm»Ïv ´Sß+Úöùê3$›ú‡ýÚv€OÀÁXÃÀ³C[ã^€mGÐãóÈÏ +Þй +:¡môÅð…«±Y‘‹Nkv*j8I™ÜøÝLÿ£6&u 5u¹Ð·jÕÿ<¾ÉºA ßÐéÝký< ,k‚ç‚ ÝY7‹d[05SÆü Æ"°&x.(™Jä' mœ4œ~¡rl>móÕ»aX<”|$/Dr¾CÎrè©ÀòAЃbº¬ ž –“g.4/ÊÙ;‡ÎÚžw:ƒ'áè)GO9zÊÑSŽžr¼Q.m~wIúÅà¹X¾=ë¡C/ÆþÆÑ‡xáé‡X†µÑù!mOÅÚÏK‡Ø^ù°+Yβ„W ÿ¯ÂäbèËÂn¬ná 8+<„‘6 ž2%Úó„~Oè pZùu„¶û¨m]ZÍGÿ&8ƒµ½òðDbX>¼K‹ºh¤ÑBað Z¿è„náÔÑÇ·ò]h»’õÛž»O‰î³æ« ¼T—*ðR3U—D¿=#ïC7ÆÏƒ„æ=¢7,V”êæn£Ð^ð×àã4ŒãÖEfM¢ÑÅdÑUS÷5æ´~:sàó1j§{>oò’i Y³xhÆèºxh†LµáLÄÚ?YŽãÛzÌ¥ýŸ„áщä®÷ôÜc×{áÍ&ÿ€nèþÒ°Ÿù³£2|p©hÿiðøÓÃk –dyÛý ƒ#i{¶0ºÉWõt"X¬gþ4œ£ç!ÁAÔ>K«G…y‡Ã? ;ÁÈ÷ãf:Jóî?§ìí¯†>l# ŽÒ}68†}yò/3³ŸÃGi#:h Iÿ6²ÊwЗS{µõ„Q74¸ô °'}ªè?¬'~í³þWœ Æq/X¨s»¿H7b;;™Lr‚ü™¬Â«#áÜ¢B¸= ÀåàGà'èY¾  vÿX§Yaø*ô(ðEîË?s;~V§¾àTÎ~scÚêäf¸Njmg‰:àÿAHÖ;F×¾‚†ÛÁïJƒár8Òð4’Ðj§8ÁN8œ<ÃûØïãDº®â„ù'É…œcæÓ©ÒbI'äõôX>§LÖGg}µ ‡Cw´ô.‡czÂ?릜ç1.?<Ô°7z¾ÅγµÞƒ'ÑŠQzRèIáŸ'Ë“òOØQtÞŸ¢¿‚Ãè¹Þ!^­þ»?„3ÞÇu~3\Îw"cy,êÊ\F²Gh7Žprt¤i;E7MŽøÁa¥Áp¸LktÔrƒö‰ãWÑvƒVeò3ÎÉ7€“À×8OÞÄôVî¤7s^šÀÙ€{zr³N€Þ44׃~_·f¿s˜ÓÚßFz‚µ²?àì\êþ¥X{)Ö^еdUp­îÎÑ;´JpblÈØ¹wû¥à œžeD“¸AOä$ö6ú›;¤—æôÒœ^š#ÿ¶¼ܪ¾¢¶áHp O6Ôê‡pŠñÆÏxl[øk¡QíPñÙBwg‹7ãDƒCbú2Ft=kêzä?¿aFÊÃtqÂþÁ<,}ô!ØœºDã°OX`ÚÖé.žM0·â‡S©í.ôçBÿ$™ wç…È,—|X“µs$x.wá'¹ÿSÖ×9-®VQgzé‚Î7Ù?GóÓh ¦tãæPû(«©óÕTÛG#å5ØÀ“Š ,j¨=Ž|µ¼žR¨›xð¥nßÁ3BÛ]K£G‰s­ñ…Ð;Åô]Cn|Nœh™rEtüWÁKÈkh{ø]Þ àXí€â„yЍ¼Ã‘?|dTºîÚÁºwƒìÈ &º¶@›|ÔþÅÜ¿ærã«`­}Õgï3~ÈMÖÖ îGop¦ú^’ÁÍä1:íçÝÏzܦyŒz1›÷‰u 埆ºÕZ„+§ñ¬Ï{X˜w¿ö ™VŸ?D·lCbôV÷8ÑÖÖ¡j›S{$+ËÑ׈ z±½ÕndÁÉÜË>æyÎr¡­ Yì¤[ØCucª±„ïj‡ÊÈ®?p¨â3€[Û¯º§<{ô§é†îݪ ].›ÃÍä„d׋ñÀG¢½uà»Ô–F‚ƒÕ£¢ÈæbvdjG›É3/ÒŠ§ þaº³[FzËŸV–‹,惘‹æ`fmd |û¸›±Íì4B†Û½?¼ ÌÀ/ç·\# ΄Óº]ðúuïÃoÉOñFm¼q7ñ1ºÅ#‚Mfᥴ:[ç«pѲ08\¤ñÎ¥í\ÚžM´4ÄóÁqØósw8÷Ç;˜ñÙe¦3×áÌÒ="à6,@¾Úž†BÏ&·GУ¸S; ÀѺ㟳–Ö©5(‘aNUÆÀÎû‰–—8+Þè/2þ:y2úHQj;‘p¬0ø*мZhý–£¹œ¾„éëLüy8úЋ‹bÆŸǸÚÑêN°KÎÎ'Igs ðEð 0O˜WOÝ+ Þ;jìÑßàç‹ö_ˆc¸‘y©ÞÀºÈÌé½ÕV艹B£εg6×3ëñ¿p„›å]«´Ê]çÜÕZeÐC½k)t-ü&KíØ\)X OŠ_¿5­Љ˜®¥5§*Æ«Aµ*…S*NrþßãÕ`-f§(úÕúÓù&Fik‰ç·0¢SÜÚÉé Xø?ÆÑbžñ^wQ±k‡ÑC‰¨§Å ·#ó’8a=ÖÑ™»øÞžœ;H§ý܉Z§»tV'“Ê·É9pF M³nOd¿ýÛðö$'™Ñùë.½h‘Ó^Ó‹QDx#r4žoÀ¨}°IîL°ñ)N ü°Q­øÍ?-ŽXùð"p 27ƒp†ÆÚäÛáç'Ç(™…9ÛS¼#}ÿ¸˜/ÂþoñÉ?cßv4š87ÔSt"9yø.è1ö×äC³°#(ùÐÁ·ÑFþO~"™Äf"¹q®±a ü)ðß'±þ`mfá¾xík¾ú ó(—!ÁUà·¹ŒôDPïkØA’¯‚3໨py2‹æXòüVб€ø ÖI>lºÛ|â»üùìñ¿—ƒ¡ÐCi†Z—ë~qy@ã5”µ#s$üºÈ|}ôSq>4k“íáüº¸¼N`ÈÞá9ß’O’ŸìJÉ'àw;€hóÎÎÙIÉ#ŸøG 9dŸõ–ƒãàß…¤³a.œ‰àNðÍxoÒìLr6‹ž„I««ÁËÝîFTDÄX30¢í:èÔ¶ƒ~:ŽÑ çvá£à|§3ؾòá¯çÃgw°÷}³Ÿ¬žÌQ;~y¼ZËÑVކròF9µâ¬‡v»ö! ;o\†¶·@·'^ÍÉ!ùë‰äçìuÜŒkwðAFò p ™È™'¸do ñ|ÄIÉwó8ˆQ,Þ]Éêî.ÿ¸Ysüx\Ú²d§ùà©È4Þµ}¤¼š¬.ºÙþkð2F~:w*X ÿÔÂÿâ‘Cæã¥ù1­½ %µ1^µµXM’y>ömPü~`21ÚǨ¶]Á¼ù‰7 ð´ö<íø­ [E­í Ðà ü8ßêÅ›ÊNán‹ç9_‹ö>~™;»ûvGŽï`4æýébn}xÇÚ':G9þFÑž£ »+§ñîµ¾n‰Ö^'£Ç‡zrÕ6¸Lwüào†KE{ïú>É3BÿÇ@÷Áå’L¬&Ъ§0\ "°E §‚=Ñ–EÏtžtFÏNÉDe´Íº~…Þ*°[ÐÀp›?´S·_ =~¡?Ø_-¾èÄ2a²µ«„a2cÀþ†ºIÆ"þpmá$×#¸¼ |Æ×ÓÔ"¡w/ôQa_£×‰NnÑ7ŠÍB»øµÅI,ñíæ˜øLèÍ?±DòaÚê4ˆïåûsµ¦ü9Êö~|µÚ¬Ú°&2ÓÁÍð› / m…á4¬Úvo’¯Ol³É'a°RègÁXè{I¡žê$êâߦ,*Nr2SéñZMƒn xù&ó 2=E{Cï`ͬ§·=E'ƒ3ôÿpôÒ^MðPeðð.0%ô ÑP!Úä5Òšò,V½«D{u½ÏµöáÏG²É´ížÔIÌCÛúä?tvJ65N“ä·F/OÚêöê$õÍC_t²™× m,‰íAvLÕ&Cp¼×^ïÓ|6m›€Mcz•až0±mSÀVèo’ü š¼É‘š8_£y22yÂÄfµJü"K¼O þ‡„ÑB}Þ8OA¿ ½ú2èû,¢>‰1 ž, k ýÿgÀ©ÖzÇ€!ß™þÂ(‡Lwð2jO‡¾úf$—€?Ãï®0¯ ôðXd>„><Î[СïûÀ™Š=®ßz'Võ„³\E«]ЫÁ&p®GÀa¼A;ÚŽ‡¨}ü ÎÙÐçBçÑ×8aòhç½Ñ0™ÞðWÂ?zô›øoøO‚KÁ´ú$o Þ;¸yÖp³]¬ vu³#:xÓÍ‘h¿?x58m£ÜLÑêh7_Ð׸™Br ø3üŽÂ¼.h>þ‡ØÖyÆÜá<ƒÌÅоó‰8ÞµØÓË]ív°/^Z=™:àZ­@ÞÍc#ð0¬e®C¼ºp–ß:«>ÅrÃ? y-¶½„þJÐÅÛ%D ¶E—#I_þ{àkÈœ^ g#tJ˜¿Z:ó‰äè8ÚB2y%ðÛbÉqn½à½´z™øëiÛmþ&èз@ׄv5=3˜…ã:œ ïFò"ZÍ&B¢+»[ëè÷VèNð¿Coä]íѪú:ÛôþwçgðHÚ>Í|yx/z|ŽËÝzAà Ìò"°6÷B¦dM……ÐÌKP v@Ã9Ђg!³\Cí ãÿ$‡x¬åàà™è|œ‚ ùЛF«o‰áÍp˜ ±Oƒ¬Ùà4$gƒ3ÑÖz+2eàpȱò¹(ï<äÉ«AM/y5زFüï¡Q8ù3@ÒÇÃ诅f•…Ï!3t9í6ø.Ó¾2¾óêX¬~=¬U'!Iù¬  }v‡àO´r‘ð|üG³ðçÁg ú§€¬ýh6‰œ€QÌl€W=7 7¿ì™6póEÛ€Ì໾^—.Š\†q™ÐíGÁ6ö”ÀíkD…ô! +%r™ù ¢÷Nâö âvk=«2ÄÏþ;Ô’áƒãA—˜ßxö'aÏ0ôß þpÐíÎ_Bÿ ¢9ŸìšÍá³´bÅ幜ö|f'¢6x¶äFÿ*Y•HìîÖŸÔŽ“ÓÛ½‘àɰ–ÐÿOpœú`m¡w øòýé/ŒrÈt/£ötè oFr ø3üŽðç óº@EæCè3Àá¼=úN°œ©Øsèú ¡wbUO8‹ÁU´Ú½lç*pÆ´£íxè€ÚwÀŸàœ }.t}&vÞû £‘é %ü A¿‰ð†ÿ$¸lAÛ¶ÔvEòþÕà8£¨=¼†Vmà£?¸¼ôé÷Z°!;Ø—¶  #SÜ®@Þù³x=âókC7ØÜ:K>¥ÖÅÒÐØ¼„æJÐÍû%D¶E—#I_þ{àkÈœ^ g#tJ˜ÏlæQÑq´„6dòJàÀÏNm×Ão M[tè[ kB»y¼¼Îhæ%º’Q¸_‡Î[¡;ÁÿIÆ•w=´G«rèëü;ô‘È?·=Æ=> Ç­8VAÐ º$ÃBh¼ƒhuô…àYÈ,×P{èøYq‘ü<ý¯‚ƒS!{xÓhõ­0¹>ô°9x$ƒӜ ~ÎD[sè­È”À!#EÈG¬Ü¼ó' 4½Dd¡` H$ûßC3¢p(²M€¤'=âÄ_ ÍZŸCf:è2Àmð]^z$ª}çÕ± 9$ü z2X«NB’ñ‰^ }rið'Z¹ÿ>~Èc„Yøóà³RüS@Vh4 ›‚DHÀ(f6À«ž…›_riD^ Ü|Ñ6`ýú®¯Àe ‹"—\¶qÙû/ØFÜ.@Tø@² "—œ¼ó$¹.8d=Ì]H¬ú“èkmï™e8èö©/¡Ñ™OfËÇžðYZ±jò\Vy>ž¨ ^§-Ù)ñžï'ôLLß]) kò4Fÿ}wOžUúzë]Ås¤3©}( z‚T`8…'iž8Þ7ð'ˆD’´M(Ô“øç Ãe ü-hLíat t%Ø›$½× ï×Ö3ï!8·ÄÏ»ôôo+OÏÎâIÚv÷Ä Î#jå½ÇC~381Öz71Ò2ž‰-âiU[è¶þój%™Änñ“ÇOÉ _òL¬5z²´êÆ“«Nâ$¦&ô¬l†V µ}„¹Á»õ_æ–ìÖ7…æíÖ“É>z‚á½/:Ù º/µÝ çC¯Dr¤èd M©}V+ ë:mpÖæªà¨m+°?üœ$“ÛáüùBÚ>Jm{è"j#èÿ}+’èý$¿¥v˜è\Vö½Ü(ú¾ë6Ñþôu ôàOVáp–"¿J Å–øEÈÔƒöÀÕHæC׆N -†DO§Çg ï…žŽä¡`O‡ÖCW"3„¶}Õ£?'¶YµÃé÷mì\ ½%îQÑØ ú|äûçæêÉ›ø‰e9=Åí‰ÎIÔÞDÛò¿e<ž‹Â¹‹ˆþ^¹Ç±Aò‹öÉr¿™h‹éÚ iÕ]kû Õ>˜›c¾"B’/äôtt¦j-w=Îx5¢"4¬MÔäþr þ;Íc\/ú„Y+ËŸ€_ÏÂß—ÎpúS¹ûLf62wåù‡£3Eíkà ²*y¿óžF— ¶–¼×4÷ ý.ÕìˆöæA7óÁVBëkô+ôõ°âÇ$ ´vÔ¯7/q žLâ±Íô˜…¿\Ä,O£Õ l[v!ºˆ¥ð89Éû«wëmBÃÝ› Bç@׋›/Ö×¶x•É3ã¡ó„úí/Ë®DQ0<]1µWmø±lKvog.žg°Õöpg‰hóŒ|µu÷7œŽîe…Ò/¾j¨¹KŽÅ¶np†hî¼ñøm:t§\gù'W‰L%µcÅéßõ=œ ¼w“†Ú`7q¼ãôf'8o†³(7\Ñ«±$¿e.Ö Ÿ6ÉéWBÞM•m~Aîoô5˜±\ï°6…GäôV¨r·¾ ÏŸbÔ5WɳˆÕJy xÊÍ—zO¾à¢K’1f£{…]>,$ϬuyCkÐF'nQm4S½$—£³VõÁŸuiÛŠµPW|»µñÆAÖ”…~1k³æ+±]0ŸÌ`z#©¥sƒ_Òc‘,=#rwÒV>¿F>1|’¶«i»Wœ7O’õr¼Ç¡ö¼ÜVh½‹ ðùkÈÌDþ‡øä~¾¿4™ÚûÐБÝF_ãïx¼ÂÉJzþ'{ßžE±ý}ff÷7»ûBH „"]š@„*(ÒD@éÅ€i"JÞ¤‰ˆ‚ˆ€tPCï½Wéð?s²z!ú}r¯÷þŸïùžûì“ß™™ó›™sff÷Ý,H}߉ËoÉu2ç ¹EfÙŸÍP8 gûPŒSú„† blÛ±Qf¬±Íy”Cmt‡ëf³÷1¸™ó_0LÚSã¸íbØ:½lòÛ¦'ø.{˜ó‘lß,Óÿɦ±5ãömÄÖæ]“ü.ìc\È\ÍãQ™ûá0ο,õ*¾K+®ÏÖ·‚oË3·æ.Ë¹Ï OÕ‚Ë štòP6¿©bFqUsßÀó'êáæwvë ‚Yò]ŽñèîÌ=-—?×Ü—zøîŸéØjE²¯‰d¯Äž…û?r?±Ø 5ãü×Ùš ãšì8¶{C¹Î&<†<õsf#šûª4å«&Ìÿ’Tëä[Ūì…K±+ÍþÚ”?s^e6^áøZP8jχ§Ž5ß»™ßö“?pØx„ÌU—P›óÌæ>ÜŽSòqþÍ>vævé̽=‰5íÌÚ-b/<ëL))·îážPõíD9?Mõ˜|UV–:s3ýp_Û²Sx%블ëÐ`J¬)íÞuó-,”ç5Þß;Å;r¼ ägOà˜<„-øiI.áEÛ¼›Ú8pÍ|'Çc9Ëá=œ2…S’8<мטËá$'óÙ ë’æ iœR‚ZÏ”°óXüm´7M´)'2PÅ m¾f~Í—2YÏ6_H3áäå&œÒ?0Î|!M_4O–u&Æ›ü%´ã¦üÔ°ùº…oq:ýLÊáJng¾“fo0ßIKÕ1pÌäF˜°v8ç]®mq.§9ç‰á³ÕX¯ÒŒ·Xëa|v‡orz>NÙÂh~+ÌÉe–ç»wàgâI–œçm.y>³”Äw”|÷Á^Ì×–5o#§¢©?qxȤ‘Ãe¹„Ôô8®ÃË.Ãá¶\ÂaΟŽëÃÈõ‰K­O`$×gµù²k]Ê׺8—Üœó¼Èùs¸4£æ«*r˜¿A§_á0ë«ë°æ.%€kÂ_]+°ùl#[|—óÌÉ@N)Îg©uRŠ2׊q(ç9Îø ç¼Çé±\ç¥\gn;~{P%_àp)ÆçÍ]’×›:$oåðAƒ)-sÊ)“3y¡aØOïÆè2Fq9Q~“±_µ”¯:Êá œÎü$Oæ{}Ãé?˜pŠä¸Åý:\á<øªœ©OÑÁƒ‚g@µ|£KD¶íÒúè“Ð<±,0¨~½J9€ìâ½{ +ä†(%‰ß' 4„¦TƳð&¼-¡=¼ Ý` Ÿ?²AÈE!žJyjB#hFw­½ ?´‚кà þÿµ©× Éâä%‹^ŒüZ9¨µàx $Ô‡Þð6´†Wà5èƒ!#¨êuëVƒõê<“Z4¨W3ŒáR2ñ÷¨!›žJŒ¥™ÀSð4<áePäá@m ºÀë0„¯ ƒð(•Ce¨ …à=N†pâ!'Ä@~*·8”¦YA¨uàEhNõ. ÏA_xÚBGè oO­Azp!dTB ¨Hžº:Ô…&Ђ|Écð<ôƒw¡YáDèi¾“Ý2®kKõQ{ŒgÌŸ&^7MüõëŸuʃç³-{0ž·pšx‘ûâ4þòKs¾?Ç%Ù‡ˆT ­›*ó§jnQŸËH¶*ŸŸºÍ—{|yÌ——þ,wÁ¾¬àËj¾lð`- yPËBñÆ‹¤<˜¿h£ã±iZ!..M¼Dšø¶4ñŸÓÄÏ¥‰_x0^<â¾^FøÈ4ñøóÇ—NO{¾Fšx­4ñÚ¶b™„HÌ´£ ˜ÀÖ¶@#u¤y#ÃNϾ"^u\ïUõ¸WSJ@œç)ß%q „¸"®€×Ä5Pø$> >…O‘ß4ýAª*Ê´—”2ŠRèÞ M}Tˆ®,BñŒ´é`=‚Û"’ê¤ZEzÏ‚ôªyõ«{õ vád“sÐj¡­yÊã)P2œêtšåz¤•–Œ¢øY–ëqHŠí"\{7‚Å=4rá!ªëJ:{˜åzS÷þ3¸‰k¸™k¸…køÛ™m|æg>“Äg$hI 3Wš_™„Ëpb5ŠXU^Uïib}%®„Õi51E«l3?/¤¿üt}Òª?EÓ‰tÐWĈlÐÿWòÑX4wD‚èƒøÿ#¯‰DxO Cà1FŒ…áⲸ #Äuq>wÄiºŒ’€ÑÒ“|,ÓËô0Ff”a¬Ì"³À8™[æ†ñ²€,d1Y&ÊDÙ VȲ¬$ëßVÉÞ²¬–äX+ʰNŽ”#a½üX~ ät¹6ªõš»ª„*)ª’ª ÷TuU]H5QMÊJ´¦ Ëni·qvk»µ(n·µÛŠv{»½(iwµ»Šx»›ÝM”²{Ø=Diû—À QÆ©ï4®)^¸WE¾á½èM’_„Z…:È_C}CCåm”TẢ9U:̹U8æÅ¼*=>Šª,€T,„…T$>†©(,ŠEUFŒÅX• K` ñ¯2ci,­b°,–UY°<–WY±VPÙð |BeÇJXI=‚•±²ÊÕ°šÊ‰Í°™Ê…­°•Êm°Êƒí°Ê‹±£Ê‡¯â«êQ| _Sù±vS°öPñ |C¾ØWÆ·ð-õ¾ƒï¨"8©¢8‡¨bø>¾¯bñü@ÅᡊãH©Jàh­Jâ£âqŽS¥pNP¥qNRep NQeqNSåp:NWåq&ÎTãlœ­*àœ£*â\œ«žÀy8O=‰óq¾ª„_áWê)ü¿V•q1.VUðüFUÅoñ[õ4®Àª®ÂUª:®Á5ª®Ãuª&nÀ ª~ß«gðüAÕÆñGU·âVUŸԳø þ¢êávÜ®êãNÜ©ànÜ­žÃ½¸W=ñ jˆçñ¼j„—ð’z¯àÕ¯âUõ"^Ǫ uÞæl¿€-—·Åm²b÷Ä=²¶¤u3›ÇY€Ç™–12‚2—Ìa2¿ÌŽé…àÚ-ìàÙ­ìV²ÛØmívv;Hgw±»@¸h'Bz»»Ý"0æ€ ˜ sÑσy óa>Ȉù1?d‚X¢±0†ÌX‹@ Ãbü?PŠCV,‰%!–ÂRË`xËa9Èãã+bE²VÆþæfû›ŸÆ§!/6Ŧ[bKx[ckÈm±-ÀL€‚Ø ;A!쌡0&b"<†Ý±;Á×ñu(Š}°Ã~Øbq€8ˆ¡8ÆÁP‡âP(‰ÃpÄã‡ø!”Âð#(£p”Áñc(‹cq,”Ãñ8žìõDœãdœ p*N…Šø ~Oà œOâ,œ•ðSüžÂÏð3¨ŒŸãçP¿Ä/¡*.Àð4.Ä…P á"¨ŽKp ÔÀ¥¸jâr\µØþ=Ãö¯6ÙεP‡lçz¨‹Éz>‹›ÈÚÖÃÍdmëã²¶ pYÙçðg²²ÏcYÙ†¸ƒ|F#ÜE>ãÜC>£1Àð"ÿÿ‘&x/BS¼Œ—¡þŠ¿ÂKx ¯ñ¾WêúJ@ ¶µ¨oÙ¢©hJÉ­EkÖbk1È@r T°B°Ùáÿö¾ÿö¾wï‹áÞWÐ̶DûÀÞÿö±ÿö±SvšÏ‡‹\²„ªj5‚¬P*A ¨i½Ðæï=if9FÀ8˜s`,…Õ° ~†=pÎÀšÙƒ/ìuPa]ÃÃÞ`Ù-¬'Ëîao²ìÖ›d"…ú°L ë˲[X?–ÝÃÞbÙ#ìm’Ý(ß–‰aï°ìö.ËîaYöL²;åÂ21ì=–݆²ìö>ËaìAù†³L ûe·°,»‡}IJGX/t¶?a·°A„ÝÆöøŒŒbÍ»†ö™ùØgfŒÏÌXŸ™q>3ã}F&øŒLô™ì32ÅgdªÏÈ4Ÿ‘O|FføŒÌô™å32ÛgäSŸ‘Ï|FæúŒ|î32Ïgä Ÿ‘‘¤×°IÌÈtfdÎßdd¾ÏÈŸ‘¯|FúŒ|í3²Øgd‰ßW¾ñ™Yê3ó­ÏÌ2Ÿ™å>3+|F¾óYå3²ÚgdÏÈZŸ‘u>#|F6úŒ|ï3²Ég䟑/™‘EÜSV2#ëÿ&#?úŒlñÙê3²Ígä'Ÿ‘_|F’|F¶ûŒìðÙé3²ÛgdÏÈ^¿¯ìó™Ùï3sÀgæ ÏÌ!Ÿ™Ã>#G}FŽùŒ÷9á3rÒgd33ò33²‹{Ê‘¿ÉÈiŸ‘3>#g}FÎùŒœ÷¹è3rÉgä²ÏÈŸ‘_}F®ùŒ\÷¹á3rÓgä–ÏÈŸ‘»>#É>#)~_¹—ÊŒ©Ì8"•G¦2ã(Ÿ™SÌÈfä*3rÛôó?€M½y7­?Ëɪ–ª£Ú¨¶ªƒzEuUÝTõ†ê­©ÁjˆzO UïÓ*øˆ:ªŽ©ãê„:©N©ÓêŒ:«Î©óꂺ¨.©ËêŠúU]U×Bñæô‰mbÝ`’ùm¾ª©j‚TµUmPª•j –j§ÚC@uQ] ¨U"„©îª;Í^W¯ƒ«z©^à©>êm©ñjg溇ì]|é tÝI.„·a¼ïÂ@ƒi\¿Cù?WÃáCåÁH£ácci̇ 0&Ád˜SÉ|ÓaÌ„Y0>%{ðÌ…Ïa|_Â|²_ÁBøÁbXß­ø–ÁrXßÁJXE–c ¬…u°6ÀFøžìȰ~„-°¶ÁOdU~$Ø;`'ì‚ÝdcöÂ>Øà ‚ÃdqŽÂ18'à$œ‚ÓdÎÂ98à"\‚Ëd~…«p ®Ã ¸ ·à6Ü» )pº±ÏÊz²¾l Ÿ“ψ²‘|A6–/Ê&²©l&_’/Ëæ²…l)[ÉÖ²l+ÛÉö²ƒ|E&ÈŽ²“|Uv–¯É)r—Ü-÷ȽrŸÜ/ȃò<,È£ò˜<.OÈ“ò”<-ÏȳòœräyyA¹ò¢¼$/Ë+òWyU^“×å ySÞ’·åyW&ËyLù-†R–²U@iTaêYUOÕW TÕT½¬š«Žê55@½£ÞUÕGj¬š ¾TóÕWj¡Z¢¾Q[ÔVµMý¤~V¿¨$µ]íP;Õ.µ[íQ{Õ>µ_PÕ!uØ*g•7ÿÜJ²¶[;¬Ö.k·µÇÚkí³ö[¬ƒÖ!ë°uÄ:j³Ž['¬“Ö)ë´uÆ:k³Î[¬‹Ö%ë²uÅúÕºj]³®[7¬›Ö-ë¶uǺk%[)Ö=;dGè'u%ý”®¬«èªúi]MW×5tM]K?£kë:º®~V×Óõuýœ~^7Ôô º±~Q7ÑMu3ý’~Y7×-tK:ZÓÑ–Žöºƒ~E'莺“~UwÖ¯é.º«NÔÝtwÝC¿®ßÐ=éè¥{ë>º¯î§ßÒýõÛz€~G¿«êAz°¢ßÓCõûz˜þ@×êú#=RÒ£õÇzŒ«Çéñz‚ž¨'éÉzŠžª§éOôtý™ž«?×óôúK=_/Ð_é…úk½Èü_qý^ª¿ÕËôr½B§WêUzµ^£×êuz½Þ 7êïõ&ýƒÞ¬Ô[ôV½Mÿ¤Ö¿è$½]ïÐ;õ.½[ïÑ{õ>½_Ðõ!}XÑGõ1}\ŸÐ'õ)}ZŸÑgõ9}^_Ðõ%}Y_Ñ7õ-}[ßÑwu²NÑ÷‚z†ž©géÙúS=Gÿª¯êkúº¾á¼î¼áôtÞtz9½>N_§Ÿó–ÓßyÛà¼ã¼ë¾éör{»}ܾn?÷-·¿û¶;À}×èr»CÜ÷Ü¡îûî0÷w¸;ÎïNp'º“ÜÉîwª;ÍýÄîÎpgº³ÜÙî§î÷3÷swžû…û¥;ß]à~å.t¿v¿sWº«ÜÕîw­»Î]ïnrpt·¸[ÝmîOîÏî/n’»ÝÝáîr»GÝãîI÷´{Ö½è^vu¯º×Üëî ÷¦{˽íÞqïº)î=<áIOy–g{ï¨wÌ;îðNz§¼ÓÞï¬wÎ;ï]ð.z—¼ËÞïWïªwÍ»îÝðnz·¼ÛÞï®—ì¥x÷B!R!+d‡! †ÂBNÈ y¡PCéBá¡ô¡ˆP†Pd(*”1”)ÊŠ e e e e=ÊÊÊÊÊÊÊšššššššú$4=4#434+4›Ÿ>óÞ>ï±÷•“%YPÞ9Ÿªjß®ž!ÿ¾S5V/ÂnÕL½{Ù›îWUg8@ï-8¨F¨pTQcà{öãì·N°ß:É~ëû­Ój‘Z gØCœ³ÊXeð¼´ÛÅìp;\Äò{\àpà„8¥‹éâï·ÿê tÆKéÌp¾“™œï›2ŽwÝ[ð~ûLòöW ¢!ùüÚ4G`Ygº…ûHüžCs9džÑ„CFÈên øNw#án÷{½îæßóî¤Ð*Ò|"²Ó  `êÓ#w·Iw÷þàî'üÑ=H¸Õ=o®Ä(S"f4%b&S"—•Ì¥þöŒ&ŒbëÐ!Ü€îgÒñ™p>“þ3Ñ|&3Ÿ‰á3¨ՊQÛ•–æ=ór²HYUV%«Ëê`É:²ØÎGÎGp;‹A;—œKTž´gËŸþC>öAûÿ·ýßñ°Æ‡>¬ßüOúÌÝJ·Ñíô›äŒç¬B>³{³gÉ3 c?Ùˆ|¤ñŽ©¾±õCzÅ^áÿè Ç’ü‡¼ß»ü¿æ ÷väÇÿ¾ß+>I³3÷Hy˜yG]šyÜòçwhÖñÍ8&ñœc2Í8nS¯}žzêK¦_þæ;eÇý¦î¥÷"¼ ^¤åeô2yÑ^f/ÆËâeõ²yÙ½G¼^N/——ÛËãåõòyzù½^Á?õ¶ïü¹¿Å0tÐ}(¯;÷~Óa8¦ÿƒ÷Ýànt¿g¼ùO½ðNòûݽî~÷àoþ3b&öÉçÿ^9ù~£13ÆüKÞùßì%ÿ/xçÚBŠ(ZÊÆˆü)ꊛŸ¹çÍDk($ÚŠ¶P\´í¡„xEt„’âUÑJ‹^bTãÄDh&¾[¡…ì"¡·ì.{C?ÙW¾ƒäÛr ¼'Ë÷a¸ü@Ž€Qüô|¬-ÉÚó’òTLV‘*fªŒª ÌR…UQX¦bUeXÉ?‰=þv^½í°¦Y[áŒÞN/¢íëöu‘Ù¾iß1ömû¶È ºDÖÀàÀû"[àƒÀG"W`T`Œx40.0Q LÌEs E¹À¢ÀzQ9°1°M<ØØ!švöŠ—ûE š$‹Ö{47è¯ãu9±D?®+ŠÁÁ‚bU°p°¨XŒ ÆŠ Áø`¼Ø,,#¾7ÏÏĦàÁ'ÄÁJÁJbs°j°ªø1X=X]l Ö Ö[ƒ ‚ Ķ`Ã`CñS°q°±ø9øR°¥ø%Ø>Ø^ì £e¿Øí´pZŠ=Nk§ØçtpÅ!§»Ó]œ%?;^œ#?û¸F~ö¦Hq¥û¢ÔnS·§lîMöŽÈ¾¡÷CãäšÔ÷[h5:Ÿ¸4mü”E÷¥( î‘æ4%èü : ΣYÁ –&¶Ü-§Ø~:Ì[6…D!ê5E„ù/ˆ¥Ei*óiñ49—š¢&XbŒÃoÙl„ævŒÅÎjg³³ÛØ9ìœv.;·ÇÎkç³µóÛì‚v!»°ý˜]Ä.j³cí8»¸øE$‰íb‡Ø)v‰ÝbØ+ö‰ýâ€8(‰Ãâˆ8*މãâ„8)N‰ÓâŒ8+ÎYʲÔuuCÝT·ÔmuGÝUÉ*EÝû;i©bIÞi°ø× éyï'šYé°ˆ¹GIÓÂ`ÞK+JGX-KóÄòt8P*Cð & éH/@cš6£#ZÑ‘ÚÑ ]!¢à è ™ /™itJˆéD8d¡1ÙDv‘²óÛ1Ðx­ 9h¼6†œüT7ÔÜ"A$@~_&¯è&ºC>Ñ[ô¦1=X †â=1 Šáb8¦<£ü5+Å*(*Ö‹ +6‹ÍPœ÷›JðÈ‹ç9u ÞujÆ»N/ÿ¾¶Öß {Œ˜Ê&ce,ÍãÍ÷!eeY™fŒ5d š1Ö“õhÆØP6›æ=­!@3žWhÆ8ÈAg¨3\g¦3 ÂO¹áìpvBFg·³¢ƒÎQšK÷rû@Nò ñ P€<ÃT(dì8%;¾bÉzdÁB<Ùð£PŠìøq(Mk«“P†lùi(Köü,”#›~ÞüZ”êWN6ù]—M¾.EH—ìèRF–¡¼F#%ëÒZÆblÖ(@󻯠Y¯ ÍÞ^ƒ0ÖËa½B¬WëéÌs¾$8‹ 똃uÌåœtNC>ç¬s‘ô2šaMcYÓxÖ´4ù¿´>˜E«ŒŠ¬uÖúiòKס&y¥dZ™ªËþÓ×Z4>[±FEŽ¢{ø=x/SŠvâ‰ßÓ¤h S,ò÷|4þ„‹ò² Ê™àL§;¯t6Ro»åšþK©¼ÎN­ON®I1ÿî’îó¯XVº2Ší°l‡Û!‹íÍv(ÀvH³ ² c;ä°rÙyl‡íP:¶Cál‡"Øe`;Év(ŠíP&¶Cæ‹«IOVSK‰‰¿z#…#"¨–¹DA'ÊŠJ¢†¨Gµk!:ˆÎ¢;Í]ú‹Ab˜Iw"fйbX"Vˆµb“ØFÜì#N‰ ⪸MÆ? =!£ev™G$vãEAÒ>?qñËÆäýŒl*ʰl&ʲ|I”cù²(ϲ¹xœe QeKQ‘e+yF¶O²l#*³l/ª²L jä«¢Ëqv&#­Ev4ËÅvf#ñNÐ5ÒÎôŒ L†X."ËÁt,“ƒá,S‚éYÞ FI³— ,+¦|Ÿ¢Y‚täç%Å 6&ooædHKꃤc,áË"ް¹(NØBÐ<‚t+IØJĶ¥ÛˆJæÝñá+¢ aÍ$iU°³¨Nøš¨AØEÔ"'ž!œ jŽ·#A’¾Q„‹m³óq'H CšR¯&=-ÂåAšoŽó6SP¦ƒ„÷‚a I7šý+BUMÈß&Ÿíæ÷÷#aL‡¹°–‘Û I°VþçhlûÏó¨'ES_ÏC}©˜ˆå©7UµÉB6&½Ûsˆ­qÄÐg,›Š¹,›‰ÏY¾$æ±|Y|Á²…ø’eK1Ÿes±€e+ñËÖb!Ë6ÁlF’ŽÙ$-a¹<˜ƒåŠ`N–ÉÁ\,S‚¹YÞ æ1’4Î˲¢˜Äí7™[n ·ÜTn¹iÜrŸp›Mç6›Á­8“[n·Üln¹OM{#™ñ(f<#3ž‰fÆ33ã1Ìxf<+3.ÀJüV·b[<ÒE:ó óïÚüN}~ˆ#_ìïD‰ŒÜ×2q‰6÷6¥ˆÌ¿‡Ú™ždl/Ù“ÑÜWÍ2N D”0ÿ…ÞX"ÉöÅø´h,ž Å ¢‘x^´s‘÷iœº/,»É>r¥Æ©OÕ¼‹É˜‚÷ȾNt&9“)ÎTgšó‰3lí*gµ³ÆYë¬sÖ;œx%*´ÐÆj :·œÛÎ箓ì¤8÷\2{î‡î÷#w¤;Êí~ìŽqǺ‹ÜÅî÷w©û­»Ì]î®p÷¸ûÜî!÷ˆ{Ì=ážrϸçÜ î%÷Ч½ æ9žëy^ÈC/WÈ+ì=æñŠzżX/Î+î•ðJzñ^)¯´WÆ+ë•óÊ{{¼ŠÞÞ“^%ï)¯²W= !bfÀH¼‰·ð6fÁ¬hžAæãUðJϦ™CMòidyíDZÑy²7­èBüö3òú-¯ÊÂyï5½š¯æCDà‹À—!°8°¢77hÞFkÈdÖ*4¿9à‡fÅB³™Aä»ËÒšýkxŠVÛ»¡­¸÷Â3ì»k³ï®Ã¾».ûîgÙw×cß]Ÿ}wöÝϱï~ž}wCöÝÜòÚ/xáä©[°§îÍžºF‘§~›ô\ ¦Eÿµü´Óo-ä0›Àlþ{çÕĶõñ9Bg(‘€4i*(eª * €…f,ˆ"½RT¢ ¢ J‘"‚ ¢‚׊èUŠ °! ö‚€ ¢¨ßÉA¼Þ÷î{ë{ß]ßZoíÙçL2™™½ÏÿüÎÌäŒ:ŽRè8ʣ㨎ö\í¹!Ús´çŽˆQœG~Taªj…³1Þy]sLixþÿœÅžƒ¹× ‰2C™BAæGñ$P<ÅQ<%P<%Q<¥P¾1ø¾9UI.ñ„aj€ž@Õþ‡œÆs÷¶ªJªiã¶8åöµv(;KHduÇ…¬È¨îê9ìZx7ÐÆhÁ.›ÈéúK=äýRÞÖ’ÿðÍ1ùIz{Ôn~¨°ŒzÐéžž•M<\cP&N:Š”*JUÎÌ8‹I¬󢈂³IÕ‚aR…Š´&U&Mª~¹æÐ_)¸à¯Ôkù;ª˜ÝSyîÓy¢m‘[ŠæÇè¥]ß[Wû¥Ôúîê;ìUv+7ÝjÚ·«a›6ÅøY%S·³ÿªÿíôûÍø{óóü·Þ™~žSvãÌ8ézkó†ëŸË?>š±ÉKÜœpíãÛ£f½¸|“Ùù; ßM;§$Ý–>;ôÕý¥XdV™7«^JÙ][ ë=`µAiÛ’Œž°¾#[9ŠÑa&†’–uk'[¿-í˜Õ+£—xsçf:ç;Ö%çOÝQ9àÑ´Döœ°w/xÛ½¡ƒ©ßê¼cz~àÚ;/u –Kð»2k…ž3¹+è…/õJßÔ;»b©„Z~xtM³Ʊ=ù˜äROBõÚ;¤^zãäz1~V¯¥H„…¶Û”Ò£åFÓ)0ŒÑ¤ÌˆJ¡ï¡bh“Û±úv<͆"cçëåëîê©l¶2Ô‡Íñ D*E’Æz &“1I UŠù­ÈäÿNÄûgRs”³Ðe4éqFq÷2eeó]a¬€©òÍì†úîþ_ÒèÚ&‡®—«ÔÍa¾úzÿœ¹­ÚMv×ÀYxSÝ!åYïº|Šmæ$œŠœ³"ÃJàÎç±mY+㯙±®%æîÛS=†{k]fÞ+-1} á“&WXÀ qê–I}ôÙ •“Ó¶T)|æúXczcÈbêoÞó ŽúêÞ-òe{¨f{˜®cë(rá‡k‰Ë?××.µdØO{4¼ÊÑ”ÐP½hdkšÃ4M¾œkÌëbëÄÕ˜@eVÎi±szM{y÷LÓ§Å‚X¯envÓâ-ãXÏV˜ÝcyÕÈÄ8»<Ü¥@&;±^2ÉɤºXh)åúÔ¸Â#²ˆç5=„¨$¾ Óž_r'58RŠ_èÛ(BðQÑŠawð½ç­åsÃöú¸„Ó—M)b°÷™œ¼¥MŽþþ¦Q8Ÿ¨’0ÆÂV‘‡f6B܈bî²éNãÓ¥ Lx(ÌÚ±ðÑ^Ò~PÜf‘VäÌ‹³¸i]ܾ/æÀÔæ©6ÇaÂfMZ’3† ›ñ¿"l¼c1¸Ö?Ò°…“¦®gYú’=ý³Âï%¡T4«ïåÒ•¯çNÑn±(ùRÿ\›‘¯Ö°Æ>=ZeI±©îÜßòŠœ2;‚OT•ˆ¬˜Åé›úÂl]ÝCQßú‚Leí"öç.kw̾v2øi‘X¥ÀéAUÂçžæ™ÝoßtvÄÑ7©rÚÝÅR‹°—«Òž* ØÓnûaKnÝ3ZÁ6ÛKò×’8;&¬Ìû ÐÅjönPýê¢x9oË©ñG#Ýfä9\îž¿À©5Ÿ9Cwé»;‡np™A{wнô}º?Oëô¥‰„çÖ]wßç}”'äiœÚ½jÌìMž5Fì”u©5 /mMQœµUût‰þ …N i9lI«Áb•+é…:c‰-vÍÖt¦u&§ém@]õ«à|çíÎQ©‰9òÖ”E}Wó½…C _këÊ\zÂ1’zÇ>bâÍíŸw4Qî©D$´JÜ÷xǾbyãºÌóÈó|å×?iµIÈ.þD?½äQÿÃýë,O,³ò\6Ýö°ù+Û×ea‘·„õ…¢cÚ ÇÖǹŸ[I”x¤µ§ë¬9CUYÕ¾Ãl¼oMJÒŽÚÄ[*‡Ä\2»òÅù¬õÓ>æ)î,顯W?կȊ¡»û^Ç Ólír«¦+ñµU² Nbu¾i)>Ýï«oÆÎv‰"‰r#{ÁæS’Ë/õûÍ~Ó}ô‘~+üúM‘ú$Tl=rO¿¨¨GòŠþþ3õÞ“p¤í®õö küuF?<ÕÞqa—ƒš}É•VY[uñΦ¦¹%¡¤²äK›Ž;¤g¥Ê›o?”îBŽ»ƒù?[}êÕ&ñ>‚eÆÔë©oÌêyç­ 5°úi¼â‹§¶ù¹Õj¬ºÄ3¯ 5º–66çËëßâÝ¢qÏ’u8®ñ±†¥Îøâ8»ùóDQ´>ù%'“Aß.$³>®mN+{¦’¶öÃ5Ú[ÁJVà¼ò™É{¬±ÙV^’ã5½ŠÒ]ç™×¿¡PÒj”wφ×ó#¾€ÝŠö‚±˜iùºò¾šå‰óÚŽ{J•"Ìá mSÖ§äºáŠbGú2Ž‚+ªs¿öSkÎ)‹ ©÷AxD ÿ‘zÿ G¨·Äpõæ=…žŒIߘd2&ñ×ò›ë¾×í?žž\‰Èzî윂’¹! Þ Ðt<ÿߨþ_BYx¬%Òj\(3 [Ÿ——„ß½é`Žè„®X(J;xåôê¤*Ry[—W9ãõ¶Ê4û]­«¦·;Ÿ(]°[á¡"ˆ+>ѳ¹ñÕÐÙ~:I˜z)Ѻ½‹%Ýjwpû£§‰~7£«Ÿ¤öðëÆRžo› ®ü©wàQÄ.±>öà“²¶Y[ý…9;ªr'ezk_p ^,w™FO߬<­]@ŽÙßÀ˜Æ0ȹô"Øôk¬0­íœ°ÛÖ®–*™—¶›×]0˜èšæåÉ(óÕ7X•N²îD„§Ëb #<ЏvgTú{“ã^ Ê´uŸöÇÆ588=Ë N (ž4÷Fo䙲«–k¾ÉËÐÔç—[^kª8†Û%rQëÄU‹²Çý¯¢*:ö…TÙ^X¡&5.LÄdÞ–‹,-F,+;lã}iù×èH•èliÒ뙹”«Ü¥lU•F‹çŸŸxgÝ uã3zî¸ ÖêK½pz³ïþ®¬ºÉìS1ãCù%;ÃTÎdp«Ç;;âgº)7Ì­<(—¶ïÌ«.)öçfÀÑ/m—¶¨ÕzÊRÜ(å›j—.Lªz¤ò¸âp{y„#õ†™Ž}qêႈƒe9;WÊÝÞ¾‘¶RU—Y$”³xËØ39o6Ô©4¿T²«ÝÝ9ëAðdo‰ºä{éIЋ´+ ͯąÅ.·läso}ÔÍž¦3Ÿî_KËÿÌàò¥‘\¾2fãßÈË#NÔþ8Í›sžGißÒVˆÂ~~ï’ƒ ‡/•æ1àÐùP‹Xí¡–mú²SÈ4¾ˆ|Æù€=}Jz ûˆ(ÉtÌ™­Ù`¾˜;ÆÁØè4´Š)cŽX$ KÞ°Þ z>Xdî¸hõ?m£¡‘ÁloŽ[°O¤òO} `«Ûª~ïH®¸:åÞ¥ª—•m!/Ü–YWÝzUA=·$CÆ·X»­Qgí¶U’oú’ÏLhk,<o˜÷e±(­»`cÊÜnš]úÚ‡¤}¹¬'Sì­„g7¼^í—ÞB&T5jZz§—=NÞÜá h¢ö:gÚû4W™åGÓ¨Fô‹éÇÒ$%úîW‹ÅgHέ?y9ÉÎKPESêc•iÍgÿ ÂÏ)):¶Ý½{Tz¬…BZU¶Þy;ƒÍÝÒ{¯úldõÞ›âr²FOŸu£ïZri¯1^Æ6´û]㢊ïí¬„i³fé[‹$Ü.ež v±Iy–ß½éTSAóÍû>ŸTÊÛ¿`ßÓV|ŸËÅI.>,¸ü .. «øQ2ÆþmÿˆóqßR1g );<E~\ðð¿/¡2Äy§ÊH†“êAˆù9 ÍÇŽiÍö}kfOÂúþsû®¼Y©ü“6ód‘ºy¨?dƒMhØÉ’µ²»j©¯ö=_<ùõœ5ÇÝ:‚ÞܪËÊÍ‘»¬"S³N¡…Åp·zäÓ¨^㘄òÆä·µ‡7 R¿l0ù0ЦéW»lÕíÒbáq·&4ä\{RÁԻѬ.÷&¯·ô¬‰HØ0ÉÚïÍë«âzøÎê¶Òà;sŒL邬©UÎt«Ìg˛ߊ¨1ù”½kþö¼âýN)»´Ú-›³¶»àûÉ¢r÷Þ¿úÜ­&ÓCe:Ûž5®/ïÖ=6)õ·W¶6lKå»°âýþë É®»>÷h¾eꛕ—Ì ñœ½Z6âÐØ Nʬ,R®¿Ò‰ Zi#zXnWi„F†ýÿÿPK!\"[y±jDocuments/1/FixedDoc.fdoc¼’M Â0„g-xñM­? ‰nׂ'jmÁØb[ðôêJEnJyo˜|’<îVeºé¨ƒÖÊ«–£»¨ÒÝéL]j¡¡R´J…æ2ŒoŠÓiO°f(W%3ÁÐçèNj)dL©BÍ .ÕW«-”´;|v{‚} 5Fñgh}ž6"!Üì|§™—ï“÷_^ÔqÞ¸ã¼Éy–·øþ‹š;ÿÿPK!ṪÉ$Documents/1/_rels/FixedDoc.fdoc.rels\ÏÍjÃ0 ðû ï`to”:ƈÓË(ôºu`l5 ‹-c)£}û¹ŒuÇ¿>~BÝþgóIE&N6M †’ç0¥ÁÂûé°~#êRp3'²p%}¿zè^ivZ—dœ²˜ª$±0ªægDñ#E' gJµsæÖXÌθpÛ¶XþÐß™æ,”cØ€9]s½üÏŽ“/,|ÖÆsÄK–¹ÃªöK¤¤¢eñºª‚+©…·Ÿ¾°ÿ Í÷$`ßáÝ[ýÿÿPK!v$Ò’F$Documents/1/Pages/_rels/4.fpage.rels´“ËŠÛ0†÷…¾ƒÑþXÖÝÆÛ‚ÙN§`lÅ1[®¤”ÉÛ×é&¥ dÐFéÓÇ9¿ŸÞ§CòÝú0º¹D$ÍPbçÎõã<”èë«%!¶sßÜlKt²=m>z|±‡6®—Â~\B²RæP¢}ŒËÆ¡ÛÛ© ©[ì¼VvÎOm\·~ÀKÛ½µƒÅ4Ë$öhsÁLžûùçž¡äõ´¬/ÿÅžÆÎ»àv1í܄ߗpF ü“úí8zÛƒ·Á}gWBëK”¦ø×zù] XÔS:× ­An‹”PÆÉd¥ ®S×ǸCøß†ôΆœ*£¨. 3TCF‹hÃ(°*cB±œò¬¸nHîlÈšŒ(Ê dUUѺ™ r›“µƒ´ºn(o6 ÑùÓηÃdç.Fü%úcÞbó§Žyz>û¿Š›Ÿ÷ö–ɜ甭ӫk ¦Ö ”¬ÀUk®ŒaŠ]o¿³!'rK˜©³5d\U´‘˜Q‚D1%>„ _üþÍÿÿPK!‘tVHP$Documents/1/Pages/_rels/3.fpage.rels´’Ýjƒ0†Ï»ÉyŒù1ÑQ[R­ÐÓn»€ ÑʪqIíÝÏîÖ1 ;(|'áMž<ð~‹Õ±?oںΠÀa=T¦î†6ÏO%L@à¼ju0ƒÎÀI;°ZÞß-vú üüÈí»Ñ3epØ{?> äª½î• Í¨‡9iŒí•Ÿ¶E£ª^T«‰"ŽìOX^0ƒm»­)žNãüó/vßUÖ8Óø°2=:ŽîŒŒÑõuꬮ¡ÕÎL¶Ò3AÙVû „!úœÝWäÃ|iY@F‰„LäÊ’3HKÓ *â44µ÷ @’ÒM„a%Œò¼€XÊ ä &0e1_'8e’ä× ñ ã"§B&rL È×iE,$ÜPºá”çbv¼nÈþmè¼±§Æª¶×ƒw?z;U~²•ß9¢áùî¹Bt±¹ËwÿÿPK! ÃÏOO$Documents/1/Pages/_rels/2.fpage.rels´’Ýjƒ0†Ï»ÉyŒ&šè¨-©?ÐÓn»€ ÑÊjâ’8Ú»ŸîÖ1 ;(|'áMž<ð~«Íi8zoÒØ^« „~<©jÝôªËÀóSàY'T#ŽZÉ œ¥›õýÝj/ÂÍì¡­7S”ÍÀÁ¹ñ![ä ¬¯G©æ¤Õfn>š¢~D8(2?`}ÁôvMÌ®!À{:óÏ¿ØC_muëüZè4Ú£êëÔÙ@#­žL-g‚0tð}ô9û¯È"š”0žÀÄUÁaÌh«r‡ntÁ”2¸ ¼ïqõA÷• ͨ‡©²7¶¯üôh[2Võ÷ªÕ„F‘ ömÚ\e»&Cv×LýŸÏãÔùŸì¾«­qfïÃÚôäet—ȘüNýqê¬n°ÕΜl­§„ʶÚg( ÉŸëéoÉ‘]?qé.·o,‡‘ÿK€-¦8oìyo«¶×ƒwWŽ/Þžj²š”¯uáåÝ÷ú/ooõ’I°"Iy‰£<Ä TE§<ÛR®hšÆûý{B¹x@Ë„\€’ežbžŠ3š&ø±[ [& •eÁļè‰WÛIÎm§[K¨ž`Y ³2•X”Pà­"Ê™bñúñ¬x\(%1MX™Š Ó8ÁEIy¬(pà|^(n,¼ZM:·škRÄ%^Ss˜N“õ~Þñ…¯)‰æ$éšþ*!WçõæÿÿPK!Ì÷²³%ÃÔp4Resources/427F72A9-0F2A-0298-2E32-3C0357382409.odttfìœ |TÕÙðŸ{ïÌÜÙ÷}2ëÍLö²2dÂÂH $öEAqE.­KQë¾U±u\‚¸Õb}[‹Kë«V«ÒÚ÷í¢©KµVj’ï¹÷™„©ŸýU?ë÷›sæÜÿsž³ÜóìˆM°[{º;»Þ©-߃ýŸŽå¥=¨ÐÝc9ˆy¼?¤÷¬ßrfûƒjÞ« ðk»û6È+ä €þ\±|ÝÆ#}ÇßX;À÷ÚúÎ3{]/šÄöXØÐ¹¾ûçCMë±>–ëzz7nÞ2b„‹q0Ÿ;sî…Ë S>—Äpø¿ùìk—Ÿ4ô¬ÚªLT˜(`; sD}ËñIÇ5XÌõ0.¨”bÃ:XrÈF™#Î’jPº/œ,‡¹K•òëä%إȽ³ Ö gYV¦feÇ€‰Â}#t_€Ù­€(Î¥1ð7±TÜ,–qÉM¢¥Ø»Ra\P¼ó¿é1|Sûhä᯲?Y7Ìú*ûûºƒB²íÐøU÷Ëýš¾ê>ÿ¥ûŸ#žm_d^hù:Çðu÷Ÿ ú»æëè—}üëé÷?1pWƒí_©Ï¾ ÷žJþÂ6¯Ã-ãóÌûóê^ Wü+ãI…TH…TH…?°7ÀáZÖ7ü¿Ë·%p“á“oz © © ©ðïîM¨ø¦Çpª [~ÓcH…TH…TH…TH…TH…TH…TH…Tø¶†Ô÷êTH…TH…TH…TH…TH…Tø.™Òè÷#àJÌ¡ÄîlÁ¼Œ¨µC!˜ Р¶{+玌Hmt¯¥­¡Þ ¶K:¨“úŠ+êâ¼ÔW`µ8fØ8ûdÿÞ#,ïÈÑv ]§·Å¹NlÔÏ5ô÷râYB}<ë¬ß;Ñäîx®Pßϰ³æùc7`âò°Qô 8xað݉šÎ¤F6~ ¢(š8æ&,•dž#Dû‚Aq,{¢°3ñ]-m”ÀrO¢9íq¶C,yr´ÄKv–Œ5ï‚âT5t$?Ûzœñ]Ëy¹è}鯖â\¤cùŠ‘ÝýB}=ùmA[WÚ<Áx´Ý×.´u·‹³$ãYÇðvAéŽR+´í¤Ú£•EËù°2ÐÆz¸vq¶PhÄ‹P; Œ8]RVœÑÚ)6Æ£Õð.É¢4¡Ìpáºéb'6­›î ¶)|Á<É1ÉÃq帾Œ¨ÝçŸj‹Ê 4t×à„NåÉ&{;õ8YÑÉc ¥8ÓG‹¸0î\Աؤgшü@›Ð-´ ¸†¢óÚDÛD_KóÛÜ*4·,j“f;¹JLÈQy9åâÄâÑ [‡k°1Ç3:­R¾IÊe§ŸTᙨKxf"j ÓÑ„§QC˜šðÌBT¦ª•„VBõYN(£ÎJ “ “¨ÏB1µ+" ù„<ê,—šçP»l*Ë"d2¨f„¦éÚ…¨f ø >‚7ឃH#xî¹7ÁEpR™ƒ`'¥`%X¨ÌL0‘ÒH9AOJAKÐÔUÂ5¡L¸Z&|”p.@ü•ð!áÂûTå=Â_H9Hx—ðáÏTåO„?þ@eÿKøÂï oS•ß~KÊc„·oÞH8NCü†ðz±ñáפ|•ð )_&ü7á%¯¨Ê/)÷"å^ Â~½„{? vwSƒ»Hy'áÂí„Û·n!ÜL¸)a[ޏ‘ðý„mↄ­ q}ÂÖ¸.a[‰ØGøáZÂ5„« W¾›°u"¾C}^I}^A}^N¸ŒºÞK öú©æ¥Tå’„-†ØM]L]D¸j^@½œOÍÏ#ì"œK8‡°“°ƒp6ᬄ Ïdf;ÝáLêú Â6ºÃVËÂfº_5ßDè%l$l ¬'¬#¬%SÖÐýVz¶RÄ*ÂÊ„õ|DwÂ*®Ý®„õ\ÄŠ„Ul·œ” kÑAÊe¤\š°žƒX’°^€8=a½±8aÁ‡0³(añ!Ú m ‹±pZ‚y&–°àóY@h%ÌOXð1Ï´$,ø`gææ&Ìâ¨ç$̈لY¤l&Ì$å ÂtBSÂŒÏM¦‘ª4²žP—05!j&qSNK˜ÚÑ„©Q“0-BL%T'LâjB¨"T*¦Dy”‹(K˜*¥„É “x£It£BqÂ$z°ˆP˜0‰Ž, äÓXò¹4¤R6!‹†”IÈ ADaB:A !ª¤!h~ºŸà¥ši5w\'Õtì4@ÁJã´Ð̵3 =AGU´”Ó$ŒKê„q)B•0.C( ¦÷0ýÓ êßÅô–ýóÂôGLÀô¿¨ÿL¿Gùmäï0ýëÃü[˜ÞÄô¦ß`zÓkúUþ_ë{ü¯bzÓ˘þu/!…é—˜^Äü Èç1=‡é(¦_`zÓÏ1ý ÓéÖúŸÑ­óÿT—íyD—ëÿ êžBùǺõþèÈ“º5þ't«ýëzüaÉ£º"ÿaL`:¤ÝäÐöùÖnö?¤ÝâÓ˜b><€uâ˜îÇô#L?Ät¦ý˜îÅtæÿ4gùïÖl÷ß…¼S³Ã‡f§ÿvÔ߆éVL·`ºÓM˜nÄô}L7`º^“ç¿Ó>õÝþï©ïô_‹¼ÓÕ˜®Âô]uÿ;êóýWªoð_¡¾Ñ¹úfÿe¨ß‹é".ì¿+÷_À”ûÏ튷WìÜØÎØ9ûwÆ4;ÍNÏÎægïÜ¿óõQ³B½#vVììýgŶÇΈ¹ÿŒØ#쥰’½$:%¶mÿÖ˜l«uë–­ÜG[™ý[™ú­LáV†…­Æ­­œvK¬/¶y_ úæõíê‹÷ɪâ}ÇúXècÔ#Oìóø‘Ñ}:cã¦ØÆXïþ± +×ÇÖàW—¯Šõì_[YÞëÞß[Q¾<ÖYÞ[V¾$¶tÿ’Øéå‹b‹÷/е—·ÅbýÓÊÄbûÄZË[bó÷·Äæ–ωÍAýìòæØ¬ýͱ™åÓc3öO5•7ÆÐxH3¦Ò8£8€9i8üî[[è‰zŽyÞ÷ÈÀ÷<éáÌ·ßÍf\LÝ\³Ñu®ë gp>ïd£Î¬ÜFƒãyÇ[Ž÷2KÔ‘•ßv£=`çl¢möÙ %ÖÔ‹&K¶Î¶ ‘Fƒ1Øü6¶ÁocÀtÌô¾‰³=a|ÞÈ ŒÁ0b`£¬nÐûõ¬xÑsQ}QY£Aç×±âeDÇÙ£:Ôˆ=fhç-h4hü6V£™«a£ššºÆ¨&¯°8&À0ÀœRcó7â¾>hgä >Ï,hÍÉiàGæ7Ç•óÇ™KâáVñmYW\‚ߺ-n;À0—·`غq«øÓ")Ñe—A­·9îmm‹ßâmoŽïB!* #(€÷€jÛs–nÞº9'gËR¼,ݼ%Gú`ŽÙ*ærD¥øÙ¼óbÜ*å!ç UC,ÛŒa˨rË·úÖæ›Àxp.[*þëÀðUþÁh¬Í° ãÅp\OÀë°.@é:¸î‚{ ?†ŸÁ+_Ñ¿‡Iax»|=h¹‡A€‘ã#ƒÃwaëÇi®ÂœE8¡1Žüå$Ý_†¯1(Ì –ÚêØ_¢ö¯ÌÐÈq¶FÌ”Šyv7Ê©ÅüMÃ÷ß=a83a,€œ ¡æÂLó fÃX°º VÂ*èÕ诵°ÖÃL+a#ôÂ&èCn­° å-I åÏ„ípìLòlØòv¼ž%IçÀ¹èùóÆxþOh.€‹0]ˆ×‹a7\—"ÅëDÝÄ\?ì½8Ÿ—Ãcò§ÔŠò•p ¦ïÀwqÖ¯FyÎýõp|_Ò^×Â÷¤ÜÍp–_;¡®Xv¢þpÖºnÅš·ãê¹û¤ºbÍ›áQx ×ÔOáq\mO ôBù)x ŽÁïáðGø“Ô2Mð!|Ï£÷W¢×EŸ÷J×Õx]5æñ3з£ž==6ÑÛ’eäÏó%?–5wãlœ?®M¿4O£}‰µGûï/Ñ&Ñ¢:²ðª1Í »'¶¢zã}6у×Kš‰¥'{v¼|ë?-¹îÄt^Åy897*ýw¸˜î…ýpJt=‘•~?‚ûñ,8áAx†±ü˜;Qž4£uN­K«à xRšÿŸÀI÷J‡’¥O$K‘ä§à<…ž…_ÀQx×Î3RzžÃõñ"üO­ßÀ›Éô²´‚&^€exU®gäÜ“ð;ÎÄü+ìu8 ÿ=èAާÑfî5<=8à¡J:æ>˜gϳ+§LS3ƒ0x¦ X0{A Ó5ËØp™‚kñèL½-LK=Ï.€š7Þ|cÉ›oEe Þ|yÐ8ôò ¹¢¢  ¨1MR²êYžW(„P>[VVZZRR<•<)ŸBzL‘É“¦²eS¹’b+U¥š’+‹ZîµÏss‡ìÙþ† sÒY¿GoÕÊ™€ÜïPVÏÍ·‚“33£~^­`åJ…2«²>T¿´Ò=ü ÇkxuÀnwëå2^«T\—^6Ü(×ÿP®ÿGlÝ?®æŠ&­š_*ß§V²2…âQ#\Õtå,‹Q«—[ìfo1k"Õ3‡ö(n¯VóZ£ZåtÚ•*µBk*æWAVÂÁGØì9Ж#¾ÅÚ¢µ¹A«.?ß’j›5§VWä1…yŒ!Ñpyy•Z|5œÔ’Ÿ§³€ÚÈÓÚ¬¹ÁJ½'Òâ‰còXf޳ƒÙQa*©a JrŽ0ÅÅ®‚eK—,YbÊ©p˜Ðç&¦ÄT‚¼Ừ÷K÷XTØÖsÒôXFt$ƒ¸QN8 K “yù¯Xµ5èrÌrö·ìÐ\evfVˆyeR›äì Ììôè»9^£ì°œ­5øÂyi}§I.sñZ^.Ç‹lÕ?®Ñë Zœ…}cº»­>‹JçÎLû¬»Û“áÑ«,^;òðÈqn/®ãD Õ…ÀékuZH×fyp€š­ŽšÁ  ¼Z­ÙÛmî‘÷d>žÍîÀùÈ-®(0WzŠ)xiÐ8è*(AÇIsEQaØ..È|6##È‹ÖG"¥e ­L/0AîRŽ3G‚þQÎdGwÉuÎpšOÐòZ6Sapgú…\—š¹‚~‡é™‚kN&ã5ÊÁwTh•\ŸfãžÖèyŽSêµ»†Õâÿuš ³âsÝa(9„¾ÃëÓëzÒû¡©Ë÷¡rÕ¸áÖˆ{«‚)8ZRüÒ î0«^&¥I’¶ÎŒ¸­ñT™Ìê®î¼ì±Ë‡k¬z¹üŸ™öÁwn(×uì½iïÊóV4äYÙÛf~ÿÚ‹»«z—‰»#è-Y~ùšŠÎÆÈgÉŸ»zËYâÿ¸j9.GY +¢“A]©Ñé ‹ óWØNw:4êÒ.‡Î®†‚B—S«É/ Wý™]þžÏM€¸æp KÁTBñ„„spb%’4~)&­[Šv^®eT¶€Óé7)˜ìÐo8Õg·yÌJæö«².®Æ§9îÕîŒ4³bŸŒù©1Îó÷¸üJâ$ñÜŸ](WñœL¡Tp;>»tLÿL( vfù‡&³/x#Nu ”ôˆ¬Wb54D¨.ÉÓ[ý¹|DçãË»}VòruþHIµÆêrõÈVM\€dþ‘bSÉOKŠ”£Í¸ç¤M—ÏezŽŸh¯ÝañqŽ’©œ´ÅIæ.Qe¹»Ý>Í=Z—éfzƒžßÂ(->»·û´v§3¨Ú§u¹–7ŒÊnFeö;ìièŒÚPÀ›ÎjÂóZ["‘9sg‡†o¯?0œiii‰d´ÌŸŸÍ +¨L!®Ø&܃ûp-ÁT艚+¼¾rŒY¥]«•C¦²x€­‰úA^ñZæ ^FéPÙ}™Z^ÈÊõz…ò÷r»„ÓÄå0(mHt ,ÉÄ•=XP e%’wŒ;w9"-s–·Û»ÝfÝ¡ùœ0a]'¬~–Û¬í¬É-5f²2¥#âuû<V82«ó»²j[ÐåXäè©lÃÎÛÖ’°dÕ^Óp~Óòj/W]¹*6ͪïœÿ¶Ùƒ^Æ©tš¿f׸‡çŠ®âð âž z½±wnÀ<ü£ÈÔ9âʸýs WF:”FÝN-£ÑjüÝF N]ºÃ­R˜»<\¢ÅâÄŒÙÄáéS:nµÛí žU6ãàCN—8øY/òŒ9+„ œgob˜Ùr=œÌÔ«ŒÌ5ÃçN)s;W<‹pÌÊá"æy¥¨7¸ì8›-#ƒÜo¹ŸãyZ—=žËî{jTy•¾æþ"‘*åó£‡ÁapPE¬/ê°€ª*ÃQpÁÙŸºg–þ=ªŸÍÍ’ž*îÙxL‰fád¾„O¨7Ñ4ã ©¢B|*Ù¿DCñy4úº@ÞÀ—™¸’/<‰à˃Ìfõ±âd—q¹²ôl«ÛˆÝêê—ôUÍ[=Õa+h^³·½ýÜb‹,’iõe̯ Ö×—.¬+ò4þÒœ²3Í.“}¤º70+š]~ú–êò˯޻±nzÍb£žSjùwJ¬íÛ+4TÕë¾Ûä5Y~“Ë…Ø=ÑkQu0¯&„ªP™è'·-”Ëe4¢R¥…¾ðÓ´™•'[,.³x¨©ÀÓ`çn½¸æ=Q×—nú9ÉÈ_âÒIž̨Ãìä¯<.=Ûæ6Êـ䯪…Uao/l^³§-gÖÔI¶•ŒÚp9ýø|~Ý69V_0ÖÎï´›k²ü“fÌôW^ù=kk-Á|3ÌëĹŽZÞ0½hþšMò;WMYóÝ…¸;jpwÄq½UÂÙ'ù-Räv{"2=ÆÊôaÛ§ÑÒ™a^æ6E”œY*²\Ú1h>Spä./:GMÒ+ýÿÞ }ÅXãOØÉ“D×°üø÷i¹¸’ßÄâ3½a’3yù¤êÉ—5›æ‰ï:N*Ù|G±Ú<2Ô/ÝT]·¨Üɾ,Ô§=§Ô(e2¼°¹þJ{usõÚ«NÞ0ªä.ÂMɉ+í¾®À¬º6òû!z©Ö¼º2M&¯9 ¼iÚÆ5FófšÓL™Þ …#4ÃA†Žy§àÈè#ÕsÏ¡/®.¹_&BôVþÏœá°ãÈdJ­N©´8|ÖPûiM¦¹'üpWMÒAGÍÌ– “às(Ü÷e_Àcƃ´ªçòÖáŸ7ÿެY!9¯R(ÄSÔ6|5w;÷(BÏI§’`µdfb†: `…¨>jÉŸ!(­ÞÖfýÜä|Wˆç*š†»jpìøÑž²^rQà“—}í_ñ+HòƇ¯ts·ËäÁ9={:†‡fwØå̬æ£kX–Gxü&žÙÊNíZÐäg5¶tOž»CãP/~ú•?Ÿ7|³R«’ɵV=SÁmÔZyAÅq¼^=ZøÀ¡Ç:Ewhñt¹—}š3É=ø–; ÀOö9Ì­Q—I|ÎdÁ“RqþÞÈíÎM…wi·p›ñqr{>=NNœ½%%ÒôÓý)R{ò$eÇNRö6Î 98“2§jzƤ†,³ÞWÔ°¸²¬5 fBÁ ßɧfå×f[y³ßå‹VhØ·µZf™57ì •Íȶ·F3²2Š5:æÆpnÕi–t¯9=Ú>9i_½Â„Ïœ2|‹×òàÉ(KƒHZYh¤L‹È¸àzTàë]6šY|*3¥ÃO²ôÈè±i23ÿÌÞ±w§QƒíI{Y_­2«r¦LÏ(oÌÔüE ‹*J繪¥Éc±âWGæuw4+·6Ç–‘¨«ÊS±o‹¶-³ä†]Sš‚émmók">&C¦”sœ\)^έŒufOʬ]X€+úöYö¯8«å0-̱ÛC vË5¦» 79A´kÊsBÙ괌޴Íò †Jw3Næ‘âšÏÏŸ]|òµˆö«}t»ÚpQ³w¡n«dÆ49y§Uå«sÑ4«uì:Fip˜ƒ6Æ¢ÉÒÉ«Î0)äìïÄ÷`/ÌtS@ ‡§µMzuTÇzDI«é°ç¦;™e>[®-iãZ´1¦FýéƒÇnu¦Ã=ý-5£>œµÉä6¤{ä6_¯m‚…’øö‡çyIÒ@é$:Ù²ÑG¿d!DkñÛºRÍ«}GYI–j¼E^ÁhÓÊ‹!« Øeàa3"3;ÜV½63º ÷¹J!“)TrÖ­ÑŠö,vå,J¥ m¸‚ù„}OnEšJ<\˜§0ͦÈaæv{zšœQ˜TeÛÎío~Q£“)õx ò¼Ç“”cñoxMaתեh(§Á=wxäoìùR°ATE­6]Ðx{¦,ǧ±Zf”ã3ÿßlccæè‹Ö =grT˜¤=vÒÊÝK§þqÍ=âcÀfwdì}œÖ™îö„,2î-…Æ Ñç nÁÂËÕFµ1;èM·à©ÔŠO|<¢3kär­YûõúŒ AmÐ+ Nƒ.’Ö5*£-¹ad É–I–”ã7f汃jµ`;ÌVƒpM$Ñ”ÅøVWŽËzN|Å/ÆÁ/mÆ6Veñجø4c/eÔö۲ș‡åJŸíw̼B©W¢hXÕL~ÕÇG~…ây­J.Wk•ŸÕh¿R¯W™l:mHð¡¨D3ÐŽO¸•Ü|ùV°@L™¦+søÀÏ0(«Á¢*M†Ü•Þdl?+oa ^|cÐ8ôÆÉ¶Øù“²ì¯q½8Íf‡NÆLg4Ž£P g2*£•ÚqJîâÑiÀo(ÃE'kpÜøa3¾›L†(Ô?‰˜KÕñ¿½AIå«ÚÌj]ÙãGu¾ øŽåϬþ±_XA:¯KÄR š¥ïŃÅŦŠúê+þ°trÙ‰())=ÚF>Hsb³ò¼RH‡wiû¡Lˆ~Æ<ý¦–©ué³v?ºi‡^k¯îš]fÒjykØ[ýy­›}ÚŸ]vÍu3jÏnvštj=˲‹jƒSZ‹O¿`Afc^hf•Wð¦›]a¯Cãp¥O[\VRypãòÒú¦†‘x”}Av«üw¬B…¯'xJ$ós¢æ€Áà°ë•Á =+ăÂh°—<ä œÅÒC–>M×7á”H~é+y©øhq±¿í–{T[FÇ%óc?÷`è'¼ÌÊúÂYN®wøÞï xØM½lZ$ÓÉí‘Gœ•vŸE-[ÅTY 3jÝi<;¨5ÙŒlñГ­QËÖ =%åHóª,i–a °7„–ýà?#2íßh|êËEÖö5Å›8Ï—Žûÿ½(c?oü×¢¼ò[~ù¨˜óÄ_œ:òS¤øðç£2+÷LˆKÅTü¶FÕâ ñ‰ÿœ¨ö¤b*þ¯ý ãM©˜Š©˜Š©˜Š©øŸ5êTLÅTLÅTLÅTLÅTLÅTLÅo_”~ÛQüÛ¡¼r Å«‚ÙÆ<3ò:³—y4Ì3xÿ¢k+þ+8'Õï’®œÔR/åD™-— £Y·˜“%e¤qî¤,'Wš”¨Ÿ“”yØÆ­IÊJÈÆ^IVA€;–”Õì-c÷ÒÀi²Ñ1h![vZRÖ±ûd»’²Öñα¿§[Ì_˜”àù‡’2 •+)sàR)’² ô*SR–ƒVåOÊ Ôç$eªTIY 6~ORVQµ%)«™yc÷Ò@Žjt Z°©îOÊ:f–êHRÖC©Fü»°ŒL•ô3Éäg’ÉÏ$“ŸI&?“L~&ùÿw&àQVgß?3“ÌLV@Aty €€Š‚ Yi¥¸´2“&ds2áu‰cŠ”Rê^*h[ƒ¸!Z¢¢LT@ ˆ!BÌà žÄQ‘Œ©úò|¿sžIH¾/ý®ïº¾œë÷¬g»ïÿ}– 1ýl^›~6¯M?›×¦ŸÍkÓÏæµégóÚô³ymúÙ¼6ýü 4F¤‹Ñ51[xD¦ðŠBQ 9Âdzk¸òŠ"utñÄÃUHãÍ$‘GÒÄžÉߨõQJÞesÎ&÷bŽY伆ryäqóÌCÊç‚|êÊRy ¸+æYzg–÷Ð \Ñß]ÊÝ®|´%ó”P£çÙÜÉ>—P:‹÷êwJ5ÕOMývi65˜mÊ6ª6³ÕïûJ[f([sxâR¿êUVhêìRVÊvM;2y3BÕœ¯žä©]øÈ|ÞÑJ>õä)E{YÀ“|ÕªY§´Ó×¥²Å"e‹éïo›}—-âMýöòåú]Zù›Í>u'-öuêaúÌlES}/ˆÚU¨|ëV9O÷¸«EÒkw¨r¦Õ‹¸OSñÐUÍ‹Tmùª†¥Ê%Qå»ú[*fÚŸ­ú/í7uñªhg³E©µFEÖ˜}\ÍSÌݲhí>¬0ZÜ©’Kň‹§ùÝìêˆæLzâRígFÛO;KÔ_ñ#;M}:ôŸO4ÆÆRË匠îeFv+óïGOõ'KE©ìÛ¢N}:üv¶q¹ óE¹eT›ÑP@þlW³È‘)†*#O–ªoš*[¨ê÷©ßs¿BŒ"-Q)M·îí¥EkÅõR T¯‹¨a)O¥7s”7dw¯µã¹ɦõ‹:ë»IÙ`FÐR¥|±ê¡OÅx±“fiMÙ ÇG¶R×£ÚÈVúºUÙoM7b÷¤hYo—7æØÊR>9=^–¨¶2Õx:[»æ½Ì›‰‚%ʇYñ—¥ÞËnZÐsEÊÒ‚hÔ™ue«£EgÚ-ß›£u(¥¤R2Ü-­W?ªùÜ}tºöŽS‹Îy>ÕïÌnsÏmï˜iÎìו]< -1m1gàŽ5ÄÛ9›g©ù¬@Ík®k©égW7Ÿš³AaôhZe^—¨È+Q%³ÔÜ ­Éî¬GæÌS£æRèÿÕ¸8=&FEÿí WtUHSZ‰;žÑƤ£Íödz ‹ s|Ú5…Þ¢B¯Ëç),HÓ&ååis< úе9ÙÅÙÞÅÙYi׸ò×ü={ÊüVç¹æïÕKåŸx®ùÏ?ŸüSÔßDqŠ•?F]OQ«¤¥¿Ð,‹ÅHËj1ŽÏº×ØfŠ rÿ–<Ùg”óœ¥\åÆSn ån ÷mäYpF¹ê.åúR.•rc(7r3)w¹’çöîå,“º”»rƒ)7–r“(7›r·’;<%g”ÛÖ¥\ å†Rn<宥ܯ(—Inù7Hîê^ÎzI—r?¥ÜÅ”›I¹y”Ë¡Ü}ä~ˆ<dÜ9ã,ÎxW©«té!ž?@²ÇZìöqÓW¬][䌵8íN§y£žMŸ¾víZ{ŒÅS4qbii©ÓN)Ó§gdhKV«3fâDùB”Úb¬ÎØŒŒÎx‹3a~¥kâ çL\Wú`é ’Ýn±;®šR¶âÑ…qvKœ#&&ƼS/æeMY±bÅ­Øe+é´gµÆE[1›‰“ÍÄ%Zâ’´ôôŒŒùgh3´™ZÙIJ‰»Åá¤jYw¼ÃOc¢·êMɶ±Gì¼ùªÎx‡p8&Ož2ehºFsñ6K|¬Æ?¢´4&Æo§½ñI–ød­_úÐŒ¡k§¯ÑseÏåZ™ÖµÉ‡%&ÿÓ6l–„Ž6£&¨F’, =d£é²Ñ Ù(ÍÒh™ætXœq&OöûËVû–Ä8‹Åbíx ÞÞêžÄ ˯æLÖD?fgCÍ v‘$ÿÞŽº³‡H}Ôs󉕑ÔC\@²ÍÀ×bМ_ÎÖDú¯ç\§‰ Ñïõ®Ò¼³¦œ¾k;Óæ¾[:ÓÇÑt„ÔÔ·µKЍgg¤~¹šúiý÷[|a³LòªßâþöþýúÏ鿺ÿîþÕ2™OO§þMgKªÍ¦þ_™©ëÿ®-kNé©ê×$?9`Dgš<`^g*ˆ¦RÒÃJN'ÍøêÀ}\¿:ðÕÔYƒæ ž¯Ò²ÁGH‘!Ï‘¶^´ð¢»aáEeCgÓdºhá° ÃòHþa«‡­Þ“4äâÕ¤'.Þtñ ÑT=rݨq£¾Kï=z©rÌãc‚c¾»äÎhZ~ÉÚKž¸ô+Ò©±—=uùN™ÆÍ÷ J5ãǯŒ&î¸_9~ŸºÛ7¾ž´rü©+W\¹íª¡žøð¤“·Ž›kææ¼ÏÌ5åU™oÊî©ë§nžú굯ݨRÕµÇT:1ML»`šví ®®'eM;5=qzîŒÒð'ÉW5Ó=Ó=ízŽEòŠ´xféuöë©4|VïYýIãfM€IÏúaö³µÙÚ¬ÇgŸ½vöZžóæú¸sö³Æ]ù¥¸Á=§þ×¹7i7 ¿éR×>÷¥î×ÝÁŽsf2éÑ…fxžölñ„s{æöÏ”;&w\îÌܼÜŹ¥¹kr×çnÍ}#·*·~ÑâE.zaQ{ž=¯_^ZÞ¸¼›óæ­Ì{.o_ÞWùö|-ÿŠü‰ù×çßš¿,}þëùò?ÉoÎÿ® ¦`HAzÁœ‚ vö,~¶g…S ï.\[øva°hHÑü¢§ŠZor¶g·Ï»ý»³ÏCÑ™¨Kê>“xµÓIÎÞ¹§“9;œ9–º3žÏ:stÌ]R÷ñï]}:ÉÑî}üt2ǹœ{D.lî;œ¹tàø}Ì|jUgæÌžo$­ÇŠøMIÎŽy¯W¿¤½V(eÃÉâôüõÆ2UFDs-KŽïð’|*çS™W¶×k¥|Þá©^ý¸ÁlŸŸ4PÖF™u=š8Téô ?挙}ýé¹¼Ël/ûý£<ò£<Çœ·™±ísµªGZ½¾×Êd!g#9»¡G5WGäücÎ1ælÅÌ&•*èTYKÞÖË:ZSâÕó¯Ì3ëd>í2‡šsdç,xÖ9М]Uûó¢³ÞäŽùާ#Ìë_Í5õÞ6ÓÝg“¹ž¨3kGßµ¬›úlë\¢3}¯Ê>›N¯ fdÉ5FåÞ$sPv^ŸmòzB.ù¼We’³#ÚúnáÝJꦼºVOO¯g]W4Ùµzu¬_§W°mÑÞu_³r¢+ÕfµJ™kÓpîÍ6iõÚª>e}?¦G¢ž5½«ÆOß.¾L‰7GŽô™©ì€é×Òæ¾GzOè+½_-ýße Žèß„UGdtDƒ¬Ñô6y[e>V–é&æÚ2pºZº$¹¶˜ëŠZ™þ/“Zͺ¤³äxµ{Š®uéÇ%Ô÷%µ ž{záNgzJ¦Îôß$µ¦žsRëü9¦3½£v]Òý§v ]’ŒcSéÿ,ý¸æÿ½wç–L?Ë]Crüå;§®W“4Pî7Tš+Ÿ\¾Sî1äݸ¹S×Ë݇ùN¦KO]zJîW̧jµ¨7“,3ñaµ§‘»—}ã÷©‰Ü½ì£Ä\vý£;ÒÌ"µoè/wò^åžBæyÐL2‡ÌCŠ>éßtÝ ¹KaœoœY$w4r7£R•z²QîfÔ]ÕÌ"9Dß‘Øm¾ö˜Üù¨P{ ’ÚÿĨyå®çô>èÚªñõÊâiëlÍ´ôòÑ^õ6{8ízU·ÜW Y—YïcíGŠuÕyð|óNØ-•Æk¶ÙÆ*Û¢‡mžH´ywm;Äe¼I2[’!Åh°ü*ý¼=.¬\é¶£ÂÂñ[aåø–mžñžè!ž5~;(»‡²{({Œ²Ç,óÅù—˜aq‹ŸZ2Å@K–H²,çQò JN±åÛ„…zE yÉ{>yÉ›¨êo$W˜2IFzƒÔûõ~dù@þAä¿‘üÉ?„ºQ÷@j[O? \=ƒ}½lwkmw¿Å¾ñ¶£ÆÃ¶c"ÝÖ(FØ>ÃmÇz›.ÿb6­ÕÐÚ§ÂIku´V×áÞ\È;½]EÍu¢‹¯=Aþ7º+å_3jD6ä@±>£U”ÀbXwÀR>Ë.3ÞÿwÂ]p7Ü'Æ‹2ø=,‡ûa<+a¬†×ÄTñ:´ó9ø”Є!4‹üW”,à7Xv‹¬õØæŠ+m·‡í6È+l÷ˆŸÛî…ûÄOc6ïÇl„'¡FŒùÀA¨…:¨‡Cð14@‹ñ±½šXÝx?¶MØc#\ ßïÛñ…ýÎW‹Qö‰œ5ö%p,…{Œ½î5Zí~¸OØíeð{ã}ÇX‘⸠r…æXùp§ï¸ ʸÆv¶;áú/°žëÍðœ˜êØÆ_8þßóîøo¡9­b¼3Žó3œÉë|¶‹”¸›EŠŠá&â=^E]“¸È}™È}Í ù4Ÿƒæsˆ°4"ì×DØr"ìF",‹›A„Í4ãÊk›k¬±ýÆXFl\FlŽeð{X÷à xVÂ*X UF»Ø{áØB5ì‡øÀA¨‡ÃÆ¿Ä'‚#ð)|Gýâ4 £V|c'¡ "ð-´ˆÛÅwð=üÿ §ŒcÂ`î`1Ž©Yðf#h»•ëßqžo‹©1Â1Á8µPõp>†Âah6ÚcŽƒ-Ð _@¾„¯àk8ßÀI /1§À0¶Ç^`ìw\g´;2àF˜ 7G·qžÙ¼Ï±Ý‘ks,‚|XÌ»;°ã.¸‡k?Üe¼»Ÿ3¾wà{ÇŸ¸^ðüqÎ἞çOp½6“ðõoæùó\¿Èõ6®_çz7á0|!h2þåøšá8èÐB[á ÃI£ÖÑhâ@š8þhâøž>üÿ †±ß)Œ#N‹±Ýi5ÂÎ8ã˜óÎôÅù,±ckDoµ*ÚÄã8WUÄyµˆåNÎwp·€¨Çö¡.,<ˆ)DfˆÈ ™!"3Dd†ˆÌ‘"2CDfˆÈ ‘['ÒÚ‰´v"­Hk'ÒÚ‰´v¢¨•ˆ‰1"&BÄD:ÖMÛoE¬Ínã3[¦ñQ"jBDMˆ¨ 5!¢&DÔ„ˆšQ"jBDMˆ¨ ¡d%#(AÅ*†P.‚j!T ¡V¥"(B•j„ðz;^oÇëíx½¯·ãÕV¼ÚŠG#x4‚G#x1„#x1„Cx1¤FlP8ðå$µ/¹Óø/ÖímÕâ"Û~V°Xù¤å.ä1Ü=ÀÝõÜ]Š׋y¬§©¬§©¬§©¬§©¬§©¬§©¬§©¬§©¬§©¬§©´25u0kê`Æk5㵚ñZÍx=Êx=Ìx=Ìx=Ìx=Ìx=Œ§ Ækñd¼¯AÆkžæ°æŽcŒÖ3F?aŒÖ3F?±¹ÅûÖà2ÖàA¬ÁXƒ5ÖÝTÖÝTÖÝTÖÝTÖÝTÖÝTÖÝTÖÝTÖÝTÖÝTÖÝTÖÝTÆaqd‡ÕŒ»ÃŒ·jÆ[5ã-Èz™Êz™ÊZ™ÊZ™Ê™Ê8 ²N¦²NfœY+S‰ýjb¿šØ¯&ö«‰ý£ÄþQbÿ0±• T2ˆý ñ^M¼&Þƒ¬§©¬¥©¬¥©¬¥©"Ÿ¯ÅçcF}?¾¿ßÿõvßSm5ÌèŒS¶ƒ"Séõ)¹‘ëëî9K¹”ÝKÙòÔOÙ5rÇFÙ™”PîföJkŒ­ä\GÎzr~DÎ|r}¨¢äUÓŸyÿ€Z¿~£âá15¼Æ>jš¬zq½™Ì_£ÖûoÔ1Â. Åø†•åoé!~f¹ò  ¡n/ø`¥ø™èêTêTCÙÏ)û¹¥’]óÆÚ}”šÔ>k£jÛ..µ½Ÿ±Ï=*~Ån³7»þì6Ûš¹>NßtÑÓÖ".·Z7Z-õðl€ð$<ƒ¿Ã?ài(‡Mð l†gá9x^€a ¼[áex*Ù=¿ÅùmxvÂ.Ø%òÿÝÞ‡*ØÃnåfVí߯Ç|`4Ä샆Ø>ìÞèþØ?6ì‡ÓCa ‡‹a´Ñà—p})Œ5>w\Wq}5LàÝ4£Á©­Î0Ra †!pP¯“zÔë¤^ç i0 Òa4ÜC]¥ðl7>wb›ÛœØæü‚ga£5nÜd4ÄÝl|.èxu|FA»·Ðì> dq³ˆc÷<Ãö;η‰"™I!BRˆ"$…I!BRˆ"$…I!BR(©Qr%5J.R%“)™LÉdJ&S2™’É”L¦d2%“)™LÉ!”FÉ!”ö—-9–æ-|®¹MŒ±ØÙ€ ع;w`ç+jÿû­ÜªÏy{y¿—8>Ÿ'9Äñ<õéFŽ]¬!2u"S'2u"S'2u"S'2u"S'2u"S'2u"S'2u"S'2u"S'2u"S'2u"S'2u"S'2u"S'2u"S·ü“}k¥ñ)Ñyˆè‰1ûàC‘ÛGÄÇöã|!ô‡ø üT$Úñý1Î9ã;>`Ä5Ù_äžvì´ÃHk²¿Ï¹ è§½–sÔÃ!ø˜ò‡)w„ëOá3£É!D¢ãBã[GHŸ@* ‚Á0.‚¡"Þ1 †ÃÅ@Ì9ˆ91ç æWñŒ¸rWŒÆ&±ãL‚dè=¡œçCoè}›ØìÄf'6;±Ù‰ÍΟÁÏAñÎ0Ra †!pÐ7'}sÒ7'}sŽ€‘£ FC¾ñ­ÓwMŒê&ç=Ô] ÄŸsüƒëçàyÞ½/Âx‡²;aìæýAž}BþàK'¾t~Áó0|É»¯àkãÛ8Æ[Ü$ÎÓD|c%î7\ßÄù£I­-:#\'mDÔ "ê)õô ž~ÁгŸG~køzz”§G£y ï_E OñôXÇwl"Ö:ÝXÈgø—ÙO÷Ž~#ùaeF³^ —­Ö_pžnì·Î0öX¯ƒÙÆAjü”Ù¿‘Ù¿1þ cOüFøÀÐã÷Á‡P û¡>‚pj¡êá| føøO GàSø ŽÂ1h„&øšá8膞x;ë¦Õ:¬—OeZ¯0š­×ÀÆQëJã(ãm$cm$o÷Ç?f4Ç?ëá)xÆ8¿¶Â+° ^7Ž&¬…?Á:ø3<ÁÃðŸTbñL ^‘ÞØƒ7änüˆø9mo í Ö[ òᣞ~ÔËOY´¿ö7ÐþÚß@ûõ´_Oûõ´_Oûõ´_¿ƒwx Þ…=ÆúTOŸêéS=}ª§Oõô©ž>ÕÓ§z1 Õü¨æ§o ¨æ§m¨vÕNÒÏ}ô¤žÈoVGÒß>ÌF±x'Ù(¥³@îEPô$Šž¤w ô®Þ5лz×@ïPÚÒ~”ö£´¥ý(íGi?JûQÚÒ~”ö£´¥ý(íGi?JûQÚÒ~”ö£´¥ý(íGi?JûQÚÒ~”ö£´¥ý(íÇ x 4à<Ѐð@h üâ¼àÆ n´¨Â nô¨²NG›Œ ¬ÏÀú©|zYŧ—5xa&^¸/\‚.À —à…r¼pZU¡UZU¡UÞÈÀx#odà ¼‘7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ7ÜxÃ72ðFÞÈÀx#odà ¼‘7ÜÂýÔ÷Ö>޵s±n%Ö=¦ÆÉ.|³ ¿Ôâ—Z|pöŸÇÛ±}¶ïÂö]ؾ Ûk±½Ûk±½Ûk±½–>ÔÒ‡ZúPKjéC-}¨¥µô¡–qâáSêlù]¤š_zSû×b¤õã8#öo+­¹Æ›ÖEF]ô›·Ì-;ãß1ÞŒße¼™ð–q<ámxvÂ.Ø ïÂ{ð>TÁØ À>øªa?ÔÀGpB-ÔÃ!ø ‡áÇ“ @Õ'Z]õ½ñÝÈønd|7â·Ñøm´š_v0à-xöô½¾·Ñ÷6úÞFßÛè{}o£ïmô½¾·Ñ÷6úÞFßÛè{}o£ïmô½¾·Ñ÷6úÞFßÛè{}o£ïmô½¾·Ñ÷6úÞFßÛè{}o£ïmô½ æ‡ðv~¯ó{iÑ‹b4Uð¾÷_¢Æ Ô8'È[KÞéÑQ"çŠØè\K=Ž:'PçV`aV`aV`aV`aV`aV`aV`aV`aV`aV`aV`aV`aV`aV`aV`aV`aVˆ±XQŽ.UèReõˆŸ M½_Môï'úcE9VôŽõ¾Ñ±¾‹‡¬ó™ÒJœ@ÿˆŠVá$Çg(A¡Ö»eÜG)qD•(B©J¬%ì—àù;8/…eìȤ®wSòöN¥p/ø¡Ì0X…¬BZ;i]ƒjk*†P1„Š!b¡†x­EÍ jY‘¬HV¤+R€)ÀŠ@å*P9€ÊT r•¨@å*P9€ÊT r•¨@å*P9€ÊT r•¨@å*·¢r+*·¢r+*·¢r+*·¢r+*· r *· r *· r *· r *· r *· r *· r *· r «j€U5Àª`U °ªXU¬ªVÕQ$ ‚DA(A¢ H‰‚ Q$ ‚DA(A¢ H‰‚ Q$ ‚DA(A¢ H…Q°O¢÷vT”ÊÕ \Ê…Q.Œra”“úÇ¡ÿK¨B½us…¹4þ†‚GPð AÁ#(x›‰“·Q±kQ1„Š!T ¡bC¨BÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFTlDÅFT £R•¨F¥0*…Q)ŒJaT £R•¨F¥0*…Q)ŒJaT ¡R•B¨B¥*…P)„J!TªE¥ZTªE¥ZTªE¥ZTªE¥ZTªE¥ZTªE¥ZTªE¥ZTªE¥Ú¹¿ÚoÀ›°Pɾ*•"¨Q£±LôB…“¨ÐŽ í(A¹oÇ»íx·ï¶ãÝv¼ÛŽw#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x7‚w#x§ï´ãv¼ÓŽwÚñN;ÞiÇ;íÂΨÿ‚5&ÉºŠµeµì1gÖ±Ûš±­¹sO ¥p/ø¡ŒœŒlm‘viÍDZ3‘ÖL¤5]:Ñ¥c ö·` ö·` ö·`3ö7c3ö7c3ö7c3ö7c3ö7c3ö7c3ö7c3ö7c3ö7c3ö7c3ö7c3ö7có9Ì:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧãßüÛ‚[ðo þmÁ¿-ø·ÿ¶}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ}:ѧ'TªOÛeÆ×êûìËÐ*ŒVaFw+£»߇ñ}‡ñq‡ñq‡ñq‡ñq‡ñq‡ñq‡ñq‡ñq‡ñq‡ñq‡ñq‡ñq‡±1Œal cãÿáíÎ㣬Ͻߙ;$!Ü#¸/­ZW´u_Z—jjw«ÝŽGjµ­ÕÓ}8íÃui¥z¨ µu©[9Tmõôéu/FY4$† ÉÀ„°f˜L„!@à÷¼gÄóê9¯çïç÷ÜÛo¹®ëw]ß_HÆ¢9ͱhŽEs,šcÑ‹æX4Ç¢9ͱhŽEs,šcÑ‹æX4Ç¢9ͱhŽÅhŒÜ·Cî{ËÕ¯²Â~áÚýbõQOÝöòð^ÞËÃ{yx/ïåá½<¼—v»•ž‘ûEùèýQ¾A”&ÊT7ß_Á“£SR?ŽRõ†Ü=ƒwüÿX¡åWVz‹+ŸÊsŒbŸvù´Ël‡£4Æœ1æØ¡Ä¥²N4›V_Ñê+šUÚ˜äýuÆ]äýÞ°òŠV^ÑÊ+ZyE+¯X?·9óÊ™Wμræ•3¯œyåÌ+g^9óÊ™Wμræ•3¯œyåÌ+g^9óÊ™Wμræ•3¯œyåÌ+g^9~)ñK‰_JüRâ—¿”ø¥Ä/åÌT´rŠVNÑÊ)Z9E+§8ªìÓÇ*Q5 ªDÕ€¨U¢j@T ˆªQ5 ªDÕ€¨U¢j@T ˆªQ5 ªDÕ€¨U¢j@T Tì»›‹ì;’zÑ>e~x+õ&m½ Ü–Zþ3µ]­ÜJí -qòq:äâÑaK|NÇy®}1ü©òoõã¢1ñ×¢dÿOî <öŒ¶ÿ"RߤÜÐq ÃÎÔ",–m—ˆâ·©ç唲dªÍq%6‹ÕÞè ½¶§J؉Ýz‰ìÆkQ‡#C)>;lŒÏÁ¹8?l‹/Ë“?„Áä¡%ù+^ðùEÇ—Âêäe4:Ÿï¸ “…X„¥®µ†É dÐæ~ÖµUXã¼=ÚȇRÒ¯ý(…ÉN ¹¶Ëy¥t‡…éÃqŽv~ Žóùxœ–§Ï íé q ®Åuø¾‹ïáfÌ -éÅ¡˜6®tSØ™^áÝÕèBoh>Ï¢ÛX´Àšm¬ÙÇš}¬¹s¿53¬¹|¿5—³ærVìcÅ<+–-¸•·²àVÖÛÎzÛYo;Ë­c¹Ë-g¹å,W`¹å,—a¹ ËX.ÃrÛXnËmc¹Ëõ±\Ëõ±\†å ,W`¹>–ëc¹å¬¶ŽÕÖ±ÚvVÛÎbëXj;Kmg©í,´…¶³Ð:ÚÊB[Yh+ åY(ÏByʳPž…¶²ÐrÚÆBêc¡í,´…¶³P>:15+ü õbhÉóYæßYf‹ô§:Eôæhrª7<%ª¿ ÕŸ[oÅqXׄGDø•"|¥?5fÇâŸ~Ÿ®ñ§Æg„/Äg†É"ÿq÷p|i¸+¾,\¯ýÚ¾x}qù÷üž‰o oT~Ka´‘”ýµÙhÖ鹟O6éyƒÞúõVÔ[Q/ÅøX»ëÓÏÃÕÑÅÖÓ%Þž%ÓÍ·.XG‹C³¹”Ìãx-µje©VÚ´²V+íZi7ÖQZi×J&:À›K¼¹Ñ›/yë`o5ë7ßðfÖ›]ÞÌz3ëÍ1Þlóf‡÷3úY F,”—a‰È{›š^kE„­akµ:›±èY+zÖŠœµ"g­ÈY+jÖŠš’¨)‰š’ˆ1C"fHĬ)C"eH¤¬åÙµ<[J—ï.¥Õ´Zo刟eî¯Ïß°DÄ^m~×X«ó´ù÷QÙå|½6Dˆ6„ åuaW0‹å_´„e®4¥Þå…Œ6;yàêЬ­æèF=Íðä]ÖW·§Ÿ×ã}z¼Ï[}¬°‡öx»J¬ð^ mŽ+ÑæhíÑÕ’*„eq=’°‰m7±í¦ø0Ž#p,‹^‹OÄIas|Šk§âôÐÃöâ‹£Ú¸Áùe¡¯òÓ–òo—\ûÞO»¬Ón–îgé~ë´›µûY»ÄÚ%ë´›Eîcõ²Uf°Ê V™a­v³ü–ßÃò{X¾d­v[«Ý<°‡ö°Ü}¼ÐÏz÷%ýQm²=lJ±Ãç]Qmº*¼–®›Òá`˜SúX|æ’>ÉñdÏu<ÅùgòôaNúJ|ßw>sB?ḭ̈~»yzO:çù5èD7Ö…9Ñ(Q»FÄv¤Þ®D¹,ö±Ê¿V~Ëh^ŠRɢ¶(¥f½©›ø¨ÀGoÔÈo½ò[¯üÖû?"°Àv(ç©‚¹ä¦^¹©W^ê•—zå¥^y©W^êÝ‘y¦Wžé•gz«>Põ@˜Yõ ¯ñ0Á£x,Ì4¢i"éQôŽ(š&Ц¥^{ó0_ü-¤°aq˜-š¶§Z]Ï„NQtw*+w­Âjä°áÞT—cÖa=6`6G׉ºRyŸ· îOõ9Ñ&¥¶bÀçmØn’÷ZT„¡C¸Fþ[”ÚãÞ0ö†×RûChŒ«BŒê0)áXžÙ÷Ç£|NÂU²G›¿J®¼W®¼7>(üR´_%Ú¿!Ú¿!Ú¿¡V?~À½âØèšø8ÇãqB˜`L° nOv>§xÿT|ØçÓpzø9÷V9÷—¼:…W§ðê+årù÷‰ø£® „{â /ÂÅá¾øãŽ—àÒp»Õôø>_晫ãûkí+ë~qu”¸:J¾~I¾~¦fm˜Y{NÄI8cÃ̺'ÃÌ‘—ákaf2;,Kæà%íeÌ Ó¬ºí"mšH›&Ò¦%‹Ý_‚åhF Z££’È Íó«]ËaóNtyo­óõŽÂ/“MèE><˜l ¿QMïK¶:À6lWY¥W©°÷‰â)¢x ]ò *{_²;Ü“ìÁ°çBxÐ žN…_¦cT‡{¬æ«è–Ó„ߤǸv rí`ð¡Õ0Åj˜b5LIéù£={ ŽuïC8ÎõãÁ‡éC£ p•*~Ÿ ð `BúT×>Œà4œŽ3p&ÎÂÙ8çá|| “Òàã>_*‹4à> ŸÆgðÙpúsŽŸÇåîÁñŠp·Ls·LswúKο¬¯à«>ÿ®Â?âjŒsýk¸_w~mè 4:(Žô7µ÷-׮ǷqnÄ?yö»îß×ÿx×nrm‚Ï‹dµÅaZº):*Í×i¾Nóuú]X×2Ç”t–W;æØh :Ñå¼Ûq­vÖ·õLÁt¤óη €¾0):I&¹C&yEæØTQÒ‹Õ %ax¿ª™*|WxÍê~ÙêîPßwXÙs¬ì«w™U»Újý£ÕºÜj}Ðjm²Z›¬Ô­Æë­¾­²¬²eVÙkVÖ¿YY+g©ó¢ó€³`ÿßL«üæ rÜ\#{IµlNÙËár¹n¾\7ß(wÈÈ–‘Ûeäv£}UžÛ¨j>­önªh˜6ŸW¢#,6‹&¹m§Ydå¯Õf°å}Õj«(× fQ¢^7P¯ä ÕrGNîÈá^#,ÿé|Õ±9ùW!ŸV!ŸV!›Uȧ­ÓÖéF²ÙZo­n´VçZ«s­Õ¹*ds²Ì{oã]´†vU¢]•h·N7ª–ͪe³ŠÑ®b´[§óU˧­ÓùÖUÎȉùœøÞIÅn b7ˆá”ìq»SÌ®£‹Åèb1ºX\îüo ÷ç7â}¥û}ÏßìÝ ŽsÂÓâk®ŠÙ¬µ‹•ÅbegEíþ‹ªÒ¢ª´ˆwX|Xl¼ÆÒ,=¬ª´°ò0+‹‘sTƒVÕ Uœ¼]Ñ€%÷wb—*´—¢Šø»:´²òRV.+Ë·ÅLVÌdÄLIÌ”ÄLFvÏÈîÙ=#~Î?yY;#kgÄQ“,Ý$K7ÉÒMb©IfÎÉȲp†g†eÏÙ³¼KæaÞéà^é5[dÍY³EÖl‘5[x C¦l‘)[dÇ–– ;d¿Œì—‘ý:d¿&Ù¯Iæëùr2_N–ËÉrY-#«edµŒ¬Ö$«5ÉjM²ZN6ËÈfÙ¬I6k’Å2²X‡,–áÉ¥2R«ŒÔÊ£Kys©¬Ô.+µË<í²L«,Ó*£´Ê(­2J+¯¶ðj ¯¶È&í2G+¯¶ðj‹ŒÑÊ«KytXÖh‘-Zd‹Ù¢E¶h‘-Zd‹&™¢I¦ÈÈ™"#S4É™¢•×[dˆV¢U†h•!Zíã7GòDšµ£ó­È¢X¸Ýê›iõÍ´úzÄÄd+¬Äïà÷Wøý+«ÀïY~ŸÅç³ø|–T´jŠ|2™O&[1E~™l…­Š™VÅL«b&ŸL¶*ŠVEѪ˜iUÌý%6›ÅV³D‰½f±W–½²VA‰Í²"¿ÄF¯°Ñ+lô eEIô—Øévz…f‰ö¢hŸ)ÒKæüŠ9.?ÝÌàegÛe“áI±«všÙ ³ f¶ÙÌ6ïÿyA“œ‘7³&3k2ºA£k2º&£4º&£4¢A#ÚlD›h³Ñ Í Ñl6šÍFÓdƒF±Ù®¨GfÛQQPzê,çX6,ê­EoƒzkÑ[‹Þvè­Eo-zÛ¡·¶(²EQ¯;Ø¢¨çzîÔs§ž;Ù¢¨÷zß¡÷N½wê½Eï;ôÞÕË“¿3óŒY¯Ôó 7É}²s»ìœ•+Ù¹fÿ>³Ë“½ö’WÚKž_S±\—;9wºÿëlw¹Åh„³òìzœõi¹öû¢…Tþ7êséò‘U`ëÝa@”×åµ¢¼V”׊òÖ œ5(GµÖ)‹ïPv[û±ÜÁ>ÑÉÚèr§¬e·jk®'6²æ6ÖÜæÉ5,™cÅ+æôQþ»±ÙæõgÝÊ¢9ͱhù§9–Üj s¡ËºŒ¡‹UË?=ØÆªÛXu‹neÑ­,ºE·ã\VÍç\ãìbÝ­¬»­b‹sM™k*:Ü8wÛ€±­¸?¦Ìb‹ñ ߀ñ Ï€± ÃNcØi åÜ^ÔQÿEýõ[Ôç€þÊy»X±ÂBVXÂKäåy¹Gÿí,ߦ§!y¸ÇìË¿±âï¼»Âøª¯ºü÷ rSÜÔÃKô¾Pï õ¾P^ê‘—zä¥y©G^ꑇzÌ|‰ÔcæKä’£Y(—ôÈ%=rI\Òc¯¬¾IŸ‘l6×mFðàþï/ï“Ëu¸B-é°GîTé{ש7…°€µf³Öó¬õ¼9Ì·.:Xì ¾_©¥¬ö«=a^ öÿ–Z+¯vS„,ùK>Á³Ý¬ù„µÒa­tðp·ù-°^:̱ۻͱ›—»)»Ê®ƒŠë`ñçYüyÞ:êàõn^ïfýçYÿys_ÀO˜ûóîæõnžx>úëgY?»ÿ'#»*?‰B²F\0â‚ÑX;ËÚY£,a•³¬œeå,+gY9ËÊYÎê©ÀÂYÖͲn–u³¬›c;äãÝ¡³EQ•³ßŠ·òÏ΢ãì•úéštÍFUtHRE‡ÊwUÐöøZ>ø’·Sï§Cv †T¾!º¿_õk§õûi’´}¿j7¤Ú ©vCô{?ýÞ¯Ò ©tC4Kùç’ítËFUgHÕJ—ÿ²¬Ö^5‚W÷¯¼ßiíUO¿êÉW£*cé‹.².Ù—ì€KvÀ%;à’pɸd\¢Š´ÃfÚ¡—vè§úi‡^Ú¡@;h‡‚ÙÓ ½tC/ÝЫzm6Ën:¡ ÊVÙ‰•ìÄJvb%;±’XÉN¬d'V²+Ù‰•X¢¬ºi^Z —EºYb˜%ºYbXýïe‰a —è¥zYb˜%†Õþ^µ¿WÍïe‰n5¿ îöª»½ên¯šÛ[™ï›$a¹l4—!s2—ûþÝWyfSt(í¼×J¼VâµÒ~­à±ç­o•rÜÎ;%Þ)ñNù'Å%^)U<²Âq5ºÊ¿ëP‰Œ#ø¤›Oºµ? ýí¸Ó­œ¶sÚÎi{@ÛÚÎñY·ö´? ýíh€»õQV«ÝúÐÏ€~¢³é/ˆF$»±'‘®Æ‘шrþWe¾e†å¿a^ "æFG²G7{ô°CŸ®çÓõ|ºž?{ø³Gk]l³Ž/×óMßôðE?ôðC?ô°û÷°Û¯gû¶ïaû¶ï‰Î×Ë (Ú¦§A= êiPOƒzÔÓ žõTúoV9ÏùëoÐû ê÷IÕï ³Xe«Xkƒ Ñ «mø;«m K”c‰r,¥Ëõí  }ÿ7kéþ±®}ï[ö$ŸO¦ÙÇ:¾oÙœÏkÐ V6«Akýÿeåc¬†A^îäåNóé2Ÿ.óé2—~Q>hœ]ÆÙ%º³ß8ûEø Owo¿(/±Ë»Œ±ËûEú H/±Ë»x¿“ç;¯ËøºŒ©«ò÷Bcã룱ÑãÑwÂãÑwñ=L wE??Œ~‚;1?Å:÷Öc¶…§¢]áh7ö`{ÃU§D‡UŠã#8 §ã œ‰³p6ÎÁ¹8çã£ø.À…¸ã㸗¢ŸÀeø$>…Oã3ø,>‡Ïãr|WàJ|_—qStxÕᵪùáåª7± ±‹Ã¼ª%XŠex;Ì«~2ü°ú)üMΗ£æZ½!<0âðøˆÃpDt؈#q>€âhäÃG”Ü߉Ýá‡5çâ¸5<^snǸ+ÜUs7¦º÷›è°šUa^mV{¶ã987¼\{.Á¥Î?>«å³Ú›Âµ¿Çllq^@Š OÕî_Õ†ðx]Ux .VwFc ÄA8‡àPsª3§:sª3§:sª3§ºcp,î óêîÆ¿ûü'Ç·û‹áå‘ü7’ÍG~=Ì‹¾DŒCp(Ãá‹Sp*>Œà \‰/âKø2¾‚¯âp(“èëøN˜)rgŠÜ™•ȽEeýnÅm¸?ÏŠægEó³¢ùYÑülõôÐ\ý ܇_âW¸àA<„_ãa<‚Gñ¤÷žÂï³¼>sÄÚÐQŒOãÅøÄø bü1~ƒ¿AŒ—ÿo#Åùxq>^œçãÅùøègÑèèLÅ¿â^üÓ0¿À}ø›~æb]xŒGãÑÇxô^£Sxt NáÑ)­È«“yu2¯NæÕɼ:¹Š«þ 3ÁšU¬YÅšU¬Yõ{Yž™8âÐÐ"â“_ÆØ”[&Ê-å–ñ5b©F¼Ôˆ—šâhœŽsÝ;Ïñb¨ òÉøšË|¾5L”;&Ê厉rÇäŽÈ7È7Ôü,Ys¦zž¿jø«¦ñ§àT|ÁÇ+«mŠUö˜Uö˜U6¹öÎhtídˆ©Z1U;¿w}–ãŸT²Ù>¿äóÏЇ"ýVͽVÍ«fJ­øªÝñeõ­çÓz>­çÓz>­çÓz>­çÓz>­çÓz>­ïDº±=X‡õ؀؄ÍèE>=j~tð¨7± ±oa1–`)–ám¼ƒ&,‡J;ªï¢+AV¢Y¬Âjä°èŠN&F£ørtð_õD)6Gq¼®²'hŽNô©6u²L–T¾k¼µ¨CùÿûVQH*ßgÈd‰ê¯?‚CqÇXœ‚Sña|éñb\òT@ž ÈSy* Oä©€<§òT@ž ÈË“dÈI2ä¤h|(F7áfü/LÀ?ãø!þ7&¢ü A“²é4Ùtšl:M6&›N“IÇɤãdÒq2é8™tœLšÈ¤‰LšÈ¤‰LšÈ¤‰LšÈ¤‰LšÈ¤‰š›Us³jnVÍͪ¹Y57«æfÕܬš›Us³jnVÖM˺iµ7¯öæÕÞ¼Ú›W{ójo^íÍ«½yµ7¯öæÕÞ¼Ú›W{ó2õt™zºL==Úä|3Êÿ6ÇЇ"ú±Øæùíaª¬>UVŸ*«O•Õ§Êèeô‰2úD}¢Œ>QFÏÈè=#£gdôŒŒž‘Ñ32zFFÏÈè=#£gdôŒŒž‘Ñ32zFFÏÈè=#£gdôŒŒž‘Ñ32zFFÏÈèšüš¼‘&o¤ÉiòFš¼‘&o¤ÉiòFš¼‘&o¬z'ª¯jÂr4GõªAZ5HTƒtꢰIEH§>åøùðSUáFUáFU!I]ò©ïà¦p¯êp›êp›êp[êŸC^…8_…¸Y…8_…¸9þ?áþøU{ÞyQ:ž&ÄÍa«jqjq”j‘W-â¸Ý^s=êz•dƒ*RþF¹¼ë[dÿ[¢DµHT‹DµHT‹DµHT‹DµHT‹DµHT‹DµH¨Ñ<5š§FóÔhžÍS£yj4Oæ©Ñ<5š§FóÔhžÍW?ŠÕã7˜ÃLüOàÉ0N§³wi´wi´wiTÕ(QÕ(QÕ(QÕ(QÕ(QÕ(¡Õò´ZžVËÓjyZ-O«åiµ<­–§Õò´ZžVËÓjyZ-_½%ìÄva7ö`bK…›¨ÂMTá&©pn:E¥¨³už¢ÎªxãFC‘ªÎRÕY•o’Ê7iÄk»°;ŒS ;[SŠ5#QQH ÿ¨Œ õ¥¾³Ôw–úΪ”IMù¯Ó÷ùœìÙ±8ݵ3Ÿ…³qÎÕÇy®_äþÅŽ—DSèYuœŠšPéY*=K¥g©ô,•ž¥Ò³*í$•v’J;I¥Tócïÿwb2~Š»Âªïªï4Õwšª;NÕͨº™šÿŒêkæAŒÛ 6ªÂ™šž¨^%ΨÄ•8£gìíííUæŒ=b£=bcíg=ÿ9G¹”VÎÓÊyZ9O+gUï©´ržVΫâÓUñéµß÷yÏÑïóÖ¨žÉØ37޼.ª¯ÿMØT?3ñD¸‘*¹±þ÷>Ï ùú×1 ÂmTÊmõ‹}VC¨•4µ’¦VÒÔJšZIS+ij%M­¤©•4µ’¦VÒÔJšZIS+ij%M­¤©•4µ’¦VÒÔJšZIS+ij%M­¤©•4µ’¦VÒÔJšZIS+ij%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%¡Vj%M­$ÔJB­$ёѯ§ÿî›æW}ߊÆU};ººê†èΪ£OVýSô™ªïDW§>]—º©òýmŸŽ¯ ŸŒç†?Äó•q=Â:×ׇb¼1<oKâÞèq>´Æ[B):N/#£?†öhah×Û½MÐÛ­z»Uo—ëít½] ·Óõv¦Þ>­·õv€Þ.ÔÛ¥zûQÜæÆ¯aÞ¾-ñá%õ¦=~3,Œ„_ÅT#Š7„Fq¡QüÊ(b£ø­Q,ˆêâåá™¸ÅØìÐãÖðOñŠð·8ã­•aµ ÅVÆø’1¾äɯ«cÍž~ÔÓwÆ­ûöyúwž¾\M{Ñ·{cFt|ô«èüªtT[uÞw©®G«¦ŸH}Ñ^KfHý@…˜Z.K-W¦:£óS;ÂwâKퟣDÕ<Ã,þª·%öYqÜjÕ^P5GèaŸYµ©œwñþ½Vlvã^3Ë»¾%ôUU‡¹ÑÔ u‰zŒB‚4ÀèÐÁEaUt1~ÞŠîÁTü+îÅÏ1 Óñ ܇_±ãßšhnXëøqUÕˆƒp0Á¡8 ‡ã‰cp,>„ãp×C8¢zľÍÕ5áSÕµ¡®ºnßÎê‘ûVWׇšêQû6U'¡¡:íúž»%Ì­þnÅm¸wàÇø îÄdüwá/aUõlÌÁ_ñžÇ x¯„\õß0¯¢¯a^ǘ7± ÑÞª^ Ú°íè@«°9¬ oÕˆ¥ñR#^jÄKÍÆé8ã’°ªæ2ÇGC®æ)üÞùlGã©1žšEÎßÂRŸ—¡Í畎V[M²èÆÚ°¶f½{;°ÃØ‹}aUí‘!W{>€â„°¶öDœ„“1w†·j'C¬ÖŠÕÚ™˜…?…5µ/…·êRøç«›VÕÝâø°ã#ŽO†µuϺçÙº?¢Óµ.WÝZ „ÜÈËÂÚ‘_ÃõaÕÈo‡Uõφžú9x/à%ÌESx¹~9šÑ‚wÑŠÈ  +ÑŽd± «‘Ãt¢ ÝX‹¬ÃzlÀFlÂfô"^õ@èõ ¯ñ0Á£x óÃë£ÞÄ,Ä"¼…ÅX‚¥X†·ñš°ÍhÁ»hÅ dІ•è@«°9¬A'ºÂëÉÄÊßü¿~ÀW`íEÕòîY4·É{ía8ºÚþq†ýã ûÇö3ìgØ_-³¿ZfµÌþj™ýÕ2ÙµXõVÈÚçìs ö9ûœ‚}NÁÞåq{—ÇíUÞ±WyÇ^åÔ3a—¬›‘m×¾ÿ»ñ‘ö&óà ;ócäö.™ö!Úí?ƒöŸAûhÿí_ »—ÑÝËèîe´õ úy};ƒ–A{Π3ËßâW 'ËßÞ—­ýhå{Ê 4d&\F¯-£ÑÊ?×,ÿ«ÝûÖwšžæë©-[g¬ÝÙ¤^š3ïî–òw9X'ûÜÝ¥õ}ïµnÝlÖZ¯ˆ/ëìòûc<±sÿåïR­s·»òÍýFÞ±zƾwW.ßݬßT¥µÞ°±²†Ëí•¿'|ˆÝ÷†.Ú¦–)ÿøÞÐïSÙ—%OíÁ0«ï ÍÕ#ÂÝ3T=* z¢¹òl«Oe›ív¶G{Y5„}Õ#£”g÷¹»’6ÚgÄ%wwòÎ?îÒâ{-—ßhóÆÿeîÌÃÛ¨Ï}?›fdGJÚ!@g#,…·@€5J–²YØwhËv{9MŸÒBÃv ç°sÂRË'Ž!0B@—ĵ‚T…%–¥Œ5ñL4–e‰!GŽç~FvHZ¹žûÇyæyI£eÞy¿Ÿïûû,Ïôóé̲úÉ$§øÙÂà–¼Oø‚OèGÓ¯©n‘zõñ®’ëòN»¼-Uy—ûx—Ë;ìò6G²MCö®ÍPdîßGÅwºŸ—³ìÇÅngùÝ>×à$>!É'” ÷óræÃÜMÌì:ËŸ¤ò E¶§ËåWÙ†®Ëõ.ÂÇÎò~$xf+ï÷rNÕý„ eòÍ{Æ?R˜×( ~åîå¹qk,ëDZ~‚÷9¬ŸÌz>GP˯-T–?Ç{E÷½ÏI^ÏZÊ(Ö@ŒÆ‘ßH^iñ™ãÈO"?‰wYÊxžŸ@T±~¯™Ìº)ÜŸê]{OI‘ëàH®cßЧxïN‘ÿàNä¹I<7øn‰ýÝØæF‘óh>w ûr›ç•lŸýâùqÇR!¾ÀR).e&.ëÄ€¸VŒ‰Ã¥£¥cıÒqÒñâi†4Cœ,Í”N§HÕÒâ¡Ò,i–x˜t¶4[<\š#Í’..–.‘æŠÇJó¤yâO¥ÒñxééZñézézq†t£t›x’ôkénñté^éAq–´DzT¼Dú7é)qžôŒô¬xµT#½!^+½)}"þFZ/})> µJâS’-u‰¯HŽô•X+1‡_“ú¤’¸RreA|C–dY|SÖäaâ[rPŠ«åòñ=y¤CÜ$Ï‘ÏÛä‹ä¹âfùrùjq‹|‹|«˜“-ß#öÈ÷É÷‰½òïä߉;ä§ä§Å‚¼R^)åF¹Qì“ß‘ßwÊïÊa±$GåMãŸÜ%1ÚÈ®4Fñ)Ã¥IÊ~Ê¡ÒO”S”S¤jåNåAé å!åei®²RyKºCiRÖH÷*Ÿ*1i±²Q±¤?(¶âJOù†û†K+}?òýHjðíç%½îÛìëÞômõe¥Õ¾n_·ô¡ï+ßWÒZßv_^úȷ÷S ûú}ýÒß|®*J-ª¬ÊÒ§ªOõIQUSGH1õÇêh©U£Ž‘ÒêÁê8ÉP«ÔC%K=\=EÊ©§ª§J®zºz,¨—© ä«×«È£ÕÇÔ¿È3ÕWŸ”OWŸUŸ•ÏPŸW_ÏT_Vkå³Ô:µNž£6¨ ò¹ê[ê[òyj“Ú$Ÿ¯¾§~ _ ®U×Ê©Ÿ¨ëä‹Õ¿©äKÕÏÔÏäyêj›|…ºYÝ"_¥šª)ß Új§|£º]Ý!߬–4A¾]¦å»´µÃå{µéÚ ùaídm¦ü¤v¦v¶üŒ6[›-¿ «ýRþOíbí2ùí í ùUm¶@~M[¤-’—i×j7ÉuÚmÚíòëÚÚò*íní~ùMíOÚù#íaíyö¸ö„ܬ=©=%·hÏi•7h!-$©½ª½*oÒ–iur«Ö 5ÈmÚÛÚ:9©EµÏåœ–Ò 9¯ui»ä>Íõû”€_óW*ÿâ¿Å‹r€ÿ6ÿÊhÿþ»”ƒü÷øïQñÿÖÿ[e¬±ÿ÷Ê8ÿþ'” þÿð?©TùŸõ?¯Lò¿èQ™ê_æ¯Wõ¿åG9Ò¿Ö¿V9Úö‡•éþõþfåÿ§þ˜rœ?îߨïÿÂÿ…r¢¿ÕߪÌð§ü†r’¿Ûߣœî߿ߦTû{ý½Ê'Tœ¨œYqRÅIÊY3+f*gWœSqŽòóŠ9s”s*Ϋ8O™]qqÅ%Ê/*.«˜§œ[± b‘rAÅ5×(U>[ù’rqeme­ree]e2¿reeƒ² òÊ7”E•oV6*WU¾]ù¶rMåû•ï+×V®­\«\Wùqå'Êõ•ŸVnWn¦®<>ì aUÊsÃ& ;\yeØ©Ã*uÃnö¥²aXë°Œoưþ€â;'°àß…9ù¾{¿ <ì[XXé« ¼xÛ÷V )°Ú÷^àýÀßšÀÚÀZßGßÇhàs߆À—/}ŸZm¾Ï©€éÛØØêK²Çg¶¶û2B è³»‚‚¯+Xîs‚#ƒ£};‚‡Çúúƒãƒ|Á‰ÁɪœœªÊÁiÁŸªJðÄàLudð´àÏÔÑÁ3‚³Ôƒ‚gÏVÇÏ þB<7x¡Z¼$x…zhp~p¾zTpað*õèà5Á›Ôcƒ·oQg? ~¢ž\Œ¨'£ÁÏÔÓƒ›‚ õ¬`2˜RÏ ¶ÛÕ_ ¡Î v3ê¹ÁÎ`·záð³‡_¤Î>wø•êµÃ ¿Z½yÄ)#NSoÄ“¼«Š Ҕþ½¨Ï¨ÏTœ¶g©\=¸xëÿy üløßw/ö½ŒxlÄc#zË?®ßʾõ™sÂàrØ{–#VzËÁïkùÉ GWí^¦ÛÇÎØ½Œ>¸Lžéßéß9ªÕ[¹Â[FµŽ÷Wï-ã—VµyËÄ;&ýyÒï&Þ1ñŽ -Z&ù'ùÇ/¿tÂÉ,-Nž¸±|ïäI¿ûsåÅä™ûªÝîúýC¾µ¯“ïݳxùOÕ÷,ƒ™±ròÌ=Ë„“÷Ÿ2¨ƒwëÕüèªÉ3G<¶ÿ¯V»ë²{•ÃöŸ²§6ƒyúx¯ßŠ÷Šá?øãðžñÖx•ö^é=7¸Æ[Ž¡6ráxŸ0æïÑàú=<ìM„—“§ón¥G.Üý9<°/=ÕÜ[ÏŸÜ0¨âtÛSppOŽXytÕ`^&cN¿tÄcc‡S¿™ßÙ£NÅiÊa{HðÈø] Ú³xû6ø)ßoùö'OÜè±vÀUçOÜè‘èqè-ÐÉšªó=½Gã—NÜèUuð¹òâ‡ä6Ù2Áöîí&xR™ñ2Ó°»‡fîµxïóžá=¼nð=ƒ¹ì©ð¼ð¸›ž þøâIâ)¢–x•xXFÔï 㙑ŽZ¸!6ŸQ"Füˆ‰ÏˆÏ‰/ˆVb3G¦:ÑN¤ ƒØBt¸w &aŽÎm¢“È]DŽðþ[²‡pˆ¯ˆmÄvw™wW½Ä¢@|Mô¹÷ ;‰ÑOìrï“/w/•ç¹kä+ÜÙò•nHžÏã<^ÈãEnH±ÝŒÒId‰."Gt=„C|El#¶y¢—ØánT Ä×D‘è#v%¢Ÿ`»Êáº÷ùF¹wk³ÝŒv>q1q 1—¸Ì]¡-àv!q-¯¹Ž¸ÞݨÝ@ÜèÞ§ÝÍú{¸/ñ?‰ßÿ‹XÌúß î'$ÐQCGíIžŠxŽûK‰‰—ˆ—‰WøÌÂx­žû Ü_Íí:"El&t¢ØêhÂ&:‰,ÑEn9¢›è!ÐBC -´íDžèu—i;´ÐÐBCÍuïö î ¿ˆÏ÷»YÁ;O쟈ˆ‰?Kˆ‡ˆ‡‰GˆÇÝ-P¹*·@å¨Ü•[ ² *Û ² *Û ² ÓИ†Æ44¦¡1 ihLCcÓИ†Æ44¦¡1 YhÌBc³Ð˜…Fï×UY¨ÊAUªrP•ƒª\ùZ]}ï$JD?±‹pw®»CÑÝ!_)Œ #”ËF|N|A|Il"Z‰ÑF$‰A.˜†À4¦!0 iLC`Ó˜†À4¦!0 ië°ë®4t¥¡+ ]ièjƒ®t¥¡+ M=ÚMîífâVânÖÝçfµ%sÿ÷¼þÜÞOü‘çä-4´€¬4d¥µ§Yÿ·Ïsûë—rÿEâ%âeâ¶QÇúzî7pÿmî¯æþ:"El&t¢ØÊsÂ&:‰lù—YèÉBOzrß\{Œšk%¶ÙOìrw@Sšzü’›õWðx·l׿í~,Ís3Ò5ÄMî½ÒÍÄ-Ä­n†0›ð:ÞŸ÷_¯\ãf*?$>"ÂŸë¹ïõµùð§ÃŸ:üéð§ÃŸ:üéð§ÃŸ:]1@W À¡‡:êp¨Ã¡‡:êp¨Ã¡‡:êp¨Ã¡oØJÀV¶ò°•‡­ö~ÂÐÕÃÃeÞ'ÀÀ%0p „a aÃ@Â0†0 „a aãNwÚ¸ÓÆ6î´q§;mÜiãNwÚ¸ÓÆ6î´á¦7E¸)âNwÚ¸ÓÆ6î´á¨‡Ú8Ô†£"9päÀ‘ƒ[=–°Ƶ6®µq­kmØrp®ÇW¾Â8ØÆÁ6œ9¸Øc͵0n¶q³›mÜlÃ^ö°÷޶á¯a\mãjWÛ¸ÚÆÕ6®¶éêÝtõnºz7]½›®Þ ››as3l¶Ãfû^]½›l:°éÀe;\á2 —\†á2 —aá((€²(€²(€2oöèà~÷;Ð yHÈCBò‡ H0 Á€ ÔÖPX£êU7¨º[ªœÇ­nu¨²A öÜÀu®spƒëö¬—=ëeÏòìYž=ÓÙ3=3pš·G^O3„F¼dà%/xÉÀK^2ð’— ¼dà%ƒ½\Î^.g/—³—ËÙËåìår¼´/-ÇKËñÒr¼´|¯Q'„—Bx)„—Bx)„—Bx)„—Bx)„—Bx)„—Bx)ô^ʸIæßIæßIæßIæßIæßIæßIæßIæßIæßIæßIªm}ǵ6Á;»ÇN¢Dô»ÜÍC×~˜‚Ï*©ü)C×€˜‚Ï*Qáüeà/øËÀ_þ2ð—¿ üeà/øËÀ_!üÂ_!üÂ_!üÂ_!üÂ_!üÂ_!üÂ_!æìIæìIæìIæìIæìIæìIæìIæìIHØ ›!a3þ á¿þ á¿þ[^¾~çî/$®w“ÌÓ“²ï…˜§'™§'™§'™§'™§'ñ£ üÂËñc?†ðb/xÑÀ‹!¼bÞždÞžÄ!¼hàÅ^ áÅ^ Aáf¼h ®!ˆô~CdàÅ^ áÅ^ áÅ^ íÓ‹èÇœ=Éœ=Éœ=Éœ= Å[{]KÔbŠ7]Gt3žô~dàG?ÂÂýÂ4áÄŸˆˆ‰?Kˆ‡ˆ‡‰Gˆïâ‡è8DÇ!:Ñ'Bô‰‡è8DÇ!:ÑqˆŽCt¢ã‡è8DÇ!:ÑqúÀbúÀbúÀb(ŽCqŠãP‡â8Ç¡8Åq(ŽCqн+<ß ÅK x /â%P¼‚çCð|žÁó!x>³ƒ™Ì ïb†pG‘·3K˜ÉLò.f Gqy»²Q˜¦|F|N|A|Il"Z‰ÑF$‰±™ GŽCp‚ã‡à8Ç!8ÁqŽCp‚ã‡à8Ç!8ÁqŽCp‚ã‡àù<‚çÓËCqŠãP‡â8Ç¡x Ç¡8NŸ[LŸ[ Íqhö®=šãЇæ84Ç¡9Íqí>ašö¯Äbîÿžøq?ñ ÞzCsšãЇæ84ǵX¿”Û‰—ˆ—‰WØNëW'Bsšçkoóx5÷×)b3¡íD9æˆn¢‡ >‡ä8$Ç!Ù»"ô½|/$/ä%<Ÿ>¼Š—@ñ|¿$Ló/#Ø®9lÞB_vèË}Ù¡/;ôe‡¾ìЗú²C_vèËó–­Ì[¶þßa´@_ ôµ@T¢lˆ²!ʆ(¢lú⨊@Uª"Pªó‘$ó‘$ó‘$óïê­=ôIÊ¢ÖCT!,Ê<ÄbbÑ'ú¤CŸtè“}Ò¡O:ôI‡>éÐ'ú¤CŸtè“DD "ˆhA}Õ[P½µ#Ì!’Ì!’Ì!¼~åЯæ Iú“Cr˜#$™$éIªEèAó­(¡ÿ8ßñ]A jµ V jµ Le2(c£ŒMÙ@Ù€BæIæIæIÔjA-µ"ô‡y@’¾ãÐwúŽ#^¾æÓMî§Ù}ʑݧTK¼¢· GrŸr$÷é‹k=­€¯Føj„¯Føj„¯Føj„¯Føj„¯Føj¤K:tI‡.éÐ%º¤#xWB©åØåUâ5bQG¼ë¾‹ïüÀkÞà· xg(I±…è LÂ"¶óº¼[‚ßü–à·¿%øÁ¯¿ü:ðëÀ¯¿)øMÁo ~Så31yW³º²|Æ#©|U«EÜ¿Ê=~Ï„ßFøm„ßFøm„ßFøm„ßFøm„ßFøm„ßFøm¤Ké’Eºd‘.Y¤Ké’Eºd‘.Y¤Ké’Eºd‘.Y¤KïWAÌóaÞù]°H,Ò‹tÁ"]° ”è‚Eº`?ðC?8ø!…Rø!E',â‰F<ÑH×+ÒõºèzEº^¤è|E|ÒˆOé|E:_¿¤èzE<“Â3t¾"¯Hç+ÒùŠxÈÁCxè:_9ø¨‘ÎW¤óé|E:_‘ÎW¤óñWðWðWðWðWñW•ðW ÅðW 9ø+…¿RøË»6x•𗃿ñW 5â¯FüÕ(¼±ˆÍ@lb3›Ø Äf 6±ˆÍ@¬±ÄZkA¬±ÄZkA¬±ÄZjAª©¤ZjAª©¤ZjAª©¤ZjAª©¤ZjAª©¤v@j¤v ]í½R{ µR{ µJÛ¡´JÛ¡´JÛ¡4 ¥Y(ÍBiB+Êv·tW¨Ì@e*3P™Ê Tf 2•¨Ì@e*3P™J *-¨´ Ò‚J *-¨´ Ò‚J *-¨´ Ò‚Jï[v¨l‡Êv¨ì€J *-¨´ Ò‚J *{ Ò‚J *; ²*Û¡2 •Y¨ÌB¥•¨Ì@¥•TZPé}‹àý'—•¨ô¾¶ ÒûFÁû/. *³Pé}3lA¥•Tzß2´Ce"-ˆl‡È DZiA¤‘DZiA¤‘DZiA¤÷DDv@dDvìu…úˆìÄvHÌBb³Ø‰=؉HÌBb3˜¦@b˜€Ä$& 1‰ HL@bôÃúaý%II¢d%(™@ÉJ&P2’ ”L d%(™@É•LPÉKP±ÕIP‰þô¾ÁL]‚Ìd– ³„pÄÐ5âtéâÖòø3Í»öwåW¯üøˆXOD\ý¿Åõß~G- Ô²@- Ô²@- Ô²@- Ô²@- ‚w…®Ç]W›¸ÚÄÕ&®6qµ‰«M\mâjW›¸Úd¶îg¶îÇÝ&î6q·‰»MÜmânw›¸ÛÄÝ&î6q·‰»MÜmîs|ésûpm®íõ}¸¶Ê2ÓާºÌ°…ãѶ€¶´- mm h[@ÛÚж€¶´- m—š¸ÔÄ¥&.5q©‰KM\jâR—š¸ÔÄ¥&.5q©‰Kûpi.íá&5q¨‰CMj&5qfn4a¨CÜhâF7š¸Ñĉ&\઀MœhâBÆ 8ÐÄ&4q ‰ûà®ÀŒØ M\Ø\hâBš¸ÐÄ…&.4¿éõÔl¨§÷ÁjV °Z€Õ‚0YrÜœôQp›¥¯‰]îÓ²à¾&+nNÖ¸õ»¯%ŽwsÁˆ¹ 1Ó}:x*ñsâ<ÖŸO\B\JÌ%.w›ƒóˆ+ˆ+yÍÕ¬»–ûוÏU˜ ÞÄgÜvò8Ëm‘#ºÝœ0•¬zɪ—¬Úɪ¬¶’Õ*²òÎĹЬV1³ÛȬn#Ù­"»^²ë%»Ud·Šì¶’ÝV²ÛJv½d×Kv½d×KvÞyAÛÉ®ìÚÉn+Ùyçm'»v²ë%»Udç´ìzÉ®—ìzÉ®W˜X>ƒä–òõ7Ö’ÝZ²{—ì–Ù2[BfsÉlnð'n7Ù-!«%Á“¹ ·3ÝwÉìÝà<þ9·{Ÿ]òÖ]î®%³µd¶–ÌÞ .bÝUĵ<¾Ž¸‰ÏðÎ6i±®Ó]+L ›målrn–Œd”(×jw*ÝìP&«ÊõÌdU9ƒY<7ÛÝFÛÈ`ÛP 2HAb¯­'Øz"x}ùj«‚·pÛÁë³HUdñÔ¡\å’Ò.æÜ ·Ò­cÆçg¦çG¥$*%ƒ3_ðTb–[ü9·³Ý'Èà 2xµ’¨•D­$j%Q+¼’×йÙzê$Ùzê$Éà ÔI¢Nu’Aï[(h“ Lj‘£Þ™p걚lLj²šš¬¦«ÉÆ$“𬦫QÆAU²0ÉÂ$ “,L²0©KŽºä¨Ke22©KŽºäÈʤ.«Éʤ9²2ÉÊ$+“¬La4Y¥É*M&™¤ÉÄ!‡L2I“IšL2ñ¶žfëi¶žfëi¶žfki¶’f+[I³…4[H³…4[H Aöwû»Žý}”}y”}y”}y”¼×‘÷:ò^GÞ’ó:r^Gžë„CÐÍ»²À&òë&¿nrëF³Mh¦¢™JnÝäæ‘² ÞG§÷ÑÉ;{79v“c79v“c79v£Ñ&òìF£MäÙFï“k7¹v“k7¹žyvŸ>I8’íg ·‹í—Ø~‰½°Ø ‹:µ‘K‰:µQ§6î¢VmäS"Ÿµjƒä.êÕÉ]ä–!· ¹eÈ­Dn%hî"¿ù•ȯD%,*aQ ²» »‹œKTÄ¢"y—¨oy—È;Ý]TÉ"ÿù—È¿Dþ%a¸8Bˆ—···w¿"~MÜI<$ØÏC£~ɾÊõKáÙïñM¯ÁHk0ÒŒ´#­ÁHk0ÒŒ´#­ÁHk0ÒÌp f8#­ÁHk0ÒŒ´#­ÁHk0ÒŒ´#­ÁHk0ÒŒ´#­!tÓ“°ˆíD^'ô;ˆñ5Q$úxn'Q"ú‰]Äë]aœ(¢0î|Ck0úŒ¾£¯Áèk0úŒ¾£¯Áèk0úŒ¾£¯Áèk(lW \ašo”0Ø`6 F`ƒØÐ.Æ1ŒÀ†v-¯¹Ž¸‘¸‰õ7·w—ÿûr÷·¯£²Á¨l0*Úy]öúÖ`d6´§Yÿ·Ïs;ø ¬Ám0BŒÐ†ö Û(KÔ{àñà7°#´Ám0BŒÐ#´¡uñ|Žè&zˆ^bAÝ5ê®Qw­ îZ‰Û~bÁ¾û©¹_äÖû浂û{ûêQV eµPV eµPV eµPV eµPV eµPƒ²”Å ,e1(‹AY ÊbPƒ²”Å ,e1(‹AY ÊbPƒ²”Å ,e1(‹AY ÊbPƒ²”M‡²éP6ýÿeµPV eµPV eµPV eµPV eµPV eµPV e1(‹AY ÊbPƒ²”Å ,e1(‹AY ÊbPû'ʦCY ÊbPƒ²”ņ(‹AY ʦCÙô}Pƒ²Z(«…²”Å ,e±!ÊbPV eµPƒ²Øe±!Êj¡,e1(‹AYlˆ²Z(‹AYlˆ²Z(‹AY ÊbPƒ²”Å l:”M‡²éP6ý{P6}/Êj‡(«…²Z(«žƒ²<”å¡,ey(ËCYÊòP–‡²<”å¿ß/ÈÜ~(ëÿAgLúîo_;“°ˆí®ÍÑE'G]trtÑÉÑEçÐ_ƒ3ad8ÂÈp„‘á#S>»ìsKÊòPÖ?tæ– ”å¿óÌ-ûþ–·“cþNŽù;9æïä˜ßæ˜ßæÈ¤“#“νþÒ›áx¿“£”NŽR2Ж‡´<¤å!-/Üi5Vi5Vi5Vi5Vi5Vó_œ›«ÒZ ­ÒZ ­ÒtHÓ!- iQH‹BZÒ¢…´(¤E!- iQH‹BZÒ¢CWx?N¾B¨àøóü¡+½'/äñ"_å>%_í>-5ÐR-5ÐR-5ÐR-5ÐR-5ÐR-5ÐR-Qh‰BKZ¢Ð…–(´D¡% -Qh‰BKZ¢Ð…Ž(tD¡# QèðΑ…Œ(4D¡¡j ! -Ð…†(4D¡¡j ! QhˆBC 4D¡! QhˆBB $è…‚(ˆBA ¢P…‚(DQ®åjP®åjÊÊ5¡\Ê5¡\Ê5¡\Ê5¡\Ê5¡\ÊmG¹í(·å¶£Üv”ÛŽrY”Ë¢\å²(—E9åìÒ#ÊW›'œ…r#Pn¡wå1”; å¼ßå-D¹¿ Ü_P® åšP® åšP® åšP® åšP® åšP® åš~ˆÏ÷áëì7žôqÊ5 ù8ûO>nB¹¦òqÓ·|\ǺxÎóðÛÜÿÿ¢\Ê5¡\Ê5 ¿B¹f”kF¹f”kF¹f”kF¹f”kF¹f”kF¹,ÊeQ.‹rY”Ë¢\ö;”Û†rÛ~Ðï{ŠnaH½QC¾ûÍz£†|÷Ô{õ^@½fÔkF½fÔkF½fÔkF½fÔkF½fÔkF½fÔkþ!¿ÅÙÇïo²ßüöfð·6ͨ×<ô[›ì7¿µüM3ê5ó;›çÊ¿åjþÖïkêX·ÂÝVþmÍÛÜÿ®ßÕP:i›Q±›Q±Y¸u¨F0ê„Q'Œ:aÔyuÞC÷Pç=ÔyOxW𠫉7‚:Ô‰ Nu"¨AêDP'‚:Ô‰ Nu"Œ½9ÆÞcoޱ7ÇØ›cìÍ•ÇÎÁ_NÝàŸC¿šºŠG¨x„ŠG¨x„ŠG¨x„ŠG¨x„ŠG¨x„ŠG¨x„ŠG¨x„ŠG¨x„ŠG¨ø{TBå#T>Bå#T>‚/Jø¢DåST>EåST>EåST>EåST>EåST>EåST>EåST¾DåKT¾DåKT¾DåK³(×íBtû‡~_S…¢ÆCC¿¯©B‘Qä!¼óÞyïÔãz¼SwêñN=Þ©Ç;õx§ïÔãz¼SwêQ2…’)”L¡d %S(™BÉJ¦P2…’)”L¡d %S(™BÉJ¦P2…’”L¡dJ»‰ÇÍÄ­ÄÝ<¾Ï­ÇGõ¨›BÝê¦P7¥ý‘çä–zã¥z”N¡tJ{šõÏqû<·/°~)÷_$^"^&êX·Â-¡| OÕ£~ õS¨ŸBýê§P?…ú%Ô/¡~ õK¨_ÒJ|f?±ËíÇkõþ n—qËgâ·záv訆Žj訆Žj訆Žj訆Žj訆Žjèø:>„Ž¡ãCèø:>„Ž5б:Ö@ÇèXÍÐÑ  ÐÑ ÐÑ ÐÑ ÐÑ ÐÑ ÐÑ ßõw2T®FåjT®FåjT®FåjT®FåjT®FåjT®FåjTn@åTn@åTn@åTn@åTn@åTn@å†ÿCÚÀGUßë?“9pw«U«­Å}ézÝ[®×}im½´{í¢·µ­ Š "Š UqI¥.5B ¤MŒWŒDb'13L"P‡z-`1õüß'B[|Ýzÿ¯óúxΜ93Lòûþ¾ÏóÄsÎå:£\g”ëŒrQ®3ÊÏå:£œÜ±»ÎÈ5²Cl‘}ÞÈÖÙ:£ZgT‡Õ¡FµÎ¨ÖÑ:£9ÔhÖÍ:£Yg4ëŒæP£9ßhÖÍ¡F³ÎhÖÍ:£Yg4ëŒfÝÖþŸ”jô†½¡Fo¨ÔyãG½ÁM‡›1p nůpîŒgÁ“àÉFðd#x²<ÙžLòÜoðÄoñjð0&c ~‡ßc*¦Å'õ“ŒúIFý$£~R0Óþ?¢õx xO ³ð$žÂÓñEªä¢àYÛÏa6žG^@3æà%ÌÃ˘ÈÆU*«JeU©¬*•U¥²ªTV•ʪRYU*«JeU©¬ªàu¯é@ÞvÁz –¢Ëâ±*n¬Š«âƪ¸±*n,ý^¬'ÕèI5zRžTSþÚG½å9´¡¯£y°Kщex#žUÞ…nôàM,G„X‰Ux+®R­UªµJµV©Ö*ÕZ¥Z«Tk•j­R­UªµJµV©Ö*ÕZžÏR±U*¶JÅV…ßöø;ñIáZàûöÇ%q>U£OÕ„—Úÿ \†žýQox-®·=ÆëÇZ߈›;Î1ãmO°¾·B]…ê*¼Ýö¸ËówãÛÕ˜äuj*¼÷Ûÿ€Ç:^m™UfD•QeFT…ê)|Ó1Ã1ZÏŒ/2CªBõβOÍ„j&|ÏØ¯fB5ª™PÍ„j&T3á‹P7¡º çBí˜]U¡Ú ÕN¨vÂ,¢­x‹°¯!‡6´CÝ„ê&ÌCÝ„ê&T7fk•ÙZe¶V™­U¡ñ oh|CãßÐøšÅcÍâ±fñX³x¬Y<–÷YÌû,Ö›kôæ½¹&ü(ž•)û¨7ZgP×d¶µžnŸßIæQs¸,ø^pcp[wƒÁ]ÁÌ`ÛàÁ“ÁàÙàùਾ»*|9˜¼|%(+‚Sûî§ðÔðÔðàò²³ËÎ ®Hî_ŒHî\\UvIÙÏ‚‘eù²|pmÙÒ²åÁueo•½Œ/[]öN0!¹ApkÙº²õÁme–}Ü‘Ü ˜˜Ü ¸+¹ApÏ6ûl³Oð›m¾KŸïÛf8U~ |V¹RþZy›°dÑ’E[ñþ1ßrùû1›2oó’ŒÇôÑ›—þ‘øÇßõ{ÿýo³ÿ·’ÔFó ÷—ÁùÁùqÕÇžØ_eÉ:©¨3‚ƒ÷:öĤRÂá›êâÂ_ Îÿ|Ö“·¸á½žuÄæéÿ)†œ‘¼îØûrÆ 6ýtÉÞ¤æ’c“óç³’ý›~ ñì^»Nùò~'L8aÂà|ònáð7|cÚ³{%Ç&³aÓØr$Ÿ4©õMÕ¾¹Þ“÷ùç*ï¯ñ-«¼uJmŸIR×ýÕœ¼Oòêƒ÷úù¬cOLª0©Úš{2rÚˆ¶¤òúë+ùíõWj ?ykò›O¶’ŠMmþíO:-y—‰<üf²ÿá‹õ¿ï–3åî þ~>l½þ7U2žýUŸÔ}µO:mÃeƒòä­Éû‡Ã·ç-—þ¹µéŒœ–¼×{÷?Þôï%ïÙÿÓ?°÷“·&ÿròÉGNó{Ø;ùŒÉÖ¦ŸnÃeýóµ†÷¯“Ÿ1ù$5÷N< 9êø•ÉLèŸ{žÒ?7ÿoK2£·\þùˆd®o¹ôÿ«›—~EÒ>Ù²©{|Üòÿó~²%éM'L¸aÚ-‡ÿéà|÷ÿÓëZ“=п’G×µÞrXÒ¿úŸK–ÑÏ~.éwý{“™–lmêy·<‘ôÄMpSÿóß×®kÕÝÙÔ÷úzŸn˜ô=Û}±tÀ䨾N¸±3êIçL^³qoͽwì;æ©ä³$ÿÖàüÄLÿg¸aZßûy}ÿëþ·<}פºË&åñê i„È 0Ûb;lãî`'ìŒ]°+vÃçã•Áˆƒp0N»‚Óp:ÎÀ™8 g㜋óp>.ˆ‹Á÷1âø/\¯ ÆàŒí;îãþý?HÖû.D ^A+^Å",ÆkÈ¡ íÈããÏÅÞò ×Bð¾óÏX‹uXâ¶à/؀ы¿Æm©²xij”£i„È 0ÛaPÜ“Œ±vÆ.Ø»awìO9ö_½OöxNê@„ƒqÅa8GàH…/à‹ø¾Œ¯à«ø7cp,ŽÃñ8'âkø:†âßq¾*œŒÿÀ)8§átœ3q–ŸålœƒsñM| çáÛøÎÇâ5©+1WájŒÄ5ký¬×ázŒÁ ‹qÆáfŒÇÜâ5¿ò¾·Yߎ;0÷Ç+RàA<„<ŒÉ˜‚ßá÷˜Ši¨Å#˜Žx3ñüu¨ÇchÀãxþ­YxOái<ƒgñfãy4áÅ8—jÆÌÅKx9^œšÈba¼¸üŠxuù•«p5FâŒÂh\‹ëp=n»Ê…Ûp;îÀD܉»p7îA5~{1%^Zþ;üS1 µxÓ1b&þ€ÿýåKÊŸÆ3xÏa6žG^À‹hÆÌÅKñšòyxó±Y,D ^ñ»hÅ«xËg~«ñŠx%¬ÁŸðþïãÏ0oË?B·Uì¯HÎ ¯Ø=žS±>…=±>ž¸»b%VÅ]o[ÿ ï¡7^WñQ¼.­·¦Ã¸;­‡¦õÐô Ûƒ¡¦õÑô.ŽÙËþOc?÷ÇûõøpÛGàH…/Ú÷Ïc}¼Ç_³>Éúlü?ÁŸ¿Œ‹éËp9®À•¸ÙkÇc&âÞxIzR¼4}_<']¯I?ìñ”¸'­ÆÓjˆç„zsX¯ wÄNØ» ¹âx7ìŽ=û)쉽ðiûöÆ>ØŸÁ~¯ÄA8‡Øw(Ãá8GƋãð…8~Ç:î8ëãí;Ágù:ªlŸâXúÒËð[ “¿_¦'üžç¾ïñpl¾¡-áñõèÿþ˜®ðFŒ‡yšÇáýx5x“1Åëþ`]gýŒõû#Ö3½¾1îʘ3s&£÷gf[Ïñ™æâ%Ìsì«ö™™×<߆ױö½á=»`dz°Âþ·ñ®÷.ŹÌ{ö½ïñZ¬‹×T~GÇK+ixå7¬«â•ê¬ò Ût¸’Wžëñ7ñ-œ‡óãŕߵÿ{¸¿× ò¶éq°}ÙÑñʲ¡øøâ²Sã‹7ÞÑåñwty|À}ñÊ÷ãA<_<àaL‰W¦ŽúD¾ó¢ø•à‡ø.óÁ<ç•«p5FƯ×ÄsƒQkq蹚‡\ÍC®nŒ×7anÆxLÀ-¸¿ÂmXÎFXÿáï¶~]ýbž¯ƒçëàù:x¾ž¯ƒçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆçŠx®ˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœˆÇ‰xœ(5ÏyÙz> ‹…q¤J–ª¥ŸØ¯ÔÄsËÆd¼G4>¢ñQùkñÚòÚÐŽ×Ñ< X‚¥èÄ2#úÞAß;*vŽ_¡ñ/ÒøˆÆG4>¢ñh|T±:ž[±¶ïˆ_©X ÷Æ«éûê>}ߤí»`“–A¢á_ˆçnÔíÕ}º}¢Ç‰nˆ_I_…«1×ÇùôÜ@»ÇâÆøÕôMçø›?0÷ÅŽhtD£tr JuGƒ"Ñ ˆÞDô& ¿Dg¾ uDk"õÝ7á‡q‘~$ßCÑŽŽ×†×Bý‡·õÝMj-}ègX×Yϲ~DZE¼‹d }¿g‹ûôÿóAß/n¼WAG¦,^«÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤÷Gz¤Gúx¤'G™é>ŸŸ3ó(ÔuæYýwŽõ\¼„yx7ŽôÎHߌôËHoŒ*ÿ3^Üìì Br/ð!8á`lƒSu‘Óp:ÎÀ™8 g㜋óp>. ?Ä’ÿC¢ÃÜ{P_ã^lõlá`÷àü_îÕ°*^¼…·±ï ˆwQÂü ïჾ;ôôßkãý¯$‰¢$Q”$Š’DQ’(JEI¢(I%‰¢$Q”$Š’DQ’(þïµ°ª|Öãüð!zãU;8ñbÅ:ëõÁ€´±Il—aû*\‘Á€­ÜƒáÕ¿ÝáÇñªð'}çu&÷\X^‘¸£ú®ï\¼ñ¬âÍ÷ZØ|…Uá½Hî±ð÷W˜ìÞw_…»Ÿ‚ßqèwú‡ÿƒ÷±ñÎÜB1HþVÓM3»if7Í즙Ý4³›fvÓÌnšÙM3»ifw°Cün0:8ÑÍâG¸Üã+Tç•«p5FÆ9š§¡yš§¡yš§¡kh躆†®ù÷hx?x¦ïn?ïÅqüA*@*þ€¬¡kh@7 è¦Ý4 ›tÓ€nÐMºi@7 è¦Ý4 ›äi@žä?é}ôú¼^ž×Ëszy^/Ïëåy½|^¾F/OrZ·^ÞöûÓÏ×èçÝúy’ÉÖèçÝúy^?ïÖÏ×èçÝéãâ•zz^OïÖÓózz^OÏëéy=}¥ž¾RO/éé%==§§çôô¼ž¾FO_£§¯ÑÓ“kÜ?ÿ?뻾}Ó=>ØâžÉõëôÝó¡ÿ~ï÷ÝëÁïV…¼~è¹^üµï~MÉ}>ø»û4ü ìˆ¸TöEw•`=ÔúìxMÙ0ë‹ð3Ü/-»5^Ê·uñm]|[¿Ö5@²P<‰o€”7àyÏ5áE¼Œ…x%. hÅ«X„Åx 9´¡¯£y°Kщex]èFÞÄrDX•X…·ð6VÇ¥wÆKÞÎ{ ç=°¿Æ½r¾¯(…œƒ¹x óð2æc²XˆH¥¥Ò¯bCÅ TqUÜ@7PÅ TmUÛ@Õ6Pµ TmUÛÀ7ЯÙö—qiû3ã5ÛŸ…ä÷ý†y\mW›ÇÕæqµy\mW›ÇÕæqµy\mW›ÇÕæñdóxr°£ù¹vÆ.Ø»a«ªO2ç'QÕ)QÕ)QÕ)QÕ)QÕ)QRpAßÇp\ˆà¿À™ÿkÍÿµæÿZóí¿|nøq/[@ÁP°l[@Á“<÷<€ñ[<„<ŒÉ˜‚ßá÷˜Ši^W‹G030Óþ?¢õx xO ³ð$žÂÓñt=izð¬íç0Ï£ / sðæáeÌÇ‚¾+$²”5KY³”5KY³”5KY³”5KY³”5KY³”5¼î5É7 åm¬—`):±,~'x]èFÞÄò¸Kîè’;º¨r‘*©r1H΄L¾ß‡ÿ ’+vù/ª\¤ÊEªœd”7e”å2Êre¹Œ²\FY®÷.QVÊ(+e”•2ÊJe¥~¼H?^¤/Ò¥ÊxómPŽ ¤"ƒJ À@ðq©AñòÔ`숰3vÁ®Ø »cðp©½ãžÔ>ØŸÁ~ØŸÅçp>³{6ÎÁ¹ø&¾…óðm|.ž”>Þ¾¯Ù>ÉZOÿ?ÁŸ¿”/Ãå¸WâFyñ&Üì}Æc&âÞ¸'=Éó5ñŠôö§ÄËÓj$=Ócõ‘VézÛ¡ã 4znžÄSxÏ@}¤ÕGúÛ/¢Ù±2TZ†J¿dÿ<,@¯x®‹=׆vû^Gò( ³ïï¼Qº Ý÷ÄéÈg\åñ{ÐãÒë¬×ãüð¡c{ñW|„X>ÕÛÂJùwG성 vÅnØ{8îSØ{áÓöí}°/>ƒý°Ü~ŸÃø<±ÿP†ÃqNðo~§Ø>5Ά§Ç½GVâÈJÙðÛ'^ ‡/ÿÓöwñ=Ç^`ý}ÏÇã.ù¼K")J$IN_É'.âñ‰‹ÂKû \ÖwÞvVZ)J+Ei¥(­¥•â×"e¥–RKVjÉò–‹Âq}çsgà ַàVlº>évÛwà.Ïß{lWCz“pŠüè¢~‡÷õûåMõ]ÇDÇ%Ÿ¬ä“•|²’Oò—+Cú>‚éH®mzÔzf<]"ʆô;¬sLrétø4žñétH§C:ÒéN‡/‚V‡´:œ z-UeCzÒë^‡Y,D Zñ*a1^Cmh­iu˜­iuH«¥´¬”–•Ò²RZ6Ô‹B½(Ô‹B½(Ô‹B½(\¿®Â[x«ñޱ+â]”@¯%¼¢„W”ðŠ^ò7”7õ ×!½æçðó BzÍÓ/âéñô‹ÂüqÜ• âå™T¼²ïº¯0îÍdP/ÊlkýÓxEægqOæRë_Zë½ s…íÖWáŒÆµ¸78öfп ýËп ýË܉»p·cîAµ÷×Þç·öÕÄ™G¬·¸îLB-eô„Œž¡…™ÙÖ¯Âϼæq^ÇRtÚ÷†÷ꂹéÁ û߯{¶ß·^‹uñŠÊ¯âè8ªüZÜYù kó©ò k~¡ò\ÛßÄ·p¾í˜ïÚÿ=ð³•ß{*‡ƒ—­ä‚ŸpÓë¹éõÒð:ix4¼N^+ ¯—†×KÃë¥áõÒðzI¸Gî‘„{$áI¸‡;ëåÎz¹³^ŽkÃÇÜ5§—Ûêå¶z¹­^n«7õbüNªs0/a^üç­ýuTÂí‘p{$Üž¿û+§÷¡H½©W’]G•z¥ÙIv$»N’í¡8ë%Ô‰´G]'®“F×I£ë¤ÑµÒèZit½4º^ íIþzø·¿~AÅ~_Šÿ~ÇÙÞü×Âu£^ݨWê5£“Û«Â{Ux¯ ïUὪyƒjÞ°Åp’ªíÝx7œÞ¿ýÕ­ÿ¯lNþª–)ÅïlükÚŸ“ûTôÿ] 8YJê”’:¥¤N)©SJê”’:¥¤N)©SJê”’:¥¤Nãú¶q}[Z)J'Eé¤(¥“¢tR”NŠÒIQ:)J'Å ù;Õq'WÖÉ•ure\Y'WÖÉ•ure\Y'WÖÉ•ureÉ7c¹—"÷Rä^ŠÜK‘{)r/Eî¥È½¹—"÷Rä^ŠœA‘#èä:¹Ncó6åï¤üÔ¾“ºwRöNŠÞI¥‹T:éÖEݺ¨ uᢎZÔ-‹:cÑŒ/šqE3®hÆË^” d™°A&l d™°^&¬— ëeÂz™°^¬‘kdÁY°F¬‘kdÁY°F¬‘kdÁY°$ –dÁ’,X’K²`)øIÜ\ŒKðßø)~†Kñsü¿Äe¸"^fF-3£–™QĘ̈e²`£,Ø( 6Ê‚²`£,Ø(×5Èu r]ƒ\× ×5O»Ï ëù…hÁ+hÅ«X„Åx 9´¡y||¶j5{[ÍÞVÙªE¶j‘­Zd«ÙªE¶j‘­Zd«ÙªE¶j‘­ZÌôyfú<3}ž™>ÏLŸg¦Ï“­V™íóÍöùfû|³}¾Ù>_–ÊÉR9Y*'Kåd©œ,•“¥r²TN–ÊÉR9Y*'KuÈR²T‡,Õ!KuÈR²T‡,Õ!KuÈR²TN–j—¥Úe©vYª]–j—¥Úe©vYª]–j—¥ÚSCt—qÆ!8‡áp#qÌú”YŸú¾Œ¯à«ø7cp,tƒÔñ8'âkø:†âßq¾*œŒÿÀ)8§átœ3q–ŸålœƒsñM| çáÛøÎÇÿ~ÎO^ÖËËzyY//ëåe½¼¬——õò²^^ÖËËzyY/¿ñœŸÜ?ó#WÉz%Y¯$ë•d½’¬W’õJ²^)u¼$õÄC¨ÁØŒ)ø~©˜†Z<‚é˜G1ÀQ‡z<†<Ž'ðÉÎ šLQ&S”Ée2E™LMfP“Ôd5™AMfÈ’5²d,Y#KÖÈ’5²d,Y#KÖÈ’5²d,Y#KÖÈ’5å“âîòßà>Üð ~‹‡0%ÎÉš9Y3'kædÍœ¬™“5s²fNÖÌÉš9Y3'kædÍvY³]Öl—5ÛeÍvY³]Öl—5Ûeͼ¬™—5ó²f^ÖÌËšyY3/kæeͼ¬™—5ó²f^ÖÌÿ çÍ œ3(ç ù°Q>l”åÃFù°Q>l”åÃFù°Q>l”åÃFù°Q>l‘[äÃù°E>l‘[äÃù°…ϧÆó©ñüŠ]â%Ô¸µb÷øŠ=ð)쉽ðiôÄ ²cƒìX#;6T”úÎj*>°ý—¸[nlHg¬+1±-Ù?ú¼üØ 36ÈŒ é<÷ynû‰£p´}Ç[Ÿ„³ñcüãüRN¼ —ã \‰k¼fFãZ\‡âe\Â291/'æÒ÷Åïlƒý°?>‹Ïá|Æ1c3Æ1c3‡àP†ÃqŽDÿyGùçµËi99-'§åå´œœ–“ÓrrZNNËÉi9Îyç<ã_8ï('¯åäµy-ßwÞQl6Õçï?÷h†¬V#«ådµÜÆsr™9>×\¼„yŽ}Õ>sm+çåd·¼ì–—Ýò²[~‹sfpó“e¸üVÎ=ÊUòr\IŽËUVÅK6ž”«ä ä¹Ü?ômÇžÏér2]N¦ËÉtí2]»L—KÎAJv†ƒ°cÜÄ 7qÃMÜp7ÜÄ 7qó¹áÙÜðlnx67<;8:Ø#8§Ú> §ã œ‰³p6ÎÁ¹8çã¢øB™ñB™ñBN¸–®å„k9áZN¸–®å„k9áZN¸–®å„kåËK¹á1Üðnx 7<†#_“/‡É—ÃäËaòå°àÆ`Ïà&ŒÃÍ ¸·âW¸ wÅYN:ËIg9é,'夳œô|Nz>'=Ÿ“žÏIÏç¤Oá¤Oᤛ9éfNº™“n椛9éfNº™“n椛9éfNº™“n椛9æ)óŽy ÇÜÆ1·qÌmsÇÜÆ1·qÌmsÇÜÆ1·qÌmóŽy*Ç<•cžÊ1O嘧rË£¸åQÜò(ny·<Š»*pWîªÀ]¸«wUà® ÜU»*pWîªÀ]¸«wUà® ÜU»*pWîªÀ]¸«wUà® ÜU»*pWŽ©žcªç˜ê9¦zŽ©žcªç˜ê9¦zŽ©žcª—@ÙfX|©zÌ6ß/å fsP³9¨ÙÔlj65›ƒšÍAÍæ fsP³9¨ÙÔlj6UËAÕrPµT-UËAÕrPµT­Œ?LÆ&ããTê9•zN¥¾üµ`ÏòÚÐŽ×Ñ< X‚¥èÄ2¼7s6ÍœM3gÓÌÙ4s6ÍœM3gÓÌÙ4s6ÍœM3gÓÌÙ4s6mœMgÓÆÙ´q6mœMgÓÆÙ´q6£8›QœÍ¨Šã ¹›w3…‹iâbš¸˜Ù\LSÅêx'SËÉ4q2Më»Ø÷lˆ‡q5M\M-WSËÕÔr5µ\MmÚœålš8›&Φ‰³iâlš8›&Φ–³©ålš8›&Φ‰³iJÁûmÿqÁNSúDO²>?ÆOp1.ÁˆøÂôU¸#q×Âh\‹ëp}|iz nˆÇp:cÒ㼟Zãj œD}:¹õˆƒp0ŽŒë©p=®§ÂõT¸@…ë©p=õ­§¼Í”·™ò6SÞfÊ;ŸòN¥ºÍT·™êN¡ºS¨nÕm£º£¨n3Õm£ºmT·ê¶Qݶpt°gx-®÷üï3ÖúFŒ‡>êT¸™ 7Sá6*ÜF…›ÃíȺc2¦øwfØ?38…7SãQá,Ÿ±=X†7Ð…w|Æ"ÞE æ6õm£¾mÔ·ú¶Qß ÔwõJ}§RÝQTw ÕJuGeÊ‚=)fb(fb(fb(fb(fb(fb(fb(fb(fb¨_=õ«ÏL÷ž~ŽÌ£˜éqc<›r(Wr(P=ª§.ÊQLÊã·ƒ ¤"ƒJ À@l‹í°=vçáèxEp .ÒQˆ¡ÿœ™Õºøj]|µ.¾Z_ŒŒçèä uò…:ùB|¡N¾0¸>^ŒÁ ‹ã÷‚›07c<&àÜŠ_á6<ƒgú¾Ý2úÇïEK͋ץZð Zñjr¦¾ï&Ùvã÷’l[~Eüvù•«p5Fâü?Îî=>®ºÎÿø¤—9Sl¼pÇ r/(ÞDWQYÝÝÇ®7¼ »]]v}t\ °*ŠÉ..„ˆÅ $†[$mz ܦ„NËÐfr0[&c)äû{¶ ¸.þ‹¼çÌ%·Éçòz·9I ÎÅyhÅùXFL¢“hdQ!Ì.zEÄH0†‡QÂF<‚q<fM‡5¦ÀÈâzÔýktÿ]?²ø™ðÈâùðHÚëžöÚ¦½¶i¯mz÷½Öùëp”ó£ #éãßéö{O[uöHúdçg†5ºx.^£‹×üÁÏÓL騩ôwÃ`ú|Ïó¿ïí/ÄðŸ¸.Ì¥ï×(ýX˜‹ÞŽwàÃøÃ¿Ñvn˜Îî¿Çæ{ùìþlÏýýµÙè—¸a÷¿ÀÍòËÇùåãÿão¤-³»ÿ6Úò0—9{÷ïúžÍx›L7nt»½¸ w!Æ“øM˜[r>æRG-8&L.ð*,8  ã N 㾫¯ð}Å? ã{\ƒuarõØ€Q<ˆB1Œáa”°`bÊØŒ-x <Ž­Ø† T1‰©0¹4&›†õQ«>jÕG­ú¨Uµê£V}ÔªZõQ«>jÕG­úh¹>Z®ÎÒGgé£úh‡>Ú¡æôÌ&=S×3u=S×3u=S×3=SÑ3=SÑ3z¦CÏtè™=Ó¡g:ôL‡žéÐ3z¦CÏܯgîOUR SckjáK¼îîÿúop»®»kz=ÂÁ8‡â0Ž#p䮟O57½oÄ›ðf·à­8Çâm8ÇãíxÞ‰wáÝxÞ‹÷ᜈ“ð~œŒàƒø |Æ)ø>ŠáTü%>ŽOà¯ð½îî<_K+ÎÇ¿áÛø¾‹ ð=|âØuMÝ•ÞÿU¸?Á \ƒŸb%®E~†Ÿã¸×ã—èÆ ¸=èÅM¸}¸y ã¬ÆŒ¤šž–z¹Î9fáOOc¶š‡­æa«yØj¶š‡­æa«yØj¶š‡­æa«yØjÖÍúyXÿ3®u[Ô‹›p3úp ò¸wàN¬Â]øîÆ=ø5îE?0ˆ!¬K5/Z („ó¹Ã|î0Ÿ;Ìçó¹Ã|î0Ÿ;Ìçó¹Ã|î0Ÿ;Ìç‹÷I5/Þ7µpñþŽàÕx ^‹×a*ÔÍïMæ÷ó{‡ù]7¿+æwÅün5¿[ÍïVó{¹ù]1¿[ÍïVó»b~·šßuó»Õü®˜ß­æ÷YæwÝün5¿w˜ß;Ìïæ÷ó{Îüž3·7™Û›Ìíº¹]1·+ævÅÜ®¤/cÏ]“–jN_ã|÷¿59W/»¯G{îZ´±ÿÏugci¯éï¯;{áš³±ôýX5xáZ³±t‚1<Œ6úXâ…ëÌÆžÿ÷£ß]g6ö'®3K?ƒg1Æ¢Tªy÷ufæGôj¼¯…ù™‘ù™‘Y™‘>ôø ׃9ÿJjaôUœ:ìª{ªÃžê°Ÿ:ì§ûé~û©#šöœÔðBj¡ýÔ‘iN5g^ŽWà•xöÄ^Øj$³ÔHFdÔHFdÔHFdÄëqÆ!8‡áp#ákÊøš2¾¦Œ¯)cæe̼Œ™—1ó2f^Æ×™ù—0–Éâ…ë­ÆþôõVžÿoxázª]ÿ®1–1;ìÚ»¶Ã®íȘ¿¿žj÷µTná>Üß]KõܵSc™2|_3[Póøl{îú¨Tós×G9î¾6Êq×µQŸuüŸ×B-ùþÞ¼ûÄKúéÌ—öS™[S§ãKø2þÿ°ÛL×Û¨ëmÔõ6êzfº•™ne¦[™éVfºÕ†MlØÄ†MlØÄ†MR—„±T.…W2å•Lé¸ÔÏñ \‡ëñK¼ð»)_úßrŸð¹W1‰)Lc5<'ñÌâOÿͨ™ÔÓØ‰gðl˜±}ÇmßqÛwÜö·}ÇmßqÛwÜö·}Çmßq[+±µ[+±µ[+±µ[+±µ[+±µ[+±µ’¦þPnÀ †p†ñVc FBùÏúɼ!±Q%±!Æmˆqb܆·!Æmˆqb܆·!"±!"±!"±!"±!"±!"±!’Eë|^ë±Î߬÷š/òš/òš/ú-vàiìÄ3ðº/šG36Êúÿõ“pS!ùýOÃÍy¼§C²û'áþø§ß~÷oü“nÇyþ®Ÿn{¿ãŸþé¶­éoâ_¡ÞÓê݆Yoì·aÖÛ0ëm˜õ6Ìz a«„°Õ†Il”Ä&IlÄvHl‡Ä6· ÆmƒÄ6Hlq[ ±[ ±’ôÆP6ùS}ÜT7ÕÇMõqS}Ü4OLóÄ4OLó$:6”£·á8p"NÁ©asô×ø$>…ϘþÏýM±ÍÑ—àëŒ|Ñ×¥Œ3Ý>ËùrœsЂóÝϾ¢ï8~ât@ÉþOÈþ›åþÍrÿf¹³Ü¿YîŸyþw®n–ùgäýÍòþfy³¼¿YÞß,ïo–ïŸïŸïŸïŸïŸx‘¿6óüß›1Á|ÜäNdó²l^6•™¼¼û'69/ÃëgÂ&ryY./›²‰\^6=ÇMÏñÔÇ劂\Q+ rEA®(ȹ¢ W䊂\Q+ rÅ&¹b“\1#W̼„ëP~—©Ÿáƒ>Xàƒ>Xàƒ>Xàƒ>Xàƒ>Xàƒ>Xx©×˜p¦g*p¦gÚÄ— |©À• <©À‘ i†~Çï®ñxáÚŽ™ç¯íxFÞ|f÷õx-Ç{äÅvy±}%3¶/ø c[¸pA{¸ýÈ|ÜãÇá‘=®ÄÕ`²{\.Üã&ô!Û° ëB»\Ù.W¶Ë•íre»\Ù.W¶Ë•íre»\Ù.W¶Ë•íre»\Ù.W¶Ë•íre»\Ù.W¶Ë•íre»\Ù.W¶Ë•íre»\Ù.W¶Ë•íre»\Ùþ²‹Ã…/»¸—áG¸W„ åÎöÕG—úèR]ê£K}t©.õÑ¥>ºÔ3ÄËñŠpžú8Ï6ž¶§mãiÛxÚ6ž¶§mãÛxÆ6ž±glãµÔ§–ú^Òz_ [¹a+7l冭ܰ•r휚lS“mj²MM¶©É65Ù¦&ÛÔd›šlS“m©‹}/ yÛ8oçmã¼mœ·ó©+<ö_¸ j"Õ‰Ÿ`®ÁO±×¢ ?ÛýwIó6xÞÏÛày<ŸºÁý=èÅM¸}¸yÜ u–ºwìî“UúdUê.ç¿Âݸ¿Æ½À îÃýÆX5>ÞÖbÖcFñ xEÄÐG)}Äò)}”ÒG)}”ÒG©GÁ&”±[ð^ÚõO²Šm¬b«ØÆ*¶±ŠmÏÿÍß»¢’ ¡Ò”B„Þ¦…X„ÅH#BK°^†f¼2ÜØô*쉽°7öÁ¾Øûã¼Ús = ¦‡Áô0˜ÓÃ`zLƒéa0= ¦G>ï•Ï{åó^ù¼W>ï•Ï{åó^ù¼W>ï•Ï{›¾V7åp&ÎÂrœsp.Î ÝL¨› u3¡n&ÔÍ„º™P7êfBÝL¨› u3¡î¦6oóïÞï8^„â?qqXÓt :p).Ãp9®À­žsnǸ«p~…»q~á°–Y­eVk™ÕZfµöwÿÚe>w™Ï]æs—ùÜe>w™Ï]æs—ùÜe>w™Ï]æs—ùÜõg]yº2ôÊõ½r}¯\ß+×÷Êõ½r}¯\ß+×÷Êõ½r}¯\ßËÚzX[këam=¬­‡µõ°¶ÖÖÃÚºY[7këfmݬ­›µu³¶nÖÖÍÚºY[7këfmݬ­{Ñ}aõ¢û1Œ°k0‚µXÖ²ºµ¬n­ÔfµÙAmvP›ÔfµÙAmvP›ÔfµÙAmvPÛ¢MvQ›±¡‚DZÛ0jȳÅ<[̳Å<[̳Å<[̳Å<[̳Å<[̳Å<[Ì¿¤ë&¶„i¦8½ûŠÜIÇß`õÝ¿§‹!NÛ•]ve—]y[œf‹Ólqš-NÛ]vgkœfÓvhsœfŽÓÌqš9NÛ©]vj—ÚÇ §íÕ.9Í §ä4ƒœfÓ ršA6dƒA6dƒA6Òßõ¹\°ûwát§¯½éa5[ìN¯ 7¦ÕAú·Õ{ìNßäüfôáäq«ÇnÃí¸wbÔÓìNß뼞;è8„ûBûìaŸÝì³;½Îcëñ ÇŠˆ=–¸ £„amzÜs6y¼ŒÍîÛÖ¤÷yN¸=‹ºó9Ç~‹x;½¿gð,æBOd¾EKÂêhOì…½±öÅ~Ø„n–ÛÍr»Ynwô:÷ˆ×ã ŒCphX†ÃqŽÄ›Ý4Þ‚·âÖ²äµÌxmt’ÿœâüc;5ä£sž¿vü$>…O»ýÇφmÑiÎ?/xîwÿKž=çÿèÚˆJtþßðœeø&Îô¼¿6¢µ±ë<»Î³ë<»ÎGx{NɲóŸŒødÔ¾ÛÓÚxZ[t‘óÂþfàùèRç—á…k#*‘ýýWzü*·¯övö8CÏ3ô²¯#û:²¯£5ÁZ¬ÇŒâApÞˆóFœ7⼑]ÙÕçìêÈ®Žìj)"/E䥈¼‘̛ȼ‰Ì›È¼‰Ì›È¼‰¶ùú'PÅ$¦ðâ×B<)q<)ql“8¶ýÁߤßu-D%zÏbž§Â¶ç¯ƒhËDngv_ó\É,uüç°ZBéÎ|Ã1z2ß ½™Å·Üw¦ãY8çâ<´âü°VŠY›ù¶·ù>쿌ý—±ÿ2ö_æb\‚Ͻ—…%žîL§ûV„5™ë¯÷¹øþqô6Ihí®«ö3æBÆ\ÈØ‡™»7@Ÿg n‘àŒ»o“÷W†Þ–šº3[Ý?‰š÷5ëövçuÌ…ÕKÞ…÷„Þ%'‡5K>쨇–|‘7,ù[ç‡OâSø´ç|6¬]òy}_Äé¡GëYò÷Î9Ä‚&Ö<ÀšXók`ͬy€5÷³æ~ÖÜÏšûYs?[d˃ly-²åA¶<È–Ùò [d˃lyðOþvÇKXw.Åeø.Ç‹ÿ4øÑ©UXã|k±ë±£x<„"b<Œ?ñwRR•°:õ8¼ÊÌrˆY1Ë!f9Ä,‡˜å³b–CÌrˆY1Ë!f¹ŽYÆÌ2f–1³Œ™eÌ*GYå(«e•£¬r”UVXe`•UƬ2f•1«ŒYeÌ*cV³Ê˜UƬ2f•1[ŒÙb‰-–Øb‰-–Øb‰-–Øb‰-–Øb‰-–ØbÌc¶³Å˜-Æl1f‹1[ŒÙbÌc6Xbƒ%6Xbƒ%6Xbƒ%6Xbƒ%6Xbƒ%6Xbƒ%&7]¶4]…«ñ¬À5ø)VâZtágø9~ëp=~‰nÜ€у^Ü„›Ñ‡[Ç­¡ÜÔF›0ˆ!܇aŸÃX5 ñÂÏ…ÿ^xzøoö7ÈþÙß ûdƒìoý ²¿Aö7ÈþÙß ûdƒì/f1û‹Ù_Ìþbö³¿˜ýÅì/f1û‹Ù_ÌþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÄþJì¯ÌþÊì¯ÌþÊì¯ÌþÊ‹výãZ¬óq×cª¡¥õ±´>–ÖÇÒúXZKëci},­¥õ±´>–ÖÇÒúXÚKbiC,mˆ¥ ±´!–6ÄÒ†XÚ(Kei£‹÷ [Ûúlm€­ °µA¶6ÀÖØÚK`fÌl€™ 0³F6ÀÈØØ`cll€ °¯ö5À¾Ø×û`_/ú /%Ö3®RZ¥ÕëŠW̸JŒ«Ì¸ÊŒ«Ì¸ÊŒ«Ì¸bÆ3®˜qÅŒ+f\1ã*1®ãŠW̶b¶³­Û*±­Û*±­2Û*³­˜mÅl«Ä¶Jl«Ä¶Jlk×ÏÿÄéG}.›ËØì¾ ÇYèw†3¬˜aÅ +fX%†UbX%†UbX%†3¨ƒ*1¨ƒÚõóD[¢7àxÞÊ,©Ì’Ê,©Ì’Ê,)fIqt\ŽÇû<ïÇÝw>€SpjècK}l©-õ=ÿS¾1C*³£>vÔ}…-™î,iˆ% ±¤Q–XR`Iõ1£!f4ÄŒ†˜Ñ3bD}ÏÿÄo#êcD õ1ž>ÆÓÇt†˜ÎÓ §áfÓÇlú˜M³éc6£Ñ ©£YLƒe,},¤5ô±†>ÖÐÇú^ìo>EÓ>çÔðÌ_¶0ĆØÂ[b ëØÂ:¶³…˜%Œ²„ÀKQ°)S!f £Ì d [2ãŠÃp8ŽÀ‘ð½ÉøÞd|o2¾7™7ãh¼oÅ18ÿÊì¢Ä,JÌ"f1³(1‹˜YÄÌ"f1³ˆ™EÌ,bf3‹2³(3‹2³(3‰˜IÄ,¢ÄÊŒ!f ƒŒ!f 1[ˆ3ƒ>ÞîƒYÀb¦3…S(1…S(±„2Kˆ3OøZgC‰”ÙAÌ â%§„-Ì f1 ˆY@Ìb³€ (±€˜”^’ZÎH-F2X‚=ð2,E3^ŽW„¯¥^‰=Ã0sfÃÌa˜9 3‡aæðsx€9<À`¤Þ®M½§†1 Făa# b„AŒ0ˆ1 FÄ,ƒ˜e³ b–AÌ2ˆÙÿõû¡¿¾œºßÃ÷q!~€6´ãßñ¸8ÜË>²ì#Ë>²ì#Ë>²ì#›ºÂcÿ…«p5:ñ¬À5ø)VâZtágøyXÎX–3–åŒe9cYžºÁý=èÅM¸}¸yÜŠÛp;îÀáÊÔ*ÜåüW¸÷à׸Ä}¸Ãx«±&´°¢VÔŠZXQ +jaE-¬¨…µ°¢VÔŠZR‰·ÃÃÎKŽñÆñhXÁ–V°¥li[ZÁ–V°¥"[*²¥"[eK£li”-²¥Q¶4Ê–FÙÒ([eK£li”- °¥<[ʳ¥<[ʳ¥|ê·áÆT`LÆT`LÆT`L«ÈÒ*Æ´Š1­bL9Æ”cL9Æ”cL9Æ”cL9Æ”cL9Æ”cL¹¦W†o5½ {b/ì}°/öÃþ8¯öÜÃ2fµŒY-cV˘Õ2fµŒY-cV˘Õ2fµ¬é¨0Òô¼o›q4Þ‚·â‹·á8·ãx'Þ…wã=x/Þ‡p"NÂûq2>€â/ð!|§à#ø(>=Ó¤gšôL“žiÒ3Ì/ÇürÌ/ÇürÌ/ÇürÌ/ÇürÌ/ÇürM_Õ¦¯†Î¦ÎÄYX޳qÎÅy!˳ì0˳ì0˳ì0˳ì0˳ì0˳MmÞæß½ïÿp¼?ÄââpQÓ%èÀ¥¸ ?Âå¸W†"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2Ê"£,2ÊΦÛp;îÀX…»ð+Ü{ðkô‡æ9À<˜çóhº?ÜÎ>ûÙg?ûìgŸý쳿imXÙ´ë±!¬\ø¹ÔkžžzÍ¢o…3åp&ÎÂrœsЂsqZq>ÚÃ{a¯#ìu„½Ž°×ö:Â^GØë{a¯#ìu„½Ž°×{ͱ×{ͱ×{ͱ×{ͱ×{ͱ×{ͱ×eìu{]Æ^—±×eìu{]Æ^—-º-TÝŽ;B–ÅfYl–ÅfYl–ÅfYl–ÅfYl–ÅfYl–ÅfYl–Åv²ØNÛÉb;Yl'‹íd±,¶“Åö³Ø~Û¿¨¾¼è!#ÁF ñÆñ(6…{•±[ð*x[± ¨†vÜÂŽ[Øq ;naÇ-츅·°ãvÜÂŽ[Øq ;naÇ£ìx”²ãQv<ÊŽGÙñ(;eÇv\`Çv\dÇÅÅû‡‘ÅàÕx ^‹×aKfÍìy„5³æaÖ<ü¿ÿû =œ¶3ÓvfÚÎdÓÃlz˜M³éáçøé×á·Ås¿ü †=̰‡ö0ÃNï¾ç~øéµŒ{8}²ó9þ þ_Ã×ñOȆYÖ=˺gY÷,ëž}‘ßžeá¹ôÃHzEèdãÙôÊð-F^däÅôua%+Ï¥oð˜šbæYfÞÉÌ;™y'3ïdæÌ<ÇÌsÌ<ÇÌsÌ<ÇÌsÌ<Ë̳é{¼Ÿ{ÝîÇ€ç:á¾°Œ¡/cèY†žeè ½3­·XzŽ¥çXú2–žeéY–žeéY–ÞŸ÷¼G}Ž›<§ŒÍîß.J?æm÷5L¸ouçsŽ ü;ð4vz¿ÏàYÌ#„eQ*Œ°÷\´$tF{b/ì}°/öÃþ8 dÙ}–ÝgÙ}6zûÄëqÆ!84\†ÃqŽÄQ¡( %¢$P”:%NI Sè”:%~I _¢·‡Û£wà}ž‚Û'zì$Ÿçðá°R*è>æíN -ÑÇýÒA‹tÐ"´DŸvû3a¹„Nsþy|Ás¿èxºÇ¿„¯x¿_Å?2é¯áë¡ -¬’VI «¢oxî2|gzþYž³gã´àÜðåè<œïñóñ¾ãø]\àí¿çí.tþÇ6´ƒ“Eœ,ºÈùq‰Ç;p©óËð#ïór\áíyYôc\éñ«Ü¾ÚÛñ3É£Eòh‘âaÑð0éi•ô´JzZÍû!%¨¼UÈ,_ÎDáÞLKªÌRÇæ0’y9^WâUØ{aoìƒý`vfÌΌٙ1;3fgÆì̈×ã ç`‚CqÇ8zE2+JfEɬ(™%³¢dV”ÌŠ’YQ2+Jf’Y6ó ÇlX&夳œt–•ÎrÒY.³<¬ÌœsœŸ‹óЊóC¿”Ö/¥uJiRZ§”Ö™á4N“¹— Ãs/Åeá[’[6Óé¾á¢ÌÏ|×9¿Þë¤Þ2ݸÁû»ÑÇêA/n­žg>Jx¹ ÉÜn—ôr’^QÒ+JzÅÌýž³Á}f_¦à9EÄÞ6q|ãîßäc—aÞI€ÙÌV÷O¢æc>2Ozþo0ë±íî¯c.tJ†’an ]rr¸HBÌIˆÅ%憔˜[Â)%ÅÜ’¿uûïðI| ŸöÜφþ%§…Û—|.¬”"sRdNŠÌI‘ˤÈeRdnÉ.ÇÜuµ@]ЬK‘u)².E֥ȺY—"ëRd]ЬK‘ué±*=V¥ÇªôX•«ÒcUzœ’§¤Ç)éqJzœ’'¤Æ ©qBjœ'¤Æ ©qBjœ'¤Æ ©q"õ­°3•Ù8 ËqNx:Õ‚sqZqIH$ÁDL$ÁDL$ÁDªK¤ºDªK¤ºDªKRw¦ŽO­Âç#X‹uX Ń(à!ãaT|üDZ¾–*&1…iÌ †'ð$~ƒYüw(KPU ª*AU%¨ªU•žªÒSUzªJOUé©*-Õ¤¥š´T“–jÒRMZªIK5i©&-Õ¤¥š´T“–f¤¥iiFZš‘–f¤¥iiFZš‘–f¤¥i©&-MJK“ÒÒ¤´4)-MJK“ÒÒ¤´4)-MJK“ÒHM©I#5i¤&Ô¤‘š4R“FjÒHM©II£"iT$ФQ‘4*’FEÒ¨HI£"iT$Š”Qcè%†^bè%†^bè%v¾‘odçÙùFv¾‘ÍÆfãu6^gãu6^gãu6^gãu6^gãu6^gãu6^gãl|‚O°ñ 6>ÁÆ'ØøŸ`ãl|‚O°ñ 6>±hExzÑ5ø)V†3¯1ó3¯1ó3¯1ó3¯1ó3¯1ó3¯1óIf>ÉÌ'™ù$3Ÿdæ“Ì|’™O2ò #¯0ò #¯0ò #¯0ò #¯0ò #¯0ò #¯0ò ãÞȸ72îÌ8aÆ 3N˜qÂŒfœ0ã„'Ì8aÆ 3N˜qÂŒf<ÅŒ§˜ñ3žbÆSÌxŠO1ã)f\eÆUf\eÅ;Ùo•ýVÙïû­.ž O3à*®.~:<Í~ëì·Ê~ëì·Î|«Ì·Ê|«Ì·Êz묷Îz«¬·Êx댷Êx«Œ·Êx«é㼟ãwÿÄ:Û­¦ßïöÉÎ?äüoðø¾Ž·ÃÎôwð=Ï»€â/ð!|§à#ø(>†Sñ—ø8>¿Â•¡Þt®ÆO°×à§X‰kÑ…Ÿáçø®Ãõø%ºqnDzqnFnAýá)ý)ý)ý)ý©&bªo7Õ·›êÛMõí¦úö¦µ¶Ë:¬Ç†0¹ð´/übˆM¼í&Þvo»¬^—Óçåôy9}^NŸ—ÓçåôyÙv^ž­Ë³uyvR”/'uêvù±./NÊ}órY].«Ëeu¹¬®Û¶ë¶íºí)Ýö” –È`‰ V×yOé¼í²×¤®Û·çùð<žçÃó|xžÏóáy><χçùð<žçÃó|xžÏóáy><χçùð<®óá:®óá:®óá:®óá:®óá:®óá:®óá:®óá:®óá:×亓*~»ŠßÎQçUùvN:ÉI'9é$'ä  ÿ¬óÏ:ÿ¬óÏy¾9©Â·«ð§¸ä$—œäŒó\±ÎçUøv.˜pÁÉÔ}*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠ*:¨è ¢ƒŠM‡¹¦KÐKq~„Ëq® ßPñ ßPñ ßPñ ßPñ ßPñ ßPñ ßPñ ßPñ ßPñ ßPñ ßPñ ßPñ ßPñs*~NÅÏ©ø9?§âÇTüœŠŸSñs*~NÅïºÒ»¢â+*¾¢â+*¾_Å÷«ø9?§âçT|CÅT|PñAÅT|Pñ ßPñ_Qñ»vÓœŠo¤·ì¾2º¢êCth˜‹Ãá8Gâ¨ÐÐ ÐÐ 0§ætœNØuEõ˜NÓ 0§v]]]Ñ s:!è„ ‚N:!è„ ‚N:!è„ ‚N:!è„ ‚N:!è„]ÿg×Ð ÐÐ ÐÐ ÐÐ ÐÐ ÐÐ ÐÐ ÐÐ ÐÐ PÑ 0§æ$¶9ÝtÜn¨è†Šn¨è†ŠnÓ ÝÐÐ Ýtîy?§v]½]Ñ Ý$¨9ÑÐABšÓ»®êÓ•Ô z¶w‡u îÁPX¹à>Œ„Ó¬ç/(¸/vL`ã-°ñÌ…{4ðlè\˜ W,\¦FŽì¦î‡ýqÞ€cÃÍ ß†ãð®°fá{à Orÿiá# ?¾­Z>²ðôðí¥?Û–v‡ó—ö†uKoÂÍÎóî»Õñ¶pÚÒÛñ+·û‡=þV»½ÞqFQ+—>„"bÏ+y|#ñØ8uÿ&lqþ˜÷ûd¸`éö0½ô)ÔÏ…›—6°ÃùÓaÍÒaMó"즛÷Ä^Øû†››÷Ãþ8Àã¯wßA8ØíCp¸ó#ÂÍG:®h~g˜j~Þíüœ:›OÂGñWîÿk| ŸÆgpZ¸§ùsø<¾à9ÿྯ8ÿ*¾îüŸ¼›ÂùÍ÷…uÍ^ƒæuae³×¡ÙëÐìuh~¾wÍù\Á¸ÏãQlBÙíÿÇÙ½ÇÇ]×ùÿå636‚ÊED W(!ÅÛÊÍË**^À rYÀ½€–£ºÜï¢ñ,­‚{*]AÄQ±HE»èo“Ù-"Aòe$dHM¦¡ýu&“‰Øf *þÎsBÕê÷qô×c&“t2Éçû~¿>)¡¿I·ÏSõ|~²ëö“]·Ÿìº[?Ù]ê4Ô†ºÓ0í4L; 3NÔÓPw¦œ†)§aÖi˜u&œ† §aÊiØä4Ì: ›œ†MNCÃih8 §¡á44œ†ªÓPuªNìÓ0î44œ†'aÄ ˜rêN@Ý ˜2ý)ÓŸ1ý“Ÿ1ùºÉ×M½nêuS¯›ú´©O›ú´©Ï˜vÝ´ë¦=mÚÓ¦]7í)Ó7í†i7L{Ü´«¦]5íqÓž5íYÓž5í†i7L»aÚ Ó®švÕ´«¦=kÚ Ón˜vÕ´«¦Ý0íqÓn˜ö&Óž5íYÓÞdÚ›L{Ê´§L{Ê´gM{Ö´gM{Ö´gM{´'L{´§L{Ö´'L{´gM{“iO™vݤ§MºnÒu“®›tݤë&]5éªI7LºaÒ “®štägMz¤gMzÖ¤gMz6:¦ýö´$ÿ“íw¥ö¦›Ú„ûMs¥S_câkL|MûãéöözúLG¥c/KÇdvrÉ7}7¿“®1­5ò:ibkL¬bby\RL7™\eÉ}iiÉýăòçB ?M'LpÂ'L°"·“r;i‚&8±dÂslö¼OùN´¥cÝ>÷!xKúL÷Iéöîwàø·?‚µéšîÒ’lLúŽMtO¥Û£_ñë*~]ů«øu¿®â×UüºŠ_Wùnœï»1ï;q™ïÄer0$C¾óÎþïÀ¹ícé`ûFŒã <‰ lÆTº®ý)·[ †iÔÓ‹ÚgÜ60›.—›åíO»ÿs4ÓÇåçñö_¹ÿk<›ÞÓþ·i:ØÑ†vt¦Ë;ºÜæÓ‹:»Ý-½¢cw</À^éqrvœœ×±OzIÇ‹Óûzü%8â ô;¢ãåîŒCÒ¥ò¸´ãP÷G¯V^†£ñjo¿¯õ<íöu8&½£ãX·ÇáŸçõnψì8;:£Wqó*n^ÅÍ«¸y7¯â¯UܳŠsV9)ór=$×CNɼ2ï„Ì;!óNÈeNȼr¾r¾r¾œÉù“2/ëC²>$ëCNǼÓ1ïtÌËùœ9—ÉøÓqÙ’-éKTQK/Y2®û;–üÌÛOãçØž.ÕKuÀ:à:pÝ’yûŒ·éã…_û¸4½Äi;¢»=½¢»é ݰ´»ÛãÏsß ºÍ@W,ÕKuÅR]q®¸NW\§+Vtïçc_ŠïÛxü@˜G÷ËÒAݱTwÜ¡;Žs¢è^ê±CqÇxŽL×uå¶ËðJ¼ ¯ÆkÒåúfy÷±îŸÞ£kîé~½ûoÂßàÍxKzQ÷‰nߊ·yÿÛÝž”ž+9çJιÝïòö»=ÇÉ8Åý÷ø|ïÅûÜ?NõøpN÷øéã:ëqõ¸Îº§ûls>ˆ¿Ãßã|ì¹Þ>äóØcË=ö÷Yóô| ×gCúlHŸ é³!}6¤Ï®ëóýwû„ïѓ؄ oOº­xž)¯[ÖtÛãºm¹n[®Û–ë¶åÑnzìn=v·ôÞÌ.7²ËNÝÍNÝÍNÛÍ:çns·Î¹Û©ºY×Ü­kîînýÆîy: ®ê: ¬ÊžeDŽê²FÕˆ£²¼Q–7ÊìÝ(‡Éácrø˜¼m•·­rV–³²|•å«,_eYªÉÐcZsT&Ê2QÖž£šsÔ+ñ Gd¢îUŽÈAYÊ2P–² ”½Úg¿ìì—ýº³_ÖŽ£ÎÝY¯9ßeç»ì|לï²ó]v¶kÎòVç·ì¼–ײóZv^ËÎkÙy-;£eg´ìŒ–Ѳ3ºÕù,;Ÿ5çó1çs«³¶ÑYÛèœmqζ8K[œ›ÎÍFgd£3²ÑÙèLl1ÿæ½QšwÙœËæ\6ç²9—͹lÎe3.›qÙŒËf\6ã²—Íx£¹n4׿ºÑ\7F3‘a6‘ñ[Éð.[ɘ‰ŒiÕ1­:f2ÁVR61[IÙVR6¥Š)UL©b:c¦3f:#¦3b:#ZoÌ„M¨²s6¡á]¶‘q7qÓ6aÓ6aÓ6qÓ6a“Þ¹y šÊ˜©Œ™Ê ©Œ˜Êˆ© jœ13¦]ÆLgÌtÆLgÌtÆLgÄtFLgD›Œ™Ð˜ ™Ðˆ ˜Î˜é šNÅæQ61Ó³y”meS ¦L)˜Ò˜)™Ò˜)™Ò˜Iñ˜™X0±1‰“Ø1“³y”wnæ7lzæ7lzæ7lz#¦7bzc¦7fzc¦7bzc¦7&™c&8f‚c&8f‚cÑ’y¯dÞk‚×›T¿Iõ›Ô Im0¥ ¦´Áwùzßåë}—¯—Ô{%õ^I½×w÷zI½WRïõoð•nð•nð•úJ[Ý6è«ê÷Uõûªú}Uƒ¾¢~_Q¿¯fƒtßëUõGOØFl#¶ÛÀˆm`Ä60b± ŒØ.ЗjÖFœ8s‰W<ç¼%6l5›@Í&P³ Ôl5›@Íðˆ- f ¨Ùj¶€š- f Xg ¨ÙjÎiÑ9-Új¶€ûר¿Æü5æ¯1ùkÎm‘ùkÌ¿ŽùkÌ?ÀüÌ?ÀüÎòíÎòíÎòíÌ¿ùKÌ?ÀüÌ?Àüšh…&ZÁüÌ?à̯tæW2ÿó8ûãÎþ¸³?ÎüÌ? ›™€ùdáæ`þ™¸ù„ñG„ñG$Ûúo ·¤#Œ?Âø#r“ÈMb’s&9§Ñ.5Í9–¿€å/`ù ä'‘ŸD~ùIä'1á9ùIä'Ñn—ÊP¢Ù.eöf`öf߯ì%¹z†Ù˜}€Ùdl¥Œ­”±gdl\ÆÆ™}›œ=#g›ål3³0û6m¸‚Ù˜}@ö6ËÞJf߯ì%f`öY\)‹+eq¥,ŽËâ¸,ŽËâff߯ìÛdr¥L®”Éq™ך+˜½&›+eóÙ¼]s®`ö³×˜½Æì5f¯±ú#¬^cõ«×X½Æê5V¯ÉrQ–‹L^cò‹×X|‹×X¼Æà5¿Áo`ð¼&ãE/²÷#ìý{ר»õ³eQæ‹2_dïGغÆÖ5¶®É|‘×±sMæ‹ì¼NÞv¾@æ™Od>‘ùDæ™gæ’ÜËýJ¹_)÷+å~\îWÊ}‘™oû¢Üå¾(÷Åh'töw^ìMçºy§nÞ +3t`è`²³¦ÚrWÙçMpÞgM°lj³ ëv»—½ao¼ûyû¥8ÀýÑòÖË5WËWz{éü.×íØ×kÙá5¯!x aáÄŸ‘.óÞe^ß;øÜÁçÞñ»““¦;NJ·Û½´åÞxž; ;¼†^Cð‚Ï|Þàó†…¯¼ê+Ÿð•OüÑWÞú³šÏZ[ÒúWìf¹b¿ÿÊ[?NùÌU_ù„Ï\ý£¯¼ê³VwùÊ'|åS¾ò‰?øÊ÷ÑÛ4Å6M±MlÕ[}ö‰Þæ³ÎHÎVÉÙê³ÏøŒ3Ò°Õéßêôouú·:å[òÖ>ÐúÞÎ8ÕÛL«éo5ý­&¿5Êú§|¾¦h7?ìæ5OyM­×3ÝÝÖžnoë@'ºA9,B‹ÑÝÓFÛóáçð6?‡·ù9¼mOì…½ñ"ìƒûØ—¢û㈃ð2ü^Žƒq2NÁ{ð^¼ïÇ©øNÃé¸"m»Wáj\ƒkñ)\‡Oã3­ÕŸ]¸ZÃöÎÛðuÜŽo €oâ[ø6îÀw°w⻸ kñ=ÜïãX‡¦³?BŒG?PÄà?±÷â>ÜŸÎf¾ŒI·gnu{[ÚÈøœŸ+s׿n¿=óo¸?ÄÃófŽOà“Þ¾ÐíE¸—ã \‰/âK¸1mänòq¾Þœ¯77€_Gî lò¾ x͹ ž^ø×¿·/z ÞgeÑßâ,œsðAü}º=Ú·ýãétû'ÒéÅoÅÛðvœ„wàxÞ“q Þƒ÷â}x?NÅpNÇ8‹³p6ÎÁ[×6‘›Dn¹Iä&‘›Dn¹Iä&‘›Dn¹IäfBn&äfBn&äfBn&äfBn&äfBn&ä&‘›I¹™”›I¹™”›I¹™”›I¹™”›I¹™l;$êj[ŠCqÇxŽÄQèÅ2WâUx5^ƒ×â¯ñ:ƒcqŽÇ x=Þ€7âMø¼oÁ‰x+Þ†·ã$¼ïÄ»ðnœìk9ïÁ{ñ>¼§â8 §ã \‰«p5®Áµø®Ã§ñô᳸_Hçm‰ó¶Äy[â¼-qÞ–8oKœ·%η­²m÷â>ÜA<-iû1ÄÂOôÄÃFX¸6ù>gFÓ’ûtœ}L$ú#щþHôG¢?ý‘èD$ú#щþHôǤþ˜Ô“úcRLêIý1©?&õG¢?ý‘èD$ú#щþHôG¢?ý‘èD$GK:‡¢%]/ŠººöÁ‹±/^‚ý¢.“è˜$³Êý[ÝÞ–Nd¾%÷^Ÿ®ItM¢k]“èšD×$º&Ñ5‰®ItM’).ôM¢o}“è›DßLê›I}“è›$:'Ñ9‰Î™Ô9‰ÎItN¢s’ÌÆh‰ÞIôN¢wé|fóBÿLèŸDÿ$úgBÿ$ú'Ñ?‰þIôO¢&õϤþ™Ô?“úg2E]:(ÑA‰JtP¢ƒ[î¼-wÞ–;oË·åÎg{£%Ùe8:Êf_‰ãp¼·OðñoÄ[t׉ђ\wÔ•{vÃîx>^€b쉽á{ó½Îù^ç|¯s¾×9ßëÜKу¦‰þ›Ô‰þKô_¢ÿý—ä.Ö]—àR÷/‡3®“ÜU>ÿÕø¢û_ ÿöUbCŸÏ}Ãs®ñ¾;ý¹ï‚rkº2Ñ•‰®Lr|ŒÍO_&¹Ç®¨èÌDg&:3Ñ™InÆs4¢lnÖû¶Ð¡‰MɸŸæui¢K“E2ªO?Ì/:=Z²èL]û·Þ> gãœtR·NêÖ$Úñg^ã·ªíªÚ®ªíªÚ®ªíªÚ®ªíªÚ®ªíª;¯ñ[Óv5mWÓv5mWÓv5mWÓv5mWÓvµÿïküþùmòTÛW¤ÿf¬ÆWq غík¸ _Çíø ø&¤«íÛ¸ßÁ˜\›Éµ™\›Éµ}wãûøÁ¿Áý¬†i×0'j˜v sâ_píÝš†©i˜š†©i˜š†©i˜š†©ý% ӵ疒,\Óõ¹ö¨f|Í™Ûä©×tMþ›ë·>× ¿½~ëï¯ÝZӵߵÇï¯ÙZû/ÍñäÂÆòÛk¶&£ºËõZ«âz­5QÓ5QÓµ…ëµþq["ùKq(ëÒg³¯Æ± Û̵VsûKÊ8áeø+¼ÃsäwýË?Lüs já—'.\å¹k\ž‘>ûG×´¬It­uMË…S¸—¸WÛ¾²]”í¢le»(ÛEÙ.ÊvQ¶‹²]”í¢le{½l¯—íõ²½^¶×ËözÙ^/Ûëe{½l¯—í¢l÷Ëv¿l÷Ëv¿l÷Ëv¿l÷Ëv¿l÷Ëv¿le»(ÛEÙ.ÊvQ¶‹²]”í¢le»(Û±lDzËv,Û±lDzËv,Û±lDzËv,ÛE›ÂŒMaƦ0cS˜±)ÌØfl 36…ÙoÊ~Sö›²ß”ý¦ì7e¿)ûMÙoÊ~Sö›²ß”ý¦ì7e¿)ûMÙoÊ~Sö›²ß”ý¦ì7e¿)ûMÙoÊ~³m]ú¨¬e½(ëEY/ÊzQÖ‹²^”õ¢¬e½(ëEY/Êz¿¬÷Ëz¿¬÷Ëz¿¬÷Ëz¿¬÷Ëz,뱬DzËz,뱬DzËz,뱬DzËzÜ9èulÀø1ÄÂOÒG»ö\øzb]PÔ±.X¯ šº © Šº ¨ âÌÚôÑÌ÷p7¾`÷ýîÁñ#ÄðºôC¬Šú¡¨Šú¡¨úõC¿~ˆõCœyØs £ä}#xÌûF=^ÆãÓ^Ç&ï›À¤·+錮X¯+Šº¢¨+Ö늢®(ꊢ®(ꊢ®è×ýº¢_WôëŠ~]QÔ±®ˆuE¬+b›ÅŒÍbÆf1c³˜±YÌè¦þhê¦þhfOÍWàH…c=~‚ç{#ÎJÕ'M}ÒÔ'M}ÒÔ'M}ÒÔ'M}ÒÔ'M}ÒÔ'M}ÒÔ'M}ÒÔ'M}ÒÔ'M}ÒÌ}Äs}4uJ¿N)ꔢN‰uJQ§uJQ§uJQ§s×øøÏàsX/zìK¸1]¯cb›ÆLî[7#]SÔ3E=ÓÔ3M=ÓÔ3E=SÔ3E=ë™XÏÄz&ÎUý¹§ÓxÑkÓGõMÑ6ÑúÍÅ¢ÎiꜢÎ)Ú&ftNQçuNQçôëœ~S\t^úhtôŸø=¦Öoîíhû1ÄÂOÒ-öó-öó-öó-§;:‡ÒöÛ-vÖ-vÒ-™ÞÞœnÉö¦;²Ëðûß3zî7îžû£vÀ-ÙÓö³-ö³-¹«Ü¿kp§·¿‹»°­ßl{ÌíŒ÷=÷»;[ìS[žîØùÛk[¢?iäý¤‘÷“FÞOy?iäý¤±ØO‹ý¤±ØO‹ý¤±˜÷÷Ò¸gò~«uÏ´Õ/¶Õ/¶Õ/¶5/¶½.¶½.¶½æm¯yÛkÞöºØÆºØÖ¸ØÖ¸Øv¸Øv·Øv—·±-Ž.Ð^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUÕ^UíUý¿mY5³q37³q37³q3k˜YÃÌfÖú’':ÎNŸ0»q³7»q-ÓÚ0ªZ¥jŽ sl˜cÃÇ%¼j–­+ÛU¥®*uU©«ší¸ÙŽïòÛ”U³­J^uçoSŽ›oÃ|Ç¥¯*}Ué«J_UúªÒW•¾ªôU¥¯*}Ué«J_UúªÒW•¾ªôU¥¯*}Uç¤áœ4œ“qçdÜ9wNÎIÃ9i8' ç¤*AU ªJPÕ™i83ã;û±áÌ4$¤êÜŒ;7UçÆüÚ=s»g^üwø{üþçâ<|ö¼3êL£.dE‹Çb,A7ž‡ÝÒ8Ú/H+Ñ ±öÄ^Øã,Å¡8 ¯óçŽÁ?FÇDçâ<|"Z}ÿ„ q.Æ%QOt©ÛËp9®À•¸*Ú#º×àÚhE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°QE°Q„¶óÒJÛ?áB\„‹q .Åå¸ÂÇ\‰«p5®Áµø®Ã§ñôá³øßþÌõn?çvnÀçñ­Äñ%܈›ðeü Öù˜Ã=ø!~„ÿŽ~  ˆÿÀOð0†ÒJç'ÓÁÎÂ…¸ã\ŠËp9®À•¸ ·DK;oÅ×p[l$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$ÁFl$IÅFR±‘Tl$IÅFR±‘TºöˆŽéª¸ÝŠ*jÑÒ®Ÿ¹}sQOWÓû_zü×Ñ]¿‰öÈÈK&›V2r‘‘‹Œ\dv÷öó!¹Èìéã^â}ûá@o„Cþj\ƒkñ©¨'s>íþg‹ÏÃÙ°……Ì-žçV·f¥+[ÿÆQȬqk6±`«ØÄ*6±ŠM¬b«ØÄ‚M,ØÄ‚M,ØÄ‚M,ØÄ‚M,èÛŠm,ØÆBæ^÷ÍÂFldÁFldÁFldYE7WleÁVleÁVleÁVle!óÄ¿wleÁVleA‡WlfÁflfÁflfÁflfÁflfÁflfÁflfÁflf!»(­dõXÖ¼²æ•ÕcY=–ÕcÙA'ØÜ‚Í-ØÜBv?½=ØÀ\mtÁFltÁFltÁW±ÁUlp\ÅW±½Û[àJöí8káßë©Ø¾Bî·ÿËíÇñ |â"è Ž¨ØÄ‚M,ØÄ‚M,ØÄ*6±ŠM¬b«ätANä¾€•Ð6³`3 6³ûWÝâÖŒ9¦Â1Ž©pLŶlk!§llÁ–li!÷Soà1ŒbOxÜ,lnÁæln!·Åã²ÃG>ªØâBn»Û94ÓŠ®b£ 6º`£ ‹Þ¾ðïþ]Xô^÷߇÷ãTèO«Øò‚-/Øò‚-/Øò‚-/,jujëÿâìc­>Öêc­>Öêc­>Öêc­>Öêc­>Öêc­>Öêc­ÀZµkÖ ¬X+°V`­ÀZµkX«äþ;ðNxÅÑ»áUGÚ?Òþ‘ö´~¤í®—áz®w§áz®‡áz®‡ázv®—áz®—áz®—áz®‡áz®‡áb†‹.f¸˜áb†‹.f¸˜áb†‹.f¸Õ ·šáV3Üj†[Íp«n5íf¸Õ ·šáb†+0\á W`¸Ã®Àp†+0\áb†‹.f¸˜áb†‹.f¸˜áb†‹.f¸˜áb†‹.f¸˜áb†‹®Àp†+0\á W`¸Ã®Àp†+0\áZ?WÇ 3\Ìp1ÃÅ ·–áÖ2ÜZ†[Ëpkn-íe¸µ 3\Ìp1ÃÅ 3\Ìp1ÃÅ 3\Ìp1Æ .0\Ãõ1\Ãõ1\Ãõ1\Ãõ1\Ãõ1\Ãõuþ³?ßà ܀σ…;Y¸Sò:%¯Sò:%¯SÓ²b/+ö²b/+Ƭ³bÌŠ1+Ƭ³bÌŠ1+Ƭ³bÌŠ1+X±ÀŠV,°b ¬X`Å+X±ÀŠV,°b ¬X`Å+X±ÀŠV,°bcVŒY1fŘcVŒY1fŘ{Y1°bèҰ̘±—3†fìeÆ^fìeÆfìaÆ>f ÌØÇŒ}ÌØÇŒ3f ÌØÃŒ}ÌØÇŒ3ö0c3f ̘10c/3ö1c3ö1c3ö2c3f ̘10c`ÆÀŒ½ÌØËŒ½ÌØ»‹{˜±g3ö2c3ö0c3ö0ccfŒ™±ÀŒ«™10cÌŒ13ÆÌX`ƘcfŒ™1fƘcfŒ™1fƘcfŒ™±ÀŒf Ì3cÌŒ13ÆÌ3c ÌX`Æ3ÆÌ3c`Ƙcf,0c ÌX`Æ3ÆÌ3cÌŒf\ËŒW3cÌŒ13®fƘcfŒ™1fƘ ÌX`Æ3˜±ÀŒ13ÆÌ3cÌŒ13ÆÌ3cÌŒ13˜±ÀŒf,0cÌŒ13ÆÌ3cÌŒ­¿ëXËŒk™q-3®eƵÌ3cÌŒ13ÆÌ3cÌŒ13fŒ™1fƘ ÌØú»‰3ÆÌ3ccfŒ™10c`ƘcfŒ™1fƘcfŒ™1fƘcfŒ™1fƘcf\ÍŒflý½ÅZfŒ™10c`ÆÀŒ!gÓaǘcvŒÙ1fǘcvŒÙ1fÇÀŽ1;Æì³c ìX`Ç;¶þn#fÇÀŽ ì³cÌŽ­¿ïˆÙ1fǵì³cÌŽ1;Æì³cÌŽ1;Æì¸–;Æì³cÌŽv,°c¼¨ÕÇû±G‰=JìQb{”Ø£Ä%ö(±G‰=JìQb{”Ø£Ä%ö(±G‰=JìQb{”أģì1Ê£ì1Ê£ì1Ê£ì1Ê£ì1Ê%ö(±G‰=JìQb{”Ø£Ä%ö(ýWð+1ÁÌ1ÁÌ1ÁÌ1Á̵}%Ê´ÝŒÕø*nÁ­ønÃ×q;¾¾‰oáÛ¸ßÁ܉ïâ.¬Å÷p7¾`]Zï83ZÖqN´L£—4zI£—4zI£—4zI£—4zI£—4zI£—4zI£jôQ>ªÑG5ú¨FÕè£}ô/ºß`Z×èu^×èu^×èu^×èõ®=£ÌÎ+Ø•v^½®”ñ½Èø^h¶’V+-\½nmZ×ju­V×ju­V×j%­VÒj%­VÒj%­VÚåŠv%VÒf%mVÒf£ÚlôwW´{Øs £ä}#xÌûþøÊvOz›¼o­«ÚUÒ9-VÒb%-VÒb%-VÒb%-VÒb%-VÒb£ZlT‹j±Q-6ªÅJÿåªv¥sÚhNÍi£9m4—=$Êd—âP†ÃÓºvªk§ºvªk§zöXŸàùÞˆ³Òznÿ(“;â ¼ …—ã`xΜçÌyΜçÌŽ#𠉣Ћ,\«¨uµ¹QíVÒn¥W›+i·’V+iµ’V+iµ’V«kµºV«kµº+i±’+-\uî–tNƒµþUï’¶*iªRî>Ÿç~ "xÛ÷_C•þËUæªþ\ë*s¯M뚨¤‰æ4QiщQF•4QIóÌi’Ö)i’ÖÕ:£Z§¤uêÑWÛ‰–´-Å¡8 ‡ã¼Gâ(ôbŽÆ+ñ*¼¯Ákñ×xŽÁ±8Çã¼oÀñ&ü ÞŒ·àD¼oÃÛqÞwâ]x7¾å5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C^3ä5C¾m}ÔÑv/îÃýÄQ{Ûñ †ðPë÷£¬9®ãl·çDÇu>µw#DíÒšïzQ´¤k¼ûâ%Ø/Z’Y¯Uró™Q»ää³Q´ÄiÎ;Íy§9ï4ç³½Q{vŽŽ:²¯Ä± ïÛ‘=Þc'Fí¹îhIîyØ »ãùx^ˆ=°'ö†×‘ó:r^GÎëÈy9¯#÷Rô`ÿ(/y‰ÈKD^"ò‘—ˆ¼Dä%"/y‰ÈKD^"ò‘—ˆ¼Dä%"/ùÜU^ÓÕø†ç\ãö>ÝAlðØŒÇQÇ"gÃÉÌ/2ÓE§GíÑSæu7óÝf¾ÛÌw›ùn3ßmæ»Í|·™ï6óÝæWÔâ»)¾›â»)¾›â»)¾›â»)¾›â»©?㊵¾«ð]…ï*|Wá» ßUø®Âw¾«ð]…ï* W¬ýB:ÍwÓ|7ÍwÓ|7ÍwÓ|7ÍwÓ<ÔºÊö~NÐ~ÁUa§xhЇ¦xhЇ¦xhЇ¦xhЇ*½{`Oì…½q0ÁRŠÃðºhï蜔nˆÞwâ]x7NÆ)xÞ‹Sq:þ1=-:çáÃé`´çãà#ø(.ÀÿÄÇð¿ðq|"½ òó~äçýÈÏû‘Ÿ÷#?ïG—¦'G—ár\+±2-E,±lIJÑMø2 éPôM| ߯øQ´4Š1”þ4z?ÁÃFÀ#(á§x#x c*½8z [¤›¢m¨¢†iÔ1ƒfñ3<Ÿ§7EÛÓ;£˜C¿À3¾Æ_âWø5žM[ÿ%ï¶›±_Å-¸_Ãmø:nÇ7PÀ7ñ-|wà;Xƒ;ñ]Ü…µøîÆ÷ñ<®kû1ÄJ×uœ‘¾©ãÌôóg»='ý|ç?§:¯Çç°7àóøVâ‹ønÄMø2þ%ìü?X…¯àf¬Æ¿â«­ÿêžÜy+¾†‡ÓuÃØ–þ´³Š¦QÇ ˜ÅÏð4~ŽíعtSg¿À<žÁ/ñ+ü¾Ÿ¿Aš^еGzZמé]{¥wUÒGº¶"I7tUÝÖÒ“»é`×ÏÜMû Ì{ìü2=9“MÉäÒÁÌ"ä±K°»ÇŸÊÈPæ@„—{ßÁ ÿá‘ÌQèÅ2í¹^×ú/ÑÞ™ã½ýzo¿Ùí)ø>Œå8¦§e.Ÿ—ús—ár\+qUzAæj\“öe®Å§=Ÿ3’qF2Óu™'Ó²‡`)ÅaèM×e—áX÷w{"NJš=ïÇ©8-ÊžžÞ™=ÇýâÜôâìyøPº)ûa,O/È^èñ‹Ü¿—àR\†«<~µ?­ÛO¡+ñEÜäý_ÆWÜÿ*nÁ­ønóœk¢¥Ù;Ý¿ËýØí<'± ˜ö:ê˜A²–•µ¬¬eŽíؑޔƒ¬ee-+gÙ4½øÿRvïñqÕuÂÇOÒtÎ4½hÃÊMvôXTÖÇÛ²^HV¤Ôgƒ¦‚ÏjèÆBÂU;‹×ê8†‹Pg˜BZèšr ‡)éhhBJ!e¸XÊ¥~û†ÇýïyþØ?>¯sæ’4 çü~ïïn Ù(ÜœmßË~0ÜŸ=Pé`¢Cõ!&ŸYÖg–õ™e}fÙ#t¤>¬£t´ŽÑâ°:{‘–kuØM]úîß%™p§L¸S&âcÃKñq:IŸðøsškVíÔÙê ë]½ë]µë]UWgÕÕYuuV]‰[]‰[]‰UWb5ö™ÇoÈgº"«®Èõ®¤ WÒ„+i•3‘­‡—\9¯»rº\9]®œ.WN—+§Ë•ÓåÊéråt¹rº\9]®œ®hv87zÞFíë£öõQûú¨}}Ô¾>j_±¯Ø×Gìë#öõ‘è„pt¢Nqþ/ú¢¾¤/ë+:UíêÐiš«oEmQ§ÎÖ%áóQŸ.Õeº\WèJ]¥ë'º:Üf¯>Ë^}–½ú,{õYöê³ìÕgEK½ökýVEýNýºF×ê:]¯ßëݨeLñ•TÖMZîù[4 Z©[u›ViµÖh­n×öæut¾^wê.Ý­{t¯ kƒî×õ€6†N†èdˆN†èdˆN†èdˆN†èdˆN†èdˆN†èŒõ5U=æüqÇÕ˜žë¢qíÔ“Ú¥§4 œQàŒg8£ÀÎ(pF3 œQàŒ‚»|­»|­»|­»|­»|­»|­»|•»|Ü]>î.w—»ËÇ£·Ýý!Œ5DjPch7µ›ÎÚMgí¦³vÓY»é¬ÝtÖn:k7µ›ÎÚMgsMgsMgsMgsMgsMgsMgsMgsMgsMgsMgí¦³ÓY‡é¬ÃtÖa:ë0u˜Î:Lg¦³ÓY‡é¬ÝtÖn:k7µ›ÎÚMgí¦³vÓY»é¬ÝtÖÞpvèoX œÎWªW‹tïu¡ë"ýHëõéR]¦Ëu…®ô5?ö}â¸Dyý‡®óMtóMtóMtóMtóMtóMtóMtóMtý k´V·ë­Ó ÖëNÝ¥»5n´¢ÞhE½ÑŠz£õƆ a¹Uu™Uu™Uu™Uu™UuYÃH8¯a“6kK8ï¯g쨿þ±£¬²]VÙ.«l—U¶Ë*Ûe•í²ÊvYe»¬²]VÙ.«l—U¶‹ãF8n„ãF8n„ãF8n„ãF8n„ãF8n„ãF8n„ãFL¨í&Ôvj» µÝ„ÚnBm7¡¶›PÛM¨í&Ôvj» µÝ„ÚaBí0¡v˜P;L¨&Ôj‡ µÃ„ÚaBí0¡v˜P;L¨&Ôj‡ µÃ„ÚaBí0¡v˜P;L¨&Ô~j¿ µß„ÚoBí7¡ö›PûM¨ývŒevŒevŒeM‡Ï7=¢mÚ®GUÕcz\;4ª1=¡ñp[ÓN=©]zJOëÕô¬&ô\èäÒN.íäÒN.íäÒN.íäÒN.íäÒN.íäÒN.íäÒ—¸´À¥.-piK \Z°»ÛÝÆínãS÷Úxt”GGyt„GG9t”CG§îñÚkQ›]®‹?Gít]vº®Œ5ž;G¹s”;G¹sÔî×e÷ëâÏQþµ v±ç({޲ç({ŽÚ»ìˆ]™“ØðŸìü3ާêÛúŽº4_9îùêÑBý*td–†öÌ5¡?s­óëÃÜL)œ—qd–{Î5ñï?³ÂùJݪ۴J«½¶Fku»îÐ:¹2®Ì]¾Ï=é^ïOïÓ°×6èmÔ&¯m–{"ó×·i»çUUéqíx÷ÿßÖŸ÷úN=é¹]a~æ)_÷ŒŸ{Âs/ëUç{_ÓëzCoj¯÷§zKo+„ŽØÚO ýñ{µöÕ~jÕûô~Íñ¾¿Ñþú€Ú–ÑÇôqcüѰ<þ˜Nrþ ÏÒÏôOúl8H–ÅÿìkN ñÃm,ßÉò,ßÍãÓÃéIJ6>Ãù™:Ë{¿îø ¯Sß®/Ìx<ŸN¾«sõ=ïùwý@9ï;ß{z´P½ú¡…ÏÇh±×/òç\ìx‰ú|ý¥¾îrçW8^©«Ä1ÄKœçõS¯ÿL?wþ ýÒ÷ü•–úz&ˆ£‚×ëqÑ×±Ù¡ÓìÐivè4;tÒ×xÌqIeÝä}Çåf€›½Ît6¯ñ¼½?¶÷Çwh×ìý±½?¶÷ÇöþØÞÛûã!Ùÿcû|ŸÀ<Ò3@Ì1Äõ F´Y[´Uéa=¢mÚ.ûlÿ“ý?¶ÿÇöóM§ù¦Ó|Ói¾éŒ­I±5)¶&Åؚ֤[“âgúxBÏéyMÊþoö)˜} fŸ‚Ù§@œk‰s-q®%εĹŠ8Wçx¼×g˜ê-½n£Ïµô9žm ŸÏÆg5-Œeg8žú³ç†Žì÷¿ïøƒÐžíÖyÎsŽç«'œ—]¨^ç‹t.Ôâ°Œf—eäk/“½5koÍÚ[³öÖìÕú©~æ½?×/ÂÜì/}ßßyîš0?[r,û™ü{ÌV´Ü÷ºÙŸs‹´B«ÃHÖš’µ¦dí½ÙÁ°<{§ó-²>döÜ6m÷ÞGG5æùqÎNY²»TóüózÁŸQ7f_ôþ—ô²×þâùWµ'ôOû¸NíÓNó§}ÖÑý6íKŽÜ2­Ãù¿ê«:M_óž¹aÙ´3ÂòióÂyÓÎôž³ôu}#tLû¦þÍ9Ë4>Bø%Â/~‰ðK„_"üá—¿Dø%Â/~‰ðÏ!üs¿Nøu¯~ðë„_'ü Ÿ ü Ÿ ü Â_Aø+¿Fø5¯~ðk„_#üá׿Fø5¯E_7W~CßÔÿÒ¿é«;Ê/ñ÷/ñ÷/ñ÷/ñ÷/ñ÷JüýÄßOüýÄßOüýÄßOü)ñ§ÄŸJü)ñ§ÄŸJü)ñ§ÄŸJü)ñ÷?ñ÷?ñ÷Jü)ñ§ÄŸJü)ñ§ÄŸJü)ñ§ÄŸÿâß@ü)ñ§ÄŸJü)ñ§ÄŸJü)ñ§ÄŸJü)ñWˆ¿Bü⯅ø+Ä_!þ ñWˆ¿Büâ¯Jü)ñWˆ?%þ”øSâO‰ˆø‡ˆˆø‡ˆˆø‡ˆ¿JüU⯕ø«Ä_%þ*ñW‰¿JüUâg~ßFñ{)~/Åï¥ø½_¤ø"Å)¾HñEŠ/R|‘â‹_¤ø"Å)~)Å/¥ø¥¿”â—RüRŠ_JñK)~)Å/¥ø"Å(¾@ñŠ/P|â _ øÅ(¾@ñEŠ/R|‘â‹_¤ø"Å)¾HñEŠ/R|Bñ Å'ŸP|Bñ Å'ŸP|™âË_¦ø2Å—)¾LñeŠ/S|™âË_¦ø2Å'_¤ø„âŠO(>¡øÅ—(¾Dñ%Š/Q|‰âK_¢ø„âŠO(>¡ø„âŠO(>¡ø„âŠOh½Fë5Z¯ÑzÖk´>@ë´>@ë¤~¥Gé%J/Qz‰ÒK”^¢ô¥—(½Dé%J/Qz‰ÒK”^£ô¥×(½Fé5J¯QzÒk”^£ô¥×(½Fé5J/Rz‘Ò‹”^¤ô"¥)½HéEJ/Rz‘Ò‹”^¤ô¥(½@éJ/PzÒ ”^ ô2¥—)½LéeJ/Sz™ÒË”^¦ô2¥—)½LéeJ/SzBé ¥'”žPzBé ¥'”žPzÒkMïüïv½”ÞKé½”ÞKé½”ÞKé½”ÞKé½”ÞKé½”ÞKé)¥§”žRzJé)¥§”žRzJé)¥§”^¡ô ¥W(½BéJ¯Pz…Ò+”^¡ô ¥W(½BéJ¯Rz•Ò«”^¥ô*¥W)½JéU*¯SyÊkT^§ò:•×i¼Dãu/Ñx‰ÆÏ¡ñ:×i¼Nãu/Ñx‰Æë4^§ñ×i¼Nãu¯Óx‰ÆK4¾‚Æë4^¢ñ:×i¼Nãu¯Óx=óý°;óuë<-Ðâ(›¹H¿ e2/’yBæe2_Jæd^$ó„Ì‹d^&ó„Ì2OȽ_m $ßûÝß[ýwŽx<ªao㼨)Ú?šªŒbe5MÍš®š©Yš½Gï%Å}´¯öS«Þ§Ãôwú{ýƒ× ÑœèD†M æ…aÓ°iaØ´0lZ6- ›†M æ…áè[ácQ§ÎÖwÂHÔ¥ùú®Îѹúžþþ]ß×Ô>ÎŒ(§óÕ£…~òÞphôC-ÒºP—ø¹út©.ÓåºBWê*ýX?ÑOè©cÔÔ1jê5uŒš:FM£&ˆQĨ bÔ1Ý­ÓF?σÑ&mÖmÕCzXh›¶ë1=ΈžQMaŒÜÇÈ}ŒÜÇÈ}ŒÜÇÈ}ŒÜÇÈ}ŒÜÇÈ},z%|)úK87Ú­WµG¯éõhŸèp|ô¦ö*Õ[áø†B¸³á·*ª_×èZ]§ëõ{Ý µLPIeÝ¤Š–ëfÝ¢­ÐJݪ۴JCaqýJtŸ†uè¥Þ^êí¥Þ^êím‰f4lÒfm‰f4í¾;N'„‘ÆO:~Úñ ᣧèÔhÿÆyacã·4?|ºñ»:Gçz|KÔÔ8Mi¼=:°ñŽwûèúÆa=øöhãž°µñ5½¾8åàhö”CtLXíN[íN[=åãẦó¢ý›(§óÕ£…êÕµHèB-ÖUa˜²‡){˜²‡){˜²‡){˜²‡){˜²‡){˜²‡){¸iiiúµ~£‚~«¢~§~]mºV×iµnÖ=ÍizDÛ´]ªªÇô¸vhTczBÏù^ÏkRÒŸõ‚êzQ/ée½¢¿h·^ c;F±c;F±c;F±c;ÖäÚiz[!?ußð±©û…;§¶†3èvÝn£ÛaºÝ6u2:ÕŸC¹Û(wÛÔW£ÙS÷xÿkzÝóoèÍphƺC¿Û2Ù0’™¦fM× Ys2ÖœŒ5‡ˆ·ñ6"ÞFÄÛ2ð|›r~°>äý‡éHÏåñÑ:Fѱþœã<ïZÊœèxR4‡·e>åù“=þŒóSõm}G]š¯\øXæ|õh¡z}ýµHèB-Í\¤…33ë’hv¦O—úÞ{(SŠfdî’ëšX{3Oxî©wþÞf¸3þ{ýƒ×1TóÇÇé=w’ã'<÷Yïÿœã)a„G(p„Gp4žÎ¥¾ê‰;ÃñÙúv£¿±¸+Oz#¤7Fzc¤7Fzc¤7/ŠæÄh±×/ò}.v¼D—˺[÷hn„æF(nŒâÆÈm$.zÞuJl#Ä6Bl#ñõþœ›<¿<:€ÒFâ×x¼Îùé k§þägü³^P]Ö2# 1# ±xwøRüª¬e±µ,¶–ÅoÈZ‡pF6 çfÂñÙÆhNöƒáÎì:Hëªé0ù¬³>ë¬Ï:ë³Î¡#õa¥£uŒz¢Ù…ZL2©ì{ûçÊV´Ü㛽v‹´B«Ãp6ñu÷iXÛßùûªÞW‹³/:鿳î$Þió¢ÍîùfŸa³û½¹?|´ùZ]ïü®°±ùn ) ŸnÖýÎÔ¦hNófmÑV=$kA³µ ÙZÐl-h¶4[ š­ÍÖ‚fkA³µ ÙZÐl-h×N=©]zJOëÕô¬&ôœž×d4gúP´ÿô{•è> kƒî×õ€6êAh“6k‹¶ê!=¬G´MÛõ¨ÓãÚ¡Qé kg´ÿŒïGsf,‹šfü!š2c•ãš·Gg¬ÕzçwEÎrþ€ó^Péá°~Æ#Ú¦í^Üë;ô„ÇãÚéëžÑž°šžVÏx3\7co¸nfC4{f“ckXMN«ÉiõÌ9èxì3ÿNŸ_œùI}Ag„­3çéLåq§ãÙò3ÍÜÖÓÕjºZMW«g>¶Îúr´ÿ¬¯è}kaÔdgŸªŒbe5MÍš®š©Yš¾½G‡…qª§ªqª§ªñè„pst¢N uªªSUªêTU§ª:UÕ©ªNUuªªSU=úVtFÔ©³ÕÇv ”ÓùrõG½ÑѵHèB]æE}ºT—ér]¡+u•~¬Ÿèÿÿ7'wPÒJÚAI;(iGtG¸!Z§a’’&)i’’&)i’’&)i’’&)i’’&)i’’&)i2z::-zF5½}<ú‹Ÿ{·^Õ½¦7¢Ã£7µW©ÞŠoh C SÔ¤©Ê(VVÓԬ隩÷„»Zô^í£}µŸZõ>½_sô7Þ{€þVÔ:Hëªé0}E§ª]úW}U§ék:]suvØÝ°@9¯-T¯éï¹P‹u‘~¤‹u‰út©.ÓåºBWúš;þÄq‰òú]Æ~ªŸéçú…~©_i©V{Ï­ÕíºCë4¨õºSwéî°»ñèpzãq:!¼ØøIÇO;~!:¼ñæÛ$±M6Îkü®Îѹ_†¯ CMç…3š(§óÕ£…êÕµHèB-ÖU¡N^uòª“W¼êäU'¯:yÕÉ«N^uòª“W¼êM×DG4]«ët½?ó÷ºA7j™þ ’ʺI-×ͺEZ¡•ºU·i•VëvÝ¡uÔzÝ©»t·îÑîU¢û4v7mÐýú£ÐF=¨=æ5=¢mÚ®GUÕcz\;4ª1=¡çÂ$ñMß$ñMß$ñMß$ñMß$ñMß$ñMßd“û¢ém…èð©ûFgLmN£¸úÔÉ舩{<~MoFGd¬YëRƺ”±.e>àØ¦#u¬×sûŒÏ=ãsÏø¼3>ï̽ÞëóÎø¼3ÃÚ ´Q›¼¶Y9ߦízTU=¦Ç5æõqÇzR»Âxæ?ã„ó—õªó=ޝéu½¡7µW©ÞÒÛ a(¶þÄÓÂîø½ÚGûj?µê}z¿æx5%Þ_P›çÐßêƒ:Péà0¢Cõ!Ù#â#<¤>¬£t´>é{ü“þÙù)a’'éq’'éqG<—,ÏòÚ7<þ¦:£Óâ³ÕNŽ“ñ¢0/¾@‹_äý;^¢ËeÝ­û”8I‰ïü7W'ã¢ÇýŽ×èZ]§ë}¯›<¿<Ü@‡“ñ€Çk<^ç|ƒÆô„ƵSòçÿY/ÈîïŽ>¿*k{lm­ëqˆNËF„Õžm ó²ç„ÝÙsÃPö{Žßwüºužr:_½Z$ëgöÂwÿË껳—ɺ˜µ.f­‹YëböjýT?óžŸëáîì/ç¹kÂx¶äXögúgÊV´úÝÿÅPÖu˜µFf]Ù-r]eöx›Õ¨Æ<çzʺž²®§ì.Õ<ÿ¼\OÙ¿8¾ª=a÷´ë„04íä0>í³ŽþNû’£}dZ‡óÕWuš¾æ=gzþ,}]ßÐ7õo²Ÿç‹äù"y¾ØÜÞ|­®wn­k¶¦5[Ïš­eÍî©f÷‘Né$‘N6'ÑaÍú߹½ºyS8½y³¶h«ÒÃzDÛ´]ªªÇô¸vhTczBãÚ©'µKOéi=£šžÕ„žÓóš §O¿: Mÿ©ü{™îßËô_È¿—éÖéÖéCaÞô{•è> kƒî×õ€6êAh“6k‹¶ê!Ys§[s§[s§[s§[s§[o§[o§[o§[o§[o§[o§kg˜7ãûáôY_óf}Eöº)ûP^+åµR^+åµR^+åµR^+åµR^+åµR^+åE”Eï I´öÕ~jÕûtX¤¿Aú¤¿Aú¤¿Åô·˜þéoþéoþéoþéoþéoþéo6ýͦ¿Ù”7‹òfQÞ,Ê›Ey³(¯…òZ(¯…òZ(¯…òZ(¯…òZ(¯…òZ¢«C•ôúH¯ôúH¯ôúH¯/Zêµ_ë·*êwê×5ºV×ézý^7èF-óuPIeݤ垿EZ¡•ºU·i•VkÖêvÝ.¡ÉK¢Açëu§îÒݺG÷*Ѱ6è~ýQh£?ïAh“6k‹¶ê!=¬G´MÛõ¨¯©ê1ç;îШÆôDXk§žÔ.=¥§}æÏ¨¦7¢™d:“Lg’éL2I¦92Í‘iŽLsdš#Ó™æÈ4G¦92Í‘iŽLé2]@¦ Èt™. Ódº€Lé2Í‘i™öi™öi™öi™öi™öiŽLsdš#Ó™æÈ4G¦92Í‘iŽLs gE3è4O§y:ÍÓižNótš§Ó<æé´›N»é´›N»é´›N»é´›N»é´›N»é´›N»é4O§9:ÍÓižNótš§Ó%tº„N—Ðé:]B§Kèt .¡Ó<æé4O§y:ÍÓižNótš§Ó<æé4ß0V6lÒfm +iµVÛhu­¶Ñê:J)u¥®"ÓUdÚM¦ÝdÚJ¦­dÚJ¦­dÚJ¦­dÚJ¦­dÚJ¦­dÚJ¦­d:H¦ƒd:H¦ƒd:H¦ƒd:H¦ƒd:H¦ƒd:H¦ƒd:H¦³Èt™Î"Ó™æÈ4G¦92Í‘iŽLsdš#Ó™æÈ4G¦92í!Ó2í!Ó2í!Ó2í!Óž¦5ÑŒ¦µºÝ?ËZ§A­×ºKwë é^%ºOÃ!O¨yBÍjžPó„š'Ô<¡æ µ…P[µ…P[µ…P[µ…P[µ…P[µ…P[šÆCµi§žÔ.=¥§õŒjzVz.ô‘lÉö‘lÉö‘lÉö‘lÉö‘lÉö‘lÉö‘ìL’5ÎG3Iv6ÉΞº+$SŸÕDœú¼ãd4kêKŽ/k×_Ó›Ñ,ºmÍÄ!!ÜVÂm%Ü(ó[dMÎX“‰·•x[39?XG:?Êñh£èXßë8ÏŸ¨“ÂâÌ'<÷)ÏìñgœŸªoë;êÒ|å¢Ù”<›’gSòl*žEÅÝTœ£â<wSñ‚L)¬$ãçÉ8GÆÝdœ'ã<çÉ8OÆy2ΑqŽŒsdœ#ãçȸ›Œ»3wù>÷x<¤{½?q¼Oᇎ{è¸›Ž»é8OÇùŒû…s„œ#äBî&änBî&änBÎrŽs„ÜMÈK2OùšgüÌž{Y¯:ßãøš^×zS{}¿Toém…ÐCÉ9JÎSrž’󔜧ä<%ç)9OÉyJî¦änJî¦änJÎSrž’󔜧ä<%ç)y %/¡ä%”¼„’—Prž’󔜧ä<%ç)9Gɹø³a%)çI¹/þb¨Òr-÷Ñr_ü5Ow<ÃñLå}_wü†ç¾){+9Ï&ç™ñ÷<ÿïúr^[Z(º…¢û(º¢û(º/¾Ôë—;^áx¥®’}–ª[â%Îó²×Òu_üsç¿ý5þ ž+zŸ=–¸ûˆ»¸ûˆ»¸gÆöÖ¸¤²nò¾Šãòp ÷ÅöV ŸIá-±=4¶‡Æwh×족=4¶‡ÆöÐØÛCã!ÙGcûh|Ÿì¥ôÞÛKc{il/7êAh³¶h«ÒÃzDÛ´]öÑØ>?&ûhlí£¦>Ó@Ÿi Ï4Ð[+bkEl­ˆ­±µ"¶VÄφ5ñ„žÓóšÔŸ|þÖ ªË>¿í½!šmR˜iRhÉÆ¡šÍj†Î ySC·©!ojè15äL 9SC·©!gjÈe{ÂÊìBõ:_¤ t¡~äk.“}Ëô7=äMyÓCÞô7=äL9ÓÃÓC·é!ozXbzÈ›ZL-¦‡–ì;÷-Ð ­ƒ¦‰œi"gšÈ›&r¦‰œi"gšÈ›&òÙíÞ÷¨ã¨Æÿÿdå|À⸪¿çÎ2;…PL)RŠ”Ò”ÆiäS¤”FSŠHcŠX–ÝegfÙ]v—ý3»,» æÍCÓS¤)bD‘7EDDDŠ‘"EŠˆˆ”"?Œ<˜R¤1¿È/}ÏÌÒ´Õß«¾Ïóö>ßÏÎΟ;wÎÜ{ÎvŸÈaüå0þrùCˆ”½÷/¬àa…”‘t$Âth7(t(ô!Ðô¾ ý ¡4ôƒ†~ÐÐúA'‚>JÝ JÝJÝÚ zý¢¡_4ô‹†~Ñ4Ä qAC\Ð4Äí†> º ¶?ƒí(èeÐèÏà ý +8žw8<Óð§‰0zÉÐÇBèQ´=- }}=„Ž£/‚Wü ™Hƒ¼è³D$q'R‰¡ q ⣎x¢ÃI|ª¡%´ÈMè  „“hBõÄ)âk袢çy¢bç ½@¼1ÑFü”xµã4üú>NLJÐÿÆ8õáGñ£èøÓ8õãÏâÏ¡lÄ&ôclÅ6ôÜŒŸE?ÅñEô2þ6îFc¸ÿMââ¢)<ˆ‡Ð¯ð(~Íà_à_ YüK<‰~ƒ§ð¯Ðoñkø5ô;<‹gÑIF¢ß“Ñd Z$cÉxôy/™ŒVÉ2]% D""¢uòSä§Ð5ò2 ½If“Ùè-2‡ÌA›d1Dà_Ȉ¿·Ér²ýUÆËè¿dM²o‘²nÙKÄý²ȆˆÉ~){•ø°¨°(âpXtX4ñpØž°;‰Œ°¸°{ˆÌ°ß‡ý8¶¶F|6ìÏa&òÃ6Â6ˆ'Ã6ÃþB„½v“( ÛÛ&N„½C…OSrj7¡¤î â-OÅ5TõÂH%S©„…ú(õᤥ%š©Ç¨ÏÏPOS¥D;UE"^¤NSÍīԳÔW‰iê9ê9â×ÔשVb–úÕAÌQ—¨.b‘úõ=â ê%ê%b™ê§ú‰?P?¢~L¬PÃÔ0ñGêejŒ¸Jý‚š ֨ר׈kÔ¯©yâMê÷Ô2ñ6µB­£®R"¶©Mêmâõ79ÂX¾K‰iù‡åÅ»äÉ3p¢KçÒÏÑ_Çyô ô ø º‹þ.Χ_¢€ èz¦‡qý3úgø)úçô|œ~•~Ÿ §éiü4ýkzÓsô>I/Ðoà/Ó¦¯á ú-ú-\~8üa¬ÿTø§°&<+< kÃóÂó°.ü‰ð'puø“áOb}øSáÇ1þtø—0^^†áªp6G<ц-ØñˈMìÞEíŠÂßÚu÷®dܽ+e×Gqß®Gw)ñЮ–]/â¥]s»^Ç»¶2|Cñ„â)’PÔ(¾BF(¾¡è&ïW|_ÑG~Bѯ V *†ÈLŰb˜|T1¢x…ÌVL*fÈ<Ŭb–ü¼bN1O*+äSŠUÅ*Y¢¸ª¸J–*Öo’JÅ[Š·HµâmÅ ²Jñß‘ˆ¬Ž Œ"¹È˜È8ÒO:""IgdR佤y_äý¤7òÈȆȗ#_&ý‘?|… DNF¾FžŠüMäoÉ3‘¿‹\ ¿ùzäëä×¢r£òÉóQ…QEä Q'¢ŠÉö¨²¨ ò[»ÙýÙ¹ûèîÏ/"âî͘قlB¯#¤4‚¬ Èj5ßÞF%lÏZAí NP7è2h4 M€¦As EÐ h ´ºŽ°W„”Û’°×:…PÑ (ÐP<( ´´?Ô¯²ƒ¡>”þ¿laUöžmNHÒ1y ÐqÐIPy¨¿eš- âAv:×Î{σ.À½«Az°/Þö…+°·gÇ×ÜñìèÊŽ&A3 yÐhugßuiTæõC§2q,ÎHcÚwt|çAâ¾A—@= ¾kßÚ¹×AÐèÊνM†úS/ÛQøf@óp?FuçxñÜK UÐ:h$^Î[.ÁqåÑ XP(yg›úÞþå@é;ÛˆãÒß÷y(tt T:ñÞV|~å% H2üp‹ëÅ>Y@ŽÐ½•{AÁçýÿ )æß§òÓ;: jµ:@] Þ¿¸í FAãï;~J®Çk´Ò?\gY”ìŽR‡ÜÊhC0Ê0(q¸Çpo˜&f€{ óÀý†%÷ñ(Ͼ²ƒ†UOZ©£ÜK-œÂ}©ì°a]âæm;ËpÃ}IüÔs¨ÔÁŸ{Êr ·Ü=!{‡^.ÎÝW–W#ÔDܶó$ûxM4ðdM,°¼&¨©Iv÷‰Gy2‰`¹÷`[“ äkí5éîAÑï9RzšÛç)j2€þšlOnéY.Í}¥ìTÍQà™šc çkN/Ô”/Ö¨€—jtÀžƒûŠx”'¿¬¯Æ"èJ[¸CîɲÁ‡{²´Ëtψô¸çËFj¼À+5A÷¼èñ—MŠþЧ¥\®{©´‹Ëw¯–ÍÔœÎK\ª9ë^ý¥Dui/Wä^/[­i®×´7%ûFMðVM—{½\VÓ Œ¨é¿Íèš!¾<¶fÔc,íçŠÝ›å 5ãîMél7v<É5SÀT‘¢Çc-â”î[åjfé5 ÁýWé(§då5Ë‚L´=¾ÒÑš«`sz!¢<»æðhÍð˜dÖÜž0"`‰‘ªŒ  Î#ÙqB„x¬§©tŠ3 Ñ¥³œUˆ-7‰c¢§¹ÜkLbK8—PºÌù Aã>àicšDÑ>k<=¹Ê5 Éå-ÆÌÛl3’K¯qÍBjµ¥îÄL‰G€Žº\ ·.¬+ž®+ž­S ©âQÅê–:u`¥t‹;'(½Éµ éÕmuz`GQ¢hwÕY…tñÓÀšqíî™êÞ:°Ÿkl„¨¤¸N!£z¨Î'± 8*Ù£’=^× œª;œ­k.Ôµ âQëÀn°Üe!»z¹®xµ®x­<¢?°­Œá„£Õ[u"oÖ ±2ŽŽéQݘH}¦dO©ºi ¢nS·Œ«[&Ö­ ÇÄ£‚´>¥n#¥LTª…Bý¾ºëB¡2…Nˆ¬Vîã&„}ZÝ6ð %¢'0òï0›TÊCÜœ Óg:èÛ<âˆt¢?¸Gb¼2“[ ú\ljñ·í|G°È±XìØT:ÕŽÃ@½#+˜¤7:rã˜0«l7ä i'<ÝÊNCž°\‘iœ–8gaŸ[|‹—­”ñm^¾2‚ïðÚ+£ù.¯PË÷B~5Å÷ Ñ• ü×_™ÌzO•.ðãBBe*?å=SÚÅÏzÏ—öò îõÊü²§µ2¿ê½P™Á_ó^ å•Ùü–÷RåQþ¦pZÌ(¼=•ÇÌÈÛWYh¦Ä§`V¼»²Wž0ÇKÌq@ôm°RgNôŽTÌ)Þ+•ó>ïd¥Ãœæ©ôšyç+ƒæLïRåi1§­â¾RÙ"æN•mb–RÙaÎ…ÜUÊ+»ÌùÀ^sdqbl¬Vö›‹Cf¥w½rÔ¬önVŽ›õÞe›ÒžSf£{¤rÖlõÞª\3·Êe³ ®rÕì^sÔÊ-sð¦¹Ù}EÌ瀔¹Õ½®V˜Û1æN÷¦:ÎÜ L4_"Ô)æà>ó°×®N3¹GÔ‡Ìõ2u¦yÚ;(Ž@}„úˆy.ÛõÑê\ó"œ'ß¼"ÈÔEæµúXu±y£>!”aª•æëõÉjµy»>U|/ê¨õ Y:äêõé3ÔF ÊÀë³%•xLb¡t•KÔVK”»Oí²ìqª}–x÷ˆ˜Q׫ÔM–¤['Ñ ¾_õu³4’×;$zÅ^ÕÕç,{냒}ZâYu«e¿{IÝn9ù0dÅõ-êNËáP\ß&±CbWyª1 ƪے¼,RÌZë{%ö«,9¡Lµ~H=lÉsßRY €àÏ„åx(k­•8.qJ|ëëg%.„¨ž¶œ„\2Òúeõœ¥2OÈK믪-!A½bakr΋rKñ¹\“¸¥Þ°õ7Ë·,~x»Å™yA}Ýr VÏ- ÌŸêmËyR¶[.ˆ+‚墪–Kž±*ÚÒãSTEYú|1U{,ƒ¾¸ªxˈ/qgn—fïª$Ë_JÕ^Ë$ÌÆÛ–ß¾ªýâLXuÐ2ïK«:lYòªÊ2a_fUŽeÕw$”TåYÖ…åªq•©:.ÎÛU'Å5ºªÜ²éË­ÒXnøòau†Õ¶ŠµÜ‚Uf-_QEg­ÌWTÅ›}ÅGj#„«UöÚh8¿ ­Ë¾ÚX8¿6Ϊ6x¦6VóîÚpæóµépÅ µÀ‹µÙpÝKµ0VõÔO_m!p°f¿ªq¥¨ºR[âSVMÖª`L —ðÞªš©ÕyŻ󩫿k ¡™Ö§¯ZªµÀyVkžDqEö«Ö ŸµjÓpÊ窺QëõùªnÕ}MYíi_³8n¾sÒyZU“µg}횈Ú_§8‡ûº5ÑR¶9ï²Äw³Ã~ß°Ä1‰§¥>Ì…¨‰­m¦4 µ¬&YÌFÄÌÄ·¨I­í Ù°Þ‰ž1ßð­U¨Û¾5ÍÚÞP^áÛx]º‹mMzmíZò¬i2j‡„kšìÚQÈ( ¯hˆÒ­e¾E‰c§áYL 75Çjg…µ ¡ß·-²aæDírh•oˆ×”Ô^õ ªöüàÑÕny(qô’$_\§Š„»–¨1ÔÞ„µVð†Ã‹ÁJ ëxC–Æa¥Tê‘sj®P¥#Õ̼s9¸ªò˜%ðd3«Î«Ps‰kýª¾Øy ¸èÜ ®3ëΛÁMfÓ…‚#ÕËâžÊ%en¸Á¡:«Ú⊹]ÏJ5&sK¬+¡l+>WÜí«+]‰@©Vbe®¨˜B5Îe¨1O³ÎŽúÔê-×>á(íJ Þbc]‡ Î‚h”± ®ÌP®ÒÁ&»Ž6Õ•+t°\ùÑlº«¨16T²®âÆ6Û¥l”êñÆTö¨K 55TÖ!¦³Ç\z÷ŒXA7fHÌé)’ì£ÒUŽ…ÈºŒB{j®l¶ÄeŽŠõoc!«r¹vìKÄ|©Qµ3’P½6êDz÷ˆ½jØÃê\¾Fƒh7Z$:Xƒ«IP±W3T¯PÃ6zY‡ë\¨bm J<-ñ¬Þåj…óºÚA‘bY¿%²±…=íê Õ•mìYW·àe[\—àO›k Tc6vHì’Ø+fqý‡$޲®a¨¡~lg»\cP'BÙ8Åöº&„6¶ß5 rÍÁ˜ºƒ}Òs™•¸Q±Rï`Ç]kBrm-ì¬ë:ì¹àÚR5]Ö̆ãRí ­GÒÜ•$,hz­GNjú­¹ åÊ&k¾÷–fÈZ$ÖwÖâfT$ØÊV3nU7ð@ýmNY vͬÕÚ hà¨ÙPM§Y¶ºüš«V_Ã)Í5kSÃÍ–µ¹á¼fHœ?Ezæ47­ç| ±:k¸ ñbE±µUXÖ"k{Ã%-eíl¸¤°v{Ö´ ëå†mŒu ¡Oâ 4OŽìÔVÀ†+Ú8ëpÃd¨ÎÒ&ZÇf´)Ö‰†yí>ëtÃ’6Í:×°ª=d]¦YWÖ¥9sSâ m¦u­ápÃ/Ó±^÷Ghs­ÛþˆÐš¢Í·aô‹l´?V[l‹ò'h•¶=õ©Z5¬G)Z½-^H×mIþd­Õ¶×ŸªuÙöû(7l=1ZŸí°G¡m²e ^qžôµŠô§—aX Á¶åøZC™›ZmËógh›mþl¥ÏvÜT{ÎvÒLÛj+o8®™²iìÚvÛà×vÚx¡¶Ûf÷ŸÐ^¶ þí€Í/”h‡­E~ÕÎ6f;å×i'lgüí´í¼ß¢³]ð;´‹¶‹~¯vÅvÉÔ®Ùzü§µ¶>ÿYíuÛ ¿E»mñ·é°í ¶MúU;Œ²Í½º=¶y‡.Þ¶Ô0£K²­ú»t{mëþ^Ý~Û¦¿_wÐvÃ?¤;l»åÕeÙeþqñùú§t9Êmÿ¬.Ïá_ÐØaÎרcýË¡g§;nOð_Õ´'{íºr{ªÿšNc?díéþ-oÏðßÔÙíÙ¾4å„r `‡:Kç·î”ýD€Ò±—Ï[¯º vUýMÝE»Î=£»d7bt=vK N×gwºA»7¨±)º+öÓ}ºIƒ¿>U7c?ÛpF7oo ¤é–ìm°çª½#phç*ëö®@¦nÓÞëÔݰ÷Ž(›´c¨î–}(«¶ò«eöñ@Qu„}*P\mŸ («cuñ¥rξPW'Ø—ú2l¿êI©N¶_ «Sí[kõûÍ€«:½|Õu”OQ]GšBUõÑ:E ¹úX]Làœ˜½ZÅ,%Ð.~‹è ½qÒ7EbFáYû»·ƒ}Wúf Ð]]X¸,®ï± ‹Ñ };$Ξ¹êÖ"8¿ô]MuI]¢§S3^—âéÜùöFü^e­ZeؘÐ6×í L‡ªþj]]Z`®Úï2FÝElo!D¼M\G˜¸Iü Ɉw0(†)ŽwaÚ…£ñ(߉cÑnïFwàd|úNÅ¢;ñóøyt™K~Å…„}Ň9œ(!ì•°WPb”*J…>¥Žz%E‹jGùQߊz})ê7»ÃwwÔîƒèû»Ówg¢YèM!’!B( íFáèT„v¡ã¨=‰Tè+è$ú_è4ò¡fôò£_£7Ð8ú~C(ˆHô±›¸“ ˆx"• ‰¢ˆ¸‹(&ªˆBKø‰}D8Käç‰ç‰§ˆ—ˆW‰/‘ß%¿KXd¼ÌLÔÊ™—°É‚²¯Ù3²gAö5Ùs„Gö‚웄OÖ-ë!e}²§d?‘ý„h–½,û9ñŒôkƒ³²iÙkÄ×d‹²%â9ÙªìOD«ìMÙ›D›ìmÙ_‰oÈþ[öq1ì®°»ˆo‡ýž¢‰Nj7u€˜¡¢"¶¨OP‡‰·©Ç¨âoÔQ*x‡z‚ÊÇ2ª€ú"¦¨§)5Ž¢ª)'PÊ“(7Ä£ž¥ÎãOR-T~„z‘êÁyâop!ÕOýš£æp 5O-c#µJ­â:jZÃê-j ;©ëÔMì¡þ›º…ýr$G8(ÇòpÜ(ß%ÃÏÈï‘'áäÉòø›ò‡äÙ¸G~L^‹‡å.ùóx]Þ&o#òvù·ÉHyŸü‡ä‡ä?’ÿ„¼K>"ÿ™ Y>A&Ê'å¿#÷Ê—ä Óåÿ)‹<,ߢ1ù8­§oEá‡W‘oì~l÷c²hD = (ž;:‚AQ xPÚË.渎挱+9Ýì»Á^ÿì2»Í᜵Âlî w˜Ëzü0—ÃåqÜqî$WþDçÃýøõø•ÇW¹=\<—Äíåö?1üøÄ– "}CŠô·A¼C¼ƒ0Äu´ôËœ{¤_¹ üüDàïâïÂg=øûˆÄ?Æ?FaÒ¯\(ü*~ÑøWøWð^¼†gPžÃsH_ǯÃÛñ~EáüŸð޼‰ß„wä:þ+Š! ’@{HøÝI†‘Š%¤Å‘±d,ú0GÆ¡xòn2ÝM¦’©èé—0‰d&™‰’È,2 ÝKf“¡dñ £ÅD÷CÿDŒ4r"›l6{”…Œ=Á–°*VÇX ™ëeƒìiö,¨…mc;à/ÛÅö²ýì;ÊŽ³Sì,»À.³WÙkì{“CìG±×8;Î)¸.ŽKäR¸}\wˆËäŽp¹hc\>WÄsÊÛMÍé9#g}_sq>®‰kï¹÷µ n¨çZ¹v®¶ï¶nî27Û07GåÂ5¹nÛ€£®Ã·¹sÌé ´! îŸï…gøyˆ!ˆ"˜5Ä1‰ƒF¢h2´=€ÂÐ~hrôqh4Ê€Ž2¡E ,h»PzFósТСíFO£bJ ÅÀì£BBh{ ñèNdCvtrCû0ª‡³Ò3ènô5h÷ ¯CKDßBè#è;ÐîEÝВѡ݇~-ýÚýèghú7-fÀYô šC¿EûÐï¡íG€ö1ôGhÐ&ú ôýú/ôºí&ä(ˆ€0ƒˆ„ðS0F£L˜ãQ‘HÜ‹%î#îCŸ†1åÀœX€‡9±%¾L(Ñgˆr¢}ŽPjtLúMÙ„žÐ£|‚#8ô$a&,¨€p^T3¨€9´=M|…8…¾D4ÍèËÒ/ÎJ`>íG¥Ä1€*ˆaâ§HEŒ?GjâÄ/†x…˜@Z)~«a`‘ž†‡8š§yd ki+ªI„L´@ ˆ§}´™Åß! }†~ÕÒô·‘~‘~ÕÁ³]E×¥Ø?O1‰ Ð>PèÐŽ2wt”‹¾È¤0û˜4æ“Éar™|¦ˆ)f”@5£gŒì&ce\Œibš™sL+ÓÎt2ÝÌef€fƘ fš™c™fÙ`®3Û,fi6 Ú6žMb÷²ûÙƒìa6‹ÍaóØö8{’-g5ì –eyÖÎ ¬Ÿ=ÅžaϳØ‹ì%öÛÃö±ƒì´+ì$;ÃγKì*»Î®s2.‚‹†xÆaú0,…ߌº‹!>ÿÅ÷ÐvKQ-EùR”HŠò=R”ß)Ey¬åqR”ÇKQ~·å R”'JQþ)Ê“¤(O–¢ü>)ÊS¤(¿_Šò½R”? EùƒhÚ>)Ö?*Åú~)ÖH±þq)ÖÓ¤XHŠõOH±þë’âû“R|?LÜC$BÜ‹‘)Eö#RdgI¿|TŠæl)š“¢ùˆÍŸ†hvÂ;à&Üð4B4FŠæ\)šóˆg‰gá}cúÄôKð>ˆÑœ/Es1q\HL“è ô×鯣"ºnCOÑߣ¿Y -D7ÁsRÀØïB„i!}'¨t4°ã&@Ó¢Ov‡þ’©‹Íýç’öÉ7çé{L½ú>S?[ôA‰>ý iˆ-)Í¢ô#¦QVýÏ%b×Oš¦Xý{ÿÖϘfY#Èj>®Ÿ7-°®.iŸù¤~É´Ì6™–õ«¦«’ÖMרfÐ9~E²[Íål»Y£ß4méo˜n²ïIú»ÛÌêoñˆ½ü/4`æÙa³‘ñ”¤^ÁDó1ìXH¢-Þ;ñžÄ¿™X>ŽæãÄ­¤>‘û×÷c’ù&•ßÇ.~PÌ>íÝó¾_L:ˆ]yOLŸùïÈ8c‹f²ù#ÌQ>÷Ô1>_”qÞ+Š)ä‹þ-à‹™^ùRñjQÆ%‹ŒÑñúGÆU[cà’,¼U’ƒw‰2®Û’ÅmÍŠ5‰™åç/ïc‚|Óß˸iKeNóÍÿJƶÒ9Îòç$µð­Lßþuðÿ .¾ûêå/ÿÛêç˜!~ø4Ê1ãüÄ?hŠŸþ€Äûþ7Ä®™ÿ{_Õy­}fæœ2Jˆ¤„bð'†Xj Uk"™µÆ*A9sæ˜`f°^k¬±ÔZ«^c­1ÆËµ”Pb 5­cü+õZM Kýüˆ5Ôb %ÆÏàÝû9gpD²b×ý¾µ¾µÚ¼k?g³Ï>û¼?{ïw¿YRÜZ~¶¸­ü|ŸD÷J.W,/éªX ½öò‹wDå—‹;Ë»n#¶w½ül©±bmñµòëwB¥‘J„ c™+"C„û¢èŠÍàc+¶–&TÔ• ¬° ¿½¨4¹b;úUýUT:²¢±4µbwøó%C*bo¡øŠ„ÛˆŸW±¿$©"¹tBÅ\3*ŽõÕŸ/£’”Š‘%c*Ro£´Šq%én£ÉáTš]q2”ÛoÉÅz® å¸R[Å™P*Qq.<ôøIøºêkÒ3Gs*.ôÌmaÅ¥ð>!—tSN¡Ø/µPÖ_aŠ«²Áå«yß`/‹!Š«òç²DºÒ{ø~©Zq¥´¤âjiyEwéB¿ÈûKé–óØJ—û—®ôÇp~-]ëãñÞè‰ñ¯â¾yâüëzÖ™õiíxí±/ÓžÇcó$ú7²Ì3œöðíñ~Íó{ í×öeìY¼Ó{B{1_Aä?[¯=–¯LžÑeL¼Ç†öÕyÆ–›™B{$öL}o ß+oÙ#õ}2Džñ´Òcï£ýÐ3©| ü–÷¹±õä,"O¦ ®9þO¾¿1FùÃ3Ëßà™ëoò,ðïõ8ý §æýqKqÄñäñø›=~ÿqÎEžEþÄ…¡¼È¾Åv8Ïy–R~ ůå-~>”o‹­^qÊ/=±Å6(ozªü­XóUþ¶ÐóЧxó¬ó·{6ú;¸ßž-þNOÿçpä$C}@ð4Ìxî«rÞ/O“žÇCyéz˜ŽÞgŒµW>îåá}i®û’|êÙ«_T$ó˜Bt[ž Ï•œC92,bíÙëpn¢9ð4Wì/^9¾ltå$&®mx½¹¦)[™ å,oV`YÙøÊœPýR6©2ßs-†¢3âÆìõ¶yƒ°Mùû8° ãÔõ½Ëû¼+‡¼«G½ëïr.òn œöVÎzkç½ÛyÿcBž¤šÀ»#pÙ»+ÐÅùØ»/pý”÷Bï¡ Ñ{4é}7hÁ|F{Ïcùœà½Læyò^Žd}oW0Õ{=8Îg Nàó(7û"ƒ>K0›‰íaŸáóPtÐÆóî‹ Îð%ç°Ÿù’ƒ…Èa´Ž¾‘A÷Rƒ%°1.XιÜ7!¸Ð—\âË.÷Ù‚+}3‚k}s‚|…ÁÍ>5¸•ç×W¬C£ñûʃÛq]ldð- îö-î÷­ ñ­  ù×à\ø6Oú6Ïø¶ÏA®ç\_]ð‚o{ðÛç8ñ5¯øv¯úö»{|5tíQÄûŽTЬã;VÙŸe‚Q0XŽZZá_¿Gù§û=Ê%áÊÍߨÁm_a_m_oßd¯¶×Ú·ÙwØwÙ÷Ùµ¿kWô¶tÚ~ÖîÖÛyûEûe{—ýºjT#U‹=s¬«&¨ÉêH5U§NP3ìË싵¦F2©Ùªdh3Ω3Ô93‡«…ö ªª%jùÌzu¡ºD]®®TתÔÍêVUµû´FuêvµQÝmj4ö«GÔcêIô{Äš|ßHoà¯ýw]&Ÿúåkh.Eˆ•ÚÝø…¯¡_Ã×Ð{ð54FP§p¯à¦‹o¢÷á›è0|ý:¾‰&à›èýø&ú¾‰&á›èƒø&ú¾‰Ç7чñM4ßDGà›èHм£ÂháµGñM4ßDÃ7Ñoà›hšð¡ðWá›ÂGÔÆãËèø2ú-|ˆ/£“ðeôÛø2ú¤!Þ/dàËèSø2š‰/£Sðe4 _F§âËh6¾ŒN×Ñÿ~ Ȇç Ï yø2š/£ßÁ—ѧñMtÅû›ÂLÃNÃNa6¾Œ>ƒ/£ß×Ñyâ ñ'BÅû¡Plw (º ŠØ.þUP)Š»h. BPX|ÓW•±Bª2V¯LR2•jùÊ,e®²@q*ů,B; 4+Ç•¥•Z›Ò®t(Ê5»`7ÛrS–*UÊ*e²m °F©'lPš”½ÜØoŒ#ÈoFé~…÷³Çi"ïa_iþSÉ{ØWÌð•ò”§È‡øËy?òŽÙäCìàñµü.—‹ÿæµÁä kÈŸØ¢È jÈŸØ¢…ש݈ÜKë€ü–¿Š¥5Ÿ<ŒWý>¬z¾„£•¿(Äc ƒiïÇê&b]ÀŠ&æ „±¢ÑŠz„á?­h ¾u0¬¤U‰U…U/ÛÞ44 cCdZdúÍõ(ªï.ªêÝ”ÓÊÙ¢UEëBM9_´Qo[z7åbQMQ½Ö”ËE E JIz5åºÝXÔDm/µÜì‘v ]›‹Ž‡š=º¨åöf……–¢V½µiÍžPÔ^Ôn$츽ٓ‹:‹®…š"°®Ö³Þönî!îx%Jjî$%^oI½›;EI ½Ë=Fá&()½›;Í•¨¤Qã÷¥ss§+>ºNV²BM]p»u²?’zfVÖš;K™®LwË„³ooîé4¾‚P£§nþçÖ›¹w³´§RŸ‚¡f§Ë'Üœ‰P³g(‹•e=´è+nmöl"›²m½²Þ>C—ϱÒuShDÔZíªR}{³—(µÔ¶);¸ÙË•]Z³/´/±/WöѪ¯TöÝ>êóZš£C=í¨ònOKך}û·}3|·Æ¾Õ^ÛŸi„Gí&;û1Þö#Äqöþf‰<ÅÞˆUJqÏv`µ xöÕžh{¶ýÅÎ*ûIŠœö3ösö öKŠÏ~…æ*Ë~•|y¯½›ü½EÕþÙ1äËê`5F£k"Íh›â£Ÿ‡«£•u¬:^D=fÿïP31k{Õ5§¨5ŠêÕ|uÙâ¨Åˆ ©Å ûf[Qƒ:W©VU©N’·“Þ:ŠºvÕCÜ*Õ¯.*Ú¨.U«ÔUê:u£º±Ü 5µF­çxUìöFµIÝKÑÚ¬E¬z@mÆÛèMêqêM ǤÚJ–ÛÔvµCíT¯9„¢N‡Y‹?Ž@Åìèˆ"_óÁßÌtw­ózG¼#IÙæHqŒ¡5§ìs¤)éj¢#Ý1Ù‘E³¾‚VÀìÉKÙçÖ;¦S›­¬v¤kH k½jø ÉDŠRí wøHþ®#èXìXæXáX­ë›”ÕjŒ£Zñ9jÛHg‡c—cŸãã¨c=|ÜìxvN;Î:Î’7:Î;.:.;ºוMÜŠêFÇ6g$|u‡ã¢Ó¢ìrF³Ÿîsƪ­Îg²s¤3U‘ã”CÎ ä½KØÎl§<øýd¶/w+J”Ûí$QâÝ>ʶéî Rí^\ÔA¬P0»š(S$¹—å¸Wùi´»ëÝ«Ýë9®Égh¶Ü›ÜÕîZ÷6÷÷.òPÊ” âÙ³{Ÿ{irWu¸&Ù-Îwð`h"ËÀƒ•1î£EjeÃwéŽBzC(n¦»Oų Ä«~÷Y÷yGµû¢û2gAEËcx®0g»Ü]j‹ûz±‘òÜd-×G[ømü¦âhE.ŽålF8½8¶8¡8¹x¤SœZÔ^(ª ù(ž(©J!Ó¥õ¢ô;£\]'kñÑ'ѽÜDst=ùi:Ñì>h²nS¥kÁQn ]•0r‡QHg¡~]B´œxßÍw…SîJ~5å®%ÚÐËÆâ^´¬âg7Óu]·ê׺¾ûó¥´šh}´‰¨ºª½•r·ÞÌßáù6”/Cy¬ñf~ÉÝ}kþèñ“ðu ­KhŽö‡Íí‘[ûÔ“SÂs@(†CñÅ{†îóyÔ‡[|º@»Ÿ{Œè$Ñ-Gðþ’{A“ó˜r/])D~-\©åÉÜî­²Xˆ=@î_¨å÷š¿Ë<'z~–iO“ã´ñʉÚ<Èõ|É6™d¶K¾ S^”iîdêƒÌvóõù Í'÷Ÿ÷ÉЖ6ÏlÇ©Ùà{2í²_ïWïuêµF=ûIhx¬Ü—EZßä¥aÏ/Ð׿qåëc«Òe1a”ØõÞ—Ç÷A“ oî¯a{lÍ £Þ{lh¿üŸì“U…·î…ë oîaû]OÎ"’ëõ+í[r“.§ü!Óž$Ó$Óþ#×åü n·kñ$Ó>#·j¹HnÓã"z^„o5ëyÎ#W´¼ÅÏ÷äÀÞ±Õ+®zòK(¶®èýïÐ×¼3ìù o2íMVAë·•ö$+ïAYzN¢1Xi²ÑŸûªüÓ;÷¥êsù¸‡|aôeïúª|º¢õΓá¹rSáÍž'ëÏ®×ï¥k9:ü'oF\Ûðz£®Ù¨ËÈW¬Ûˆç<¦×/yTY ôHŸ×Þu]µ‡Qïº.T£ýOj³øÂ[믔›uWXÅ}ųI7çä¶Ø¢ø³¦ÝWÖôžËJrk––‹BzVYókëtÝŸByl¯WV=¾¬”W¬zÜY)ƬAÂãÍÊqÅòeº®.¼½Ž!²®×i“Fˆ=¶_­_koÆ Ç„•ö:ë®°ø#=ë>-Þ¬´G[½«í=!âñò‹ç‰Çl=MtV·Mã°ž×Ç©ë[éLg½LÔEt½¹Èf$¢3œÍB­íLÈ“TØb‰´|lKÖý”öBÛH¢T¢qÚ|Ù&ehç›M›'Û MßF{‡­HÕj@Îÿ¡Ül£=ÀV®Sª¶Ï°oÛjón£Ô¶\ó3ÛJmymkõ{t›µ\n£ÑFõ¡rê1Õa6ª«lTOÙŽiók;©ç1ÿýzNóÕB6ªl´GØ®†ù½“ëÕByT åõ×åzÎÍ£z /F_?Š“<š£<ªò†‡ùjèÚ£ˆÏ­éäÕdø—‘–ÿú—ÿ|_ÌÄñÿvÕØ,¼& DÉD#‰R‰ÆM»feÙˆfÍ!*$R‰JˆÊ‰-!ZN´’h-Ñ¢ÍD[‰êtÚNÔH´›h?Ñ¢cD'‰Îè}8§¿ó—\/]щõ¯u B¤HÔŸh°Ö·ÈýG”H4œh´f§ç:V»Ï}O4Isd&QQ>Ñ,¢¹D ´÷E:‰-Ÿ•ÏËåËr—|Ýj´FZ-Öhk¬5ÁšliMµŽ³N°fX³­6ë ëk¡Uµ–XË­ ­K¬Ë­+­k­¬›­[­u¸¿ÝÚhÝmÝo=b=f=i=c=g½`½d½b½jí¶‰Dýmƒm1¶8["óøy¸m´m¬m¼mµLj9ÔøÊ?3ŸOžEm®mÍIÍCÍo[d[j«²­²­³m´m±ÕØêm ¶&Û^Û[³í¸­ÅÖjk£ahŸ‰AÐÿC$þCü%†øK ü%†ÁøK QøK ÑøK 1øK ÷âo0 µ(–€pŸ¥Ò²BeyŲM˜hi°¼) ¼öì£àmxöÂÑ,ÿâªX;ülØO#œ#=ÃÿJZùdÂL©‚pt^æ÷~ÑÀüBÖCþøÇ€cñÞÇtd;S$/Þ><¿ý†8‚ø èL>¥ntJÑÃ'ÑÿÇÑžb¾Ÿ© ½Šã±ÓFLó&ñSÃ0êÙR1á·tkƒÀöY>’,i"ø'Ákšix/ESw$ø ðýÅñó¸ÈŸÒå̧ƒÏ€f&æçoâÄ’\èÿx<ÅüÓèŒæ™ÁzåIn<»sÅü@Ó_Ñ«¡„ÑÑ=Ƭ ŸŒkyÔÀ»S€As€8˜OøM»1ORø·ÙRáó<£üDàižyãbÖ1/@?•Ѥ@çi>a ¬ÝÍÃ)æ Ÿâîè?ýŸ†Oç Mü=ÉâAÂ|ñ$ÛgÞð $ŠxŠ0u„.FC6ðsàF“ šSaçiÖ7| µà_ÅÝ)пýð€ûo@ÿ#‘|Ϙ#½CŽÇkøH:Jü0àx èÎ^"›÷bõ¯B3ŠÑpQÇçàQûÙÓ é†…(¶@üAðÏ!vŽ5É.Òùzu¿tÈú1ï΃äñ¿„wƒß¾Æöì&/#²øÿLl0ÌÄÞà°”Qº†ˆ¸ÊOIéˆñÈÀdDA'[0Ý‹øŠÆ^6&b¼Ž}`ÖK€æGˆ¸'8ÉÛw!“hxQÌw3p·Yè×z´²|4äû±‹å°}Z—· Ù£Æ`Çl@îÆˆL<"ÓTèü’ã"U†ÉÌÀ<\4FØ…§ £f@rYë!ó{¼órÏ µŒúr ¿k+p p¿ù!ÂwÌ?%œh¶ò.ŒÌÓŠ»»uô ‡ÌO7ÀÝKÈ*œ‹¬X#Õ|‚{…Þ¾ÄÕ‚á¿P3Äb]¾€üu¬Ú0FAÛßÛ¸5ÚD¶L´¶sugÊ(tàe¯cÜÌyÀô(rÈÃŒ¦‘$ÆßÁò‹Ðü,ÿ/ðS`ù(¼â(Û4dso…íèóEàL©?I>G’ËO`¥R`ç˜V™p5Kó«)+P×]è?û긻}>w€µX£øGž ³!~Æhòc•cØšé=æÅ'Àgb¤èÿgÈ`Ÿ!®cÑÛ`s7÷Ð4£î§÷–{’~¤H'ÃaŒúM‘êmá2úvÏî€ÎxÑÍOMçzØ8Ýô1á:ñ)²<+¸C\À¾m|‘ø“°ö¡ŽlíeØù†>K"ñ0’¿ ¸^¥0E`~…§|ÀÕð„v‘go$¯`ŇÃÚ3è¡ ¾3ðf{2Fêij[ÓûmËRiø~켓 X/a3l ÑÛé°i–Ös>Ñ=“Ç[Áï^„Î5s£ô)ð=àÈÙdá¸V¥³&탌ã¥SÈùÌgju;윆ðsvþ}ú KŒHÒ!‘µ:ŸyÚé>¾Üy"xÖ¿K; à-{4Dµ9v¦ò³Æ§Á?­ñl‡pä‰ÀaÄÁ¯b&Ùæ°Ö ¬¾ ¬y¿ž›S`s lNÍ)°9³4…-›RXÓ”‚Ø ûÁ¿þ ÍêfôŸñ7Úx™§¾m†ÍxêSX`É8ôó39:öˆÜ‡|éD1¯Îs"ï¡ûôó¿å Ø‚XÆyŠ5íìs§¡¡87ekCa¿ جdz³€™x¶ òGEò[s"Ë\Ç(:YG<&í¤ €w™}ï€s0WÌÀçзð¬šë'à'Wë'»SXCðÉSXµS˜ø'GÍ@2¯”t/á&œ"ÐŒ‡æ ðËðötÍß°¯°ÄdÂJ™ Ÿ ý€Ÿk‡pÞ©5_À[Xrƒ×…Ö—ù :b­Á7ižÃò„l¬`6VœNî‚bú#ÁÇHýæŸÐYñøÅÒ:Òu]3ωø8ïDbó¦×ÿy-WâËȖЧúŸë·¯ãÙi¨ß\Ð|›OèâaÎÞ&œ¸MOK”ÅÁ¸û<õKƈû …ëÀzèÀOóZ˜Þà¹5?ø£˜Àk$&Â7ª ÿ<ê}Fi+tƒWIJ¦éÇXÙÁ;q÷aÜoÉ€ít_Ì»&¢zy{b&Ϙéì,UÈ–°›âªÆ´õó*ìMÕŒ¦E<ê¨vöOß¾;çÇ€ìYïcçmb”Þ¿¨Õö]Ø›~„ªxêÃ÷u¾X¬rMû>Ÿ:¥‹˜ÿ©Ð|Üü]Bí4º¸SÇ:`-¼MTÝâ,!d‰%Ò\xÅT­à4à 8ËxPyúPåf¢Þ®á*TL†ýo„¾©Š3ª !¥öÔ±X¬’5éa>­›ß‚ç–bè©°¶8x 6£1•àulÖ«p—GWÉ3&îa>b˜ùÀYlO‰:ò,€ýzž ÓDTƒ‹t| èΣ¸¢3÷Çêš™œ!¥¥ÃÄ"½Mø È[tôça¯ÃÝC‚äÇ\ ›^ã85ü*ðxà·€Ôœ 8»=Žšv$jæUð«üvׇÆLXþ øJ®u;з?Cþg¶#NCÿϲD¼OÇ—€à< GÙCÜ+ñë|N7ÿJó|Ž ãyXÜ‚ja ¢)'t/¢`ãK@pð th>Åûù-ÒÛü˜upö'd^ûŽÑ…Y:#Õ!"âù®†8_à·ØÎi÷Dlÿ x~"B‘ôVAC>wÿÏÝ4ìÇÄ%è{¬~'z¾wµ\:8@Š&x½¤¡æ<â«Y.ÝOþ3°RϨœv#£®Î è¿‚¸ûq4yuòðFð¿åƒ›ïBÔw º÷2ŠøÚIyæô„ñî@u4Àüòህ—1øîb`•ž=ø©SÈoñyœt6B¾ýG¾2ÿ€øFôù)ñ>Âÿ`0ÿÛ1Ò?auüЙ©k²$g¢ßñÅ»ùmÂiݤéNãLw9ùû˜‡8¬û(íô o"Q.2Gâ©ÏP'¼ÆçtÉ)ÒùB\…[‚gKðìJðµü.ã7ñÆB¬ËË8þ'ß“ˆ£û)ŸÙÅèá3ÐÄ ×„þHËÀ/â3»©¼¦S iÀïq½Du#ÇãNñ^ÞзááÚ)ûÛð)õ#¦Ý4¢ÙlÇ\\È(n_EÎäXx’y)(Ñ+žÉéеö I|×TÆû—d€Á˜ùèá/ùÅ›?…Oñ¦_c,ƒ¸'bGœ)%Éfô‰é˜ÈÄ‹üû5ó¢&|–Oñ4:îÏ}|–7­€Í2yïÎäó»´ø]>G˜þÝƒÈÆ©¼ OðùÝtø½¸Û‰þü=l€üoøíOÏŒy8Þ>8ãuÓôÚ’÷Ó¡xê(Ÿåä³¼éG˜Ÿ¡ø>y=|˜Õù1Öq¯ù-¡ñUHâÐÏ8ŬNÔxœPÖ ÊÖळ†OUt—N"ÒC¨¨÷Aó‡À7¤ç‘ ™·§i Ó`a,LfÎz#X"Ž€ä$Å ©ÀI9 ¸çåïà¼üœÂÇùî|V"O }£ Í÷ñÆTž£`m?+f€NCHžck„{ OÞN3#Àèœ" M›`óqØ×F7ø}>{Rÿ1 Ø›#0ÒŒ´ƒçJœÉ–ÍÒ»À²ÁÂv 1?…à³0Í9˜+F+ÎïgøüN£Èáobâ ¼7ô'XøÖrxŸâ^QÎa|Q|p®¸”äAäRœ—é|Íw Œƒd‚¸ŒxÈ} 2­8 kñ1ðoŒ¦fFé£8 ø?+Æ[îÍ©ÀñÀ­°V¥Í,|Ž®s®‹8Ì3)c>¯âÜçÂoŠ™0c¿{–ïJa†›¡™¾ˆùˆÃl-RæšDêÆyðqŒKóqXå ¬Ë&ðѰ_ó÷SÏ¿‹UØ߸Ÿ÷/ÓéUðƒÁ/†ÎYà(<•ŒÆjÆð³R5¯¸´òÇ ù+¬ò™7~ Éãæ4 ŸÜÐÊ«I~òËIó*z{Êÿ2¡ôÆ+‚A~ãwü/n¼Ê¿Ç¿ L¿ñ+Âù7†¼ŠÿEä…ºæ+ÀjXXˆ§B2¸†ð?t ÛðÆm_äGq£øg<ËXrã4¡•导üuðy 8x¸˜Ñ`d:!I Œ&ü ÀàÝ:Ï¿‰8…g?…d ð)<õ3ðѸ{x ¼Å˜É'à5ûéx{ð}Üý¸ÖLЙ |òtžûP É«LO¥€¿Ü|ø4sÀ_oß ÒÍ¿¡hëNáZý¾°†%&mf‱,1`Ô†™À?@Þ ~7ð8t´ÙËëþ6Y þ;Ì'ÝÀ-xËqð#õùùÀ€5Ý\µîƒå¿Bç߀oãî‹°¿A#ø{Á¯†N7tîÇ[v‚Cßvàî h¶CþC}tйIvjóÍlýYš%á*æê§vË#íïÆ»…óà«€FÃ{À¿?‡Î;à»×¡Ù€·'€?D5ÿ\ þ/ÀØÿfïÜãmªºÿ?Ökí¹ÏÞÛ\Ç ¹œä^É=Q’•„J’”kè¸_“T’$T*TRIÒM%©Ü’[r ¹åÃÙç;Çg­ç÷å|{½žžßóüùäÕ{5æ˜cÍ9æ˜cí½ö>ç$ZÞ ¹0Ö}T±¢Ws _™”wë!×…9£´0‚<Œ º_ÁC®D&ÒCdo%2a4æ¸3ïuù´öÏ™o0†?`³ñi!;×ØÂñ°/k_ù8ç0ÓkÀf`&Ø(©À ™ÐFRØ­Ã๩hlžˆ¾"ôÕ½-àp·´re´v_¡WùðZbùø x2”ÅæÁ¤<Áî¹°è¹ZW§à¡fT4XDëål V‘y#Ø;Áf.¢º>¨E[w"Tƒ4ÈQDò[Ø›l O½ o‚~ ¼ €fªƒÊð'òù,¢ý"Z‘6ÛÅgAô=„øïÀø#˜ËJÈÅ!øÛ<”øï„ú øÉÀ^Ã%{?¿AÄÿ9ð°=8<”ŸòIÁDØÏ…¾ˆ5¢ãØS·©àê¼Â–¹˜c šO —Ä®ÌBV4‡~ f}­Å0÷Cy3­¦ZûA? Þâj«ÃCq‰³ª}°ï¾„ÏÎðÐ>çASrP]ƒX…ñìGœQÙ+U~‚j¼&¨]y5$†Wu–c`yyX‡å*?B=îŽÀ]ù¼ÆvœÁ½l:jÝF‰’[ò-Ð…Ÿ? £«UQ• *l–ƒ_bü%kYân嬀ÍÜ n€¨3j¢T6À :!ÛîM6ªöý£Â8ï}Á "U_@ß_ÖÛ@Ó ìŽ|~­ß±#F†²D#¸—µE/T-Õ!¸Çae#X‹¢à‹`¸Dþ8¸¿8Ÿ)ò0Ö…k$2bëƒ\l†¸-\ ˆ0ä[Á{’gdœèÕ>gòäíÈÿ‘ÿk°/®+A?rØ??¸R‚{´³1/›…Èȶâs1ȳ¡o 9¨áÈÈ,äU*ˆ{Ÿ‡WJ‘RðT³Ë1ÎÏó¦È§`ð—|s´t–¡ua1Tþ–¨B‚í‚\BåÙŠ¹(0v k¸T†ÏPoÓ ¹ÞΠò,Aë6Dã paX1Äq³1 ã ä Ü£Åføøj(­™ˆ°ÈEà5úž…ÍkàçÐ4Ç3ÒÓxºXr³Èg6Ú‰ðS'ù&Ï0|*OÈ+yY’]B5 ŸV/ÅûhZ#²úr¶»ï»ñù¼×È;£ª’<ëŽÉÝÍí&÷z÷myE9Ý=!ãº÷]«ÉÆw'r„ÎÓèÕEè­Çó™â`ª;Tö2<Ôªiî÷xwvŸ„J¯Þ`K0Þ’nqkù)?f¹ŒwKÍ„ä` hv£×Q¡×ò°Ø:ÔØQ©ª"sºŒ–^FßîB"tf`$¬¡wJ~§d¥”hœEh•o¶×plœ“çð­žæjŒT y^¤²Ô 2#õŒŒ_½#û]dõ´zZ2SÉÝ6CìÀqB~6 ¾?¦Æ[Näg-?<žßƒ‘ Âò+\±#ú¾ ¹¨•|–‹«ç¨Â²»r@Å8S%Û¾Ÿ "Vs£òew« ò~Gìf` !2ÃCx»G“Z¡ÖÂg ÿ&÷‘Ù°l Iô- yøcßQ:s1†ƒŽ|ªXÅ‘§²¶^ZÍyG>ÏuNÉÝAv–s òmnš¼rpvÊx„Î*ݲ°š'÷5g¯õP,VZo–ôäñ`!g,wȾ†¼Ý"wø\«ì; g’³ÍêßEœ#2U~öƒ§±ß'ÙuïíÚÖäìHä] ˆŒÏå§G®þ#Ñ{ò¤ñ­È Ë6`#ð°€ ½ôç…ÊŸ‡¦"lF6ò2Ø­e w€Ü–û Þ#Ô¥ W@ë×à)hpþrgÈ#ÀæÐŒ ŒVÕGë÷wb<ؼÎBëRÈŸ@>Þ Þ=fĹèx[> v7²&dÌ‹ÏáŠ} /Áx6¡yÞ:¡WX®„þ2Ès OELæA¾VB¯·´½ûD. VGd÷0˜¬‘È^šókÍ„`¥DæÀ`oxk¬zé`Õ #&‘cÁªÁþCpZËu)h¾ÆØ®†åX°{\ý&ŒpqѨƒˆ!Îîtð:\ÑvN ‘TYð€¬ó&Ë`ÿ&¸¼Ä¬Ý Ó¦bœÃ`_sÏ` ÈU¹—û=°ùò ° r¬!h„Ѥo´ÆÉ°i _‚iÐ_ŠYWDdVÂþ%´b¸Ы,®…Øò¤`ß!†›Ñ±uÇ€àç3ØT…ÄS݈¾s¡Ç.ó‚\íŠk;±T{ð³2,Õ³èu6Á C=îd2®{b5G蜀æu\+ÈÃZ`=°ú®ƒ\ªƒûÁ?¡×êù.øÁ¼<\Ý« Ëqð32"¯PÜà@ðØWü 2dZ±.\ Wì"ò÷$®8ú ¦aºÁîÆÎõ|h ¨ Œ¬`xSA¥BUQÇa¾nð}p&ôAm„Ìk¡Yy®Ž¼bì•^È:/ØMÁŒÂ&û)Ðë¾ú–`qcfÔÌÈhø F…¬p·ØS.rÃÁÈ#ÃÑë1Øç@ÆNt‡‚[ Çš2âïµ…5ÊEÕr‘ UÝí·ý)äÌäOP¯f¨Eö? MP9¢o°¦XwÆJEK|?ˆ½ÆãAd¯^#Œ"+<Ü¿¨*y-4Ë!ïÀÕ‘ Œ WÙè…<ñ‚œf´61ØO&XÙEз‹ƒ3£ÚDFÃg0*¬»» Ä.p±úFŽ^Á>2öŽ;Ü=Ö”¯-ôØÝ.2A¡º]Àù°AV»A%9 9X)¬&#þdß"çy<ˆÜÓkÿXkõÜC®FCEÐêžQøZ! RG¬œí®!ù©ÌžŒ³š„¼çúòÌGáy­hæy$ß‹H“ÜÃS%õ;ôã𽻞¸¢q^ƒ¾­Ð[/t«À¾<ôFëa¤/ä.`Ø…‡S¸zëðÉFY˳òäDõæ¬[Eüà)Ê.RúçDf•üÄ2]ìÝ%Áuá3ñ™&z{]ñvÆi^ŽÕ\‡Ñžf-ö^K\w,ò­ ì÷@ÓSâ@Ç1ò„è&“ç­~µP [ oÁàAØÌòMOkdNM0W_®¾ÕP›¤ìÊUˆð›`ĘoÿÁÊ#~§0 ?»Ï¾úµsŒEßY"{·ë+cöÚ`FsÃU˜ý¼öûDž!ÙÎ%«sñÉÆNì @sx/ôçÕšY4Ãp•i°i΃M]°Y¸ß«ÛÑNfæžìšÕA­€~+Ø ž»yDñù»o6r©-Vá]xnØ£o]x Í|Dc:r@bžD„£ðÿ2¼Æ:¶K;ò²Ž2fûºZ<´„ý§°|(°ë¡\ñåädaX3 uó¥—quñ³&ÈìÄ/ðÜø(u’WÑB>×ÂÊ­0냰éÛ.ÕÀ }Œÿ¶0¯$zŸ*ù¦Y'hF ?¯†¾¸5¨¥¨6ƒ1ký@0 ÎÄLGc޽ƒØ¢RÍBÌë@ÓµnX0¶ÐƒÔωR?í%Ë"’ÕaÓ×Í wë{øL?ØwçQ™‹a´ÁÝ-¸¿H ›K-rçcyÃÐê#s,#¸gé™AÍAü›¢æ\æ„»À^Kcßqëp­¥Î4âVѯÃN/yhX9¥õuè3‘·éo‡¾+lVAî }EÜ­Òÿó œ-¿M(o7ªeKÛº+{upçJÊïH™›Ww´N²úR ìk•–¨¥Ëd9ñ@„ßH®ülQøtQH1èc¢'Mòùfxr‘|{?ÙòXÈ7Cîê§Êó|ùþ¿ÕÌBëƒòÝ6ù9+/…|òa‘ågŽ’½ä;óÉ Ð×”o0Zà7ù¬&ùIY–“åsLj.?õŸ¼E~ö$9R~z%™ɴܦm¯Ü£/ÙŽóËŸõqUd\Eƒ¼MüëÏA›^òÓ%Éû#ò;š^ÑíÁNò{0¶FÁ˜#òÛœ†h»šÉ'"ðŒÖ'#1òð– Káº|ÇOËï#•O=êy£™¹ˆÀ¯˜…/ؼm#ß!Œ¬´|9­ÝÑÉGu]\KôFràÿ~øƒße$úQÐ7‘ïç'GéwÐ÷ ›¾ãyä‘‘–_ë³–Í¡ ú["å-ëV+al÷av›Å>ª%ùŽâ¬hë(}ßD߯‘gq­¯,¯‚Ÿnðsä— 7–ß`}‚‘ga¥GÒ¡±›|>rZâR4ŸCn ¹ä&ÞÌ÷”ŒùÖlìIëý`c}òJäz‘wa#yx=2°’|^i×÷ÄöŒ\øˆþú-@~r¯È"Œa²h,ôcqÅÏÀ‰à\}=ø#4ëA‘û!>ý° jà»”›gåÒòmd\>¯OVË•ßLU¤\Ùä³þdµ€¹vï'‹ä.´,MÉäp´fÀO4ðŸÕríþMvüäÊ*åN…^öB©Üïp­M–i¹G¡–«åþ J©ž»ß²0¾5Ds^NiJÜñѾ™”öpßÎÐÈÌöý{Ò<²ï,ïjÙ0ƒlÌË£tJP„JÐåTˆªP-ªK7ÒíÔšÚY-mUêN½i ¥‘4šÆ…= ¦’T– ÓÕT›êQC[õï#»jtu¦G¨ ¢ÇéIz–^À_Ø zŠÚjVŽÒ¨*]c¯~ÝAmè!Rt7u¡Lê‹¿:ŠÆÐxkÍ·6oÞ„š¶¼óŽ êrwËÛ3hüÅoË-mïå©U£ë©5¡ft?µ'¦Êt=L=¨=JÃé)zŽ^D¯eP’»nªO7ÓtM@K1Jµ­—QqªH—P º–n [èVjNm©ƒý•ÔŠºROêOCh=Mcib8Ž‚§2t)U²rMj@é6jAPGòè*º—ºQ/@Ñô =O“襎Õûuäàhp<8|œÙ±}fþœ.×€[ÀÝÛ÷ë̇Álð,˜º.ëØ±Go7,^ Ö›€­ÀN2»=ìö‚C;õìÕà ŽÇ“À×À7Áw»ômßÑ ~.W‚Àà븽› ž“BÏÍì9 ‡SÁt°X¬VÉìÕ1Ó« Ö‚MÀfÖ¤¯w7Ø|ìf‚}ÁÁ½ÄÛ0p8¾ N§÷êÛ©§7œÎí-úùàbp¸ \nwô³+åí‚ÙàY0)ŒDúuëÙ%’ EÁR`Y°r¿{Gª‚uÁF`3°5Ø¡_¿ªÕ"™`p(8  N²¬™ÎgƒsÁ,p‰eÈ*p¸ÜOYÖŒœjFA¦Å-ké °¾ø¼H«‹ýéžï|h>ûiùÎ?Íw¾ûâóôªù·å;7ßùš‹Ç_âÌÅí¥ ]|^nt¾ó1œÛ}[nl¾ö8W¶Š fXavp¬Ø-®­¡é¶r”´•® µÃcƒðØô¯¬¯0á±hx,«\<Š+f_<Ë+[_|^½áÅöÕ§\|^«ÌÅçµùÎM¾óYùÎgç;_–ï|E¾óß_3ò‚¬³BÝQùÎó­jÝ™ùÎó·ÏÏwž•ï|ÑÅ«zý|Kc#ÕÑy‰º8Sp—é`ÿ‘3É™$O½"V'”½˜—ð ˆ…£ÛÔÁ_ ‹BI¼à'ãü˜ñ£VqŽ8G¬Ýq縵Ëv²I9§ÓÄæó ¹æYó¬½SK)¾™›ÈˆT!%×K%ÏÖ‰Â\„¯àªöÜãl樂ʩäp§Ù•¹21_ÍWÛÑ;N;£tû®ª/M¡e´“rœ4;“¨[ZâR‰q‰É–/$^µocjï¶âVµïÞ®ó««T;î«qLøUí±ˆ=¯†cÂ/AÊž•²Lø–1ÉûâTÆ/Olçó+à˜ð+ÚcÔžWÂ1qeåÐòŠÐòÊÐòªÐòã}ã€ñNÄxÿÑ2 -/¡åå [üTŒ°F˜†þ£%-EÑR-Š´²ÿìæ+ù&|ª²½UyNŒM ŠæCó!U2ŸšO©²™kæÚ2õ…ù‚®4óÍ|ºÊd™,ªb™EtµYb–PU³Ì,£jf¥YIÕÍj³šj˜µf-Õ4ëÍzªe6˜ ¶Àl6›éó³ù™ê˜mf]k~1¿P]ó«ù•ê™]f]g~3¿Ñõf¯ÙKõÍ~³Ÿn0¿›ß©9dÑæˆ9B Í1sŒn2'Ì jdNš“t³9cÎÐ-æ¬9KMŽÉ¡&æ¼9O·š¤IÒm¾¼L¸ÝgŸ©)Öû¬w3›+1ºÓæJ‚šûÆfK ?ÕfWK¿Í®»ü4›]wûé6«îñ‹Ú¬jå·Yu¯_Âî‘Ö~)»Gîó3ìiã—õËÒýømömýZ~-zÀ¿Æ¿†Úù×ú×Òƒ~=¿ž{Œ´ûc¤Í$ßñi¸SÜ)I#PWF9mœ¶ô”“éô ÑøkÆcœ>NzÎ㌡ìkWi¼sÂ9Aœ3ΚèœsÎÑ$)Dô’Ѝ½¬*A¯¨‚ª MVé*^U—ªKé5u¹ºœ^W•T%š¢ªªæ4UõWh‘¤Ñb5D ¡oÔãj}«F©Q´D=£ž¡¥j’šDËÔ+êZ®f¨Í´ÂÖ$Cç¹&פ$7äF”'9í(žÊSvû»o9®×ÃëáT÷zy½œ^¯SÓëçõsjy{;µ½áÞpçï ï §Ž÷Kd‚smìÕØ{αØêxc'™h•xN=šx+±G}T`VÕÉK ¬W9¦‰iÆQó°y˜}ÓÍtãTóˆy„ š¦2½L/.lú˜>œfú™~\Ä 08Ý 2ƒø3Ä á¢f¨ÊÅÌ03Œ‹›f_jFš‘\ÂŒ2£¸¤yÚ<Í¥Ìh3šK›1f g˜qf_ff˜\ÆÌ2³ør3ÛÌæ²fŽ™ÃåÌgæ3.o>7Ÿsó¥ù’+šfW2 ÍB®l¾6_óf©YÊWšåf9_e~0?p³Æ¬á«Í:³Ž«šŸÌO\Íl4¹ºÙb¶p ³Õlåšf»Ùε̳ƒk›f'_cv›Ý\Çì1{øZ³Ïìãºæ€9ÀõÌAs¯3‡Ía¾Þ5G¹¾9nŽó &ÛdssÊœâÍænhþ4òMæœ9ÇL®Éå›MžÉã[l:ÜØw}—›øÚ×|«Ÿâ§ðm~Üóí~¿7õí|‡_Ð/ÈÍüÂ~a¾Ó/âáæþ%þ%ÜÂ/æã–þ¥þ¥|—_Ò/Éwû¥ýÒ|™·òËùåø^¿†_ƒ[ûµýÚ|Ÿ_ǯÃmüº~]¾ß¿Î¿žÛâ}žƒ×S5Qk¯{Ÿó€ó€Uwv:“ã~é~IJGu”8:*:ÊîžÿVãÿVãÿL5þßì+Žì“WìÊéÙûßûoŽý‡rÌñºÛ×ü©NU“oq[S ªK é6jIm컎îöõûûz` M ×h:Í¢Oi>}K+i=m¥Ýt²í+{r"N"eqÊW)óS¾ÆqAÊb³R¾ÁqaÊwö8ßJKpœŸ²Ç)ËpÌJYŽã”ïíqµ[‰ãü”p\² Ǭ”Õ8.LYkYÖnŽóS~ÄqAÊz³R~ÂqaÊF{\hí6á8?e3Ž R¶à˜•ò3Ž S¾%e[WX.HYc™•²Árá¿‘m˜ùW)ÛÃÈüFfG™_ÃÈì #³+ŒÈî0"¿…ÙFd_‘ýaD„ù=ŒÈ¡0"‡Ãˆ #r4ŒÈ±0"'ˆd‡9FäT‘ÓaD¶Úù•²9ˆˆÿ7#òG‘³aDþ #’Fä\‘Ü0"É0Wò‚ÈÄ(ˆLÌ "SAdbD&æ‰yADb:ˆH,D$–D$ "‹‰"3ADb~‘Xj‘XÁ0"g‘ó’)±ˆD$–ø÷"+D$–D$V$ˆH,=ˆHì’ "±bADbŃˆÄ. #R"ŒHÉ0"¥Ãˆd„¹,È•X™02—‡‘)F¦\™òad*„©F¤r‘+ˆ\Fäª "±B‘XQD¤”dJ¬â¿‘«ÃˆT #R-ŒHõ0"5ÂˆÔ #R;ŒÈ5aDꄹ6ŒH½0"×…¹>ŒHý0"7„¹1ŒHÃ0"7…iæÊÍadn #Ó8ŒL“02·†‘©‚ˆÔDDê"" $Säï¬Ê¸ñŒ®5UrÖ«7¸)ßÉ]øaîÎp?ÀƒøQ~œGó³<†Ÿã±ü¼}ï²›ã=¼—÷ñ~>À¿óA>ćùåc|œOp6ŸäS|ºÀPù hÎ:g½À4ùùg¾o'Å͸1wâÎärWîFîË})Êý¹?¥ð@h_ æÁç¡<”<ŒŸ¤ü:¿N…y>¯¦´xŒìªÚW!1·”[ÚÍp/s˸—»eÝrny·‚ÌÌŽè4žõ;Tô‚gWÉS.Î Û³BhQâ‹*´ÙÝ̙֚Ü4W~O\E·"ÅÃ릹EÜt÷·¨[Ì-.¿ÑZüïuåß-äv=7âj7ꦸ17î&Ü®±o!RÝ‚òù‡Ûp;é£ÜëÝú”poto$yS›Šò»<“góG¼„—ò2^Î+ø{^É?ð*^ýW—'jü¿c=¾'?9Îð6ÞsxŽÇ|þÎ^o7úÞß±VØÖù¼€³x!/â¯y1ÃßòwµÆðþ.¿k½Ïä™òBžm½ÄYïK캸˜‡x¯Biéõ/æ˜íc&ýþfv¡ŸdƒíçõTséIEOÑÓô ¦gí¾~ŽÆâ¯¿@ãéE»Ë'Ê· èez…&Ó«vÏ¿NSh*M£7èMzËV€·i½CïÒ{4“Þ·õàšMÒúˆ>¦OluøŒæÒçô}Ióè+[+P-¤Eô5-¦olåøŽ–ÐRZFËi}oëÈ´ŠVÓZKëèG[U~¢ ´‘6ÑfÚB?Û³¶Ó/´ƒ~¥´ËVœßhí¥}´ŸÐï¶þ¢Ãt„ŽÒ1:N'l5:I§è4¡?è,ýI9tŽÎS.%)Ï&´£Z¨–ê.u·ºGµR÷ªÖê>ÕFݯڪT;õ zHµWTGÕIuV]Ôê«ê¦º«GT¦ê¡zª^ª·ê£ÞT[ÔÏj«Ú¦¶«_Ôõ«Ú©v©Ýê7µGíUûÔ~u@ý®ªCê0ÇÔu”ãê˜:®N¨luRR§Õõ‡:«þT9êœ:¯rURåÙ۠Ê™]ö8š£œÂ-¸%ßÅws[~€âö܃ûð(~ŠŸægx"¿ÊSøcþ„?ã¹<¿â5¼–×ñ¼žâ ¼‘7ñfÞÂ?óVÞÆÛùÞÁ¿òNÞåÖs¯“¿»ìnp7º›ÜÍî÷gw«»ÍÝîþâîpuwº»ÜÝîoîw¯»ÏÝïpwº‡ÜÃî÷¨{Ì=îžp³Ý“î)÷´{ÆýÃ=ëþ鿏çÜón®›tó¼‚^ºnªïÐÍôº¹n¡[ê»ôÝúÝJß«[ëût}¿n«Ðíôƒú!Ý^wÐu'ÝYwÑ뮺›î®Ñ™º‡îiÿõ¶ÿúÚýõ=PÒƒõ£zˆ~LÕëaz¸¡ŸÐ#õ“z”~Êþ{FÖÏê1ú9=V?¯Çéôxý¢ž 'êIú%ý²~EOÖ¯ê×ôëzŠžª§é7ô›ú-=]¿­gèwô»ú==S¿¯géôlý¡ž£?Ò_è/õ<ý•ž¯è,½P/Ò_ëÅúù«Íz‰^ª—éåz…þ^¯Ô?èUzµ^£×êuúG½^ÿ¤7èz“Þ¬·èŸõV½Mo׿èúW½SïÒ»õozÞ«÷éýú€þ]Ô‡ôa}DÕÇôq}Bgë“ú”>­Ïè?ôYý§ÎÑçôyå¨õ¢‘¨ŽF£)ÑX4Mèõ'úSý™ž«?×I¥¨U±E±¯c‹cßľ}[[[[[û>¶2öClUü›ø·ñïâKâKãËâËã+âßÇWÆWÅWÇ×Äׯ×ÅŒ¯ÿßßßßßßÿ-¾'¾7¾/¾?~ þ{ü`üPüpüHühüXüxüDüdüTütüLüøÙøŸñœø¹„—ˆ$t"šøö¾,Šdk»ªgz¦™éî!ƒ aA@E‚ ( ’EA1˪¨¨¬i˜sÎiÍëz×´æ5­9G̺æïôA]ÜuïÝ{ÿoïýÿÿ¹O=Ô©ŽtSõ¾oU‡ÑãU¼šçy}Þ€7âyÞ”7ãÍùZ¼_›·äëðõyG¾!ï»ñ:Þ“oÌûðMx_Þ÷ç›òÍøæ|ß‚âƒù¾%Ê·âÃøp¾µà(8 gÁEpÜ­ Ü¡‘à)x oÁGh"ø ~‚¿ÐTh&4„B $ !BK!Th%„ áBk¡!D QB[¡-Äí…X!Nè tâ…!Qè$$ ÉBg!EHÒ„t!CȲ„.B¶ÐUè&ä—…+ÂUášp]¸!Ün ·…;Â]ážp_¨ܵ­ž‘Å™ÑAÌç;+daÀï?ÉÚ¿Ÿ’ÅËÈY’,™üŒz^–/Ë'€ñ†‹² ² 䪬LVF®!³_GÞº¼uyëòÖmÙÙFrâžÜGÞ„œ7eX‘©–5f©gFÝwé-¥¯²­ÂYÒ'ªU—FuWÍ2fjº)ãŽs¥©8KºØþ1Ñu`GœI( éÀÛá_¨F£ÁÒc,I÷hô‰)±äX¶âå4Ö¼r[Þðã¾<(ôŒ‰!œµ(§ê»G¼µ´ž·…Ü€·‡Üˆ¯ ¹ ï!)&Hg¥3Ф3â¹ñ¬îш‘°¤£ ĶŸmi[bqKÜg[’pK2néŒ[¢QÓBì¼é¶|_Â0! (H¦ÓŠÈ™H&’°ª3ª3D¡z«zK”j/µœa1Gÿ"Žýœaÿÿæ×ÃJúgyó¯äLSež²‡²§²HbÎ(àÌ8d³D`¦iÈ“iÀ‘;VscþŸdÅÿ€φó€eÀšìòþÊvœ 8|Ág¬ØÔ‡¤=ª•‡¤;”ñœ¼Zwp Pé 8£æX¢ìƱÐjc¡¥&Kíò#w2¹Ÿó&ËÇñøŽ|<ŸÀ'òø$>™ï̧ð©|ŸÎgð™|ß…Ïæ»òÝø>—ïÎçñù_dÛ_æ[1RŒÛþ)Ö}ü{ÞÛ‹±bÜïØWàE^ƒløE¶¶æmy{¾îG>ÅNÈÉÈÊ¿çe1IL;ÿKìü97þØ9’2Ô†²´1¦Q4†ØãÒ4‰f†4‹fšM³I#ÚæOšGûo:N&At:E’èzz˜¤2L!)bz3Ed03ˆBF2C™äkf3†ŒgÆ1Èd¼ç9™ÂÚã¶Œ—’9øÆ™©Ì‰,”9ËÜÈV™NDv"ãŸ@Æÿ Go'å•òÃäkšPsQZKÁ(j¡€a3­­0S˜QKÅDÅTj¥˜¦˜Eís•´¾bžb!m¨X¬XGÝÛ©¯b§â RSœ¥í——h’âªâ:MVÜTܦ©Š»JB3”Œ’£”*PÅÊeݤ U†Ñí\—Owq\/º›ëÃõ¡?p¹t/7ˆD÷IwÑè~®„+¡¸‘ÜHzͦ?rã¸qô7›@sÓ¹éô7‹›Erå\9=ÆÍçÓãÜJn%=­¦FϨ©Ó³ª¥ªôœj•ê[zIµUµ•Þ¶½Lï©ÞªYú ض)}§UW0Jõ\õN&…¿.4` Ç…KÌîê'a`Lºï»t¢™Öl¨±†’&àÆjR”M#Ø>’”¯m0­´´íÃÒ6X:Iz§!mmÇ•ºéySo8gKÚ(&œ†9-£eø<Î^’Â:°uÙzl}¶ëÈ:± YgÖ…ueÝX-«cÝY¶ëÉz±YoÖ‡mÂú²~¬?=NOПèIzŠž¦gèYú3=GÏÓ ô"½D/Ó+ô*½F¯Óô&½EoKߊ£÷ä2¹\ö\öBö‹ì¥ì•ìµìì­ììýÿÉ:9TEÎà|ƒŸ˜5À{ZædÄ’ŸÇdÁ{ÎDIÜ qàÕ& ý ©HSHjD‚ OÂ!‰$’†t$ñ “ ’tHF¤ $cÒ“Òô'fd¤Zø|”ÕP}Rzª±¢uhRŸl°Æ'¦l ×Æ[¼·k‡ýÕžæÐâ€Ï:Ô¥½hoRÑ"èÙ£è(âH¿¦£‰OÇgèÇÓ‰ ôãõĕˆýýèèAzxà¬S#ì^¨¬Ãpî) çž:㌘E17|îÊ—…J¬£ýèÅxIoá1A°%Œ ýØŽiú1މ#,¨  ¢ýÓ(U‡TG§:¦:IÔª{ªûD_õ@õ˜ª-ÕVÄTm­¶#æêºjGb lò=±.ÙO$ž ŽÀ7IC Õ‰ º%Ñ–ÛOÀóºÄ Ý‘4ToH¼a¤åB|ÙÝH@wñ„÷€Xý¶.Z¬K+¦+Ô¥Îguña|`‹T##9ÖˆÅ)@íÅ%Ö‹-׃èa½TX/ëeˆõ2V=U='æª_ToHm¬£ ÖÑNí¢v#õÔ:µ'ÔKª©+ÖT‡5õšzÞ%~À…I3¬u0Öº%°” Ž „qJõ=ØÖÐ?Ó±F:©ŽÒ I“uÔ}اôÞñtʧu =F—À’ñ§ý |Á~ ø =!ÇØ²èúC‰þàÐz ~;zEÑæÑ7‚jŽja|þ=ÑÀì4Äü¬ê2±Tݯ8¨Þ©Y¨±<ÑTÝXÝ”d€’ø‘ä‚f8IúƒFxLŠA¼&“ñ­É,Œù&Œùfàñúä[ŒüŒüVŒü6ŒüvŒüŒüNàwO² 8¾1ùx>ìVoMÒI"'AÝd‘  hòÉ Ð&mIhŒ8ò˜¾3Œ aœÔƒiIZHs ¤­ôÌ ‰Vïâ¿&‡à˜4:íOï‡_ý‹Îú©=TŒª;¶ùÌíÁý×ö€oª}\ÇÀ(® F{p—æ»UWTwQ+Ô"ÑS7ƒÿi(­Å±~õõØâ•hÿ`íÇšþóG4<üøŽ4ùð´©„¦ÑT†h*G4eMˆ¦JDSÑTÑT…hªF4åMEDS ¢©>¢©!¢©¢©1¢© ¢©¢i-BÙÓã2²ìVöoìÒüÞYb¨ŠµÚQ'êN›Ð4Œ¶ƒkL¥]i>í j¬˜Ž¤cé$øßåt]F×ÐMt;ýžî§GÀCçÀ·h}J_‘)ž1dÌ™:Œã>ö¢Nàƒà´ñÀä’íD}Ð&Ñ&h“©/ÚÎÔm õG›J›¢M£ÍÐ¦Óæh3hÚL„6›† Íu Ù<‰v:[[²ò ¬%Ú¬•d5œ™dY3Î\²Š\-´?ph÷rx xð8¥‡Ç)U\É‚³F;\ÓÿOWꨦÍÂÀ’3äñ \$äy…6uœƒBë†úy@žJAAÝ Ô*ò|Ú ò4 òÚòé´ ä3iä3XsÂ@}kA¾‘•ž¢ àÂ@MEÏ Nùœ>ä{9éù,úÔÏrgL¨› äÉ#‰!‰ r@3 $ÃÈh2‰Ì$óÈ2²Žl%ß“ƒä9G®‘{€SîPBK2‡ïmIK½¨´¦PAcÀ¡V9€ú2¸Út)ÚNtÚ$ºm2]¶3]‰6•®B›FW£M¡kЦӵh3è:´™œ£d¡ŽRk›µlˆöÎí^Nj}Ó¡®®hõ87´*N+Y¨±íp:ã7#WŽ‘«ÀÈUbäæbÌæaÌæc`äbäaäKñàlÐã¶èq;ô¸=zÜ=^=^=^=Þ=îó'<ý†ÊÁÏÆÔ¼ìL}ÁÇ´/ýŠ£¥çB«¨¤‹è ºŽ~ ˆñ7@Šc€i¿îЇô9çAd¬šj8/´ñ\ ´¸@´I\Úd.mg.m ×m*Š6k%YÆ Ãå .m&6›‹B›ÃµG›ÇuD;K“,ø*]²à­ ´?p™h÷rY’ŸuA«Çe£Uq]% žë†v8'õ* ý –¤þÏI=©'’8)Š\)Šœ¯9ÎOŠ%ç/Å’k*E‘k&E‘k.E‘“zU6'õªn\¤Ôÿ¸¶RÿãÚIý‹–ú#õ?.ã'õ?®ƒÔÿ¸xŒ}Æ>cß cŸ„±OÆØwÆØ§`ìS1ö”È9S銱𱤠Á·Xd‚øOÁ_j8^zýB¦ =XØ'ßKiÜé÷qÞ•š"™!~˜K×)‘ÖúTê"ÕRby`œ)ˆ#˜K÷ƒ©>p¡&0‚§ÈU 2¤Ýf’àcw΃kÄyr^\cΛóášp¾œçÏ5åšq͹\ Äs!\K.”kÅ…qá\k® ÁErQ\[®ÍÅpí¹X.ŽëÀu¤íiíH;ÐXÚE5T[yõ]¦ó3’™,›.[,[ÃÖa­YÖ–µcí5-4š %Õsñ\—Èuâ’¸d®3—Â¥r\—Îep™\×…ËæºrÝ@M\U]S]WÝPÝTÝRÝVÝe¡Tsj=µJ­VójA-jüÅP±•&†‹­Å6b¨Žæêu u :H¬Q·TŸRŸVŸQŸUÿ¬>§>¯¾ ¾¨~£~«~§~σ y†—ñrÞ†·ãøz|Þ‰wæ]y-ïÎ7â½xo¾ ÁGòQ|[¾ÍÇðíù|ß“/ä{ñ½ù>|_¾ߟÀ䋸¯øAü`~_Ìå‡ñÃù~?’Å—ò_‹íÄh1Fì vã5M5Í4ÍÅ1ULƒ¸9B;‰¸Is+.0º]Ý•É!:¦)$˜"¦ˆxâSâ^8cÒçA¼ñn‡lµl5išGú*6+¾%Š]Š]$P)½ˆ$½ˆA‚9˜/Dš) ¥™’ªvP7$ݤùÒS}”ó@õÐÌÃykÐÌcy[Þ–ŒCå<•ó7¨œ' ržˆÊy*çɨœ§ ržŠÊ¹ •ó4TÎÓù ÐÌ3øXÐÉóP'ï@ü˜:yÔü[ÿgbü/Æô/ˆÜ§˜©Ð›½©‡~4D?ÖF?:`Í]°æ^Xó¶Xó!ÄUÏ»°"k€8FöAÞ‚Ô©Ù‹~Û®ÿ¸…V·&8ƒ¶‚mG†V`ô{ ‰°ål¹[.ƒ-WöáX}֨Ʊ栦?aI5Fh‚ϤùG‚­šÅV­Äö,½ûUJZüoãYM¤RÒ?‡Px• @·ì °×¹bs«žé¢èsúúƒÊ6`L™ÚŒ=ã(kÅæ²yl¶'[Äb‡ˆYb¶ØMÌóÄbO±—ØGì/¿‹Åâ0±D)–ŠcÅyâq™¸B\+®7Š[Ämâqøƒx@<$‹?‰§Å³â9ñ‚xI¼"^oˆ·Ä;â=±J|(>ŸŠ/Ä—âkñ­ø^C5rR£§QkFc 1Ò˜hÌ4µ4µ5Vk­¦®ÆCã¥ñÖ4Ñøý÷éìÿ>ý¿ö>–>¨¢LÖLzjøŸzûð‚vUܨñ®'=K÷éI¼¿ó4ݧçðàŒ?“Tc&RZ8ùi>>%/`ìëÉxð.’iËÄ2™D&5°y·t÷ûKIºã]3ÁY>OÞ¿OÒýñšIº›þÅø›"Ýkÿ,Eþ>I÷Ýk&¨Ë$`­ÏÔùóÔñK Xî³^ú<%aúu9ý7) R×?Hù_JÀ¨Ÿ§Øß¤äߤ.Ÿ§õë­>Ãç/ÿ`þ’’ Àò~ H¤¯>Åà¤~ûõ¨)0Ö­$‹È í~Kv’¿Áx÷9 þÓâS!ÿlîý/å‘ÿJþÅYJi“ª¤K`@iLgŠã. |Ý‘JcÊ(:ÊSèT(—ÑYPžM×Ay=} }›>"2úè}åô%2æk(¿¡ï üž‘~ ŠaäÐâXFe%#}³ZÍðPð—•ô(2ÆP6aL¡l†¿šdÁÔ†²%c e;ÆÊÒo0Ã:BÙ‰q‚rC¦!”g"ý¶” ”]éÐf03 <“™ åYÌ,(Ï–I¿? ¼,“…±f0F•4 :(Rú¾=ÛFéíØnPÎa{B¹åì(³c¡<ŽåñøËìØP>Èñ„‚þ‘f£LalL93New½Õ„ê­Ñ[Cdzkð•ðPxHdÂ#QI¨È‰j"yPÖTLÅ!Óøƒ¤0NnIM¨¦¡¾M#¡yê‡7þU#ÕE5Bk¼uNQPT#ÕE5BQPT#ÕE5BQPT#ÕE5R}… jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠš„¢&¡¨I(jŠšäãŽ>}ïÈBú*Ÿ1®%±Úb‹v =§’Ð’U2åŰªC©N­ÕS° EcÁmŠBÕPAå´¸1CååÑÚ¶Zçk,+ë ¶Ä›¿~$’¤’ž$à4ƒŸt3¸©Ö¶ÆÉäÆç}ª¼sºÕZܦã˜W†­:f¹|my±‰‹¶X^®-–,—1”aT)µNÄËÎÔ Ÿ.’²p9ýðêdíå #¦}´ÎHk -pFª¸”ž]²»gæu×ékEi¥ÒHÙ.#=7¯{º®ŽÖRZ£22i“V×3/³Ð&0¯ ?¯ ¥0ް×ÚJÛeF5·§gØDggu‡³ÚDhë˜ :N«Óºk=ÜÝ=ãaÑC«û´¨2ô/¹6A«–¶«äm"£Ú}Ü]ö»k‹©]MŸQ–ÈŠ¡9ÂzSL)©JØ^dàpµDq)ó}èz³m̵u¼û¦E®#NET¬^èö"c¶î²».xÅ©]ÃlO¹®öÕ+ÏãÑ–§6´­y(sóÝ<óÖ1qù¢Ï÷Û­ûi×ëYiþ¸´SJëÜè|DÑø\ße½Œó*ºµU?vYÙÃQ\Óÿ¶²ž^R4“Gþ;LÇMÉìÖnÜ¥îl­)8xrã"OÃ’jÕ‰ c_ÅÌÜõ¤Vr‹1†s¬šßXßhh-÷b«'gFœ°]ãW¹AyÊaIÕ˜gkϼzé¹ðöã•Û==0ÃÍ ?íü KåÚÊõ£=¶¬‰Üs9zM@FËîŸo½=Ã4à›n® ÚÝŒ :ÄÜbj©¥5_ZÕ•óZ•‚ƒFͲJ™Lk%­Av×n'>1pÚ¸sÔnƒ!þ'¦tØ<7º;ÐJ#ýè¥n°ÖZZ¶—›kM0¸µÿØ:Ót_cWSÓÍ­§«¬µ±ÒÖòHmmxy«ò–%Á] 󛸹¥䏿~Œ¢kZ^®[~·li­[~A^z¯´ÂžndhˆÐ ¡&k½]kÒÌˇ>tXåyph§ª³;ó¼ZíŒWÅ=ïyyö“«\kߦnýXi—ÿBnÍ,Ÿ±i\âHÑkRއrÓâåmË|wn¬á¶Ý‹OÅV¼8ÿp¾Mœ¾þ¬ªe%…9=fìzøø»ü¤…?ç¶iÜaZ›~Í4ê_wEÖÝÚ!ŠU£­çê›ï1Çþ§_Ö‡]ªJ+Þ”]ä¶Ê|mÇy+¢Çr¬¾‹Ó¾&ŠÖ–®‹umcÓ—M?¸lj™céÔñ#îÌÚõ-`TåGŒbkMA,­ý[Œêó—à€-64èøæ¿nÉÎÍp‰.LÉÍÿ¡´Ý=ݵÜu>B¹>}\ÔYûï@¨úÚºÕ‹uºfçwÉ(° ж ŽŽhâÜØÛÅÛ«Q ­‡O®®Ö¾ºF–_¬QtFAïì´ŒˆhÇøFWÎ šÛi›ØÑ¥}–4žømúv)37zñû£«íöñ7{u¯2¿5D4Ús:…l·.ïí+ä{äå‹ÞF+*äòÍê eLª÷ƒ†/úx°<8nød›9§ÒÍL »}Å¥3³}ž/nÿöðÍ>7<$ÞÚ:1Ò"PÙÁ»tÐpãœ;ûŽ„÷/î~à¸IgÎxÔ¤E ÍšìkfS”ëÖÁ¢h©÷ÖÝßùt9íÒÁÂþ¾“>o3ºxþý£Sƒ' ?¸»ñЋBÙÀ=Ç7\š}º/÷캽­2µ$¾kv­·ù/£ yQWW«dÄ×;ÛO»¤µ§ÉÛ„Û“÷-.sLvž¹®&}ÏãUõ{}D4=ð[¼úÙ߬¶·wîbî˜ZœuòÉe/ïøÏÀʾÑ/gÚ…ä«î7ÝûõÚ†«v{®ÕhcªÁ  J PU\øOUõf)ŠDh•Uj@•6´Tùý9¨úâ™ ¿„àܗЫåw½‡$èÎç÷›ö¸ÎWS¢œY³Úú›‚*Ö~{xÛ*Ûué¹)–§«nÝ}6¡*°Ò·r¹ÿ¥]¦Z,œ_Ð3ö‘Ù¤ko='”Ÿì\§OðÐáÞ¦Gz&°ßfµ3M¶ÛÙZêw ¯ôv‹9o¬íøË±1©oìKÑEm®ot­¹öp£~»Gø—»ûÿ±Â[1<1"¶¸ë¾1üTdÚÍc.©‚ýo.ãÈóŠÙGF׋¾ÕIØãÃý¼g¯ë“8ßlö˜ãbýv-ÓK–ÿ5Ià‘x­FêzF’bµ205°ç‹:HÂIRM´Dk¨Ðû0Š0¡rO tði#åíQ]Äñz¥“/—uö]¤Ë[à·õ´‹¶Ö§Œ9_GE¢I/y’€ÏÀM\Vܹylý©×ë½qº¬ŠžÜñÚâIGí¬W_œºö–íÔ¯~9fô„ÛÛn]ðø9¡$¬e¦A}ÇÌES¯W «|9l¡AKc½â9Ãî·ïûŽN·Šâ†}mÈýìC¶|ï3ge¾º>g\ô:±"…Yo%¬~óbÆzÈ.<æýKv÷w6êè½<²ðï¡÷…ágè­_½a Ñ)«ß!ãµCÆ|~+Òæ¥üåͳX¿ßrÓŠ°òùË[÷ìðTiäšñÿ êÿ)) ¾ÖŸZº;Qäuþöºå}~>Ô¯mºÚµ°GB.o´ôÐöã6¹ž0¬›º)Ž9ac5í|ÿæWⶬì0Ýò²-Y¶¥ïã¯Üó¥UW¶S±{Ç„^ymr>ré„k7Çtýið®“+܆Ënãä`—ÿúù›k}§¹ /”Wò·šGÌÛMU0yS…ÏÌ,—=mÅ;©‰ÍL˾¶ivEiáþò .¬·Î¿azï|ÿ÷ÃUF¿S¥Œ}xj“Ù݈¯íñl˜4wÇÝ­EêNDØVi÷o雑˜@ÍTÆâ±³ÆeÏü6gvXëâvóåð’ƒmcoÍÊŸ”³Ì§õ‰çýv,1ïŸêø r†c#E‹Ô}þur­‹ªpÞr8píõ—÷ŠÖ_·¨ÐsSÄžö†õz«ýÚîh¼uíÚUm²öÎiñ~p?ÛÁ³M´™·Z&Yìmg{$ðvÃÛ[ž†t>qÚ}pëzN¡Éñwb,¸0mÖþ&yÛ†Ô/TTõ¶Ý1£xWý˜ «»úªè²®{…Ñ‚KZ>4Ì{[êž³æÝŶ{GÛïËÜ6Ëj„a:ãï²²ã¸M×l¯¯_µ?m]ßöD€kÔ²I«æ÷]º¶|J/‹3Fõ²ss_Äu/O]wGùƒaûmOÞ­¹ozU«K/hFÞ(uÑÞì½7ºßY8õÎñ½¸'!ñt›Ú§_¹ÍnæÚÞ´Û>£¹ouÅò©ÚbùD†RíÿA½üÙDí¯Ó¼åC¾—TÚ‡f«'Óñ5çáÿþº¤Ö‰Úš[M$ øñ@¹°h½ÁÜAâfëˆíׅìX>²È~©¯6½Æ!¼.VSî4¸iC²I) y8 I ‰ ‰!ýH>,eÁú(u!ý*ê vøÃ>ZØ/?/« %¿K?›ßp‰¼zž~e§I ëæ¶NøÁò׸È{u†Ùž¨ÈþºãÙ+G¯O;T•e0âMvúão—•|]t5svÀ–;« Æ…9Œ(›w®ñ€›¡‘Öo¦¾ôRµùøÅGÇï³rðHËOžþPoK»1µ¯M+M¶¿ô¨t[À¡ø N£Z7ÿ¦õ«¢¥3άÛ68`àD§î§JmFnkÕúB?vÜ~[†ÝZ~aϳÕ6j;ǯdw ûÎx3Öì§k—vê\\ú>p\E*&r‹—®Øâ<Ê3ñè®f Ì{[jžë1eÁåÒ.ÕKÃî;?«çs7f@fì¤c¾y·.tš_d¹zWÔ¹¹ñη}ޝ)Ï>g³(Ìqá¡]ï0K–õÿG ›˜d š˜"—Ͱ‰‰ (ÄNŒ­Vù£ŒÇ±C“â‚X ätȘð`Ú—a5ä •˜šû¤fÆÀF z2œù@u—wvö7õ_ÊTBÒóÕ6%¢•Í ÂÃîzí;KÞáyœœ]Ê_gqýÖ­,ó ™xšéÊ|æ‰ ÿo_r5ÚgÊÍæÛMLýÿ®/s”>QûßõÒ­§Æ Ùä¿<Óÿ/ïÓqã‚σx¸3Îk6ÿZëœðÁyaê‡Ô³ÎsãöüWb ú³âßÙÞ-…]ÄÔ6ž¯òûq‹Õ¿àEó·žj{võc×û&‡;º»Ÿ),û¿ç/—Ú“ýrä~þªnÓ›TqUŽ·âgáÙÞàz»Š×¶wÜ÷ž8zÈ6Âò~û“¨Õ¡v9wgn[™ñqWN¢båÿ7’ïýoãÒ쮼'Mf‰Šý÷ ^G^émæ.H•lÛnôëýÕÒÊn¿, ½ÊÀÿÿPK!îHŸÆÅôõ4Resources/683937A8-02DD-2FDA-576C-F17DA47FF373.odttfì} xTEÖö©º·—ôÞ!{štw: I€2¤CÐÖÒH "‹"KÁ8Šh\PÇA\FÄu”N‚ØPaQqG#èçÊ’û¿u»Ã2ê¯Ï<óý~~Ÿ›óÖ©ªSË=÷Ô©º7¾ZúЕ‡gßç}ÊçÓæfM=Þ£üÊcϼµ/ëåEG®èm˳Ÿ Z¿Šˆ?tÔȱÙÛk¦=s+Ñg4tì¸!‰Ûöæ{ù¼×Î[Y6;s¦–Ø»µD”2¼rì0ïçKDk‰¬«FŽÍʶõú2;‚úÚQÅÃ+O]>¸ý ýþU%Õ£nŸõ Ñp‘ýŽ©³ëæ®™yÍD5{Ðæõ©‹¸¿î½Kˆ*‰´.œ;}ö«ÏîÓMFÿºç§×5Ì¥ŠB£ÐŸmúÅK.œÓ«âs¢%d?™Q_7íÀ·íñèëb1Þ Dßûò!Ÿ6cö‚Åuó5[p¯ÃˆÖ^ê–)Òí¯?5ëøºSÓm“ô£‘Rõ!Õ îAÅ6:¾î‡×m“NׄÉ|¯(±ÞAýˆ«œl”E~"ùYŒ+H’®g·’†ôš»59è29”Jÿ  y´^ÃZ™ ’P¦²…«3UV»ÈG.­OóFÇh–£ÌZ|ÄEAïšMâN)FžÏ?ÍþM¢ÿ¤y™îû%íã´ê'Ú­ùOŒ/7PÙ¿ÓŽ?NËþãG(BŠP„"¡E(BÿJl­Òö[Ïá×’&ù÷3×E(Bú-‰‘Ò¦Û(7#¡E(BŠP„"¡E(BŠP„"¡E(BŠP„"¡E(BŠP„"¡ÿ)ê|zä?ÙŸ|øÇÿ½Õ¿’æåëÈïþr»E(BÿÛÈz‡Ž1ö„öMÂBÑ?ª÷œ“ûåþ"¡ß„Ø/«üªúB”ù­§¡E(BŠP„"ôÛÒO‡N—õ`ý6—ý#‰$&H#IŒã유ùܸ…¾×+¤'½ÒAQ¥œ"€F2MdšÉ ´¨h% ÐFV xïív`ŠÆP`,ðÅQ 0žb Àã”Hñ“(r2%*v¥d` 9”È©¢‹ºÝ䦒 è~Oiä¦S*0øu#°;¥{P0SE/uS¾¥žÔØKÅÞ” Ì"/°õö~CÙÔ˜CYÀ\ê£|MýTìO}(˜G¹ÊQ¾Š©pŠÔøLyÀBÊW¾" Ñ à*¿¤ú°”˨P9FCÉFEÀóhð|Ë©8œJ€T¦¥*ޤ¡ÀQ4 8šÎS¾ 1*Ž¥ó•T®´Ó8ªV©8žF«i¤ò9ùip°. Ñ'ÒX` U'©8™Æ)ŸQ-Uëh

=@·¤ÛÑŸ€ÓÊ{ôýYy—¥•Àµt'ð1§UÀ'è.à_éà“*>E÷×Ñ_€ºØ ÜG-´ØJ÷×ÓÊ;ô4=¨¼MT|†éaàFzئâ&Z |–SÞ¢çèqàßTÜLO·Ð_ÏÓ“Àè)à‹´NÙK[)ü;5+oÒK*¾L-ÀW¨UÙC¯Òzà6z¸6wÐ3À¾F»TÜMmÀгÀ×é9å zø:í¡¿ߤÍÀ½´Eù½¥âÛôðz¸¶ßUñ=ú;ð}z ø½¬ì¦ý* W•]ô!m¤íÀTà×*~Cï)Ûé[zø}ü¸~ ýÀãtx‚>žTñ}¤¼Jt¨ÐÇÀHLÿïé_þÎcúg¿:¦ú31ýÓÅô#?Óÿ(¦ò+bú¡Ó1}þ91ý£Ÿ‰é©1ý£ÅôƒjL?xVL?¨ÆôƒjL?xVLÿðG1ý€Ó¨1ýÀï0¦¿óÅô=‘˜‰é¿»˜þ{?§ÿ~cúÏÓ#1=Ó:¦¿ò¿ ¦‹o2!v„?Ô-@»ŒdDñW6”pD×Ä—1XÙóé~­Oü›Þˆ¾ÿR¦|tÖ5õdà§ÛÌ´g¾ 2Î)ü/‘Ÿ¥€)Éš_üœÔ­Sè# ßꇞ“÷‹ýý{$ý{ÍþÛ¬ë+«_5®²ÈW8øƒæç è—›“Ý·OVï^=½™=ºwËHOó¤º]Δ®Žä¤Ä„ø¸Ø˜.Ñv›Õb6 QzV#KœQÏROY­+Q3<ÆõyO êÎ*¨ ¸PTv®NÀU«ª¹ÎÕôAóÂÑô…4}§5™ÍU@½zºJ=®ÀÎ+È&Œ®†|s‰Çï ´«r…*ߪÊfÈn7¸Jf”¸¬ÖU([4£©´¶Ý5 ÅžâzC¯žÔl0B4B Ä{æ6³øÁLx|éÀfNz3&Hò””=%b)½´nZ`ÔèêÒ’d·Ûß«g€OõL gHÀêUU¨X& -èÔa\3ÅÝЮæž[šn ÚhJ­×4Í3­nbu@ªó‹1ì^Œ[ˆ¿ìP™,:.®^~vm²ÔTš0Ó%²MMË]ûGWŸ]ëè÷£´åéeµMeú&±|¬ £ñeþê[†!]âNÄ]…î¯ÞS*Jjg¹Qž!žM³jñh’š4f‰»%)É·;QR©«©²Úã&{üu%Žæj³¤5ÑçJ<·¦WÏf›=dØf‹5,˜Ìg õ§ëTIURù˜Ó–ebFžóà×TfRíÁ=å ¨Ï£¦©yPùZ¦á‰Ì D×6ÙŠrÑ> I·y\Mß<ÀÓþù¹%uámºí¢ð“Ó®†úN9àõ23…‹èŠñL1ÇÁj¾_¯ž‹‚Üã™ks!ùhl[ç˜ó»ÝâßôÑd£«CyMIn!_–×ൢfKgMì8QÓØYsºy­ž¼^]×±}Æé«-®KéŒ÷©®Õ—õ”žPí*mª Û¶¼òœ\¨>ït]X t)®–’yXâÉ’Z §œxZYdªM9?ZÕ©§uzx¥ZÂ\e[í°ú n÷¯lTމVjr¦YxšÞsóƒÎÉŸ3=S“„ ˼¼rBS“áœ:¸ZhÀó <ž*«Ý®âÃÊLÇOPÙ’'ØŸðÁdÅBþ* gÏQLË~ðÎ^=ËèššÊ<®²¦Ú¦º Ò8Åã²yš6òø MsKk;'¨´Ý˜(»É[Í`±(8 iö°ëG7ûØõc'To´a¸¾²º…3^\;Äßœ†ºê.Äwµ”‹RQ(2.‘¡r†›lázU?y£¨Q­•Õ5?5ÈH-Ów–1šä¡2[h  u 6¥©A9TãëÔ–Q¦•5†´»‡µõ¨±‰š6ÂÞAjeˆDp*®¬>ÛíÔµ,*Æ{«M¼©|,š¨4ä%Ϊv‰†æ Lö,v7£Ï@•g‰…ž€ JÍ4Ôáojráò`ø©UÕ!U¬§=ùS:u“~ÏYYšª¢Õ!–ÝéÑ.ïm>FBSçp©?9f`TÔé7÷'Oh|ll¡A›&6Mð¸7»ŠÃó@Öâð«=`&«ÄL°º‹LT)õOÅ[¯SòJ™x‡tJ™-ڮΠԽ5#Á¹ûY©s©G‹·«s£ÔMêÚ2Èé JžÖèØlkQ/É…œ¥¢ 8¼¼,Ód)å6àRp#xx3x7g4 ¨uç€Wƒˆ©«ähq9mEݤD´M„«X¥x: VÀæQãi$x2xx5X«ê‰’9à¥àÍàcjOŠo¹=so¹QMZg]œ­fëBÙ‰5j¶u¼?”VŒ¥%ç…Ô†Ôú憊{ ¥Ýz†ÒèôìF‘ÌÙ[Šâ¤8Üd&>ÈøV²2FNº_Š¥˜KÚp‰OŠnMËÈ^½Y’‰I\b8Ž9•-k1Û³‹ \áGqˆsò/x{¨†··ZìÙ«‹Îçix3Xâq}È?¤¥ü€°9°¼¼¼ |¬åpíÇõÿ€¬ü}Ê‚'ƒWƒ7ƒ‚uü} ¿'6…\æü= ¿‹Ûzhåû íãû0µ7ZägoToVXp¦‡…øä°—䯷üЕ' Ú$¥Ò`Ê‘R[ÒûÂýZ f:ƒü£V—×yQ¾‡`q߃‘÷ < \ ž ÖBÚ i/5‚o߀áe@ØÅ·w€÷R°< ¬ç»[0LïjÉâ,Šã¯ñ—)ßÉ_QÓü%5ÝÎÿ®¦¯"MAº¿Ô’â¤"#ê mlHmH³P¯áÏ·¦E;•";ß Û9YàBðHðdð °–oæ©-ÓœÑèdmÓ4[èS5}„Гo–Ó—Q t ÈøH€Õ®ÕÜ—±ò.ddÜr;$×ÞI@ÆeWCqñ"H2¦Í‚$ cÂdH2FVBù}ϤusysYù¥°Ò¥°Ò¥°Ò¥$óKÅE?Èbn÷´dfÂbwû¼=2m¬ñYÖ8†5>ÀëYãU¬ñjÖXÀ'±F/kt°ÆÖèc›XLÑÈ|ëÏÉæûXã6Öø$kl`¬15¦±Fà rwËy9jRª&­EbÑ!ýÃ`D+wânø¼1a3pXQs>(¹RCʉ)"MmÍ, å{Ìžƒåó"¾ˆÇð"íËx@/Â^D'/¢+°<¼|¬€µÐNÅÄW¨hf Á“ÁKÁGÁZu:GÁœæ„§¸N˜˜tVxâ#Á2W*.7wûºÚ6¯m˜´ÂÁ¬)ldŠ’ÂP\œx‘³ëíAfÞðùûïÌUÅoá+Dèæ·†Ó-? t³U-›œE±ìNJ‘áy,Ÿ2X:Ò78 “œ!­~¢ÍgLÁ31ÙuPOŠÚá¸A6Ã×S·RW­©ë¯ËÖõÔ¹uN]W]².F­·é-z“Þ ×ëµzYÏõ¤ *|^ñ Fk‰V(«²  DàczNçS ‹TÎËÇaå-S©|Š+ðíXOp<Ôx†°@t9•W äy˃:eL`€·< uAu3c·øQà×ãXTYdŠ(Z–,^Ä6cöe7'‹´û²›ý~Jˆ[T˜P=Øž_VòPFïJ8GîXY>¶:ðxW [JWyàOâMm#ûŠ+-ÙȾ‰¿z£4˜}U:F”KƒKüþò «RõÈž„<æKUOÍYè‘KŸÒ»;¤—ŽöÐK ô¢¢(]ÕKŠRõd&ôšÒJKšÓÒTx5¨: ñ®³u¶¥C'=]Õ‰k¤mªÎ¶¸F¡¬ª8PIq¨*,‰ªŠƒ%©*UgT²Â*7œV¹AIbgt!óNóèx-ÕñzYë ÿÔ‰â-·ÖSZ® ܸhF‚8q¹š§ú￵S¦Îi]}Àï©/ Lõ”¸šMü‰ê‰¢z§¤™&–VV7OôÕ—´ ò *õÔ•ø[‡ŽÊpÎX7œ+wÔOt6Jt–+Æ:à'ªˆê¡b¬b¬b¬¡¾¡êX¤úø¨êf= ñã¥JM[¹Ñ­ÅQsHœmî`Õy¹®JnÉe-ñŽiò ˜Á¢ªWQ¯"Q…5%ª,âSF¸*áªAîä6¶6\eC±Ý3„¼ 6,¤„Ò™%¡ŸŠ,¡·áçu¥_]Iâò@æØò@!úÍ:JkÅ-v–¥x™ öFá@Q(I§EY(‹Š +þøù/ §Åb4òM­Ì—ÂPƒ_ ¤”Wr„‚Êð;cÎSb‹hð㘗5töž¶×K¡<‰{îä ÃRØ Âi¨%š4tšä4 cyO[lÚ­jN/iÚ(œ¤y”å J Rƒˆ´c¦rDÔ‹”ÿ/f¢µô$›IOÒfzC«u´‘Ö“8•нtÝA˱ÅM@É 4—åw°De=eÑlrkh'tÇÓUÔFq,Aù”–Ò2é ´ZFfJ¥"Esèf6\YHi¿|  át ÍeJµr‹r»ò=L¥WÔßÿ%ÑT\;•/4o+ïQ/´ø3ÝEûÙíQO“£4Bó/4Ÿî–jd¦LWŽcnºs©‚v²-Ü‹Þëé0K`WHÅèåA% l…–ƒjhÝMm¬ÊÝš‰J…²“â0ÆbôzµÐ\AzŽö1“æ˜òrŒ©'‡ûYO¯±-RÇ©«; a1 ¬ÔƒòQ3‡þF/ÓnæaÏó9“&[ãÓ\¦ì¡êKã0ÛGÑòö¿ ×Ré%¹LBØå6amú;}È’Xɪx>‡ß'ÍÇ«oO´í‹ãÿLØ{zÿî´›ø.éAù ù„¶kÇÅ‚'’A÷Ð_èyfƺXû#ÛË>âÅ|2¿‡”î“_×Õá®'Ñlº™ž ïX4Ëc£Ùl»‚-g·±»ØN¶›áE¼’_ÄJ3¤yÒsò\cåùÍušµG:ª;¶vü£ã;%[¹ŽFîÆìÿL÷áÎ6Ò.z×~:È4ÌÈ,¸\ÌÍÆ±Ëq]Ånf°µì1¶£ìfÙ§Øš¾a'8v\®åÉ8‰£‡ÏÇió~/ß…k7ÿœÿ ÅK©xKí'H~ifµ\º×ÓÒ‡r’¼KV`çlÍJÍjÍZÍš4Ç´&ݱ×ï8ùà©ÌStPÇõ+;Z:Ö+R,ž!v¼|`öu¸fáy¯„Ç­£7˜ ¶Kb™l0ËLf³Ø<¶–¼–ÝÍVçþ{Vz‹ÅœÍܡι7ïLJð‘¸&ñz>‡²Ûùz¾——t’Q²J±R¦4Tª‘ê¥Òi¥vHïK¥o¥“¸Ù ;åT9CöÊCåÉòBù>ù°|X3Q³]ó±Ö ­½NÔ~‰ÓÍ`Ý(Ýh]n…nƒn¾Þù"=MÏœý}ž®–J¥§éž#'âuæ5øódš&Upx*_Ë®çW²õQì5Z¯­äAš®±0D"y{Çš £¾@kˆ(h2–uèÔ!*<õIar³C­Í@-'­Á¸]Ѝɓ (zRç.ÆØvƒÁxµ{Í*œ„Gؾ®)¨°µÛ¡‹C¶/¨°°Âv꜄[58¨0[­ÀïïÛ§‹dϱKR¿œØÃöç>¸‹],E±ÒŽM'¿ë¸cçN1×IR+¿T«‘nÄVù}kjz®&¨|ïKÍè‘kÔ`,¼Ki4ZãQz½$qÒé Ö¨Æ(…“ƒ/ÖlÍú€Irg>³=—%šæ=š ¦è-¨8U`;å­)8U@…bR§ ÌŸ/¸oæõvÓ“rT¼5{g¯÷ûîì#µ²øcÇ:> ¡˜ç}°þÌÓJ]Y/_´ËÉŠõŽ®)œq»-ÅJúø"›Ò!þr†ù¨Šâ•¯ÄßÒ„åoQnf>Ÿ³*>ÃÅœ>³™‹rÙl@ƒÕ LPK‚Ê×>“ɤ•äìj³A¼¿WÙ fsH@Ÿ¥ÊæbêW@Ñ•o׋NTAôáøz“I¾[/ú#aNt©&eÐįíÛÐi–„³5íâ0S# îÛ§x‰¯¿”¬Ã»œos²61!)k“Ál´±q1q]â$m²ïfÑ@‚Þáfq»‡"6t5«É±»³ããâã¢cc¸…{ÒÝÙýôïß/7£[†Ç}ûበWù4Œ¸ì¶Ë:šYþm÷-­¸óâOvìдÅv>¥c×ÖG;:«Ë~²ßÒOùä»Lñ¥s¢¥ÏÃ&eµê3! q…Ñ›¹pú¤W¾õ…)ô³ãAå‹õB€}áë.$S´¨ÖXMR1®2ZHÅ F­°­Ñ&ìi„=7-£ †üd}ØêßwZýdÈêY0ÞN°¶l±í޽şïõª^æ¥äÐJô9u.£Q;N«¢¤¢¬¢FE}PùÊç7©Zñ¹Eõ Õ; *êÄ Ä#Õ‹‡ëR††™\†è\« “DÌb$½žqƒ¸qÑ›*¨lâUâÖ¼Êg&u ÒvºŠÚ-1q/_g}­ºDaAAèfjBwsÖ‘:Ù·”¸UÓõò"Óu¦W`JÓy¦ó¬R9ÝÜÓR-] /2/¶,7ë\£Ï7÷·ŒäåR‰Î§¯0±Vñ»¤•º•úµÒ£:m4·Z,}4ƹ^e0Íf‹Å&žSmtc4nãk±¾ú¶h\ú ëû´) *´v †Ð’‰ª2¸|¦¥FflÃm[˜º<ˆÄʨȀÚ¹XI]¬XÄÏT‘Ë:ׯlA^õŒKS«iÔHˆ‘k[íƒü ÞDÄ?DÀ„Sbñ´'%ÚÚ‘K:+{¨† Ô˜Óy%ÙÚÛ—kz{—_¹uyï‘ôíƒ7!#Þ„Rð&ô™”ðؽĕ½yyy~V0¡®ûè ^ðš‡6+ß7[ ¢R})2+{6¸ó-=Ýùæ Äù–ìªøt/”öÊ='ÿüy54¯†ÕøñzäÅzdqñý0·ÝcÇÉÙ¾ Ûø}âûá¦ÙÔQµ®£ZÓvâ«Û†ºG:y¼LÞ~¢Ÿ|à„KDÁ5ˆ‚ObÕ%P*åsG-,º¿c‚óBýl§eSÝQEŠiˆÏj$”¾VS§`좃ÊÁÖè¤\¤ÇZS»åÚE¾k·\[8µ†SÔ¿ÝÚ5#T}[8õ¾ó ¤[Îwœïkœè˜í˜µØ²ÄºÌp½õNócÖ õˆå°Õ†%ä²[cìv«ÝjŠŠÆù7)Π¶ÛÌ&MBTT\|RbJüß”-gEnì.biÄÇ“;UÄzJH°Z-ú”s‚}ÊYÁ>¥3Ø?]•’a¹WTލaBÛœµâ{X¢¸q­V˜H[ãJ››Ö˜&¥¥&pÕY×W%t†þƒÉŠø ¿ñCqŽ´êRþ©Àï´6´+v†þŠPì¯Qƒâ¡„pô®*ât>öÏ‚ü,¬|fÏ_néíÕ\iƒÛ²šs^ŠE ¨Cú zŸ5ßjh(üŽÍS½Ô¢|àKJÌ·§&æGƒ->G¾-5ìdžÔëE\\lŒV‡Ý"¾‹GêͱExì(V÷ { oÚºã²moTt7\ùú…q—Œïå.ÿ­Y¶rÄvôÑ´|eɽ{»¦§XØ1õ½ö¦<£îÔB)gÀ’¡3®þ[¦‘öÃíØÅ?ö]aà²9Ýœk.1kúÅôsŒç•†11cÓù4M}ÔÔ˜ZÇçÍ›]ÞOü¸ËÇ1Gã?Kü¸ë§âŒs:½IqIåIs·:u½yš¹wÜ@ÞÏ\ÎKÍe1ç9ƪÌÓÍkÇg_[l,V²mVJvuv2Ä:$cÂÎ÷âolU·I€¬ºžy£Mµ‡d»ÞvFÕª|}Úó¬z¾´*kºÍ¶ÛÎlvŸ½ÖÞh—>£‘ 5ìÑÂoìâ|aŽc×Z,@õÔaûQxÝb³iE>´CØ;wû¦ÎÙm¨²/ˆÖ‡#Ѧ°»F‡ÜuCUtšÎ.ë_xͺ]ºý:E';u…º‘:I—"æ¥KÞªK3ЩÛΤÆ$uoKLÉu–³ÖÌóz+„{ž:Ëéjæ!Ö"ůàðÜvlS`»8Ú!²Ö0õÜý´žÔŒŒ~¹Ñýs²ãâqe1q9Ùª?¥j¥¼ú­Kß\8kÏ5µ+³ZO¹þºpÑÃk/_¼æºûn:ñàj&5.â–ãetØ7(« ³ÉÌ#çÊÅxi¿P^ k£ìú(}”¹‹=ÊL’žZÓ’!ªû­z¦Ouua]xª½s…Û;­iï´¦=‘8ÖÚrúçßÅ]$þ2QV7æÎ£‡Ï. ÉK>|ÏÄS޳ZOoèzuùˆºõ̹O5©zö;d«ùz>Þ Ûí8ç竇c²½ºÜ¢îO5óÅ .'¶?̯6ÓicíË<³ð‚Iƒ‡ 4)&EÎX3oØÀG» -¬jl¤´á­i-{ï* ÏçGq´ú f;Ö¬aY6ŒÖŽâîçfk;¢Ù,ý©pMò/·Ñ$_­©;Ó†ÑϵùøÌ8ÔÑÆÊδÑÿŠ6zú®MVÛ¯hc££m¶pñïæéŸÒ¼A¹4ËW²¬/»´/ëÞ3¯'çae64‰•%V%òÒ¶,Š]źËy2OÎqQ†«;Y.3õNq¸ÝvmJœdáÝM¤§Â­[ñ˜rr²rÚYÖ{íÙ¶÷ÚmíÙ}ûÔœ!·=·7÷¤Zx,6÷œØœÁRNv §¢ðt½|¾·ê㮚àÙ²AïðÏ[6¬â†ùþ®únõKn¬¸$xíù[P_½p•ß#¿|cCöøÛ6O?‰àùVÎø¢tgéœQÅïî»ã›õ'?[Qgso®˜q, ô¥æ™þ{ßUÕqî?{öápäp6OaCQ|‡5ĘUb” x@kÓ4õ5¢‰k-ÁG5‚<ŽÄ•r¹61h¢¯‰.+©Uãb×Zc­MØÿßÌžs8*¦æ¦]½k]2ë·¿oöžÇo¾ùæ±ç„­”h”£’!ÂÛKõ¢^^½“j¢&Á&ÞƒÉûr4¾hÕó_bÙyþKÞ&¿0•øx“°°ÑñqãéHFü¡ÍR­.…u^ì¼Ô9¡éFöÆyƒãÒß\ð¥áÅÎË:?ï<6ì!Ÿ‡°ÕmÐãGaï6¬ÖØYóZg­¡V2J¾þýLÔ(õùR~íë"¹üëtËߌ˜¯†.L g„í¡Å˜7fOâÀæ o6‘øD`ï`5Xö2 ªõèíï4ØÝ½—:˜5Â.õbM`“˜ûģߴøð>‰|Æò·æ0¬ÍòCœ)ó*¬Ø½¥0}V 3ºpbÀ#>5|G Nß–Ÿ°ûÝ-úfžôðª×´ª³^=ê‰Á>Þ†Õ'‹g¿²=À0|‹4mVú33õ—Þ","¿ùþAzõî OrÃŽ¿ÜZzBOè =¡'|‡ÿO «{BOø_*ûŒ§zBOè =¡'ô„žÐzBOè =¡'ô„žÐzÂÿÝàþì†-w“Ÿ3ö„žÐþ/þ[ù8º8>Z•ͯ2ÿcZc:% ¹B_K$G…npIãF‚$_¡‰"E ݤ;Ó˜H,JÒõ^dµ4FèºYÚïüvÕHCŠÐ%âfX'tJÜ ¿ºL Ýà’ÆxΠ݈ôW…îN†;Ó˜H!Mè½Èㆯ„n‘’ÜÆ±/Ø×·<¥\wƒîmÜÄu#¿_Åuw~ßÎu×÷s½—°¡®ë6Ôu݆º®ÛP× .itêºnC]w'óÇ…®ÛP×uêºnC¦{¸ð73nî#¸îér_aº{"×½7÷d®ûA÷uŸÏu—ô½yu=Àå~ž—!ÎÐ×¥—Ùß%M¨‹ÁÓ¿Âõh®¿Îõ!\¯`ºÉ…¿É¥.O—ûžŽ¶¼KT‹ ÇU%ÉÄJ2 §’<’ ØH ÉçwC¬:»¦á~O1O&’•ÌÀ½…Èo#…<–™ÔKpMGʉг—¥U¡±Ti€—˜ŽT‹! È"ÜË#™ÿ#6w§wG­ŒÓBRľŒ‰»*‰Bú,²zذ:md™ÅYŠ2U2 厅ºJš f÷rJvj‰œU1Rç¢>•<ƒ’3yMìéÎ$ÌçÏU2?±âãUHbpo:oU’Å­4×"¤OìTôØXðŠ#s³qf½È"nwfW«°r&çjãöfñ|^Æb<µ!°ÞQÁ¦Däay'Ï’$´XÏ[àò$Ÿ[+µ,à%êm(æu±Vt_¯gi •E¼éo g™ËŸæs è%,eeð+ó»»ÛÍžçp- ¹A2šï¬©;V¹÷”üà6ê*=ÝÙÓÜë=çðËîÛ®×~/¯‡],ÀZ¢·ÅÆësx<+_ok:îó–çñQÔ}Ku;§ÝaÓ Þ¯y⪷J׋ËçW•³]âô]½–2)¾µ‡ÞUãb‡Ç©ÉÖ uj^nž­$?C},¯ ?¯ Í–•—;T˜“£ÎÈZhµª32 3 –d¤X•–£fªiª­ -=cqZÁ"5/óþ¥8nŽÓsÎÈXX”“V FMÍZPW˜—i4+£ )ÕQCÇÄòDS“%%³KbAZqVîBõ™Ì̬êuFÞü¬\uZÖk^NZaŒ:=ÍVµ +M™V”›ŽâÔácÇÄÍÉ+R§•¨E…ªÍ Ê™y¹65­PÍÏ(Xœe³e¤«óKð$C}üÙ¤‰xZÀ#ùyéE l*j(¶¢ —¼Y¹ rŠÒ‘Õ–§¦gæç ‚´ÜtäÊB‚H•‘kª:êÎËÍ)Q£²©‹ç³L]Eå:wˈ'Og.È(dc¶t©Ùe=Ì De¡[Æbfø‚,ÔšžWœ›“—æZ)8§éL3 T47UáZdË/²©éK˜u‘Æš‘“Wƒ0æñÑÆf×\ø5›K$ |)ñ>Ó:žÏ„wéッty‹Ü ÿ‡üà×r“\sÇŒÿÏYeºØ²Z²œñsœ}ƭɸƒ/gl1 7Í8z2û«:ã,ãsÐggCŸcü!ô¹Fô"cô%ÆbèKÿF¨±Ôø*ô•ÆUÐW»WÉý÷wˆì^åþô½¦‰„š&™–ÙôcZgú‰©ú[&ìMÿmºý«^¨¥×œ^ÅDîµÔŒ]­ÙÃl!²Y1GAdއ>Âü+è;ÍuÐëÍBßon~Àüÿ 1ÿ'¡æ£æè—Í_âþUóŸ¡ß0ß„þó_ ß2Ãò濚oCÿ:Oö”̼5äz•¸¥¤Í'ê‚’‚’¼° cÉ´fÌ/ KsÒl¹dÁžòÄ* ~vF"[§ onÄB„Ž÷(twâE‚¸½XÜÀߢ¼I—;ÞE|H_ç‰ǘ&%OQIHòŒ§Uì õ” ýH?“‰™ø“`3`Ôö&ýIÈ‚üÂ|²—_?à×Ãüú)¿žY”QK.±«Dø5ˆ_cùu¿&ðë$~–ai¿Îæ×ùüšÃ¯üZʯ»øu¿_¼hñ"é ~½Ê¯7ùµ“]©‘_~ à×ý½”%Ÿ•/É×ä[pm“ÁÛdP Q†XÃÃÃÃtÃlCªÁjÈ7,5¼lX‰V™°Š|ÀG“7ŸÅ}äòøhØwÆ¿ BNܧËÇnê3Xâq]Ι­Ë”h]þp¥.çfê2;E—‹&é2'R—…+ˆ}Bͦ#ÜEúéeb„[H+fèLJ=9©”ýý˜;‘^õÔï¿)d¹.W­àé ¯•¿VÿZËk§ôØšÉkRÖä®yE•%–Í.Ë){YÄ®®¥kÖFëù×^ÑåºSº|ÝÎS™ÞXóƶ7ö¾qäóoÜZ¯¬àw-<6„lˆÛ0yC栆 ¯lØ´a׆}ŽoøbÃmíÆ*îûÒÆ#ºÜ4O—?gLq{+ù­%om~«é­ÏDüjEpÅSK+ªôxEKÅõ­êÖi[—ëñ­[¶Þz{[ô¶=¾mÙ¶]ÛNo÷Ø>NoOÙ¾z{ÓöË;úò¸aǸ9;*v±oG¾=ûíÕzìíÚ·ÏVúV&ê±Jkå–Ê#•Œ5‘Þ 2ZÈXÝïŒÑe•¯.UªËÍzº]±BŽ1™ª·wW/ ¹FÈ-Bîr¯yXÈO…<#ä%!o貚 é-dˆ1BŽ2QÈB ~Õ¹B.²TÈBî²^Èf!¿êSB~!¤ƒW§.kLBú ,d¤±BŽRð¬™&äl!ç ™#ä2!W ¹‰Hƒ/±%yÒpšDgѹt¿ì)gËïŒnV·ÛƗݺs?ã~ ¸î~Ý4‚_'™6š.›nyPó‚–µt„ *„ ÌžIž/yVzîõ¬äϪ<ÏZL·Ü¯[X0ݲäX¶XÎ*TY¡lQ.aÏ“ãUåuÊ›z{zï󙫬ðÙäì›é›ã»Ã÷”g¥õóFi~ãý¦ø•úñ;éŸì¼·ÁïHï¸Þ_Ì ¸øRàÎÀ¦ <;”T´òšß‘>óú&ö=Ø/=8:8'¸‚= ~?ø¸ß‘þÉ!ƛߑ/Bn…Ž ]º#´&ôxèÕWMP'«Éêu³ºKý4, lDXJXNز°aUa-aGî„û†G…?^þÅC U½QñÙ€Q¸ç Ÿ í‹ð/ØŒâ¶AZ= ½>c!ü©¥>Î øš]#="£"S"7GÚM#xü˜iDä1¿ñC&<¥FEGÅ"º1(rÐòAû]˜=Þo<âW¢nDOÞ2ðÌàƒ"çÞ=>zNgPÇ%Èà2Z¬Û°IY¨W¬@ ,r€Å@.ä/@!`ÐFmTŠ¥@ ° ø°Ø­õW~ /mþh†}"`ÝDaÝDX·ÖmäÖM¦à~¬<’Y•Y~ ZaA«Ó‚ëµS°Øúô–S¢¥ëÁÈz£00ZFí`´ŒÚÁ¨ŒÁ¨Œ›v°wðÑzlÁ¦l®‚M#˜“F0i“F0i“F0i“F0i“F°h‹£`ÑWÁâ*X\‹«äÎQá »°‘ÑlB´¹Ø&Qx\"™‰x2äl¤™Ã½­ ÞÖf‰`–(¼¬^VÎGÖÏ!¼­eÃËÊ-UÀý=­žVO+‡§•ÃÓÊáiåwyZ9<­žVO+‡§•ÃÓÊáiåð´r6Báiåð´rxZ¹°¶Ò úBxœÈ²E@°Èò€|àE @k·µÀÛZàm-ð¶x[ ¼­ÞÖok·µÀÛZ`ÕDìžžd³)Þ³dÞ«¬G÷’$öE{XÌ ÎûÞß{Æ••þZ«2ˆÖZ‰?¬ž k•°n6¬› ëfúٰn6¬› +fÊٰb6¬4–ɆeŒŠ¤ð±ZÞÜÞÃHýG—*óÙ}_uÚɤß¾ãF‡h©tü@k¦ÉZó^ÂÖ»TxIj7^r÷z— /I…—¤òÝ@ ZÐrOYß}íôú^«ÛäžUé>«’f…PÌ ¡Ò-R‰}]"öu‰Ø×%Ò¾ÚN:ÌÆHJÄHJT|0ûCA†áÐ%z0ˆ¤O”ÐŽÚQÛîîpJ8N ÷ ÌûóæŽ}˜;ö‘^ÈqÀ%å¤<€”ê€3•AŠÓ>§ÁÚïh„vˆ®Ñ>'ÒPísi0ˆÇSo Pp Œ”ôqïÏ]Õ@ °¨ê€àpﮪXÞÿ”µÎÌç´˜ËØþ2ŸÒ&£6+j³‚[j´‚_x•Áo*P³~3Ëà7ð›é˜<´V´¬õŽuÅ¿=à áb…•ÆJ¥¬r”òwsú"ׇ¨ìs>w6º]DIÂï.Âï.Ò>@( ‘À `°v¥ˆÒ?D‰ÞÃÁúÀ#ëÄ,±¯º=Õmמtöë™p¶3ÀèªÀ¨ª 1â-€Ï؇…b ¾íh};Z*ÅÃx>c4ßå!íðvX$”"?õצ¡‡¦ÁS²¹§ô‡ Á£ŠgiÓÑkëèÜHšiÒ Âýhmš‹÷´ ïi‡ç´ Ïa3N;<§Ï8­ôÖ&³–ŠÝãºûøôÝŒïôéèÝûuÉÿȯÔn‡ÇØÁÀvØÆOùJµÃKì(Õ/±£ä•(y%J]‰’VboŽvýËÇ¥/j.ÿFÔ^ /ÙÅhC1jk‡µv¡¶v´§5¶£F6w¡Æb´­5£mÅð¬]Db³7±Ü3‚º=áwŽ žërC®sÈÅ<ìRŸCêsHÝ oú-rœCŽsð ß"×9¾BB®CÈu¹!×!Ôu9!ç!ä<„‡ˆì\]ØÊb¾o>GžH=j9D¨2AkSfimÄ ãÆˆqc$ïjÅd`Ç“¡°&l†ýg±òÀR'B>ûOÈ©ÌÆnËG‰Ñ. uR·)#¡Æš1ú#À­¹Ú« ¹Ú”§ñ< ϧi¿Q¦CÎÔ® ¤°™Š”Ó¡…bÞLE™ñ¼ÌXQî^v¼2rð0 êLã Û”ÇÉ¢Î)À“κã•g Ì’gçxK*•9°«½ø_V»§CQs‡2r4Âí÷ðð4î%áÞTì´fB2»™‘º›E?5‹~jF®fäjFêfÑWm$­+£ãI"¨uÐÇÉ †ôIèOC²=ôT­ŠNÃ>úÐÁŒ¦@š¹ir¡£Þôn%ž$Â:à‹{£±}ð0<‚çã!Y;P'¬À½Ç!'ó¶1+uÀJÂJ©ð*Xª–ꀥ:`©XªƒµÖꀥ:HE?ðVLáì;À¾ì[Á¾ƒÂÎhA%{@+:(rÐ `1jˆ­¹…!Gc½¾Ã¸—„{̲a¨¡™¢wé^S3}œ×֌ښQ[1jkæ¶z6Ók+CMÍtÒe9ЙÝò€¡— †íMQû›¨½Ù¥æ7Qs3ÓÐþé¼Ç:HdwcÌŠÁ¬¬ÚÀªŒNF»§@‚?g}.0i^æCÏ2…€÷²!CA.–%ð¡÷t*üa·tMƒOY_ ÿÍý4miC;šˆó\Ľ@ŸqDϵé=‡|Sá‹Éó·0{Zyou|çñà/zÉámè¥îw̾søÜáez››¾3/7Îá‡ÜBιÎ,˜uèí˜ é©à3o]©ûqŸwx$k', ï«mkC·q?Ïãíü=gŸ ]Ÿ‘+•G±³ÓgåJ—¶ÿm®ämf£ŒÍc±7ù1ö%?ƾ¤ û’6x_™ÓóP‚‹÷¹ô%…mbVrV)|L¤¢_«Ð¯U´÷J`éí$gÈçx˜>œD¯´Ý;àùxáAÎy÷ºæ‘—y„µè$z³í>óH›sQ6å3"˜:Z_à#ü´P?Yhâs ë©Txê‹ÜÆßåèü à]­ 6®#œÍ=ÍtjÓ™µU%Ÿot›Vb„WÁ¦eÝU4ÈÀ½LnãTšÉFø">ÊËàU´(–KŒæ¡èu¶zè+G‡X9*Á¸’³/¸/¸æôe%Xvo¨žÐÌgÇi|ÎÕýñ‡›‡žGÝŠi*ž§qÖ•tôtÈ ÜÏ„\°¹) 2X=2( ¥€>O=øºç-z¹™³LBíS£¦ µ3_¼ÈK 9mg%²ÒžF>MN°f8Fð3`«Ï†Í©¬ùz\ò˜ƒÅȬsp¥ËZS&lÂf»J1¿Œ–çìE¶_Çèoåu¼€;©@Ÿ÷Y}|e>Isù:ÐÌw6 ˜[€…¶lŸÒUÛ!µr;1¯^ä¬S/éE”nÓ÷0x?{”Ô&x´‰Ú›qhã))ò´±5Œô5¶¹ðmvÙ!µ1žhë]Ö>‚Ò‘ï'Ë.†|W*vW¨ {Œ7”1„¯¥i¬ï]ÖÔQ6ãCù]fM™×ÀJÆ3brᨷÇaùiAŸ´ OZ°IÂ$ ûÛ£Øi$a_{Tœ/xc†e3o5Ð]?ÿ{{¹V%N[½ËÇØÏµb/×Ê÷Ûã €Gðlîæ¼ãão9ï¸ü@çŠX±Û\VlÇxg'Q³ã½äâ'žèñSèñSèñSèñShO™xg.»ë¹Œ¿3»uû^ìyÇŒã´ËÌC0^×ÀÃàÑ Ø#±ÿ†öÏé°ÿ?“°¿”@É †àFâŒd$‚;`"cÉ8Œ«3yÁ“<‹`!sH ,1Á›Ì' àÍ[üH Ù²÷ ÷È^ìt›ú„¾ä B?ò B09‹ÐŸt „?"„JìšR%ƒd a’E²pÉKò"I>’‰úH}È©ŸÔDJ¡R((…Ia$J, !ƒ¤aÒ0#ÅIñdˆ´IÚD†I¿–~Mb¥¤Èpécéc'µJ­$^j“ÚÈé¤t’Œ”~/ýžŒ’þ ýŒ–ÎIçÈésés2Vú/é¿È8éOÒŸÈÃÒWÒ_H‚ôWé¯äQéoÒßÈÊþQʉԺ‘Ǩ;õÀ;ˆ'µ)Ô‹z‘§h $OÓ>´I¢ýh0™JCiy†FÐ2ƒFÒH2“¢ƒH2Lcȳt(Fž£Ãép2‡Ž #I ÷®¹4f’W©o«i6Í'¯ÑBZHÖÓ%t)Ù@Ki)ÙDWÒ•äçt ]C6[Š,KÈ/,«,«È/-k-kI¹e£e#y˲ٲ™TX¶X¶­–rK9Ùf©°l%Û-ämË;–wH¥e—¥Ž¼cùÈrT[ÎZ>'u–?Z¾${,¶Ü${-ß(2iRÜwò¡â¡xýЧb!)>Š9 ø)þä ¤‘O”¾J_rH VBÈaEUÂÉ*‘J9¦D+ÃH›2>ù;%³Æie¬2üAyLyŒ`Œ(OKÊ“Ê3£³î5åYå9r]™£Ì!_) •åä&‘<>5ǰ/(Hd!Õ;€Dj`z-Ð} dðM"C?ާ€3È3 òp¸Ü¾&¤†&@ü¾€ D"O2d ÇŸI¯¢Þš1¸Ÿ9Hž¦³p?r.0ŸÕàQcrq?Ò,üÎÜÆslDL¢îÆ"5f©4¯>rOL}Ìž¸êÃõ•·ëÏ2ÔLjð®™4 å¸Ð°œ¡6ØT,iØÂ1:ÃJè@]£ýB]“ýrõ’úùÕËë­Õ¯@®¬·Ö¥ØÏ0T¯­Ï­ÞXo«Û‰tµHw£~?ÇZ¤Ûˆô‡ë×pÜ®ÿ„¡ŽØwÖíµÕÇê×3Ôúý Õ'jŒˆ3tñ àèŠsLƒÎ°:æ† åÑ>†#_7ldØM¶Ûœq⦆m»ã 3Œi°s8âã¡3<ÕÐò­˜Þpx÷¬†c»× ¼õÀ\Äç#¾z°¿á<Ç'õûwm¸´»ÓîÉñ)â§.ÕØ}9òaw†{&‡ÏZìÇì+8>³¿ÎPã [užöÆ:_{m]½©.ÄþA]*ú‡Aôä5ț胣‡aïÛ¨û,ðÊ7Ø=«· Ï¶¡Ïª k ×Ö/C¾ìè˺L”Ç#ðÊ>ˆ>ÿ e5¾àTŸG¨ B@]›9n×Êq¬¾‚ý~šÁ™>éC\ò;â‡ëwqÜ®ÿ‚¡&ýÎðú!:à è N_Ù_ wñ(ŽTè©Ý¥__ϱ£a2Ǧ†$;fsì„íäþ6£:CcC:GSC6ÇqøÃ)ƒ ¯¬X+ ÇÏ Ãe‡* U .>\ÃàŒû#ÎÐåÃïs8â‰ðßD¶Â7sᛕðË].¾Ép¶á*üáª3~ú—øuøËuøoWúHÛ¿…ç·àOvOomöŽ*{*‡cÞqø{|Ÿa9t†¡Ð^Î`áÈ·â`sÔä®yª6 ú `-ôµ|‹ÀóˆÚ•öÀˆx4âÑÐ'Sé«·4lapŽ·÷ÁÁß}_·ñ{à ŽÏì›0?a¨=ñÉpIà3{9žf¨½Š{€Ë<6‚¡.Ö~°nÆq‚ýHÝ$` àË,xI`…ÀjרpÄþuÝqÈSöË5õGê6áÙ=´®i Ráòæµîë=‘õtZoÚéâgU]sã>[Ãa´Íu'1×}†yjiÝ4ûñºdû©Ú°ó8{P}Üž15`Œ0ˆñP¹*s•ãõ·ë¯pœÄº`=ø„ÁeM»Îq :€9ä:Cõ¥ú½ °ï-¤mæ¸]ßÉqó €¶ïçÈ„ÝVcXí: /v4äsljXÂáXSºì±ض{ÆÓËh=â{һƗc¼5ß5ÞÎÚÉî/ìF—±tcéFílØlà †µ¡3Ûc1vb1¦ɵ‡±.0œÄºÀÐb‰ã˜}5Çgö »ÔÞ€ï5ѰP{q &qàîµ§æÚ|MÌMg\Úßm鋵´Ënã8îžOéU¤jn¢ †¤ax¶ªíXgÞ¯/­ÞÙR_Zwþzþ:ªÁÀÀã—O@<Å÷ø×]ÛÓ·úvƒC]9|™a‡Žzþë?î ©Â»x†s8xE‚àŒÇ Ô¦cþÉØü°…í…öìÂø`þyšÁÙOâ¹Þ/{öÖ.A¿,±'ï©´_ØSÁÆø{6#¾q‚8°g ⥈Ø÷Ãø×;ÿn‡‰±£ÿ®†Â¿¨áÍ¿¥áÏ¿¢Ñ?#Œ9ã!þÕŠHþ͉¡üK#ø#ø·"&²¿5§ÿM±›•CåpBåò(b”*ß nQn1dµ[‚ña²Î8Þø˜´Î8׸PzÓ˜eÌ’¶s¤Æc¡Tiîeî%U™ÌïK¿ò¤žyRò¯ ÚŸ}•‚>Çÿ?ˆ3Aÿ‹ýaì/xÁ™£q„q$!ÊWÊMòÿÉû ¶¶óΣk,dÀ˜G\×!„¡@xÀ½øíDò¸Ïÿàp4î÷?À½øgBew¨H›à†€³èƒóÁ#ÀE` ¸\nw€»À px,¡Î,kìšäOè¼ë¨ÇムB†c€8 HA=ÎÃé@!=àc8ÈC}Ê" 4ÄßÙòÇx¼€9.Ðs_H#’ 8Ç\ o…« õ8ÉÓ7át‘^â ƒd˜\$ãäÎèÓdž,‘Uò gòDIª$C’+Ù/©—h$:ÉqÉi‰I"mƒ…€&°8xL8ÿÌÉyÿý@/¨Ù@ÿÞ{gAÝ“Ïáóø†|g}#¾‹¾1ßßuß­nò;¾»H3¾û¾ݥݺî<ß’oéOG»U +}˾µîß:£6ü1þ8RÊHúHÆHö}»Óǰ²à”{Âýá¸ÿUŽa«,e«ËV9«¼ký…ðZ¿†µþI•þ!V<­ø'¤©†ü.V|”ì¿„uÿtü¯âÿ‘|&þ×Xý¬¾–äbõ?M ÿÍ*!*r–ÙÏ~úv«¨èINz¢¢çPç@Ÿ»HÞçß·}ï ï¾xÿÜûÞ¿ôþø¹À¹s&žû%÷KHó”{Š}£t{)ᤠÒ² ^ &1ÒFøÂöøïÆ—Hã7â7HìÎ&ø‚lW|!ŽùBü?Ó(’ä'Sa?KÜ G 99OaW;• ì!œ?8• äù@qès€èTUès]Cm4À¡0$§º0–‚p—QjYIN!~ ˆ’“¸:ÄáX´îßu€>ìÏЙP{à<ÀP¸ý&OT®ã@ÐÃÆ <³>¡yÉ)°±vœp6T'ü0"p¸ÀôÁ¸D¸ã·Â §.ërjœñÆøcŸ¯½Áë7iÉ-™0';׌>~ʹ~dÚçÜ0ó‡\1ÆóÖ$WœqØš‚«£¨I2^Fžb¼jMw¥o']¬&ÎxÛšáÊ6NZ³]yÆËÖ<´¡í‹Ð7ÉUj¼ºœVi<ÏO¡Æº-‹Ðò¼µÔÕpdѼêRgѲ™ÕèŒóÖrçºñ¡µÒe0>Âøã  ùŒÐaà¬5®Nã3S¹ë´qÅÚàêå ÚtðRÓU—…O@îä“YMªe¿ËËﱪ\>>ÓÚŒšäŒ sõ¢¯Á5Ìç[;\Ã^k§ë<_l=íE½-ˬ½®Ë|ú^­]fµ¸nv[®Û|•Õëj@îÿЛk’¯³»âøƒÖó®^cu¾ Ù•b3ç‰MÊhäü9VO¥[A}‚«óù[²k”¿dK…¼Wm{\OgºÒ …¶ð9nËÇ8/Ë“mÅ®g,§-‘Ÿ0š o'ÈzÕuÏ8j½n¯ÙÊÂß´åRã¤]+\àõÖÛñ¨u¹Æzm¦lUÂ~ÚV'dòh™pä¦í «´ÛiE›ãLÁ^] gC5=Öy×<Ï#ÈÛ¬‘ ÖG®Gü 32XW ½€õ Ë)=g9àJç‰9YÈáŒÏ„|~Á¦q5ó‹¶CX‘ÇÖapûÄ– 3{‹¡r ÉX‹g.]Cã°­ÂUÊêSùU›Þ•½ÊxÞvÜ•~dš$Tvóׄ*þ©­K¨3$Úz ·ç”îã(mHD›ƒ|ǼX;!§Of³ š¾D«E8Ô·œÇô¥ñ‡`±ÔwâúöÚAß—hÄÕ,[À‡‹…ƒ}¹¶sè[h»àòö•Ø.A"é‘ J[3@§ò‹°Õô™‚ö .C÷mJ÷í·» }l× b» Þêl…:XÅ„p”×Sº¯Ú¶G8Í ]†Û”PÜWozú¶iïÓZ‡ë ç[_ ³Ý¶àê Ò°EXí+ô³=ŠCô J™¶­BºnÛSa°ïŒí94 {ºúLL"‡í s\ƒöع0=d—aÝ©wòFSºï,¥ûF}åõaœ@ßp\—€qÔž(œë»n[@ý-ÆíûnWGß]{"¸%ö4Ð3–c®ù¾ûö½° ›=Ë•Þw~Aé\FÃ;úð‹°a©iV¸Ô·d/Æû–í%µ¾5Œ“'GV…‰¾uD’Á„C¬åE˜æ3íû…üºÔU‰¸Ñ+x 8)‚ÔX ~0HÛ`]6øCÂMSŒiR˜ƒÀÚ¡",oS{èSØ«]£¦¸ žÑ¾Ã”Ò9|0¤ê§¦:ï‘çV0¥Ûë…LS†]áJ1eCÃk†ûa‘¿`Ö»¼¦tÇ —Ê”ç¸íº z’Ñ÷½YŸm¿‹•šç‹Ðg ,'ÇÞŽ8sÙ¾‰r°ŽæLs²'Ûœc­ôäu;é.`ÎwÌzŠLåöuO)±žrþ¸}Ýg.vÌcm(¤±×\æxè©4W8¹¼æ*Ó¬§Ú»çi ‘ߣBßfO3?Z‡¾+B²¹ÎZä¡Q×âé0Å!òW¢þ l`Þèé4t´ì¤»†ðøÈ„ý"«´¼"¬šì×]yó–ðÔ¤²ßžÓHåæLÍæqWºI‡µhî³ÏЪ¯œ/šTn™É`¿/<ÇŠ$ u¦kƒ;3>À¾9i_r™:íË®Ȳ†ÙgŸ/lØ×Ý»³tWÅÔéºl: ºÙÔÛWKVWÜi°äVAá”ÁfJ S‡í¹»Þ¸âˆs+LNX÷c Ó KÐ"þXà/¸Äv ›w$±<m†éîv“ù1Öþ˜é<òüœ#ÃÝö¬NŽ#›æð>ƒiãŸ1ä:ò\5Ô–ÛÙ\4w›x)_†hvÙt/œ_5úÜŽ`Î'ð‹nÑç(r'šn8JÝC,?Ëòê/Âå_˜ZflÀŒ·•ðÄIG ÏÔ2M÷ î1Ó¬qù=S§û ŸïP¹¯³ÜCs—Å4o8 ŒÃ2-TRÛsa/s4»o“óî;¦‡ð¦»¦Gðhø”Cçž1­˜ºïóÅÈg ÉlÜ‘p OhCX0wt`„ G'â°Ï¤°Ë4 t½„*æqŒ+X…%‡ÝK¦‡h3Þ7ÆVvÖ8*Œó™˜}9xW†ÑN‡øY3=qôB{¸;u¯›ž™vÏÐzaëbqo íw±wÌYÄãØ%;ÍÄáôÄð‡^OœYŠã|’Iåèž›Ãîûç=)ÈG=éÆQÇeD‰iÇUXæ"¢M±9Õ>ãÉ`{Äiƒ {D¯ùî½k%20²žŸÂÞqÔšá±`§›ò8é¸ÇÛíÄ®·Ö7†š z?ïñ1z˜ÑçùqJÓÓ3j(„-ÓzAÏ'ƒ^¢‘ÍsëXãé¥4êû+œAÌÇéÝ>?h¿ë¹Š{û÷R_ îµ*ûr)?ÔG<7LÏÀÃms­7÷„ë'Yý=FÏRÚ½Ü÷Àš.ÌÑó,á8Ú—šy´™7•£M'“¥ƒÑ‹Å¼Ô²ßÓ`¶~dŽLxVXý#Vÿ„ÑÏ(í¾n´ß æ@?ˆy°_ÊèæÉRó¹þTä]ð¯JºŸ ÉØeî$àN£ÆÓLiÏ F—³údJ»—y}ÿW)î›Ý‰‘´):ì2_ –Ü·ÆH5_r¨öPÚ3ÉèL´ÏÄ>>Î_È92ÑŸé9o¾:ŸÖ›ošT9¢ËXû ÄÌW Ϫ¯rêŒW ²ƒ´†Ñ‡(íö€gÇ€VÚë6QÚ3Ki“Ezà(½?Á=ä Xõìkwq0áh8nJ§'AS^¾ëê‘Uóê@_ÑŸ?Ѓû<ÚžŸÆm¥Ù}?íZ$Ñ{~šíhI¼ù ?=`ct£C¡I…»¾¿x`Ð<Õ_æºjžî¯p­˜óû«pw1×_ç²x×½c¹ëlqy-wœ-Þ[ð¬X#"l§H¡‚Flרy¼é\0·h‰Þ\K‹s··ÐÒn½í-±s¦y÷[N8÷zÏÈ–në°·šž4½õôéUXÎ8³pÿ<á²³mðTyb žUƒ§T‹É™»õ¬Užß­1Î!ïrpE‚ÏBO0‚Ï+ÐË3iYsžñ”[Ö¦LËu§ÃûÀ²áôx—†»M1î4ú&öþqñþq޽9ÿ8~™hÙ›ÓßeïI?Œ9>O2ÉïB&’FZÈŸ‘"bE:ˆ â&_'Ãä?%9¤&£dŒhÈ÷É5ò.™ ?#D¿#Lþ'Y&§ÈSòkò§N’CÌ›ÄAÆ$ƒ’Ÿ‘ÿ(ù¹d‘ü2Æó ò«˜‘˜ï_Ç\ùd[ÌTÌO%;bÅüBòZÌÓíÛ$¿³=sû§%Ÿ’Ú¤×%Ÿ–Þ”þ@¢’þPúC‰FzGúI£ô¿ÅJ%­±;b_—üyì'b÷HFb?û-ÉùßÚaâ¶ï°îðp;wüû>îõßÞ1Ê}|Ç÷vLroîøéŽûÜWvü|ÇSî«;~·›;BÿæÆããwq||rüëœ)þÄ?â  g¹Á„ØÉq?Úùñç~ºó;?ÅÍìÌÙ™ÃýõÎÏíü7¿ë›»¾ÉýœH {⺇¾ÙU1LÓÀISL)¦sŠÅ¢â±bÔSÅs%§”)•»•iʽ(³”¹ÊBe‰r¿ò€²ZY¯TÐwn³&²/˾L8Yµ¬šÐ_œJær¹\B¸®„H¸R®”pܹ/’m\÷eÃUqUDÊÕrµ$–û:÷u"㔜†ìàÞåÞ%;¹î0IdßoLâ¾Á}ƒ¼ÆäNbÌS\7ùû~ãëÐz&I•þDúòdš# L2ö^\…—´(¼ ŸbXq^1ª¸¬¸ª¸¡¸­˜TÜSÌ*æ+Š'ŠgJ¢”*”ÉÊT”{”™Êe¾²XY¦¬PV)딕å!¥^yTy\Ù…º e’WÚ”‚rPPžS^P^RŽ£Ïfª&Õ^UMâgÔä“òšò¦rBU¨œò•ÓÊ9\]µ¨|¬\U¥)Ÿ*Ÿ+óUœJ¦JTí¦÷Œý h3e‹µÓßx)"°ÝRò,¿‚Yû;°ò1R ;ÿ>©ƒ•ÿŒ|•QÇÇMlil)iŒ-‹-#ÚØ¯ÄV‘¦ØÆX-y7¶9¶™Ð_ óLËô½æ°¢XÇÀ*)S&)S”éÊ e¶2OY„¼TY®¬TÖ(P§R6+uJƒ²CÙ©<¼°(J¯Ò§F:¯U^V^UÞPÞF>©¼§œEÝ<ê*áZœbC¹¢Ø@ZWÆ)cë (–ËŠ5ú–hÙËN²·©ÇmÑÖ{HEä¿"½Eþ©¾ÿwämò©$¶>¶žì£¿%IJcu±:ò"IXßÉ~OŒäÐ7ÉÎò‰DŸŒ²( ìÙöùÙz)CŽ>ÒùúäÃÅúTö¹L¿çp…>“ÕWés×éóY=½NëÄvb?‘>¨/Mëi_ :–HÓ±EZ£/c ×iI築8¤¯`×Å~”¦óÑR„óéCòй¢<i=Þ‹xŠä-/ë *k—¾Šé…××…eù¢¼ÐëT?¢^õ/@æŒí'‚Ê"BäêŒö£cÚ0§¨qîÈ5¤cˆ2 úƒ[ôx4TÒëb{±¤×õš°nűiñ@ésúC¬¼ ×‡õ.–âÜô3]O±y¤ú¢|Q.é~¨¿(›XŽë¾¦ï:|Sß³…ÏHY¢yÕGéA,‹#x£òˆú‹¶…ž:Òf3C2ˆú£uâz~Ëb™óùEys¢ä?Sû¡´Øsµfë¢Ëp›)½íð´^Ð¥é§u{õs/ÕË‹ÊÀoxýUí~›yzBúõ\µ^U6?·æå~Y)ê%Z×­EA=½ª ¯»þe¤‘¶OË9ý`8n,è‡õç-–bLýó±þBøÚªþ›—Ú½¯ŸêÇ?×_ ë,sÓ6h©ãô7Ã2¢½N¦ŸÐ%ꥺÝú©°Ÿ‡úè²ô º\ý"G´I”ºBýc:†®D¿¶W± Å:]u§Û¯ÊtXÓv¿µ¡íA«ªm©µ¹m™ÆõV]Û«3´­·v´m°vˆ‰4^F¯1tØZŠñ£ëáÿº[m'˜ÝŸÞœ#¼æ½í1T†°®_e{=Q¾mSÑñ*:.…tDyjµ´Ç‰1¤ÕÙžÔêmOiõµ§‡u%ÎE»yÑþU¯; ÎôLQß&Ó)Ú#÷)¶m·®¥-M×Þ¶wËXâ> 莵eéN´å2º»­í¹"Äqδ•°ÒÔ¶_çh; ó´U3ù_ÝP[=…hwº³m VŽ´i#÷RÝŶÝX[{äÞ£»ÒvŒ•×1ôÈÖ7ro¯ÚîN[7•—Éx·íŒn¦ÍÄúÝosDêK÷ Í£[jÒ-·Õ­µèÖÛ.ê6ÚÆZcÚ®´Æµ]oMj»ÕšÒv§5½íî‡bá‹ö>qO‰ŒÃ/+£í+z<±žîc=öö¢¸xÁøbLïD?}>3–h;j‹å¡ýY³Y¶V×[,Ãx•œ/‰µ[l9²ý&'Ê¢÷¿ˆXÊä‰(Ãû~TLÚR¾Œß£QúŒš/¼WFï«Ñ¥-"ÞE–⚈ñº*¨ïžÇ=«¢¿µ·gP?h=ßžÝ:ڞךÑ6Ãp¹½ˆ"|.Ž'ŽMù»Ú^öa:Oäý±èâ½q¨?‹ßØ'Zo´—‡ýžÖÃï¨ÿEŽ×z»½ò…÷Þ¡q['Ûk¶øaTŒcQë½ö†-÷Dô‰³íªÃ™í͇sÚu­óíFWµw®hï<¬i?Ýú°½—}ÆõÇÚ-ì:®µ®´ûX=Ú°24£Ëڬͣv/‹žäeý2!ñì7ðþ>þï ýèÏüë>iÙ¾üš=Qy—=Qù#éMé%^ö,eˆ=K9Çž¥L³g)Þ¥üíŽoÅíæ*Ø’9ö„俳'$Ížü {Bò ú„d[}B²-›>!ÙöYú„d[>}B²­€>!ÙF¿“6B.n>Gg“*¹NnwÈ;å§å½ò¹Eî”{å>äà³åçå£òËò«òò<¹J~W&å÷äE,ÍóòJä‘ÉWäOäÏäE_¹PMª¥Õ ÕÉòRyiujõžêÌêy9K•òÌB“ŠH?•34£µJ^IŸ ÈÔôûiQ§Ün¬ËŸ’oá|{ i;ñ–’Ÿiœig~_ò_$“d̽˜Ÿ’rúüŠ`ßÁkŽ·’d„8Pa¾ äªì¢äÃ2_†ÄTÞYÈyi­,ò‡ŒGx|ý1!Y„þ>Q6‡S5ýð\¤’Çþ³˜þÚu,Nç%dx:@v’J¤DR…´‹@Y$‰Ô ½FêÈWÁé×HÙ ËS‘ö{Ài¤éã¤)œAú™BÚÙJ~W’(I$ŸdßgíÙ”Uµ´­PµT£P-«ÖTëµ§UꘪպKêuœ:I¢ZV§ƒÊPgWõ¨³kªÕyê¢Z•ºuåµ¥òêšúšu¥º¦jBÝ@sy®<«¶T­R7WMÔªj²äYjj£Ö 6¨;TKª%u§jš6“ã°TWQÓRµªöÒQÄ$Ï ¥DõiôôÕ–jÊèX Ï«GÕ†Zèu†uu¯Ú‚þég™ÍBÓeuøËf|w¨ÖêxP†ÚÓêaH[‰ÖWÕ7T˵¥òDð§¾­žT­É«Ukê{êYÕzM=AD ¤h{u>g¨çÙèÕªzj²ÔÙò 0[+ê't\q:bàBý ˆA/ŠËj/MT¢‘b=4 §F]©IÖ¤ªã4{4™âhê MËÜ€&_S¬Îƒö!-¸%‚Ö°žhÅøúm°®¹¹…ÿ-ÐܬZ­šÐLh¦4Óš¹°¼xQ=­Ó,È·p–õšEºÊAPèaþ—±:åš ØX¹¦ VÉ$ƒ5/kê䉚ƒMm³æjC£×Õ‡Fc˜fiºÔ)š´â5¶Ú^õ°F :„^5ªIÍ9ÍØN ,k¨¹¤¯-­êÑ\S«´çµ£ÚËÚ«ÚÚÛÚIí=íl•^Û©ö©6´ól%1ƒö¡ö…æ’v^ÝìA¯iW´O˜í„µÔœúrM!]ñÍ5…ßeT]ƒ„‰@µ-í³&BÇn’6%Ô6×(ª™­^U;iª›šzyu•©§ñ~ã‘fI߸Î*Q.k?³êMuº@ãzã†6F§M’WkS ½6]›¡Í®¯׿A7¤j¢f¦1·¶T[¤-Õ–k+‡´5Ú6à ú¨äYU‹ÚfØ:æÐêjÚkó4ƒ”+:³Ö íÐŒCw=535¹ÚNíim¯fÖ¢NÑ:é*i½ê*I+øX³ªyªy®î„TðÀFiž7&Ê«ÕWw‡õuµ1­qoc•¾ötM‹¨wuLcn°T×46–4îo<@½H¬Ó$hžkö4VS4Ö7*µ-ê$ynÌ·5ÛÑN¿Âë’ŽØFÁü¾ñp¢±»QAm§ñL£‰Åͬèyã±FG£G3Ø8¤Ñ7žmi¼Ø8ÖxE´nDTÚ^zfã-DW]Í`ìhÌm¼Óx·q¦& - °ýkß,£Ñ¶)Y[ޔܔªõi‡›ö¨›i<qX{­F_kQ—#:SÙ²Ôªª‰`4¦ëÓ”©¾ªUÑ•W«0{ySNS~S1êËš*šªšê`ßO4—š6iš©;›ôMG›Ž7u5õ4ñUú&[“Ð4ؤWÇÕöbµ²iÌEÌFtj 4£:¡|7#%µ`¬jVÓ…¦Kl/lž—õoá> Ò¶“öô<9ùR€H€Ý_B:‹4‚dBºˆ4ö¥µ/]AºŽTt i éÒ]$Z7ƒtéR7ÒÒò—–éo‰ÊÞ•ÂÛɯ@¯ròî+jqw %íÅCÏMäcD’°œð”qÄþêU5A$ïÔ¡œBypÛç«nÊ&B ô0ú<,„êÇ¡úéPÝtT?‘^ •býb ô\ý4„…Pù8⚈ç¡ëscM„J‘òˆ¥Ècôx/â)’·H¼¬o4 «œ Î)—EÈ.ò5º¾Åo4¢çŸŽÀDDÞž†ú-„æu³Q/®áô¦Œ4mÑ£X.F´K\“ïŽÐmä5‘”ò´P¹7‚‡‰¨¹'Bë)–‘¼Ï…ô˜õ‚þSò-2â¾3Q^”lås‹,ѼFë!ºŒž3z-"i³¢ ¢þžnŽ!ßÿs½Hþh¢ËÕˆuçë¢ËPù ðC¡—ÿ_JQ¿bù²õzE–ûe´ŽE=½ªÜâ_Ñåâ øǯ—‡}G®´!ZÑ.–å-mÚƒã3»Åkù1àD„Î"mƒ®·|‹ÊÏ&À¡wÑVÎ#ò°/†}òbˆ—1ùÖX3%Ç:ù-àJ®Î£Àe9‹ëÕWCu7€Û¡>\(^F¯¡(Ct=æª. Ê9‡x½z2(Öø*[‹Ž·¯^—æ‚%Ÿî¢Æzº ù°¢×‚k†8Îz¨Ü€ 1@\Hþ— :)ÑîªSBeº|Ë^ZdË·Äéê¼PYÒci„ì" «êò ¼TÆêJ &Ô¯a«¾ªU@3  @Ð œz ༿}Dî)—S{KÑ·^¶÷¼¬ŒŒ‘¾]Škþ²òñKðªù_{_¤¿hÿyÑþÿª2"½°ümÖ'rÜ—ì™/œÿEåbÄüzo+”‡ý­úQЪW€'€/„gA„ïWÅþâØÀ;D¾éÃsò­÷Ç¢ÿ‰÷Æ¡þ4~Ó}âé&Ì÷²ƒþ9Þ; òß{‡Æ}'Y¾Õ£b”‹ÞI•o½'Z úñ;{6å{'3Â.BíÞɉ²“¾ß)ÞÔexÝ"}€¶É^§ß‚Š‹ßɾõoê¹½Dàè»B$‰¤œ}#ÀE` ¸\nw€»¡Ï3À}àAèóRË¡6kÀz66Û”âY$)Áþ¥é@F¨>ûŸ€< (¥@yÒJ &8CÃG@EÊ÷i÷µìkßwl߉}ÝûÎì3±t""9”gßо³ûFBׇ€‹ûÆö]AºÎrZ©[¡O&´ õ½ƒ¾w‘®ï›‰H÷é÷??ü`Y…¬ÄÈT2ùY·ì4I‘}Kögä ™Qf$é2³ÌJ>Á¾ý»—}û÷sñŸ“ÄçÇç“¢øåøeòVÂí„‘â„'ü˜”ì|mg Ù·3ug*ùâ¿ú|I²$øMÚkäMBŠaKÅ÷£ð „¬P »)†m¯EvU »z;&Öx;.T&EŒ…¶ocíßN‚Õgm‚^+š}%Þ,>QÜ•Î|¨æ£ë_è;IØw¼‰ì LI$ì;ÞÛÙw¼ãØw¼wÊ:eï‘TY¯¬ºçe&èÞ&³“½ñ¹ñ¿G2âÇÿ‚d%L$Lì¯ï||vç;ß 9ÿbãJÈ%2¾ù× ü1R[t#†¦¢Ûù'Š&‹îÍÝcŸçiÉðxT´j5Sô„Ö³ôŒÖ½%}KZô$”nÐ$ŽøÁˆáñXþ08’8Nþ V»‚6·h?V?ìAŸ!rƒôýIÜ0÷Wî?à~Döp?æ–ȧ¤§¤§È—i %â¿“üÁ‡ÞŸTîƒþˆÜyîÙÎ]ÇXi¬O:Z¤°<¤¼j"¡@¿oÓ£KH ÙÑ¢ˆ$¿¹òæJ^iÁdÁ½¼Ò¼ò¼Ê<RQ^Í›ÏòU^sžŽ1D¿•Ë}‡ûæþ.÷]Ô|ûá¸ËÜe²ûKî/ÁÙ7Û!Ó"cÒij¿"ññÿü%Áã,’;ì)^y "5º t$:^Rž fImA~A ¿´à\~JÁZæž)Ì×\ʯ,§´øùs•×h›‚â‚›´® ¬`‚µ+*˜bm 7 * ¦iIÛRṮ>h[PW°Pp°`Që›R˜EAÇd(+x\PVXxÞ0¡,Äã\ÁñÂÄ ]˜VZ¸ó]`su±qVC|Bóœç<çýÜs_f¦áÅÞ… Ú]8© àpùÛ ‘|ô¹pÏ…ý/ÜG¹*¤¼‡åÊ ÒŽOxOml¼OüfãÅo‰÷7Ñøàø`“¯ˆßfâñ¡ñ¡&=~güN“iñ1ñ»MýÓîÃÖ.²ûiï1²z1y2æÏ ÷9²?î‹dVö岿äö<9ä¿á޵÷üµGåÜœ£»|¶ù¯Ék’×$7Ù¶ ×ËŸžS–›Ì©Ì©Ìí%[ÃÜ‘zçTæµ×Ïùùb³*×ËY'[eþ¬¼6yÅùj™›­6bÕ»mAÎ:‰±®mǶm òçæm·¶ymr/Ë+Ì™˜›Ì+:²ã3¯J÷Ü´ÜÞºçµÉ)Ëk“¿ôÈÞäèæò˜ÛÃå1¯½Äë—?QåüYù“òüü| õ\þ4oa¾šHê¹â9Ws$ÞÃüˆoÍO¯¼a’Ï’‹Åšïܤ+¿Ø•äWçç•Hj7·›x9¼|*Ï+ÑVòödŽö~ìýØÄ½Ÿx?1õâ7Æo”Ð/ÞOzÀ ø éÃâÃMfü®ø]æŒôUé¿5 Ó÷¦ï5g§ïKßg¥ïOßo¾ù_šãÊeï%ûpf¹¾wÒ‡·:‡3_vcy÷ÀšâZv¦‚ß:?lge6zBz´'óé“Z3R;W´iôtCO÷ééQzzŒž§§×£§§KOcxÒ2ÊP†Vägz˜ïE¤}ºûȵ5+kéÞ ó]ÛîrmMU¨Óß)úïÔ½Öz£¯-uOOOž"xJÃG\ŸÁÔÍ©¤ã?ókëÂ3ÍdjõC{ÊXÖEÕgú†­XÛ®"¬‹î¡îïi¥Sµû×å{ºY^+ߣ{Á̯Õ÷œnxØŠµu†­xX÷?Õ†§Ó ÿV>Q]X³Ì¬aUÐXÿC õð#û5­+dëк²õˆÖÕÂñò©ÝDèä ­h=I¶ñ­§òYåŠp›%[Eë¹á^QËcKÙ*Øû;ì©¶ŸI5d:éOtŸµ,ññR檸ô²øè¸ö€Ó>7™giÁðgr¬ì«Ì5É—dë{äøÒ‘í·É7ŽÈke¶z«ÕÂV“u«e¹¥Õ[ì‡?;Oop<êá#žœŸG“mœ¦Õ(Ù·¶šÐjkrcr£²ÕVíåñ[ãCþîÊõH2KJ˜‘ll”l–l™ÌIæ õØ!Ù9Ù¹{²§°Y²,ÙGt“ý“"W&G°Ëɉ²•…[K¶Ã'%§ÂÉéb£ÞZ†žf…~Æ‹ít4-‰­{Bª)áÀø¨ÿÂùÓõÿFfW7;è¿`ØÛѬ’Ï3ŽÑ¶±¹ÌÂ÷£mf[2—W£mh› ò¹÷1Úz6‹ï^£56jÊäsN-­gö±ÎnxDw´l§á ¼¹Þ<±xÒ{Jf¶_x¿•õ"o‘Ä\â-‘ºYî-71©›WLš÷[©¡¸÷¶·VæŸuÞ¿›„·ÁÛ`ê{›¼M&ËÛìm6ßð¶z[Åç‡Þ‡2ç¼þ‚Ì9/ʪüLY•¿,}C×öÀ‡áOêÈÔ’­%O«%?ÊRv›m“²öóò_‚®‘m&Ÿö£Ë²šú–cti6S>­>F§5l¥¥kéÌ~S#Ÿæ£Û£ÿ#!ç¢ÚºÌnÎFµu[Íù4øûîi¯ctké[Ñ­>æ\àt+ÍkµÚú®Ñ´] s²eNÖÙ¸’3Þ1µV§V­¥ y`-¹_­š¸VÍ?rTm¯÷ñZ>|û1­æd-K ÞïÔëHWšŽG­%ÿîTù¬´Kµ äœÞRÎÝÿÜÿ÷vAÚyù2?x"·÷n”9Aÿ)¦]fÛÌÍ:²¤eºþÃsúe—ñÈ¿û™ýO™±¿ôê›z™õ2sLsãùi&ŽþÎã?÷îÿÜÿq»g®1îYÛ@3D®ƒôùZsY/>cÎãÎZË9~½œõ_Í.1ÈÖÑl—­“ù‹l…üÏÙ¥üÏYgY…ìOûÍ—²üJ¶"sH¶oóÿg]ùÿ³ËmTÖ4Ýdµ7WØt›n®äѺóhWñh=ìö sµ=ÓžiJìÙöls ÿ‘Ö“ÿH»Ö6µMM/þ)í;üSZ©=Ïžg®³­l+Sf[ÛÖæz{¾=ßô¶“ì$sÿšVngØæF;ÓÎ4}ì,;ËÜdgÛÙ¦¯c瘛í\;×ô³óí|s‹}Ê>eúÛv`Ú…f ]d™Av±]lÛ%v‰¹Õ>kŸ5v©]jn³Ëì23„ejcc†Ùí‹ævû²}ÙTÚWì+æþ­m¸ýý¹“ÿl«²¿·¿7wÙ7í›f„ýƒýƒiß¶o›Qü—ÛhþËm ÿåv·Ýd7™j»Ùn6ßåÝÆò¿nÿÂÿºãݾ—¸2q¥ŸøafÜÜÃZKƒÞIŸ¬f®ÎÜÈg-©cQx¬EúÏëX\zœÅÜ:³˜_Çâ[ÇZÔïŽE³ð>HKl.«“×£ŸëZw©“ï“YÕ)Ãɬ¿]§<'³îZ§lµ­=±nSk¥|y­Ðºms¼u·¯³¦Ž·¾âk­çžÀºøk­çŸÀúʯ³Û2ÛX®¹Ý7¦Œé~ŠÖ<Þþªcí3ß9…}ãì7Âþêãì7ŸÂ¾ä¸RŽ:®U³ywVÓÈLzòv=Þ¾ç×ÙKÉOdí×Úo:¡}¯¯µß|Bûï|mûŽâ_6³Äpý¡ô¤å­kÝIË[×¾ì¤å­kýIË[×¾÷IËkåšPŸEFøî_bÜpŠZ7Fù)úhÝ7ž¢—ÖÑçý´…iG•Zã¦Sô¼º1úž¢ïÕqó)z_ÝýNÑÿZ‰c÷œ¢GÕÑÿ}ªnŒ§èUuc ¡^í6·¿·‡òNÙûË^!{¥ûü 暌qYY „²šeµÌÊ‘­YV~V‡ŒqºeuÎÊçØU¬º‹M÷¬žYÝåsK¶ÎY}²úÞÝma¬Ãû㱿ó—U¡¾ðtÔO¥|ê•‘è*rY¢eÆàŒiYeÂqÚ7ÿgž îÿ¸£šÁ7¯M¢ì¹²·ºÊ^‹Ã0µ+ ÷R©Ï1‰fRŽû9‰üD‡DgÙº&ºgÜ—1F7‘»rì,V9²5KôL”ñY69v[ /s[ë¨ÇŠÚþÔWèé°ŸüD3±l¦¾2ª2Ìx0Ñ'Ñ_Žc24ß3Ü¿«çfJÌ”ž™)=6Szl¦ôØLé±™Òc3¥fJ/̬ í&Ê>Iö©²O—}–ìse_†-–}„ìÕá.ŸóW˜kâ«¥‰ra¿Ä0Ùªd–Ù(1.¾J·Ä}‰1«ÄjŠØLILKLá³nO%æ$æ>Åma¬c=+ü©/<õ3L>“½Jä™õ†ÅÆ7'f WÅþ¯÷\5˜£OIôš"ZSuhûáíwÕùEZOïS¯N½o-3ðþ‡63sg˜ØMfð ´žH»ÿµÓÔJ)jþúÿE#¥øjdÝ<|µëD9ûê‰i¿üÓijë¦.vû†Ÿ(öú'Òî{šÚ¦´Ú ó™s"í¾9§©•ú;øÀ Úû…Ö_¯ÿ£½à«ÑšùÉêààÿþ–:#š)iýYiâþ˺æò—ÉzééX7á<8-*#Ü{U9GåÈJ4k‘߆9hÚú¯ »Á«Uok×*íNäWàXèlð“Ÿ.ªO}æ}&šì`¹±þ‘¬ðÚù²šóÿª²ÿ2ú»•ÁMþB‘kT¶c•‘ž„>æšà7rmØK ïÀÃ*|–Ú±øù96õàÊX¼}ÿ¹‘¹Zvø³È$á†àY­Õx¥Á"o÷Ï>¯ÛÎ×g´yÊHä¤ÚG„~)|UõÞ=~S‘oŽH~ìßü‹E~‘X)ƒ‘Èpü7e´~*£[Iq¸êý(úX–"7"­lä‰X^ê·!‡Âà3edÒGãÝ…W¡)Á~¬Rš¾¾ñ·þ@i!ÏQJ®TÞ_BÓoSÉIZèA5xöò‘ÛÁ5p9úi°N@߸&L]eòi¶À…pOh£œ'ÃáÊTäÁ°³ú‰´Ç3íeç“ÖZJºžz(vÞR[àZ·©_km¤–h¹àn¥èu&Yª´íÐ,#tì†~*ܪôK°)…Ù0~„ýÀçjbí…à8l&a_…á~I14©ßëê>µÎ賆zȪi–úJÖ +US³.Sz¼·b§2 Òèÿ¼Kdû¡ÉGnçÆ¡¼dAè4¸Ötôã°9àÆ&ò3¬X:êõFêr¥¤«rc¥øÔ<ŒwÁáJ)ïïµ/i)dŒÔCföÐRxƒ±Y§†²Ë¹^ÕL†;à:8n#Å!È[ «qæâÃÚá½+eœ<Ï¢ݲL×órvÛ)õNäIn&åj/ó††^Ö­ÞÍÚƒf>žoÙë½ø´”v/œª4Wa“„ дCNÀ.p;úÈ+à$¸[)%ôu8^K*{°)DÓ·?ƒ5„n€•hÊÈy5_¦-eK¯E¾VÛHJíz£öÏ ¨Õsž`xJûÌAæÏ®x{…­ «‹™X¢__‡?sg ,Ïd„v…éðJØ‘ñþ}ä(d&4ç¬pÒÑÔË_)]Ož„³à0˜ õì„úQð;JYû«ü[8^½qÎ2‡ö*rÍ;AèßÊ5wͧÑt½^PÊ|µ¾©Œ6Cv«ú}ðrèlô½ÿ¡¡L~"_ ë]R|‚ü*ú‘ß‚?‡}Xã­B&ÿZ©OÔ¿iH*Ÿ!¿?¤,¾”±æƒ˜´È¡í±BÍy¬M%¹-"]fÈè§0¾7ÂPçm»Â4â6$”;àÁä;à8x9¼WÇH0¾"3sï´öÂוþ‡Êh'¥}G¢_¨Œ=¬´Ø{hÒ°‰5Ug¿‹Ðëá"e}° þ4¿Çóä.Èüš"䱨‚5¤•³ ýËãÐy¾ {B#éh¾"4Í ùù—È ìëÃjèÁO)Ål8Íc°o×ArîW@Wê†ðM4“aØ–Á¾2ú·“—·K)ÝóÐ4—ÿç½y%é6AîÉyä¼uDs²m§½ÒCô‘YøŸ‚Ÿ¶è‹Ñ'îSøÙ@Cý´…·‡¸}WºèƒöÈsËᘞ’ºIû¡ð½Öƒãè™ôzÐþk´¾öOÁëJÿCe´“Òƒ¾#Ñ/TÆVZì=4ÒÃgÐÃgзghuTŽ5užU6ÎÛ.çS5ÞõX.RF ¶!“Š¿ÍïI} rä~MòXìGÁò™³ ýËãÐy¾ {B#éh¾"4Í ùù—È ìëÃjèAæo6Žæ1X‰·ë 9÷+ +uCø&šÉ°?lË`_HýÛɉËÛ¥”îyHhšËÿs„Þ‰¼’t› ÷€ä<Â|èwDskSÚn Ü ”yi³Ð æ¥ôóÚÏIk0$nd¦V[ôÆÙ#c3ž´ž"Ýð4´W@Ûy{ðÓˆÐ'ñv¡Kñ€>h<¹î€ùèéW©›tõ›º>%½=UÂù÷—5×?„w)#M”zvB=|Mi°·h|l"SÐ;ûÑ„æÀÞpú=Èxð†ÁíÄŽü3d¦¡™ƒü-äBxšàTø]èCçóiˆÞÞ|ˆÐ³Ñ|Žf/òd¼y1ØZx76×ÂKÐ\;àí|x.š‹ +o=x+šb˜Â\˜ /ÆòÇð§x{Rj?ÀæO„>¼•ÐLä'áý Ùµ×ËÊÀµ mäÀ.X¾…‡×á™èÏCO,ïßáíðrø|›jbMFSŠÜy3¡N?y­®‘¤_õ¥_)ÁN”qú/”Ò‹úÒßT3ùoØ´IíÓ;-¬0—ÑW÷³Îì £µ}„oÁ Ñ<Èzr®"}‘‡úlŒ·×àŠš*½B¬'kô{zëÐT)íVVª=Ð\†·ö*Ǹ²- »Ž(Ç>“´Ü·.Öi)b\—îz¡‘»ÎRK¯›2è¬ô£p úýJ÷ovMw]á+½û5o‘·Ýý Ò‹ðÃZ6?›°ùÈ]ÍQŸeÊÈ"J±žX‹õHÄ]ñµ§N˜ dôiè‡ä)-²ÿ}РR © V+ý8K®Gå:…çã¿=éÎÅ>ƒÔ3ð9ÆyÐ{8rBZ©W|J)»²\'À10?Ô¯§¶•ÓÐ,@ž@í%a%ÜÍ}žJrÂ7¢üðîVÍD½.V½¤>—–R¯)ͰÚ {B?ëéë©ÉõÔªKQ5kBûõÌrëñìz{–s‘çR:Õ§Q?[ÕÒÿ–»ÂÃ`øS¸ÚõÒp\Ì¥·ô¥Ý]kVQÔ?½k)mTMëg!?„‡ßºëSì iÙ©Œ¬Õ”½AÏB[Œ n±ë?®Ÿ„#(.ò7Ê݃`²†FyŠá T?þ'¤²™t&o“•qzcÚçÊ÷¢ËCciaŒ«ïh?•ƒ~µ÷†óIZ³Ý¸F“¦wöìN¥?Ñõ+ò¹’éw¥îoxwÚ-¢oŠÍ JÔ¹/í{€ònA3ÍtüoGSJ}އÃ`cXBè2,pq#ž}œ>ÒuÈž=e+ƒ†øœ®îÔfE¸fë¦÷4X ·ÙMk›uHvèGyU´Lû)úxË'oI·¦©Æ/A¿Œ¶C¿Ï{]màù2˜YËyg:^B¬Iè‹‚Oõ¬„þ¥Ø@O¸ fä•£¿˜Ï'•h*©½ò,7Ä–ÂsÏË"”å®}õjÚk‹V‘<ìWPW¯!÷$´;rdÖ´ÒRêó äqµŠçÖä§‘“Ýs:r¾Ž·Ã”ôYlÆ!ïÆÃnÒÝ잢ùûg‘ßwårOý‚”æ3ìui~ôê>ÒIåÈD<·Ãr?6!—“Ö¯rävC¿Ê‘V؃ü.òt¸Ãõùà>Í¿ÊÁBøˆëÏrÖ’9 ›&Ôí RŸ¦aø„t£Fh¹.ŸÈá³×AÚÃ>©–c¨·û ½ŽT£Y ¹¢ñºÁ»èÿ»;\gEúº¶¦÷÷^äO‘?u2q#¤ø19Ù §rí@o‘ÿheŒþ¬&?O+ÓþÐÇÑw†\UEª\à‡œÄ¨èj›ë;ÎÍ$¤ž$'g`YÇS®»ÉÿÔO&zæÛÀÀ Ðü›¹ÔÉÛJ¿±28€æ=4é°#šsàh×Kƒ/Dþ+šàgX–è}6é‡Eä§št‹˜K‹H]ãìT“úGØ”(ÅFåÆÔí$¸Bíe®¨&®r0¼@™Ë˜ý¾p® Üè¦?ÃJ¿%6ï!§+£óz‹2ö<=älÊ~=yx ÿ£—Or¸Q¦©º Ÿ_"I}2+úõð4ú7(EgOynÌVó¬Ss¸?!—S«ç(ýŽä¶7¡ë‰5Ç×Üù"Ìm­_¬ú+Ië ›-ÿ°&5Åï#âó ­öWlÚjбág 鎢çlÄç÷Ië%R2îüYð|Zóì× ·q½ÈÉØüÙùbI÷!ÓÛ¥VÒúªé€†1]Œ<Ÿƒ‘ëÁW ½‘X½©ó‹à”ë§Œ—&h·†W2![äL<3½Ûà!<¬t~ÜÈBÎ&Ö>äÄ*vçeì~¼1ÏÇ*]~Ü,å#h>Af6–ÚÖPÎ1ÎJÁKxž´¦?·æluíÕšÞÛšÞÞšq÷¨ÞË"EÎ’Ñ2ä+‘Ö[äüeø þçÛלìüÀ•¤u–q“`eØÿ‹h×÷¨‡z}TŽ?ªrZ{è‘.«ˆx.£‰7mVb±yxèE_mŒ¼0œ”6ìùÂz#±çmÿÖ°o+£ëcEŒ•¯F%©¨eöޤ†ÑÛWëó‹ÈŸƒõÂÔÉHÿ2‘ÓýÚÃýIbÉjÓ¾®²ŒˆIz/öUÚ~´HgåÔZ’ÛQïúzE0B5vƒ¦â3ŸûîüÂl¨gøtæ^a}äúás™ç&©ïÃJØ‹ûK»'ë3µOíK­Gó¨žÍÕw—2rò$¸M'ä JÛ®ASNh)ÌF3 9y7 yü ̇IØ Ïq§9ô'=»Qºjämx¨ ´‹jä*FíûÁôï#oÕPÏåaƒÊþEÈk máùú´C›uMˆÜ†Tú"Wb¹o….‡x+ÁfÊn¶8K4 ì'ás«2syveWW W(Í<¼Jè³®-ÐrÁ©hnÃÿ»ÄJâ3ÿwÃ+à*ü\ÍnØÿÏ oÀ¦r",—Êùè[ OÀóDü¼ãjƵ2¡Ïr¥vöãÐïGÿ µQåZÁù!4{¢¹ÊÉ®ušT?ïj/µTJOÐ{ý—Äj‚|#±ÊÈ[wÒêŽìê°-6=°™Jyw¹2"O‡{°é/$õ©–J, ܨ¾-~–+ƒG”þW*rKOÐ4vysc¤æ2mx±/ÈùJÛoMU6Û”‘³m‹œzDÛ…káúÙp«1G4`¡ …Mà4ø,–oR'—¹~îòwÃð},¸ž†¦’¼½w¹û?ø¹Ál^ƒk‰»™rõ€ýà§”ñ?°yÏ?B¿q3ò úO,Ç8o0âZœ:yÛåÞF¬ä4䤵‘þ¹Cc¥µW9Æ¸Ž–Á"Úîz 1§E[«ìB;6£\cÉÕuôÁX2ËEßõ—óCcè9ÊU.Ïnfà^S„;Z“ñ9™Q?[û‰ÌŸ-éÏ-™ýZêLåf$؉¹ë~ü2Ÿ0§™Ñ»Y›¸›÷”‘ 7¢¯ïÂ?â³[MŽÐ çbYMnæÆuø÷B;Ažï{3(ïß\©yä¿¿]ò3Æï©2½ý®_úsÇûž¶uwGõªP®ò¦rU«òžeïà)öœ˜¾1¸T)¡EP-yJ) ïf$¹óÐDGÊÞf4U¡çXÙŠ™¢”u²ÞØÍóô‘õ¬Zèª ò‘Þ+öK8§? ípWVŸì{›yÃaoå-ÓïüÉ,ÝQç¸öPFJkf «åG*KÜTÕ¸’R½Rz+øá¥äLõ·¢ß­Œqï4¨æ=ºRî¹µÓ÷%ÄQœ 7rOIß Ø¡÷RÌžØZÕëºyl®iE—#ë9}OôFì9¿G·r-¿œšGÈYÞ¸· °4¿‚È{K£ï曦ŒÐÕÈZÿ«ÉÏêØveÚX8QÛ4­/wÿæröä fSÓVÁ Ö±œÈ¬®W£\¡Ø‚ "òÁBdm‘lÿ žyÇï lÎöy5Z Üèo íÔµiæë çBÏñó„|}¢‹ß•]Õ¦?™·,üKeµóŸ~KäØv„WPê|x&õpôá w¹¾y(ò7±ªæÊb|}ïei”q—ÆÔ5\E†Kc]ÐwAîŒÜ›bóCä‡õn@cúpã +ü›2:úhŠ¡–ziðGíþ:ä·ð£ëÃ=Áä-p,By(§/Í#¹ ¾-õ?[ß–>® n„Ë”WØÍä—ŒÞÿü±2xªå|,çë˜YS'зzÞ‰^Ko¿Ysò½tItð¥½6øRÊ•£oàx9øÜ­D~NQFÈÓCj#'æ §ûWêXóª ¾‡üòd¸Zí‰~ÜE,]‡ Ñ7‚„¿V½°ÔÔû¨ ]“7ŽÞLÙõW°Þ#ç;5uÑ7‡×ªoC½Çømç?O»t'õÇ©y}ô¿BÿR½w߃Ðtô"·h~Ï…¯Ò¦kè3:?ì îVê[L"kk.Ö²{‰àr]¹ùÏé Gé%¢wê„{Îã‚'UÇ%È%ÈßCþòcÈw¹®OH±]ð>œG_†ŸR–Iô±æäðSô«§ÿ}ã á3š+Ñ?ÌlÖj _ySW›ú~—éwR—?*”´òÇÑÉP{ÚDZvÈ7Ó‡eö6‰ê/Xïô¨hë´úëÙA¿Ñ`[D/æL¡cm'cä/ÑÞ¢©GºÅþkð­USÒŽtíáLþ}øš2¸¶†+£çº MG=ƒD]¨Óßï¤D­„“õŠÏÎŒè›3“#w oD~ÿ$š?£Ùüø¶ÒÓVþ8òŒxàý€úÑ;ó"-/Eþ&ò·Ïy¨ÖƒYyŽ~¢søA£ýv§™ y_!Œ›_ÂÑhô ²Ç<ªubîR9¥óäR¸'Õ¹6jsR:“Ì5#ÏR9µù‡0€=àƒðIü| o…ý•œ_öèÕ«ÈÍá™h¢È×!w„ÀôúÝÖ5 Œ^«þ~ µ]Êy>X^s3œ^ÏÔ‘Û~ð!MQx¾jàë<©Lèh8Só&z}KZª +ó—áŸX«ÿEÖ…)=Ï×Ôí|%«ô¿Âæ\×ÜËuÍxÈèU’ÖÀ{‡t…°S)~þªq‰ÃO»°–4Wí´vˆc*‹Påˆ}^“ Ô•Øo«Ñy¯HßÒn‚¿Ãssr˜…\…Ï*Ò½ÐÏUru¯©?“êcôí­½Hj,ëáIȺV߈ÍFòöqÍ^I÷^ZêÞš”ð ×j©÷$ô,“¦1u®©ÏLé›´IB‹SÖUó]J—MmﳜýíêšÕªö¦ºFÇìF4{RœãT#r6rw¨ž®Ñ>ùô!™¯ì6÷¼>¥Ï\vêz&5Ç×7]¿òu{ ¨½Ïû™Oðöòs‹ØLæ¼¹MgxY¿¹¹z&iÉùÚüZûžŒë7ãO!GÅï1f?Cöyäê_é]¿cÆ{•QVÏö—U]0`Ä€&{ÐwGTš±·¸õv3gÈ­G˜Õ•F 7¥¶¼âo—f›6×—vËÖßM¥dœ¢O3ÍMKS`º™ÖúÍdôQó a ÓÊ\d®UjcôõLÌ4žg’&Ï´7Åæ|sŽþc&¡™¦¡ibr¤Çš.Fßt¸Rf‰Þæ&ÓßÜzξ9Ó45馭Ì—J>ô}¦î¦ÔÜ`úš¦âˆgÎ0šë’²îÙ¦}YéÕÙ¦Oèá,ÓÌ$L;s‰él¾Íï»\e®3åæf3Ð܆M–9Ûœ+9ºÀ䛎æ[¦«¹ÖDLSfn4ýÌ 3$´jd²Å_®¹Ðt2—™ËM/Iÿjs½¤t‹l†šaƒ FòÆÃá£p|jЀÊQÞ¸ ®4èŽ*o\7­p'üTF¢ƒ+‡ÞÉ‚`6l3xøwDra{X‹`qÅÐá"%°–WŒ0(Ò#à8øÀÐáCGE¦ÂépÖБwVFæÂp±$; ²®„k*‡¾#² ¾·ÃpOåƒ*#ûàA¥ïÝqëà¡~Ì„ Åp„ßfÃ$l ßÁî°,¯Rö‡°Ž€Õ#$‹þx8N)õïO…Óá,8.yÇ *1\WÁ5pãÈ‘ùú[áø üîø5ÊÀ‡õ`áIߎќHòd8ãG+ãZùÍ“2ý8Fd,ŸÍ/¡œ®dM¢ëG_Æt–Ì`gœDÖß;Ý·{\¹›ÁŒ:l|z2ÿ4?£þšÍɘY‡çœ„™±“2Ÿ¾trÖ4=)›œ„úËWçÆñdiè0 7cd…ù€™"gÕÙfÙl¶›OÌ^sÐú6Ã6´MlKÛÎv°E¶»íeËm;ÄVÙj;Á>h§ÚvŽ]`—Øåv¥]m×ÚMv«ýÈî±û=ã¥yY^#/ÛDõ‹vç땺cì%ήú{Ǻ^µú[ zLoæ>§O”ÏqsvÆøŒ©ó3^ÈX“±5c_"3‘hŸè‘˜•x01;±,±:±%ñyf½Ì&™ù™zgE h=¾¼ÌÝõµœqcëwÝÜñÌbwüæ@IMŽMÇ»c³•.õfÛÝçs›…Çç1û…ìÕäËËÞœ½ÇÙ6oæJÒ<×ð>góöáçòð8*¿÷¸cÞ8§Ï›ââå- Ç©¬ÝÃßêj+–Yƒ\#êçìsÆ‹Æ ù=¬ÿå †é˶ðÚGŠýr…²é!ë>²VfF˜±æ>ó ™jf˜9fYb–™—Ìkæ-Y±½W»ŸÇ–™HlQìéØóÇ–s|&ökŽKb/Èñi‘~ÃñéØ Ž‹c/r|Fz³—Ä^–ºx:¶R>-ëWþ{çWÅÑöýkv™=GØ™EAņ°`/Ø  6ì bDb;±Åа+`ï]c{ï1Š%ö†½Å÷Ú9ë æ6wr¿ïçyŸnçãîìîììœß^¿ïÎ.{Έy¦iŸ˜g™ö‹ùjÓb¾ÆtKg™~Ä¥ÕXú'1Ï4ý,æY¦ƒb¾ÚtHÌטcéÕ¦#¸´KóLÓ11Ï2óÕ¦b¾ÆtK¯ù“"úÈð`ø?R䔸ä¦Ó†2g eÎÊœ3”9ÇÉ0]0ô¹hèrÉÐ岡Ë/†"W E~5¹j(rÍP$[(rÝP䆡ÈMC‘[†"¿ŠÜŠÜ1¹k(rÏP価ÈC‘‡£ˆÎ¿¥õ—Š<2yl(òÄPä©¡HŽ¡È3¡ÈsC‘Fļ4”ye(óÚP战·†>ï }Þº|0tùÝPä£U¼| EÌĪˆY²*b–uEÌvVEÌÔªˆY±*b6Y1›­Š˜óüŠüGà ü‚ŠÜƒxK$bo¶·*bv°*bV­Š˜™U3·*bÖtEÌŽVEÌy­Š˜óY1;Y1;[1ç×1»X1°*b.h³«U³›Us!=bÌîV}̆>… }< ]ŠéŸÔìeèâmèRÄÐ¥¨¡‹U—ÿX‘6EŠŠ”0)i(RÊPÄ×P¤´P¤Œ¡ˆŸ¡ˆ¿¡H€¡ˆÅP$P(d(l(RÖP¤œ¡HyC‘ B‘C‘І"• E*SÅP¦ªˆ˜j†2Õ ejÊÔ´*£_ôvë×2I¯Boý«ŠxMpÇžŽõªwŠ­ÕÓHúPss»©ê#7M=+r-pÝ9#7M=¹:¢Ü#7M½(rz¹KFnšÕÆï Cð|4Æ»ÝNHõD쯌S/ÛŽô‹íHWlGúÕv¤«¶#]³)Ûv¤ëŸŽ¤ÞÇ\=s(®{`䦩E®®{däþ]‹nØZtÓÖ¢[¶ýfkÑm[‹îØZt×Ö¢{¶=¶µè‰­EOm-ʱµ½Oü‰?vùÜ$7ìa•Š‚>–Ž++zDØ“ Óñá_Ú s`1Fóì÷ý¯1‚UâB¼ˆ/)KªaOjlç°$1Ê„Ã~[î‡O9é(æRDî˜-wÜ–;aË9 ûHªtJÏK7p:Sl;m+uÆ–;+r2~ ÎÒ9±‡Þ’‰’ÞŠ¢Ìù\e\$½M3¥ cÉ™Ò[Mm¹K¶Üe[î[îŠ-÷«-wÕ–»&r&ã©FqŒ€òPEÂk´4wPu¾ô–š/á[Z€Ë‡ÄÚÒϸv”m«ëº¡…Iš$MÁó–*-Å’Ë¥ °—²¤,Ф5ÒZp”ÖK Ÿ´IÚ†wš²èÓ;£×ô1lô^X°Ž'™†VI«°Î X^–vJ;±‡‡ M¿§¨ÇÒ_ÜêO˜diŽ4<¤yÒ<(ŒuìOñ›nÕÅoºéõçà¤;~ÊÈÁH¼Ké×Ä;Ös(çÃú_±6 ÑŠÆšzbM;±?%뀹Jƶb[ë\¥Š5mm¥Û‹ÒTŒnYï }Ä>ÏÅqž²V¸µ²Øç…8NŽØ'RìkýÒs½U¸O[½´Þ)G/)½¶Y?’ôRoôLÔÒJo‰Ðë©þí,Z‘Vƈҟ¾ãÛSøßOŒfs<ÇuÇr­“õ_8'¿áÚm¹ÖrŒßV°í›E zæÞw¦¸vh®µvd”Hú“ÖÏ꜃ÿ›}Vg[‚½tRí³:ëb®?Áÿ¬N‹Hñ¸Þù³:õ_ }ÿY ÑïDî宣!‡è÷Nçr׉ÌÀDtÆìù¬Ný‰íòÜuÂ:ñÛ–3?«s, úßí’>«sœH¯áQDbÔŸ–ŸÕÙô÷Cj}VgCLú_àü?«³¬H¨³íWaýtjJod ;Rö² öÊe¬îó_ø¶.Û¦i1Mÿò”_øòÔañ—§Zý/Lõ18ee¬2FÒŸÛʲ@¶Ú^ÿ ¶]úè½.n|:¡~UþãwÏýÿú;,úÓoé^´S¾«xÈúõ…(žŠxªB&À~ùžì)—”KËþr\^N’GÉ£åqr²ë68lR%UQíU®æS]T7ÕS-ªWKª¾j5P-§VT«¨5Ô:jµ‰ÚLm©¶V#ÕNj”Ú‹_ã7ùþ€?â9ü9Éßòß5I³ÓͬÙk\˧¹h%µ2šE+«…húH»e³¬ßxÊž %ä áY)çÍOö;9P*—“Ë"G€I)3ž­ÑG+{y¼<ä‰òD$òdy20yžqŽgqhx&gƒ£<_žyå49 òÉKä%à„gv8ãÙ]ùñ g‚ žåÕPÏôZ(ˆg{#¸âß nxÖwB!<ó{ÁÏþðÊ¡°|T> ž 'Á £á,xcD\„"W (FF6òÿ–| ŠÉwå»P\¾/߇)¡¤üX~ ¥ä§òSðŨ) ¥1rÊ@Z…V?ZVZƒÖ€Z‹Ö FSmĈª A´>­ÁY ¡,FW”Ãkå1Ê" FZ[Áhë1âº@%ÚvƒÊ´'í UhoÚªÒšÕh?ÚªÓAtÔÀh 51"‡C-ŒÊ$Åȵ1:Ç@ŒÐqP£4êa¤N€ú­“ FìhˆQ;aäN‡Æ½3¡ Fp „aϦÉó FóhŽ -0ªC8Förh‰Ñ_a„¯Œò Њn¢› µíÐã}7´Ã˜ß‘÷?A{ŒýÃÐãÿ8tDœ„Nô4= éyzº .CWôÄUˆB_Ü€hz›Þ†nô>½ÝécúzÐgôÄÐWôôD¿¼ƒ¯éGúz¡odˆE7úÇâÐCÄ£òÂ7è%'H@?€>Š«â ‰Š‡â}Ñ[E :Ë¡»ŠÃ·è°’0]æ CÐie`(ºÍ†¡ã,0\ R‚`„RV) I辩TR*Á(¥šR F+5”0F©¥Ô‚±èÈH‡®ìã•(% ’•%¾sXë°&8¬wX6:l„IèV &£c˜‚®µ‡ïѹ¦¢{óÁ4t° LG»Á µ°ZfªEÔ"0 ]RÐÕ%a6:Ûæ »ËÀ\Õ¢Z`žZV- óÕ5 Û«ÀBt| HUk«µ!M­¯Ö‡tµ±Ú!šÁb¤@KX‚$h K‘‘° ‰Ð –#¢`…ÚKí+ùU~VñüdðÛü6dòûü>dñ‡ü!¬æOùSXßñg°–¿à/`ÃßÀzþ€ ÑlÔdM†MÕ(lÖLš ¶hy´<°UcƒmZ^-/l×òkùa‡VB+;µÒZiØ¥h°[ Ö‚aVA«{µÊZeÀ~8á0Jö–Kɹ¬üLþNþ^ž%ϕʋäeòzy³¼]Þ-ˆD>!Ÿ‘/È—åkò ù6òþ-%?£¥hiù;Ú˜6£-ikI;Ñ(Úƒö¢ñ4‘ ƒi:]JWÒ,ºc{+-MwÑ}ôGzˆ“Ïàü½D¯Ðlz‹Þ£h}IßÒßIQ{…É·ic%¿\D)¤ôRÊÓ–˜ë tQºÓl‡-ªjVUÕQuV ªîª—ê£ú«Ájµ²Z] Uë©Ô¦j 5Bm«vP»¨ÝÔÞü:ÿßãOøkþ^MÕ5g­ æ«ùkAZy­’¦÷2RP…‰à¯$ø+ þÚ ÎRAXE°Õ$ØjlÍ#Øj/Øê ª †2ÁP.ª †: †æ Í'ê$ê,š_0ÔE0´€`hAÁPWÁP7ÁÐB‚žî‚ž‚ž…==½½‹2dôd,&ÈX\±„ cIAÆR‚Œ¾‚Œ¥Ë2ú fù ffY³³‚³‚³Ê f•̪ ˜"˜UQ0«’`VeÁ¬*‚YU³ª fU̪!˜US0«–`V¨`VmÁ¬:‚Yu³ê fÕÌj ˜ÕP0«‘`VcÁ¬&‚Ya‚YM³š!­<¡¹ O ÁpÁ–‚5_ ÖDÖ´¬i-øÒFð¥­àK;Á—HÁ—ö‚/_: ¾t|é,øÒEФ« I” I´ I7A“î‚&=MbMz š|-hÒKÐ$VФ· Iœ I¼ É7‚& ‚&}MMú Žôìè/Ø1@°c `Ä Áˆo# F Œ*1L0b¸`ÄÁˆ$Áˆ‘¹ ÿ[F–˧åóȈ«‚©#|ÿ1#¶P_º“î¥èAzT>ó³ô¢Áˆ»ô!}J_Ð7ôƒBªä±1Âñµ`„·`D7dÄæ/2"H-¯VR«©µÔºjC5ìOŒÈæ·ø]þ˜¿âïøGÍAÓ4'­€VJóÓµrZE­êñ_Fü—ÿÂýYþœ©7ìCp~…;ï‰BÁ^Œd«iëwï•@ÿMŒÆò tM’ü §£ä78'¿Ãé$eH´ª2§Õ•A8­© Æi¨æ ÏÑ áôù_ÔøRÔøZÔøVÔø^Ô8^Ô8PÔø­¨qˆ¨ÑMÔè.j$`§ ÕK‹Ü0[n¸-7–K²åFÚr£l¹Ñ"'žP©Ïô¼úüÓ¤â5úþòKÂÒTQ@AŽÙƒùÓMü¾¥þ.¾YÔÏá’d¢¾Ÿ|ï¼¢¿§Ldý _ý¹œ=øˆÒŽXÂÎVÖÎ(©oáò0¤®·ÎÅþ’^—x¢×PP< >Š{=Ãûÿ+Ö½ø>kië\¾'öÊÔ÷"mÁ8½ÑŸ§ØiÞH§õH!,‹VfâÕáé¥g¸]¯×EóB&^Á- å÷¸íÞçËØ:<6¶+ £)öi…‘ˆ×ä'F݇1ÿ Û"ã]äzÌgÛËÿ'Ûñl÷D¦~¹þzëþ¥ä—ŽôJÇ!>¡­¤PÏu×ÕZ¡? Æ«ë÷xuY(/Äs¼]ÞŽšßo€l{ËÆúîuÉÑx* ž1y‹i¼±MzT[$½„ÅX[Ïœ¿‘¬ë%lešC:€Ãb}dA­¾A/÷“¤|`ÄNº ’¤¿¿@¤Të_&`»¾„%ôgWîðÇ‹â-'ã Ëm×Çmá]õ(7°çÝà1<§|ßÍ£ø¾—G¶^¦-oÇ#y{ÞwäxgÞ…wý—2W?8³1l,ÿŽOày2ŸË¿ç³øl>‡Oâ“ùžÂ§ñ©|:ŸÁgbiG(úo7ý{‡á®ËƤÀkL&±7d&ŽÈµ<$ÉöbDN1§*ÆâddÙœ<'ÏA#ÉGp”¸Ä!¯(¡>t?6ŠfƒØ·l0†²al8Á’ØH¾”/áËø ¾œ¯äÛù|¾€/ä󸾕/â<“¯áëøz¾‘oæ«x*Oãé<‹/æ«ùZ¾…oã;ø&¬ß\Å›dî⌔aðñ ??µ1A¡ ~BZbÊ­0á “Ä ïTØŠ)ŸøüNâó€{˜ \‰LdpÓN€BBw¡ˆ‡P¤0ñ"^àIŠà5Á‹Ì"³À[hTDhTThäC6’ÍPL(U’üL~†Rä 9¾ä&¹ ¥Mö&{½Õ¤>¤±¾¬Àú³¬¯õ},ÖO¼ÅWKøá§ зBãg+å¡‘M•¡ Tå_ó^¼ÂGò¼;Áåž¼DẞÈûâç;Gù8'átÇ{ñ$>‚ÔÇžÅò=a5lýqᄌnƒkpnÂm¸ ÷á%¼wð˜yoLq<Ž(| ¦A|axÞ—Å4œ'ˆ+)D<ˆ'ñæc1ããH RŠ$óXKRÈÞSLø’N“¥d9Y‰Êe¡nëȲ‰låÃø0²“ì&{É~r€üÄGai ¦ñ|<9INóxO.Kä ¹J²É “I¼ùë#¨a¥Ï"Ü‚I…ö ] +xB4tÃØé} (ô…aH•˜*A*¤¡š Ua ¦ê":jÀx­¯ §0ÕÅkþ¨'"¥>ÜÀÔnajˆý€;ÐHÄNcx€© ¼Âo15…÷˜šÁïðš £)œ˜ˆ Z‘¶‚-bKÙb.aýKØS®°ål?[ÆN±'ì'ö3;°Ùav‚dרuvƒÝd¿±{ì>{ȱgì{ËÞq;NÙö;ȱ£ì;ÎN³³ì ;Çγ ì"»Ä.³_ÙU–Ín±Ûì»Ë°Çì%{Å^³7ì=û€¶5q3ÏÃ~g9v>YûUjŠ×ý]j8¯2#0RÆc*+øRN¥‚ KœÅTQФ’ IeA“*‚&UMª šT4©!hRSФ– I¨¸BÕW¨º‚)õˆ=ž‹úDE²4di(ÈÒH\³gâ Mˆ R&LP¦© L3A™æ‚2-eÂÅu­%ñ!>ð)ŽÄ‰Äi%ˆÓZ§¸êµÄi‡Ä™‹›Oæ#Å’…H±4dPGÁ N‚Aƒºu Š Š ê&Ô]0¨‡`PŒ`POqõüšì@õ$Š$ê-H'H/Hô¸Â&Cä²ï9‰ä9}É $T?A¨þ‚PÈy$Ô@A¨A‚Pß B „"5Tj˜ Ôp6é4Âpð¿sàÿ«»­.#µAŸ“Æ ×oôjÞ\ÞµzÒ=¬ûZwñçv.vÏícñÞMiâ‡ÝÖ§äæßHRM"fñéÜ,ñ[Ñû„'W¢‹w gf ‹W¡×¢“uoDï@'ïAïþ“k1|kuí‘ÿßêw$a†o}ÐyD¼GWHïáýwöŽ|`¦’Ø8ƒ½²k˜B°tÝ{S%ì'ÝF÷ÞÅTûK÷±Ž—˜ªa/ò º÷¦šðS-}˜ô­Á> ÁÛct¯™äA÷:ô-# }« }›—äEß:'ôm~’}[€@ߺWôm!R}ëA<зžÄ}ëM¼Ñ·EIQôm1R }[‚”@ß–"¥Ð·É$};“ÌDߦôí2};ÌCß. з©$}›NÒÑ·‹ÉbôíR²}»œ,Gß®$+Ñ·z7 {kYè[½§ÛMôt»cÏmúvÙ„¾ÝJ¶¢o·“íèÛd'úv7Ù¾ÝKö¢o÷“ýèÛäúö'òúö 9ˆ¾=L£o’£èÛãä8úö$9‰¾=MN£oÏ‘sèÛ äúö¹„¾½B® o¯’«èÛl’¾½AnÀPþƒa¬«Ãñ¼rìýuд8þï¼Fêß}ÓGâ-/Ƭ×ßú:,ÞH:b{{ë¦>:­Èݲå~û”Súë¥ÿæ 'Ðð^ó ?Äó#ü(?Æóü$?ÅOó3ü,Þ…þÕ;CAý}±G[ã«! ïgÚâV7è 0$~‘ÿ,¦Åô˜Ó#bzTL‰éq1=!¦'Åô”˜žÓ3bzVLÿºMÎân™jÞZ¼ö– õ1îÍ…âü<¿À/‰Q±¿|×ý÷w½Æ÷Ä7Uñ]*=‘ Ùu·ëac” ÖRnú¨;Îb-¸EX’ÜZ(y|ÇÔóŠ“”šäŠ«ªK„:Xò(´4—%7 –Ί}i͘TA"v©á–æ–2¹Ö¸§ë©)"¡Ä¡Üшÿ«éÉâ«2;ç:?Ä%¤”ª““µ¾t_/åM‡F?§&å÷³$Ù¥Z’äq©2š_²ïìzdšhv7 ³5’PlÎ@Ñ:ù+;ÅIú*<ÐÉ’W_0;Ù·êܧGLïî‰q½-\_ir2µˆŽŠëXØâ®¯±wÊß$¦kB\Ÿ¸n‰^¡q ñq cp¢o}»ìä–{{T´WxL÷ÞX«W³Ðš–ÂX`` %Ðd  *׃-¶Eˈ‘ÿ#mc}»ƒ“]“¦ÍZ|*.ÿEqK)’[3ìöÈIÈJ\o/%Úí’×çÆåZ·õ7Ø)ÝÜ =I¨6Äìù°´µËB^E/Ì ¬“u~¯Ï(ïóþG }[ît¸ûùMÍ 7=Ömëýͪô¡Tdæò±/Ùpv·¹ï‹äøÉ]Ï?N.|wr¨OTÛÓc‡L‰­œÑïh«òCîìpŒÈHy2¾½Ô«‹çéP¸kþ§Uw»Lž=NÚoټס“§–päÜæååò™›æ`ÿÛ´v“Þ¶œ·÷™kÇZó-ô¨>es §‘®AIÏ.Ž=ã½®Jú&SÓó>+M|±þâÛ7›.»›³ºM‹ç¿Ôœ7¾ë•{¿®|ëmç¼}]ÓÙáëjF×ë]á去s]j~ÿµ;Ë~IFC,J"¨ˆ«Å µô(f§Zì35¥&Y¶xè+¹‹s¡üY^ßÍ{ÆïÏ;¢ê™™­·. ï-N ‡FÈG;;Y2 ·xêËEí Z\†;Î{çЩ .­ÉÁ þÁ..[ϱ÷´Dè<íšZšX¥6H­7¦NÄÄøJ]zùÇ~:‹þ]ãb⿎Ñ×Ä'ÄEõíšØ'O2"†!F`GKˆ_p _† ?²´ýÔfBìÂ,- ?-[¤1ÕŒCôïßÿK‡ˆNø·u'þÉv²9KÚ•ï•67&߸dinLÿý½¢JŽ»XµNl™‚ßž)àt½MÏBûÊnNþpoëô¦Àßz>ïkwzÙ¥•”ŽV°óš‡Æ}ì>}^öñÁO|Ö”;2²ý£K{âÊ7ØÓÖ¾ÕË>Ù žÝ07®\-àÈ©£š‰eç)-m4wËäÈq¼üô^Á¦-+2›§žØ÷ˤ"ùvt>"íÕ•'K¼Z9:Δ1&±×7s÷>ÉÙßaÙåØ&ZÏn2°Æ‰²íÛËê~¿PX]eÍ„Rž‹'/ ^Xôìëu‡\{Ô5eJ£jtyÀš‚ëÛ,^]3|’™:úù¬¤4v÷_Ø<"*cΑŒY)¥’gM{oþ&dÔ6dTú'FQ×™‚¥…þ̨þÿ#ð†Æ/øÇö–1±Ñ~á‰cãÿ ”¥BP¹ KÙ ÀŠ:¡‚OŸ-#Öÿÿ T K1ëbáÞ¡1ñ=¢¼j‡×ñªV©b !~!åËÖò³W¬XÌRÔú‰Ü¿ø‰Â£úÅtþ[¢>\9<}aíEƒV5‰ø&<¹ÿÊ Ó†’jVI‹ÂW|<¹¶È˜r»oïGïŒàN.t†]ž©ý*Û1»v©Ë߇†+ivv[¦¦H]BŸ Î÷ªtÕogÖi5z†×Âó]ËÎëRwÒ®¬kT|¹â«Ço÷ÿ­œÓãÈ;»ëOkêjj’³ÓMhæ³`ñýÕ“i9»}±n‹k*%W7øaC‹é~•FFýÞäÌÇFéïK ¿ü¨úª*ƒÇÚ]¤Ó‰ÈÊvkì7¤ÄVYV©éœ“Ä%o—äšý°wEw ½¢Wpq7A¯À?Ó«£À‚}ž©ÅÇOË)E\]d<®–Ÿ­Ìc;U~–ÒVûüáãqq è½¼Á«ûû>l\Ùï|h¦Ãï‡ïú.*zdp³”áÞí3ª4Þ–¾Ýä‘s=ìõ„´Cwœ–|ös¡S“fø~;×íµû“ðsÝùéq4}ÂÎëv¨Þüè›»‹ZG\™+Õ©Ðñù¥¬3IA½ß/žátó~Ìíéevý\Ú‘GOš}ùEúÛ|ÅóD‡L:ȳáö“ÙwN ˜Y0ò`9—ŽW¦y4˜ä·+³lm÷GŽùÝ ý•rí¼¥ü”çÑh>¡i,w «:¸Týy 'Ÿõ:´÷Aü¢VS[ ™>1µP}¹í«ã‹ºÛ'.)ÿÐ/ ÀÏ¿%TÈ÷kK _³_ ™*ê9EÚiÒº1j·²_Tï}ÓÉÎÿØ•=#ÚX¥}î§/é2:ªŸwȾzî·xáAåàS½¿\Ïs^ˆ[aƒË¢ŸËr&§_׸㼡íÂS 7=õ5mþ¡AjZ*ñQ¯ÂÞ/»7sî)«ü½ê%l‚ïÊ÷Ïn:¨²mc–mç²Ä-y …—í_åþA(ÿo—QΦ÷Oô(ŸLÛ;W¶](…ÉVw}dÿŽ'ŠO·n8•¼¥"„õŠ£^Àš)–V¬Þ¼`Z©ÔÍIíÂ¥JúF+8òD÷¨î_ð¾å”âµ×rþ'g½ó|ð15¿“»öDæ‰gy¯–O?g¨ùŸïhtÌ _é…7~éÏ³× Ë>)¼ø¯aËtƒ&–ÉLŒŒíØ^F¨E ó.h<j¥A“-'³!ò2Ð^ÛÏYVÔ„id1–Eù¯l’˜EL…¼¦}Xû?ùÚ¥–uj)HZx à Bh5h0ø2d2$31䃇¡ÓJB* €¼t x"•ÁP¹P­Ag-©,ÈO/J,ȨT@«KXšz_˜&Y9Û~:²éÞ—?YÊg©ç‰.þéñMVß÷zWAÙ®@Û¢Ú×â¿‹9s4]£ì5²çÊÕê5lÎgî¿<¦ÎúRuÏΞ»ÇÞ0;äØp»`ÛÓã%×XíORàßQÄÐPeuñü³Ë}ß6^Yµ|Ã=IÆ=/·ó*¬ðä}dçTÿù…¢>ÛÏ)k=:ý]šºV/~úú›S±_rõ©G•¥UwYKzî =ó‰Ð9ýKƒ¿S^¥¬Êg=¾°‰IÖ ‰ )rÙ ›˜¸€BlàÄØ:`•?Êx;4).ˆ5@N‡Üˆ F pVC~ÐP™©¡©‘Ea$C»ˆ–_–+õ¦ú‰OLùôsâÑïhe3(H‹/uW«Pcóù<³¿BæÅ¦ã"ÖÔYVrŒAC{·añˇ±ÕMÆj=Ö[Z"¿ÿ»ô?·?÷ïŽÞº“G¼¹ßòæìŸ7QѲñû˾µÓX›‹]¥·&1ÎÖ<"̹€)Øÿú­¸²Öϩ犴”6ô+=ûÝépÔ–½‚ÿ³$«.3ûß­5šg+UŸçªÝØ“yEEJõšµÛm‡{¯R?D¹oºžñqóûÞKŸºò/žkáWSÇmÛä>um]Â¥´þôO§l»¨pA±)dR*ÓO?‘— ÿÿPK!¢@¬ïqðG&Documents/1/Structure/Fragments/3.fragÔœÑjÛ@Eç¹Ðþ€8ÒŒ,©¤})í[KiúÁqÚ@ÓÛöçÛÎÚÞ%tŒiwuµ™ÕÝȇüû{.²‘;YÉùèûKù.·²_^º–×òJ~ûùO?_Ë[™È/ßÈRÞÈÔ?k™{ÉÂ[\úñ©ÿ¼ñ’•ë­}»ö–§~~çåS×YzéTj9óOãGg2óý•×ÏåþÑ]7®pïe߯¼t"ï¶=9‘§z{’•|óVK?Ný~ïW¥²]ÍÄ[”>ûU·ûvŸüøÆÛjwO÷ÿâõ»»¤ýÒû‹¬¿‡öéŠõ+ùàq\<êïCÍWß®}[mkæûž\z¤f¾M³ë|ݾ_¢YW&EÖ•I‘ueR¤]Y…[…§>Gûû>õ™Î,<ß'EÚ÷îû ÷}î½^ê3Y*<³Ôø|_ãó}¹rüc_㾯qß׸ïkÜ÷5>ß×™+#ß7×ù îû÷}ƒû¾Á}ßàó}pßྟᾟᾧy=Åy= Èë)Îë)Îëi×®HÏÆ9M7þ±Ïy½}¦3 Íë)Îë)Îëi׋0öш@ʼn@ʼn@ʼn@-Ãã½A ‰@ʼn@-ÃéÍë)Îë)Îëi@^Oq^Oq^Oq^O ¼^„‘¢}OózZàõ"Ä•Î,9! Ñr—¨Æ}f³£áܤ¸ÉáŠlî2œj´ÕáiŠö½Šád¦ÈÌñG!ûiös¸b´ï† g?­À~FˆiºÔ tépE:wÑì§áì§ØÏñ?Ÿ9]:\‘ö=Í~Î~Î~Î~Zý®H»2'3Çï!šý´ûùÜ(¤ö©¶üov­žn³Þ·úÿÿPK!å­L JR&Documents/1/Structure/Fragments/2.fragìœíjA†ç·à=”^@Ó9û‘]©þAElo ¤©Œ I zóꙤ%9´´ó¤ì ùš¼™ÎÌûîÌæ¡ÿœ„Ó° ×a~‡÷úx¾…Y˜†ŸZº /ËðKßÿÐ÷Ëð:†ïZ¾ óð*Œô¶ -™js}}¤ÏWZ²P½¥Þ/µæ‘¾¿Öò‘ê̵t$ë­ÑWÇ¡ÕÇ => 7;ߺR…-[éãBKÛuKÂ}­=ÈJδÖ\_§v¿ÕO¥²Í‘C­½Uú¬ŸšÝÖû¤¯¯´ÎöèöÛÓ÷Ñã›oIsýëO³önë§OÜ©_„wÚÓöÞùª÷K½/ÖG&·-9×Þiõyêa½ÖëQ½±Î0V/ÂzëU°^ ë5°ë1ì1ìqæ}÷¸DzÞë`v°;ØìÀ.sàðGœõx{¼ƒ=ÞÁïàs`Ÿ9pè3¨‡=ÞÃïa÷ðY¶‡Øgþ b=Þg~°)×{6_}ÚÌ&IRd³$)²i’‰5ÃGݧøCãsWïÃzo={ þSæÑ#y"ªùÊ„Pͳ‹PÍW)„jž2åªÑØ3ªy<Å›Ïr"î%'¢™ÿçóní#óâ^2Oö’ybf^¹ê>rBÌœxŽù¼[H«W÷…I‘Ý&EöêLRd÷nI‘½B“½]‡MgaöJlR¤wWU–,ú•Þ¿U¸ï+Ü÷•»kB©Ít²Tx²Tøu›÷}û¾vèû:ó½‡6ÓÉRgÉâ¡è5K'K'K'Kƒ'Kƒ'Kƒ_¯mðó}ƒ»²ÁÏ÷ î™÷LãîWšÔfÚ•-îÊwe‹»²Å]Ùâ®lqWÒ|`Ä Áˆ3‚§#Î FœŒ+8ütËyDm¦}OSÑà=ô+,9]é¡èìÊ Ëá÷MqFœãŒÉé¡_éì¢iÎhðœú•Î.š87 r´\‘ö=ÍvFƒîþü¤ Òˆ3¤Ñ HËiWæœg¹"ëJqÈaŠÁazh3›,‚“ž‘žÏݯl²ˆÉa–*²É"&YªèA“ì,UdWbR¥Š´ïsúÑÃØ{û¥PLr³T‘N‹r,U¤×,ÝXªHû>§‡??-f²T‘ÝIΠΊÁz{Ú÷9ÕXª˜3‡ÃïWšjƒj,W¤}O3‡b0‡ÆžNš9œ9ƒ9þHÑT£àT£Tc¹¢·k“‚3‡b0‡åŠÞ~“œ9ƒ9ôÐ þ²‹æ&ç&ç&Åà&=Œ]4™)8™)™éa¤èUMf NfŠAf>v¤RýtÔþŠ›Z÷×YÞÖúÿÿPK !qö}GyyResources/Images/image_4.png‰PNG  IHDR3WhJ¢¦gAMA± üa pHYsÂÂ(J€IDATx^íQOSg†Qaâ`FA§n.êpsŠât»óvdWml{NA·„;CÀâ…‰)==m1»“?Áݲ ²a9mi‘˜ðGºóèÄŠì)§ßò<É“`$Å«'ïWz>ûà°hékÌ£y$“i/5ûïg–éëí¨˜„.EìñÓÆñ¹Å×Cñ%o0¾´ÔÏB£Ø^e~Àžy#qgeÔþ}õļÓÈd2Gw¾ ÷QÌ´È|Çgb®wjÆYùDkã&ƒŽ”±'[ÃIgåôìóúy+W=w6GµÖXg` Š™–˜]°P»$íì«q7Yg` ŠÙ¼³„[ž˜Í5.§óÕ¯–6.êØùÓÓÆqÖÁ›˜mN$K•«‰|åºín\ÑŸYg` ­˜ÅŸygµÊîúM-U¨|™Ê–?c€쎙U¨M¦òõ[v±>õ ë ¡=féBåvʭݱ ÕïXg` »c–tÊ׬\uÚrÖîj¡±ÎÀÞ‰Y©:t½{‰\ù{ÖC{ÌRnùNÒ­ß ‚–­Üf€ì3;WùA¦Yg` ï‹™•¯þxÈëÌQ½0"âG¨8)Rs‹ïÆìÖ™.TËü{¡Úýå&"âôÙ€âd=ýóÓD¡öyÚ]û&øXÆNÌaíÜ ™ñc/¶†ýy8òK¡vñ *bº!CWÿhyÍæ+׃%¶+f]]gzUK:ë§ueGpuGþå+ß@DÜ·z¨Üίå·äZ*ïݲœõ»vñM̺ºÎ¶/S[Ò%jiÇûBÏSY Þ·zž ñ j¥rµúlºP{k•µìÚ:Óot¼ÔýCzºÝ^X›Ò9WrÓDDÜ·~À¤Ö×^!kÙ•uÖúUª^PÏRéñƒÖ?ñÀ¶+÷Rß§ø…ºÎ>ô¹DÄnú:#fˆ…¡¯3b†ˆQê:#fˆ•¡®3b†ˆQÚ:#fˆ¥¡­3b†ˆQÊ:#fˆµ¡¬3b†ˆ½`Ç댘!b/Øñ:#fˆØ+v´Îˆ"öŠ­3b†ˆ½äG¯3b†ˆ½¤úÓú6uÇâÜâßcñ%oð?×1CÄ^SëL7ÕÚ®w%VüëLìÉúHv'[{C̱×Ôœ(´Žšå‰5ÊoÕN¶ö†˜!b¯É2CDãå=3Dü_Èo3ÑxÕ>g†ˆÆËˆh¼­2A̱ìh• b†ˆQÛñ*Ä £¶ãU&ˆ"Fi(«L3DŒÒPV™ fˆ•¡­2AÌ1*C[e‚˜!b†ºÊD{̬Ruš˜!b· u•‰VÌôbVöådºP¹­¢ !"~”Å"}O¨«L(f±'[Ê3º;(UªÝPдÐtäDDÜ¿µ@ËY»« ßµÐW™Ð…gý"ªŒVþåÍ*Ô&¥ŽˆˆûvqýZ"_¹n/¬M)j Z{Ⱥ²Êüf–›ÇtÔÔ‹ÚÙÕq•Rï¡!"î×¹Eﬕ«žÓ…ŠZ\ šZû:ëÊ*k¡"*hZh±[à "âA´[=ñs¡vòW×;¥ i¡ii‰u•íF Í?rê=4DăÛìŸwš ššŽœí1ëê*?H ššŽœzM¿hÅìpV@h¡éÈ©÷ÐÚcÆ*cx_ÌXe`{ÅLÏ`•€Q´ÇL¾BÆ*“x'f¹ê´>k–Ê×o±ÊÀvÇLOéÑÈàã¬20‰ö˜i‘ÙÅú« ŒbwÌÒAÀÖoO°ÊÀ$Z1Ó K–*Wƒ‡ÎÝ+¬20Š71+OÌæ—µÎ–6.Î-¾c•€1(f3~Ìtû΃…Ú%ig_³ÊÀ(3]öštVNÏ>¯Ÿ×çqgs4¾ä ²ÊÀtóŽ¤Ò±R·WÇ\ï”–« Œbû1o0þ̉;+£:^êZ V˜…¿¾´ÂtÑ«Z6ÿèéÿ« L¢uÉk³_QÓ×/ÀPüx)`AÄÀáÑ×÷hy”ý)¯"IEND®B`‚PK !ÖF¡9‡‡Resources/Images/image_3.png‰PNG  IHDR3WhJ¢¦gAMA± üa pHYsÂÂ(J€)IDATx^íOOi‡Q„]× ¬ÿv5êúoÅÅÝ›×=xlcÛ™‚zðægè'ð@B ÓiÁìM¾·²«0픢1á‹tçWÚ…-U©2}Íó$O‚ <=ù ̼퀃¢z¨¯ZW_˜GõP&S=_®yYùF_oG À$‚p)bÏg+Gg–> Æ—½øòòÅö* 6ç ÇÕûÏ7ß=sªý™Læpý[zÅL‹,ðÄ“BåTÌõN>tV¿ÕZãvŒA·”±[CIgutúåÆY+[:wÞh­±ÎÀ3-1{þÍØ£ÿ‚´çßév“uÆ ˜= b–pׯ§³•Ké\éçÇ‹›çuÛùÇlå(ë Œ`'fïÇ“‹Å+‰\ñ¦ín^Ö¿Yg` ˜Åç¼´Ênù¶‚–ÊJͯ}Ï:#Ø3+ï_Må6îØ…‰Gµ°±ÎÀšc–Îï¦\ÿž/ýÂ:cس¤³vÍÊ–&-g}J uư'f‹¥É¤ëÝOd×~e€14Ç,å®ÝKº÷kA›/Þe€´Š™-þ&Ó¬30…ÅÌÊ•~?àu\TFDü'EjfioÌhé@µÌª=X©""¶e°Èú'köõñDÞ?“vׯ×˨ÇìÖYýdÈŒ7{µ5ÌÃá§yÿ"b;*b:!CGÿhyMçŠ7kKlW̺ºÎtUK:åQÙQ;º#÷öœ•« "î[½Tnçʃ–\Kå¼;–Sž² ;1ëê:Û>LmeP‡¨¥ïG½Oe-x7ô>"b;j¥²þ-=$›Îûÿ[e »¶Îô×Ý^êü!½Ýn/¬Oè>W¹é""îÛ `Rë«UÈve5þ”ª ê]*½~Ðø "¶mÓme+õ}Š_¨ëìSÏ… "vËÐ×1CÄ( }3DŒÊP×1CĨ u3DŒÒÐÖ1CÄ( m3DŒÚPÖ1CĨ e3Dì;^gÄ {ÁŽ×1CÄ^±£uF̱Wìh3Dì%¿x3Dì%ÕŸÆçlêŒÅ™¥NÄ—½Ï®3b†ˆ½¦Ö™Nªµ]ïr¬ð÷©Ø‹¿†tl=[­!fˆØkꃃùÆ­æÚøC5*hU=[­!fˆØk²ÌÑxù"~ò×LD4^µ‡çÌÑxy·£U&ˆ"ö‚­2AÌ1j;^e‚˜!bÔv¼Ê1CÄ( e• b†ˆQÊ*Ä £2´U&ˆ"Feh«L3DŒÂPW™ fˆ…¡®2ш™.fåý«V¶4©¢ !"¶máócHßê*ŠYìÕÖ=ÿfÌv7/Û ë)׿§#8ôÃ÷mÞ¯ÙD­B&C_eBžÍ,­ Æ\ï¤ÎJ·¼‰\ñ&"b;N¦²þ­Tn㎢Ö*h]YeBn3ûãsÞpÒ)·™§§_nœµroÏY¹ "â¾}¼¸yÞΕ/-¹¦“b-§<Õ|ÛÙ•U¶MõÖY<ã èvSQ{š÷!"¶£5ûúxÜy?ò¤P9¥Å¥•V[`»ÖY×VÙ Zæp|¹zD…|°REDlKÝá)LŠZ"ïŸI»ë×õû÷Ý1ëâ*k&¸ .Šˆø*L ÔÌÒÞG½`•„çž[=ÀUЋ« Œ¢UÌô¾¬20Šæ˜Y‹Ûo5>“UF°'fÙÒ¤å¬Oé!ZVÃî˜é]ït¾x·öx« L¢9fZdvac‚UF±;fzÏ;á–oëMVE#fZaÉÅâ…L§ñ°ÊÀ(vb¶6>­\Ò:ÓËç3KN°ÊÀ³‡AÌt>â£ÿ‚´çß±ÊÀ(³Ø‹­¡¤³:Z;J,[:­“4âËÞ« Œaû°×ƒº­ÔQ@:ôUKUFQ;1Xañ9o8èöò™Síg•€YëK+ìùlå¨Z-lÁ­gíx1s¨Ÿ\]?èU_s{ †ÄK«EŒ}}ÿ"ß²óªyÀIEND®B`‚PK !˜jÉÑÑResources/Images/image_2.png‰PNG  IHDR3X™sgAMA± üa pHYsÂÂ(J€sIDATx^íKoW†!$\Ë=$¥”–K¸ŠKJ íŽ- ÔU¬Øž1QAÊŽßà_ÐEÔ’x­îò—œ¦ %æäO¿ïy  KÛsk#?dJûÕÖhg` ~˜=y³g2û籄SøjêQþdâçâQ-7õ·ú¿ô7õ›ÿ{í¥—#ñlî̽Tõl4Súâ>í L¢fQ77j»/Ænþ’.ŸŽ9åa-?ig`ïÃìÕh"]<O•®ÆœÜÅ{ó•Öìhg`0‹üRøÜÊ”.ØÙÊuZ<[9C;ch ³hfý›„ô–›´30†æ0ÓòÒJo$R¹›Q·|vÆÐ.Ì,§½øì•~þ¥5_¸Üf½ogÞE4„^;m»…± _ "vllaýœ¿¼ô‚lc[FáV#Èö¬i«dœÌV)MíLñJ<]×1DÄNõ-yúAå52Ys+kسvV¿WæìÐ)wÿÃ8副ÞDÄÍøn+FKˆ5«ÿ ¼5ÂL_¥ê`¨Þàÿ>"b7ö¤5‡Yë¾DÄ^x;#Ì1 og„"†e íŒ0Cİ ´fˆ¦µ3 Ã4°vF˜!bØÒÎ3D Û@Úa†ˆý`×íŒ0CÄ~°ëvF˜!b¿ØU;#̱_ìªfˆØO~ØÎž¸Ÿ)íï¨fˆØO6ÚYÔÍ]³ÓåÓÜÂäÖìÅzlµ‡0CÄ~SƒãéÊxl~ýÜÙê1-5 3D4Î0+Œk|¿¦`fˆhœÊÝŽ§ž_š/ŠÏåë9%z^I=¶ÚC˜!b?©/üñýš|*÷²é³Û+µA¾@Dc|ßÊJWõ¤8ÿæÿÓnþ  ûÅOne‚0CÄ~°«V&3Dì»je‚0CÄ°íº•  öëV&3D Ó@Z™ Ì1Lie‚0Cİ ¬•  Ã2°V&3D Ã@[™ Ì1 me¢fQ÷Õhý¢7ô&þ€´6±[oeBav× 3{éåÈTºx^3„ô&šôh9eDÄM©Yd~!ú^à­L( §_ïN<.^,J¸•KJK¬ºeDÄŽõDâ"­ðTˆÚZOZ™ÐÀ³Èra§éäØèÔBþ¤¢I…"b'*˜4³ßv_ŒYÙÂå¨×¼ÔÒZì'­ÌÇ»@d¹¶C ÐE#ÎêÁéÅg‡¼¶†ˆØ±š«–¥ûï~¨eŠWÔÀšï¿÷¬•½Ã 4]ìvrepÆYšqjˆˆ›R+­ Œ¢]˜©‘é[MZCk˜Y :Q¤ £•€A|fþæÙò­ Œ¢]˜éMZEs˜©‰é@<]§•€Q|fsÏ/Øóùë: @+£h„™Ž4i ¤É{¥•€Q¼³Ü¨íÆüí™õ¯ie`0³çÖFtØ<žÍÑÑ&Z…ÂlòÉ›=1§<<õ(RÎ5MCSyhe` 3MΈÿö×a-5j:x®è´20µ¯;^ »Ÿ)í׌3½j4­ ŒBc€fœÕ!µ3=[Äúº\ÛA+³ðBK-L7ûj˜‹hÉIÀ&Ù¶í– ²¾2IEND®B`‚PK !ɪƒÏÏResources/Images/image_1.png‰PNG  IHDR3WhJ¢¦gAMA± üa pHYsÂÂ(J€qIDATx^íKoW†!$\Ë=$¥”–K¸ŠKJ íŽ- ÔU¬ø2&*HÙñü ºˆZÇNDª.È`›]ÕET‚=ñ *êÏpçØ`ŒÛ:xœñ‘žGzä(‰Æ^½zÏøœo¶ÀVRÛ^ÿÀPjµí©Tm@êçúo  ¯ÈòòŽ{u(’rwÞN­ ¦R©ú_Ì@Á¥ »k¯îµ–ÖöM/¾Þ­@£¡€Qhiùp¶º+ñkõÀ¤ãÑëçÕ]þ’À´Äœüé÷=déâqknmä‡li¿Úí ŒÁ³'oöLæþ<–´Ý¯¦N&.ÕrS«ÿ@S¿ù¿×Zz9ÏåÏÜKWÏF³¥/îÓÎÀ$auò£–ób,é.Y™òé˜]Öò“vFð>Ì^&3ÅóñtéjÌÎ_¼7_9‘˜ýãí Œ f‘_ÜÏÙÒ+W¹®@‹ç*ghg` ­aÍ®“”Þr“vÆÐfZ^&ÒÅÉtþfÔ)_£€1´ ³„]žH,x¡F;Sø(̼‹9•[ »0qv¦Ðfq'ÿ­ÂÌ4Ú˜B»0³ÒëßIÚ‚ÆÿÔ¼0{ûQ˜%2Åï·°yÔE=5ÆqsÖR+µAkéï}:dîµ//ÌJïÂÌÊmE;ó¬^‡"ËîÎ;³Õ]㈸uÈ|zñÙ¡Dæù—‰y÷rs˜õ¾yÑð4jOÌnÌ J>.٫Ȉ[ÖÈ,ŸJÎjç2[ºé7²z˜õ´©ª‰EìWõ!¬ÌÚiËqÇ6|ˆØ±±…õsþòÒ ²mî­F5ìY;Ó:WÉ8™«SšZÙâ•xÆ×1DÄNõ-yúAå52Ys+kسvV¿WæìÐ)wÿÃØå‰ÆÞDÄÍøn+FKˆ5«ÿ ¼5ÂL_¥ê`¨Þàÿ>"b7ö¤5‡Yë¾DÄ^x;#Ì1 og„"†e íŒ0Cİ ´fˆ¦µ3 Ã4°vF˜!bØÒÎ3D Û@Úa†ˆý`×íŒ0CÄ~°ëvF˜!b¿ØU;#̱_ìªfˆØO~ØÎž¸Ÿ-íï¨fˆØO6ÚYÔÉ_³2åÓ÷ˆFrköb=¶ÚC˜!b¿©ÁŽñLe<6¿~îÇ\õ˜–š„"çF˜¹ã߯)Ø„"§òGc·ãéçW§æK§âsùÃzN‰žWR­öfˆØOê |¿&_§‹Ç½lúìöJm/Ñß·²ÒU=)οùÿ´ƒ›ÿ‚0CÄ~ñ“[™ ̱쪕  ûÁ®Z™ Ì1l»ne‚0CÄ°íº•  Ã4V&3D Ó@Z™ Ì1,ke‚0Cİ ¬•  Ã0ÐV&3D Ã@[™h„YÔy5Z¿è ½‰? ­Í@DìÖÀ[™P˜ÝõÂÌZz92•)ž× !½‰&=&ì2"â¦Ô,2¿ýÇ /ðV&”„Ó‹¯w'N/–N%Ê%¥¥FÖF2"bÇú"ñ ‘Vx*Dí­'­LhàYdÙÝ©G:y6:µP8©hRᆈ؉ &Íì·œc‰œ{9ê5/µ´Ö0ëI+óñ.Y®íÐtш½zpzñÙ!¯­!"v¬&ªeéþ»jÙâ5°æûï=keïðM»Zœ±W‡fì"â¦Ô Ï µÝ*Dz€¯wJìŽè]+kEDDüuËJ…ÈZZÛ7½¨­^å‹ÍaÖûV·¬fì·m÷­n]+è’Û„O+£hfjdúV“VÆÐf‰(RÑÊÀ > 3óly‚VFÑ.Ìô&­ Œ¢9ÌÔÄt ž©ŒÓÊÀ(>³¹ç¬ùÂu •€Q4ÂLGš4…Ç?Òä½ÒÊÀ(Þ‡Y~ÔrÜ1{FvýkZE#̬¹µ6çògt´‰VF¡0›|òfOÌ.O=*œÔsMÓÐTZƒÂL“3â¿ýuXKM…šžë:­ ŒAíëŽ×ÂîgKû5ãL¯ D+£Ð {uHíLÏñ‡¾.×vÐÊÀ,¼ÐR ÓÍ~…AæâZj@d[ɶmÿÍñ-ÓIEND®B`‚PK !“UçN, , Resources/Images/image_0.png‰PNG  IHDRù¼¿êïgAMA± üa pHYsÂÂ(J€ÎIDATx^íØËnœ‡áÚ”@ éV¥ª4 ‘"Ò¢¶°Ë–b+Žgœˆ"e—k˜+袢Jl@%øØf‡XD*MÆvlŠ*z#f¾b$­xWÏOzVsX¾úß1333333 ¶üØ>ÀcºñØ›ÿp2Ù?±°¹òâäîïî<šy367ON&“ yp†ÝøÓÞSãþú_­ï<óÀ#Zøpöô¥÷ÿ|úúê½'‡ãå ,_µýãÃu3üàÚÏÎ,NÿþÒÕ[¿2ZûäÕÑÚÀ!>yõêïv_­l¿¼üÛí燣e2¿|þõÈõU›8ÔiôÁ_¾¹¸¾óñtvnyúàG£½ó‹k[oftkvþòÚö/ß~ðÝ¥›÷Ÿ½ñÁÞS‡_;óè,lÎN _¾|kçµñúöçÕúéâÊý·—1tbt{Þ‹éß ˯7ö¾}éýÏOïw ó%;ˆÎo¦³ç–6vÏŽ7v/ŒV¾3^ÙúÀQ®Lgï.®o½5\;‹Óû/ýrõÞ׌Î/æçÐð}ñÒ??}tt&³S×î||fyuö½Ñ­ÙùñÆî…Åy¹Ž2<]]Ûzcéæý³WV¾píÎg_›LöOæK6ÎÅ»ûO,|8{z|óÓ—Ö·¾?>Documents/1/Pages/1.fpageì]ÝÜ6’çó÷tO $€à 0n·>ZjÅÙì‰} Þ;ÎÝe_{lb{æ‰ ñB<çâ\%pÿV¼ïÄø³¸#^‹ü]‹oÄ=ø»Ï!åJœÃõ þ¿„”÷â î®ÄK(9ƒû+H¿õ\Cê=‘‰9ü-àj.J¨1ÿ O½€²¯ñ K‘bú¿Š…º/¡ò­2/Å'é)j×7ð;‡Ö½Âü ¸º+~gpý¬!ߊS,ñÛ¨S»é3ñw|úüû^<ƒß9öù%´þ=¼©yN>ùrW.G«_6iåS»g"ïý@oè·9ÿŒ•Ùî{[¶ü[ñï0Z¿^C~"þ%ßÂS²…çøžD)ŒÀòÏ úÜo…9:—È) ×gpý¿ªï¼{&jÅWgðÌïÐË ,óZü©y‰õ‘ü ¯/°üXï+¬û¿0·‚gÐ7ÙÖ¦=f¹Ÿ±\ ½šAo ,—Àx½Cù¹ÂÖž)Ò¼ý [#%ò;¸ºA9»€2ÈoZîäõ\ÿ WÍ»¿Ç¸T#¯%Ir—ý´XJÝ}õZu‚2:ƒÙ™Z!7V8N’9¤JZ•XƒL-!­Æ²'HÙ*U@Ê{Za¹·ªE9¶¨Æöd˜w‚y3|ŽÏ×øæßSÁu·5>]`/e9ùt¡ÞãÖîJÀORr‰Òȵ{¨æ»sg9s|·¤¼~7¥Ì±åö·ÛžåÞ^â¸XCORïtôˆ©\õD:¹žÈ 7ŽL‰}¹ wAŠ žx }“º£„«5ÆCÈ)á:Åñ‹sÄÄsD ½ÌP²]hÿo‰öKø+‚p@9 ,Q#¨ÓÂq'ýat©ˆúµ²ù‹ Ô—–éŸÐ.”-¡%pÕ²ݬDÕÏZ?…²‹µ%"Gyaµü´µÀ‘Ë0µÀy¬k¯øYj¶··­ÇbÀžµ[a.½j·t÷¼m¶O›2¬9G;ŒYDÌ~¬•´ø¬lˆ2z8 @Wšµ€§î"EOÅwp•¢Fx„´—º1ƒ«%¿„6.Ñ3+P œîLûTÍÅäÄBiö}Ó~i?9íål.튥íŸÕ.‘n/Ð:ü€´“=LTú/ˆ8ËõDÙ•›¬ÇÔµ„åI›âçX²r ¼Ï”}’¡]Ch÷}´pj,—·R¹Òf­íô-¹­ž&lš=Ûå‰JK¨ÉL_*{KÎíòs§vî•3IíÔŸqG…¬i[í˵E»M/ùvØ©À×C6MnŒVíSGíHûȶM³€Úg%ôúÆ µÌ¯*o¦´Ñ§]“ã»J´®ºü¸IŠMå&…Í{v‘+ò‹K”ƒÝä¹ìÉ ÕÓÕVa´¤-=̺Âô+·UB¥Ÿ¡µh8 Ó6L÷°®t[©ïnÖ¨ƒªV¹aQêèkÈ¿T¶¡ŒôH0~c³õHä5â‘β¦søý”¾Tx¤\Õ~‰£%Ÿ~®f„+õ† ¬í-ÔBc¢ß°BšÊ«ß°½+¬a¶£}Úµ}BY ¾õøZü{k…:/wšë|m@_ËÕn‡ûÛóöVVÌ(¶=Ͻ5‚"Aºö?gw„±_ú2Ö·ÿ7ÙWþïóã]Þòë?/KóN97o“·Cíö,OGNzÜt_(¾ôÕ5¾v;—Î{÷~ö6×~ž?]µ W¯]NÜùÌî—øö£s«púdwùàêÍ{üÆ2>êå¶Z¦…Š,År`Z¦ûõK¦x¹­ÔwõK2ôG]½Ò3Ä‹ÞcKdZ"ž®}“oíÿfïê Í˜Ž]ùϾ˜N‹Ùß6äúUöÞFê¦4º­R—ª•ë¥)”Ôíªsí{26åì²cc»]´jºÀÙJs÷É:µ:*^GÈ ¢£‡Ú»6vÛ¹Ñï}wo ¥×ØÒ'pOmK@V”ÔÜr_ 7F œy/õHÛþè=ÅÑy-äþƒsÔ¹úÍ™²%¥ýœ ½G€ê/”NÉr)¾‰rÌ:uú?,í2[6[ë„~)Yî{ܧ$w5=„ñý£øyX§ž×Myyw¹¾ûo¤ü5JÈËûÿѪßÄ/PŸæ/â¨Lł΅Ž?kb:Ü÷!åÿ‰’Įķë%©])i|©²ýo +,Ï·ë¹n5XCÿ ³/)þltâi0sÞí¥8SÜ]þä©J,שvîK°)É»ô„{ÞÆÝ÷øÛ,ÅKn;½/ÅŽ“Öds¹’ e•¬¡Ô)?Ç='ù¨%Ú¬¿o×9>²}†<*­…S¼’coJy“ÚØ 2&õ;”¶î»}~ô†Fwˆ:CÔ¦N»ýd\‰_•F¢=…çôïN§E—HŒÿêΛÖ;WQŒígÛþ´=.p¼Vv¿\58Çu‚M­{„3ìÐóígž¬W~@ ©´\f7Q³•»M,ìcŒO¥¿n¿ÃÖm·eØâ­Å7ôß5.6Uq–y¯U6»w®ìÞ…ƒÝûLüÚ/g™a´~š=ê½Ãîi–JžÈ³,•|-ÔJ“™ßGµæh•›éµ²:«êfÖÛN§ýËŽ'È¥sí±¥ÛeÂnùwµb_ROóµ]Øè§¥a)nÊ­‘ú:êkÒÝŠL·´"sämE.ÕµF/£Ù®ÁߊԞiE–h©kߦͷÇf=¦b¦ð!½O<[Kg†Ò¹D4ks®ÞU3vc©® Ãr1Ÿ×Èœ-¯P×ÝÒùM«7çš­Þµº€5ü¾cy+R{Í>M¹öfLî<^&EÛAê@›¹9—N»£ÕW›…›ªõÃÒ°€ÛµJÏro§ˆšÂX93[¾9·iyôiŽ“âѯϯ‘;šj¤4é~ÂZ—kºKZѹ*nùKeû4ùíúÍüãõk¶9a ú5.qDsµR“õÚeßY¶DlÇųyÔþ^Ø#Šôé‘¡nó\l¾Â6¶üf¾Úæô‚ÈWnñiEpŽJn ÏÛì+Áê}yž‘œ¡k |2pŠgÚdhÜ…7<‚‘W¢7ü­~ZG¦Ó²•/ÈjJ”.wØÎ/ZàÜ0†_³Þ=—C1¹mžR¢/}ùq|ùú¨½x)úÌ>»ß6”¯ÏTØüº KК’ÝoÓ1öµ0Yo*(Ê¾ï¹ åšm¾ü1Ó=zôã{ôsœèŒPŠÂj<öÒ#Ÿì¯ÒÈo×oæ«GŸ‰mÎ…¹½žWh>uòç3‘+=ä²;ÈÍŸOÕJ\-hu>myó¹°Ÿ/ÔðÓö^[&¶9m&ò”‹/OdhŽÊ&òç3±ÍnïÈ.Þ|¦¬ Ð¼1Ã?NÛdjnÐBþ~ÌHÓãç±€~œs)ÌHç&Ê´I?tÄ „Ĉæ}D4w/n ÚY1þÛp~ª,œÆƒkû»0¶XªÝ¹ö\ŠUÍ ïÓô7å¶[Qƒã¥zÄ ¦Ã –ëq±c›ós\c¡ufÐÎ?^Ì`›S{n¯> À5 ì³PQ!£7¨×8ÂQtrQä«q¢Ü‘®Ê'C¶ÙÍy#ãP¾>­?6Ÿ2W‘ã9.©@_G´¯t犚&i¶~s®Ùöˆ%3Ý#š0š+«¹ÙkÒE †òi‡ÁÂÈo×oæ/š÷Jï?!Wqÿ·#þ îRÙwü?“aq—Éþ£|8ãÐc uÒÁBÅ#–­µ…¯›SP‡ò—ëõ¨v½Kµ–tØÂ"bŸ%†Àñðq! ÅzÅC¯§ åÔ²J–½<Ò%Ÿ$»lÉ:<¯£âi Ùþtª¼¾“Ÿw<Önë‡òÍÖG4áØi…]?Q„H-ôé祘ô,ÖÎ%oJcCÝš›ÜãEöµCø0múpë‚…ÚóK+}Ãë‚ c?ñ]ÿ£ ¯¾‡’o±Ìl«ËIk¥’ýÑ\ErI˱99m®ôe÷L²ªsRY®V3û'¤ÙÏe«„>ºû- û[ùÖ4ñn'¹õˇös±¯½@·}·ýeÞu·}W–ì»íëè÷íŒGm†Ö¥’Ž‘Öž¦¾ëê›û8°mõUx¾Œ»†ÆáËR­6ÎGàË©ö”å1u4î ìˆNg ËCÈn[+mºŸÙ­ o½Ùr99êÐ>š«ÓÍ-¡¹ñš©Î¡ésì1#¸¹ÐßÛÔQ?mm8Ÿ¾5’¯£zÚ(ž¤C®Þ抶ó—jeÜ\ó1qºÍùíöG 7R?¢¸ãÅ…uq×ZY: õÛ¨íæ|¯[‚Y;ÿX‘Ý\ÄÝ@‡€ìæ*ެŽÈîgŒìîk÷TDv7ÉÒtÈnŒ±=d×O—²#uÙõãË©öüæ1^÷ ]?î8,dw5ИYŠ3/Ÿ;”¯OªmòÛˆœ™{èèoÑßÏý59õ˜1à ùÐܹÙEá†òû±˜& (5}{ïfûùgáÆ\Úó+A;Gí±šCùíöG 8R?bÀSaÀú«ÈKƒú&Æ;”Ÿá¼H_³ÇöšùÇ‹Çè^ÓØœ¢=îúm¨Ýà×½LXJ‰¹¦Âö½áJЉ ] 8u'=S:­ê¤WJã Ü}/ßžf׳ Séb-¶ò¡½éBÄèÞ1dÉîÊÒTpc{G£¾;þë§I·ÁI×uu‰ÿkž©Îi(b\ï(<é‡ýúñäT_~,bTïH¼áƒüúñ†òÛ=QÖv¿­Æ‘¹§ˆ]}„Û¹|Þ¦œÍ<ºM„ÊÜøk(pÜéשÂyÃð%}µ}.è `Ýž>GʳrAßwæÈÄA[ñ5Dýmb*"õw£>abú»Àû¤þ6‘úÜIez…3õÆÑK€zçH™ZI㙈/’Sñeb"¦¶«Ph€DìȂΞ«-ê [Su"É2L_bÉ6Z`/_:s%u']{Ýȳyç}©çóM?\Ú—+ÛGQìý,Tìt7҄�¼­_adw›¨“(»vÙ¥/­Ô’«Ëm–_;<Ò+”ä\]ˆO¸b{ƒc›àX¿E 'oùFü dû+u—âÓt×9Ö´‚÷ W²‰B.|çK|×üߤoÖ„øçë,W}á¯GºòŸ¯õ”Ëóœ<óòYyÕÃë…¥µ´.B˜´K{8ý•«Y¤èÔ߯\Ôëu—Ñâjµ·Ž¾0S Ï´™ju) :ëimŽKNí-Fß?æÚ‘ÜÜnG…TŸwf×ö-”Zv0ón¹±Æ§O×÷úöÛ.•|ÿí³xŸ{íRÇÏ¢v:òýô³¸vûk»vàùÓM;æŒ<òÚ‹£§uìõûk_;_¸X{a¬¢m¢-£U´›?K1$ 'æóV8‚Ò9ÇH9I£Üý<`˜r×åÏMúÃWŽóuTÊæY˜·ìÖ†¯õäî=ùYO¶ö…‘¿mb¢üq'È>òçæ—h ÁôOe¸A™L€¾ÔÓ+%ƒ Æ݈_…ôJ¾Høü/“¯±9Z‰øMQ;2çêªñu®Œ8 í÷$0þï±D;H3ð~Ê&‰æ$¤b-G?ËÂ×âp·°}ý«…oÛ¼ïK;ŽëOŠÔìî—ôµoüF—äwwoÅ‹ru?+ÑÔ9k>Ô¨Û½DnÖä¸À×ú 5»óºÇN_/‚£¯/½|µoúx脯´›Wã¯ÝvEIü0 ?’%nfô©|mò]´ZÛv!¶‰=Œ¶í.¾¥Dªèû™éV˜»¤â QÊOí¥"üýêø°n·´k¹¸ß?$MÛŸ’>ÖNí~hû òÇ…'înê´®ô…œ[8„ÊO—ø¶Æ_3ú­2úÏ8vÝ›­Î¯tËqöœ}ž …òùò 7cè/ot#ƧÔèÓøh®kW»ÌË»Züš7OÍ5ãb澺„Ó¡"BiÎ]mW· ³²á‚K„±²¶‰ñV–}‡T*h÷fåaeí‚à…ÞgÂgÕò6 ÷adi›½ Q–¸Ý†4O‡“¤1c;å<i?µ·š¡æ¨öNûÓ?u\¯I{7œâ™Âdà%öN#rýí¶÷ÆïÚùçÚ–‚uÒ Ùžs`‰4\áêÙ9¤^âNùööó$VkD£ôæ <-å¹…4-i¯^bîù žÑ;nÏý»®sqv°? i·-|W¤|#”|1uÞK²Û÷FÎÕC_Ô“ç6t#º|¼ÿø‹.ÀYznÜBûXûQi~«‚¼ýhç!_‚_g±Û‹¾ë;¾ëܘûIçrœî»:è? ¾«‰\y_|•×mTòEü‘Òéð€úØ+ôå¶ñ±Õq#1}ñÃÁLÃð‹ÿü:Öê`ÜI9½¿U(®pµ¹WʪNFm»Zöò#¤¾Ç¶½ÅûÚºz½ð{Bç{½XÛÂ_$M­:ŽÞ8ƒRÒBÿ$¾L†°1SÙ°1_{.”ùÚyœVæVÝæJ×8_$Î÷Ó’¼¶uk·ïì&úÏ}]3”NÞm­Ä·þ²Áv›"”l?ÇK¡¯ ÚÛòóñyÿÉΧ¼§1î÷Õ‡²rÅÕ òÞØûÅ^ã¾ìéíÀíŽRÉÝ>©÷ŸM¼›Ôwó¾íòç˜#Oé}eDîi >qDáϱVŠìFÿuQtÉ;zG yçèKœÁ[ͳòì§P-zóævÖì8ØŽïú¹o„ñpõ¸z¡0™q±zî½þ>gÿùywî»»ýúã‹æû®=šÏK ·×žóbv;Ûàð#Ïü¤hld3Ôžßz×ùîÕÙ Y ¿n#Eü¨åÓÅÍáb©J±mÜvW«þ ž…ö•±wxh¿…ž[ˆ›š•àÍ2Êí¡âÒýV’96ÖªE)➦é½ÕJizóôÚ¡S´WëVɯ]´Ï»T)—x÷\ù!¿ §Ñõ1VÊOùk ÿæk1ø2ü•Œð}‰> w®·Ó©!Lÿ“oóùph5DÏ…]‹a³½ÈY¾k•oŸ¡Ç±{BXækoø$âës†²gü­âÝ|].V(ÔÞè±ì-:øw¨•5«¾ësr3§ïÉ8~çNOÃùìþ{$ü,™±Oè8ü“Öìãw…íÒ¿P+«Sïr[ðÓ2>^-iGB澋9ŒwìMïCÔÈz½i³÷ðF/ɱ»F»]Ûé:ZIÚÿCöx÷tͯ܊»ÝZÚ=îe?³ÇØ‘¼ž¶Az{Y;CžÏG;ïCÊꘫÓú{#‘úÓijy–_ìúqWàÔ± ~Ô?ÃØ‚kc/ß+Œ7èÞ}€2Í ›òû·ï°^ÚÙ÷ÇAâ{/q~_‰ofwsV²ámî³ö>öñ_ñ‹9þÜÛn=sÜÓ ý}Ì0ï u¦”ë©|,¼/bæ·¯ŽGˆ8~*EÙ 3ßÄ1á¢`çÈMÙ@ìtÖ†ý{ƒ2UÒô®7=Uñt”÷OÿÿPK !IFc€Resources/Images/image_5.png‰PNG  IHDR3WhJ¢¦gAMA± üa pHYsÂÂ(J€#IDATx^íÍnWFÐZ¨(áGBÒ($¥;¶<@,;žq,µRv}†y„"•Äã±v~€n³c bOìÔ±ä1ÜûMìȤNãqì[# ¡Öñêè“{}Ž‘FãäžVb–(•Fžy§¥Æˆçy§Ì_5° ÏkœZô£ÙµOcÙµ1o£qz7hÖ UÖ™{ñöœ³T—ú³Vœ`&XÏÌs×?_ȼ®^ž+Ö¯$ü͋ϗêgµØšÿÀcb¶èoŽþ^¨}› >^sò[îòû«Š›"Ç:;hÆÌySOj×ÝüÎíäjer.¿ÿóoÖØB[Ìœ|}"™¯ÞuƒðŽ“«þø+ü†uvÐŒ™>'K®~˜Ì•ûÎJ8•\©ÝúƒuÖ°³3~x#•ßþ)ìL;Ë[?²ÎÀöÅlA1+lÿâª?»ù÷·Yg`ûb¦ˆ¥ƒÚÍ)ÔXg` b–Ê•gd:W{À:;è³L¡63„¿fXg` Æì³ë ,ဘ¹¹í§»Ac€ 3yÌëÌTR¥DDìR…)á…g²/ß]J¶o¦s[¢˜·Ÿ:ùêodzÎZo¤Ôˆ.UÓ@D<ªº·L«LWþè,¦~ë_+Ìñ+³­˜õ™)bº¦Ã¼™óª¥N½#"v£Îd¦—ËßiuéL¦[¬®³ÝU¦EÝ;d^|Þ/ßsŠáTt® ± õ¡ÿ‚Îcši•)^í1“ýYgæ޾xÀ¼˜™B–·t!“+Ï "v¥Y]úœL¿(Û)d²?ëL13EŒžwõhi™B¦rê""vmóÿÃŒ}³ú„f¢êª7Ôé "Æ¡ï:#fˆ8 ã]gÄ d¼ëŒ˜!âo3D ñ­3b†ˆ6žuFÌqÀƳΈ"½¯3b†ˆC`ï댘!âØÛ:#fˆ8$ö¶Îˆ"‘_¿Îˆ"‘_¿Îˆ"™û×™»þù‚®*;|3D2[ë,úv'?¼¡o{Zô£Ä ­2º̦ͯ‚òtv­vKß+(…g<Ï;äQ“˜!âÉ2CÄÿ…|f†ˆÖÛZeük&"Z-¿g†ˆÖûõ«L3D9›‰ˆÖÛÛ*Ä ‡ÀÞV™ fˆ8`{_e‚˜!â€í}• b†ˆ4žU&ˆ"ÐxV™ fˆ8 ã[e‚˜!‌o• b†ˆ0ÞU&¾ˆÙÖ„S §ÒA퉊©†ˆØµº¬CÀÚw• ÅÌÛ8­Jj×çýò½t>|¤ i¡!"v¥Y[ºXq>£AÔ)dúûxWYDãd¢ÔYô7Ï»Ëï¯ê…4-4=r""v£.T\v¦ÍÚzìø;³‚ÿ*k¢>_ªŸuÞÔÇ4-´è‘3_GD<²ÉW•Étaû¦„w6MájYŸVYSC­3M M•ÔghˆˆÝ¨A¤ûúµ¶4·Xy¨uÖ³¾­²=Ì ©ŒŠš>CÓ‹#"UÏhÆÐèÜ‹·çæÌÚJ®Ôni}éó³Ö?ôw•ýSG±K£Aä…g²/ß]Òãf:·õ@ñjŬÿ« L”´ÎômJúV¥èÛ•3³ÈŽy•ôÀ!1c•€=³Ý±ÊÀŒYÈ*‹è³T®<#Ye`b¦£‘)VXž˜-舓 ™¢Æ*{س輦Îi.o±ÊÀ"öb¶y1¹úa2Tî;+á”N°ÊÀš1ÓÍèày¾zWg4Ye`m1Óí;n~çvrµ2©³š¬2°‡fÌtƒF*øxMW‰E÷$®¾À*{0±R´¯Ìëêå¹býŠ>?Óõb¬2°ˆÝ»u ³T—ú³®c•€Uh-úÑìÚ§±ìÚÆ˜î9ós½cß_¨`€˜˜i…9Óÿô9éâ™Xnå ýt^Tûdj‡ôyZý„˜õ˜™xM>­ Å]ïËxvùâ/³ÕO~4—ž¬3°ƒzÌÆ3Ký¿Î9¹ÒUßlõìxfµ_ßp²Î ülÄlµ?‘ñÎ;)o8ž+^›LW/ë34ÖØÁ–˜E²+߯²ÞMEMKuv°%fZeNºx;ž*Üð??c€4ˆYÌ-݉¹ù;ÎluxbŽu6Ð f‰tþ®“)ŒÆg+¬3°„F1Ë•îF]ïžë ì IÌâé•ïœL™u–°MÌ$ë ì YÌfMÌŒû¸ÎÌ š7ƒˆ¸uÔŽü™š9 û2céW#ë1s²Åï÷g™7¢sˆî/Öt|Ç!ÝŠˆ¸S¥¦«GL?zÏŠ'uOfl®4²öMæZÌ|ÛºÎLÈtÑÔü›£?åJ«–æ÷DÄêŸ_fŒfʧ&S•¡‰lñ+ýõ¿¾ÉÜY»×™¦áÔüâQ½!סk݉TéÂÔ<"âÎõרlåRB!K—F­¨[Ù3ßö¬³µU¦#n#nþôdºpYÅÔ‰¸å눈»Q·.EfVn­…Ì»·é³n{ÖYýóWsy9–z9”p ß$r+·ô¡ê‰ˆ¸[ýˆéÏ1„lCóÿ‚]gŠÙbÍ™“}uÖ_e¦˜z# ß"b¿Î6ŬzVGvè^*b†ˆm7ÐuF̱C»Îˆ"vÒÀÖ1CÄÜ:#fˆØiYgÄ ;l0댘!bly3D ­¯3b†ˆa±¥uFÌ1$¶¶Îˆ"†É=¯3b†ˆ!²Ù:S«êÕj1Cݹeýùö˜N®W« Ä CæÆ:KyÃþi>ÓÕ>ç¿ý:#fˆ2מäT¸ùëþéµ3ùA=(eû/ˆ"†Ìw1+›˜•/Ž¹Þ =,…˜!¢Uª?Ó!õèç¹×þ—\f"¢uêØm=G@OxЏ«§ã–{?üçÄ C¤Úã7(W¼æ?Hx&?øáKLAÌ1Dþo•=_îÕC—¶¿ÄÄ CâÞW™ fˆ÷¾Ê1CÄØÚ*Ä C`k«L3Dì°­¯2A̱ö¾Ê1CÄÌ*Ä ;h0«L3DìÁ­2A̱C·ÊDƒ˜énub†ˆí4ØU&3SBÅlòieH';ÆÜü3êVw¥"å«3ÉDlÝ`W™¨Çlü‰wÜIÏè…cs¥‘X¶r3’[¹…ˆ¸SFÓ‘Ûþ‘י¨âÖ(dÁ¯2ŸZ·0öøïc¿¹Þ ·m^ø’ÿ ÷5"⎦V®$Ì Ò^|¶p£ÙçïÁ¯²:ª¡Nq4öèDGE-ñ¬x2šY:…ˆ¸3˾7Z§Ã:¹ÒUKáz?dmZeïÐ ©ŒŠš ˆˆ¸ §æßÕÊRÔtv¿Îð×åæûŸŸµm•mƼ˜^Ш¸!"îF}d¥145ÿrÀ_]éW#‰\éîzÌÚ¾ÊÁ !ÿê.³ÚŸÈxç­÷c¶O«  EšÅLªÁ*kØ&f¬2°‡&1Óß›±ÊÀšÄÌÉ”GYe` b¦»$« ì¡AÌœ¹âíXÖ»É*{Ø3Âãßç­Ÿ¬2°†-1sf½áXº4[¹Â*{؈ÙRÿÄ\á\4SþZ*lSóoXe`õ˜9/ª}:G§hÄf+—tó9« ìa=fÓÕ¾H®ôùDªta2UÒ½š¬2°‡zÌtrµÖ˜‚¦4Ì¿õ°ÊÀL¬-]RŽÕÏETØt’« ,B'W×è\3Å/þU=¢£Xe`Z`ºÔÔgdZd\^€˜p%“5ÿ Fý$d`1&`~ÄÀþÑÕõ€W…2Hv@IEND®B`‚PK !Ç"@ìääResources/Images/image_7.png‰PNG  IHDR3X™sgAMA± üa pHYsÂÂ(J€†IDATx^íËngFCB¹®-¥ -—mÚ”[ÝuÛEÕU¬8;îEbÇ3ø‹Hßm(ê¢y€n³«ºˆDbíØ¡ò"îÿMœ4¤vHâq<¿tŽtÁ°:úÆÎü3ûIóÀ@Ó¨¯Vb"–H4C Cúº5ËH$ƒ÷ÓKï}7ß8Zp}›XÑd•€-´‰™Y$[b•€E´‰™“ªÞÖ-N¬2°‡-1Ó‘bº ÀIºã3¿²ÊÀ¶ÄLÓ:›K5®°ÊÀ6b¶tBKÌÉÕ®{fc¬2°‡V̜瑹§õQï}²Ìò¥ŸòXe`ë1›ÿ{DljéþL}UÜt3:« ìÀÄ,±Ø<zì×{dñ¢ûÑtÖ==ýèÍQV؃‰™ÎF4ëlØ;ßì÷N)lZkú³ÖwµsÌ7ë(þèÃåc:HG±ÊÀ*ô¾˜Ö™>¹ô>Ù4qc•€…èÆÄ Ö˜·ÈØ Ø_þŸ¹…2‹í;IEND®B`‚PK!uÌÒ{*&Documents/1/Structure/Fragments/1.fragÔXíJÃ@œß‚ïPòMS³çÕ?¢ÿ±¾@HS-X’ôåÕ¹&%%‡…’Ez„»ÜíÎÍímØáÈÏ÷STX¡ÀîÙ'xÅ>h-qŠ|rþÎy‰kx£½BŽ+„|J¤´dD$ù^ÐR¯d›9ä|E{HžœÖcŒøG#ö3úS¬wv­È°¦­b_ÐàfÉû¢8–¢rŽmÜ·\emµ' ºezäªeƒ{àxALëmw·û?Ñ_ïbûœ§Ÿ:ñ¶x»bË>Ãó˜íÄ»õ<³ÍÙŠ'm"I˜Ÿ€ùÑb‹:lÎ;Íÿž~¬zú3U¶X•MTÙŒgßùܳx/T¿Ö¥rw5ãØ³9ºÔ—¯«ÇŸ]mŠu:ö ÄF¬«Ù±£Ú}ùºªÚ—OWõbeÝå»’(«’x§J¢¬J¢~gÒ­@ñîÞ$Ê5.Ê5.Ê5n”kÜ(׸ñ®Ærå7NšQ‹ÿûAÚ)Ô/ÿÿPK!;H»ÞÊf)Documents/1/Structure/DocStructure.struct¬’Í ‚P…Ï:èÄȲŸEX«hWD=˜f)^…zùêS!©mä23gÎÌ=÷,îóái¥TJ% uU¡‘ÓÔª¯žnÌ/̲3+”i.‡cØÙKäƒÔ3LŽ®!"6ô)¼ƒNëÈÕ3 5#¿\˜¶–µK^í1…½ÓµxËûÕýÊá|F©¶÷?Öd_§÷Ë{jDäu-íêFyD8i¹j;Ôš|hyàV«a+îÿÏiv_ÿÿPK!⯧ÀvSDocuments/1/Pages/4.fpageì]ë¹ ×çýh# šuü~Ü£ÀÞ&Û;àrwhr}}9lö‘ÝfíMnïoKQÏK‰ÎØ1c“ñÌX£)’"¤þ÷߯ԱºR¿ªsu¦~R'ê-uàûºV·j©¾VÔ¥ZÁç½úB=ƒÏR™s¸ãŽ»ðÿœY¨;øv§.àÎ.|¿ƒóÏ ÷pö™¨|ÆpÔSh±£þ¿:ƒ{/ñ 3ÕÇó¿W¿SßBÛWÐýT}­¿4¿2ýúþN woñú9¨ŸÕ+8þ ¶ÐQ_©#¼ãö19[<ßUÃ_ŸÁ¿ õþNð/ ÷ xRú;ýË—puçõh•ïíä®›~wÕ°ôy ocþª¯?‚±ÊöûÙ†=ÿJýFëèp ×;ê¸ó~¥{x¢FøL=²ß =®Ô÷píü]ã=¼¦9äÚžù|;Fj&ŸGëgÃÓoa ~ÆQøßA÷SóÅ=œ;ÅãgðÄ𻾚_ŒàWðí>ÏᨯáóŽ&È8šÃ]š¾Á3úÛ!œ?‚Q¸CZÁ{—{‘¡+ä–ðæ¯àø7ûþ}¤AÚÓoù ~óoyŽ÷Ü@¯‘¢WØž™ ?àñ9Þÿ#¶ûÛþçšSgØâ ÓŸì}ÿ²Ü>@Ú°ŸáüΘ3|öjÝ_}ï+ îwÀ[švúÉzž¦m‡oxeGVßÿǪ £5†ö¿ÄïºOsèÝ¿àJÂeúû ïŸ5²g‡ð‹.þ&{v€=×ýŸäÎñ¼¦è(w>ûìüý=ïïø?ËÇþEþãï1rÅú)Åßü+ó±õÇ‘úbÔŸ ]ÇÁ´Oîªæ€œï¨7hw,àßSÔag(é:ê1ž»Á¿7ø¶úü¸òÚÐöCÿÕ6ÃŽßÃ[-,¬ð~Í'8V¦ýjé9ÄþO`ÜæV2 á»–w}Q Hµ£åUZ™y$æÈÚ½Âó²ý k×Ýﲄ6ÜTÔô{ô༙!ý ÆiF´Ã½?ô=CÇŸ꽩qšb;SÔ·ùûÝç‡Hß œ ã?š>¼vŠïÏå_zÞ¸Çqß9íS÷sù‡—0>Z pøþT¿i:péìçg)];‰ºVH׎ W3”ãC1Kë aKk©/Fý!¶¨­m)ê¿Ç^<¬­ªSøv½iPž…U³²¼r1Rk^Z¡¸-/ÊÎú¹ª-UÞï¹üù#ÜR—²Èù+KÞøÒ+©°ñ¥V6”Å__+ÈŒÅ\ ž»Ò¥ß+õHäß˽Òçz(BWvü5?)z„Ígš/Šó•š÷”OšOªJŽñèNµÃ÷äPtp·ÏŸGaó–ž'î~HYgR“pO×ÓÄ£WPüBÏ7î¸óæA“t•²¦çÑšnÙšîÛ's1¤jkú(xŽ^ýÚ·Ú Öô¼‡Íú5ñï'.X¬-bƒaÈZÐÉ ¹ƒqmoë»Þ¿…¶ûQ÷^û9Q(®®C=´ÝÁ³¸[Zò<Ÿ”\rGžëZ‡ÍûY›ÑšÑ?Î{ÏðÕOkÑVZhü,Ôjåò/wÀ‹ãÑãÁ[%ñW¥Ü8«{NÓ™êØ*¢)«’k­ÑóÝ=íÏw7Žˆš•ug;W×Pí†ÛÒ2¶èHõ¢-*d‹j®˜"—O¶¨Ï 5ˆTŸw4;ï\ÖÇ 'ÅYýÈY­¯r¨_¦ŒUN²ÞÐþùâ§ó>üS{\\ë½ùÉê(áë²c|YI¼™•ÁQ’{Šzeˆz«Ž®¯wÃŽl~}õwê­oø^4Ê>’‰*q½h|{—ƒ«–ó­Qo»é*¥9m5ˆÚJH[i‰ÖVš§ÃµÕvÛ#óQÚ·VÌê/É•¨¦ÿwhc$í…ÊãNàÿë j!‹JðÙ ‹$¨Â…ÈêºXgÚ#ÊÕ2¾™¦lºdAXUÓ?.ö½~ÿ¤¤[ûÙHZ£Nán-Ýa ´t;Æã” :›çþ‘ƒø÷Îk{lŠ+ãú&æ;'Ý46Ö¬òû‚ÒM¯® —Ÿ¡Åk8³Œx”✘É$Ç9c+$9§i»(¢ë%é?±«°pú‡yq–hë¬ÐBºPTÄXÝØˆó G;"'Qm™¾Tçö|r}êø½Ï²JWE=Yí»wG’ùöQɸõ;u?å;*Û¡±÷}¼µ>5ÚR™nükèÛ7ÑåZ£Má Bã´º0tí6êMQ“7æ­‰v›iîÚÜÃõJåËõ™çøýeñKø>ÂQïZ¯^ß¾£¶Ó; ×õõ9ž£|ò_Ÿ(SÁa²¾žoßw=Ûþ¿Q—ä+Ÿ$ïÓ][ÙëúŽW í®Ñ29Â#­¿?­Ët†vz6µM²Ÿ|µ3ºUOÍ^çØP1G­}ß’©0eØP§Ø›%ÚAK¥ñwç6þ•XU+[¨£ÞÁ¯îÔG¤÷%¹=O=õygBØcþèXÖ_”>ÕRÇ¥sÂ4e= ™Ú°è;‘‰Kqã'´ (ƒ¯áêZPY”oÎý¾S|®+»H¢®÷©Mç–l/çËùÙ0Aj¸2Ty(¹¦Q[ò+Z«½è_Ìo•‹þÙ7WÕ{òÚ§›_—²S9™äÅZd>ì;•A¾­µeÓ¹.uPîR3p“œ˜Ü?ÇÙr¼Á Ã\;Boþ!¼Ó!Î6=מã‘nYM1"¡¯¾@9÷®éš#G(õ,¬;çh)Ì„æ_v•%7ÿ’ÙÖƒ÷]À9ªkd­Ÿ/+¾å9nLhfî–áÚ±Ú=¹Öŵ©oAŽk?ïPÑ‘¤±kãˆ]œeS’šcfo%ÒãÂ3§Ò½ ǦÈjΉwq2„¤ø2bêä0u=Ë>os8g4¬û#@’úsÔ‚>_g8õutAÿv™ÁMꫦ>ÉpÕ}ò!SÏ"uª"mÜê6MEܸq©ìDw<˜›µÈËÏh®ªB²Æˆs\bŽÏQ½ë»ð9¾lXÂÇún’Ô)ƒ- ¥~Úk…žìS•Ôv3è­ø{‹^í7*©Oœ ÂŠ1ç¥2u”—ê¼[Û²IÕ6So9‹óé‹Tžåv5ÒƒÊ?ç!lärep³\œÔöªSò"ö|ÉÇžï ~€â&÷[ÊTŽ®‡À§)ã¦Ay}†!á#yuùÈC^% ªîvx%.í;Q±¢UÛ¾Õ}òL…ì ’ÇK§õOStuR“¨ëÑšeW>ÃLn—+™šçÜZþü*Gõªåp«qeSªˆRÒ!V%“³Íû–/ª½/<éÐläm¢bܽ}í`Vƒ\|>ïk²iÌ:¬\o.[ÿ%¿23•èÞ¯³yL­î¥]ß-³µÂ§wr{|&ñ¾êUàcûä¸r|§ &ùûwf-‹G®_¹„²ó)ý¸kUÓ¸«;2«Ùú1Ó]ÙIŒë¿•Ùµ[>›Mªî4×Í›o¼õ/7טËmÜõuÛ{âÊåò¬q©ûwÏ'Å­Š>é>ºWR’˜ÊHäú?åvåâ­,¹UÎïÚœ_&"Û·¼læÔƒ¾Æ>]­mdck»øHý>ÙÇ\Ñc}«>ë¬Ðö½F»ù#ÚßwØn¶þÐÝÚ’÷ÕdÌgº¿só«åt©TýÞfuÕ]'&tÅÁõRËìRÉ—‡E[‚òÖSô)Ƹ¶•”ÅÎó¶Keôsëñ´»_‡\åÏúëY)íárèC‹¨FŒl¢O3=)ï|…WOP‡þ¶öEÝZŸPÖ‡ôÛPO­?J׆ÑÏð×Ô+Ö„)"¤4”L9©È 7c^*2³-¹ßÌntrñ*žƒ† ¬†ú+O®&¤9’ªj‘r|>Üýõøû•É×£ói¼˜Ñþzp‚ü•TuöÕ¤6ØçFILŒ^ëº'Ê—/æ<åëÀòe¡ ˆŽJ󪽄¯9¨5›|T;f”ÈÍ¥ òIÞ*¬;—êFµÐ>ü€s2_SºâªWAÕ¬˜¨¤ªç)¦ßj®L]‰±Œ‘ÛC®'i]Š|û¾ëiûåºaµ+6¯_‘ŸÏÏ®®aA×±0çÝÔªºâ›ù1›¨}-:C ‘drUÏüosh·%ôéƒ2»vßÃ{_XÜÁ ÖÆ¸GÚÞbžQµ†à»Ï±EëµÚ?Ô´GÅeÕr5oÝýUé5-…¦ü@aÞ+©}e)ëœznD–—ÐJòRöJÌ’CázS”FRR닚öŠþ1CJ’þåÏâÑ¿YæTEŒ~ÛVËïìâøéÿªaúG¶ýû(ÿ{ªºúþwH/7¸¬ÍÍS´›¤8&â¶å8fhé')1L.¬Ù9—ëšµž«¬ÚÍw*âÁˆ`’ô²õêrØ´Í#ô’ÔçK °½‰W˜ ݃s¼KGâSÔšŽÆçý/§¶ïW6«_·– Þn”Ù³ƒù ÿQçˆX*wžIZG ˜±ÒµÜizrP ˆz+KNn$…—7éK×Ïçå7Ê!åyQýÝ÷K¹ãñMcDxµŒø>·‚"í…ãyóš®m¾W/;‹+Uö?‹H Å•;´¼ ò¿·•Ÿ†º¥9¨ÞnÍF;šÃÌL#ff ~³R…×–:-TƒÒñ¾¥}—bMá¼ziQ7Ed©± ͮ˩•yü×@ ³k³9·Ä_%ÖîS´FÏÖ™É]¼¾RºÿQ=¯Ö=3­>Xà"QiÔO•l Ùåk“9žÑÀ³aÜñMî^Á»]»¹}û•›m#¡ûw=\Š:RUÁh«¦h-qµh³Øñ¹:âY]YÌEµãµ+õž2²I®5§y;ÉrÎMW ,g†qFÝ©sHáÁ©µ%¿ÂT½šêÜ™Nù/¨šu\ÿE¸ßDÊ‚HÝö-xõ½ ¤nrÞdfÝÛ}@N¼µE{¸% ·x’𓼵½”ÜlM°’»|˜x‹KÀ™Quãr¾]MŸÇhç=ŵFßr² ¡î¿nv˜œÃ‘¹^lßw=Û~Á¾?;/N7BqNììÓû&~Ú;/έ.¯?ï¦ÈQ=”&ÕóÎDÍ?¹Ýxø&ÎH}7‚ËèRŸÔåPßìUöRýï}ÔùŽᜯ¢î=6Zëéùž·š>o*HöKŒæž+3Ofª}¬ë¾Î“™µŒ«3óxóä1ôå)!)ó|:¤ø¦}Œì~òÍG#ÉÔü4´ëLµwÝ_ê±EÖCý^¥ÌÈÊ)~h{º¯ü`¬­<¦p×¥AûØÓ}¥¾ñgD©ŸÚÚÇÌçk… ÿ¾Ã‘=„³iìýG•s¨Òǘ¾€þ=O]k½}«ùS·úwsܤú³kïõ©ôׯêOù¼”jy¶ŸÈd?ûëË´kðë’p½òE¯¹Ïë^¼>U…—xí‹íû®gÛßg¯ül æýœ©á^ùäÎ6¢a>ê· ÝOê‡{åw‰úí×UÙWê› Å±WKïõÛ¯ª²ŸÔ×>ÃyÇxw¨?W1Î$E}³î2–·õ鼋LjĨ'è-ŽÑÙOá¹áý‘šÝ1(3»5>kŽv]õîíÊv麠sëå´36™&‰¶]k Öªi›þ#¸cº¶}ôO+èÌËsõ+Rð=öTãÍ}•AÆ%Ô¶dVOx¦`þ>nNwH:#0¬¿®~H͸XHnÆÍÔÀZXr3Nï¹£)’fe/°Õw~~¿Ó™Hus:êÍ×ý¸¤ø>Ö$«å:´|Rm›òøþ³N³–FÌh“¤ÿÄÎ[9ú/•©ü TÊ•É:X[âû~¦|ynôn.UšžÖÈîðtÞrþ¾JàðÊÚ÷@]2Ëéu_Ýö¤*òj­]’MÕºò>U¦òœñbÞâ•7¹_¸ëÜ%õ–õ(¬àJÒZRSY¿Õ<«ù°&ÉWF.ûid*S÷×ÝáŠW¡Œ_é¶ízn¼zÄ”¥Cï É­IÂÝoË]/5tg‚úûlmâ3äÚõ«rG)ÔwÙ4÷4Ua’W­°ýÙÇ«ȯ¦%Sß».ø³oõ«¹2ï‡þMÏÿöû+ÿè÷ÿú™:Rmzdr.±Jà Þæ]3f³ª\Þ(n”e¦L âr¥/Ê‹fm…ÞGG-Ã2)D8e«õ‚îkÎF뫈E‘óåô‘«FÊWM`—dtŒ IÒ?d§›<ýðHG/Þ=V0}½GzéèŸ8PļÒ3ÂoUODKù$çK»€³æ>©;„¿—ð}…Q‹ŽúhyÁã^0r<ܧÈÅÐ>DÞ>æü˜AÉõÐêaè~,'+á¢ÉÃÕ¹üóí"<Ü<ÆCñâlRq9šE›†Šs…ò¤Žˆ—Ú? µÂïñé†'£ò0h Úm©òr´èÚî¨,Õ›)ñVÜ9HNsØ¢~ÄV´¾z5>Ã.ÆB-£K¤É{epÕúж‘’Øg‚¹H,£|þüÒÒ\cµÍÑ™µ“{çw›Y¡…¤ï»Ç§œ©Óqb­¡×82ç@)mk¢uµ*=™[ûp3IYõÇÏf•©xU“Øê¶ž…ÄË?ߟk#¾4ˆÏHÚ/†rw¶¿œa˓½íÌpyK­–")Qµº“v(.¹3Î<3$ÿ÷ßoÄ}1Å…8?ˆ©xŸ:ðýµx%Þˆ÷⎸&^ˆ9¼ÞŠ[â^ïÅ\¹€SøÜ…ÿ3¸òN\·Kñ Jváû%\?€zÞÂÕ‘‰¼†ð©'FPcGü¿:‡²/ècѧë î´>ýRþJ¶ë¼§ÐºçD¿€O7Åñ>K5tÄ7âˆJü›Ú¨®Ö¯wÅôësøûNœÂ{J}~­wª~‡¿<ê®ãÓZ.ÛY ËvwE¾ôúz#ß«é×àYéí>X³åßWñ9«+÷èû”Úxß àNÜ¿uÄ#xgК1PFÐRóõ1|ë§1üZÒë³Ñe½ÿ‚÷µÚóVíî’„¾‚—NÇ¡·¯HŽŽèöý.¼?À“x%ª«Ø×¿B=‹¯Åg,Ÿòª»êtýêß¡Ôo é/à¾ñ=”x |Á{N¡w#x£ìÞ¥–Îà\/à7X¢G4u¯ª=íuíê^÷¡7oàþOHÎîPPpä}€kgôùÆË=è}O÷žü!ŒäVWñÓ]1¡O”+ˆzL²w ´ÞGpuÜ9„§pI£t’µÜ ]g4¡çáóïeÿ'PÃZ€}| ¿ø úxA%^C{_ѳœQmRÓ|OŸ/¨ü?¨ÖçTóÏDÕ%§j^6é‘|¨ž'p}Féœî=¿jí¢ãû!õcV>?¼~­ÆwÇ>¼Ï™÷Ax³À¸ä~(ÞŸB›Ãß§ÐëGÐãÇðº:QÍg'ð>/¡>Ù¹¸¡ÝyYb¾†': >çâ6}RK&ð¾½@U:¾^jñ:—^.~ ]K‡Ò/Ö/Aô‹nÕ¤2·øYnÊÒ•vV^Êö²Q'$·ÕÔd¥Ùèzíí¶å†<Þ¢Úrò“Æe¹][s#æ~TkÎûÿŸà½] (XI@5ÿ¤3þýfÜåY±ŸðÚÐJ•¨V—¬Ž¦ÕF_¬½Ýsî˜Ç\Ô9·OepÔ˜s'p_J)sßgÎõãþ[hÉ/¤EÎ’DGÂHaQJë Í¥0§ó :èÖVuPA˜s?÷•”Îüãgó-ÛeC  K‰v¡#JÒ% Öl÷Ùèzým¶û Ž›E·ûú4:{å“ߥÝWpä,ºÝ—÷×kŒ™û3®÷U¹Õ2p ¾¤¸èðç¹[óz°^ë@ËåîÐw,‰¼ÆYFÖÑ¡èëC˜e1{\~ŸáZ‡òYÎáÿ1ôãø{DÑÚ{+Jb$}Ï©tú-äÒ,\š%"ÞoËS­{’Y,]¸wîDG; 馅®×ßnOuݬ¶V×õT%¦Ò/ï¼ÚNS¾z§ìKÊM‰è߸ö„úŠü9¥Z^Šëâ‹Î   Oš-ÊÔôej-ܿҡ¼t· —}¨fÞpz/62^·rZõXu߉.30 aB¾mt½þvÛœ…ÛÞÈÉ–Í’ÀF9&62ž÷7ɇaŒëÜwCÆ«•E'ðéT<€zïWqJm½€Ï3ZGû>#6¾¼æè)pö^oÅ/Ð/¼rH<å5H».~ ¹4KDXOo,8ÿ-̬£û<騾ž^Ýùt"Ôj2;]~›ü¸ÕT½î6{ycÎ:Œîå AÈ£ +6îsö[l//%îsö[l/χûÛ_i8¼²?œ(Û#ñïkq-ÚD/ÈÈ::PG´†wÞj¶¨lôªövÛ[¼¶?¶½5¤™y(v¿¶_­5aîdz·Râ>GÔbÛ[)q݈çoÕ¹/÷G ËýzMášÜçò9ÝÿóŠ‚„’tކ‘tÝÆNGÏùzuË?ruéÀà9Ôé²¾¾ÁoXMÕën³_1áØIt¿bDw.vnYLÃîU¤Ã{FðcûéðžñûØ…;ïO M*Ïê=ô¾-Sß® ¹ZäTà>û/Å °È?7_#µÒûØÂPz„£@aôˆî¹¤2‡øzk‹þ”ôæ±¥¹UîМc<6zU{»}5ŽÅöÕäü®v|Ù­ÕÆ1 ØÞZJÜçPl-%îo²ªŠ÷™]ÇcóáþYyÿùN½±P²ÆQ˜PQŒ ¬MöDÓä%ÿXÓ„à~_ÈS‹€ÜŸQ_š%À_¿„’Ž#„’™Œ4Æ$¨Ìl[cp$!÷]£ö>ÜÇ“p?^ítúßK5Þ¿ÌQ 5*d0 è‹…ÖñJÝp¡OJùÍD3Þi£ëõ·ÅqLj؈¨<ój’€ÝÁhxl<4Þ3 M‡÷› áŒP¬ƒ…ºó>M|‚÷$ %1“’g65mÁhv84»'\võÑ·tEYèo„m³,¬ƒm§¢úŒQ⽫§˜*Ö½²ÕSBh2¡òíôµC=Ê!+œèòô€‘±ÓõúÛŒÐô9:}Üɳ²ú è\FÅã"4)ñž‘Ù¸MJ¼ß™e„Æ¡ñáý3² ÒBhúŒç“7„ÆGb®ÓsÄúL|-šÃ§;µ¼¤}/ûà&‰Ú—ÕTíÉ}ØE¦DŸóØtÝ#MÅ.ðõÂë^rŸö¹S;1ÛéòLç¦Ç¶¹Sâ>G3bÛÜ)qŸî0ÜWølÏËòá>ž|û,ã§ÐïCàÎ#øt×®kû,~ µÌÊ¿¿S/~ƒ÷[L tú-Ü×ÒÛŠùe}¤u_<ùШ#¸ë%¶6w¤«¿LQ=]¯¿ÝÇ}b#ò”¾AÈ.8îH‰û÷‰@¤Ä}ŽùÄF Râ>Gb#>ÜGâGàþü =øl»cúv O©Â%iHÍNe—Öœ|!ãa|êŒ4¼íì¿1Þ„)JDñW:ÁåÍÈ"gÎïCé”[J÷pt3ŒîÑ‘­t¬K_<¯Ž·Õ³ômtyÖ&®chÆëlt½þ6ãy¹à¸rlGrbãy>Üÿ´UîGrÂqß-ƒ?±?àHNt«Ož²9NrÍ´üŽÏ»yg2]fäFoÊF×ëo³·¥rgxÜÅwrnVgîVër -¶·•÷9ºÛÛJ‰û¼Yloˇû)î`¦yÖñv0ó‘ÞÃŒãŸáÆ:#ñaƺûf1­_¼î1×ã›6º<Ímxå±×ë·ÑõúÛí‘s $¶G>)Kî~WáÇ@¢{äép(8Û#O‰û‰í‘ûpû»˜ (n1Иãß׿®ÛÄÈ¥‚<„¡]ž+½Ã&›ÚF_¬¿Í6÷ã ‘mnyš¼ò‰w=ïr$®Í÷9Ï?®Í÷9¢׿N‹ûŒq‡á¾ëb?îûíb&Û‡10ÞÃ,…Òé·pÿJ‡Ò{cÛ«<îtf=?œaÀ<ÔæÅîìô~ù­9vg§ëõ·gàèNlœAž ¦v‹Ù¥µ9݉3¤Ä}ŽîÄÆRâ>Gvbã )qŸã ±qûª\˜ËVajߣ ‹ø ZÂxD ¥Óo!—f‰Ø%.4âHh yJGHÒ±R|q¡:n³˜Óm§ËSðÆÆü]¯¿Í¸\Äã.&.$O¯TûMíÖ;àtl\(%îs :6.”÷9òáþ§-sŸãAá¸ï’ïÒØ/ǃb[}òÄ0•ï–·•ÓSAdSzCˆuöKYu¡Kýgò¦lt½þ6{[Gâ¢;¹³·šïv«u9ÛÛJ‰û‰‹ím¥Äýuñí1sMoˇûôš}®ÕšN´4”2Ú.@YÀû£ƒím}Ê}®ÕÜŸ–×'Ï}É®¼:D(äi9C'º¬÷Ïnöêlt½þv{}Œ³Çwj‡ñ´.ãì±½¾”¸Ï8{l¯/îgîõùp¿Ê£íB>Àõ'Ô;äˆÚµözm[ΧÝ}éô[·÷¡´G'Âh+ÝSJg®òõëþîÊ5rÇ2ºÜ7wpå?Öë·ÑõúÛìŽ9.Ý?öÐ+ñÐÝÚˆŠí¦Ä}^÷Û?L‰ûëÆc8*¸®èÃ}|/ìÉœäáóòýBIúº±'–ôzä1'+'³ú>’~sËznÝs™ûEéíÏ,·n„¹_çþ€Æ¾Ì&Å}lÑ3šÛæP¢í:‰:˵ CãxO(Y¯Ð¤t4/†VǸÐKÁç¤Ö)Ûèrü‘1‡ÂF×ëo3†6i‹¡©ó+vgpä"˜튡¥Ä}ÆÏcch>Üÿ´eî3~ŽûÊöHgìûZ\u‹5š<¿Ó…>rG`ÌÙl²¨lôÅúÛmqqä"®Å5(%5sôtä+Ž'J—óú”02%54zE!eêå¾Ù%)”4ðz•pV½šãBj˜íÎìº/Ò4óâ ¬ü +±Óåžnh/V3¿^¿®×ßî™×«Äõ¦å^Œárè¶ý©øëU“ˆódÝþö€§GÄó>põè(c’‰›Äë!É^‘œÏ ü¦Üï—Hò ÿ+ ŽÿÛFSâG0ÚË×ñ/wêï~¡½2?*ÐQ@™ÿ­|z˜£‚ÏoN|œÂ• ø§^`þÊ;ZÃ÷¦ü]§l?¶~õøÐ%NJ¦ô‚Ñ©×%2'É×ä:£~-ƒœžKA1ùÅqЫɯq¼˜~Ÿ—¨½ë(mÕÍ}©·ÍÔ7Ó2?¹æ¾˜Zmjß]M×ïp)磙n“Þí7j¸!•GþV¶Ãü”ªr¡4`ü(Z[5`Nó¾‘á4àÍ-[}ñ£9mæ¿D[Wï µÈUnµ ’‡sÞ”¨çðëŽ8…k3â꬜;„2¾†÷\k;žSýŒÊψ÷÷¨üÕ7§ytõ,©k£¦YÒm1Í?fÝs*'Oôhҩͺٽ޼±½¦YÚ4CÖu»ù÷~ó¶ëýLý0ÍQ¦ò¦9ÉlWØç°õæl_M‡©Ÿ¾ÏÛï9ÖålD¿ï-EU—çþ&«NæK h·|yâbí…šoâGzÛ:߸£ 2£zè„2žÀ€sÃåÕ.)]O”A×Èþ²k²‘ÍãÌd³7ßÕlËËSõö„’ùøñìöÊüˆøZX#Ú>2¿md5~\õsGÖ‡{ëÒýwÏެÆç¿´³åøwó±îS†ô£Ú¨Å ñ‘¸ú–ZçîâÊð *ù¢ü_á“6ë„Zá3ÇÊÜ;œÿš}0?\Í< š0Ì\4¯¨ëÕÊ5Y¯¦_›mùfÀi0£“uT®Š*–"Íõʽ"_òYL8ž›Ï¹ì£™žzÓÓtõ¬Í˜ª\KÚ[zZͽZn½©^W7zB¦ß›pn?D:7ð2”ßm’S=rdi5»=]?¿Ð•Íå|ejì1·Ú䟚|¿ñiö *íºØþeŸ?”M?Û¦­>Z{Q,Ìõ6›`·6a_p¶M|›Pbpq|‚#èÅàétáú*JSn´)?ZfPŒ…̦˜ô«•MC’¯.ýw¡WZ´ÊÖë·Ñõú—ó£Ýr¤×Ï“^ ÷^+mΗބ#c²ATFú2G\蘑izâ.ô̱¾ÏÁëÍãgŦ‹ãg¾±. yBŠKæã¸þ+”:‡ÿeÄó~¦Ä“ÐP_Š¿Y¼hÝænò¢ cLÍä×õ—0cŸ˜¦É2ÝÏ×óò÷þýîk²ï匱lOûf™ìò¦ë¡ì²ømÕÕ¥vè ¥ ¶m—Çχj+ÿ]ç‚Qy笌“­æÿ1ñã´mNù/Ÿ•0Gâ+xuÄ/d¨<²Z!uÝ⇘4ë*3ã‹!úb¢¾sˆO6©+V芚{׆Ïö]…ꇱøçŒoϦãÝXÂå‡ ®â>îºË-g£O—ÀÅ Òdó2ƒôWB&ÏÈ#–ȤÒoHýs)Sª1Ê¿t”ΛQÜNÒe¯>6֋˚ȓñÕp¦˜_ÌÊ› 5Æ}ë1ëÆ01½Ígߘ`ŸžKÏQGû"¶›#É~sˆö«ßzCßþ¸"ÖæÝÜçÄ0sP&8G->Š&q®¼¼³}U¸\{ WØVÔ-c;†æ›oà‡¹­Ê‹%ÜÛN†¥lŽƒÊpìè˨”Å‘P–‚f¬ åðØé…9áÍñ•ÕT½î6Ç_2ÁY4ñg™uU”¨Ç_bÅ_²µr†8þ²IüÅGÖ1þò#Èôü =ø4Ú1};†§ÄQ™}8·±-1©Lp6P¸˜De™…ÓÛI©˜ÿ!ø¯l [LRç¿®k‹L¡½ýbQM«ùUœJ®M˜‘õÜ¡úðïy¹‡›}ßµzkq¶ýŒdù®÷Ewýö5ð{V¡0OßUÔ~H¶¯e\P_—÷6ï¬dBŠM«¨·m[}Ý´:Åo•¿lúEYCÉø¦Ÿv„Bg2òPº4ÓHüd@3ú¸DPrº&×2ºÐÇ%ò¤°›ÅÚWSõºÛÎÄ߬­6ˆ;:#u»ËŽ¿oÅ”¬䙊__Âúoµ¬ŽSÇmê{ ûÆ}]±}sÜÍ-þeÖòͳ—¯ÖÞVìÃ<»ÖûmÚŸf³ýjÌ6K¨ýmö·['?”q»&O¬šICiÁøý‘øN<%üîr¨àÛ)av'УSñÊÜcÄn§¥÷ƒã¼àp¹u•ýjäoãÌÊÜ—{ÿØ8wî¸êÃ{òñ›ÄÞ¤¥û¾ä§žõâkó®ú¾Žmê·ëe(ÿ}»›»=ܼ/as]­á]f™ê £rÁYu¡ôÏ€b?öÝÀÓ™}rÎG‹Ž½`ô§’ÿ¢Üü¹øSùWÍFÕ ô~‰¿µí65¾ÒŒMsŽo|Åíœÿ,ëí¬ð_±´Ù,ä¿—ézs=M»¬„Òœ+rBØW)úi„Mf„æ] ñ*òô#ÅÁŸ$íÿÿÿPK!RUEgÆRDocuments/1/Pages/2.fpageì=mo7Òü|Àó„<ÀÁ98ŠvW«—´}€Ôq/Eó†ÄÅÝs_×v!NœKœ6¹"ýî†C®–’–")ÍRÔz`(Ñ’—ä ‡óÎÿüû[ñƒ˜‰ÏâBœ‹gâTü ßzðüV\Šwâ£øNܯÅ5ü½÷Ä]øû(ΠäZœÂ÷>ü?ƒ’â ž®Ä+hÙ‡ç+(¿ ý¼‡Ò»"ø+áÛ@Œ ÇžøüêÚ¾Æ7LD†åÿ#þ$Bß3‡|«¬Ëð—êWj\÷às £ûë/àÛñ³xßÿ{è‰oŶø ÇX•.—÷Åsüõ9üûAœÀççü FÿÞTÿNþò1Ô^C¹\­Õ¶½…z5î¾(Vþa6ê³¾þ¬•9ü[„ª\çªä>ŸâÃs«;„Gb o¬zâ|J¡cб—O๿ÁGÕ/öçªWýþ>·–Ö»w1ôþÌzÙâÌöñè¿É¹ŸO°¯¡E]*çú¿ÐÏâßâ«U^÷V³Þ,ý+´ú˜þÞÛO Å[€‹|ç)ÌRaî÷8άÀÀð~!ëXW½©åÀø»5Ó0—wðöŸ˾ÃñK<ûî”á÷»°ÂÇð» ×v¿ºOGð÷¾eâ>ü÷M¡•Üaßc‰|ºåG°W¸G¯¯VGabà wã1Ìû|ÿ—ž½Â“ô'gù~ófymÞˆ/q-gØŸ¢4Oðû¶ŠýþŠ}ÿkå|d9öXÇl÷ÿššä¸·rìçg(Ÿ!E:Çw_ÏÇûÖËÏ8“™^AY~k î&Œýa?fØÁ^ž }*ØËç €]Ýß*âúHjUBŸßÀ³¤Òòy ù\Î)ú@?çHÇðËššS`Ó„±‰ ›rM#2lj—’Löd°/ ·>ŒuB{9Bü‘cê#ý#…È¡Dý/ËÇðŽ))¥kŒ`l¡À–¡æÔé°å”áH>à{×>#|ûÖJáÎéÖ±X=«÷Êóʱ\Žj´P>„~šÊ äÉÇPS,fbÜÌ7Éps<—®öáë0ìi`¯v2ì¯Q¯#Gwð!x0/áLå _ÁXÕúÞÆsï”±{ØR΢‡øâÒ:Ú¶ÊIלsgm§i5‡¾X^ÓÊÅ~ŠÆr¥«˜ ^¤ŒSÕrÍcɱuï^쥞«KZ™»­ÜÖ¯}ƒ¥vÍç↨ÅY\ëÑ /³î|Z}_Ó*ÛÞfƒ`(†”ØOާ¬Ïì›8¶M k?…›û ‡òDSûinë—†ÒÑ)} 4ýÞ;Š=Ï„jŽ”^Òó)~#'%kqµ¡®€Ï”*j¿-¥Ÿ"ÆNˆè¼©-¥ã?a¾`®ÏáÛË9½WßîãÓzÊ­Æ4Ô<¨íióJ˱•‡õr3[ÓìÕ!ïU’½:ÔG‰2Í^=‚]y«ñöç1|{ýÉ'×þ¬1¨i‡¦€»éï‹’÷ɾ0-†Tûâs«r*Ûì¨äÔ-ûJ"¢ÓQô¬zŠEžv™Çm—çekÖTÎ(½„ gLy¬ÉÆ×ΰM/¶wÀéÑ=RÜxó W_ê².ç°é{h¶j½…/ ¢ÐúØ4^vý‡ïû–õ/mY®ØÎI§!δæ`½ÇDØ~hÓ>0l·ŒM 3œE_ëëv {¶ Æö• }å+ÕC¼’Xðžä(ßâü$wuerô=X‰OPzfŒ»§½S]g'…¿Õú3¶öÆXÆÙÎB›õ¨ÙV:>Ûnïßo= ,ÁÓ´¥q„½×Æ“„ZÖì4›í¥Ù"n{i¶Ù×ÂŽn±jGr™¶åSÑë¡ÖGû³/½®Z­§ÚOµõþƒxŒ->á8ï‹g@y?"?Áze­WþH=ë%Rq9æ ìùÜ ß—ø†7ú==Œ=8wÒõî÷á×L×ý,á¶}Úl½Ý¥TÔºDÂ*Õ³÷_.Ͳ™ZøQöQù®ñæöãMìÛ«ý6ÛÙC¡êjg·¯³ß™ 'Ûøl~§Å&åöùR­{³·I(>†Svô“øKtõ4õ—| }êúè׫¯ÎÄßp>=ñ ž—g0ÂKó9ô·þ¢¤ÚË”iˆ” Ä=¹þD£¡Ͼs›¹uÛŽ_'_i²^šß뢫;>C>«ÚÉT;¾]mW|ß‚®BߟޗÈ5äÚº¿Kè³A|]gô÷+2tž„øäš5a‚ر¡aÐ/Z…>[Ì)¡¯ r–øibû£O ©+=…Ï[h{&Þ y‰y]$|eÎå=J—Gâçsë;1×ΞOE•yçñ¼')§^cö“*nKjm%ô¯°Nilå_áÓl¾B÷§]µ¼(±*ï[» •$k—ÃtCã@KK<ØR·E¹Û¬« ³7Ù­V¶,›&²YÃk÷@¢ÑØ¡eë§YÃl³nÚú1ã³ýÖ§ *¡6I_›ˆÝ†Ûd+ ÅÔШ7›…&ÌNkßgÍ[ÊC18\'†ñ¡:;Ý ³µ„®'•ßæ·a[·PÊE_*×gq¾ãT°—Ÿú¡äò±Œ+-º2þ™:“CÔžª¨5•Ÿo(TÄF†xêªUÜ“äUýrß®úº÷ˆ®æ”´)öŽëf$™¿¶OeÇÈ„Oó üêŒ\EY>…ÙÿßT„ô ø;pHFöèÊoj©~ q’ûÒzµœæ$ŒïÃÖÕ}YE¸<ØBöå—õfÓx\tö9Rã>òwt°W+w4׋UÐ{ˆóreM»éñïm¶¦Ù}œs‚Îw¸Dº Ü}‡zçÛIìÇv·Nƒ¾pîúbÊûtôåñ>mrwñ=lº ÿ\Û»Öçbƒ›þÓxÃtöþÚ–)Â~Ñgf=ÜÅ¿/z-ೕØRsÜ=Ñ$mÛRËWÙ´«,vuvŒCÊè†gP÷~>"©©"®qM¯çšS×SÇ+øF,ÆÏÛ¼BÛÏûÒN†“¶î‰±eáò½‡%Ô×Õæ«š·ƒ*F¢yV!v¿gH¶•[$›S¦Ÿ4ööR–õÒ{\.Î}Ç÷±qˆû(Ç]ßÇU®¼zs]_xÕ´N*ÕÞ‹ý»êÍþ»ë÷«n®çGʍ\5nþYÅdåZkåÊ Û²÷–³ÂSÑâø–i ë=•6í®áĈzy€4©I“š³;P"±G–Êï/ð\J#JÍÕ¬Õȶ%jÎÕ@™÷''§' ·`Êvõ½Ò¶,3©|˜Ø£Ï}—Ëw÷vá¾KÿŽjo²g Ö±À]ZÇ”$]¾…$¾îKærîã¬Üð?[ëéXK¡tº¯øÖÞ.ë¾”îÃåé‚íR„\°½7¶æË„~Õn=<„ò+¼9FÝaZk¿ªÛiÜþ¦.쬅ʜü¾½D ð)æà9ú#ó >‡¶O´_’Ùâ@ü¹wÛ©Mã\=ÌÁrkÆnÍ¿5gÄ÷AÄåŒ 1ÐNáÁWùáíVxæOÚnMµËøvš]&µ+*æy½¿iØ.ë·,}rκ˜wå°(Wn ÿ¶µìy;sQó–í|´Ouæ¢Ýå-¢Â5Žò}w®•-ÓšøVé.Ãß'?Uü¥†òoX¢2SÕyÇ«ÜT®MÙÄå=p÷¢à›ôq©³‹o–¯jÒè]e÷» ½e9ìYeg*‘º.ÒÐ0¸ðñ·‘Êvvø×Í^u¶{riî· ê_„™ívååÓÑÙbB¾òv›jsùêûlý†bjsf/ MªS€ý¨NBs#\SªSàz†ö©}Û§¶ËßÔ–° ]z6·‘¹8V3oÐ".ªç°›¬Cï¶·íÛ]õþ4¢Ù[y(Ô 1ƒ èK#lý6Ïc4b“sdW7ÃûJDá^ì¶³ N!7ÑSÑföNН (t”ú؃6?‡‘¼Ã6ׇlûF{øèÜU”K3½mÆóæø;W–54$|×5󋶘Ÿ‘˜6òúꤕvµôÁöæÝ¶Na„4çq±±ß S…åÓx‚z­‰ó4¡ fÆÑƒùþŸá åÌ^Á(ÕºÞ†>ÿ«Ûõhª}m½#¤¢1ìuC¥­y_:›ã_æÈ%g:žKÝîz#%ºfŽÞUoößmŽ?¾¿S7÷?Ç?Jsâ“óm9.&$3ï¸C–’;1Sa×[Sq(Ûx*ŠÎ”²ò Ušw‡B)•¼ÓÌ¥„Ó9*œá\DT8£¸Õ))΢œü/œÅHÇß´$§qîPá4çÒ¡’Ôj™…§cKjË’TeIjÛ‹«^åÖ›íÅUoößmI-¾ŸX7÷¿¤6A-ÀHøx‰m#©e,©%Ð:ýv½5‡²×Kj›Hj!”2MIïŠ-©…àŒ”ÔÔ[…Û·!%)?‡b›¬XLÓLü”0ó±QÒ´PŒ¤ÂÎBgU•Rƒ;—A(U›yé(yÿö°møTØVëHè°­ÝÌ C¶$G×OLE®÷rzzÁ)Ò™ÜÐû‘NÉrw½äwFZòhÒû¹êûï²^p¸±]’½37Ûw÷¤Îy"üó¥.znçè¹ý#Œò=Žø-ÎôZôðû{œ‰Ìˆ/c›ÎŒ9ÔYò«;†>4Þ2Ôóòòd}"ë¹5c·n[.b/*¹¨æýOè´8ãUÎ5×Q!¹…ó]®WþÝC‹ï²»Þì¿Ûœñ6ž*¬3Ý„3Ί„ÏÍ2â³PJï’äU©¨?ûmÐ`a¦©zAŠ…mkÅ6±EßG}s)oYcè« t°ÿ³ø'Œä J¿y›OÔF*lb+56© `®|‘)Ñ’R° ˜ú*öq}¶Ø0è§i.ÙL†5*wÒúÛÓ¢l‘¥‚½Ê¤r6SAÿwÔá¿u ÊA0ç±ÿz{*\߯þ̧£é!5ÐveJJ÷”KÈÄ‘ô©p*þm]Å©e÷¡Ã* §n‹?Öð[5&QaÃ6z|¦0&6¨¬˜S±>ò- dþ³k\½.ëË­´ÚL“L,‰RÛUö‡£gm2ô«¨ZJ.Gîþ¯kÎ$÷ÞÕˆŸÉº«xS[cÓ¡¡6èe±Ô‡eºÄ§>Ÿg n¶1»êÍþ»lƒ.·ÒØ3ϸ‰ :Çýéw·ÇͰA¶²0õßÄ‚…íòŒ£,lƒÞÜû}³Aئ@†M¾6è”h kÙé ïgƒ~š6èëÑɰÆÏÅ`ïw*ØûÚ C _Ù Õ›elƒÞ×ÙãœJËækƒ¦<w‘yhÄ}2œÉP:Ë÷êtd½<ô}= Â(†¯ALŠÁ:e*œQw¶Hq&Äa³Le)d$³N™ }-Ñéœ[cö*'„~µsé ê‡G4fÝ1ÖÔöøý¡œ!Œúþ¶ðý,r‘ÞoCÍ{ɵW>"%®¹ºÓ§^iÃ$„š}L\õfÿ]öAo¬}ç a›î»!j"Š…3=$CX¾‡1J¸œÃ÷Sø¼…ßž‰7ðMÝøüá}kÓù½G î‘8Áù]ÀÏ Å™–H.`Îðé ³†©ž~‡²kÄÖêæØWˆµo×ãëáˆ_áÓl¾bî<ÌœaŒóIqkÆnÍÁ­Si¦e5TzXæî'X/s~ùÕ«že&¹féÀUoößméaSÿ –6•Jýf©]eú;}Hƒ &=¢Ã†Ø:œe*YÙ›A™OýX?ÙrUºêÍþ»M…ÙK$6VV¹2@‡s¿}ãW7<>…5ø ¾©[!_Àß”~™ë^>"÷¦¯¹Í:—Å=sëô[§?”}fÇìGt²™¼•ÿÉ–G¹Êñ©;Ò'žõê¾péUÑÌ1ºêÍþ»ÍQr.ÙØ¥º­­Ò¨¬ßwˆ¯VÏSÊ;ìÁG…5 ¢Ã€Ø”w™2ÖÑÎîZuÛZa•Ó]õfï]¦º“­ü&Ùw{ª«nIœzåáy#ùñè,II›Šò³& úç ÁÂ{VÚ߆N"Ø/“ 2Ʊ3¦?bóËgu¡Oç©Îýµ¾^ÚEG¸ªÍ–«~±ÿnóœ!./Pjj=» Ïvuº3x¢áïýM¼r‡x2?ƒ¶ïç㔳•çì5®óµ¨¼fM/ÝÚÏöD·~ß~ ü‘oëM uú#äÖŒ©¶nORe#*ëPÍ¥§Ã#…É&«²C!¨QUwãºëUÞa ©fÙÄUoößmÙ„ýbË&*_xE'à‚>ÛäcË&!Я$‡—øí>>ÁÓ‰ö<;†oá-òi €r±t‘”Úc[ 8‡ …É‘³sgÊ £0)fÊ› öW Â#W¦¼0œ9l•'©l% } è«×û ¦Ä‘NÙbMýî}•—™î¼¨n°½-èo.HŸŸ™² ?MM:Ô)TOµ¬G’+/[ŒµÜUŸkžÎfCwÕ›ýwYO5e:Ѿó×S©Œr¹Öî–+à»bë©B ¢§ÊXO•@ëôG›¯ãbë©B(Lšz*¶ÅÖS…àŒŒ¹Wo=î†]”U·±î1M3ñSê¤û:ª§Û4£Eéôʇ„š¦Í6Ò½mÇC·C£r1Œo4Y*ÍÒ~Èõ9júqµ:*S|‘¤6UejŸÚReà r׫\ò kÖ–ºêÍþ»«M͵ö‡÷]Ì}§2Å“ º›Ú°8"iSmª ýÝE$U÷ p$R ­Ó!·fŒ Õ ÆÖ`*©±æ Óá_Bå†e¾^J¹¨£\õ#ÝŸ-ÈUoößm¹íð±ååÃ91²‚» Ï1š±å†è×™¨}£…øf¯]·N„Ûµ¦¢<ÛXÚÙ’iZ2%t¤•`LHy\–ÌPÛ:Öpt+†_$IÖ¢nê5ÎÅŒ+¸™gR|š-ýT2t-M¦ÃˇÊÐË2n®cd„O}•OÝf[sÕ›ýwY†Î{<Ä–¡Õ=£lo{ôéf.¶±Š1Ý4­Ñʹ#§†’nîF/›³5 krÔË…+ ”rÎöL/›sl,NÕ:ªt4¡š¹eÍÙ²ßËúú‘PY@¤†­Ióæª_ì¿Ëš¹œmlDûÎW3'qoˆ˜ºë[2s=V†~<Í\ôÙ/&ÕÖTûo{$Ë_á~1aû/Uù‹­iTš+?¿˜0¬ÙG¿˜*/ãT,¿˜¸|`˜üµ*I¿©¡náS¯nHCY³üåª7ûï¶üÅÑr±å/u³I¥qÚ­üÅ6¨ØòW:Ð/Ç$QA¿>}Ò~è™»|&*¿9Ù¢ôªW|Gs¤Ÿ«Öì»Ëçm••÷\¼óVe>.ô›wKqÙÊû¼ þõ@eŸ$ç‚-(d8UQtufq,^¢æü©ø ê8×ù`+Õ˜¸½/g*ÇTQik~>è‡J1‹rFŽG®R“Œ²\«n˜Zµ‚®úº÷nË0lÿ‰-èû;J}Òí–Þ²¥&¶ “ôÙ^[gýçPÿDßËkÊ9÷Ü÷‰uSI§õ>ŽŠ’°í‰Šo¯¹ØtΑP¾}™·®²0×»¾Dÿ«æL®Z³ï.sîCÁ¿Øœ»Š†(Д ÙösO úl{ŠÍ¹‡@ß͹«11×¾ûÖi¼“Š.°ýН9ÒtN…P>|‘SΰDéúݵ*›·”GšùlW}Ý{·¹p¶WÆæÂÕÎ' A²½2:}ÛÈíe>²ýlÔço:ô/”ãXæ &øÉ§^Ý1RXxŠõµfßÝæ9Øj›çPy§}²›|E™Þ}¶PÑ_¶áÒà‚I‰¨p¡mî“­n±é€Ê@>MòìhêR­*—i!àS?Õ¼cn9_]õfÿ]>KÁ™cﻩPwϹwÝGÜ#ר"EI†ö—lÿ#Ô<(©‚Û=÷K¶þÂ^iï© ÿæ(uN`ä=({ 0| #»†¶Ÿ¡Åøý#øsÛýö=ûpú#ÜG _É>¢½or¿©ÐýPŽ™#—™Ër«O½”cGXßlÃsÕ/ößmŽ+süá¿Ä½¡Öæº÷Ý; ¯ÁS\Á9ÿt¬6%Û-É8ÈLÇ RâsÛòÛ쨠Ÿk¨®·Z‡Aÿ1ÖɨžÇð9oÄ ®âuÂT-ÚØ6çÍV7ª]Ss¡éÐÌ0Þ{•7^ÌZé®WY²&mº»Þì¿Û¼7[8cóÞ™öDqïº?ÄWø´Ë­°•“ þc„ê€þírª#Á1n´šn—eJ°g ìýbœbÁ^–ÁÞç§ÒãTzœJSéq*=NeÀ© •Ýßñç>à¹2àTœÊPQهϞæ>à܇Šûî¯kÄ#KÄó}Ĺ8÷ç>âÜG<ÇŠÊ>ìxšûˆçû„S™p*Ne©L8•©¢²û;>áÜ'<'œÊ„S™q*sïÂsËxdÉxdÉx¾Ï8÷ç>ãÜg˜{ß>¢Ùl\Ùl\YfŠ"ËŒoŸÔÑŠ,3E±o÷ÈeÎ,•E‘ønüÁfíØ½÷ß{kÚyî÷Êú¾"£?DBµŽ,„j]Õ:ªu”!TëHC¨ÖÑæ)d¬®yÌ®ßõïRä-‹ÿßÿ‡±òÚï³\{ýÿÿPK-! oSth'[Content_Types].xmlPK-!W $=7 ¡_rels/.relsPK- !d½Ïhà(à(ØdocProps/thumbnail.jpegPK-!·%]å07í/docProps/core.xmlPK-!FªÉH½2$¥4T2Resources/461A7FC9-496C-3298-DE7B-1B37E30FFE36.odttfPK-!J_™©@ceFixedDocSeq.fdseqPK-!nºÌÜ9EhÉ4;fResources/40146AA7-283E-3A5E-5258-EF245A214144.odttfPK-!°’ùN3*H¡4Æ«Resources/26701648-7FEA-3F97-6F1E-BA61160C3A35.odttfPK-!V<æ¶«ô‚4KÖResources/5DC37A8A-612D-6B9D-757A-E33E636C794A.odttfPK-!|ŠÖY€Æ˜¤4S‚Resources/3E01724F-0CCD-1AAE-6812-9456B8194A2C.odttfPK-!a‚„¹‰nl 4%IResources/416B13FD-432A-47C2-AF64-3F7539173759.odttfPK-!\"[y±j¸ Documents/1/FixedDoc.fdocPK-!ṪÉ$è¸ Documents/1/_rels/FixedDoc.fdoc.relsPK-!v$Ò’F$ó¹ Documents/1/Pages/_rels/4.fpage.relsPK-!‘tVHP$Ç» Documents/1/Pages/_rels/3.fpage.relsPK-! ÃÏOO$Y½ Documents/1/Pages/_rels/2.fpage.relsPK-!«¨U2¼ø$ê¾ Documents/1/Pages/_rels/1.fpage.relsPK-!Ì÷²³%ÃÔp4èÀ Resources/427F72A9-0F2A-0298-2E32-3C0357382409.odttfPK-!îHŸÆÅôõ4_„ Resources/683937A8-02DD-2FDA-576C-F17DA47FF373.odttfPK-!¢@¬ïqðG&wJ Documents/1/Structure/Fragments/3.fragPK-!å­L JR&,N Documents/1/Structure/Fragments/2.fragPK- !qö}Gyy}R Resources/Images/image_4.pngPK- !ÖF¡9‡‡0Y Resources/Images/image_3.pngPK- !˜jÉÑÑñ_ Resources/Images/image_2.pngPK- !ɪƒÏÏüf Resources/Images/image_1.pngPK- !“UçN, , n Resources/Images/image_0.pngPK-!‚•>>kw Documents/1/Pages/1.fpagePK- !IFc€7 Resources/Images/image_5.pngPK- !¥RŠ{ïïò• Resources/Images/image_6.pngPK- !Ç"@ìää Resources/Images/image_7.pngPK-!uÌÒ{*&9¤ Documents/1/Structure/Fragments/1.fragPK-!;H»ÞÊf)ø¥ Documents/1/Structure/DocStructure.structPK-!⯧ÀvS § Documents/1/Pages/4.fpagePK-!ZôÊu¸žå¿ Documents/1/Pages/3.fpagePK-!RUEgÆRïÕ Documents/1/Pages/2.fpagePK-!á1ÃF€"&¶ñ Documents/1/Structure/Fragments/4.fragPK$$A @ô inc/000077500000000000000000000000001362133436400340515ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromockglobalmock.h000066400000000000000000000021241362133436400363330ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef GLOBALMOCK_H #define GLOBALMOCK_H #pragma once #include "stdafx.h" #include "mock.h" #include "mockcallrecorder.h" #include "micromockexception.h" template class CGlobalMock : public CMock { public: CGlobalMock(_In_ AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON) : CMock(performAutomaticCallComparison) { m_GlobalMockInstance = this; } virtual ~CGlobalMock() { m_GlobalMockInstance = NULL; } static CGlobalMock* GetSingleton() { if (NULL == m_GlobalMockInstance) { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INTERNAL_ERROR, _T("Error retrieving singleton"))); } return m_GlobalMockInstance; } protected: static CGlobalMock* m_GlobalMockInstance; }; template CGlobalMock* CGlobalMock::m_GlobalMockInstance; #endif // GLOBALMOCK_H micromock.h000066400000000000000000000106311362133436400362060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MICROMOCK_H #define MICROMOCK_H #pragma once #include "mock.h" #include "globalmock.h" #include "threadsafeglobalmock.h" #include "mockmethodcallbase.h" #include "mockmethodcall.h" #include "mockcallrecorder.h" #include "mockcallargument.h" #include "mockvalue.h" #include "mockvaluebase.h" #include "mockresultvalue.h" #include "strictunorderedcallcomparer.h" #include "strictorderedcallcomparer.h" #include "nicecallcomparer.h" #include "micromockexception.h" #include "micromocktestmutex.h" #include "micromockenumtostring.h" // Defines for ignored arguments #define IGNORED_PTR_ARG (NULL) #define IGNORED_NUM_ARG (17) #ifndef _MSC_VER #define IGNORE (0) #endif #define TYPED_MOCK_CLASS(className, mockType) \ class className : public CStrictUnorderedCallComparer< mockType > #define MICROMOCK_POINTER_TYPE_EQUAL(T) \ template<> \ static bool operator==(_In_ const CMockValue& lhs, \ _In_ const CMockValue& rhs) \ { \ bool result = false; \ if (lhs.GetValue() == rhs.GetValue()) \ { \ result = true; \ } else \ if ((NULL != lhs.GetValue()) && \ (NULL != rhs.GetValue()) && \ (*lhs.GetValue() == *rhs.GetValue())) \ { \ result = true; \ } \ return result; \ } // A strict expected call implies that all arguments are checked #define STRICT_EXPECTED_CALL(ClassName, ...) \ C2(ClassName.Expected_, __VA_ARGS__) // By using the below macro, none of the arguments are checked by default // To specify checking the argument values, use the ValidateArgument // expected call modifier method #define EXPECTED_CALL(ClassName, ...) \ STRICT_EXPECTED_CALL(ClassName, __VA_ARGS__) \ .IgnoreAllArguments() // When called only specifies actions for the specific call instance // he actions specified this way are not included in the comparison // of expected and actual calls #define WHEN_CALLED(ClassName, ...) \ EXPECTED_CALL(ClassName, __VA_ARGS__) \ .OnlySpecifiesActions() // This is the strict version of WHEN_CALLED #define WHEN_CALLED_STRICT(ClassName, ...) \ STRICT_EXPECTED_CALL(ClassName, __VA_ARGS__) \ .OnlySpecifiesActions() #define RECORD_ACTUAL_MOCK_CALL(mockMethodCall, fail) \ RecordActualCall(mockMethodCall, fail) #define RECORD_EXPECTED_MOCK_CALL(mockMethodCall) \ RecordExpectedCall(mockMethodCall) #define REMATCH_ACTUAL_MOCK_CALL(mockMethodCall) \ MatchActualCall(mockMethodCall) #define RECORD_ACTUAL_STATIC_MOCK_CALL(mockMethodCall, fail) \ GetSingleton()->RecordActualCall(mockMethodCall, fail) #define RECORD_EXPECTED_STATIC_MOCK_CALL(mockMethodCall)\ GetSingleton()->RecordExpectedCall(mockMethodCall) #define REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall) \ GetSingleton()->MatchActualCall(mockMethodCall) #define STATIC_MOCK_LOCK(name) \ void MockLock_##name() \ { \ GetSingleton()->Lock(); \ } #define STATIC_MOCK_UNLOCK() \ GetSingleton()->Unlock() #define MOCK_METHOD_END(resultType, value) \ return (NULL != result) ? dynamic_cast*>(result)->GetValue() : (value); \ } #define MOCK_VOID_METHOD_END() \ result = result; \ } #include "micromockcallmacros.h" #endif // MICROMOCK_H micromockcallmacros.h000066400000000000000000001742121362133436400402550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // THIS FILE IS AUTOGENERATED! // DO NOT EDIT! // #ifndef MICROMOCKCALLMACROS_H #define MICROMOCKCALLMACROS_H #pragma once #define MOCK_ANY_METHOD_0(static_, STATIC_, prefix, resultType, name) \ static_ CMockMethodCall& prefix Expected_##name() \ { \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 0, NULL); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name() \ { \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 0, NULL); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_0(prefix, resultType, name) \ MOCK_ANY_METHOD_0(,,prefix, resultType, name) #define MOCK_STATIC_METHOD_0(prefix, resultType, name) \ MOCK_ANY_METHOD_0(static, STATIC_, prefix, resultType, name) #define DECLARE_GLOBAL_MOCK_METHOD_0(mockClass, prefix, resultType, name) \ prefix resultType name() \ { \ return mockClass::name();\ } \ #define MOCK_ANY_METHOD_1(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value) \ { \ CMockCallArgumentBase* args[1]; \ args[0] = new CMockCallArgument(arg1Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 1, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value) \ { \ CMockCallArgumentBase* args[1]; \ args[0] = new CMockCallArgument(arg1Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 1, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_1(prefix, resultType, name, arg1Type, arg1Value) \ MOCK_ANY_METHOD_1(,,prefix, resultType, name, arg1Type, arg1Value) #define MOCK_STATIC_METHOD_1(prefix, resultType, name, arg1Type, arg1Value) \ MOCK_ANY_METHOD_1(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value) #define DECLARE_GLOBAL_MOCK_METHOD_1(mockClass, prefix, resultType, name, arg1Type, arg1Value) \ prefix resultType name(arg1Type arg1Value) \ { \ return mockClass::name(arg1Value);\ } \ #define MOCK_ANY_METHOD_2(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value) \ { \ CMockCallArgumentBase* args[2]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 2, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value) \ { \ CMockCallArgumentBase* args[2]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 2, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_2(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) \ MOCK_ANY_METHOD_2(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) #define MOCK_STATIC_METHOD_2(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) \ MOCK_ANY_METHOD_2(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) #define DECLARE_GLOBAL_MOCK_METHOD_2(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value) \ { \ return mockClass::name(arg1Value,arg2Value);\ } \ #define MOCK_ANY_METHOD_3(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value) \ { \ CMockCallArgumentBase* args[3]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 3, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value) \ { \ CMockCallArgumentBase* args[3]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 3, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_3(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) \ MOCK_ANY_METHOD_3(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) #define MOCK_STATIC_METHOD_3(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) \ MOCK_ANY_METHOD_3(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) #define DECLARE_GLOBAL_MOCK_METHOD_3(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value);\ } \ #define MOCK_ANY_METHOD_4(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value) \ { \ CMockCallArgumentBase* args[4]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 4, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value) \ { \ CMockCallArgumentBase* args[4]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 4, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_4(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) \ MOCK_ANY_METHOD_4(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) #define MOCK_STATIC_METHOD_4(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) \ MOCK_ANY_METHOD_4(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) #define DECLARE_GLOBAL_MOCK_METHOD_4(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value);\ } \ #define MOCK_ANY_METHOD_5(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value) \ { \ CMockCallArgumentBase* args[5]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 5, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value) \ { \ CMockCallArgumentBase* args[5]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 5, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_5(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) \ MOCK_ANY_METHOD_5(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) #define MOCK_STATIC_METHOD_5(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) \ MOCK_ANY_METHOD_5(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) #define DECLARE_GLOBAL_MOCK_METHOD_5(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value);\ } \ #define MOCK_ANY_METHOD_6(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value) \ { \ CMockCallArgumentBase* args[6]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 6, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value) \ { \ CMockCallArgumentBase* args[6]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 6, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_6(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) \ MOCK_ANY_METHOD_6(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) #define MOCK_STATIC_METHOD_6(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) \ MOCK_ANY_METHOD_6(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) #define DECLARE_GLOBAL_MOCK_METHOD_6(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value);\ } \ #define MOCK_ANY_METHOD_7(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value) \ { \ CMockCallArgumentBase* args[7]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 7, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value) \ { \ CMockCallArgumentBase* args[7]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 7, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_7(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) \ MOCK_ANY_METHOD_7(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) #define MOCK_STATIC_METHOD_7(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) \ MOCK_ANY_METHOD_7(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) #define DECLARE_GLOBAL_MOCK_METHOD_7(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value);\ } \ #define MOCK_ANY_METHOD_8(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value) \ { \ CMockCallArgumentBase* args[8]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 8, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value) \ { \ CMockCallArgumentBase* args[8]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 8, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_8(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) \ MOCK_ANY_METHOD_8(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) #define MOCK_STATIC_METHOD_8(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) \ MOCK_ANY_METHOD_8(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) #define DECLARE_GLOBAL_MOCK_METHOD_8(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value);\ } \ #define MOCK_ANY_METHOD_9(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value) \ { \ CMockCallArgumentBase* args[9]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 9, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value) \ { \ CMockCallArgumentBase* args[9]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 9, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_9(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) \ MOCK_ANY_METHOD_9(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) #define MOCK_STATIC_METHOD_9(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) \ MOCK_ANY_METHOD_9(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) #define DECLARE_GLOBAL_MOCK_METHOD_9(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value);\ } \ #define MOCK_ANY_METHOD_10(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value) \ { \ CMockCallArgumentBase* args[10]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 10, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value) \ { \ CMockCallArgumentBase* args[10]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 10, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_10(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) \ MOCK_ANY_METHOD_10(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) #define MOCK_STATIC_METHOD_10(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) \ MOCK_ANY_METHOD_10(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) #define DECLARE_GLOBAL_MOCK_METHOD_10(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value,arg10Value);\ } \ #define MOCK_ANY_METHOD_11(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value) \ { \ CMockCallArgumentBase* args[11]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 11, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value) \ { \ CMockCallArgumentBase* args[11]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 11, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_11(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) \ MOCK_ANY_METHOD_11(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) #define MOCK_STATIC_METHOD_11(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) \ MOCK_ANY_METHOD_11(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) #define DECLARE_GLOBAL_MOCK_METHOD_11(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value,arg10Value,arg11Value);\ } \ #define MOCK_ANY_METHOD_12(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value) \ { \ CMockCallArgumentBase* args[12]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 12, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value) \ { \ CMockCallArgumentBase* args[12]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 12, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_12(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) \ MOCK_ANY_METHOD_12(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) #define MOCK_STATIC_METHOD_12(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) \ MOCK_ANY_METHOD_12(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) #define DECLARE_GLOBAL_MOCK_METHOD_12(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value,arg10Value,arg11Value,arg12Value);\ } \ #define MOCK_ANY_METHOD_13(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value) \ { \ CMockCallArgumentBase* args[13]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 13, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value) \ { \ CMockCallArgumentBase* args[13]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 13, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_13(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) \ MOCK_ANY_METHOD_13(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) #define MOCK_STATIC_METHOD_13(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) \ MOCK_ANY_METHOD_13(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) #define DECLARE_GLOBAL_MOCK_METHOD_13(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value,arg10Value,arg11Value,arg12Value,arg13Value);\ } \ #define MOCK_ANY_METHOD_14(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value) \ { \ CMockCallArgumentBase* args[14]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ args[13] = new CMockCallArgument(arg14Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 14, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value) \ { \ CMockCallArgumentBase* args[14]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ args[13] = new CMockCallArgument(arg14Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 14, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_14(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) \ MOCK_ANY_METHOD_14(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) #define MOCK_STATIC_METHOD_14(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) \ MOCK_ANY_METHOD_14(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) #define DECLARE_GLOBAL_MOCK_METHOD_14(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value,arg10Value,arg11Value,arg12Value,arg13Value,arg14Value);\ } \ #define MOCK_ANY_METHOD_15(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value) \ { \ CMockCallArgumentBase* args[15]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ args[13] = new CMockCallArgument(arg14Value); \ args[14] = new CMockCallArgument(arg15Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 15, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value) \ { \ CMockCallArgumentBase* args[15]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ args[13] = new CMockCallArgument(arg14Value); \ args[14] = new CMockCallArgument(arg15Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 15, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_15(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) \ MOCK_ANY_METHOD_15(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) #define MOCK_STATIC_METHOD_15(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) \ MOCK_ANY_METHOD_15(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) #define DECLARE_GLOBAL_MOCK_METHOD_15(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value,arg10Value,arg11Value,arg12Value,arg13Value,arg14Value,arg15Value);\ } \ #define MOCK_ANY_METHOD_16(static_, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value, arg16Type, arg16Value) \ static_ CMockMethodCall& prefix Expected_##name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value, arg16Type arg16Value) \ { \ CMockCallArgumentBase* args[16]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ args[13] = new CMockCallArgument(arg14Value); \ args[14] = new CMockCallArgument(arg15Value); \ args[15] = new CMockCallArgument(arg16Value); \ CMockMethodCall* mockMethodCall = \ new CMockMethodCall(_T(#name), 16, args); \ RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \ return *mockMethodCall; \ } \ static_ resultType prefix name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value, arg16Type arg16Value) \ { \ CMockCallArgumentBase* args[16]; \ args[0] = new CMockCallArgument(arg1Value); \ args[1] = new CMockCallArgument(arg2Value); \ args[2] = new CMockCallArgument(arg3Value); \ args[3] = new CMockCallArgument(arg4Value); \ args[4] = new CMockCallArgument(arg5Value); \ args[5] = new CMockCallArgument(arg6Value); \ args[6] = new CMockCallArgument(arg7Value); \ args[7] = new CMockCallArgument(arg8Value); \ args[8] = new CMockCallArgument(arg9Value); \ args[9] = new CMockCallArgument(arg10Value); \ args[10] = new CMockCallArgument(arg11Value); \ args[11] = new CMockCallArgument(arg12Value); \ args[12] = new CMockCallArgument(arg13Value); \ args[13] = new CMockCallArgument(arg14Value); \ args[14] = new CMockCallArgument(arg15Value); \ args[15] = new CMockCallArgument(arg16Value); \ CMockMethodCallBase* mockMethodCall = \ new CMockMethodCall(_T(#name), 16, args); \ bool failed=false; \ CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \ if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue(); #define MOCK_METHOD_16(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value, arg16Type, arg16Value) \ MOCK_ANY_METHOD_16(,,prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value, arg16Type, arg16Value) #define MOCK_STATIC_METHOD_16(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value, arg16Type, arg16Value) \ MOCK_ANY_METHOD_16(static, STATIC_, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value, arg16Type, arg16Value) #define DECLARE_GLOBAL_MOCK_METHOD_16(mockClass, prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value, arg16Type, arg16Value) \ prefix resultType name(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value, arg16Type arg16Value) \ { \ return mockClass::name(arg1Value,arg2Value,arg3Value,arg4Value,arg5Value,arg6Value,arg7Value,arg8Value,arg9Value,arg10Value,arg11Value,arg12Value,arg13Value,arg14Value,arg15Value,arg16Value);\ } \ #endif // MICROMOCKCALLMACROS_H micromockcharstararenullterminatedstrings.h000066400000000000000000000076741362133436400450250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MicroMockCharStarArenullTerminatedStrings_H #define MicroMockCharStarArenullTerminatedStrings_H #ifndef MICROMOCK_H #error the file MicroMockCharStarArenullTerminatedStrings can only be #included after #include "micromock.h" #endif /*for strcpy()*/ #include /*for malloc()*/ #include /*for everything else*/ #include "stdafx.h" template<> class CMockValue : public CMockValueBase { protected: char* m_Value; char* m_OriginalValue; public: CMockValue(_In_ char* value) { if(value==NULL) { m_Value=NULL; } else { size_t s= strlen(value); m_OriginalValue = value; m_Value = (char*)malloc(s + 1); strcpy(m_Value, value); } } virtual ~CMockValue() { if(m_Value!=NULL) { free(m_Value); m_Value = NULL; } } virtual std::tstring ToString() const { std::tostringstream strStream; if (NULL == m_Value) { strStream << _T("NULL"); } else { strStream << m_Value; } return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { return (*this == *(reinterpret_cast*>(right))); } void SetValue(_In_ char* value) { if(value == NULL) { if(m_Value !=NULL) { free(m_Value); m_Value = NULL; } else { } } else { size_t s = strlen(value); if(m_Value !=NULL) { free(m_Value); m_Value=NULL; } m_Value = (char*)malloc(s+1); m_OriginalValue = value; strcpy(m_Value, value); }; } char* GetValue() const { return m_Value; } }; template<> class CMockValue : public CMockValueBase { protected: char* m_Value; const char* m_OriginalValue; public: CMockValue(_In_ const char* value) { if(value==NULL) { m_Value=NULL; } else { size_t s= strlen(value); m_Value = (char*)malloc(s+1); m_OriginalValue = value; strcpy(m_Value, value); } } virtual ~CMockValue() { if(m_Value!=NULL) { free(m_Value); m_Value = NULL; } } virtual std::tstring ToString() const { std::tostringstream strStream; if (NULL == m_Value) { strStream << _T("NULL"); } else { strStream << m_Value; } return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { return (*this == *(reinterpret_cast*>(right))); } void SetValue(_In_ const char* value) { if(value == NULL) { if(m_Value !=NULL) { free(m_Value); m_Value = NULL; } else { } } else { size_t s = strlen(value); if(m_Value !=NULL) { free(m_Value); m_Value=NULL; } m_Value = (char*)malloc(s+1); m_OriginalValue = value; strcpy(m_Value, value); }; } const char* GetValue() const { return m_Value; } }; bool operator==(_In_ const CMockValue& lhs, _In_ const CMockValue& rhs); bool operator==(_In_ const CMockValue& lhs, _In_ const CMockValue& rhs); #endif micromockcommon.h000066400000000000000000000007431362133436400374220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MICROMOCKCOMMON_H #define MICROMOCKCOMMON_H #pragma once #include "tchar.h" #include "string" #include "sstream" #define COUNT_OF(a) (sizeof(a) / sizeof((a)[0])) namespace std { typedef std::basic_string tstring; typedef std::basic_ostringstream tostringstream; } #endif // MICROMOCKCOMMON_H micromockenumtostring.h000066400000000000000000000042531362133436400406700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MICROMOCKENUMTOSTRING_H #define MICROMOCKENUMTOSTRING_H #ifdef USE_TDD4CPP #define MICROMOCK_ENUM_TO_STRING(EnumName, ...) \ namespace TDD \ { \ const wchar_t* EnumName##_Strings[] = { __VA_ARGS__ }; \ template <> std::string ToString(const EnumName& q) \ { \ if((size_t)q >= sizeof(EnumName##_Strings)/sizeof(EnumName##_Strings[0])) \ { \ return (L"out of range value for " #EnumName) \ } \ else \ { \ const wchar_t* w = EnumName##_Strings[q]; \ std::setlocale(LC_ALL, ""); \ std::wstring t(w); \ std::string s(t.length()+1, 0); \ std::locale loc(""); \ std::use_facet < std::ctype < wchar_t > >(loc).narrow(w, &w[t.length()], '\0', &s[0]); \ s.resize(t.length()); \ return s; \ } \ } \ }; #elif defined USE_CTEST #define MICROMOCK_ENUM_TO_STRING(EnumName, ...) \ const wchar_t *EnumName##_Strings[]= \ { \ __VA_ARGS__ \ }; \ static void EnumName##_ToString(char* dest, size_t bufferSize, EnumName enumValue) \ { \ (void)snprintf(dest, bufferSize, "%S", EnumName##_Strings[enumValue]); \ } \ static bool EnumName##_Compare(EnumName left, EnumName right) \ { \ return left != right; \ } #else #define MICROMOCK_ENUM_TO_STRING(EnumName, ...) \ namespace Microsoft \ { \ namespace VisualStudio \ { \ namespace CppUnitTestFramework \ { \ static const wchar_t *EnumName##_Strings[]= \ { \ __VA_ARGS__ \ }; \ template <> std::wstring ToString < EnumName > (const EnumName & q) \ { \ if((size_t)q>=sizeof(EnumName##_Strings)/sizeof(EnumName##_Strings[0])) \ { \ return (L"out of range value for " L#EnumName); \ } \ else \ { \ return EnumName##_Strings[q]; \ } \ } \ } \ } \ }; #endif #endif micromockexception.h000066400000000000000000000032131362133436400401230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MICROMOCKEXCEPTION_H #define MICROMOCKEXCEPTION_H #pragma once #include "stdafx.h" #include "azure_c_shared_utility/macro_utils.h" #define MICROMOCK_EXCEPTION_VALUES \ MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS, \ MICROMOCK_EXCEPTION_ALLOCATION_FAILURE, \ MICROMOCK_EXCEPTION_INVALID_ARGUMENT, \ MICROMOCK_EXCEPTION_INVALID_CALL_MODIFIER_COMBINATION, \ MICROMOCK_EXCEPTION_MOCK_NOT_FOUND, \ MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, \ MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, \ MICROMOCK_EXCEPTION_INTERNAL_ERROR \ DEFINE_ENUM(MICROMOCK_EXCEPTION, MICROMOCK_EXCEPTION_VALUES) extern const TCHAR* MicroMockExceptionToString(_In_ MICROMOCK_EXCEPTION exceptionCode); class CMicroMockException { public: CMicroMockException(_In_ MICROMOCK_EXCEPTION exceptionCode, _In_ std::tstring exceptionText) : m_ExceptionCode(exceptionCode), m_ExceptionString(exceptionText) { } ~CMicroMockException() { } MICROMOCK_EXCEPTION GetMicroMockExceptionCode() const { return m_ExceptionCode; } std::tstring GetExceptionString() const { return m_ExceptionString; } protected: MICROMOCK_EXCEPTION m_ExceptionCode; std::tstring m_ExceptionString; }; #ifdef MOCK_TOSTRING MOCK_TOSTRING(const MICROMOCK_EXCEPTION& t) { return MicroMockExceptionToString(t);} #endif #endif // MICROMOCKEXCEPTION_H micromocktestmutex.h000066400000000000000000000026061362133436400401740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MICROMOCKTESTMUTEX_H #define MICROMOCKTESTMUTEX_H #ifdef WIN32 #include "windows.h" typedef HANDLE MICROMOCK_MUTEX_HANDLE; typedef HANDLE MICROMOCK_GLOBAL_SEMAPHORE_HANDLE; extern "C" HANDLE MicroMockCreateMutex(void); extern "C" int MicroMockAcquireMutex(HANDLE Mutex); extern "C" int MicroMockReleaseMutex(HANDLE Mutex); extern "C" void MicroMockDestroyMutex(HANDLE Mutex); extern "C" HANDLE MicroMockCreateGlobalSemaphore(const char* name, unsigned int highWaterCount); extern "C" int MicroMockAcquireGlobalSemaphore(HANDLE semaphore); extern "C" int MicroMockReleaseGlobalSemaphore(HANDLE semaphore); extern "C" void MicroMockDestroyGlobalSemaphore(HANDLE semaphore); #else typedef void* MICROMOCK_MUTEX_HANDLE; typedef void* MICROMOCK_GLOBAL_SEMAPHORE_HANDLE; #define MicroMockCreateMutex() ((MICROMOCK_MUTEX_HANDLE)1) #define MicroMockAcquireMutex(Mutex) (1) #define MicroMockReleaseMutex(Mutex) (1) #define MicroMockDestroyMutex(Mutex) #define MicroMockCreateGlobalSemaphore(a, b) ((MICROMOCK_GLOBAL_SEMAPHORE_HANDLE)(1)) #define MicroMockAcquireGlobalSemaphore(semaphore) (1) #define MicroMockReleaseGlobalSemaphore(semaphore) (1) #define MicroMockDestroyGlobalSemaphore(semaphore) #endif #endif /*MICROMOCKTESTMUTEX_H*/ micromocktestrunnerhooks.h000066400000000000000000000013751362133436400414110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MICROMOCCKTESTRUNNERHOOKS_H #define MICROMOCCKTESTRUNNERHOOKS_H #pragma once #ifndef MOCK_ASSERT #include "stdafx.h" #include "testrunnerswitcher.h" #define MOCK_ASSERT(expected, actual, assertString) ASSERT_ARE_EQUAL((expected), (actual), (assertString)) #define MOCK_FAIL(expression) ASSERT_FAIL(expression) #ifndef MBED_BUILD_TIMESTAMP #define MOCK_THROW(mockException) throw(mockException) #else #define MOCK_THROW(mockException) #endif #else // MOCK_ASSERT #define MOCK_THROW(...) #endif // MOCK_ASSERT #endif // MICROMOCCKTESTRUNNERHOOKS_H mock.h000066400000000000000000000012021362133436400351460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCK_H #define MOCK_H #pragma once #include "mockcallrecorder.h" #include "strictunorderedcallcomparer.h" #ifndef UNREFERENCED_PARAMETER #define UNREFERENCED_PARAMETER(param) param = param; #endif template class CMock : public CMockCallRecorder { public: CMock(_In_ AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON) { SetPerformAutomaticCallComparison(performAutomaticCallComparison); } }; #endif // MOCK_H mockcallargument.h000066400000000000000000000231701362133436400375550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKCALLARGUMENT_H #define MOCKCALLARGUMENT_H #pragma once #include "stdafx.h" #include "mockvalue.h" #include "mockcallargumentbase.h" #include "micromockexception.h" #include "stddef.h" template class CMockCallArgument : public CMockValue, public CMockCallArgumentBase { public: CMockCallArgument(_In_ T argValue, _In_ bool IsIgnoreable = true) : CMockValue(argValue), m_Ignored(false) { m_IsIgnoreable = IsIgnoreable; } virtual ~CMockCallArgument() { for (size_t i = 0; i < m_BufferValidations.size(); i++) { void* buffer = m_BufferValidations[i].m_Buffer; if (buffer != NULL) { free(buffer); } } for (size_t i = 0; i < m_CopyOutArgumentBuffers.size(); i++) { void* buffer = m_CopyOutArgumentBuffers[i].m_Buffer; if (buffer != NULL) { free(buffer); } } } // TODO: this should be fixed to be const bool operator==(_In_ CMockCallArgument& rhs) { bool result = true; if (m_BufferValidations.size() > 0 && rhs.m_BufferValidations.size() == 0) { return rhs == *this; } if (rhs.m_BufferValidations.size() > 0) { UINT8* argBufferValidationMask = rhs.CreateBufferValidationMask(); if (NULL != argBufferValidationMask) { FormatArgumentBufferString(rhs.m_BufferValidations, *((UINT8**)&this->CMockValue::m_Value)); rhs.FormatArgumentBufferString(rhs.m_BufferValidations, argBufferValidationMask); free(argBufferValidationMask); } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_ALLOCATION_FAILURE, _T("Failed allocating buffer validation mask"))); } result = result && ValidateArgumentBuffer(rhs.m_BufferValidations); } if (result && !m_Ignored && !rhs.m_Ignored) { // simply invoke the CMockValue == operator to take advantage of // any specializations defined in tests result = *((CMockValue*)this) == (*(CMockValue*)&rhs); } return result; } bool ValidateArgumentBuffer(_In_ const std::vector& bufferValidations) const { bool result = true; for (size_t i = 0; i < bufferValidations.size(); i++) { UINT8* argBuffer = *((UINT8**)&this->CMockValue::m_Value); if (NULL == argBuffer) { result = false; break; } result &= (memcmp(argBuffer + bufferValidations[i].m_Offset, bufferValidations[i].m_Buffer, bufferValidations[i].m_ByteCount) == 0); } return result; } virtual std::tstring ToString() const { if (m_ArgumentAsString.length() > 0) { return m_ArgumentAsString; } else { return this->CMockValue::ToString(); } } virtual void CopyOutArgumentDataFrom(_In_ const CMockCallArgumentBase* sourceMockCallArgument) { const CMockCallArgument* argument = (const CMockCallArgument*)(sourceMockCallArgument); if (NULL != argument) { for (size_t i = 0; i < argument->m_CopyOutArgumentBuffers.size(); i++) { UINT8* argBuffer = *((UINT8**)&this->m_OriginalValue); if (NULL != argBuffer) { memmove(argBuffer + argument->m_CopyOutArgumentBuffers[i].m_Offset, argument->m_CopyOutArgumentBuffers[i].m_Buffer, argument->m_CopyOutArgumentBuffers[i].m_ByteCount); } } } } virtual bool EqualTo(_In_ const CMockCallArgumentBase* right) { return (*this == *(CMockCallArgument*)(const CMockCallArgument*)(right)); } void AddBufferValidation(const void* expectedBuffer, _In_ size_t bytesToValidate, _In_ size_t byteOffset = 0) { if ((NULL != expectedBuffer) && (bytesToValidate > 0)) { for (size_t i = byteOffset; i < byteOffset + bytesToValidate; i++) { UINT8 argBufferValidateByte = 0; if ((GetArgBufferValidationExpectedByte(i, &argBufferValidateByte) == true) && (argBufferValidateByte != ((UINT8*)expectedBuffer)[i - byteOffset])) { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS, _T("Validate argument buffer specified 2 times for the same byte"))); } } BUFFER_ARGUMENT_DATA argumentValidationData; argumentValidationData.m_Buffer = malloc(bytesToValidate); if (NULL != argumentValidationData.m_Buffer) { (void)memcpy(argumentValidationData.m_Buffer, expectedBuffer, bytesToValidate); } argumentValidationData.m_ByteCount = bytesToValidate; argumentValidationData.m_Offset = byteOffset; m_BufferValidations.push_back(argumentValidationData); // ignore the argument SetIgnored(true); } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS, _T("Invalid arguments for AddBufferValidation."))); } } virtual void AddCopyOutArgumentBuffer(const void* injectedBuffer, _In_ size_t bytesToCopy, _In_ size_t byteOffset = 0) { BUFFER_ARGUMENT_DATA outArgumentCopyData; outArgumentCopyData.m_Buffer = malloc(bytesToCopy); if (NULL != outArgumentCopyData.m_Buffer) { (void)memcpy(outArgumentCopyData.m_Buffer, injectedBuffer, bytesToCopy); } outArgumentCopyData.m_ByteCount = bytesToCopy; outArgumentCopyData.m_Offset = byteOffset; m_CopyOutArgumentBuffers.push_back(outArgumentCopyData); // ignore the argument SetIgnored(true); } virtual void SetIgnored(_In_ bool ignored) { if (m_IsIgnoreable == true) { m_Ignored = ignored; } } private: void FormatArgumentBufferString(_In_ std::vector& bufferValidations, _In_ const UINT8* buffer) { size_t pos = 0; std::tostringstream strStream; strStream << std::hex << std::uppercase; if (NULL != buffer) { sort(bufferValidations.begin(), bufferValidations.end()); strStream << _T("["); for (size_t i = 0; i < bufferValidations.size(); i++) { // fill with ".." while (pos < bufferValidations[i].m_Offset) { if (pos > 0) { strStream << _T(" "); } strStream << _T(".."); pos++; } // put the actual bytes in while (pos < bufferValidations[i].m_ByteCount + bufferValidations[i].m_Offset) { if (pos > 0) { strStream << _T(" "); } strStream << std::setfill(_T('0')) << std::setw(2) << (unsigned int)buffer[pos]; pos++; } } strStream << _T("]"); m_ArgumentAsString = strStream.str(); } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_ARGUMENT, _T("NULL buffer argument attempted to be used for argument validation."))); } } bool GetArgBufferValidationExpectedByte(_In_ size_t pos, UINT8* buffer) const { bool result = false; for (size_t i = 0; i < m_BufferValidations.size(); i++) { if ((m_BufferValidations[i].m_Offset <= pos) && (pos < m_BufferValidations[i].m_Offset + m_BufferValidations[i].m_ByteCount)) { *buffer = ((UINT8*)m_BufferValidations[i].m_Buffer)[pos - m_BufferValidations[i].m_Offset]; result = true; } } return result; } UINT8* CreateBufferValidationMask() { UINT8* result = NULL; if (m_BufferValidations.size() > 0) { size_t bufferSize; sort(m_BufferValidations.begin(), m_BufferValidations.end()); bufferSize = m_BufferValidations[m_BufferValidations.size() - 1].m_Offset + m_BufferValidations[m_BufferValidations.size() - 1].m_ByteCount; result = (UINT8*)malloc(bufferSize); if (NULL != result) { for (size_t i = 0; i < m_BufferValidations.size(); i++) { (void)memcpy(result + m_BufferValidations[i].m_Offset, m_BufferValidations[i].m_Buffer, m_BufferValidations[i].m_ByteCount); } } } return result; } std::vector m_BufferValidations; std::vector m_CopyOutArgumentBuffers; std::tstring m_ArgumentAsString; bool m_Ignored; bool m_IsIgnoreable; /*used for "time is never ignoreable"*/ }; #endif // MOCKCALLARGUMENT_H mockcallargumentbase.h000066400000000000000000000027661362133436400404200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKCALLARGUMENTBASE_H #define MOCKCALLARGUMENTBASE_H #pragma once #include "stdafx.h" #include "mockvaluebase.h" typedef struct BUFFER_ARGUMENT_DATA_TAG { void* m_Buffer; size_t m_ByteCount; size_t m_Offset; bool operator<(_In_ const BUFFER_ARGUMENT_DATA_TAG& rhs) const { if (m_Offset < rhs.m_Offset) { return true; } if (m_Offset > rhs.m_Offset) { return false; } if (m_ByteCount < rhs.m_ByteCount) { return true; } if (m_ByteCount > rhs.m_ByteCount) { return false; } return m_Buffer < rhs.m_Buffer; } } BUFFER_ARGUMENT_DATA; class CMockCallArgumentBase { public: virtual ~CMockCallArgumentBase() {}; virtual void SetIgnored(_In_ bool ignored) = 0; virtual std::tstring ToString() const = 0; virtual bool EqualTo(_In_ const CMockCallArgumentBase* right) = 0; virtual void AddCopyOutArgumentBuffer(const void* injectedBuffer, _In_ size_t bytesToCopy, _In_ size_t byteOffset = 0) = 0; virtual void AddBufferValidation(const void* expectedBuffer, _In_ size_t bytesToValidate, _In_ size_t byteOffset = 0) = 0; virtual void CopyOutArgumentDataFrom(_In_ const CMockCallArgumentBase* sourceMockCallArgument) = 0; }; #endif // MOCKCALLARGUMENTBASE_H mockcallcomparer.h000066400000000000000000000017041362133436400375420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKCALLCOMPARER_H #define MOCKCALLCOMPARER_H #pragma once #include "stdafx.h" #include "mockmethodcallbase.h" class CMockCallComparer { public: CMockCallComparer() : m_IgnoreUnexpectedCalls(false) { } void SetIgnoreUnexpectedCalls(_In_ bool ignoreUnexpectedCalls) { m_IgnoreUnexpectedCalls = ignoreUnexpectedCalls; } bool GetIgnoreUnexpectedCalls(void) { return m_IgnoreUnexpectedCalls; } virtual bool IsUnexpectedCall(_In_ const CMockMethodCallBase* actualCall) = 0; virtual bool IsMissingCall(_In_ const CMockMethodCallBase* actualCall) = 0; virtual CMockMethodCallBase* MatchCall(std::vector& expectedCalls, CMockMethodCallBase* actualCall) = 0; protected: bool m_IgnoreUnexpectedCalls; }; #endif // MOCKCALLCOMPARER_H mockcallrecorder.h000066400000000000000000000035411362133436400375400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKCALLRECORDER_H #define MOCKCALLRECORDER_H #pragma once #include "stdafx.h" #include "mockmethodcallbase.h" #include "micromocktestrunnerhooks.h" #include "mockcallcomparer.h" typedef enum AUTOMATIC_CALL_COMPARISON_TAG { AUTOMATIC_CALL_COMPARISON_OFF, AUTOMATIC_CALL_COMPARISON_ON } AUTOMATIC_CALL_COMPARISON; class CMockCallRecorder { public: CMockCallRecorder(AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON, CMockCallComparer* mockCallComparer = NULL); virtual ~CMockCallRecorder(void); public: void RecordExpectedCall(CMockMethodCallBase* mockMethodCall); CMockValueBase * RecordActualCall(CMockMethodCallBase * mockMethodCall, bool* failed); CMockValueBase* MatchActualCall(CMockMethodCallBase* mockMethodCall, bool* failed); void AssertActualAndExpectedCalls(void); std::tstring CompareActualAndExpectedCalls(void); std::tstring GetUnexpectedCalls(std::tstring unexpectedCallPrefix = _T("")); std::tstring GetMissingCalls(std::tstring missingCallPrefix = _T("")); void ResetExpectedCalls(); void ResetActualCalls(); void ResetAllCalls(); void Lock(); void Unlock(); void SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison); void SetMockCallComparer(CMockCallComparer* mockCallComparer) { m_MockCallComparer = mockCallComparer; }; protected: std::vector m_ExpectedCalls; std::vector m_ActualCalls; protected: MICROMOCK_CRITICAL_SECTION m_MockCallRecorderCS; AUTOMATIC_CALL_COMPARISON m_PerformAutomaticCallComparison; CMockCallComparer* m_MockCallComparer; }; #endif // MOCKCALLRECORDER_H mockmethodcall.h000066400000000000000000000116671362133436400372230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKMETHODCALL_H #define MOCKMETHODCALL_H #pragma once #include "mockmethodcallbase.h" #include "mockresultvalue.h" #include "micromocktestrunnerhooks.h" #include "mockcallargumentbase.h" #include "micromockexception.h" template class CMockMethodCall : public CMockMethodCallBase { public: CMockMethodCall(_In_ std::tstring methodName, _In_ size_t argCount = 0, CMockCallArgumentBase** arguments = NULL) : CMockMethodCallBase(methodName, argCount, arguments) { } CMockMethodCall& IgnoreAllArguments() { for (size_t i = 0; i < m_MockCallArguments.size(); i++) { IgnoreArgument(i + 1); } return *this; } CMockMethodCall& NeverInvoked() { return ExpectedTimesExactly(0); } CMockMethodCall& IgnoreArgument(_In_ size_t argumentNo) { if ((argumentNo > 0) && (argumentNo <= m_MockCallArguments.size())) { m_MockCallArguments[argumentNo - 1]->SetIgnored(true); } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_ARGUMENT, _T("Invalid argument number supplied to IgnoreArgument"))); } return *this; } CMockMethodCall& AddExtraCallArgument(_In_ CMockCallArgumentBase* callArgument) { m_MockCallArguments.push_back(callArgument); return *this; } CMockMethodCall& ValidateArgument(_In_ size_t argumentNo) { if ((argumentNo > 0) && (argumentNo <= m_MockCallArguments.size())) { m_MockCallArguments[argumentNo - 1]->SetIgnored(false); } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_ARGUMENT, _T("Invalid argument number supplied to ValidateArgument"))); } return *this; } template CMockMethodCall& SetReturn(_In_opt_ injectedReturnType returnValue) { if (NULL != m_ReturnValue) { delete m_ReturnValue; } m_ReturnValue = new CMockResultValue(returnValue); return *this; } template CMockMethodCall& SetFailReturn(_In_opt_ injectedReturnType failReturnValue) { if (NULL != m_FailReturnValue) { delete m_FailReturnValue; } m_FailReturnValue = new CMockResultValue(failReturnValue); return *this; } CMockMethodCall& OnlySpecifiesActions() { m_OnlySpecifiesActions = true; return *this; } CMockMethodCall& IgnoreAllCalls() { m_IgnoreAllCalls = true; return *this; } CMockMethodCall& ValidateArgumentBuffer(_In_ size_t argumentNo, const void* expectedBuffer, _In_ size_t bytesToValidate, _In_ size_t byteOffset = 0) { if ((argumentNo > 0) && (argumentNo <= m_MockCallArguments.size()) && (NULL != expectedBuffer) && (bytesToValidate > 0)) { m_MockCallArguments[argumentNo - 1]->AddBufferValidation(expectedBuffer, bytesToValidate, byteOffset); } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_ARGUMENT, _T("Invalid arguments for ValidateArgumentBuffer."))); } return *this; } CMockMethodCall& CopyOutArgumentBuffer(_In_ size_t argumentNo, const void* injectedBuffer, _In_ size_t bytesToCopy, _In_ size_t byteOffset = 0) { if ((NULL == injectedBuffer) || (bytesToCopy == 0)) { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_ARGUMENT, _T("Invalid arguments for CopyOutArgumentBuffer."))); } if ((argumentNo > 0) && (argumentNo <= m_MockCallArguments.size())) { m_MockCallArguments[argumentNo - 1]->AddCopyOutArgumentBuffer(injectedBuffer, bytesToCopy, byteOffset); } return *this; } CMockMethodCall& ExpectedTimesExactly(size_t expectedTimes) { m_ExpectedTimes = expectedTimes; m_ExactExpectedTimes = true; return *this; } CMockMethodCall& ExpectedAtLeastTimes(size_t expectedTimes) { if (m_ExactExpectedTimes) { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INVALID_CALL_MODIFIER_COMBINATION, _T("Tried to use ExpectedTimesExactly(or NeverInvoked) with ExpectedAtLeastTimes. Invalid combination."))); } m_ExpectedTimes = expectedTimes; return *this; } }; #endif // MOCKMETHODCALL_H mockmethodcallbase.h000066400000000000000000000027531362133436400400520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKMETHODCALLBASE_H #define MOCKMETHODCALLBASE_H #pragma once #include "stdafx.h" #include "mockvaluebase.h" #include "mockcallargumentbase.h" class CMockMethodCallBase { public: CMockMethodCallBase(); virtual ~CMockMethodCallBase(); CMockMethodCallBase(std::tstring methodName, size_t argCount = 0, CMockCallArgumentBase** arguments = NULL); std::tstring ToString(); std::tstring GetArgumentsString(); bool operator==(const CMockMethodCallBase& right); void CopyOutArgumentBuffers(CMockMethodCallBase* sourceMockMethodCall); void AddExtraCallArgument(CMockCallArgumentBase* callArgument); CMockMethodCallBase* m_MatchedCall; bool m_OnlySpecifiesActions; bool m_IgnoreAllCalls; bool m_AlwaysReport; size_t m_ExpectedTimes; size_t m_MatchedTimes; bool m_ExactExpectedTimes; virtual CMockValueBase* GetReturnValue() { return m_ReturnValue; } virtual CMockValueBase* GetFailReturnValue() { return m_FailReturnValue; } bool HasMatch() const { return (NULL != m_MatchedCall); } void RollbackMatch(); protected: void Init(std::tstring methodName); std::vector m_MockCallArguments; std::tstring m_MethodName; CMockValueBase* m_ReturnValue; CMockValueBase* m_FailReturnValue; }; #endif // MOCKMETHODCALLBASE_H mockresultvalue.h000066400000000000000000000007071362133436400374530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKRESULTVALUE_H #define MOCKRESULTVALUE_H #pragma once #include "stdafx.h" #include "mockvalue.h" template class CMockResultValue : public CMockValue { public: CMockResultValue(T argValue) : CMockValue(argValue) { } }; #endif // MOCKRESULTVALUE_H mockvalue.h000066400000000000000000000301671362133436400362170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKVALUE_H #define MOCKVALUE_H #pragma once #include "stdafx.h" #include "mockvaluebase.h" #include template class CMockValue : public CMockValueBase { public: CMockValue(_In_ const T& value) : m_Value(value), m_OriginalValue(m_Value) { } virtual ~CMockValue() { } virtual std::tstring ToString() const { std::tostringstream strStream; strStream << m_Value; return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { return (*this == *(reinterpret_cast*>(right))); } void SetValue(_In_ const T& value) { m_Value = value; m_OriginalValue = value; } const T& GetValue() const { return m_Value; } protected: T m_Value; T m_OriginalValue; }; template<> class CMockValue : public CMockValueBase { public: CMockValue(_In_ const unsigned char& value) : m_Value(value), m_OriginalValue(value) { } virtual ~CMockValue() { } virtual std::tstring ToString() const { std::tostringstream strStream; strStream << (unsigned int)m_Value; return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { return (this->m_Value == (reinterpret_cast*>(right))->m_Value); } void SetValue(_In_ const unsigned char& value) { m_Value = value; m_OriginalValue = value; } const unsigned char& GetValue() const { return m_Value; } protected: unsigned char m_Value; unsigned char m_OriginalValue; }; template<> class CMockValue : public CMockValueBase { public: CMockValue(void) { } virtual ~CMockValue() { } virtual std::tstring ToString() const { std::tostringstream strStream; strStream << "void"; return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { (void)right; return true; } void SetValue(void) { } void GetValue() const { return; } protected: unsigned char m_Value; unsigned char m_OriginalValue; }; template<> class CMockValue : public CMockValueBase { public: CMockValue(_In_ const wchar_t * value) { if (value == NULL) { m_Value = L"NULL"; m_OriginalValue = L"NULL"; } else { m_Value = value; m_OriginalValue = value; } } virtual ~CMockValue() { } virtual std::tstring ToString() const { #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4244) #endif // _MSC_VER std::string temp(m_Value.begin(), m_Value.end()); std::tostringstream strStream; strStream << temp.c_str(); return strStream.str(); #ifdef _MSC_VER #pragma warning(pop) #endif // _MSC_VER } virtual bool EqualTo(_In_ const CMockValueBase* right) { return (this->m_Value == (reinterpret_cast*>(right))->m_Value); } void SetValue(_In_ const wchar_t* value) { if (value == NULL) { m_Value = L"NULL"; m_OriginalValue = L"NULL"; } else { m_Value = value; m_OriginalValue = value; } } const wchar_t* GetValue() const { return m_Value.c_str(); } protected: std::wstring m_Value; std::wstring m_OriginalValue; }; template<> class CMockValue : public CMockValueBase { public: CMockValue(_In_ const wchar_t * value) { if (value == NULL) { m_Value = L"NULL"; m_OriginalValue = L"NULL"; } else { m_Value = value; m_OriginalValue = value; } } virtual ~CMockValue() { } virtual std::tstring ToString() const { #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4244) #endif // _MSC_VER std::string temp(m_Value.begin(), m_Value.end()); std::tostringstream strStream; strStream << temp.c_str(); return strStream.str(); #ifdef _MSC_VER #pragma warning(pop) #endif // _MSC_VER } virtual bool EqualTo(_In_ const CMockValueBase* right) { return (this->m_Value == (reinterpret_cast*>(right))->m_Value); } void SetValue(_In_ const wchar_t* value) { if (value == NULL) { m_Value = L"NULL"; m_OriginalValue = L"NULL"; } else { m_Value = value; m_OriginalValue = value; } } const wchar_t* GetValue() const { return m_Value.c_str(); } protected: std::wstring m_Value; std::wstring m_OriginalValue; }; template class CMockValue : public CMockValueBase { public: CMockValue(_In_ T* value) { m_Value = value; m_OriginalValue = value; } virtual ~CMockValue() { } virtual std::tstring ToString() const { std::tostringstream strStream; if (NULL == m_Value) { strStream << _T("NULL"); } else { strStream << m_Value; } return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { return (*this == *(reinterpret_cast*>(right))); } void SetValue(_In_ T* value) { m_Value = value; m_OriginalValue = value; } T* GetValue() const { return m_Value; } protected: T* m_Value; T* m_OriginalValue; }; template class CMockValue : public CMockValueBase { public: typedef struct arraySave_TAG { bool isNULL; T* copy; }arraySave; typedef T T_Array_N[N]; CMockValue(_In_ T* value) { m_OriginalValue = value; if (value == NULL) { m_Value.isNULL = true; } else { m_Value.isNULL = false; m_Value.copy = new T[N](); for (size_t i = 0; i < N;i++) { m_Value.copy[i] = value[i]; } } } virtual ~CMockValue() { if (m_Value.isNULL ==false) { delete[] m_Value.copy; } } virtual std::tstring ToString() const { std::tostringstream strStream; if (m_Value.isNULL) { strStream << "NULL"; } else { strStream << "{"; for (size_t i = 0; i < N; i++) { if (i > 0) { strStream << ","; } strStream << m_Value.copy[i]; } strStream << "}"; } return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { /*this will be interesting*/ return (*this == *(reinterpret_cast*>(right))); } void SetValue(_In_ T* value) { m_OriginalValue = value; if (m_Value.isNULL == true) { if (value == NULL) { /*do nothing*/ } else { m_Value.isNULL = false; m_Value.copy = new T[N]; for (size_t i = 0; i < N; i++) { m_Value.copy[i] = value[i]; } } } else { if (value == NULL) { m_Value.isNULL = true; delete[]m_Value.copy; } else { if (value == m_Value.copy) { /*do nothing, we are copying from us to us*/ } else { m_Value.isNULL = false; delete[] m_Value.copy; m_Value.copy = new T[N]; for (size_t i = 0; i < N; i++) { m_Value.copy[i] = value[i]; } } } } } const T* GetValue() const { if (m_Value.isNULL == true) { return NULL; } else { return m_Value.copy; } } protected: arraySave m_Value; T* m_OriginalValue; }; template class CMockValue : public CMockValueBase { public: typedef struct arraySave_TAG { bool isNULL; T* copy; }arraySave; typedef T T_Array_N[N]; CMockValue(_In_ const T* value) { m_OriginalValue = value; if (value == NULL) { m_Value.isNULL = true; } else { m_Value.isNULL = false; m_Value.copy = new T[N](); for (size_t i = 0; i < N; i++) { m_Value.copy[i] = value[i]; } } } virtual ~CMockValue() { if (m_Value.isNULL == false) { delete[] m_Value.copy; } } virtual std::tstring ToString() const { std::tostringstream strStream; if (m_Value.isNULL) { strStream << "NULL"; } else { strStream << "{"; for (size_t i = 0; i < N; i++) { if (i > 0) { strStream << ","; } strStream << m_Value.copy[i]; } strStream << "}"; } return strStream.str(); } virtual bool EqualTo(_In_ const CMockValueBase* right) { /*this will be interesting*/ return (*this == *(reinterpret_cast*>(right))); } void SetValue(_In_ const T* value) { m_OriginalValue = value; if (m_Value.isNULL == true) { if (value == NULL) { /*do nothing*/ } else { m_Value.isNULL = false; m_Value.copy = new T[N]; for (size_t i = 0; i < N; i++) { m_Value.copy[i] = value[i]; } } } else { if (value == NULL) { m_Value.isNULL = true; delete[]m_Value.copy; } else { if (value == m_Value.copy) { /*do nothing, we are copying from us to us*/ } else { m_Value.isNULL = false; delete[] m_Value.copy; m_Value.copy = new T[N]; for (size_t i = 0; i < N; i++) { m_Value.copy[i] = value[i]; } } } } } const T* GetValue() const { if (m_Value.isNULL == true) { return NULL; } else { return m_Value.copy; } } protected: arraySave m_Value; const T* m_OriginalValue; }; template static bool operator==(_In_ const CMockValue& lhs, _In_ const CMockValue& rhs) { return lhs.GetValue() == rhs.GetValue(); } template static bool operator==(_In_ const CMockValue& lhs, _In_ const CMockValue& rhs) { /*comparing two arrays needs to be handled differently than the build in == operator*/ return(strcmp(lhs.ToString().c_str(), rhs.ToString().c_str()) == 0); } #endif // MOCKVALUE_H mockvaluebase.h000066400000000000000000000007001362133436400370400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef MOCKVALUEBASE_H #define MOCKVALUEBASE_H #pragma once #include "stdafx.h" class CMockValueBase { public: virtual ~CMockValueBase(); public: virtual std::tstring ToString() const = 0; virtual bool EqualTo(_In_ const CMockValueBase* right) = 0; }; #endif // MOCKVALUEBASE_H nicecallcomparer.h000066400000000000000000000013311362133436400375230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef NICECALLCOMPARER_H #define NICECALLCOMPARER_H #pragma once #include "stdafx.h" #include "strictunorderedcallcomparer.h" #include "mockmethodcallbase.h" template class CNiceCallComparer : public CStrictUnorderedCallComparer { public: CNiceCallComparer(_In_ AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON) : CStrictUnorderedCallComparer(performAutomaticCallComparison) { T::CMockCallRecorder::m_MockCallComparer->SetIgnoreUnexpectedCalls(true); } }; #endif // NICECALLCOMPARER_H runtimemock.h000066400000000000000000000030011362133436400365510ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef RUNTIMEMOCK_H #define RUNTIMEMOCK_H #pragma once #ifdef _MSC_VER #ifndef DISABLE_DETOURS #include "stdafx.h" #include "threadsafeglobalmock.h" #include "detourshookclass.h" #include "mockcallcomparer.h" #include "strictunorderedcallcomparer.h" template class CRuntimeMock : public CThreadSafeGlobalMock, public CDetoursHookClass { public: CRuntimeMock(_In_ AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON) : CThreadSafeGlobalMock(performAutomaticCallComparison) { } virtual ~CRuntimeMock() { } virtual void RegisterFunction(_In_ const void* functionToRegister, _In_ const void* registerFunctionArgument) { // functionToRegister is the mock class member, // registerFunctionArgument should contain the function that should be hooked (detoured) InstallHook(registerFunctionArgument, functionToRegister); } virtual void UnregisterFunction(_In_ const void* functionToUnregister, _In_ const void* unregisterFunctionArgument) { // functionToRegister is the mock class member, // registerFunctionArgument should contain the function that should have been hooked (detoured) UninstallHook(unregisterFunctionArgument, functionToUnregister); } }; #endif // DISABLE_DETOURS #endif // _MSC_VER #endif // RUNTIMEMOCK_H stdafx.h000066400000000000000000000033321362133436400355140ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include "targetver.h" #ifdef _MSC_VER #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif // WIN32_LEAN_AND_MEAN #include "windows.h" #include "tchar.h" #include "sal.h" #include "basetsd.h" #define SAL_Acquires_lock_(...) _Acquires_lock_(__VA_ARGS__) #define SAL_Releases_lock_(...) _Releases_lock_(__VA_ARGS__) typedef CRITICAL_SECTION MICROMOCK_CRITICAL_SECTION; #define MicroMockEnterCriticalSection(...) EnterCriticalSection(__VA_ARGS__) #define MicroMockLeaveCriticalSection(...) LeaveCriticalSection(__VA_ARGS__) #define MicroMockInitializeCriticalSection(...) InitializeCriticalSection(__VA_ARGS__) #define MicroMockDeleteCriticalSection(...) DeleteCriticalSection(__VA_ARGS__) #else typedef unsigned char UINT8; typedef char TCHAR; #define _T(A) A typedef int MICROMOCK_CRITICAL_SECTION; #define MicroMockEnterCriticalSection(...) #define MicroMockLeaveCriticalSection(...) #define MicroMockInitializeCriticalSection(...) #define MicroMockDeleteCriticalSection(...) #define SAL_Acquires_lock_(...) #define SAL_Releases_lock_(...) #endif #include "string" #include "sstream" #include "map" #include "algorithm" #include "iomanip" #include "vector" #include "set" #include "sal.h" #ifdef _MSC_VER /*'function' : unreferenced local function has been removed*/ #pragma warning( disable: 4505 ) /*unreferenced inline function has been removed*/ #pragma warning( disable: 4514) #endif #define COUNT_OF(a) (sizeof(a) / sizeof((a)[0])) namespace std { typedef std::basic_string tstring; typedef std::basic_ostringstream tostringstream; } strictorderedcallcomparer.h000066400000000000000000000104671362133436400414740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STRICTORDEREDCALLCOMPARER_H #define STRICTORDEREDCALLCOMPARER_H #pragma once #include "stdafx.h" #include "mockcallcomparer.h" #include "mockmethodcallbase.h" template class CStrictOrderedCallComparer : public T { public: CStrictOrderedCallComparer(_In_ AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON) : m_ExpectedCallIndex(0) { T::SetPerformAutomaticCallComparison(performAutomaticCallComparison); } virtual bool IsUnexpectedCall(_In_ const CMockMethodCallBase* actualCall) { return !actualCall->HasMatch(); } virtual bool IsMissingCall(_In_ const CMockMethodCallBase* expectedCall) { return ((!expectedCall->HasMatch()) && (expectedCall->m_ExpectedTimes > 0) && (!expectedCall->m_IgnoreAllCalls) && (!expectedCall->m_OnlySpecifiesActions)); } virtual CMockMethodCallBase* MatchCall(std::vector& expectedCalls, CMockMethodCallBase* actualCall) { CMockMethodCallBase* result = NULL; // skip any records that do not enforce expected calls while ((m_ExpectedCallIndex < expectedCalls.size()) && (expectedCalls[m_ExpectedCallIndex]->m_OnlySpecifiesActions)) { m_ExpectedCallIndex++; } // do we still have items in the expected calls array? if (m_ExpectedCallIndex < expectedCalls.size()) { CMockMethodCallBase* expectedCall = expectedCalls[m_ExpectedCallIndex]; // if the expected call says all calls of this type should be ignored, // then match if ((expectedCall->m_IgnoreAllCalls) && (*expectedCall == *actualCall)) { actualCall->m_MatchedCall = expectedCall; expectedCall->m_MatchedCall = actualCall; } else { // if the expected call has not yet been matched if (!expectedCall->HasMatch() && // and it matches the actual call (*expectedCall == *actualCall)) { // check whether the number of expected calls of this type have been found // in the actual calls array if (expectedCall->m_MatchedTimes < expectedCall->m_ExpectedTimes) { // record that we found yet another actual call matching the expected call expectedCall->m_MatchedTimes++; if (expectedCall->m_MatchedTimes == expectedCall->m_ExpectedTimes) { // mark the expected call as fully matched // (no other actual call will be matched against it) expectedCall->m_MatchedCall = actualCall; } // mark the actual call as having a match actualCall->m_MatchedCall = expectedCall; result = expectedCall; } else { // too many calls, check if exact is specified if (expectedCall->m_ExactExpectedTimes) { actualCall->m_AlwaysReport = true; } } } } } if ((NULL != result) && (result->m_MatchedTimes == result->m_ExpectedTimes)) { m_ExpectedCallIndex++; } else { // have a second loop to see if we need to get a later set return value for (int i = (int)expectedCalls.size() - 1; i >= 0; i--) { if ((expectedCalls[i]->m_OnlySpecifiesActions) && (*expectedCalls[i] == *actualCall)) { result = expectedCalls[i]; break; } } } return result; } protected: size_t m_ExpectedCallIndex; }; #endif // STRICTORDEREDCALLCOMPARER_H strictunorderedcallcomparer.h000066400000000000000000000104261362133436400420320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STRICTUNORDEREDCALLCOMPARER_H #define STRICTUNORDEREDCALLCOMPARER_H #pragma once #include "stdafx.h" #include "mockcallcomparer.h" #include "mockmethodcallbase.h" template class CStrictUnorderedCallComparer : virtual public CMockCallComparer, public T { public: CStrictUnorderedCallComparer(_In_ AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON) { T::SetPerformAutomaticCallComparison(performAutomaticCallComparison); T::SetMockCallComparer(this); T::CMockCallRecorder::m_MockCallComparer->SetIgnoreUnexpectedCalls(false); } virtual bool IsUnexpectedCall(_In_ const CMockMethodCallBase* actualCall) { if (T::CMockCallRecorder::m_MockCallComparer->GetIgnoreUnexpectedCalls()) { return actualCall->m_AlwaysReport; } else { return !actualCall->HasMatch(); } } virtual bool IsMissingCall(_In_ const CMockMethodCallBase* expectedCall) { return ((!expectedCall->HasMatch()) && (expectedCall->m_ExpectedTimes > 0) && (!expectedCall->m_IgnoreAllCalls) && (!expectedCall->m_OnlySpecifiesActions)); } virtual CMockMethodCallBase* MatchCall(std::vector& expectedCalls, CMockMethodCallBase* actualCall) { CMockMethodCallBase* result = NULL; // go through all items in the expected call array for (size_t i = 0; i < expectedCalls.size(); i++) { CMockMethodCallBase* expectedCall = expectedCalls[i]; // if the expected call says all calls of this type should be ignored, // then match if ((expectedCall->m_IgnoreAllCalls) && (*expectedCall == *actualCall)) { actualCall->m_MatchedCall = expectedCall; expectedCall->m_MatchedCall = actualCall; break; } else { // if the expected call has not yet been matched if ((!expectedCall->HasMatch() || expectedCall->m_ExactExpectedTimes) && (!expectedCall->m_OnlySpecifiesActions) && // and it matches the actual call (*expectedCall == *actualCall)) { // check whether the number of expected calls of this type have been found // in the actual calls array if (expectedCall->m_MatchedTimes < expectedCall->m_ExpectedTimes) { // record that we found yet another actual call matching the expected call expectedCall->m_MatchedTimes++; if (expectedCall->m_MatchedTimes == expectedCall->m_ExpectedTimes) { // mark the expected call as fully matched // (no other actual call will be matched against it) expectedCall->m_MatchedCall = actualCall; } // mark the actual call as having a match actualCall->m_MatchedCall = expectedCall; result = expectedCall; } else { // too many calls, check if exact is specified if (expectedCall->m_ExactExpectedTimes) { actualCall->m_AlwaysReport = true; } } break; } } } // have a second loop to see if we need to get a later set return value for (int i = (int)expectedCalls.size() - 1; i >= 0; i--) { if ((expectedCalls[(unsigned int)i]->m_OnlySpecifiesActions) && (*expectedCalls[(unsigned int)i] == *actualCall)) { result = expectedCalls[(unsigned int)i]; break; } } return result; } }; #endif // STRICTUNORDEREDCALLCOMPARER_H targetver.h000066400000000000000000000007621362133436400362320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TARGETVER_H #define TARGETVER_H #pragma once // Including SDKDDKVer.h defines the highest available Windows platform. // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. #endif // TARGETVER_H threadsafeglobalmock.h000066400000000000000000000036101362133436400403630ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef THREADSAFEGLOBALMOCK_H #define THREADSAFEGLOBALMOCK_H #pragma once #ifdef _MSC_VER #include "stdafx.h" #include "mock.h" #include "mockcallrecorder.h" #include "micromockexception.h" template class CThreadSafeGlobalMock : public CMock { public: CThreadSafeGlobalMock(_In_ AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_ON) : CMock(performAutomaticCallComparison) { if (NULL != InterlockedCompareExchangePointer((void**)&m_GlobalMockInstance, this, NULL)) { char errorString[1024]; sprintf(errorString, "Attempting to use mock %s in a multithreading environment", typeid(C).name()); MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INTERNAL_ERROR, errorString)); } } virtual ~CThreadSafeGlobalMock() { if (this != InterlockedCompareExchangePointer((void**)&m_GlobalMockInstance, NULL, this)) { char errorString[1024]; sprintf(errorString, "Mock global instance for mock %s has been changed while the mock was used", typeid(C).name()); } } static CThreadSafeGlobalMock* GetSingleton() { if (NULL == m_GlobalMockInstance) { char errorString[1024]; sprintf(errorString, "Error retrieving singleton for mock %s", typeid(C).name()); MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INTERNAL_ERROR, errorString)); } return m_GlobalMockInstance; } protected: static CThreadSafeGlobalMock* m_GlobalMockInstance; }; template CThreadSafeGlobalMock* CThreadSafeGlobalMock::m_GlobalMockInstance; #endif #endif // THREADSAFEGLOBALMOCK_H timediscretemicromock.h000066400000000000000000000331231362133436400406110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*defines*/ #ifndef TIME_DISCRETE_MICRO_MOCK_H #define TIME_DISCRETE_MICRO_MOCK_H #pragma once #include "stdafx.h" #include "micromock.h" typedef unsigned int UINT32; #define TD_MOCK_CLASS(className) \ class Typed_##className; \ typedef CTimeDiscreteMicroMock className; \ TYPED_MOCK_CLASS(Typed_##className, CThreadSafeGlobalMock) // A strict expected call implies that all arguments are checked #define STRICT_EXPECTED_CALL_AT(ClassName, time, ...) \ STRICT_EXPECTED_CALL(ClassName, __VA_ARGS__) \ .AddExtraCallArgument(new CMockCallArgument(time, false)) // By using the below macro, none of the arguments are checked by default // To specify checking the argument values, use the ValidateArgument // expected call modifier method #define EXPECTED_CALL_AT(ClassName, time, ...) \ STRICT_EXPECTED_CALL_AT(ClassName, time, __VA_ARGS__) \ .IgnoreAllArguments() /*this macro takes a mock name, looks it up in the repository, and gets the time provider for that mock*/ #define MOCK_TIMEPROVIDER(mockName) \ (dynamic_cast(GetSingleton())->getCurrentTick()) /*a poor interface that says "I know how to play"*/ class canPlay { public: virtual void PlayTick(_In_ UINT32 time, _In_ UINT32 order)=0; virtual ~canPlay()=0; }; inline canPlay::~canPlay(){} template class valueHolder { private: T theValue; public: valueHolder(_In_ const T& t) { theValue = t; } void operator=(_In_ T& t) { theValue = t; } operator T*(void) { return &theValue; } operator T&(void) { return theValue; } void setArraySize(_In_ size_t size) { UNREFERENCED_PARAMETER(size); ASSERT_FAIL("Setting an array size for something that is not a pointer is CATASTROPHIC failure"); } }; /*template template parameter partial specialization, or something*/ template class valueHolder { private: bool wasNULL; T theValue; T* originalPointer; T* copyArray; size_t arraySize; private: void SetValue(_In_ T* t) { if(t==NULL) { wasNULL = true; } else { wasNULL = false; theValue = *t; originalPointer = t; arraySize = 0; } } public: valueHolder(_In_ T* t) : copyArray(NULL) { SetValue(t); } valueHolder(_In_ const valueHolder & t): wasNULL(t.wasNULL), theValue(t.theValue), originalPointer(t.originalPointer), arraySize(t.arraySize) { if(t.copyArray!=NULL) { copyArray = new T[t.arraySize]; ASSERT_IS_TRUE(NULL != copyArray, _T("memory error")); for(size_t i=0;i class valueHolder { private: bool wasNULL; T theValue; const T* originalPointer; T* copyArray; size_t arraySize; private: void SetValue(_In_ const T* t) { if(t==NULL) { wasNULL = true; } else { wasNULL = false; theValue = *t; originalPointer = t; arraySize = 0; } } public: valueHolder(_In_ const T* t) : copyArray(NULL) { SetValue(t); } valueHolder(_In_ const valueHolder & t): wasNULL(t.wasNULL), theValue(t.theValue), originalPointer(t.originalPointer), arraySize(t.arraySize) { if(t.copyArray!=NULL) { copyArray = new T[t.arraySize]; ASSERT_IS_TRUE(NULL != copyArray, _T("memory error")); for(size_t i=0;i class valueHolder { private: std::string theValue; public: valueHolder(_In_z_ char* t) { theValue = t; } void operator=(_In_z_ char* t) { theValue = t; } operator char*(void) { return (char*)(theValue.c_str()); } }; /*this is a special case*/ template <> class valueHolder { private: std::wstring theValue; public: valueHolder(_In_z_ wchar_t* t) { theValue = t; } void operator=(_In_z_ wchar_t* t) { theValue = t; } operator wchar_t*(void) { return (wchar_t*)theValue.c_str(); } }; class stims_base { /*friends because registerCallXArg should not be available as public*/ template friend class call0Arg; template friend class call1Arg; template friend class call2Arg; template friend class call3Arg; template friend class call4Arg; template friend class call5Arg; template friend class call6Arg; template friend class call7Arg; template friend class call8Arg; template friend class call9Arg; template friend class call10Arg; template friend class call11Arg; template friend class call12Arg; template friend class call13Arg; template friend class call14Arg; template friend class call15Arg; private: static std::vector allPlayers; static void registerCallXArg(canPlay* someStim) { allPlayers.push_back(someStim); } public: virtual ~stims_base() { allPlayers.clear(); } void static PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0;iPlayTick(tick, order); } } }; #include "timediscretemicromockcallmacros.h" extern UINT32 theTick; extern UINT32 totalTicksPlayed; #define MAXTICK 1000000 class CTimeDiscreteMicroMockBase : public stims_base { private: UINT32 m_currentTick; void(*m_theTask)(void); UINT32*maxOrder; public: /*the only constructor will accept a task given as function name*/ CTimeDiscreteMicroMockBase(_In_opt_ void(*p)(void)) :m_theTask(p) { maxOrder = (UINT32*)malloc(MAXTICK*sizeof(UINT32)); if (maxOrder == NULL) { MOCK_THROW(_T("out of memory")); } else { memset(maxOrder, 0xFF, MAXTICK*sizeof(UINT32)); } } virtual ~CTimeDiscreteMicroMockBase() { if (maxOrder != NULL) { free(maxOrder); maxOrder = NULL; } } void RunUntilTick(_In_ UINT32 nTick) { totalTicksPlayed += nTick; if (nTick >= MAXTICK) { MOCK_THROW(_T("time detected bigger than MAXTICK")); } for (UINT32 i = 0; i <= nTick; i++) { m_currentTick = i; theTick = m_currentTick; if (maxOrder[i] != 0xFFFFFFFF) { for (UINT32 order = 0; order <= maxOrder[i]; order++) { stims_base::PlayTick(i, order); } } m_theTask(); } } UINT32 getCurrentTick(void) { return m_currentTick; } UINT32 getAndIncOrder(_In_ UINT32 time) { if (time class CTimeDiscreteMicroMock: public T, public CTimeDiscreteMicroMockBase { public: CTimeDiscreteMicroMock(void (*theTask)(void)):CTimeDiscreteMicroMockBase(theTask) { } }; /*variable exports*/ /*function exports*/ #endif timediscretemicromockcallmacros.h000066400000000000000000003134011362133436400426520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // THIS FILE IS AUTOGENERATED! // DO NOT EDIT! #ifndef TIMEDISCRETEMICROMOCKCALLMACROS_H #define TIMEDISCRETEMICROMOCKCALLMACROS_H #pragma once #define MOCK_TD_METHOD_0(prefix, resultType, name) \ MOCK_METHOD_0(prefix, resultType, name)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_0(prefix, resultType, name) \ MOCK_STATIC_METHOD_0(prefix, resultType, name)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_1(prefix, resultType, name, arg1Type, arg1Value) \ MOCK_METHOD_1(prefix, resultType, name, arg1Type, arg1Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_1(prefix, resultType, name, arg1Type, arg1Value) \ MOCK_STATIC_METHOD_1(prefix, resultType, name, arg1Type, arg1Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_2(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) \ MOCK_METHOD_2(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_2(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value) \ MOCK_STATIC_METHOD_2(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_3(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) \ MOCK_METHOD_3(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_3(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) \ MOCK_STATIC_METHOD_3(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_4(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) \ MOCK_METHOD_4(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_4(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) \ MOCK_STATIC_METHOD_4(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_5(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) \ MOCK_METHOD_5(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_5(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) \ MOCK_STATIC_METHOD_5(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_6(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) \ MOCK_METHOD_6(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_6(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) \ MOCK_STATIC_METHOD_6(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_7(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) \ MOCK_METHOD_7(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_7(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) \ MOCK_STATIC_METHOD_7(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_8(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) \ MOCK_METHOD_8(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_8(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) \ MOCK_STATIC_METHOD_8(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_9(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) \ MOCK_METHOD_9(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_9(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) \ MOCK_STATIC_METHOD_9(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_10(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) \ MOCK_METHOD_10(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_10(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) \ MOCK_STATIC_METHOD_10(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_11(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) \ MOCK_METHOD_11(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_11(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) \ MOCK_STATIC_METHOD_11(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_12(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) \ MOCK_METHOD_12(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_12(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) \ MOCK_STATIC_METHOD_12(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_13(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) \ MOCK_METHOD_13(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_13(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) \ MOCK_STATIC_METHOD_13(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_14(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) \ MOCK_METHOD_14(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_14(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) \ MOCK_STATIC_METHOD_14(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_TD_METHOD_15(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) \ MOCK_METHOD_15(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define MOCK_STATIC_TD_METHOD_15(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) \ MOCK_STATIC_METHOD_15(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value)\ mockMethodCall->AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\ result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\ #define STIM_CALL_AT(var, time, ...) var.__VA_ARGS__.SetTime(time, var.getAndIncOrder(time)) #define DECLARE_STIM_STATIC_TD_METHOD_0(prefix, resultType, name)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)();\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_0(prefix, resultType, name ) call0Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_1(prefix, resultType, name, arg1Type, arg1Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_1(prefix, resultType, name , arg1Type, arg1Value) call1Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_2(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_2(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value) call2Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_3(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_3(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value) call3Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_4(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_4(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value) call4Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_5(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_5(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value) call5Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_6(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_6(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value) call6Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_7(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_7(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value) call7Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_8(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_8(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value) call8Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_9(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_9(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value) call9Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_10(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_10(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value) call10Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_11(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_11(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value) call11Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_12(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_12(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value) call12Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_13(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_13(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value) call13Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_14(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_14(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value) call14Arg name; #define DECLARE_STIM_STATIC_TD_METHOD_15(prefix, resultType, name, arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value)\ class pFunctionCall_Wrapper_##name \ {\ public:\ typedef resultType (*pRealFunctionType)(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value);\ static pRealFunctionType realFunction;\ };\ pFunctionCall_Wrapper_##name::pRealFunctionType pFunctionCall_Wrapper_##name::realFunction = ::name; /*so this never can go to a header*/ #define STIM_STATIC_TD_METHOD_15(prefix, resultType, name , arg1Type, arg1Value, arg2Type, arg2Value, arg3Type, arg3Value, arg4Type, arg4Value, arg5Type, arg5Value, arg6Type, arg6Value, arg7Type, arg7Value, arg8Type, arg8Value, arg9Type, arg9Value, arg10Type, arg10Value, arg11Type, arg11Value, arg12Type, arg12Value, arg13Type, arg13Value, arg14Type, arg14Value, arg15Type, arg15Value) call15Arg name; templateclass call0Arg : public canPlay { private: class timeS { public: timeS(): time(0), order(0) { } UINT32 time; UINT32 order; }; std::vector allCalls; public: call0Arg() { stims_base::registerCallXArg(this); } virtual ~call0Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call0Arg& operator()() { timeS s; allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } }; templateclass call1Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value): time(0), order(0), arg1(arg1Value) { } UINT32 time; UINT32 order; valueHolder arg1; }; std::vector allCalls; public: call1Arg() { stims_base::registerCallXArg(this); } virtual ~call1Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call1Arg& operator()(arg1Type arg1) { timeS s(arg1); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call1Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call2Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; }; std::vector allCalls; public: call2Arg() { stims_base::registerCallXArg(this); } virtual ~call2Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call2Arg& operator()(arg1Type arg1,arg2Type arg2) { timeS s(arg1, arg2); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call2Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call3Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; }; std::vector allCalls; public: call3Arg() { stims_base::registerCallXArg(this); } virtual ~call3Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call3Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3) { timeS s(arg1, arg2, arg3); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call3Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call4Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; }; std::vector allCalls; public: call4Arg() { stims_base::registerCallXArg(this); } virtual ~call4Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call4Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4) { timeS s(arg1, arg2, arg3, arg4); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call4Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call5Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; }; std::vector allCalls; public: call5Arg() { stims_base::registerCallXArg(this); } virtual ~call5Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call5Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5) { timeS s(arg1, arg2, arg3, arg4, arg5); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call5Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call6Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; }; std::vector allCalls; public: call6Arg() { stims_base::registerCallXArg(this); } virtual ~call6Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call6Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call6Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call7Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; }; std::vector allCalls; public: call7Arg() { stims_base::registerCallXArg(this); } virtual ~call7Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call7Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call7Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call8Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; }; std::vector allCalls; public: call8Arg() { stims_base::registerCallXArg(this); } virtual ~call8Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call8Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call8Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call9Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value), arg9(arg9Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; valueHolder arg9; }; std::vector allCalls; public: call9Arg() { stims_base::registerCallXArg(this); } virtual ~call9Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call9Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8,arg9Type arg9) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call9Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } case 9: { s.arg9.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call10Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value), arg9(arg9Value), arg10(arg10Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; valueHolder arg9; valueHolder arg10; }; std::vector allCalls; public: call10Arg() { stims_base::registerCallXArg(this); } virtual ~call10Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call10Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8,arg9Type arg9,arg10Type arg10) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call10Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } case 9: { s.arg9.setArraySize(nElements); break; } case 10: { s.arg10.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call11Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value), arg9(arg9Value), arg10(arg10Value), arg11(arg11Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; valueHolder arg9; valueHolder arg10; valueHolder arg11; }; std::vector allCalls; public: call11Arg() { stims_base::registerCallXArg(this); } virtual ~call11Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call11Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8,arg9Type arg9,arg10Type arg10,arg11Type arg11) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call11Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } case 9: { s.arg9.setArraySize(nElements); break; } case 10: { s.arg10.setArraySize(nElements); break; } case 11: { s.arg11.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call12Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value), arg9(arg9Value), arg10(arg10Value), arg11(arg11Value), arg12(arg12Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; valueHolder arg9; valueHolder arg10; valueHolder arg11; valueHolder arg12; }; std::vector allCalls; public: call12Arg() { stims_base::registerCallXArg(this); } virtual ~call12Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call12Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8,arg9Type arg9,arg10Type arg10,arg11Type arg11,arg12Type arg12) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call12Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } case 9: { s.arg9.setArraySize(nElements); break; } case 10: { s.arg10.setArraySize(nElements); break; } case 11: { s.arg11.setArraySize(nElements); break; } case 12: { s.arg12.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call13Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value), arg9(arg9Value), arg10(arg10Value), arg11(arg11Value), arg12(arg12Value), arg13(arg13Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; valueHolder arg9; valueHolder arg10; valueHolder arg11; valueHolder arg12; valueHolder arg13; }; std::vector allCalls; public: call13Arg() { stims_base::registerCallXArg(this); } virtual ~call13Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call13Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8,arg9Type arg9,arg10Type arg10,arg11Type arg11,arg12Type arg12,arg13Type arg13) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call13Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } case 9: { s.arg9.setArraySize(nElements); break; } case 10: { s.arg10.setArraySize(nElements); break; } case 11: { s.arg11.setArraySize(nElements); break; } case 12: { s.arg12.setArraySize(nElements); break; } case 13: { s.arg13.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call14Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value), arg9(arg9Value), arg10(arg10Value), arg11(arg11Value), arg12(arg12Value), arg13(arg13Value), arg14(arg14Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; valueHolder arg9; valueHolder arg10; valueHolder arg11; valueHolder arg12; valueHolder arg13; valueHolder arg14; }; std::vector allCalls; public: call14Arg() { stims_base::registerCallXArg(this); } virtual ~call14Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call14Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8,arg9Type arg9,arg10Type arg10,arg11Type arg11,arg12Type arg12,arg13Type arg13,arg14Type arg14) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call14Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } case 9: { s.arg9.setArraySize(nElements); break; } case 10: { s.arg10.setArraySize(nElements); break; } case 11: { s.arg11.setArraySize(nElements); break; } case 12: { s.arg12.setArraySize(nElements); break; } case 13: { s.arg13.setArraySize(nElements); break; } case 14: { s.arg14.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; templateclass call15Arg : public canPlay { private: class timeS { public: timeS(arg1Type arg1Value, arg2Type arg2Value, arg3Type arg3Value, arg4Type arg4Value, arg5Type arg5Value, arg6Type arg6Value, arg7Type arg7Value, arg8Type arg8Value, arg9Type arg9Value, arg10Type arg10Value, arg11Type arg11Value, arg12Type arg12Value, arg13Type arg13Value, arg14Type arg14Value, arg15Type arg15Value): time(0), order(0), arg1(arg1Value), arg2(arg2Value), arg3(arg3Value), arg4(arg4Value), arg5(arg5Value), arg6(arg6Value), arg7(arg7Value), arg8(arg8Value), arg9(arg9Value), arg10(arg10Value), arg11(arg11Value), arg12(arg12Value), arg13(arg13Value), arg14(arg14Value), arg15(arg15Value) { } UINT32 time; UINT32 order; valueHolder arg1; valueHolder arg2; valueHolder arg3; valueHolder arg4; valueHolder arg5; valueHolder arg6; valueHolder arg7; valueHolder arg8; valueHolder arg9; valueHolder arg10; valueHolder arg11; valueHolder arg12; valueHolder arg13; valueHolder arg14; valueHolder arg15; }; std::vector allCalls; public: call15Arg() { stims_base::registerCallXArg(this); } virtual ~call15Arg() { } virtual void PlayTick(_In_ UINT32 tick, _In_ UINT32 order) { for(UINT32 i=0; i& SetTime(_In_ UINT32 time, _In_ UINT32 order) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL, _T("using SetTime before the call has been defined usually indicates an error in test code")); } else { allCalls[allCalls.size()-1].time=time; allCalls[allCalls.size()-1].order=order; } return *this; } call15Arg& operator()(arg1Type arg1,arg2Type arg2,arg3Type arg3,arg4Type arg4,arg5Type arg5,arg6Type arg6,arg7Type arg7,arg8Type arg8,arg9Type arg9,arg10Type arg10,arg11Type arg11,arg12Type arg12,arg13Type arg13,arg14Type arg14,arg15Type arg15) { timeS s(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15); allCalls.push_back(s); /*time is updated "later" by chaining*/ return *this; } call15Arg& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements) { if(allCalls.size()==0) { throw CMicroMockException(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL, _T("using setArraySize before the call has been defined usually indicates an error in test code")); } else { timeS& s = allCalls[allCalls.size()-1]; /*get the last element*/ switch(parameter) { case 1: { s.arg1.setArraySize(nElements); break; } case 2: { s.arg2.setArraySize(nElements); break; } case 3: { s.arg3.setArraySize(nElements); break; } case 4: { s.arg4.setArraySize(nElements); break; } case 5: { s.arg5.setArraySize(nElements); break; } case 6: { s.arg6.setArraySize(nElements); break; } case 7: { s.arg7.setArraySize(nElements); break; } case 8: { s.arg8.setArraySize(nElements); break; } case 9: { s.arg9.setArraySize(nElements); break; } case 10: { s.arg10.setArraySize(nElements); break; } case 11: { s.arg11.setArraySize(nElements); break; } case 12: { s.arg12.setArraySize(nElements); break; } case 13: { s.arg13.setArraySize(nElements); break; } case 14: { s.arg14.setArraySize(nElements); break; } case 15: { s.arg15.setArraySize(nElements); break; } default: { ASSERT_FAIL(_T("there are no parameters so big")); } } return *this; } } }; #endif // TIMEDISCRETEMICROMOCKCALLMACROS_H src/000077500000000000000000000000001362133436400340675ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromockmicromockcharstararenullterminatedstrings.cpp000066400000000000000000000023011362133436400453540ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "micromock.h" #include "micromockcharstararenullterminatedstrings.h" bool operator==(_In_ const CMockValue& lhs, _In_ const CMockValue& rhs) { if (lhs.GetValue() == NULL) { if (rhs.GetValue() == NULL) { return true; } else { return false; } } else { if (rhs.GetValue() == NULL) { return false; } else { return (strcmp(lhs.GetValue(), rhs.GetValue()) == 0); } } } bool operator==(_In_ const CMockValue& lhs, _In_ const CMockValue& rhs) { if (lhs.GetValue() == NULL) { if (rhs.GetValue() == NULL) { return true; } else { return false; } } else { if (rhs.GetValue() == NULL) { return false; } else { return (strcmp(lhs.GetValue(), rhs.GetValue()) == 0); } } } micromockexception.cpp000066400000000000000000000027661362133436400405100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*defines*/ #include "stdafx.h" #include "micromockexception.h" #include "micromocktestrunnerhooks.h" #define _MACROSTR(a) _T(#a) /*types*/ /*static variables*/ /*static functions*/ /*variable exports*/ const TCHAR* MicroMockExceptionToString(_In_ MICROMOCK_EXCEPTION exceptionCode) { switch (exceptionCode) { default: return _T("Invalid exception code"); case MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS: return _MACROSTR(MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS); case MICROMOCK_EXCEPTION_ALLOCATION_FAILURE: return _MACROSTR(MICROMOCK_EXCEPTION_ALLOCATION_FAILURE); case MICROMOCK_EXCEPTION_INVALID_ARGUMENT: return _MACROSTR(MICROMOCK_EXCEPTION_INVALID_ARGUMENT); case MICROMOCK_EXCEPTION_INVALID_CALL_MODIFIER_COMBINATION: return _MACROSTR(MICROMOCK_EXCEPTION_INVALID_CALL_MODIFIER_COMBINATION); case MICROMOCK_EXCEPTION_MOCK_NOT_FOUND: return _MACROSTR(MICROMOCK_EXCEPTION_MOCK_NOT_FOUND); case MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL: return _MACROSTR(MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL); case MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL: return _MACROSTR(MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL); case MICROMOCK_EXCEPTION_INTERNAL_ERROR: return _MACROSTR(MICROMOCK_EXCEPTION_INTERNAL_ERROR); } }; /*function exports*/ micromocktestmutex.cpp000066400000000000000000000033501362133436400405420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "micromocktestmutex.h" #ifdef WIN32 #include "windows.h" HANDLE MicroMockCreateMutex(void) { return CreateMutexW(NULL, FALSE, NULL); } HANDLE MicroMockCreateGlobalSemaphore(const char* name, unsigned int highWaterCount) { // we need to convert name to unicode to pass it to the OS APIs wchar_t namew[_MAX_PATH + 1]; HANDLE temp; if (MultiByteToWideChar(CP_UTF8, 0, name, -1, namew, _MAX_PATH + 1) == 0) { temp = NULL; } else { temp = CreateSemaphoreW(NULL, highWaterCount, highWaterCount, namew); } return temp; } int MicroMockAcquireMutex(HANDLE Mutex) { int temp = (WaitForSingleObject((Mutex), INFINITE) == WAIT_OBJECT_0); return temp; } int MicroMockAcquireGlobalSemaphore(HANDLE semaphore) { int temp = (WaitForSingleObject(semaphore, INFINITE) == WAIT_OBJECT_0); return temp; } int MicroMockReleaseGlobalSemaphore(HANDLE semaphore) { LONG prev; (void)ReleaseSemaphore(semaphore, 1, &prev); return prev; } void MicroMockDestroyGlobalSemaphore(HANDLE semaphore) { (void)CloseHandle(semaphore); } void MicroMockDestroyMutex(HANDLE Mutex) { (void)CloseHandle(Mutex); } int MicroMockReleaseMutex(HANDLE Mutex) { return ReleaseMutex(Mutex); } #else typedef void* MICROMOCK_MUTEX_HANDLE; #define MicroMockCreateMutex() ((MICROMOCK_MUTEX_HANDLE)1) #define MicroMockCreateGlobalMutex(x) ((MICROMOCK_GLOBAL_MUTEX_HANDLE)2) #define MicroMockDestroyMutex(Mutex) #define MicroMockAcquireMutex(Mutex) (1) #define MicroMockReleaseMutex(Mutex) (1) #endif mockcallrecorder.cpp000066400000000000000000000147131362133436400401140ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "mockcallrecorder.h" #include "mockvaluebase.h" #include "micromocktestrunnerhooks.h" #include "mockcallcomparer.h" #include "micromockexception.h" CMockCallRecorder::CMockCallRecorder(AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison, CMockCallComparer* mockCallComparer) : m_PerformAutomaticCallComparison(performAutomaticCallComparison), m_MockCallComparer(mockCallComparer) { MicroMockInitializeCriticalSection(&m_MockCallRecorderCS); } CMockCallRecorder::~CMockCallRecorder(void) { if (m_PerformAutomaticCallComparison) { AssertActualAndExpectedCalls(); } ResetAllCalls(); MicroMockDeleteCriticalSection(&m_MockCallRecorderCS); } void CMockCallRecorder::AssertActualAndExpectedCalls(void) { #if defined CPP_UNITTEST || defined USE_CTEST if ((GetMissingCalls().length()>0) || (GetUnexpectedCalls().length()>0)) { std::tstring result = std::tstring(_T("Expected: ")) + GetMissingCalls() + std::tstring(_T(" Actual: ")) + GetUnexpectedCalls(); MOCK_FAIL(result.c_str()); } #else /*so it is TAEF*/ WEX::Common::String missingCalls(GetMissingCalls().c_str()); WEX::Common::String unexpectedCalls(GetUnexpectedCalls().c_str()); MOCK_ASSERT(missingCalls, unexpectedCalls, _T("Missing calls do not match expected calls")); #endif m_PerformAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_OFF; } void CMockCallRecorder::RecordExpectedCall(CMockMethodCallBase* mockMethodCall) { Lock(); m_ExpectedCalls.push_back(mockMethodCall); Unlock(); } CMockValueBase* CMockCallRecorder::RecordActualCall(CMockMethodCallBase* mockMethodCall, bool* failed) { CMockValueBase* result = NULL; MicroMockEnterCriticalSection(&m_MockCallRecorderCS); m_ActualCalls.push_back(mockMethodCall); result = MatchActualCall(mockMethodCall, failed); MicroMockLeaveCriticalSection(&m_MockCallRecorderCS); return result; } CMockValueBase* CMockCallRecorder::MatchActualCall(CMockMethodCallBase* mockMethodCall, bool* failed) { CMockValueBase* result = NULL; MicroMockEnterCriticalSection(&m_MockCallRecorderCS); if (mockMethodCall->HasMatch()) { mockMethodCall->m_MatchedCall->RollbackMatch(); mockMethodCall->RollbackMatch(); } CMockMethodCallBase* matchedCall = NULL; if (NULL != m_MockCallComparer) { matchedCall = m_MockCallComparer->MatchCall(m_ExpectedCalls, mockMethodCall); } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INTERNAL_ERROR, _T("Invalid Mock Call Comparer"))); } if (NULL != matchedCall) { mockMethodCall->CopyOutArgumentBuffers(matchedCall); CMockValueBase* failValue = matchedCall->GetFailReturnValue(); if (failValue != NULL) { result = failValue; *failed = true; } else { result = matchedCall->GetReturnValue(); *failed = false; } } else { *failed = false; } MicroMockLeaveCriticalSection(&m_MockCallRecorderCS); return result; } std::tstring CMockCallRecorder::CompareActualAndExpectedCalls() { return GetMissingCalls(_T("Expected:")) + GetUnexpectedCalls(_T("Actual:")); } std::tstring CMockCallRecorder::GetUnexpectedCalls(std::tstring unexpectedCallPrefix) { std::tostringstream result; if (NULL != m_MockCallComparer) { for (size_t i = 0; i < m_ActualCalls.size(); i++) { if (m_MockCallComparer->IsUnexpectedCall(m_ActualCalls[i])) { result << _T("["); result << unexpectedCallPrefix; result << m_ActualCalls[i]->ToString(); result << _T("]"); } } } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INTERNAL_ERROR, _T("Invalid Mock Call Comparer"))); } m_PerformAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_OFF; return result.str(); } std::tstring CMockCallRecorder::GetMissingCalls(std::tstring missingCallPrefix) { std::tostringstream result; if (NULL != m_MockCallComparer) { for (size_t i = 0; i < m_ExpectedCalls.size(); i++) { if (m_MockCallComparer->IsMissingCall(m_ExpectedCalls[i])) { result << _T("["); result << missingCallPrefix; result << m_ExpectedCalls[i]->ToString(); result << _T("]"); if (m_ExpectedCalls[i]->m_ExpectedTimes - m_ExpectedCalls[i]->m_MatchedTimes > 1) { result << _T("(x"); result << m_ExpectedCalls[i]->m_ExpectedTimes - m_ExpectedCalls[i]->m_MatchedTimes; result << _T(")"); } } } } else { MOCK_THROW(CMicroMockException(MICROMOCK_EXCEPTION_INTERNAL_ERROR, _T("Invalid Mock Call Comparer"))); } m_PerformAutomaticCallComparison = AUTOMATIC_CALL_COMPARISON_OFF; return result.str(); } void CMockCallRecorder::ResetExpectedCalls() { MicroMockEnterCriticalSection(&m_MockCallRecorderCS); for (size_t i = 0; i < m_ExpectedCalls.size(); i++) { delete m_ExpectedCalls[i]; } for (size_t i = 0; i < m_ActualCalls.size(); i++) { m_ActualCalls[i]->m_MatchedCall = NULL; } m_ExpectedCalls.clear(); MicroMockLeaveCriticalSection(&m_MockCallRecorderCS); } void CMockCallRecorder::ResetActualCalls() { MicroMockEnterCriticalSection(&m_MockCallRecorderCS); for (size_t i = 0; i < m_ActualCalls.size(); i++) { delete m_ActualCalls[i]; } for (size_t i = 0; i < m_ExpectedCalls.size(); i++) { m_ExpectedCalls[i]->m_MatchedCall = NULL; } m_ActualCalls.clear(); MicroMockLeaveCriticalSection(&m_MockCallRecorderCS); } void CMockCallRecorder::ResetAllCalls() { ResetActualCalls(); ResetExpectedCalls(); } void CMockCallRecorder::SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON performAutomaticCallComparison) { m_PerformAutomaticCallComparison = performAutomaticCallComparison; } void CMockCallRecorder::Lock() { MicroMockEnterCriticalSection(&m_MockCallRecorderCS); } void CMockCallRecorder::Unlock() { MicroMockLeaveCriticalSection(&m_MockCallRecorderCS); } mockmethodcallbase.cpp000066400000000000000000000055021362133436400404160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "mockmethodcallbase.h" CMockMethodCallBase::CMockMethodCallBase() { Init(_T("")); } CMockMethodCallBase::~CMockMethodCallBase() { if (NULL != m_ReturnValue) { delete m_ReturnValue; } for (size_t i = 0; i < m_MockCallArguments.size(); i++) { delete m_MockCallArguments[i]; } if (NULL != m_FailReturnValue) { delete m_FailReturnValue; } } CMockMethodCallBase::CMockMethodCallBase(std::tstring methodName, size_t argCount, CMockCallArgumentBase** arguments) { Init(methodName); for (unsigned char i = 0; i < argCount; i++) { m_MockCallArguments.push_back(arguments[i]); } } void CMockMethodCallBase::Init(std::tstring methodName) { m_ReturnValue = NULL; m_MethodName = methodName; m_MatchedCall = NULL; m_OnlySpecifiesActions = false; m_IgnoreAllCalls = false; m_ExpectedTimes = 1; m_MatchedTimes = 0; m_AlwaysReport = false; m_ExactExpectedTimes = false; m_FailReturnValue = NULL; } std::tstring CMockMethodCallBase::GetArgumentsString() { std::tstring result; for (size_t i = 0; i < m_MockCallArguments.size(); i++) { if (result.length() > 0) { result += _T(","); } result += m_MockCallArguments[i]->ToString(); } return result; } std::tstring CMockMethodCallBase::ToString() { std::tstring result = m_MethodName; result += _T("("); result += GetArgumentsString(); result += _T(")"); return result; } void CMockMethodCallBase::RollbackMatch() { m_MatchedCall = NULL; } void CMockMethodCallBase::AddExtraCallArgument(CMockCallArgumentBase* callArgument) { m_MockCallArguments.push_back(callArgument); } bool CMockMethodCallBase::operator==(const CMockMethodCallBase& right) { bool result = (m_MethodName == right.m_MethodName); result = result && (m_MockCallArguments.size() == right.m_MockCallArguments.size()); if (result) { for (size_t i = 0; i < m_MockCallArguments.size(); i++) { if (!(m_MockCallArguments[i]->EqualTo(right.m_MockCallArguments[i]))) { result = false; } } } return result; } void CMockMethodCallBase::CopyOutArgumentBuffers(CMockMethodCallBase* sourceMockMethodCall) { if (m_MockCallArguments.size() == sourceMockMethodCall->m_MockCallArguments.size()) { for (size_t i = 0; i < m_MockCallArguments.size(); i++) { // TODO: This should also be handled when comparing calls ... (void)m_MockCallArguments[i]->CopyOutArgumentDataFrom(sourceMockMethodCall->m_MockCallArguments[i]); } } } mockvaluebase.cpp000066400000000000000000000003561362133436400374200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "mockvaluebase.h" CMockValueBase::~CMockValueBase() { } timediscretemicromock.cpp000066400000000000000000000006541362133436400411650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*defines*/ #include "stdafx.h" #include "timediscretemicromock.h" /*types*/ /*static variables*/ /*static functions*/ /*variable exports*/ std::vector stims_base::allPlayers; /*debug variables*/ UINT32 theTick; UINT32 totalTicksPlayed; /*function exports*/ tools/000077500000000000000000000000001362133436400344405ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromockmicromockgenerator/000077500000000000000000000000001362133436400403325ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/toolsmicromockgenerator.cpp000066400000000000000000000376601362133436400447440ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/tools/micromockgenerator// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "string" #include "sstream" #include "fstream" namespace std { typedef std::basic_string tstring; typedef std::basic_ostringstream tostringstream; } using namespace std; const TCHAR* fileHeader = _T("// Copyright (c) Microsoft. All rights reserved.\n") _T("// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n") _T("\n") _T("// THIS FILE IS AUTOGENERATED!\n") _T("// DO NOT EDIT!\n") _T("//\n") _T("\n") _T("#ifndef MICROMOCKCALLMACROS_H\n") _T("#define MICROMOCKCALLMACROS_H\n") _T("\n") _T("#pragma once\n") _T("\n"); void GenerateMockCallMacros(_In_ size_t supportedArgCount) { FILE* outFile = NULL; _tfopen_s(&outFile, _T("micromockcallmacros.h"), _T("wt")); if (NULL != outFile) { _ftprintf(outFile, fileHeader); for (UINT currentArgCount = 0; currentArgCount <= supportedArgCount; currentArgCount++) { tostringstream argsWithValuesSignatureStream; tostringstream argAndValuesMacroStream; tstring argsWithValuesSignature; tstring argAndValuesMacroString; for (UINT i = 1; i <= currentArgCount; i++) { if (i > 1) { argsWithValuesSignatureStream << _T(", "); } argsWithValuesSignatureStream << _T("arg") << i << _T("Type arg") << i << _T("Value"); argAndValuesMacroStream << _T(", arg") << i << _T("Type, arg") << i << _T("Value"); } argsWithValuesSignature = argsWithValuesSignatureStream.str(); argAndValuesMacroString = argAndValuesMacroStream.str(); _ftprintf(outFile, _T("#define MOCK_ANY_METHOD_%u(static_, STATIC_, prefix, resultType, name%s) \\\n"), currentArgCount, argAndValuesMacroString.c_str()); _ftprintf(outFile, _T("static_ CMockMethodCall& prefix Expected_##name(%s) \\\n"), argsWithValuesSignature.c_str()); _ftprintf(outFile, _T("{ \\\n")); if (currentArgCount > 0) { _ftprintf(outFile, _T(" CMockCallArgumentBase* args[%u]; \\\n"), currentArgCount); } for (UINT i = 1; i <= currentArgCount; i++) { _ftprintf(outFile, _T(" args[%u] = new CMockCallArgument(arg%uValue); \\\n"), i - 1, i, i); } _ftprintf(outFile, _T(" CMockMethodCall* mockMethodCall = \\\n")); _ftprintf(outFile, _T(" new CMockMethodCall(_T(#name), %u, %s); \\\n"), currentArgCount, (currentArgCount > 0) ? _T("args") : _T("NULL")); _ftprintf(outFile, _T(" RECORD_EXPECTED_##STATIC_##MOCK_CALL(mockMethodCall); \\\n")); _ftprintf(outFile, _T(" return *mockMethodCall; \\\n")); _ftprintf(outFile, _T("} \\\n")); _ftprintf(outFile, _T("static_ resultType prefix name(%s) \\\n"), argsWithValuesSignature.c_str()); _ftprintf(outFile, _T("{ \\\n")); if (currentArgCount > 0) { _ftprintf(outFile, _T(" CMockCallArgumentBase* args[%u]; \\\n"), currentArgCount); } for (UINT i = 1; i <= currentArgCount; i++) { _ftprintf(outFile, _T(" args[%u] = new CMockCallArgument(arg%uValue); \\\n"), i - 1, i, i); } _ftprintf(outFile, _T(" CMockMethodCallBase* mockMethodCall = \\\n")); _ftprintf(outFile, _T(" new CMockMethodCall(_T(#name), %u, %s); \\\n"), currentArgCount, (currentArgCount > 0) ? _T("args") : _T("NULL")); _ftprintf(outFile, _T(" bool failed=false; \\\n")); _ftprintf(outFile, _T(" CMockValueBase* result = RECORD_ACTUAL_##STATIC_##MOCK_CALL(mockMethodCall, &failed); \\\n")); _ftprintf(outFile, _T(" if((result!=NULL)&&(failed)) return dynamic_cast*>(result)->GetValue();\n")); _ftprintf(outFile, _T("\n")); // regular member function mock _ftprintf(outFile, _T("#define MOCK_METHOD_%u(prefix, resultType, name%s) \\\n"), currentArgCount, argAndValuesMacroString.c_str()); _ftprintf(outFile, _T("MOCK_ANY_METHOD_%u(,,prefix, resultType, name%s) \n"), currentArgCount, argAndValuesMacroString.c_str()); _ftprintf(outFile, _T("\n")); // static function mock _ftprintf(outFile, _T("#define MOCK_STATIC_METHOD_%u(prefix, resultType, name%s) \\\n"), currentArgCount, argAndValuesMacroString.c_str()); _ftprintf(outFile, _T("MOCK_ANY_METHOD_%u(static, STATIC_, prefix, resultType, name%s) \n"), currentArgCount, argAndValuesMacroString.c_str()); _ftprintf(outFile, _T("\n")); // global mock declaration _ftprintf(outFile, _T("#define DECLARE_GLOBAL_MOCK_METHOD_%u(mockClass, prefix, resultType, name%s) \\\n"), currentArgCount, argAndValuesMacroString.c_str()); _ftprintf(outFile, _T("prefix resultType name(%s) \\\n"), argsWithValuesSignature.c_str()); _ftprintf(outFile, _T("{ \\\n")); _ftprintf(outFile, _T(" return mockClass::name(")); for (UINT i = 1; i <= currentArgCount; i++) { if (i > 1) { _ftprintf(outFile, _T(",")); } _ftprintf(outFile, _T("arg%uValue"), i); } _ftprintf(outFile, _T(");\\\n")); _ftprintf(outFile, _T("} \\\n")); _ftprintf(outFile, _T("\n")); } _ftprintf(outFile, _T("#endif // MICROMOCKCALLMACROS_H\n")); _ftprintf(outFile, _T("\n")); fclose(outFile); } } const char* CfileHeader = "// Copyright (c) Microsoft. All rights reserved.\n" "// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n" "\n" "\n" "// THIS FILE IS AUTOGENERATED!\n" "// DO NOT EDIT!\n" "\n" "\n" "#ifndef TIMEDISCRETEMICROMOCKCALLMACROS_H\n" "#define TIMEDISCRETEMICROMOCKCALLMACROS_H\n" "\n" "#pragma once\n" "\n"; #define tab (char)(9) void GenerateTimeDiscreteMockCallMacros(_In_ size_t supportedArgCount) { unsigned int i,j; /*intended as ANSI, non TCHAR, since it produces C++ source code*/ ofstream fout("timediscretemicromockcallmacros.h"); fout<AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\\"<AddExtraCallArgument(new CMockCallArgument(MOCK_TIMEPROVIDER(__FUNCTION__)));\\" << endl; fout << tab << "result = REMATCH_ACTUAL_STATIC_MOCK_CALL(mockMethodCall);\\" << endl; fout << endl; } fout<<"#define STIM_CALL_AT(var, time, ...) var.__VA_ARGS__.SetTime(time, var.getAndIncOrder(time))"<0) &&(j name;"<"; fout<<"class call"<0) && (j arg"< allCalls;"<()"<0)&&(j& SetTime(_In_ UINT32 time, _In_ UINT32 order)"<& operator()("; for(j=1;j<=i;j++) { fout<<"arg"<0)&&(j0)&&(j0) { fout<& setArraySize(_In_ UINT32 parameter, _In_ size_t nElements)"< #include <winver.h> #define VER_FILETYPE VFT_APP #define VER_FILESUBTYPE VFT2_UNKNOWN #define VER_FILEDESCRIPTION_STR "MicroMock Generator" #define VER_INTERNALNAME_STR "MicroMockGenerator.Exe" #define VER_ORIGINALFILENAME_STR "MicroMockGenerator.Exe" #include <common.ver> stdafx.cpp000066400000000000000000000002541362133436400423300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/tools/micromockgenerator// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" stdafx.h000066400000000000000000000006751362133436400420040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/tools/micromockgenerator// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include #ifdef _CRTDBG_MAP_ALLOC #include #endif #include "targetver.h" #include "stdio.h" #include "tchar.h" #include "string" #include "sstream" #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif // WIN32_LEAN_AND_MEAN #include "windows.h" targetver.h000066400000000000000000000007121362133436400425060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/tools/micromockgenerator// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once // Including SDKDDKVer.h defines the highest available Windows platform. // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. #include unittests/000077500000000000000000000000001362133436400353425ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromockCMakeLists.txt000066400000000000000000000004331362133436400401020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. #this is CMakeLists for micromock unittests folder, it is empty cmake_minimum_required(VERSION 2.8.11) add_subdirectory(micromocktest)micromocktest/000077500000000000000000000000001362133436400402255ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittestsCMakeLists.txt000066400000000000000000000014711362133436400427700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. #this is CMakeLists for micromock unittests cmake_minimum_required(VERSION 2.8.11) set(theseTestsName micromock_unittests) set(${theseTestsName}_cpp_files stdafx.cpp cmockvalueunittests.cpp micromockcallcomparisonunittests.cpp micromocktest.cpp micromockvalidateargumentbufferunittests.cpp nullargsstringificationunittests.cpp #timediscretemicromocktestvoidvoid.cpp #timediscretemicromocktest_stim.cpp #timediscretemicromockwithreturnandparameters.cpp ) set(${theseTestsName}_c_files #hypothetic_module.c #micromocktest_with_ctest.c ) set(${theseTestsName}_h_files #hypothetic_module.h hypothetic_module_interfaces.h stdafx.h ) build_test_artifacts(${theseTestsName} ON) cmockvalueunittests.cpp000066400000000000000000000116161362133436400450520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" using namespace std; static MICROMOCK_MUTEX_HANDLE g_testByTest; static MICROMOCK_GLOBAL_SEMAPHORE_HANDLE g_dllByDll; BEGIN_TEST_SUITE(CMockValue_tests) typedef int arrayOf3Int[3]; typedef int arrayOf4Int[4]; TEST_SUITE_INITIALIZE(TestClassInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = MicroMockCreateMutex(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(TestClassCleanup) { MicroMockDestroyMutex(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockAcquireMutex(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockReleaseMutex(g_testByTest)) { ASSERT_FAIL("failure in test framework at ReleaseMutex"); } } /*test a normal array*/ TEST_FUNCTION(CMockValue_TN_toString_1) { arrayOf3Int a = { 1, 2, 3 }; CMockValue b(a); ASSERT_ARE_EQUAL(char_ptr, "{1,2,3}", b.ToString().c_str()); } /*test a NULL*/ TEST_FUNCTION(CMockValue_TN_toString_2) { CMockValue b(NULL); ASSERT_ARE_EQUAL(char_ptr, "NULL", b.ToString().c_str()); } /*test EqualTo from the same source*/ TEST_FUNCTION(CMockValue_TN_EqualTo_1) { arrayOf3Int source = { 1, 2, 3 }; CMockValue a(source); CMockValue b(source); ASSERT_ARE_EQUAL(int, true, b.EqualTo(&a)); ASSERT_ARE_EQUAL(int, true, a.EqualTo(&b)); } /*test EqualTo from different source*/ TEST_FUNCTION(CMockValue_TN_EqualTo_2) { arrayOf3Int source1 = { 1, 2, 3 }; arrayOf3Int source2 = { 1, 2, 3 }; CMockValue a(source1); CMockValue b(source2); ASSERT_ARE_EQUAL(int, true, b.EqualTo(&a)); ASSERT_ARE_EQUAL(int, true, a.EqualTo(&b)); } /*test EqualTo from different source sizes*/ TEST_FUNCTION(CMockValue_TN_EqualTo_3) { arrayOf4Int source1 = { 1, 2, 3, 4}; arrayOf3Int source2 = { 1, 2, 3 }; CMockValue a3(source1); CMockValue b4(source2); ASSERT_ARE_EQUAL(int, false, b4.EqualTo(&a3)); ASSERT_ARE_EQUAL(int, false, a3.EqualTo(&b4)); } /*test EqualTo from NULL and NULL*/ TEST_FUNCTION(CMockValue_TN_EqualTo_4) { CMockValue a(NULL); CMockValue b(NULL); ASSERT_ARE_EQUAL(int, true, b.EqualTo(&a)); ASSERT_ARE_EQUAL(int, true, a.EqualTo(&b)); } /*test EqualTo from NULL and non-NULL*/ TEST_FUNCTION(CMockValue_TN_EqualTo_5) { arrayOf3Int source = { 1, 2, 3 }; CMockValue a(source); CMockValue b(NULL); ASSERT_ARE_EQUAL(int, false, b.EqualTo(&a)); ASSERT_ARE_EQUAL(int, false, a.EqualTo(&b)); } TEST_FUNCTION(CMockValue_TN_setValue_from_NULL_to_NULL) { CMockValue a(NULL); a.SetValue(NULL); ASSERT_ARE_EQUAL(char_ptr, "NULL", a.ToString().c_str()); } TEST_FUNCTION(CMockValue_TN_setValue_from_NULL_to_array) { arrayOf3Int source1 = { 1, 2, 3 }; CMockValue a(NULL); a.SetValue(source1); ASSERT_ARE_EQUAL(char_ptr, "{1,2,3}", a.ToString().c_str()); } TEST_FUNCTION(CMockValue_TN_setValue_from_array_to_NULL) { arrayOf3Int source1 = { 1, 2, 3 }; CMockValue a(source1); a.SetValue(NULL); ASSERT_ARE_EQUAL(char_ptr, "NULL", a.ToString().c_str()); } TEST_FUNCTION(CMockValue_TN_setValue_from_array_to_array) { arrayOf3Int source1 = { 1, 2, 3 }; arrayOf3Int source2 = { 4, 5, 6 }; CMockValue a(source1); a.SetValue(source2); ASSERT_ARE_EQUAL(char_ptr, "{4,5,6}", a.ToString().c_str()); } TEST_FUNCTION(CMockValue_TN_getValue_from_NULL_returns_NULL) { CMockValue a(NULL); ASSERT_ARE_EQUAL(int, 1, ((void*)NULL==(void*)a.GetValue())?1:0); } TEST_FUNCTION(CMockValue_TN_getValue_from_something_returns_equal_array) { arrayOf3Int source1 = { 1, 2, 3 }; CMockValue a(source1); const int* v = a.GetValue(); for (size_t i = 0; i < 3; i++) { ASSERT_ARE_EQUAL(int, v[i], source1[i]); } } TEST_FUNCTION(CMockValue_TN_setValue_from_array_to_array_does_not_destroy_original_array) { arrayOf3Int source1 = { 1, 2, 3 }; arrayOf3Int source2 = { 4, 5, 6 }; CMockValue a(source1); a.SetValue(source2); ASSERT_ARE_EQUAL(char_ptr, "{4,5,6}", a.ToString().c_str()); ASSERT_ARE_EQUAL(int, 1, source1[0]); ASSERT_ARE_EQUAL(int, 2, source1[1]); ASSERT_ARE_EQUAL(int, 3, source1[2]); ASSERT_ARE_EQUAL(int, 4, source2[0]); ASSERT_ARE_EQUAL(int, 5, source2[1]); ASSERT_ARE_EQUAL(int, 6, source2[2]); } END_TEST_SUITE(CMockValue_tests)hypothetic_module.c000066400000000000000000000070561362133436400441260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*defines*/ #include "stdafx_c.h" #include "hypothetic_module.h" #include "hypothetic_module_interfaces.h" #define SHADOW_BUFFER_SIZE 100 /*types*/ typedef struct data_tag { int wasZeroCalled; int wasizeroCalled; int wasoneCalled; int ioneiShadow; int wastwoCalled; char twosShadow[SHADOW_BUFFER_SIZE]; int twoiShadow; int wasthreeCalled; char threecShadow; char threesShadow[SHADOW_BUFFER_SIZE]; int threeiShadow; int wasfourCalled; unsigned short int foursiShadow; char fourcShadow; char foursShadow[SHADOW_BUFFER_SIZE]; int fouriShadow; int wasfiveCalled; pVoidFunction fivepVoidShadow; unsigned short int fivesiShadow; char fivecShadow; char fivesShadow[SHADOW_BUFFER_SIZE]; int fiveiShadow; int wassixCalled; char sixc1Shadow ,sixc2Shadow ,sixc3Shadow ,sixc4Shadow ,sixc5Shadow ,sixc6Shadow; }data; /*static variables*/ static data d; /*static functions*/ /*variable exports*/ /*function exports*/ void zero(void) { d.wasZeroCalled=1; } int izero(void) { d.wasizeroCalled=1; return 0; } int one(_In_ int i) { d.wasoneCalled=1; d.ioneiShadow=i; return 0; } int two(_In_z_ pChar s, _In_ int i) { d.wastwoCalled=1; strcpy_s(d.twosShadow, SHADOW_BUFFER_SIZE,s); //d.twosShadow[0]=s; d.twoiShadow = i; return 0; } int three(_In_ char c, _In_z_ pChar s, _In_ int i) { d.wasthreeCalled=1; d.threecShadow=c; strcpy_s(d.threesShadow, SHADOW_BUFFER_SIZE, s); //d.threesShadow[0]=s; d.threeiShadow = i; return 0; } int four(_In_ unsigned short int si, _In_ char c, _In_z_ pChar s, _In_ int i) { d.wasfourCalled=1; d.foursiShadow = si; d.fourcShadow=c; strcpy_s(d.foursShadow, SHADOW_BUFFER_SIZE, s); //d.foursShadow[0]=s; d.fouriShadow = i; return 0; } int five(_In_opt_ pVoidFunction pVoid, _In_ unsigned short int si, _In_ char c, _In_z_ pChar s, _In_ int i) { d.wasfiveCalled=1; d.fivepVoidShadow = pVoid; d.fivesiShadow = si; d.fivecShadow=c; strcpy_s(d.fivesShadow, SHADOW_BUFFER_SIZE, s); //d.fivesShadow[0]=s; d.fiveiShadow = i; return 0; } int six(_In_ char c1, _In_ char c2, _In_ char c3, _In_ char c4, _In_ char c5, _In_ char c6) { d.wassixCalled=1; d.sixc1Shadow=c1; d.sixc2Shadow=c2; d.sixc3Shadow=c3; d.sixc4Shadow=c4; d.sixc5Shadow=c5; d.sixc6Shadow=c6; return 0; } void theTask(void) { if(d.wasZeroCalled) { d.wasZeroCalled=0; whenzero(); } if(d.wasizeroCalled) { d.wasizeroCalled=0; whenizero(); } if(d.wasoneCalled) { d.wasoneCalled=0; whenone(d.ioneiShadow+1); } if(d.wastwoCalled) { d.wastwoCalled=0; whentwo(d.twosShadow, d.twoiShadow+2); } if(d.wasthreeCalled) { d.wasthreeCalled=0; whenthree(d.threecShadow+3, d.threesShadow, d.threeiShadow+3); } if(d.wasfourCalled) { d.wasfourCalled=0; whenfour(d.foursiShadow+4, d.fourcShadow+4, d.foursShadow, d.fouriShadow+4); } if(d.wasfiveCalled) { d.wasfiveCalled=0; whenfive(d.fivepVoidShadow, d.fivesiShadow+5, d.fivecShadow+5, d.fivesShadow, d.fiveiShadow+5); } if(d.wassixCalled) { d.wassixCalled=0; whensix(d.sixc1Shadow+6,d.sixc2Shadow+6,d.sixc3Shadow+6,d.sixc4Shadow+6,d.sixc5Shadow+6,d.sixc6Shadow+6); } } hypothetic_module.h000066400000000000000000000016551362133436400441320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*defines*/ #ifndef HYPOTHETIC_MODULE_H #define HYPOTHETIC_MODULE_H #pragma once #ifdef __cplusplus extern "C" { #endif /*types*/ /*variable exports*/ /*function exports*/ typedef void (*pVoidFunction)(void); typedef char *pChar; extern void zero(void); extern int izero(void); extern int one (_In_ int i); extern int two (_In_z_ pChar s, _In_ int i); extern int three(_In_ char c, _In_z_ pChar s, _In_ int i); extern int four (_In_ unsigned short int si, _In_ char c, _In_z_ pChar s, _In_ int i); extern int five (_In_opt_ pVoidFunction pVoid, _In_ unsigned short int si, _In_ char c, _In_z_ pChar s, _In_ int i); extern int six (_In_ char c1, _In_ char c2, _In_ char c3, _In_ char c4, _In_ char c5, _In_ char c6); extern void theTask(void); #ifdef __cplusplus } #endif #endif hypothetic_module_interfaces.h000066400000000000000000000017031362133436400463270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*defines*/ #ifndef HYPOTHETIC_MODULE_INTERFACE_H #define HYPOTHETIC_MODULE_INTERFACE_H #pragma once #ifdef __cplusplus extern "C" { #endif /*types*/ typedef void(*pVoidFunction)(void); typedef char* pChar; /*variable exports*/ /*function exports*/ extern void whenzero(void); extern int whenizero(void); extern int whenone (_In_ int i); extern int whentwo (_In_z_ pChar s, _In_ int i); extern int whenthree(_In_ char c, _In_z_ pChar s, _In_ int i); extern int whenfour (_In_ unsigned short int si, _In_ char c, _In_z_ pChar s, _In_ int i); extern int whenfive (_In_opt_ pVoidFunction pVoid, _In_ unsigned short int si, _In_ char c, _In_z_ pChar s, _In_ int i); extern int whensix (_In_ char c1, _In_ char c2, _In_ char c3, _In_ char c4, _In_ char c5, _In_ char c6); #ifdef __cplusplus } #endif #endif main.c000066400000000000000000000013011362133436400413100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(MicroMockCallComparisonUnitTests, failedTestCount); RUN_TEST_SUITE(CMockValue_tests ,failedTestCount); RUN_TEST_SUITE(MicroMockCallComparisonUnitTests ,failedTestCount); RUN_TEST_SUITE(MicroMockTest ,failedTestCount); RUN_TEST_SUITE(MicroMockValidateArgumentBufferTests,failedTestCount); RUN_TEST_SUITE(NULLArgsStringificationTests ,failedTestCount); return failedTestCount; } micromockcallcomparisonunittests.cpp000066400000000000000000000155111362133436400476310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" using namespace std; TYPED_MOCK_CLASS(CTestAllArgsMock, CMock) { public: MOCK_METHOD_0(, UINT8, TestFunctionWithNoArgs); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_1(, UINT8, TestFunctionWith1Arg, UINT8, arg1); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_2(, UINT8, TestFunctionWith2Args, UINT8, arg1, UINT8, arg2); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_3(, UINT8, TestFunctionWith3Args, UINT8, arg1, UINT8, arg2, UINT8, arg3); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_4(, UINT8, TestFunctionWith4Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_5(, UINT8, TestFunctionWith5Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4, UINT8, arg5); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_6(, UINT8, TestFunctionWith6Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4, UINT8, arg5, UINT8, arg6); MOCK_METHOD_END(UINT8, 0) }; static MICROMOCK_MUTEX_HANDLE g_testByTest; static MICROMOCK_GLOBAL_SEMAPHORE_HANDLE g_dllByDll; BEGIN_TEST_SUITE(MicroMockCallComparisonUnitTests) // GetUnexpectedCalls TEST_SUITE_INITIALIZE(TestClassInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = MicroMockCreateMutex(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(TestClassCleanup) { MicroMockDestroyMutex(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockAcquireMutex(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockReleaseMutex(g_testByTest)) { ASSERT_FAIL("failure in test framework at ReleaseMutex"); } } TEST_FUNCTION(MicroMock_GetUnexpectedCalls_When_No_Actual_Call_Is_Made_Returns_An_Empty_String) { // arrange CTestAllArgsMock testMock; // act // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("")).c_str(), testMock.GetUnexpectedCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetUnexpectedCalls_Returns_Unexpected_Calls) { // arrange CTestAllArgsMock testMock; // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("[TestFunctionWithNoArgs()]")).c_str(), testMock.GetUnexpectedCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetUnexpectedCalls_When_An_Expected_Call_And_An_Actual_Call_Match_Returns_Empty_String) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("")).c_str(), testMock.GetUnexpectedCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetUnexpectedCalls_When_Only_The_Expected_Call_Happens_Returns_Empty_String) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("")).c_str(), testMock.GetUnexpectedCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetUnexpectedCalls_When_More_Than_One_Unexpected_Calls_Are_Made_Reports_All_Calls) { // arrange CTestAllArgsMock testMock; // act testMock.TestFunctionWithNoArgs(); testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("[TestFunctionWithNoArgs()][TestFunctionWithNoArgs()]")).c_str(), testMock.GetUnexpectedCalls().c_str(), _T("Incorrect actual calls")); } // GetMissingCalls TEST_FUNCTION(MicroMock_GetMissingCalls_When_No_Expected_Call_Is_Programmed_Returns_An_Empty_String) { // arrange CTestAllArgsMock testMock; // act // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("")).c_str(), testMock.GetMissingCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetMissingCalls_Returns_MissingCalls) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("[TestFunctionWithNoArgs()]")).c_str(), testMock.GetMissingCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetMissingCalls_When_An_Expected_Call_And_An_Actual_Call_Match_Returns_Empty_String) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("")).c_str(), testMock.GetMissingCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetMissingCalls_When_Only_The_Actual_Call_Happens_Returns_Empty_String) { // arrange CTestAllArgsMock testMock; // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("")).c_str(), testMock.GetMissingCalls().c_str(), _T("Incorrect actual calls")); } TEST_FUNCTION(MicroMock_GetMissingCalls_When_More_Than_One_Missing_Calls_Exists_Reports_All_Missing_Calls) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("[TestFunctionWithNoArgs()][TestFunctionWithNoArgs()]")).c_str(), testMock.GetMissingCalls().c_str(), _T("Incorrect actual calls")); } END_TEST_SUITE(MicroMockCallComparisonUnitTests); micromocktest.cpp000066400000000000000000004031621362133436400436220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "azure_c_shared_utility/macro_utils.h" using namespace std; DEFINE_MICROMOCK_ENUM_TO_STRING(MICROMOCK_EXCEPTION, MICROMOCK_EXCEPTION_VALUES); #define TEST_ORIGINAL_FUNCTION_RESULT (42) #define TEST_MOCK_FUNCTION_RESULT (43) void TestFunction() { } void StaticTestFunction1() { } void StaticTestFunction2() { } UINT8 TestFunctionThatReturns42() { return TEST_ORIGINAL_FUNCTION_RESULT; } void TestFunctionWithByteArg(UINT8 argument) { UNREFERENCED_PARAMETER(argument); } typedef struct TEST_STRUCTURE_TAG { UINT8 m_Value1; UINT32 m_Value2; } TEST_STRUCTURE; std::tostringstream& operator<< (std::tostringstream &out, TEST_STRUCTURE const &t) { out << _T("{"); out << (unsigned int)t.m_Value1; out << _T(","); out << (unsigned int)t.m_Value2; out << _T("}"); return out; } static int UINT8_Compare(UINT8 a, UINT8 b) { return (a == b) ? 0 : 1; } static void UINT8_ToString(char* string, size_t bufferSize, UINT8 val) { (void)snprintf(string, bufferSize, "%d", (int)val); } /*CTest spec says: tstring_Compare*/ static int tstring_Compare(const std::tstring& a, const std::tstring&b) { return strcmp(a.c_str(), b.c_str()); } static void tstring_ToString(char* string, size_t bufferSize, std::tstring val) { size_t val_size = strlen(val.c_str()); strncpy(string, val.c_str(), (val_size >= bufferSize) ? (bufferSize - 1) : val_size); } static int bool_Compare(bool a, bool b) { return (a == b) ? 0 : 1; } static void bool_ToString(char* string, size_t bufferSize, bool val) { (void)snprintf(string, bufferSize, "%s", val?"true":"false"); } bool operator==(const TEST_STRUCTURE& lhs, const TEST_STRUCTURE& rhs) { return ((lhs.m_Value1 == rhs.m_Value1) && (lhs.m_Value2 == rhs.m_Value2)); } TYPED_MOCK_CLASS(CTestNoMethodsMock, CMock) { }; TYPED_MOCK_CLASS(CTestNoArgsNoReturnMethodMock, CMock) { public: MOCK_METHOD_0(, void, TestFunction) MOCK_VOID_METHOD_END() }; #ifdef _MSC_VER TYPED_MOCK_CLASS(CTestStaticNoArgsNoReturnMethodMock, CThreadSafeGlobalMock) { public: MOCK_STATIC_METHOD_0(, void, StaticTestFunction); MOCK_VOID_METHOD_END() }; #endif #ifdef _MSC_VER TYPED_MOCK_CLASS(CTypedMock, CThreadSafeGlobalMock) { public: MOCK_STATIC_METHOD_1(, void, StaticTestFunctionWithByteArg, UINT8, argument1) MOCK_VOID_METHOD_END() }; #endif #ifdef _MSC_VER TYPED_MOCK_CLASS(CTestCustomMock, CThreadSafeGlobalMock) { public: MOCK_STATIC_METHOD_1(, UINT8, StaticTestFunction, UINT8, argument1) if (40 == argument1) { return 42; } MOCK_METHOD_END(UINT8, 0) }; #endif TYPED_MOCK_CLASS(CTestAllArgsMock, CMock) { public: MOCK_METHOD_0(, UINT8, TestFunctionWithNoArgs); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_1(, UINT8, TestFunctionWith1Arg, UINT8, arg1); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_2(, UINT8, TestFunctionWith2Args, UINT8, arg1, UINT8, arg2); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_3(, UINT8, TestFunctionWith3Args, UINT8, arg1, UINT8, arg2, UINT8, arg3); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_4(, UINT8, TestFunctionWith4Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_5(, UINT8, TestFunctionWith5Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4, UINT8, arg5); MOCK_METHOD_END(UINT8, 0) MOCK_METHOD_6(, UINT8, TestFunctionWith6Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4, UINT8, arg5, UINT8, arg6); MOCK_METHOD_END(UINT8, 0) }; static int gInt = 0; TYPED_MOCK_CLASS(CTestStaticAllArgsMock, CGlobalMock) { public: MOCK_STATIC_METHOD_0(, UINT8, StaticTestFunctionWithNoArgs); MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_1(, UINT8, StaticTestFunctionWith1Arg, UINT8, arg1); MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_1(, UINT8, StaticTestFunctionWith1Arg_Clone, UINT8, arg1); gInt++; MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_2(, UINT8, StaticTestFunctionWith2Args, UINT8, arg1, UINT8, arg2); MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_3(, UINT8, StaticTestFunctionWith3Args, UINT8, arg1, UINT8, arg2, UINT8, arg3); MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_4(, UINT8, StaticTestFunctionWith4Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4); MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_5(, UINT8, StaticTestFunctionWith5Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4, UINT8, arg5); MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_6(, UINT8, StaticTestFunctionWith6Args, UINT8, arg1, UINT8, arg2, UINT8, arg3, UINT8, arg4, UINT8, arg5, UINT8, arg6); MOCK_METHOD_END(UINT8, 0) }; #ifdef _MSC_VER TYPED_MOCK_CLASS(CTestStaticVariousArgsMock, CThreadSafeGlobalMock) { public: MOCK_STATIC_METHOD_1(, UINT8, StaticTestFunctionWithStructArg, TEST_STRUCTURE, testStructure); MOCK_METHOD_END(UINT8, 0) MOCK_STATIC_METHOD_1(, UINT8, StaticTestFunctionWithUINT16Arg, UINT16, arg1); MOCK_METHOD_END(UINT8, 0) }; #endif TYPED_MOCK_CLASS(CTestArgBufferMock, CMock) { public: MOCK_METHOD_1(, void, TestFunction, UINT8*, bufferArg); MOCK_VOID_METHOD_END() }; #ifdef _MSC_VER TYPED_MOCK_CLASS(CCustomMockCodeNotExecuted, CThreadSafeGlobalMock) { public: MOCK_STATIC_METHOD_0(, UINT8, StaticTestFunction); static UINT8 counter; counter++; MOCK_METHOD_END(UINT8, counter) }; #endif TYPED_MOCK_CLASS(CSimpleTestMock, CMock) { public: MOCK_METHOD_1(, UINT8, TestFunction, UINT8, arg1); MOCK_METHOD_END(UINT8, 0) }; TYPED_MOCK_CLASS(CStaticTestMock, CGlobalMock) { public: MOCK_STATIC_METHOD_0(, void, StaticTestFunction); MOCK_VOID_METHOD_END() }; DECLARE_GLOBAL_MOCK_METHOD_0(CStaticTestMock, , void, StaticTestFunction); static MICROMOCK_MUTEX_HANDLE g_testByTest; static MICROMOCK_GLOBAL_SEMAPHORE_HANDLE g_dllByDll; BEGIN_TEST_SUITE(MicroMockTest) TEST_SUITE_INITIALIZE(TestClassInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = MicroMockCreateMutex(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(TestClassCleanup) { MicroMockDestroyMutex(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockAcquireMutex(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } gInt = 0; } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockReleaseMutex(g_testByTest)) { ASSERT_FAIL("failure in test framework at ReleaseMutex"); } } tstring BytesToString(UINT8* buffer, size_t bufferLength) { tostringstream strStream; strStream << std::uppercase << std::hex; strStream << "["; for (size_t index = 0; index < bufferLength; index++) { if (index > 0) { strStream << " "; } strStream << (unsigned int)buffer[index]; } strStream << "]"; return strStream.str(); } TEST_FUNCTION(MicroMock_Instantiating_A_Mock_With_No_Methods_Succeeds) { // arrange // act CTestNoMethodsMock testNoArgsNoReturnMock; // assert // no explicit assert, no exception expected } TEST_FUNCTION(MicroMock_Creating_A_Mock_Object_Succeeds) { // arrange // act CTestNoArgsNoReturnMethodMock testMemoryMock; // assert // no explicit assert, no exception expected } TEST_FUNCTION(MicroMock_Comparing_Expected_And_Actual_Calls_When_No_Expected_And_Actual_Calls_Are_Made_Returns_No_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock; testNoArgsNoReturnMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); // act tstring result = testNoArgsNoReturnMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("")).c_str(), result.c_str(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_Strict_Expected_Call_With_No_Actual_Calls_Indicates_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock; testNoArgsNoReturnMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock, TestFunction()); // act tstring result = testNoArgsNoReturnMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(char_ptr, tstring(_T("[Expected:TestFunction()]")).c_str(), result.c_str() , _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_Two_Strict_Expected_Calls_With_No_Actual_Calls_Indicates_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock; testNoArgsNoReturnMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock, TestFunction()); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock, TestFunction()); // act tstring result = testNoArgsNoReturnMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction()]") _T("[Expected:TestFunction()]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_Strict_Expected_Call_With_No_Actual_Calls_Checked_At_Mock_Level_Indicates_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock; testNoArgsNoReturnMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock, TestFunction()); // act tstring result = testNoArgsNoReturnMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction()]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_On_One_Of_Two_Mocks_When_No_Actual_Calls_Are_Made_Indicates_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock1; testNoArgsNoReturnMock1.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock2; testNoArgsNoReturnMock2.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock1, TestFunction()); // act tstring result = testNoArgsNoReturnMock1.CompareActualAndExpectedCalls() + testNoArgsNoReturnMock2.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction()]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_Strict_Expected_Call_On_One_Of_Two_Mocks_When_No_Actual_Calls_Are_Made_Indicates_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock1; testNoArgsNoReturnMock1.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock2; testNoArgsNoReturnMock2.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock1, TestFunction()); // act tstring result = testNoArgsNoReturnMock1.CompareActualAndExpectedCalls() + testNoArgsNoReturnMock2.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction()]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_Strict_Expected_Call_On_Both_Mocks_When_No_Actual_Calls_Are_Made_Indicates_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock1; testNoArgsNoReturnMock1.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock2; testNoArgsNoReturnMock2.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock1, TestFunction()); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock2, TestFunction()); // act tstring result = testNoArgsNoReturnMock1.CompareActualAndExpectedCalls() + testNoArgsNoReturnMock2.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction()]") _T("[Expected:TestFunction()]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_Strict_Expected_Call_And_One_Actual_Call_Indicates_No_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock; testNoArgsNoReturnMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock, TestFunction()); testNoArgsNoReturnMock.TestFunction(); // act tstring result = testNoArgsNoReturnMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_Actual_Call_Without_An_Expected_Call_Indicates_A_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock; testNoArgsNoReturnMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); testNoArgsNoReturnMock.TestFunction(); // act tstring result = testNoArgsNoReturnMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunction()]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_One_Actual_Call_On_A_Different_Mock_Than_The_Expected_Call_Indicates_A_Mismatch) { // arrange CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock1; testNoArgsNoReturnMock1.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); CTestNoArgsNoReturnMethodMock testNoArgsNoReturnMock2; testNoArgsNoReturnMock2.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testNoArgsNoReturnMock1, TestFunction()); testNoArgsNoReturnMock2.TestFunction(); // act tstring result = testNoArgsNoReturnMock1.CompareActualAndExpectedCalls() + testNoArgsNoReturnMock2.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction()]") _T("[Actual:TestFunction()]")), result, _T("Expected and actual calls do not match")); } #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_1_Of_3_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith3Args(42, 43, 44)); CTestStaticAllArgsMock::StaticTestFunctionWith3Args(1, 43, 44); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith3Args(42,43,44)]") _T("[Actual:StaticTestFunctionWith3Args(1,43,44)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_2_Of_3_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith3Args(42, 43, 44)); CTestStaticAllArgsMock::StaticTestFunctionWith3Args(42, 1, 44); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith3Args(42,43,44)]") _T("[Actual:StaticTestFunctionWith3Args(42,1,44)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_3_Of_3_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith3Args(42, 43, 44)); CTestStaticAllArgsMock::StaticTestFunctionWith3Args(42, 43, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith3Args(42,43,44)]") _T("[Actual:StaticTestFunctionWith3Args(42,43,1)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_All_3_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith3Args(42, 43, 44)); CTestStaticAllArgsMock::StaticTestFunctionWith3Args(42, 43, 44); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_1_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith4Args(42, 43, 44, 45)); CTestStaticAllArgsMock::StaticTestFunctionWith4Args(1, 43, 44, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith4Args(42,43,44,45)]") _T("[Actual:StaticTestFunctionWith4Args(1,43,44,45)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_2_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith4Args(42, 43, 44, 45)); CTestStaticAllArgsMock::StaticTestFunctionWith4Args(42, 1, 44, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith4Args(42,43,44,45)]") _T("[Actual:StaticTestFunctionWith4Args(42,1,44,45)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_3_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith4Args(42, 43, 44, 45)); CTestStaticAllArgsMock::StaticTestFunctionWith4Args(42, 43, 1, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith4Args(42,43,44,45)]") _T("[Actual:StaticTestFunctionWith4Args(42,43,1,45)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_4_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith4Args(42, 43, 44, 45)); CTestStaticAllArgsMock::StaticTestFunctionWith4Args(42, 43, 44, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith4Args(42,43,44,45)]") _T("[Actual:StaticTestFunctionWith4Args(42,43,44,1)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_All_4_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith4Args(42, 43, 44, 45)); CTestStaticAllArgsMock::StaticTestFunctionWith4Args(42, 43, 44, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_1_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith5Args(42, 43, 44, 45, 46)); CTestStaticAllArgsMock::StaticTestFunctionWith5Args(1, 43, 44, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:StaticTestFunctionWith5Args(1,43,44,45,46)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_2_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith5Args(42, 43, 44, 45, 46)); CTestStaticAllArgsMock::StaticTestFunctionWith5Args(42, 1, 44, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:StaticTestFunctionWith5Args(42,1,44,45,46)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_3_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith5Args(42, 43, 44, 45, 46)); CTestStaticAllArgsMock::StaticTestFunctionWith5Args(42, 43, 1, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:StaticTestFunctionWith5Args(42,43,1,45,46)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_4_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith5Args(42, 43, 44, 45, 46)); CTestStaticAllArgsMock::StaticTestFunctionWith5Args(42, 43, 44, 1, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:StaticTestFunctionWith5Args(42,43,44,1,46)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_5_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith5Args(42, 43, 44, 45, 46)); CTestStaticAllArgsMock::StaticTestFunctionWith5Args(42, 43, 44, 45, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:StaticTestFunctionWith5Args(42,43,44,45,1)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_All_5_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith5Args(42, 43, 44, 45, 46)); CTestStaticAllArgsMock::StaticTestFunctionWith5Args(42, 43, 44, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_1_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47)); CTestStaticAllArgsMock::StaticTestFunctionWith6Args(1, 43, 44, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:StaticTestFunctionWith6Args(1,43,44,45,46,47)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_2_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47)); CTestStaticAllArgsMock::StaticTestFunctionWith6Args(42, 1, 44, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:StaticTestFunctionWith6Args(42,1,44,45,46,47)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_3_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47)); CTestStaticAllArgsMock::StaticTestFunctionWith6Args(42, 43, 1, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:StaticTestFunctionWith6Args(42,43,1,45,46,47)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_4_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47)); CTestStaticAllArgsMock::StaticTestFunctionWith6Args(42, 43, 44, 1, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:StaticTestFunctionWith6Args(42,43,44,1,46,47)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_5_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47)); CTestStaticAllArgsMock::StaticTestFunctionWith6Args(42, 43, 44, 45, 1, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:StaticTestFunctionWith6Args(42,43,44,45,1,47)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_Arg_6_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47)); CTestStaticAllArgsMock::StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:StaticTestFunctionWith6Args(42,43,44,45,46,1)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMockStatic_Method_When_All_6_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47)); CTestStaticAllArgsMock::StaticTestFunctionWith6Args(42, 43, 44, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif TEST_FUNCTION(MicroMock_When_Arg_1_Of_3_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith3Args(42, 43, 44)); testMock.TestFunctionWith3Args(1, 43, 44); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith3Args(42,43,44)]") _T("[Actual:TestFunctionWith3Args(1,43,44)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_2_Of_3_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith3Args(42, 43, 44)); testMock.TestFunctionWith3Args(42, 1, 44); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith3Args(42,43,44)]") _T("[Actual:TestFunctionWith3Args(42,1,44)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_3_Of_3_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith3Args(42, 43, 44)); testMock.TestFunctionWith3Args(42, 43, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith3Args(42,43,44)]") _T("[Actual:TestFunctionWith3Args(42,43,1)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_All_3_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith3Args(42, 43, 44)); testMock.TestFunctionWith3Args(42, 43, 44); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_1_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith4Args(42, 43, 44, 45)); testMock.TestFunctionWith4Args(1, 43, 44, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith4Args(42,43,44,45)]") _T("[Actual:TestFunctionWith4Args(1,43,44,45)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_2_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith4Args(42, 43, 44, 45)); testMock.TestFunctionWith4Args(42, 1, 44, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith4Args(42,43,44,45)]") _T("[Actual:TestFunctionWith4Args(42,1,44,45)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_3_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith4Args(42, 43, 44, 45)); testMock.TestFunctionWith4Args(42, 43, 1, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith4Args(42,43,44,45)]") _T("[Actual:TestFunctionWith4Args(42,43,1,45)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_4_Of_4_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith4Args(42, 43, 44, 45)); testMock.TestFunctionWith4Args(42, 43, 44, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith4Args(42,43,44,45)]") _T("[Actual:TestFunctionWith4Args(42,43,44,1)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_All_4_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith4Args(42, 43, 44, 45)); testMock.TestFunctionWith4Args(42, 43, 44, 45); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_1_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith5Args(42, 43, 44, 45, 46)); testMock.TestFunctionWith5Args(1, 43, 44, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:TestFunctionWith5Args(1,43,44,45,46)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_2_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith5Args(42, 43, 44, 45, 46)); testMock.TestFunctionWith5Args(42, 1, 44, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:TestFunctionWith5Args(42,1,44,45,46)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_3_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith5Args(42, 43, 44, 45, 46)); testMock.TestFunctionWith5Args(42, 43, 1, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:TestFunctionWith5Args(42,43,1,45,46)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_4_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith5Args(42, 43, 44, 45, 46)); testMock.TestFunctionWith5Args(42, 43, 44, 1, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:TestFunctionWith5Args(42,43,44,1,46)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_5_Of_5_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith5Args(42, 43, 44, 45, 46)); testMock.TestFunctionWith5Args(42, 43, 44, 45, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith5Args(42,43,44,45,46)]") _T("[Actual:TestFunctionWith5Args(42,43,44,45,1)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_All_5_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith5Args(42, 43, 44, 45, 46)); testMock.TestFunctionWith5Args(42, 43, 44, 45, 46); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_1_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith6Args(42, 43, 44, 45, 46, 47)); testMock.TestFunctionWith6Args(1, 43, 44, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:TestFunctionWith6Args(1,43,44,45,46,47)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_2_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith6Args(42, 43, 44, 45, 46, 47)); testMock.TestFunctionWith6Args(42, 1, 44, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:TestFunctionWith6Args(42,1,44,45,46,47)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_3_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith6Args(42, 43, 44, 45, 46, 47)); testMock.TestFunctionWith6Args(42, 43, 1, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:TestFunctionWith6Args(42,43,1,45,46,47)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_4_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith6Args(42, 43, 44, 45, 46, 47)); testMock.TestFunctionWith6Args(42, 43, 44, 1, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:TestFunctionWith6Args(42,43,44,1,46,47)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_5_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith6Args(42, 43, 44, 45, 46, 47)); testMock.TestFunctionWith6Args(42, 43, 44, 45, 1, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:TestFunctionWith6Args(42,43,44,45,1,47)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_Arg_6_Of_6_Is_Mismatched_A_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith6Args(42, 43, 44, 45, 46, 47)); testMock.TestFunctionWith6Args(42, 43, 44, 45, 46, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWith6Args(42,43,44,45,46,47)]") _T("[Actual:TestFunctionWith6Args(42,43,44,45,46,1)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_When_All_6_Args_Match_No_Mismatch_Is_Reported) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWith6Args(42, 43, 44, 45, 46, 47)); testMock.TestFunctionWith6Args(42, 43, 44, 45, 46, 47); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #ifdef _MSC_VER TEST_FUNCTION(MicroMock_When_A_Structure_Is_Used_As_Argument_And_Member_1_Of_2_Is_Different_A_Mismatch_Is_Reported) { // arrange CTestStaticVariousArgsMock testMock; TEST_STRUCTURE expectedCallArgumentStruct = { 42, 43 }; TEST_STRUCTURE actualCallArgumentStruct = { 1, 43 }; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWithStructArg(expectedCallArgumentStruct)); CTestStaticVariousArgsMock::StaticTestFunctionWithStructArg(actualCallArgumentStruct); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWithStructArg({42,43})]") _T("[Actual:StaticTestFunctionWithStructArg({1,43})]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_When_A_Structure_Is_Used_As_Argument_And_Member_2_Of_2_Is_Different_A_Mismatch_Is_Reported) { // arrange CTestStaticVariousArgsMock testMock; TEST_STRUCTURE expectedCallArgumentStruct = { 42, 43 }; TEST_STRUCTURE actualCallArgumentStruct = { 42, 1 }; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWithStructArg(expectedCallArgumentStruct)); CTestStaticVariousArgsMock::StaticTestFunctionWithStructArg(actualCallArgumentStruct); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWithStructArg({42,43})]") _T("[Actual:StaticTestFunctionWithStructArg({42,1})]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_When_A_Structure_Is_Used_As_Argument_And_Members_Match_No_Call_Mismatch_Is_Reported) { // arrange CTestStaticVariousArgsMock testMock; TEST_STRUCTURE expectedCallArgumentStruct = { 42, 43 }; TEST_STRUCTURE actualCallArgumentStruct = { 42, 43 }; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWithStructArg(expectedCallArgumentStruct)); CTestStaticVariousArgsMock::StaticTestFunctionWithStructArg(actualCallArgumentStruct); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_When_A_Structure_Is_Used_As_Argument_And_Members_Match_But_Filling_Does_Not_No_Call_Mismatch_Is_Reported) { // arrange CTestStaticVariousArgsMock testMock; TEST_STRUCTURE expectedCallArgumentStruct; TEST_STRUCTURE actualCallArgumentStruct; memset(&expectedCallArgumentStruct, 0, sizeof(expectedCallArgumentStruct)); memset(&actualCallArgumentStruct, 0xFF, sizeof(actualCallArgumentStruct)); actualCallArgumentStruct.m_Value1 = expectedCallArgumentStruct.m_Value1 = 42; actualCallArgumentStruct.m_Value2 = expectedCallArgumentStruct.m_Value2 = 42; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWithStructArg(expectedCallArgumentStruct)); CTestStaticVariousArgsMock::StaticTestFunctionWithStructArg(actualCallArgumentStruct); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_When_A_UINT16_Is_Used_As_Argument_And_Argument_Values_Match_No_Call_Mismatch_Is_Reported) { // arrange CTestStaticVariousArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWithUINT16Arg(4242)); CTestStaticVariousArgsMock::StaticTestFunctionWithUINT16Arg(4242); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_When_A_UINT16_Is_Used_As_Argument_And_Argument_Values_Do_Not_Match_A_Call_Mismatch_Is_Reported) { // arrange CTestStaticVariousArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWithUINT16Arg(1)); CTestStaticVariousArgsMock::StaticTestFunctionWithUINT16Arg(4242); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWithUINT16Arg(1)][Actual:StaticTestFunctionWithUINT16Arg(4242)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Validate_First_Argument_For_Mock_Without_Arguments_Throws) { // arrange CTestStaticNoArgsNoReturnMethodMock testMock; bool exceptionWasThrown = false; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); ///act try { EXPECTED_CALL(testMock, StaticTestFunction()) .ValidateArgument(1); } catch(CMicroMockException &e) { ///assert exceptionWasThrown=true; ASSERT_ARE_EQUAL(MICROMOCK_EXCEPTION, MICROMOCK_EXCEPTION_INVALID_ARGUMENT, e.GetMicroMockExceptionCode()); } catch(...) { ASSERT_FAIL(_T("it was expected a CMicroMockException, but something else was thrown")); } ASSERT_ARE_EQUAL_WITH_MSG(bool, true, exceptionWasThrown, _T("there was no exception thrown")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Validating_Argument_Zero_Throws) { // arrange CTestStaticAllArgsMock testMock; bool exceptionWasThrown = false; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); try { EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(1)) .ValidateArgument(0); } catch(CMicroMockException &e) { ///assert exceptionWasThrown=true; ASSERT_ARE_EQUAL(MICROMOCK_EXCEPTION, MICROMOCK_EXCEPTION_INVALID_ARGUMENT, e.GetMicroMockExceptionCode()); } catch(...) { ASSERT_FAIL(_T("it was expected a CMicroMockException, but something else was thrown")); } ASSERT_ARE_EQUAL_WITH_MSG(bool, true, exceptionWasThrown, _T("there was no exception thrown")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Validating_First_Argument_Checks_Expected_vs_Actual) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(1)) .ValidateArgument(1); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(2); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith1Arg(1)]") _T("[Actual:StaticTestFunctionWith1Arg(2)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Validating_First_Arg_When_Arg_1_Of_2_Is_Different_Indicates_A_Call_Mismatch) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith2Args(42, 43)) .ValidateArgument(1); CTestStaticAllArgsMock::StaticTestFunctionWith2Args(1, 43); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith2Args(42,43)]") _T("[Actual:StaticTestFunctionWith2Args(1,43)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Validating_Second_Arg_When_Arg_2_Of_2_Is_Different_Indicates_A_Call_Mismatch) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith2Args(42, 43)) .ValidateArgument(2); CTestStaticAllArgsMock::StaticTestFunctionWith2Args(42, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith2Args(42,43)]") _T("[Actual:StaticTestFunctionWith2Args(42,1)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Validating_First_Arg_When_Arg_2_Of_2_Is_Different_Indicates_No_Call_Mismatch) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith2Args(42, 43)) .ValidateArgument(1); CTestStaticAllArgsMock::StaticTestFunctionWith2Args(42, 1); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_WhenCalled_Strict_Verifies_Arguments) { // arrange CTestStaticAllArgsMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); WHEN_CALLED_STRICT(testMock, StaticTestFunctionWith1Arg(42)) .SetReturn((UINT8)42); // act UINT8 result = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(43); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)0, result, _T("Incorrect result value")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_WhenCalled_Strict_Gets_Correct_Return_Value_When_Arguments_Match) { // arrange CTestStaticAllArgsMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); WHEN_CALLED_STRICT(testMock, StaticTestFunctionWith1Arg(42)) .SetReturn((UINT8)42); // act UINT8 result = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)42, result, _T("Incorrect result value")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Non_Strict_WhenCalled_Ignores_Arguments) { // arrange CTestStaticAllArgsMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); WHEN_CALLED(testMock, StaticTestFunctionWith1Arg(42)) .SetReturn((UINT8)42); // act UINT8 result = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(43); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)42, result, _T("Incorrect result value")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetExpectedCalls_Without_Any_Expected_Calls_Does_Nothing) { // arrange CTestStaticAllArgsMock testMock; testMock.ResetExpectedCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetExpectedCalls_Clears_The_List_Of_Expected_Calls) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetExpectedCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetExpectedCalls_With_One_Expected_And_One_Actual_Call_Reports_A_Call_Mismatch) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetExpectedCalls(); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:StaticTestFunctionWith1Arg(42)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_2_Consecutive_ResetExpectedCalls_Clear_The_Expected_Calls) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetExpectedCalls(); testMock.ResetExpectedCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_2_ResetExpectedCalls_Each_After_One_Expected_Call_Clear_The_Expected_Calls_List) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetExpectedCalls(); EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetExpectedCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_After_A_ResetExpectedCalls_It_Is_Possible_To_Set_Expectations) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetExpectedCalls(); EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetExpectedCalls_Clears_2_Expected_Calls) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetExpectedCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetActualCalls_Without_Any_Actual_Calls_Does_Nothing) { // arrange CTestStaticAllArgsMock testMock; testMock.ResetActualCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetActualCalls_Clears_The_List_Of_Actual_Calls) { // arrange CTestStaticAllArgsMock testMock; CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetActualCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetActualCalls_With_One_Expected_And_One_Actual_Call_Reports_A_Call_Mismatch) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetActualCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:StaticTestFunctionWith1Arg(42)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_2_Consecutive_ResetActualCalls_Clear_The_Actual_Calls) { // arrange CTestStaticAllArgsMock testMock; CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetActualCalls(); testMock.ResetActualCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_2_ResetActualCalls_Each_After_One_Actual_Call_Clear_The_Actual_Calls_List) { // arrange CTestStaticAllArgsMock testMock; CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetActualCalls(); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetActualCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_After_A_ResetActualCalls_It_Is_Possible_To_Set_Expectations) { // arrange CTestStaticAllArgsMock testMock; CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetActualCalls(); EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetActualCalls_Clears_2_Actual_Calls) { // arrange CTestStaticAllArgsMock testMock; CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetActualCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetAllCalls_Clears_Expected_Calls) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(42)); testMock.ResetAllCalls(); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:StaticTestFunctionWith1Arg(42)]")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ResetAllCalls_Clears_Both_Actual_And_Expected_Calls) { // arrange CTestStaticAllArgsMock testMock; EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(43)); CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(42); testMock.ResetAllCalls(); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_TypedMock_Instantiation_Succeeds) { // arrange // act CTypedMock testMock; // assert } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_Custom_Mocks_Execute_The_Mock_Method_Code) { // arrange CTestCustomMock testMock; EXPECTED_CALL(testMock, StaticTestFunction(40)); // act UINT8 result = CTestCustomMock::StaticTestFunction(40); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)42, result, _T("The custom mock code should get executed")); } #endif #ifdef _MSC_VER TEST_FUNCTION(MicroMock_ExpectedCall_Does_Not_Execute_Custom_Mock_Code) { // arrange CCustomMockCodeNotExecuted testMock; EXPECTED_CALL(testMock, StaticTestFunction()); // act UINT8 result = CCustomMockCodeNotExecuted::StaticTestFunction(); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)1, result, _T("The custom code in the mock should only be called once")); } #endif TEST_FUNCTION(MicroMock_Instantiating_A_Mock_Method_With_An_Out_Argument_Succeeds) { // arrange // act CTestArgBufferMock testMock; // assert // no explicit assert, no exception expected } TEST_FUNCTION(MicroMock_Instantiating_A_Mock_With_Strict_Ordered_Call_Comparer_Succeeds) { // arrange // act CStrictOrderedCallComparer testMock; // assert // no explicit assert, no exception expected } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_With_Only_One_Expected_Call_Indicates_Call_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunction(42)); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction(42)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_With_Only_One_Actual_Call_Indicates_Call_Mismatch) { // arrange CStrictOrderedCallComparer testMock; testMock.TestFunction(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunction(42)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_With_One_Expected_Call_And_An_Actual_Call_Indicates_No_Call_Mismatches) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunction(42)); testMock.TestFunction(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_With_An_Extra_Expected_Call_Before_2_Matching_Calls_Indicates_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunction(41)); STRICT_EXPECTED_CALL(testMock, TestFunction(42)); testMock.TestFunction(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction(41)][Expected:TestFunction(42)][Actual:TestFunction(42)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_With_An_Extra_Expected_Call_After_2_Matching_Calls_Indicates_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunction(42)); STRICT_EXPECTED_CALL(testMock, TestFunction(41)); testMock.TestFunction(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction(41)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_Between_2_Matching_Calls_Indicates_Mismatch) { // arrange CStrictOrderedCallComparer testMock(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunction(41)); STRICT_EXPECTED_CALL(testMock, TestFunction(42)); STRICT_EXPECTED_CALL(testMock, TestFunction(43)); testMock.TestFunction(41); testMock.TestFunction(43); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunction(42)][Expected:TestFunction(43)]") _T("[Actual:TestFunction(43)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_One_Extra_Actual_Call_Indicates_Mismatch) { // arrange CStrictOrderedCallComparer testMock(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunction(41)); testMock.TestFunction(41); testMock.TestFunction(43); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunction(43)]")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_Ignores_A_When_Called_Entry_Before_All_Expected_Calls) { // arrange CStrictOrderedCallComparer testMock; WHEN_CALLED(testMock, TestFunction(41)) .SetReturn((UINT8)42); STRICT_EXPECTED_CALL(testMock, TestFunction(41)); testMock.TestFunction(41); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_Ignores_A_When_Called_Entry_In_The_Middle_Of_Other_Expetced_Calls) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunction(41)); WHEN_CALLED(testMock, TestFunction(43)) .SetReturn((UINT8)42); STRICT_EXPECTED_CALL(testMock, TestFunction(42)); testMock.TestFunction(41); testMock.TestFunction(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_Ignores_A_When_Called_Entry_After_All_Expected_Calls) { // arrange CSimpleTestMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunction(41)); STRICT_EXPECTED_CALL(testMock, TestFunction(42)); WHEN_CALLED(testMock, TestFunction(43)) .SetReturn((UINT8)42); testMock.TestFunction(41); testMock.TestFunction(42); // act tstring result = testMock.CompareActualAndExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), result, _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_Uses_When_Called_Entries) { // arrange CSimpleTestMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); WHEN_CALLED(testMock, TestFunction(43)) .SetReturn((UINT8)1); // act UINT8 result = testMock.TestFunction(43); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)1, result, _T("Incorrect result injected by the mock")); } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_Uses_When_Called_Entries_Even_When_Other_Expeted_Calls_Exist) { // arrange CStrictOrderedCallComparer testMock(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunction(41)); WHEN_CALLED(testMock, TestFunction(43)) .SetReturn((UINT8)1); // act UINT8 result = testMock.TestFunction(43); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)1, result, _T("Incorrect result injected by the mock")); } TEST_FUNCTION(MicroMock_Resetting_Expected_Calls_With_1_Actual_Call_Does_Clears_The_Matching_Of_Actual_Calls) { // arrange CSimpleTestMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunction(41)); testMock.TestFunction(41); // act testMock.ResetExpectedCalls(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunction(41)]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_Nice_Call_Comparer_With_Automcatic_Comparison_Off_Can_Be_Instantiated) { // arrange // act CNiceCallComparer testMock(AUTOMATIC_CALL_COMPARISON_OFF); // assert // no explicit assert } TEST_FUNCTION(MicroMock_StrictUnordered_Call_Comparer_With_Automcatic_Comparison_Off_Can_Be_Instantiated) { // arrange // act CStrictUnorderedCallComparer testMock(AUTOMATIC_CALL_COMPARISON_OFF); // assert // no explicit assert } TEST_FUNCTION(MicroMock_StrictOrdered_Call_Comparer_With_Automcatic_Comparison_Off_Can_Be_Instantiated) { // arrange // act CStrictOrderedCallComparer testMock(AUTOMATIC_CALL_COMPARISON_OFF); // assert // no explicit assert } TEST_FUNCTION(MicroMock_StrictOrderedCallComparer_Last_When_Called_Data_Is_Used_When_Multiple_Entries_Are_Available) { // arrange CStrictOrderedCallComparer testMock(AUTOMATIC_CALL_COMPARISON_OFF); WHEN_CALLED(testMock, TestFunction(42)) .SetReturn((UINT8)42); WHEN_CALLED(testMock, TestFunction(42)) .SetReturn((UINT8)43); // act UINT8 result = testMock.TestFunction(42); // assert ASSERT_ARE_EQUAL_WITH_MSG(UINT8, (UINT8)43, result, _T("Incorrect result injected by the mock")); ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunction(42)]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_With_Zero_Argument_Index_Does_Nothing) { // arrange CTestArgBufferMock testMock; UINT8 injectedOutBuffer[1] = {0x42}; UINT8 actualArgumentBuffer[1] = {0}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(0, injectedOutBuffer, sizeof(injectedOutBuffer)); // act testMock.TestFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[0]")), BytesToString(actualArgumentBuffer, sizeof(actualArgumentBuffer)), _T("No out argument buffer content should be copied")); ASSERT_ARE_NOT_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_With_Argument_Index_Out_Of_Bounds_Does_Nothing) { // arrange CTestArgBufferMock testMock; UINT8 injectedOutBuffer[1] = {0x42}; UINT8 actualArgumentBuffer[1] = {0}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(2, injectedOutBuffer, sizeof(injectedOutBuffer)); // act testMock.TestFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[0]")), BytesToString(actualArgumentBuffer, sizeof(actualArgumentBuffer)), _T("No out argument buffer content should be copied")); ASSERT_ARE_NOT_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_With_1_Byte_Payload_Copies_1_Byte) { // arrange CTestArgBufferMock testMock; UINT8 injectedOutBuffer[1] = {0x42}; UINT8 actualArgumentBuffer[1] = {0}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, injectedOutBuffer, sizeof(injectedOutBuffer)); // act testMock.TestFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[42]")), BytesToString(actualArgumentBuffer, sizeof(actualArgumentBuffer)), _T("1 byte of out argument buffer should be injected")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_With_NULL_Buffer_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); MICROMOCK_EXCEPTION exceptionCode = MICROMOCK_EXCEPTION_INTERNAL_ERROR; // anything that is different than the expected code try { // act STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, NULL, 1); } catch (CMicroMockException e) { exceptionCode = e.GetMicroMockExceptionCode(); } // assert ASSERT_ARE_EQUAL_WITH_MSG(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)exceptionCode, _T("Expected an invalid argument exception")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_With_Zero_Byte_Count_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 injectedOutBuffer[1] = {0x42}; MICROMOCK_EXCEPTION exceptionCode = MICROMOCK_EXCEPTION_INTERNAL_ERROR; // anything that is different than the expected code try { // act STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, injectedOutBuffer, 0); } catch (CMicroMockException e) { exceptionCode = e.GetMicroMockExceptionCode(); } // assert ASSERT_ARE_EQUAL_WITH_MSG(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)exceptionCode, _T("Expected an invalid argument exception")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_Only_First_Byte_Out_Of_2_Bytes_Is_Copied) { // arrange CTestArgBufferMock testMock; UINT8 injectedOutBuffer[2] = {0x42, 0x42}; UINT8 actualArgumentBuffer[2] = {0, 0}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, injectedOutBuffer, 1); // act testMock.TestFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[42 0]")), BytesToString(actualArgumentBuffer, sizeof(actualArgumentBuffer)), _T("Only the first byte should be copied")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_With_Offset_1_Copies_Starting_At_Offset_1) { // arrange CTestArgBufferMock testMock; UINT8 injectedOutBuffer[2] = {0x42, 0x42}; UINT8 actualArgumentBuffer[2] = {0, 0}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, injectedOutBuffer, 1, 1); // act testMock.TestFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[0 42]")), BytesToString(actualArgumentBuffer, sizeof(actualArgumentBuffer)), _T("Only the second byte should be copied")); } TEST_FUNCTION(MicroMock_CopyOutArgumentBuffer_Makes_A_Copy_Of_The_Expected_Buffer) { // arrange CTestArgBufferMock testMock; UINT8 injectedArgumentBuffer[1] = {0x42}; UINT8 actualArgumentBuffer[1] = {0}; STRICT_EXPECTED_CALL(testMock, TestFunction(NULL)) .CopyOutArgumentBuffer(1, injectedArgumentBuffer, sizeof(injectedArgumentBuffer)); injectedArgumentBuffer[0] = 0x41; // act testMock.TestFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[42]")), BytesToString(actualArgumentBuffer, sizeof(actualArgumentBuffer)), _T("The initial expected injected buffer contents should be copied")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Time_With_Strict_Comparer_When_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CTestAllArgsMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Time_With_Strict_Comparer_When_No_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_Zero_Times_With_Strict_Comparer_When_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(0); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_Zero_Times_With_Strict_Comparer_When_No_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CTestAllArgsMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(0); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Times_With_Strict_Comparer_When_2_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Strict_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Strict_Comparer_When_2_Actual_Calls_Are_Made_Yields_No_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Strict_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()](x2)")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Time_With_Strict_Ordered_Comparer_When_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Time_With_Strict_Ordered_Comparer_When_No_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_Zero_Times_With_Strict_Ordered_Comparer_When_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(0); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_Zero_Times_With_Strict_Ordered_Comparer_When_No_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(0); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Times_With_Strict_Ordered_Comparer_When_2_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Strict_Ordered_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Strict_Ordered_Comparer_When_2_Actual_Calls_Are_Made_Yields_No_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Strict_Ordered_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()](x2)")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Time_With_Nice_Comparer_When_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Time_With_Nice_Comparer_When_No_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_Zero_Times_With_Nice_Comparer_When_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(0); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_Zero_Times_With_Nice_Comparer_When_No_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(0); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_One_Times_With_Nice_Comparer_When_2_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Nice_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Nice_Comparer_When_2_Actual_Calls_Are_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_2_Times_With_Nice_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(2); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()](x2)")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Time_With_Strict_Comparer_When_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Time_With_Strict_Comparer_When_No_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_Zero_Times_With_Strict_Comparer_When_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(0); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_Zero_Times_With_Strict_Comparer_When_No_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(0); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Times_With_Strict_Comparer_When_2_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Strict_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Strict_Comparer_When_2_Actual_Calls_Are_Made_Yields_No_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Strict_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()](x2)")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Time_With_Strict_Ordered_Comparer_When_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Time_With_Strict_Ordered_Comparer_When_No_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_Zero_Times_With_Strict_Ordered_Comparer_When_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(0); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_Zero_Times_With_Strict_Ordered_Comparer_When_No_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(0); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Times_With_Strict_Ordered_Comparer_When_2_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Strict_Ordered_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Strict_Ordered_Comparer_When_2_Actual_Calls_Are_Made_Yields_No_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Strict_Ordered_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()](x2)")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Time_With_Nice_Comparer_When_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Time_With_Nice_Comparer_When_No_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_Zero_Times_With_Nice_Comparer_When_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(0); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_Zero_Times_With_Nice_Comparer_When_No_Actual_Call_Is_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(0); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_One_Times_With_Nice_Comparer_When_2_Actual_Calls_Are_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Nice_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Nice_Comparer_When_2_Actual_Calls_Are_Made_Yields_No_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); testMock.TestFunctionWithNoArgs(); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_2_Times_With_Nice_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(2); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()](x2)")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_1_Times_On_2_Different_Calls_With_Strict_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()][Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_1_Times_On_2_Different_Calls_With_Strict_Ordered_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()][Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimes_1_Times_On_2_Different_Calls_With_Nice_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedAtLeastTimes(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()][Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_1_Times_On_2_Different_Calls_With_Strict_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()][Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_1_Times_On_2_Different_Calls_With_Strict_Ordered_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()][Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_1_Times_On_2_Different_Calls_With_Nice_Comparer_When_No_Actual_Calls_Are_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()][Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_1_Times_On_2_Different_Calls_With_Strict_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CTestAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_1_Times_On_2_Different_Calls_With_Strict_Ordered_Comparer_When_1_Actual_Call_Is_Made_Yields_Mismatch) { // arrange CStrictOrderedCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_ExpectedTimesExactly_1_Times_On_2_Different_Calls_With_Nice_Comparer_When_1_Actual_Calls_Is_Made_Yields_Mismatch) { // arrange CNiceCallComparer testMock; STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); STRICT_EXPECTED_CALL(testMock, TestFunctionWithNoArgs()) .ExpectedTimesExactly(1); // act testMock.TestFunctionWithNoArgs(); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:TestFunctionWithNoArgs()]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_Validating_Argument_Buffer_Zero_Throws) { // arrange CTestArgBufferMock testMock; UINT8 someRealUINT8=7; bool exceptionWasThrown = false; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); try { EXPECTED_CALL(testMock, TestFunction(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(0, &someRealUINT8, 1); } catch(CMicroMockException &e) { ///assert exceptionWasThrown=true; ASSERT_ARE_EQUAL(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)e.GetMicroMockExceptionCode()); } catch(...) { ASSERT_FAIL(_T("it was expected a CMicroMockException, but something else was thrown")); } ASSERT_ARE_EQUAL_WITH_MSG(bool, true, exceptionWasThrown, _T("there was no exception thrown")); } TEST_FUNCTION(MicroMock_Validating_Argument_Buffer_With_Too_Big_Argument_Number_Throws) { // arrange CTestArgBufferMock testMock; UINT8 someRealUINT8=7; bool exceptionWasThrown=false; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); try { EXPECTED_CALL(testMock, TestFunction(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(2, &someRealUINT8, 1); /*2 is too big here*/ } catch(CMicroMockException &e) { ///assert exceptionWasThrown=true; ASSERT_ARE_EQUAL(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)e.GetMicroMockExceptionCode()); } catch(...) { ASSERT_FAIL(_T("it was expected a CMicroMockException, but something else was thrown")); } ASSERT_ARE_EQUAL_WITH_MSG(bool, true, exceptionWasThrown, _T("there was no exception thrown")); } TEST_FUNCTION(MicroMock_Ignores_A_Certain_FunctionCall_All_The_Time) { // arrange CStaticTestMock testMock; EXPECTED_CALL(testMock, StaticTestFunction()) .IgnoreAllCalls(); StaticTestFunction(); StaticTestFunction(); ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_Ignores_A_Certain_FunctionCall_All_The_Time_With_Ordered_Call_Comparer) { // arrange CStrictOrderedCallComparer testMock; EXPECTED_CALL(testMock, StaticTestFunction()) .IgnoreAllCalls(); StaticTestFunction(); StaticTestFunction(); ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_Does_Not_Check_Again_Calls_That_Have_Been_Matched) { // arrange CTestArgBufferMock testMock; unsigned char expectedArgumentBuffer[] = { 0x42 }; unsigned char actualArgumentBuffer[] = { 0x42 }; EXPECTED_CALL(testMock, TestFunction(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); testMock.TestFunction(actualArgumentBuffer); testMock.TestFunction(NULL); ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunction(NULL)]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_Does_Not_Check_Again_Calls_That_Have_Been_Matched_StrictOrderedComparer) { // arrange CStrictOrderedCallComparer testMock; unsigned char expectedArgumentBuffer[] = { 0x42 }; unsigned char actualArgumentBuffer[] = { 0x42 }; EXPECTED_CALL(testMock, TestFunction(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); testMock.TestFunction(actualArgumentBuffer); testMock.TestFunction(NULL); ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:TestFunction(NULL)]")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_Does_Not_Check_Again_Calls_That_Have_Been_Matched_NiceCallComparer) { // arrange CNiceCallComparer testMock; unsigned char expectedArgumentBuffer[] = { 0x42 }; unsigned char actualArgumentBuffer[] = { 0x42 }; EXPECTED_CALL(testMock, TestFunction(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); testMock.TestFunction(actualArgumentBuffer); testMock.TestFunction(NULL); ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Incorrect calls")); } TEST_FUNCTION(MicroMock_SetFailReturn_called_1_times_returns_fail_value) { ///arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(1)) .ValidateArgument(1) .SetFailReturn((UINT8)3); ///act int result = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(1); /// assert ASSERT_ARE_EQUAL(int, 3, result); testMock.AssertActualAndExpectedCalls(); } TEST_FUNCTION(MicroMock_SetFailReturn_called_2_times_with_fail_at_two_succeeds) { ///arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(1)) .ValidateArgument(1); STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(1)) .ValidateArgument(1) .SetFailReturn((UINT8)3); ///act int result1 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(1); int result2 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(1); /// assert ASSERT_ARE_EQUAL(int, 0, result1); ASSERT_ARE_EQUAL(int, 3, result2); testMock.AssertActualAndExpectedCalls(); } TEST_FUNCTION(MicroMock_SetFailReturn_called_2_times_with_fail_at_one_succeeds) { ///arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(1)) .ValidateArgument(1) .SetFailReturn((UINT8)3); STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg(1)) .ValidateArgument(1); ///act int result1 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(1); int result2 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg(1); /// assert ASSERT_ARE_EQUAL(int, 3, result1); ASSERT_ARE_EQUAL(int, 0, result2); testMock.AssertActualAndExpectedCalls(); } TEST_FUNCTION(MicroMock_SetFailReturn_does_not_execute_the_mock_code) { ///arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg_Clone(1)) .SetFailReturn((UINT8)3); ///act int result1 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg_Clone(1); /// assert ASSERT_ARE_EQUAL(int, 3, result1); ASSERT_ARE_EQUAL(int, 0, gInt); testMock.AssertActualAndExpectedCalls(); } TEST_FUNCTION(MicroMock_SetReturn_does_execute_the_mock_code) { ///arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg_Clone(1)) .SetReturn((UINT8)3); ///act int result1 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg_Clone(1); /// assert ASSERT_ARE_EQUAL(int, 3, result1); ASSERT_ARE_EQUAL(int, 1, gInt); testMock.AssertActualAndExpectedCalls(); } TEST_FUNCTION(MicroMock_SetReturn_does_execute_the_mock_code_and_SetFailDoesNotExecuteMockCode) { ///arrange CTestStaticAllArgsMock testMock; STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg_Clone(1)) .SetReturn((UINT8)3); STRICT_EXPECTED_CALL(testMock, StaticTestFunctionWith1Arg_Clone(1)) .SetFailReturn((UINT8)5); ///act int result1 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg_Clone(1); int result2 = CTestStaticAllArgsMock::StaticTestFunctionWith1Arg_Clone(1); /// assert ASSERT_ARE_EQUAL(int, 3, result1); ASSERT_ARE_EQUAL(int, 5, result2); ASSERT_ARE_EQUAL(int, 1, gInt); testMock.AssertActualAndExpectedCalls(); } END_TEST_SUITE(MicroMockTest) micromocktest_with_ctest.c000066400000000000000000000011211362133436400455040ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { RUN_TEST_SUITE(CMockValue_tests); RUN_TEST_SUITE(MicroMockCallComparisonUnitTests); RUN_TEST_SUITE(MicroMockTest); RUN_TEST_SUITE(MicroMockValidateArgumentBufferTests); RUN_TEST_SUITE(NULLArgsStringificationTests); RUN_TEST_SUITE(MicroMockVoidVoidTest); RUN_TEST_SUITE(MicroMockStimTest); RUN_TEST_SUITE(MicroMockTestWithReturnAndParameters); return 0; } micromockvalidateargumentbufferunittests.cpp000066400000000000000000000707661362133436400513660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" using namespace std; static int tstring_Compare(const std::tstring& a, const std::tstring&b) { return strcmp(a.c_str(), b.c_str()); } static void tstring_ToString(char* string, size_t bufferSize, std::tstring val) { size_t val_size = strlen(val.c_str()); strncpy(string, val.c_str(), (val_size >= bufferSize) ? (bufferSize - 1) : val_size); } TYPED_MOCK_CLASS(CTestArgBufferMock, CMock) { public: MOCK_METHOD_1(, void, Test1ArgFunction, UINT8*, bufferArg); MOCK_VOID_METHOD_END() MOCK_METHOD_2(, void, Test2ArgsFunction, UINT8*, buffer1Arg, UINT8*, buffer2Arg); MOCK_VOID_METHOD_END() }; static MICROMOCK_MUTEX_HANDLE g_testByTest; static MICROMOCK_GLOBAL_SEMAPHORE_HANDLE g_dllByDll; BEGIN_TEST_SUITE(MicroMockValidateArgumentBufferTests) TEST_SUITE_INITIALIZE(TestClassInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = MicroMockCreateMutex(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(TestClassCleanup) { MicroMockDestroyMutex(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockAcquireMutex(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockReleaseMutex(g_testByTest)) { ASSERT_FAIL("failure in test framework at ReleaseMutex"); } } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_Zero_Argument_Index_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer[1] = {42}; MICROMOCK_EXCEPTION exceptionCode = MICROMOCK_EXCEPTION_INTERNAL_ERROR; // anything that is different than the expected code try { // act STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(0, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); } catch (CMicroMockException e) { exceptionCode = e.GetMicroMockExceptionCode(); } // assert ASSERT_ARE_EQUAL_WITH_MSG(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)exceptionCode, _T("Expected an invalid argument exception")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_Argument_Index_Out_Of_Bounds_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer[1] = {42}; MICROMOCK_EXCEPTION exceptionCode = MICROMOCK_EXCEPTION_INTERNAL_ERROR; // anything that is different than the expected code try { // act STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(2, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); } catch (CMicroMockException e) { exceptionCode = e.GetMicroMockExceptionCode(); } // assert ASSERT_ARE_EQUAL_WITH_MSG(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)exceptionCode, _T("Expected an invalid argument exception")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_When_Expected_Memory_Matches_Indicates_No_Call_Mismatch) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[1] = {42}; UINT8 actualArgumentBuffer[1] = {42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_When_Expected_Memory_Matches_And_Expetced_Call_Argument_Value_Is_NULL_Indicates_No_Call_Mismatch) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[1] = {42}; UINT8 actualArgumentBuffer[1] = {42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_When_Expected_Memory_Does_Not_Match_Indicates_A_Call_Mismatch) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[1] = { 0x43 }; UINT8 actualArgumentBuffer[1] = { 0x42 }; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([43])][Actual:Test1ArgFunction([42])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_When_Expected_Buffer_Is_NULL_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer[1] = {42}; MICROMOCK_EXCEPTION exceptionCode = MICROMOCK_EXCEPTION_INTERNAL_ERROR; // anything that is different than the expected code try { // act STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, NULL, sizeof(expectedArgumentBuffer)); } catch (CMicroMockException e) { exceptionCode = e.GetMicroMockExceptionCode(); } // assert ASSERT_ARE_EQUAL_WITH_MSG(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)exceptionCode, _T("Expected an invalid argument exception")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_0_Size_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer[1] = {42}; MICROMOCK_EXCEPTION exceptionCode = MICROMOCK_EXCEPTION_INTERNAL_ERROR; // anything that is different than the expected code try { // act STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, 0); } catch (CMicroMockException e) { exceptionCode = e.GetMicroMockExceptionCode(); } // assert ASSERT_ARE_EQUAL_WITH_MSG(int, (int)MICROMOCK_EXCEPTION_INVALID_ARGUMENT, (int)exceptionCode, _T("Expected an invalid argument exception")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Only_Byte_1_Of_2_Checked_When_1st_Byte_Matches) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[2] = {42, 43}; UINT8 actualArgumentBuffer[2] = {42, 42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, 1); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Only_Byte_1_Of_2_Checked_When_1st_Byte_Does_Not_Match) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[2] = {0x42, 0x42}; UINT8 actualArgumentBuffer[2] = {0x43, 0x42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, 1); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([42])][Actual:Test1ArgFunction([43])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Only_Byte_2_Of_2_Checked_When_2nd_Byte_Matches) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {42}; UINT8 actualArgumentBuffer[2] = {43, 42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, 1, 1); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Only_Byte_2_Of_2_Checked_When_2nd_Byte_Does_Not_Match) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0x42}; UINT8 actualArgumentBuffer[2] = {0x42, 0x43}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, 1, 1); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([.. 42])][Actual:Test1ArgFunction([.. 43])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Makes_A_Copy_Of_The_Expected_Buffer) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[1] = {42}; UINT8 actualArgumentBuffer[1] = {42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); expectedArgumentBuffer[0] = 41; // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_For_2_Bytes_Formats_Both_Bytes_Into_The_Assert_String) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[2] = {0x42, 0x42}; UINT8 actualArgumentBuffer[2] = {0x42, 0x43}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, 2); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([42 42])][Actual:Test1ArgFunction([42 43])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_For_1_Digit_Values_Works) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0x2}; UINT8 actualArgumentBuffer[] = {0x3}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([02])][Actual:Test1ArgFunction([03])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_Expected_0x0F_Formats_The_Argument_Buffer_Correctly) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0xF}; UINT8 actualArgumentBuffer[] = {0x0}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([0F])][Actual:Test1ArgFunction([00])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_Expected_0xFF_Formats_The_Argument_Buffer_Correctly) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0xFF}; UINT8 actualArgumentBuffer[] = {0x0}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([FF])][Actual:Test1ArgFunction([00])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_Actual_0x0F_Formats_The_Argument_Buffer_Correctly) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0x0}; UINT8 actualArgumentBuffer[] = {0xF}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([00])][Actual:Test1ArgFunction([0F])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_Actual_0xFF_Formats_The_Argument_Buffer_Correctly) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0x00}; UINT8 actualArgumentBuffer[] = {0xFF}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([00])][Actual:Test1ArgFunction([FF])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_For_2_Bytes_With_1_Digit_Values_Works) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0x2, 0x3}; UINT8 actualArgumentBuffer[] = {0x3, 0x2}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([02 03])][Actual:Test1ArgFunction([03 02])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_For_2_Bytes_Containing_0x0F_And_0xFF_Outputs_The_Correct_Formatted_Buffer) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0xF, 0xFF}; UINT8 actualArgumentBuffer[] = {0x0, 0x0}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, sizeof(expectedArgumentBuffer)); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([0F FF])][Actual:Test1ArgFunction([00 00])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_2_Arguments_Formats_Property_Both_Arguments) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgument1Buffer[] = {0x2}; UINT8 actualArgument1Buffer[] = {0x3}; UINT8 expectedArgument2Buffer[] = {0x4, 0x5}; UINT8 actualArgument2Buffer[] = {0x5, 0x4}; STRICT_EXPECTED_CALL(testMock, Test2ArgsFunction(expectedArgument1Buffer, expectedArgument2Buffer)) .ValidateArgumentBuffer(1, expectedArgument1Buffer, sizeof(expectedArgument1Buffer)) .ValidateArgumentBuffer(2, expectedArgument2Buffer, sizeof(expectedArgument2Buffer)); // act testMock.Test2ArgsFunction(actualArgument1Buffer, actualArgument2Buffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test2ArgsFunction([02],[04 05])][Actual:Test2ArgsFunction([03],[05 04])]")), testMock.CompareActualAndExpectedCalls(), _T("Expected and actual calls do not match")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_For_The_3rd_Byte_Issues_Two_Placeholders_In_The_Formatted_Argument) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer[] = {0x42}; UINT8 actualArgumentBuffer[] = {0x42, 0x43, 0x44}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(expectedArgumentBuffer)) .ValidateArgumentBuffer(1, expectedArgumentBuffer, 1, 2); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([.. .. 42])][Actual:Test1ArgFunction([.. .. 44])]")), testMock.CompareActualAndExpectedCalls(), _T("Something is wrong with argument buffer validations")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_2_Validation_Entries_When_Expected_And_Actual_Values_Match_Does_Not_Yield_Any_Call_Difference) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x43}; UINT8 actualArgumentBuffer[] = {0x42, 0x43}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1)) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2), 1); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_2_Validation_Entries_When_First_Byte_Is_Different_Than_Expected_Yields_A_Call_Difference) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer1[] = {0x43}; UINT8 expectedArgumentBuffer2[] = {0x42}; UINT8 actualArgumentBuffer[] = {0x42, 0x42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1)) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2), 1); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([43 42])][Actual:Test1ArgFunction([42 42])]")), testMock.CompareActualAndExpectedCalls(), _T("Something is wrong with argument buffer validations")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_With_2_Validation_Entries_When_Second_Byte_Is_Different_Than_Expected_Yields_A_Call_Difference) { // arrange CTestArgBufferMock testMock; UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x43}; UINT8 actualArgumentBuffer[] = {0x42, 0x42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1)) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2), 1); // act testMock.Test1ArgFunction(actualArgumentBuffer); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Expected:Test1ArgFunction([42 43])][Actual:Test1ArgFunction([42 42])]")), testMock.CompareActualAndExpectedCalls(), _T("Something is wrong with argument buffer validations")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_2_Times_On_The_Same_Byte_With_Different_Content_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x43}; bool exceptionThrown = false; try { STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1)) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2)); } catch (CMicroMockException e) { exceptionThrown = (e.GetMicroMockExceptionCode() == MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS); } // act // assert ASSERT_IS_TRUE_WITH_MSG(exceptionThrown, _T("ValidateArgumentBuffer should assert/throw")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_On_The_Same_Byte_With_Same_Byte_Content_Does_Not_Throws) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1)) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2)); // act // assert // no exception expected } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Overlapping_Validation_Buffers_Left_Side_The_Same_Throws_When_Bytes_Are_Different) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x43, 0x42}; bool exceptionThrown = false; try { STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1), 1) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2), 1); } catch (CMicroMockException e) { exceptionThrown = (e.GetMicroMockExceptionCode() == MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS); } // act // assert ASSERT_IS_TRUE_WITH_MSG(exceptionThrown, _T("ValidateArgumentBuffer should assert/throw")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Overlapping_Validation_Buffers_Right_Side_The_Same_Throws_When_Bytes_Are_Different) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x42, 0x43}; bool exceptionThrown = false; try { STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1), 1) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2), 0); } catch (CMicroMockException e) { exceptionThrown = (e.GetMicroMockExceptionCode() == MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS); } // act // assert ASSERT_IS_TRUE_WITH_MSG(exceptionThrown, _T("ValidateArgumentBuffer should assert/throw")); } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Overlapping_Validation_Buffer_Left_Side_The_Same_Does_Not_Thrown_When_Bytes_Are_The_Same) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x42, 0x42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1), 1) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2), 1); // act // assert // no exception expected } TEST_FUNCTION(MicroMock_ValidateArgumentBuffer_Overlapping_Validation_Buffer_Right_Side_The_Same_Does_Not_Thrown_When_Bytes_Are_The_Same) { // arrange CTestArgBufferMock testMock; testMock.SetPerformAutomaticCallComparison(AUTOMATIC_CALL_COMPARISON_OFF); UINT8 expectedArgumentBuffer1[] = {0x42}; UINT8 expectedArgumentBuffer2[] = {0x42, 0x42}; STRICT_EXPECTED_CALL(testMock, Test1ArgFunction(NULL)) .ValidateArgumentBuffer(1, expectedArgumentBuffer1, sizeof(expectedArgumentBuffer1), 1) .ValidateArgumentBuffer(1, expectedArgumentBuffer2, sizeof(expectedArgumentBuffer2), 0); // act // assert // no exception expected } END_TEST_SUITE(MicroMockValidateArgumentBufferTests) nullargsstringificationunittests.cpp000066400000000000000000000211531362133436400476620ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" using namespace std; //------------------------------------------------------------------------------------------------------------------------------ // Tests TOC //------------------------------------------------------------------------------------------------------------------------------ // - Stringify NULL arguments // TEST_FUNCTION(MicroMock_TFS102616_NULL_Const_wchar_Pointer_Does_Not_Trigger_Exceptions) // TEST_FUNCTION(MicroMock_TFS102616_NULL_Const_char_Pointer_Does_Not_Trigger_Exceptions) // TEST_FUNCTION(MicroMock_TFS102616_NULL_wchar_Pointer_Does_Not_Trigger_Exceptions) // TEST_FUNCTION(MicroMock_TFS102616_NULL_char_Pointer_Does_Not_Trigger_Exceptions) // - Stringify non-NULL arguments // TEST_FUNCTION(MicroMock_TFS102616_Const_wchar_String_Is_Printed_As_Such_In_Unexpected_Call) // TEST_FUNCTION(MicroMock_TFS102616_Const_char_String_Is_Printed_As_Such_In_Unexpected_Call) // TEST_FUNCTION(MicroMock_TFS102616_wchar_String_Is_Printed_As_Such_In_Unexpected_Call) // TEST_FUNCTION(MicroMock_TFS102616_char_String_Is_Printed_As_Such_In_Unexpected_Call) //------------------------------------------------------------------------------------------------------------------------------ TYPED_MOCK_CLASS(CSomeMocks, CGlobalMock) { public: MOCK_STATIC_METHOD_1(,void, XAA_wchar_const, const wchar_t*, p) MOCK_VOID_METHOD_END() MOCK_STATIC_METHOD_1(, void, XAA_char_const, const char*, p) MOCK_VOID_METHOD_END() MOCK_STATIC_METHOD_1(, void, XAA_wchar, wchar_t*, p) MOCK_VOID_METHOD_END() MOCK_STATIC_METHOD_1(, void, XAA_char, char*, p) MOCK_VOID_METHOD_END() }; DECLARE_GLOBAL_MOCK_METHOD_1(CSomeMocks, , void, XAA_wchar_const, const wchar_t*, p) DECLARE_GLOBAL_MOCK_METHOD_1(CSomeMocks, , void, XAA_char_const, const char*, p) DECLARE_GLOBAL_MOCK_METHOD_1(CSomeMocks, , void, XAA_wchar, wchar_t*, p) DECLARE_GLOBAL_MOCK_METHOD_1(CSomeMocks, , void, XAA_char, char*, p) template<> bool operator==(const CMockValue& lhs, const CMockValue& rhs) { bool result = false; if (lhs.GetValue() == rhs.GetValue()) { result = true; } else { if ((NULL != lhs.GetValue()) && (NULL != rhs.GetValue()) && (strcmp(lhs.GetValue(), rhs.GetValue()) == 0)) { result = true; } } return result; } static int tstring_Compare(const std::tstring& a, const std::tstring&b) { return strcmp(a.c_str(), b.c_str()); } static void tstring_ToString(char* string, size_t bufferSize, std::tstring val) { size_t val_size = strlen(val.c_str()); strncpy(string, val.c_str(), (val_size >= bufferSize) ? (bufferSize - 1) : val_size); } static MICROMOCK_MUTEX_HANDLE g_testByTest; static MICROMOCK_GLOBAL_SEMAPHORE_HANDLE g_dllByDll; BEGIN_TEST_SUITE(NULLArgsStringificationTests) TEST_SUITE_INITIALIZE(TestClassInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); g_testByTest = MicroMockCreateMutex(); ASSERT_IS_NOT_NULL(g_testByTest); } TEST_SUITE_CLEANUP(TestClassCleanup) { MicroMockDestroyMutex(g_testByTest); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(TestMethodInitialize) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockAcquireMutex(g_testByTest)) { ASSERT_FAIL("our mutex is ABANDONED. Failure in test framework"); } } TEST_FUNCTION_CLEANUP(TestMethodCleanup) { TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); if (!MicroMockReleaseMutex(g_testByTest)) { ASSERT_FAIL("failure in test framework at ReleaseMutex"); } } /*http://webvstf:8080/tfs/web/wi.aspx?pcguid=8947f9e3-3622-497e-ab87-a27e01082a6c&id=102616*/ TEST_FUNCTION(MicroMock_TFS102616_NULL_Const_wchar_Pointer_Does_Not_Trigger_Exceptions) { // arrange CSomeMocks testMock; STRICT_EXPECTED_CALL(testMock, XAA_wchar_const(NULL)) .NeverInvoked(); // act XAA_wchar_const(NULL); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_wchar_const(NULL)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } TEST_FUNCTION(MicroMock_TFS102616_NULL_Const_char_Pointer_Does_Not_Trigger_Exceptions) { // arrange CSomeMocks testMock; STRICT_EXPECTED_CALL(testMock, XAA_char_const(NULL)) .NeverInvoked(); // act XAA_char_const(NULL); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_char_const(NULL)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } TEST_FUNCTION(MicroMock_TFS102616_NULL_wchar_Pointer_Does_Not_Trigger_Exceptions) { // arrange CSomeMocks testMock; STRICT_EXPECTED_CALL(testMock, XAA_wchar(NULL)) .NeverInvoked(); // act XAA_wchar(NULL); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_wchar(NULL)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } TEST_FUNCTION(MicroMock_TFS102616_NULL_char_Pointer_Does_Not_Trigger_Exceptions) { // arrange CSomeMocks testMock; STRICT_EXPECTED_CALL(testMock, XAA_char(NULL)) .NeverInvoked(); // act XAA_char(NULL); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_char(NULL)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } TEST_FUNCTION(MicroMock_TFS102616_Const_wchar_String_Is_Printed_As_Such_In_Unexpected_Call) { // arrange CSomeMocks testMock; wchar_t val1[] = L"oink"; wchar_t val2[] = L"oink"; STRICT_EXPECTED_CALL(testMock, XAA_wchar_const(val1)) .NeverInvoked(); // act XAA_wchar_const(val2); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_wchar_const(oink)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } TEST_FUNCTION(MicroMock_TFS102616_Const_char_String_Is_Printed_As_Such_In_Unexpected_Call) { // arrange CSomeMocks testMock; char val1[] = "oink"; char val2[] = "oink"; STRICT_EXPECTED_CALL(testMock, XAA_char_const(val1)) .NeverInvoked(); // act XAA_char_const(val2); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_char_const(oink)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } TEST_FUNCTION(MicroMock_TFS102616_wchar_String_Is_Printed_As_Such_In_Unexpected_Call) { // arrange CSomeMocks testMock; wchar_t val1[] = L"oink"; wchar_t val2[] = L"oink"; STRICT_EXPECTED_CALL(testMock, XAA_wchar(val1)) .NeverInvoked(); // act XAA_wchar(val2); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_wchar(oink)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } TEST_FUNCTION(MicroMock_TFS102616_char_String_Is_Printed_As_Such_In_Unexpected_Call) { // arrange CSomeMocks testMock; char val1[] = "oink"; char val2[] = "oink"; STRICT_EXPECTED_CALL(testMock, XAA_char(val1)) .NeverInvoked(); // act XAA_char(val2); // assert ASSERT_ARE_EQUAL_WITH_MSG(tstring, tstring(_T("[Actual:XAA_char(oink)]")), testMock.CompareActualAndExpectedCalls(), _T("An unexpected call with NULL argument should be reported")); } END_TEST_SUITE(NULLArgsStringificationTests) resource.h000066400000000000000000000105421362133436400422270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktestÿþ/*Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the ""License""); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.*/ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by UnitTestsGenericResource.rc // #define VER_DEBUG 0 #define VER_PRERELEASE 0 #define _USE_DECLSPECS_FOR_SAL 0 #define _USE_ATTRIBUTES_FOR_SAL 0 #define __drv_typeConst 0 #define WINAPI_PARTITION_DESKTOP 0x00000001 #define __drv_typeCond 1 #define VS_VERSION_INFO 1 #define VFFF_ISSHAREDFILE 0x0001 #define VFF_CURNEDEST 0x0001 #define VIFF_FORCEINSTALL 0x0001 #define VER_PRODUCTMINORVERSION 2 #define WINAPI_PARTITION_APP 0x00000002 #define __drv_typeBitset 2 #define VFF_FILEINUSE 0x0002 #define VIFF_DONTDELETEOLD 0x0002 #define __drv_typeExpr 3 #define VFF_BUFFTOOSMALL 0x0004 #define VER_PRODUCTMAJORVERSION 6 #define _SAL_VERSION 20 #define VS_USER_DEFINED 100 #define VER_PRODUCTVERSION_W 0x0602 #define VER_PRODUCTBUILD 9200 #define VER_PRODUCTBUILD_QFE 16384 #define VER_PACKAGEBUILD_QFE 16384 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1000 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif stdafx.cpp000066400000000000000000000002541362133436400422230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" stdafx.h000066400000000000000000000010561362133436400416710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include #ifdef _CRTDBG_MAP_ALLOC #include #endif // 4505 is disabled due to unused template specializations declared in CppUnitTest #pragma warning(disable:4505) // Headers for CppUnitTest //#include "testrunnerswitcher.h" #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif // WIN32_LEAN_AND_MEAN #include "micromock.h" #include "timediscretemicromock.h" stdafx_c.h000066400000000000000000000003211362133436400421650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once #include "targetver.h" #include "string.h" targetver.h000066400000000000000000000007121362133436400424010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #pragma once // Including SDKDDKVer.h defines the highest available Windows platform. // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. #include timediscretemicromocktest_stim.cpp000066400000000000000000001343541362133436400472640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/micromock/unittests/micromocktest// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "stdafx.h" #include "hypothetic_module.h" #include using namespace std; //MICROMOCK_ENUM_TO_STRING_DECLARE(MICROMOCK_EXCEPTION_TAG); #ifdef _MSC_VER MICROMOCK_ENUM_TO_STRING(MICROMOCK_EXCEPTION_TAG, L"MICROMOCK_EXCEPTION_INVALID_VALIDATE_BUFFERS", L"MICROMOCK_EXCEPTION_ALLOCATION_FAILURE", L"MICROMOCK_EXCEPTION_INVALID_ARGUMENT", L"MICROMOCK_EXCEPTION_INVALID_CALL_MODIFIER_COMBINATION", L"MICROMOCK_EXCEPTION_MOCK_NOT_FOUND", L"MICROMOCK_EXCEPTION_SET_TIME_BEFORE_CALL", L"MICROMOCK_EXCEPTION_SET_ARRAY_SIZE_BEFORE_CALL", L"MICROMOCK_EXCEPTION_INTERNAL_ERROR"); /*tests table of content*/ /* TEST_FUNCTION(TimeDiscreteMicroMock_LoopbackAll) TEST_FUNCTION(TimeDiscreteMicroMock_FileOrderIsPreserved_1) TEST_FUNCTION(TimeDiscreteMicroMock_FileOrderIsPreserved_2) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved_2) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved_3) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved_4) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved_5) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved_understands_NULL_buffer) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved_understands_buffer_of_1_element) TEST_FUNCTION(TimeDiscreteMicroMock_ParameterBuffersAreSaved_understands_buffer_of_5_elements) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_NULL_NULL) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_NULL_1int) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_NULL_3int) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_1int_NULL) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_1int_1int) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_1int_3int) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_3int_NULL) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_3int_1int) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_with_2buffers_still_works_3int_4int) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_can_be_reused) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_can_be_reused_at_different_times) TEST_FUNCTION(TimeDiscreteMicroMock_A_STIM_can_copy_an_array_of_objects) TEST_FUNCTION(TimeDiscreteMicroMock_FailsWhenUserCallsDirectly_setArraySize) TEST_FUNCTION(TimeDiscreteMicroMock_FailsWhenUserCallsDirectly_setTime) TEST_FUNCTION(TimeDiscreteMicroMock_Const_ParameterBuffersAreSaved_understands_NULL_buffer) TEST_FUNCTION(TimeDiscreteMicroMock_Const_ParameterBuffersAreSaved_understands_buffer_of_1_element) TEST_FUNCTION(TimeDiscreteMicroMock_Const_ParameterBuffersAreSaved_understands_buffer_of_5_elements) TEST_FUNCTION(TimeDiscreteMicroMock_should_never_ignore_time_baseline) TEST_FUNCTION(TimeDiscreteMicroMock_should_never_ignore_time_using_without_strict_with_real_time) TEST_FUNCTION(TimeDiscreteMicroMock_should_never_ignore_time_time_mismatch_is_detected) TEST_FUNCTION(TimeDiscreteMicroMock_should_never_ignore_time_time_mismatch_is_detected_without_STRICT) TEST_FUNCTION(TimeDiscreteMicroMock_should_never_ignore_time_IgnoreArgument) TEST_FUNCTION(TimeDiscreteMicroMock_should_never_ignore_time_IgnoreAllArguments) */ /*so sometimes some types that look like pointers and are not pointers have to be explictly implemented (specialized)*/ template <> class valueHolder { private: pVoidFunction theValue; public: valueHolder(pVoidFunction t) { theValue = t; } void operator=(pVoidFunction t) { theValue = t; } operator pVoidFunction() { return theValue; } }; template<> static bool operator==(const CMockValue& lhs, const CMockValue& rhs) { bool result = false; if (lhs.GetValue() == rhs.GetValue()) { result = true; } else { if ((NULL != lhs.GetValue()) && (NULL != rhs.GetValue()) && (strcmp(lhs.GetValue(), rhs.GetValue()) == 0)) { result = true; } } return result; } extern "C" void whenzero(void); extern "C" int whenizero(void); extern "C" int whenone(_In_ int i); extern "C" int whentwo(_In_ pChar s, _In_ int i); extern "C" int whenthree(_In_ char c, _In_ pChar s, _In_ int i); extern "C" int whenfour(_In_ unsigned short int si, _In_ char c, _In_ pChar s, _In_ int i); extern "C" int whenfive(_In_ pVoidFunction pVoid, _In_ unsigned short int si, _In_ char c, _In_ pChar s, _In_ int i); extern "C" int whensix(_In_ char c1, _In_ char c2, _In_ char c3, _In_ char c4, _In_ char c5, _In_ char c6); DECLARE_STIM_STATIC_TD_METHOD_0(,void, zero); DECLARE_STIM_STATIC_TD_METHOD_0(,int, izero); DECLARE_STIM_STATIC_TD_METHOD_1(,int, one, _In_ int, i); DECLARE_STIM_STATIC_TD_METHOD_2(,int, two, _In_ pChar, s, int, i); DECLARE_STIM_STATIC_TD_METHOD_3(,int, three, _In_ char, c, _In_ pChar, s, _In_ int, i); DECLARE_STIM_STATIC_TD_METHOD_4(,int, four, _In_ unsigned short int, si, _In_ char, c, _In_ pChar, s, _In_ int, i); DECLARE_STIM_STATIC_TD_METHOD_5(,int, five, _In_ pVoidFunction, pVoid, _In_ unsigned short int, si, _In_ char, c, _In_ pChar, s, _In_ int, i); DECLARE_STIM_STATIC_TD_METHOD_6(,int, six, _In_ char, c1, _In_ char, c2, _In_ char, c3, _In_ char, c4, _In_ char, c5, _In_ char, c6); static int posIndex=0; static int posRecorder[2]; extern "C" void takes1int_1(int i) { if(posIndex<2) { posRecorder[posIndex++]=i; } else { ASSERT_FAIL(_T("too much posIndex for me")); } } extern "C" void takes1int_2(int i) { if(posIndex<2) { posRecorder[posIndex++]=i; } else { ASSERT_FAIL(_T("too much posIndex for me")); } } DECLARE_STIM_STATIC_TD_METHOD_1(,void, takes1int_1, _In_ int, i); DECLARE_STIM_STATIC_TD_METHOD_1(,void, takes1int_2, _In_ int, i); TD_MOCK_CLASS(MyMocks3) { public: STIM_STATIC_TD_METHOD_0(,void, zero); STIM_STATIC_TD_METHOD_0(,int, izero); STIM_STATIC_TD_METHOD_1(,int, one, _In_ int, i); STIM_STATIC_TD_METHOD_2(,int, two, _In_ pChar, s, _In_ int, i); STIM_STATIC_TD_METHOD_3(,int, three, _In_ char, c, _In_ pChar, s, _In_ int, i); STIM_STATIC_TD_METHOD_4(,int, four, _In_ unsigned short int, si, _In_ char, c, _In_ pChar, s, _In_ int, i); STIM_STATIC_TD_METHOD_5(,int, five, _In_ pVoidFunction, pVoid, _In_ unsigned short int, si, _In_ char, c, _In_ pChar, s, _In_ int, i); STIM_STATIC_TD_METHOD_6(,int, six, char, c1, char, c2, char, c3, char, c4, char, c5, char, c6); STIM_STATIC_TD_METHOD_1(,void, takes1int_1, _In_ int, i); STIM_STATIC_TD_METHOD_1(,void, takes1int_2, _In_ int, i); MOCK_STATIC_TD_METHOD_0(, void, whenzero) MOCK_VOID_METHOD_END() MOCK_STATIC_TD_METHOD_0(, int, whenizero) MOCK_METHOD_END(int, 0) MOCK_STATIC_TD_METHOD_1(, int, whenone, _In_ int, i) MOCK_METHOD_END(int, 0) MOCK_STATIC_TD_METHOD_2(, int, whentwo, _In_ pChar, s, _In_ int, i) MOCK_METHOD_END(int, 0) MOCK_STATIC_TD_METHOD_3(, int, whenthree, _In_ char, c, _In_ pChar, s, _In_ int, i); MOCK_METHOD_END(int, 0) MOCK_STATIC_TD_METHOD_4(, int, whenfour, _In_ unsigned short int, si, _In_ char, c, _In_ pChar, s, _In_ int, i); MOCK_METHOD_END(int, 0) MOCK_STATIC_TD_METHOD_5(, int, whenfive, _In_ pVoidFunction, pVoid, _In_ unsigned short int, si, _In_ char, c, _In_ pChar, s, _In_ int, i); MOCK_METHOD_END(int, 0) MOCK_STATIC_TD_METHOD_6(,int, whensix, _In_ char, c1, _In_ char, c2, _In_ char, c3, _In_ char, c4, _In_ char, c5, _In_ char, c6); MOCK_METHOD_END(int, 0) }; DECLARE_GLOBAL_MOCK_METHOD_0(MyMocks3, , void, whenzero) DECLARE_GLOBAL_MOCK_METHOD_0(MyMocks3, , int, whenizero) DECLARE_GLOBAL_MOCK_METHOD_1(MyMocks3, , int, whenone, int, i) DECLARE_GLOBAL_MOCK_METHOD_2(MyMocks3, , int, whentwo, pChar, s, int, i) DECLARE_GLOBAL_MOCK_METHOD_3(MyMocks3, , int, whenthree, char, c, pChar, s, int, i) DECLARE_GLOBAL_MOCK_METHOD_4(MyMocks3, , int, whenfour, unsigned short int, si, char, c, pChar, s, int, i) DECLARE_GLOBAL_MOCK_METHOD_5(MyMocks3, , int, whenfive, pVoidFunction, pVoid, unsigned short int, si, char, c, pChar, s, int, i) DECLARE_GLOBAL_MOCK_METHOD_6(MyMocks3, , int, whensix, char, c1, char, c2, char, c3, char, c4, char, c5, char, c6) TCHAR g_STIM_FunctionThatTakesAStringParameter[2][1000]; /*1000 will be enough for our testing purposes*/ UINT32 g_STIM_FunctionThatTakesAStringParameterCalls=0; void STIM_FunctionThatTakesAString(_In_z_ TCHAR* someString) { if(g_STIM_FunctionThatTakesAStringParameterCalls<2) { _tcscpy_s(g_STIM_FunctionThatTakesAStringParameter[g_STIM_FunctionThatTakesAStringParameterCalls++], someString); } else { ASSERT_FAIL(_T("too many calls / test method")); } } int g_STIM_FunctionThatTakesAPointerToInt[2]; /*1000 will be enough for our testing purposes*/ UINT32 g_STIM_FunctionThatTakesAPointerToIntCalls=0; void STIM_FunctionThatTakesAPointerToInt(_In_ int* a) { if(g_STIM_FunctionThatTakesAPointerToIntCalls<2) { g_STIM_FunctionThatTakesAPointerToInt[g_STIM_FunctionThatTakesAPointerToIntCalls++]=*a; } else { ASSERT_FAIL(_T("too many calls / test method")); } } int g_STIM_FunctionThatTakesAInt[2]; /*1000 will be enough for our testing purposes*/ UINT32 g_STIM_FunctionThatTakesAIntCalls=0; void STIM_FunctionThatTakesAInt(_In_ int a) { if(g_STIM_FunctionThatTakesAIntCalls<2) { g_STIM_FunctionThatTakesAInt[g_STIM_FunctionThatTakesAIntCalls++]=a; } else { ASSERT_FAIL(_T("too many calls / test method")); } } int g_STIM_FunctionThatTakesAnArray[2][10]; bool g_STIM_FunctionThatTakesAnArrayWasParameterNULL=false; int g_STIM_FunctionThatTakesAnArrayNParameters=0; int g_STIM_FunctionThatTakesAnArray_nCalls=0; void STIM_FunctionThatTakesAnArray(_In_reads_opt_(g_STIM_FunctionThatTakesAnArrayNParameters) int* array) { //could very well be: while(array[i]!=0) cout< static std::wstring ToString (const someSortOfT& q) { //return q.getSomeString(); std::string source1(q.getSomeChar()); std::wstring a(source1.begin(), source1.end()); std::string source2(q.getSomeString()); std::wstring b(source2.begin(), source2.end()); std::wstring toBeReturned (a + b); return toBeReturned; } } } } someSortOfT g_STIM_FunctionThatTakesAnArrayOfObjects[10][10]; bool g_STIM_FunctionThatTakesAnArrayOfObjectsWasParameterNULL=false; int g_STIM_FunctionThatTakesAnArrayOfObjectsNParameters=2; int g_STIM_FunctionThatTakesAnArrayOfObjects_nCalls=0; void STIM_FunctionThatTakesAnArrayOfObjects(_In_opt_count_(g_STIM_FunctionThatTakesAnArrayOfObjectsNParameters) someSortOfT* array) { if(array==NULL) { g_STIM_FunctionThatTakesAnArrayOfObjectsWasParameterNULL = true; } else { if(g_STIM_FunctionThatTakesAnArrayOfObjects_nCalls<10) { for(int i=0;i #include <winver.h> #define VER_FILETYPE VFT_APP #define VER_FILESUBTYPE VFT2_UNKNOWN #define VER_FILEDESCRIPTION_STR "Networking UnitTests Library" #define VER_INTERNALNAME_STR "MicroMockTest.Dll" #define VER_ORIGINALFILENAME_STR "MicroMockTest.Dll" #include <common.ver> azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/sal/000077500000000000000000000000001362133436400321535ustar00rootroot00000000000000CMakeLists.txt000066400000000000000000000014061362133436400346350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/sal#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) #these are the include folders #the following "set" statetement exports across the project a global variable called SAL_INC_FOLDER that expands to whatever needs to included when using sal header if(WIN32) #nothing use the default set(SAL_INC_FOLDER "" CACHE INTERNAL "this is what needs to be included if using sal header" FORCE) elseif(UNIX) set(SAL_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "this is what needs to be included if using sal header" FORCE) endif() if(NOT WIN32) add_files_to_install("./testtools/sal/inc/sal.h;./testtools/sal/inc/no_sal2.h") endif() azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/sal/inc/000077500000000000000000000000001362133436400327245ustar00rootroot00000000000000no_sal2.h000066400000000000000000000604331362133436400343610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/sal/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef _NO_SAL_2_H_ #define _NO_SAL_2_H_ #ifdef _When_ #undef _When_ #endif #define _When_(c,a) #ifdef _At_ #undef _At_ #endif #define _At_(t,a) #ifdef _At_buffer_ #undef _At_buffer_ #endif #define _At_buffer_(t,i,c,a) #ifdef _Group_ #undef _Group_ #endif #define _Group_(a) #ifdef _Pre_ #undef _Pre_ #endif #define _Pre_ #ifdef _Post_ #undef _Post_ #endif #define _Post_ #ifdef _Deref_ #undef _Deref_ #endif #define _Deref_ #ifdef _Null_ #undef _Null_ #endif #define _Null_ #ifdef _Notnull_ #undef _Notnull_ #endif #define _Notnull_ #ifdef _Maybenull_ #undef _Maybenull_ #endif #define _Maybenull_ #ifdef _Const_ #undef _Const_ #endif #define _Const_ #ifdef _Check_return_ #undef _Check_return_ #endif #define _Check_return_ #ifdef _Must_inspect_result_ #undef _Must_inspect_result_ #endif #define _Must_inspect_result_ #ifdef _Pre_satisfies_ #undef _Pre_satisfies_ #endif #define _Pre_satisfies_(e) #ifdef _Post_satisfies_ #undef _Post_satisfies_ #endif #define _Post_satisfies_(e) #ifdef _Writable_elements_ #undef _Writable_elements_ #endif #define _Writable_elements_(s) #ifdef _Writable_bytes_ #undef _Writable_bytes_ #endif #define _Writable_bytes_(s) #ifdef _Readable_elements_ #undef _Readable_elements_ #endif #define _Readable_elements_(s) #ifdef _Readable_bytes_ #undef _Readable_bytes_ #endif #define _Readable_bytes_(s) #ifdef _Null_terminated_ #undef _Null_terminated_ #endif #define _Null_terminated_ #ifdef _NullNull_terminated_ #undef _NullNull_terminated_ #endif #define _NullNull_terminated_ #ifdef _Valid_ #undef _Valid_ #endif #define _Valid_ #ifdef _Notvalid_ #undef _Notvalid_ #endif #define _Notvalid_ #ifdef _Success_ #undef _Success_ #endif #define _Success_(c) #ifdef _Return_type_success_ #undef _Return_type_success_ #endif #define _Return_type_success_(c) #ifdef _On_failure_ #undef _On_failure_ #endif #define _On_failure_(a) #ifdef _Always_ #undef _Always_ #endif #define _Always_(a) #ifdef _Use_decl_annotations_ #undef _Use_decl_annotations_ #endif #define _Use_decl_annotations_ #ifdef _Pre_defensive_ #undef _Pre_defensive_ #endif #define _Pre_defensive_ #ifdef _Post_defensive_ #undef _Post_defensive_ #endif #define _Post_defensive_ #ifdef _Pre_unknown_ #undef _Pre_unknown_ #endif #define _Pre_unknown_ #ifdef _Acquires_lock_ #undef _Acquires_lock_ #endif #define _Acquires_lock_(e) #ifdef _Releases_lock_ #undef _Releases_lock_ #endif #define _Releases_lock_(e) #ifdef _Requires_lock_held_ #undef _Requires_lock_held_ #endif #define _Requires_lock_held_(e) #ifdef _Requires_lock_not_held_ #undef _Requires_lock_not_held_ #endif #define _Requires_lock_not_held_(e) #ifdef _Requires_no_locks_held_ #undef _Requires_no_locks_held_ #endif #define _Requires_no_locks_held_ #ifdef _Guarded_by_ #undef _Guarded_by_ #endif #define _Guarded_by_(e) #ifdef _Write_guarded_by_ #undef _Write_guarded_by_ #endif #define _Write_guarded_by_(e) #ifdef _Interlocked_ #undef _Interlocked_ #endif #define _Interlocked_ #ifdef _Post_same_lock_ #undef _Post_same_lock_ #endif #define _Post_same_lock_(e1,e2) #ifdef _Benign_race_begin_ #undef _Benign_race_begin_ #endif #define _Benign_race_begin_ #ifdef _Benign_race_end_ #undef _Benign_race_end_ #endif #define _Benign_race_end_ #ifdef _No_competing_thread_ #undef _No_competing_thread_ #endif #define _No_competing_thread_ #ifdef _No_competing_thread_begin_ #undef _No_competing_thread_begin_ #endif #define _No_competing_thread_begin_ #ifdef _No_competing_thread_end_ #undef _No_competing_thread_end_ #endif #define _No_competing_thread_end_ #ifdef _Acquires_shared_lock_ #undef _Acquires_shared_lock_ #endif #define _Acquires_shared_lock_(e) #ifdef _Releases_shared_lock_ #undef _Releases_shared_lock_ #endif #define _Releases_shared_lock_(e) #ifdef _Requires_shared_lock_held_ #undef _Requires_shared_lock_held_ #endif #define _Requires_shared_lock_held_(e) #ifdef _Acquires_exclusive_lock_ #undef _Acquires_exclusive_lock_ #endif #define _Acquires_exclusive_lock_(e) #ifdef _Releases_exclusive_lock_ #undef _Releases_exclusive_lock_ #endif #define _Releases_exclusive_lock_(e) #ifdef _Requires_exclusive_lock_held_ #undef _Requires_exclusive_lock_held_ #endif #define _Requires_exclusive_lock_held_(e) #ifdef _Has_lock_kind_ #undef _Has_lock_kind_ #endif #define _Has_lock_kind_(n) #ifdef _Create_lock_level_ #undef _Create_lock_level_ #endif #define _Create_lock_level_(n) #ifdef _Has_lock_level_ #undef _Has_lock_level_ #endif #define _Has_lock_level_(n) #ifdef _Lock_level_order_ #undef _Lock_level_order_ #endif #define _Lock_level_order_(n1,n2) #ifdef _Analysis_assume_lock_acquired_ #undef _Analysis_assume_lock_acquired_ #endif #define _Analysis_assume_lock_acquired_(e) #ifdef _Analysis_assume_lock_released_ #undef _Analysis_assume_lock_released_ #endif #define _Analysis_assume_lock_released_(e) #ifdef _Analysis_assume_lock_held_ #undef _Analysis_assume_lock_held_ #endif #define _Analysis_assume_lock_held_(e) #ifdef _Analysis_assume_lock_not_held_ #undef _Analysis_assume_lock_not_held_ #endif #define _Analysis_assume_lock_not_held_(e) #ifdef _Analysis_assume_same_lock_ #undef _Analysis_assume_same_lock_ #endif #define _Analysis_assume_same_lock_(e) #ifdef _In_ #undef _In_ #endif #define _In_ #ifdef _Out_ #undef _Out_ #endif #define _Out_ #ifdef _Inout_ #undef _Inout_ #endif #define _Inout_ #ifdef _In_z_ #undef _In_z_ #endif #define _In_z_ #ifdef _Inout_z_ #undef _Inout_z_ #endif #define _Inout_z_ #ifdef _In_reads_ #undef _In_reads_ #endif #define _In_reads_(s) #ifdef _In_reads_bytes_ #undef _In_reads_bytes_ #endif #define _In_reads_bytes_(s) #ifdef _In_reads_z_ #undef _In_reads_z_ #endif #define _In_reads_z_(s) #ifdef _In_reads_or_z_ #undef _In_reads_or_z_ #endif #define _In_reads_or_z_(s) #ifdef _Out_writes_ #undef _Out_writes_ #endif #define _Out_writes_(s) #ifdef _Out_writes_bytes_ #undef _Out_writes_bytes_ #endif #define _Out_writes_bytes_(s) #ifdef _Out_writes_z_ #undef _Out_writes_z_ #endif #define _Out_writes_z_(s) #ifdef _Inout_updates_ #undef _Inout_updates_ #endif #define _Inout_updates_(s) #ifdef _Inout_updates_bytes_ #undef _Inout_updates_bytes_ #endif #define _Inout_updates_bytes_(s) #ifdef _Inout_updates_z_ #undef _Inout_updates_z_ #endif #define _Inout_updates_z_(s) #ifdef _Out_writes_to_ #undef _Out_writes_to_ #endif #define _Out_writes_to_(s,c) #ifdef _Out_writes_bytes_to_ #undef _Out_writes_bytes_to_ #endif #define _Out_writes_bytes_to_(s,c) #ifdef _Out_writes_all_ #undef _Out_writes_all_ #endif #define _Out_writes_all_(s) #ifdef _Out_writes_bytes_all_ #undef _Out_writes_bytes_all_ #endif #define _Out_writes_bytes_all_(s) #ifdef _Inout_updates_to_ #undef _Inout_updates_to_ #endif #define _Inout_updates_to_(s,c) #ifdef _Inout_updates_bytes_to_ #undef _Inout_updates_bytes_to_ #endif #define _Inout_updates_bytes_to_(s,c) #ifdef _Inout_updates_all_ #undef _Inout_updates_all_ #endif #define _Inout_updates_all_(s) #ifdef _Inout_updates_bytes_all_ #undef _Inout_updates_bytes_all_ #endif #define _Inout_updates_bytes_all_(s) #ifdef _In_reads_to_ptr_ #undef _In_reads_to_ptr_ #endif #define _In_reads_to_ptr_(p) #ifdef _In_reads_to_ptr_z_ #undef _In_reads_to_ptr_z_ #endif #define _In_reads_to_ptr_z_(p) #ifdef _Out_writes_to_ptr_ #undef _Out_writes_to_ptr_ #endif #define _Out_writes_to_ptr_(p) #ifdef _Out_writes_to_ptr_z_ #undef _Out_writes_to_ptr_z_ #endif #define _Out_writes_to_ptr_z_(p) #ifdef _In_opt_ #undef _In_opt_ #endif #define _In_opt_ #ifdef _Out_opt_ #undef _Out_opt_ #endif #define _Out_opt_ #ifdef _Inout_opt_ #undef _Inout_opt_ #endif #define _Inout_opt_ #ifdef _In_opt_z_ #undef _In_opt_z_ #endif #define _In_opt_z_ #ifdef _Inout_opt_z_ #undef _Inout_opt_z_ #endif #define _Inout_opt_z_ #ifdef _In_reads_opt_ #undef _In_reads_opt_ #endif #define _In_reads_opt_(s) #ifdef _In_reads_opt_z_ #undef _In_reads_opt_z_ #endif #define _In_reads_opt_z_(s) #ifdef _In_reads_bytes_opt_ #undef _In_reads_bytes_opt_ #endif #define _In_reads_bytes_opt_(s) #ifdef _Out_writes_opt_ #undef _Out_writes_opt_ #endif #define _Out_writes_opt_(s) #ifdef _Out_writes_bytes_opt_ #undef _Out_writes_bytes_opt_ #endif #define _Out_writes_bytes_opt_(s) #ifdef _Out_writes_opt_z_ #undef _Out_writes_opt_z_ #endif #define _Out_writes_opt_z_(s) #ifdef _Inout_updates_opt_ #undef _Inout_updates_opt_ #endif #define _Inout_updates_opt_(s) #ifdef _Inout_updates_bytes_opt_ #undef _Inout_updates_bytes_opt_ #endif #define _Inout_updates_bytes_opt_(s) #ifdef _Inout_updates_opt_z_ #undef _Inout_updates_opt_z_ #endif #define _Inout_updates_opt_z_(s) #ifdef _Out_writes_to_opt_ #undef _Out_writes_to_opt_ #endif #define _Out_writes_to_opt_(s,c) #ifdef _Out_writes_bytes_to_opt_ #undef _Out_writes_bytes_to_opt_ #endif #define _Out_writes_bytes_to_opt_(s,c) #ifdef _Out_writes_all_opt_ #undef _Out_writes_all_opt_ #endif #define _Out_writes_all_opt_(s) #ifdef _Out_writes_bytes_all_opt_ #undef _Out_writes_bytes_all_opt_ #endif #define _Out_writes_bytes_all_opt_(s) #ifdef _Inout_updates_to_opt_ #undef _Inout_updates_to_opt_ #endif #define _Inout_updates_to_opt_(s,c) #ifdef _Inout_updates_bytes_to_opt_ #undef _Inout_updates_bytes_to_opt_ #endif #define _Inout_updates_bytes_to_opt_(s,c) #ifdef _Inout_updates_all_opt_ #undef _Inout_updates_all_opt_ #endif #define _Inout_updates_all_opt_(s) #ifdef _Inout_updates_bytes_all_opt_ #undef _Inout_updates_bytes_all_opt_ #endif #define _Inout_updates_bytes_all_opt_(s) #ifdef _In_reads_to_ptr_opt_ #undef _In_reads_to_ptr_opt_ #endif #define _In_reads_to_ptr_opt_(p) #ifdef _In_reads_to_ptr_opt_z_ #undef _In_reads_to_ptr_opt_z_ #endif #define _In_reads_to_ptr_opt_z_(p) #ifdef _Out_writes_to_ptr_opt_ #undef _Out_writes_to_ptr_opt_ #endif #define _Out_writes_to_ptr_opt_(p) #ifdef _Out_writes_to_ptr_opt_z_ #undef _Out_writes_to_ptr_opt_z_ #endif #define _Out_writes_to_ptr_opt_z_(p) #ifdef _Outptr_ #undef _Outptr_ #endif #define _Outptr_ #ifdef _Outptr_opt_ #undef _Outptr_opt_ #endif #define _Outptr_opt_ #ifdef _Outptr_result_maybenull_ #undef _Outptr_result_maybenull_ #endif #define _Outptr_result_maybenull_ #ifdef _Outptr_opt_result_maybenull_ #undef _Outptr_opt_result_maybenull_ #endif #define _Outptr_opt_result_maybenull_ #ifdef _Outptr_result_z_ #undef _Outptr_result_z_ #endif #define _Outptr_result_z_ #ifdef _Outptr_opt_result_z_ #undef _Outptr_opt_result_z_ #endif #define _Outptr_opt_result_z_ #ifdef _Outptr_result_maybenull_z_ #undef _Outptr_result_maybenull_z_ #endif #define _Outptr_result_maybenull_z_ #ifdef _Outptr_opt_result_maybenull_z_ #undef _Outptr_opt_result_maybenull_z_ #endif #define _Outptr_opt_result_maybenull_z_ #ifdef _COM_Outptr_ #undef _COM_Outptr_ #endif #define _COM_Outptr_ #ifdef _COM_Outptr_opt_ #undef _COM_Outptr_opt_ #endif #define _COM_Outptr_opt_ #ifdef _COM_Outptr_result_maybenull_ #undef _COM_Outptr_result_maybenull_ #endif #define _COM_Outptr_result_maybenull_ #ifdef _COM_Outptr_opt_result_maybenull_ #undef _COM_Outptr_opt_result_maybenull_ #endif #define _COM_Outptr_opt_result_maybenull_ #ifdef _Outptr_result_buffer_ #undef _Outptr_result_buffer_ #endif #define _Outptr_result_buffer_(s) #ifdef _Outptr_result_buffer_maybenull_ #undef _Outptr_result_buffer_maybenull_ #endif #define _Outptr_result_buffer_maybenull_(s) #ifdef _Outptr_result_bytebuffer_ #undef _Outptr_result_bytebuffer_ #endif #define _Outptr_result_bytebuffer_(s) #ifdef _Outptr_result_bytebuffer_maybenull_ #undef _Outptr_result_bytebuffer_maybenull_ #endif #define _Outptr_result_bytebuffer_maybenull_(s) #ifdef _Outptr_opt_result_buffer_ #undef _Outptr_opt_result_buffer_ #endif #define _Outptr_opt_result_buffer_(s) #ifdef _Outptr_opt_result_buffer_maybenull_ #undef _Outptr_opt_result_buffer_maybenull_ #endif #define _Outptr_opt_result_buffer_maybenull_(s) #ifdef _Outptr_opt_result_bytebuffer_ #undef _Outptr_opt_result_bytebuffer_ #endif #define _Outptr_opt_result_bytebuffer_(s) #ifdef _Outptr_opt_result_bytebuffer_maybenull_ #undef _Outptr_opt_result_bytebuffer_maybenull_ #endif #define _Outptr_opt_result_bytebuffer_maybenull_(s) #ifdef _Outptr_result_buffer_to_ #undef _Outptr_result_buffer_to_ #endif #define _Outptr_result_buffer_to_(s,c) #ifdef _Outptr_result_bytebuffer_to_ #undef _Outptr_result_bytebuffer_to_ #endif #define _Outptr_result_bytebuffer_to_(s,c) #ifdef _Outptr_opt_result_buffer_to_ #undef _Outptr_opt_result_buffer_to_ #endif #define _Outptr_opt_result_buffer_to_(s,c) #ifdef _Outptr_opt_result_bytebuffer_to_ #undef _Outptr_opt_result_bytebuffer_to_ #endif #define _Outptr_opt_result_bytebuffer_to_(s,c) #ifdef _Ret_ #undef _Ret_ #endif #define _Ret_ #ifdef _Ret_valid_ #undef _Ret_valid_ #endif #define _Ret_valid_ #ifdef _Ret_z_ #undef _Ret_z_ #endif #define _Ret_z_ #ifdef _Ret_writes_ #undef _Ret_writes_ #endif #define _Ret_writes_(s) #ifdef _Ret_writes_bytes_ #undef _Ret_writes_bytes_ #endif #define _Ret_writes_bytes_(s) #ifdef _Ret_writes_z_ #undef _Ret_writes_z_ #endif #define _Ret_writes_z_(s) #ifdef _Ret_writes_to_ #undef _Ret_writes_to_ #endif #define _Ret_writes_to_(s,c) #ifdef _Ret_writes_bytes_to_ #undef _Ret_writes_bytes_to_ #endif #define _Ret_writes_bytes_to_(s,c) #ifdef _Ret_writes_to_ptr_ #undef _Ret_writes_to_ptr_ #endif #define _Ret_writes_to_ptr_(p) #ifdef _Ret_writes_to_ptr_z_ #undef _Ret_writes_to_ptr_z_ #endif #define _Ret_writes_to_ptr_z_(p) #ifdef _Ret_writes_maybenull_ #undef _Ret_writes_maybenull_ #endif #define _Ret_writes_maybenull_(s) #ifdef _Ret_writes_bytes_maybenull_ #undef _Ret_writes_bytes_maybenull_ #endif #define _Ret_writes_bytes_maybenull_(s) #ifdef _Ret_writes_to_maybenull_ #undef _Ret_writes_to_maybenull_ #endif #define _Ret_writes_to_maybenull_(s,c) #ifdef _Ret_writes_bytes_to_maybenull_ #undef _Ret_writes_bytes_to_maybenull_ #endif #define _Ret_writes_bytes_to_maybenull_(s,c) #ifdef _Ret_writes_maybenull_z_ #undef _Ret_writes_maybenull_z_ #endif #define _Ret_writes_maybenull_z_(s) #ifdef _Ret_null_ #undef _Ret_null_ #endif #define _Ret_null_ #ifdef _Ret_notnull_ #undef _Ret_notnull_ #endif #define _Ret_notnull_ #ifdef _Ret_maybenull_ #undef _Ret_maybenull_ #endif #define _Ret_maybenull_ #ifdef _Ret_maybenull_z_ #undef _Ret_maybenull_z_ #endif #define _Ret_maybenull_z_ #ifdef _Field_size_ #undef _Field_size_ #endif #define _Field_size_(s) #ifdef _Field_size_opt_ #undef _Field_size_opt_ #endif #define _Field_size_opt_(s) #ifdef _Field_size_bytes_ #undef _Field_size_bytes_ #endif #define _Field_size_bytes_(s) #ifdef _Field_size_bytes_opt_ #undef _Field_size_bytes_opt_ #endif #define _Field_size_bytes_opt_(s) #ifdef _Field_size_part_ #undef _Field_size_part_ #endif #define _Field_size_part_(s,c) #ifdef _Field_size_part_opt_ #undef _Field_size_part_opt_ #endif #define _Field_size_part_opt_(s,c) #ifdef _Field_size_bytes_part_ #undef _Field_size_bytes_part_ #endif #define _Field_size_bytes_part_(s,c) #ifdef _Field_size_bytes_part_opt_ #undef _Field_size_bytes_part_opt_ #endif #define _Field_size_bytes_part_opt_(s,c) #ifdef _Field_size_full_ #undef _Field_size_full_ #endif #define _Field_size_full_(s) #ifdef _Field_size_full_opt_ #undef _Field_size_full_opt_ #endif #define _Field_size_full_opt_(s) #ifdef _Field_size_bytes_full_ #undef _Field_size_bytes_full_ #endif #define _Field_size_bytes_full_(s) #ifdef _Field_size_bytes_full_opt_ #undef _Field_size_bytes_full_opt_ #endif #define _Field_size_bytes_full_opt_(s) #ifdef _Printf_format_string_ #undef _Printf_format_string_ #endif #define _Printf_format_string_ #ifdef _Scanf_format_string_ #undef _Scanf_format_string_ #endif #define _Scanf_format_string_ #ifdef _Scanf_s_format_string_ #undef _Scanf_s_format_string_ #endif #define _Scanf_s_format_string_ #ifdef _Printf_format_string_params_ #undef _Printf_format_string_params_ #endif #define _Printf_format_string_params_(x) #ifdef _Scanf_format_string_params_ #undef _Scanf_format_string_params_ #endif #define _Scanf_format_string_params_(x) #ifdef _Scanf_s_format_string_params_ #undef _Scanf_s_format_string_params_ #endif #define _Scanf_s_format_string_params_(x) #ifdef _In_range_ #undef _In_range_ #endif #define _In_range_(l,h) #ifdef _Out_range_ #undef _Out_range_ #endif #define _Out_range_(l,h) #ifdef _Ret_range_ #undef _Ret_range_ #endif #define _Ret_range_(l,h) #ifdef _Deref_in_range_ #undef _Deref_in_range_ #endif #define _Deref_in_range_(l,h) #ifdef _Deref_out_range_ #undef _Deref_out_range_ #endif #define _Deref_out_range_(l,h) #ifdef _Deref_inout_range_ #undef _Deref_inout_range_ #endif #define _Deref_inout_range_(l,h) #ifdef _Field_range_ #undef _Field_range_ #endif #define _Field_range_(l,h) #ifdef _Pre_equal_to_ #undef _Pre_equal_to_ #endif #define _Pre_equal_to_(e) #ifdef _Post_equal_to_ #undef _Post_equal_to_ #endif #define _Post_equal_to_(e) #ifdef _Struct_size_bytes_ #undef _Struct_size_bytes_ #endif #define _Struct_size_bytes_(s) #ifdef _Analysis_assume_ #undef _Analysis_assume_ #endif #define _Analysis_assume_ #ifdef _Analysis_assume_nullterminated_ #undef _Analysis_assume_nullterminated_ #endif #define _Analysis_assume_nullterminated_(s) #ifdef _Analysis_mode_ #undef _Analysis_mode_ #endif #define _Analysis_mode_(m) #ifdef _Analysis_noreturn_ #undef _Analysis_noreturn_ #endif #define _Analysis_noreturn_ #ifdef _Raises_SEH_exception_ #undef _Raises_SEH_exception_ #endif #define _Raises_SEH_exception_ #ifdef _Maybe_raises_SEH_exception_ #undef _Maybe_raises_SEH_exception_ #endif #define _Maybe_raises_SEH_exception_ #ifdef _Function_class_ #undef _Function_class_ #endif #define _Function_class_(n) #ifdef _Literal_ #undef _Literal_ #endif #define _Literal_ #ifdef _Notliteral_ #undef _Notliteral_ #endif #define _Notliteral_ #ifdef _Enum_is_bitflag_ #undef _Enum_is_bitflag_ #endif #define _Enum_is_bitflag_ #ifdef _Strict_type_match_ #undef _Strict_type_match_ #endif #define _Strict_type_match_ #ifdef _Points_to_data_ #undef _Points_to_data_ #endif #define _Points_to_data_ #ifdef _Interlocked_operand_ #undef _Interlocked_operand_ #endif #define _Interlocked_operand_ #ifdef _IRQL_raises_ #undef _IRQL_raises_ #endif #define _IRQL_raises_(i) #ifdef _IRQL_requires_ #undef _IRQL_requires_ #endif #define _IRQL_requires_(i) #ifdef _IRQL_requires_max_ #undef _IRQL_requires_max_ #endif #define _IRQL_requires_max_(i) #ifdef _IRQL_requires_min_ #undef _IRQL_requires_min_ #endif #define _IRQL_requires_min_(i) #ifdef _IRQL_saves_ #undef _IRQL_saves_ #endif #define _IRQL_saves_ #ifdef _IRQL_saves_global_ #undef _IRQL_saves_global_ #endif #define _IRQL_saves_global_(k,s) #ifdef _IRQL_restores_ #undef _IRQL_restores_ #endif #define _IRQL_restores_ #ifdef _IRQL_restores_global_ #undef _IRQL_restores_global_ #endif #define _IRQL_restores_global_(k,s) #ifdef _IRQL_always_function_min_ #undef _IRQL_always_function_min_ #endif #define _IRQL_always_function_min_(i) #ifdef _IRQL_always_function_max_ #undef _IRQL_always_function_max_ #endif #define _IRQL_always_function_max_(i) #ifdef _IRQL_requires_same_ #undef _IRQL_requires_same_ #endif #define _IRQL_requires_same_ #ifdef _IRQL_uses_cancel_ #undef _IRQL_uses_cancel_ #endif #define _IRQL_uses_cancel_ #ifdef _IRQL_is_cancel_ #undef _IRQL_is_cancel_ #endif #define _IRQL_is_cancel_ #ifdef _Kernel_float_saved_ #undef _Kernel_float_saved_ #endif #define _Kernel_float_saved_ #ifdef _Kernel_float_restored_ #undef _Kernel_float_restored_ #endif #define _Kernel_float_restored_ #ifdef _Kernel_float_used_ #undef _Kernel_float_used_ #endif #define _Kernel_float_used_ #ifdef _Kernel_acquires_resource_ #undef _Kernel_acquires_resource_ #endif #define _Kernel_acquires_resource_(k) #ifdef _Kernel_releases_resource_ #undef _Kernel_releases_resource_ #endif #define _Kernel_releases_resource_(k) #ifdef _Kernel_requires_resource_held_ #undef _Kernel_requires_resource_held_ #endif #define _Kernel_requires_resource_held_(k) #ifdef _Kernel_requires_resource_not_held_ #undef _Kernel_requires_resource_not_held_ #endif #define _Kernel_requires_resource_not_held_(k) #ifdef _Kernel_clear_do_init_ #undef _Kernel_clear_do_init_ #endif #define _Kernel_clear_do_init_(yn) #ifdef _Kernel_IoGetDmaAdapter_ #undef _Kernel_IoGetDmaAdapter_ #endif #define _Kernel_IoGetDmaAdapter_ #ifdef _Outref_ #undef _Outref_ #endif #define _Outref_ #ifdef _Outref_result_maybenull_ #undef _Outref_result_maybenull_ #endif #define _Outref_result_maybenull_ #ifdef _Outref_result_buffer_ #undef _Outref_result_buffer_ #endif #define _Outref_result_buffer_(s) #ifdef _Outref_result_bytebuffer_ #undef _Outref_result_bytebuffer_ #endif #define _Outref_result_bytebuffer_(s) #ifdef _Outref_result_buffer_to_ #undef _Outref_result_buffer_to_ #endif #define _Outref_result_buffer_to_(s,c) #ifdef _Outref_result_bytebuffer_to_ #undef _Outref_result_bytebuffer_to_ #endif #define _Outref_result_bytebuffer_to_(s,c) #ifdef _Outref_result_buffer_all_ #undef _Outref_result_buffer_all_ #endif #define _Outref_result_buffer_all_(s) #ifdef _Outref_result_bytebuffer_all_ #undef _Outref_result_bytebuffer_all_ #endif #define _Outref_result_bytebuffer_all_(s) #ifdef _Outref_result_buffer_maybenull_ #undef _Outref_result_buffer_maybenull_ #endif #define _Outref_result_buffer_maybenull_(s) #ifdef _Outref_result_bytebuffer_maybenull_ #undef _Outref_result_bytebuffer_maybenull_ #endif #define _Outref_result_bytebuffer_maybenull_(s) #ifdef _Outref_result_buffer_to_maybenull_ #undef _Outref_result_buffer_to_maybenull_ #endif #define _Outref_result_buffer_to_maybenull_(s,c) #ifdef _Outref_result_bytebuffer_to_maybenull_ #undef _Outref_result_bytebuffer_to_maybenull_ #endif #define _Outref_result_bytebuffer_to_maybenull_(s,c) #ifdef _Outref_result_buffer_all_maybenull_ #undef _Outref_result_buffer_all_maybenull_ #endif #define _Outref_result_buffer_all_maybenull_(s) #ifdef _Outref_result_bytebuffer_all_maybenull_ #undef _Outref_result_bytebuffer_all_maybenull_ #endif #define _Outref_result_bytebuffer_all_maybenull_(s) #ifdef _In_defensive_ #undef _In_defensive_ #endif #define _In_defensive_(a) #ifdef _Out_defensive_ #undef _Out_defensive_ #endif #define _Out_defensive_(a) #ifdef _Inout_defensive_ #undef _Inout_defensive_ #endif #define _Inout_defensive_(a) #ifdef _Outptr_result_nullonfailure_ #undef _Outptr_result_nullonfailure_ #endif #define _Outptr_result_nullonfailure_ #ifdef _Outptr_opt_result_nullonfailure_ #undef _Outptr_opt_result_nullonfailure_ #endif #define _Outptr_opt_result_nullonfailure_ #ifdef _Outref_result_nullonfailure_ #undef _Outref_result_nullonfailure_ #endif #define _Outref_result_nullonfailure_ #ifdef _Result_nullonfailure_ #undef _Result_nullonfailure_ #endif #define _Result_nullonfailure_ #ifdef _Result_zeroonfailure_ #undef _Result_zeroonfailure_ #endif #define _Result_zeroonfailure_ #ifdef _Acquires_nonreentrant_lock_ #undef _Acquires_nonreentrant_lock_ #endif #define _Acquires_nonreentrant_lock_(e) #ifdef _Releases_nonreentrant_lock_ #undef _Releases_nonreentrant_lock_ #endif #define _Releases_nonreentrant_lock_(e) #ifdef _Function_ignore_lock_checking_ #undef _Function_ignore_lock_checking_ #endif #define _Function_ignore_lock_checking_(e) #ifdef _Analysis_suppress_lock_checking_ #undef _Analysis_suppress_lock_checking_ #endif #define _Analysis_suppress_lock_checking_(e) #undef _Reserved_ #define _Reserved_ _Pre_equal_to_(0) _Pre_ _Null_ #undef _Pre_z_ #define _Pre_z_ _Pre_ _Null_terminated_ #undef _Post_z_ #define _Post_z_ _Post_ _Null_terminated_ #undef _Prepost_z_ #define _Prepost_z_ _Pre_z_ _Post_z_ #undef _Pre_null_ #define _Pre_null_ _Pre_ _Null_ #undef _Pre_maybenull_ #define _Pre_maybenull_ _Pre_ _Maybenull_ #undef _Pre_notnull_ #define _Pre_notnull_ _Pre_ _Notnull_ #undef _Pre_valid_ #define _Pre_valid_ _Pre_notnull_ _Pre_ _Valid_ #undef _Pre_opt_valid_ #define _Pre_opt_valid_ _Pre_maybenull_ _Pre_ _Valid_ #undef _Post_valid_ #define _Post_valid_ _Post_ _Valid_ #undef _Post_invalid_ #define _Post_invalid_ _Post_ _Deref_ _Notvalid_ #undef _Post_ptr_invalid_ #define _Post_ptr_invalid_ _Post_ _Notvalid_ #undef _Pre_readable_size_ #define _Pre_readable_size_(s) _Pre_ _Readable_elements_(s) _Pre_ _Valid_ #undef _Pre_writable_size_ #define _Pre_writable_size_(s) _Pre_ _Writable_elements_(s) #undef _Pre_readable_byte_size_ #define _Pre_readable_byte_size_(s) _Pre_ _Readable_bytes_(s) _Pre_ _Valid_ #undef _Pre_writable_byte_size_ #define _Pre_writable_byte_size_(s) _Pre_ _Writable_bytes_(s) #undef _Post_readable_size_ #define _Post_readable_size_(s) _Post_ _Readable_elements_(s) _Post_ _Valid_ #undef _Post_writable_size_ #define _Post_writable_size_(s) _Post_ _Writable_elements_(s) #undef _Post_readable_byte_size_ #define _Post_readable_byte_size_(s) _Post_ _Readable_bytes_(s) _Post_ _Valid_ #undef _Post_writable_byte_size_ #define _Post_writable_byte_size_(s) _Post_ _Writable_bytes_(s) #endif /* _NO_SAL_2_H_ */ sal.h000066400000000000000000000003221362133436400335720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/sal/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef SAL_H #define SAL_H #include "no_sal2.h" #endif azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/000077500000000000000000000000001362133436400336055ustar00rootroot00000000000000.gitignore000066400000000000000000000004321362133436400355150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner################################################################################ # This .gitignore file was automatically created by Microsoft(R) Visual Studio. ################################################################################ /cmake/** /build/** *.jar /.vscodeCMakeLists.txt000066400000000000000000000063641362133436400362770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(TARGET testrunnerswitcher) RETURN() endif() project(testrunnerswitcher) set(TESTRUNNER_VERSION 1.1.19) # Build with -fPIC always set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) include (CTest) option(run_valgrind "set run_valgrind to ON if tests are to be run under valgrind/helgrind/drd. Default is OFF" OFF) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "--std=c99 ${CMAKE_C_FLAGS}") set (CMAKE_CXX_FLAGS "--std=c++11 ${CMAKE_CXX_FLAGS}") endif() else() set (CMAKE_C_STANDARD 99) set (CMAKE_CXX_STANDARD 11) endif() set(testrunnerswitcher_c_files ./src/testmutex.c ) set(testrunnerswitcher_h_files ./inc/testrunnerswitcher.h ./inc/testmutex.h ) add_library(testrunnerswitcher ${testrunnerswitcher_c_files} ${testrunnerswitcher_h_files}) set_target_properties(testrunnerswitcher PROPERTIES FOLDER "test_tools") #these are the include folders #the following "set" statetement exports across the project a global variable called TESTRUNNERSWITCHER_INC_FOLDER that expands to whatever needs to included when using tesrtrunnerswitcher library set(TESTRUNNERSWITCHER_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "this is what needs to be included if using testrunnerswitcher header" FORCE) include_directories(${TESTRUNNERSWITCHER_INC_FOLDER}) set(INSTALL_H_FILES ${INSTALL_H_FILES} "./testtools/testrunnerswitcher/inc/testrunnerswitcher.h" CACHE INTERNAL "Files that will be installed on the system") set(INSTALL_H_FILES ${INSTALL_H_FILES} "./testtools/testrunnerswitcher/inc/testmutex.h" CACHE INTERNAL "Files that will be installed on the system") set(INSTALL_H_FILES ${INSTALL_H_FILES} "./testtools/testrunnerswitcher/inc/macro_utils.h" CACHE INTERNAL "Files that will be installed on the system") # Set CMAKE_INSTALL_* if not defined include(GNUInstallDirs) if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() # Install Azure Test Runner Switcher set(package_location "cmake") install (TARGETS testrunnerswitcher EXPORT testrunnerswitcherTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install (FILES ${testrunnerswitcher_h_files} "./inc/macro_utils.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) include(CMakePackageConfigHelpers) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" VERSION ${TESTRUNNER_VERSION} COMPATIBILITY SameMajorVersion ) configure_file("configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" COPYONLY ) install(EXPORT testrunnerswitcherTargets FILE "${PROJECT_NAME}Targets.cmake" DESTINATION ${package_location} ) install( FILES "configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION ${package_location} ) configs/000077500000000000000000000000001362133436400351565ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunnertestrunnerswitcherConfig.cmake000066400000000000000000000006161362133436400432730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. include("${CMAKE_CURRENT_LIST_DIR}/testrunnerswitcherTargets.cmake") get_target_property(TESTRUNNERSWITCHER_INCLUDES testrunnerswitcher INTERFACE_INCLUDE_DIRECTORIES) set(TESTRUNNERSWITCHER_INCLUDES ${TESTRUNNERSWITCHER_INCLUDES} CACHE INTERNAL "")inc/000077500000000000000000000000001362133436400342775ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunnermacro_utils.h000066400000000000000000023662431362133436400370110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*THIS FILE IS GENERATED*/ /*DO NOT EDIT BY HAND!!!*/ /*instead edit macro_utils.tt here: http://www.github.com/azure/azure-macro-utils-c.git */ /*and then propagate the generated file to all the repos*/ /* !!! CAUTION!!! This file is copied to multiple places */ /* in https://github.com/Azure/azure-c-shared-utility.git, */ /* and all of these copies must be located and replaced. */ #ifndef MACRO_UTILS_H #define MACRO_UTILS_H #include #if (defined OPTIMIZE_RETURN_CODES) #define __FAILURE__ 1 #else #define __FAILURE__ __LINE__ #endif /*"pointer or NULL" macro - because when printf-ing arguments NULL is not valid for %s (section 7.1.4 of C11 standard) */ #define P_OR_NULL(p) (((p)!=NULL)?(p):"NULL") #define TOSTRING_(x) #x #define TOSTRING(x) TOSTRING_(x) #define IFCOMMA(N) C2(IFCOMMA_, N) #define IFCOMMA_0 #define IFCOMMA_2 #define IFCOMMA_4 , #define IFCOMMA_6 , #define IFCOMMA_8 , #define IFCOMMA_10 , #define IFCOMMA_12 , #define IFCOMMA_14 , #define IFCOMMA_16 , #define IFCOMMA_18 , #define IFCOMMA_20 , #define IFCOMMA_22 , #define IFCOMMA_24 , #define IFCOMMA_26 , #define IFCOMMA_28 , #define IFCOMMA_30 , #define IFCOMMA_32 , #define IFCOMMA_34 , #define IFCOMMA_36 , #define IFCOMMA_38 , #define IFCOMMA_40 , #define IFCOMMA_42 , #define IFCOMMA_44 , #define IFCOMMA_46 , #define IFCOMMA_48 , #define IFCOMMA_50 , #define IFCOMMA_52 , #define IFCOMMA_54 , #define IFCOMMA_56 , #define IFCOMMA_58 , #define IFCOMMA_60 , #define IFCOMMA_62 , #define IFCOMMA_64 , #define IFCOMMA_66 , #define IFCOMMA_68 , #define IFCOMMA_70 , #define IFCOMMA_72 , #define IFCOMMA_74 , #define IFCOMMA_76 , #define IFCOMMA_78 , #define IFCOMMA_80 , #define IFCOMMA_82 , #define IFCOMMA_84 , #define IFCOMMA_86 , #define IFCOMMA_88 , #define IFCOMMA_90 , #define IFCOMMA_92 , #define IFCOMMA_94 , #define IFCOMMA_96 , #define IFCOMMA_98 , #define IFCOMMA_100 , #define IFCOMMA_102 , #define IFCOMMA_104 , #define IFCOMMA_106 , #define IFCOMMA_108 , #define IFCOMMA_110 , #define IFCOMMA_112 , #define IFCOMMA_114 , #define IFCOMMA_116 , #define IFCOMMA_118 , #define IFCOMMA_120 , #define IFCOMMA_122 , #define IFCOMMA_124 , #define IFCOMMA_NOFIRST(N) C2(IFCOMMA_NOFIRST, N) #define IFCOMMA_NOFIRST1 #define IFCOMMA_NOFIRST2 , #define IFCOMMA_NOFIRST3 , #define IFCOMMA_NOFIRST4 , #define IFCOMMA_NOFIRST5 , #define IFCOMMA_NOFIRST6 , #define IFCOMMA_NOFIRST7 , #define IFCOMMA_NOFIRST8 , #define IFCOMMA_NOFIRST9 , #define IFCOMMA_NOFIRST10 , #define IFCOMMA_NOFIRST11 , #define IFCOMMA_NOFIRST12 , #define IFCOMMA_NOFIRST13 , #define IFCOMMA_NOFIRST14 , #define IFCOMMA_NOFIRST15 , #define IFCOMMA_NOFIRST16 , #define IFCOMMA_NOFIRST17 , #define IFCOMMA_NOFIRST18 , #define IFCOMMA_NOFIRST19 , #define IFCOMMA_NOFIRST20 , #define IFCOMMA_NOFIRST21 , #define IFCOMMA_NOFIRST22 , #define IFCOMMA_NOFIRST23 , #define IFCOMMA_NOFIRST24 , #define IFCOMMA_NOFIRST25 , #define IFCOMMA_NOFIRST26 , #define IFCOMMA_NOFIRST27 , #define IFCOMMA_NOFIRST28 , #define IFCOMMA_NOFIRST29 , #define IFCOMMA_NOFIRST30 , #define IFCOMMA_NOFIRST31 , #define IFCOMMA_NOFIRST32 , #define IFCOMMA_NOFIRST33 , #define IFCOMMA_NOFIRST34 , #define IFCOMMA_NOFIRST35 , #define IFCOMMA_NOFIRST36 , #define IFCOMMA_NOFIRST37 , #define IFCOMMA_NOFIRST38 , #define IFCOMMA_NOFIRST39 , #define IFCOMMA_NOFIRST40 , #define IFCOMMA_NOFIRST41 , #define IFCOMMA_NOFIRST42 , #define IFCOMMA_NOFIRST43 , #define IFCOMMA_NOFIRST44 , #define IFCOMMA_NOFIRST45 , #define IFCOMMA_NOFIRST46 , #define IFCOMMA_NOFIRST47 , #define IFCOMMA_NOFIRST48 , #define IFCOMMA_NOFIRST49 , #define IFCOMMA_NOFIRST50 , #define IFCOMMA_NOFIRST51 , #define IFCOMMA_NOFIRST52 , #define IFCOMMA_NOFIRST53 , #define IFCOMMA_NOFIRST54 , #define IFCOMMA_NOFIRST55 , #define IFCOMMA_NOFIRST56 , #define IFCOMMA_NOFIRST57 , #define IFCOMMA_NOFIRST58 , #define IFCOMMA_NOFIRST59 , #define IFCOMMA_NOFIRST60 , #define IFCOMMA_NOFIRST61 , #define IFCOMMA_NOFIRST62 , #define IFCOMMA_NOFIRST63 , #define IFCOMMA_NOFIRST64 , #define IFCOMMA_NOFIRST65 , #define IFCOMMA_NOFIRST66 , #define IFCOMMA_NOFIRST67 , #define IFCOMMA_NOFIRST68 , #define IFCOMMA_NOFIRST69 , #define IFCOMMA_NOFIRST70 , #define IFCOMMA_NOFIRST71 , #define IFCOMMA_NOFIRST72 , #define IFCOMMA_NOFIRST73 , #define IFCOMMA_NOFIRST74 , #define IFCOMMA_NOFIRST75 , #define IFCOMMA_NOFIRST76 , #define IFCOMMA_NOFIRST77 , #define IFCOMMA_NOFIRST78 , #define IFCOMMA_NOFIRST79 , #define IFCOMMA_NOFIRST80 , #define IFCOMMA_NOFIRST81 , #define IFCOMMA_NOFIRST82 , #define IFCOMMA_NOFIRST83 , #define IFCOMMA_NOFIRST84 , #define IFCOMMA_NOFIRST85 , #define IFCOMMA_NOFIRST86 , #define IFCOMMA_NOFIRST87 , #define IFCOMMA_NOFIRST88 , #define IFCOMMA_NOFIRST89 , #define IFCOMMA_NOFIRST90 , #define IFCOMMA_NOFIRST91 , #define IFCOMMA_NOFIRST92 , #define IFCOMMA_NOFIRST93 , #define IFCOMMA_NOFIRST94 , #define IFCOMMA_NOFIRST95 , #define IFCOMMA_NOFIRST96 , #define IFCOMMA_NOFIRST97 , #define IFCOMMA_NOFIRST98 , #define IFCOMMA_NOFIRST99 , #define IFCOMMA_NOFIRST100 , #define IFCOMMA_NOFIRST101 , #define IFCOMMA_NOFIRST102 , #define IFCOMMA_NOFIRST103 , #define IFCOMMA_NOFIRST104 , #define IFCOMMA_NOFIRST105 , #define IFCOMMA_NOFIRST106 , #define IFCOMMA_NOFIRST107 , #define IFCOMMA_NOFIRST108 , #define IFCOMMA_NOFIRST109 , #define IFCOMMA_NOFIRST110 , #define IFCOMMA_NOFIRST111 , #define IFCOMMA_NOFIRST112 , #define IFCOMMA_NOFIRST113 , #define IFCOMMA_NOFIRST114 , #define IFCOMMA_NOFIRST115 , #define IFCOMMA_NOFIRST116 , #define IFCOMMA_NOFIRST117 , #define IFCOMMA_NOFIRST118 , #define IFCOMMA_NOFIRST119 , #define IFCOMMA_NOFIRST120 , #define IFCOMMA_NOFIRST121 , #define IFCOMMA_NOFIRST122 , #define IFCOMMA_NOFIRST123 , #define IFCOMMA_NOFIRST124 , #define DEC(x) C2(DEC,x) #define DEC1024 1023 #define DEC1023 1022 #define DEC1022 1021 #define DEC1021 1020 #define DEC1020 1019 #define DEC1019 1018 #define DEC1018 1017 #define DEC1017 1016 #define DEC1016 1015 #define DEC1015 1014 #define DEC1014 1013 #define DEC1013 1012 #define DEC1012 1011 #define DEC1011 1010 #define DEC1010 1009 #define DEC1009 1008 #define DEC1008 1007 #define DEC1007 1006 #define DEC1006 1005 #define DEC1005 1004 #define DEC1004 1003 #define DEC1003 1002 #define DEC1002 1001 #define DEC1001 1000 #define DEC1000 999 #define DEC999 998 #define DEC998 997 #define DEC997 996 #define DEC996 995 #define DEC995 994 #define DEC994 993 #define DEC993 992 #define DEC992 991 #define DEC991 990 #define DEC990 989 #define DEC989 988 #define DEC988 987 #define DEC987 986 #define DEC986 985 #define DEC985 984 #define DEC984 983 #define DEC983 982 #define DEC982 981 #define DEC981 980 #define DEC980 979 #define DEC979 978 #define DEC978 977 #define DEC977 976 #define DEC976 975 #define DEC975 974 #define DEC974 973 #define DEC973 972 #define DEC972 971 #define DEC971 970 #define DEC970 969 #define DEC969 968 #define DEC968 967 #define DEC967 966 #define DEC966 965 #define DEC965 964 #define DEC964 963 #define DEC963 962 #define DEC962 961 #define DEC961 960 #define DEC960 959 #define DEC959 958 #define DEC958 957 #define DEC957 956 #define DEC956 955 #define DEC955 954 #define DEC954 953 #define DEC953 952 #define DEC952 951 #define DEC951 950 #define DEC950 949 #define DEC949 948 #define DEC948 947 #define DEC947 946 #define DEC946 945 #define DEC945 944 #define DEC944 943 #define DEC943 942 #define DEC942 941 #define DEC941 940 #define DEC940 939 #define DEC939 938 #define DEC938 937 #define DEC937 936 #define DEC936 935 #define DEC935 934 #define DEC934 933 #define DEC933 932 #define DEC932 931 #define DEC931 930 #define DEC930 929 #define DEC929 928 #define DEC928 927 #define DEC927 926 #define DEC926 925 #define DEC925 924 #define DEC924 923 #define DEC923 922 #define DEC922 921 #define DEC921 920 #define DEC920 919 #define DEC919 918 #define DEC918 917 #define DEC917 916 #define DEC916 915 #define DEC915 914 #define DEC914 913 #define DEC913 912 #define DEC912 911 #define DEC911 910 #define DEC910 909 #define DEC909 908 #define DEC908 907 #define DEC907 906 #define DEC906 905 #define DEC905 904 #define DEC904 903 #define DEC903 902 #define DEC902 901 #define DEC901 900 #define DEC900 899 #define DEC899 898 #define DEC898 897 #define DEC897 896 #define DEC896 895 #define DEC895 894 #define DEC894 893 #define DEC893 892 #define DEC892 891 #define DEC891 890 #define DEC890 889 #define DEC889 888 #define DEC888 887 #define DEC887 886 #define DEC886 885 #define DEC885 884 #define DEC884 883 #define DEC883 882 #define DEC882 881 #define DEC881 880 #define DEC880 879 #define DEC879 878 #define DEC878 877 #define DEC877 876 #define DEC876 875 #define DEC875 874 #define DEC874 873 #define DEC873 872 #define DEC872 871 #define DEC871 870 #define DEC870 869 #define DEC869 868 #define DEC868 867 #define DEC867 866 #define DEC866 865 #define DEC865 864 #define DEC864 863 #define DEC863 862 #define DEC862 861 #define DEC861 860 #define DEC860 859 #define DEC859 858 #define DEC858 857 #define DEC857 856 #define DEC856 855 #define DEC855 854 #define DEC854 853 #define DEC853 852 #define DEC852 851 #define DEC851 850 #define DEC850 849 #define DEC849 848 #define DEC848 847 #define DEC847 846 #define DEC846 845 #define DEC845 844 #define DEC844 843 #define DEC843 842 #define DEC842 841 #define DEC841 840 #define DEC840 839 #define DEC839 838 #define DEC838 837 #define DEC837 836 #define DEC836 835 #define DEC835 834 #define DEC834 833 #define DEC833 832 #define DEC832 831 #define DEC831 830 #define DEC830 829 #define DEC829 828 #define DEC828 827 #define DEC827 826 #define DEC826 825 #define DEC825 824 #define DEC824 823 #define DEC823 822 #define DEC822 821 #define DEC821 820 #define DEC820 819 #define DEC819 818 #define DEC818 817 #define DEC817 816 #define DEC816 815 #define DEC815 814 #define DEC814 813 #define DEC813 812 #define DEC812 811 #define DEC811 810 #define DEC810 809 #define DEC809 808 #define DEC808 807 #define DEC807 806 #define DEC806 805 #define DEC805 804 #define DEC804 803 #define DEC803 802 #define DEC802 801 #define DEC801 800 #define DEC800 799 #define DEC799 798 #define DEC798 797 #define DEC797 796 #define DEC796 795 #define DEC795 794 #define DEC794 793 #define DEC793 792 #define DEC792 791 #define DEC791 790 #define DEC790 789 #define DEC789 788 #define DEC788 787 #define DEC787 786 #define DEC786 785 #define DEC785 784 #define DEC784 783 #define DEC783 782 #define DEC782 781 #define DEC781 780 #define DEC780 779 #define DEC779 778 #define DEC778 777 #define DEC777 776 #define DEC776 775 #define DEC775 774 #define DEC774 773 #define DEC773 772 #define DEC772 771 #define DEC771 770 #define DEC770 769 #define DEC769 768 #define DEC768 767 #define DEC767 766 #define DEC766 765 #define DEC765 764 #define DEC764 763 #define DEC763 762 #define DEC762 761 #define DEC761 760 #define DEC760 759 #define DEC759 758 #define DEC758 757 #define DEC757 756 #define DEC756 755 #define DEC755 754 #define DEC754 753 #define DEC753 752 #define DEC752 751 #define DEC751 750 #define DEC750 749 #define DEC749 748 #define DEC748 747 #define DEC747 746 #define DEC746 745 #define DEC745 744 #define DEC744 743 #define DEC743 742 #define DEC742 741 #define DEC741 740 #define DEC740 739 #define DEC739 738 #define DEC738 737 #define DEC737 736 #define DEC736 735 #define DEC735 734 #define DEC734 733 #define DEC733 732 #define DEC732 731 #define DEC731 730 #define DEC730 729 #define DEC729 728 #define DEC728 727 #define DEC727 726 #define DEC726 725 #define DEC725 724 #define DEC724 723 #define DEC723 722 #define DEC722 721 #define DEC721 720 #define DEC720 719 #define DEC719 718 #define DEC718 717 #define DEC717 716 #define DEC716 715 #define DEC715 714 #define DEC714 713 #define DEC713 712 #define DEC712 711 #define DEC711 710 #define DEC710 709 #define DEC709 708 #define DEC708 707 #define DEC707 706 #define DEC706 705 #define DEC705 704 #define DEC704 703 #define DEC703 702 #define DEC702 701 #define DEC701 700 #define DEC700 699 #define DEC699 698 #define DEC698 697 #define DEC697 696 #define DEC696 695 #define DEC695 694 #define DEC694 693 #define DEC693 692 #define DEC692 691 #define DEC691 690 #define DEC690 689 #define DEC689 688 #define DEC688 687 #define DEC687 686 #define DEC686 685 #define DEC685 684 #define DEC684 683 #define DEC683 682 #define DEC682 681 #define DEC681 680 #define DEC680 679 #define DEC679 678 #define DEC678 677 #define DEC677 676 #define DEC676 675 #define DEC675 674 #define DEC674 673 #define DEC673 672 #define DEC672 671 #define DEC671 670 #define DEC670 669 #define DEC669 668 #define DEC668 667 #define DEC667 666 #define DEC666 665 #define DEC665 664 #define DEC664 663 #define DEC663 662 #define DEC662 661 #define DEC661 660 #define DEC660 659 #define DEC659 658 #define DEC658 657 #define DEC657 656 #define DEC656 655 #define DEC655 654 #define DEC654 653 #define DEC653 652 #define DEC652 651 #define DEC651 650 #define DEC650 649 #define DEC649 648 #define DEC648 647 #define DEC647 646 #define DEC646 645 #define DEC645 644 #define DEC644 643 #define DEC643 642 #define DEC642 641 #define DEC641 640 #define DEC640 639 #define DEC639 638 #define DEC638 637 #define DEC637 636 #define DEC636 635 #define DEC635 634 #define DEC634 633 #define DEC633 632 #define DEC632 631 #define DEC631 630 #define DEC630 629 #define DEC629 628 #define DEC628 627 #define DEC627 626 #define DEC626 625 #define DEC625 624 #define DEC624 623 #define DEC623 622 #define DEC622 621 #define DEC621 620 #define DEC620 619 #define DEC619 618 #define DEC618 617 #define DEC617 616 #define DEC616 615 #define DEC615 614 #define DEC614 613 #define DEC613 612 #define DEC612 611 #define DEC611 610 #define DEC610 609 #define DEC609 608 #define DEC608 607 #define DEC607 606 #define DEC606 605 #define DEC605 604 #define DEC604 603 #define DEC603 602 #define DEC602 601 #define DEC601 600 #define DEC600 599 #define DEC599 598 #define DEC598 597 #define DEC597 596 #define DEC596 595 #define DEC595 594 #define DEC594 593 #define DEC593 592 #define DEC592 591 #define DEC591 590 #define DEC590 589 #define DEC589 588 #define DEC588 587 #define DEC587 586 #define DEC586 585 #define DEC585 584 #define DEC584 583 #define DEC583 582 #define DEC582 581 #define DEC581 580 #define DEC580 579 #define DEC579 578 #define DEC578 577 #define DEC577 576 #define DEC576 575 #define DEC575 574 #define DEC574 573 #define DEC573 572 #define DEC572 571 #define DEC571 570 #define DEC570 569 #define DEC569 568 #define DEC568 567 #define DEC567 566 #define DEC566 565 #define DEC565 564 #define DEC564 563 #define DEC563 562 #define DEC562 561 #define DEC561 560 #define DEC560 559 #define DEC559 558 #define DEC558 557 #define DEC557 556 #define DEC556 555 #define DEC555 554 #define DEC554 553 #define DEC553 552 #define DEC552 551 #define DEC551 550 #define DEC550 549 #define DEC549 548 #define DEC548 547 #define DEC547 546 #define DEC546 545 #define DEC545 544 #define DEC544 543 #define DEC543 542 #define DEC542 541 #define DEC541 540 #define DEC540 539 #define DEC539 538 #define DEC538 537 #define DEC537 536 #define DEC536 535 #define DEC535 534 #define DEC534 533 #define DEC533 532 #define DEC532 531 #define DEC531 530 #define DEC530 529 #define DEC529 528 #define DEC528 527 #define DEC527 526 #define DEC526 525 #define DEC525 524 #define DEC524 523 #define DEC523 522 #define DEC522 521 #define DEC521 520 #define DEC520 519 #define DEC519 518 #define DEC518 517 #define DEC517 516 #define DEC516 515 #define DEC515 514 #define DEC514 513 #define DEC513 512 #define DEC512 511 #define DEC511 510 #define DEC510 509 #define DEC509 508 #define DEC508 507 #define DEC507 506 #define DEC506 505 #define DEC505 504 #define DEC504 503 #define DEC503 502 #define DEC502 501 #define DEC501 500 #define DEC500 499 #define DEC499 498 #define DEC498 497 #define DEC497 496 #define DEC496 495 #define DEC495 494 #define DEC494 493 #define DEC493 492 #define DEC492 491 #define DEC491 490 #define DEC490 489 #define DEC489 488 #define DEC488 487 #define DEC487 486 #define DEC486 485 #define DEC485 484 #define DEC484 483 #define DEC483 482 #define DEC482 481 #define DEC481 480 #define DEC480 479 #define DEC479 478 #define DEC478 477 #define DEC477 476 #define DEC476 475 #define DEC475 474 #define DEC474 473 #define DEC473 472 #define DEC472 471 #define DEC471 470 #define DEC470 469 #define DEC469 468 #define DEC468 467 #define DEC467 466 #define DEC466 465 #define DEC465 464 #define DEC464 463 #define DEC463 462 #define DEC462 461 #define DEC461 460 #define DEC460 459 #define DEC459 458 #define DEC458 457 #define DEC457 456 #define DEC456 455 #define DEC455 454 #define DEC454 453 #define DEC453 452 #define DEC452 451 #define DEC451 450 #define DEC450 449 #define DEC449 448 #define DEC448 447 #define DEC447 446 #define DEC446 445 #define DEC445 444 #define DEC444 443 #define DEC443 442 #define DEC442 441 #define DEC441 440 #define DEC440 439 #define DEC439 438 #define DEC438 437 #define DEC437 436 #define DEC436 435 #define DEC435 434 #define DEC434 433 #define DEC433 432 #define DEC432 431 #define DEC431 430 #define DEC430 429 #define DEC429 428 #define DEC428 427 #define DEC427 426 #define DEC426 425 #define DEC425 424 #define DEC424 423 #define DEC423 422 #define DEC422 421 #define DEC421 420 #define DEC420 419 #define DEC419 418 #define DEC418 417 #define DEC417 416 #define DEC416 415 #define DEC415 414 #define DEC414 413 #define DEC413 412 #define DEC412 411 #define DEC411 410 #define DEC410 409 #define DEC409 408 #define DEC408 407 #define DEC407 406 #define DEC406 405 #define DEC405 404 #define DEC404 403 #define DEC403 402 #define DEC402 401 #define DEC401 400 #define DEC400 399 #define DEC399 398 #define DEC398 397 #define DEC397 396 #define DEC396 395 #define DEC395 394 #define DEC394 393 #define DEC393 392 #define DEC392 391 #define DEC391 390 #define DEC390 389 #define DEC389 388 #define DEC388 387 #define DEC387 386 #define DEC386 385 #define DEC385 384 #define DEC384 383 #define DEC383 382 #define DEC382 381 #define DEC381 380 #define DEC380 379 #define DEC379 378 #define DEC378 377 #define DEC377 376 #define DEC376 375 #define DEC375 374 #define DEC374 373 #define DEC373 372 #define DEC372 371 #define DEC371 370 #define DEC370 369 #define DEC369 368 #define DEC368 367 #define DEC367 366 #define DEC366 365 #define DEC365 364 #define DEC364 363 #define DEC363 362 #define DEC362 361 #define DEC361 360 #define DEC360 359 #define DEC359 358 #define DEC358 357 #define DEC357 356 #define DEC356 355 #define DEC355 354 #define DEC354 353 #define DEC353 352 #define DEC352 351 #define DEC351 350 #define DEC350 349 #define DEC349 348 #define DEC348 347 #define DEC347 346 #define DEC346 345 #define DEC345 344 #define DEC344 343 #define DEC343 342 #define DEC342 341 #define DEC341 340 #define DEC340 339 #define DEC339 338 #define DEC338 337 #define DEC337 336 #define DEC336 335 #define DEC335 334 #define DEC334 333 #define DEC333 332 #define DEC332 331 #define DEC331 330 #define DEC330 329 #define DEC329 328 #define DEC328 327 #define DEC327 326 #define DEC326 325 #define DEC325 324 #define DEC324 323 #define DEC323 322 #define DEC322 321 #define DEC321 320 #define DEC320 319 #define DEC319 318 #define DEC318 317 #define DEC317 316 #define DEC316 315 #define DEC315 314 #define DEC314 313 #define DEC313 312 #define DEC312 311 #define DEC311 310 #define DEC310 309 #define DEC309 308 #define DEC308 307 #define DEC307 306 #define DEC306 305 #define DEC305 304 #define DEC304 303 #define DEC303 302 #define DEC302 301 #define DEC301 300 #define DEC300 299 #define DEC299 298 #define DEC298 297 #define DEC297 296 #define DEC296 295 #define DEC295 294 #define DEC294 293 #define DEC293 292 #define DEC292 291 #define DEC291 290 #define DEC290 289 #define DEC289 288 #define DEC288 287 #define DEC287 286 #define DEC286 285 #define DEC285 284 #define DEC284 283 #define DEC283 282 #define DEC282 281 #define DEC281 280 #define DEC280 279 #define DEC279 278 #define DEC278 277 #define DEC277 276 #define DEC276 275 #define DEC275 274 #define DEC274 273 #define DEC273 272 #define DEC272 271 #define DEC271 270 #define DEC270 269 #define DEC269 268 #define DEC268 267 #define DEC267 266 #define DEC266 265 #define DEC265 264 #define DEC264 263 #define DEC263 262 #define DEC262 261 #define DEC261 260 #define DEC260 259 #define DEC259 258 #define DEC258 257 #define DEC257 256 #define DEC256 255 #define DEC255 254 #define DEC254 253 #define DEC253 252 #define DEC252 251 #define DEC251 250 #define DEC250 249 #define DEC249 248 #define DEC248 247 #define DEC247 246 #define DEC246 245 #define DEC245 244 #define DEC244 243 #define DEC243 242 #define DEC242 241 #define DEC241 240 #define DEC240 239 #define DEC239 238 #define DEC238 237 #define DEC237 236 #define DEC236 235 #define DEC235 234 #define DEC234 233 #define DEC233 232 #define DEC232 231 #define DEC231 230 #define DEC230 229 #define DEC229 228 #define DEC228 227 #define DEC227 226 #define DEC226 225 #define DEC225 224 #define DEC224 223 #define DEC223 222 #define DEC222 221 #define DEC221 220 #define DEC220 219 #define DEC219 218 #define DEC218 217 #define DEC217 216 #define DEC216 215 #define DEC215 214 #define DEC214 213 #define DEC213 212 #define DEC212 211 #define DEC211 210 #define DEC210 209 #define DEC209 208 #define DEC208 207 #define DEC207 206 #define DEC206 205 #define DEC205 204 #define DEC204 203 #define DEC203 202 #define DEC202 201 #define DEC201 200 #define DEC200 199 #define DEC199 198 #define DEC198 197 #define DEC197 196 #define DEC196 195 #define DEC195 194 #define DEC194 193 #define DEC193 192 #define DEC192 191 #define DEC191 190 #define DEC190 189 #define DEC189 188 #define DEC188 187 #define DEC187 186 #define DEC186 185 #define DEC185 184 #define DEC184 183 #define DEC183 182 #define DEC182 181 #define DEC181 180 #define DEC180 179 #define DEC179 178 #define DEC178 177 #define DEC177 176 #define DEC176 175 #define DEC175 174 #define DEC174 173 #define DEC173 172 #define DEC172 171 #define DEC171 170 #define DEC170 169 #define DEC169 168 #define DEC168 167 #define DEC167 166 #define DEC166 165 #define DEC165 164 #define DEC164 163 #define DEC163 162 #define DEC162 161 #define DEC161 160 #define DEC160 159 #define DEC159 158 #define DEC158 157 #define DEC157 156 #define DEC156 155 #define DEC155 154 #define DEC154 153 #define DEC153 152 #define DEC152 151 #define DEC151 150 #define DEC150 149 #define DEC149 148 #define DEC148 147 #define DEC147 146 #define DEC146 145 #define DEC145 144 #define DEC144 143 #define DEC143 142 #define DEC142 141 #define DEC141 140 #define DEC140 139 #define DEC139 138 #define DEC138 137 #define DEC137 136 #define DEC136 135 #define DEC135 134 #define DEC134 133 #define DEC133 132 #define DEC132 131 #define DEC131 130 #define DEC130 129 #define DEC129 128 #define DEC128 127 #define DEC127 126 #define DEC126 125 #define DEC125 124 #define DEC124 123 #define DEC123 122 #define DEC122 121 #define DEC121 120 #define DEC120 119 #define DEC119 118 #define DEC118 117 #define DEC117 116 #define DEC116 115 #define DEC115 114 #define DEC114 113 #define DEC113 112 #define DEC112 111 #define DEC111 110 #define DEC110 109 #define DEC109 108 #define DEC108 107 #define DEC107 106 #define DEC106 105 #define DEC105 104 #define DEC104 103 #define DEC103 102 #define DEC102 101 #define DEC101 100 #define DEC100 99 #define DEC99 98 #define DEC98 97 #define DEC97 96 #define DEC96 95 #define DEC95 94 #define DEC94 93 #define DEC93 92 #define DEC92 91 #define DEC91 90 #define DEC90 89 #define DEC89 88 #define DEC88 87 #define DEC87 86 #define DEC86 85 #define DEC85 84 #define DEC84 83 #define DEC83 82 #define DEC82 81 #define DEC81 80 #define DEC80 79 #define DEC79 78 #define DEC78 77 #define DEC77 76 #define DEC76 75 #define DEC75 74 #define DEC74 73 #define DEC73 72 #define DEC72 71 #define DEC71 70 #define DEC70 69 #define DEC69 68 #define DEC68 67 #define DEC67 66 #define DEC66 65 #define DEC65 64 #define DEC64 63 #define DEC63 62 #define DEC62 61 #define DEC61 60 #define DEC60 59 #define DEC59 58 #define DEC58 57 #define DEC57 56 #define DEC56 55 #define DEC55 54 #define DEC54 53 #define DEC53 52 #define DEC52 51 #define DEC51 50 #define DEC50 49 #define DEC49 48 #define DEC48 47 #define DEC47 46 #define DEC46 45 #define DEC45 44 #define DEC44 43 #define DEC43 42 #define DEC42 41 #define DEC41 40 #define DEC40 39 #define DEC39 38 #define DEC38 37 #define DEC37 36 #define DEC36 35 #define DEC35 34 #define DEC34 33 #define DEC33 32 #define DEC32 31 #define DEC31 30 #define DEC30 29 #define DEC29 28 #define DEC28 27 #define DEC27 26 #define DEC26 25 #define DEC25 24 #define DEC24 23 #define DEC23 22 #define DEC22 21 #define DEC21 20 #define DEC20 19 #define DEC19 18 #define DEC18 17 #define DEC17 16 #define DEC16 15 #define DEC15 14 #define DEC14 13 #define DEC13 12 #define DEC12 11 #define DEC11 10 #define DEC10 9 #define DEC9 8 #define DEC8 7 #define DEC7 6 #define DEC6 5 #define DEC5 4 #define DEC4 3 #define DEC3 2 #define DEC2 1 #define DEC1 0 #define INC(x) C2(INC,x) #define INC1024 1025 #define INC1023 1024 #define INC1022 1023 #define INC1021 1022 #define INC1020 1021 #define INC1019 1020 #define INC1018 1019 #define INC1017 1018 #define INC1016 1017 #define INC1015 1016 #define INC1014 1015 #define INC1013 1014 #define INC1012 1013 #define INC1011 1012 #define INC1010 1011 #define INC1009 1010 #define INC1008 1009 #define INC1007 1008 #define INC1006 1007 #define INC1005 1006 #define INC1004 1005 #define INC1003 1004 #define INC1002 1003 #define INC1001 1002 #define INC1000 1001 #define INC999 1000 #define INC998 999 #define INC997 998 #define INC996 997 #define INC995 996 #define INC994 995 #define INC993 994 #define INC992 993 #define INC991 992 #define INC990 991 #define INC989 990 #define INC988 989 #define INC987 988 #define INC986 987 #define INC985 986 #define INC984 985 #define INC983 984 #define INC982 983 #define INC981 982 #define INC980 981 #define INC979 980 #define INC978 979 #define INC977 978 #define INC976 977 #define INC975 976 #define INC974 975 #define INC973 974 #define INC972 973 #define INC971 972 #define INC970 971 #define INC969 970 #define INC968 969 #define INC967 968 #define INC966 967 #define INC965 966 #define INC964 965 #define INC963 964 #define INC962 963 #define INC961 962 #define INC960 961 #define INC959 960 #define INC958 959 #define INC957 958 #define INC956 957 #define INC955 956 #define INC954 955 #define INC953 954 #define INC952 953 #define INC951 952 #define INC950 951 #define INC949 950 #define INC948 949 #define INC947 948 #define INC946 947 #define INC945 946 #define INC944 945 #define INC943 944 #define INC942 943 #define INC941 942 #define INC940 941 #define INC939 940 #define INC938 939 #define INC937 938 #define INC936 937 #define INC935 936 #define INC934 935 #define INC933 934 #define INC932 933 #define INC931 932 #define INC930 931 #define INC929 930 #define INC928 929 #define INC927 928 #define INC926 927 #define INC925 926 #define INC924 925 #define INC923 924 #define INC922 923 #define INC921 922 #define INC920 921 #define INC919 920 #define INC918 919 #define INC917 918 #define INC916 917 #define INC915 916 #define INC914 915 #define INC913 914 #define INC912 913 #define INC911 912 #define INC910 911 #define INC909 910 #define INC908 909 #define INC907 908 #define INC906 907 #define INC905 906 #define INC904 905 #define INC903 904 #define INC902 903 #define INC901 902 #define INC900 901 #define INC899 900 #define INC898 899 #define INC897 898 #define INC896 897 #define INC895 896 #define INC894 895 #define INC893 894 #define INC892 893 #define INC891 892 #define INC890 891 #define INC889 890 #define INC888 889 #define INC887 888 #define INC886 887 #define INC885 886 #define INC884 885 #define INC883 884 #define INC882 883 #define INC881 882 #define INC880 881 #define INC879 880 #define INC878 879 #define INC877 878 #define INC876 877 #define INC875 876 #define INC874 875 #define INC873 874 #define INC872 873 #define INC871 872 #define INC870 871 #define INC869 870 #define INC868 869 #define INC867 868 #define INC866 867 #define INC865 866 #define INC864 865 #define INC863 864 #define INC862 863 #define INC861 862 #define INC860 861 #define INC859 860 #define INC858 859 #define INC857 858 #define INC856 857 #define INC855 856 #define INC854 855 #define INC853 854 #define INC852 853 #define INC851 852 #define INC850 851 #define INC849 850 #define INC848 849 #define INC847 848 #define INC846 847 #define INC845 846 #define INC844 845 #define INC843 844 #define INC842 843 #define INC841 842 #define INC840 841 #define INC839 840 #define INC838 839 #define INC837 838 #define INC836 837 #define INC835 836 #define INC834 835 #define INC833 834 #define INC832 833 #define INC831 832 #define INC830 831 #define INC829 830 #define INC828 829 #define INC827 828 #define INC826 827 #define INC825 826 #define INC824 825 #define INC823 824 #define INC822 823 #define INC821 822 #define INC820 821 #define INC819 820 #define INC818 819 #define INC817 818 #define INC816 817 #define INC815 816 #define INC814 815 #define INC813 814 #define INC812 813 #define INC811 812 #define INC810 811 #define INC809 810 #define INC808 809 #define INC807 808 #define INC806 807 #define INC805 806 #define INC804 805 #define INC803 804 #define INC802 803 #define INC801 802 #define INC800 801 #define INC799 800 #define INC798 799 #define INC797 798 #define INC796 797 #define INC795 796 #define INC794 795 #define INC793 794 #define INC792 793 #define INC791 792 #define INC790 791 #define INC789 790 #define INC788 789 #define INC787 788 #define INC786 787 #define INC785 786 #define INC784 785 #define INC783 784 #define INC782 783 #define INC781 782 #define INC780 781 #define INC779 780 #define INC778 779 #define INC777 778 #define INC776 777 #define INC775 776 #define INC774 775 #define INC773 774 #define INC772 773 #define INC771 772 #define INC770 771 #define INC769 770 #define INC768 769 #define INC767 768 #define INC766 767 #define INC765 766 #define INC764 765 #define INC763 764 #define INC762 763 #define INC761 762 #define INC760 761 #define INC759 760 #define INC758 759 #define INC757 758 #define INC756 757 #define INC755 756 #define INC754 755 #define INC753 754 #define INC752 753 #define INC751 752 #define INC750 751 #define INC749 750 #define INC748 749 #define INC747 748 #define INC746 747 #define INC745 746 #define INC744 745 #define INC743 744 #define INC742 743 #define INC741 742 #define INC740 741 #define INC739 740 #define INC738 739 #define INC737 738 #define INC736 737 #define INC735 736 #define INC734 735 #define INC733 734 #define INC732 733 #define INC731 732 #define INC730 731 #define INC729 730 #define INC728 729 #define INC727 728 #define INC726 727 #define INC725 726 #define INC724 725 #define INC723 724 #define INC722 723 #define INC721 722 #define INC720 721 #define INC719 720 #define INC718 719 #define INC717 718 #define INC716 717 #define INC715 716 #define INC714 715 #define INC713 714 #define INC712 713 #define INC711 712 #define INC710 711 #define INC709 710 #define INC708 709 #define INC707 708 #define INC706 707 #define INC705 706 #define INC704 705 #define INC703 704 #define INC702 703 #define INC701 702 #define INC700 701 #define INC699 700 #define INC698 699 #define INC697 698 #define INC696 697 #define INC695 696 #define INC694 695 #define INC693 694 #define INC692 693 #define INC691 692 #define INC690 691 #define INC689 690 #define INC688 689 #define INC687 688 #define INC686 687 #define INC685 686 #define INC684 685 #define INC683 684 #define INC682 683 #define INC681 682 #define INC680 681 #define INC679 680 #define INC678 679 #define INC677 678 #define INC676 677 #define INC675 676 #define INC674 675 #define INC673 674 #define INC672 673 #define INC671 672 #define INC670 671 #define INC669 670 #define INC668 669 #define INC667 668 #define INC666 667 #define INC665 666 #define INC664 665 #define INC663 664 #define INC662 663 #define INC661 662 #define INC660 661 #define INC659 660 #define INC658 659 #define INC657 658 #define INC656 657 #define INC655 656 #define INC654 655 #define INC653 654 #define INC652 653 #define INC651 652 #define INC650 651 #define INC649 650 #define INC648 649 #define INC647 648 #define INC646 647 #define INC645 646 #define INC644 645 #define INC643 644 #define INC642 643 #define INC641 642 #define INC640 641 #define INC639 640 #define INC638 639 #define INC637 638 #define INC636 637 #define INC635 636 #define INC634 635 #define INC633 634 #define INC632 633 #define INC631 632 #define INC630 631 #define INC629 630 #define INC628 629 #define INC627 628 #define INC626 627 #define INC625 626 #define INC624 625 #define INC623 624 #define INC622 623 #define INC621 622 #define INC620 621 #define INC619 620 #define INC618 619 #define INC617 618 #define INC616 617 #define INC615 616 #define INC614 615 #define INC613 614 #define INC612 613 #define INC611 612 #define INC610 611 #define INC609 610 #define INC608 609 #define INC607 608 #define INC606 607 #define INC605 606 #define INC604 605 #define INC603 604 #define INC602 603 #define INC601 602 #define INC600 601 #define INC599 600 #define INC598 599 #define INC597 598 #define INC596 597 #define INC595 596 #define INC594 595 #define INC593 594 #define INC592 593 #define INC591 592 #define INC590 591 #define INC589 590 #define INC588 589 #define INC587 588 #define INC586 587 #define INC585 586 #define INC584 585 #define INC583 584 #define INC582 583 #define INC581 582 #define INC580 581 #define INC579 580 #define INC578 579 #define INC577 578 #define INC576 577 #define INC575 576 #define INC574 575 #define INC573 574 #define INC572 573 #define INC571 572 #define INC570 571 #define INC569 570 #define INC568 569 #define INC567 568 #define INC566 567 #define INC565 566 #define INC564 565 #define INC563 564 #define INC562 563 #define INC561 562 #define INC560 561 #define INC559 560 #define INC558 559 #define INC557 558 #define INC556 557 #define INC555 556 #define INC554 555 #define INC553 554 #define INC552 553 #define INC551 552 #define INC550 551 #define INC549 550 #define INC548 549 #define INC547 548 #define INC546 547 #define INC545 546 #define INC544 545 #define INC543 544 #define INC542 543 #define INC541 542 #define INC540 541 #define INC539 540 #define INC538 539 #define INC537 538 #define INC536 537 #define INC535 536 #define INC534 535 #define INC533 534 #define INC532 533 #define INC531 532 #define INC530 531 #define INC529 530 #define INC528 529 #define INC527 528 #define INC526 527 #define INC525 526 #define INC524 525 #define INC523 524 #define INC522 523 #define INC521 522 #define INC520 521 #define INC519 520 #define INC518 519 #define INC517 518 #define INC516 517 #define INC515 516 #define INC514 515 #define INC513 514 #define INC512 513 #define INC511 512 #define INC510 511 #define INC509 510 #define INC508 509 #define INC507 508 #define INC506 507 #define INC505 506 #define INC504 505 #define INC503 504 #define INC502 503 #define INC501 502 #define INC500 501 #define INC499 500 #define INC498 499 #define INC497 498 #define INC496 497 #define INC495 496 #define INC494 495 #define INC493 494 #define INC492 493 #define INC491 492 #define INC490 491 #define INC489 490 #define INC488 489 #define INC487 488 #define INC486 487 #define INC485 486 #define INC484 485 #define INC483 484 #define INC482 483 #define INC481 482 #define INC480 481 #define INC479 480 #define INC478 479 #define INC477 478 #define INC476 477 #define INC475 476 #define INC474 475 #define INC473 474 #define INC472 473 #define INC471 472 #define INC470 471 #define INC469 470 #define INC468 469 #define INC467 468 #define INC466 467 #define INC465 466 #define INC464 465 #define INC463 464 #define INC462 463 #define INC461 462 #define INC460 461 #define INC459 460 #define INC458 459 #define INC457 458 #define INC456 457 #define INC455 456 #define INC454 455 #define INC453 454 #define INC452 453 #define INC451 452 #define INC450 451 #define INC449 450 #define INC448 449 #define INC447 448 #define INC446 447 #define INC445 446 #define INC444 445 #define INC443 444 #define INC442 443 #define INC441 442 #define INC440 441 #define INC439 440 #define INC438 439 #define INC437 438 #define INC436 437 #define INC435 436 #define INC434 435 #define INC433 434 #define INC432 433 #define INC431 432 #define INC430 431 #define INC429 430 #define INC428 429 #define INC427 428 #define INC426 427 #define INC425 426 #define INC424 425 #define INC423 424 #define INC422 423 #define INC421 422 #define INC420 421 #define INC419 420 #define INC418 419 #define INC417 418 #define INC416 417 #define INC415 416 #define INC414 415 #define INC413 414 #define INC412 413 #define INC411 412 #define INC410 411 #define INC409 410 #define INC408 409 #define INC407 408 #define INC406 407 #define INC405 406 #define INC404 405 #define INC403 404 #define INC402 403 #define INC401 402 #define INC400 401 #define INC399 400 #define INC398 399 #define INC397 398 #define INC396 397 #define INC395 396 #define INC394 395 #define INC393 394 #define INC392 393 #define INC391 392 #define INC390 391 #define INC389 390 #define INC388 389 #define INC387 388 #define INC386 387 #define INC385 386 #define INC384 385 #define INC383 384 #define INC382 383 #define INC381 382 #define INC380 381 #define INC379 380 #define INC378 379 #define INC377 378 #define INC376 377 #define INC375 376 #define INC374 375 #define INC373 374 #define INC372 373 #define INC371 372 #define INC370 371 #define INC369 370 #define INC368 369 #define INC367 368 #define INC366 367 #define INC365 366 #define INC364 365 #define INC363 364 #define INC362 363 #define INC361 362 #define INC360 361 #define INC359 360 #define INC358 359 #define INC357 358 #define INC356 357 #define INC355 356 #define INC354 355 #define INC353 354 #define INC352 353 #define INC351 352 #define INC350 351 #define INC349 350 #define INC348 349 #define INC347 348 #define INC346 347 #define INC345 346 #define INC344 345 #define INC343 344 #define INC342 343 #define INC341 342 #define INC340 341 #define INC339 340 #define INC338 339 #define INC337 338 #define INC336 337 #define INC335 336 #define INC334 335 #define INC333 334 #define INC332 333 #define INC331 332 #define INC330 331 #define INC329 330 #define INC328 329 #define INC327 328 #define INC326 327 #define INC325 326 #define INC324 325 #define INC323 324 #define INC322 323 #define INC321 322 #define INC320 321 #define INC319 320 #define INC318 319 #define INC317 318 #define INC316 317 #define INC315 316 #define INC314 315 #define INC313 314 #define INC312 313 #define INC311 312 #define INC310 311 #define INC309 310 #define INC308 309 #define INC307 308 #define INC306 307 #define INC305 306 #define INC304 305 #define INC303 304 #define INC302 303 #define INC301 302 #define INC300 301 #define INC299 300 #define INC298 299 #define INC297 298 #define INC296 297 #define INC295 296 #define INC294 295 #define INC293 294 #define INC292 293 #define INC291 292 #define INC290 291 #define INC289 290 #define INC288 289 #define INC287 288 #define INC286 287 #define INC285 286 #define INC284 285 #define INC283 284 #define INC282 283 #define INC281 282 #define INC280 281 #define INC279 280 #define INC278 279 #define INC277 278 #define INC276 277 #define INC275 276 #define INC274 275 #define INC273 274 #define INC272 273 #define INC271 272 #define INC270 271 #define INC269 270 #define INC268 269 #define INC267 268 #define INC266 267 #define INC265 266 #define INC264 265 #define INC263 264 #define INC262 263 #define INC261 262 #define INC260 261 #define INC259 260 #define INC258 259 #define INC257 258 #define INC256 257 #define INC255 256 #define INC254 255 #define INC253 254 #define INC252 253 #define INC251 252 #define INC250 251 #define INC249 250 #define INC248 249 #define INC247 248 #define INC246 247 #define INC245 246 #define INC244 245 #define INC243 244 #define INC242 243 #define INC241 242 #define INC240 241 #define INC239 240 #define INC238 239 #define INC237 238 #define INC236 237 #define INC235 236 #define INC234 235 #define INC233 234 #define INC232 233 #define INC231 232 #define INC230 231 #define INC229 230 #define INC228 229 #define INC227 228 #define INC226 227 #define INC225 226 #define INC224 225 #define INC223 224 #define INC222 223 #define INC221 222 #define INC220 221 #define INC219 220 #define INC218 219 #define INC217 218 #define INC216 217 #define INC215 216 #define INC214 215 #define INC213 214 #define INC212 213 #define INC211 212 #define INC210 211 #define INC209 210 #define INC208 209 #define INC207 208 #define INC206 207 #define INC205 206 #define INC204 205 #define INC203 204 #define INC202 203 #define INC201 202 #define INC200 201 #define INC199 200 #define INC198 199 #define INC197 198 #define INC196 197 #define INC195 196 #define INC194 195 #define INC193 194 #define INC192 193 #define INC191 192 #define INC190 191 #define INC189 190 #define INC188 189 #define INC187 188 #define INC186 187 #define INC185 186 #define INC184 185 #define INC183 184 #define INC182 183 #define INC181 182 #define INC180 181 #define INC179 180 #define INC178 179 #define INC177 178 #define INC176 177 #define INC175 176 #define INC174 175 #define INC173 174 #define INC172 173 #define INC171 172 #define INC170 171 #define INC169 170 #define INC168 169 #define INC167 168 #define INC166 167 #define INC165 166 #define INC164 165 #define INC163 164 #define INC162 163 #define INC161 162 #define INC160 161 #define INC159 160 #define INC158 159 #define INC157 158 #define INC156 157 #define INC155 156 #define INC154 155 #define INC153 154 #define INC152 153 #define INC151 152 #define INC150 151 #define INC149 150 #define INC148 149 #define INC147 148 #define INC146 147 #define INC145 146 #define INC144 145 #define INC143 144 #define INC142 143 #define INC141 142 #define INC140 141 #define INC139 140 #define INC138 139 #define INC137 138 #define INC136 137 #define INC135 136 #define INC134 135 #define INC133 134 #define INC132 133 #define INC131 132 #define INC130 131 #define INC129 130 #define INC128 129 #define INC127 128 #define INC126 127 #define INC125 126 #define INC124 125 #define INC123 124 #define INC122 123 #define INC121 122 #define INC120 121 #define INC119 120 #define INC118 119 #define INC117 118 #define INC116 117 #define INC115 116 #define INC114 115 #define INC113 114 #define INC112 113 #define INC111 112 #define INC110 111 #define INC109 110 #define INC108 109 #define INC107 108 #define INC106 107 #define INC105 106 #define INC104 105 #define INC103 104 #define INC102 103 #define INC101 102 #define INC100 101 #define INC99 100 #define INC98 99 #define INC97 98 #define INC96 97 #define INC95 96 #define INC94 95 #define INC93 94 #define INC92 93 #define INC91 92 #define INC90 91 #define INC89 90 #define INC88 89 #define INC87 88 #define INC86 87 #define INC85 86 #define INC84 85 #define INC83 84 #define INC82 83 #define INC81 82 #define INC80 81 #define INC79 80 #define INC78 79 #define INC77 78 #define INC76 77 #define INC75 76 #define INC74 75 #define INC73 74 #define INC72 73 #define INC71 72 #define INC70 71 #define INC69 70 #define INC68 69 #define INC67 68 #define INC66 67 #define INC65 66 #define INC64 65 #define INC63 64 #define INC62 63 #define INC61 62 #define INC60 61 #define INC59 60 #define INC58 59 #define INC57 58 #define INC56 57 #define INC55 56 #define INC54 55 #define INC53 54 #define INC52 53 #define INC51 52 #define INC50 51 #define INC49 50 #define INC48 49 #define INC47 48 #define INC46 47 #define INC45 46 #define INC44 45 #define INC43 44 #define INC42 43 #define INC41 42 #define INC40 41 #define INC39 40 #define INC38 39 #define INC37 38 #define INC36 37 #define INC35 36 #define INC34 35 #define INC33 34 #define INC32 33 #define INC31 32 #define INC30 31 #define INC29 30 #define INC28 29 #define INC27 28 #define INC26 27 #define INC25 26 #define INC24 25 #define INC23 24 #define INC22 23 #define INC21 22 #define INC20 21 #define INC19 20 #define INC18 19 #define INC17 18 #define INC16 17 #define INC15 16 #define INC14 15 #define INC13 14 #define INC12 13 #define INC11 12 #define INC10 11 #define INC9 10 #define INC8 9 #define INC7 8 #define INC6 7 #define INC5 6 #define INC4 5 #define INC3 4 #define INC2 3 #define INC1 2 #define INC0 1 #define DIV2(x) C2(DIV2_,x) #define DIV2_1024 512 #define DIV2_1023 511 #define DIV2_1022 511 #define DIV2_1021 510 #define DIV2_1020 510 #define DIV2_1019 509 #define DIV2_1018 509 #define DIV2_1017 508 #define DIV2_1016 508 #define DIV2_1015 507 #define DIV2_1014 507 #define DIV2_1013 506 #define DIV2_1012 506 #define DIV2_1011 505 #define DIV2_1010 505 #define DIV2_1009 504 #define DIV2_1008 504 #define DIV2_1007 503 #define DIV2_1006 503 #define DIV2_1005 502 #define DIV2_1004 502 #define DIV2_1003 501 #define DIV2_1002 501 #define DIV2_1001 500 #define DIV2_1000 500 #define DIV2_999 499 #define DIV2_998 499 #define DIV2_997 498 #define DIV2_996 498 #define DIV2_995 497 #define DIV2_994 497 #define DIV2_993 496 #define DIV2_992 496 #define DIV2_991 495 #define DIV2_990 495 #define DIV2_989 494 #define DIV2_988 494 #define DIV2_987 493 #define DIV2_986 493 #define DIV2_985 492 #define DIV2_984 492 #define DIV2_983 491 #define DIV2_982 491 #define DIV2_981 490 #define DIV2_980 490 #define DIV2_979 489 #define DIV2_978 489 #define DIV2_977 488 #define DIV2_976 488 #define DIV2_975 487 #define DIV2_974 487 #define DIV2_973 486 #define DIV2_972 486 #define DIV2_971 485 #define DIV2_970 485 #define DIV2_969 484 #define DIV2_968 484 #define DIV2_967 483 #define DIV2_966 483 #define DIV2_965 482 #define DIV2_964 482 #define DIV2_963 481 #define DIV2_962 481 #define DIV2_961 480 #define DIV2_960 480 #define DIV2_959 479 #define DIV2_958 479 #define DIV2_957 478 #define DIV2_956 478 #define DIV2_955 477 #define DIV2_954 477 #define DIV2_953 476 #define DIV2_952 476 #define DIV2_951 475 #define DIV2_950 475 #define DIV2_949 474 #define DIV2_948 474 #define DIV2_947 473 #define DIV2_946 473 #define DIV2_945 472 #define DIV2_944 472 #define DIV2_943 471 #define DIV2_942 471 #define DIV2_941 470 #define DIV2_940 470 #define DIV2_939 469 #define DIV2_938 469 #define DIV2_937 468 #define DIV2_936 468 #define DIV2_935 467 #define DIV2_934 467 #define DIV2_933 466 #define DIV2_932 466 #define DIV2_931 465 #define DIV2_930 465 #define DIV2_929 464 #define DIV2_928 464 #define DIV2_927 463 #define DIV2_926 463 #define DIV2_925 462 #define DIV2_924 462 #define DIV2_923 461 #define DIV2_922 461 #define DIV2_921 460 #define DIV2_920 460 #define DIV2_919 459 #define DIV2_918 459 #define DIV2_917 458 #define DIV2_916 458 #define DIV2_915 457 #define DIV2_914 457 #define DIV2_913 456 #define DIV2_912 456 #define DIV2_911 455 #define DIV2_910 455 #define DIV2_909 454 #define DIV2_908 454 #define DIV2_907 453 #define DIV2_906 453 #define DIV2_905 452 #define DIV2_904 452 #define DIV2_903 451 #define DIV2_902 451 #define DIV2_901 450 #define DIV2_900 450 #define DIV2_899 449 #define DIV2_898 449 #define DIV2_897 448 #define DIV2_896 448 #define DIV2_895 447 #define DIV2_894 447 #define DIV2_893 446 #define DIV2_892 446 #define DIV2_891 445 #define DIV2_890 445 #define DIV2_889 444 #define DIV2_888 444 #define DIV2_887 443 #define DIV2_886 443 #define DIV2_885 442 #define DIV2_884 442 #define DIV2_883 441 #define DIV2_882 441 #define DIV2_881 440 #define DIV2_880 440 #define DIV2_879 439 #define DIV2_878 439 #define DIV2_877 438 #define DIV2_876 438 #define DIV2_875 437 #define DIV2_874 437 #define DIV2_873 436 #define DIV2_872 436 #define DIV2_871 435 #define DIV2_870 435 #define DIV2_869 434 #define DIV2_868 434 #define DIV2_867 433 #define DIV2_866 433 #define DIV2_865 432 #define DIV2_864 432 #define DIV2_863 431 #define DIV2_862 431 #define DIV2_861 430 #define DIV2_860 430 #define DIV2_859 429 #define DIV2_858 429 #define DIV2_857 428 #define DIV2_856 428 #define DIV2_855 427 #define DIV2_854 427 #define DIV2_853 426 #define DIV2_852 426 #define DIV2_851 425 #define DIV2_850 425 #define DIV2_849 424 #define DIV2_848 424 #define DIV2_847 423 #define DIV2_846 423 #define DIV2_845 422 #define DIV2_844 422 #define DIV2_843 421 #define DIV2_842 421 #define DIV2_841 420 #define DIV2_840 420 #define DIV2_839 419 #define DIV2_838 419 #define DIV2_837 418 #define DIV2_836 418 #define DIV2_835 417 #define DIV2_834 417 #define DIV2_833 416 #define DIV2_832 416 #define DIV2_831 415 #define DIV2_830 415 #define DIV2_829 414 #define DIV2_828 414 #define DIV2_827 413 #define DIV2_826 413 #define DIV2_825 412 #define DIV2_824 412 #define DIV2_823 411 #define DIV2_822 411 #define DIV2_821 410 #define DIV2_820 410 #define DIV2_819 409 #define DIV2_818 409 #define DIV2_817 408 #define DIV2_816 408 #define DIV2_815 407 #define DIV2_814 407 #define DIV2_813 406 #define DIV2_812 406 #define DIV2_811 405 #define DIV2_810 405 #define DIV2_809 404 #define DIV2_808 404 #define DIV2_807 403 #define DIV2_806 403 #define DIV2_805 402 #define DIV2_804 402 #define DIV2_803 401 #define DIV2_802 401 #define DIV2_801 400 #define DIV2_800 400 #define DIV2_799 399 #define DIV2_798 399 #define DIV2_797 398 #define DIV2_796 398 #define DIV2_795 397 #define DIV2_794 397 #define DIV2_793 396 #define DIV2_792 396 #define DIV2_791 395 #define DIV2_790 395 #define DIV2_789 394 #define DIV2_788 394 #define DIV2_787 393 #define DIV2_786 393 #define DIV2_785 392 #define DIV2_784 392 #define DIV2_783 391 #define DIV2_782 391 #define DIV2_781 390 #define DIV2_780 390 #define DIV2_779 389 #define DIV2_778 389 #define DIV2_777 388 #define DIV2_776 388 #define DIV2_775 387 #define DIV2_774 387 #define DIV2_773 386 #define DIV2_772 386 #define DIV2_771 385 #define DIV2_770 385 #define DIV2_769 384 #define DIV2_768 384 #define DIV2_767 383 #define DIV2_766 383 #define DIV2_765 382 #define DIV2_764 382 #define DIV2_763 381 #define DIV2_762 381 #define DIV2_761 380 #define DIV2_760 380 #define DIV2_759 379 #define DIV2_758 379 #define DIV2_757 378 #define DIV2_756 378 #define DIV2_755 377 #define DIV2_754 377 #define DIV2_753 376 #define DIV2_752 376 #define DIV2_751 375 #define DIV2_750 375 #define DIV2_749 374 #define DIV2_748 374 #define DIV2_747 373 #define DIV2_746 373 #define DIV2_745 372 #define DIV2_744 372 #define DIV2_743 371 #define DIV2_742 371 #define DIV2_741 370 #define DIV2_740 370 #define DIV2_739 369 #define DIV2_738 369 #define DIV2_737 368 #define DIV2_736 368 #define DIV2_735 367 #define DIV2_734 367 #define DIV2_733 366 #define DIV2_732 366 #define DIV2_731 365 #define DIV2_730 365 #define DIV2_729 364 #define DIV2_728 364 #define DIV2_727 363 #define DIV2_726 363 #define DIV2_725 362 #define DIV2_724 362 #define DIV2_723 361 #define DIV2_722 361 #define DIV2_721 360 #define DIV2_720 360 #define DIV2_719 359 #define DIV2_718 359 #define DIV2_717 358 #define DIV2_716 358 #define DIV2_715 357 #define DIV2_714 357 #define DIV2_713 356 #define DIV2_712 356 #define DIV2_711 355 #define DIV2_710 355 #define DIV2_709 354 #define DIV2_708 354 #define DIV2_707 353 #define DIV2_706 353 #define DIV2_705 352 #define DIV2_704 352 #define DIV2_703 351 #define DIV2_702 351 #define DIV2_701 350 #define DIV2_700 350 #define DIV2_699 349 #define DIV2_698 349 #define DIV2_697 348 #define DIV2_696 348 #define DIV2_695 347 #define DIV2_694 347 #define DIV2_693 346 #define DIV2_692 346 #define DIV2_691 345 #define DIV2_690 345 #define DIV2_689 344 #define DIV2_688 344 #define DIV2_687 343 #define DIV2_686 343 #define DIV2_685 342 #define DIV2_684 342 #define DIV2_683 341 #define DIV2_682 341 #define DIV2_681 340 #define DIV2_680 340 #define DIV2_679 339 #define DIV2_678 339 #define DIV2_677 338 #define DIV2_676 338 #define DIV2_675 337 #define DIV2_674 337 #define DIV2_673 336 #define DIV2_672 336 #define DIV2_671 335 #define DIV2_670 335 #define DIV2_669 334 #define DIV2_668 334 #define DIV2_667 333 #define DIV2_666 333 #define DIV2_665 332 #define DIV2_664 332 #define DIV2_663 331 #define DIV2_662 331 #define DIV2_661 330 #define DIV2_660 330 #define DIV2_659 329 #define DIV2_658 329 #define DIV2_657 328 #define DIV2_656 328 #define DIV2_655 327 #define DIV2_654 327 #define DIV2_653 326 #define DIV2_652 326 #define DIV2_651 325 #define DIV2_650 325 #define DIV2_649 324 #define DIV2_648 324 #define DIV2_647 323 #define DIV2_646 323 #define DIV2_645 322 #define DIV2_644 322 #define DIV2_643 321 #define DIV2_642 321 #define DIV2_641 320 #define DIV2_640 320 #define DIV2_639 319 #define DIV2_638 319 #define DIV2_637 318 #define DIV2_636 318 #define DIV2_635 317 #define DIV2_634 317 #define DIV2_633 316 #define DIV2_632 316 #define DIV2_631 315 #define DIV2_630 315 #define DIV2_629 314 #define DIV2_628 314 #define DIV2_627 313 #define DIV2_626 313 #define DIV2_625 312 #define DIV2_624 312 #define DIV2_623 311 #define DIV2_622 311 #define DIV2_621 310 #define DIV2_620 310 #define DIV2_619 309 #define DIV2_618 309 #define DIV2_617 308 #define DIV2_616 308 #define DIV2_615 307 #define DIV2_614 307 #define DIV2_613 306 #define DIV2_612 306 #define DIV2_611 305 #define DIV2_610 305 #define DIV2_609 304 #define DIV2_608 304 #define DIV2_607 303 #define DIV2_606 303 #define DIV2_605 302 #define DIV2_604 302 #define DIV2_603 301 #define DIV2_602 301 #define DIV2_601 300 #define DIV2_600 300 #define DIV2_599 299 #define DIV2_598 299 #define DIV2_597 298 #define DIV2_596 298 #define DIV2_595 297 #define DIV2_594 297 #define DIV2_593 296 #define DIV2_592 296 #define DIV2_591 295 #define DIV2_590 295 #define DIV2_589 294 #define DIV2_588 294 #define DIV2_587 293 #define DIV2_586 293 #define DIV2_585 292 #define DIV2_584 292 #define DIV2_583 291 #define DIV2_582 291 #define DIV2_581 290 #define DIV2_580 290 #define DIV2_579 289 #define DIV2_578 289 #define DIV2_577 288 #define DIV2_576 288 #define DIV2_575 287 #define DIV2_574 287 #define DIV2_573 286 #define DIV2_572 286 #define DIV2_571 285 #define DIV2_570 285 #define DIV2_569 284 #define DIV2_568 284 #define DIV2_567 283 #define DIV2_566 283 #define DIV2_565 282 #define DIV2_564 282 #define DIV2_563 281 #define DIV2_562 281 #define DIV2_561 280 #define DIV2_560 280 #define DIV2_559 279 #define DIV2_558 279 #define DIV2_557 278 #define DIV2_556 278 #define DIV2_555 277 #define DIV2_554 277 #define DIV2_553 276 #define DIV2_552 276 #define DIV2_551 275 #define DIV2_550 275 #define DIV2_549 274 #define DIV2_548 274 #define DIV2_547 273 #define DIV2_546 273 #define DIV2_545 272 #define DIV2_544 272 #define DIV2_543 271 #define DIV2_542 271 #define DIV2_541 270 #define DIV2_540 270 #define DIV2_539 269 #define DIV2_538 269 #define DIV2_537 268 #define DIV2_536 268 #define DIV2_535 267 #define DIV2_534 267 #define DIV2_533 266 #define DIV2_532 266 #define DIV2_531 265 #define DIV2_530 265 #define DIV2_529 264 #define DIV2_528 264 #define DIV2_527 263 #define DIV2_526 263 #define DIV2_525 262 #define DIV2_524 262 #define DIV2_523 261 #define DIV2_522 261 #define DIV2_521 260 #define DIV2_520 260 #define DIV2_519 259 #define DIV2_518 259 #define DIV2_517 258 #define DIV2_516 258 #define DIV2_515 257 #define DIV2_514 257 #define DIV2_513 256 #define DIV2_512 256 #define DIV2_511 255 #define DIV2_510 255 #define DIV2_509 254 #define DIV2_508 254 #define DIV2_507 253 #define DIV2_506 253 #define DIV2_505 252 #define DIV2_504 252 #define DIV2_503 251 #define DIV2_502 251 #define DIV2_501 250 #define DIV2_500 250 #define DIV2_499 249 #define DIV2_498 249 #define DIV2_497 248 #define DIV2_496 248 #define DIV2_495 247 #define DIV2_494 247 #define DIV2_493 246 #define DIV2_492 246 #define DIV2_491 245 #define DIV2_490 245 #define DIV2_489 244 #define DIV2_488 244 #define DIV2_487 243 #define DIV2_486 243 #define DIV2_485 242 #define DIV2_484 242 #define DIV2_483 241 #define DIV2_482 241 #define DIV2_481 240 #define DIV2_480 240 #define DIV2_479 239 #define DIV2_478 239 #define DIV2_477 238 #define DIV2_476 238 #define DIV2_475 237 #define DIV2_474 237 #define DIV2_473 236 #define DIV2_472 236 #define DIV2_471 235 #define DIV2_470 235 #define DIV2_469 234 #define DIV2_468 234 #define DIV2_467 233 #define DIV2_466 233 #define DIV2_465 232 #define DIV2_464 232 #define DIV2_463 231 #define DIV2_462 231 #define DIV2_461 230 #define DIV2_460 230 #define DIV2_459 229 #define DIV2_458 229 #define DIV2_457 228 #define DIV2_456 228 #define DIV2_455 227 #define DIV2_454 227 #define DIV2_453 226 #define DIV2_452 226 #define DIV2_451 225 #define DIV2_450 225 #define DIV2_449 224 #define DIV2_448 224 #define DIV2_447 223 #define DIV2_446 223 #define DIV2_445 222 #define DIV2_444 222 #define DIV2_443 221 #define DIV2_442 221 #define DIV2_441 220 #define DIV2_440 220 #define DIV2_439 219 #define DIV2_438 219 #define DIV2_437 218 #define DIV2_436 218 #define DIV2_435 217 #define DIV2_434 217 #define DIV2_433 216 #define DIV2_432 216 #define DIV2_431 215 #define DIV2_430 215 #define DIV2_429 214 #define DIV2_428 214 #define DIV2_427 213 #define DIV2_426 213 #define DIV2_425 212 #define DIV2_424 212 #define DIV2_423 211 #define DIV2_422 211 #define DIV2_421 210 #define DIV2_420 210 #define DIV2_419 209 #define DIV2_418 209 #define DIV2_417 208 #define DIV2_416 208 #define DIV2_415 207 #define DIV2_414 207 #define DIV2_413 206 #define DIV2_412 206 #define DIV2_411 205 #define DIV2_410 205 #define DIV2_409 204 #define DIV2_408 204 #define DIV2_407 203 #define DIV2_406 203 #define DIV2_405 202 #define DIV2_404 202 #define DIV2_403 201 #define DIV2_402 201 #define DIV2_401 200 #define DIV2_400 200 #define DIV2_399 199 #define DIV2_398 199 #define DIV2_397 198 #define DIV2_396 198 #define DIV2_395 197 #define DIV2_394 197 #define DIV2_393 196 #define DIV2_392 196 #define DIV2_391 195 #define DIV2_390 195 #define DIV2_389 194 #define DIV2_388 194 #define DIV2_387 193 #define DIV2_386 193 #define DIV2_385 192 #define DIV2_384 192 #define DIV2_383 191 #define DIV2_382 191 #define DIV2_381 190 #define DIV2_380 190 #define DIV2_379 189 #define DIV2_378 189 #define DIV2_377 188 #define DIV2_376 188 #define DIV2_375 187 #define DIV2_374 187 #define DIV2_373 186 #define DIV2_372 186 #define DIV2_371 185 #define DIV2_370 185 #define DIV2_369 184 #define DIV2_368 184 #define DIV2_367 183 #define DIV2_366 183 #define DIV2_365 182 #define DIV2_364 182 #define DIV2_363 181 #define DIV2_362 181 #define DIV2_361 180 #define DIV2_360 180 #define DIV2_359 179 #define DIV2_358 179 #define DIV2_357 178 #define DIV2_356 178 #define DIV2_355 177 #define DIV2_354 177 #define DIV2_353 176 #define DIV2_352 176 #define DIV2_351 175 #define DIV2_350 175 #define DIV2_349 174 #define DIV2_348 174 #define DIV2_347 173 #define DIV2_346 173 #define DIV2_345 172 #define DIV2_344 172 #define DIV2_343 171 #define DIV2_342 171 #define DIV2_341 170 #define DIV2_340 170 #define DIV2_339 169 #define DIV2_338 169 #define DIV2_337 168 #define DIV2_336 168 #define DIV2_335 167 #define DIV2_334 167 #define DIV2_333 166 #define DIV2_332 166 #define DIV2_331 165 #define DIV2_330 165 #define DIV2_329 164 #define DIV2_328 164 #define DIV2_327 163 #define DIV2_326 163 #define DIV2_325 162 #define DIV2_324 162 #define DIV2_323 161 #define DIV2_322 161 #define DIV2_321 160 #define DIV2_320 160 #define DIV2_319 159 #define DIV2_318 159 #define DIV2_317 158 #define DIV2_316 158 #define DIV2_315 157 #define DIV2_314 157 #define DIV2_313 156 #define DIV2_312 156 #define DIV2_311 155 #define DIV2_310 155 #define DIV2_309 154 #define DIV2_308 154 #define DIV2_307 153 #define DIV2_306 153 #define DIV2_305 152 #define DIV2_304 152 #define DIV2_303 151 #define DIV2_302 151 #define DIV2_301 150 #define DIV2_300 150 #define DIV2_299 149 #define DIV2_298 149 #define DIV2_297 148 #define DIV2_296 148 #define DIV2_295 147 #define DIV2_294 147 #define DIV2_293 146 #define DIV2_292 146 #define DIV2_291 145 #define DIV2_290 145 #define DIV2_289 144 #define DIV2_288 144 #define DIV2_287 143 #define DIV2_286 143 #define DIV2_285 142 #define DIV2_284 142 #define DIV2_283 141 #define DIV2_282 141 #define DIV2_281 140 #define DIV2_280 140 #define DIV2_279 139 #define DIV2_278 139 #define DIV2_277 138 #define DIV2_276 138 #define DIV2_275 137 #define DIV2_274 137 #define DIV2_273 136 #define DIV2_272 136 #define DIV2_271 135 #define DIV2_270 135 #define DIV2_269 134 #define DIV2_268 134 #define DIV2_267 133 #define DIV2_266 133 #define DIV2_265 132 #define DIV2_264 132 #define DIV2_263 131 #define DIV2_262 131 #define DIV2_261 130 #define DIV2_260 130 #define DIV2_259 129 #define DIV2_258 129 #define DIV2_257 128 #define DIV2_256 128 #define DIV2_255 127 #define DIV2_254 127 #define DIV2_253 126 #define DIV2_252 126 #define DIV2_251 125 #define DIV2_250 125 #define DIV2_249 124 #define DIV2_248 124 #define DIV2_247 123 #define DIV2_246 123 #define DIV2_245 122 #define DIV2_244 122 #define DIV2_243 121 #define DIV2_242 121 #define DIV2_241 120 #define DIV2_240 120 #define DIV2_239 119 #define DIV2_238 119 #define DIV2_237 118 #define DIV2_236 118 #define DIV2_235 117 #define DIV2_234 117 #define DIV2_233 116 #define DIV2_232 116 #define DIV2_231 115 #define DIV2_230 115 #define DIV2_229 114 #define DIV2_228 114 #define DIV2_227 113 #define DIV2_226 113 #define DIV2_225 112 #define DIV2_224 112 #define DIV2_223 111 #define DIV2_222 111 #define DIV2_221 110 #define DIV2_220 110 #define DIV2_219 109 #define DIV2_218 109 #define DIV2_217 108 #define DIV2_216 108 #define DIV2_215 107 #define DIV2_214 107 #define DIV2_213 106 #define DIV2_212 106 #define DIV2_211 105 #define DIV2_210 105 #define DIV2_209 104 #define DIV2_208 104 #define DIV2_207 103 #define DIV2_206 103 #define DIV2_205 102 #define DIV2_204 102 #define DIV2_203 101 #define DIV2_202 101 #define DIV2_201 100 #define DIV2_200 100 #define DIV2_199 99 #define DIV2_198 99 #define DIV2_197 98 #define DIV2_196 98 #define DIV2_195 97 #define DIV2_194 97 #define DIV2_193 96 #define DIV2_192 96 #define DIV2_191 95 #define DIV2_190 95 #define DIV2_189 94 #define DIV2_188 94 #define DIV2_187 93 #define DIV2_186 93 #define DIV2_185 92 #define DIV2_184 92 #define DIV2_183 91 #define DIV2_182 91 #define DIV2_181 90 #define DIV2_180 90 #define DIV2_179 89 #define DIV2_178 89 #define DIV2_177 88 #define DIV2_176 88 #define DIV2_175 87 #define DIV2_174 87 #define DIV2_173 86 #define DIV2_172 86 #define DIV2_171 85 #define DIV2_170 85 #define DIV2_169 84 #define DIV2_168 84 #define DIV2_167 83 #define DIV2_166 83 #define DIV2_165 82 #define DIV2_164 82 #define DIV2_163 81 #define DIV2_162 81 #define DIV2_161 80 #define DIV2_160 80 #define DIV2_159 79 #define DIV2_158 79 #define DIV2_157 78 #define DIV2_156 78 #define DIV2_155 77 #define DIV2_154 77 #define DIV2_153 76 #define DIV2_152 76 #define DIV2_151 75 #define DIV2_150 75 #define DIV2_149 74 #define DIV2_148 74 #define DIV2_147 73 #define DIV2_146 73 #define DIV2_145 72 #define DIV2_144 72 #define DIV2_143 71 #define DIV2_142 71 #define DIV2_141 70 #define DIV2_140 70 #define DIV2_139 69 #define DIV2_138 69 #define DIV2_137 68 #define DIV2_136 68 #define DIV2_135 67 #define DIV2_134 67 #define DIV2_133 66 #define DIV2_132 66 #define DIV2_131 65 #define DIV2_130 65 #define DIV2_129 64 #define DIV2_128 64 #define DIV2_127 63 #define DIV2_126 63 #define DIV2_125 62 #define DIV2_124 62 #define DIV2_123 61 #define DIV2_122 61 #define DIV2_121 60 #define DIV2_120 60 #define DIV2_119 59 #define DIV2_118 59 #define DIV2_117 58 #define DIV2_116 58 #define DIV2_115 57 #define DIV2_114 57 #define DIV2_113 56 #define DIV2_112 56 #define DIV2_111 55 #define DIV2_110 55 #define DIV2_109 54 #define DIV2_108 54 #define DIV2_107 53 #define DIV2_106 53 #define DIV2_105 52 #define DIV2_104 52 #define DIV2_103 51 #define DIV2_102 51 #define DIV2_101 50 #define DIV2_100 50 #define DIV2_99 49 #define DIV2_98 49 #define DIV2_97 48 #define DIV2_96 48 #define DIV2_95 47 #define DIV2_94 47 #define DIV2_93 46 #define DIV2_92 46 #define DIV2_91 45 #define DIV2_90 45 #define DIV2_89 44 #define DIV2_88 44 #define DIV2_87 43 #define DIV2_86 43 #define DIV2_85 42 #define DIV2_84 42 #define DIV2_83 41 #define DIV2_82 41 #define DIV2_81 40 #define DIV2_80 40 #define DIV2_79 39 #define DIV2_78 39 #define DIV2_77 38 #define DIV2_76 38 #define DIV2_75 37 #define DIV2_74 37 #define DIV2_73 36 #define DIV2_72 36 #define DIV2_71 35 #define DIV2_70 35 #define DIV2_69 34 #define DIV2_68 34 #define DIV2_67 33 #define DIV2_66 33 #define DIV2_65 32 #define DIV2_64 32 #define DIV2_63 31 #define DIV2_62 31 #define DIV2_61 30 #define DIV2_60 30 #define DIV2_59 29 #define DIV2_58 29 #define DIV2_57 28 #define DIV2_56 28 #define DIV2_55 27 #define DIV2_54 27 #define DIV2_53 26 #define DIV2_52 26 #define DIV2_51 25 #define DIV2_50 25 #define DIV2_49 24 #define DIV2_48 24 #define DIV2_47 23 #define DIV2_46 23 #define DIV2_45 22 #define DIV2_44 22 #define DIV2_43 21 #define DIV2_42 21 #define DIV2_41 20 #define DIV2_40 20 #define DIV2_39 19 #define DIV2_38 19 #define DIV2_37 18 #define DIV2_36 18 #define DIV2_35 17 #define DIV2_34 17 #define DIV2_33 16 #define DIV2_32 16 #define DIV2_31 15 #define DIV2_30 15 #define DIV2_29 14 #define DIV2_28 14 #define DIV2_27 13 #define DIV2_26 13 #define DIV2_25 12 #define DIV2_24 12 #define DIV2_23 11 #define DIV2_22 11 #define DIV2_21 10 #define DIV2_20 10 #define DIV2_19 9 #define DIV2_18 9 #define DIV2_17 8 #define DIV2_16 8 #define DIV2_15 7 #define DIV2_14 7 #define DIV2_13 6 #define DIV2_12 6 #define DIV2_11 5 #define DIV2_10 5 #define DIV2_9 4 #define DIV2_8 4 #define DIV2_7 3 #define DIV2_6 3 #define DIV2_5 2 #define DIV2_4 2 #define DIV2_3 1 #define DIV2_2 1 #define DIV2_1 0 #define DIV2_0 0 #define MOD2(x) C2(MOD2_,x) #define MOD2_1024 0 #define MOD2_1023 1 #define MOD2_1022 0 #define MOD2_1021 1 #define MOD2_1020 0 #define MOD2_1019 1 #define MOD2_1018 0 #define MOD2_1017 1 #define MOD2_1016 0 #define MOD2_1015 1 #define MOD2_1014 0 #define MOD2_1013 1 #define MOD2_1012 0 #define MOD2_1011 1 #define MOD2_1010 0 #define MOD2_1009 1 #define MOD2_1008 0 #define MOD2_1007 1 #define MOD2_1006 0 #define MOD2_1005 1 #define MOD2_1004 0 #define MOD2_1003 1 #define MOD2_1002 0 #define MOD2_1001 1 #define MOD2_1000 0 #define MOD2_999 1 #define MOD2_998 0 #define MOD2_997 1 #define MOD2_996 0 #define MOD2_995 1 #define MOD2_994 0 #define MOD2_993 1 #define MOD2_992 0 #define MOD2_991 1 #define MOD2_990 0 #define MOD2_989 1 #define MOD2_988 0 #define MOD2_987 1 #define MOD2_986 0 #define MOD2_985 1 #define MOD2_984 0 #define MOD2_983 1 #define MOD2_982 0 #define MOD2_981 1 #define MOD2_980 0 #define MOD2_979 1 #define MOD2_978 0 #define MOD2_977 1 #define MOD2_976 0 #define MOD2_975 1 #define MOD2_974 0 #define MOD2_973 1 #define MOD2_972 0 #define MOD2_971 1 #define MOD2_970 0 #define MOD2_969 1 #define MOD2_968 0 #define MOD2_967 1 #define MOD2_966 0 #define MOD2_965 1 #define MOD2_964 0 #define MOD2_963 1 #define MOD2_962 0 #define MOD2_961 1 #define MOD2_960 0 #define MOD2_959 1 #define MOD2_958 0 #define MOD2_957 1 #define MOD2_956 0 #define MOD2_955 1 #define MOD2_954 0 #define MOD2_953 1 #define MOD2_952 0 #define MOD2_951 1 #define MOD2_950 0 #define MOD2_949 1 #define MOD2_948 0 #define MOD2_947 1 #define MOD2_946 0 #define MOD2_945 1 #define MOD2_944 0 #define MOD2_943 1 #define MOD2_942 0 #define MOD2_941 1 #define MOD2_940 0 #define MOD2_939 1 #define MOD2_938 0 #define MOD2_937 1 #define MOD2_936 0 #define MOD2_935 1 #define MOD2_934 0 #define MOD2_933 1 #define MOD2_932 0 #define MOD2_931 1 #define MOD2_930 0 #define MOD2_929 1 #define MOD2_928 0 #define MOD2_927 1 #define MOD2_926 0 #define MOD2_925 1 #define MOD2_924 0 #define MOD2_923 1 #define MOD2_922 0 #define MOD2_921 1 #define MOD2_920 0 #define MOD2_919 1 #define MOD2_918 0 #define MOD2_917 1 #define MOD2_916 0 #define MOD2_915 1 #define MOD2_914 0 #define MOD2_913 1 #define MOD2_912 0 #define MOD2_911 1 #define MOD2_910 0 #define MOD2_909 1 #define MOD2_908 0 #define MOD2_907 1 #define MOD2_906 0 #define MOD2_905 1 #define MOD2_904 0 #define MOD2_903 1 #define MOD2_902 0 #define MOD2_901 1 #define MOD2_900 0 #define MOD2_899 1 #define MOD2_898 0 #define MOD2_897 1 #define MOD2_896 0 #define MOD2_895 1 #define MOD2_894 0 #define MOD2_893 1 #define MOD2_892 0 #define MOD2_891 1 #define MOD2_890 0 #define MOD2_889 1 #define MOD2_888 0 #define MOD2_887 1 #define MOD2_886 0 #define MOD2_885 1 #define MOD2_884 0 #define MOD2_883 1 #define MOD2_882 0 #define MOD2_881 1 #define MOD2_880 0 #define MOD2_879 1 #define MOD2_878 0 #define MOD2_877 1 #define MOD2_876 0 #define MOD2_875 1 #define MOD2_874 0 #define MOD2_873 1 #define MOD2_872 0 #define MOD2_871 1 #define MOD2_870 0 #define MOD2_869 1 #define MOD2_868 0 #define MOD2_867 1 #define MOD2_866 0 #define MOD2_865 1 #define MOD2_864 0 #define MOD2_863 1 #define MOD2_862 0 #define MOD2_861 1 #define MOD2_860 0 #define MOD2_859 1 #define MOD2_858 0 #define MOD2_857 1 #define MOD2_856 0 #define MOD2_855 1 #define MOD2_854 0 #define MOD2_853 1 #define MOD2_852 0 #define MOD2_851 1 #define MOD2_850 0 #define MOD2_849 1 #define MOD2_848 0 #define MOD2_847 1 #define MOD2_846 0 #define MOD2_845 1 #define MOD2_844 0 #define MOD2_843 1 #define MOD2_842 0 #define MOD2_841 1 #define MOD2_840 0 #define MOD2_839 1 #define MOD2_838 0 #define MOD2_837 1 #define MOD2_836 0 #define MOD2_835 1 #define MOD2_834 0 #define MOD2_833 1 #define MOD2_832 0 #define MOD2_831 1 #define MOD2_830 0 #define MOD2_829 1 #define MOD2_828 0 #define MOD2_827 1 #define MOD2_826 0 #define MOD2_825 1 #define MOD2_824 0 #define MOD2_823 1 #define MOD2_822 0 #define MOD2_821 1 #define MOD2_820 0 #define MOD2_819 1 #define MOD2_818 0 #define MOD2_817 1 #define MOD2_816 0 #define MOD2_815 1 #define MOD2_814 0 #define MOD2_813 1 #define MOD2_812 0 #define MOD2_811 1 #define MOD2_810 0 #define MOD2_809 1 #define MOD2_808 0 #define MOD2_807 1 #define MOD2_806 0 #define MOD2_805 1 #define MOD2_804 0 #define MOD2_803 1 #define MOD2_802 0 #define MOD2_801 1 #define MOD2_800 0 #define MOD2_799 1 #define MOD2_798 0 #define MOD2_797 1 #define MOD2_796 0 #define MOD2_795 1 #define MOD2_794 0 #define MOD2_793 1 #define MOD2_792 0 #define MOD2_791 1 #define MOD2_790 0 #define MOD2_789 1 #define MOD2_788 0 #define MOD2_787 1 #define MOD2_786 0 #define MOD2_785 1 #define MOD2_784 0 #define MOD2_783 1 #define MOD2_782 0 #define MOD2_781 1 #define MOD2_780 0 #define MOD2_779 1 #define MOD2_778 0 #define MOD2_777 1 #define MOD2_776 0 #define MOD2_775 1 #define MOD2_774 0 #define MOD2_773 1 #define MOD2_772 0 #define MOD2_771 1 #define MOD2_770 0 #define MOD2_769 1 #define MOD2_768 0 #define MOD2_767 1 #define MOD2_766 0 #define MOD2_765 1 #define MOD2_764 0 #define MOD2_763 1 #define MOD2_762 0 #define MOD2_761 1 #define MOD2_760 0 #define MOD2_759 1 #define MOD2_758 0 #define MOD2_757 1 #define MOD2_756 0 #define MOD2_755 1 #define MOD2_754 0 #define MOD2_753 1 #define MOD2_752 0 #define MOD2_751 1 #define MOD2_750 0 #define MOD2_749 1 #define MOD2_748 0 #define MOD2_747 1 #define MOD2_746 0 #define MOD2_745 1 #define MOD2_744 0 #define MOD2_743 1 #define MOD2_742 0 #define MOD2_741 1 #define MOD2_740 0 #define MOD2_739 1 #define MOD2_738 0 #define MOD2_737 1 #define MOD2_736 0 #define MOD2_735 1 #define MOD2_734 0 #define MOD2_733 1 #define MOD2_732 0 #define MOD2_731 1 #define MOD2_730 0 #define MOD2_729 1 #define MOD2_728 0 #define MOD2_727 1 #define MOD2_726 0 #define MOD2_725 1 #define MOD2_724 0 #define MOD2_723 1 #define MOD2_722 0 #define MOD2_721 1 #define MOD2_720 0 #define MOD2_719 1 #define MOD2_718 0 #define MOD2_717 1 #define MOD2_716 0 #define MOD2_715 1 #define MOD2_714 0 #define MOD2_713 1 #define MOD2_712 0 #define MOD2_711 1 #define MOD2_710 0 #define MOD2_709 1 #define MOD2_708 0 #define MOD2_707 1 #define MOD2_706 0 #define MOD2_705 1 #define MOD2_704 0 #define MOD2_703 1 #define MOD2_702 0 #define MOD2_701 1 #define MOD2_700 0 #define MOD2_699 1 #define MOD2_698 0 #define MOD2_697 1 #define MOD2_696 0 #define MOD2_695 1 #define MOD2_694 0 #define MOD2_693 1 #define MOD2_692 0 #define MOD2_691 1 #define MOD2_690 0 #define MOD2_689 1 #define MOD2_688 0 #define MOD2_687 1 #define MOD2_686 0 #define MOD2_685 1 #define MOD2_684 0 #define MOD2_683 1 #define MOD2_682 0 #define MOD2_681 1 #define MOD2_680 0 #define MOD2_679 1 #define MOD2_678 0 #define MOD2_677 1 #define MOD2_676 0 #define MOD2_675 1 #define MOD2_674 0 #define MOD2_673 1 #define MOD2_672 0 #define MOD2_671 1 #define MOD2_670 0 #define MOD2_669 1 #define MOD2_668 0 #define MOD2_667 1 #define MOD2_666 0 #define MOD2_665 1 #define MOD2_664 0 #define MOD2_663 1 #define MOD2_662 0 #define MOD2_661 1 #define MOD2_660 0 #define MOD2_659 1 #define MOD2_658 0 #define MOD2_657 1 #define MOD2_656 0 #define MOD2_655 1 #define MOD2_654 0 #define MOD2_653 1 #define MOD2_652 0 #define MOD2_651 1 #define MOD2_650 0 #define MOD2_649 1 #define MOD2_648 0 #define MOD2_647 1 #define MOD2_646 0 #define MOD2_645 1 #define MOD2_644 0 #define MOD2_643 1 #define MOD2_642 0 #define MOD2_641 1 #define MOD2_640 0 #define MOD2_639 1 #define MOD2_638 0 #define MOD2_637 1 #define MOD2_636 0 #define MOD2_635 1 #define MOD2_634 0 #define MOD2_633 1 #define MOD2_632 0 #define MOD2_631 1 #define MOD2_630 0 #define MOD2_629 1 #define MOD2_628 0 #define MOD2_627 1 #define MOD2_626 0 #define MOD2_625 1 #define MOD2_624 0 #define MOD2_623 1 #define MOD2_622 0 #define MOD2_621 1 #define MOD2_620 0 #define MOD2_619 1 #define MOD2_618 0 #define MOD2_617 1 #define MOD2_616 0 #define MOD2_615 1 #define MOD2_614 0 #define MOD2_613 1 #define MOD2_612 0 #define MOD2_611 1 #define MOD2_610 0 #define MOD2_609 1 #define MOD2_608 0 #define MOD2_607 1 #define MOD2_606 0 #define MOD2_605 1 #define MOD2_604 0 #define MOD2_603 1 #define MOD2_602 0 #define MOD2_601 1 #define MOD2_600 0 #define MOD2_599 1 #define MOD2_598 0 #define MOD2_597 1 #define MOD2_596 0 #define MOD2_595 1 #define MOD2_594 0 #define MOD2_593 1 #define MOD2_592 0 #define MOD2_591 1 #define MOD2_590 0 #define MOD2_589 1 #define MOD2_588 0 #define MOD2_587 1 #define MOD2_586 0 #define MOD2_585 1 #define MOD2_584 0 #define MOD2_583 1 #define MOD2_582 0 #define MOD2_581 1 #define MOD2_580 0 #define MOD2_579 1 #define MOD2_578 0 #define MOD2_577 1 #define MOD2_576 0 #define MOD2_575 1 #define MOD2_574 0 #define MOD2_573 1 #define MOD2_572 0 #define MOD2_571 1 #define MOD2_570 0 #define MOD2_569 1 #define MOD2_568 0 #define MOD2_567 1 #define MOD2_566 0 #define MOD2_565 1 #define MOD2_564 0 #define MOD2_563 1 #define MOD2_562 0 #define MOD2_561 1 #define MOD2_560 0 #define MOD2_559 1 #define MOD2_558 0 #define MOD2_557 1 #define MOD2_556 0 #define MOD2_555 1 #define MOD2_554 0 #define MOD2_553 1 #define MOD2_552 0 #define MOD2_551 1 #define MOD2_550 0 #define MOD2_549 1 #define MOD2_548 0 #define MOD2_547 1 #define MOD2_546 0 #define MOD2_545 1 #define MOD2_544 0 #define MOD2_543 1 #define MOD2_542 0 #define MOD2_541 1 #define MOD2_540 0 #define MOD2_539 1 #define MOD2_538 0 #define MOD2_537 1 #define MOD2_536 0 #define MOD2_535 1 #define MOD2_534 0 #define MOD2_533 1 #define MOD2_532 0 #define MOD2_531 1 #define MOD2_530 0 #define MOD2_529 1 #define MOD2_528 0 #define MOD2_527 1 #define MOD2_526 0 #define MOD2_525 1 #define MOD2_524 0 #define MOD2_523 1 #define MOD2_522 0 #define MOD2_521 1 #define MOD2_520 0 #define MOD2_519 1 #define MOD2_518 0 #define MOD2_517 1 #define MOD2_516 0 #define MOD2_515 1 #define MOD2_514 0 #define MOD2_513 1 #define MOD2_512 0 #define MOD2_511 1 #define MOD2_510 0 #define MOD2_509 1 #define MOD2_508 0 #define MOD2_507 1 #define MOD2_506 0 #define MOD2_505 1 #define MOD2_504 0 #define MOD2_503 1 #define MOD2_502 0 #define MOD2_501 1 #define MOD2_500 0 #define MOD2_499 1 #define MOD2_498 0 #define MOD2_497 1 #define MOD2_496 0 #define MOD2_495 1 #define MOD2_494 0 #define MOD2_493 1 #define MOD2_492 0 #define MOD2_491 1 #define MOD2_490 0 #define MOD2_489 1 #define MOD2_488 0 #define MOD2_487 1 #define MOD2_486 0 #define MOD2_485 1 #define MOD2_484 0 #define MOD2_483 1 #define MOD2_482 0 #define MOD2_481 1 #define MOD2_480 0 #define MOD2_479 1 #define MOD2_478 0 #define MOD2_477 1 #define MOD2_476 0 #define MOD2_475 1 #define MOD2_474 0 #define MOD2_473 1 #define MOD2_472 0 #define MOD2_471 1 #define MOD2_470 0 #define MOD2_469 1 #define MOD2_468 0 #define MOD2_467 1 #define MOD2_466 0 #define MOD2_465 1 #define MOD2_464 0 #define MOD2_463 1 #define MOD2_462 0 #define MOD2_461 1 #define MOD2_460 0 #define MOD2_459 1 #define MOD2_458 0 #define MOD2_457 1 #define MOD2_456 0 #define MOD2_455 1 #define MOD2_454 0 #define MOD2_453 1 #define MOD2_452 0 #define MOD2_451 1 #define MOD2_450 0 #define MOD2_449 1 #define MOD2_448 0 #define MOD2_447 1 #define MOD2_446 0 #define MOD2_445 1 #define MOD2_444 0 #define MOD2_443 1 #define MOD2_442 0 #define MOD2_441 1 #define MOD2_440 0 #define MOD2_439 1 #define MOD2_438 0 #define MOD2_437 1 #define MOD2_436 0 #define MOD2_435 1 #define MOD2_434 0 #define MOD2_433 1 #define MOD2_432 0 #define MOD2_431 1 #define MOD2_430 0 #define MOD2_429 1 #define MOD2_428 0 #define MOD2_427 1 #define MOD2_426 0 #define MOD2_425 1 #define MOD2_424 0 #define MOD2_423 1 #define MOD2_422 0 #define MOD2_421 1 #define MOD2_420 0 #define MOD2_419 1 #define MOD2_418 0 #define MOD2_417 1 #define MOD2_416 0 #define MOD2_415 1 #define MOD2_414 0 #define MOD2_413 1 #define MOD2_412 0 #define MOD2_411 1 #define MOD2_410 0 #define MOD2_409 1 #define MOD2_408 0 #define MOD2_407 1 #define MOD2_406 0 #define MOD2_405 1 #define MOD2_404 0 #define MOD2_403 1 #define MOD2_402 0 #define MOD2_401 1 #define MOD2_400 0 #define MOD2_399 1 #define MOD2_398 0 #define MOD2_397 1 #define MOD2_396 0 #define MOD2_395 1 #define MOD2_394 0 #define MOD2_393 1 #define MOD2_392 0 #define MOD2_391 1 #define MOD2_390 0 #define MOD2_389 1 #define MOD2_388 0 #define MOD2_387 1 #define MOD2_386 0 #define MOD2_385 1 #define MOD2_384 0 #define MOD2_383 1 #define MOD2_382 0 #define MOD2_381 1 #define MOD2_380 0 #define MOD2_379 1 #define MOD2_378 0 #define MOD2_377 1 #define MOD2_376 0 #define MOD2_375 1 #define MOD2_374 0 #define MOD2_373 1 #define MOD2_372 0 #define MOD2_371 1 #define MOD2_370 0 #define MOD2_369 1 #define MOD2_368 0 #define MOD2_367 1 #define MOD2_366 0 #define MOD2_365 1 #define MOD2_364 0 #define MOD2_363 1 #define MOD2_362 0 #define MOD2_361 1 #define MOD2_360 0 #define MOD2_359 1 #define MOD2_358 0 #define MOD2_357 1 #define MOD2_356 0 #define MOD2_355 1 #define MOD2_354 0 #define MOD2_353 1 #define MOD2_352 0 #define MOD2_351 1 #define MOD2_350 0 #define MOD2_349 1 #define MOD2_348 0 #define MOD2_347 1 #define MOD2_346 0 #define MOD2_345 1 #define MOD2_344 0 #define MOD2_343 1 #define MOD2_342 0 #define MOD2_341 1 #define MOD2_340 0 #define MOD2_339 1 #define MOD2_338 0 #define MOD2_337 1 #define MOD2_336 0 #define MOD2_335 1 #define MOD2_334 0 #define MOD2_333 1 #define MOD2_332 0 #define MOD2_331 1 #define MOD2_330 0 #define MOD2_329 1 #define MOD2_328 0 #define MOD2_327 1 #define MOD2_326 0 #define MOD2_325 1 #define MOD2_324 0 #define MOD2_323 1 #define MOD2_322 0 #define MOD2_321 1 #define MOD2_320 0 #define MOD2_319 1 #define MOD2_318 0 #define MOD2_317 1 #define MOD2_316 0 #define MOD2_315 1 #define MOD2_314 0 #define MOD2_313 1 #define MOD2_312 0 #define MOD2_311 1 #define MOD2_310 0 #define MOD2_309 1 #define MOD2_308 0 #define MOD2_307 1 #define MOD2_306 0 #define MOD2_305 1 #define MOD2_304 0 #define MOD2_303 1 #define MOD2_302 0 #define MOD2_301 1 #define MOD2_300 0 #define MOD2_299 1 #define MOD2_298 0 #define MOD2_297 1 #define MOD2_296 0 #define MOD2_295 1 #define MOD2_294 0 #define MOD2_293 1 #define MOD2_292 0 #define MOD2_291 1 #define MOD2_290 0 #define MOD2_289 1 #define MOD2_288 0 #define MOD2_287 1 #define MOD2_286 0 #define MOD2_285 1 #define MOD2_284 0 #define MOD2_283 1 #define MOD2_282 0 #define MOD2_281 1 #define MOD2_280 0 #define MOD2_279 1 #define MOD2_278 0 #define MOD2_277 1 #define MOD2_276 0 #define MOD2_275 1 #define MOD2_274 0 #define MOD2_273 1 #define MOD2_272 0 #define MOD2_271 1 #define MOD2_270 0 #define MOD2_269 1 #define MOD2_268 0 #define MOD2_267 1 #define MOD2_266 0 #define MOD2_265 1 #define MOD2_264 0 #define MOD2_263 1 #define MOD2_262 0 #define MOD2_261 1 #define MOD2_260 0 #define MOD2_259 1 #define MOD2_258 0 #define MOD2_257 1 #define MOD2_256 0 #define MOD2_255 1 #define MOD2_254 0 #define MOD2_253 1 #define MOD2_252 0 #define MOD2_251 1 #define MOD2_250 0 #define MOD2_249 1 #define MOD2_248 0 #define MOD2_247 1 #define MOD2_246 0 #define MOD2_245 1 #define MOD2_244 0 #define MOD2_243 1 #define MOD2_242 0 #define MOD2_241 1 #define MOD2_240 0 #define MOD2_239 1 #define MOD2_238 0 #define MOD2_237 1 #define MOD2_236 0 #define MOD2_235 1 #define MOD2_234 0 #define MOD2_233 1 #define MOD2_232 0 #define MOD2_231 1 #define MOD2_230 0 #define MOD2_229 1 #define MOD2_228 0 #define MOD2_227 1 #define MOD2_226 0 #define MOD2_225 1 #define MOD2_224 0 #define MOD2_223 1 #define MOD2_222 0 #define MOD2_221 1 #define MOD2_220 0 #define MOD2_219 1 #define MOD2_218 0 #define MOD2_217 1 #define MOD2_216 0 #define MOD2_215 1 #define MOD2_214 0 #define MOD2_213 1 #define MOD2_212 0 #define MOD2_211 1 #define MOD2_210 0 #define MOD2_209 1 #define MOD2_208 0 #define MOD2_207 1 #define MOD2_206 0 #define MOD2_205 1 #define MOD2_204 0 #define MOD2_203 1 #define MOD2_202 0 #define MOD2_201 1 #define MOD2_200 0 #define MOD2_199 1 #define MOD2_198 0 #define MOD2_197 1 #define MOD2_196 0 #define MOD2_195 1 #define MOD2_194 0 #define MOD2_193 1 #define MOD2_192 0 #define MOD2_191 1 #define MOD2_190 0 #define MOD2_189 1 #define MOD2_188 0 #define MOD2_187 1 #define MOD2_186 0 #define MOD2_185 1 #define MOD2_184 0 #define MOD2_183 1 #define MOD2_182 0 #define MOD2_181 1 #define MOD2_180 0 #define MOD2_179 1 #define MOD2_178 0 #define MOD2_177 1 #define MOD2_176 0 #define MOD2_175 1 #define MOD2_174 0 #define MOD2_173 1 #define MOD2_172 0 #define MOD2_171 1 #define MOD2_170 0 #define MOD2_169 1 #define MOD2_168 0 #define MOD2_167 1 #define MOD2_166 0 #define MOD2_165 1 #define MOD2_164 0 #define MOD2_163 1 #define MOD2_162 0 #define MOD2_161 1 #define MOD2_160 0 #define MOD2_159 1 #define MOD2_158 0 #define MOD2_157 1 #define MOD2_156 0 #define MOD2_155 1 #define MOD2_154 0 #define MOD2_153 1 #define MOD2_152 0 #define MOD2_151 1 #define MOD2_150 0 #define MOD2_149 1 #define MOD2_148 0 #define MOD2_147 1 #define MOD2_146 0 #define MOD2_145 1 #define MOD2_144 0 #define MOD2_143 1 #define MOD2_142 0 #define MOD2_141 1 #define MOD2_140 0 #define MOD2_139 1 #define MOD2_138 0 #define MOD2_137 1 #define MOD2_136 0 #define MOD2_135 1 #define MOD2_134 0 #define MOD2_133 1 #define MOD2_132 0 #define MOD2_131 1 #define MOD2_130 0 #define MOD2_129 1 #define MOD2_128 0 #define MOD2_127 1 #define MOD2_126 0 #define MOD2_125 1 #define MOD2_124 0 #define MOD2_123 1 #define MOD2_122 0 #define MOD2_121 1 #define MOD2_120 0 #define MOD2_119 1 #define MOD2_118 0 #define MOD2_117 1 #define MOD2_116 0 #define MOD2_115 1 #define MOD2_114 0 #define MOD2_113 1 #define MOD2_112 0 #define MOD2_111 1 #define MOD2_110 0 #define MOD2_109 1 #define MOD2_108 0 #define MOD2_107 1 #define MOD2_106 0 #define MOD2_105 1 #define MOD2_104 0 #define MOD2_103 1 #define MOD2_102 0 #define MOD2_101 1 #define MOD2_100 0 #define MOD2_99 1 #define MOD2_98 0 #define MOD2_97 1 #define MOD2_96 0 #define MOD2_95 1 #define MOD2_94 0 #define MOD2_93 1 #define MOD2_92 0 #define MOD2_91 1 #define MOD2_90 0 #define MOD2_89 1 #define MOD2_88 0 #define MOD2_87 1 #define MOD2_86 0 #define MOD2_85 1 #define MOD2_84 0 #define MOD2_83 1 #define MOD2_82 0 #define MOD2_81 1 #define MOD2_80 0 #define MOD2_79 1 #define MOD2_78 0 #define MOD2_77 1 #define MOD2_76 0 #define MOD2_75 1 #define MOD2_74 0 #define MOD2_73 1 #define MOD2_72 0 #define MOD2_71 1 #define MOD2_70 0 #define MOD2_69 1 #define MOD2_68 0 #define MOD2_67 1 #define MOD2_66 0 #define MOD2_65 1 #define MOD2_64 0 #define MOD2_63 1 #define MOD2_62 0 #define MOD2_61 1 #define MOD2_60 0 #define MOD2_59 1 #define MOD2_58 0 #define MOD2_57 1 #define MOD2_56 0 #define MOD2_55 1 #define MOD2_54 0 #define MOD2_53 1 #define MOD2_52 0 #define MOD2_51 1 #define MOD2_50 0 #define MOD2_49 1 #define MOD2_48 0 #define MOD2_47 1 #define MOD2_46 0 #define MOD2_45 1 #define MOD2_44 0 #define MOD2_43 1 #define MOD2_42 0 #define MOD2_41 1 #define MOD2_40 0 #define MOD2_39 1 #define MOD2_38 0 #define MOD2_37 1 #define MOD2_36 0 #define MOD2_35 1 #define MOD2_34 0 #define MOD2_33 1 #define MOD2_32 0 #define MOD2_31 1 #define MOD2_30 0 #define MOD2_29 1 #define MOD2_28 0 #define MOD2_27 1 #define MOD2_26 0 #define MOD2_25 1 #define MOD2_24 0 #define MOD2_23 1 #define MOD2_22 0 #define MOD2_21 1 #define MOD2_20 0 #define MOD2_19 1 #define MOD2_18 0 #define MOD2_17 1 #define MOD2_16 0 #define MOD2_15 1 #define MOD2_14 0 #define MOD2_13 1 #define MOD2_12 0 #define MOD2_11 1 #define MOD2_10 0 #define MOD2_9 1 #define MOD2_8 0 #define MOD2_7 1 #define MOD2_6 0 #define MOD2_5 1 #define MOD2_4 0 #define MOD2_3 1 #define MOD2_2 0 #define MOD2_1 1 #define MOD2_0 0 #define THE_NTH_ARG(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124, ... ) P124 #define _TRIGGER_PARENTHESIS_(...) , #define LPAREN ( #ifdef _MSC_VER #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0) #else #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG (__VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG(__VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0) #endif #define COUNT_ARG(...) C2(COUNT_ARG_, ISEMPTY(__VA_ARGS__))(__VA_ARGS__) #define COUNT_ARG_1(...) 0 #define COUNT_ARG_0(...) C1(COUNT_1_OR_MORE_ARG(__VA_ARGS__)) #define ISEMPTY(...) C5(DISPTACH_EMPTY_, MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__ ()), MORE_THAN_1_ARG(__VA_ARGS__), MORE_THAN_1_ARG(__VA_ARGS__ ()), MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__)) #define DISPTACH_EMPTY_1000 1 #define DISPTACH_EMPTY_0000 0 #define DISPTACH_EMPTY_1100 0 #define DISPTACH_EMPTY_1111 0 #define DISPTACH_EMPTY_1001 0 #define DISPTACH_EMPTY_1010 0 #define C2_(x,y) x##y #define C2(x,y) C2_(x,y) #define C3(x,y,z) C2(x, C2(y,z)) #define C4(x,y,z, u) C2(C2(x,y), C2(z,u)) #define C5(x,y,z,u, v) C2(C4(x,y, z, u), v) #define C1_(x) x #define C1(x) C1_(x) #define C2STRING(x,y) x y #define C3STRING(x,y,z) x y z #define C4STRING(x,y,z,u) x y z u #define C5STRING(x,y,z,u,v) x y z u v #define FOR_EACH_1_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P1) \ FOR_EACH_1_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_1_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(P1) \ FOR_EACH_1_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P1) \ FOR_EACH_1_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(P1) \ FOR_EACH_1_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P1) \ FOR_EACH_1_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(P1) \ FOR_EACH_1_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P1) \ FOR_EACH_1_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(P1) \ FOR_EACH_1_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P1) \ FOR_EACH_1_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(P1) \ FOR_EACH_1_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P1) \ FOR_EACH_1_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(P1) \ FOR_EACH_1_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P1) \ FOR_EACH_1_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(P1) \ FOR_EACH_1_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P1) \ FOR_EACH_1_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(P1) \ FOR_EACH_1_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P1) \ FOR_EACH_1_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(P1) \ FOR_EACH_1_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P1) \ FOR_EACH_1_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(P1) \ FOR_EACH_1_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P1) \ FOR_EACH_1_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(P1) \ FOR_EACH_1_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P1) \ FOR_EACH_1_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(P1) \ FOR_EACH_1_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P1) \ FOR_EACH_1_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(P1) \ FOR_EACH_1_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P1) \ FOR_EACH_1_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(P1) \ FOR_EACH_1_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P1) \ FOR_EACH_1_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(P1) \ FOR_EACH_1_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P1) \ FOR_EACH_1_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(P1) \ FOR_EACH_1_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P1) \ FOR_EACH_1_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(P1) \ FOR_EACH_1_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P1) \ FOR_EACH_1_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(P1) \ FOR_EACH_1_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P1) \ FOR_EACH_1_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(P1) \ FOR_EACH_1_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P1) \ FOR_EACH_1_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(P1) \ FOR_EACH_1_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P1) \ FOR_EACH_1_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(P1) \ FOR_EACH_1_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P1) \ FOR_EACH_1_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(P1) \ FOR_EACH_1_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P1) \ FOR_EACH_1_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(P1) \ FOR_EACH_1_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P1) \ FOR_EACH_1_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(P1) \ FOR_EACH_1_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P1) \ FOR_EACH_1_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(P1) \ FOR_EACH_1_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P1) \ FOR_EACH_1_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(P1) \ FOR_EACH_1_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P1) \ FOR_EACH_1_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(P1) \ FOR_EACH_1_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P1) \ FOR_EACH_1_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(P1) \ FOR_EACH_1_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P1) \ FOR_EACH_1_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(P1) \ FOR_EACH_1_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P1) \ FOR_EACH_1_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(P1) \ FOR_EACH_1_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P1) \ FOR_EACH_1_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(P1) \ FOR_EACH_1_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P1) \ FOR_EACH_1_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(P1) \ FOR_EACH_1_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P1) \ FOR_EACH_1_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(P1) \ FOR_EACH_1_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P1) \ FOR_EACH_1_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(P1) \ FOR_EACH_1_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P1) \ FOR_EACH_1_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(P1) \ FOR_EACH_1_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P1) \ FOR_EACH_1_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(P1) \ FOR_EACH_1_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P1) \ FOR_EACH_1_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(P1) \ FOR_EACH_1_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P1) \ FOR_EACH_1_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(P1) \ FOR_EACH_1_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P1) \ FOR_EACH_1_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(P1) \ FOR_EACH_1_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P1) \ FOR_EACH_1_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(P1) \ FOR_EACH_1_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P1) \ FOR_EACH_1_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(P1) \ FOR_EACH_1_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P1) \ FOR_EACH_1_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(P1) \ FOR_EACH_1_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P1) \ FOR_EACH_1_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(P1) \ FOR_EACH_1_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P1) \ FOR_EACH_1_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(P1) \ FOR_EACH_1_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P1) \ FOR_EACH_1_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(P1) \ FOR_EACH_1_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P1) \ FOR_EACH_1_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(P1) \ FOR_EACH_1_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P1) \ FOR_EACH_1_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(P1) \ FOR_EACH_1_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P1) \ FOR_EACH_1_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(P1) \ FOR_EACH_1_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P1) \ FOR_EACH_1_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(P1) \ FOR_EACH_1_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P1) \ FOR_EACH_1_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(P1) \ FOR_EACH_1_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P1) \ FOR_EACH_1_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(P1) \ FOR_EACH_1_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P1) \ FOR_EACH_1_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(P1) \ FOR_EACH_1_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P1) \ FOR_EACH_1_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(P1) \ FOR_EACH_1_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P1) \ FOR_EACH_1_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(P1) \ FOR_EACH_1_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P1) \ FOR_EACH_1_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(P1) \ FOR_EACH_1_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P1) \ FOR_EACH_1_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(P1) \ FOR_EACH_1_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P1) \ FOR_EACH_1_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(P1) \ FOR_EACH_1_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P1) \ FOR_EACH_1_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(P1) \ FOR_EACH_1_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P1) \ FOR_EACH_1_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(P1) \ FOR_EACH_1_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_6(X, P1, P2, P3, P4, P5, P6) \ X(P1) \ FOR_EACH_1_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_5(X, P1, P2, P3, P4, P5) \ X(P1) \ FOR_EACH_1_4(X, P2, P3, P4, P5) #define FOR_EACH_1_4(X, P1, P2, P3, P4) \ X(P1) \ FOR_EACH_1_3(X, P2, P3, P4) #define FOR_EACH_1_3(X, P1, P2, P3) \ X(P1) \ FOR_EACH_1_2(X, P2, P3) #define FOR_EACH_1_2(X, P1, P2) \ X(P1) \ FOR_EACH_1_1(X, P2) #define FOR_EACH_1_1(X, P1) \ X(P1) #ifdef _MSC_VER #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_1_KEEP_1_124(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_123(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_1_KEEP_1_123(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_122(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_KEEP_1_122(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_121(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_KEEP_1_121(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_120(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_KEEP_1_120(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_119(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_KEEP_1_119(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_118(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_KEEP_1_118(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_117(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_KEEP_1_117(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_116(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_KEEP_1_116(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_115(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_KEEP_1_115(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_114(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_KEEP_1_114(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_113(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_KEEP_1_113(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_112(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_KEEP_1_112(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_111(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_KEEP_1_111(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_110(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_KEEP_1_110(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_109(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_KEEP_1_109(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_108(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_KEEP_1_108(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_107(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_KEEP_1_107(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_106(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_KEEP_1_106(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_105(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_KEEP_1_105(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_104(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_KEEP_1_104(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_103(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_KEEP_1_103(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_102(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_KEEP_1_102(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_101(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_KEEP_1_101(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_100(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_KEEP_1_100(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_99(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_KEEP_1_99(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_98(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_KEEP_1_98(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_97(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_KEEP_1_97(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_96(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_KEEP_1_96(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_95(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_KEEP_1_95(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_94(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_KEEP_1_94(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_93(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_KEEP_1_93(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_92(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_KEEP_1_92(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_91(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_KEEP_1_91(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_90(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_KEEP_1_90(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_89(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_KEEP_1_89(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_88(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_KEEP_1_88(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_87(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_KEEP_1_87(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_86(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_KEEP_1_86(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_85(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_KEEP_1_85(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_84(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_KEEP_1_84(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_83(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_KEEP_1_83(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_82(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_KEEP_1_82(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_81(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_KEEP_1_81(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_80(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_KEEP_1_80(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_79(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_KEEP_1_79(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_78(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_KEEP_1_78(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_77(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_KEEP_1_77(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_76(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_KEEP_1_76(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_75(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_KEEP_1_75(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_74(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_KEEP_1_74(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_73(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_KEEP_1_73(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_72(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_KEEP_1_72(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_71(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_KEEP_1_71(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_70(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_KEEP_1_70(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_69(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_KEEP_1_69(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_68(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_KEEP_1_68(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_67(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_KEEP_1_67(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_66(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_KEEP_1_66(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_65(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_KEEP_1_65(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_64(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_KEEP_1_64(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_63(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_KEEP_1_63(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_62(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_KEEP_1_62(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_61(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_KEEP_1_61(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_60(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_KEEP_1_60(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_59(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_KEEP_1_59(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_58(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_KEEP_1_58(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_57(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_KEEP_1_57(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_56(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_KEEP_1_56(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_55(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_KEEP_1_55(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_54(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_KEEP_1_54(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_53(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_KEEP_1_53(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_52(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_KEEP_1_52(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_51(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_KEEP_1_51(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_50(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_KEEP_1_50(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_49(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_KEEP_1_49(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_48(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_KEEP_1_48(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_47(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_KEEP_1_47(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_46(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_KEEP_1_46(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_45(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_KEEP_1_45(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_44(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_KEEP_1_44(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_43(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_KEEP_1_43(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_42(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_KEEP_1_42(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_41(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_KEEP_1_41(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_40(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_KEEP_1_40(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_39(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_KEEP_1_39(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_38(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_KEEP_1_38(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_37(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_KEEP_1_37(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_36(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_KEEP_1_36(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_35(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_KEEP_1_35(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_34(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_KEEP_1_34(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_33(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_KEEP_1_33(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_32(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_KEEP_1_32(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_31(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_KEEP_1_31(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_30(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_KEEP_1_30(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_29(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_KEEP_1_29(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_28(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_KEEP_1_28(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_27(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_KEEP_1_27(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_26(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_KEEP_1_26(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_25(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_KEEP_1_25(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_24(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_KEEP_1_24(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_23(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_KEEP_1_23(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_22(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_KEEP_1_22(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_21(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_KEEP_1_21(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_20(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_KEEP_1_20(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_19(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_KEEP_1_19(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_18(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_KEEP_1_18(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_17(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_KEEP_1_17(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_16(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_KEEP_1_16(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_15(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_KEEP_1_15(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_14(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_KEEP_1_14(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_13(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_KEEP_1_13(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_12(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_KEEP_1_12(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_11(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_KEEP_1_11(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_10(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_KEEP_1_10(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_9(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_KEEP_1_9(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_8(X, keep, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_KEEP_1_8(X, keep, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_7(X, keep, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_KEEP_1_7(X, keep, P1, P2, P3, P4, P5, P6, P7) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_6(X, keep, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_KEEP_1_6(X, keep, P1, P2, P3, P4, P5, P6) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_5(X, keep, P2, P3, P4, P5, P6) #define FOR_EACH_1_KEEP_1_5(X, keep, P1, P2, P3, P4, P5) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_4(X, keep, P2, P3, P4, P5) #define FOR_EACH_1_KEEP_1_4(X, keep, P1, P2, P3, P4) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_3(X, keep, P2, P3, P4) #define FOR_EACH_1_KEEP_1_3(X, keep, P1, P2, P3) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_2(X, keep, P2, P3) #define FOR_EACH_1_KEEP_1_2(X, keep, P1, P2) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_1(X, keep, P2) #define FOR_EACH_1_KEEP_1_1(X, keep, P1) \ X(keep, P1) #ifdef _MSC_VER #define FOR_EACH_1_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_KEEP_1_124(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_122(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_KEEP_1_122(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_120(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_KEEP_1_120(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_118(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_KEEP_1_118(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_116(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_KEEP_1_116(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_114(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_KEEP_1_114(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_112(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_KEEP_1_112(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_110(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_KEEP_1_110(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_108(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_KEEP_1_108(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_106(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_KEEP_1_106(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_104(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_KEEP_1_104(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_102(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_KEEP_1_102(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_100(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_KEEP_1_100(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_98(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_KEEP_1_98(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_96(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_KEEP_1_96(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_94(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_KEEP_1_94(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_92(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_KEEP_1_92(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_90(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_KEEP_1_90(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_88(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_KEEP_1_88(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_86(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_KEEP_1_86(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_84(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_KEEP_1_84(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_82(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_KEEP_1_82(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_80(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_KEEP_1_80(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_78(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_KEEP_1_78(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_76(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_KEEP_1_76(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_74(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_KEEP_1_74(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_72(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_KEEP_1_72(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_70(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_KEEP_1_70(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_68(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_KEEP_1_68(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_66(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_KEEP_1_66(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_64(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_KEEP_1_64(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_62(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_KEEP_1_62(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_60(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_KEEP_1_60(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_58(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_KEEP_1_58(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_56(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_KEEP_1_56(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_54(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_KEEP_1_54(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_52(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_KEEP_1_52(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_50(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_KEEP_1_50(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_48(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_KEEP_1_48(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_46(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_KEEP_1_46(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_44(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_KEEP_1_44(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_42(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_KEEP_1_42(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_40(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_KEEP_1_40(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_38(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_KEEP_1_38(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_36(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_KEEP_1_36(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_34(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_KEEP_1_34(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_32(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_KEEP_1_32(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_30(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_KEEP_1_30(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_28(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_KEEP_1_28(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_26(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_KEEP_1_26(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_24(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_KEEP_1_24(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_22(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_KEEP_1_22(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_20(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_KEEP_1_20(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_18(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_KEEP_1_18(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_16(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_KEEP_1_16(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_14(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_KEEP_1_14(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_12(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_KEEP_1_12(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_10(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_KEEP_1_10(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_8(X, keep, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_KEEP_1_8(X, keep, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_6(X, keep, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_KEEP_1_6(X, keep, P1, P2, P3, P4, P5, P6) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_4(X, keep, P3, P4, P5, P6) #define FOR_EACH_2_KEEP_1_4(X, keep, P1, P2, P3, P4) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_2(X, keep, P3, P4) #define FOR_EACH_2_KEEP_1_1(...) #define FOR_EACH_2_KEEP_1_0(...) #define FOR_EACH_2_KEEP_1_2(X, keep, P1, P2) \ X(keep, P1, P2) \ #ifdef _MSC_VER #define FOR_EACH_2_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_KEEP_2_124(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_122(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_KEEP_2_122(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_120(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_KEEP_2_120(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_118(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_KEEP_2_118(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_116(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_KEEP_2_116(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_114(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_KEEP_2_114(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_112(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_KEEP_2_112(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_110(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_KEEP_2_110(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_108(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_KEEP_2_108(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_106(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_KEEP_2_106(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_104(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_KEEP_2_104(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_102(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_KEEP_2_102(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_100(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_KEEP_2_100(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_98(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_KEEP_2_98(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_96(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_KEEP_2_96(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_94(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_KEEP_2_94(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_92(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_KEEP_2_92(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_90(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_KEEP_2_90(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_88(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_KEEP_2_88(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_86(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_KEEP_2_86(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_84(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_KEEP_2_84(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_82(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_KEEP_2_82(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_80(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_KEEP_2_80(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_78(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_KEEP_2_78(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_76(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_KEEP_2_76(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_74(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_KEEP_2_74(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_72(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_KEEP_2_72(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_70(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_KEEP_2_70(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_68(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_KEEP_2_68(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_66(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_KEEP_2_66(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_64(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_KEEP_2_64(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_62(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_KEEP_2_62(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_60(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_KEEP_2_60(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_58(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_KEEP_2_58(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_56(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_KEEP_2_56(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_54(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_KEEP_2_54(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_52(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_KEEP_2_52(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_50(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_KEEP_2_50(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_48(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_KEEP_2_48(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_46(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_KEEP_2_46(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_44(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_KEEP_2_44(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_42(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_KEEP_2_42(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_40(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_KEEP_2_40(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_38(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_KEEP_2_38(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_36(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_KEEP_2_36(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_34(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_KEEP_2_34(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_32(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_KEEP_2_32(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_30(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_KEEP_2_30(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_28(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_KEEP_2_28(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_26(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_KEEP_2_26(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_24(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_KEEP_2_24(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_22(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_KEEP_2_22(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_20(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_KEEP_2_20(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_18(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_KEEP_2_18(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_16(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_KEEP_2_16(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_14(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_KEEP_2_14(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_12(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_KEEP_2_12(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_10(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_KEEP_2_10(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_8(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_KEEP_2_8(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_6(X, keep1, keep2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_KEEP_2_6(X, keep1, keep2, P1, P2, P3, P4, P5, P6) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_4(X, keep1, keep2, P3, P4, P5, P6) #define FOR_EACH_2_KEEP_2_4(X, keep1, keep2, P1, P2, P3, P4) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_2(X, keep1, keep2, P3, P4) #define FOR_EACH_2_KEEP_2_1(...) #define FOR_EACH_2_KEEP_2_0(...) #define FOR_EACH_2_KEEP_2_2(X, keep1, keep2, P1, P2) \ X(keep1, keep2, P1, P2) \ #ifdef _MSC_VER #define FOR_EACH_2_KEEP_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_2_, C2(DEC,C2(DEC,C1(COUNT_ARG(__VA_ARGS__))))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2_KEEP_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_2_, C2(DEC, C2(DEC,C1(COUNT_ARG(__VA_ARGS__))))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_0(...) #define FOR_EACH_2_2(X, P1, P2) \ X(P1, P2) #define FOR_EACH_2_4(X, P1, P2, P3, P4) \ X(P1, P2) \ FOR_EACH_2_2(X, P3, P4) #define FOR_EACH_2_6(X, P1, P2, P3, P4, P5, P6) \ X(P1, P2) \ FOR_EACH_2_4(X, P3, P4, P5, P6) #define FOR_EACH_2_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P1, P2) \ FOR_EACH_2_6(X, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P1, P2) \ FOR_EACH_2_8(X, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P1, P2) \ FOR_EACH_2_10(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P1, P2) \ FOR_EACH_2_12(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P1, P2) \ FOR_EACH_2_14(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P1, P2) \ FOR_EACH_2_16(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P1, P2) \ FOR_EACH_2_18(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P1, P2) \ FOR_EACH_2_20(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P1, P2) \ FOR_EACH_2_22(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P1, P2) \ FOR_EACH_2_24(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P1, P2) \ FOR_EACH_2_26(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P1, P2) \ FOR_EACH_2_28(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P1, P2) \ FOR_EACH_2_30(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P1, P2) \ FOR_EACH_2_32(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P1, P2) \ FOR_EACH_2_34(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P1, P2) \ FOR_EACH_2_36(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P1, P2) \ FOR_EACH_2_38(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P1, P2) \ FOR_EACH_2_40(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P1, P2) \ FOR_EACH_2_42(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P1, P2) \ FOR_EACH_2_44(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P1, P2) \ FOR_EACH_2_46(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P1, P2) \ FOR_EACH_2_48(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P1, P2) \ FOR_EACH_2_50(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P1, P2) \ FOR_EACH_2_52(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P1, P2) \ FOR_EACH_2_54(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P1, P2) \ FOR_EACH_2_56(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P1, P2) \ FOR_EACH_2_58(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P1, P2) \ FOR_EACH_2_60(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P1, P2) \ FOR_EACH_2_62(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P1, P2) \ FOR_EACH_2_64(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P1, P2) \ FOR_EACH_2_66(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P1, P2) \ FOR_EACH_2_68(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P1, P2) \ FOR_EACH_2_70(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P1, P2) \ FOR_EACH_2_72(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P1, P2) \ FOR_EACH_2_74(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P1, P2) \ FOR_EACH_2_76(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P1, P2) \ FOR_EACH_2_78(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P1, P2) \ FOR_EACH_2_80(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P1, P2) \ FOR_EACH_2_82(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P1, P2) \ FOR_EACH_2_84(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P1, P2) \ FOR_EACH_2_86(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P1, P2) \ FOR_EACH_2_88(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P1, P2) \ FOR_EACH_2_90(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P1, P2) \ FOR_EACH_2_92(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P1, P2) \ FOR_EACH_2_94(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P1, P2) \ FOR_EACH_2_96(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P1, P2) \ FOR_EACH_2_98(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P1, P2) \ FOR_EACH_2_100(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P1, P2) \ FOR_EACH_2_102(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P1, P2) \ FOR_EACH_2_104(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P1, P2) \ FOR_EACH_2_106(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P1, P2) \ FOR_EACH_2_108(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P1, P2) \ FOR_EACH_2_110(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P1, P2) \ FOR_EACH_2_112(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P1, P2) \ FOR_EACH_2_114(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P1, P2) \ FOR_EACH_2_116(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P1, P2) \ FOR_EACH_2_118(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P1, P2) \ FOR_EACH_2_120(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P1, P2) \ FOR_EACH_2_122(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_REVERSE_0(...) #define FOR_EACH_2_REVERSE_2(X, P1, P2) \ X(P1, P2) #define FOR_EACH_2_REVERSE_4(X, P1, P2, P3, P4) \ X(P3, P4) \ FOR_EACH_2_REVERSE_2(X, P1, P2) #define FOR_EACH_2_REVERSE_6(X, P1, P2, P3, P4, P5, P6) \ X(P5, P6) \ FOR_EACH_2_REVERSE_4(X, P1, P2, P3, P4) #define FOR_EACH_2_REVERSE_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P7, P8) \ FOR_EACH_2_REVERSE_6(X, P1, P2, P3, P4, P5, P6) #define FOR_EACH_2_REVERSE_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P9, P10) \ FOR_EACH_2_REVERSE_8(X, P1, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_REVERSE_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P11, P12) \ FOR_EACH_2_REVERSE_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_REVERSE_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P13, P14) \ FOR_EACH_2_REVERSE_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_REVERSE_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P15, P16) \ FOR_EACH_2_REVERSE_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_REVERSE_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P17, P18) \ FOR_EACH_2_REVERSE_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_REVERSE_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P19, P20) \ FOR_EACH_2_REVERSE_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_REVERSE_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P21, P22) \ FOR_EACH_2_REVERSE_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_REVERSE_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P23, P24) \ FOR_EACH_2_REVERSE_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_REVERSE_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P25, P26) \ FOR_EACH_2_REVERSE_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_REVERSE_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P27, P28) \ FOR_EACH_2_REVERSE_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_REVERSE_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P29, P30) \ FOR_EACH_2_REVERSE_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_REVERSE_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P31, P32) \ FOR_EACH_2_REVERSE_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_REVERSE_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P33, P34) \ FOR_EACH_2_REVERSE_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_REVERSE_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P35, P36) \ FOR_EACH_2_REVERSE_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_REVERSE_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P37, P38) \ FOR_EACH_2_REVERSE_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_REVERSE_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P39, P40) \ FOR_EACH_2_REVERSE_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_REVERSE_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P41, P42) \ FOR_EACH_2_REVERSE_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_REVERSE_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P43, P44) \ FOR_EACH_2_REVERSE_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_REVERSE_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P45, P46) \ FOR_EACH_2_REVERSE_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_REVERSE_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P47, P48) \ FOR_EACH_2_REVERSE_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_REVERSE_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P49, P50) \ FOR_EACH_2_REVERSE_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_REVERSE_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P51, P52) \ FOR_EACH_2_REVERSE_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_REVERSE_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P53, P54) \ FOR_EACH_2_REVERSE_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_REVERSE_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P55, P56) \ FOR_EACH_2_REVERSE_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_REVERSE_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P57, P58) \ FOR_EACH_2_REVERSE_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_REVERSE_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P59, P60) \ FOR_EACH_2_REVERSE_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_REVERSE_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P61, P62) \ FOR_EACH_2_REVERSE_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_REVERSE_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P63, P64) \ FOR_EACH_2_REVERSE_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_REVERSE_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P65, P66) \ FOR_EACH_2_REVERSE_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_REVERSE_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P67, P68) \ FOR_EACH_2_REVERSE_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_REVERSE_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P69, P70) \ FOR_EACH_2_REVERSE_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_REVERSE_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P71, P72) \ FOR_EACH_2_REVERSE_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_REVERSE_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P73, P74) \ FOR_EACH_2_REVERSE_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_REVERSE_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P75, P76) \ FOR_EACH_2_REVERSE_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_REVERSE_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P77, P78) \ FOR_EACH_2_REVERSE_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_REVERSE_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P79, P80) \ FOR_EACH_2_REVERSE_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_REVERSE_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P81, P82) \ FOR_EACH_2_REVERSE_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_REVERSE_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P83, P84) \ FOR_EACH_2_REVERSE_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_REVERSE_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P85, P86) \ FOR_EACH_2_REVERSE_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_REVERSE_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P87, P88) \ FOR_EACH_2_REVERSE_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_REVERSE_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P89, P90) \ FOR_EACH_2_REVERSE_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_REVERSE_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P91, P92) \ FOR_EACH_2_REVERSE_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_REVERSE_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P93, P94) \ FOR_EACH_2_REVERSE_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_REVERSE_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P95, P96) \ FOR_EACH_2_REVERSE_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_REVERSE_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P97, P98) \ FOR_EACH_2_REVERSE_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_REVERSE_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P99, P100) \ FOR_EACH_2_REVERSE_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_REVERSE_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P101, P102) \ FOR_EACH_2_REVERSE_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_REVERSE_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P103, P104) \ FOR_EACH_2_REVERSE_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_REVERSE_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P105, P106) \ FOR_EACH_2_REVERSE_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_REVERSE_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P107, P108) \ FOR_EACH_2_REVERSE_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_REVERSE_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P109, P110) \ FOR_EACH_2_REVERSE_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_REVERSE_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P111, P112) \ FOR_EACH_2_REVERSE_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_REVERSE_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P113, P114) \ FOR_EACH_2_REVERSE_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_REVERSE_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P115, P116) \ FOR_EACH_2_REVERSE_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_REVERSE_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P117, P118) \ FOR_EACH_2_REVERSE_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_REVERSE_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P119, P120) \ FOR_EACH_2_REVERSE_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_REVERSE_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P121, P122) \ FOR_EACH_2_REVERSE_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_REVERSE_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P123, P124) \ FOR_EACH_2_REVERSE_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_COUNTED_0(...) #define FOR_EACH_1_COUNTED_1(X, P1) \ X(1, P1) #define FOR_EACH_1_COUNTED_2(X, P1, P2) \ X(2, P1) \ FOR_EACH_1_COUNTED_1(X, P2) #define FOR_EACH_1_COUNTED_3(X, P1, P2, P3) \ X(3, P1) \ FOR_EACH_1_COUNTED_2(X, P2, P3) #define FOR_EACH_1_COUNTED_4(X, P1, P2, P3, P4) \ X(4, P1) \ FOR_EACH_1_COUNTED_3(X, P2, P3, P4) #define FOR_EACH_1_COUNTED_5(X, P1, P2, P3, P4, P5) \ X(5, P1) \ FOR_EACH_1_COUNTED_4(X, P2, P3, P4, P5) #define FOR_EACH_1_COUNTED_6(X, P1, P2, P3, P4, P5, P6) \ X(6, P1) \ FOR_EACH_1_COUNTED_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_COUNTED_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(7, P1) \ FOR_EACH_1_COUNTED_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_COUNTED_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(8, P1) \ FOR_EACH_1_COUNTED_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_COUNTED_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(9, P1) \ FOR_EACH_1_COUNTED_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_COUNTED_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(10, P1) \ FOR_EACH_1_COUNTED_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_COUNTED_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(11, P1) \ FOR_EACH_1_COUNTED_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_COUNTED_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(12, P1) \ FOR_EACH_1_COUNTED_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_COUNTED_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(13, P1) \ FOR_EACH_1_COUNTED_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_COUNTED_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(14, P1) \ FOR_EACH_1_COUNTED_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_COUNTED_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(15, P1) \ FOR_EACH_1_COUNTED_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_COUNTED_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(16, P1) \ FOR_EACH_1_COUNTED_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_COUNTED_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(17, P1) \ FOR_EACH_1_COUNTED_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_COUNTED_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(18, P1) \ FOR_EACH_1_COUNTED_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_COUNTED_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(19, P1) \ FOR_EACH_1_COUNTED_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_COUNTED_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(20, P1) \ FOR_EACH_1_COUNTED_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_COUNTED_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(21, P1) \ FOR_EACH_1_COUNTED_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_COUNTED_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(22, P1) \ FOR_EACH_1_COUNTED_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_COUNTED_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(23, P1) \ FOR_EACH_1_COUNTED_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_COUNTED_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(24, P1) \ FOR_EACH_1_COUNTED_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_COUNTED_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(25, P1) \ FOR_EACH_1_COUNTED_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_COUNTED_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(26, P1) \ FOR_EACH_1_COUNTED_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_COUNTED_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(27, P1) \ FOR_EACH_1_COUNTED_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_COUNTED_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(28, P1) \ FOR_EACH_1_COUNTED_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_COUNTED_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(29, P1) \ FOR_EACH_1_COUNTED_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_COUNTED_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(30, P1) \ FOR_EACH_1_COUNTED_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_COUNTED_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(31, P1) \ FOR_EACH_1_COUNTED_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_COUNTED_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(32, P1) \ FOR_EACH_1_COUNTED_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_COUNTED_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(33, P1) \ FOR_EACH_1_COUNTED_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_COUNTED_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(34, P1) \ FOR_EACH_1_COUNTED_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_COUNTED_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(35, P1) \ FOR_EACH_1_COUNTED_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_COUNTED_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(36, P1) \ FOR_EACH_1_COUNTED_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_COUNTED_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(37, P1) \ FOR_EACH_1_COUNTED_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_COUNTED_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(38, P1) \ FOR_EACH_1_COUNTED_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_COUNTED_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(39, P1) \ FOR_EACH_1_COUNTED_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_COUNTED_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(40, P1) \ FOR_EACH_1_COUNTED_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_COUNTED_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(41, P1) \ FOR_EACH_1_COUNTED_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_COUNTED_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(42, P1) \ FOR_EACH_1_COUNTED_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_COUNTED_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(43, P1) \ FOR_EACH_1_COUNTED_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_COUNTED_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(44, P1) \ FOR_EACH_1_COUNTED_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_COUNTED_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(45, P1) \ FOR_EACH_1_COUNTED_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_COUNTED_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(46, P1) \ FOR_EACH_1_COUNTED_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_COUNTED_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(47, P1) \ FOR_EACH_1_COUNTED_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_COUNTED_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(48, P1) \ FOR_EACH_1_COUNTED_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_COUNTED_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(49, P1) \ FOR_EACH_1_COUNTED_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_COUNTED_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(50, P1) \ FOR_EACH_1_COUNTED_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_COUNTED_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(51, P1) \ FOR_EACH_1_COUNTED_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_COUNTED_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(52, P1) \ FOR_EACH_1_COUNTED_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_COUNTED_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(53, P1) \ FOR_EACH_1_COUNTED_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_COUNTED_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(54, P1) \ FOR_EACH_1_COUNTED_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_COUNTED_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(55, P1) \ FOR_EACH_1_COUNTED_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_COUNTED_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(56, P1) \ FOR_EACH_1_COUNTED_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_COUNTED_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(57, P1) \ FOR_EACH_1_COUNTED_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_COUNTED_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(58, P1) \ FOR_EACH_1_COUNTED_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_COUNTED_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(59, P1) \ FOR_EACH_1_COUNTED_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_COUNTED_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(60, P1) \ FOR_EACH_1_COUNTED_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_COUNTED_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(61, P1) \ FOR_EACH_1_COUNTED_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_COUNTED_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(62, P1) \ FOR_EACH_1_COUNTED_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_COUNTED_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(63, P1) \ FOR_EACH_1_COUNTED_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_COUNTED_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(64, P1) \ FOR_EACH_1_COUNTED_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_COUNTED_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(65, P1) \ FOR_EACH_1_COUNTED_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_COUNTED_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(66, P1) \ FOR_EACH_1_COUNTED_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_COUNTED_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(67, P1) \ FOR_EACH_1_COUNTED_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_COUNTED_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(68, P1) \ FOR_EACH_1_COUNTED_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_COUNTED_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(69, P1) \ FOR_EACH_1_COUNTED_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_COUNTED_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(70, P1) \ FOR_EACH_1_COUNTED_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_COUNTED_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(71, P1) \ FOR_EACH_1_COUNTED_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_COUNTED_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(72, P1) \ FOR_EACH_1_COUNTED_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_COUNTED_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(73, P1) \ FOR_EACH_1_COUNTED_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_COUNTED_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(74, P1) \ FOR_EACH_1_COUNTED_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_COUNTED_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(75, P1) \ FOR_EACH_1_COUNTED_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_COUNTED_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(76, P1) \ FOR_EACH_1_COUNTED_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_COUNTED_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(77, P1) \ FOR_EACH_1_COUNTED_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_COUNTED_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(78, P1) \ FOR_EACH_1_COUNTED_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_COUNTED_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(79, P1) \ FOR_EACH_1_COUNTED_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_COUNTED_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(80, P1) \ FOR_EACH_1_COUNTED_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_COUNTED_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(81, P1) \ FOR_EACH_1_COUNTED_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_COUNTED_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(82, P1) \ FOR_EACH_1_COUNTED_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_COUNTED_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(83, P1) \ FOR_EACH_1_COUNTED_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_COUNTED_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(84, P1) \ FOR_EACH_1_COUNTED_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_COUNTED_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(85, P1) \ FOR_EACH_1_COUNTED_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_COUNTED_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(86, P1) \ FOR_EACH_1_COUNTED_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_COUNTED_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(87, P1) \ FOR_EACH_1_COUNTED_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_COUNTED_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(88, P1) \ FOR_EACH_1_COUNTED_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_COUNTED_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(89, P1) \ FOR_EACH_1_COUNTED_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_COUNTED_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(90, P1) \ FOR_EACH_1_COUNTED_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_COUNTED_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(91, P1) \ FOR_EACH_1_COUNTED_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_COUNTED_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(92, P1) \ FOR_EACH_1_COUNTED_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_COUNTED_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(93, P1) \ FOR_EACH_1_COUNTED_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_COUNTED_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(94, P1) \ FOR_EACH_1_COUNTED_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_COUNTED_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(95, P1) \ FOR_EACH_1_COUNTED_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_COUNTED_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(96, P1) \ FOR_EACH_1_COUNTED_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_COUNTED_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(97, P1) \ FOR_EACH_1_COUNTED_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_COUNTED_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(98, P1) \ FOR_EACH_1_COUNTED_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_COUNTED_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(99, P1) \ FOR_EACH_1_COUNTED_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_COUNTED_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(100, P1) \ FOR_EACH_1_COUNTED_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_COUNTED_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(101, P1) \ FOR_EACH_1_COUNTED_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_COUNTED_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(102, P1) \ FOR_EACH_1_COUNTED_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_COUNTED_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(103, P1) \ FOR_EACH_1_COUNTED_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_COUNTED_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(104, P1) \ FOR_EACH_1_COUNTED_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_COUNTED_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(105, P1) \ FOR_EACH_1_COUNTED_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_COUNTED_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(106, P1) \ FOR_EACH_1_COUNTED_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_COUNTED_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(107, P1) \ FOR_EACH_1_COUNTED_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_COUNTED_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(108, P1) \ FOR_EACH_1_COUNTED_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_COUNTED_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(109, P1) \ FOR_EACH_1_COUNTED_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_COUNTED_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(110, P1) \ FOR_EACH_1_COUNTED_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_COUNTED_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(111, P1) \ FOR_EACH_1_COUNTED_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_COUNTED_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(112, P1) \ FOR_EACH_1_COUNTED_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_COUNTED_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(113, P1) \ FOR_EACH_1_COUNTED_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_COUNTED_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(114, P1) \ FOR_EACH_1_COUNTED_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_COUNTED_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(115, P1) \ FOR_EACH_1_COUNTED_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_COUNTED_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(116, P1) \ FOR_EACH_1_COUNTED_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_COUNTED_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(117, P1) \ FOR_EACH_1_COUNTED_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_COUNTED_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(118, P1) \ FOR_EACH_1_COUNTED_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_COUNTED_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(119, P1) \ FOR_EACH_1_COUNTED_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_COUNTED_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(120, P1) \ FOR_EACH_1_COUNTED_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_COUNTED_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(121, P1) \ FOR_EACH_1_COUNTED_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_COUNTED_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(122, P1) \ FOR_EACH_1_COUNTED_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_COUNTED_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(123, P1) \ FOR_EACH_1_COUNTED_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_COUNTED_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(124, P1) \ FOR_EACH_1_COUNTED_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_COUNTED_0(...) #define FOR_EACH_2_COUNTED_2(X, P1, P2) \ X(2, P1, P2) #define FOR_EACH_2_COUNTED_4(X, P1, P2, P3, P4) \ X(4, P1, P2) \ FOR_EACH_2_COUNTED_2(X, P3, P4) #define FOR_EACH_2_COUNTED_6(X, P1, P2, P3, P4, P5, P6) \ X(6, P1, P2) \ FOR_EACH_2_COUNTED_4(X, P3, P4, P5, P6) #define FOR_EACH_2_COUNTED_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(8, P1, P2) \ FOR_EACH_2_COUNTED_6(X, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_COUNTED_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(10, P1, P2) \ FOR_EACH_2_COUNTED_8(X, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_COUNTED_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(12, P1, P2) \ FOR_EACH_2_COUNTED_10(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_COUNTED_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(14, P1, P2) \ FOR_EACH_2_COUNTED_12(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_COUNTED_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(16, P1, P2) \ FOR_EACH_2_COUNTED_14(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_COUNTED_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(18, P1, P2) \ FOR_EACH_2_COUNTED_16(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_COUNTED_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(20, P1, P2) \ FOR_EACH_2_COUNTED_18(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_COUNTED_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(22, P1, P2) \ FOR_EACH_2_COUNTED_20(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_COUNTED_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(24, P1, P2) \ FOR_EACH_2_COUNTED_22(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_COUNTED_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(26, P1, P2) \ FOR_EACH_2_COUNTED_24(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_COUNTED_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(28, P1, P2) \ FOR_EACH_2_COUNTED_26(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_COUNTED_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(30, P1, P2) \ FOR_EACH_2_COUNTED_28(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_COUNTED_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(32, P1, P2) \ FOR_EACH_2_COUNTED_30(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_COUNTED_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(34, P1, P2) \ FOR_EACH_2_COUNTED_32(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_COUNTED_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(36, P1, P2) \ FOR_EACH_2_COUNTED_34(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_COUNTED_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(38, P1, P2) \ FOR_EACH_2_COUNTED_36(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_COUNTED_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(40, P1, P2) \ FOR_EACH_2_COUNTED_38(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_COUNTED_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(42, P1, P2) \ FOR_EACH_2_COUNTED_40(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_COUNTED_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(44, P1, P2) \ FOR_EACH_2_COUNTED_42(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_COUNTED_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(46, P1, P2) \ FOR_EACH_2_COUNTED_44(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_COUNTED_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(48, P1, P2) \ FOR_EACH_2_COUNTED_46(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_COUNTED_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(50, P1, P2) \ FOR_EACH_2_COUNTED_48(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_COUNTED_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(52, P1, P2) \ FOR_EACH_2_COUNTED_50(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_COUNTED_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(54, P1, P2) \ FOR_EACH_2_COUNTED_52(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_COUNTED_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(56, P1, P2) \ FOR_EACH_2_COUNTED_54(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_COUNTED_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(58, P1, P2) \ FOR_EACH_2_COUNTED_56(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_COUNTED_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(60, P1, P2) \ FOR_EACH_2_COUNTED_58(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_COUNTED_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(62, P1, P2) \ FOR_EACH_2_COUNTED_60(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_COUNTED_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(64, P1, P2) \ FOR_EACH_2_COUNTED_62(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_COUNTED_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(66, P1, P2) \ FOR_EACH_2_COUNTED_64(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_COUNTED_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(68, P1, P2) \ FOR_EACH_2_COUNTED_66(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_COUNTED_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(70, P1, P2) \ FOR_EACH_2_COUNTED_68(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_COUNTED_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(72, P1, P2) \ FOR_EACH_2_COUNTED_70(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_COUNTED_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(74, P1, P2) \ FOR_EACH_2_COUNTED_72(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_COUNTED_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(76, P1, P2) \ FOR_EACH_2_COUNTED_74(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_COUNTED_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(78, P1, P2) \ FOR_EACH_2_COUNTED_76(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_COUNTED_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(80, P1, P2) \ FOR_EACH_2_COUNTED_78(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_COUNTED_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(82, P1, P2) \ FOR_EACH_2_COUNTED_80(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_COUNTED_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(84, P1, P2) \ FOR_EACH_2_COUNTED_82(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_COUNTED_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(86, P1, P2) \ FOR_EACH_2_COUNTED_84(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_COUNTED_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(88, P1, P2) \ FOR_EACH_2_COUNTED_86(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_COUNTED_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(90, P1, P2) \ FOR_EACH_2_COUNTED_88(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_COUNTED_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(92, P1, P2) \ FOR_EACH_2_COUNTED_90(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_COUNTED_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(94, P1, P2) \ FOR_EACH_2_COUNTED_92(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_COUNTED_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(96, P1, P2) \ FOR_EACH_2_COUNTED_94(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_COUNTED_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(98, P1, P2) \ FOR_EACH_2_COUNTED_96(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_COUNTED_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(100, P1, P2) \ FOR_EACH_2_COUNTED_98(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_COUNTED_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(102, P1, P2) \ FOR_EACH_2_COUNTED_100(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_COUNTED_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(104, P1, P2) \ FOR_EACH_2_COUNTED_102(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_COUNTED_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(106, P1, P2) \ FOR_EACH_2_COUNTED_104(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_COUNTED_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(108, P1, P2) \ FOR_EACH_2_COUNTED_106(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_COUNTED_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(110, P1, P2) \ FOR_EACH_2_COUNTED_108(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_COUNTED_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(112, P1, P2) \ FOR_EACH_2_COUNTED_110(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_COUNTED_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(114, P1, P2) \ FOR_EACH_2_COUNTED_112(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_COUNTED_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(116, P1, P2) \ FOR_EACH_2_COUNTED_114(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_COUNTED_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(118, P1, P2) \ FOR_EACH_2_COUNTED_116(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_COUNTED_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(120, P1, P2) \ FOR_EACH_2_COUNTED_118(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_COUNTED_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(122, P1, P2) \ FOR_EACH_2_COUNTED_120(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_COUNTED_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(124, P1, P2) \ FOR_EACH_2_COUNTED_122(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #ifdef _MSC_VER #define FOR_EACH_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) /*the COUNTED breed of FOR_EACH macro invokes a macro with 3 parameters: 1st being the count of invocation. For example. FOR_EACH_2_COUNTER(MACRO, a,b,c,d,e,f) will result in MACRO(6, a,b) MACRO(4, c,d) MACRO(2, e,f) This macro exists because we need a "stop condition" in outputting COMMA... when calling a function f(a,b,c,d) cannot be f(a,b,c,d,) <=doesn't compile (as opposed to enum definition) */ #define FOR_EACH_2_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) /*FOR_EACH_2_REVERSE acts just like FOR_EACH_2, but in reverse order. Example: FOR_EACH_2_REVERSE(X,a,b,c,d,e,f) => X(e,f) X(c,d) X (a, b) in this order */ #define FOR_EACH_2_REVERSE(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_REVERSE_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_2_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_2_REVERSE(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_REVERSE_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #ifdef _MSC_VER #define EXPAND_OR_C1(x) x #else #define EXPAND_OR_C1(...) __VA_ARGS__ #endif #define EXPAND_ARGS(...) __VA_ARGS__ #define EXPAND_TWICE(...) EXPAND_ARGS(__VA_ARGS__) #define DO_0(MACRO, ...) \ MACRO(0, __VA_ARGS__) #define DO_1(MACRO, ...) \ MACRO(1, __VA_ARGS__) \ DO_0(MACRO, __VA_ARGS__) #define DO_2(MACRO, ...) \ MACRO(2, __VA_ARGS__) \ DO_1(MACRO, __VA_ARGS__) #define DO_3(MACRO, ...) \ MACRO(3, __VA_ARGS__) \ DO_2(MACRO, __VA_ARGS__) #define DO_4(MACRO, ...) \ MACRO(4, __VA_ARGS__) \ DO_3(MACRO, __VA_ARGS__) #define DO_5(MACRO, ...) \ MACRO(5, __VA_ARGS__) \ DO_4(MACRO, __VA_ARGS__) #define DO_6(MACRO, ...) \ MACRO(6, __VA_ARGS__) \ DO_5(MACRO, __VA_ARGS__) #define DO_7(MACRO, ...) \ MACRO(7, __VA_ARGS__) \ DO_6(MACRO, __VA_ARGS__) #define DO_8(MACRO, ...) \ MACRO(8, __VA_ARGS__) \ DO_7(MACRO, __VA_ARGS__) #define DO_9(MACRO, ...) \ MACRO(9, __VA_ARGS__) \ DO_8(MACRO, __VA_ARGS__) #define DO_10(MACRO, ...) \ MACRO(10, __VA_ARGS__) \ DO_9(MACRO, __VA_ARGS__) #define DO_11(MACRO, ...) \ MACRO(11, __VA_ARGS__) \ DO_10(MACRO, __VA_ARGS__) #define DO_12(MACRO, ...) \ MACRO(12, __VA_ARGS__) \ DO_11(MACRO, __VA_ARGS__) #define DO_13(MACRO, ...) \ MACRO(13, __VA_ARGS__) \ DO_12(MACRO, __VA_ARGS__) #define DO_14(MACRO, ...) \ MACRO(14, __VA_ARGS__) \ DO_13(MACRO, __VA_ARGS__) #define DO_15(MACRO, ...) \ MACRO(15, __VA_ARGS__) \ DO_14(MACRO, __VA_ARGS__) #define DO_16(MACRO, ...) \ MACRO(16, __VA_ARGS__) \ DO_15(MACRO, __VA_ARGS__) #define DO_17(MACRO, ...) \ MACRO(17, __VA_ARGS__) \ DO_16(MACRO, __VA_ARGS__) #define DO_18(MACRO, ...) \ MACRO(18, __VA_ARGS__) \ DO_17(MACRO, __VA_ARGS__) #define DO_19(MACRO, ...) \ MACRO(19, __VA_ARGS__) \ DO_18(MACRO, __VA_ARGS__) #define DO_20(MACRO, ...) \ MACRO(20, __VA_ARGS__) \ DO_19(MACRO, __VA_ARGS__) #define DO_21(MACRO, ...) \ MACRO(21, __VA_ARGS__) \ DO_20(MACRO, __VA_ARGS__) #define DO_22(MACRO, ...) \ MACRO(22, __VA_ARGS__) \ DO_21(MACRO, __VA_ARGS__) #define DO_23(MACRO, ...) \ MACRO(23, __VA_ARGS__) \ DO_22(MACRO, __VA_ARGS__) #define DO_24(MACRO, ...) \ MACRO(24, __VA_ARGS__) \ DO_23(MACRO, __VA_ARGS__) #define DO_25(MACRO, ...) \ MACRO(25, __VA_ARGS__) \ DO_24(MACRO, __VA_ARGS__) #define DO_26(MACRO, ...) \ MACRO(26, __VA_ARGS__) \ DO_25(MACRO, __VA_ARGS__) #define DO_27(MACRO, ...) \ MACRO(27, __VA_ARGS__) \ DO_26(MACRO, __VA_ARGS__) #define DO_28(MACRO, ...) \ MACRO(28, __VA_ARGS__) \ DO_27(MACRO, __VA_ARGS__) #define DO_29(MACRO, ...) \ MACRO(29, __VA_ARGS__) \ DO_28(MACRO, __VA_ARGS__) #define DO_30(MACRO, ...) \ MACRO(30, __VA_ARGS__) \ DO_29(MACRO, __VA_ARGS__) #define DO_31(MACRO, ...) \ MACRO(31, __VA_ARGS__) \ DO_30(MACRO, __VA_ARGS__) #define DO_32(MACRO, ...) \ MACRO(32, __VA_ARGS__) \ DO_31(MACRO, __VA_ARGS__) #define DO_33(MACRO, ...) \ MACRO(33, __VA_ARGS__) \ DO_32(MACRO, __VA_ARGS__) #define DO_34(MACRO, ...) \ MACRO(34, __VA_ARGS__) \ DO_33(MACRO, __VA_ARGS__) #define DO_35(MACRO, ...) \ MACRO(35, __VA_ARGS__) \ DO_34(MACRO, __VA_ARGS__) #define DO_36(MACRO, ...) \ MACRO(36, __VA_ARGS__) \ DO_35(MACRO, __VA_ARGS__) #define DO_37(MACRO, ...) \ MACRO(37, __VA_ARGS__) \ DO_36(MACRO, __VA_ARGS__) #define DO_38(MACRO, ...) \ MACRO(38, __VA_ARGS__) \ DO_37(MACRO, __VA_ARGS__) #define DO_39(MACRO, ...) \ MACRO(39, __VA_ARGS__) \ DO_38(MACRO, __VA_ARGS__) #define DO_40(MACRO, ...) \ MACRO(40, __VA_ARGS__) \ DO_39(MACRO, __VA_ARGS__) #define DO_41(MACRO, ...) \ MACRO(41, __VA_ARGS__) \ DO_40(MACRO, __VA_ARGS__) #define DO_42(MACRO, ...) \ MACRO(42, __VA_ARGS__) \ DO_41(MACRO, __VA_ARGS__) #define DO_43(MACRO, ...) \ MACRO(43, __VA_ARGS__) \ DO_42(MACRO, __VA_ARGS__) #define DO_44(MACRO, ...) \ MACRO(44, __VA_ARGS__) \ DO_43(MACRO, __VA_ARGS__) #define DO_45(MACRO, ...) \ MACRO(45, __VA_ARGS__) \ DO_44(MACRO, __VA_ARGS__) #define DO_46(MACRO, ...) \ MACRO(46, __VA_ARGS__) \ DO_45(MACRO, __VA_ARGS__) #define DO_47(MACRO, ...) \ MACRO(47, __VA_ARGS__) \ DO_46(MACRO, __VA_ARGS__) #define DO_48(MACRO, ...) \ MACRO(48, __VA_ARGS__) \ DO_47(MACRO, __VA_ARGS__) #define DO_49(MACRO, ...) \ MACRO(49, __VA_ARGS__) \ DO_48(MACRO, __VA_ARGS__) #define DO_50(MACRO, ...) \ MACRO(50, __VA_ARGS__) \ DO_49(MACRO, __VA_ARGS__) #define DO_51(MACRO, ...) \ MACRO(51, __VA_ARGS__) \ DO_50(MACRO, __VA_ARGS__) #define DO_52(MACRO, ...) \ MACRO(52, __VA_ARGS__) \ DO_51(MACRO, __VA_ARGS__) #define DO_53(MACRO, ...) \ MACRO(53, __VA_ARGS__) \ DO_52(MACRO, __VA_ARGS__) #define DO_54(MACRO, ...) \ MACRO(54, __VA_ARGS__) \ DO_53(MACRO, __VA_ARGS__) #define DO_55(MACRO, ...) \ MACRO(55, __VA_ARGS__) \ DO_54(MACRO, __VA_ARGS__) #define DO_56(MACRO, ...) \ MACRO(56, __VA_ARGS__) \ DO_55(MACRO, __VA_ARGS__) #define DO_57(MACRO, ...) \ MACRO(57, __VA_ARGS__) \ DO_56(MACRO, __VA_ARGS__) #define DO_58(MACRO, ...) \ MACRO(58, __VA_ARGS__) \ DO_57(MACRO, __VA_ARGS__) #define DO_59(MACRO, ...) \ MACRO(59, __VA_ARGS__) \ DO_58(MACRO, __VA_ARGS__) #define DO_60(MACRO, ...) \ MACRO(60, __VA_ARGS__) \ DO_59(MACRO, __VA_ARGS__) #define DO_61(MACRO, ...) \ MACRO(61, __VA_ARGS__) \ DO_60(MACRO, __VA_ARGS__) #define DO_62(MACRO, ...) \ MACRO(62, __VA_ARGS__) \ DO_61(MACRO, __VA_ARGS__) #define DO_63(MACRO, ...) \ MACRO(63, __VA_ARGS__) \ DO_62(MACRO, __VA_ARGS__) #define DO_64(MACRO, ...) \ MACRO(64, __VA_ARGS__) \ DO_63(MACRO, __VA_ARGS__) #define DO_65(MACRO, ...) \ MACRO(65, __VA_ARGS__) \ DO_64(MACRO, __VA_ARGS__) #define DO_66(MACRO, ...) \ MACRO(66, __VA_ARGS__) \ DO_65(MACRO, __VA_ARGS__) #define DO_67(MACRO, ...) \ MACRO(67, __VA_ARGS__) \ DO_66(MACRO, __VA_ARGS__) #define DO_68(MACRO, ...) \ MACRO(68, __VA_ARGS__) \ DO_67(MACRO, __VA_ARGS__) #define DO_69(MACRO, ...) \ MACRO(69, __VA_ARGS__) \ DO_68(MACRO, __VA_ARGS__) #define DO_70(MACRO, ...) \ MACRO(70, __VA_ARGS__) \ DO_69(MACRO, __VA_ARGS__) #define DO_71(MACRO, ...) \ MACRO(71, __VA_ARGS__) \ DO_70(MACRO, __VA_ARGS__) #define DO_72(MACRO, ...) \ MACRO(72, __VA_ARGS__) \ DO_71(MACRO, __VA_ARGS__) #define DO_73(MACRO, ...) \ MACRO(73, __VA_ARGS__) \ DO_72(MACRO, __VA_ARGS__) #define DO_74(MACRO, ...) \ MACRO(74, __VA_ARGS__) \ DO_73(MACRO, __VA_ARGS__) #define DO_75(MACRO, ...) \ MACRO(75, __VA_ARGS__) \ DO_74(MACRO, __VA_ARGS__) #define DO_76(MACRO, ...) \ MACRO(76, __VA_ARGS__) \ DO_75(MACRO, __VA_ARGS__) #define DO_77(MACRO, ...) \ MACRO(77, __VA_ARGS__) \ DO_76(MACRO, __VA_ARGS__) #define DO_78(MACRO, ...) \ MACRO(78, __VA_ARGS__) \ DO_77(MACRO, __VA_ARGS__) #define DO_79(MACRO, ...) \ MACRO(79, __VA_ARGS__) \ DO_78(MACRO, __VA_ARGS__) #define DO_80(MACRO, ...) \ MACRO(80, __VA_ARGS__) \ DO_79(MACRO, __VA_ARGS__) #define DO_81(MACRO, ...) \ MACRO(81, __VA_ARGS__) \ DO_80(MACRO, __VA_ARGS__) #define DO_82(MACRO, ...) \ MACRO(82, __VA_ARGS__) \ DO_81(MACRO, __VA_ARGS__) #define DO_83(MACRO, ...) \ MACRO(83, __VA_ARGS__) \ DO_82(MACRO, __VA_ARGS__) #define DO_84(MACRO, ...) \ MACRO(84, __VA_ARGS__) \ DO_83(MACRO, __VA_ARGS__) #define DO_85(MACRO, ...) \ MACRO(85, __VA_ARGS__) \ DO_84(MACRO, __VA_ARGS__) #define DO_86(MACRO, ...) \ MACRO(86, __VA_ARGS__) \ DO_85(MACRO, __VA_ARGS__) #define DO_87(MACRO, ...) \ MACRO(87, __VA_ARGS__) \ DO_86(MACRO, __VA_ARGS__) #define DO_88(MACRO, ...) \ MACRO(88, __VA_ARGS__) \ DO_87(MACRO, __VA_ARGS__) #define DO_89(MACRO, ...) \ MACRO(89, __VA_ARGS__) \ DO_88(MACRO, __VA_ARGS__) #define DO_90(MACRO, ...) \ MACRO(90, __VA_ARGS__) \ DO_89(MACRO, __VA_ARGS__) #define DO_91(MACRO, ...) \ MACRO(91, __VA_ARGS__) \ DO_90(MACRO, __VA_ARGS__) #define DO_92(MACRO, ...) \ MACRO(92, __VA_ARGS__) \ DO_91(MACRO, __VA_ARGS__) #define DO_93(MACRO, ...) \ MACRO(93, __VA_ARGS__) \ DO_92(MACRO, __VA_ARGS__) #define DO_94(MACRO, ...) \ MACRO(94, __VA_ARGS__) \ DO_93(MACRO, __VA_ARGS__) #define DO_95(MACRO, ...) \ MACRO(95, __VA_ARGS__) \ DO_94(MACRO, __VA_ARGS__) #define DO_96(MACRO, ...) \ MACRO(96, __VA_ARGS__) \ DO_95(MACRO, __VA_ARGS__) #define DO_97(MACRO, ...) \ MACRO(97, __VA_ARGS__) \ DO_96(MACRO, __VA_ARGS__) #define DO_98(MACRO, ...) \ MACRO(98, __VA_ARGS__) \ DO_97(MACRO, __VA_ARGS__) #define DO_99(MACRO, ...) \ MACRO(99, __VA_ARGS__) \ DO_98(MACRO, __VA_ARGS__) #define DO_100(MACRO, ...) \ MACRO(100, __VA_ARGS__) \ DO_99(MACRO, __VA_ARGS__) #define DO_101(MACRO, ...) \ MACRO(101, __VA_ARGS__) \ DO_100(MACRO, __VA_ARGS__) #define DO_102(MACRO, ...) \ MACRO(102, __VA_ARGS__) \ DO_101(MACRO, __VA_ARGS__) #define DO_103(MACRO, ...) \ MACRO(103, __VA_ARGS__) \ DO_102(MACRO, __VA_ARGS__) #define DO_104(MACRO, ...) \ MACRO(104, __VA_ARGS__) \ DO_103(MACRO, __VA_ARGS__) #define DO_105(MACRO, ...) \ MACRO(105, __VA_ARGS__) \ DO_104(MACRO, __VA_ARGS__) #define DO_106(MACRO, ...) \ MACRO(106, __VA_ARGS__) \ DO_105(MACRO, __VA_ARGS__) #define DO_107(MACRO, ...) \ MACRO(107, __VA_ARGS__) \ DO_106(MACRO, __VA_ARGS__) #define DO_108(MACRO, ...) \ MACRO(108, __VA_ARGS__) \ DO_107(MACRO, __VA_ARGS__) #define DO_109(MACRO, ...) \ MACRO(109, __VA_ARGS__) \ DO_108(MACRO, __VA_ARGS__) #define DO_110(MACRO, ...) \ MACRO(110, __VA_ARGS__) \ DO_109(MACRO, __VA_ARGS__) #define DO_111(MACRO, ...) \ MACRO(111, __VA_ARGS__) \ DO_110(MACRO, __VA_ARGS__) #define DO_112(MACRO, ...) \ MACRO(112, __VA_ARGS__) \ DO_111(MACRO, __VA_ARGS__) #define DO_113(MACRO, ...) \ MACRO(113, __VA_ARGS__) \ DO_112(MACRO, __VA_ARGS__) #define DO_114(MACRO, ...) \ MACRO(114, __VA_ARGS__) \ DO_113(MACRO, __VA_ARGS__) #define DO_115(MACRO, ...) \ MACRO(115, __VA_ARGS__) \ DO_114(MACRO, __VA_ARGS__) #define DO_116(MACRO, ...) \ MACRO(116, __VA_ARGS__) \ DO_115(MACRO, __VA_ARGS__) #define DO_117(MACRO, ...) \ MACRO(117, __VA_ARGS__) \ DO_116(MACRO, __VA_ARGS__) #define DO_118(MACRO, ...) \ MACRO(118, __VA_ARGS__) \ DO_117(MACRO, __VA_ARGS__) #define DO_119(MACRO, ...) \ MACRO(119, __VA_ARGS__) \ DO_118(MACRO, __VA_ARGS__) #define DO_120(MACRO, ...) \ MACRO(120, __VA_ARGS__) \ DO_119(MACRO, __VA_ARGS__) #define DO_121(MACRO, ...) \ MACRO(121, __VA_ARGS__) \ DO_120(MACRO, __VA_ARGS__) #define DO_122(MACRO, ...) \ MACRO(122, __VA_ARGS__) \ DO_121(MACRO, __VA_ARGS__) #define DO_123(MACRO, ...) \ MACRO(123, __VA_ARGS__) \ DO_122(MACRO, __VA_ARGS__) #define DO_124(MACRO, ...) \ MACRO(124, __VA_ARGS__) \ DO_123(MACRO, __VA_ARGS__) #define DO_125(MACRO, ...) \ MACRO(125, __VA_ARGS__) \ DO_124(MACRO, __VA_ARGS__) #define DO_126(MACRO, ...) \ MACRO(126, __VA_ARGS__) \ DO_125(MACRO, __VA_ARGS__) #define DO_127(MACRO, ...) \ MACRO(127, __VA_ARGS__) \ DO_126(MACRO, __VA_ARGS__) #define DO_128(MACRO, ...) \ MACRO(128, __VA_ARGS__) \ DO_127(MACRO, __VA_ARGS__) #define DO_129(MACRO, ...) \ MACRO(129, __VA_ARGS__) \ DO_128(MACRO, __VA_ARGS__) #define DO_130(MACRO, ...) \ MACRO(130, __VA_ARGS__) \ DO_129(MACRO, __VA_ARGS__) #define DO_131(MACRO, ...) \ MACRO(131, __VA_ARGS__) \ DO_130(MACRO, __VA_ARGS__) #define DO_132(MACRO, ...) \ MACRO(132, __VA_ARGS__) \ DO_131(MACRO, __VA_ARGS__) #define DO_133(MACRO, ...) \ MACRO(133, __VA_ARGS__) \ DO_132(MACRO, __VA_ARGS__) #define DO_134(MACRO, ...) \ MACRO(134, __VA_ARGS__) \ DO_133(MACRO, __VA_ARGS__) #define DO_135(MACRO, ...) \ MACRO(135, __VA_ARGS__) \ DO_134(MACRO, __VA_ARGS__) #define DO_136(MACRO, ...) \ MACRO(136, __VA_ARGS__) \ DO_135(MACRO, __VA_ARGS__) #define DO_137(MACRO, ...) \ MACRO(137, __VA_ARGS__) \ DO_136(MACRO, __VA_ARGS__) #define DO_138(MACRO, ...) \ MACRO(138, __VA_ARGS__) \ DO_137(MACRO, __VA_ARGS__) #define DO_139(MACRO, ...) \ MACRO(139, __VA_ARGS__) \ DO_138(MACRO, __VA_ARGS__) #define DO_140(MACRO, ...) \ MACRO(140, __VA_ARGS__) \ DO_139(MACRO, __VA_ARGS__) #define DO_141(MACRO, ...) \ MACRO(141, __VA_ARGS__) \ DO_140(MACRO, __VA_ARGS__) #define DO_142(MACRO, ...) \ MACRO(142, __VA_ARGS__) \ DO_141(MACRO, __VA_ARGS__) #define DO_143(MACRO, ...) \ MACRO(143, __VA_ARGS__) \ DO_142(MACRO, __VA_ARGS__) #define DO_144(MACRO, ...) \ MACRO(144, __VA_ARGS__) \ DO_143(MACRO, __VA_ARGS__) #define DO_145(MACRO, ...) \ MACRO(145, __VA_ARGS__) \ DO_144(MACRO, __VA_ARGS__) #define DO_146(MACRO, ...) \ MACRO(146, __VA_ARGS__) \ DO_145(MACRO, __VA_ARGS__) #define DO_147(MACRO, ...) \ MACRO(147, __VA_ARGS__) \ DO_146(MACRO, __VA_ARGS__) #define DO_148(MACRO, ...) \ MACRO(148, __VA_ARGS__) \ DO_147(MACRO, __VA_ARGS__) #define DO_149(MACRO, ...) \ MACRO(149, __VA_ARGS__) \ DO_148(MACRO, __VA_ARGS__) #define DO_150(MACRO, ...) \ MACRO(150, __VA_ARGS__) \ DO_149(MACRO, __VA_ARGS__) #define DO_151(MACRO, ...) \ MACRO(151, __VA_ARGS__) \ DO_150(MACRO, __VA_ARGS__) #define DO_152(MACRO, ...) \ MACRO(152, __VA_ARGS__) \ DO_151(MACRO, __VA_ARGS__) #define DO_153(MACRO, ...) \ MACRO(153, __VA_ARGS__) \ DO_152(MACRO, __VA_ARGS__) #define DO_154(MACRO, ...) \ MACRO(154, __VA_ARGS__) \ DO_153(MACRO, __VA_ARGS__) #define DO_155(MACRO, ...) \ MACRO(155, __VA_ARGS__) \ DO_154(MACRO, __VA_ARGS__) #define DO_156(MACRO, ...) \ MACRO(156, __VA_ARGS__) \ DO_155(MACRO, __VA_ARGS__) #define DO_157(MACRO, ...) \ MACRO(157, __VA_ARGS__) \ DO_156(MACRO, __VA_ARGS__) #define DO_158(MACRO, ...) \ MACRO(158, __VA_ARGS__) \ DO_157(MACRO, __VA_ARGS__) #define DO_159(MACRO, ...) \ MACRO(159, __VA_ARGS__) \ DO_158(MACRO, __VA_ARGS__) #define DO_160(MACRO, ...) \ MACRO(160, __VA_ARGS__) \ DO_159(MACRO, __VA_ARGS__) #define DO_161(MACRO, ...) \ MACRO(161, __VA_ARGS__) \ DO_160(MACRO, __VA_ARGS__) #define DO_162(MACRO, ...) \ MACRO(162, __VA_ARGS__) \ DO_161(MACRO, __VA_ARGS__) #define DO_163(MACRO, ...) \ MACRO(163, __VA_ARGS__) \ DO_162(MACRO, __VA_ARGS__) #define DO_164(MACRO, ...) \ MACRO(164, __VA_ARGS__) \ DO_163(MACRO, __VA_ARGS__) #define DO_165(MACRO, ...) \ MACRO(165, __VA_ARGS__) \ DO_164(MACRO, __VA_ARGS__) #define DO_166(MACRO, ...) \ MACRO(166, __VA_ARGS__) \ DO_165(MACRO, __VA_ARGS__) #define DO_167(MACRO, ...) \ MACRO(167, __VA_ARGS__) \ DO_166(MACRO, __VA_ARGS__) #define DO_168(MACRO, ...) \ MACRO(168, __VA_ARGS__) \ DO_167(MACRO, __VA_ARGS__) #define DO_169(MACRO, ...) \ MACRO(169, __VA_ARGS__) \ DO_168(MACRO, __VA_ARGS__) #define DO_170(MACRO, ...) \ MACRO(170, __VA_ARGS__) \ DO_169(MACRO, __VA_ARGS__) #define DO_171(MACRO, ...) \ MACRO(171, __VA_ARGS__) \ DO_170(MACRO, __VA_ARGS__) #define DO_172(MACRO, ...) \ MACRO(172, __VA_ARGS__) \ DO_171(MACRO, __VA_ARGS__) #define DO_173(MACRO, ...) \ MACRO(173, __VA_ARGS__) \ DO_172(MACRO, __VA_ARGS__) #define DO_174(MACRO, ...) \ MACRO(174, __VA_ARGS__) \ DO_173(MACRO, __VA_ARGS__) #define DO_175(MACRO, ...) \ MACRO(175, __VA_ARGS__) \ DO_174(MACRO, __VA_ARGS__) #define DO_176(MACRO, ...) \ MACRO(176, __VA_ARGS__) \ DO_175(MACRO, __VA_ARGS__) #define DO_177(MACRO, ...) \ MACRO(177, __VA_ARGS__) \ DO_176(MACRO, __VA_ARGS__) #define DO_178(MACRO, ...) \ MACRO(178, __VA_ARGS__) \ DO_177(MACRO, __VA_ARGS__) #define DO_179(MACRO, ...) \ MACRO(179, __VA_ARGS__) \ DO_178(MACRO, __VA_ARGS__) #define DO_180(MACRO, ...) \ MACRO(180, __VA_ARGS__) \ DO_179(MACRO, __VA_ARGS__) #define DO_181(MACRO, ...) \ MACRO(181, __VA_ARGS__) \ DO_180(MACRO, __VA_ARGS__) #define DO_182(MACRO, ...) \ MACRO(182, __VA_ARGS__) \ DO_181(MACRO, __VA_ARGS__) #define DO_183(MACRO, ...) \ MACRO(183, __VA_ARGS__) \ DO_182(MACRO, __VA_ARGS__) #define DO_184(MACRO, ...) \ MACRO(184, __VA_ARGS__) \ DO_183(MACRO, __VA_ARGS__) #define DO_185(MACRO, ...) \ MACRO(185, __VA_ARGS__) \ DO_184(MACRO, __VA_ARGS__) #define DO_186(MACRO, ...) \ MACRO(186, __VA_ARGS__) \ DO_185(MACRO, __VA_ARGS__) #define DO_187(MACRO, ...) \ MACRO(187, __VA_ARGS__) \ DO_186(MACRO, __VA_ARGS__) #define DO_188(MACRO, ...) \ MACRO(188, __VA_ARGS__) \ DO_187(MACRO, __VA_ARGS__) #define DO_189(MACRO, ...) \ MACRO(189, __VA_ARGS__) \ DO_188(MACRO, __VA_ARGS__) #define DO_190(MACRO, ...) \ MACRO(190, __VA_ARGS__) \ DO_189(MACRO, __VA_ARGS__) #define DO_191(MACRO, ...) \ MACRO(191, __VA_ARGS__) \ DO_190(MACRO, __VA_ARGS__) #define DO_192(MACRO, ...) \ MACRO(192, __VA_ARGS__) \ DO_191(MACRO, __VA_ARGS__) #define DO_193(MACRO, ...) \ MACRO(193, __VA_ARGS__) \ DO_192(MACRO, __VA_ARGS__) #define DO_194(MACRO, ...) \ MACRO(194, __VA_ARGS__) \ DO_193(MACRO, __VA_ARGS__) #define DO_195(MACRO, ...) \ MACRO(195, __VA_ARGS__) \ DO_194(MACRO, __VA_ARGS__) #define DO_196(MACRO, ...) \ MACRO(196, __VA_ARGS__) \ DO_195(MACRO, __VA_ARGS__) #define DO_197(MACRO, ...) \ MACRO(197, __VA_ARGS__) \ DO_196(MACRO, __VA_ARGS__) #define DO_198(MACRO, ...) \ MACRO(198, __VA_ARGS__) \ DO_197(MACRO, __VA_ARGS__) #define DO_199(MACRO, ...) \ MACRO(199, __VA_ARGS__) \ DO_198(MACRO, __VA_ARGS__) #define DO_200(MACRO, ...) \ MACRO(200, __VA_ARGS__) \ DO_199(MACRO, __VA_ARGS__) #define DO_201(MACRO, ...) \ MACRO(201, __VA_ARGS__) \ DO_200(MACRO, __VA_ARGS__) #define DO_202(MACRO, ...) \ MACRO(202, __VA_ARGS__) \ DO_201(MACRO, __VA_ARGS__) #define DO_203(MACRO, ...) \ MACRO(203, __VA_ARGS__) \ DO_202(MACRO, __VA_ARGS__) #define DO_204(MACRO, ...) \ MACRO(204, __VA_ARGS__) \ DO_203(MACRO, __VA_ARGS__) #define DO_205(MACRO, ...) \ MACRO(205, __VA_ARGS__) \ DO_204(MACRO, __VA_ARGS__) #define DO_206(MACRO, ...) \ MACRO(206, __VA_ARGS__) \ DO_205(MACRO, __VA_ARGS__) #define DO_207(MACRO, ...) \ MACRO(207, __VA_ARGS__) \ DO_206(MACRO, __VA_ARGS__) #define DO_208(MACRO, ...) \ MACRO(208, __VA_ARGS__) \ DO_207(MACRO, __VA_ARGS__) #define DO_209(MACRO, ...) \ MACRO(209, __VA_ARGS__) \ DO_208(MACRO, __VA_ARGS__) #define DO_210(MACRO, ...) \ MACRO(210, __VA_ARGS__) \ DO_209(MACRO, __VA_ARGS__) #define DO_211(MACRO, ...) \ MACRO(211, __VA_ARGS__) \ DO_210(MACRO, __VA_ARGS__) #define DO_212(MACRO, ...) \ MACRO(212, __VA_ARGS__) \ DO_211(MACRO, __VA_ARGS__) #define DO_213(MACRO, ...) \ MACRO(213, __VA_ARGS__) \ DO_212(MACRO, __VA_ARGS__) #define DO_214(MACRO, ...) \ MACRO(214, __VA_ARGS__) \ DO_213(MACRO, __VA_ARGS__) #define DO_215(MACRO, ...) \ MACRO(215, __VA_ARGS__) \ DO_214(MACRO, __VA_ARGS__) #define DO_216(MACRO, ...) \ MACRO(216, __VA_ARGS__) \ DO_215(MACRO, __VA_ARGS__) #define DO_217(MACRO, ...) \ MACRO(217, __VA_ARGS__) \ DO_216(MACRO, __VA_ARGS__) #define DO_218(MACRO, ...) \ MACRO(218, __VA_ARGS__) \ DO_217(MACRO, __VA_ARGS__) #define DO_219(MACRO, ...) \ MACRO(219, __VA_ARGS__) \ DO_218(MACRO, __VA_ARGS__) #define DO_220(MACRO, ...) \ MACRO(220, __VA_ARGS__) \ DO_219(MACRO, __VA_ARGS__) #define DO_221(MACRO, ...) \ MACRO(221, __VA_ARGS__) \ DO_220(MACRO, __VA_ARGS__) #define DO_222(MACRO, ...) \ MACRO(222, __VA_ARGS__) \ DO_221(MACRO, __VA_ARGS__) #define DO_223(MACRO, ...) \ MACRO(223, __VA_ARGS__) \ DO_222(MACRO, __VA_ARGS__) #define DO_224(MACRO, ...) \ MACRO(224, __VA_ARGS__) \ DO_223(MACRO, __VA_ARGS__) #define DO_225(MACRO, ...) \ MACRO(225, __VA_ARGS__) \ DO_224(MACRO, __VA_ARGS__) #define DO_226(MACRO, ...) \ MACRO(226, __VA_ARGS__) \ DO_225(MACRO, __VA_ARGS__) #define DO_227(MACRO, ...) \ MACRO(227, __VA_ARGS__) \ DO_226(MACRO, __VA_ARGS__) #define DO_228(MACRO, ...) \ MACRO(228, __VA_ARGS__) \ DO_227(MACRO, __VA_ARGS__) #define DO_229(MACRO, ...) \ MACRO(229, __VA_ARGS__) \ DO_228(MACRO, __VA_ARGS__) #define DO_230(MACRO, ...) \ MACRO(230, __VA_ARGS__) \ DO_229(MACRO, __VA_ARGS__) #define DO_231(MACRO, ...) \ MACRO(231, __VA_ARGS__) \ DO_230(MACRO, __VA_ARGS__) #define DO_232(MACRO, ...) \ MACRO(232, __VA_ARGS__) \ DO_231(MACRO, __VA_ARGS__) #define DO_233(MACRO, ...) \ MACRO(233, __VA_ARGS__) \ DO_232(MACRO, __VA_ARGS__) #define DO_234(MACRO, ...) \ MACRO(234, __VA_ARGS__) \ DO_233(MACRO, __VA_ARGS__) #define DO_235(MACRO, ...) \ MACRO(235, __VA_ARGS__) \ DO_234(MACRO, __VA_ARGS__) #define DO_236(MACRO, ...) \ MACRO(236, __VA_ARGS__) \ DO_235(MACRO, __VA_ARGS__) #define DO_237(MACRO, ...) \ MACRO(237, __VA_ARGS__) \ DO_236(MACRO, __VA_ARGS__) #define DO_238(MACRO, ...) \ MACRO(238, __VA_ARGS__) \ DO_237(MACRO, __VA_ARGS__) #define DO_239(MACRO, ...) \ MACRO(239, __VA_ARGS__) \ DO_238(MACRO, __VA_ARGS__) #define DO_240(MACRO, ...) \ MACRO(240, __VA_ARGS__) \ DO_239(MACRO, __VA_ARGS__) #define DO_241(MACRO, ...) \ MACRO(241, __VA_ARGS__) \ DO_240(MACRO, __VA_ARGS__) #define DO_242(MACRO, ...) \ MACRO(242, __VA_ARGS__) \ DO_241(MACRO, __VA_ARGS__) #define DO_243(MACRO, ...) \ MACRO(243, __VA_ARGS__) \ DO_242(MACRO, __VA_ARGS__) #define DO_244(MACRO, ...) \ MACRO(244, __VA_ARGS__) \ DO_243(MACRO, __VA_ARGS__) #define DO_245(MACRO, ...) \ MACRO(245, __VA_ARGS__) \ DO_244(MACRO, __VA_ARGS__) #define DO_246(MACRO, ...) \ MACRO(246, __VA_ARGS__) \ DO_245(MACRO, __VA_ARGS__) #define DO_247(MACRO, ...) \ MACRO(247, __VA_ARGS__) \ DO_246(MACRO, __VA_ARGS__) #define DO_248(MACRO, ...) \ MACRO(248, __VA_ARGS__) \ DO_247(MACRO, __VA_ARGS__) #define DO_249(MACRO, ...) \ MACRO(249, __VA_ARGS__) \ DO_248(MACRO, __VA_ARGS__) #define DO_250(MACRO, ...) \ MACRO(250, __VA_ARGS__) \ DO_249(MACRO, __VA_ARGS__) #define DO_251(MACRO, ...) \ MACRO(251, __VA_ARGS__) \ DO_250(MACRO, __VA_ARGS__) #define DO_252(MACRO, ...) \ MACRO(252, __VA_ARGS__) \ DO_251(MACRO, __VA_ARGS__) #define DO_253(MACRO, ...) \ MACRO(253, __VA_ARGS__) \ DO_252(MACRO, __VA_ARGS__) #define DO_254(MACRO, ...) \ MACRO(254, __VA_ARGS__) \ DO_253(MACRO, __VA_ARGS__) #define DO_255(MACRO, ...) \ MACRO(255, __VA_ARGS__) \ DO_254(MACRO, __VA_ARGS__) #define DO_256(MACRO, ...) \ MACRO(256, __VA_ARGS__) \ DO_255(MACRO, __VA_ARGS__) #define DO_257(MACRO, ...) \ MACRO(257, __VA_ARGS__) \ DO_256(MACRO, __VA_ARGS__) #define DO_258(MACRO, ...) \ MACRO(258, __VA_ARGS__) \ DO_257(MACRO, __VA_ARGS__) #define DO_259(MACRO, ...) \ MACRO(259, __VA_ARGS__) \ DO_258(MACRO, __VA_ARGS__) #define DO_260(MACRO, ...) \ MACRO(260, __VA_ARGS__) \ DO_259(MACRO, __VA_ARGS__) #define DO_261(MACRO, ...) \ MACRO(261, __VA_ARGS__) \ DO_260(MACRO, __VA_ARGS__) #define DO_262(MACRO, ...) \ MACRO(262, __VA_ARGS__) \ DO_261(MACRO, __VA_ARGS__) #define DO_263(MACRO, ...) \ MACRO(263, __VA_ARGS__) \ DO_262(MACRO, __VA_ARGS__) #define DO_264(MACRO, ...) \ MACRO(264, __VA_ARGS__) \ DO_263(MACRO, __VA_ARGS__) #define DO_265(MACRO, ...) \ MACRO(265, __VA_ARGS__) \ DO_264(MACRO, __VA_ARGS__) #define DO_266(MACRO, ...) \ MACRO(266, __VA_ARGS__) \ DO_265(MACRO, __VA_ARGS__) #define DO_267(MACRO, ...) \ MACRO(267, __VA_ARGS__) \ DO_266(MACRO, __VA_ARGS__) #define DO_268(MACRO, ...) \ MACRO(268, __VA_ARGS__) \ DO_267(MACRO, __VA_ARGS__) #define DO_269(MACRO, ...) \ MACRO(269, __VA_ARGS__) \ DO_268(MACRO, __VA_ARGS__) #define DO_270(MACRO, ...) \ MACRO(270, __VA_ARGS__) \ DO_269(MACRO, __VA_ARGS__) #define DO_271(MACRO, ...) \ MACRO(271, __VA_ARGS__) \ DO_270(MACRO, __VA_ARGS__) #define DO_272(MACRO, ...) \ MACRO(272, __VA_ARGS__) \ DO_271(MACRO, __VA_ARGS__) #define DO_273(MACRO, ...) \ MACRO(273, __VA_ARGS__) \ DO_272(MACRO, __VA_ARGS__) #define DO_274(MACRO, ...) \ MACRO(274, __VA_ARGS__) \ DO_273(MACRO, __VA_ARGS__) #define DO_275(MACRO, ...) \ MACRO(275, __VA_ARGS__) \ DO_274(MACRO, __VA_ARGS__) #define DO_276(MACRO, ...) \ MACRO(276, __VA_ARGS__) \ DO_275(MACRO, __VA_ARGS__) #define DO_277(MACRO, ...) \ MACRO(277, __VA_ARGS__) \ DO_276(MACRO, __VA_ARGS__) #define DO_278(MACRO, ...) \ MACRO(278, __VA_ARGS__) \ DO_277(MACRO, __VA_ARGS__) #define DO_279(MACRO, ...) \ MACRO(279, __VA_ARGS__) \ DO_278(MACRO, __VA_ARGS__) #define DO_280(MACRO, ...) \ MACRO(280, __VA_ARGS__) \ DO_279(MACRO, __VA_ARGS__) #define DO_281(MACRO, ...) \ MACRO(281, __VA_ARGS__) \ DO_280(MACRO, __VA_ARGS__) #define DO_282(MACRO, ...) \ MACRO(282, __VA_ARGS__) \ DO_281(MACRO, __VA_ARGS__) #define DO_283(MACRO, ...) \ MACRO(283, __VA_ARGS__) \ DO_282(MACRO, __VA_ARGS__) #define DO_284(MACRO, ...) \ MACRO(284, __VA_ARGS__) \ DO_283(MACRO, __VA_ARGS__) #define DO_285(MACRO, ...) \ MACRO(285, __VA_ARGS__) \ DO_284(MACRO, __VA_ARGS__) #define DO_286(MACRO, ...) \ MACRO(286, __VA_ARGS__) \ DO_285(MACRO, __VA_ARGS__) #define DO_287(MACRO, ...) \ MACRO(287, __VA_ARGS__) \ DO_286(MACRO, __VA_ARGS__) #define DO_288(MACRO, ...) \ MACRO(288, __VA_ARGS__) \ DO_287(MACRO, __VA_ARGS__) #define DO_289(MACRO, ...) \ MACRO(289, __VA_ARGS__) \ DO_288(MACRO, __VA_ARGS__) #define DO_290(MACRO, ...) \ MACRO(290, __VA_ARGS__) \ DO_289(MACRO, __VA_ARGS__) #define DO_291(MACRO, ...) \ MACRO(291, __VA_ARGS__) \ DO_290(MACRO, __VA_ARGS__) #define DO_292(MACRO, ...) \ MACRO(292, __VA_ARGS__) \ DO_291(MACRO, __VA_ARGS__) #define DO_293(MACRO, ...) \ MACRO(293, __VA_ARGS__) \ DO_292(MACRO, __VA_ARGS__) #define DO_294(MACRO, ...) \ MACRO(294, __VA_ARGS__) \ DO_293(MACRO, __VA_ARGS__) #define DO_295(MACRO, ...) \ MACRO(295, __VA_ARGS__) \ DO_294(MACRO, __VA_ARGS__) #define DO_296(MACRO, ...) \ MACRO(296, __VA_ARGS__) \ DO_295(MACRO, __VA_ARGS__) #define DO_297(MACRO, ...) \ MACRO(297, __VA_ARGS__) \ DO_296(MACRO, __VA_ARGS__) #define DO_298(MACRO, ...) \ MACRO(298, __VA_ARGS__) \ DO_297(MACRO, __VA_ARGS__) #define DO_299(MACRO, ...) \ MACRO(299, __VA_ARGS__) \ DO_298(MACRO, __VA_ARGS__) #define DO_300(MACRO, ...) \ MACRO(300, __VA_ARGS__) \ DO_299(MACRO, __VA_ARGS__) #define DO_301(MACRO, ...) \ MACRO(301, __VA_ARGS__) \ DO_300(MACRO, __VA_ARGS__) #define DO_302(MACRO, ...) \ MACRO(302, __VA_ARGS__) \ DO_301(MACRO, __VA_ARGS__) #define DO_303(MACRO, ...) \ MACRO(303, __VA_ARGS__) \ DO_302(MACRO, __VA_ARGS__) #define DO_304(MACRO, ...) \ MACRO(304, __VA_ARGS__) \ DO_303(MACRO, __VA_ARGS__) #define DO_305(MACRO, ...) \ MACRO(305, __VA_ARGS__) \ DO_304(MACRO, __VA_ARGS__) #define DO_306(MACRO, ...) \ MACRO(306, __VA_ARGS__) \ DO_305(MACRO, __VA_ARGS__) #define DO_307(MACRO, ...) \ MACRO(307, __VA_ARGS__) \ DO_306(MACRO, __VA_ARGS__) #define DO_308(MACRO, ...) \ MACRO(308, __VA_ARGS__) \ DO_307(MACRO, __VA_ARGS__) #define DO_309(MACRO, ...) \ MACRO(309, __VA_ARGS__) \ DO_308(MACRO, __VA_ARGS__) #define DO_310(MACRO, ...) \ MACRO(310, __VA_ARGS__) \ DO_309(MACRO, __VA_ARGS__) #define DO_311(MACRO, ...) \ MACRO(311, __VA_ARGS__) \ DO_310(MACRO, __VA_ARGS__) #define DO_312(MACRO, ...) \ MACRO(312, __VA_ARGS__) \ DO_311(MACRO, __VA_ARGS__) #define DO_313(MACRO, ...) \ MACRO(313, __VA_ARGS__) \ DO_312(MACRO, __VA_ARGS__) #define DO_314(MACRO, ...) \ MACRO(314, __VA_ARGS__) \ DO_313(MACRO, __VA_ARGS__) #define DO_315(MACRO, ...) \ MACRO(315, __VA_ARGS__) \ DO_314(MACRO, __VA_ARGS__) #define DO_316(MACRO, ...) \ MACRO(316, __VA_ARGS__) \ DO_315(MACRO, __VA_ARGS__) #define DO_317(MACRO, ...) \ MACRO(317, __VA_ARGS__) \ DO_316(MACRO, __VA_ARGS__) #define DO_318(MACRO, ...) \ MACRO(318, __VA_ARGS__) \ DO_317(MACRO, __VA_ARGS__) #define DO_319(MACRO, ...) \ MACRO(319, __VA_ARGS__) \ DO_318(MACRO, __VA_ARGS__) #define DO_320(MACRO, ...) \ MACRO(320, __VA_ARGS__) \ DO_319(MACRO, __VA_ARGS__) #define DO_321(MACRO, ...) \ MACRO(321, __VA_ARGS__) \ DO_320(MACRO, __VA_ARGS__) #define DO_322(MACRO, ...) \ MACRO(322, __VA_ARGS__) \ DO_321(MACRO, __VA_ARGS__) #define DO_323(MACRO, ...) \ MACRO(323, __VA_ARGS__) \ DO_322(MACRO, __VA_ARGS__) #define DO_324(MACRO, ...) \ MACRO(324, __VA_ARGS__) \ DO_323(MACRO, __VA_ARGS__) #define DO_325(MACRO, ...) \ MACRO(325, __VA_ARGS__) \ DO_324(MACRO, __VA_ARGS__) #define DO_326(MACRO, ...) \ MACRO(326, __VA_ARGS__) \ DO_325(MACRO, __VA_ARGS__) #define DO_327(MACRO, ...) \ MACRO(327, __VA_ARGS__) \ DO_326(MACRO, __VA_ARGS__) #define DO_328(MACRO, ...) \ MACRO(328, __VA_ARGS__) \ DO_327(MACRO, __VA_ARGS__) #define DO_329(MACRO, ...) \ MACRO(329, __VA_ARGS__) \ DO_328(MACRO, __VA_ARGS__) #define DO_330(MACRO, ...) \ MACRO(330, __VA_ARGS__) \ DO_329(MACRO, __VA_ARGS__) #define DO_331(MACRO, ...) \ MACRO(331, __VA_ARGS__) \ DO_330(MACRO, __VA_ARGS__) #define DO_332(MACRO, ...) \ MACRO(332, __VA_ARGS__) \ DO_331(MACRO, __VA_ARGS__) #define DO_333(MACRO, ...) \ MACRO(333, __VA_ARGS__) \ DO_332(MACRO, __VA_ARGS__) #define DO_334(MACRO, ...) \ MACRO(334, __VA_ARGS__) \ DO_333(MACRO, __VA_ARGS__) #define DO_335(MACRO, ...) \ MACRO(335, __VA_ARGS__) \ DO_334(MACRO, __VA_ARGS__) #define DO_336(MACRO, ...) \ MACRO(336, __VA_ARGS__) \ DO_335(MACRO, __VA_ARGS__) #define DO_337(MACRO, ...) \ MACRO(337, __VA_ARGS__) \ DO_336(MACRO, __VA_ARGS__) #define DO_338(MACRO, ...) \ MACRO(338, __VA_ARGS__) \ DO_337(MACRO, __VA_ARGS__) #define DO_339(MACRO, ...) \ MACRO(339, __VA_ARGS__) \ DO_338(MACRO, __VA_ARGS__) #define DO_340(MACRO, ...) \ MACRO(340, __VA_ARGS__) \ DO_339(MACRO, __VA_ARGS__) #define DO_341(MACRO, ...) \ MACRO(341, __VA_ARGS__) \ DO_340(MACRO, __VA_ARGS__) #define DO_342(MACRO, ...) \ MACRO(342, __VA_ARGS__) \ DO_341(MACRO, __VA_ARGS__) #define DO_343(MACRO, ...) \ MACRO(343, __VA_ARGS__) \ DO_342(MACRO, __VA_ARGS__) #define DO_344(MACRO, ...) \ MACRO(344, __VA_ARGS__) \ DO_343(MACRO, __VA_ARGS__) #define DO_345(MACRO, ...) \ MACRO(345, __VA_ARGS__) \ DO_344(MACRO, __VA_ARGS__) #define DO_346(MACRO, ...) \ MACRO(346, __VA_ARGS__) \ DO_345(MACRO, __VA_ARGS__) #define DO_347(MACRO, ...) \ MACRO(347, __VA_ARGS__) \ DO_346(MACRO, __VA_ARGS__) #define DO_348(MACRO, ...) \ MACRO(348, __VA_ARGS__) \ DO_347(MACRO, __VA_ARGS__) #define DO_349(MACRO, ...) \ MACRO(349, __VA_ARGS__) \ DO_348(MACRO, __VA_ARGS__) #define DO_350(MACRO, ...) \ MACRO(350, __VA_ARGS__) \ DO_349(MACRO, __VA_ARGS__) #define DO_351(MACRO, ...) \ MACRO(351, __VA_ARGS__) \ DO_350(MACRO, __VA_ARGS__) #define DO_352(MACRO, ...) \ MACRO(352, __VA_ARGS__) \ DO_351(MACRO, __VA_ARGS__) #define DO_353(MACRO, ...) \ MACRO(353, __VA_ARGS__) \ DO_352(MACRO, __VA_ARGS__) #define DO_354(MACRO, ...) \ MACRO(354, __VA_ARGS__) \ DO_353(MACRO, __VA_ARGS__) #define DO_355(MACRO, ...) \ MACRO(355, __VA_ARGS__) \ DO_354(MACRO, __VA_ARGS__) #define DO_356(MACRO, ...) \ MACRO(356, __VA_ARGS__) \ DO_355(MACRO, __VA_ARGS__) #define DO_357(MACRO, ...) \ MACRO(357, __VA_ARGS__) \ DO_356(MACRO, __VA_ARGS__) #define DO_358(MACRO, ...) \ MACRO(358, __VA_ARGS__) \ DO_357(MACRO, __VA_ARGS__) #define DO_359(MACRO, ...) \ MACRO(359, __VA_ARGS__) \ DO_358(MACRO, __VA_ARGS__) #define DO_360(MACRO, ...) \ MACRO(360, __VA_ARGS__) \ DO_359(MACRO, __VA_ARGS__) #define DO_361(MACRO, ...) \ MACRO(361, __VA_ARGS__) \ DO_360(MACRO, __VA_ARGS__) #define DO_362(MACRO, ...) \ MACRO(362, __VA_ARGS__) \ DO_361(MACRO, __VA_ARGS__) #define DO_363(MACRO, ...) \ MACRO(363, __VA_ARGS__) \ DO_362(MACRO, __VA_ARGS__) #define DO_364(MACRO, ...) \ MACRO(364, __VA_ARGS__) \ DO_363(MACRO, __VA_ARGS__) #define DO_365(MACRO, ...) \ MACRO(365, __VA_ARGS__) \ DO_364(MACRO, __VA_ARGS__) #define DO_366(MACRO, ...) \ MACRO(366, __VA_ARGS__) \ DO_365(MACRO, __VA_ARGS__) #define DO_367(MACRO, ...) \ MACRO(367, __VA_ARGS__) \ DO_366(MACRO, __VA_ARGS__) #define DO_368(MACRO, ...) \ MACRO(368, __VA_ARGS__) \ DO_367(MACRO, __VA_ARGS__) #define DO_369(MACRO, ...) \ MACRO(369, __VA_ARGS__) \ DO_368(MACRO, __VA_ARGS__) #define DO_370(MACRO, ...) \ MACRO(370, __VA_ARGS__) \ DO_369(MACRO, __VA_ARGS__) #define DO_371(MACRO, ...) \ MACRO(371, __VA_ARGS__) \ DO_370(MACRO, __VA_ARGS__) #define DO_372(MACRO, ...) \ MACRO(372, __VA_ARGS__) \ DO_371(MACRO, __VA_ARGS__) #define DO_373(MACRO, ...) \ MACRO(373, __VA_ARGS__) \ DO_372(MACRO, __VA_ARGS__) #define DO_374(MACRO, ...) \ MACRO(374, __VA_ARGS__) \ DO_373(MACRO, __VA_ARGS__) #define DO_375(MACRO, ...) \ MACRO(375, __VA_ARGS__) \ DO_374(MACRO, __VA_ARGS__) #define DO_376(MACRO, ...) \ MACRO(376, __VA_ARGS__) \ DO_375(MACRO, __VA_ARGS__) #define DO_377(MACRO, ...) \ MACRO(377, __VA_ARGS__) \ DO_376(MACRO, __VA_ARGS__) #define DO_378(MACRO, ...) \ MACRO(378, __VA_ARGS__) \ DO_377(MACRO, __VA_ARGS__) #define DO_379(MACRO, ...) \ MACRO(379, __VA_ARGS__) \ DO_378(MACRO, __VA_ARGS__) #define DO_380(MACRO, ...) \ MACRO(380, __VA_ARGS__) \ DO_379(MACRO, __VA_ARGS__) #define DO_381(MACRO, ...) \ MACRO(381, __VA_ARGS__) \ DO_380(MACRO, __VA_ARGS__) #define DO_382(MACRO, ...) \ MACRO(382, __VA_ARGS__) \ DO_381(MACRO, __VA_ARGS__) #define DO_383(MACRO, ...) \ MACRO(383, __VA_ARGS__) \ DO_382(MACRO, __VA_ARGS__) #define DO_384(MACRO, ...) \ MACRO(384, __VA_ARGS__) \ DO_383(MACRO, __VA_ARGS__) #define DO_385(MACRO, ...) \ MACRO(385, __VA_ARGS__) \ DO_384(MACRO, __VA_ARGS__) #define DO_386(MACRO, ...) \ MACRO(386, __VA_ARGS__) \ DO_385(MACRO, __VA_ARGS__) #define DO_387(MACRO, ...) \ MACRO(387, __VA_ARGS__) \ DO_386(MACRO, __VA_ARGS__) #define DO_388(MACRO, ...) \ MACRO(388, __VA_ARGS__) \ DO_387(MACRO, __VA_ARGS__) #define DO_389(MACRO, ...) \ MACRO(389, __VA_ARGS__) \ DO_388(MACRO, __VA_ARGS__) #define DO_390(MACRO, ...) \ MACRO(390, __VA_ARGS__) \ DO_389(MACRO, __VA_ARGS__) #define DO_391(MACRO, ...) \ MACRO(391, __VA_ARGS__) \ DO_390(MACRO, __VA_ARGS__) #define DO_392(MACRO, ...) \ MACRO(392, __VA_ARGS__) \ DO_391(MACRO, __VA_ARGS__) #define DO_393(MACRO, ...) \ MACRO(393, __VA_ARGS__) \ DO_392(MACRO, __VA_ARGS__) #define DO_394(MACRO, ...) \ MACRO(394, __VA_ARGS__) \ DO_393(MACRO, __VA_ARGS__) #define DO_395(MACRO, ...) \ MACRO(395, __VA_ARGS__) \ DO_394(MACRO, __VA_ARGS__) #define DO_396(MACRO, ...) \ MACRO(396, __VA_ARGS__) \ DO_395(MACRO, __VA_ARGS__) #define DO_397(MACRO, ...) \ MACRO(397, __VA_ARGS__) \ DO_396(MACRO, __VA_ARGS__) #define DO_398(MACRO, ...) \ MACRO(398, __VA_ARGS__) \ DO_397(MACRO, __VA_ARGS__) #define DO_399(MACRO, ...) \ MACRO(399, __VA_ARGS__) \ DO_398(MACRO, __VA_ARGS__) #define DO_400(MACRO, ...) \ MACRO(400, __VA_ARGS__) \ DO_399(MACRO, __VA_ARGS__) #define DO_401(MACRO, ...) \ MACRO(401, __VA_ARGS__) \ DO_400(MACRO, __VA_ARGS__) #define DO_402(MACRO, ...) \ MACRO(402, __VA_ARGS__) \ DO_401(MACRO, __VA_ARGS__) #define DO_403(MACRO, ...) \ MACRO(403, __VA_ARGS__) \ DO_402(MACRO, __VA_ARGS__) #define DO_404(MACRO, ...) \ MACRO(404, __VA_ARGS__) \ DO_403(MACRO, __VA_ARGS__) #define DO_405(MACRO, ...) \ MACRO(405, __VA_ARGS__) \ DO_404(MACRO, __VA_ARGS__) #define DO_406(MACRO, ...) \ MACRO(406, __VA_ARGS__) \ DO_405(MACRO, __VA_ARGS__) #define DO_407(MACRO, ...) \ MACRO(407, __VA_ARGS__) \ DO_406(MACRO, __VA_ARGS__) #define DO_408(MACRO, ...) \ MACRO(408, __VA_ARGS__) \ DO_407(MACRO, __VA_ARGS__) #define DO_409(MACRO, ...) \ MACRO(409, __VA_ARGS__) \ DO_408(MACRO, __VA_ARGS__) #define DO_410(MACRO, ...) \ MACRO(410, __VA_ARGS__) \ DO_409(MACRO, __VA_ARGS__) #define DO_411(MACRO, ...) \ MACRO(411, __VA_ARGS__) \ DO_410(MACRO, __VA_ARGS__) #define DO_412(MACRO, ...) \ MACRO(412, __VA_ARGS__) \ DO_411(MACRO, __VA_ARGS__) #define DO_413(MACRO, ...) \ MACRO(413, __VA_ARGS__) \ DO_412(MACRO, __VA_ARGS__) #define DO_414(MACRO, ...) \ MACRO(414, __VA_ARGS__) \ DO_413(MACRO, __VA_ARGS__) #define DO_415(MACRO, ...) \ MACRO(415, __VA_ARGS__) \ DO_414(MACRO, __VA_ARGS__) #define DO_416(MACRO, ...) \ MACRO(416, __VA_ARGS__) \ DO_415(MACRO, __VA_ARGS__) #define DO_417(MACRO, ...) \ MACRO(417, __VA_ARGS__) \ DO_416(MACRO, __VA_ARGS__) #define DO_418(MACRO, ...) \ MACRO(418, __VA_ARGS__) \ DO_417(MACRO, __VA_ARGS__) #define DO_419(MACRO, ...) \ MACRO(419, __VA_ARGS__) \ DO_418(MACRO, __VA_ARGS__) #define DO_420(MACRO, ...) \ MACRO(420, __VA_ARGS__) \ DO_419(MACRO, __VA_ARGS__) #define DO_421(MACRO, ...) \ MACRO(421, __VA_ARGS__) \ DO_420(MACRO, __VA_ARGS__) #define DO_422(MACRO, ...) \ MACRO(422, __VA_ARGS__) \ DO_421(MACRO, __VA_ARGS__) #define DO_423(MACRO, ...) \ MACRO(423, __VA_ARGS__) \ DO_422(MACRO, __VA_ARGS__) #define DO_424(MACRO, ...) \ MACRO(424, __VA_ARGS__) \ DO_423(MACRO, __VA_ARGS__) #define DO_425(MACRO, ...) \ MACRO(425, __VA_ARGS__) \ DO_424(MACRO, __VA_ARGS__) #define DO_426(MACRO, ...) \ MACRO(426, __VA_ARGS__) \ DO_425(MACRO, __VA_ARGS__) #define DO_427(MACRO, ...) \ MACRO(427, __VA_ARGS__) \ DO_426(MACRO, __VA_ARGS__) #define DO_428(MACRO, ...) \ MACRO(428, __VA_ARGS__) \ DO_427(MACRO, __VA_ARGS__) #define DO_429(MACRO, ...) \ MACRO(429, __VA_ARGS__) \ DO_428(MACRO, __VA_ARGS__) #define DO_430(MACRO, ...) \ MACRO(430, __VA_ARGS__) \ DO_429(MACRO, __VA_ARGS__) #define DO_431(MACRO, ...) \ MACRO(431, __VA_ARGS__) \ DO_430(MACRO, __VA_ARGS__) #define DO_432(MACRO, ...) \ MACRO(432, __VA_ARGS__) \ DO_431(MACRO, __VA_ARGS__) #define DO_433(MACRO, ...) \ MACRO(433, __VA_ARGS__) \ DO_432(MACRO, __VA_ARGS__) #define DO_434(MACRO, ...) \ MACRO(434, __VA_ARGS__) \ DO_433(MACRO, __VA_ARGS__) #define DO_435(MACRO, ...) \ MACRO(435, __VA_ARGS__) \ DO_434(MACRO, __VA_ARGS__) #define DO_436(MACRO, ...) \ MACRO(436, __VA_ARGS__) \ DO_435(MACRO, __VA_ARGS__) #define DO_437(MACRO, ...) \ MACRO(437, __VA_ARGS__) \ DO_436(MACRO, __VA_ARGS__) #define DO_438(MACRO, ...) \ MACRO(438, __VA_ARGS__) \ DO_437(MACRO, __VA_ARGS__) #define DO_439(MACRO, ...) \ MACRO(439, __VA_ARGS__) \ DO_438(MACRO, __VA_ARGS__) #define DO_440(MACRO, ...) \ MACRO(440, __VA_ARGS__) \ DO_439(MACRO, __VA_ARGS__) #define DO_441(MACRO, ...) \ MACRO(441, __VA_ARGS__) \ DO_440(MACRO, __VA_ARGS__) #define DO_442(MACRO, ...) \ MACRO(442, __VA_ARGS__) \ DO_441(MACRO, __VA_ARGS__) #define DO_443(MACRO, ...) \ MACRO(443, __VA_ARGS__) \ DO_442(MACRO, __VA_ARGS__) #define DO_444(MACRO, ...) \ MACRO(444, __VA_ARGS__) \ DO_443(MACRO, __VA_ARGS__) #define DO_445(MACRO, ...) \ MACRO(445, __VA_ARGS__) \ DO_444(MACRO, __VA_ARGS__) #define DO_446(MACRO, ...) \ MACRO(446, __VA_ARGS__) \ DO_445(MACRO, __VA_ARGS__) #define DO_447(MACRO, ...) \ MACRO(447, __VA_ARGS__) \ DO_446(MACRO, __VA_ARGS__) #define DO_448(MACRO, ...) \ MACRO(448, __VA_ARGS__) \ DO_447(MACRO, __VA_ARGS__) #define DO_449(MACRO, ...) \ MACRO(449, __VA_ARGS__) \ DO_448(MACRO, __VA_ARGS__) #define DO_450(MACRO, ...) \ MACRO(450, __VA_ARGS__) \ DO_449(MACRO, __VA_ARGS__) #define DO_451(MACRO, ...) \ MACRO(451, __VA_ARGS__) \ DO_450(MACRO, __VA_ARGS__) #define DO_452(MACRO, ...) \ MACRO(452, __VA_ARGS__) \ DO_451(MACRO, __VA_ARGS__) #define DO_453(MACRO, ...) \ MACRO(453, __VA_ARGS__) \ DO_452(MACRO, __VA_ARGS__) #define DO_454(MACRO, ...) \ MACRO(454, __VA_ARGS__) \ DO_453(MACRO, __VA_ARGS__) #define DO_455(MACRO, ...) \ MACRO(455, __VA_ARGS__) \ DO_454(MACRO, __VA_ARGS__) #define DO_456(MACRO, ...) \ MACRO(456, __VA_ARGS__) \ DO_455(MACRO, __VA_ARGS__) #define DO_457(MACRO, ...) \ MACRO(457, __VA_ARGS__) \ DO_456(MACRO, __VA_ARGS__) #define DO_458(MACRO, ...) \ MACRO(458, __VA_ARGS__) \ DO_457(MACRO, __VA_ARGS__) #define DO_459(MACRO, ...) \ MACRO(459, __VA_ARGS__) \ DO_458(MACRO, __VA_ARGS__) #define DO_460(MACRO, ...) \ MACRO(460, __VA_ARGS__) \ DO_459(MACRO, __VA_ARGS__) #define DO_461(MACRO, ...) \ MACRO(461, __VA_ARGS__) \ DO_460(MACRO, __VA_ARGS__) #define DO_462(MACRO, ...) \ MACRO(462, __VA_ARGS__) \ DO_461(MACRO, __VA_ARGS__) #define DO_463(MACRO, ...) \ MACRO(463, __VA_ARGS__) \ DO_462(MACRO, __VA_ARGS__) #define DO_464(MACRO, ...) \ MACRO(464, __VA_ARGS__) \ DO_463(MACRO, __VA_ARGS__) #define DO_465(MACRO, ...) \ MACRO(465, __VA_ARGS__) \ DO_464(MACRO, __VA_ARGS__) #define DO_466(MACRO, ...) \ MACRO(466, __VA_ARGS__) \ DO_465(MACRO, __VA_ARGS__) #define DO_467(MACRO, ...) \ MACRO(467, __VA_ARGS__) \ DO_466(MACRO, __VA_ARGS__) #define DO_468(MACRO, ...) \ MACRO(468, __VA_ARGS__) \ DO_467(MACRO, __VA_ARGS__) #define DO_469(MACRO, ...) \ MACRO(469, __VA_ARGS__) \ DO_468(MACRO, __VA_ARGS__) #define DO_470(MACRO, ...) \ MACRO(470, __VA_ARGS__) \ DO_469(MACRO, __VA_ARGS__) #define DO_471(MACRO, ...) \ MACRO(471, __VA_ARGS__) \ DO_470(MACRO, __VA_ARGS__) #define DO_472(MACRO, ...) \ MACRO(472, __VA_ARGS__) \ DO_471(MACRO, __VA_ARGS__) #define DO_473(MACRO, ...) \ MACRO(473, __VA_ARGS__) \ DO_472(MACRO, __VA_ARGS__) #define DO_474(MACRO, ...) \ MACRO(474, __VA_ARGS__) \ DO_473(MACRO, __VA_ARGS__) #define DO_475(MACRO, ...) \ MACRO(475, __VA_ARGS__) \ DO_474(MACRO, __VA_ARGS__) #define DO_476(MACRO, ...) \ MACRO(476, __VA_ARGS__) \ DO_475(MACRO, __VA_ARGS__) #define DO_477(MACRO, ...) \ MACRO(477, __VA_ARGS__) \ DO_476(MACRO, __VA_ARGS__) #define DO_478(MACRO, ...) \ MACRO(478, __VA_ARGS__) \ DO_477(MACRO, __VA_ARGS__) #define DO_479(MACRO, ...) \ MACRO(479, __VA_ARGS__) \ DO_478(MACRO, __VA_ARGS__) #define DO_480(MACRO, ...) \ MACRO(480, __VA_ARGS__) \ DO_479(MACRO, __VA_ARGS__) #define DO_481(MACRO, ...) \ MACRO(481, __VA_ARGS__) \ DO_480(MACRO, __VA_ARGS__) #define DO_482(MACRO, ...) \ MACRO(482, __VA_ARGS__) \ DO_481(MACRO, __VA_ARGS__) #define DO_483(MACRO, ...) \ MACRO(483, __VA_ARGS__) \ DO_482(MACRO, __VA_ARGS__) #define DO_484(MACRO, ...) \ MACRO(484, __VA_ARGS__) \ DO_483(MACRO, __VA_ARGS__) #define DO_485(MACRO, ...) \ MACRO(485, __VA_ARGS__) \ DO_484(MACRO, __VA_ARGS__) #define DO_486(MACRO, ...) \ MACRO(486, __VA_ARGS__) \ DO_485(MACRO, __VA_ARGS__) #define DO_487(MACRO, ...) \ MACRO(487, __VA_ARGS__) \ DO_486(MACRO, __VA_ARGS__) #define DO_488(MACRO, ...) \ MACRO(488, __VA_ARGS__) \ DO_487(MACRO, __VA_ARGS__) #define DO_489(MACRO, ...) \ MACRO(489, __VA_ARGS__) \ DO_488(MACRO, __VA_ARGS__) #define DO_490(MACRO, ...) \ MACRO(490, __VA_ARGS__) \ DO_489(MACRO, __VA_ARGS__) #define DO_491(MACRO, ...) \ MACRO(491, __VA_ARGS__) \ DO_490(MACRO, __VA_ARGS__) #define DO_492(MACRO, ...) \ MACRO(492, __VA_ARGS__) \ DO_491(MACRO, __VA_ARGS__) #define DO_493(MACRO, ...) \ MACRO(493, __VA_ARGS__) \ DO_492(MACRO, __VA_ARGS__) #define DO_494(MACRO, ...) \ MACRO(494, __VA_ARGS__) \ DO_493(MACRO, __VA_ARGS__) #define DO_495(MACRO, ...) \ MACRO(495, __VA_ARGS__) \ DO_494(MACRO, __VA_ARGS__) #define DO_496(MACRO, ...) \ MACRO(496, __VA_ARGS__) \ DO_495(MACRO, __VA_ARGS__) #define DO_497(MACRO, ...) \ MACRO(497, __VA_ARGS__) \ DO_496(MACRO, __VA_ARGS__) #define DO_498(MACRO, ...) \ MACRO(498, __VA_ARGS__) \ DO_497(MACRO, __VA_ARGS__) #define DO_499(MACRO, ...) \ MACRO(499, __VA_ARGS__) \ DO_498(MACRO, __VA_ARGS__) #define DO_500(MACRO, ...) \ MACRO(500, __VA_ARGS__) \ DO_499(MACRO, __VA_ARGS__) #define DO_501(MACRO, ...) \ MACRO(501, __VA_ARGS__) \ DO_500(MACRO, __VA_ARGS__) #define DO_502(MACRO, ...) \ MACRO(502, __VA_ARGS__) \ DO_501(MACRO, __VA_ARGS__) #define DO_503(MACRO, ...) \ MACRO(503, __VA_ARGS__) \ DO_502(MACRO, __VA_ARGS__) #define DO_504(MACRO, ...) \ MACRO(504, __VA_ARGS__) \ DO_503(MACRO, __VA_ARGS__) #define DO_505(MACRO, ...) \ MACRO(505, __VA_ARGS__) \ DO_504(MACRO, __VA_ARGS__) #define DO_506(MACRO, ...) \ MACRO(506, __VA_ARGS__) \ DO_505(MACRO, __VA_ARGS__) #define DO_507(MACRO, ...) \ MACRO(507, __VA_ARGS__) \ DO_506(MACRO, __VA_ARGS__) #define DO_508(MACRO, ...) \ MACRO(508, __VA_ARGS__) \ DO_507(MACRO, __VA_ARGS__) #define DO_509(MACRO, ...) \ MACRO(509, __VA_ARGS__) \ DO_508(MACRO, __VA_ARGS__) #define DO_510(MACRO, ...) \ MACRO(510, __VA_ARGS__) \ DO_509(MACRO, __VA_ARGS__) #define DO_511(MACRO, ...) \ MACRO(511, __VA_ARGS__) \ DO_510(MACRO, __VA_ARGS__) #define DO_512(MACRO, ...) \ MACRO(512, __VA_ARGS__) \ DO_511(MACRO, __VA_ARGS__) #define DO_513(MACRO, ...) \ MACRO(513, __VA_ARGS__) \ DO_512(MACRO, __VA_ARGS__) #define DO_514(MACRO, ...) \ MACRO(514, __VA_ARGS__) \ DO_513(MACRO, __VA_ARGS__) #define DO_515(MACRO, ...) \ MACRO(515, __VA_ARGS__) \ DO_514(MACRO, __VA_ARGS__) #define DO_516(MACRO, ...) \ MACRO(516, __VA_ARGS__) \ DO_515(MACRO, __VA_ARGS__) #define DO_517(MACRO, ...) \ MACRO(517, __VA_ARGS__) \ DO_516(MACRO, __VA_ARGS__) #define DO_518(MACRO, ...) \ MACRO(518, __VA_ARGS__) \ DO_517(MACRO, __VA_ARGS__) #define DO_519(MACRO, ...) \ MACRO(519, __VA_ARGS__) \ DO_518(MACRO, __VA_ARGS__) #define DO_520(MACRO, ...) \ MACRO(520, __VA_ARGS__) \ DO_519(MACRO, __VA_ARGS__) #define DO_521(MACRO, ...) \ MACRO(521, __VA_ARGS__) \ DO_520(MACRO, __VA_ARGS__) #define DO_522(MACRO, ...) \ MACRO(522, __VA_ARGS__) \ DO_521(MACRO, __VA_ARGS__) #define DO_523(MACRO, ...) \ MACRO(523, __VA_ARGS__) \ DO_522(MACRO, __VA_ARGS__) #define DO_524(MACRO, ...) \ MACRO(524, __VA_ARGS__) \ DO_523(MACRO, __VA_ARGS__) #define DO_525(MACRO, ...) \ MACRO(525, __VA_ARGS__) \ DO_524(MACRO, __VA_ARGS__) #define DO_526(MACRO, ...) \ MACRO(526, __VA_ARGS__) \ DO_525(MACRO, __VA_ARGS__) #define DO_527(MACRO, ...) \ MACRO(527, __VA_ARGS__) \ DO_526(MACRO, __VA_ARGS__) #define DO_528(MACRO, ...) \ MACRO(528, __VA_ARGS__) \ DO_527(MACRO, __VA_ARGS__) #define DO_529(MACRO, ...) \ MACRO(529, __VA_ARGS__) \ DO_528(MACRO, __VA_ARGS__) #define DO_530(MACRO, ...) \ MACRO(530, __VA_ARGS__) \ DO_529(MACRO, __VA_ARGS__) #define DO_531(MACRO, ...) \ MACRO(531, __VA_ARGS__) \ DO_530(MACRO, __VA_ARGS__) #define DO_532(MACRO, ...) \ MACRO(532, __VA_ARGS__) \ DO_531(MACRO, __VA_ARGS__) #define DO_533(MACRO, ...) \ MACRO(533, __VA_ARGS__) \ DO_532(MACRO, __VA_ARGS__) #define DO_534(MACRO, ...) \ MACRO(534, __VA_ARGS__) \ DO_533(MACRO, __VA_ARGS__) #define DO_535(MACRO, ...) \ MACRO(535, __VA_ARGS__) \ DO_534(MACRO, __VA_ARGS__) #define DO_536(MACRO, ...) \ MACRO(536, __VA_ARGS__) \ DO_535(MACRO, __VA_ARGS__) #define DO_537(MACRO, ...) \ MACRO(537, __VA_ARGS__) \ DO_536(MACRO, __VA_ARGS__) #define DO_538(MACRO, ...) \ MACRO(538, __VA_ARGS__) \ DO_537(MACRO, __VA_ARGS__) #define DO_539(MACRO, ...) \ MACRO(539, __VA_ARGS__) \ DO_538(MACRO, __VA_ARGS__) #define DO_540(MACRO, ...) \ MACRO(540, __VA_ARGS__) \ DO_539(MACRO, __VA_ARGS__) #define DO_541(MACRO, ...) \ MACRO(541, __VA_ARGS__) \ DO_540(MACRO, __VA_ARGS__) #define DO_542(MACRO, ...) \ MACRO(542, __VA_ARGS__) \ DO_541(MACRO, __VA_ARGS__) #define DO_543(MACRO, ...) \ MACRO(543, __VA_ARGS__) \ DO_542(MACRO, __VA_ARGS__) #define DO_544(MACRO, ...) \ MACRO(544, __VA_ARGS__) \ DO_543(MACRO, __VA_ARGS__) #define DO_545(MACRO, ...) \ MACRO(545, __VA_ARGS__) \ DO_544(MACRO, __VA_ARGS__) #define DO_546(MACRO, ...) \ MACRO(546, __VA_ARGS__) \ DO_545(MACRO, __VA_ARGS__) #define DO_547(MACRO, ...) \ MACRO(547, __VA_ARGS__) \ DO_546(MACRO, __VA_ARGS__) #define DO_548(MACRO, ...) \ MACRO(548, __VA_ARGS__) \ DO_547(MACRO, __VA_ARGS__) #define DO_549(MACRO, ...) \ MACRO(549, __VA_ARGS__) \ DO_548(MACRO, __VA_ARGS__) #define DO_550(MACRO, ...) \ MACRO(550, __VA_ARGS__) \ DO_549(MACRO, __VA_ARGS__) #define DO_551(MACRO, ...) \ MACRO(551, __VA_ARGS__) \ DO_550(MACRO, __VA_ARGS__) #define DO_552(MACRO, ...) \ MACRO(552, __VA_ARGS__) \ DO_551(MACRO, __VA_ARGS__) #define DO_553(MACRO, ...) \ MACRO(553, __VA_ARGS__) \ DO_552(MACRO, __VA_ARGS__) #define DO_554(MACRO, ...) \ MACRO(554, __VA_ARGS__) \ DO_553(MACRO, __VA_ARGS__) #define DO_555(MACRO, ...) \ MACRO(555, __VA_ARGS__) \ DO_554(MACRO, __VA_ARGS__) #define DO_556(MACRO, ...) \ MACRO(556, __VA_ARGS__) \ DO_555(MACRO, __VA_ARGS__) #define DO_557(MACRO, ...) \ MACRO(557, __VA_ARGS__) \ DO_556(MACRO, __VA_ARGS__) #define DO_558(MACRO, ...) \ MACRO(558, __VA_ARGS__) \ DO_557(MACRO, __VA_ARGS__) #define DO_559(MACRO, ...) \ MACRO(559, __VA_ARGS__) \ DO_558(MACRO, __VA_ARGS__) #define DO_560(MACRO, ...) \ MACRO(560, __VA_ARGS__) \ DO_559(MACRO, __VA_ARGS__) #define DO_561(MACRO, ...) \ MACRO(561, __VA_ARGS__) \ DO_560(MACRO, __VA_ARGS__) #define DO_562(MACRO, ...) \ MACRO(562, __VA_ARGS__) \ DO_561(MACRO, __VA_ARGS__) #define DO_563(MACRO, ...) \ MACRO(563, __VA_ARGS__) \ DO_562(MACRO, __VA_ARGS__) #define DO_564(MACRO, ...) \ MACRO(564, __VA_ARGS__) \ DO_563(MACRO, __VA_ARGS__) #define DO_565(MACRO, ...) \ MACRO(565, __VA_ARGS__) \ DO_564(MACRO, __VA_ARGS__) #define DO_566(MACRO, ...) \ MACRO(566, __VA_ARGS__) \ DO_565(MACRO, __VA_ARGS__) #define DO_567(MACRO, ...) \ MACRO(567, __VA_ARGS__) \ DO_566(MACRO, __VA_ARGS__) #define DO_568(MACRO, ...) \ MACRO(568, __VA_ARGS__) \ DO_567(MACRO, __VA_ARGS__) #define DO_569(MACRO, ...) \ MACRO(569, __VA_ARGS__) \ DO_568(MACRO, __VA_ARGS__) #define DO_570(MACRO, ...) \ MACRO(570, __VA_ARGS__) \ DO_569(MACRO, __VA_ARGS__) #define DO_571(MACRO, ...) \ MACRO(571, __VA_ARGS__) \ DO_570(MACRO, __VA_ARGS__) #define DO_572(MACRO, ...) \ MACRO(572, __VA_ARGS__) \ DO_571(MACRO, __VA_ARGS__) #define DO_573(MACRO, ...) \ MACRO(573, __VA_ARGS__) \ DO_572(MACRO, __VA_ARGS__) #define DO_574(MACRO, ...) \ MACRO(574, __VA_ARGS__) \ DO_573(MACRO, __VA_ARGS__) #define DO_575(MACRO, ...) \ MACRO(575, __VA_ARGS__) \ DO_574(MACRO, __VA_ARGS__) #define DO_576(MACRO, ...) \ MACRO(576, __VA_ARGS__) \ DO_575(MACRO, __VA_ARGS__) #define DO_577(MACRO, ...) \ MACRO(577, __VA_ARGS__) \ DO_576(MACRO, __VA_ARGS__) #define DO_578(MACRO, ...) \ MACRO(578, __VA_ARGS__) \ DO_577(MACRO, __VA_ARGS__) #define DO_579(MACRO, ...) \ MACRO(579, __VA_ARGS__) \ DO_578(MACRO, __VA_ARGS__) #define DO_580(MACRO, ...) \ MACRO(580, __VA_ARGS__) \ DO_579(MACRO, __VA_ARGS__) #define DO_581(MACRO, ...) \ MACRO(581, __VA_ARGS__) \ DO_580(MACRO, __VA_ARGS__) #define DO_582(MACRO, ...) \ MACRO(582, __VA_ARGS__) \ DO_581(MACRO, __VA_ARGS__) #define DO_583(MACRO, ...) \ MACRO(583, __VA_ARGS__) \ DO_582(MACRO, __VA_ARGS__) #define DO_584(MACRO, ...) \ MACRO(584, __VA_ARGS__) \ DO_583(MACRO, __VA_ARGS__) #define DO_585(MACRO, ...) \ MACRO(585, __VA_ARGS__) \ DO_584(MACRO, __VA_ARGS__) #define DO_586(MACRO, ...) \ MACRO(586, __VA_ARGS__) \ DO_585(MACRO, __VA_ARGS__) #define DO_587(MACRO, ...) \ MACRO(587, __VA_ARGS__) \ DO_586(MACRO, __VA_ARGS__) #define DO_588(MACRO, ...) \ MACRO(588, __VA_ARGS__) \ DO_587(MACRO, __VA_ARGS__) #define DO_589(MACRO, ...) \ MACRO(589, __VA_ARGS__) \ DO_588(MACRO, __VA_ARGS__) #define DO_590(MACRO, ...) \ MACRO(590, __VA_ARGS__) \ DO_589(MACRO, __VA_ARGS__) #define DO_591(MACRO, ...) \ MACRO(591, __VA_ARGS__) \ DO_590(MACRO, __VA_ARGS__) #define DO_592(MACRO, ...) \ MACRO(592, __VA_ARGS__) \ DO_591(MACRO, __VA_ARGS__) #define DO_593(MACRO, ...) \ MACRO(593, __VA_ARGS__) \ DO_592(MACRO, __VA_ARGS__) #define DO_594(MACRO, ...) \ MACRO(594, __VA_ARGS__) \ DO_593(MACRO, __VA_ARGS__) #define DO_595(MACRO, ...) \ MACRO(595, __VA_ARGS__) \ DO_594(MACRO, __VA_ARGS__) #define DO_596(MACRO, ...) \ MACRO(596, __VA_ARGS__) \ DO_595(MACRO, __VA_ARGS__) #define DO_597(MACRO, ...) \ MACRO(597, __VA_ARGS__) \ DO_596(MACRO, __VA_ARGS__) #define DO_598(MACRO, ...) \ MACRO(598, __VA_ARGS__) \ DO_597(MACRO, __VA_ARGS__) #define DO_599(MACRO, ...) \ MACRO(599, __VA_ARGS__) \ DO_598(MACRO, __VA_ARGS__) #define DO_600(MACRO, ...) \ MACRO(600, __VA_ARGS__) \ DO_599(MACRO, __VA_ARGS__) #define DO_601(MACRO, ...) \ MACRO(601, __VA_ARGS__) \ DO_600(MACRO, __VA_ARGS__) #define DO_602(MACRO, ...) \ MACRO(602, __VA_ARGS__) \ DO_601(MACRO, __VA_ARGS__) #define DO_603(MACRO, ...) \ MACRO(603, __VA_ARGS__) \ DO_602(MACRO, __VA_ARGS__) #define DO_604(MACRO, ...) \ MACRO(604, __VA_ARGS__) \ DO_603(MACRO, __VA_ARGS__) #define DO_605(MACRO, ...) \ MACRO(605, __VA_ARGS__) \ DO_604(MACRO, __VA_ARGS__) #define DO_606(MACRO, ...) \ MACRO(606, __VA_ARGS__) \ DO_605(MACRO, __VA_ARGS__) #define DO_607(MACRO, ...) \ MACRO(607, __VA_ARGS__) \ DO_606(MACRO, __VA_ARGS__) #define DO_608(MACRO, ...) \ MACRO(608, __VA_ARGS__) \ DO_607(MACRO, __VA_ARGS__) #define DO_609(MACRO, ...) \ MACRO(609, __VA_ARGS__) \ DO_608(MACRO, __VA_ARGS__) #define DO_610(MACRO, ...) \ MACRO(610, __VA_ARGS__) \ DO_609(MACRO, __VA_ARGS__) #define DO_611(MACRO, ...) \ MACRO(611, __VA_ARGS__) \ DO_610(MACRO, __VA_ARGS__) #define DO_612(MACRO, ...) \ MACRO(612, __VA_ARGS__) \ DO_611(MACRO, __VA_ARGS__) #define DO_613(MACRO, ...) \ MACRO(613, __VA_ARGS__) \ DO_612(MACRO, __VA_ARGS__) #define DO_614(MACRO, ...) \ MACRO(614, __VA_ARGS__) \ DO_613(MACRO, __VA_ARGS__) #define DO_615(MACRO, ...) \ MACRO(615, __VA_ARGS__) \ DO_614(MACRO, __VA_ARGS__) #define DO_616(MACRO, ...) \ MACRO(616, __VA_ARGS__) \ DO_615(MACRO, __VA_ARGS__) #define DO_617(MACRO, ...) \ MACRO(617, __VA_ARGS__) \ DO_616(MACRO, __VA_ARGS__) #define DO_618(MACRO, ...) \ MACRO(618, __VA_ARGS__) \ DO_617(MACRO, __VA_ARGS__) #define DO_619(MACRO, ...) \ MACRO(619, __VA_ARGS__) \ DO_618(MACRO, __VA_ARGS__) #define DO_620(MACRO, ...) \ MACRO(620, __VA_ARGS__) \ DO_619(MACRO, __VA_ARGS__) #define DO_621(MACRO, ...) \ MACRO(621, __VA_ARGS__) \ DO_620(MACRO, __VA_ARGS__) #define DO_622(MACRO, ...) \ MACRO(622, __VA_ARGS__) \ DO_621(MACRO, __VA_ARGS__) #define DO_623(MACRO, ...) \ MACRO(623, __VA_ARGS__) \ DO_622(MACRO, __VA_ARGS__) #define DO_624(MACRO, ...) \ MACRO(624, __VA_ARGS__) \ DO_623(MACRO, __VA_ARGS__) #define DO_625(MACRO, ...) \ MACRO(625, __VA_ARGS__) \ DO_624(MACRO, __VA_ARGS__) #define DO_626(MACRO, ...) \ MACRO(626, __VA_ARGS__) \ DO_625(MACRO, __VA_ARGS__) #define DO_627(MACRO, ...) \ MACRO(627, __VA_ARGS__) \ DO_626(MACRO, __VA_ARGS__) #define DO_628(MACRO, ...) \ MACRO(628, __VA_ARGS__) \ DO_627(MACRO, __VA_ARGS__) #define DO_629(MACRO, ...) \ MACRO(629, __VA_ARGS__) \ DO_628(MACRO, __VA_ARGS__) #define DO_630(MACRO, ...) \ MACRO(630, __VA_ARGS__) \ DO_629(MACRO, __VA_ARGS__) #define DO_631(MACRO, ...) \ MACRO(631, __VA_ARGS__) \ DO_630(MACRO, __VA_ARGS__) #define DO_632(MACRO, ...) \ MACRO(632, __VA_ARGS__) \ DO_631(MACRO, __VA_ARGS__) #define DO_633(MACRO, ...) \ MACRO(633, __VA_ARGS__) \ DO_632(MACRO, __VA_ARGS__) #define DO_634(MACRO, ...) \ MACRO(634, __VA_ARGS__) \ DO_633(MACRO, __VA_ARGS__) #define DO_635(MACRO, ...) \ MACRO(635, __VA_ARGS__) \ DO_634(MACRO, __VA_ARGS__) #define DO_636(MACRO, ...) \ MACRO(636, __VA_ARGS__) \ DO_635(MACRO, __VA_ARGS__) #define DO_637(MACRO, ...) \ MACRO(637, __VA_ARGS__) \ DO_636(MACRO, __VA_ARGS__) #define DO_638(MACRO, ...) \ MACRO(638, __VA_ARGS__) \ DO_637(MACRO, __VA_ARGS__) #define DO_639(MACRO, ...) \ MACRO(639, __VA_ARGS__) \ DO_638(MACRO, __VA_ARGS__) #define DO_640(MACRO, ...) \ MACRO(640, __VA_ARGS__) \ DO_639(MACRO, __VA_ARGS__) #define DO_641(MACRO, ...) \ MACRO(641, __VA_ARGS__) \ DO_640(MACRO, __VA_ARGS__) #define DO_642(MACRO, ...) \ MACRO(642, __VA_ARGS__) \ DO_641(MACRO, __VA_ARGS__) #define DO_643(MACRO, ...) \ MACRO(643, __VA_ARGS__) \ DO_642(MACRO, __VA_ARGS__) #define DO_644(MACRO, ...) \ MACRO(644, __VA_ARGS__) \ DO_643(MACRO, __VA_ARGS__) #define DO_645(MACRO, ...) \ MACRO(645, __VA_ARGS__) \ DO_644(MACRO, __VA_ARGS__) #define DO_646(MACRO, ...) \ MACRO(646, __VA_ARGS__) \ DO_645(MACRO, __VA_ARGS__) #define DO_647(MACRO, ...) \ MACRO(647, __VA_ARGS__) \ DO_646(MACRO, __VA_ARGS__) #define DO_648(MACRO, ...) \ MACRO(648, __VA_ARGS__) \ DO_647(MACRO, __VA_ARGS__) #define DO_649(MACRO, ...) \ MACRO(649, __VA_ARGS__) \ DO_648(MACRO, __VA_ARGS__) #define DO_650(MACRO, ...) \ MACRO(650, __VA_ARGS__) \ DO_649(MACRO, __VA_ARGS__) #define DO_651(MACRO, ...) \ MACRO(651, __VA_ARGS__) \ DO_650(MACRO, __VA_ARGS__) #define DO_652(MACRO, ...) \ MACRO(652, __VA_ARGS__) \ DO_651(MACRO, __VA_ARGS__) #define DO_653(MACRO, ...) \ MACRO(653, __VA_ARGS__) \ DO_652(MACRO, __VA_ARGS__) #define DO_654(MACRO, ...) \ MACRO(654, __VA_ARGS__) \ DO_653(MACRO, __VA_ARGS__) #define DO_655(MACRO, ...) \ MACRO(655, __VA_ARGS__) \ DO_654(MACRO, __VA_ARGS__) #define DO_656(MACRO, ...) \ MACRO(656, __VA_ARGS__) \ DO_655(MACRO, __VA_ARGS__) #define DO_657(MACRO, ...) \ MACRO(657, __VA_ARGS__) \ DO_656(MACRO, __VA_ARGS__) #define DO_658(MACRO, ...) \ MACRO(658, __VA_ARGS__) \ DO_657(MACRO, __VA_ARGS__) #define DO_659(MACRO, ...) \ MACRO(659, __VA_ARGS__) \ DO_658(MACRO, __VA_ARGS__) #define DO_660(MACRO, ...) \ MACRO(660, __VA_ARGS__) \ DO_659(MACRO, __VA_ARGS__) #define DO_661(MACRO, ...) \ MACRO(661, __VA_ARGS__) \ DO_660(MACRO, __VA_ARGS__) #define DO_662(MACRO, ...) \ MACRO(662, __VA_ARGS__) \ DO_661(MACRO, __VA_ARGS__) #define DO_663(MACRO, ...) \ MACRO(663, __VA_ARGS__) \ DO_662(MACRO, __VA_ARGS__) #define DO_664(MACRO, ...) \ MACRO(664, __VA_ARGS__) \ DO_663(MACRO, __VA_ARGS__) #define DO_665(MACRO, ...) \ MACRO(665, __VA_ARGS__) \ DO_664(MACRO, __VA_ARGS__) #define DO_666(MACRO, ...) \ MACRO(666, __VA_ARGS__) \ DO_665(MACRO, __VA_ARGS__) #define DO_667(MACRO, ...) \ MACRO(667, __VA_ARGS__) \ DO_666(MACRO, __VA_ARGS__) #define DO_668(MACRO, ...) \ MACRO(668, __VA_ARGS__) \ DO_667(MACRO, __VA_ARGS__) #define DO_669(MACRO, ...) \ MACRO(669, __VA_ARGS__) \ DO_668(MACRO, __VA_ARGS__) #define DO_670(MACRO, ...) \ MACRO(670, __VA_ARGS__) \ DO_669(MACRO, __VA_ARGS__) #define DO_671(MACRO, ...) \ MACRO(671, __VA_ARGS__) \ DO_670(MACRO, __VA_ARGS__) #define DO_672(MACRO, ...) \ MACRO(672, __VA_ARGS__) \ DO_671(MACRO, __VA_ARGS__) #define DO_673(MACRO, ...) \ MACRO(673, __VA_ARGS__) \ DO_672(MACRO, __VA_ARGS__) #define DO_674(MACRO, ...) \ MACRO(674, __VA_ARGS__) \ DO_673(MACRO, __VA_ARGS__) #define DO_675(MACRO, ...) \ MACRO(675, __VA_ARGS__) \ DO_674(MACRO, __VA_ARGS__) #define DO_676(MACRO, ...) \ MACRO(676, __VA_ARGS__) \ DO_675(MACRO, __VA_ARGS__) #define DO_677(MACRO, ...) \ MACRO(677, __VA_ARGS__) \ DO_676(MACRO, __VA_ARGS__) #define DO_678(MACRO, ...) \ MACRO(678, __VA_ARGS__) \ DO_677(MACRO, __VA_ARGS__) #define DO_679(MACRO, ...) \ MACRO(679, __VA_ARGS__) \ DO_678(MACRO, __VA_ARGS__) #define DO_680(MACRO, ...) \ MACRO(680, __VA_ARGS__) \ DO_679(MACRO, __VA_ARGS__) #define DO_681(MACRO, ...) \ MACRO(681, __VA_ARGS__) \ DO_680(MACRO, __VA_ARGS__) #define DO_682(MACRO, ...) \ MACRO(682, __VA_ARGS__) \ DO_681(MACRO, __VA_ARGS__) #define DO_683(MACRO, ...) \ MACRO(683, __VA_ARGS__) \ DO_682(MACRO, __VA_ARGS__) #define DO_684(MACRO, ...) \ MACRO(684, __VA_ARGS__) \ DO_683(MACRO, __VA_ARGS__) #define DO_685(MACRO, ...) \ MACRO(685, __VA_ARGS__) \ DO_684(MACRO, __VA_ARGS__) #define DO_686(MACRO, ...) \ MACRO(686, __VA_ARGS__) \ DO_685(MACRO, __VA_ARGS__) #define DO_687(MACRO, ...) \ MACRO(687, __VA_ARGS__) \ DO_686(MACRO, __VA_ARGS__) #define DO_688(MACRO, ...) \ MACRO(688, __VA_ARGS__) \ DO_687(MACRO, __VA_ARGS__) #define DO_689(MACRO, ...) \ MACRO(689, __VA_ARGS__) \ DO_688(MACRO, __VA_ARGS__) #define DO_690(MACRO, ...) \ MACRO(690, __VA_ARGS__) \ DO_689(MACRO, __VA_ARGS__) #define DO_691(MACRO, ...) \ MACRO(691, __VA_ARGS__) \ DO_690(MACRO, __VA_ARGS__) #define DO_692(MACRO, ...) \ MACRO(692, __VA_ARGS__) \ DO_691(MACRO, __VA_ARGS__) #define DO_693(MACRO, ...) \ MACRO(693, __VA_ARGS__) \ DO_692(MACRO, __VA_ARGS__) #define DO_694(MACRO, ...) \ MACRO(694, __VA_ARGS__) \ DO_693(MACRO, __VA_ARGS__) #define DO_695(MACRO, ...) \ MACRO(695, __VA_ARGS__) \ DO_694(MACRO, __VA_ARGS__) #define DO_696(MACRO, ...) \ MACRO(696, __VA_ARGS__) \ DO_695(MACRO, __VA_ARGS__) #define DO_697(MACRO, ...) \ MACRO(697, __VA_ARGS__) \ DO_696(MACRO, __VA_ARGS__) #define DO_698(MACRO, ...) \ MACRO(698, __VA_ARGS__) \ DO_697(MACRO, __VA_ARGS__) #define DO_699(MACRO, ...) \ MACRO(699, __VA_ARGS__) \ DO_698(MACRO, __VA_ARGS__) #define DO_700(MACRO, ...) \ MACRO(700, __VA_ARGS__) \ DO_699(MACRO, __VA_ARGS__) #define DO_701(MACRO, ...) \ MACRO(701, __VA_ARGS__) \ DO_700(MACRO, __VA_ARGS__) #define DO_702(MACRO, ...) \ MACRO(702, __VA_ARGS__) \ DO_701(MACRO, __VA_ARGS__) #define DO_703(MACRO, ...) \ MACRO(703, __VA_ARGS__) \ DO_702(MACRO, __VA_ARGS__) #define DO_704(MACRO, ...) \ MACRO(704, __VA_ARGS__) \ DO_703(MACRO, __VA_ARGS__) #define DO_705(MACRO, ...) \ MACRO(705, __VA_ARGS__) \ DO_704(MACRO, __VA_ARGS__) #define DO_706(MACRO, ...) \ MACRO(706, __VA_ARGS__) \ DO_705(MACRO, __VA_ARGS__) #define DO_707(MACRO, ...) \ MACRO(707, __VA_ARGS__) \ DO_706(MACRO, __VA_ARGS__) #define DO_708(MACRO, ...) \ MACRO(708, __VA_ARGS__) \ DO_707(MACRO, __VA_ARGS__) #define DO_709(MACRO, ...) \ MACRO(709, __VA_ARGS__) \ DO_708(MACRO, __VA_ARGS__) #define DO_710(MACRO, ...) \ MACRO(710, __VA_ARGS__) \ DO_709(MACRO, __VA_ARGS__) #define DO_711(MACRO, ...) \ MACRO(711, __VA_ARGS__) \ DO_710(MACRO, __VA_ARGS__) #define DO_712(MACRO, ...) \ MACRO(712, __VA_ARGS__) \ DO_711(MACRO, __VA_ARGS__) #define DO_713(MACRO, ...) \ MACRO(713, __VA_ARGS__) \ DO_712(MACRO, __VA_ARGS__) #define DO_714(MACRO, ...) \ MACRO(714, __VA_ARGS__) \ DO_713(MACRO, __VA_ARGS__) #define DO_715(MACRO, ...) \ MACRO(715, __VA_ARGS__) \ DO_714(MACRO, __VA_ARGS__) #define DO_716(MACRO, ...) \ MACRO(716, __VA_ARGS__) \ DO_715(MACRO, __VA_ARGS__) #define DO_717(MACRO, ...) \ MACRO(717, __VA_ARGS__) \ DO_716(MACRO, __VA_ARGS__) #define DO_718(MACRO, ...) \ MACRO(718, __VA_ARGS__) \ DO_717(MACRO, __VA_ARGS__) #define DO_719(MACRO, ...) \ MACRO(719, __VA_ARGS__) \ DO_718(MACRO, __VA_ARGS__) #define DO_720(MACRO, ...) \ MACRO(720, __VA_ARGS__) \ DO_719(MACRO, __VA_ARGS__) #define DO_721(MACRO, ...) \ MACRO(721, __VA_ARGS__) \ DO_720(MACRO, __VA_ARGS__) #define DO_722(MACRO, ...) \ MACRO(722, __VA_ARGS__) \ DO_721(MACRO, __VA_ARGS__) #define DO_723(MACRO, ...) \ MACRO(723, __VA_ARGS__) \ DO_722(MACRO, __VA_ARGS__) #define DO_724(MACRO, ...) \ MACRO(724, __VA_ARGS__) \ DO_723(MACRO, __VA_ARGS__) #define DO_725(MACRO, ...) \ MACRO(725, __VA_ARGS__) \ DO_724(MACRO, __VA_ARGS__) #define DO_726(MACRO, ...) \ MACRO(726, __VA_ARGS__) \ DO_725(MACRO, __VA_ARGS__) #define DO_727(MACRO, ...) \ MACRO(727, __VA_ARGS__) \ DO_726(MACRO, __VA_ARGS__) #define DO_728(MACRO, ...) \ MACRO(728, __VA_ARGS__) \ DO_727(MACRO, __VA_ARGS__) #define DO_729(MACRO, ...) \ MACRO(729, __VA_ARGS__) \ DO_728(MACRO, __VA_ARGS__) #define DO_730(MACRO, ...) \ MACRO(730, __VA_ARGS__) \ DO_729(MACRO, __VA_ARGS__) #define DO_731(MACRO, ...) \ MACRO(731, __VA_ARGS__) \ DO_730(MACRO, __VA_ARGS__) #define DO_732(MACRO, ...) \ MACRO(732, __VA_ARGS__) \ DO_731(MACRO, __VA_ARGS__) #define DO_733(MACRO, ...) \ MACRO(733, __VA_ARGS__) \ DO_732(MACRO, __VA_ARGS__) #define DO_734(MACRO, ...) \ MACRO(734, __VA_ARGS__) \ DO_733(MACRO, __VA_ARGS__) #define DO_735(MACRO, ...) \ MACRO(735, __VA_ARGS__) \ DO_734(MACRO, __VA_ARGS__) #define DO_736(MACRO, ...) \ MACRO(736, __VA_ARGS__) \ DO_735(MACRO, __VA_ARGS__) #define DO_737(MACRO, ...) \ MACRO(737, __VA_ARGS__) \ DO_736(MACRO, __VA_ARGS__) #define DO_738(MACRO, ...) \ MACRO(738, __VA_ARGS__) \ DO_737(MACRO, __VA_ARGS__) #define DO_739(MACRO, ...) \ MACRO(739, __VA_ARGS__) \ DO_738(MACRO, __VA_ARGS__) #define DO_740(MACRO, ...) \ MACRO(740, __VA_ARGS__) \ DO_739(MACRO, __VA_ARGS__) #define DO_741(MACRO, ...) \ MACRO(741, __VA_ARGS__) \ DO_740(MACRO, __VA_ARGS__) #define DO_742(MACRO, ...) \ MACRO(742, __VA_ARGS__) \ DO_741(MACRO, __VA_ARGS__) #define DO_743(MACRO, ...) \ MACRO(743, __VA_ARGS__) \ DO_742(MACRO, __VA_ARGS__) #define DO_744(MACRO, ...) \ MACRO(744, __VA_ARGS__) \ DO_743(MACRO, __VA_ARGS__) #define DO_745(MACRO, ...) \ MACRO(745, __VA_ARGS__) \ DO_744(MACRO, __VA_ARGS__) #define DO_746(MACRO, ...) \ MACRO(746, __VA_ARGS__) \ DO_745(MACRO, __VA_ARGS__) #define DO_747(MACRO, ...) \ MACRO(747, __VA_ARGS__) \ DO_746(MACRO, __VA_ARGS__) #define DO_748(MACRO, ...) \ MACRO(748, __VA_ARGS__) \ DO_747(MACRO, __VA_ARGS__) #define DO_749(MACRO, ...) \ MACRO(749, __VA_ARGS__) \ DO_748(MACRO, __VA_ARGS__) #define DO_750(MACRO, ...) \ MACRO(750, __VA_ARGS__) \ DO_749(MACRO, __VA_ARGS__) #define DO_751(MACRO, ...) \ MACRO(751, __VA_ARGS__) \ DO_750(MACRO, __VA_ARGS__) #define DO_752(MACRO, ...) \ MACRO(752, __VA_ARGS__) \ DO_751(MACRO, __VA_ARGS__) #define DO_753(MACRO, ...) \ MACRO(753, __VA_ARGS__) \ DO_752(MACRO, __VA_ARGS__) #define DO_754(MACRO, ...) \ MACRO(754, __VA_ARGS__) \ DO_753(MACRO, __VA_ARGS__) #define DO_755(MACRO, ...) \ MACRO(755, __VA_ARGS__) \ DO_754(MACRO, __VA_ARGS__) #define DO_756(MACRO, ...) \ MACRO(756, __VA_ARGS__) \ DO_755(MACRO, __VA_ARGS__) #define DO_757(MACRO, ...) \ MACRO(757, __VA_ARGS__) \ DO_756(MACRO, __VA_ARGS__) #define DO_758(MACRO, ...) \ MACRO(758, __VA_ARGS__) \ DO_757(MACRO, __VA_ARGS__) #define DO_759(MACRO, ...) \ MACRO(759, __VA_ARGS__) \ DO_758(MACRO, __VA_ARGS__) #define DO_760(MACRO, ...) \ MACRO(760, __VA_ARGS__) \ DO_759(MACRO, __VA_ARGS__) #define DO_761(MACRO, ...) \ MACRO(761, __VA_ARGS__) \ DO_760(MACRO, __VA_ARGS__) #define DO_762(MACRO, ...) \ MACRO(762, __VA_ARGS__) \ DO_761(MACRO, __VA_ARGS__) #define DO_763(MACRO, ...) \ MACRO(763, __VA_ARGS__) \ DO_762(MACRO, __VA_ARGS__) #define DO_764(MACRO, ...) \ MACRO(764, __VA_ARGS__) \ DO_763(MACRO, __VA_ARGS__) #define DO_765(MACRO, ...) \ MACRO(765, __VA_ARGS__) \ DO_764(MACRO, __VA_ARGS__) #define DO_766(MACRO, ...) \ MACRO(766, __VA_ARGS__) \ DO_765(MACRO, __VA_ARGS__) #define DO_767(MACRO, ...) \ MACRO(767, __VA_ARGS__) \ DO_766(MACRO, __VA_ARGS__) #define DO_768(MACRO, ...) \ MACRO(768, __VA_ARGS__) \ DO_767(MACRO, __VA_ARGS__) #define DO_769(MACRO, ...) \ MACRO(769, __VA_ARGS__) \ DO_768(MACRO, __VA_ARGS__) #define DO_770(MACRO, ...) \ MACRO(770, __VA_ARGS__) \ DO_769(MACRO, __VA_ARGS__) #define DO_771(MACRO, ...) \ MACRO(771, __VA_ARGS__) \ DO_770(MACRO, __VA_ARGS__) #define DO_772(MACRO, ...) \ MACRO(772, __VA_ARGS__) \ DO_771(MACRO, __VA_ARGS__) #define DO_773(MACRO, ...) \ MACRO(773, __VA_ARGS__) \ DO_772(MACRO, __VA_ARGS__) #define DO_774(MACRO, ...) \ MACRO(774, __VA_ARGS__) \ DO_773(MACRO, __VA_ARGS__) #define DO_775(MACRO, ...) \ MACRO(775, __VA_ARGS__) \ DO_774(MACRO, __VA_ARGS__) #define DO_776(MACRO, ...) \ MACRO(776, __VA_ARGS__) \ DO_775(MACRO, __VA_ARGS__) #define DO_777(MACRO, ...) \ MACRO(777, __VA_ARGS__) \ DO_776(MACRO, __VA_ARGS__) #define DO_778(MACRO, ...) \ MACRO(778, __VA_ARGS__) \ DO_777(MACRO, __VA_ARGS__) #define DO_779(MACRO, ...) \ MACRO(779, __VA_ARGS__) \ DO_778(MACRO, __VA_ARGS__) #define DO_780(MACRO, ...) \ MACRO(780, __VA_ARGS__) \ DO_779(MACRO, __VA_ARGS__) #define DO_781(MACRO, ...) \ MACRO(781, __VA_ARGS__) \ DO_780(MACRO, __VA_ARGS__) #define DO_782(MACRO, ...) \ MACRO(782, __VA_ARGS__) \ DO_781(MACRO, __VA_ARGS__) #define DO_783(MACRO, ...) \ MACRO(783, __VA_ARGS__) \ DO_782(MACRO, __VA_ARGS__) #define DO_784(MACRO, ...) \ MACRO(784, __VA_ARGS__) \ DO_783(MACRO, __VA_ARGS__) #define DO_785(MACRO, ...) \ MACRO(785, __VA_ARGS__) \ DO_784(MACRO, __VA_ARGS__) #define DO_786(MACRO, ...) \ MACRO(786, __VA_ARGS__) \ DO_785(MACRO, __VA_ARGS__) #define DO_787(MACRO, ...) \ MACRO(787, __VA_ARGS__) \ DO_786(MACRO, __VA_ARGS__) #define DO_788(MACRO, ...) \ MACRO(788, __VA_ARGS__) \ DO_787(MACRO, __VA_ARGS__) #define DO_789(MACRO, ...) \ MACRO(789, __VA_ARGS__) \ DO_788(MACRO, __VA_ARGS__) #define DO_790(MACRO, ...) \ MACRO(790, __VA_ARGS__) \ DO_789(MACRO, __VA_ARGS__) #define DO_791(MACRO, ...) \ MACRO(791, __VA_ARGS__) \ DO_790(MACRO, __VA_ARGS__) #define DO_792(MACRO, ...) \ MACRO(792, __VA_ARGS__) \ DO_791(MACRO, __VA_ARGS__) #define DO_793(MACRO, ...) \ MACRO(793, __VA_ARGS__) \ DO_792(MACRO, __VA_ARGS__) #define DO_794(MACRO, ...) \ MACRO(794, __VA_ARGS__) \ DO_793(MACRO, __VA_ARGS__) #define DO_795(MACRO, ...) \ MACRO(795, __VA_ARGS__) \ DO_794(MACRO, __VA_ARGS__) #define DO_796(MACRO, ...) \ MACRO(796, __VA_ARGS__) \ DO_795(MACRO, __VA_ARGS__) #define DO_797(MACRO, ...) \ MACRO(797, __VA_ARGS__) \ DO_796(MACRO, __VA_ARGS__) #define DO_798(MACRO, ...) \ MACRO(798, __VA_ARGS__) \ DO_797(MACRO, __VA_ARGS__) #define DO_799(MACRO, ...) \ MACRO(799, __VA_ARGS__) \ DO_798(MACRO, __VA_ARGS__) #define DO_800(MACRO, ...) \ MACRO(800, __VA_ARGS__) \ DO_799(MACRO, __VA_ARGS__) #define DO_801(MACRO, ...) \ MACRO(801, __VA_ARGS__) \ DO_800(MACRO, __VA_ARGS__) #define DO_802(MACRO, ...) \ MACRO(802, __VA_ARGS__) \ DO_801(MACRO, __VA_ARGS__) #define DO_803(MACRO, ...) \ MACRO(803, __VA_ARGS__) \ DO_802(MACRO, __VA_ARGS__) #define DO_804(MACRO, ...) \ MACRO(804, __VA_ARGS__) \ DO_803(MACRO, __VA_ARGS__) #define DO_805(MACRO, ...) \ MACRO(805, __VA_ARGS__) \ DO_804(MACRO, __VA_ARGS__) #define DO_806(MACRO, ...) \ MACRO(806, __VA_ARGS__) \ DO_805(MACRO, __VA_ARGS__) #define DO_807(MACRO, ...) \ MACRO(807, __VA_ARGS__) \ DO_806(MACRO, __VA_ARGS__) #define DO_808(MACRO, ...) \ MACRO(808, __VA_ARGS__) \ DO_807(MACRO, __VA_ARGS__) #define DO_809(MACRO, ...) \ MACRO(809, __VA_ARGS__) \ DO_808(MACRO, __VA_ARGS__) #define DO_810(MACRO, ...) \ MACRO(810, __VA_ARGS__) \ DO_809(MACRO, __VA_ARGS__) #define DO_811(MACRO, ...) \ MACRO(811, __VA_ARGS__) \ DO_810(MACRO, __VA_ARGS__) #define DO_812(MACRO, ...) \ MACRO(812, __VA_ARGS__) \ DO_811(MACRO, __VA_ARGS__) #define DO_813(MACRO, ...) \ MACRO(813, __VA_ARGS__) \ DO_812(MACRO, __VA_ARGS__) #define DO_814(MACRO, ...) \ MACRO(814, __VA_ARGS__) \ DO_813(MACRO, __VA_ARGS__) #define DO_815(MACRO, ...) \ MACRO(815, __VA_ARGS__) \ DO_814(MACRO, __VA_ARGS__) #define DO_816(MACRO, ...) \ MACRO(816, __VA_ARGS__) \ DO_815(MACRO, __VA_ARGS__) #define DO_817(MACRO, ...) \ MACRO(817, __VA_ARGS__) \ DO_816(MACRO, __VA_ARGS__) #define DO_818(MACRO, ...) \ MACRO(818, __VA_ARGS__) \ DO_817(MACRO, __VA_ARGS__) #define DO_819(MACRO, ...) \ MACRO(819, __VA_ARGS__) \ DO_818(MACRO, __VA_ARGS__) #define DO_820(MACRO, ...) \ MACRO(820, __VA_ARGS__) \ DO_819(MACRO, __VA_ARGS__) #define DO_821(MACRO, ...) \ MACRO(821, __VA_ARGS__) \ DO_820(MACRO, __VA_ARGS__) #define DO_822(MACRO, ...) \ MACRO(822, __VA_ARGS__) \ DO_821(MACRO, __VA_ARGS__) #define DO_823(MACRO, ...) \ MACRO(823, __VA_ARGS__) \ DO_822(MACRO, __VA_ARGS__) #define DO_824(MACRO, ...) \ MACRO(824, __VA_ARGS__) \ DO_823(MACRO, __VA_ARGS__) #define DO_825(MACRO, ...) \ MACRO(825, __VA_ARGS__) \ DO_824(MACRO, __VA_ARGS__) #define DO_826(MACRO, ...) \ MACRO(826, __VA_ARGS__) \ DO_825(MACRO, __VA_ARGS__) #define DO_827(MACRO, ...) \ MACRO(827, __VA_ARGS__) \ DO_826(MACRO, __VA_ARGS__) #define DO_828(MACRO, ...) \ MACRO(828, __VA_ARGS__) \ DO_827(MACRO, __VA_ARGS__) #define DO_829(MACRO, ...) \ MACRO(829, __VA_ARGS__) \ DO_828(MACRO, __VA_ARGS__) #define DO_830(MACRO, ...) \ MACRO(830, __VA_ARGS__) \ DO_829(MACRO, __VA_ARGS__) #define DO_831(MACRO, ...) \ MACRO(831, __VA_ARGS__) \ DO_830(MACRO, __VA_ARGS__) #define DO_832(MACRO, ...) \ MACRO(832, __VA_ARGS__) \ DO_831(MACRO, __VA_ARGS__) #define DO_833(MACRO, ...) \ MACRO(833, __VA_ARGS__) \ DO_832(MACRO, __VA_ARGS__) #define DO_834(MACRO, ...) \ MACRO(834, __VA_ARGS__) \ DO_833(MACRO, __VA_ARGS__) #define DO_835(MACRO, ...) \ MACRO(835, __VA_ARGS__) \ DO_834(MACRO, __VA_ARGS__) #define DO_836(MACRO, ...) \ MACRO(836, __VA_ARGS__) \ DO_835(MACRO, __VA_ARGS__) #define DO_837(MACRO, ...) \ MACRO(837, __VA_ARGS__) \ DO_836(MACRO, __VA_ARGS__) #define DO_838(MACRO, ...) \ MACRO(838, __VA_ARGS__) \ DO_837(MACRO, __VA_ARGS__) #define DO_839(MACRO, ...) \ MACRO(839, __VA_ARGS__) \ DO_838(MACRO, __VA_ARGS__) #define DO_840(MACRO, ...) \ MACRO(840, __VA_ARGS__) \ DO_839(MACRO, __VA_ARGS__) #define DO_841(MACRO, ...) \ MACRO(841, __VA_ARGS__) \ DO_840(MACRO, __VA_ARGS__) #define DO_842(MACRO, ...) \ MACRO(842, __VA_ARGS__) \ DO_841(MACRO, __VA_ARGS__) #define DO_843(MACRO, ...) \ MACRO(843, __VA_ARGS__) \ DO_842(MACRO, __VA_ARGS__) #define DO_844(MACRO, ...) \ MACRO(844, __VA_ARGS__) \ DO_843(MACRO, __VA_ARGS__) #define DO_845(MACRO, ...) \ MACRO(845, __VA_ARGS__) \ DO_844(MACRO, __VA_ARGS__) #define DO_846(MACRO, ...) \ MACRO(846, __VA_ARGS__) \ DO_845(MACRO, __VA_ARGS__) #define DO_847(MACRO, ...) \ MACRO(847, __VA_ARGS__) \ DO_846(MACRO, __VA_ARGS__) #define DO_848(MACRO, ...) \ MACRO(848, __VA_ARGS__) \ DO_847(MACRO, __VA_ARGS__) #define DO_849(MACRO, ...) \ MACRO(849, __VA_ARGS__) \ DO_848(MACRO, __VA_ARGS__) #define DO_850(MACRO, ...) \ MACRO(850, __VA_ARGS__) \ DO_849(MACRO, __VA_ARGS__) #define DO_851(MACRO, ...) \ MACRO(851, __VA_ARGS__) \ DO_850(MACRO, __VA_ARGS__) #define DO_852(MACRO, ...) \ MACRO(852, __VA_ARGS__) \ DO_851(MACRO, __VA_ARGS__) #define DO_853(MACRO, ...) \ MACRO(853, __VA_ARGS__) \ DO_852(MACRO, __VA_ARGS__) #define DO_854(MACRO, ...) \ MACRO(854, __VA_ARGS__) \ DO_853(MACRO, __VA_ARGS__) #define DO_855(MACRO, ...) \ MACRO(855, __VA_ARGS__) \ DO_854(MACRO, __VA_ARGS__) #define DO_856(MACRO, ...) \ MACRO(856, __VA_ARGS__) \ DO_855(MACRO, __VA_ARGS__) #define DO_857(MACRO, ...) \ MACRO(857, __VA_ARGS__) \ DO_856(MACRO, __VA_ARGS__) #define DO_858(MACRO, ...) \ MACRO(858, __VA_ARGS__) \ DO_857(MACRO, __VA_ARGS__) #define DO_859(MACRO, ...) \ MACRO(859, __VA_ARGS__) \ DO_858(MACRO, __VA_ARGS__) #define DO_860(MACRO, ...) \ MACRO(860, __VA_ARGS__) \ DO_859(MACRO, __VA_ARGS__) #define DO_861(MACRO, ...) \ MACRO(861, __VA_ARGS__) \ DO_860(MACRO, __VA_ARGS__) #define DO_862(MACRO, ...) \ MACRO(862, __VA_ARGS__) \ DO_861(MACRO, __VA_ARGS__) #define DO_863(MACRO, ...) \ MACRO(863, __VA_ARGS__) \ DO_862(MACRO, __VA_ARGS__) #define DO_864(MACRO, ...) \ MACRO(864, __VA_ARGS__) \ DO_863(MACRO, __VA_ARGS__) #define DO_865(MACRO, ...) \ MACRO(865, __VA_ARGS__) \ DO_864(MACRO, __VA_ARGS__) #define DO_866(MACRO, ...) \ MACRO(866, __VA_ARGS__) \ DO_865(MACRO, __VA_ARGS__) #define DO_867(MACRO, ...) \ MACRO(867, __VA_ARGS__) \ DO_866(MACRO, __VA_ARGS__) #define DO_868(MACRO, ...) \ MACRO(868, __VA_ARGS__) \ DO_867(MACRO, __VA_ARGS__) #define DO_869(MACRO, ...) \ MACRO(869, __VA_ARGS__) \ DO_868(MACRO, __VA_ARGS__) #define DO_870(MACRO, ...) \ MACRO(870, __VA_ARGS__) \ DO_869(MACRO, __VA_ARGS__) #define DO_871(MACRO, ...) \ MACRO(871, __VA_ARGS__) \ DO_870(MACRO, __VA_ARGS__) #define DO_872(MACRO, ...) \ MACRO(872, __VA_ARGS__) \ DO_871(MACRO, __VA_ARGS__) #define DO_873(MACRO, ...) \ MACRO(873, __VA_ARGS__) \ DO_872(MACRO, __VA_ARGS__) #define DO_874(MACRO, ...) \ MACRO(874, __VA_ARGS__) \ DO_873(MACRO, __VA_ARGS__) #define DO_875(MACRO, ...) \ MACRO(875, __VA_ARGS__) \ DO_874(MACRO, __VA_ARGS__) #define DO_876(MACRO, ...) \ MACRO(876, __VA_ARGS__) \ DO_875(MACRO, __VA_ARGS__) #define DO_877(MACRO, ...) \ MACRO(877, __VA_ARGS__) \ DO_876(MACRO, __VA_ARGS__) #define DO_878(MACRO, ...) \ MACRO(878, __VA_ARGS__) \ DO_877(MACRO, __VA_ARGS__) #define DO_879(MACRO, ...) \ MACRO(879, __VA_ARGS__) \ DO_878(MACRO, __VA_ARGS__) #define DO_880(MACRO, ...) \ MACRO(880, __VA_ARGS__) \ DO_879(MACRO, __VA_ARGS__) #define DO_881(MACRO, ...) \ MACRO(881, __VA_ARGS__) \ DO_880(MACRO, __VA_ARGS__) #define DO_882(MACRO, ...) \ MACRO(882, __VA_ARGS__) \ DO_881(MACRO, __VA_ARGS__) #define DO_883(MACRO, ...) \ MACRO(883, __VA_ARGS__) \ DO_882(MACRO, __VA_ARGS__) #define DO_884(MACRO, ...) \ MACRO(884, __VA_ARGS__) \ DO_883(MACRO, __VA_ARGS__) #define DO_885(MACRO, ...) \ MACRO(885, __VA_ARGS__) \ DO_884(MACRO, __VA_ARGS__) #define DO_886(MACRO, ...) \ MACRO(886, __VA_ARGS__) \ DO_885(MACRO, __VA_ARGS__) #define DO_887(MACRO, ...) \ MACRO(887, __VA_ARGS__) \ DO_886(MACRO, __VA_ARGS__) #define DO_888(MACRO, ...) \ MACRO(888, __VA_ARGS__) \ DO_887(MACRO, __VA_ARGS__) #define DO_889(MACRO, ...) \ MACRO(889, __VA_ARGS__) \ DO_888(MACRO, __VA_ARGS__) #define DO_890(MACRO, ...) \ MACRO(890, __VA_ARGS__) \ DO_889(MACRO, __VA_ARGS__) #define DO_891(MACRO, ...) \ MACRO(891, __VA_ARGS__) \ DO_890(MACRO, __VA_ARGS__) #define DO_892(MACRO, ...) \ MACRO(892, __VA_ARGS__) \ DO_891(MACRO, __VA_ARGS__) #define DO_893(MACRO, ...) \ MACRO(893, __VA_ARGS__) \ DO_892(MACRO, __VA_ARGS__) #define DO_894(MACRO, ...) \ MACRO(894, __VA_ARGS__) \ DO_893(MACRO, __VA_ARGS__) #define DO_895(MACRO, ...) \ MACRO(895, __VA_ARGS__) \ DO_894(MACRO, __VA_ARGS__) #define DO_896(MACRO, ...) \ MACRO(896, __VA_ARGS__) \ DO_895(MACRO, __VA_ARGS__) #define DO_897(MACRO, ...) \ MACRO(897, __VA_ARGS__) \ DO_896(MACRO, __VA_ARGS__) #define DO_898(MACRO, ...) \ MACRO(898, __VA_ARGS__) \ DO_897(MACRO, __VA_ARGS__) #define DO_899(MACRO, ...) \ MACRO(899, __VA_ARGS__) \ DO_898(MACRO, __VA_ARGS__) #define DO_900(MACRO, ...) \ MACRO(900, __VA_ARGS__) \ DO_899(MACRO, __VA_ARGS__) #define DO_901(MACRO, ...) \ MACRO(901, __VA_ARGS__) \ DO_900(MACRO, __VA_ARGS__) #define DO_902(MACRO, ...) \ MACRO(902, __VA_ARGS__) \ DO_901(MACRO, __VA_ARGS__) #define DO_903(MACRO, ...) \ MACRO(903, __VA_ARGS__) \ DO_902(MACRO, __VA_ARGS__) #define DO_904(MACRO, ...) \ MACRO(904, __VA_ARGS__) \ DO_903(MACRO, __VA_ARGS__) #define DO_905(MACRO, ...) \ MACRO(905, __VA_ARGS__) \ DO_904(MACRO, __VA_ARGS__) #define DO_906(MACRO, ...) \ MACRO(906, __VA_ARGS__) \ DO_905(MACRO, __VA_ARGS__) #define DO_907(MACRO, ...) \ MACRO(907, __VA_ARGS__) \ DO_906(MACRO, __VA_ARGS__) #define DO_908(MACRO, ...) \ MACRO(908, __VA_ARGS__) \ DO_907(MACRO, __VA_ARGS__) #define DO_909(MACRO, ...) \ MACRO(909, __VA_ARGS__) \ DO_908(MACRO, __VA_ARGS__) #define DO_910(MACRO, ...) \ MACRO(910, __VA_ARGS__) \ DO_909(MACRO, __VA_ARGS__) #define DO_911(MACRO, ...) \ MACRO(911, __VA_ARGS__) \ DO_910(MACRO, __VA_ARGS__) #define DO_912(MACRO, ...) \ MACRO(912, __VA_ARGS__) \ DO_911(MACRO, __VA_ARGS__) #define DO_913(MACRO, ...) \ MACRO(913, __VA_ARGS__) \ DO_912(MACRO, __VA_ARGS__) #define DO_914(MACRO, ...) \ MACRO(914, __VA_ARGS__) \ DO_913(MACRO, __VA_ARGS__) #define DO_915(MACRO, ...) \ MACRO(915, __VA_ARGS__) \ DO_914(MACRO, __VA_ARGS__) #define DO_916(MACRO, ...) \ MACRO(916, __VA_ARGS__) \ DO_915(MACRO, __VA_ARGS__) #define DO_917(MACRO, ...) \ MACRO(917, __VA_ARGS__) \ DO_916(MACRO, __VA_ARGS__) #define DO_918(MACRO, ...) \ MACRO(918, __VA_ARGS__) \ DO_917(MACRO, __VA_ARGS__) #define DO_919(MACRO, ...) \ MACRO(919, __VA_ARGS__) \ DO_918(MACRO, __VA_ARGS__) #define DO_920(MACRO, ...) \ MACRO(920, __VA_ARGS__) \ DO_919(MACRO, __VA_ARGS__) #define DO_921(MACRO, ...) \ MACRO(921, __VA_ARGS__) \ DO_920(MACRO, __VA_ARGS__) #define DO_922(MACRO, ...) \ MACRO(922, __VA_ARGS__) \ DO_921(MACRO, __VA_ARGS__) #define DO_923(MACRO, ...) \ MACRO(923, __VA_ARGS__) \ DO_922(MACRO, __VA_ARGS__) #define DO_924(MACRO, ...) \ MACRO(924, __VA_ARGS__) \ DO_923(MACRO, __VA_ARGS__) #define DO_925(MACRO, ...) \ MACRO(925, __VA_ARGS__) \ DO_924(MACRO, __VA_ARGS__) #define DO_926(MACRO, ...) \ MACRO(926, __VA_ARGS__) \ DO_925(MACRO, __VA_ARGS__) #define DO_927(MACRO, ...) \ MACRO(927, __VA_ARGS__) \ DO_926(MACRO, __VA_ARGS__) #define DO_928(MACRO, ...) \ MACRO(928, __VA_ARGS__) \ DO_927(MACRO, __VA_ARGS__) #define DO_929(MACRO, ...) \ MACRO(929, __VA_ARGS__) \ DO_928(MACRO, __VA_ARGS__) #define DO_930(MACRO, ...) \ MACRO(930, __VA_ARGS__) \ DO_929(MACRO, __VA_ARGS__) #define DO_931(MACRO, ...) \ MACRO(931, __VA_ARGS__) \ DO_930(MACRO, __VA_ARGS__) #define DO_932(MACRO, ...) \ MACRO(932, __VA_ARGS__) \ DO_931(MACRO, __VA_ARGS__) #define DO_933(MACRO, ...) \ MACRO(933, __VA_ARGS__) \ DO_932(MACRO, __VA_ARGS__) #define DO_934(MACRO, ...) \ MACRO(934, __VA_ARGS__) \ DO_933(MACRO, __VA_ARGS__) #define DO_935(MACRO, ...) \ MACRO(935, __VA_ARGS__) \ DO_934(MACRO, __VA_ARGS__) #define DO_936(MACRO, ...) \ MACRO(936, __VA_ARGS__) \ DO_935(MACRO, __VA_ARGS__) #define DO_937(MACRO, ...) \ MACRO(937, __VA_ARGS__) \ DO_936(MACRO, __VA_ARGS__) #define DO_938(MACRO, ...) \ MACRO(938, __VA_ARGS__) \ DO_937(MACRO, __VA_ARGS__) #define DO_939(MACRO, ...) \ MACRO(939, __VA_ARGS__) \ DO_938(MACRO, __VA_ARGS__) #define DO_940(MACRO, ...) \ MACRO(940, __VA_ARGS__) \ DO_939(MACRO, __VA_ARGS__) #define DO_941(MACRO, ...) \ MACRO(941, __VA_ARGS__) \ DO_940(MACRO, __VA_ARGS__) #define DO_942(MACRO, ...) \ MACRO(942, __VA_ARGS__) \ DO_941(MACRO, __VA_ARGS__) #define DO_943(MACRO, ...) \ MACRO(943, __VA_ARGS__) \ DO_942(MACRO, __VA_ARGS__) #define DO_944(MACRO, ...) \ MACRO(944, __VA_ARGS__) \ DO_943(MACRO, __VA_ARGS__) #define DO_945(MACRO, ...) \ MACRO(945, __VA_ARGS__) \ DO_944(MACRO, __VA_ARGS__) #define DO_946(MACRO, ...) \ MACRO(946, __VA_ARGS__) \ DO_945(MACRO, __VA_ARGS__) #define DO_947(MACRO, ...) \ MACRO(947, __VA_ARGS__) \ DO_946(MACRO, __VA_ARGS__) #define DO_948(MACRO, ...) \ MACRO(948, __VA_ARGS__) \ DO_947(MACRO, __VA_ARGS__) #define DO_949(MACRO, ...) \ MACRO(949, __VA_ARGS__) \ DO_948(MACRO, __VA_ARGS__) #define DO_950(MACRO, ...) \ MACRO(950, __VA_ARGS__) \ DO_949(MACRO, __VA_ARGS__) #define DO_951(MACRO, ...) \ MACRO(951, __VA_ARGS__) \ DO_950(MACRO, __VA_ARGS__) #define DO_952(MACRO, ...) \ MACRO(952, __VA_ARGS__) \ DO_951(MACRO, __VA_ARGS__) #define DO_953(MACRO, ...) \ MACRO(953, __VA_ARGS__) \ DO_952(MACRO, __VA_ARGS__) #define DO_954(MACRO, ...) \ MACRO(954, __VA_ARGS__) \ DO_953(MACRO, __VA_ARGS__) #define DO_955(MACRO, ...) \ MACRO(955, __VA_ARGS__) \ DO_954(MACRO, __VA_ARGS__) #define DO_956(MACRO, ...) \ MACRO(956, __VA_ARGS__) \ DO_955(MACRO, __VA_ARGS__) #define DO_957(MACRO, ...) \ MACRO(957, __VA_ARGS__) \ DO_956(MACRO, __VA_ARGS__) #define DO_958(MACRO, ...) \ MACRO(958, __VA_ARGS__) \ DO_957(MACRO, __VA_ARGS__) #define DO_959(MACRO, ...) \ MACRO(959, __VA_ARGS__) \ DO_958(MACRO, __VA_ARGS__) #define DO_960(MACRO, ...) \ MACRO(960, __VA_ARGS__) \ DO_959(MACRO, __VA_ARGS__) #define DO_961(MACRO, ...) \ MACRO(961, __VA_ARGS__) \ DO_960(MACRO, __VA_ARGS__) #define DO_962(MACRO, ...) \ MACRO(962, __VA_ARGS__) \ DO_961(MACRO, __VA_ARGS__) #define DO_963(MACRO, ...) \ MACRO(963, __VA_ARGS__) \ DO_962(MACRO, __VA_ARGS__) #define DO_964(MACRO, ...) \ MACRO(964, __VA_ARGS__) \ DO_963(MACRO, __VA_ARGS__) #define DO_965(MACRO, ...) \ MACRO(965, __VA_ARGS__) \ DO_964(MACRO, __VA_ARGS__) #define DO_966(MACRO, ...) \ MACRO(966, __VA_ARGS__) \ DO_965(MACRO, __VA_ARGS__) #define DO_967(MACRO, ...) \ MACRO(967, __VA_ARGS__) \ DO_966(MACRO, __VA_ARGS__) #define DO_968(MACRO, ...) \ MACRO(968, __VA_ARGS__) \ DO_967(MACRO, __VA_ARGS__) #define DO_969(MACRO, ...) \ MACRO(969, __VA_ARGS__) \ DO_968(MACRO, __VA_ARGS__) #define DO_970(MACRO, ...) \ MACRO(970, __VA_ARGS__) \ DO_969(MACRO, __VA_ARGS__) #define DO_971(MACRO, ...) \ MACRO(971, __VA_ARGS__) \ DO_970(MACRO, __VA_ARGS__) #define DO_972(MACRO, ...) \ MACRO(972, __VA_ARGS__) \ DO_971(MACRO, __VA_ARGS__) #define DO_973(MACRO, ...) \ MACRO(973, __VA_ARGS__) \ DO_972(MACRO, __VA_ARGS__) #define DO_974(MACRO, ...) \ MACRO(974, __VA_ARGS__) \ DO_973(MACRO, __VA_ARGS__) #define DO_975(MACRO, ...) \ MACRO(975, __VA_ARGS__) \ DO_974(MACRO, __VA_ARGS__) #define DO_976(MACRO, ...) \ MACRO(976, __VA_ARGS__) \ DO_975(MACRO, __VA_ARGS__) #define DO_977(MACRO, ...) \ MACRO(977, __VA_ARGS__) \ DO_976(MACRO, __VA_ARGS__) #define DO_978(MACRO, ...) \ MACRO(978, __VA_ARGS__) \ DO_977(MACRO, __VA_ARGS__) #define DO_979(MACRO, ...) \ MACRO(979, __VA_ARGS__) \ DO_978(MACRO, __VA_ARGS__) #define DO_980(MACRO, ...) \ MACRO(980, __VA_ARGS__) \ DO_979(MACRO, __VA_ARGS__) #define DO_981(MACRO, ...) \ MACRO(981, __VA_ARGS__) \ DO_980(MACRO, __VA_ARGS__) #define DO_982(MACRO, ...) \ MACRO(982, __VA_ARGS__) \ DO_981(MACRO, __VA_ARGS__) #define DO_983(MACRO, ...) \ MACRO(983, __VA_ARGS__) \ DO_982(MACRO, __VA_ARGS__) #define DO_984(MACRO, ...) \ MACRO(984, __VA_ARGS__) \ DO_983(MACRO, __VA_ARGS__) #define DO_985(MACRO, ...) \ MACRO(985, __VA_ARGS__) \ DO_984(MACRO, __VA_ARGS__) #define DO_986(MACRO, ...) \ MACRO(986, __VA_ARGS__) \ DO_985(MACRO, __VA_ARGS__) #define DO_987(MACRO, ...) \ MACRO(987, __VA_ARGS__) \ DO_986(MACRO, __VA_ARGS__) #define DO_988(MACRO, ...) \ MACRO(988, __VA_ARGS__) \ DO_987(MACRO, __VA_ARGS__) #define DO_989(MACRO, ...) \ MACRO(989, __VA_ARGS__) \ DO_988(MACRO, __VA_ARGS__) #define DO_990(MACRO, ...) \ MACRO(990, __VA_ARGS__) \ DO_989(MACRO, __VA_ARGS__) #define DO_991(MACRO, ...) \ MACRO(991, __VA_ARGS__) \ DO_990(MACRO, __VA_ARGS__) #define DO_992(MACRO, ...) \ MACRO(992, __VA_ARGS__) \ DO_991(MACRO, __VA_ARGS__) #define DO_993(MACRO, ...) \ MACRO(993, __VA_ARGS__) \ DO_992(MACRO, __VA_ARGS__) #define DO_994(MACRO, ...) \ MACRO(994, __VA_ARGS__) \ DO_993(MACRO, __VA_ARGS__) #define DO_995(MACRO, ...) \ MACRO(995, __VA_ARGS__) \ DO_994(MACRO, __VA_ARGS__) #define DO_996(MACRO, ...) \ MACRO(996, __VA_ARGS__) \ DO_995(MACRO, __VA_ARGS__) #define DO_997(MACRO, ...) \ MACRO(997, __VA_ARGS__) \ DO_996(MACRO, __VA_ARGS__) #define DO_998(MACRO, ...) \ MACRO(998, __VA_ARGS__) \ DO_997(MACRO, __VA_ARGS__) #define DO_999(MACRO, ...) \ MACRO(999, __VA_ARGS__) \ DO_998(MACRO, __VA_ARGS__) #define DO_1000(MACRO, ...) \ MACRO(1000, __VA_ARGS__) \ DO_999(MACRO, __VA_ARGS__) #define DO_1001(MACRO, ...) \ MACRO(1001, __VA_ARGS__) \ DO_1000(MACRO, __VA_ARGS__) #define DO_1002(MACRO, ...) \ MACRO(1002, __VA_ARGS__) \ DO_1001(MACRO, __VA_ARGS__) #define DO_1003(MACRO, ...) \ MACRO(1003, __VA_ARGS__) \ DO_1002(MACRO, __VA_ARGS__) #define DO_1004(MACRO, ...) \ MACRO(1004, __VA_ARGS__) \ DO_1003(MACRO, __VA_ARGS__) #define DO_1005(MACRO, ...) \ MACRO(1005, __VA_ARGS__) \ DO_1004(MACRO, __VA_ARGS__) #define DO_1006(MACRO, ...) \ MACRO(1006, __VA_ARGS__) \ DO_1005(MACRO, __VA_ARGS__) #define DO_1007(MACRO, ...) \ MACRO(1007, __VA_ARGS__) \ DO_1006(MACRO, __VA_ARGS__) #define DO_1008(MACRO, ...) \ MACRO(1008, __VA_ARGS__) \ DO_1007(MACRO, __VA_ARGS__) #define DO_1009(MACRO, ...) \ MACRO(1009, __VA_ARGS__) \ DO_1008(MACRO, __VA_ARGS__) #define DO_1010(MACRO, ...) \ MACRO(1010, __VA_ARGS__) \ DO_1009(MACRO, __VA_ARGS__) #define DO_1011(MACRO, ...) \ MACRO(1011, __VA_ARGS__) \ DO_1010(MACRO, __VA_ARGS__) #define DO_1012(MACRO, ...) \ MACRO(1012, __VA_ARGS__) \ DO_1011(MACRO, __VA_ARGS__) #define DO_1013(MACRO, ...) \ MACRO(1013, __VA_ARGS__) \ DO_1012(MACRO, __VA_ARGS__) #define DO_1014(MACRO, ...) \ MACRO(1014, __VA_ARGS__) \ DO_1013(MACRO, __VA_ARGS__) #define DO_1015(MACRO, ...) \ MACRO(1015, __VA_ARGS__) \ DO_1014(MACRO, __VA_ARGS__) #define DO_1016(MACRO, ...) \ MACRO(1016, __VA_ARGS__) \ DO_1015(MACRO, __VA_ARGS__) #define DO_1017(MACRO, ...) \ MACRO(1017, __VA_ARGS__) \ DO_1016(MACRO, __VA_ARGS__) #define DO_1018(MACRO, ...) \ MACRO(1018, __VA_ARGS__) \ DO_1017(MACRO, __VA_ARGS__) #define DO_1019(MACRO, ...) \ MACRO(1019, __VA_ARGS__) \ DO_1018(MACRO, __VA_ARGS__) #define DO_1020(MACRO, ...) \ MACRO(1020, __VA_ARGS__) \ DO_1019(MACRO, __VA_ARGS__) #define DO_1021(MACRO, ...) \ MACRO(1021, __VA_ARGS__) \ DO_1020(MACRO, __VA_ARGS__) #define DO_1022(MACRO, ...) \ MACRO(1022, __VA_ARGS__) \ DO_1021(MACRO, __VA_ARGS__) #define DO_1023(MACRO, ...) \ MACRO(1023, __VA_ARGS__) \ DO_1022(MACRO, __VA_ARGS__) #define DO_1024(MACRO, ...) \ MACRO(1024, __VA_ARGS__) \ DO_1023(MACRO, __VA_ARGS__) #define DO(TIMES, MACRO, ...) C2(DO_, TIMES)(MACRO, __VA_ARGS__) /* we need some sort of macro that does: IF(0, "true", "false") => "false" IF(1, "true", "false") => "true" IF(X, "true", "false") => "true" */ #define INTERNALIF(x) INTERNALIF##x #define INTERNALIF0 #define ISZERO(x) COUNT_ARG(INTERNALIF(x)) #define IF(condition, trueBranch, falseBranch) C2(IF,ISZERO(condition))(trueBranch, falseBranch) #define IF0(trueBranch, falseBranch) falseBranch #define IF1(trueBranch, falseBranch) trueBranch #define DEFINE_ENUMERATION_CONSTANT(x) x, /*DEFINE_ENUM goes to header*/ #define DEFINE_ENUM(enumName, ...) typedef enum C2(enumName, _TAG) { FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; \ extern const char* C2(enumName,Strings)(enumName value); \ extern int C2(enumName, _FromString)(const char* enumAsString, enumName* destination); #define DEFINE_ENUMERATION_CONSTANT_AS_WIDESTRING(x) C2(L, TOSTRING(x)) , #define DEFINE_ENUMERATION_CONSTANT_AS_STRING(x) TOSTRING(x) , /*DEFINE_ENUM_STRINGS goes to .c*/ #define DEFINE_ENUM_STRINGS(enumName, ...) const char* C2(enumName, StringStorage)[COUNT_ARG(__VA_ARGS__)] = {FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__)}; \ const char* C2(enumName,Strings)(enumName value) \ { \ if((int)value<0 || (int)value>=COUNT_ARG(__VA_ARGS__)) \ { \ /*this is an error case*/ \ return NULL; \ } \ else \ { \ return C2(enumName, StringStorage)[value]; \ } \ } \ int C2(enumName, _FromString)(const char* enumAsString, enumName* destination) \ { \ if( \ (enumAsString==NULL) || (destination==NULL) \ ) \ { \ return __FAILURE__; \ } \ else \ { \ size_t i; \ for(i=0;i=COUNT_ARG(__VA_ARGS__)) \ { \ /*this is an error case*/ \ return NULL; \ } \ else \ { \ return C2(enumName, StringStorage)[value]; \ } \ } #define ENUM_TO_STRING(enumName, enumValue) C2(enumName, Strings)(enumValue) #define STRING_TO_ENUM(stringValue, enumName, addressOfEnumVariable) C2(enumName, _FromString)(stringValue, addressOfEnumVariable) #define DEFINE_MICROMOCK_ENUM_TO_STRING(type, ...) MICROMOCK_ENUM_TO_STRING(type, FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT_AS_WIDESTRING, __VA_ARGS__)); #define EMPTY() #define MACRO_UTILS_DELAY(id) id EMPTY LPAREN ) #endif /*MACRO_UTILS_H*/ testmutex.h000066400000000000000000000013631362133436400365150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TESTMUTEX_H #define TESTMUTEX_H #ifdef _MSC_VER #ifdef __cplusplus extern "C" { #endif typedef void* TEST_MUTEX_HANDLE; extern TEST_MUTEX_HANDLE testmutex_create(void); extern int testmutex_acquire(TEST_MUTEX_HANDLE mutex); extern int testmutex_release(TEST_MUTEX_HANDLE mutex); extern void testmutex_destroy(TEST_MUTEX_HANDLE mutex); extern TEST_MUTEX_HANDLE testmutex_acquire_global_semaphore(void); extern int testmutex_release_global_semaphore(TEST_MUTEX_HANDLE semaphore); #ifdef __cplusplus } #endif #endif /* _MSC_VER */ #endif /*MICROMOCKTESTMUTEX_H*/ testrunnerswitcher.h000066400000000000000000000216431362133436400404400ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TESTRUNNERSWITCHER_H #define TESTRUNNERSWITCHER_H #include "macro_utils.h" #ifdef __cplusplus #include #else #include #include #endif #ifdef MBED_BUILD_TIMESTAMP #define USE_CTEST #endif typedef void* TEST_MUTEX_HANDLE; #define TEST_DEFINE_ENUM_TYPE(type, ...) TEST_ENUM_TYPE_HANDLER(type, FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT_AS_WIDESTRING, __VA_ARGS__)); #ifdef USE_CTEST #include "ctest.h" #define BEGIN_TEST_SUITE(name) CTEST_BEGIN_TEST_SUITE(name) #define END_TEST_SUITE(name) CTEST_END_TEST_SUITE(name) #define TEST_SUITE_INITIALIZE(name) CTEST_SUITE_INITIALIZE() #define TEST_SUITE_CLEANUP(name) CTEST_SUITE_CLEANUP() #define TEST_FUNCTION_INITIALIZE(name) CTEST_FUNCTION_INITIALIZE() #define TEST_FUNCTION_CLEANUP(name) CTEST_FUNCTION_CLEANUP() #define TEST_FUNCTION(name) CTEST_FUNCTION(name) #define ASSERT_ARE_EQUAL CTEST_ASSERT_ARE_EQUAL #define ASSERT_ARE_EQUAL_WITH_MSG CTEST_ASSERT_ARE_EQUAL_WITH_MSG #define ASSERT_ARE_NOT_EQUAL CTEST_ASSERT_ARE_NOT_EQUAL #define ASSERT_ARE_NOT_EQUAL_WITH_MSG CTEST_ASSERT_ARE_NOT_EQUAL_WITH_MSG #define ASSERT_FAIL CTEST_ASSERT_FAIL #define ASSERT_IS_NULL CTEST_ASSERT_IS_NULL #define ASSERT_IS_NULL_WITH_MSG CTEST_ASSERT_IS_NULL_WITH_MSG #define ASSERT_IS_NOT_NULL CTEST_ASSERT_IS_NOT_NULL #define ASSERT_IS_NOT_NULL_WITH_MSG CTEST_ASSERT_IS_NOT_NULL_WITH_MSG #define ASSERT_IS_TRUE CTEST_ASSERT_IS_TRUE #define ASSERT_IS_TRUE_WITH_MSG CTEST_ASSERT_IS_TRUE_WITH_MSG #define ASSERT_IS_FALSE CTEST_ASSERT_IS_FALSE #define ASSERT_IS_FALSE_WITH_MSG CTEST_ASSERT_IS_FALSE_WITH_MSG #define RUN_TEST_SUITE(...) CTEST_RUN_TEST_SUITE(__VA_ARGS__) #define TEST_MUTEX_CREATE() (TEST_MUTEX_HANDLE)1 // the strlen check is simply to shut the compiler up and not create a hell of #pragma warning suppress #define TEST_MUTEX_ACQUIRE(mutex) (strlen("a") == 0) #define TEST_MUTEX_RELEASE(mutex) #define TEST_MUTEX_DESTROY(mutex) #define TEST_INITIALIZE_MEMORY_DEBUG(semaphore) (void)(semaphore) #define TEST_DEINITIALIZE_MEMORY_DEBUG(semaphore) (void)(semaphore) #define TEST_ENUM_TYPE_HANDLER(EnumName, ...) \ const wchar_t *EnumName##_Strings[]= \ { \ __VA_ARGS__ \ }; \ static void EnumName##_ToString(char* dest, size_t bufferSize, EnumName enumValue) \ { \ (void)snprintf(dest, bufferSize, "%S", EnumName##_Strings[enumValue]); \ } \ static bool EnumName##_Compare(EnumName left, EnumName right) \ { \ return left != right; \ } #define TEST_USE_CTEST_FUNCTIONS_FOR_TYPE(my_type) #elif defined CPP_UNITTEST #ifdef _MSC_VER #pragma warning(disable:4505) #endif #include "CppUnitTest.h" #include "testmutex.h" using namespace Microsoft::VisualStudio::CppUnitTestFramework; typedef const char* char_ptr; typedef void* void_ptr; #ifdef CPPUNITTEST_SYMBOL extern "C" void CPPUNITTEST_SYMBOL(void) {} #endif #define BEGIN_TEST_SUITE(name) TEST_CLASS(name) { #define END_TEST_SUITE(name) }; #define TEST_SUITE_INITIALIZE(name) TEST_CLASS_INITIALIZE(name) #define TEST_SUITE_CLEANUP(name) TEST_CLASS_CLEANUP(name) #define TEST_FUNCTION_INITIALIZE(name) TEST_METHOD_INITIALIZE(name) #define TEST_FUNCTION_CLEANUP(name) TEST_METHOD_CLEANUP(name) #define TEST_FUNCTION(name) TEST_METHOD(name) #define ASSERT_ARE_EQUAL(type, A, B) Assert::AreEqual((type)(A), (type)(B)) #define ASSERT_ARE_EQUAL_WITH_MSG(type, A, B, message) Assert::AreEqual((type)(A), (type)(B), ToString(message).c_str()) #define ASSERT_ARE_NOT_EQUAL(type, A, B) Assert::AreNotEqual((type)(A), (type)(B)) #define ASSERT_ARE_NOT_EQUAL_WITH_MSG(type, A, B, message) Assert::AreNotEqual((type)(A), (type)(B), ToString(message).c_str()) #define ASSERT_FAIL(message) Assert::Fail(ToString(message).c_str()) #define ASSERT_IS_TRUE(expression) Assert::IsTrue(expression) #define ASSERT_IS_TRUE_WITH_MSG(expression, message) Assert::IsTrue(expression, ToString(message).c_str()) #define ASSERT_IS_FALSE(expression) Assert::IsFalse(expression) #define ASSERT_IS_FALSE_WITH_MSG(expression, message) Assert::IsFalse(expression, ToString(message).c_str()) #define ASSERT_IS_NOT_NULL(value) Assert::IsNotNull(value) #define ASSERT_IS_NOT_NULL_WITH_MSG(value, message) Assert::IsNotNull(value, ToString(message).c_str()) #define ASSERT_IS_NULL(value) Assert::IsNull(value) #define ASSERT_IS_NULL_WITH_MSG(value, message) Assert::IsNull(value, ToString(message).c_str()) #define RUN_TEST_SUITE(...) #define TEST_MUTEX_CREATE() testmutex_create() #define TEST_MUTEX_ACQUIRE(mutex) testmutex_acquire(mutex) #define TEST_MUTEX_RELEASE(mutex) testmutex_release(mutex) #define TEST_MUTEX_DESTROY(mutex) testmutex_destroy(mutex) #define TEST_INITIALIZE_MEMORY_DEBUG(semaphore) \ semaphore = testmutex_acquire_global_semaphore(); \ ASSERT_IS_NOT_NULL_WITH_MSG(semaphore, "Unable to acquire global semaphore"); #define TEST_DEINITIALIZE_MEMORY_DEBUG(semaphore) \ (void)testmutex_release_global_semaphore(semaphore);\ #define TEST_ENUM_TYPE_HANDLER(EnumName, ...) \ namespace Microsoft \ { \ namespace VisualStudio \ { \ namespace CppUnitTestFramework \ { \ static const wchar_t *EnumName##_Strings[]= \ { \ __VA_ARGS__ \ }; \ template <> std::wstring ToString < EnumName > (const EnumName & q) \ { \ if((size_t)q>=sizeof(EnumName##_Strings)/sizeof(EnumName##_Strings[0])) \ { \ return(L"out of range value for " L#EnumName); \ } \ else \ { \ return EnumName##_Strings[q]; \ } \ } \ } \ } \ }; #define TEST_USE_CTEST_FUNCTIONS_FOR_TYPE(my_type) \ namespace Microsoft \ { \ namespace VisualStudio \ { \ namespace CppUnitTestFramework \ { \ template<> \ inline std::wstring ToString(const my_type& value) \ { \ char temp_str[1024]; \ std::wstring result; \ if (C2(my_type,_ToString)(temp_str, sizeof(temp_str), value) != 0) \ { \ return L""; \ } \ else \ { \ int size_needed_in_chars = MultiByteToWideChar(CP_UTF8, 0, &temp_str[0], -1, NULL, 0); \ if (size_needed_in_chars == 0) \ { \ result = L""; \ } \ else \ { \ WCHAR* widechar_string = (WCHAR*)malloc(size_needed_in_chars * sizeof(WCHAR)); \ if (widechar_string == NULL) \ { \ result = L""; \ } \ else \ { \ if (MultiByteToWideChar(CP_UTF8, 0, temp_str, -1, widechar_string, size_needed_in_chars) == 0) \ { \ result = L""; \ } \ else \ { \ result = std::wstring(widechar_string); \ } \ free(widechar_string); \ } \ } \ } \ return result; \ } \ template<> \ static void Assert::AreEqual(const my_type& expected, const my_type& actual, const wchar_t* message, const __LineInfo* pLineInfo) \ { \ FailOnCondition((C2(my_type,_Compare)(expected, actual) == 0), EQUALS_MESSAGE(expected, actual, message), pLineInfo); \ } \ } \ } \ } \ /*because for some reason this is not defined by Visual Studio, it is defined here, so it is not multiplied in every single other unittest*/ namespace Microsoft { namespace VisualStudio { namespace CppUnitTestFramework { template<> inline std::wstring ToString(const int64_t& t) { RETURN_WIDE_STRING(t); } template<> inline std::wstring ToString(const uint16_t& t) { RETURN_WIDE_STRING(t); } } } } #else #error No test runner defined #endif #endif jenkins/000077500000000000000000000000001362133436400351675ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunnerlinux_c.sh000066400000000000000000000006601362133436400371660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/jenkins#!/bin/bash #set -o pipefail # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) log_dir=$build_root make_install= build_folder=$build_root"/cmake" rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON make --jobs=$(nproc) if [[ $make_install == 1 ]] ; then echo "Installing packaging" # install the package make install fi popd linux_c_gcc44.sh000066400000000000000000000000751362133436400401520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/jenkins#!/bin/bash #set -o pipefail # set -e ./jenkins/linux_c.sh osx_c.sh000066400000000000000000000007671362133436400366500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) build_folder=$build_root"/cmake" CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON cmake --build . -- --jobs=$CORES popd ubuntu_clang.sh000066400000000000000000000011571362133436400402150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) log_dir=$build_root make_install= build_folder=$build_root"/cmake" rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON -Drun_unittests:bool=ON cmake --build . -- --jobs=$(nproc) ctest -C "debug" -V if [[ $make_install == 1 ]] ; then echo "Installing packaging" # install the package make install fi popd :windows_c.cmd000066400000000000000000000026221362133436400376520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi rmdir /s /q %build-root%\cmake mkdir %build-root%\cmake if errorlevel 1 goto :eof set build-platform=Win32 :args-loop if "%1" equ "" goto args-done if "%1" equ "--platform" goto arg-build-platform call :usage && exit /b 1 :arg-build-platform shift if "%1" equ "" call :usage && exit /b 1 set build-platform=%1 if %build-platform% == x64 ( set CMAKE_DIR=shared-util_x64 ) else if %build-platform% == arm ( set CMAKE_DIR=shared-util_arm ) goto args-continue :args-continue shift goto args-loop :args-done cd %build-root%\cmake if %build-platform% == Win32 ( echo ***Running CMAKE for Win32*** cmake %build-root% if errorlevel 1 goto :eof ) else if %build-platform% == ARM ( echo ***Running CMAKE for ARM*** cmake %build-root% -G "Visual Studio 14 ARM" if errorlevel 1 goto :eof ) else ( echo ***Running CMAKE for Win64*** cmake %build-root% -G "Visual Studio 14 Win64" if errorlevel 1 goto :eof ) msbuild /m testrunnerswitcher.sln /p:Configuration=Release if errorlevel 1 goto :eof msbuild /m testrunnerswitcher.sln /p:Configuration=Debug if errorlevel 1 goto :eof ctest -C "debug" -V if errorlevel 1 goto :eof cd %build-root%windows_vs2008_c.cmd000066400000000000000000000035141362133436400406750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi @echo off set repo_root=%build-root%\.. rem // resolve to fully qualified path for %%i in ("%repo_root%") do set repo_root=%%~fi echo Build Root: %build-root% echo Repo Root: %repo_root% set CMAKE_DIR=testrunnerswitcher_win32 rem ----------------------------------------------------------------------------- rem -- build with CMAKE and run tests rem ----------------------------------------------------------------------------- echo CMAKE Output Path: %build-root%\cmake\%CMAKE_DIR% if EXIST %build-root%\cmake\%CMAKE_DIR% ( rmdir /s/q %build-root%\cmake\%CMAKE_DIR% rem no error checking ) echo %build-root%\cmake\%CMAKE_DIR% mkdir %build-root%\cmake\%CMAKE_DIR% rem no error checking pushd %build-root%\cmake\%CMAKE_DIR% echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:BOOL=ON -Duse_cppunittest:bool=OFF if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! call :_run-msbuild "Build" testrunnerswitcher.sln if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ctest -C "debug" -V if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd goto :eof rem ----------------------------------------------------------------------------- rem -- subroutines rem ----------------------------------------------------------------------------- :_run-msbuild rem // optionally override configuration|platform setlocal EnableExtensions set build-target= if "%~1" neq "Build" set "build-target=/t:%~1" msbuild /m %build-target% "/p:Configuration=Debug;Platform=Win32" %2 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof echo done windowsce_c.cmd000066400000000000000000000024061362133436400401620ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi rem ----------------------------------------------------------------------------- rem -- build solution with CMake rem ----------------------------------------------------------------------------- rmdir /s/q "%USERPROFILE%\cmake_ce8" rem no error checking mkdir "%USERPROFILE%\cmake_ce8" rem no error checking pushd "%USERPROFILE%\cmake_ce8" rem if you plan to use a different SDK you need to change SDKNAME to the name of your SDK. Ensure that this is also changed in the sample solutions iothub_client_sample_http, simplesample_http and remote_monitoring set SDKNAME=TORADEX_CE800 set PROCESSOR=arm cmake -DWINCE=TRUE -DCMAKE_SYSTEM_NAME=WindowsCE -DCMAKE_SYSTEM_VERSION=8.0 -DCMAKE_SYSTEM_PROCESSOR=%PROCESSOR% -DCMAKE_GENERATOR_TOOLSET=CE800 -DCMAKE_GENERATOR_PLATFORM=%SDKNAME% %build-root% if not %errorlevel%==0 exit /b %errorlevel% msbuild "%USERPROFILE%\cmake_ce8\testrunnerswitcher.sln if not %errorlevel%==0 exit /b %errorlevel% cd %build-root% readme.md000066400000000000000000000024321362133436400353060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunnerThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # testrunnerswitcher testrunnerswitcher is a simple library to switch test runners between azure-ctest (available at https://github.com/Azure/azure-ctest.git) and CppUnitTest. ## Setup - Clone azure-c-testrunnerswitcher by: ``` git clone --recursive https://github.com/Azure/azure-c-testrunnerswitcher.git ``` - Create a cmake folder under azure-c-testrunnerswitcher - Switch to the cmake folder and run cmake .. - Build the code for your platform (msbuild for Windows, make for Linux, etc.) ### Installation and Use Optionally, you may choose to install testrunnerswitcher on your machine: 1. Switch to the *cmake* folder and run ``` cmake --build . --target install ``` or Linux: ``` sudo make install ``` Windows: ``` msbuild /m INSTALL.vcxproj ``` 2. Use it in your project (if installed) ``` find_package(testrunnerswitcher REQUIRED CONFIG) target_link_library(yourlib testrunnerswitcher) ```src/000077500000000000000000000000001362133436400343155ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunnertestmutex.c000066400000000000000000000030371362133436400365260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testmutex.h" #ifdef _MSC_VER #include "windows.h" #define SEMAPHORE_HIGH_WATER 1000000 TEST_MUTEX_HANDLE testmutex_create(void) { return (TEST_MUTEX_HANDLE)CreateMutexW(NULL, FALSE, NULL); } int testmutex_acquire(TEST_MUTEX_HANDLE mutex) { return (WaitForSingleObject(mutex, INFINITE) == WAIT_OBJECT_0) ? 0 : 1; } void testmutex_destroy(TEST_MUTEX_HANDLE mutex) { (void)CloseHandle(mutex); } int testmutex_release(TEST_MUTEX_HANDLE mutex) { return ReleaseMutex(mutex); } TEST_MUTEX_HANDLE testmutex_acquire_global_semaphore(void) { TEST_MUTEX_HANDLE semaphore = CreateSemaphoreW(NULL, SEMAPHORE_HIGH_WATER, SEMAPHORE_HIGH_WATER, L"Global/MICROMOCK_DLL_BY_DLL"); if (semaphore != NULL) { if (WaitForSingleObject(semaphore, INFINITE) != WAIT_OBJECT_0) { CloseHandle(semaphore); semaphore = NULL; } } return semaphore; } int testmutex_release_global_semaphore(TEST_MUTEX_HANDLE semaphore) { LONG prev; int result; (void)ReleaseSemaphore(semaphore, 1, &prev); if (prev == SEMAPHORE_HIGH_WATER - 1) { (void)CloseHandle(semaphore); result = 1; } else { result = 0; } return result; } #else // XCode complains about a library with no exported functions extern void dummy_function_to_silence_compiler_is_never_called() { } #endif /* _MSC_VER */ tools/000077500000000000000000000000001362133436400346665ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunnerkick_jenkins.cmd000066400000000000000000000106511362133436400400200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/testrunner/tools@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set build-root=%current-path%\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM check that we have a valid argument if "%1" equ "" ( set jenkins_job=_integrate-into-develop ) else if /i "%1" equ "c" ( set jenkins_job=_integrate-into-develop-c-and-wrappers ) else if /i "%1" equ "csharp" ( set jenkins_job=_integrate-into-develop-csharp ) else if /i "%1" equ "java" ( set jenkins_job=_integrate-into-develop-java ) else if /i "%1" equ "node" ( set jenkins_job=_integrate-into-develop-node ) else ( echo Usage: echo kick_jenkins echo or echo "kick_jenkins c | csharp | java | node" exit /b 1 ) REM check that we have java handy call :checkExists java if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! REM check that jenkins-cli.jar is in the repository's tools folder if not exist %build-root%\tools\jenkins-cli.jar ( echo jenkins-cli does not exist echo Downloading from repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar powershell -Command "Invoke-WebRequest http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar -OutFile %build-root%\tools\jenkins-cli.jar" if not !ERRORLEVEL!==0 ( echo Failed downloading jenkins-cli.jar echo Use the following link to manually download it into the tools folder of your repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar exit /b 1 ) ) REM find current branch for /f "usebackq tokens=*" %%i in (`git symbolic-ref -q HEAD`) do set "current_branch_ref=%%i" if defined current_branch_ref set "current_branch=%current_branch_ref:refs/heads/=%" REM handle detached HEAD if not defined current_branch ( echo You're not on any branch! Aborting... goto :eof ) REM Must be on a topic branch when running this script set __exit=1 if not "%current_branch%"=="master" if not "%current_branch%"=="develop" set __exit=0 if %__exit%==1 ( echo You cannot call this script from 'develop' or 'master'. Change to a topic branch first. Aborting... goto :eof ) REM find tracking branch for /f "usebackq tokens=*" %%i in (`git rev-parse --symbolic-full-name --abbrev-ref @{u}`) do set "tracking_branch=%%i" if not defined tracking_branch ( echo Branch ^'%current_branch%^' is not tracking a remote branch! First try ^'git branch -u ^/^^' to set tracking info. Aborting... goto :eof ) for /f "usebackq tokens=*" %%i in (`git config branch.%current_branch%.remote`) do set "remote=%%i" if not defined remote ( REM should never happen... echo Cannot isolate remote name for tracking branch ^'%tracking_branch%^'! Aborting... goto :eof ) REM get the tracking branch name only e.g., origin/topic -> topic for /f "usebackq tokens=*" %%i in (`call echo %%tracking_branch:%remote%/^=%%`) do set "tracking_name=%%i" REM find repo url for /f "usebackq tokens=*" %%i in (`git ls-remote --heads --get-url %remote%`) do set "repo_url=%%i" if not defined repo_url ( echo Cannot find the remote repository URL! Aborting... goto :eof ) echo **************************************************************** echo commit_id: %current_branch% echo repo_url: %repo_url% echo remote: %remote% echo trackingN: %tracking_name% echo jenkinJob: %jenkins_job% echo **************************************************************** REM kick off the build! java -jar "%build-root%"\tools\jenkins-cli.jar -s http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/ build %jenkins_job% -p COMMIT_ID=%tracking_name% -p AZURE_REPO=%repo_url% -p BRANCH_TO_MERGE_TO=develop -s -v rem ----------------------------------------------------------------------------- rem -- done rem ----------------------------------------------------------------------------- goto :eof rem ----------------------------------------------------------------------------- rem -- helper subroutines rem ----------------------------------------------------------------------------- :checkExists where %~1 >nul 2>nul if not !ERRORLEVEL!==0 ( echo "%~1" not found. Please make sure that "%~1" is installed and available in the path. exit /b !ERRORLEVEL! ) goto :eof azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/000077500000000000000000000000001362133436400327325ustar00rootroot00000000000000.gitignore000066400000000000000000000000631362133436400346420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c#Typical cmake folder /cmake /build *.jar /.vscode.gitmodules000066400000000000000000000003271362133436400350320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c[submodule "deps/azure-ctest"] path = deps/ctest url = https://github.com/Azure/azure-ctest.git [submodule "deps/testrunner"] path = deps/testrunner url = https://github.com/Azure/azure-c-testrunnerswitcher.git CMakeLists.txt000066400000000000000000000106761362133436400354250ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if(TARGET umock_c) return() endif() option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF) option(run_int_tests "set run_int_tests to ON to run the integration tests (default is OFF)" OFF) option(use_installed_dependencies "set use_installed_dependencies to ON to use installed packages instead of building dependencies from submodules" OFF) option(use_cppunittest "set use_cppunittest to ON to build CppUnitTest tests on Windows (default is ON)" OFF) project(umock_c) set(UMOCK_C_VERSION 1.1.19) #Use solution folders. set_property(GLOBAL PROPERTY USE_FOLDERS ON) # Build with -fPIC always set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) # Build with -Werror if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4") elseif(UNIX) # LINUX OR APPLE set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror") endif() include (CTest) include (CheckIncludeFiles) # Add dependencies or submodules if use_installed_dependencies is OFF include(dependencies.cmake) set(umock_c_c_files ./src/umock_c.c ./src/umock_c_negative_tests.c ./src/umockalloc.c ./src/umockcall.c ./src/umockcallrecorder.c ./src/umocktypename.c ./src/umocktypes.c ./src/umocktypes_bool.c ./src/umocktypes_c.c ./src/umocktypes_stdint.c ./src/umocktypes_charptr.c ./src/umockcallpairs.c ./src/umockstring.c ./src/umockautoignoreargs.c ./src/umock_log.c ) set(umock_c_h_files ./inc/umock_c.h ./inc/umock_c_internal.h ./inc/umock_c_negative_tests.h ./inc/umockalloc.h ./inc/umockcall.h ./inc/umockcallrecorder.h ./inc/umocktypename.h ./inc/umocktypes.h ./inc/umocktypes_bool.h ./inc/umocktypes_c.h ./inc/umocktypes_stdint.h ./inc/umocktypes_charptr.h ./inc/umockcallpairs.h ./inc/umockstring.h ./inc/umockautoignoreargs.h ./inc/umock_log.h ) IF(WIN32) #windows needs this define add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Make warning as error add_definitions(/WX) ENDIF() add_library(umock_c ${umock_c_c_files} ${umock_c_h_files}) set_target_properties(umock_c PROPERTIES FOLDER "test_tools") #these are the include folders #the following "set" statetement exports across the project a global variable called UMOCK_C_INC_FOLDER that expands to whatever needs to included when using umock_c library set(UMOCK_C_INC_FOLDER ${CMAKE_CURRENT_LIST_DIR}/inc CACHE INTERNAL "this is what needs to be included if using umock_c lib" FORCE) include_directories(${UMOCK_C_INC_FOLDER} ${SHARED_UTIL_INC_FOLDER}) CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILES(stdbool.h HAVE_STDBOOL_H) if ((NOT HAVE_STDINT_H) OR (NOT HAVE_STDBOOL_H)) include_directories(${UMOCK_C_INC_FOLDER}/aux_inc) endif() include("configs/umock_cFunctions.cmake") if (${run_unittests} OR ${run_int_tests}) add_subdirectory(tests) endif() if(${use_installed_dependencies}) # Set CMAKE_INSTALL_* if not defined include(GNUInstallDirs) if(NOT DEFINED CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") endif() # Install UMock C set(package_location "cmake") install(TARGETS umock_c EXPORT umock_cTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}/../bin INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install(FILES ${umock_c_h_files} "./inc/umock_c_prod.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) include(CMakePackageConfigHelpers) write_basic_package_version_file( "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" VERSION ${UMOCK_C_VERSION} COMPATIBILITY SameMajorVersion ) configure_file("configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}Config.cmake" COPYONLY ) install(EXPORT umock_cTargets FILE "${PROJECT_NAME}Targets.cmake" DESTINATION ${package_location} ) install( FILES "configs/${PROJECT_NAME}Functions.cmake" "configs/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION ${package_location} ) endif() configs/000077500000000000000000000000001362133436400343035ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-cumock_cConfig.cmake000066400000000000000000000010661362133436400400560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. if(NOT ctest_FOUND) find_package(ctest REQUIRED CONFIG) endif() if(NOT testrunnerswitcher_FOUND) find_package(testrunnerswitcher REQUIRED CONFIG) endif() include("${CMAKE_CURRENT_LIST_DIR}/umock_cTargets.cmake") include("${CMAKE_CURRENT_LIST_DIR}/umock_cFunctions.cmake") get_target_property(UMOCK_C_INCLUDES umock_c INTERFACE_INCLUDE_DIRECTORIES) set(UMOCK_C_INCLUDES ${UMOCK_C_INCLUDES} CACHE INTERNAL "")umock_cFunctions.cmake000066400000000000000000000075541362133436400406310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/configs#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. function(umockc_windows_unittests_add_dll whatIsBuilding) link_directories(${whatIsBuilding}_dll $ENV{VCInstallDir}UnitTest/lib) add_library(${whatIsBuilding}_dll SHARED ${${whatIsBuilding}_test_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ) set_target_properties(${whatIsBuilding}_dll PROPERTIES FOLDER "tests/umockc_tests") target_include_directories(${whatIsBuilding}_dll PUBLIC ${sharedutil_include_directories} $ENV{VCInstallDir}UnitTest/include) target_compile_definitions(${whatIsBuilding}_dll PUBLIC -DCPP_UNITTEST) SET_SOURCE_FILES_PROPERTIES( ${${whatIsBuilding}_test_files} PROPERTIES LANGUAGE CXX ) target_link_libraries(${whatIsBuilding}_dll ctest testrunnerswitcher ${ARGN}) endfunction() function(umockc_windows_unittests_add_lib whatIsBuilding) link_directories(${whatIsBuilding}_lib $ENV{VCInstallDir}UnitTest/lib) add_library(${whatIsBuilding}_lib STATIC ${${whatIsBuilding}_test_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ) set_target_properties(${whatIsBuilding}_lib PROPERTIES FOLDER "tests/umockc_tests") target_include_directories(${whatIsBuilding}_lib PUBLIC ${sharedutil_include_directories}) target_compile_definitions(${whatIsBuilding}_lib PUBLIC -DUSE_CTEST) target_link_libraries(${whatIsBuilding}_lib ctest testrunnerswitcher ${ARGN}) endfunction() function(umockc_windows_unittests_add_exe whatIsBuilding) add_executable(${whatIsBuilding}_exe ${${whatIsBuilding}_test_files} ${${whatIsBuilding}_h_files} ${${whatIsBuilding}_c_files} ${CMAKE_CURRENT_LIST_DIR}/main.c ) set_target_properties(${whatIsBuilding}_exe PROPERTIES FOLDER "tests/umockc_tests") target_compile_definitions(${whatIsBuilding}_exe PUBLIC -DUSE_CTEST) target_include_directories(${whatIsBuilding}_exe PUBLIC ${sharedutil_include_directories}) target_link_libraries(${whatIsBuilding}_exe ctest testrunnerswitcher ${ARGN}) add_test(NAME ${whatIsBuilding} COMMAND ${whatIsBuilding}_exe) endfunction() function(umockc_build_test_artifacts whatIsBuilding use_gballoc) #the first argument is what is building #the second argument is whether the tests should be build with gballoc #defines or not #the following arguments are a list of libraries to link with if(${use_gballoc}) add_definitions(-DGB_MEASURE_MEMORY_FOR_THIS -DGB_DEBUG_ALLOC) else() endif() #setting #defines if(WIN32) add_definitions(-D_CRT_SECURE_NO_WARNINGS) else() endif() #setting includes set(sharedutil_include_directories ${MICROMOCK_INC_FOLDER} ${TESTRUNNERSWITCHER_INC_FOLDER} ${CTEST_INC_FOLDER} ${SAL_INC_FOLDER} ${SHARED_UTIL_INC_FOLDER} ${SHARED_UTIL_SRC_FOLDER}) if(WIN32) else() include_directories(${sharedutil_include_directories}) endif() #setting output type if(WIN32) if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) umockc_windows_unittests_add_exe(${whatIsBuilding} ${ARGN}) if (${use_cppunittest}) umockc_windows_unittests_add_dll(${whatIsBuilding} ${ARGN}) endif() endif() else() if( (("${whatIsBuilding}" MATCHES ".*ut.*") AND ${run_unittests}) OR (("${whatIsBuilding}" MATCHES ".*int.*") AND ${run_int_tests}) ) umockc_windows_unittests_add_exe(${whatIsBuilding} ${ARGN}) endif() endif() endfunction()dependencies.cmake000066400000000000000000000004741362133436400363100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. if(${use_installed_dependencies}) find_package(ctest REQUIRED CONFIG) find_package(testrunnerswitcher REQUIRED CONFIG) else() add_subdirectory(deps) endif()deps/000077500000000000000000000000001362133436400336065ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-cCMakeLists.txt000066400000000000000000000004441362133436400363500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/deps#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) if (${run_unittests} OR ${run_int_tests}) add_subdirectory(ctest) add_subdirectory(testrunner) endif()ctest/000077500000000000000000000000001362133436400347305ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/depstestrunner/000077500000000000000000000000001362133436400360175ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/depsdevdoc/000077500000000000000000000000001362133436400341175ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-cumock_c_lib_requirements_with_ids.md000066400000000000000000001224471362133436400434160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umock_c # Overview umock_c is a C mocking library that exposes APIs to allow: - defining mock functions, - recording expected calls - comparing expected calls with actual calls. On top of the basic functionality, additional convenience features like modifiers on expected calls are provided. # Simple example A test written with umock_c looks like below: Let's assume unit A depends on unit B. unit B has a function called test_dependency_1_arg. In unit B's header one would write: ```c #include "umock_prod.h" MOCKABLE_FUNCTION(int, test_dependency_1_arg, int, a); ``` Let's assume unit A has a function called function_under_test. ```c int function_under_test(); { int result = test_dependency_1_arg(x); return result; } ``` A test that checks that function_under_test calls its dependency and injects a return value, while ignoring all arguments on the call looks like this: ```c TEST_FUNCTION(my_first_test) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(44) .IgnoreAllArguments(); // act int result = function_under_test(); // assert ASSERT_ARE_EQUAL(int, 44, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } ``` # Exposed API (umock_c.h) ```c #define UMOCK_C_ERROR_CODE_VALUES \ UMOCK_C_ARG_INDEX_OUT_OF_RANGE, \ UMOCK_C_MALLOC_ERROR, \ UMOCK_C_INVALID_ARGUMENT_BUFFER, \ UMOCK_C_COMPARE_CALL_ERROR, \ UMOCK_C_RESET_CALLS_ERROR, \ UMOCK_C_CAPTURE_RETURN_ALREADY_USED, \ UMOCK_C_NULL_ARGUMENT, \ UMOCK_C_INVALID_PAIRED_CALLS, \ UMOCK_C_COPY_ARGUMENT_ERROR, \ UMOCK_C_ERROR DEFINE_ENUM(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) typedef void(*ON_UMOCK_C_ERROR)(UMOCK_C_ERROR_CODE error_code); #define IGNORED_PTR_ARG (NULL) #define IGNORED_NUM_ARG (0) #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ ... #define REGISTER_GLOBAL_MOCK_HOOK(mock_function, mock_hook_function) \ ... #define REGISTER_GLOBAL_MOCK_RETURN(mock_function, return_value) \ ... #define REGISTER_GLOBAL_MOCK_FAIL_RETURN(mock_function, fail_return_value) \ ... #define REGISTER_GLOBAL_MOCK_RETURNS(mock_function, return_value, fail_return_value) \ ... ... #define STRICT_EXPECTED_CALL(call) \ ... #define EXPECTED_CALL(call) \ ... extern int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); extern void umock_c_deinit(void); extern int umock_c_reset_all_calls(void); extern const char* umock_c_get_actual_calls(void); extern const char* umock_c_get_expected_calls(void); ``` ## Mock definitions API ### MOCKABLE_FUNCTION ```c MOCKABLE_FUNCTION(modifiers, result, function, ...) ``` XX**SRS_UMOCK_C_LIB_01_001: [** MOCKABLE_FUNCTION shall be used to wrap function definition allowing the user to declare a function that can be mocked. **]** XX**SRS_UMOCK_C_LIB_01_002: [** The macro shall generate a function signature in case ENABLE_MOCKS is not defined. **]** Example: ```c MOCKABLE_FUNCTION(FAR, int, test_function, int, arg1) ``` should generate for production code: ```c int FAR test_function(int arg1); ``` ### MOCK_FUNCTION_WITH_CODE XX**SRS_UMOCK_C_LIB_01_150: [** MOCK_FUNCTION_WITH_CODE shall define a mock function and allow the user to embed code between this define and a MOCK_FUNCTION_END call. **]** ```c MOCK_FUNCTION_WITH_CODE(, void, test_mock_function_with_code_1_arg, int, a); int some_value = 42; /* more code here */ MOCK_FUNCTION_END() ``` ### ENABLE_MOCKS XX**SRS_UMOCK_C_LIB_01_004: [** If ENABLE_MOCKS is defined, MOCKABLE_FUNCTION shall generate the declaration of the function and code for the mocked function, thus allowing setting up of expectations in test functions. **]** XX**SRS_UMOCK_C_LIB_01_005: [** If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function. **]** ENABLE_MOCKS should be used in the translation unit that contains the tests just before including the headers for all the units that the code under test depends on. Example: ```c #include // ... other various includes #define ENABLE_MOCKS #include "test_dependency.h" // ... tests ``` Note that it is possible (and sometimes necessary) to undefine ENABLE_MOCKS: ```c #include // ... other various includes #define ENABLE_MOCKS #include "test_dependency.h" #undef ENABLE_MOCKS #include "unit_under_test.h" // ... tests ``` ### ENABLE_MOCK_FILTERING `ENABLE_MOCK_FILTERING` is a define that allows specifying that only some of the functions that are mockable be actually mocked. This is usefull when it is not desired to generate mock functions for all the functions declared in a header. This is specially useful if a header contains a huge number of functions and only a small subset of those are actually used by the module under test. Be nice to the framework, say please! Each of the functions that are to be mocked have to be flagged by a #define, like below: ```c #define please_mock_the_mocked_one MOCK_ENABLED ``` ### UMOCK_STATIC If you intend to add several units under test into the same test library, the inclusion of the same dependency will result in symbol collisions of the mock functions. A way to get around this is to define UMOCK_STATIC as follows ```c #include // ... other various includes // enable emitting static mocks #define UMOCK_STATIC static #define ENABLE_MOCKS #include "test_dependency.h" #undef ENABLE_MOCKS #include "unit_under_test.h" #define ENABLE_MOCKS // include unit under test source to make it see static mocks #include "unit_under_test.c" // ... tests ``` before including dependencies. This will cause MOCK_FUNCTION macro to generate static mocks, which avoids symbol collisions if the dependency is included in other unit test .c files in the same library. Using this technique, it is however also important to #include the unit under test source into the unit test compilation unit, so as to make it able to see the generated mocks as shown in above code sample. ## umock init/deinit ### umock_c_init ```c int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); ``` umock_c_init is needed before performing any action related to umock_c calls (or registering any types). XX**SRS_UMOCK_C_LIB_01_006: [** umock_c_init shall initialize umock_c. **]** XX**SRS_UMOCK_C_LIB_01_007: [** umock_c_init called if already initialized shall fail and return a non-zero value. **]** XX**SRS_UMOCK_C_LIB_01_008: [** umock_c_init shall initialize the umock supported types (C native types). **]** XX**SRS_UMOCK_C_LIB_01_009: [** on_umock_c_error can be NULL. **]** XX**SRS_UMOCK_C_LIB_01_010: [** If on_umock_c_error is non-NULL it shall be saved for later use (to be invoked whenever an umock_c error needs to be signaled to the user). **]** ### umock_c_deinit ```c void umock_c_deinit(void); ``` XX**SRS_UMOCK_C_LIB_01_011: [** umock_c_deinit shall free all umock_c used resources. **]** XX**SRS_UMOCK_C_LIB_01_012: [** If umock_c was not initialized, umock_c_deinit shall do nothing. **]** ## Expected calls recording API ### STRICT_EXPECTED_CALL ```c STRICT_EXPECTED_CALL(call) ``` XX**SRS_UMOCK_C_LIB_01_013: [** STRICT_EXPECTED_CALL shall record that a certain call is expected. **]** XX**SRS_UMOCK_C_LIB_01_014: [** For each argument the argument value shall be stored for later comparison with actual calls. **]** XX**SRS_UMOCK_C_LIB_01_015: [** The call argument shall be the complete function invocation. **]** Examples: ```c STRICT_EXPECTED_CALL(test_dependency_1_arg(42)); STRICT_EXPECTED_CALL(test_dependency_string("test")); ``` ### EXPECTED_CALL ```c EXPECTED_CALL(call) ``` XX**SRS_UMOCK_C_LIB_01_016: [** EXPECTED_CALL shall record that a certain call is expected. **]** XX**SRS_UMOCK_C_LIB_01_017: [** No arguments shall be saved by default, unless other modifiers state it. **]** XX**SRS_UMOCK_C_LIB_01_018: [** The call argument shall be the complete function invocation. **]** Example: ```c EXPECTED_CALL(test_dependency_1_arg(42)); ``` ## Call comparison API ### umock_c_reset_all_calls ```c void umock_c_reset_all_calls(void); ``` **SRS_UMOCK_C_LIB_01_019: [** umock_c_reset_all_calls shall reset all calls (actual and expected). **]** **SRS_UMOCK_C_LIB_01_021: [** In case of any error, umock_c_reset_all_calls shall indicate the error through a call to the on_error callback. **]** ### umock_c_get_expected_calls ```c const char* umock_c_get_expected_calls(void); ``` **SRS_UMOCK_C_LIB_01_022: [** umock_c_get_expected_calls shall return all the calls that were expected, but were not fulfilled. **]** **SRS_UMOCK_C_LIB_01_023: [** For each call, the format shall be "functionName(argument 1 value, ...)". **]** **SRS_UMOCK_C_LIB_01_024: [** Each call shall be enclosed in "[]". **]** Example: For a call with the signature: ```c int test_dependency_2_args(int a, int b) ``` if an expected call was recorded: ```c STRICT_EXPECTED_CALL(test_dependency_2_args(42, 1)); ``` umock_c_get_expected_calls would return: ```c "[test_dependency_2_args(42,1)]" ``` ### umock_c_get_actual_calls ```c const char* umock_c_get_actual_calls(void); ``` **SRS_UMOCK_C_LIB_01_025: [** umock_c_get_actual_calls shall return all the actual calls that were not matched to expected calls. **]** **SRS_UMOCK_C_LIB_01_026: [** For each call, the format shall be "functionName(argument 1 value, ...)". **]** **SRS_UMOCK_C_LIB_01_027: [** Each call shall be enclosed in "[]". **]** Example: For a call with the signature: ```c int test_dependency_2_args(int a, int b) ``` if an actual call was recorded: ```c test_dependency_2_args(42, 2); ``` umock_c_get_actual_calls would return: ```c "[test_dependency_2_args(42,2)]" ``` ### Call comparison rules XX**SRS_UMOCK_C_LIB_01_115: [** umock_c shall compare calls in order. **]** That means that "[A()][B()]" is different than "[B()][A()]". XX**SRS_UMOCK_C_LIB_01_136: [** When multiple return values are set for a mock function by using different means (such as SetReturn), the following order shall be in effect: **]** XX**SRS_UMOCK_C_LIB_01_137: [** - If a return value has been specified for an expected call then that value shall be returned. **]** XX**SRS_UMOCK_C_LIB_01_138: [** - If a global mock hook has been specified then it shall be called and its result returned. **]** XX**SRS_UMOCK_C_LIB_01_139: [** - If a global return value has been specified then it shall be returned. **]** XX**SRS_UMOCK_C_LIB_01_140: [** - Otherwise the value of a static variable of the same type as the return type shall be returned. **]** XX**SRS_UMOCK_C_LIB_01_148: [** If call comparison fails an error shall be indicated by calling the error callback with UMOCK_C_COMPARE_CALL_ERROR. **]** ## Supported types ### Out of the box **SRS_UMOCK_C_LIB_01_144: [** Out of the box umock_c shall support the following types through the header umocktypes_c.h: **]** - **SRS_UMOCK_C_LIB_01_028: [** char **]** - **SRS_UMOCK_C_LIB_01_029: [** unsigned char **]** - **SRS_UMOCK_C_LIB_01_030: [** short **]** - **SRS_UMOCK_C_LIB_01_031: [** unsigned short **]** - **SRS_UMOCK_C_LIB_01_032: [** int **]** - **SRS_UMOCK_C_LIB_01_033: [** unsigned int **]** - **SRS_UMOCK_C_LIB_01_034: [** long **]** - **SRS_UMOCK_C_LIB_01_035: [** unsigned long **]** - **SRS_UMOCK_C_LIB_01_036: [** long long **]** - **SRS_UMOCK_C_LIB_01_037: [** unsigned long long **]** - **SRS_UMOCK_C_LIB_01_038: [** float **]** - **SRS_UMOCK_C_LIB_01_039: [** double **]** - **SRS_UMOCK_C_LIB_01_040: [** long double **]** - **SRS_UMOCK_C_LIB_01_041: [** size_t **]** - **SRS_UMOCK_C_LIB_01_151: [** void\* **]** - **SRS_UMOCK_C_LIB_01_152: [** const void\* **]** ### Pointer types **SRS_UMOCK_C_LIB_01_153: [** If no custom handler has beed registered for a pointer type, it shall be trated as void*. **]** ### Custom types **SRS_UMOCK_C_LIB_01_045: [** Custom types, like structures shall be supported by allowing the user to define a set of functions that can be used by umock_c to operate with these types. **]** Five functions shall be provided to umock_c: - **SRS_UMOCK_C_LIB_01_046: [** A stringify function. **]** **SRS_UMOCK_C_LIB_01_047: [** This function shall return the string representation of a value of the given type. **]** - **SRS_UMOCK_C_LIB_01_048: [** An are_equal function. **]** **SRS_UMOCK_C_LIB_01_049: [** This function shall compare 2 values of the given type and return an int indicating whether they are equal (1 means equal, 0 means different). **]** - **SRS_UMOCK_C_LIB_01_050: [** A copy function. **]** **SRS_UMOCK_C_LIB_01_051: [** This function shall make a copy of a value for the given type. **]** - **SRS_UMOCK_C_LIB_01_052: [** A free function. **]** **SRS_UMOCK_C_LIB_01_053: [** This function shall free a copied value. **]** ### #umockvalue_stringify_type ```c char* umockvalue_stringify_{type}(const {type}* value) ``` A stringify function shall allocate using malloc a char\* and fill it with a string representation of value. If any error is encountered during building the string representation, umockvalue_stringify_type shall return NULL. Example: ```c char* umockvalue_stringify_int(const int* value) { char* result; if (value == NULL) { result = NULL; } else { char temp_buffer[32]; int length = sprintf(temp_buffer, "%d", *value); if (length < 0) { result = NULL; } else { result = (char*)malloc(length + 1); if (result != NULL) { memcpy(result, temp_buffer, length + 1); } } } return result; } ``` ### #umockvalue_are_equal_type ```c int umockvalue_are_equal_{type}(const {type}* left, const {type}* right) ``` The umockvalue_are_equal_type function shall return 1 if the 2 values are equal and 0 if they are not. If both left and right are NULL, umockvalue_are_equal_type shall return 1. If only one of left and right is NULL, umockvalue_are_equal_type shall return 0. Example: ```c int umockvalue_are_equal_int(const int* left, const int* right) { int result; if (left == right) { result = 1; } else if ((left == NULL) || (right == NULL)) { result = 0; } else { result = ((*left) == (*right)) ? 1 : 0; } return result; } ``` ### #umockvalue_copy_type ```c int umockvalue_copy_{type}({type}* destination, const {type}* source) ``` The umockvalue_copy_type function shall copy the value from source to destination. On success umockvalue_copy_type shall return 0. If any of the arguments is NULL, umockvalue_copy_type shall return a non-zero value. If any error occurs during copying the value, umockvalue_copy_type shall return a non-zero value. Example: ```c int umockvalue_copy_int(int* destination, const int* source) { int result; if ((destination == NULL) || (source == NULL)) { result = __LINE__; } else { *destination = *source; result = 0; } return result; } ``` ### #umockvalue_free_type ```c void umockvalue_free_{type}({type}* value) ``` The umockvalue_free_type function shall free a value previously copied using umockvalue_copy_type. If value is NULL, no free shall be performed. Example: ```c void umockvalue_free_int(int* value) { /* no free required for int */ } ``` ### Custom enum types ### #IMPLEMENT_UMOCK_C_ENUM_TYPE ```c IMPLEMENT_UMOCK_C_ENUM_TYPE(type, ...) ``` XX**SRS_UMOCK_C_LIB_01_179: [** IMPLEMENT_UMOCK_C_ENUM_TYPE shall implement umock_c handlers for an enum type. **]** XX**SRS_UMOCK_C_LIB_01_180: [** The variable arguments are a list making up the enum values. **]** XX**SRS_UMOCK_C_LIB_01_181: [** If a value that is not part of the enum is used, it shall be treated as an int value. **]** Note: IMPLEMENT_UMOCK_C_ENUM_TYPE only generates the handlers, registering the handlers still has to be done by using the macro REGISTER_UMOCK_VALUE_TYPE. Example: ```c IMPLEMENT_UMOCK_C_ENUM_TYPE(my_enum, enum_value1, enum_value2) ``` This provides the handlers (stringify, are_equal, etc.) for the below C enum: ```c typedef enum my_enum_tag { enum_value1, enum_value2 } my_enum ``` ### Type names XX**SRS_UMOCK_C_LIB_01_145: [** Since umock_c needs to maintain a list of registered types, the following rules shall be applied: **]** XX**SRS_UMOCK_C_LIB_01_146: [** Each type shall be normalized to a form where all extra spaces are removed. **]** XX**SRS_UMOCK_C_LIB_01_147: [** Type names are case sensitive. **]** ### #REGISTER_UMOCK_VALUE_TYPE ```c REGISTER_UMOCK_VALUE_TYPE(value_type, stringify_func, are_equal_func, copy_func, free_func) ``` **SRS_UMOCK_C_LIB_01_065: [** REGISTER_UMOCK_VALUE_TYPE shall register the type identified by value_type to be usable by umock_c for argument and return types and instruct umock_c which functions to use for getting the stringify, are_equal, copy and free. **]** Example: ```c REGISTER_UMOCK_VALUE_TYPE(TEST_STRUCT*, umockvalue_stringify_TEST_STRUCT_ptr, umockvalue_are_equal_TEST_STRUCT_ptr, umockvalue_copy_TEST_STRUCT_ptr, umockvalue_free_TEST_STRUCT_ptr); ``` **SRS_UMOCK_C_LIB_01_066: [** If only the value_type is specified in the macro invocation then the stringify, are_equal, copy and free function names shall be automatically derived from the type as: umockvalue_stringify_value_type, umockvalue_are_equal_value_type, umockvalue_copy_value_type, umockvalue_free_value_type. **]** Example: ```c REGISTER_UMOCK_VALUE_TYPE(TEST_STRUCT); ``` X**SRS_UMOCK_C_LIB_01_197: [** If REGISTER_UMOCK_VALUE_TYPE fails, the on_error callback shall be called with UMOCK_C_REGISTER_TYPE_FAILED. **]** ### #REGISTER_UMOCK_ALIAS_TYPE ```c REGISTER_UMOCK_ALIAS_TYPE(value_type, is_value_type) ``` X**SRS_UMOCK_C_LIB_01_149: [** REGISTER_UMOCK_ALIAS_TYPE registers a new alias type for another type. **]** That means that the handlers used for is_value_type will also be used for the new alias value_type. X**SRS_UMOCK_C_LIB_01_198: [** If REGISTER_UMOCK_ALIAS_TYPE fails, the on_error callback shall be called with UMOCK_C_REGISTER_TYPE_FAILED. **]** ### Extra optional C types ### #umockvalue_charptr XX**SRS_UMOCK_C_LIB_01_067: [** char\* and const char\* shall be supported out of the box through a separate header, umockvalue_charptr.h. **]** In order to enable the usage of char\*, the function umockvalue_charptr_register_types can be used in the test suite init. XX**SRS_UMOCK_C_LIB_01_069: [** The signature shall be: ```c int umockvalue_charptr_register_types(void); ``` **]** umockvalue_charptr_register_types returns 0 on success and non-zero on failure. ### #umockvalue_stdint **SRS_UMOCK_C_LIB_01_071: [** The types in stdint.h shall be supported out of the box by including umockvalue_stdint.h. **]** **SRS_UMOCK_C_LIB_01_072: [** In order to enable the usage of stdint types, the function umockvalue_stdint_register_types shall be used in the test suite init. **]** ```c int umockvalue_stdint_register_types(void); ``` umockvalue_stdint_register_types returns 0 on success and non-zero on failure. ## Call modifiers XX**SRS_UMOCK_C_LIB_01_074: [** When an expected call is recorded a call modifier interface in the form of a structure containing function pointers shall be returned to the caller. **]** That allows constructs like: ```c STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(44) .IgnoreAllArguments(); ``` Note that each modifier function shall return a full modifier structure that allows chaining further call modifiers. XX**SRS_UMOCK_C_LIB_01_075: [** The last modifier in a chain overrides previous modifiers if any collision occurs. **]** Example: A ValidateAllArguments after a previous IgnoreAllArgument will still validate all arguments. ### IgnoreAllArguments(void) XX**SRS_UMOCK_C_LIB_01_076: [** The IgnoreAllArguments call modifier shall record that for that specific call all arguments will be ignored for that specific call. **]** X**SRS_UMOCK_C_LIB_01_127: [** IgnoreAllArguments shall only be available for mock functions that have arguments. **]** ### ValidateAllArguments(void) XX**SRS_UMOCK_C_LIB_01_077: [** The ValidateAllArguments call modifier shall record that for that specific call all arguments will be validated. **]** X**SRS_UMOCK_C_LIB_01_126: [** ValidateAllArguments shall only be available for mock functions that have arguments. **]** ### IgnoreArgument_{arg_name}(void) XX**SRS_UMOCK_C_LIB_01_078: [** The IgnoreArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be ignored for that specific call. **]** X**SRS_UMOCK_C_LIB_01_125: [** IgnoreArgument_{arg_name} shall only be available for mock functions that have arguments. **]** ### ValidateArgument_{arg_name}(void) XX**SRS_UMOCK_C_LIB_01_079: [** The ValidateArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be validated for that specific call. **]** X**SRS_UMOCK_C_LIB_01_124: [** ValidateArgument_{arg_name} shall only be available for mock functions that have arguments. **]** ### IgnoreArgument(size_t index) XX**SRS_UMOCK_C_LIB_01_080: [** The IgnoreArgument call modifier shall record that the indexth argument will be ignored for that specific call. **]** XX**SRS_UMOCK_C_LIB_01_081: [** If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. **]** X**SRS_UMOCK_C_LIB_01_123: [** IgnoreArgument shall only be available for mock functions that have arguments. **]** ### ValidateArgument(size_t index) XX**SRS_UMOCK_C_LIB_01_082: [** The ValidateArgument call modifier shall record that the indexth argument will be validated for that specific call. **]** XX**SRS_UMOCK_C_LIB_01_083: [** If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. **]** X**SRS_UMOCK_C_LIB_01_122: [** ValidateArgument shall only be available for mock functions that have arguments. **]** ### SetReturn(return_type result) XX**SRS_UMOCK_C_LIB_01_084: [** The SetReturn call modifier shall record that when an actual call is matched with the specific expected call, it shall return the result value to the code under test. **]** X**SRS_UMOCK_C_LIB_01_121: [** SetReturn shall only be available if the return type is not void. **]** ### SetFailReturn(return_type result) **SRS_UMOCK_C_LIB_01_085: [** The SetFailReturn call modifier shall record a fail return value. **]** The fail return value can be recorded for more advanced features that would require failing or succeeding certain calls based on decisions made at runtime. X**SRS_UMOCK_C_LIB_01_120: [** SetFailReturn shall only be available if the return type is not void. **]** ### CopyOutArgumentBuffer(size_t index, const void* bytes, size_t length) XX**SRS_UMOCK_C_LIB_01_087: [** The CopyOutArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. **]** XX**SRS_UMOCK_C_LIB_01_088: [** The memory shall be copied. **]** XX**SRS_UMOCK_C_LIB_01_133: [** If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. **]** XX**SRS_UMOCK_C_LIB_01_089: [** The buffers for previous CopyOutArgumentBuffer calls shall be freed. **]** **SRS_UMOCK_C_LIB_01_090: [** CopyOutArgumentBuffer shall only be applicable to pointer types. **]** XX**SRS_UMOCK_C_LIB_01_091: [** If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. **]** XX**SRS_UMOCK_C_LIB_01_092: [** If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. **]** XX**SRS_UMOCK_C_LIB_01_116: [** The argument targetted by CopyOutArgumentBuffer shall also be marked as ignored. **]** **SRS_UMOCK_C_LIB_01_117: [** If any memory allocation error occurs, umock_c shall raise an error with the code UMOCK_C_MALLOC_ERROR. **]** **SRS_UMOCK_C_LIB_01_118: [** If any other error occurs, umock_c shall raise an error with the code UMOCK_C_ERROR. **]** X**SRS_UMOCK_C_LIB_01_119: [** CopyOutArgumentBuffer shall only be available for mock functions that have arguments. **]** ### CopyOutArgumentBuffer_{arg_name}(const void* bytes, size_t length) XX**SRS_UMOCK_C_LIB_01_154: [** The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. **]** XX**SRS_UMOCK_C_LIB_01_155: [** The memory shall be copied. **]** XX**SRS_UMOCK_C_LIB_01_156: [** If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. **]** XX**SRS_UMOCK_C_LIB_01_163: [** The buffers for previous CopyOutArgumentBuffer calls shall be freed. **]** **SRS_UMOCK_C_LIB_01_157: [** CopyOutArgumentBuffer_{arg_name} shall only be applicable to pointer types. **]** XX**SRS_UMOCK_C_LIB_01_158: [** If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. **]** XX**SRS_UMOCK_C_LIB_01_159: [** The argument targetted by CopyOutArgumentBuffer_{arg_name} shall also be marked as ignored. **]** **SRS_UMOCK_C_LIB_01_160: [** If any memory allocation error occurs, umock_c shall raise an error with the code UMOCK_C_MALLOC_ERROR. **]** **SRS_UMOCK_C_LIB_01_161: [** If any other error occurs, umock_c shall raise an error with the code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_LIB_01_162: [** CopyOutArgumentBuffer_{arg_name} shall only be available for mock functions that have arguments. **]** ### CopyOutArgument(arg_type value) **SRS_UMOCK_C_LIB_01_093: [** The CopyOutArgument call modifier shall copy an argument value to be injected as an out argument value when the code under test calls the mock function. **]** **SRS_UMOCK_C_LIB_01_094: [** CopyOutArgument shall only be applicable to pointer types. **]** X**SRS_UMOCK_C_LIB_01_128: [** CopyOutArgument shall only be available for mock functions that have arguments. **]** ### ValidateArgumentBuffer(size_t index, const void* bytes, size_t length) XX**SRS_UMOCK_C_LIB_01_095: [** The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function. **]** XX**SRS_UMOCK_C_LIB_01_096: [** If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument. **]** XX**SRS_UMOCK_C_LIB_01_097: [** ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument. **]** XX**SRS_UMOCK_C_LIB_01_131: [** The memory pointed by bytes shall be copied. **]** XX**SRS_UMOCK_C_LIB_01_132: [** If several calls to ValidateArgumentBuffer are made, only the last buffer shall be kept. **]** XX**SRS_UMOCK_C_LIB_01_130: [** The buffers for previous ValidateArgumentBuffer calls shall be freed. **]** **SRS_UMOCK_C_LIB_01_098: [** ValidateArgumentBuffer shall only be applicable to pointer types. **]** XX**SRS_UMOCK_C_LIB_01_099: [** If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. **]** XX**SRS_UMOCK_C_LIB_01_100: [** If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. **]** X**SRS_UMOCK_C_LIB_01_129: [** ValidateArgumentBuffer shall only be available for mock functions that have arguments. **]** ### IgnoreAllCalls(void) XX**SRS_UMOCK_C_LIB_01_101: [** The IgnoreAllCalls call modifier shall record that all calls matching the expected call shall be ignored. **]** XX**SRS_UMOCK_C_LIB_01_208: [** If no matching call occurs no missing call shall be reported. **]** XX**SRS_UMOCK_C_LIB_01_102: [** If multiple matching actual calls occur no unexpected calls shall be reported. **]** XX**SRS_UMOCK_C_LIB_01_103: [** The call matching shall be done taking into account arguments and call modifiers referring to arguments. **]** ### CaptureReturn(return_type* captured_return_value) XX**SRS_UMOCK_C_LIB_01_179: [** The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. **]** XX**SRS_UMOCK_C_LIB_01_180: [** If CaptureReturn is called multiple times for the same call, an error shall be indicated with the code UMOCK_C_CAPTURE_RETURN_ALREADY_USED. **]** XX**SRS_UMOCK_C_LIB_01_182: [** If captured_return_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. **]** **SRS_UMOCK_C_LIB_01_181: [** CaptureReturn shall only be available if the return type is not void. **]** Example: ```c TEST_FUNCTION(capture_return_captures_the_return_value) { // arrange int captured_return; STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .CaptureReturn(&captured_return); // act test_dependency_for_capture_return(); // assert ASSERT_ARE_EQUAL(int, 42, captured_return); } ``` ### ValidateArgumentValue_{arg_name}(arg_type* arg_value) XX**SRS_UMOCK_C_LIB_01_183: [** The ValidateArgumentValue_{arg_name} shall validate that the value of an argument matches the value pointed by arg_value. **]** XX**SRS_UMOCK_C_LIB_01_184: [** If arg_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. **]** XX**SRS_UMOCK_C_LIB_01_185: [** The ValidateArgumentValue_{arg_name} modifier shall inhibit comparing with any value passed directly as an argument in the expected call. **]** XX**SRS_UMOCK_C_LIB_01_186: [** The ValidateArgumentValue_{arg_name} shall implicitly do a ValidateArgument for the arg_name argument, making sure the argument is not ignored. **]** Example: Given a function with the prototype: ```c void function_with_int_arg(int a); ``` ```c TEST_FUNCTION(validate_argument_sample) { // arrange int arg_value = 0; STRICT_EXPECTED_CALL(function_with_int_arg(0)) .ValidateArgumentValue_a(&arg_value); arg_value = 42; // act function_with_int_arg(42); // assert // ... calls should match ... } ``` ### ValidateArgumentValue_{arg_name}_AsType(const char* type_name) XX**SRS_UMOCK_C_LIB_01_199: [** `ValidateArgumentValue_{arg_name}_AsType` shall ensure that validation of the argument `arg_name` is done as if the argument is of type `type_name`. **]** XX**SRS_UMOCK_C_LIB_01_200: [** If `type_name` is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. **]** X**SRS_UMOCK_C_LIB_01_202: [** If storing the argument value as the new type fails, umock_c shall raise an error with the code UMOCK_C_COPY_ARGUMENT_ERROR. **]** XX**SRS_UMOCK_C_LIB_01_203: [** If `ValidateArgumentValue_{arg_name}_AsType` is used multiple times on the same argument, the last call shall apply. **]** ```c typedef struct MY_STRUCT_TAG { int x; } MY_STRUCT; void function_with_void_ptr(void* argument); TEST_FUNCTION(validate_argument_as_type_sample) { // arrange int arg_value = 0; MY_STRUCT x = { 42 }; STRICT_EXPECTED_CALL(function_with_void_ptr(&x)) .ValidateArgumentValue_argument_AsType(UMOCK_TYPE(MY_STRUCT)); // act function_with_int_arg(&x); // assert // ... calls should match ... } ``` ### Automatic argument ignore **SRS_UMOCK_C_LIB_01_205: [** If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. **]** **SRS_UMOCK_C_LIB_01_206: [** `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. **]** **SRS_UMOCK_C_LIB_01_207: [** `IGNORED_NUM_ARG` shall be defined to 0 so that it can be used for numeric type arguments. **]** Example: ```c STRICT_EXPECTED_CALL(function_name(IGNORED_PTR_ARG, 2, IGNORED_NUM_ARG)); ``` is equivalent to: ```c STRICT_EXPECTED_CALL(function_name(NULL, 2, 0)) .IgnoreArgument(1) .IgnoreArgument(3); ``` ##Global mock modifiers ### REGISTER_GLOBAL_MOCK_HOOK ```c REGISTER_GLOBAL_MOCK_HOOK(mock_function, mock_hook_function) ``` XX**SRS_UMOCK_C_LIB_01_104: [** The REGISTER_GLOBAL_MOCK_HOOK shall register a mock hook to be called every time the mocked function is called by production code. **]** XX**SRS_UMOCK_C_LIB_01_105: [** The hook's result shall be returned by the mock to the production code. **]** XX**SRS_UMOCK_C_LIB_01_106: [** The signature for the hook shall be assumed to have exactly the same arguments and return as the mocked function. **]** XX**SRS_UMOCK_C_LIB_01_107: [** If there are multiple invocations of REGISTER_GLOBAL_MOCK_HOOK, the last one shall take effect over the previous ones. **]** XX**SRS_UMOCK_C_LIB_01_134: [** REGISTER_GLOBAL_MOCK_HOOK called with a NULL hook unregisters a previously registered hook. **]** XX**SRS_UMOCK_C_LIB_01_135: [** All parameters passed to the mock shall be passed down to the mock hook. **]** ### REGISTER_GLOBAL_MOCK_RETURN ```c REGISTER_GLOBAL_MOCK_RETURN(mock_function, return_value) ``` XX**SRS_UMOCK_C_LIB_01_108: [** The REGISTER_GLOBAL_MOCK_RETURN shall register a return value to always be returned by a mock function. **]** XX**SRS_UMOCK_C_LIB_01_109: [** If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURN, the last one shall take effect over the previous ones. **]** XX**SRS_UMOCK_C_LIB_01_141: [** If any error occurs during REGISTER_GLOBAL_MOCK_RETURN, umock_c shall raise an error with the code UMOCK_C_ERROR. **]** ### REGISTER_GLOBAL_MOCK_FAIL_RETURN ```c REGISTER_GLOBAL_MOCK_FAIL_RETURN(mock_function, fail_return_value) ``` XX**SRS_UMOCK_C_LIB_01_111: [** The REGISTER_GLOBAL_MOCK_FAIL_RETURN shall register a fail return value to be returned by a mock function when marked as failed in the expected calls. **]** XX**SRS_UMOCK_C_LIB_01_112: [** If there are multiple invocations of REGISTER_GLOBAL_FAIL_MOCK_RETURN, the last one shall take effect over the previous ones. **]** XX**SRS_UMOCK_C_LIB_01_142: [** If any error occurs during REGISTER_GLOBAL_MOCK_FAIL_RETURN, umock_c shall raise an error with the code UMOCK_C_ERROR. **]** ### REGISTER_GLOBAL_MOCK_RETURNS ```c REGISTER_GLOBAL_MOCK_RETURNS(mock_function, return_value, fail_return_value) ``` XX**SRS_UMOCK_C_LIB_01_113: [** The REGISTER_GLOBAL_MOCK_RETURNS shall register both a success and a fail return value associated with a mock function. **]** XX**SRS_UMOCK_C_LIB_01_114: [** If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURNS, the last one shall take effect over the previous ones. **]** XX**SRS_UMOCK_C_LIB_01_143: [** If any error occurs during REGISTER_GLOBAL_MOCK_RETURNS, umock_c shall raise an error with the code UMOCK_C_ERROR. **]** ## negative tests addon In order to automate negative tests writing, a separate API surface is provided: umock_c_negative_tests. Example: Given a function under test with the following code: ```c int function_under_test(void) { int result; if (function_1() != 0) { result = __LINE__; } else { if (function_2() != 0) { result = __LINE__; } else { result = 0; } } return result; } ``` The function calls two functions that return int: ```c MOCKABLE_FUNCTION(, int, function_1); MOCKABLE_FUNCTION(, int, function_2); ``` In order to test that for each case where either function_1 or function_2 fails and returns a non-zero value, one could write the following test that loops through all cases as opposed to writing individual negative tests: ```c size_t i; STRICT_EXPECTED_CALL(function_1()) .SetReturn(0).SetFailReturn(1); STRICT_EXPECTED_CALL(function_2()) .SetReturn(0).SetFailReturn(1); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_NOT_EQUAL_WITH_MSG(int, 0, result, temp_str); } ``` Note that a return value and a fail return value must be specified for the negative tests. If they are not specified that will result in undefined behavior. ### umock_c_negative_tests_init ```c int umock_c_negative_tests_init(void) ``` **SRS_UMOCK_C_LIB_01_164: [** umock_c_negative_tests_init shall initialize the negative tests umock_c module. **]** **SRS_UMOCK_C_LIB_01_165: [** On success it shall return 0. If any error occurs, it shall return a non-zero value. **]** This call is typically made in the test function setup. ### umock_c_negative_tests_deinit ```c void umock_c_negative_tests_deinit(void) ``` **SRS_UMOCK_C_LIB_01_166: [** umock_c_negative_tests_deinit shall free all resources used by the negative tests module. **]** ### umock_c_negative_tests_snapshot ```c void umock_c_negative_tests_snapshot(void) ``` XX**SRS_UMOCK_C_LIB_01_167: [** umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). **]** This is in order for these calls to be replayed as many times as needed, each time allowing different calls to be failed. X**SRS_UMOCK_C_LIB_01_168: [** If umock_c_negative_tests_snapshot is called without the module being initialized, it shall do nothing. **]** X**SRS_UMOCK_C_LIB_01_169: [** All errors shall be reported by calling the umock_c on error function. **]** ### umock_c_negative_tests_reset ```c void umock_c_negative_tests_reset(void) ``` XX**SRS_UMOCK_C_LIB_01_170: [** umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. **]** This is done typically in preparation of running each negative test. X**SRS_UMOCK_C_LIB_01_171: [** If umock_c_negative_tests_reset is called without the module being initialized, it shall do nothing. **]** X**SRS_UMOCK_C_LIB_01_172: [** All errors shall be reported by calling the umock_c on error function. **]** ### umock_c_negative_tests_fail_call ```c void umock_c_negative_tests_fail_call(size_t index) ``` XX**SRS_UMOCK_C_LIB_01_173: [** umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. **]** X**SRS_UMOCK_C_LIB_01_174: [** If umock_c_negative_tests_fail_call is called without the module being initialized, it shall do nothing. **]** X**SRS_UMOCK_C_LIB_01_175: [** All errors shall be reported by calling the umock_c on error function. **]** ### umock_c_negative_tests_call_count ```c size_t umock_c_negative_tests_call_count(void) ``` XX**SRS_UMOCK_C_LIB_01_176: [** umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. **]** X**SRS_UMOCK_C_LIB_01_177: [** If umock_c_negative_tests_fail_call is called without the module being initialized, it shall return 0. **]** X**SRS_UMOCK_C_LIB_01_178: [** All errors shall be reported by calling the umock_c on error function. **]** ## paired calls addon The paired calls addon can be used in order to ensure that function calls are paired correctly when needed. For example, given a create and destroy function pair: ```c SOME_HANDLE some_create(void); void some_destroy(SOME_HANDLE handle, ...); ``` It is desirable to make sure that all create calls are paired with appropriate destroy calls. umockc provides the ability for the user to declare that by using a macro like: ```c REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create, some_destroy); ``` The paired calls addon can based on this information figure out if any calls are made to some_create without having a counterpart some_destroy. Typically registering the pairs with umockc would be done in the test suite setup. ### REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(create_call, destroy_call) ```c REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(create_call, destroy_call) ``` XX**SRS_UMOCK_C_LIB_01_187: [** REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS shall register with umock two calls that are expected to be paired. **]** XX**SRS_UMOCK_C_LIB_01_188: [** The create call shall have a non-void return type. **]** XX**SRS_UMOCK_C_LIB_01_189: [** The destroy call shall take as argument at least one argument. The type of the first argument shall be of the same type as the return type for the create_call. **]** XX**SRS_UMOCK_C_LIB_01_190: [** If create_call or destroy_call do not obey these rules, at the time of calling REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. **]** XX**SRS_UMOCK_C_LIB_01_191: [** At each create_call a memory block shall be allocated so that it can be reported as a leak by any memory checker. **]** X**SRS_UMOCK_C_LIB_01_192: [** If any error occurs during the create_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. **]** XX**SRS_UMOCK_C_LIB_01_193: [** When a destroy_call happens the memory block associated with the argument passed to it shall be freed. **]** XX**SRS_UMOCK_C_LIB_01_194: [** If the first argument passed to destroy_call is not found in the list of tracked handles (returned by create_call) then umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. **]** X**SRS_UMOCK_C_LIB_01_195: [** If any error occurs during the destroy_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_LIB_01_196: [** The type used for the return of create_call and first argument of destroy_call shall be allowed to be any type registered with umock. **]** XX**SRS_UMOCK_C_LIB_01_204: [** Tracking of paired calls shall not be done if the actual call to the `create_call` is using the `SetFailReturn` call modifier. **]** umock_c_negative_tests_requirements.md000066400000000000000000000124021362133436400437670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc# umock_c_negative_tests requirements # Overview umock_c_negative_tests is an addon to umock_c that exposes APIs used to automate negative tests. # Exposed API ```c extern int umock_c_negative_tests_init(void); extern void umock_c_negative_tests_deinit(void); extern void umock_c_negative_tests_snapshot(void); extern void umock_c_negative_tests_reset(void); extern void umock_c_negative_tests_fail_call(size_t index); extern size_t umock_c_negative_tests_call_count(void); ``` ## umock_c_negative_tests_init ```c extern int umock_c_negative_tests_init(void); ``` **SRS_UMOCK_C_NEGATIVE_TESTS_01_001: [** umock_c_negative_tests_init shall initialize the umock_c negative tests library. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_004: [** On success, umock_c_negative_tests_init shall return 0. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_005: [** If the module has already been initialized, umock_c_negative_tests_init shall return a non-zero value. **]** ## umock_c_negative_tests_deinit ```c extern void umock_c_negative_tests_deinit(void); ``` **SRS_UMOCK_C_NEGATIVE_TESTS_01_002: [** umock_c_negative_tests_deinit shall free all resources associated with the negative tests module. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_003: [** If the module was not previously initialized, umock_c_negative_tests_deinit shall do nothing. **]** ## umock_c_negative_tests_snapshot ```c extern void umock_c_negative_tests_snapshot(void); ``` **SRS_UMOCK_C_NEGATIVE_TESTS_01_006: [** umock_c_negative_tests_snapshot shall make a copy of the current call recorder for umock_c with all its recorded calls. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_007: [** The current call recorder shall be obtained by calling umock_c_get_call_recorder. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_008: [** The copy of the recorder shall be made by calling umockcallrecorder_clone. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_009: [** If getting the call recorder fails, umock_c_negative_tests_snapshot shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_010: [** If copying the call recorder fails, umock_c_negative_tests_snapshot shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_015: [** If the module was not previously initialized, umock_c_negative_tests_snapshot shall do nothing. **]** ## umock_c_negative_tests_reset ```c extern void umock_c_negative_tests_reset(void); ``` **SRS_UMOCK_C_NEGATIVE_TESTS_01_011: [** umock_c_negative_tests_reset shall reset the call recorder used by umock_c to the call recorder stored in umock_c_negative_tests_reset. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_012: [** If no call has been made to umock_c_negative_tests_snapshot, umock_c_negative_tests_reset shall indicate a failure via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_013: [** The reset shall be done by calling umock_c_set_call_recorder and passing the call recorder stored in umock_c_negative_tests_reset as argument. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_014: [** If umock_c_set_call_recorder fails, umock_c_negative_tests_reset shall indicate a failure via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_016: [** If the module was not previously initialized, umock_c_negative_tests_reset shall do nothing. **]** ## umock_c_negative_tests_fail_call ```c extern void umock_c_negative_tests_fail_call(size_t index); ``` **SRS_UMOCK_C_NEGATIVE_TESTS_01_017: [** umock_c_negative_tests_fail_call shall call umockcallrecorder_fail_call on the currently used call recorder used by umock_c. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_018: [** The currently used recorder shall be obtained by calling umock_c_get_call_recorder. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_019: [** If umock_c_get_call_recorder fails, umock_c_negative_tests_fail_call shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_025: [** If failing the call by calling umockcallrecorder_fail_call fails, umock_c_negative_tests_fail_call shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_020: [** If the module was not previously initialized, umock_c_negative_tests_fail_call shall do nothing. **]** ## umock_c_negative_tests_call_count ```c extern size_t umock_c_negative_tests_call_count(void); ``` XX**SRS_UMOCK_C_NEGATIVE_TESTS_01_021: [** umock_c_negative_tests_call_count shall return the count of expected calls for the current snapshot call recorder by calling umockcallrecorder_get_expected_call_count. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_022: [** If no call has been made to umock_c_negative_tests_snapshot, umock_c_negative_tests_fail_call shall return 0 and indicate the error via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_023: [** If umockcallrecorder_get_expected_call_count fails, umock_c_negative_tests_fail_call shall return 0 and indicate the error via the umock error callback with error code UMOCK_C_ERROR. **]** **SRS_UMOCK_C_NEGATIVE_TESTS_01_024: [** If the module was not previously initialized, umock_c_negative_tests_call_count shall return 0. **]** umock_c_requirements.md000066400000000000000000000162471362133436400406760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc# umock_c requirements # Overview umock_c is a module that exposes the user facing API for umock_c. It exposes a set of macros and APIs that allow: - initializing/deinitializing the library - resetting the calls - getting the expected calls string - getting the actual calls string # Exposed API ```c typedef enum UMOCK_C_ERROR_CODE_TAG { UMOCK_C_ARG_INDEX_OUT_OF_RANGE, UMOCK_C_MALLOC_ERROR, UMOCK_C_INVALID_ARGUMENT_BUFFER, UMOCK_C_COMPARE_CALL_ERROR, UMOCK_C_RESET_CALLS_ERROR, UMOCK_C_ERROR } UMOCK_C_ERROR_CODE; typedef void(*ON_UMOCK_C_ERROR)(UMOCK_C_ERROR_CODE error_code); #define IGNORED_PTR_ARG (NULL) #define IGNORED_NUM_ARG (0) #define MOCKABLE_FUNCTION(result, function, ...) \ ... #define REGISTER_GLOBAL_MOCK_HOOK(mock_function, mock_hook_function) \ ... #define REGISTER_GLOBAL_MOCK_RETURN(mock_function, return_value) \ ... #define REGISTER_GLOBAL_MOCK_FAIL_RETURN(mock_function, fail_return_value) \ ... #define REGISTER_GLOBAL_MOCK_RETURNS(mock_function, return_value, fail_return_value) \ ... #define STRICT_EXPECTED_CALL(call) \ ... #define EXPECTED_CALL(call) \ ... #define DECLARE_UMOCK_POINTER_TYPE_FOR_TYPE(value_type, alias) \ ... #define REGISTER_UMOCK_VALUE_TYPE(value_type, stringify_func, are_equal_func, copy_func, free_func) \ ... extern int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); extern void umock_c_deinit(void); extern void umock_c_reset_all_calls(void); extern const char* umock_c_get_actual_calls(void); extern const char* umock_c_get_expected_calls(void); extern UMOCKCALL_HANDLE umock_c_get_last_expected_call(void); extern int umock_c_add_expected_call(UMOCKCALL_HANDLE mock_call); extern int umock_c_add_actual_call(UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); extern UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void); extern int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE call_recorder); ``` ## umock_c_init ```c extern int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); ``` **SRS_UMOCK_C_01_001: [** umock_c_init shall initialize the umock library. **]** **SRS_UMOCK_C_01_023: [** umock_c_init shall initialize the umock types by calling umocktypes_init. **]** **SRS_UMOCK_C_01_002: [** umock_c_init shall register the C naive types by calling umocktypes_c_register_types. **]** **SRS_UMOCK_C_01_003: [** umock_c_init shall create a call recorder by calling umockcallrecorder_create. **]** **SRS_UMOCK_C_01_004: [** On success, umock_c_init shall return 0. **]** **SRS_UMOCK_C_01_005: [** If any of the calls fails, umock_c_init shall fail and return a non-zero value. **]** **SRS_UMOCK_C_01_006: [** The on_umock_c_error callback shall be stored to be used for later error callbacks. **]** **SRS_UMOCK_C_01_007: [** umock_c_init when umock is already initialized shall fail and return a non-zero value. **]** **SRS_UMOCK_C_01_024: [** on_umock_c_error shall be optional. **]** ## umock_c_deinit ```c extern void umock_c_deinit(void); ``` **SRS_UMOCK_C_01_008: [** umock_c_deinit shall deinitialize the umock types by calling umocktypes_deinit. **]** **SRS_UMOCK_C_01_009: [** umock_c_deinit shall free the call recorder created in umock_c_init. **]** **SRS_UMOCK_C_01_010: [** If the module is not initialized, umock_c_deinit shall do nothing. **]** ## umock_c_reset_all_calls ```c extern void umock_c_reset_all_calls(void); ``` **SRS_UMOCK_C_01_011: [** umock_c_reset_all_calls shall reset all calls by calling umockcallrecorder_reset_all_calls on the call recorder created in umock_c_init. **]** **SRS_UMOCK_C_01_025: [** If the underlying umockcallrecorder_reset_all_calls fails, the on_umock_c_error callback shall be triggered with UMOCK_C_RESET_CALLS_ERROR. **]** **SRS_UMOCK_C_01_012: [** If the module is not initialized, umock_c_reset_all_calls shall do nothing. **]** ## umock_c_get_actual_calls ```c extern const char* umock_c_get_actual_calls(void); ``` **SRS_UMOCK_C_01_013: [** umock_c_get_actual_calls shall return the string for the recorded actual calls by calling umockcallrecorder_get_actual_calls on the call recorder created in umock_c_init. **]** **SRS_UMOCK_C_01_014: [** If the module is not initialized, umock_c_get_actual_calls shall return NULL. **]** ## umock_c_get_expected_calls ```c extern const char* umock_c_get_expected_calls(void); ``` **SRS_UMOCK_C_01_015: [** umock_c_get_expected_calls shall return the string for the recorded expected calls by calling umockcallrecorder_get_expected_calls on the call recorder created in umock_c_init. **]** **SRS_UMOCK_C_01_016: [** If the module is not initialized, umock_c_get_expected_calls shall return NULL. **]** ## umock_c_get_last_expected_call ```c extern UMOCKCALL_HANDLE umock_c_get_last_expected_call(void); ``` **SRS_UMOCK_C_01_017: [** umock_c_get_last_expected_call shall return the last expected call by calling umockcallrecorder_get_last_expected_call on the call recorder created in umock_c_init. **]** **SRS_UMOCK_C_01_018: [** If the module is not initialized, umock_c_get_last_expected_call shall return NULL. **]** ## umock_c_add_expected_call ```c extern int umock_c_add_expected_call(UMOCKCALL_HANDLE mock_call); ``` **SRS_UMOCK_C_01_019: [** umock_c_add_expected_call shall add an expected call by calling umockcallrecorder_add_expected_call on the call recorder created in umock_c_init. **]** **SRS_UMOCK_C_01_020: [** If the module is not initialized, umock_c_add_expected_call shall return a non-zero value. **]** ## umock_c_add_actual_call ```c extern int umock_c_add_actual_call(UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); ``` **SRS_UMOCK_C_01_021: [** umock_c_add_actual_call shall add an actual call by calling umockcallrecorder_add_actual_call on the call recorder created in umock_c_init. **]** **SRS_UMOCK_C_01_022: [** If the module is not initialized, umock_c_add_actual_call shall return a non-zero value. **]** ## umock_c_get_call_recorder ```c extern UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void); ``` **SRS_UMOCK_C_01_026: [** umock_c_get_call_recorder shall return the handle to the currently used call recorder. **]** **SRS_UMOCK_C_01_027: [** If the module is not initialized, umock_c_get_call_recorder shall return NULL. **]** ## umock_c_set_call_recorder ```c extern int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE call_recorder); ``` **SRS_UMOCK_C_01_028: [** umock_c_set_call_recorder shall replace the currently used call recorder with the one identified by the call_recorder argument. **]** **SRS_UMOCK_C_01_029: [** On success, umock_c_set_call_recorder shall return 0. **]** **SRS_UMOCK_C_01_030: [** If call_recorder is NULL, umock_c_set_call_recorder shall return a non-zero value. **]** **SRS_UMOCK_C_01_031: [** umock_c_set_call_recorder shall make a copy of call_recorder by calling umockcallrecorder_clone and use the copy for future actions. **]** **SRS_UMOCK_C_01_032: [** If umockcallrecorder_clone fails, umock_c_set_call_recorder shall return a non-zero value. **]** **SRS_UMOCK_C_01_033: [** If the module is not initialized, umock_c_set_call_recorder shall return a non-zero value. **]** **SRS_UMOCK_C_01_034: [** The previously used call recorder shall be destroyed by calling umockcallrecorder_destroy. **]** umockalloc_requirements.md000066400000000000000000000022721362133436400414000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc# umockalloc requirements # Overview umockalloc is a module that wraps the C memory allocation functions (malloc, realloc and free). This is so that umock_c can control what code is executed for allocation and there are no undesired redefinitions of malloc/realloc/free. # Exposed API ```c extern void* umockalloc_malloc(size_t size); extern void* umockalloc_realloc(void* ptr, size_t size); extern void umockalloc_free(void* ptr); ``` ## umockalloc_malloc ```c extern void* umockalloc_malloc(size_t size); ``` **SRS_UMOCKALLOC_01_001: [** umockalloc_malloc shall call malloc, while passing the size argument to malloc. **]** **SRS_UMOCKALLOC_01_002: [** umockalloc_malloc shall return the result of malloc. **]** ## umockalloc_realloc ```c extern void* umockalloc_realloc(void* ptr, size_t size); ``` **SRS_UMOCKALLOC_01_003: [** umockalloc_realloc shall call realloc, while passing the ptr and size arguments to realloc. **]** **SRS_UMOCKALLOC_01_004: [** umockalloc_realloc shall return the result of realloc. **]** ## umockalloc_free ```c extern void umockalloc_free(void* ptr); ``` **SRS_UMOCKALLOC_01_005: [** umockalloc_free shall call free, while passing the ptr argument to free. **]** umockautoignoreargs_requirements.md000066400000000000000000000041171362133436400433370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc# umockautoignoreargs requirements # Overview `umockautoignoreargs` is a module that provides the functionality of inspecting the arguments of a function to determine whether they should be ignored or not. # Exposed API ```c extern int umockautoignoreargs_is_call_argument_ignored(const char* call, size_t argument_index, int* is_argument_ignored); ``` ## umockautoignoreargs_is_call_argument_ignored ```c extern int umockautoignoreargs_is_call_argument_ignored(const char* call, size_t argument_index, int* is_argument_ignored); ``` XX**SRS_UMOCKAUTOIGNOREARGS_01_001: [** `umockautoignoreargs_is_call_argument_ignored` shall determine whether argument `argument_index` shall be ignored or not. **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_002: [** If `call` or `is_argument_ignored` is NULL, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_003: [** `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_004: [** If `umockautoignoreargs_is_call_argument_ignored` fails parsing the `call` argument it shall fail and return a non-zero value. **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_009: [** If the number of arguments parsed from `call` is less than `argument_index`, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_005: [** If `umockautoignoreargs_is_call_argument_ignored` was able to parse the `argument_index`th argument it shall succeed and return 0, while writing whether the argument is ignored in the `is_argument_ignored` output argument. **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_006: [** If the argument value is `IGNORED_PTR_ARG` then `is_argument_ignored` shall be set to 1. **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_007: [** If the argument value is `IGNORED_NUM_ARG` then `is_argument_ignored` shall be set to 1. **]** XX**SRS_UMOCKAUTOIGNOREARGS_01_008: [** If the argument value is any other value then `is_argument_ignored` shall be set to 0. **]** umockcall_requirements.md000066400000000000000000000204601362133436400412200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc# umockcall requirements # Overview umockcall is a module that encapsulates a umock call. # Exposed API ```c typedef struct UMOCKCALL_TAG* UMOCKCALL_HANDLE; typedef void*(*UMOCKCALL_DATA_COPY_FUNC)(void* umockcall_data); typedef void(*UMOCKCALL_DATA_FREE_FUNC)(void* umockcall_data); typedef char*(*UMOCKCALL_DATA_STRINGIFY_FUNC)(void* umockcall_data); typedef int(*UMOCKCALL_DATA_ARE_EQUAL_FUNC)(void* left, void* right); extern UMOCKCALL_HANDLE umockcall_create(const char* function_name, void* umockcall_data, UMOCKCALL_DATA_COPY_FUNC umockcall_data_copy, UMOCKCALL_DATA_FREE_FUNC umockcall_data_free, UMOCKCALL_DATA_STRINGIFY_FUNC umockcall_data_stringify, UMOCKCALL_DATA_ARE_EQUAL_FUNC umockcall_data_are_equal); extern void umockcall_destroy(UMOCKCALL_HANDLE umockcall); extern int umockcall_are_equal(UMOCKCALL_HANDLE left, UMOCKCALL_HANDLE right); extern char* umockcall_stringify(UMOCKCALL_HANDLE umockcall); extern void* umockcall_get_call_data(UMOCKCALL_HANDLE umockcall); extern UMOCKCALL_HANDLE umockcall_clone(UMOCKCALL_HANDLE umockcall); extern int umockcall_set_fail_call(UMOCKCALL_HANDLE umockcall, int fail_call); extern int umockcall_get_fail_call(UMOCKCALL_HANDLE umockcall); extern int umockcall_set_ignore_all_calls(UMOCKCALL_HANDLE umockcall, int ignore_all_calls); extern int umockcall_get_ignore_all_calls(UMOCKCALL_HANDLE umockcall); ``` ## umockcall_create ```c extern UMOCKCALL_HANDLE umockcall_create(const char* function_name, void* umockcall_data, UMOCKCALL_DATA_COPY_FUNC umockcall_data_copy, UMOCKCALL_DATA_FREE_FUNC umockcall_data_free, UMOCKCALL_DATA_STRINGIFY_FUNC umockcall_data_stringify, UMOCKCALL_DATA_ARE_EQUAL_FUNC umockcall_data_are_equal); ``` **SRS_UMOCKCALL_01_001: [** umockcall_create shall create a new instance of a umock call and on success it shall return a non-NULL handle to it. **]** **SRS_UMOCKCALL_01_002: [** If allocating memory for the umock call instance fails, umockcall_create shall return NULL. **]** **SRS_UMOCKCALL_01_003: [** If any of the arguments are NULL, umockcall_create shall fail and return NULL. **]** ## umockcall_destroy ```c extern void umockcall_destroy(UMOCKCALL_HANDLE umockcall); ``` **SRS_UMOCKCALL_01_004: [** umockcall_destroy shall free a previously allocated umock call instance. **]** **SRS_UMOCKCALL_01_005: [** If the umockcall argument is NULL then umockcall_destroy shall do nothing. **]** ## umockcall_are_equal ```c extern int umockcall_are_equal(UMOCKCALL_HANDLE left, UMOCKCALL_HANDLE right); ``` **SRS_UMOCKCALL_01_006: [** umockcall_are_equal shall compare the two mock calls and return whether they are equal or not. **]** **SRS_UMOCKCALL_01_024: [** If both left and right pointers are equal, umockcall_are_equal shall return 1. **]** **SRS_UMOCKCALL_01_015: [** If only one of the left or right arguments are NULL, umockcall_are_equal shall return 0. **]** **SRS_UMOCKCALL_01_025: [** If the function name does not match for the 2 calls, umockcall_are_equal shall return 0. **]** **SRS_UMOCKCALL_01_026: [** The call data shall be evaluated by calling the umockcall_data_are_equal function passed in umockcall_create while passing as arguments the umockcall_data associated with each call handle. **]** **SRS_UMOCKCALL_01_027: [** If the underlying umockcall_data_are_equal returns 1, then umockcall_are_equal shall return 1. **]** **SRS_UMOCKCALL_01_028: [** If the underlying umockcall_data_are_equal returns 0, then umockcall_are_equal shall return 0. **]** **SRS_UMOCKCALL_01_029: [** If the underlying umockcall_data_are_equal fails (returns anything else than 0 or 1), then umockcall_are_equal shall fail and return -1. **]** **SRS_UMOCKCALL_01_014: [** If the two calls have different are_equal functions that have been passed to umockcall_create then the calls shall be considered different and 0 shall be returned. **]** ## umockcall_to_string ```c extern char* umockcall_stringify(UMOCKCALL_HANDLE umockcall); ``` **SRS_UMOCKCALL_01_016: [** umockcall_stringify shall return a string representation of the mock call in the form \[function_name(arguments)\]. **]** **SRS_UMOCKCALL_01_018: [** The returned string shall be a newly allocated string and it is to be freed by the caller. **]** **SRS_UMOCKCALL_01_017: [** If the umockcall argument is NULL, umockcall_stringify shall return NULL. **]** **SRS_UMOCKCALL_01_019: [** To obtain the arguments string, umockcall_stringify shall call the umockcall_data_stringify function passed to umockcall_create and pass to it the umockcall_data pointer (also given in umockcall_create). **]** **SRS_UMOCKCALL_01_030: [** umockcall_stringify shall free the string obtained from umockcall_data_stringify. **]** **SRS_UMOCKCALL_01_020: [** If the underlying umockcall_data_stringify call fails, umockcall_stringify shall fail and return NULL. **]** **SRS_UMOCKCALL_01_021: [** If not enough memory can be allocated for the string to be returned, umockcall_stringify shall fail and return NULL. **]** ## umockcall_get_call_data ```c extern void* umockcall_get_call_data(UMOCKCALL_HANDLE umockcall); ``` **SRS_UMOCKCALL_01_022: [** umockcall_get_call_data shall return the associated umock call data that was passed to umockcall_create. **]** **SRS_UMOCKCALL_01_023: [** If umockcall is NULL, umockcall_get_call_data shall return NULL. **]** ## umockcall_clone ```c extern UMOCKCALL_HANDLE umockcall_clone(UMOCKCALL_HANDLE umockcall); ``` **SRS_UMOCKCALL_01_031: [** umockcall_clone shall clone a umock call and on success it shall return a handle to the newly cloned call. **]** **SRS_UMOCKCALL_01_032: [** If umockcall is NULL, umockcall_clone shall return NULL. **]** **SRS_UMOCKCALL_01_033: [** The call data shall be cloned by calling the umockcall_data_copy function passed in umockcall_create and passing as argument the umockcall_data value passed in umockcall_create. **]** **SRS_UMOCKCALL_01_043: [** If allocating memory for the new umock call fails, umockcall_clone shall return NULL. **]** **SRS_UMOCKCALL_01_034: [** If umockcall_data_copy fails then umockcall_clone shall return NULL. **]** **SRS_UMOCKCALL_01_035: [** umockcall_clone shall copy also the function name. **]** **SRS_UMOCKCALL_01_036: [** If allocating memory for the function name fails, umockcall_clone shall return NULL. **]** **SRS_UMOCKCALL_01_037: [** umockcall_clone shall also copy all the functions passed to umockcall_create (umockcall_data_copy, umockcall_data_free, umockcall_data_are_equal, umockcall_data_stringify). **]** ## umockcall_set_fail_call ```c extern int umockcall_set_fail_call(UMOCKCALL_HANDLE umockcall, int fail_call); ``` **SRS_UMOCKCALL_01_038: [** umockcall_set_fail_call shall store the fail_call value, associating it with the umockcall call instance. **]** **SRS_UMOCKCALL_01_044: [** On success umockcall_set_fail_call shall return 0. **]** **SRS_UMOCKCALL_01_039: [** If umockcall is NULL, umockcall_set_fail_call shall return a non-zero value. **]** **SRS_UMOCKCALL_01_040: [** If a value different than 0 and 1 is passed as fail_call, umockcall_set_fail_call shall return a non-zero value. **]** ```c extern int umockcall_get_fail_call(UMOCKCALL_HANDLE umockcall); ``` **SRS_UMOCKCALL_01_041: [** umockcall_get_fail_call shall retrieve the fail_call value, associated with the umockcall call instance. **]** **SRS_UMOCKCALL_01_042: [** If umockcall is NULL, umockcall_get_fail_call shall return -1. **]** ## umockcall_set_fail_call ```c extern int umockcall_set_ignore_all_calls(UMOCKCALL_HANDLE umockcall, int ignore_all_calls); ``` **SRS_UMOCKCALL_01_045: [** umockcall_set_ignore_all_calls shall store the ignore_all_calls value, associating it with the umockcall call instance. **]** **SRS_UMOCKCALL_01_046: [** On success umockcall_set_ignore_all_calls shall return 0. **]** **SRS_UMOCKCALL_01_047: [** If umockcall is NULL, umockcall_set_ignore_all_calls shall return a non-zero value. **]** **SRS_UMOCKCALL_01_048: [** If a value different than 0 and 1 is passed as ignore_all_calls, umockcall_set_ignore_all_calls shall return a non-zero value. **]** ```c extern int umockcall_get_ignore_all_calls(UMOCKCALL_HANDLE umockcall); ``` **SRS_UMOCKCALL_01_049: [** umockcall_get_ignore_all_calls shall retrieve the ignore_all_calls value, associated with the umockcall call instance. **]** **SRS_UMOCKCALL_01_050: [** If umockcall is NULL, umockcall_get_ignore_all_calls shall return -1. **]** umockcallpairs_requirements.md000066400000000000000000000065551362133436400422700ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umockcallpairs requirements # Overview umockcallpairs is a module that handles tracking of call pairs. # Exposed API ```c typedef struct PAIRED_HANDLE_TAG { void* handle_value; char* handle_type; } PAIRED_HANDLE; typedef struct PAIRED_HANDLES_TAG { PAIRED_HANDLE* paired_handles; size_t paired_handle_count; } PAIRED_HANDLES; extern int umockcallpairs_track_create_paired_call(PAIRED_HANDLES* paired_handles, const void* handle, const char* handle_type, size_t handle_type_size); extern int umockcallpairs_track_destroy_paired_call(PAIRED_HANDLES* paired_handles, const void* handle); ``` ## umockcallpairs_track_create_paired_call ```c extern int umockcallpairs_track_create_paired_call(PAIRED_HANDLES* paired_handles, const void* handle, const char* handle_type, size_t handle_type_size); ``` **SRS_UMOCKCALLPAIRS_01_001: [** umockcallpairs_track_create_paired_call shall add a new entry to the PAIRED_HANDLES array and on success it shall return 0. **]** **SRS_UMOCKCALLPAIRS_01_002: [** umockcallpairs_track_create_paired_call shall copy the handle_value to the handle_value member of the new entry. **]** **SRS_UMOCKCALLPAIRS_01_003: [** umockcallpairs_track_create_paired_call shall allocate a memory block and store a pointer to it in the memory field of the new entry. **]** **SRS_UMOCKCALLPAIRS_01_004: [** If any of the arguments paired_handles, handle or handle_type is NULL, umockcallpairs_track_create_paired_call shallfail and return a non-zero value. **]** **SRS_UMOCKCALLPAIRS_01_005: [** If allocating memory fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. **]** **SRS_UMOCKCALLPAIRS_01_006: [** The handle value shall be copied by using umocktypes_copy. **]** **SRS_UMOCKCALLPAIRS_01_007: [** If umocktypes_copy fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. **]** ## umockcallpairs_track_destroy_paired_call ```c extern int umockcallpairs_track_destroy_paired_call(PAIRED_HANDLES* paired_handles, const void* handle); ``` **SRS_UMOCKCALLPAIRS_01_008: [** umockcallpairs_track_destroy_paired_call shall remove from the paired handles array pointed by the paired_handles field the entry that is associated with the handle passed in the handle argument. **]** **SRS_UMOCKCALLPAIRS_01_009: [** On success umockcallpairs_track_destroy_paired_call shall return 0. **]** **SRS_UMOCKCALLPAIRS_01_010: [** If any of the arguments is NULL, umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. **]** **SRS_UMOCKCALLPAIRS_01_011: [** umockcallpairs_track_destroy_paired_call shall free the memory pointed by the memory field in the PAIRED_HANDLES array entry associated with handle. **]** **SRS_UMOCKCALLPAIRS_01_012: [** If the array paired handles array is empty after removing the entry, the paired_handles field shall be freed and set to NULL. **]** **SRS_UMOCKCALLPAIRS_01_013: [** When looking up which entry to remove, the comparison of the handle values shall be done by calling umocktypes_are_equal. **]** **SRS_UMOCKCALLPAIRS_01_014: [** If umocktypes_are_equal fails, umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. **]** **SRS_UMOCKCALLPAIRS_01_015: [** If the handle is not found in the array then umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. **]** umockcallrecorder_requirements.md000066400000000000000000000262131362133436400427500ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umockcallrecorder requirements # Overview umockcallrecorder is a module that implements recording the expected and actual calls. # Exposed API ```c typedef struct UMOCKCALLRECORDER_TAG* UMOCKCALLRECORDER_HANDLE; extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void); extern void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call); extern int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); extern const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count); extern int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index); ``` ## umockcallrecorder_create ```c extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void); ``` **SRS_UMOCKCALLRECORDER_01_001: [** umockcallrecorder_create shall create a new instance of a call recorder and return a non-NULL handle to it on success. **]** **SRS_UMOCKCALLRECORDER_01_002: [** If allocating memory for the call recorder fails, umockcallrecorder_create shall return NULL. **]** ## umockcallrecorder_destroy ```c extern void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder); ``` **SRS_UMOCKCALLRECORDER_01_003: [** umockcallrecorder_destroy shall free the resources associated with a the call recorder identified by the umock_call_recorder argument. **]** **SRS_UMOCKCALLRECORDER_01_004: [** If umock_call_recorder is NULL, umockcallrecorder_destroy shall do nothing. **]** ## umockcallrecorder_reset_all_calls ```c extern int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); ``` **SRS_UMOCKCALLRECORDER_01_005: [** umockcallrecorder_reset_all_calls shall free all the expected and actual calls for the call recorder identified by umock_call_recorder. **]** **SRS_UMOCKCALLRECORDER_01_006: [** On success umockcallrecorder_reset_all_calls shall return 0. **]** **SRS_UMOCKCALLRECORDER_01_007: [** If umock_call_recorder is NULL, umockcallrecorder_reset_all_calls shall fail and return a non-zero value. **]** ## umockcallrecorder_add_expected_call ```c extern int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call); ``` **SRS_UMOCKCALLRECORDER_01_008: [** umockcallrecorder_add_expected_call shall add the mock_call call to the expected call list maintained by the call recorder identified by umock_call_recorder. **]** **SRS_UMOCKCALLRECORDER_01_009: [** On success umockcallrecorder_add_expected_call shall return 0. **]** **SRS_UMOCKCALLRECORDER_01_012: [** If any of the arguments is NULL, umockcallrecorder_add_expected_call shall fail and return a non-zero value. **]** **SRS_UMOCKCALLRECORDER_01_013: [** If allocating memory for the expected calls fails, umockcallrecorder_add_expected_call shall fail and return a non-zero value. **]** ## umockcallrecorder_add_actual_call ```c extern int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); ``` **SRS_UMOCKCALLRECORDER_01_014: [** umockcallrecorder_add_actual_call shall check whether the call mock_call matches any of the expected calls maintained by umock_call_recorder. **]** **SRS_UMOCKCALLRECORDER_01_015: [** If the call does not match any of the expected calls, then umockcallrecorder_add_actual_call shall add the mock_call call to the actual call list maintained by umock_call_recorder. **]** **SRS_UMOCKCALLRECORDER_01_016: [** If the call matches one of the expected calls, a handle to the matched call shall be filled into the matched_call argument. **]** **SRS_UMOCKCALLRECORDER_01_017: [** Comparing the calls shall be done by calling umockcall_are_equal. **]** **SRS_UMOCKCALLRECORDER_01_018: [** When no error is encountered, umockcallrecorder_add_actual_call shall return 0. **]** **SRS_UMOCKCALLRECORDER_01_019: [** If any of the arguments is NULL, umockcallrecorder_add_actual_call shall fail and return a non-zero value. **]** **SRS_UMOCKCALLRECORDER_01_020: [** If allocating memory for the actual calls fails, umockcallrecorder_add_actual_call shall fail and return a non-zero value. **]** **SRS_UMOCKCALLRECORDER_01_021: [** If umockcall_are_equal fails, umockcallrecorder_add_actual_call shall fail and return a non-zero value. **]** **SRS_UMOCKCALLRECORDER_01_057: [** If any expected call has `ignore_all_calls` set and the actual call is equal to it when comparing the 2 calls, then the call shall be considered matched and not added to the actual calls list. **]** **SRS_UMOCKCALLRECORDER_01_058: [** If getting `ignore_all_calls` by calling `umockcall_get_ignore_all_calls` fails, `umockcallrecorder_add_actual_call` shall fail and return a non-zero value. **]** ## umockcallrecorder_get_actual_calls ```c extern const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); ``` **SRS_UMOCKCALLRECORDER_01_022: [** umockcallrecorder_get_actual_calls shall return a pointer to the string representation of all the actual calls. **]** **SRS_UMOCKCALLRECORDER_01_023: [** The string for each call shall be obtained by calling umockcall_stringify. **]** **SRS_UMOCKCALLRECORDER_01_024: [** If the umock_call_recorder is NULL, umockcallrecorder_get_actual_calls shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_025: [** If umockcall_stringify fails, umockcallrecorder_get_actual_calls shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_026: [** If allocating memory for the resulting string fails, umockcallrecorder_get_actual_calls shall fail and return NULL. **]** ## umockcallrecorder_get_expected_calls ```c extern const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); ``` **SRS_UMOCKCALLRECORDER_01_027: [** umockcallrecorder_get_expected_calls shall return a pointer to the string representation of all the expected calls. **]** **SRS_UMOCKCALLRECORDER_01_028: [** The string for each call shall be obtained by calling umockcall_stringify. **]** **SRS_UMOCKCALLRECORDER_01_029: [** If the umock_call_recorder is NULL, umockcallrecorder_get_expected_calls shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_030: [** If umockcall_stringify fails, umockcallrecorder_get_expected_calls shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_031: [** If allocating memory for the resulting string fails, umockcallrecorder_get_expected_calls shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_054: [** Calls that have the `ignore_all_calls` property set shall not be reported in the expected call list. **]** **SRS_UMOCKCALLRECORDER_01_055: [** Getting the `ignore_all_calls` property shall be done by calling `umockcall_get_ignore_all_calls`. **]** **SRS_UMOCKCALLRECORDER_01_056: [** If `umockcall_get_ignore_all_calls` returns a negative value then `umockcallrecorder_get_expected_calls` shall fail and return NULL. **]** ## umockcallrecorder_get_last_expected_call ```c extern UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder); ``` **SRS_UMOCKCALLRECORDER_01_032: [** umockcallrecorder_get_last_expected_call shall return the last expected call for the umock_call_recorder call recorder. **]** **SRS_UMOCKCALLRECORDER_01_033: [** If umock_call_recorder is NULL, umockcallrecorder_get_last_expected_call shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_034: [** If no expected call has been recorded for umock_call_recorder then umockcallrecorder_get_last_expected_call shall fail and return NULL. **]** ## umockcallrecorder_clone ```c extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder); ``` **SRS_UMOCKCALLRECORDER_01_035: [** umockcallrecorder_clone shall clone a call recorder and return a handle to the newly cloned call recorder. **]** **SRS_UMOCKCALLRECORDER_01_036: [** If the umock_call_recorder argument is NULL, umockcallrecorder_clone shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_037: [** If allocating memory for the new umock call recorder instance fails, umockcallrecorder_clone shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_038: [** umockcallrecorder_clone shall clone all the expected calls. **]** **SRS_UMOCKCALLRECORDER_01_039: [** Each expected call shall be cloned by calling umockcall_clone. **]** **SRS_UMOCKCALLRECORDER_01_040: [** If cloning an expected call fails, umockcallrecorder_clone shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_041: [** umockcallrecorder_clone shall clone all the actual calls. **]** **SRS_UMOCKCALLRECORDER_01_042: [** Each actual call shall be cloned by calling umockcall_clone. **]** **SRS_UMOCKCALLRECORDER_01_043: [** If cloning an actual call fails, umockcallrecorder_clone shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_052: [** If allocating memory for the expected calls fails, umockcallrecorder_clone shall fail and return NULL. **]** **SRS_UMOCKCALLRECORDER_01_053: [** If allocating memory for the actual calls fails, umockcallrecorder_clone shall fail and return NULL. **]** ## umockcallrecorder_get_expected_call_count ```c extern int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count); ``` **SRS_UMOCKCALLRECORDER_01_044: [** umockcallrecorder_get_expected_call_count shall return in the expected_call_count argument the number of expected calls associated with the call recorder. **]** **SRS_UMOCKCALLRECORDER_01_045: [** On success umockcallrecorder_get_expected_call_count shall return 0. **]** **SRS_UMOCKCALLRECORDER_01_046: [** If any of the arguments is NULL, umockcallrecorder_get_expected_call_count shall return a non-zero value. **]** ## umockcallrecorder_fail_call ```c extern int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index); ``` **SRS_UMOCKCALLRECORDER_01_047: [** umockcallrecorder_fail_call shall mark an expected call as to be failed by calling umockcall_set_fail_call with a 1 value for fail_call. **]** **SRS_UMOCKCALLRECORDER_01_048: [** On success, umockcallrecorder_fail_call shall return 0. **]** **SRS_UMOCKCALLRECORDER_01_049: [** If umock_call_recorder is NULL, umockcallrecorder_fail_call shall return a non-zero value. **]** **SRS_UMOCKCALLRECORDER_01_050: [** If index is invalid, umockcallrecorder_fail_call shall return a non-zero value. **]** **SRS_UMOCKCALLRECORDER_01_051: [** If umockcall_set_fail_call fails, umockcallrecorder_fail_call shall return a non-zero value. **]** umockstring_requirements.md000066400000000000000000000017031362133436400416120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umockstring requirements # Overview umockstring is a module that provides the functionality of cloning a string (allocating memory and copying the chars). # Exposed API ```c extern char* umockstring_clone(const char* source); ``` ## umockstring_clone ```c extern char* umockstring_clone(const char* source); ``` **UMOCK_STRING_01_001: [** `umockstring_clone` shall allocate memory for the cloned string (including the NULL terminator). **]** **UMOCK_STRING_01_002: [** `umockstring_clone` shall copy the string to the newly allocated memory (including the NULL terminator). **]** **UMOCK_STRING_01_003: [** On success `umockstring_clone` shall return a pointer to the newly allocated memory containing the copy of the string. **]** **UMOCK_STRING_01_004: [** If allocating the memory fails, `umockstring_clone` shall return NULL. **]** **UMOCK_STRING_01_005: [** If `umockstring_clone` is called with a NULL `source`, it shall return NULL. **]** umocktypename_requirements.md000066400000000000000000000030631362133436400421270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umocktypename requirements # Overview umocktypename is a module that provides a way to bring C type names to a normalized form in order to ensure that type name comparisons can be made easily. For example "const char \*" would be brought to "const char\*". # Exposed API ```c extern char* umocktypename_normalize(const char* typename); ``` ## umocktypename_normalize ```c extern char* umocktypename_normalize(const char* typename); ``` **SRS_UMOCKTYPENAME_01_001: [** umocktypename_normalize shall return a char\* with a newly allocated string that contains the normalized typename. **]** **SRS_UMOCKTYPENAME_01_006: [** No space shall exist between any other token and a star. **]** **SRS_UMOCKTYPENAME_01_002: [** umocktypename_normalize shall remove all spaces at the beginning of the typename. **]** **SRS_UMOCKTYPENAME_01_003: [** umocktypename_normalize shall remove all spaces at the end of the typename. **]** **SRS_UMOCKTYPENAME_01_004: [** umocktypename_normalize shall remove all extra spaces (more than 1 space) between elements that are part of the typename. **]** **SRS_UMOCKTYPENAME_01_005: [** If typename is NULL, then umocktypename_normalize shall fail and return NULL. **]** **SRS_UMOCKTYPENAME_01_007: [** If the length of the normalized typename is 0, umocktypename_normalize shall return NULL. **]** **SRS_UMOCKTYPENAME_01_008: [** If allocating memory fails, umocktypename_normalize shall fail and return NULL. **]** For example "const char" would be normalized to "const char". Also "char \*" would be normalized to "char\*". umocktypes_bool_requirements.md000066400000000000000000000053541362133436400424710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umocktypes_bool requirements # Overview umocktypes_c is a module that exposes out of the box functionality for bool and \_Bool for umock_c. # Exposed API ```c extern int umocktypes_bool_register_types(void); extern char* umocktypes_stringify_bool(const bool* value); \ extern int umocktypes_are_equal_bool(const bool* left, const bool* right); \ extern int umocktypes_copy_bool(bool* destination, const bool* source); \ extern void umocktypes_free_bool(bool* value); ``` ## umocktypes_bool_register_types ```c extern int umocktypes_bool_register_types(void); ``` **SRS_UMOCKTYPES_BOOL_01_001: [** umocktypes_bool_register_types shall register support for the C99 bool type. **]** **SRS_UMOCKTYPES_BOOL_01_014: [** On success, umocktypes_bool_register_types shall return 0. **]** **SRS_UMOCKTYPES_BOOL_01_015: [** If registering fails, umocktypes_bool_register_types shall fail and return a non-zero value. **]** ## umocktypes_stringify_char ```c extern char* umocktypes_stringify_bool(const bool* value); ``` **SRS_UMOCKTYPES_BOOL_01_002: [** umocktypes_stringify_bool shall return the string representation of value. **]** **SRS_UMOCKTYPES_BOOL_01_003: [** If value is NULL, umocktypes_stringify_bool shall return NULL. **]** **SRS_UMOCKTYPES_BOOL_01_004: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_bool shall return NULL. **]** **SRS_UMOCKTYPES_BOOL_01_005: [** If any other error occurs when creating the string representation, umocktypes_stringify_bool shall return NULL. **]** ##umocktypes_are_equal_bool ```c extern int umocktypes_are_equal_char(bool* left, bool* right); ``` **SRS_UMOCKTYPES_BOOL_01_006: [** umocktypes_are_equal_bool shall compare the 2 bools pointed to by left and right. **]** **SRS_UMOCKTYPES_BOOL_01_007: [** If any of the arguments is NULL, umocktypes_are_equal_bool shall return -1. **]** **SRS_UMOCKTYPES_BOOL_01_008: [** If the values pointed to by left and right are equal, umocktypes_are_equal_bool shall return 1. **]** **SRS_UMOCKTYPES_BOOL_01_009: [** If the values pointed to by left and right are different, umocktypes_are_equal_bool shall return 0. **]** ## umocktypes_copy_bool ```c extern int umocktypes_copy_bool(bool* destination, const bool* source); ``` **SRS_UMOCKTYPES_BOOL_01_010: [** umocktypes_copy_bool shall copy the bool value from source to destination. **]** **SRS_UMOCKTYPES_BOOL_01_011: [** On success umocktypes_copy_bool shall return 0. **]** **SRS_UMOCKTYPES_BOOL_01_012: [** If source or destination are NULL, umocktypes_copy_bool shall return a non-zero value. **]** ## umocktypes_free_bool ```c extern void umocktypes_free_bool(bool* value); ``` **SRS_UMOCKTYPES_BOOL_01_013: [** umocktypes_free_bool shall do nothing. **]** umocktypes_c_requirements.md000066400000000000000000000743531362133436400417650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umocktypes_c requirements # Overview umocktypes_c is a module that exposes out of the box functionality for most C supported types. This includes integers, floats, size_t etc. # Exposed API ```c extern int umocktypes_c_register_types(void); #define UMOCKTYPES_HANDLERS(type, function_postfix) \ extern char* C2(umocktypes_stringify_,function_postfix)(const type* value); \ extern int C2(umocktypes_are_equal_, function_postfix)(const type* left, const type* right); \ extern int C2(umocktypes_copy_, function_postfix)(type* destination, const type* source); \ extern void C2(umocktypes_free_, function_postfix)(type* value); UMOCKTYPES_HANDLERS(char, char) UMOCKTYPES_HANDLERS(unsigned char, unsignedchar) UMOCKTYPES_HANDLERS(short, short) UMOCKTYPES_HANDLERS(unsigned short, unsignedshort) UMOCKTYPES_HANDLERS(int, int) UMOCKTYPES_HANDLERS(unsigned int, unsignedint) UMOCKTYPES_HANDLERS(long, long) UMOCKTYPES_HANDLERS(unsigned long, unsignedlong) UMOCKTYPES_HANDLERS(long long, longlong) UMOCKTYPES_HANDLERS(unsigned long long, unsignedlonglong) UMOCKTYPES_HANDLERS(float, float) UMOCKTYPES_HANDLERS(double, double) UMOCKTYPES_HANDLERS(long double, longdouble) UMOCKTYPES_HANDLERS(size_t, size_t) UMOCKTYPES_HANDLERS(void*, void_ptr) UMOCKTYPES_HANDLERS(const void*, void_ptr) ``` ## umocktypes_c_register_types ```c extern int umocktypes_c_register_types(void); ``` **SRS_UMOCKTYPES_C_01_001: [** umocktypes_c_register_types shall register support for all the types in the module. **]** **SRS_UMOCKTYPES_C_01_170: [** On success, umocktypes_c_register_types shall return 0. **]** **SRS_UMOCKTYPES_C_01_171: [** If registering any of the types fails, umocktypes_c_register_types shall fail and return a non-zero value. **]** ## umocktypes_stringify_char ```c extern char* umocktypes_stringify_char(const char* value); ``` **SRS_UMOCKTYPES_C_01_002: [** umocktypes_stringify_char shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_003: [** If value is NULL, umocktypes_stringify_char shall return NULL. **]** **SRS_UMOCKTYPES_C_01_004: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_char shall return NULL. **]** **SRS_UMOCKTYPES_C_01_005: [** If any other error occurs when creating the string representation, umocktypes_stringify_char shall return NULL. **]** ## umocktypes_are_equal_char ```c extern int umocktypes_are_equal_char(const char* left, const char* right); ``` **SRS_UMOCKTYPES_C_01_006: [** umocktypes_are_equal_char shall compare the 2 chars pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_007: [** If any of the arguments is NULL, umocktypes_are_equal_char shall return -1. **]** **SRS_UMOCKTYPES_C_01_008: [** If the values pointed to by left and right are equal, umocktypes_are_equal_char shall return 1. **]** **SRS_UMOCKTYPES_C_01_009: [** If the values pointed to by left and right are different, umocktypes_are_equal_char shall return 0. **]** ## umocktypes_copy_char ```c extern int umocktypes_copy_char(char* destination, const char* source); ``` **SRS_UMOCKTYPES_C_01_010: [** umocktypes_copy_char shall copy the char value from source to destination. **]** **SRS_UMOCKTYPES_C_01_011: [** On success umocktypes_copy_char shall return 0. **]** **SRS_UMOCKTYPES_C_01_012: [** If source or destination are NULL, umocktypes_copy_char shall return a non-zero value. **]** ## umocktypes_free_char ```c extern void umocktypes_free_char(char* value); ``` **SRS_UMOCKTYPES_C_01_013: [** umocktypes_free_char shall do nothing. **]** ## umocktypes_stringify_unsignedchar ```c extern char* umocktypes_stringify_unsignedchar(const unsigned char* value); ``` **SRS_UMOCKTYPES_C_01_014: [** umocktypes_stringify_unsignedchar shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_015: [** If value is NULL, umocktypes_stringify_unsignedchar shall return NULL. **]** **SRS_UMOCKTYPES_C_01_016: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedchar shall return NULL. **]** **SRS_UMOCKTYPES_C_01_017: [** If any other error occurs when creating the string representation, umocktypes_stringify_unsignedchar shall return NULL. **]** ## umocktypes_are_equal_unsignedchar ```c extern int umocktypes_are_equal_unsignedchar(const unsigned char* left, const unsigned char* right); ``` **SRS_UMOCKTYPES_C_01_018: [** umocktypes_are_equal_unsignedchar shall compare the 2 unsigned chars pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_019: [** If any of the arguments is NULL, umocktypes_are_equal_unsignedchar shall return -1. **]** **SRS_UMOCKTYPES_C_01_020: [** If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedchar shall return 1. **]** **SRS_UMOCKTYPES_C_01_021: [** If the values pointed to by left and right are different, umocktypes_are_equal_unsignedchar shall return 0. **]** ## umocktypes_copy_unsignedchar ```c extern int umocktypes_copy_unsignedchar(unsigned char* destination, const unsigned char* source); ``` **SRS_UMOCKTYPES_C_01_022: [** umocktypes_copy_unsignedchar shall copy the unsigned char value from source to destination. **]** **SRS_UMOCKTYPES_C_01_023: [** On success umocktypes_copy_unsignedchar shall return 0. **]** **SRS_UMOCKTYPES_C_01_024: [** If source or destination are NULL, umocktypes_copy_unsignedchar shall return a non-zero value. **]** ## umocktypes_free_unsignedchar ```c extern void umocktypes_free_unsignedchar(unsigned char* value); ``` **SRS_UMOCKTYPES_C_01_025: [** umocktypes_free_unsignedchar shall do nothing. **]** ## umocktypes_stringify_short ```c extern char* umocktypes_stringify_short(const short* value); ``` **SRS_UMOCKTYPES_C_01_026: [** umocktypes_stringify_short shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_027: [** If value is NULL, umocktypes_stringify_short shall return NULL. **]** **SRS_UMOCKTYPES_C_01_028: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_short shall return NULL. **]** **SRS_UMOCKTYPES_C_01_029: [** If any other error occurs when creating the string representation, umocktypes_stringify_short shall return NULL. **]** ## umocktypes_are_equal_short ```c extern int umocktypes_are_equal_short(const short* left, const short* right); ``` **SRS_UMOCKTYPES_C_01_030: [** umocktypes_are_equal_short shall compare the 2 shorts pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_031: [** If any of the arguments is NULL, umocktypes_are_equal_short shall return -1. **]** **SRS_UMOCKTYPES_C_01_032: [** If the values pointed to by left and right are equal, umocktypes_are_equal_short shall return 1. **]** **SRS_UMOCKTYPES_C_01_033: [** If the values pointed to by left and right are different, umocktypes_are_equal_short shall return 0. **]** ## umocktypes_copy_short ```c extern int umocktypes_copy_short(short* destination, const short* source); ``` **SRS_UMOCKTYPES_C_01_034: [** umocktypes_copy_short shall copy the short value from source to destination. **]** **SRS_UMOCKTYPES_C_01_035: [** On success umocktypes_copy_short shall return 0. **]** **SRS_UMOCKTYPES_C_01_036: [** If source or destination are NULL, umocktypes_copy_short shall return a non-zero value. **]** ## umocktypes_free_short ```c extern void umocktypes_free_short(short* value); ``` **SRS_UMOCKTYPES_C_01_037: [** umocktypes_free_short shall do nothing. **]** ## umocktypes_stringify_unsignedshort ```c extern char* umocktypes_stringify_unsignedshort(const unsigned short* value); ``` **SRS_UMOCKTYPES_C_01_038: [** umocktypes_stringify_unsignedshort shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_039: [** If value is NULL, umocktypes_stringify_unsignedshort shall return NULL. **]** **SRS_UMOCKTYPES_C_01_040: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedshort shall return NULL. **]** **SRS_UMOCKTYPES_C_01_041: [** If any other error occurs when creating the string representation, umocktypes_stringify_unsignedshort shall return NULL. **]** ## umocktypes_are_equal_unsignedshort ```c extern int umocktypes_are_equal_unsignedshort(const unsigned short* left, const unsigned short* right); ``` **SRS_UMOCKTYPES_C_01_042: [** umocktypes_are_equal_unsignedshort shall compare the 2 unsigned shorts pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_043: [** If any of the arguments is NULL, umocktypes_are_equal_unsignedshort shall return -1. **]** **SRS_UMOCKTYPES_C_01_044: [** If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedshort shall return 1. **]** **SRS_UMOCKTYPES_C_01_045: [** If the values pointed to by left and right are different, umocktypes_are_equal_unsignedshort shall return 0. **]** ## umocktypes_copy_unsignedshort ```c extern int umocktypes_copy_unsignedshort(unsigned short* destination, const unsigned short* source); ``` **SRS_UMOCKTYPES_C_01_046: [** umocktypes_copy_unsignedshort shall copy the unsigned short value from source to destination. **]** **SRS_UMOCKTYPES_C_01_047: [** On success umocktypes_copy_unsignedshort shall return 0. **]** **SRS_UMOCKTYPES_C_01_048: [** If source or destination are NULL, umocktypes_copy_unsignedshort shall return a non-zero value. **]** ## umocktypes_free_unsignedshort ```c extern void umocktypes_free_unsignedshort(unsigned short* value); ``` **SRS_UMOCKTYPES_C_01_049: [** umocktypes_free_unsignedshort shall do nothing. **]** ## umocktypes_stringify_int ```c extern char* umocktypes_stringify_int(const int* value); ``` **SRS_UMOCKTYPES_C_01_050: [** umocktypes_stringify_int shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_051: [** If value is NULL, umocktypes_stringify_int shall return NULL. **]** **SRS_UMOCKTYPES_C_01_052: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int shall return NULL. **]** **SRS_UMOCKTYPES_C_01_053: [** If any other error occurs when creating the string representation, umocktypes_stringify_int shall return NULL. **]** ## umocktypes_are_equal_int ```c extern int umocktypes_are_equal_int(const int* left, const int* right); ``` **SRS_UMOCKTYPES_C_01_054: [** umocktypes_are_equal_int shall compare the 2 ints pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_055: [** If any of the arguments is NULL, umocktypes_are_equal_int shall return -1. **]** **SRS_UMOCKTYPES_C_01_056: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int shall return 1. **]** **SRS_UMOCKTYPES_C_01_057: [** If the values pointed to by left and right are different, umocktypes_are_equal_int shall return 0. **]** ## umocktypes_copy_int ```c extern int umocktypes_copy_int(int* destination, const int* source); ``` **SRS_UMOCKTYPES_C_01_058: [** umocktypes_copy_int shall copy the int value from source to destination. **]** **SRS_UMOCKTYPES_C_01_059: [** On success umocktypes_copy_int shall return 0. **]** **SRS_UMOCKTYPES_C_01_060: [** If source or destination are NULL, umocktypes_copy_int shall return a non-zero value. **]** ## umocktypes_free_int ```c extern void umocktypes_free_int(int* value); ``` **SRS_UMOCKTYPES_C_01_061: [** umocktypes_free_int shall do nothing. **]** ## umocktypes_stringify_unsignedint ```c extern char* umocktypes_stringify_unsignedint(const unsigned int* value); ``` **SRS_UMOCKTYPES_C_01_062: [** umocktypes_stringify_unsignedint shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_063: [** If value is NULL, umocktypes_stringify_unsignedint shall return NULL. **]** **SRS_UMOCKTYPES_C_01_064: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedint shall return NULL. **]** **SRS_UMOCKTYPES_C_01_065: [** If any other error occurs when creating the string representation, umocktypes_stringify_unsignedint shall return NULL. **]** ## umocktypes_are_equal_unsignedint ```c extern int umocktypes_are_equal_unsignedint(const unsigned int* left, const unsigned int* right); ``` **SRS_UMOCKTYPES_C_01_066: [** umocktypes_are_equal_unsignedint shall compare the 2 unsigned ints pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_067: [** If any of the arguments is NULL, umocktypes_are_equal_unsignedint shall return -1. **]** **SRS_UMOCKTYPES_C_01_068: [** If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedint shall return 1. **]** **SRS_UMOCKTYPES_C_01_069: [** If the values pointed to by left and right are different, umocktypes_are_equal_unsignedint shall return 0. **]** ## umocktypes_copy_unsignedint ```c extern int umocktypes_copy_unsignedint(unsigned int* destination, const unsigned int* source); ``` **SRS_UMOCKTYPES_C_01_070: [** umocktypes_copy_unsignedint shall copy the unsigned int value from source to destination. **]** **SRS_UMOCKTYPES_C_01_071: [** On success umocktypes_copy_unsignedint shall return 0. **]** **SRS_UMOCKTYPES_C_01_072: [** If source or destination are NULL, umocktypes_copy_unsignedint shall return a non-zero value. **]** ## umocktypes_free_unsignedint ```c extern void umocktypes_free_unsignedint(unsigned int* value); ``` **SRS_UMOCKTYPES_C_01_073: [** umocktypes_free_unsignedint shall do nothing. **]** ## umocktypes_stringify_long ```c extern char* umocktypes_stringify_long(const long* value); ``` **SRS_UMOCKTYPES_C_01_074: [** umocktypes_stringify_long shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_075: [** If value is NULL, umocktypes_stringify_long shall return NULL. **]** **SRS_UMOCKTYPES_C_01_076: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_long shall return NULL. **]** **SRS_UMOCKTYPES_C_01_077: [** If any other error occurs when creating the string representation, umocktypes_stringify_long shall return NULL. **]** ## umocktypes_are_equal_long ```c extern int umocktypes_are_equal_long(const long* left, const long* right); ``` **SRS_UMOCKTYPES_C_01_078: [** umocktypes_are_equal_long shall compare the 2 longs pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_079: [** If any of the arguments is NULL, umocktypes_are_equal_long shall return -1. **]** **SRS_UMOCKTYPES_C_01_080: [** If the values pointed to by left and right are equal, umocktypes_are_equal_long shall return 1. **]** **SRS_UMOCKTYPES_C_01_081: [** If the values pointed to by left and right are different, umocktypes_are_equal_long shall return 0. **]** ## umocktypes_copy_long ```c extern int umocktypes_copy_long(long* destination, const long* source); ``` **SRS_UMOCKTYPES_C_01_082: [** umocktypes_copy_long shall copy the long value from source to destination. **]** **SRS_UMOCKTYPES_C_01_083: [** On success umocktypes_copy_long shall return 0. **]** **SRS_UMOCKTYPES_C_01_084: [** If source or destination are NULL, umocktypes_copy_long shall return a non-zero value. **]** ## umocktypes_free_long ```c extern void umocktypes_free_long(long* value); ``` **SRS_UMOCKTYPES_C_01_085: [** umocktypes_free_long shall do nothing. **]** ## umocktypes_stringify_unsignedlong ```c extern char* umocktypes_stringify_unsignedlong(const unsigned long* value); ``` **SRS_UMOCKTYPES_C_01_086: [** umocktypes_stringify_unsignedlong shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_087: [** If value is NULL, umocktypes_stringify_unsignedlong shall return NULL. **]** **SRS_UMOCKTYPES_C_01_088: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedlong shall return NULL. **]** **SRS_UMOCKTYPES_C_01_089: [** If any other error occurs when creating the string representation, umocktypes_stringify_unsignedlong shall return NULL. **]** ## umocktypes_are_equal_unsignedlong ```c extern int umocktypes_are_equal_unsignedlong(const unsigned long* left, const unsigned long* right); ``` **SRS_UMOCKTYPES_C_01_090: [** umocktypes_are_equal_unsignedlong shall compare the 2 unsigned longs pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_091: [** If any of the arguments is NULL, umocktypes_are_equal_unsignedlong shall return -1. **]** **SRS_UMOCKTYPES_C_01_092: [** If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedlong shall return 1. **]** **SRS_UMOCKTYPES_C_01_093: [** If the values pointed to by left and right are different, umocktypes_are_equal_unsignedlong shall return 0. **]** ## umocktypes_copy_unsignedlong ```c extern int umocktypes_copy_unsignedlong(unsigned long* destination, const unsigned long* source); ``` **SRS_UMOCKTYPES_C_01_094: [** umocktypes_copy_unsignedlong shall copy the unsigned long value from source to destination. **]** **SRS_UMOCKTYPES_C_01_095: [** On success umocktypes_copy_unsignedlong shall return 0. **]** **SRS_UMOCKTYPES_C_01_096: [** If source or destination are NULL, umocktypes_copy_unsignedlong shall return a non-zero value. **]** ## umocktypes_free_unsignedlong ```c extern void umocktypes_free_unsignedlong(unsigned long* value); ``` **SRS_UMOCKTYPES_C_01_097: [** umocktypes_free_unsignedlong shall do nothing. **]** ## umocktypes_stringify_longlong ```c extern char* umocktypes_stringify_longlong(const long long* value); ``` **SRS_UMOCKTYPES_C_01_098: [** umocktypes_stringify_longlong shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_099: [** If value is NULL, umocktypes_stringify_longlong shall return NULL. **]** **SRS_UMOCKTYPES_C_01_100: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_longlong shall return NULL. **]** **SRS_UMOCKTYPES_C_01_101: [** If any other error occurs when creating the string representation, umocktypes_stringify_longlong shall return NULL. **]** ## umocktypes_are_equal_longlong ```c extern int umocktypes_are_equal_longlong(const long long* left, const long long* right); ``` **SRS_UMOCKTYPES_C_01_102: [** umocktypes_are_equal_longlong shall compare the 2 long longs pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_103: [** If any of the arguments is NULL, umocktypes_are_equal_longlong shall return -1. **]** **SRS_UMOCKTYPES_C_01_104: [** If the values pointed to by left and right are equal, umocktypes_are_equal_longlong shall return 1. **]** **SRS_UMOCKTYPES_C_01_105: [** If the values pointed to by left and right are different, umocktypes_are_equal_longlong shall return 0. **]** ## umocktypes_copy_longlong ```c extern int umocktypes_copy_longlong(long long* destination, const long long* source); ``` **SRS_UMOCKTYPES_C_01_106: [** umocktypes_copy_longlong shall copy the long long value from source to destination. **]** **SRS_UMOCKTYPES_C_01_107: [** On success umocktypes_copy_longlong shall return 0. **]** **SRS_UMOCKTYPES_C_01_108: [** If source or destination are NULL, umocktypes_copy_longlong shall return a non-zero value. **]** ## umocktypes_free_longlong ```c extern void umocktypes_free_longlong(long long* value); ``` **SRS_UMOCKTYPES_C_01_109: [** umocktypes_free_longlong shall do nothing. **]** ## umocktypes_stringify_unsignedlonglong ```c extern char* umocktypes_stringify_unsignedlonglong(const unsigned long long* value); ``` **SRS_UMOCKTYPES_C_01_110: [** umocktypes_stringify_unsignedlonglong shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_111: [** If value is NULL, umocktypes_stringify_unsignedlonglong shall return NULL. **]** **SRS_UMOCKTYPES_C_01_112: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedlonglong shall return NULL. **]** **SRS_UMOCKTYPES_C_01_113: [** If any other error occurs when creating the string representation, umocktypes_stringify_unsignedlonglong shall return NULL. **]** ## umocktypes_are_equal_unsignedlonglong ```c extern int umocktypes_are_equal_unsignedlonglong(const unsigned long long* left, const unsigned long long* right); ``` **SRS_UMOCKTYPES_C_01_114: [** umocktypes_are_equal_unsignedlonglong shall compare the 2 unsigned long longs pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_115: [** If any of the arguments is NULL, umocktypes_are_equal_unsignedlonglong shall return -1. **]** **SRS_UMOCKTYPES_C_01_116: [** If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedlonglong shall return 1. **]** **SRS_UMOCKTYPES_C_01_117: [** If the values pointed to by left and right are different, umocktypes_are_equal_unsignedlonglong shall return 0. **]** ## umocktypes_copy_unsignedlonglong ```c extern int umocktypes_copy_unsignedlonglong(unsigned long long* destination, const unsigned long long* source); ``` **SRS_UMOCKTYPES_C_01_118: [** umocktypes_copy_unsignedlonglong shall copy the unsigned long long value from source to destination. **]** **SRS_UMOCKTYPES_C_01_119: [** On success umocktypes_copy_unsignedlonglong shall return 0. **]** **SRS_UMOCKTYPES_C_01_120: [** If source or destination are NULL, umocktypes_copy_unsignedlonglong shall return a non-zero value. **]** ## umocktypes_free_unsignedlonglong ```c extern void umocktypes_free_unsignedlonglong(unsigned long long* value); ``` **SRS_UMOCKTYPES_C_01_121: [** umocktypes_free_unsignedlonglong shall do nothing. **]** ## umocktypes_stringify_float ```c extern char* umocktypes_stringify_float(const float* value); ``` **SRS_UMOCKTYPES_C_01_122: [** umocktypes_stringify_float shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_123: [** If value is NULL, umocktypes_stringify_float shall return NULL. **]** **SRS_UMOCKTYPES_C_01_124: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_float shall return NULL. **]** **SRS_UMOCKTYPES_C_01_125: [** If any other error occurs when creating the string representation, umocktypes_stringify_float shall return NULL. **]** ## umocktypes_are_equal_float ```c extern int umocktypes_are_equal_float(const float* left, const float* right); ``` **SRS_UMOCKTYPES_C_01_126: [** umocktypes_are_equal_float shall compare the 2 floats pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_127: [** If any of the arguments is NULL, umocktypes_are_equal_float shall return -1. **]** **SRS_UMOCKTYPES_C_01_128: [** If the values pointed to by left and right are equal, umocktypes_are_equal_float shall return 1. **]** **SRS_UMOCKTYPES_C_01_129: [** If the values pointed to by left and right are different, umocktypes_are_equal_float shall return 0. **]** ## umocktypes_copy_float ```c extern int umocktypes_copy_float(float* destination, const float* source); ``` **SRS_UMOCKTYPES_C_01_130: [** umocktypes_copy_float shall copy the float value from source to destination. **]** **SRS_UMOCKTYPES_C_01_131: [** On success umocktypes_copy_float shall return 0. **]** **SRS_UMOCKTYPES_C_01_132: [** If source or destination are NULL, umocktypes_copy_float shall return a non-zero value. **]** ## umocktypes_free_float ```c extern void umocktypes_free_float(float* value); ``` **SRS_UMOCKTYPES_C_01_133: [** umocktypes_free_float shall do nothing. **]** ## umocktypes_stringify_double ```c extern char* umocktypes_stringify_double(const double* value); ``` **SRS_UMOCKTYPES_C_01_134: [** umocktypes_stringify_double shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_135: [** If value is NULL, umocktypes_stringify_double shall return NULL. **]** **SRS_UMOCKTYPES_C_01_136: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_double shall return NULL. **]** **SRS_UMOCKTYPES_C_01_137: [** If any other error occurs when creating the string representation, umocktypes_stringify_double shall return NULL. **]** ## umocktypes_are_equal_double ```c extern int umocktypes_are_equal_double(const double* left, const double* right); ``` **SRS_UMOCKTYPES_C_01_138: [** umocktypes_are_equal_double shall compare the 2 doubles pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_139: [** If any of the arguments is NULL, umocktypes_are_equal_double shall return -1. **]** **SRS_UMOCKTYPES_C_01_140: [** If the values pointed to by left and right are equal, umocktypes_are_equal_double shall return 1. **]** **SRS_UMOCKTYPES_C_01_141: [** If the values pointed to by left and right are different, umocktypes_are_equal_double shall return 0. **]** ## umocktypes_copy_double ```c extern int umocktypes_copy_double(double* destination, const double* source); ``` **SRS_UMOCKTYPES_C_01_142: [** umocktypes_copy_double shall copy the double value from source to destination. **]** **SRS_UMOCKTYPES_C_01_143: [** On success umocktypes_copy_double shall return 0. **]** **SRS_UMOCKTYPES_C_01_144: [** If source or destination are NULL, umocktypes_copy_double shall return a non-zero value. **]** ## umocktypes_free_double ```c extern void umocktypes_free_double(double* value); ``` **SRS_UMOCKTYPES_C_01_145: [** umocktypes_free_double shall do nothing. **]** ## umocktypes_stringify_longdouble ```c extern char* umocktypes_stringify_longdouble(const long double* value); ``` **SRS_UMOCKTYPES_C_01_146: [** umocktypes_stringify_longdouble shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_147: [** If value is NULL, umocktypes_stringify_longdouble shall return NULL. **]** **SRS_UMOCKTYPES_C_01_148: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_longdouble shall return NULL. **]** **SRS_UMOCKTYPES_C_01_149: [** If any other error occurs when creating the string representation, umocktypes_stringify_longdouble shall return NULL. **]** ## umocktypes_are_equal_longdouble ```c extern int umocktypes_are_equal_longdouble(const long double* left, const long double* right); ``` **SRS_UMOCKTYPES_C_01_150: [** umocktypes_are_equal_longdouble shall compare the 2 long doubles pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_151: [** If any of the arguments is NULL, umocktypes_are_equal_longdouble shall return -1. **]** **SRS_UMOCKTYPES_C_01_152: [** If the values pointed to by left and right are equal, umocktypes_are_equal_longdouble shall return 1. **]** **SRS_UMOCKTYPES_C_01_153: [** If the values pointed to by left and right are different, umocktypes_are_equal_longdouble shall return 0. **]** ## umocktypes_copy_longdouble ```c extern int umocktypes_copy_longdouble(long double* destination, const long double* source); ``` **SRS_UMOCKTYPES_C_01_154: [** umocktypes_copy_longdouble shall copy the long double value from source to destination. **]** **SRS_UMOCKTYPES_C_01_155: [** On success umocktypes_copy_longdouble shall return 0. **]** **SRS_UMOCKTYPES_C_01_156: [** If source or destination are NULL, umocktypes_copy_longdouble shall return a non-zero value. **]** ## umocktypes_free_longdouble ```c extern void umocktypes_free_longdouble(long double* value); ``` **SRS_UMOCKTYPES_C_01_157: [** umocktypes_free_longdouble shall do nothing. **]** ## umocktypes_stringify_size_t ```c extern char* umocktypes_stringify_size_t(const size_t* value); ``` **SRS_UMOCKTYPES_C_01_158: [** umocktypes_stringify_size_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_C_01_159: [** If value is NULL, umocktypes_stringify_size_t shall return NULL. **]** **SRS_UMOCKTYPES_C_01_160: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_size_t shall return NULL. **]** **SRS_UMOCKTYPES_C_01_161: [** If any other error occurs when creating the string representation, umocktypes_stringify_size_t shall return NULL. **]** ## umocktypes_are_equal_size_t ```c extern int umocktypes_are_equal_size_t(const size_t* left, const size_t* right); ``` **SRS_UMOCKTYPES_C_01_162: [** umocktypes_are_equal_size_t shall compare the 2 size_ts pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_163: [** If any of the arguments is NULL, umocktypes_are_equal_size_t shall return -1. **]** **SRS_UMOCKTYPES_C_01_164: [** If the values pointed to by left and right are equal, umocktypes_are_equal_size_t shall return 1. **]** **SRS_UMOCKTYPES_C_01_165: [** If the values pointed to by left and right are different, umocktypes_are_equal_size_t shall return 0. **]** ## umocktypes_copy_size_t ```c extern int umocktypes_copy_size_t(size_t* destination, const size_t* source); ``` **SRS_UMOCKTYPES_C_01_166: [** umocktypes_copy_size_t shall copy the size_t value from source to destination. **]** **SRS_UMOCKTYPES_C_01_167: [** On success umocktypes_copy_size_t shall return 0. **]** **SRS_UMOCKTYPES_C_01_168: [** If source or destination are NULL, umocktypes_copy_size_t shall return a non-zero value. **]** ## umocktypes_free_size_t ```c extern void umocktypes_free_size_t(size_t* value); ``` **SRS_UMOCKTYPES_C_01_169: [** umocktypes_free_size_t shall do nothing. **]** ## umocktypes_stringify_void_ptr ```c extern char* umocktypes_stringify_void_ptr(const void** value); ``` **SRS_UMOCKTYPES_C_01_170: [** umocktypes_stringify_void_ptr shall return the string representation of the value pointer. **]** **SRS_UMOCKTYPES_C_01_171: [** If value is NULL, umocktypes_stringify_void_ptr shall return NULL. **]** **SRS_UMOCKTYPES_C_01_172: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_void_ptr shall return NULL. **]** **SRS_UMOCKTYPES_C_01_173: [** If any other error occurs when creating the string representation, umocktypes_stringify_void_ptr shall return NULL. **]** ## umocktypes_are_equal_void_ptr ```c extern int umocktypes_are_equal_void_ptr(const void** left, const void** right); ``` **SRS_UMOCKTYPES_C_01_174: [** umocktypes_are_equal_void_ptr shall compare the 2 void_ptrs pointed to by left and right. **]** **SRS_UMOCKTYPES_C_01_175: [** If any of the arguments is NULL, umocktypes_are_equal_void_ptr shall return -1. **]** **SRS_UMOCKTYPES_C_01_176: [** If the values pointed to by left and right are equal, umocktypes_are_equal_void_ptr shall return 1. **]** **SRS_UMOCKTYPES_C_01_177: [** If the values pointed to by left and right are different, umocktypes_are_equal_void_ptr shall return 0. **]** ## umocktypes_copy_void_ptr ```c extern int umocktypes_copy_void_ptr(void** destination, const void** source); ``` **SRS_UMOCKTYPES_C_01_178: [** umocktypes_copy_void_ptr shall copy the void_ptr value from source to destination. **]** **SRS_UMOCKTYPES_C_01_179: [** On success umocktypes_copy_void_ptr shall return 0. **]** **SRS_UMOCKTYPES_C_01_180: [** If source or destination are NULL, umocktypes_copy_void_ptr shall return a non-zero value. **]** ## umocktypes_free_void_ptr ```c extern void umocktypes_free_void_ptr(void** value); ``` **SRS_UMOCKTYPES_C_01_181: [** umocktypes_free_void_ptr shall do nothing. **]** umocktypes_charptr_requirements.md000066400000000000000000000157671362133436400432120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umocktypes_charptr requirements # Overview umocktypes_charptr is a module that exposes out of the box functionality for char\* and const char\* types for umockc. # Exposed API ```c extern int umocktypes_charptr_register_types(void); extern char* umocktypes_stringify_charptr(const char** value); extern int umocktypes_are_equal_charptr(const char** left, const char** right); extern int umocktypes_copy_charptr(char** destination, const char** source); extern void umocktypes_free_charptr(char** value); extern char* umocktypes_stringify_const_charptr(const char** value); extern int umocktypes_are_equal_const_charptr(const char** left, const char** right); extern int umocktypes_copy_const_charptr(const char** destination, const char** source); extern void umocktypes_free_const_charptr(const char** value); ``` ## umocktypes_charptr_register_types ```c extern int umocktypes_charptr_register_types(void); ``` **SRS_UMOCKTYPES_CHARPTR_01_001: [** umocktypes_charptr_register_types shall register support for the types char\* and const char\* by using the REGISTER_UMOCK_VALUE_TYPE macro provided by umockc. **]** **SRS_UMOCKTYPES_CHARPTR_01_038: [** On success, umocktypes_charptr_register_types shall return 0. **]** **SRS_UMOCKTYPES_CHARPTR_01_039: [** If registering any of the types fails, umocktypes_charptr_register_types shall fail and return a non-zero value. **]** ## umocktypes_stringify_charptr ```c extern char* umocktypes_stringify_charptr(const char** value); ``` **SRS_UMOCKTYPES_CHARPTR_01_002: [** umocktypes_stringify_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). **]** **SRS_UMOCKTYPES_CHARPTR_01_004: [** If value is NULL, umocktypes_stringify_charptr shall return NULL. **]** **SRS_UMOCKTYPES_CHARPTR_01_003: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_charptr shall return NULL. **]** ## umocktypes_are_equal_charptr ```c extern int umocktypes_are_equal_charptr(const char** left, const char** right); ``` **SRS_UMOCKTYPES_CHARPTR_01_005: [** umocktypes_are_equal_charptr shall compare the 2 strings pointed to by left and right. **]** **SRS_UMOCKTYPES_CHARPTR_01_006: [** The comparison shall be case sensitive. **]** **SRS_UMOCKTYPES_CHARPTR_01_007: [** If left and right are equal, umocktypes_are_equal_charptr shall return 1. **]** **SRS_UMOCKTYPES_CHARPTR_01_008: [** If only one of the left and right argument is NULL, umocktypes_are_equal_charptr shall return 0. **]** **SRS_UMOCKTYPES_CHARPTR_01_009: [** If the string pointed to by left is equal to the string pointed to by right, umocktypes_are_equal_charptr shall return 1. **]** **SRS_UMOCKTYPES_CHARPTR_01_010: [** If the string pointed to by left is different than the string pointed to by right, umocktypes_are_equal_charptr shall return 0. **]** ## umocktypes_copy_charptr ```c extern int umocktypes_copy_charptr(char** destination, const char** source); ``` **SRS_UMOCKTYPES_CHARPTR_01_011: [** umocktypes_copy_charptr shall allocate a new sequence of chars by using umockalloc_malloc. **]** **SRS_UMOCKTYPES_CHARPTR_01_012: [** The number of bytes allocated shall accomodate the string pointed to by source. **]** **SRS_UMOCKTYPES_CHARPTR_01_014: [** umocktypes_copy_charptr shall copy the string pointed to by source to the newly allocated memory. **]** **SRS_UMOCKTYPES_CHARPTR_01_015: [** The newly allocated string shall be returned in the destination argument. **]** **SRS_UMOCKTYPES_CHARPTR_01_016: [** On success umocktypes_copy_charptr shall return 0. **]** **SRS_UMOCKTYPES_CHARPTR_01_013: [** If source or destination are NULL, umocktypes_copy_charptr shall return a non-zero value. **]** **SRS_UMOCKTYPES_CHARPTR_01_036: [** If allocating the memory for the new string fails, umocktypes_copy_charptr shall fail and return a non-zero value. **]** ## umocktypes_free_charptr ```c extern void umocktypes_free_charptr(char** value); ``` **SRS_UMOCKTYPES_CHARPTR_01_017: [** umocktypes_free_charptr shall free the string pointed to by value. **]** **SRS_UMOCKTYPES_CHARPTR_01_018: [** If value is NULL, umocktypes_free_charptr shall do nothing. **]** ## umocktypes_stringify_const_charptr ```c extern char* umocktypes_stringify_const_charptr(const char** value); ``` **SRS_UMOCKTYPES_CHARPTR_01_019: [** umocktypes_stringify_const_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). **]** **SRS_UMOCKTYPES_CHARPTR_01_020: [** If value is NULL, umocktypes_stringify_const_charptr shall return NULL. **]** **SRS_UMOCKTYPES_CHARPTR_01_021: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_const_charptr shall return NULL. **]** ## umocktypes_are_equal_const_charptr ```c extern int umocktypes_are_equal_const_charptr(const char** left, const char** right); ``` **SRS_UMOCKTYPES_CHARPTR_01_022: [** umocktypes_are_equal_const_charptr shall compare the 2 strings pointed to by left and right. **]** **SRS_UMOCKTYPES_CHARPTR_01_023: [** The comparison shall be case sensitive. **]** **SRS_UMOCKTYPES_CHARPTR_01_024: [** If left and right are equal, umocktypes_are_equal_const_charptr shall return 1. **]** **SRS_UMOCKTYPES_CHARPTR_01_025: [** If only one of the left and right argument is NULL, umocktypes_are_equal_const_charptr shall return 0. **]** **SRS_UMOCKTYPES_CHARPTR_01_026: [** If the string pointed to by left is equal to the string pointed to by right, umocktypes_are_equal_const_charptr shall return 1. **]** **SRS_UMOCKTYPES_CHARPTR_01_027: [** If the string pointed to by left is different than the string pointed to by right, umocktypes_are_equal_const_charptr shall return 0. **]** ## umocktypes_copy_const_charptr ```c extern int umocktypes_copy_const_charptr(const char** destination, const char** source); ``` **SRS_UMOCKTYPES_CHARPTR_01_028: [** umocktypes_copy_const_charptr shall allocate a new sequence of chars by using umockalloc_malloc. **]** **SRS_UMOCKTYPES_CHARPTR_01_029: [** The number of bytes allocated shall accomodate the string pointed to by source. **]** **SRS_UMOCKTYPES_CHARPTR_01_030: [** umocktypes_copy_const_charptr shall copy the string pointed to by source to the newly allocated memory. **]** **SRS_UMOCKTYPES_CHARPTR_01_031: [** The newly allocated string shall be returned in the destination argument. **]** **SRS_UMOCKTYPES_CHARPTR_01_032: [** On success umocktypes_copy_const_charptr shall return 0. **]** **SRS_UMOCKTYPES_CHARPTR_01_033: [** If source or destination are NULL, umocktypes_copy_const_charptr shall return a non-zero value. **]** **SRS_UMOCKTYPES_CHARPTR_01_037: [** If allocating the memory for the new string fails, umocktypes_copy_const_charptr shall fail and return a non-zero value. **]** ## umocktypes_free_const_charptr ```c extern void umocktypes_free_const_charptr(const char** value); ``` **SRS_UMOCKTYPES_CHARPTR_01_034: [** umocktypes_free_const_charptr shall free the string pointed to by value. **]** **SRS_UMOCKTYPES_CHARPTR_01_035: [** If value is NULL, umocktypes_free_const_charptr shall do nothing. **]** umocktypes_requirements.md000066400000000000000000000253511362133436400414550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umocktypes requirements # Overview umocktypes is a module that exposes a generic type interface to be used by umockc for registering various C types. Later operations are possible with these types, specifically: converting any type value to a string, comparing values, copying and freeing values. # Exposed API ```c typedef char*(*UMOCKTYPE_STRINGIFY_FUNC)(const void* value); typedef int(*UMOCKTYPE_COPY_FUNC)(void* destination, const void* source); typedef void(*UMOCKTYPE_FREE_FUNC)(void* value); typedef int(*UMOCKTYPE_ARE_EQUAL_FUNC)(const void* left, const void* right); extern int umocktypes_init(void); extern void umocktypes_deinit(void); extern int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func); extern int umocktypes_register_alias_type(const char* type, const char* is_type); extern char* umocktypes_stringify(const char* type, const void* value); extern int umocktypes_are_equal(const char* type, const void* left, const void* right); extern int umocktypes_copy(const char* type, void* destination, const void* source); extern void umocktypes_free(const char* type, void* value); ``` ## umocktypes_init ```c extern int umocktypes_init(void); ``` **SRS_UMOCKTYPES_01_001: [** umocktypes_init shall initialize the umocktypes module. **]** **SRS_UMOCKTYPES_01_002: [** After initialization the list of registered type shall be empty. **]** **SRS_UMOCKTYPES_01_003: [** On success umocktypes_init shall return 0. **]** **SRS_UMOCKTYPES_01_004: [** umocktypes_init after another umocktypes_init without deinitializing the module shall fail and return a non-zero value. **]** ## umocktypes_deinit ```c extern void umocktypes_deinit(void); ``` **SRS_UMOCKTYPES_01_005: [** umocktypes_deinit shall free all resources associated with the registered types and shall leave the module in a state where another init is possible. **]** **SRS_UMOCKTYPES_01_006: [** If the module was not initialized, umocktypes_deinit shall do nothing. **]** **SRS_UMOCKTYPES_01_040: [** An umocktypes_init call after deinit shall succeed provided all underlying calls succeed. **]** ## umocktypes_register_type ```c extern int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func); ``` **SRS_UMOCKTYPES_01_007: [** umocktypes_register_type shall register an interface made out of the stringify, are equal, copy and free functions for the type identified by the argument type. **]** **SRS_UMOCKTYPES_01_008: [** On success umocktypes_register_type shall return 0. **]** **SRS_UMOCKTYPES_01_009: [** If any of the arguments is NULL, umocktypes_register_type shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_010: [** If the type has already been registered with the same function pointers then umocktypes_register_type shall succeed and return 0. **]** **SRS_UMOCKTYPES_01_011: [** If the type has already been registered but at least one of the function pointers is different, umocktypes_register_type shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_012: [** If an error occurs allocating memory for the newly registered type, umocktypes_register_type shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_034: [** Before registering, the type string shall be normalized by calling umocktypename_normalize. **]** **SRS_UMOCKTYPES_01_045: [** If normalizing the typename fails, umocktypes_register_type shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_050: [** If umocktypes_register_type is called when the module is not initialized, umocktypes_register_type shall fail and return a non zero value. **]** ## umocktypes_register_alias_type ```c int umocktypes_register_alias_type(const char* type, const char* is_type) ``` **SRS_UMOCKTYPES_01_053: [** umocktypes_register_alias_type shall register a new alias type for the type "is_type". **]** **SRS_UMOCKTYPES_01_054: [** On success, umocktypes_register_alias_type shall return 0. **]** **SRS_UMOCKTYPES_01_055: [** If any of the arguments is NULL, umocktypes_register_alias_type shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_057: [** If is_type was not already registered, umocktypes_register_alias_type shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_058: [** Before looking it up, is_type shall be normalized by using umocktypename_normalize. **]** **SRS_UMOCKTYPES_01_059: [** Before adding it as alias, type shall be normalized by using umocktypename_normalize. **]** **SRS_UMOCKTYPES_01_060: [** If umocktypename_normalize fails, umocktypes_register_alias_type shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_061: [** If umocktypes_register_alias_type is called when the module is not initialized, umocktypes_register_type shall fail and return a non zero value. **]** **SRS_UMOCKTYPES_01_062: [** If type and is_type are the same, umocktypes_register_alias_type shall succeed and return 0. **]** ## umocktypes_stringify ```c extern char* umocktypes_stringify(const char* type, const void* value); ``` **SRS_UMOCKTYPES_01_013: [** umocktypes_stringify shall return a char\* with the string representation of the value argument. **]** **SRS_UMOCKTYPES_01_014: [** The string representation shall be obtained by calling the stringify function registered for the type identified by the argument type. **]** **SRS_UMOCKTYPES_01_015: [** On success umocktypes_stringify shall return the char\* produced by the underlying stringify function for type (passed in umocktypes_register_type). **]** **SRS_UMOCKTYPES_01_016: [** If any of the arguments is NULL, umocktypes_stringify shall fail and return NULL. **]** **SRS_UMOCKTYPES_01_017: [** If type can not be found in the registered types list maintained by the module, umocktypes_stringify shall fail and return NULL. **]** **SRS_UMOCKTYPES_01_035: [** Before looking it up, the type string shall be normalized by calling umocktypename_normalize. **]** **SRS_UMOCKTYPES_01_044: [** If normalizing the typename fails, umocktypes_stringify shall fail and return NULL. **]** **SRS_UMOCKTYPES_01_049: [** If umocktypes_stringify is called when the module is not initialized, umocktypes_stringify shall return NULL. **]** **SRS_UMOCKTYPES_01_063: [** If type is a pointer type and type was not registered then umocktypes_stringify shall execute as if type is void*. **]** ## umocktypes_are_equal ```c extern int umocktypes_are_equal(const char* type, const void* left, const void* right); ``` **SRS_UMOCKTYPES_01_018: [** umocktypes_are_equal shall evaluate whether 2 values are equal. **]** **SRS_UMOCKTYPES_01_019: [** umocktypes_are_equal shall call the underlying are_equal function for the type identified by the argument type (passed in umocktypes_register_type). **]** **SRS_UMOCKTYPES_01_020: [** If the underlying are_equal function fails,, umocktypes_are_equal shall fail and return -1. **]** **SRS_UMOCKTYPES_01_021: [** If the underlying are_equal function indicates the types are equal, umocktypes_are_equal shall return 1. **]** **SRS_UMOCKTYPES_01_022: [** If the underlying are_equal function indicates the types are not equal, umocktypes_are_equal shall return 0. **]** **SRS_UMOCKTYPES_01_023: [** If any of the arguments is NULL, umocktypes_are_equal shall fail and return -1. **]** **SRS_UMOCKTYPES_01_024: [** If type can not be found in the registered types list maintained by the module, umocktypes_are_equal shall fail and return -1. **]** **SRS_UMOCKTYPES_01_036: [** Before looking it up, the type string shall be normalized by calling umocktypename_normalize. **]** **SRS_UMOCKTYPES_01_043: [** If normalizing the typename fails, umocktypes_are_equal shall fail and return -1. **]** **SRS_UMOCKTYPES_01_046: [** If umocktypes_are_equal is called when the module is not initialized, umocktypes_are_equal shall return -1. **]** **SRS_UMOCKTYPES_01_051: [** If the pointer values for left and right are equal, umocktypes_are_equal shall return 1 without calling the underlying are_equal function. **]** **SRS_UMOCKTYPES_01_064: [** If type is a pointer type and type was not registered then umocktypes_are_equal shall execute as if type is void*. **]** ## umocktypes_copy ```c extern int umocktypes_copy(const char* type, void* destination, const void* source); ``` **SRS_UMOCKTYPES_01_025: [** umocktypes_copy shall copy the value of the source into the destination argument. **]** **SRS_UMOCKTYPES_01_026: [** The copy shall be done by calling the underlying copy function (passed in umocktypes_register_type) for the type identified by the type argument. **]** **SRS_UMOCKTYPES_01_052: [** On success, umocktypes_copy shall return 0. **]** **SRS_UMOCKTYPES_01_027: [** If any of the arguments is NULL, umocktypes_copy shall return -1. **]** **SRS_UMOCKTYPES_01_028: [** If the underlying copy fails, umocktypes_copy shall return -1. **]** **SRS_UMOCKTYPES_01_029: [** If type can not be found in the registered types list maintained by the module, umocktypes_copy shall fail and return -1. **]** **SRS_UMOCKTYPES_01_037: [** Before looking it up, the type string shall be normalized by calling umocktypename_normalize. **]** **SRS_UMOCKTYPES_01_042: [** If normalizing the typename fails, umocktypes_copy shall fail and return a non-zero value. **]** **SRS_UMOCKTYPES_01_047: [** If umocktypes_copy is called when the module is not initialized, umocktypes_copy shall fail and return a non zero value. **]** **SRS_UMOCKTYPES_01_065: [** If type is a pointer type and type was not registered then umocktypes_copy shall execute as if type is void*. **]** ## umocktypes_free ```c extern void umocktypes_free(const char* type, void* value); ``` **SRS_UMOCKTYPES_01_030: [** umocktypes_free shall free a value previously allocated with umocktypes_copy. **]** **SRS_UMOCKTYPES_01_031: [** If any of the arguments is NULL, umocktypes_free shall do nothing. **]** **SRS_UMOCKTYPES_01_033: [** The free shall be done by calling the underlying free function (passed in umocktypes_register_type) for the type identified by the type argument. **]** **SRS_UMOCKTYPES_01_032: [** If type can not be found in the registered types list maintained by the module, umocktypes_free shall do nothing. **]** **SRS_UMOCKTYPES_01_038: [** Before looking it up, the type string shall be normalized by calling umocktypename_normalize. **]** **SRS_UMOCKTYPES_01_041: [** If normalizing the typename fails, umocktypes_free shall do nothing. **]** **SRS_UMOCKTYPES_01_048: [** If umocktypes_free is called when the module is not initialized, umocktypes_free shall do nothing. **]** **SRS_UMOCKTYPES_01_066: [** If type is a pointer type and type was not registered then umocktypes_free shall execute as if type is void*. **]** umocktypes_stdint_requirements.md000066400000000000000000001040351362133436400430370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/devdoc # umocktypes_stdint requirements # Overview umocktypes_stdint is a module that exposes out of the box functionality for types defined in stdint in C99. Currently the supported types are: - integer types having certain exact widths # Exposed API ```c extern int umocktypes_c_register_types(void); #define UMOCKTYPES_STDINT_HANDLERS(type, function_postfix) \ extern char* C2(umocktypes_stringify_,function_postfix)(const type* value); \ extern int C2(umocktypes_are_equal_, function_postfix)(const type* left, const type* right); \ extern int C2(umocktypes_copy_, function_postfix)(type* destination, const type* source); \ extern void C2(umocktypes_free_, function_postfix)(type* value); UMOCKTYPES_STDINT_HANDLERS(uint8_t, uint8_t) UMOCKTYPES_STDINT_HANDLERS(int8_t, int8_t) UMOCKTYPES_STDINT_HANDLERS(uint16_t, uint16_t) UMOCKTYPES_STDINT_HANDLERS(int16_t, int16_t) UMOCKTYPES_STDINT_HANDLERS(uint32_t, uint32_t) UMOCKTYPES_STDINT_HANDLERS(int32_t, int32_t) UMOCKTYPES_STDINT_HANDLERS(uint64_t, uint64_t) UMOCKTYPES_STDINT_HANDLERS(int64_t, int64_t) UMOCKTYPES_STDINT_HANDLERS(uint_fast8_t, uint_fast8_t) UMOCKTYPES_STDINT_HANDLERS(int_fast8_t, int_fast8_t) UMOCKTYPES_STDINT_HANDLERS(uint_fast16_t, uint_fast16_t) UMOCKTYPES_STDINT_HANDLERS(int_fast16_t, int_fast16_t) UMOCKTYPES_STDINT_HANDLERS(uint_fast32_t, uint_fast32_t) UMOCKTYPES_STDINT_HANDLERS(int_fast32_t, int_fast32_t) UMOCKTYPES_STDINT_HANDLERS(uint_fast64_t, uint_fast64_t) UMOCKTYPES_STDINT_HANDLERS(int_fast64_t, int_fast64_t) ``` ## umocktypes_stdint_register_types ```c extern int umocktypes_stdint_register_types(void); ``` **SRS_UMOCKTYPES_STDINT_01_001: [** umocktypes_stdint_register_types shall register support for all the types in the module. **]** **SRS_UMOCKTYPES_STDINT_01_002: [** On success, umocktypes_stdint_register_types shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_003: [** If registering any of the types fails, umocktypes_stdint_register_types shall fail and return a non-zero value. **]** ## umocktypes_stringify_uint8_t ```c extern char* umocktypes_stringify_uint8_t(const uint8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_004: [** umocktypes_stringify_uint8_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_005: [** If value is NULL, umocktypes_stringify_uint8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_006: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_007: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint8_t shall return NULL. **]** ## umocktypes_are_equal_uint8_t ```c extern int umocktypes_are_equal_uint8_t(const uint8_t* left, const uint8_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_008: [** umocktypes_are_equal_uint8_t shall compare the 2 uint8_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_009: [** If any of the arguments is NULL, umocktypes_are_equal_uint8_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_010: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint8_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_011: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint8_t shall return 0. **]** ## umocktypes_copy_uint8_t ```c extern int umocktypes_copy_uint8_t(uint8_t* destination, const uint8_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_012: [** umocktypes_copy_uint8_t shall copy the uint8_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_013: [** On success umocktypes_copy_uint8_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_014: [** If source or destination are NULL, umocktypes_copy_uint8_t shall return a non-zero value. **]** ## umocktypes_free_uint8_t ```c extern void umocktypes_free_uint8_t(uint8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_015: [** umocktypes_free_uint8_t shall do nothing. **]** ## umocktypes_stringify_int8_t ```c extern char* umocktypes_stringify_int8_t(const int8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_016: [** umocktypes_stringify_int8_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_017: [** If value is NULL, umocktypes_stringify_int8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_018: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_019: [** If any other error occurs when creating the string representation, umocktypes_stringify_int8_t shall return NULL. **]** ## umocktypes_are_equal_int8_t ```c extern int umocktypes_are_equal_int8_t(const int8_t* left, const int8_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_020: [** umocktypes_are_equal_int8_t shall compare the 2 int8_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_021: [** If any of the arguments is NULL, umocktypes_are_equal_int8_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_022: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int8_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_023: [** If the values pointed to by left and right are different, umocktypes_are_equal_int8_t shall return 0. **]** ## umocktypes_copy_int8_t ```c extern int umocktypes_copy_int8_t(int8_t* destination, const int8_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_024: [** umocktypes_copy_int8_t shall copy the int8_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_025: [** On success umocktypes_copy_int8_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_026: [** If source or destination are NULL, umocktypes_copy_int8_t shall return a non-zero value. **]** ## umocktypes_free_int8_t ```c extern void umocktypes_free_int8_t(int8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_027: [** umocktypes_free_int8_t shall do nothing. **]** ## umocktypes_stringify_uint16_t ```c extern char* umocktypes_stringify_uint16_t(const uint16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_028: [** umocktypes_stringify_uint16_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_029: [** If value is NULL, umocktypes_stringify_uint16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_030: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_031: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint16_t shall return NULL. **]** ## umocktypes_are_equal_uint16_t ```c extern int umocktypes_are_equal_uint16_t(const uint16_t* left, const uint16_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_032: [** umocktypes_are_equal_uint16_t shall compare the 2 uint16_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_033: [** If any of the arguments is NULL, umocktypes_are_equal_uint16_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_034: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint16_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_035: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint16_t shall return 0. **]** ## umocktypes_copy_uint16_t ```c extern int umocktypes_copy_uint16_t(uint16_t* destination, const uint16_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_036: [** umocktypes_copy_uint16_t shall copy the uint16_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_037: [** On success umocktypes_copy_uint16_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_038: [** If source or destination are NULL, umocktypes_copy_uint16_t shall return a non-zero value. **]** ## umocktypes_free_uint16_t ```c extern void umocktypes_free_uint16_t(uint16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_039: [** umocktypes_free_uint16_t shall do nothing. **]** ## umocktypes_stringify_int16_t ```c extern char* umocktypes_stringify_int16_t(const int16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_040: [** umocktypes_stringify_int16_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_041: [** If value is NULL, umocktypes_stringify_int16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_042: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_043: [** If any other error occurs when creating the string representation, umocktypes_stringify_int16_t shall return NULL. **]** ## umocktypes_are_equal_int16_t ```c extern int umocktypes_are_equal_int16_t(const int16_t* left, const int16_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_044: [** umocktypes_are_equal_int16_t shall compare the 2 int16_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_045: [** If any of the arguments is NULL, umocktypes_are_equal_int16_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_046: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int16_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_047: [** If the values pointed to by left and right are different, umocktypes_are_equal_int16_t shall return 0. **]** ## umocktypes_copy_int16_t ```c extern int umocktypes_copy_int16_t(int16_t* destination, const int16_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_048: [** umocktypes_copy_int16_t shall copy the int16_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_049: [** On success umocktypes_copy_int16_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_050: [** If source or destination are NULL, umocktypes_copy_int16_t shall return a non-zero value. **]** ## umocktypes_free_int16_t ```c extern void umocktypes_free_int16_t(int16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_051: [** umocktypes_free_int16_t shall do nothing. **]** ## umocktypes_stringify_uint32_t ```c extern char* umocktypes_stringify_uint32_t(const uint32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_052: [** umocktypes_stringify_uint32_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_053: [** If value is NULL, umocktypes_stringify_uint32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_054: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_055: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint32_t shall return NULL. **]** ## umocktypes_are_equal_uint32_t ```c extern int umocktypes_are_equal_uint32_t(const uint32_t* left, const uint32_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_056: [** umocktypes_are_equal_uint32_t shall compare the 2 uint32_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_057: [** If any of the arguments is NULL, umocktypes_are_equal_uint32_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_058: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint32_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_059: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint32_t shall return 0. **]** ## umocktypes_copy_uint32_t ```c extern int umocktypes_copy_uint32_t(uint32_t* destination, const uint32_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_060: [** umocktypes_copy_uint32_t shall copy the uint32_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_061: [** On success umocktypes_copy_uint32_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_062: [** If source or destination are NULL, umocktypes_copy_uint32_t shall return a non-zero value. **]** ## umocktypes_free_uint32_t ```c extern void umocktypes_free_uint32_t(uint32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_063: [** umocktypes_free_uint32_t shall do nothing. **]** ## umocktypes_stringify_int32_t ```c extern char* umocktypes_stringify_int32_t(const int32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_064: [** umocktypes_stringify_int32_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_065: [** If value is NULL, umocktypes_stringify_int32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_066: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_067: [** If any other error occurs when creating the string representation, umocktypes_stringify_int32_t shall return NULL. **]** ## umocktypes_are_equal_int32_t ```c extern int umocktypes_are_equal_int32_t(const int32_t* left, const int32_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_068: [** umocktypes_are_equal_int32_t shall compare the 2 int32_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_069: [** If any of the arguments is NULL, umocktypes_are_equal_int32_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_070: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int32_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_071: [** If the values pointed to by left and right are different, umocktypes_are_equal_int32_t shall return 0. **]** ## umocktypes_copy_int32_t ```c extern int umocktypes_copy_int32_t(int32_t* destination, const int32_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_072: [** umocktypes_copy_int32_t shall copy the int32_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_073: [** On success umocktypes_copy_int32_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_074: [** If source or destination are NULL, umocktypes_copy_int32_t shall return a non-zero value. **]** ## umocktypes_free_int32_t ```c extern void umocktypes_free_int32_t(int32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_075: [** umocktypes_free_int32_t shall do nothing. **]** ## umocktypes_stringify_uint64_t ```c extern char* umocktypes_stringify_uint64_t(const uint64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_076: [** umocktypes_stringify_uint64_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_077: [** If value is NULL, umocktypes_stringify_uint64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_078: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_079: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint64_t shall return NULL. **]** ## umocktypes_are_equal_uint64_t ```c extern int umocktypes_are_equal_uint64_t(const uint64_t* left, const uint64_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_080: [** umocktypes_are_equal_uint64_t shall compare the 2 uint64_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_081: [** If any of the arguments is NULL, umocktypes_are_equal_uint64_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_082: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint64_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_083: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint64_t shall return 0. **]** ## umocktypes_copy_uint64_t ```c extern int umocktypes_copy_uint64_t(uint64_t* destination, const uint64_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_084: [** umocktypes_copy_uint64_t shall copy the uint64_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_085: [** On success umocktypes_copy_uint64_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_086: [** If source or destination are NULL, umocktypes_copy_uint64_t shall return a non-zero value. **]** ## umocktypes_free_uint64_t ```c extern void umocktypes_free_uint64_t(uint64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_087: [** umocktypes_free_uint64_t shall do nothing. **]** ## umocktypes_stringify_int64_t ```c extern char* umocktypes_stringify_int64_t(const int64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_088: [** umocktypes_stringify_int64_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_089: [** If value is NULL, umocktypes_stringify_int64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_090: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_091: [** If any other error occurs when creating the string representation, umocktypes_stringify_int64_t shall return NULL. **]** ## umocktypes_are_equal_int64_t ```c extern int umocktypes_are_equal_int64_t(const int64_t* left, const int64_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_092: [** umocktypes_are_equal_int64_t shall compare the 2 int64_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_093: [** If any of the arguments is NULL, umocktypes_are_equal_int64_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_094: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int64_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_095: [** If the values pointed to by left and right are different, umocktypes_are_equal_int64_t shall return 0. **]** ## umocktypes_copy_int64_t ```c extern int umocktypes_copy_int64_t(int64_t* destination, const int64_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_096: [** umocktypes_copy_int64_t shall copy the int64_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_097: [** On success umocktypes_copy_int64_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_098: [** If source or destination are NULL, umocktypes_copy_int64_t shall return a non-zero value. **]** ## umocktypes_free_int64_t ```c extern void umocktypes_free_int64_t(int64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_099: [** umocktypes_free_int64_t shall do nothing. **]** ## umocktypes_stringify_uint_fast8_t ```c extern char* umocktypes_stringify_uint_fast8_t(const uint_fast8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_100: [** umocktypes_stringify_uint_fast8_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_101: [** If value is NULL, umocktypes_stringify_uint_fast8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_102: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint_fast8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_103: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint_fast8_t shall return NULL. **]** ## umocktypes_are_equal_uint_fast8_t ```c extern int umocktypes_are_equal_uint_fast8_t(const uint_fast8_t* left, const uint_fast8_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_104: [** umocktypes_are_equal_uint_fast8_t shall compare the 2 uint_fast8_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_105: [** If any of the arguments is NULL, umocktypes_are_equal_uint_fast8_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_106: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint_fast8_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_107: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint_fast8_t shall return 0. **]** ## umocktypes_copy_uint_fast8_t ```c extern int umocktypes_copy_uint_fast8_t(uint_fast8_t* destination, const uint_fast8_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_108: [** umocktypes_copy_uint_fast8_t shall copy the uint_fast8_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_109: [** On success umocktypes_copy_uint_fast8_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_110: [** If source or destination are NULL, umocktypes_copy_uint_fast8_t shall return a non-zero value. **]** ## umocktypes_free_uint_fast8_t ```c extern void umocktypes_free_uint_fast8_t(uint_fast8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_111: [** umocktypes_free_uint_fast8_t shall do nothing. **]** ## umocktypes_stringify_uint_fast8_t ```c extern char* umocktypes_stringify_int_fast8_t(const int_fast8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_112: [** umocktypes_stringify_int_fast8_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_113: [** If value is NULL, umocktypes_stringify_int_fast8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_114: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int_fast8_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_115: [** If any other error occurs when creating the string representation, umocktypes_stringify_int_fast8_t shall return NULL. **]** ## umocktypes_are_equal_int_fast8_t ```c extern int umocktypes_are_equal_int_fast8_t(const int_fast8_t* left, const int_fast8_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_116: [** umocktypes_are_equal_int_fast8_t shall compare the 2 int_fast8_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_117: [** If any of the arguments is NULL, umocktypes_are_equal_int_fast8_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_118: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int_fast8_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_119: [** If the values pointed to by left and right are different, umocktypes_are_equal_int_fast8_t shall return 0. **]** ## umocktypes_copy_int_fast8_t ```c extern int umocktypes_copy_int_fast8_t(int_fast8_t* destination, const int_fast8_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_120: [** umocktypes_copy_int_fast8_t shall copy the int_fast8_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_121: [** On success umocktypes_copy_int_fast8_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_122: [** If source or destination are NULL, umocktypes_copy_int_fast8_t shall return a non-zero value. **]** ## umocktypes_free_int_fast8_t ```c extern void umocktypes_free_int_fast8_t(int_fast8_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_123: [** umocktypes_free_int_fast8_t shall do nothing. **]** ## umocktypes_stringify_uint_fast16_t ```c extern char* umocktypes_stringify_uint_fast16_t(const uint_fast16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_124: [** umocktypes_stringify_uint_fast16_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_125: [** If value is NULL, umocktypes_stringify_uint_fast16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_126: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint_fast16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_127: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint_fast16_t shall return NULL. **]** ## umocktypes_are_equal_uint_fast16_t ```c extern int umocktypes_are_equal_uint_fast16_t(const uint_fast16_t* left, const uint_fast16_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_128: [** umocktypes_are_equal_uint_fast16_t shall compare the 2 uint_fast16_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_129: [** If any of the arguments is NULL, umocktypes_are_equal_uint_fast16_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_130: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint_fast16_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_131: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint_fast16_t shall return 0. **]** ## umocktypes_copy_uint_fast16_t ```c extern int umocktypes_copy_uint_fast16_t(uint_fast16_t* destination, const uint_fast16_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_132: [** umocktypes_copy_uint_fast16_t shall copy the uint_fast16_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_133: [** On success umocktypes_copy_uint_fast16_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_134: [** If source or destination are NULL, umocktypes_copy_uint_fast16_t shall return a non-zero value. **]** ## umocktypes_free_uint_fast16_t ```c extern void umocktypes_free_uint_fast16_t(uint_fast16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_135: [** umocktypes_free_uint_fast16_t shall do nothing. **]** ## umocktypes_stringify_int_fast16_t ```c extern char* umocktypes_stringify_int_fast16_t(const int_fast16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_136: [** umocktypes_stringify_int_fast16_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_137: [** If value is NULL, umocktypes_stringify_int_fast16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_138: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int_fast16_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_139: [** If any other error occurs when creating the string representation, umocktypes_stringify_int_fast16_t shall return NULL. **]** ## umocktypes_are_equal_int_fast16_t ```c extern int umocktypes_are_equal_int_fast16_t(const int_fast16_t* left, const int_fast16_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_140: [** umocktypes_are_equal_int_fast16_t shall compare the 2 int_fast16_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_141: [** If any of the arguments is NULL, umocktypes_are_equal_int_fast16_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_142: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int_fast16_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_143: [** If the values pointed to by left and right are different, umocktypes_are_equal_int_fast16_t shall return 0. **]** ## umocktypes_copy_int_fast16_t ```c extern int umocktypes_copy_int_fast16_t(int_fast16_t* destination, const int_fast16_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_144: [** umocktypes_copy_int_fast16_t shall copy the int_fast16_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_145: [** On success umocktypes_copy_int_fast16_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_146: [** If source or destination are NULL, umocktypes_copy_int_fast16_t shall return a non-zero value. **]** ## umocktypes_free_int_fast16_t ```c extern void umocktypes_free_int_fast16_t(int_fast16_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_147: [** umocktypes_free_int_fast16_t shall do nothing. **]** ## umocktypes_stringify_uint_fast32_t ```c extern char* umocktypes_stringify_uint_fast32_t(const uint_fast32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_148: [** umocktypes_stringify_uint_fast32_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_149: [** If value is NULL, umocktypes_stringify_uint_fast32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_150: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint_fast32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_151: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint_fast32_t shall return NULL. **]** ## umocktypes_are_equal_uint_fast32_t ```c extern int umocktypes_are_equal_uint_fast32_t(const uint_fast32_t* left, const uint_fast32_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_152: [** umocktypes_are_equal_uint_fast32_t shall compare the 2 uint_fast32_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_153: [** If any of the arguments is NULL, umocktypes_are_equal_uint_fast32_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_154: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint_fast32_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_155: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint_fast32_t shall return 0. **]** ## umocktypes_copy_uint_fast32_t ```c extern int umocktypes_copy_uint_fast32_t(uint_fast32_t* destination, const uint_fast32_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_156: [** umocktypes_copy_uint_fast32_t shall copy the uint_fast32_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_157: [** On success umocktypes_copy_uint_fast32_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_158: [** If source or destination are NULL, umocktypes_copy_uint_fast32_t shall return a non-zero value. **]** ## umocktypes_free_uint_fast32_t ```c extern void umocktypes_free_uint_fast32_t(uint_fast32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_159: [** umocktypes_free_uint_fast32_t shall do nothing. **]** ## umocktypes_stringify_int_fast32_t ```c extern char* umocktypes_stringify_int_fast32_t(const int_fast32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_160: [** umocktypes_stringify_int_fast32_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_161: [** If value is NULL, umocktypes_stringify_int_fast32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_162: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int_fast32_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_163: [** If any other error occurs when creating the string representation, umocktypes_stringify_int_fast32_t shall return NULL. **]** ## umocktypes_are_equal_int_fast32_t ```c extern int umocktypes_are_equal_int_fast32_t(const int_fast32_t* left, const int_fast32_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_164: [** umocktypes_are_equal_int_fast32_t shall compare the 2 int_fast32_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_165: [** If any of the arguments is NULL, umocktypes_are_equal_int_fast32_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_166: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int_fast32_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_167: [** If the values pointed to by left and right are different, umocktypes_are_equal_int_fast32_t shall return 0. **]** ## umocktypes_copy_int_fast32_t ```c extern int umocktypes_copy_int_fast32_t(int_fast32_t* destination, const int_fast32_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_168: [** umocktypes_copy_int_fast32_t shall copy the int_fast32_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_169: [** On success umocktypes_copy_int_fast32_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_170: [** If source or destination are NULL, umocktypes_copy_int_fast32_t shall return a non-zero value. **]** ## umocktypes_free_int_fast32_t ```c extern void umocktypes_free_int_fast32_t(int_fast32_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_171: [** umocktypes_free_int_fast32_t shall do nothing. **]** ## umocktypes_stringify_uint_fast64_t ```c extern char* umocktypes_stringify_uint_fast64_t(const uint_fast64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_172: [** umocktypes_stringify_uint_fast64_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_173: [** If value is NULL, umocktypes_stringify_uint_fast64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_174: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_uint_fast64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_175: [** If any other error occurs when creating the string representation, umocktypes_stringify_uint_fast64_t shall return NULL. **]** ## umocktypes_are_equal_uint_fast64_t ```c extern int umocktypes_are_equal_uint_fast64_t(const uint_fast64_t* left, const uint_fast64_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_176: [** umocktypes_are_equal_uint_fast64_t shall compare the 2 uint_fast64_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_177: [** If any of the arguments is NULL, umocktypes_are_equal_uint_fast64_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_178: [** If the values pointed to by left and right are equal, umocktypes_are_equal_uint_fast64_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_179: [** If the values pointed to by left and right are different, umocktypes_are_equal_uint_fast64_t shall return 0. **]** ## umocktypes_copy_uint_fast64_t ```c extern int umocktypes_copy_uint_fast64_t(uint_fast64_t* destination, const uint_fast64_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_180: [** umocktypes_copy_uint_fast64_t shall copy the uint_fast64_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_181: [** On success umocktypes_copy_uint_fast64_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_182: [** If source or destination are NULL, umocktypes_copy_uint_fast64_t shall return a non-zero value. **]** ## umocktypes_free_uint_fast64_t ```c extern void umocktypes_free_uint_fast64_t(uint_fast64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_183: [** umocktypes_free_uint_fast64_t shall do nothing. **]** ## umocktypes_stringify_int_fast64_t ```c extern char* umocktypes_stringify_int_fast64_t(const int_fast64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_184: [** umocktypes_stringify_int_fast64_t shall return the string representation of value. **]** **SRS_UMOCKTYPES_STDINT_01_185: [** If value is NULL, umocktypes_stringify_int_fast64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_186: [** If allocating a new string to hold the string representation fails, umocktypes_stringify_int_fast64_t shall return NULL. **]** **SRS_UMOCKTYPES_STDINT_01_187: [** If any other error occurs when creating the string representation, umocktypes_stringify_int_fast64_t shall return NULL. **]** ## umocktypes_are_equal_int_fast64_t ```c extern int umocktypes_are_equal_int_fast64_t(const int_fast64_t* left, const int_fast64_t* right); ``` **SRS_UMOCKTYPES_STDINT_01_188: [** umocktypes_are_equal_int_fast64_t shall compare the 2 int_fast64_t values pointed to by left and right. **]** **SRS_UMOCKTYPES_STDINT_01_189: [** If any of the arguments is NULL, umocktypes_are_equal_int_fast64_t shall return -1. **]** **SRS_UMOCKTYPES_STDINT_01_190: [** If the values pointed to by left and right are equal, umocktypes_are_equal_int_fast64_t shall return 1. **]** **SRS_UMOCKTYPES_STDINT_01_191: [** If the values pointed to by left and right are different, umocktypes_are_equal_int_fast64_t shall return 0. **]** ## umocktypes_copy_int_fast64_t ```c extern int umocktypes_copy_int_fast64_t(int_fast64_t* destination, const int_fast64_t* source); ``` **SRS_UMOCKTYPES_STDINT_01_192: [** umocktypes_copy_int_fast64_t shall copy the int_fast64_t value from source to destination. **]** **SRS_UMOCKTYPES_STDINT_01_193: [** On success umocktypes_copy_int_fast64_t shall return 0. **]** **SRS_UMOCKTYPES_STDINT_01_194: [** If source or destination are NULL, umocktypes_copy_int_fast64_t shall return a non-zero value. **]** ## umocktypes_free_int_fast64_t ```c extern void umocktypes_free_int_fast64_t(int_fast64_t* value); ``` **SRS_UMOCKTYPES_STDINT_01_195: [** umocktypes_free_int_fast64_t shall do nothing. **]** azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/doc/000077500000000000000000000000001362133436400334775ustar00rootroot00000000000000umock_c.md000066400000000000000000001045471362133436400353750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/doc# umock_c # Overview umock_c is a C mocking library that exposes APIs to allow: - defining mock functions, - recording expected calls - comparing expected calls with actual calls. On top of the basic functionality, additional convenience features like modifiers on expected calls are provided. # Simple example A test written with umock_c looks like below: Let's assume unit A depends on unit B. unit B has a function called test_dependency_1_arg. In unit B's header one would write: ```c #include "umock_prod.h" MOCKABLE_FUNCTION(, int, test_dependency_1_arg, int, a); ``` Let's assume unit A has a function called function_under_test. ```c int function_under_test(); { int result = test_dependency_1_arg(x); return result; } ``` A test that checks that function_under_test calls its dependency and injects a return value, while ignoring all arguments on the call looks like this: ```c TEST_FUNCTION(my_first_test) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(44) .IgnoreAllArguments(); // act int result = function_under_test(); // assert ASSERT_ARE_EQUAL(int, 44, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } ``` # Exposed API (umock_c.h) ```c #define UMOCK_C_ERROR_CODE_VALUES \ UMOCK_C_ARG_INDEX_OUT_OF_RANGE, \ UMOCK_C_MALLOC_ERROR, \ UMOCK_C_INVALID_ARGUMENT_BUFFER, \ UMOCK_C_COMPARE_CALL_ERROR, \ UMOCK_C_RESET_CALLS_ERROR, \ UMOCK_C_CAPTURE_RETURN_ALREADY_USED, \ UMOCK_C_NULL_ARGUMENT, \ UMOCK_C_INVALID_PAIRED_CALLS, \ UMOCK_C_COPY_ARGUMENT_ERROR, \ UMOCK_C_ERROR DEFINE_ENUM(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) #define IGNORED_PTR_ARG (NULL) #define IGNORED_NUM_ARG (0) #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ ... #define REGISTER_GLOBAL_MOCK_HOOK(mock_function, mock_hook_function) \ ... #define REGISTER_GLOBAL_MOCK_RETURN(mock_function, return_value) \ ... #define REGISTER_GLOBAL_MOCK_FAIL_RETURN(mock_function, fail_return_value) \ ... #define REGISTER_GLOBAL_MOCK_RETURNS(mock_function, return_value, fail_return_value) \ ... ... #define STRICT_EXPECTED_CALL(call) \ ... #define EXPECTED_CALL(call) \ ... extern int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); extern void umock_c_deinit(void); extern void umock_c_reset_all_calls(void); extern const char* umock_c_get_actual_calls(void); extern const char* umock_c_get_expected_calls(void); ``` ## Mock definitions API ### MOCKABLE_FUNCTION ```c MOCKABLE_FUNCTION(modifiers, result, function, ...) ``` MOCKABLE_FUNCTION shall be used to wrap function definition allow the user to declare a function that can be mocked. The macro shall generate a function signature in case ENABLE_MOCKS is not defined. Example: ```c MOCKABLE_FUNCTION(FAR, int, test_function, int, arg1) ``` should generate for production code: ```c int FAR test_function(int arg1); ``` ### MOCK_FUNCTION_WITH_CODE MOCK_FUNCTION_WITH_CODE shall define a mock function and allow the user to embed code between this define and a MOCK_FUNCTION_END call. ```c MOCK_FUNCTION_WITH_CODE(, void, test_mock_function_with_code_1_arg, int, a); int some_value = 42; /* more code here */ MOCK_FUNCTION_END() ``` ### ENABLE_MOCKS If ENABLE_MOCKS is defined, MOCKABLE_FUNCTION shall generate the declaration of the function and code for the mocked function, thus allowing setting up of expectations in test functions. If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function. ENABLE_MOCKS should be used in the translation unit that contains the tests just before including the headers for all the units that the code under test depends on. Example: ```c #include // ... other various includes #define ENABLE_MOCKS #include "test_dependency.h" // ... tests ``` Note that it is possible (and sometimes necessary) to undefine ENABLE_MOCKS: ```c #include // ... other various includes #define ENABLE_MOCKS #include "test_dependency.h" #undef ENABLE_MOCKS #include "unit_under_test.h" // ... tests ``` ### ENABLE_MOCK_FILTERING `ENABLE_MOCK_FILTERING` is a define that allows specifying that only some of the functions that are mockable be actually mocked. This is usefull when it is not desired to generate mock functions for all the functions declared in a header. This is specially useful if a header contains a huge number of functions and only a small subset of those are actually used by the module under test. Be nice to the framework, say please! Each of the functions that are to be mocked have to be flagged by a #define, like below: ```c #define please_mock_the_mocked_one MOCK_ENABLED ``` ### UMOCK_STATIC If you intend to add several units under test into the same test library, the inclusion of the same dependency will result in symbol collisions of the mock functions. A way to get around this is to define UMOCK_STATIC as follows ```c #include // ... other various includes // enable emitting static mocks #define UMOCK_STATIC static #define ENABLE_MOCKS #include "test_dependency.h" #undef ENABLE_MOCKS #include "unit_under_test.h" #define ENABLE_MOCKS // include unit under test source to make it see static mocks #include "unit_under_test.c" // ... tests ``` before including dependencies. This will cause MOCK_FUNCTION macro to generate static mocks, which avoids symbol collisions if the dependency is included in other unit test .c files in the same library. Using this technique, it is however also important to #include the unit under test source into the unit test compilation unit, so as to make it able to see the generated mocks as shown in above code sample. ## umock init/deinit ### umock_c_init ```c int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); ``` umock_c_init is needed before performing any action related to umock_c calls (or registering any types). umock_c_init shall initialize umock_c. umock_c_init called if already initialized shall fail and return a non-zero value. umock_c_init shall initialize the umock supported types (C native types). on_umock_c_error can be NULL. If on_umock_c_error is non-NULL it shall be saved for later use (to be invoked whenever an umock_c error needs to be signaled to the user). ### umock_c_deinit ```c void umock_c_deinit(void); ``` umock_c_deinit shall free all umock_c used resources. If umock_c was not initialized, umock_c_deinit shall do nothing. ## Expected calls recording API ### STRICT_EXPECTED_CALL ```c STRICT_EXPECTED_CALL(call) ``` STRICT_EXPECTED_CALL shall record that a certain call is expected. For each argument the argument value shall be stored for later comparison with actual calls. The call argument shall be the complete function invocation. Examples: ```c STRICT_EXPECTED_CALL(test_dependency_1_arg(42)); STRICT_EXPECTED_CALL(test_dependency_string("test")); ``` ### EXPECTED_CALL ```c EXPECTED_CALL(call) ``` EXPECTED_CALL shall record that a certain call is expected. No arguments shall be saved by default, unless other modifiers state it. The call argument shall be the complete function invocation. Example: ```c EXPECTED_CALL(test_dependency_1_arg(42)); ``` ## Call comparison API ### umock_c_reset_all_calls ```c void umock_c_reset_all_calls(void); ``` umock_c_reset_all_calls shall reset all calls (actual and expected). In case of any error, umock_c_reset_all_calls shall indicate the error through a call to the on_error callback. ### umock_c_get_expected_calls ```c const char* umock_c_get_expected_calls(void); ``` umock_c_get_expected_calls shall return all the calls that were expected, but were not fulfilled. For each call, the format shall be "functionName(argument 1 value, ...)". Each call shall be enclosed in "[]". Example: For a call with the signature: ```c int test_dependency_2_args(int a, int b) ``` if an expected call was recorded: ```c STRICT_EXPECTED_CALL(test_dependency_2_args(42, 1)); ``` umock_c_get_expected_calls would return: ```c "[test_dependency_2_args(42,1)]" ``` ### umock_c_get_actual_calls ```c const char* umock_c_get_actual_calls(void); ``` umock_c_get_actual_calls shall return all the actual calls that were not matched to expected calls. For each call, the format shall be "functionName(argument 1 value, ...)". Each call shall be enclosed in "[]". A call to umock_c_get_actual_calls shall not modify the actual calls that were recorded. Example: For a call with the signature: ```c int test_dependency_2_args(int a, int b) ``` if an actual call was recorded: ```c test_dependency_2_args(42, 2); ``` umock_c_get_actual_calls would return: ```c "[test_dependency_2_args(42,2)]" ``` ### Call comparison rules umock_c shall compare calls in order. That means that "[A()][B()]" is different than "[B()][A()]". When multiple return values are set for a mock function by using different means, the following order shall be in effect: - If a return value has been specified for an expected call then that value shall be returned. - If a global mock hook has been specified then it shall be called and its result returned. - If a global return value has been specified then it shall be returned. - Otherwise the value of a static variable of the same type as the return type shall be returned. If call comparison fails an error shall be indicated by calling the error callback with UMOCK_C_COMPARE_CALL_ERROR. ## Supported types ### Out of the box Out of the box umock_c shall support the following types through the header umocktypes_c.h: - char - unsigned char - short - unsigned short - int - unsigned int - long - unsigned long - long long - unsigned long long - float - double - long double - size_t - void* - const void* ### Pointer types If no custom handler has beed registered for a pointer type, it shall be trated as void*. ### Custom types Custom types, like structures shall be supported by allowing the user to define a set of functions that can be used by umock_c to operate with these types. Five functions shall be provided to umock_c: - A stringify function. This function shall return the string representation of a value of the given type. - An are_equal function. This function shall compare 2 values of the given type and return an int indicating whether they are equal (1 means equal, 0 means different). - A copy function. This function shall make a copy of a value for the given type. - A free function. This function shall free a copied value. #### umockvalue_stringify_type ```c char* umockvalue_stringify_{type}(const {type}* value) ``` A stringify function shall allocate using malloc a char\* and fill it with a string representation of value. If any error is encountered during building the string representation, umockvalue_stringify_type shall return NULL. Example: ```c char* umockvalue_stringify_int(const int* value) { char* result; if (value == NULL) { result = NULL; } else { char temp_buffer[32]; int length = sprintf(temp_buffer, "%d", *value); if (length < 0) { result = NULL; } else { result = (char*)malloc(length + 1); if (result != NULL) { memcpy(result, temp_buffer, length + 1); } } } return result; } ``` #### umockvalue_are_equal_type ```c int umockvalue_are_equal_{type}(const {type}* left, const {type}* right) ``` The umockvalue_are_equal_type function shall return 1 if the 2 values are equal and 0 if they are not. If both left and right are NULL, umockvalue_are_equal_type shall return 1. If only one of left and right is NULL, umockvalue_are_equal_{type} shall return 0. Example: ```c int umockvalue_are_equal_int(const int* left, const int* right) { int result; if (left == right) { result = 1; } else if ((left == NULL) || (right == NULL)) { result = 0; } else { result = ((*left) == (*right)) ? 1 : 0; } return result; } ``` #### umockvalue_copy_type ```c int umockvalue_copy_{type}({type}* destination, const {type}* source) ``` The umockvalue_copy_type function shall copy the value from source to destination. On success umockvalue_copy_type shall return 0. If any of the arguments is NULL, umockvalue_copy_type shall return a non-zero value. If any error occurs during copying the value, umockvalue_copy_type shall return a non-zero value. Example: ```c int umockvalue_copy_int(int* destination, const int* source) { int result; if ((destination == NULL) || (source == NULL)) { result = __LINE__; } else { *destination = *source; result = 0; } return result; } ``` #### umockvalue_free_type ```c void umockvalue_free_{type}({type}* value) ``` The umockvalue_free_type function shall free a value previously copied using umockvalue_copy_type. If value is NULL, no free shall be performed. Example: ```c void umockvalue_free_int(int* value) { /* no free required for int */ } ``` ### Custom enum types #### IMPLEMENT_UMOCK_C_ENUM_TYPE ```c IMPLEMENT_UMOCK_C_ENUM_TYPE(type, ...) ``` IMPLEMENT_UMOCK_C_ENUM_TYPE shall implement umock_c handlers for an enum type. The variable arguments are a list making up the enum values. If a value that is not part of the enum is used, it shall be treated as an int value. Note: IMPLEMENT_UMOCK_C_ENUM_TYPE only generates the handlers, registering the handlers still has to be done by using the macro REGISTER_UMOCK_VALUE_TYPE. Example: ```c IMPLEMENT_UMOCK_C_ENUM_TYPE(my_enum, enum_value1, enum_value2) ``` This provides the handlers (stringify, are_equal, etc.) for the below C enum: ```c typedef enum my_enum_tag { enum_value1, enum_value2 } my_enum ``` ### Type names Since umock_c needs to maintain a list of registered types, the following rules shall be applied: Each type shall be normalized to a form where all extra spaces are removed. Type names are case sensitive. #### REGISTER_UMOCK_VALUE_TYPE ```c REGISTER_UMOCK_VALUE_TYPE(value_type, stringify_func, are_equal_func, copy_func, free_func) ``` REGISTER_UMOCK_VALUE_TYPE shall register the type identified by value_type to be usable by umock_c for argument and return types and instruct umock_c which functions to use for getting the stringify, are_equal, copy and free. Example: ```c REGISTER_UMOCK_VALUE_TYPE(TEST_STRUCT*, umockvalue_stringify_TEST_STRUCT_ptr, umockvalue_are_equal_TEST_STRUCT_ptr, umockvalue_copy_TEST_STRUCT_ptr, umockvalue_free_TEST_STRUCT_ptr); ``` If only the value_type is specified in the macro invocation then the stringify, are_equal, copy and free function names shall be automatically derived from the type as: umockvalue_stringify_value_type, umockvalue_are_equal_value_type, umockvalue_copy_value_type, umockvalue_free_value_type. Example: ```c REGISTER_UMOCK_VALUE_TYPE(TEST_STRUCT); ``` If REGISTER_UMOCK_VALUE_TYPE fails, the on_io_error callback shall be called with UMOCK_C_REGISTER_TYPE_FAILED. #### REGISTER_UMOCK_ALIAS_TYPE ```c REGISTER_UMOCK_ALIAS_TYPE(value_type, is_value_type) ``` REGISTER_UMOCK_ALIAS_TYPE registers a new alias type for another type. That means that the handlers used for is_value_type will also be used for the new alias value_type. If REGISTER_UMOCK_ALIAS_TYPE fails, the on_io_error callback shall be called with UMOCK_C_REGISTER_TYPE_FAILED. ### Extra optional C types #### umockvalue_charptr char\* and const char\* shall be supported out of the box through a separate header, umockvalue_charptr.h. In order to enable the usage of char\*, the function umockvalue_charptr_register_types can be used in the test suite init. The signature shall be: ```c int umockvalue_charptr_register_types(void); ``` umockvalue_charptr_register_types returns 0 on success and non-zero on failure. #### umockvalue_stdint The types in stdint.h shall be supported out of the box by including umockvalue_stdint.h. In order to enable the usage of stdint types, the function umockvalue_stdint_register_types shall be used in the test suite init. ```c int umockvalue_stdint_register_types(void); ``` umockvalue_stdint_register_types returns 0 on success and non-zero on failure. ## Call modifiers When an expected call is recorded a call modifier interface in the form of a structure containing function pointers shall be returned to the caller. That allows constructs like: ```c STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(44) .IgnoreAllArguments(); ``` Note that each modifier function shall return a full modifier structure that allows chaining further call modifiers. The last modifier in a chain overrides previous modifiers if any collision occurs. Example: A ValidateAllArguments after a previous IgnoreAllArgument will still validate all arguments. ### IgnoreAllArguments(void) The IgnoreAllArguments call modifier shall record that for that specific call all arguments will be ignored for that specific call. IgnoreAllArguments shall only be available for mock functions that have arguments. ### ValidateAllArguments(void) The ValidateAllArguments call modifier shall record that for that specific call all arguments will be validated. ValidateAllArguments shall only be available for mock functions that have arguments. ### IgnoreArgument_{arg_name}(void) The IgnoreArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be ignored for that specific call. IgnoreArgument_{arg_name} shall only be available for mock functions that have arguments. ### ValidateArgument_{arg_name}(void) The ValidateArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be validated for that specific call. ValidateArgument_{arg_name} shall only be available for mock functions that have arguments. ### IgnoreArgument(size_t index) The IgnoreArgument call modifier shall record that the indexth argument will be ignored for that specific call. If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. IgnoreArgument shall only be available for mock functions that have arguments. ### ValidateArgument(size_t index) The ValidateArgument call modifier shall record that the indexth argument will be validated for that specific call. If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. ValidateArgument shall only be available for mock functions that have arguments. ### SetReturn(return_type result) The SetReturn call modifier shall record that when an actual call is matched with the specific expected call, it shall return the result value to the code under test. SetReturn shall only be available if the return type is not void. ### SetFailReturn(return_type result) The SetFailReturn call modifier shall record a fail return value. The fail return value can be recorded for more advanced features that would require failing or succeeding certain calls based on decisions made at runtime. SetFailReturn shall only be available if the return type is not void. ### CopyOutArgumentBuffer(size_t index, const void* bytes, size_t length) The CopyOutArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. The memory shall be copied. If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. The buffers for previous CopyOutArgumentBuffer calls shall be freed. CopyOutArgumentBuffer shall only be applicable to pointer types. If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. The argument targetted by CopyOutArgumentBuffer shall also be marked as ignored. If any memory allocation error occurs, umock_c shall raise an error with the code UMOCK_C_MALLOC_ERROR. If any other error occurs, umock_c shall raise an error with the code UMOCK_C_ERROR. CopyOutArgumentBuffer shall only be available for mock functions that have arguments. ### CopyOutArgumentBuffer_{arg_name}(const void* bytes, size_t length) The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. The memory shall be copied. If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. CopyOutArgumentBuffer_{arg_name} shall only be applicable to pointer types. If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. The argument targetted by CopyOutArgumentBuffer_{arg_name} shall also be marked as ignored. If any memory allocation error occurs, umock_c shall raise an error with the code UMOCK_C_MALLOC_ERROR. If any other error occurs, umock_c shall raise an error with the code UMOCK_C_ERROR. CopyOutArgumentBuffer_{arg_name} shall only be available for mock functions that have arguments. ### CopyOutArgument(arg_type value) The CopyOutArgument call modifier shall copy an argument value to be injected as an out argument value when the code under test calls the mock function. CopyOutArgument shall only be applicable to pointer types. CopyOutArgument shall only be available for mock functions that have arguments. ### ValidateArgumentBuffer(size_t index, const void* bytes, size_t length) The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function. If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument. ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument. The memory pointed by bytes shall be copied. If several calls to ValidateArgumentBuffer are made, only the last buffer shall be kept. The buffers for previous ValidateArgumentBuffer calls shall be freed. ValidateArgumentBuffer shall only be applicable to pointer types. If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE. If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. ValidateArgumentBuffer shall only be available for mock functions that have arguments. ### IgnoreAllCalls(void) The IgnoreAllCalls call modifier shall record that all calls matching the expected call shall be ignored. If no matching call occurs no missing call shall be reported. If multiple matching actual calls occur no unexpected calls shall be reported. The call matching shall be done taking into account arguments and call modifiers referring to arguments. ### CaptureReturn(return_type* captured_return_value) The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. If CaptureReturn is called multiple times for the same call, an error shall be indicated with the code UMOCK_C_CAPTURE_RETURN_ALREADY_USED. If captured_return_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. CaptureReturn shall only be available if the return type is not void. Example: ```c TEST_FUNCTION(capture_return_captures_the_return_value) { // arrange int captured_return; STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .CaptureReturn(&captured_return); // act test_dependency_for_capture_return(); // assert ASSERT_ARE_EQUAL(int, 42, captured_return); } ``` ### ValidateArgumentValue_{arg_name}(arg_type* arg_value) The ValidateArgumentValue_{arg_name} shall validate that the value of an argument matches the value pointed by arg_value. If arg_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. The ValidateArgumentValue_{arg_name} modifier shall inhibit comparing with any value passed directly as an argument in the expected call. The ValidateArgumentValue_{arg_name} shall implicitly do a ValidateArgument for the arg_name argument, making sure the argument is not ignored. Example: Given a function with the prototype: ```c void function_with_int_arg(int a); ``` ```c TEST_FUNCTION(validate_argument_sample) { // arrange int arg_value = 0; STRICT_EXPECTED_CALL(function_with_int_arg(0)) .ValidateArgumentValue_a(&arg_value); arg_value = 42; // act function_with_int_arg(42); // assert // ... calls should match ... } ``` ### ValidateArgumentValue_{arg_name}_AsType(const char* type_name) `ValidateArgumentValue_{arg_name}_AsType` shall ensure that validation of the argument `arg_name` is done as if the argument is of type `type_name`. If `type_name` is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. If storing the argument value as the new type fails, umock_c shall raise an error with the code UMOCK_C_COPY_ARGUMENT_ERROR. If `ValidateArgumentValue_{arg_name}_AsType` is used multiple times on the same argument, the last call shall apply. ```c typedef struct MY_STRUCT_TAG { int x; } MY_STRUCT; void function_with_void_ptr(void* argument); TEST_FUNCTION(validate_argument_as_type_sample) { // arrange int arg_value = 0; MY_STRUCT x = { 42 }; STRICT_EXPECTED_CALL(function_with_void_ptr(&x)) .ValidateArgumentValue_argument_AsType(UMOCK_TYPE(MY_STRUCT)); // act function_with_int_arg(&x); // assert // ... calls should match ... } ``` ### Automatic argument ignore If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. `IGNORED_NUM_ARG` shall be defined to 0 so that it can be used for numeric type arguments. Example: ```c STRICT_EXPECTED_CALL(function_name(IGNORED_PTR_ARG, 2, IGNORED_NUM_ARG)); ``` is equivalent to: ```c STRICT_EXPECTED_CALL(function_name(NULL, 2, 0)) .IgnoreArgument(1) .IgnoreArgument(3); ``` ## Global mock modifiers ### REGISTER_GLOBAL_MOCK_HOOK ```c REGISTER_GLOBAL_MOCK_HOOK(mock_function, mock_hook_function) ``` The REGISTER_GLOBAL_MOCK_HOOK shall register a mock hook to be called every time the mocked function is called by production code. The hook's result shall be returned by the mock to the production code. The signature for the hook shall be assumed to have exactly the same arguments and return as the mocked function. If there are multiple invocations of REGISTER_GLOBAL_MOCK_HOOK, the last one shall take effect over the previous ones. REGISTER_GLOBAL_MOCK_HOOK called with a NULL hook unregisters a previously registered hook. All parameters passed to the mock shall be passed down to the mock hook. ### REGISTER_GLOBAL_MOCK_RETURN ```c REGISTER_GLOBAL_MOCK_RETURN(mock_function, return_value) ``` The REGISTER_GLOBAL_MOCK_RETURN shall register a return value to always be returned by a mock function. If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURN, the last one shall take effect over the previous ones. If any error occurs during REGISTER_GLOBAL_MOCK_RETURN, umock_c shall raise an error with the code UMOCK_C_ERROR. ### REGISTER_GLOBAL_MOCK_FAIL_RETURN ```c REGISTER_GLOBAL_MOCK_FAIL_RETURN(mock_function, fail_return_value) ``` The REGISTER_GLOBAL_MOCK_FAIL_RETURN shall register a fail return value to be returned by a mock function when marked as failed in the expected calls. If there are multiple invocations of REGISTER_GLOBAL_FAIL_MOCK_RETURN, the last one shall take effect over the previous ones. If any error occurs during REGISTER_GLOBAL_MOCK_FAIL_RETURN, umock_c shall raise an error with the code UMOCK_C_ERROR. ### REGISTER_GLOBAL_MOCK_RETURNS ```c REGISTER_GLOBAL_MOCK_RETURNS(mock_function, return_value, fail_return_value) ``` The REGISTER_GLOBAL_MOCK_RETURNS shall register both a success and a fail return value associated with a mock function. If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURNS, the last one shall take effect over the previous ones. If any error occurs during REGISTER_GLOBAL_MOCK_RETURNS, umock_c shall raise an error with the code UMOCK_C_ERROR. ## negative tests addon In order to automate negative tests writing, a separate API surface is provided: umock_c_negative_tests. Example: Given a function under test with the following code: ```c int function_under_test(void) { int result; if (function_1() != 0) { result = __LINE__; } else { if (function_2() != 0) { result = __LINE__; } else { result = 0; } } return result; } ``` The function calls two functions that return int: ```c MOCKABLE_FUNCTION(, int, function_1); MOCKABLE_FUNCTION(, int, function_2); ``` In order to test that for each case where either function_1 or function_2 fails and returns a non-zero value, one could write the following test that loops through all cases as opposed to writing individual negative tests: ```c size_t i; STRICT_EXPECTED_CALL(function_1()) .SetReturn(0).SetFailReturn(1); STRICT_EXPECTED_CALL(function_2()) .SetReturn(0).SetFailReturn(1); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_NOT_EQUAL_WITH_MSG(int, 0, result, temp_str); } ``` Note that a return value and a fail return value must be specified for the negative tests. If they are not specified that will result in undefined behavior. ### umock_c_negative_tests_init ```c int umock_c_negative_tests_init(void) ``` umock_c_negative_tests_init shall initialize the negative tests umock_c module. On success it shall return 0. If any error occurs, it shall return a non-zero value. This call is typically made in the test function setup. ### umock_c_negative_tests_deinit ```c void umock_c_negative_tests_deinit(void) ``` umock_c_negative_tests_deinit shall free all resources used by the negative tests module. ### umock_c_negative_tests_snapshot ```c void umock_c_negative_tests_snapshot(void) ``` umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). This is in order for these calls to be replayed as many times as needed, each time allowing different calls to be failed. If umock_c_negative_tests_snapshot is called without the module being initialized, it shall do nothing. All errors shall be reported by calling the umock_c on error function. ### umock_c_negative_tests_reset ```c void umock_c_negative_tests_reset(void) ``` umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. This is done typically in preparation of running each negative test. If umock_c_negative_tests_reset is called without the module being initialized, it shall do nothing. All errors shall be reported by calling the umock_c on error function. ### umock_c_negative_tests_fail_call ```c void umock_c_negative_tests_fail_call(size_t index) ``` umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. If umock_c_negative_tests_fail_call is called without the module being initialized, it shall do nothing. All errors shall be reported by calling the umock_c on error function. ### umock_c_negative_tests_call_count ```c size_t umock_c_negative_tests_call_count(void) ``` umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. If umock_c_negative_tests_fail_call is called without the module being initialized, it shall return 0. All errors shall be reported by calling the umock_c on error function. ## paired calls addon The paired calls addon can be used in order to ensure that function calls are paired correctly when needed. For example, given a create and destroy function pair: ```c SOME_HANDLE some_create(void); void some_destroy(SOME_HANDLE handle, ...); ``` It is desirable to make sure that all create calls are paired with appropriate destroy calls. umockc provides the ability for the user to declare that by using a macro like: ```c REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create, some_destroy); ``` The paired calls addon can based on this information figure out if any calls are made to some_create without having a counterpart some_destroy. Typically registering the pairs with umockc would be done in the test suite setup. ### REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(create_call, destroy_call) ```c REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(create_call, destroy_call) ``` REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS shall register with umock two calls that are expected to be paired. The create call shall have a non-void return type. The destroy call shall take as argument at least one argument. The type of the first argument shall be of the same type as the return type for the create_call. If create_call or destroy_call do not obey these rules, at the time of calling REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. At each create_call a memory block shall be allocated so that it can be reported as a leak by any memory checker. If any error occurs during the create_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. When a destroy_call happens the memory block associated with the argument passed to it shall be freed. If the first argument passed to destroy_call is not found in the list of tracked handles (returned by create_call) then umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. If any error occurs during the destroy_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. The type used for the return of create_call and first argument of destroy_call shall be allowed to be any type registered with umock. Tracking of paired calls shall not be done if the actual call to the `create_call` is using the `SetFailReturn` call modifier.azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc/000077500000000000000000000000001362133436400335035ustar00rootroot00000000000000aux_inc/000077500000000000000000000000001362133436400350525ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inccstdbool000066400000000000000000000003541362133436400366100ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CSTDBOOL_H #define CSTDBOOL_H #include "stdbool.h" #endif /* STDBOOL_H */ cstdint000066400000000000000000000003511362133436400364440ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef CSTDINT_H #define CSTDINT_H #include "stdint.h" #endif /* CSTDINT_H */ inttypes.h000066400000000000000000000006501362133436400371030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef INTTYPES_H #define INTTYPES_H #define PRId8 "hhd" #define PRId16 "hd" #define PRId32 "d" #define PRId64 "lld" #define PRIu8 "hhu" #define PRIu16 "hu" #define PRIu32 "u" #define PRIu64 "llu" #endif // INTTYPES_H stdbool.h000066400000000000000000000006511362133436400366730ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STDBOOL_H #define STDBOOL_H #define __bool_true_false_are_defined 1 #define HAS_STDBOOL #ifndef __cplusplus typedef unsigned char bool; #ifdef _MSC_VER typedef bool _Bool; #endif #define false 0 #define true 1 #endif /* __cplusplus */ #endif /* STDBOOL_H */ stdint.h000066400000000000000000000031741362133436400365350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc/aux_inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef STDINT_H #define STDINT_H typedef signed char int8_t; typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; typedef signed char int_least8_t; typedef short int_least16_t; typedef int int_least32_t; typedef long long int_least64_t; typedef unsigned char uint_least8_t; typedef unsigned short uint_least16_t; typedef unsigned int uint_least32_t; typedef unsigned long long uint_least64_t; typedef signed char int_fast8_t; typedef int int_fast16_t; typedef int int_fast32_t; typedef long long int_fast64_t; typedef unsigned char uint_fast8_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; typedef unsigned long long uint_fast64_t; #define INT8_MIN (-127i8 - 1) #define INT16_MIN (-32767i16 - 1) #define INT32_MIN (-2147483647i32 - 1) #define INT64_MIN (-9223372036854775807i64 - 1) #define INT8_MAX 127i8 #define INT16_MAX 32767i16 #define INT32_MAX 2147483647i32 #define INT64_MAX 9223372036854775807i64 #define UINT8_MAX 0xffui8 #define UINT16_MAX 0xffffui16 #define UINT32_MAX 0xffffffffui32 #define UINT64_MAX 0xffffffffffffffffui64 #endif /* STDINT_H */ macro_utils.h000066400000000000000000023662431362133436400361360ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. /*THIS FILE IS GENERATED*/ /*DO NOT EDIT BY HAND!!!*/ /*instead edit macro_utils.tt here: http://www.github.com/azure/azure-macro-utils-c.git */ /*and then propagate the generated file to all the repos*/ /* !!! CAUTION!!! This file is copied to multiple places */ /* in https://github.com/Azure/azure-c-shared-utility.git, */ /* and all of these copies must be located and replaced. */ #ifndef MACRO_UTILS_H #define MACRO_UTILS_H #include #if (defined OPTIMIZE_RETURN_CODES) #define __FAILURE__ 1 #else #define __FAILURE__ __LINE__ #endif /*"pointer or NULL" macro - because when printf-ing arguments NULL is not valid for %s (section 7.1.4 of C11 standard) */ #define P_OR_NULL(p) (((p)!=NULL)?(p):"NULL") #define TOSTRING_(x) #x #define TOSTRING(x) TOSTRING_(x) #define IFCOMMA(N) C2(IFCOMMA_, N) #define IFCOMMA_0 #define IFCOMMA_2 #define IFCOMMA_4 , #define IFCOMMA_6 , #define IFCOMMA_8 , #define IFCOMMA_10 , #define IFCOMMA_12 , #define IFCOMMA_14 , #define IFCOMMA_16 , #define IFCOMMA_18 , #define IFCOMMA_20 , #define IFCOMMA_22 , #define IFCOMMA_24 , #define IFCOMMA_26 , #define IFCOMMA_28 , #define IFCOMMA_30 , #define IFCOMMA_32 , #define IFCOMMA_34 , #define IFCOMMA_36 , #define IFCOMMA_38 , #define IFCOMMA_40 , #define IFCOMMA_42 , #define IFCOMMA_44 , #define IFCOMMA_46 , #define IFCOMMA_48 , #define IFCOMMA_50 , #define IFCOMMA_52 , #define IFCOMMA_54 , #define IFCOMMA_56 , #define IFCOMMA_58 , #define IFCOMMA_60 , #define IFCOMMA_62 , #define IFCOMMA_64 , #define IFCOMMA_66 , #define IFCOMMA_68 , #define IFCOMMA_70 , #define IFCOMMA_72 , #define IFCOMMA_74 , #define IFCOMMA_76 , #define IFCOMMA_78 , #define IFCOMMA_80 , #define IFCOMMA_82 , #define IFCOMMA_84 , #define IFCOMMA_86 , #define IFCOMMA_88 , #define IFCOMMA_90 , #define IFCOMMA_92 , #define IFCOMMA_94 , #define IFCOMMA_96 , #define IFCOMMA_98 , #define IFCOMMA_100 , #define IFCOMMA_102 , #define IFCOMMA_104 , #define IFCOMMA_106 , #define IFCOMMA_108 , #define IFCOMMA_110 , #define IFCOMMA_112 , #define IFCOMMA_114 , #define IFCOMMA_116 , #define IFCOMMA_118 , #define IFCOMMA_120 , #define IFCOMMA_122 , #define IFCOMMA_124 , #define IFCOMMA_NOFIRST(N) C2(IFCOMMA_NOFIRST, N) #define IFCOMMA_NOFIRST1 #define IFCOMMA_NOFIRST2 , #define IFCOMMA_NOFIRST3 , #define IFCOMMA_NOFIRST4 , #define IFCOMMA_NOFIRST5 , #define IFCOMMA_NOFIRST6 , #define IFCOMMA_NOFIRST7 , #define IFCOMMA_NOFIRST8 , #define IFCOMMA_NOFIRST9 , #define IFCOMMA_NOFIRST10 , #define IFCOMMA_NOFIRST11 , #define IFCOMMA_NOFIRST12 , #define IFCOMMA_NOFIRST13 , #define IFCOMMA_NOFIRST14 , #define IFCOMMA_NOFIRST15 , #define IFCOMMA_NOFIRST16 , #define IFCOMMA_NOFIRST17 , #define IFCOMMA_NOFIRST18 , #define IFCOMMA_NOFIRST19 , #define IFCOMMA_NOFIRST20 , #define IFCOMMA_NOFIRST21 , #define IFCOMMA_NOFIRST22 , #define IFCOMMA_NOFIRST23 , #define IFCOMMA_NOFIRST24 , #define IFCOMMA_NOFIRST25 , #define IFCOMMA_NOFIRST26 , #define IFCOMMA_NOFIRST27 , #define IFCOMMA_NOFIRST28 , #define IFCOMMA_NOFIRST29 , #define IFCOMMA_NOFIRST30 , #define IFCOMMA_NOFIRST31 , #define IFCOMMA_NOFIRST32 , #define IFCOMMA_NOFIRST33 , #define IFCOMMA_NOFIRST34 , #define IFCOMMA_NOFIRST35 , #define IFCOMMA_NOFIRST36 , #define IFCOMMA_NOFIRST37 , #define IFCOMMA_NOFIRST38 , #define IFCOMMA_NOFIRST39 , #define IFCOMMA_NOFIRST40 , #define IFCOMMA_NOFIRST41 , #define IFCOMMA_NOFIRST42 , #define IFCOMMA_NOFIRST43 , #define IFCOMMA_NOFIRST44 , #define IFCOMMA_NOFIRST45 , #define IFCOMMA_NOFIRST46 , #define IFCOMMA_NOFIRST47 , #define IFCOMMA_NOFIRST48 , #define IFCOMMA_NOFIRST49 , #define IFCOMMA_NOFIRST50 , #define IFCOMMA_NOFIRST51 , #define IFCOMMA_NOFIRST52 , #define IFCOMMA_NOFIRST53 , #define IFCOMMA_NOFIRST54 , #define IFCOMMA_NOFIRST55 , #define IFCOMMA_NOFIRST56 , #define IFCOMMA_NOFIRST57 , #define IFCOMMA_NOFIRST58 , #define IFCOMMA_NOFIRST59 , #define IFCOMMA_NOFIRST60 , #define IFCOMMA_NOFIRST61 , #define IFCOMMA_NOFIRST62 , #define IFCOMMA_NOFIRST63 , #define IFCOMMA_NOFIRST64 , #define IFCOMMA_NOFIRST65 , #define IFCOMMA_NOFIRST66 , #define IFCOMMA_NOFIRST67 , #define IFCOMMA_NOFIRST68 , #define IFCOMMA_NOFIRST69 , #define IFCOMMA_NOFIRST70 , #define IFCOMMA_NOFIRST71 , #define IFCOMMA_NOFIRST72 , #define IFCOMMA_NOFIRST73 , #define IFCOMMA_NOFIRST74 , #define IFCOMMA_NOFIRST75 , #define IFCOMMA_NOFIRST76 , #define IFCOMMA_NOFIRST77 , #define IFCOMMA_NOFIRST78 , #define IFCOMMA_NOFIRST79 , #define IFCOMMA_NOFIRST80 , #define IFCOMMA_NOFIRST81 , #define IFCOMMA_NOFIRST82 , #define IFCOMMA_NOFIRST83 , #define IFCOMMA_NOFIRST84 , #define IFCOMMA_NOFIRST85 , #define IFCOMMA_NOFIRST86 , #define IFCOMMA_NOFIRST87 , #define IFCOMMA_NOFIRST88 , #define IFCOMMA_NOFIRST89 , #define IFCOMMA_NOFIRST90 , #define IFCOMMA_NOFIRST91 , #define IFCOMMA_NOFIRST92 , #define IFCOMMA_NOFIRST93 , #define IFCOMMA_NOFIRST94 , #define IFCOMMA_NOFIRST95 , #define IFCOMMA_NOFIRST96 , #define IFCOMMA_NOFIRST97 , #define IFCOMMA_NOFIRST98 , #define IFCOMMA_NOFIRST99 , #define IFCOMMA_NOFIRST100 , #define IFCOMMA_NOFIRST101 , #define IFCOMMA_NOFIRST102 , #define IFCOMMA_NOFIRST103 , #define IFCOMMA_NOFIRST104 , #define IFCOMMA_NOFIRST105 , #define IFCOMMA_NOFIRST106 , #define IFCOMMA_NOFIRST107 , #define IFCOMMA_NOFIRST108 , #define IFCOMMA_NOFIRST109 , #define IFCOMMA_NOFIRST110 , #define IFCOMMA_NOFIRST111 , #define IFCOMMA_NOFIRST112 , #define IFCOMMA_NOFIRST113 , #define IFCOMMA_NOFIRST114 , #define IFCOMMA_NOFIRST115 , #define IFCOMMA_NOFIRST116 , #define IFCOMMA_NOFIRST117 , #define IFCOMMA_NOFIRST118 , #define IFCOMMA_NOFIRST119 , #define IFCOMMA_NOFIRST120 , #define IFCOMMA_NOFIRST121 , #define IFCOMMA_NOFIRST122 , #define IFCOMMA_NOFIRST123 , #define IFCOMMA_NOFIRST124 , #define DEC(x) C2(DEC,x) #define DEC1024 1023 #define DEC1023 1022 #define DEC1022 1021 #define DEC1021 1020 #define DEC1020 1019 #define DEC1019 1018 #define DEC1018 1017 #define DEC1017 1016 #define DEC1016 1015 #define DEC1015 1014 #define DEC1014 1013 #define DEC1013 1012 #define DEC1012 1011 #define DEC1011 1010 #define DEC1010 1009 #define DEC1009 1008 #define DEC1008 1007 #define DEC1007 1006 #define DEC1006 1005 #define DEC1005 1004 #define DEC1004 1003 #define DEC1003 1002 #define DEC1002 1001 #define DEC1001 1000 #define DEC1000 999 #define DEC999 998 #define DEC998 997 #define DEC997 996 #define DEC996 995 #define DEC995 994 #define DEC994 993 #define DEC993 992 #define DEC992 991 #define DEC991 990 #define DEC990 989 #define DEC989 988 #define DEC988 987 #define DEC987 986 #define DEC986 985 #define DEC985 984 #define DEC984 983 #define DEC983 982 #define DEC982 981 #define DEC981 980 #define DEC980 979 #define DEC979 978 #define DEC978 977 #define DEC977 976 #define DEC976 975 #define DEC975 974 #define DEC974 973 #define DEC973 972 #define DEC972 971 #define DEC971 970 #define DEC970 969 #define DEC969 968 #define DEC968 967 #define DEC967 966 #define DEC966 965 #define DEC965 964 #define DEC964 963 #define DEC963 962 #define DEC962 961 #define DEC961 960 #define DEC960 959 #define DEC959 958 #define DEC958 957 #define DEC957 956 #define DEC956 955 #define DEC955 954 #define DEC954 953 #define DEC953 952 #define DEC952 951 #define DEC951 950 #define DEC950 949 #define DEC949 948 #define DEC948 947 #define DEC947 946 #define DEC946 945 #define DEC945 944 #define DEC944 943 #define DEC943 942 #define DEC942 941 #define DEC941 940 #define DEC940 939 #define DEC939 938 #define DEC938 937 #define DEC937 936 #define DEC936 935 #define DEC935 934 #define DEC934 933 #define DEC933 932 #define DEC932 931 #define DEC931 930 #define DEC930 929 #define DEC929 928 #define DEC928 927 #define DEC927 926 #define DEC926 925 #define DEC925 924 #define DEC924 923 #define DEC923 922 #define DEC922 921 #define DEC921 920 #define DEC920 919 #define DEC919 918 #define DEC918 917 #define DEC917 916 #define DEC916 915 #define DEC915 914 #define DEC914 913 #define DEC913 912 #define DEC912 911 #define DEC911 910 #define DEC910 909 #define DEC909 908 #define DEC908 907 #define DEC907 906 #define DEC906 905 #define DEC905 904 #define DEC904 903 #define DEC903 902 #define DEC902 901 #define DEC901 900 #define DEC900 899 #define DEC899 898 #define DEC898 897 #define DEC897 896 #define DEC896 895 #define DEC895 894 #define DEC894 893 #define DEC893 892 #define DEC892 891 #define DEC891 890 #define DEC890 889 #define DEC889 888 #define DEC888 887 #define DEC887 886 #define DEC886 885 #define DEC885 884 #define DEC884 883 #define DEC883 882 #define DEC882 881 #define DEC881 880 #define DEC880 879 #define DEC879 878 #define DEC878 877 #define DEC877 876 #define DEC876 875 #define DEC875 874 #define DEC874 873 #define DEC873 872 #define DEC872 871 #define DEC871 870 #define DEC870 869 #define DEC869 868 #define DEC868 867 #define DEC867 866 #define DEC866 865 #define DEC865 864 #define DEC864 863 #define DEC863 862 #define DEC862 861 #define DEC861 860 #define DEC860 859 #define DEC859 858 #define DEC858 857 #define DEC857 856 #define DEC856 855 #define DEC855 854 #define DEC854 853 #define DEC853 852 #define DEC852 851 #define DEC851 850 #define DEC850 849 #define DEC849 848 #define DEC848 847 #define DEC847 846 #define DEC846 845 #define DEC845 844 #define DEC844 843 #define DEC843 842 #define DEC842 841 #define DEC841 840 #define DEC840 839 #define DEC839 838 #define DEC838 837 #define DEC837 836 #define DEC836 835 #define DEC835 834 #define DEC834 833 #define DEC833 832 #define DEC832 831 #define DEC831 830 #define DEC830 829 #define DEC829 828 #define DEC828 827 #define DEC827 826 #define DEC826 825 #define DEC825 824 #define DEC824 823 #define DEC823 822 #define DEC822 821 #define DEC821 820 #define DEC820 819 #define DEC819 818 #define DEC818 817 #define DEC817 816 #define DEC816 815 #define DEC815 814 #define DEC814 813 #define DEC813 812 #define DEC812 811 #define DEC811 810 #define DEC810 809 #define DEC809 808 #define DEC808 807 #define DEC807 806 #define DEC806 805 #define DEC805 804 #define DEC804 803 #define DEC803 802 #define DEC802 801 #define DEC801 800 #define DEC800 799 #define DEC799 798 #define DEC798 797 #define DEC797 796 #define DEC796 795 #define DEC795 794 #define DEC794 793 #define DEC793 792 #define DEC792 791 #define DEC791 790 #define DEC790 789 #define DEC789 788 #define DEC788 787 #define DEC787 786 #define DEC786 785 #define DEC785 784 #define DEC784 783 #define DEC783 782 #define DEC782 781 #define DEC781 780 #define DEC780 779 #define DEC779 778 #define DEC778 777 #define DEC777 776 #define DEC776 775 #define DEC775 774 #define DEC774 773 #define DEC773 772 #define DEC772 771 #define DEC771 770 #define DEC770 769 #define DEC769 768 #define DEC768 767 #define DEC767 766 #define DEC766 765 #define DEC765 764 #define DEC764 763 #define DEC763 762 #define DEC762 761 #define DEC761 760 #define DEC760 759 #define DEC759 758 #define DEC758 757 #define DEC757 756 #define DEC756 755 #define DEC755 754 #define DEC754 753 #define DEC753 752 #define DEC752 751 #define DEC751 750 #define DEC750 749 #define DEC749 748 #define DEC748 747 #define DEC747 746 #define DEC746 745 #define DEC745 744 #define DEC744 743 #define DEC743 742 #define DEC742 741 #define DEC741 740 #define DEC740 739 #define DEC739 738 #define DEC738 737 #define DEC737 736 #define DEC736 735 #define DEC735 734 #define DEC734 733 #define DEC733 732 #define DEC732 731 #define DEC731 730 #define DEC730 729 #define DEC729 728 #define DEC728 727 #define DEC727 726 #define DEC726 725 #define DEC725 724 #define DEC724 723 #define DEC723 722 #define DEC722 721 #define DEC721 720 #define DEC720 719 #define DEC719 718 #define DEC718 717 #define DEC717 716 #define DEC716 715 #define DEC715 714 #define DEC714 713 #define DEC713 712 #define DEC712 711 #define DEC711 710 #define DEC710 709 #define DEC709 708 #define DEC708 707 #define DEC707 706 #define DEC706 705 #define DEC705 704 #define DEC704 703 #define DEC703 702 #define DEC702 701 #define DEC701 700 #define DEC700 699 #define DEC699 698 #define DEC698 697 #define DEC697 696 #define DEC696 695 #define DEC695 694 #define DEC694 693 #define DEC693 692 #define DEC692 691 #define DEC691 690 #define DEC690 689 #define DEC689 688 #define DEC688 687 #define DEC687 686 #define DEC686 685 #define DEC685 684 #define DEC684 683 #define DEC683 682 #define DEC682 681 #define DEC681 680 #define DEC680 679 #define DEC679 678 #define DEC678 677 #define DEC677 676 #define DEC676 675 #define DEC675 674 #define DEC674 673 #define DEC673 672 #define DEC672 671 #define DEC671 670 #define DEC670 669 #define DEC669 668 #define DEC668 667 #define DEC667 666 #define DEC666 665 #define DEC665 664 #define DEC664 663 #define DEC663 662 #define DEC662 661 #define DEC661 660 #define DEC660 659 #define DEC659 658 #define DEC658 657 #define DEC657 656 #define DEC656 655 #define DEC655 654 #define DEC654 653 #define DEC653 652 #define DEC652 651 #define DEC651 650 #define DEC650 649 #define DEC649 648 #define DEC648 647 #define DEC647 646 #define DEC646 645 #define DEC645 644 #define DEC644 643 #define DEC643 642 #define DEC642 641 #define DEC641 640 #define DEC640 639 #define DEC639 638 #define DEC638 637 #define DEC637 636 #define DEC636 635 #define DEC635 634 #define DEC634 633 #define DEC633 632 #define DEC632 631 #define DEC631 630 #define DEC630 629 #define DEC629 628 #define DEC628 627 #define DEC627 626 #define DEC626 625 #define DEC625 624 #define DEC624 623 #define DEC623 622 #define DEC622 621 #define DEC621 620 #define DEC620 619 #define DEC619 618 #define DEC618 617 #define DEC617 616 #define DEC616 615 #define DEC615 614 #define DEC614 613 #define DEC613 612 #define DEC612 611 #define DEC611 610 #define DEC610 609 #define DEC609 608 #define DEC608 607 #define DEC607 606 #define DEC606 605 #define DEC605 604 #define DEC604 603 #define DEC603 602 #define DEC602 601 #define DEC601 600 #define DEC600 599 #define DEC599 598 #define DEC598 597 #define DEC597 596 #define DEC596 595 #define DEC595 594 #define DEC594 593 #define DEC593 592 #define DEC592 591 #define DEC591 590 #define DEC590 589 #define DEC589 588 #define DEC588 587 #define DEC587 586 #define DEC586 585 #define DEC585 584 #define DEC584 583 #define DEC583 582 #define DEC582 581 #define DEC581 580 #define DEC580 579 #define DEC579 578 #define DEC578 577 #define DEC577 576 #define DEC576 575 #define DEC575 574 #define DEC574 573 #define DEC573 572 #define DEC572 571 #define DEC571 570 #define DEC570 569 #define DEC569 568 #define DEC568 567 #define DEC567 566 #define DEC566 565 #define DEC565 564 #define DEC564 563 #define DEC563 562 #define DEC562 561 #define DEC561 560 #define DEC560 559 #define DEC559 558 #define DEC558 557 #define DEC557 556 #define DEC556 555 #define DEC555 554 #define DEC554 553 #define DEC553 552 #define DEC552 551 #define DEC551 550 #define DEC550 549 #define DEC549 548 #define DEC548 547 #define DEC547 546 #define DEC546 545 #define DEC545 544 #define DEC544 543 #define DEC543 542 #define DEC542 541 #define DEC541 540 #define DEC540 539 #define DEC539 538 #define DEC538 537 #define DEC537 536 #define DEC536 535 #define DEC535 534 #define DEC534 533 #define DEC533 532 #define DEC532 531 #define DEC531 530 #define DEC530 529 #define DEC529 528 #define DEC528 527 #define DEC527 526 #define DEC526 525 #define DEC525 524 #define DEC524 523 #define DEC523 522 #define DEC522 521 #define DEC521 520 #define DEC520 519 #define DEC519 518 #define DEC518 517 #define DEC517 516 #define DEC516 515 #define DEC515 514 #define DEC514 513 #define DEC513 512 #define DEC512 511 #define DEC511 510 #define DEC510 509 #define DEC509 508 #define DEC508 507 #define DEC507 506 #define DEC506 505 #define DEC505 504 #define DEC504 503 #define DEC503 502 #define DEC502 501 #define DEC501 500 #define DEC500 499 #define DEC499 498 #define DEC498 497 #define DEC497 496 #define DEC496 495 #define DEC495 494 #define DEC494 493 #define DEC493 492 #define DEC492 491 #define DEC491 490 #define DEC490 489 #define DEC489 488 #define DEC488 487 #define DEC487 486 #define DEC486 485 #define DEC485 484 #define DEC484 483 #define DEC483 482 #define DEC482 481 #define DEC481 480 #define DEC480 479 #define DEC479 478 #define DEC478 477 #define DEC477 476 #define DEC476 475 #define DEC475 474 #define DEC474 473 #define DEC473 472 #define DEC472 471 #define DEC471 470 #define DEC470 469 #define DEC469 468 #define DEC468 467 #define DEC467 466 #define DEC466 465 #define DEC465 464 #define DEC464 463 #define DEC463 462 #define DEC462 461 #define DEC461 460 #define DEC460 459 #define DEC459 458 #define DEC458 457 #define DEC457 456 #define DEC456 455 #define DEC455 454 #define DEC454 453 #define DEC453 452 #define DEC452 451 #define DEC451 450 #define DEC450 449 #define DEC449 448 #define DEC448 447 #define DEC447 446 #define DEC446 445 #define DEC445 444 #define DEC444 443 #define DEC443 442 #define DEC442 441 #define DEC441 440 #define DEC440 439 #define DEC439 438 #define DEC438 437 #define DEC437 436 #define DEC436 435 #define DEC435 434 #define DEC434 433 #define DEC433 432 #define DEC432 431 #define DEC431 430 #define DEC430 429 #define DEC429 428 #define DEC428 427 #define DEC427 426 #define DEC426 425 #define DEC425 424 #define DEC424 423 #define DEC423 422 #define DEC422 421 #define DEC421 420 #define DEC420 419 #define DEC419 418 #define DEC418 417 #define DEC417 416 #define DEC416 415 #define DEC415 414 #define DEC414 413 #define DEC413 412 #define DEC412 411 #define DEC411 410 #define DEC410 409 #define DEC409 408 #define DEC408 407 #define DEC407 406 #define DEC406 405 #define DEC405 404 #define DEC404 403 #define DEC403 402 #define DEC402 401 #define DEC401 400 #define DEC400 399 #define DEC399 398 #define DEC398 397 #define DEC397 396 #define DEC396 395 #define DEC395 394 #define DEC394 393 #define DEC393 392 #define DEC392 391 #define DEC391 390 #define DEC390 389 #define DEC389 388 #define DEC388 387 #define DEC387 386 #define DEC386 385 #define DEC385 384 #define DEC384 383 #define DEC383 382 #define DEC382 381 #define DEC381 380 #define DEC380 379 #define DEC379 378 #define DEC378 377 #define DEC377 376 #define DEC376 375 #define DEC375 374 #define DEC374 373 #define DEC373 372 #define DEC372 371 #define DEC371 370 #define DEC370 369 #define DEC369 368 #define DEC368 367 #define DEC367 366 #define DEC366 365 #define DEC365 364 #define DEC364 363 #define DEC363 362 #define DEC362 361 #define DEC361 360 #define DEC360 359 #define DEC359 358 #define DEC358 357 #define DEC357 356 #define DEC356 355 #define DEC355 354 #define DEC354 353 #define DEC353 352 #define DEC352 351 #define DEC351 350 #define DEC350 349 #define DEC349 348 #define DEC348 347 #define DEC347 346 #define DEC346 345 #define DEC345 344 #define DEC344 343 #define DEC343 342 #define DEC342 341 #define DEC341 340 #define DEC340 339 #define DEC339 338 #define DEC338 337 #define DEC337 336 #define DEC336 335 #define DEC335 334 #define DEC334 333 #define DEC333 332 #define DEC332 331 #define DEC331 330 #define DEC330 329 #define DEC329 328 #define DEC328 327 #define DEC327 326 #define DEC326 325 #define DEC325 324 #define DEC324 323 #define DEC323 322 #define DEC322 321 #define DEC321 320 #define DEC320 319 #define DEC319 318 #define DEC318 317 #define DEC317 316 #define DEC316 315 #define DEC315 314 #define DEC314 313 #define DEC313 312 #define DEC312 311 #define DEC311 310 #define DEC310 309 #define DEC309 308 #define DEC308 307 #define DEC307 306 #define DEC306 305 #define DEC305 304 #define DEC304 303 #define DEC303 302 #define DEC302 301 #define DEC301 300 #define DEC300 299 #define DEC299 298 #define DEC298 297 #define DEC297 296 #define DEC296 295 #define DEC295 294 #define DEC294 293 #define DEC293 292 #define DEC292 291 #define DEC291 290 #define DEC290 289 #define DEC289 288 #define DEC288 287 #define DEC287 286 #define DEC286 285 #define DEC285 284 #define DEC284 283 #define DEC283 282 #define DEC282 281 #define DEC281 280 #define DEC280 279 #define DEC279 278 #define DEC278 277 #define DEC277 276 #define DEC276 275 #define DEC275 274 #define DEC274 273 #define DEC273 272 #define DEC272 271 #define DEC271 270 #define DEC270 269 #define DEC269 268 #define DEC268 267 #define DEC267 266 #define DEC266 265 #define DEC265 264 #define DEC264 263 #define DEC263 262 #define DEC262 261 #define DEC261 260 #define DEC260 259 #define DEC259 258 #define DEC258 257 #define DEC257 256 #define DEC256 255 #define DEC255 254 #define DEC254 253 #define DEC253 252 #define DEC252 251 #define DEC251 250 #define DEC250 249 #define DEC249 248 #define DEC248 247 #define DEC247 246 #define DEC246 245 #define DEC245 244 #define DEC244 243 #define DEC243 242 #define DEC242 241 #define DEC241 240 #define DEC240 239 #define DEC239 238 #define DEC238 237 #define DEC237 236 #define DEC236 235 #define DEC235 234 #define DEC234 233 #define DEC233 232 #define DEC232 231 #define DEC231 230 #define DEC230 229 #define DEC229 228 #define DEC228 227 #define DEC227 226 #define DEC226 225 #define DEC225 224 #define DEC224 223 #define DEC223 222 #define DEC222 221 #define DEC221 220 #define DEC220 219 #define DEC219 218 #define DEC218 217 #define DEC217 216 #define DEC216 215 #define DEC215 214 #define DEC214 213 #define DEC213 212 #define DEC212 211 #define DEC211 210 #define DEC210 209 #define DEC209 208 #define DEC208 207 #define DEC207 206 #define DEC206 205 #define DEC205 204 #define DEC204 203 #define DEC203 202 #define DEC202 201 #define DEC201 200 #define DEC200 199 #define DEC199 198 #define DEC198 197 #define DEC197 196 #define DEC196 195 #define DEC195 194 #define DEC194 193 #define DEC193 192 #define DEC192 191 #define DEC191 190 #define DEC190 189 #define DEC189 188 #define DEC188 187 #define DEC187 186 #define DEC186 185 #define DEC185 184 #define DEC184 183 #define DEC183 182 #define DEC182 181 #define DEC181 180 #define DEC180 179 #define DEC179 178 #define DEC178 177 #define DEC177 176 #define DEC176 175 #define DEC175 174 #define DEC174 173 #define DEC173 172 #define DEC172 171 #define DEC171 170 #define DEC170 169 #define DEC169 168 #define DEC168 167 #define DEC167 166 #define DEC166 165 #define DEC165 164 #define DEC164 163 #define DEC163 162 #define DEC162 161 #define DEC161 160 #define DEC160 159 #define DEC159 158 #define DEC158 157 #define DEC157 156 #define DEC156 155 #define DEC155 154 #define DEC154 153 #define DEC153 152 #define DEC152 151 #define DEC151 150 #define DEC150 149 #define DEC149 148 #define DEC148 147 #define DEC147 146 #define DEC146 145 #define DEC145 144 #define DEC144 143 #define DEC143 142 #define DEC142 141 #define DEC141 140 #define DEC140 139 #define DEC139 138 #define DEC138 137 #define DEC137 136 #define DEC136 135 #define DEC135 134 #define DEC134 133 #define DEC133 132 #define DEC132 131 #define DEC131 130 #define DEC130 129 #define DEC129 128 #define DEC128 127 #define DEC127 126 #define DEC126 125 #define DEC125 124 #define DEC124 123 #define DEC123 122 #define DEC122 121 #define DEC121 120 #define DEC120 119 #define DEC119 118 #define DEC118 117 #define DEC117 116 #define DEC116 115 #define DEC115 114 #define DEC114 113 #define DEC113 112 #define DEC112 111 #define DEC111 110 #define DEC110 109 #define DEC109 108 #define DEC108 107 #define DEC107 106 #define DEC106 105 #define DEC105 104 #define DEC104 103 #define DEC103 102 #define DEC102 101 #define DEC101 100 #define DEC100 99 #define DEC99 98 #define DEC98 97 #define DEC97 96 #define DEC96 95 #define DEC95 94 #define DEC94 93 #define DEC93 92 #define DEC92 91 #define DEC91 90 #define DEC90 89 #define DEC89 88 #define DEC88 87 #define DEC87 86 #define DEC86 85 #define DEC85 84 #define DEC84 83 #define DEC83 82 #define DEC82 81 #define DEC81 80 #define DEC80 79 #define DEC79 78 #define DEC78 77 #define DEC77 76 #define DEC76 75 #define DEC75 74 #define DEC74 73 #define DEC73 72 #define DEC72 71 #define DEC71 70 #define DEC70 69 #define DEC69 68 #define DEC68 67 #define DEC67 66 #define DEC66 65 #define DEC65 64 #define DEC64 63 #define DEC63 62 #define DEC62 61 #define DEC61 60 #define DEC60 59 #define DEC59 58 #define DEC58 57 #define DEC57 56 #define DEC56 55 #define DEC55 54 #define DEC54 53 #define DEC53 52 #define DEC52 51 #define DEC51 50 #define DEC50 49 #define DEC49 48 #define DEC48 47 #define DEC47 46 #define DEC46 45 #define DEC45 44 #define DEC44 43 #define DEC43 42 #define DEC42 41 #define DEC41 40 #define DEC40 39 #define DEC39 38 #define DEC38 37 #define DEC37 36 #define DEC36 35 #define DEC35 34 #define DEC34 33 #define DEC33 32 #define DEC32 31 #define DEC31 30 #define DEC30 29 #define DEC29 28 #define DEC28 27 #define DEC27 26 #define DEC26 25 #define DEC25 24 #define DEC24 23 #define DEC23 22 #define DEC22 21 #define DEC21 20 #define DEC20 19 #define DEC19 18 #define DEC18 17 #define DEC17 16 #define DEC16 15 #define DEC15 14 #define DEC14 13 #define DEC13 12 #define DEC12 11 #define DEC11 10 #define DEC10 9 #define DEC9 8 #define DEC8 7 #define DEC7 6 #define DEC6 5 #define DEC5 4 #define DEC4 3 #define DEC3 2 #define DEC2 1 #define DEC1 0 #define INC(x) C2(INC,x) #define INC1024 1025 #define INC1023 1024 #define INC1022 1023 #define INC1021 1022 #define INC1020 1021 #define INC1019 1020 #define INC1018 1019 #define INC1017 1018 #define INC1016 1017 #define INC1015 1016 #define INC1014 1015 #define INC1013 1014 #define INC1012 1013 #define INC1011 1012 #define INC1010 1011 #define INC1009 1010 #define INC1008 1009 #define INC1007 1008 #define INC1006 1007 #define INC1005 1006 #define INC1004 1005 #define INC1003 1004 #define INC1002 1003 #define INC1001 1002 #define INC1000 1001 #define INC999 1000 #define INC998 999 #define INC997 998 #define INC996 997 #define INC995 996 #define INC994 995 #define INC993 994 #define INC992 993 #define INC991 992 #define INC990 991 #define INC989 990 #define INC988 989 #define INC987 988 #define INC986 987 #define INC985 986 #define INC984 985 #define INC983 984 #define INC982 983 #define INC981 982 #define INC980 981 #define INC979 980 #define INC978 979 #define INC977 978 #define INC976 977 #define INC975 976 #define INC974 975 #define INC973 974 #define INC972 973 #define INC971 972 #define INC970 971 #define INC969 970 #define INC968 969 #define INC967 968 #define INC966 967 #define INC965 966 #define INC964 965 #define INC963 964 #define INC962 963 #define INC961 962 #define INC960 961 #define INC959 960 #define INC958 959 #define INC957 958 #define INC956 957 #define INC955 956 #define INC954 955 #define INC953 954 #define INC952 953 #define INC951 952 #define INC950 951 #define INC949 950 #define INC948 949 #define INC947 948 #define INC946 947 #define INC945 946 #define INC944 945 #define INC943 944 #define INC942 943 #define INC941 942 #define INC940 941 #define INC939 940 #define INC938 939 #define INC937 938 #define INC936 937 #define INC935 936 #define INC934 935 #define INC933 934 #define INC932 933 #define INC931 932 #define INC930 931 #define INC929 930 #define INC928 929 #define INC927 928 #define INC926 927 #define INC925 926 #define INC924 925 #define INC923 924 #define INC922 923 #define INC921 922 #define INC920 921 #define INC919 920 #define INC918 919 #define INC917 918 #define INC916 917 #define INC915 916 #define INC914 915 #define INC913 914 #define INC912 913 #define INC911 912 #define INC910 911 #define INC909 910 #define INC908 909 #define INC907 908 #define INC906 907 #define INC905 906 #define INC904 905 #define INC903 904 #define INC902 903 #define INC901 902 #define INC900 901 #define INC899 900 #define INC898 899 #define INC897 898 #define INC896 897 #define INC895 896 #define INC894 895 #define INC893 894 #define INC892 893 #define INC891 892 #define INC890 891 #define INC889 890 #define INC888 889 #define INC887 888 #define INC886 887 #define INC885 886 #define INC884 885 #define INC883 884 #define INC882 883 #define INC881 882 #define INC880 881 #define INC879 880 #define INC878 879 #define INC877 878 #define INC876 877 #define INC875 876 #define INC874 875 #define INC873 874 #define INC872 873 #define INC871 872 #define INC870 871 #define INC869 870 #define INC868 869 #define INC867 868 #define INC866 867 #define INC865 866 #define INC864 865 #define INC863 864 #define INC862 863 #define INC861 862 #define INC860 861 #define INC859 860 #define INC858 859 #define INC857 858 #define INC856 857 #define INC855 856 #define INC854 855 #define INC853 854 #define INC852 853 #define INC851 852 #define INC850 851 #define INC849 850 #define INC848 849 #define INC847 848 #define INC846 847 #define INC845 846 #define INC844 845 #define INC843 844 #define INC842 843 #define INC841 842 #define INC840 841 #define INC839 840 #define INC838 839 #define INC837 838 #define INC836 837 #define INC835 836 #define INC834 835 #define INC833 834 #define INC832 833 #define INC831 832 #define INC830 831 #define INC829 830 #define INC828 829 #define INC827 828 #define INC826 827 #define INC825 826 #define INC824 825 #define INC823 824 #define INC822 823 #define INC821 822 #define INC820 821 #define INC819 820 #define INC818 819 #define INC817 818 #define INC816 817 #define INC815 816 #define INC814 815 #define INC813 814 #define INC812 813 #define INC811 812 #define INC810 811 #define INC809 810 #define INC808 809 #define INC807 808 #define INC806 807 #define INC805 806 #define INC804 805 #define INC803 804 #define INC802 803 #define INC801 802 #define INC800 801 #define INC799 800 #define INC798 799 #define INC797 798 #define INC796 797 #define INC795 796 #define INC794 795 #define INC793 794 #define INC792 793 #define INC791 792 #define INC790 791 #define INC789 790 #define INC788 789 #define INC787 788 #define INC786 787 #define INC785 786 #define INC784 785 #define INC783 784 #define INC782 783 #define INC781 782 #define INC780 781 #define INC779 780 #define INC778 779 #define INC777 778 #define INC776 777 #define INC775 776 #define INC774 775 #define INC773 774 #define INC772 773 #define INC771 772 #define INC770 771 #define INC769 770 #define INC768 769 #define INC767 768 #define INC766 767 #define INC765 766 #define INC764 765 #define INC763 764 #define INC762 763 #define INC761 762 #define INC760 761 #define INC759 760 #define INC758 759 #define INC757 758 #define INC756 757 #define INC755 756 #define INC754 755 #define INC753 754 #define INC752 753 #define INC751 752 #define INC750 751 #define INC749 750 #define INC748 749 #define INC747 748 #define INC746 747 #define INC745 746 #define INC744 745 #define INC743 744 #define INC742 743 #define INC741 742 #define INC740 741 #define INC739 740 #define INC738 739 #define INC737 738 #define INC736 737 #define INC735 736 #define INC734 735 #define INC733 734 #define INC732 733 #define INC731 732 #define INC730 731 #define INC729 730 #define INC728 729 #define INC727 728 #define INC726 727 #define INC725 726 #define INC724 725 #define INC723 724 #define INC722 723 #define INC721 722 #define INC720 721 #define INC719 720 #define INC718 719 #define INC717 718 #define INC716 717 #define INC715 716 #define INC714 715 #define INC713 714 #define INC712 713 #define INC711 712 #define INC710 711 #define INC709 710 #define INC708 709 #define INC707 708 #define INC706 707 #define INC705 706 #define INC704 705 #define INC703 704 #define INC702 703 #define INC701 702 #define INC700 701 #define INC699 700 #define INC698 699 #define INC697 698 #define INC696 697 #define INC695 696 #define INC694 695 #define INC693 694 #define INC692 693 #define INC691 692 #define INC690 691 #define INC689 690 #define INC688 689 #define INC687 688 #define INC686 687 #define INC685 686 #define INC684 685 #define INC683 684 #define INC682 683 #define INC681 682 #define INC680 681 #define INC679 680 #define INC678 679 #define INC677 678 #define INC676 677 #define INC675 676 #define INC674 675 #define INC673 674 #define INC672 673 #define INC671 672 #define INC670 671 #define INC669 670 #define INC668 669 #define INC667 668 #define INC666 667 #define INC665 666 #define INC664 665 #define INC663 664 #define INC662 663 #define INC661 662 #define INC660 661 #define INC659 660 #define INC658 659 #define INC657 658 #define INC656 657 #define INC655 656 #define INC654 655 #define INC653 654 #define INC652 653 #define INC651 652 #define INC650 651 #define INC649 650 #define INC648 649 #define INC647 648 #define INC646 647 #define INC645 646 #define INC644 645 #define INC643 644 #define INC642 643 #define INC641 642 #define INC640 641 #define INC639 640 #define INC638 639 #define INC637 638 #define INC636 637 #define INC635 636 #define INC634 635 #define INC633 634 #define INC632 633 #define INC631 632 #define INC630 631 #define INC629 630 #define INC628 629 #define INC627 628 #define INC626 627 #define INC625 626 #define INC624 625 #define INC623 624 #define INC622 623 #define INC621 622 #define INC620 621 #define INC619 620 #define INC618 619 #define INC617 618 #define INC616 617 #define INC615 616 #define INC614 615 #define INC613 614 #define INC612 613 #define INC611 612 #define INC610 611 #define INC609 610 #define INC608 609 #define INC607 608 #define INC606 607 #define INC605 606 #define INC604 605 #define INC603 604 #define INC602 603 #define INC601 602 #define INC600 601 #define INC599 600 #define INC598 599 #define INC597 598 #define INC596 597 #define INC595 596 #define INC594 595 #define INC593 594 #define INC592 593 #define INC591 592 #define INC590 591 #define INC589 590 #define INC588 589 #define INC587 588 #define INC586 587 #define INC585 586 #define INC584 585 #define INC583 584 #define INC582 583 #define INC581 582 #define INC580 581 #define INC579 580 #define INC578 579 #define INC577 578 #define INC576 577 #define INC575 576 #define INC574 575 #define INC573 574 #define INC572 573 #define INC571 572 #define INC570 571 #define INC569 570 #define INC568 569 #define INC567 568 #define INC566 567 #define INC565 566 #define INC564 565 #define INC563 564 #define INC562 563 #define INC561 562 #define INC560 561 #define INC559 560 #define INC558 559 #define INC557 558 #define INC556 557 #define INC555 556 #define INC554 555 #define INC553 554 #define INC552 553 #define INC551 552 #define INC550 551 #define INC549 550 #define INC548 549 #define INC547 548 #define INC546 547 #define INC545 546 #define INC544 545 #define INC543 544 #define INC542 543 #define INC541 542 #define INC540 541 #define INC539 540 #define INC538 539 #define INC537 538 #define INC536 537 #define INC535 536 #define INC534 535 #define INC533 534 #define INC532 533 #define INC531 532 #define INC530 531 #define INC529 530 #define INC528 529 #define INC527 528 #define INC526 527 #define INC525 526 #define INC524 525 #define INC523 524 #define INC522 523 #define INC521 522 #define INC520 521 #define INC519 520 #define INC518 519 #define INC517 518 #define INC516 517 #define INC515 516 #define INC514 515 #define INC513 514 #define INC512 513 #define INC511 512 #define INC510 511 #define INC509 510 #define INC508 509 #define INC507 508 #define INC506 507 #define INC505 506 #define INC504 505 #define INC503 504 #define INC502 503 #define INC501 502 #define INC500 501 #define INC499 500 #define INC498 499 #define INC497 498 #define INC496 497 #define INC495 496 #define INC494 495 #define INC493 494 #define INC492 493 #define INC491 492 #define INC490 491 #define INC489 490 #define INC488 489 #define INC487 488 #define INC486 487 #define INC485 486 #define INC484 485 #define INC483 484 #define INC482 483 #define INC481 482 #define INC480 481 #define INC479 480 #define INC478 479 #define INC477 478 #define INC476 477 #define INC475 476 #define INC474 475 #define INC473 474 #define INC472 473 #define INC471 472 #define INC470 471 #define INC469 470 #define INC468 469 #define INC467 468 #define INC466 467 #define INC465 466 #define INC464 465 #define INC463 464 #define INC462 463 #define INC461 462 #define INC460 461 #define INC459 460 #define INC458 459 #define INC457 458 #define INC456 457 #define INC455 456 #define INC454 455 #define INC453 454 #define INC452 453 #define INC451 452 #define INC450 451 #define INC449 450 #define INC448 449 #define INC447 448 #define INC446 447 #define INC445 446 #define INC444 445 #define INC443 444 #define INC442 443 #define INC441 442 #define INC440 441 #define INC439 440 #define INC438 439 #define INC437 438 #define INC436 437 #define INC435 436 #define INC434 435 #define INC433 434 #define INC432 433 #define INC431 432 #define INC430 431 #define INC429 430 #define INC428 429 #define INC427 428 #define INC426 427 #define INC425 426 #define INC424 425 #define INC423 424 #define INC422 423 #define INC421 422 #define INC420 421 #define INC419 420 #define INC418 419 #define INC417 418 #define INC416 417 #define INC415 416 #define INC414 415 #define INC413 414 #define INC412 413 #define INC411 412 #define INC410 411 #define INC409 410 #define INC408 409 #define INC407 408 #define INC406 407 #define INC405 406 #define INC404 405 #define INC403 404 #define INC402 403 #define INC401 402 #define INC400 401 #define INC399 400 #define INC398 399 #define INC397 398 #define INC396 397 #define INC395 396 #define INC394 395 #define INC393 394 #define INC392 393 #define INC391 392 #define INC390 391 #define INC389 390 #define INC388 389 #define INC387 388 #define INC386 387 #define INC385 386 #define INC384 385 #define INC383 384 #define INC382 383 #define INC381 382 #define INC380 381 #define INC379 380 #define INC378 379 #define INC377 378 #define INC376 377 #define INC375 376 #define INC374 375 #define INC373 374 #define INC372 373 #define INC371 372 #define INC370 371 #define INC369 370 #define INC368 369 #define INC367 368 #define INC366 367 #define INC365 366 #define INC364 365 #define INC363 364 #define INC362 363 #define INC361 362 #define INC360 361 #define INC359 360 #define INC358 359 #define INC357 358 #define INC356 357 #define INC355 356 #define INC354 355 #define INC353 354 #define INC352 353 #define INC351 352 #define INC350 351 #define INC349 350 #define INC348 349 #define INC347 348 #define INC346 347 #define INC345 346 #define INC344 345 #define INC343 344 #define INC342 343 #define INC341 342 #define INC340 341 #define INC339 340 #define INC338 339 #define INC337 338 #define INC336 337 #define INC335 336 #define INC334 335 #define INC333 334 #define INC332 333 #define INC331 332 #define INC330 331 #define INC329 330 #define INC328 329 #define INC327 328 #define INC326 327 #define INC325 326 #define INC324 325 #define INC323 324 #define INC322 323 #define INC321 322 #define INC320 321 #define INC319 320 #define INC318 319 #define INC317 318 #define INC316 317 #define INC315 316 #define INC314 315 #define INC313 314 #define INC312 313 #define INC311 312 #define INC310 311 #define INC309 310 #define INC308 309 #define INC307 308 #define INC306 307 #define INC305 306 #define INC304 305 #define INC303 304 #define INC302 303 #define INC301 302 #define INC300 301 #define INC299 300 #define INC298 299 #define INC297 298 #define INC296 297 #define INC295 296 #define INC294 295 #define INC293 294 #define INC292 293 #define INC291 292 #define INC290 291 #define INC289 290 #define INC288 289 #define INC287 288 #define INC286 287 #define INC285 286 #define INC284 285 #define INC283 284 #define INC282 283 #define INC281 282 #define INC280 281 #define INC279 280 #define INC278 279 #define INC277 278 #define INC276 277 #define INC275 276 #define INC274 275 #define INC273 274 #define INC272 273 #define INC271 272 #define INC270 271 #define INC269 270 #define INC268 269 #define INC267 268 #define INC266 267 #define INC265 266 #define INC264 265 #define INC263 264 #define INC262 263 #define INC261 262 #define INC260 261 #define INC259 260 #define INC258 259 #define INC257 258 #define INC256 257 #define INC255 256 #define INC254 255 #define INC253 254 #define INC252 253 #define INC251 252 #define INC250 251 #define INC249 250 #define INC248 249 #define INC247 248 #define INC246 247 #define INC245 246 #define INC244 245 #define INC243 244 #define INC242 243 #define INC241 242 #define INC240 241 #define INC239 240 #define INC238 239 #define INC237 238 #define INC236 237 #define INC235 236 #define INC234 235 #define INC233 234 #define INC232 233 #define INC231 232 #define INC230 231 #define INC229 230 #define INC228 229 #define INC227 228 #define INC226 227 #define INC225 226 #define INC224 225 #define INC223 224 #define INC222 223 #define INC221 222 #define INC220 221 #define INC219 220 #define INC218 219 #define INC217 218 #define INC216 217 #define INC215 216 #define INC214 215 #define INC213 214 #define INC212 213 #define INC211 212 #define INC210 211 #define INC209 210 #define INC208 209 #define INC207 208 #define INC206 207 #define INC205 206 #define INC204 205 #define INC203 204 #define INC202 203 #define INC201 202 #define INC200 201 #define INC199 200 #define INC198 199 #define INC197 198 #define INC196 197 #define INC195 196 #define INC194 195 #define INC193 194 #define INC192 193 #define INC191 192 #define INC190 191 #define INC189 190 #define INC188 189 #define INC187 188 #define INC186 187 #define INC185 186 #define INC184 185 #define INC183 184 #define INC182 183 #define INC181 182 #define INC180 181 #define INC179 180 #define INC178 179 #define INC177 178 #define INC176 177 #define INC175 176 #define INC174 175 #define INC173 174 #define INC172 173 #define INC171 172 #define INC170 171 #define INC169 170 #define INC168 169 #define INC167 168 #define INC166 167 #define INC165 166 #define INC164 165 #define INC163 164 #define INC162 163 #define INC161 162 #define INC160 161 #define INC159 160 #define INC158 159 #define INC157 158 #define INC156 157 #define INC155 156 #define INC154 155 #define INC153 154 #define INC152 153 #define INC151 152 #define INC150 151 #define INC149 150 #define INC148 149 #define INC147 148 #define INC146 147 #define INC145 146 #define INC144 145 #define INC143 144 #define INC142 143 #define INC141 142 #define INC140 141 #define INC139 140 #define INC138 139 #define INC137 138 #define INC136 137 #define INC135 136 #define INC134 135 #define INC133 134 #define INC132 133 #define INC131 132 #define INC130 131 #define INC129 130 #define INC128 129 #define INC127 128 #define INC126 127 #define INC125 126 #define INC124 125 #define INC123 124 #define INC122 123 #define INC121 122 #define INC120 121 #define INC119 120 #define INC118 119 #define INC117 118 #define INC116 117 #define INC115 116 #define INC114 115 #define INC113 114 #define INC112 113 #define INC111 112 #define INC110 111 #define INC109 110 #define INC108 109 #define INC107 108 #define INC106 107 #define INC105 106 #define INC104 105 #define INC103 104 #define INC102 103 #define INC101 102 #define INC100 101 #define INC99 100 #define INC98 99 #define INC97 98 #define INC96 97 #define INC95 96 #define INC94 95 #define INC93 94 #define INC92 93 #define INC91 92 #define INC90 91 #define INC89 90 #define INC88 89 #define INC87 88 #define INC86 87 #define INC85 86 #define INC84 85 #define INC83 84 #define INC82 83 #define INC81 82 #define INC80 81 #define INC79 80 #define INC78 79 #define INC77 78 #define INC76 77 #define INC75 76 #define INC74 75 #define INC73 74 #define INC72 73 #define INC71 72 #define INC70 71 #define INC69 70 #define INC68 69 #define INC67 68 #define INC66 67 #define INC65 66 #define INC64 65 #define INC63 64 #define INC62 63 #define INC61 62 #define INC60 61 #define INC59 60 #define INC58 59 #define INC57 58 #define INC56 57 #define INC55 56 #define INC54 55 #define INC53 54 #define INC52 53 #define INC51 52 #define INC50 51 #define INC49 50 #define INC48 49 #define INC47 48 #define INC46 47 #define INC45 46 #define INC44 45 #define INC43 44 #define INC42 43 #define INC41 42 #define INC40 41 #define INC39 40 #define INC38 39 #define INC37 38 #define INC36 37 #define INC35 36 #define INC34 35 #define INC33 34 #define INC32 33 #define INC31 32 #define INC30 31 #define INC29 30 #define INC28 29 #define INC27 28 #define INC26 27 #define INC25 26 #define INC24 25 #define INC23 24 #define INC22 23 #define INC21 22 #define INC20 21 #define INC19 20 #define INC18 19 #define INC17 18 #define INC16 17 #define INC15 16 #define INC14 15 #define INC13 14 #define INC12 13 #define INC11 12 #define INC10 11 #define INC9 10 #define INC8 9 #define INC7 8 #define INC6 7 #define INC5 6 #define INC4 5 #define INC3 4 #define INC2 3 #define INC1 2 #define INC0 1 #define DIV2(x) C2(DIV2_,x) #define DIV2_1024 512 #define DIV2_1023 511 #define DIV2_1022 511 #define DIV2_1021 510 #define DIV2_1020 510 #define DIV2_1019 509 #define DIV2_1018 509 #define DIV2_1017 508 #define DIV2_1016 508 #define DIV2_1015 507 #define DIV2_1014 507 #define DIV2_1013 506 #define DIV2_1012 506 #define DIV2_1011 505 #define DIV2_1010 505 #define DIV2_1009 504 #define DIV2_1008 504 #define DIV2_1007 503 #define DIV2_1006 503 #define DIV2_1005 502 #define DIV2_1004 502 #define DIV2_1003 501 #define DIV2_1002 501 #define DIV2_1001 500 #define DIV2_1000 500 #define DIV2_999 499 #define DIV2_998 499 #define DIV2_997 498 #define DIV2_996 498 #define DIV2_995 497 #define DIV2_994 497 #define DIV2_993 496 #define DIV2_992 496 #define DIV2_991 495 #define DIV2_990 495 #define DIV2_989 494 #define DIV2_988 494 #define DIV2_987 493 #define DIV2_986 493 #define DIV2_985 492 #define DIV2_984 492 #define DIV2_983 491 #define DIV2_982 491 #define DIV2_981 490 #define DIV2_980 490 #define DIV2_979 489 #define DIV2_978 489 #define DIV2_977 488 #define DIV2_976 488 #define DIV2_975 487 #define DIV2_974 487 #define DIV2_973 486 #define DIV2_972 486 #define DIV2_971 485 #define DIV2_970 485 #define DIV2_969 484 #define DIV2_968 484 #define DIV2_967 483 #define DIV2_966 483 #define DIV2_965 482 #define DIV2_964 482 #define DIV2_963 481 #define DIV2_962 481 #define DIV2_961 480 #define DIV2_960 480 #define DIV2_959 479 #define DIV2_958 479 #define DIV2_957 478 #define DIV2_956 478 #define DIV2_955 477 #define DIV2_954 477 #define DIV2_953 476 #define DIV2_952 476 #define DIV2_951 475 #define DIV2_950 475 #define DIV2_949 474 #define DIV2_948 474 #define DIV2_947 473 #define DIV2_946 473 #define DIV2_945 472 #define DIV2_944 472 #define DIV2_943 471 #define DIV2_942 471 #define DIV2_941 470 #define DIV2_940 470 #define DIV2_939 469 #define DIV2_938 469 #define DIV2_937 468 #define DIV2_936 468 #define DIV2_935 467 #define DIV2_934 467 #define DIV2_933 466 #define DIV2_932 466 #define DIV2_931 465 #define DIV2_930 465 #define DIV2_929 464 #define DIV2_928 464 #define DIV2_927 463 #define DIV2_926 463 #define DIV2_925 462 #define DIV2_924 462 #define DIV2_923 461 #define DIV2_922 461 #define DIV2_921 460 #define DIV2_920 460 #define DIV2_919 459 #define DIV2_918 459 #define DIV2_917 458 #define DIV2_916 458 #define DIV2_915 457 #define DIV2_914 457 #define DIV2_913 456 #define DIV2_912 456 #define DIV2_911 455 #define DIV2_910 455 #define DIV2_909 454 #define DIV2_908 454 #define DIV2_907 453 #define DIV2_906 453 #define DIV2_905 452 #define DIV2_904 452 #define DIV2_903 451 #define DIV2_902 451 #define DIV2_901 450 #define DIV2_900 450 #define DIV2_899 449 #define DIV2_898 449 #define DIV2_897 448 #define DIV2_896 448 #define DIV2_895 447 #define DIV2_894 447 #define DIV2_893 446 #define DIV2_892 446 #define DIV2_891 445 #define DIV2_890 445 #define DIV2_889 444 #define DIV2_888 444 #define DIV2_887 443 #define DIV2_886 443 #define DIV2_885 442 #define DIV2_884 442 #define DIV2_883 441 #define DIV2_882 441 #define DIV2_881 440 #define DIV2_880 440 #define DIV2_879 439 #define DIV2_878 439 #define DIV2_877 438 #define DIV2_876 438 #define DIV2_875 437 #define DIV2_874 437 #define DIV2_873 436 #define DIV2_872 436 #define DIV2_871 435 #define DIV2_870 435 #define DIV2_869 434 #define DIV2_868 434 #define DIV2_867 433 #define DIV2_866 433 #define DIV2_865 432 #define DIV2_864 432 #define DIV2_863 431 #define DIV2_862 431 #define DIV2_861 430 #define DIV2_860 430 #define DIV2_859 429 #define DIV2_858 429 #define DIV2_857 428 #define DIV2_856 428 #define DIV2_855 427 #define DIV2_854 427 #define DIV2_853 426 #define DIV2_852 426 #define DIV2_851 425 #define DIV2_850 425 #define DIV2_849 424 #define DIV2_848 424 #define DIV2_847 423 #define DIV2_846 423 #define DIV2_845 422 #define DIV2_844 422 #define DIV2_843 421 #define DIV2_842 421 #define DIV2_841 420 #define DIV2_840 420 #define DIV2_839 419 #define DIV2_838 419 #define DIV2_837 418 #define DIV2_836 418 #define DIV2_835 417 #define DIV2_834 417 #define DIV2_833 416 #define DIV2_832 416 #define DIV2_831 415 #define DIV2_830 415 #define DIV2_829 414 #define DIV2_828 414 #define DIV2_827 413 #define DIV2_826 413 #define DIV2_825 412 #define DIV2_824 412 #define DIV2_823 411 #define DIV2_822 411 #define DIV2_821 410 #define DIV2_820 410 #define DIV2_819 409 #define DIV2_818 409 #define DIV2_817 408 #define DIV2_816 408 #define DIV2_815 407 #define DIV2_814 407 #define DIV2_813 406 #define DIV2_812 406 #define DIV2_811 405 #define DIV2_810 405 #define DIV2_809 404 #define DIV2_808 404 #define DIV2_807 403 #define DIV2_806 403 #define DIV2_805 402 #define DIV2_804 402 #define DIV2_803 401 #define DIV2_802 401 #define DIV2_801 400 #define DIV2_800 400 #define DIV2_799 399 #define DIV2_798 399 #define DIV2_797 398 #define DIV2_796 398 #define DIV2_795 397 #define DIV2_794 397 #define DIV2_793 396 #define DIV2_792 396 #define DIV2_791 395 #define DIV2_790 395 #define DIV2_789 394 #define DIV2_788 394 #define DIV2_787 393 #define DIV2_786 393 #define DIV2_785 392 #define DIV2_784 392 #define DIV2_783 391 #define DIV2_782 391 #define DIV2_781 390 #define DIV2_780 390 #define DIV2_779 389 #define DIV2_778 389 #define DIV2_777 388 #define DIV2_776 388 #define DIV2_775 387 #define DIV2_774 387 #define DIV2_773 386 #define DIV2_772 386 #define DIV2_771 385 #define DIV2_770 385 #define DIV2_769 384 #define DIV2_768 384 #define DIV2_767 383 #define DIV2_766 383 #define DIV2_765 382 #define DIV2_764 382 #define DIV2_763 381 #define DIV2_762 381 #define DIV2_761 380 #define DIV2_760 380 #define DIV2_759 379 #define DIV2_758 379 #define DIV2_757 378 #define DIV2_756 378 #define DIV2_755 377 #define DIV2_754 377 #define DIV2_753 376 #define DIV2_752 376 #define DIV2_751 375 #define DIV2_750 375 #define DIV2_749 374 #define DIV2_748 374 #define DIV2_747 373 #define DIV2_746 373 #define DIV2_745 372 #define DIV2_744 372 #define DIV2_743 371 #define DIV2_742 371 #define DIV2_741 370 #define DIV2_740 370 #define DIV2_739 369 #define DIV2_738 369 #define DIV2_737 368 #define DIV2_736 368 #define DIV2_735 367 #define DIV2_734 367 #define DIV2_733 366 #define DIV2_732 366 #define DIV2_731 365 #define DIV2_730 365 #define DIV2_729 364 #define DIV2_728 364 #define DIV2_727 363 #define DIV2_726 363 #define DIV2_725 362 #define DIV2_724 362 #define DIV2_723 361 #define DIV2_722 361 #define DIV2_721 360 #define DIV2_720 360 #define DIV2_719 359 #define DIV2_718 359 #define DIV2_717 358 #define DIV2_716 358 #define DIV2_715 357 #define DIV2_714 357 #define DIV2_713 356 #define DIV2_712 356 #define DIV2_711 355 #define DIV2_710 355 #define DIV2_709 354 #define DIV2_708 354 #define DIV2_707 353 #define DIV2_706 353 #define DIV2_705 352 #define DIV2_704 352 #define DIV2_703 351 #define DIV2_702 351 #define DIV2_701 350 #define DIV2_700 350 #define DIV2_699 349 #define DIV2_698 349 #define DIV2_697 348 #define DIV2_696 348 #define DIV2_695 347 #define DIV2_694 347 #define DIV2_693 346 #define DIV2_692 346 #define DIV2_691 345 #define DIV2_690 345 #define DIV2_689 344 #define DIV2_688 344 #define DIV2_687 343 #define DIV2_686 343 #define DIV2_685 342 #define DIV2_684 342 #define DIV2_683 341 #define DIV2_682 341 #define DIV2_681 340 #define DIV2_680 340 #define DIV2_679 339 #define DIV2_678 339 #define DIV2_677 338 #define DIV2_676 338 #define DIV2_675 337 #define DIV2_674 337 #define DIV2_673 336 #define DIV2_672 336 #define DIV2_671 335 #define DIV2_670 335 #define DIV2_669 334 #define DIV2_668 334 #define DIV2_667 333 #define DIV2_666 333 #define DIV2_665 332 #define DIV2_664 332 #define DIV2_663 331 #define DIV2_662 331 #define DIV2_661 330 #define DIV2_660 330 #define DIV2_659 329 #define DIV2_658 329 #define DIV2_657 328 #define DIV2_656 328 #define DIV2_655 327 #define DIV2_654 327 #define DIV2_653 326 #define DIV2_652 326 #define DIV2_651 325 #define DIV2_650 325 #define DIV2_649 324 #define DIV2_648 324 #define DIV2_647 323 #define DIV2_646 323 #define DIV2_645 322 #define DIV2_644 322 #define DIV2_643 321 #define DIV2_642 321 #define DIV2_641 320 #define DIV2_640 320 #define DIV2_639 319 #define DIV2_638 319 #define DIV2_637 318 #define DIV2_636 318 #define DIV2_635 317 #define DIV2_634 317 #define DIV2_633 316 #define DIV2_632 316 #define DIV2_631 315 #define DIV2_630 315 #define DIV2_629 314 #define DIV2_628 314 #define DIV2_627 313 #define DIV2_626 313 #define DIV2_625 312 #define DIV2_624 312 #define DIV2_623 311 #define DIV2_622 311 #define DIV2_621 310 #define DIV2_620 310 #define DIV2_619 309 #define DIV2_618 309 #define DIV2_617 308 #define DIV2_616 308 #define DIV2_615 307 #define DIV2_614 307 #define DIV2_613 306 #define DIV2_612 306 #define DIV2_611 305 #define DIV2_610 305 #define DIV2_609 304 #define DIV2_608 304 #define DIV2_607 303 #define DIV2_606 303 #define DIV2_605 302 #define DIV2_604 302 #define DIV2_603 301 #define DIV2_602 301 #define DIV2_601 300 #define DIV2_600 300 #define DIV2_599 299 #define DIV2_598 299 #define DIV2_597 298 #define DIV2_596 298 #define DIV2_595 297 #define DIV2_594 297 #define DIV2_593 296 #define DIV2_592 296 #define DIV2_591 295 #define DIV2_590 295 #define DIV2_589 294 #define DIV2_588 294 #define DIV2_587 293 #define DIV2_586 293 #define DIV2_585 292 #define DIV2_584 292 #define DIV2_583 291 #define DIV2_582 291 #define DIV2_581 290 #define DIV2_580 290 #define DIV2_579 289 #define DIV2_578 289 #define DIV2_577 288 #define DIV2_576 288 #define DIV2_575 287 #define DIV2_574 287 #define DIV2_573 286 #define DIV2_572 286 #define DIV2_571 285 #define DIV2_570 285 #define DIV2_569 284 #define DIV2_568 284 #define DIV2_567 283 #define DIV2_566 283 #define DIV2_565 282 #define DIV2_564 282 #define DIV2_563 281 #define DIV2_562 281 #define DIV2_561 280 #define DIV2_560 280 #define DIV2_559 279 #define DIV2_558 279 #define DIV2_557 278 #define DIV2_556 278 #define DIV2_555 277 #define DIV2_554 277 #define DIV2_553 276 #define DIV2_552 276 #define DIV2_551 275 #define DIV2_550 275 #define DIV2_549 274 #define DIV2_548 274 #define DIV2_547 273 #define DIV2_546 273 #define DIV2_545 272 #define DIV2_544 272 #define DIV2_543 271 #define DIV2_542 271 #define DIV2_541 270 #define DIV2_540 270 #define DIV2_539 269 #define DIV2_538 269 #define DIV2_537 268 #define DIV2_536 268 #define DIV2_535 267 #define DIV2_534 267 #define DIV2_533 266 #define DIV2_532 266 #define DIV2_531 265 #define DIV2_530 265 #define DIV2_529 264 #define DIV2_528 264 #define DIV2_527 263 #define DIV2_526 263 #define DIV2_525 262 #define DIV2_524 262 #define DIV2_523 261 #define DIV2_522 261 #define DIV2_521 260 #define DIV2_520 260 #define DIV2_519 259 #define DIV2_518 259 #define DIV2_517 258 #define DIV2_516 258 #define DIV2_515 257 #define DIV2_514 257 #define DIV2_513 256 #define DIV2_512 256 #define DIV2_511 255 #define DIV2_510 255 #define DIV2_509 254 #define DIV2_508 254 #define DIV2_507 253 #define DIV2_506 253 #define DIV2_505 252 #define DIV2_504 252 #define DIV2_503 251 #define DIV2_502 251 #define DIV2_501 250 #define DIV2_500 250 #define DIV2_499 249 #define DIV2_498 249 #define DIV2_497 248 #define DIV2_496 248 #define DIV2_495 247 #define DIV2_494 247 #define DIV2_493 246 #define DIV2_492 246 #define DIV2_491 245 #define DIV2_490 245 #define DIV2_489 244 #define DIV2_488 244 #define DIV2_487 243 #define DIV2_486 243 #define DIV2_485 242 #define DIV2_484 242 #define DIV2_483 241 #define DIV2_482 241 #define DIV2_481 240 #define DIV2_480 240 #define DIV2_479 239 #define DIV2_478 239 #define DIV2_477 238 #define DIV2_476 238 #define DIV2_475 237 #define DIV2_474 237 #define DIV2_473 236 #define DIV2_472 236 #define DIV2_471 235 #define DIV2_470 235 #define DIV2_469 234 #define DIV2_468 234 #define DIV2_467 233 #define DIV2_466 233 #define DIV2_465 232 #define DIV2_464 232 #define DIV2_463 231 #define DIV2_462 231 #define DIV2_461 230 #define DIV2_460 230 #define DIV2_459 229 #define DIV2_458 229 #define DIV2_457 228 #define DIV2_456 228 #define DIV2_455 227 #define DIV2_454 227 #define DIV2_453 226 #define DIV2_452 226 #define DIV2_451 225 #define DIV2_450 225 #define DIV2_449 224 #define DIV2_448 224 #define DIV2_447 223 #define DIV2_446 223 #define DIV2_445 222 #define DIV2_444 222 #define DIV2_443 221 #define DIV2_442 221 #define DIV2_441 220 #define DIV2_440 220 #define DIV2_439 219 #define DIV2_438 219 #define DIV2_437 218 #define DIV2_436 218 #define DIV2_435 217 #define DIV2_434 217 #define DIV2_433 216 #define DIV2_432 216 #define DIV2_431 215 #define DIV2_430 215 #define DIV2_429 214 #define DIV2_428 214 #define DIV2_427 213 #define DIV2_426 213 #define DIV2_425 212 #define DIV2_424 212 #define DIV2_423 211 #define DIV2_422 211 #define DIV2_421 210 #define DIV2_420 210 #define DIV2_419 209 #define DIV2_418 209 #define DIV2_417 208 #define DIV2_416 208 #define DIV2_415 207 #define DIV2_414 207 #define DIV2_413 206 #define DIV2_412 206 #define DIV2_411 205 #define DIV2_410 205 #define DIV2_409 204 #define DIV2_408 204 #define DIV2_407 203 #define DIV2_406 203 #define DIV2_405 202 #define DIV2_404 202 #define DIV2_403 201 #define DIV2_402 201 #define DIV2_401 200 #define DIV2_400 200 #define DIV2_399 199 #define DIV2_398 199 #define DIV2_397 198 #define DIV2_396 198 #define DIV2_395 197 #define DIV2_394 197 #define DIV2_393 196 #define DIV2_392 196 #define DIV2_391 195 #define DIV2_390 195 #define DIV2_389 194 #define DIV2_388 194 #define DIV2_387 193 #define DIV2_386 193 #define DIV2_385 192 #define DIV2_384 192 #define DIV2_383 191 #define DIV2_382 191 #define DIV2_381 190 #define DIV2_380 190 #define DIV2_379 189 #define DIV2_378 189 #define DIV2_377 188 #define DIV2_376 188 #define DIV2_375 187 #define DIV2_374 187 #define DIV2_373 186 #define DIV2_372 186 #define DIV2_371 185 #define DIV2_370 185 #define DIV2_369 184 #define DIV2_368 184 #define DIV2_367 183 #define DIV2_366 183 #define DIV2_365 182 #define DIV2_364 182 #define DIV2_363 181 #define DIV2_362 181 #define DIV2_361 180 #define DIV2_360 180 #define DIV2_359 179 #define DIV2_358 179 #define DIV2_357 178 #define DIV2_356 178 #define DIV2_355 177 #define DIV2_354 177 #define DIV2_353 176 #define DIV2_352 176 #define DIV2_351 175 #define DIV2_350 175 #define DIV2_349 174 #define DIV2_348 174 #define DIV2_347 173 #define DIV2_346 173 #define DIV2_345 172 #define DIV2_344 172 #define DIV2_343 171 #define DIV2_342 171 #define DIV2_341 170 #define DIV2_340 170 #define DIV2_339 169 #define DIV2_338 169 #define DIV2_337 168 #define DIV2_336 168 #define DIV2_335 167 #define DIV2_334 167 #define DIV2_333 166 #define DIV2_332 166 #define DIV2_331 165 #define DIV2_330 165 #define DIV2_329 164 #define DIV2_328 164 #define DIV2_327 163 #define DIV2_326 163 #define DIV2_325 162 #define DIV2_324 162 #define DIV2_323 161 #define DIV2_322 161 #define DIV2_321 160 #define DIV2_320 160 #define DIV2_319 159 #define DIV2_318 159 #define DIV2_317 158 #define DIV2_316 158 #define DIV2_315 157 #define DIV2_314 157 #define DIV2_313 156 #define DIV2_312 156 #define DIV2_311 155 #define DIV2_310 155 #define DIV2_309 154 #define DIV2_308 154 #define DIV2_307 153 #define DIV2_306 153 #define DIV2_305 152 #define DIV2_304 152 #define DIV2_303 151 #define DIV2_302 151 #define DIV2_301 150 #define DIV2_300 150 #define DIV2_299 149 #define DIV2_298 149 #define DIV2_297 148 #define DIV2_296 148 #define DIV2_295 147 #define DIV2_294 147 #define DIV2_293 146 #define DIV2_292 146 #define DIV2_291 145 #define DIV2_290 145 #define DIV2_289 144 #define DIV2_288 144 #define DIV2_287 143 #define DIV2_286 143 #define DIV2_285 142 #define DIV2_284 142 #define DIV2_283 141 #define DIV2_282 141 #define DIV2_281 140 #define DIV2_280 140 #define DIV2_279 139 #define DIV2_278 139 #define DIV2_277 138 #define DIV2_276 138 #define DIV2_275 137 #define DIV2_274 137 #define DIV2_273 136 #define DIV2_272 136 #define DIV2_271 135 #define DIV2_270 135 #define DIV2_269 134 #define DIV2_268 134 #define DIV2_267 133 #define DIV2_266 133 #define DIV2_265 132 #define DIV2_264 132 #define DIV2_263 131 #define DIV2_262 131 #define DIV2_261 130 #define DIV2_260 130 #define DIV2_259 129 #define DIV2_258 129 #define DIV2_257 128 #define DIV2_256 128 #define DIV2_255 127 #define DIV2_254 127 #define DIV2_253 126 #define DIV2_252 126 #define DIV2_251 125 #define DIV2_250 125 #define DIV2_249 124 #define DIV2_248 124 #define DIV2_247 123 #define DIV2_246 123 #define DIV2_245 122 #define DIV2_244 122 #define DIV2_243 121 #define DIV2_242 121 #define DIV2_241 120 #define DIV2_240 120 #define DIV2_239 119 #define DIV2_238 119 #define DIV2_237 118 #define DIV2_236 118 #define DIV2_235 117 #define DIV2_234 117 #define DIV2_233 116 #define DIV2_232 116 #define DIV2_231 115 #define DIV2_230 115 #define DIV2_229 114 #define DIV2_228 114 #define DIV2_227 113 #define DIV2_226 113 #define DIV2_225 112 #define DIV2_224 112 #define DIV2_223 111 #define DIV2_222 111 #define DIV2_221 110 #define DIV2_220 110 #define DIV2_219 109 #define DIV2_218 109 #define DIV2_217 108 #define DIV2_216 108 #define DIV2_215 107 #define DIV2_214 107 #define DIV2_213 106 #define DIV2_212 106 #define DIV2_211 105 #define DIV2_210 105 #define DIV2_209 104 #define DIV2_208 104 #define DIV2_207 103 #define DIV2_206 103 #define DIV2_205 102 #define DIV2_204 102 #define DIV2_203 101 #define DIV2_202 101 #define DIV2_201 100 #define DIV2_200 100 #define DIV2_199 99 #define DIV2_198 99 #define DIV2_197 98 #define DIV2_196 98 #define DIV2_195 97 #define DIV2_194 97 #define DIV2_193 96 #define DIV2_192 96 #define DIV2_191 95 #define DIV2_190 95 #define DIV2_189 94 #define DIV2_188 94 #define DIV2_187 93 #define DIV2_186 93 #define DIV2_185 92 #define DIV2_184 92 #define DIV2_183 91 #define DIV2_182 91 #define DIV2_181 90 #define DIV2_180 90 #define DIV2_179 89 #define DIV2_178 89 #define DIV2_177 88 #define DIV2_176 88 #define DIV2_175 87 #define DIV2_174 87 #define DIV2_173 86 #define DIV2_172 86 #define DIV2_171 85 #define DIV2_170 85 #define DIV2_169 84 #define DIV2_168 84 #define DIV2_167 83 #define DIV2_166 83 #define DIV2_165 82 #define DIV2_164 82 #define DIV2_163 81 #define DIV2_162 81 #define DIV2_161 80 #define DIV2_160 80 #define DIV2_159 79 #define DIV2_158 79 #define DIV2_157 78 #define DIV2_156 78 #define DIV2_155 77 #define DIV2_154 77 #define DIV2_153 76 #define DIV2_152 76 #define DIV2_151 75 #define DIV2_150 75 #define DIV2_149 74 #define DIV2_148 74 #define DIV2_147 73 #define DIV2_146 73 #define DIV2_145 72 #define DIV2_144 72 #define DIV2_143 71 #define DIV2_142 71 #define DIV2_141 70 #define DIV2_140 70 #define DIV2_139 69 #define DIV2_138 69 #define DIV2_137 68 #define DIV2_136 68 #define DIV2_135 67 #define DIV2_134 67 #define DIV2_133 66 #define DIV2_132 66 #define DIV2_131 65 #define DIV2_130 65 #define DIV2_129 64 #define DIV2_128 64 #define DIV2_127 63 #define DIV2_126 63 #define DIV2_125 62 #define DIV2_124 62 #define DIV2_123 61 #define DIV2_122 61 #define DIV2_121 60 #define DIV2_120 60 #define DIV2_119 59 #define DIV2_118 59 #define DIV2_117 58 #define DIV2_116 58 #define DIV2_115 57 #define DIV2_114 57 #define DIV2_113 56 #define DIV2_112 56 #define DIV2_111 55 #define DIV2_110 55 #define DIV2_109 54 #define DIV2_108 54 #define DIV2_107 53 #define DIV2_106 53 #define DIV2_105 52 #define DIV2_104 52 #define DIV2_103 51 #define DIV2_102 51 #define DIV2_101 50 #define DIV2_100 50 #define DIV2_99 49 #define DIV2_98 49 #define DIV2_97 48 #define DIV2_96 48 #define DIV2_95 47 #define DIV2_94 47 #define DIV2_93 46 #define DIV2_92 46 #define DIV2_91 45 #define DIV2_90 45 #define DIV2_89 44 #define DIV2_88 44 #define DIV2_87 43 #define DIV2_86 43 #define DIV2_85 42 #define DIV2_84 42 #define DIV2_83 41 #define DIV2_82 41 #define DIV2_81 40 #define DIV2_80 40 #define DIV2_79 39 #define DIV2_78 39 #define DIV2_77 38 #define DIV2_76 38 #define DIV2_75 37 #define DIV2_74 37 #define DIV2_73 36 #define DIV2_72 36 #define DIV2_71 35 #define DIV2_70 35 #define DIV2_69 34 #define DIV2_68 34 #define DIV2_67 33 #define DIV2_66 33 #define DIV2_65 32 #define DIV2_64 32 #define DIV2_63 31 #define DIV2_62 31 #define DIV2_61 30 #define DIV2_60 30 #define DIV2_59 29 #define DIV2_58 29 #define DIV2_57 28 #define DIV2_56 28 #define DIV2_55 27 #define DIV2_54 27 #define DIV2_53 26 #define DIV2_52 26 #define DIV2_51 25 #define DIV2_50 25 #define DIV2_49 24 #define DIV2_48 24 #define DIV2_47 23 #define DIV2_46 23 #define DIV2_45 22 #define DIV2_44 22 #define DIV2_43 21 #define DIV2_42 21 #define DIV2_41 20 #define DIV2_40 20 #define DIV2_39 19 #define DIV2_38 19 #define DIV2_37 18 #define DIV2_36 18 #define DIV2_35 17 #define DIV2_34 17 #define DIV2_33 16 #define DIV2_32 16 #define DIV2_31 15 #define DIV2_30 15 #define DIV2_29 14 #define DIV2_28 14 #define DIV2_27 13 #define DIV2_26 13 #define DIV2_25 12 #define DIV2_24 12 #define DIV2_23 11 #define DIV2_22 11 #define DIV2_21 10 #define DIV2_20 10 #define DIV2_19 9 #define DIV2_18 9 #define DIV2_17 8 #define DIV2_16 8 #define DIV2_15 7 #define DIV2_14 7 #define DIV2_13 6 #define DIV2_12 6 #define DIV2_11 5 #define DIV2_10 5 #define DIV2_9 4 #define DIV2_8 4 #define DIV2_7 3 #define DIV2_6 3 #define DIV2_5 2 #define DIV2_4 2 #define DIV2_3 1 #define DIV2_2 1 #define DIV2_1 0 #define DIV2_0 0 #define MOD2(x) C2(MOD2_,x) #define MOD2_1024 0 #define MOD2_1023 1 #define MOD2_1022 0 #define MOD2_1021 1 #define MOD2_1020 0 #define MOD2_1019 1 #define MOD2_1018 0 #define MOD2_1017 1 #define MOD2_1016 0 #define MOD2_1015 1 #define MOD2_1014 0 #define MOD2_1013 1 #define MOD2_1012 0 #define MOD2_1011 1 #define MOD2_1010 0 #define MOD2_1009 1 #define MOD2_1008 0 #define MOD2_1007 1 #define MOD2_1006 0 #define MOD2_1005 1 #define MOD2_1004 0 #define MOD2_1003 1 #define MOD2_1002 0 #define MOD2_1001 1 #define MOD2_1000 0 #define MOD2_999 1 #define MOD2_998 0 #define MOD2_997 1 #define MOD2_996 0 #define MOD2_995 1 #define MOD2_994 0 #define MOD2_993 1 #define MOD2_992 0 #define MOD2_991 1 #define MOD2_990 0 #define MOD2_989 1 #define MOD2_988 0 #define MOD2_987 1 #define MOD2_986 0 #define MOD2_985 1 #define MOD2_984 0 #define MOD2_983 1 #define MOD2_982 0 #define MOD2_981 1 #define MOD2_980 0 #define MOD2_979 1 #define MOD2_978 0 #define MOD2_977 1 #define MOD2_976 0 #define MOD2_975 1 #define MOD2_974 0 #define MOD2_973 1 #define MOD2_972 0 #define MOD2_971 1 #define MOD2_970 0 #define MOD2_969 1 #define MOD2_968 0 #define MOD2_967 1 #define MOD2_966 0 #define MOD2_965 1 #define MOD2_964 0 #define MOD2_963 1 #define MOD2_962 0 #define MOD2_961 1 #define MOD2_960 0 #define MOD2_959 1 #define MOD2_958 0 #define MOD2_957 1 #define MOD2_956 0 #define MOD2_955 1 #define MOD2_954 0 #define MOD2_953 1 #define MOD2_952 0 #define MOD2_951 1 #define MOD2_950 0 #define MOD2_949 1 #define MOD2_948 0 #define MOD2_947 1 #define MOD2_946 0 #define MOD2_945 1 #define MOD2_944 0 #define MOD2_943 1 #define MOD2_942 0 #define MOD2_941 1 #define MOD2_940 0 #define MOD2_939 1 #define MOD2_938 0 #define MOD2_937 1 #define MOD2_936 0 #define MOD2_935 1 #define MOD2_934 0 #define MOD2_933 1 #define MOD2_932 0 #define MOD2_931 1 #define MOD2_930 0 #define MOD2_929 1 #define MOD2_928 0 #define MOD2_927 1 #define MOD2_926 0 #define MOD2_925 1 #define MOD2_924 0 #define MOD2_923 1 #define MOD2_922 0 #define MOD2_921 1 #define MOD2_920 0 #define MOD2_919 1 #define MOD2_918 0 #define MOD2_917 1 #define MOD2_916 0 #define MOD2_915 1 #define MOD2_914 0 #define MOD2_913 1 #define MOD2_912 0 #define MOD2_911 1 #define MOD2_910 0 #define MOD2_909 1 #define MOD2_908 0 #define MOD2_907 1 #define MOD2_906 0 #define MOD2_905 1 #define MOD2_904 0 #define MOD2_903 1 #define MOD2_902 0 #define MOD2_901 1 #define MOD2_900 0 #define MOD2_899 1 #define MOD2_898 0 #define MOD2_897 1 #define MOD2_896 0 #define MOD2_895 1 #define MOD2_894 0 #define MOD2_893 1 #define MOD2_892 0 #define MOD2_891 1 #define MOD2_890 0 #define MOD2_889 1 #define MOD2_888 0 #define MOD2_887 1 #define MOD2_886 0 #define MOD2_885 1 #define MOD2_884 0 #define MOD2_883 1 #define MOD2_882 0 #define MOD2_881 1 #define MOD2_880 0 #define MOD2_879 1 #define MOD2_878 0 #define MOD2_877 1 #define MOD2_876 0 #define MOD2_875 1 #define MOD2_874 0 #define MOD2_873 1 #define MOD2_872 0 #define MOD2_871 1 #define MOD2_870 0 #define MOD2_869 1 #define MOD2_868 0 #define MOD2_867 1 #define MOD2_866 0 #define MOD2_865 1 #define MOD2_864 0 #define MOD2_863 1 #define MOD2_862 0 #define MOD2_861 1 #define MOD2_860 0 #define MOD2_859 1 #define MOD2_858 0 #define MOD2_857 1 #define MOD2_856 0 #define MOD2_855 1 #define MOD2_854 0 #define MOD2_853 1 #define MOD2_852 0 #define MOD2_851 1 #define MOD2_850 0 #define MOD2_849 1 #define MOD2_848 0 #define MOD2_847 1 #define MOD2_846 0 #define MOD2_845 1 #define MOD2_844 0 #define MOD2_843 1 #define MOD2_842 0 #define MOD2_841 1 #define MOD2_840 0 #define MOD2_839 1 #define MOD2_838 0 #define MOD2_837 1 #define MOD2_836 0 #define MOD2_835 1 #define MOD2_834 0 #define MOD2_833 1 #define MOD2_832 0 #define MOD2_831 1 #define MOD2_830 0 #define MOD2_829 1 #define MOD2_828 0 #define MOD2_827 1 #define MOD2_826 0 #define MOD2_825 1 #define MOD2_824 0 #define MOD2_823 1 #define MOD2_822 0 #define MOD2_821 1 #define MOD2_820 0 #define MOD2_819 1 #define MOD2_818 0 #define MOD2_817 1 #define MOD2_816 0 #define MOD2_815 1 #define MOD2_814 0 #define MOD2_813 1 #define MOD2_812 0 #define MOD2_811 1 #define MOD2_810 0 #define MOD2_809 1 #define MOD2_808 0 #define MOD2_807 1 #define MOD2_806 0 #define MOD2_805 1 #define MOD2_804 0 #define MOD2_803 1 #define MOD2_802 0 #define MOD2_801 1 #define MOD2_800 0 #define MOD2_799 1 #define MOD2_798 0 #define MOD2_797 1 #define MOD2_796 0 #define MOD2_795 1 #define MOD2_794 0 #define MOD2_793 1 #define MOD2_792 0 #define MOD2_791 1 #define MOD2_790 0 #define MOD2_789 1 #define MOD2_788 0 #define MOD2_787 1 #define MOD2_786 0 #define MOD2_785 1 #define MOD2_784 0 #define MOD2_783 1 #define MOD2_782 0 #define MOD2_781 1 #define MOD2_780 0 #define MOD2_779 1 #define MOD2_778 0 #define MOD2_777 1 #define MOD2_776 0 #define MOD2_775 1 #define MOD2_774 0 #define MOD2_773 1 #define MOD2_772 0 #define MOD2_771 1 #define MOD2_770 0 #define MOD2_769 1 #define MOD2_768 0 #define MOD2_767 1 #define MOD2_766 0 #define MOD2_765 1 #define MOD2_764 0 #define MOD2_763 1 #define MOD2_762 0 #define MOD2_761 1 #define MOD2_760 0 #define MOD2_759 1 #define MOD2_758 0 #define MOD2_757 1 #define MOD2_756 0 #define MOD2_755 1 #define MOD2_754 0 #define MOD2_753 1 #define MOD2_752 0 #define MOD2_751 1 #define MOD2_750 0 #define MOD2_749 1 #define MOD2_748 0 #define MOD2_747 1 #define MOD2_746 0 #define MOD2_745 1 #define MOD2_744 0 #define MOD2_743 1 #define MOD2_742 0 #define MOD2_741 1 #define MOD2_740 0 #define MOD2_739 1 #define MOD2_738 0 #define MOD2_737 1 #define MOD2_736 0 #define MOD2_735 1 #define MOD2_734 0 #define MOD2_733 1 #define MOD2_732 0 #define MOD2_731 1 #define MOD2_730 0 #define MOD2_729 1 #define MOD2_728 0 #define MOD2_727 1 #define MOD2_726 0 #define MOD2_725 1 #define MOD2_724 0 #define MOD2_723 1 #define MOD2_722 0 #define MOD2_721 1 #define MOD2_720 0 #define MOD2_719 1 #define MOD2_718 0 #define MOD2_717 1 #define MOD2_716 0 #define MOD2_715 1 #define MOD2_714 0 #define MOD2_713 1 #define MOD2_712 0 #define MOD2_711 1 #define MOD2_710 0 #define MOD2_709 1 #define MOD2_708 0 #define MOD2_707 1 #define MOD2_706 0 #define MOD2_705 1 #define MOD2_704 0 #define MOD2_703 1 #define MOD2_702 0 #define MOD2_701 1 #define MOD2_700 0 #define MOD2_699 1 #define MOD2_698 0 #define MOD2_697 1 #define MOD2_696 0 #define MOD2_695 1 #define MOD2_694 0 #define MOD2_693 1 #define MOD2_692 0 #define MOD2_691 1 #define MOD2_690 0 #define MOD2_689 1 #define MOD2_688 0 #define MOD2_687 1 #define MOD2_686 0 #define MOD2_685 1 #define MOD2_684 0 #define MOD2_683 1 #define MOD2_682 0 #define MOD2_681 1 #define MOD2_680 0 #define MOD2_679 1 #define MOD2_678 0 #define MOD2_677 1 #define MOD2_676 0 #define MOD2_675 1 #define MOD2_674 0 #define MOD2_673 1 #define MOD2_672 0 #define MOD2_671 1 #define MOD2_670 0 #define MOD2_669 1 #define MOD2_668 0 #define MOD2_667 1 #define MOD2_666 0 #define MOD2_665 1 #define MOD2_664 0 #define MOD2_663 1 #define MOD2_662 0 #define MOD2_661 1 #define MOD2_660 0 #define MOD2_659 1 #define MOD2_658 0 #define MOD2_657 1 #define MOD2_656 0 #define MOD2_655 1 #define MOD2_654 0 #define MOD2_653 1 #define MOD2_652 0 #define MOD2_651 1 #define MOD2_650 0 #define MOD2_649 1 #define MOD2_648 0 #define MOD2_647 1 #define MOD2_646 0 #define MOD2_645 1 #define MOD2_644 0 #define MOD2_643 1 #define MOD2_642 0 #define MOD2_641 1 #define MOD2_640 0 #define MOD2_639 1 #define MOD2_638 0 #define MOD2_637 1 #define MOD2_636 0 #define MOD2_635 1 #define MOD2_634 0 #define MOD2_633 1 #define MOD2_632 0 #define MOD2_631 1 #define MOD2_630 0 #define MOD2_629 1 #define MOD2_628 0 #define MOD2_627 1 #define MOD2_626 0 #define MOD2_625 1 #define MOD2_624 0 #define MOD2_623 1 #define MOD2_622 0 #define MOD2_621 1 #define MOD2_620 0 #define MOD2_619 1 #define MOD2_618 0 #define MOD2_617 1 #define MOD2_616 0 #define MOD2_615 1 #define MOD2_614 0 #define MOD2_613 1 #define MOD2_612 0 #define MOD2_611 1 #define MOD2_610 0 #define MOD2_609 1 #define MOD2_608 0 #define MOD2_607 1 #define MOD2_606 0 #define MOD2_605 1 #define MOD2_604 0 #define MOD2_603 1 #define MOD2_602 0 #define MOD2_601 1 #define MOD2_600 0 #define MOD2_599 1 #define MOD2_598 0 #define MOD2_597 1 #define MOD2_596 0 #define MOD2_595 1 #define MOD2_594 0 #define MOD2_593 1 #define MOD2_592 0 #define MOD2_591 1 #define MOD2_590 0 #define MOD2_589 1 #define MOD2_588 0 #define MOD2_587 1 #define MOD2_586 0 #define MOD2_585 1 #define MOD2_584 0 #define MOD2_583 1 #define MOD2_582 0 #define MOD2_581 1 #define MOD2_580 0 #define MOD2_579 1 #define MOD2_578 0 #define MOD2_577 1 #define MOD2_576 0 #define MOD2_575 1 #define MOD2_574 0 #define MOD2_573 1 #define MOD2_572 0 #define MOD2_571 1 #define MOD2_570 0 #define MOD2_569 1 #define MOD2_568 0 #define MOD2_567 1 #define MOD2_566 0 #define MOD2_565 1 #define MOD2_564 0 #define MOD2_563 1 #define MOD2_562 0 #define MOD2_561 1 #define MOD2_560 0 #define MOD2_559 1 #define MOD2_558 0 #define MOD2_557 1 #define MOD2_556 0 #define MOD2_555 1 #define MOD2_554 0 #define MOD2_553 1 #define MOD2_552 0 #define MOD2_551 1 #define MOD2_550 0 #define MOD2_549 1 #define MOD2_548 0 #define MOD2_547 1 #define MOD2_546 0 #define MOD2_545 1 #define MOD2_544 0 #define MOD2_543 1 #define MOD2_542 0 #define MOD2_541 1 #define MOD2_540 0 #define MOD2_539 1 #define MOD2_538 0 #define MOD2_537 1 #define MOD2_536 0 #define MOD2_535 1 #define MOD2_534 0 #define MOD2_533 1 #define MOD2_532 0 #define MOD2_531 1 #define MOD2_530 0 #define MOD2_529 1 #define MOD2_528 0 #define MOD2_527 1 #define MOD2_526 0 #define MOD2_525 1 #define MOD2_524 0 #define MOD2_523 1 #define MOD2_522 0 #define MOD2_521 1 #define MOD2_520 0 #define MOD2_519 1 #define MOD2_518 0 #define MOD2_517 1 #define MOD2_516 0 #define MOD2_515 1 #define MOD2_514 0 #define MOD2_513 1 #define MOD2_512 0 #define MOD2_511 1 #define MOD2_510 0 #define MOD2_509 1 #define MOD2_508 0 #define MOD2_507 1 #define MOD2_506 0 #define MOD2_505 1 #define MOD2_504 0 #define MOD2_503 1 #define MOD2_502 0 #define MOD2_501 1 #define MOD2_500 0 #define MOD2_499 1 #define MOD2_498 0 #define MOD2_497 1 #define MOD2_496 0 #define MOD2_495 1 #define MOD2_494 0 #define MOD2_493 1 #define MOD2_492 0 #define MOD2_491 1 #define MOD2_490 0 #define MOD2_489 1 #define MOD2_488 0 #define MOD2_487 1 #define MOD2_486 0 #define MOD2_485 1 #define MOD2_484 0 #define MOD2_483 1 #define MOD2_482 0 #define MOD2_481 1 #define MOD2_480 0 #define MOD2_479 1 #define MOD2_478 0 #define MOD2_477 1 #define MOD2_476 0 #define MOD2_475 1 #define MOD2_474 0 #define MOD2_473 1 #define MOD2_472 0 #define MOD2_471 1 #define MOD2_470 0 #define MOD2_469 1 #define MOD2_468 0 #define MOD2_467 1 #define MOD2_466 0 #define MOD2_465 1 #define MOD2_464 0 #define MOD2_463 1 #define MOD2_462 0 #define MOD2_461 1 #define MOD2_460 0 #define MOD2_459 1 #define MOD2_458 0 #define MOD2_457 1 #define MOD2_456 0 #define MOD2_455 1 #define MOD2_454 0 #define MOD2_453 1 #define MOD2_452 0 #define MOD2_451 1 #define MOD2_450 0 #define MOD2_449 1 #define MOD2_448 0 #define MOD2_447 1 #define MOD2_446 0 #define MOD2_445 1 #define MOD2_444 0 #define MOD2_443 1 #define MOD2_442 0 #define MOD2_441 1 #define MOD2_440 0 #define MOD2_439 1 #define MOD2_438 0 #define MOD2_437 1 #define MOD2_436 0 #define MOD2_435 1 #define MOD2_434 0 #define MOD2_433 1 #define MOD2_432 0 #define MOD2_431 1 #define MOD2_430 0 #define MOD2_429 1 #define MOD2_428 0 #define MOD2_427 1 #define MOD2_426 0 #define MOD2_425 1 #define MOD2_424 0 #define MOD2_423 1 #define MOD2_422 0 #define MOD2_421 1 #define MOD2_420 0 #define MOD2_419 1 #define MOD2_418 0 #define MOD2_417 1 #define MOD2_416 0 #define MOD2_415 1 #define MOD2_414 0 #define MOD2_413 1 #define MOD2_412 0 #define MOD2_411 1 #define MOD2_410 0 #define MOD2_409 1 #define MOD2_408 0 #define MOD2_407 1 #define MOD2_406 0 #define MOD2_405 1 #define MOD2_404 0 #define MOD2_403 1 #define MOD2_402 0 #define MOD2_401 1 #define MOD2_400 0 #define MOD2_399 1 #define MOD2_398 0 #define MOD2_397 1 #define MOD2_396 0 #define MOD2_395 1 #define MOD2_394 0 #define MOD2_393 1 #define MOD2_392 0 #define MOD2_391 1 #define MOD2_390 0 #define MOD2_389 1 #define MOD2_388 0 #define MOD2_387 1 #define MOD2_386 0 #define MOD2_385 1 #define MOD2_384 0 #define MOD2_383 1 #define MOD2_382 0 #define MOD2_381 1 #define MOD2_380 0 #define MOD2_379 1 #define MOD2_378 0 #define MOD2_377 1 #define MOD2_376 0 #define MOD2_375 1 #define MOD2_374 0 #define MOD2_373 1 #define MOD2_372 0 #define MOD2_371 1 #define MOD2_370 0 #define MOD2_369 1 #define MOD2_368 0 #define MOD2_367 1 #define MOD2_366 0 #define MOD2_365 1 #define MOD2_364 0 #define MOD2_363 1 #define MOD2_362 0 #define MOD2_361 1 #define MOD2_360 0 #define MOD2_359 1 #define MOD2_358 0 #define MOD2_357 1 #define MOD2_356 0 #define MOD2_355 1 #define MOD2_354 0 #define MOD2_353 1 #define MOD2_352 0 #define MOD2_351 1 #define MOD2_350 0 #define MOD2_349 1 #define MOD2_348 0 #define MOD2_347 1 #define MOD2_346 0 #define MOD2_345 1 #define MOD2_344 0 #define MOD2_343 1 #define MOD2_342 0 #define MOD2_341 1 #define MOD2_340 0 #define MOD2_339 1 #define MOD2_338 0 #define MOD2_337 1 #define MOD2_336 0 #define MOD2_335 1 #define MOD2_334 0 #define MOD2_333 1 #define MOD2_332 0 #define MOD2_331 1 #define MOD2_330 0 #define MOD2_329 1 #define MOD2_328 0 #define MOD2_327 1 #define MOD2_326 0 #define MOD2_325 1 #define MOD2_324 0 #define MOD2_323 1 #define MOD2_322 0 #define MOD2_321 1 #define MOD2_320 0 #define MOD2_319 1 #define MOD2_318 0 #define MOD2_317 1 #define MOD2_316 0 #define MOD2_315 1 #define MOD2_314 0 #define MOD2_313 1 #define MOD2_312 0 #define MOD2_311 1 #define MOD2_310 0 #define MOD2_309 1 #define MOD2_308 0 #define MOD2_307 1 #define MOD2_306 0 #define MOD2_305 1 #define MOD2_304 0 #define MOD2_303 1 #define MOD2_302 0 #define MOD2_301 1 #define MOD2_300 0 #define MOD2_299 1 #define MOD2_298 0 #define MOD2_297 1 #define MOD2_296 0 #define MOD2_295 1 #define MOD2_294 0 #define MOD2_293 1 #define MOD2_292 0 #define MOD2_291 1 #define MOD2_290 0 #define MOD2_289 1 #define MOD2_288 0 #define MOD2_287 1 #define MOD2_286 0 #define MOD2_285 1 #define MOD2_284 0 #define MOD2_283 1 #define MOD2_282 0 #define MOD2_281 1 #define MOD2_280 0 #define MOD2_279 1 #define MOD2_278 0 #define MOD2_277 1 #define MOD2_276 0 #define MOD2_275 1 #define MOD2_274 0 #define MOD2_273 1 #define MOD2_272 0 #define MOD2_271 1 #define MOD2_270 0 #define MOD2_269 1 #define MOD2_268 0 #define MOD2_267 1 #define MOD2_266 0 #define MOD2_265 1 #define MOD2_264 0 #define MOD2_263 1 #define MOD2_262 0 #define MOD2_261 1 #define MOD2_260 0 #define MOD2_259 1 #define MOD2_258 0 #define MOD2_257 1 #define MOD2_256 0 #define MOD2_255 1 #define MOD2_254 0 #define MOD2_253 1 #define MOD2_252 0 #define MOD2_251 1 #define MOD2_250 0 #define MOD2_249 1 #define MOD2_248 0 #define MOD2_247 1 #define MOD2_246 0 #define MOD2_245 1 #define MOD2_244 0 #define MOD2_243 1 #define MOD2_242 0 #define MOD2_241 1 #define MOD2_240 0 #define MOD2_239 1 #define MOD2_238 0 #define MOD2_237 1 #define MOD2_236 0 #define MOD2_235 1 #define MOD2_234 0 #define MOD2_233 1 #define MOD2_232 0 #define MOD2_231 1 #define MOD2_230 0 #define MOD2_229 1 #define MOD2_228 0 #define MOD2_227 1 #define MOD2_226 0 #define MOD2_225 1 #define MOD2_224 0 #define MOD2_223 1 #define MOD2_222 0 #define MOD2_221 1 #define MOD2_220 0 #define MOD2_219 1 #define MOD2_218 0 #define MOD2_217 1 #define MOD2_216 0 #define MOD2_215 1 #define MOD2_214 0 #define MOD2_213 1 #define MOD2_212 0 #define MOD2_211 1 #define MOD2_210 0 #define MOD2_209 1 #define MOD2_208 0 #define MOD2_207 1 #define MOD2_206 0 #define MOD2_205 1 #define MOD2_204 0 #define MOD2_203 1 #define MOD2_202 0 #define MOD2_201 1 #define MOD2_200 0 #define MOD2_199 1 #define MOD2_198 0 #define MOD2_197 1 #define MOD2_196 0 #define MOD2_195 1 #define MOD2_194 0 #define MOD2_193 1 #define MOD2_192 0 #define MOD2_191 1 #define MOD2_190 0 #define MOD2_189 1 #define MOD2_188 0 #define MOD2_187 1 #define MOD2_186 0 #define MOD2_185 1 #define MOD2_184 0 #define MOD2_183 1 #define MOD2_182 0 #define MOD2_181 1 #define MOD2_180 0 #define MOD2_179 1 #define MOD2_178 0 #define MOD2_177 1 #define MOD2_176 0 #define MOD2_175 1 #define MOD2_174 0 #define MOD2_173 1 #define MOD2_172 0 #define MOD2_171 1 #define MOD2_170 0 #define MOD2_169 1 #define MOD2_168 0 #define MOD2_167 1 #define MOD2_166 0 #define MOD2_165 1 #define MOD2_164 0 #define MOD2_163 1 #define MOD2_162 0 #define MOD2_161 1 #define MOD2_160 0 #define MOD2_159 1 #define MOD2_158 0 #define MOD2_157 1 #define MOD2_156 0 #define MOD2_155 1 #define MOD2_154 0 #define MOD2_153 1 #define MOD2_152 0 #define MOD2_151 1 #define MOD2_150 0 #define MOD2_149 1 #define MOD2_148 0 #define MOD2_147 1 #define MOD2_146 0 #define MOD2_145 1 #define MOD2_144 0 #define MOD2_143 1 #define MOD2_142 0 #define MOD2_141 1 #define MOD2_140 0 #define MOD2_139 1 #define MOD2_138 0 #define MOD2_137 1 #define MOD2_136 0 #define MOD2_135 1 #define MOD2_134 0 #define MOD2_133 1 #define MOD2_132 0 #define MOD2_131 1 #define MOD2_130 0 #define MOD2_129 1 #define MOD2_128 0 #define MOD2_127 1 #define MOD2_126 0 #define MOD2_125 1 #define MOD2_124 0 #define MOD2_123 1 #define MOD2_122 0 #define MOD2_121 1 #define MOD2_120 0 #define MOD2_119 1 #define MOD2_118 0 #define MOD2_117 1 #define MOD2_116 0 #define MOD2_115 1 #define MOD2_114 0 #define MOD2_113 1 #define MOD2_112 0 #define MOD2_111 1 #define MOD2_110 0 #define MOD2_109 1 #define MOD2_108 0 #define MOD2_107 1 #define MOD2_106 0 #define MOD2_105 1 #define MOD2_104 0 #define MOD2_103 1 #define MOD2_102 0 #define MOD2_101 1 #define MOD2_100 0 #define MOD2_99 1 #define MOD2_98 0 #define MOD2_97 1 #define MOD2_96 0 #define MOD2_95 1 #define MOD2_94 0 #define MOD2_93 1 #define MOD2_92 0 #define MOD2_91 1 #define MOD2_90 0 #define MOD2_89 1 #define MOD2_88 0 #define MOD2_87 1 #define MOD2_86 0 #define MOD2_85 1 #define MOD2_84 0 #define MOD2_83 1 #define MOD2_82 0 #define MOD2_81 1 #define MOD2_80 0 #define MOD2_79 1 #define MOD2_78 0 #define MOD2_77 1 #define MOD2_76 0 #define MOD2_75 1 #define MOD2_74 0 #define MOD2_73 1 #define MOD2_72 0 #define MOD2_71 1 #define MOD2_70 0 #define MOD2_69 1 #define MOD2_68 0 #define MOD2_67 1 #define MOD2_66 0 #define MOD2_65 1 #define MOD2_64 0 #define MOD2_63 1 #define MOD2_62 0 #define MOD2_61 1 #define MOD2_60 0 #define MOD2_59 1 #define MOD2_58 0 #define MOD2_57 1 #define MOD2_56 0 #define MOD2_55 1 #define MOD2_54 0 #define MOD2_53 1 #define MOD2_52 0 #define MOD2_51 1 #define MOD2_50 0 #define MOD2_49 1 #define MOD2_48 0 #define MOD2_47 1 #define MOD2_46 0 #define MOD2_45 1 #define MOD2_44 0 #define MOD2_43 1 #define MOD2_42 0 #define MOD2_41 1 #define MOD2_40 0 #define MOD2_39 1 #define MOD2_38 0 #define MOD2_37 1 #define MOD2_36 0 #define MOD2_35 1 #define MOD2_34 0 #define MOD2_33 1 #define MOD2_32 0 #define MOD2_31 1 #define MOD2_30 0 #define MOD2_29 1 #define MOD2_28 0 #define MOD2_27 1 #define MOD2_26 0 #define MOD2_25 1 #define MOD2_24 0 #define MOD2_23 1 #define MOD2_22 0 #define MOD2_21 1 #define MOD2_20 0 #define MOD2_19 1 #define MOD2_18 0 #define MOD2_17 1 #define MOD2_16 0 #define MOD2_15 1 #define MOD2_14 0 #define MOD2_13 1 #define MOD2_12 0 #define MOD2_11 1 #define MOD2_10 0 #define MOD2_9 1 #define MOD2_8 0 #define MOD2_7 1 #define MOD2_6 0 #define MOD2_5 1 #define MOD2_4 0 #define MOD2_3 1 #define MOD2_2 0 #define MOD2_1 1 #define MOD2_0 0 #define THE_NTH_ARG(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124, ... ) P124 #define _TRIGGER_PARENTHESIS_(...) , #define LPAREN ( #ifdef _MSC_VER #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0) #else #define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG (__VA_ARGS__, \ 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) #define MORE_THAN_1_ARG(...) THE_NTH_ARG(__VA_ARGS__, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 0) #endif #define COUNT_ARG(...) C2(COUNT_ARG_, ISEMPTY(__VA_ARGS__))(__VA_ARGS__) #define COUNT_ARG_1(...) 0 #define COUNT_ARG_0(...) C1(COUNT_1_OR_MORE_ARG(__VA_ARGS__)) #define ISEMPTY(...) C5(DISPTACH_EMPTY_, MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__ ()), MORE_THAN_1_ARG(__VA_ARGS__), MORE_THAN_1_ARG(__VA_ARGS__ ()), MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__)) #define DISPTACH_EMPTY_1000 1 #define DISPTACH_EMPTY_0000 0 #define DISPTACH_EMPTY_1100 0 #define DISPTACH_EMPTY_1111 0 #define DISPTACH_EMPTY_1001 0 #define DISPTACH_EMPTY_1010 0 #define C2_(x,y) x##y #define C2(x,y) C2_(x,y) #define C3(x,y,z) C2(x, C2(y,z)) #define C4(x,y,z, u) C2(C2(x,y), C2(z,u)) #define C5(x,y,z,u, v) C2(C4(x,y, z, u), v) #define C1_(x) x #define C1(x) C1_(x) #define C2STRING(x,y) x y #define C3STRING(x,y,z) x y z #define C4STRING(x,y,z,u) x y z u #define C5STRING(x,y,z,u,v) x y z u v #define FOR_EACH_1_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P1) \ FOR_EACH_1_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_1_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(P1) \ FOR_EACH_1_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P1) \ FOR_EACH_1_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(P1) \ FOR_EACH_1_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P1) \ FOR_EACH_1_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(P1) \ FOR_EACH_1_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P1) \ FOR_EACH_1_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(P1) \ FOR_EACH_1_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P1) \ FOR_EACH_1_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(P1) \ FOR_EACH_1_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P1) \ FOR_EACH_1_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(P1) \ FOR_EACH_1_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P1) \ FOR_EACH_1_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(P1) \ FOR_EACH_1_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P1) \ FOR_EACH_1_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(P1) \ FOR_EACH_1_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P1) \ FOR_EACH_1_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(P1) \ FOR_EACH_1_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P1) \ FOR_EACH_1_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(P1) \ FOR_EACH_1_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P1) \ FOR_EACH_1_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(P1) \ FOR_EACH_1_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P1) \ FOR_EACH_1_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(P1) \ FOR_EACH_1_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P1) \ FOR_EACH_1_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(P1) \ FOR_EACH_1_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P1) \ FOR_EACH_1_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(P1) \ FOR_EACH_1_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P1) \ FOR_EACH_1_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(P1) \ FOR_EACH_1_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P1) \ FOR_EACH_1_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(P1) \ FOR_EACH_1_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P1) \ FOR_EACH_1_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(P1) \ FOR_EACH_1_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P1) \ FOR_EACH_1_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(P1) \ FOR_EACH_1_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P1) \ FOR_EACH_1_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(P1) \ FOR_EACH_1_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P1) \ FOR_EACH_1_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(P1) \ FOR_EACH_1_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P1) \ FOR_EACH_1_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(P1) \ FOR_EACH_1_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P1) \ FOR_EACH_1_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(P1) \ FOR_EACH_1_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P1) \ FOR_EACH_1_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(P1) \ FOR_EACH_1_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P1) \ FOR_EACH_1_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(P1) \ FOR_EACH_1_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P1) \ FOR_EACH_1_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(P1) \ FOR_EACH_1_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P1) \ FOR_EACH_1_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(P1) \ FOR_EACH_1_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P1) \ FOR_EACH_1_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(P1) \ FOR_EACH_1_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P1) \ FOR_EACH_1_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(P1) \ FOR_EACH_1_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P1) \ FOR_EACH_1_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(P1) \ FOR_EACH_1_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P1) \ FOR_EACH_1_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(P1) \ FOR_EACH_1_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P1) \ FOR_EACH_1_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(P1) \ FOR_EACH_1_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P1) \ FOR_EACH_1_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(P1) \ FOR_EACH_1_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P1) \ FOR_EACH_1_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(P1) \ FOR_EACH_1_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P1) \ FOR_EACH_1_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(P1) \ FOR_EACH_1_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P1) \ FOR_EACH_1_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(P1) \ FOR_EACH_1_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P1) \ FOR_EACH_1_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(P1) \ FOR_EACH_1_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P1) \ FOR_EACH_1_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(P1) \ FOR_EACH_1_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P1) \ FOR_EACH_1_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(P1) \ FOR_EACH_1_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P1) \ FOR_EACH_1_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(P1) \ FOR_EACH_1_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P1) \ FOR_EACH_1_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(P1) \ FOR_EACH_1_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P1) \ FOR_EACH_1_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(P1) \ FOR_EACH_1_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P1) \ FOR_EACH_1_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(P1) \ FOR_EACH_1_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P1) \ FOR_EACH_1_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(P1) \ FOR_EACH_1_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P1) \ FOR_EACH_1_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(P1) \ FOR_EACH_1_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P1) \ FOR_EACH_1_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(P1) \ FOR_EACH_1_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P1) \ FOR_EACH_1_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(P1) \ FOR_EACH_1_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P1) \ FOR_EACH_1_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(P1) \ FOR_EACH_1_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P1) \ FOR_EACH_1_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(P1) \ FOR_EACH_1_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P1) \ FOR_EACH_1_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(P1) \ FOR_EACH_1_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P1) \ FOR_EACH_1_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(P1) \ FOR_EACH_1_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P1) \ FOR_EACH_1_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(P1) \ FOR_EACH_1_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P1) \ FOR_EACH_1_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(P1) \ FOR_EACH_1_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P1) \ FOR_EACH_1_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(P1) \ FOR_EACH_1_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P1) \ FOR_EACH_1_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(P1) \ FOR_EACH_1_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P1) \ FOR_EACH_1_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(P1) \ FOR_EACH_1_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P1) \ FOR_EACH_1_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(P1) \ FOR_EACH_1_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P1) \ FOR_EACH_1_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(P1) \ FOR_EACH_1_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P1) \ FOR_EACH_1_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(P1) \ FOR_EACH_1_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P1) \ FOR_EACH_1_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(P1) \ FOR_EACH_1_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_6(X, P1, P2, P3, P4, P5, P6) \ X(P1) \ FOR_EACH_1_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_5(X, P1, P2, P3, P4, P5) \ X(P1) \ FOR_EACH_1_4(X, P2, P3, P4, P5) #define FOR_EACH_1_4(X, P1, P2, P3, P4) \ X(P1) \ FOR_EACH_1_3(X, P2, P3, P4) #define FOR_EACH_1_3(X, P1, P2, P3) \ X(P1) \ FOR_EACH_1_2(X, P2, P3) #define FOR_EACH_1_2(X, P1, P2) \ X(P1) \ FOR_EACH_1_1(X, P2) #define FOR_EACH_1_1(X, P1) \ X(P1) #ifdef _MSC_VER #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_,C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_1_KEEP_1_124(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_123(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_1_KEEP_1_123(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_122(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_KEEP_1_122(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_121(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_KEEP_1_121(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_120(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_KEEP_1_120(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_119(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_KEEP_1_119(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_118(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_KEEP_1_118(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_117(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_KEEP_1_117(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_116(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_KEEP_1_116(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_115(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_KEEP_1_115(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_114(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_KEEP_1_114(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_113(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_KEEP_1_113(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_112(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_KEEP_1_112(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_111(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_KEEP_1_111(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_110(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_KEEP_1_110(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_109(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_KEEP_1_109(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_108(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_KEEP_1_108(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_107(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_KEEP_1_107(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_106(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_KEEP_1_106(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_105(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_KEEP_1_105(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_104(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_KEEP_1_104(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_103(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_KEEP_1_103(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_102(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_KEEP_1_102(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_101(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_KEEP_1_101(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_100(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_KEEP_1_100(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_99(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_KEEP_1_99(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_98(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_KEEP_1_98(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_97(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_KEEP_1_97(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_96(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_KEEP_1_96(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_95(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_KEEP_1_95(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_94(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_KEEP_1_94(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_93(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_KEEP_1_93(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_92(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_KEEP_1_92(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_91(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_KEEP_1_91(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_90(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_KEEP_1_90(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_89(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_KEEP_1_89(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_88(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_KEEP_1_88(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_87(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_KEEP_1_87(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_86(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_KEEP_1_86(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_85(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_KEEP_1_85(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_84(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_KEEP_1_84(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_83(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_KEEP_1_83(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_82(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_KEEP_1_82(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_81(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_KEEP_1_81(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_80(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_KEEP_1_80(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_79(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_KEEP_1_79(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_78(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_KEEP_1_78(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_77(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_KEEP_1_77(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_76(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_KEEP_1_76(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_75(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_KEEP_1_75(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_74(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_KEEP_1_74(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_73(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_KEEP_1_73(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_72(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_KEEP_1_72(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_71(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_KEEP_1_71(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_70(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_KEEP_1_70(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_69(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_KEEP_1_69(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_68(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_KEEP_1_68(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_67(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_KEEP_1_67(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_66(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_KEEP_1_66(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_65(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_KEEP_1_65(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_64(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_KEEP_1_64(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_63(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_KEEP_1_63(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_62(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_KEEP_1_62(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_61(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_KEEP_1_61(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_60(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_KEEP_1_60(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_59(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_KEEP_1_59(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_58(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_KEEP_1_58(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_57(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_KEEP_1_57(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_56(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_KEEP_1_56(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_55(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_KEEP_1_55(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_54(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_KEEP_1_54(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_53(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_KEEP_1_53(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_52(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_KEEP_1_52(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_51(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_KEEP_1_51(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_50(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_KEEP_1_50(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_49(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_KEEP_1_49(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_48(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_KEEP_1_48(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_47(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_KEEP_1_47(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_46(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_KEEP_1_46(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_45(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_KEEP_1_45(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_44(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_KEEP_1_44(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_43(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_KEEP_1_43(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_42(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_KEEP_1_42(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_41(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_KEEP_1_41(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_40(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_KEEP_1_40(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_39(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_KEEP_1_39(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_38(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_KEEP_1_38(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_37(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_KEEP_1_37(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_36(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_KEEP_1_36(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_35(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_KEEP_1_35(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_34(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_KEEP_1_34(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_33(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_KEEP_1_33(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_32(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_KEEP_1_32(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_31(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_KEEP_1_31(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_30(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_KEEP_1_30(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_29(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_KEEP_1_29(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_28(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_KEEP_1_28(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_27(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_KEEP_1_27(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_26(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_KEEP_1_26(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_25(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_KEEP_1_25(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_24(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_KEEP_1_24(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_23(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_KEEP_1_23(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_22(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_KEEP_1_22(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_21(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_KEEP_1_21(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_20(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_KEEP_1_20(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_19(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_KEEP_1_19(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_18(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_KEEP_1_18(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_17(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_KEEP_1_17(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_16(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_KEEP_1_16(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_15(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_KEEP_1_15(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_14(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_KEEP_1_14(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_13(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_KEEP_1_13(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_12(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_KEEP_1_12(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_11(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_KEEP_1_11(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_10(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_KEEP_1_10(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_9(X, keep, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_KEEP_1_9(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_8(X, keep, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_KEEP_1_8(X, keep, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_7(X, keep, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_KEEP_1_7(X, keep, P1, P2, P3, P4, P5, P6, P7) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_6(X, keep, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_KEEP_1_6(X, keep, P1, P2, P3, P4, P5, P6) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_5(X, keep, P2, P3, P4, P5, P6) #define FOR_EACH_1_KEEP_1_5(X, keep, P1, P2, P3, P4, P5) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_4(X, keep, P2, P3, P4, P5) #define FOR_EACH_1_KEEP_1_4(X, keep, P1, P2, P3, P4) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_3(X, keep, P2, P3, P4) #define FOR_EACH_1_KEEP_1_3(X, keep, P1, P2, P3) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_2(X, keep, P2, P3) #define FOR_EACH_1_KEEP_1_2(X, keep, P1, P2) \ X(keep, P1) \ FOR_EACH_1_KEEP_1_1(X, keep, P2) #define FOR_EACH_1_KEEP_1_1(X, keep, P1) \ X(keep, P1) #ifdef _MSC_VER #define FOR_EACH_1_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_1_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_KEEP_1_124(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_122(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_KEEP_1_122(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_120(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_KEEP_1_120(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_118(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_KEEP_1_118(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_116(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_KEEP_1_116(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_114(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_KEEP_1_114(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_112(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_KEEP_1_112(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_110(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_KEEP_1_110(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_108(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_KEEP_1_108(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_106(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_KEEP_1_106(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_104(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_KEEP_1_104(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_102(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_KEEP_1_102(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_100(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_KEEP_1_100(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_98(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_KEEP_1_98(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_96(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_KEEP_1_96(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_94(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_KEEP_1_94(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_92(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_KEEP_1_92(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_90(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_KEEP_1_90(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_88(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_KEEP_1_88(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_86(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_KEEP_1_86(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_84(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_KEEP_1_84(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_82(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_KEEP_1_82(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_80(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_KEEP_1_80(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_78(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_KEEP_1_78(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_76(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_KEEP_1_76(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_74(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_KEEP_1_74(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_72(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_KEEP_1_72(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_70(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_KEEP_1_70(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_68(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_KEEP_1_68(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_66(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_KEEP_1_66(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_64(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_KEEP_1_64(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_62(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_KEEP_1_62(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_60(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_KEEP_1_60(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_58(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_KEEP_1_58(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_56(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_KEEP_1_56(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_54(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_KEEP_1_54(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_52(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_KEEP_1_52(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_50(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_KEEP_1_50(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_48(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_KEEP_1_48(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_46(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_KEEP_1_46(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_44(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_KEEP_1_44(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_42(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_KEEP_1_42(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_40(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_KEEP_1_40(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_38(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_KEEP_1_38(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_36(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_KEEP_1_36(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_34(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_KEEP_1_34(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_32(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_KEEP_1_32(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_30(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_KEEP_1_30(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_28(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_KEEP_1_28(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_26(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_KEEP_1_26(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_24(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_KEEP_1_24(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_22(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_KEEP_1_22(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_20(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_KEEP_1_20(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_18(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_KEEP_1_18(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_16(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_KEEP_1_16(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_14(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_KEEP_1_14(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_12(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_KEEP_1_12(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_10(X, keep, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_KEEP_1_10(X, keep, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_8(X, keep, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_KEEP_1_8(X, keep, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_6(X, keep, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_KEEP_1_6(X, keep, P1, P2, P3, P4, P5, P6) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_4(X, keep, P3, P4, P5, P6) #define FOR_EACH_2_KEEP_1_4(X, keep, P1, P2, P3, P4) \ X(keep, P1, P2) \ FOR_EACH_2_KEEP_1_2(X, keep, P3, P4) #define FOR_EACH_2_KEEP_1_1(...) #define FOR_EACH_2_KEEP_1_0(...) #define FOR_EACH_2_KEEP_1_2(X, keep, P1, P2) \ X(keep, P1, P2) \ #ifdef _MSC_VER #define FOR_EACH_2_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2_KEEP_1(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_1_, C2(DEC,C1(COUNT_ARG(__VA_ARGS__)))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_KEEP_2_124(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_122(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_KEEP_2_122(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_120(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_KEEP_2_120(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_118(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_KEEP_2_118(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_116(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_KEEP_2_116(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_114(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_KEEP_2_114(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_112(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_KEEP_2_112(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_110(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_KEEP_2_110(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_108(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_KEEP_2_108(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_106(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_KEEP_2_106(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_104(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_KEEP_2_104(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_102(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_KEEP_2_102(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_100(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_KEEP_2_100(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_98(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_KEEP_2_98(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_96(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_KEEP_2_96(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_94(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_KEEP_2_94(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_92(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_KEEP_2_92(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_90(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_KEEP_2_90(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_88(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_KEEP_2_88(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_86(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_KEEP_2_86(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_84(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_KEEP_2_84(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_82(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_KEEP_2_82(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_80(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_KEEP_2_80(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_78(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_KEEP_2_78(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_76(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_KEEP_2_76(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_74(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_KEEP_2_74(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_72(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_KEEP_2_72(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_70(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_KEEP_2_70(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_68(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_KEEP_2_68(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_66(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_KEEP_2_66(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_64(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_KEEP_2_64(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_62(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_KEEP_2_62(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_60(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_KEEP_2_60(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_58(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_KEEP_2_58(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_56(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_KEEP_2_56(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_54(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_KEEP_2_54(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_52(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_KEEP_2_52(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_50(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_KEEP_2_50(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_48(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_KEEP_2_48(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_46(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_KEEP_2_46(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_44(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_KEEP_2_44(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_42(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_KEEP_2_42(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_40(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_KEEP_2_40(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_38(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_KEEP_2_38(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_36(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_KEEP_2_36(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_34(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_KEEP_2_34(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_32(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_KEEP_2_32(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_30(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_KEEP_2_30(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_28(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_KEEP_2_28(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_26(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_KEEP_2_26(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_24(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_KEEP_2_24(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_22(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_KEEP_2_22(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_20(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_KEEP_2_20(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_18(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_KEEP_2_18(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_16(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_KEEP_2_16(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_14(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_KEEP_2_14(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_12(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_KEEP_2_12(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_10(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_KEEP_2_10(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_8(X, keep1, keep2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_KEEP_2_8(X, keep1, keep2, P1, P2, P3, P4, P5, P6, P7, P8) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_6(X, keep1, keep2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_KEEP_2_6(X, keep1, keep2, P1, P2, P3, P4, P5, P6) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_4(X, keep1, keep2, P3, P4, P5, P6) #define FOR_EACH_2_KEEP_2_4(X, keep1, keep2, P1, P2, P3, P4) \ X(keep1, keep2, P1, P2) \ FOR_EACH_2_KEEP_2_2(X, keep1, keep2, P3, P4) #define FOR_EACH_2_KEEP_2_1(...) #define FOR_EACH_2_KEEP_2_0(...) #define FOR_EACH_2_KEEP_2_2(X, keep1, keep2, P1, P2) \ X(keep1, keep2, P1, P2) \ #ifdef _MSC_VER #define FOR_EACH_2_KEEP_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_2_, C2(DEC,C2(DEC,C1(COUNT_ARG(__VA_ARGS__))))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2_KEEP_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_KEEP_2_, C2(DEC, C2(DEC,C1(COUNT_ARG(__VA_ARGS__))))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #define FOR_EACH_2_0(...) #define FOR_EACH_2_2(X, P1, P2) \ X(P1, P2) #define FOR_EACH_2_4(X, P1, P2, P3, P4) \ X(P1, P2) \ FOR_EACH_2_2(X, P3, P4) #define FOR_EACH_2_6(X, P1, P2, P3, P4, P5, P6) \ X(P1, P2) \ FOR_EACH_2_4(X, P3, P4, P5, P6) #define FOR_EACH_2_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P1, P2) \ FOR_EACH_2_6(X, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P1, P2) \ FOR_EACH_2_8(X, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P1, P2) \ FOR_EACH_2_10(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P1, P2) \ FOR_EACH_2_12(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P1, P2) \ FOR_EACH_2_14(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P1, P2) \ FOR_EACH_2_16(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P1, P2) \ FOR_EACH_2_18(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P1, P2) \ FOR_EACH_2_20(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P1, P2) \ FOR_EACH_2_22(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P1, P2) \ FOR_EACH_2_24(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P1, P2) \ FOR_EACH_2_26(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P1, P2) \ FOR_EACH_2_28(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P1, P2) \ FOR_EACH_2_30(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P1, P2) \ FOR_EACH_2_32(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P1, P2) \ FOR_EACH_2_34(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P1, P2) \ FOR_EACH_2_36(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P1, P2) \ FOR_EACH_2_38(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P1, P2) \ FOR_EACH_2_40(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P1, P2) \ FOR_EACH_2_42(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P1, P2) \ FOR_EACH_2_44(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P1, P2) \ FOR_EACH_2_46(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P1, P2) \ FOR_EACH_2_48(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P1, P2) \ FOR_EACH_2_50(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P1, P2) \ FOR_EACH_2_52(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P1, P2) \ FOR_EACH_2_54(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P1, P2) \ FOR_EACH_2_56(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P1, P2) \ FOR_EACH_2_58(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P1, P2) \ FOR_EACH_2_60(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P1, P2) \ FOR_EACH_2_62(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P1, P2) \ FOR_EACH_2_64(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P1, P2) \ FOR_EACH_2_66(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P1, P2) \ FOR_EACH_2_68(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P1, P2) \ FOR_EACH_2_70(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P1, P2) \ FOR_EACH_2_72(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P1, P2) \ FOR_EACH_2_74(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P1, P2) \ FOR_EACH_2_76(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P1, P2) \ FOR_EACH_2_78(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P1, P2) \ FOR_EACH_2_80(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P1, P2) \ FOR_EACH_2_82(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P1, P2) \ FOR_EACH_2_84(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P1, P2) \ FOR_EACH_2_86(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P1, P2) \ FOR_EACH_2_88(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P1, P2) \ FOR_EACH_2_90(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P1, P2) \ FOR_EACH_2_92(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P1, P2) \ FOR_EACH_2_94(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P1, P2) \ FOR_EACH_2_96(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P1, P2) \ FOR_EACH_2_98(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P1, P2) \ FOR_EACH_2_100(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P1, P2) \ FOR_EACH_2_102(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P1, P2) \ FOR_EACH_2_104(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P1, P2) \ FOR_EACH_2_106(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P1, P2) \ FOR_EACH_2_108(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P1, P2) \ FOR_EACH_2_110(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P1, P2) \ FOR_EACH_2_112(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P1, P2) \ FOR_EACH_2_114(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P1, P2) \ FOR_EACH_2_116(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P1, P2) \ FOR_EACH_2_118(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P1, P2) \ FOR_EACH_2_120(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P1, P2) \ FOR_EACH_2_122(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_REVERSE_0(...) #define FOR_EACH_2_REVERSE_2(X, P1, P2) \ X(P1, P2) #define FOR_EACH_2_REVERSE_4(X, P1, P2, P3, P4) \ X(P3, P4) \ FOR_EACH_2_REVERSE_2(X, P1, P2) #define FOR_EACH_2_REVERSE_6(X, P1, P2, P3, P4, P5, P6) \ X(P5, P6) \ FOR_EACH_2_REVERSE_4(X, P1, P2, P3, P4) #define FOR_EACH_2_REVERSE_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(P7, P8) \ FOR_EACH_2_REVERSE_6(X, P1, P2, P3, P4, P5, P6) #define FOR_EACH_2_REVERSE_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(P9, P10) \ FOR_EACH_2_REVERSE_8(X, P1, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_REVERSE_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(P11, P12) \ FOR_EACH_2_REVERSE_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_REVERSE_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(P13, P14) \ FOR_EACH_2_REVERSE_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_REVERSE_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(P15, P16) \ FOR_EACH_2_REVERSE_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_REVERSE_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(P17, P18) \ FOR_EACH_2_REVERSE_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_REVERSE_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(P19, P20) \ FOR_EACH_2_REVERSE_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_REVERSE_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(P21, P22) \ FOR_EACH_2_REVERSE_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_REVERSE_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(P23, P24) \ FOR_EACH_2_REVERSE_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_REVERSE_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(P25, P26) \ FOR_EACH_2_REVERSE_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_REVERSE_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(P27, P28) \ FOR_EACH_2_REVERSE_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_REVERSE_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(P29, P30) \ FOR_EACH_2_REVERSE_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_REVERSE_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(P31, P32) \ FOR_EACH_2_REVERSE_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_REVERSE_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(P33, P34) \ FOR_EACH_2_REVERSE_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_REVERSE_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(P35, P36) \ FOR_EACH_2_REVERSE_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_REVERSE_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(P37, P38) \ FOR_EACH_2_REVERSE_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_REVERSE_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(P39, P40) \ FOR_EACH_2_REVERSE_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_REVERSE_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(P41, P42) \ FOR_EACH_2_REVERSE_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_REVERSE_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(P43, P44) \ FOR_EACH_2_REVERSE_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_REVERSE_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(P45, P46) \ FOR_EACH_2_REVERSE_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_REVERSE_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(P47, P48) \ FOR_EACH_2_REVERSE_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_REVERSE_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(P49, P50) \ FOR_EACH_2_REVERSE_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_REVERSE_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(P51, P52) \ FOR_EACH_2_REVERSE_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_REVERSE_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(P53, P54) \ FOR_EACH_2_REVERSE_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_REVERSE_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(P55, P56) \ FOR_EACH_2_REVERSE_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_REVERSE_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(P57, P58) \ FOR_EACH_2_REVERSE_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_REVERSE_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(P59, P60) \ FOR_EACH_2_REVERSE_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_REVERSE_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(P61, P62) \ FOR_EACH_2_REVERSE_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_REVERSE_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(P63, P64) \ FOR_EACH_2_REVERSE_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_REVERSE_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(P65, P66) \ FOR_EACH_2_REVERSE_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_REVERSE_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(P67, P68) \ FOR_EACH_2_REVERSE_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_REVERSE_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(P69, P70) \ FOR_EACH_2_REVERSE_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_REVERSE_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(P71, P72) \ FOR_EACH_2_REVERSE_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_REVERSE_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(P73, P74) \ FOR_EACH_2_REVERSE_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_REVERSE_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(P75, P76) \ FOR_EACH_2_REVERSE_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_REVERSE_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(P77, P78) \ FOR_EACH_2_REVERSE_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_REVERSE_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(P79, P80) \ FOR_EACH_2_REVERSE_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_REVERSE_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(P81, P82) \ FOR_EACH_2_REVERSE_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_REVERSE_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(P83, P84) \ FOR_EACH_2_REVERSE_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_REVERSE_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(P85, P86) \ FOR_EACH_2_REVERSE_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_REVERSE_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(P87, P88) \ FOR_EACH_2_REVERSE_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_REVERSE_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(P89, P90) \ FOR_EACH_2_REVERSE_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_REVERSE_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(P91, P92) \ FOR_EACH_2_REVERSE_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_REVERSE_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(P93, P94) \ FOR_EACH_2_REVERSE_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_REVERSE_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(P95, P96) \ FOR_EACH_2_REVERSE_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_REVERSE_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(P97, P98) \ FOR_EACH_2_REVERSE_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_REVERSE_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(P99, P100) \ FOR_EACH_2_REVERSE_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_REVERSE_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(P101, P102) \ FOR_EACH_2_REVERSE_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_REVERSE_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(P103, P104) \ FOR_EACH_2_REVERSE_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_REVERSE_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(P105, P106) \ FOR_EACH_2_REVERSE_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_REVERSE_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(P107, P108) \ FOR_EACH_2_REVERSE_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_REVERSE_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(P109, P110) \ FOR_EACH_2_REVERSE_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_REVERSE_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(P111, P112) \ FOR_EACH_2_REVERSE_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_REVERSE_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(P113, P114) \ FOR_EACH_2_REVERSE_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_REVERSE_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(P115, P116) \ FOR_EACH_2_REVERSE_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_REVERSE_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(P117, P118) \ FOR_EACH_2_REVERSE_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_REVERSE_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(P119, P120) \ FOR_EACH_2_REVERSE_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_REVERSE_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(P121, P122) \ FOR_EACH_2_REVERSE_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_REVERSE_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(P123, P124) \ FOR_EACH_2_REVERSE_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_COUNTED_0(...) #define FOR_EACH_1_COUNTED_1(X, P1) \ X(1, P1) #define FOR_EACH_1_COUNTED_2(X, P1, P2) \ X(2, P1) \ FOR_EACH_1_COUNTED_1(X, P2) #define FOR_EACH_1_COUNTED_3(X, P1, P2, P3) \ X(3, P1) \ FOR_EACH_1_COUNTED_2(X, P2, P3) #define FOR_EACH_1_COUNTED_4(X, P1, P2, P3, P4) \ X(4, P1) \ FOR_EACH_1_COUNTED_3(X, P2, P3, P4) #define FOR_EACH_1_COUNTED_5(X, P1, P2, P3, P4, P5) \ X(5, P1) \ FOR_EACH_1_COUNTED_4(X, P2, P3, P4, P5) #define FOR_EACH_1_COUNTED_6(X, P1, P2, P3, P4, P5, P6) \ X(6, P1) \ FOR_EACH_1_COUNTED_5(X, P2, P3, P4, P5, P6) #define FOR_EACH_1_COUNTED_7(X, P1, P2, P3, P4, P5, P6, P7) \ X(7, P1) \ FOR_EACH_1_COUNTED_6(X, P2, P3, P4, P5, P6, P7) #define FOR_EACH_1_COUNTED_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(8, P1) \ FOR_EACH_1_COUNTED_7(X, P2, P3, P4, P5, P6, P7, P8) #define FOR_EACH_1_COUNTED_9(X, P1, P2, P3, P4, P5, P6, P7, P8, P9) \ X(9, P1) \ FOR_EACH_1_COUNTED_8(X, P2, P3, P4, P5, P6, P7, P8, P9) #define FOR_EACH_1_COUNTED_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(10, P1) \ FOR_EACH_1_COUNTED_9(X, P2, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_1_COUNTED_11(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) \ X(11, P1) \ FOR_EACH_1_COUNTED_10(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11) #define FOR_EACH_1_COUNTED_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(12, P1) \ FOR_EACH_1_COUNTED_11(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_1_COUNTED_13(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) \ X(13, P1) \ FOR_EACH_1_COUNTED_12(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13) #define FOR_EACH_1_COUNTED_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(14, P1) \ FOR_EACH_1_COUNTED_13(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_1_COUNTED_15(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) \ X(15, P1) \ FOR_EACH_1_COUNTED_14(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15) #define FOR_EACH_1_COUNTED_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(16, P1) \ FOR_EACH_1_COUNTED_15(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_1_COUNTED_17(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) \ X(17, P1) \ FOR_EACH_1_COUNTED_16(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17) #define FOR_EACH_1_COUNTED_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(18, P1) \ FOR_EACH_1_COUNTED_17(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_1_COUNTED_19(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) \ X(19, P1) \ FOR_EACH_1_COUNTED_18(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19) #define FOR_EACH_1_COUNTED_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(20, P1) \ FOR_EACH_1_COUNTED_19(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_1_COUNTED_21(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) \ X(21, P1) \ FOR_EACH_1_COUNTED_20(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21) #define FOR_EACH_1_COUNTED_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(22, P1) \ FOR_EACH_1_COUNTED_21(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_1_COUNTED_23(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) \ X(23, P1) \ FOR_EACH_1_COUNTED_22(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23) #define FOR_EACH_1_COUNTED_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(24, P1) \ FOR_EACH_1_COUNTED_23(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_1_COUNTED_25(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) \ X(25, P1) \ FOR_EACH_1_COUNTED_24(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25) #define FOR_EACH_1_COUNTED_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(26, P1) \ FOR_EACH_1_COUNTED_25(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_1_COUNTED_27(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) \ X(27, P1) \ FOR_EACH_1_COUNTED_26(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27) #define FOR_EACH_1_COUNTED_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(28, P1) \ FOR_EACH_1_COUNTED_27(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_1_COUNTED_29(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) \ X(29, P1) \ FOR_EACH_1_COUNTED_28(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29) #define FOR_EACH_1_COUNTED_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(30, P1) \ FOR_EACH_1_COUNTED_29(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_1_COUNTED_31(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) \ X(31, P1) \ FOR_EACH_1_COUNTED_30(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31) #define FOR_EACH_1_COUNTED_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(32, P1) \ FOR_EACH_1_COUNTED_31(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_1_COUNTED_33(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) \ X(33, P1) \ FOR_EACH_1_COUNTED_32(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33) #define FOR_EACH_1_COUNTED_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(34, P1) \ FOR_EACH_1_COUNTED_33(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_1_COUNTED_35(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) \ X(35, P1) \ FOR_EACH_1_COUNTED_34(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35) #define FOR_EACH_1_COUNTED_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(36, P1) \ FOR_EACH_1_COUNTED_35(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_1_COUNTED_37(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) \ X(37, P1) \ FOR_EACH_1_COUNTED_36(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37) #define FOR_EACH_1_COUNTED_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(38, P1) \ FOR_EACH_1_COUNTED_37(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_1_COUNTED_39(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) \ X(39, P1) \ FOR_EACH_1_COUNTED_38(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39) #define FOR_EACH_1_COUNTED_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(40, P1) \ FOR_EACH_1_COUNTED_39(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_1_COUNTED_41(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) \ X(41, P1) \ FOR_EACH_1_COUNTED_40(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41) #define FOR_EACH_1_COUNTED_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(42, P1) \ FOR_EACH_1_COUNTED_41(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_1_COUNTED_43(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) \ X(43, P1) \ FOR_EACH_1_COUNTED_42(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43) #define FOR_EACH_1_COUNTED_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(44, P1) \ FOR_EACH_1_COUNTED_43(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_1_COUNTED_45(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) \ X(45, P1) \ FOR_EACH_1_COUNTED_44(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45) #define FOR_EACH_1_COUNTED_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(46, P1) \ FOR_EACH_1_COUNTED_45(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_1_COUNTED_47(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) \ X(47, P1) \ FOR_EACH_1_COUNTED_46(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47) #define FOR_EACH_1_COUNTED_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(48, P1) \ FOR_EACH_1_COUNTED_47(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_1_COUNTED_49(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) \ X(49, P1) \ FOR_EACH_1_COUNTED_48(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49) #define FOR_EACH_1_COUNTED_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(50, P1) \ FOR_EACH_1_COUNTED_49(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_1_COUNTED_51(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) \ X(51, P1) \ FOR_EACH_1_COUNTED_50(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51) #define FOR_EACH_1_COUNTED_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(52, P1) \ FOR_EACH_1_COUNTED_51(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_1_COUNTED_53(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) \ X(53, P1) \ FOR_EACH_1_COUNTED_52(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53) #define FOR_EACH_1_COUNTED_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(54, P1) \ FOR_EACH_1_COUNTED_53(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_1_COUNTED_55(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) \ X(55, P1) \ FOR_EACH_1_COUNTED_54(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55) #define FOR_EACH_1_COUNTED_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(56, P1) \ FOR_EACH_1_COUNTED_55(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_1_COUNTED_57(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) \ X(57, P1) \ FOR_EACH_1_COUNTED_56(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57) #define FOR_EACH_1_COUNTED_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(58, P1) \ FOR_EACH_1_COUNTED_57(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_1_COUNTED_59(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) \ X(59, P1) \ FOR_EACH_1_COUNTED_58(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59) #define FOR_EACH_1_COUNTED_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(60, P1) \ FOR_EACH_1_COUNTED_59(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_1_COUNTED_61(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) \ X(61, P1) \ FOR_EACH_1_COUNTED_60(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61) #define FOR_EACH_1_COUNTED_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(62, P1) \ FOR_EACH_1_COUNTED_61(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_1_COUNTED_63(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) \ X(63, P1) \ FOR_EACH_1_COUNTED_62(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63) #define FOR_EACH_1_COUNTED_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(64, P1) \ FOR_EACH_1_COUNTED_63(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_1_COUNTED_65(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) \ X(65, P1) \ FOR_EACH_1_COUNTED_64(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65) #define FOR_EACH_1_COUNTED_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(66, P1) \ FOR_EACH_1_COUNTED_65(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_1_COUNTED_67(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) \ X(67, P1) \ FOR_EACH_1_COUNTED_66(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67) #define FOR_EACH_1_COUNTED_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(68, P1) \ FOR_EACH_1_COUNTED_67(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_1_COUNTED_69(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) \ X(69, P1) \ FOR_EACH_1_COUNTED_68(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69) #define FOR_EACH_1_COUNTED_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(70, P1) \ FOR_EACH_1_COUNTED_69(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_1_COUNTED_71(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) \ X(71, P1) \ FOR_EACH_1_COUNTED_70(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71) #define FOR_EACH_1_COUNTED_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(72, P1) \ FOR_EACH_1_COUNTED_71(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_1_COUNTED_73(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) \ X(73, P1) \ FOR_EACH_1_COUNTED_72(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73) #define FOR_EACH_1_COUNTED_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(74, P1) \ FOR_EACH_1_COUNTED_73(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_1_COUNTED_75(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) \ X(75, P1) \ FOR_EACH_1_COUNTED_74(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75) #define FOR_EACH_1_COUNTED_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(76, P1) \ FOR_EACH_1_COUNTED_75(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_1_COUNTED_77(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) \ X(77, P1) \ FOR_EACH_1_COUNTED_76(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77) #define FOR_EACH_1_COUNTED_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(78, P1) \ FOR_EACH_1_COUNTED_77(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_1_COUNTED_79(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) \ X(79, P1) \ FOR_EACH_1_COUNTED_78(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79) #define FOR_EACH_1_COUNTED_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(80, P1) \ FOR_EACH_1_COUNTED_79(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_1_COUNTED_81(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) \ X(81, P1) \ FOR_EACH_1_COUNTED_80(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81) #define FOR_EACH_1_COUNTED_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(82, P1) \ FOR_EACH_1_COUNTED_81(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_1_COUNTED_83(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) \ X(83, P1) \ FOR_EACH_1_COUNTED_82(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83) #define FOR_EACH_1_COUNTED_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(84, P1) \ FOR_EACH_1_COUNTED_83(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_1_COUNTED_85(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) \ X(85, P1) \ FOR_EACH_1_COUNTED_84(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85) #define FOR_EACH_1_COUNTED_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(86, P1) \ FOR_EACH_1_COUNTED_85(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_1_COUNTED_87(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) \ X(87, P1) \ FOR_EACH_1_COUNTED_86(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87) #define FOR_EACH_1_COUNTED_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(88, P1) \ FOR_EACH_1_COUNTED_87(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_1_COUNTED_89(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) \ X(89, P1) \ FOR_EACH_1_COUNTED_88(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89) #define FOR_EACH_1_COUNTED_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(90, P1) \ FOR_EACH_1_COUNTED_89(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_1_COUNTED_91(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) \ X(91, P1) \ FOR_EACH_1_COUNTED_90(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91) #define FOR_EACH_1_COUNTED_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(92, P1) \ FOR_EACH_1_COUNTED_91(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_1_COUNTED_93(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) \ X(93, P1) \ FOR_EACH_1_COUNTED_92(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93) #define FOR_EACH_1_COUNTED_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(94, P1) \ FOR_EACH_1_COUNTED_93(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_1_COUNTED_95(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) \ X(95, P1) \ FOR_EACH_1_COUNTED_94(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95) #define FOR_EACH_1_COUNTED_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(96, P1) \ FOR_EACH_1_COUNTED_95(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_1_COUNTED_97(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) \ X(97, P1) \ FOR_EACH_1_COUNTED_96(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97) #define FOR_EACH_1_COUNTED_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(98, P1) \ FOR_EACH_1_COUNTED_97(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_1_COUNTED_99(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) \ X(99, P1) \ FOR_EACH_1_COUNTED_98(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99) #define FOR_EACH_1_COUNTED_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(100, P1) \ FOR_EACH_1_COUNTED_99(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_1_COUNTED_101(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) \ X(101, P1) \ FOR_EACH_1_COUNTED_100(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101) #define FOR_EACH_1_COUNTED_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(102, P1) \ FOR_EACH_1_COUNTED_101(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_1_COUNTED_103(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) \ X(103, P1) \ FOR_EACH_1_COUNTED_102(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103) #define FOR_EACH_1_COUNTED_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(104, P1) \ FOR_EACH_1_COUNTED_103(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_1_COUNTED_105(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) \ X(105, P1) \ FOR_EACH_1_COUNTED_104(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105) #define FOR_EACH_1_COUNTED_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(106, P1) \ FOR_EACH_1_COUNTED_105(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_1_COUNTED_107(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) \ X(107, P1) \ FOR_EACH_1_COUNTED_106(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107) #define FOR_EACH_1_COUNTED_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(108, P1) \ FOR_EACH_1_COUNTED_107(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_1_COUNTED_109(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) \ X(109, P1) \ FOR_EACH_1_COUNTED_108(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109) #define FOR_EACH_1_COUNTED_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(110, P1) \ FOR_EACH_1_COUNTED_109(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_1_COUNTED_111(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) \ X(111, P1) \ FOR_EACH_1_COUNTED_110(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111) #define FOR_EACH_1_COUNTED_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(112, P1) \ FOR_EACH_1_COUNTED_111(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_1_COUNTED_113(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) \ X(113, P1) \ FOR_EACH_1_COUNTED_112(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113) #define FOR_EACH_1_COUNTED_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(114, P1) \ FOR_EACH_1_COUNTED_113(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_1_COUNTED_115(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) \ X(115, P1) \ FOR_EACH_1_COUNTED_114(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115) #define FOR_EACH_1_COUNTED_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(116, P1) \ FOR_EACH_1_COUNTED_115(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_1_COUNTED_117(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) \ X(117, P1) \ FOR_EACH_1_COUNTED_116(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117) #define FOR_EACH_1_COUNTED_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(118, P1) \ FOR_EACH_1_COUNTED_117(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_1_COUNTED_119(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) \ X(119, P1) \ FOR_EACH_1_COUNTED_118(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119) #define FOR_EACH_1_COUNTED_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(120, P1) \ FOR_EACH_1_COUNTED_119(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_1_COUNTED_121(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) \ X(121, P1) \ FOR_EACH_1_COUNTED_120(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121) #define FOR_EACH_1_COUNTED_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(122, P1) \ FOR_EACH_1_COUNTED_121(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_1_COUNTED_123(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) \ X(123, P1) \ FOR_EACH_1_COUNTED_122(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123) #define FOR_EACH_1_COUNTED_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(124, P1) \ FOR_EACH_1_COUNTED_123(X, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #define FOR_EACH_2_COUNTED_0(...) #define FOR_EACH_2_COUNTED_2(X, P1, P2) \ X(2, P1, P2) #define FOR_EACH_2_COUNTED_4(X, P1, P2, P3, P4) \ X(4, P1, P2) \ FOR_EACH_2_COUNTED_2(X, P3, P4) #define FOR_EACH_2_COUNTED_6(X, P1, P2, P3, P4, P5, P6) \ X(6, P1, P2) \ FOR_EACH_2_COUNTED_4(X, P3, P4, P5, P6) #define FOR_EACH_2_COUNTED_8(X, P1, P2, P3, P4, P5, P6, P7, P8) \ X(8, P1, P2) \ FOR_EACH_2_COUNTED_6(X, P3, P4, P5, P6, P7, P8) #define FOR_EACH_2_COUNTED_10(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10) \ X(10, P1, P2) \ FOR_EACH_2_COUNTED_8(X, P3, P4, P5, P6, P7, P8, P9, P10) #define FOR_EACH_2_COUNTED_12(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) \ X(12, P1, P2) \ FOR_EACH_2_COUNTED_10(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12) #define FOR_EACH_2_COUNTED_14(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) \ X(14, P1, P2) \ FOR_EACH_2_COUNTED_12(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14) #define FOR_EACH_2_COUNTED_16(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) \ X(16, P1, P2) \ FOR_EACH_2_COUNTED_14(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16) #define FOR_EACH_2_COUNTED_18(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) \ X(18, P1, P2) \ FOR_EACH_2_COUNTED_16(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18) #define FOR_EACH_2_COUNTED_20(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) \ X(20, P1, P2) \ FOR_EACH_2_COUNTED_18(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20) #define FOR_EACH_2_COUNTED_22(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) \ X(22, P1, P2) \ FOR_EACH_2_COUNTED_20(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22) #define FOR_EACH_2_COUNTED_24(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) \ X(24, P1, P2) \ FOR_EACH_2_COUNTED_22(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24) #define FOR_EACH_2_COUNTED_26(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) \ X(26, P1, P2) \ FOR_EACH_2_COUNTED_24(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26) #define FOR_EACH_2_COUNTED_28(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) \ X(28, P1, P2) \ FOR_EACH_2_COUNTED_26(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28) #define FOR_EACH_2_COUNTED_30(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) \ X(30, P1, P2) \ FOR_EACH_2_COUNTED_28(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30) #define FOR_EACH_2_COUNTED_32(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) \ X(32, P1, P2) \ FOR_EACH_2_COUNTED_30(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32) #define FOR_EACH_2_COUNTED_34(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) \ X(34, P1, P2) \ FOR_EACH_2_COUNTED_32(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34) #define FOR_EACH_2_COUNTED_36(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) \ X(36, P1, P2) \ FOR_EACH_2_COUNTED_34(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36) #define FOR_EACH_2_COUNTED_38(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) \ X(38, P1, P2) \ FOR_EACH_2_COUNTED_36(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38) #define FOR_EACH_2_COUNTED_40(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) \ X(40, P1, P2) \ FOR_EACH_2_COUNTED_38(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40) #define FOR_EACH_2_COUNTED_42(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) \ X(42, P1, P2) \ FOR_EACH_2_COUNTED_40(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42) #define FOR_EACH_2_COUNTED_44(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) \ X(44, P1, P2) \ FOR_EACH_2_COUNTED_42(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44) #define FOR_EACH_2_COUNTED_46(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) \ X(46, P1, P2) \ FOR_EACH_2_COUNTED_44(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46) #define FOR_EACH_2_COUNTED_48(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) \ X(48, P1, P2) \ FOR_EACH_2_COUNTED_46(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48) #define FOR_EACH_2_COUNTED_50(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) \ X(50, P1, P2) \ FOR_EACH_2_COUNTED_48(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50) #define FOR_EACH_2_COUNTED_52(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) \ X(52, P1, P2) \ FOR_EACH_2_COUNTED_50(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52) #define FOR_EACH_2_COUNTED_54(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) \ X(54, P1, P2) \ FOR_EACH_2_COUNTED_52(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54) #define FOR_EACH_2_COUNTED_56(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) \ X(56, P1, P2) \ FOR_EACH_2_COUNTED_54(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56) #define FOR_EACH_2_COUNTED_58(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) \ X(58, P1, P2) \ FOR_EACH_2_COUNTED_56(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58) #define FOR_EACH_2_COUNTED_60(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) \ X(60, P1, P2) \ FOR_EACH_2_COUNTED_58(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60) #define FOR_EACH_2_COUNTED_62(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) \ X(62, P1, P2) \ FOR_EACH_2_COUNTED_60(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62) #define FOR_EACH_2_COUNTED_64(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) \ X(64, P1, P2) \ FOR_EACH_2_COUNTED_62(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64) #define FOR_EACH_2_COUNTED_66(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) \ X(66, P1, P2) \ FOR_EACH_2_COUNTED_64(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66) #define FOR_EACH_2_COUNTED_68(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) \ X(68, P1, P2) \ FOR_EACH_2_COUNTED_66(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68) #define FOR_EACH_2_COUNTED_70(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) \ X(70, P1, P2) \ FOR_EACH_2_COUNTED_68(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70) #define FOR_EACH_2_COUNTED_72(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) \ X(72, P1, P2) \ FOR_EACH_2_COUNTED_70(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72) #define FOR_EACH_2_COUNTED_74(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) \ X(74, P1, P2) \ FOR_EACH_2_COUNTED_72(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74) #define FOR_EACH_2_COUNTED_76(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) \ X(76, P1, P2) \ FOR_EACH_2_COUNTED_74(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76) #define FOR_EACH_2_COUNTED_78(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) \ X(78, P1, P2) \ FOR_EACH_2_COUNTED_76(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78) #define FOR_EACH_2_COUNTED_80(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) \ X(80, P1, P2) \ FOR_EACH_2_COUNTED_78(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80) #define FOR_EACH_2_COUNTED_82(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) \ X(82, P1, P2) \ FOR_EACH_2_COUNTED_80(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82) #define FOR_EACH_2_COUNTED_84(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) \ X(84, P1, P2) \ FOR_EACH_2_COUNTED_82(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84) #define FOR_EACH_2_COUNTED_86(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) \ X(86, P1, P2) \ FOR_EACH_2_COUNTED_84(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86) #define FOR_EACH_2_COUNTED_88(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) \ X(88, P1, P2) \ FOR_EACH_2_COUNTED_86(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88) #define FOR_EACH_2_COUNTED_90(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) \ X(90, P1, P2) \ FOR_EACH_2_COUNTED_88(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90) #define FOR_EACH_2_COUNTED_92(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) \ X(92, P1, P2) \ FOR_EACH_2_COUNTED_90(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92) #define FOR_EACH_2_COUNTED_94(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) \ X(94, P1, P2) \ FOR_EACH_2_COUNTED_92(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94) #define FOR_EACH_2_COUNTED_96(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) \ X(96, P1, P2) \ FOR_EACH_2_COUNTED_94(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96) #define FOR_EACH_2_COUNTED_98(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) \ X(98, P1, P2) \ FOR_EACH_2_COUNTED_96(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98) #define FOR_EACH_2_COUNTED_100(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) \ X(100, P1, P2) \ FOR_EACH_2_COUNTED_98(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100) #define FOR_EACH_2_COUNTED_102(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) \ X(102, P1, P2) \ FOR_EACH_2_COUNTED_100(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102) #define FOR_EACH_2_COUNTED_104(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) \ X(104, P1, P2) \ FOR_EACH_2_COUNTED_102(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104) #define FOR_EACH_2_COUNTED_106(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) \ X(106, P1, P2) \ FOR_EACH_2_COUNTED_104(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106) #define FOR_EACH_2_COUNTED_108(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) \ X(108, P1, P2) \ FOR_EACH_2_COUNTED_106(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108) #define FOR_EACH_2_COUNTED_110(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) \ X(110, P1, P2) \ FOR_EACH_2_COUNTED_108(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110) #define FOR_EACH_2_COUNTED_112(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) \ X(112, P1, P2) \ FOR_EACH_2_COUNTED_110(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112) #define FOR_EACH_2_COUNTED_114(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) \ X(114, P1, P2) \ FOR_EACH_2_COUNTED_112(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114) #define FOR_EACH_2_COUNTED_116(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) \ X(116, P1, P2) \ FOR_EACH_2_COUNTED_114(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116) #define FOR_EACH_2_COUNTED_118(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) \ X(118, P1, P2) \ FOR_EACH_2_COUNTED_116(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118) #define FOR_EACH_2_COUNTED_120(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) \ X(120, P1, P2) \ FOR_EACH_2_COUNTED_118(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120) #define FOR_EACH_2_COUNTED_122(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) \ X(122, P1, P2) \ FOR_EACH_2_COUNTED_120(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122) #define FOR_EACH_2_COUNTED_124(X, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) \ X(124, P1, P2) \ FOR_EACH_2_COUNTED_122(X, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15, P16, P17, P18, P19, P20, P21, P22, P23, P24, P25, P26, P27, P28, P29, P30, P31, P32, P33, P34, P35, P36, P37, P38, P39, P40, P41, P42, P43, P44, P45, P46, P47, P48, P49, P50, P51, P52, P53, P54, P55, P56, P57, P58, P59, P60, P61, P62, P63, P64, P65, P66, P67, P68, P69, P70, P71, P72, P73, P74, P75, P76, P77, P78, P79, P80, P81, P82, P83, P84, P85, P86, P87, P88, P89, P90, P91, P92, P93, P94, P95, P96, P97, P98, P99, P100, P101, P102, P103, P104, P105, P106, P107, P108, P109, P110, P111, P112, P113, P114, P115, P116, P117, P118, P119, P120, P121, P122, P123, P124) #ifdef _MSC_VER #define FOR_EACH_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) /*the COUNTED breed of FOR_EACH macro invokes a macro with 3 parameters: 1st being the count of invocation. For example. FOR_EACH_2_COUNTER(MACRO, a,b,c,d,e,f) will result in MACRO(6, a,b) MACRO(4, c,d) MACRO(2, e,f) This macro exists because we need a "stop condition" in outputting COMMA... when calling a function f(a,b,c,d) cannot be f(a,b,c,d,) <=doesn't compile (as opposed to enum definition) */ #define FOR_EACH_2_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) /*FOR_EACH_2_REVERSE acts just like FOR_EACH_2, but in reverse order. Example: FOR_EACH_2_REVERSE(X,a,b,c,d,e,f) => X(e,f) X(c,d) X (a, b) in this order */ #define FOR_EACH_2_REVERSE(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_REVERSE_, C1(COUNT_ARG(__VA_ARGS__))) LPAREN MACRO_TO_INVOKE, __VA_ARGS__) #else #define FOR_EACH_2(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_2_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_1_COUNTED(MACRO_TO_INVOKE, ...) C2(FOR_EACH_1_COUNTED_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #define FOR_EACH_2_REVERSE(MACRO_TO_INVOKE, ...) C2(FOR_EACH_2_REVERSE_, C1(COUNT_ARG(__VA_ARGS__))) ( MACRO_TO_INVOKE, __VA_ARGS__) #endif #ifdef _MSC_VER #define EXPAND_OR_C1(x) x #else #define EXPAND_OR_C1(...) __VA_ARGS__ #endif #define EXPAND_ARGS(...) __VA_ARGS__ #define EXPAND_TWICE(...) EXPAND_ARGS(__VA_ARGS__) #define DO_0(MACRO, ...) \ MACRO(0, __VA_ARGS__) #define DO_1(MACRO, ...) \ MACRO(1, __VA_ARGS__) \ DO_0(MACRO, __VA_ARGS__) #define DO_2(MACRO, ...) \ MACRO(2, __VA_ARGS__) \ DO_1(MACRO, __VA_ARGS__) #define DO_3(MACRO, ...) \ MACRO(3, __VA_ARGS__) \ DO_2(MACRO, __VA_ARGS__) #define DO_4(MACRO, ...) \ MACRO(4, __VA_ARGS__) \ DO_3(MACRO, __VA_ARGS__) #define DO_5(MACRO, ...) \ MACRO(5, __VA_ARGS__) \ DO_4(MACRO, __VA_ARGS__) #define DO_6(MACRO, ...) \ MACRO(6, __VA_ARGS__) \ DO_5(MACRO, __VA_ARGS__) #define DO_7(MACRO, ...) \ MACRO(7, __VA_ARGS__) \ DO_6(MACRO, __VA_ARGS__) #define DO_8(MACRO, ...) \ MACRO(8, __VA_ARGS__) \ DO_7(MACRO, __VA_ARGS__) #define DO_9(MACRO, ...) \ MACRO(9, __VA_ARGS__) \ DO_8(MACRO, __VA_ARGS__) #define DO_10(MACRO, ...) \ MACRO(10, __VA_ARGS__) \ DO_9(MACRO, __VA_ARGS__) #define DO_11(MACRO, ...) \ MACRO(11, __VA_ARGS__) \ DO_10(MACRO, __VA_ARGS__) #define DO_12(MACRO, ...) \ MACRO(12, __VA_ARGS__) \ DO_11(MACRO, __VA_ARGS__) #define DO_13(MACRO, ...) \ MACRO(13, __VA_ARGS__) \ DO_12(MACRO, __VA_ARGS__) #define DO_14(MACRO, ...) \ MACRO(14, __VA_ARGS__) \ DO_13(MACRO, __VA_ARGS__) #define DO_15(MACRO, ...) \ MACRO(15, __VA_ARGS__) \ DO_14(MACRO, __VA_ARGS__) #define DO_16(MACRO, ...) \ MACRO(16, __VA_ARGS__) \ DO_15(MACRO, __VA_ARGS__) #define DO_17(MACRO, ...) \ MACRO(17, __VA_ARGS__) \ DO_16(MACRO, __VA_ARGS__) #define DO_18(MACRO, ...) \ MACRO(18, __VA_ARGS__) \ DO_17(MACRO, __VA_ARGS__) #define DO_19(MACRO, ...) \ MACRO(19, __VA_ARGS__) \ DO_18(MACRO, __VA_ARGS__) #define DO_20(MACRO, ...) \ MACRO(20, __VA_ARGS__) \ DO_19(MACRO, __VA_ARGS__) #define DO_21(MACRO, ...) \ MACRO(21, __VA_ARGS__) \ DO_20(MACRO, __VA_ARGS__) #define DO_22(MACRO, ...) \ MACRO(22, __VA_ARGS__) \ DO_21(MACRO, __VA_ARGS__) #define DO_23(MACRO, ...) \ MACRO(23, __VA_ARGS__) \ DO_22(MACRO, __VA_ARGS__) #define DO_24(MACRO, ...) \ MACRO(24, __VA_ARGS__) \ DO_23(MACRO, __VA_ARGS__) #define DO_25(MACRO, ...) \ MACRO(25, __VA_ARGS__) \ DO_24(MACRO, __VA_ARGS__) #define DO_26(MACRO, ...) \ MACRO(26, __VA_ARGS__) \ DO_25(MACRO, __VA_ARGS__) #define DO_27(MACRO, ...) \ MACRO(27, __VA_ARGS__) \ DO_26(MACRO, __VA_ARGS__) #define DO_28(MACRO, ...) \ MACRO(28, __VA_ARGS__) \ DO_27(MACRO, __VA_ARGS__) #define DO_29(MACRO, ...) \ MACRO(29, __VA_ARGS__) \ DO_28(MACRO, __VA_ARGS__) #define DO_30(MACRO, ...) \ MACRO(30, __VA_ARGS__) \ DO_29(MACRO, __VA_ARGS__) #define DO_31(MACRO, ...) \ MACRO(31, __VA_ARGS__) \ DO_30(MACRO, __VA_ARGS__) #define DO_32(MACRO, ...) \ MACRO(32, __VA_ARGS__) \ DO_31(MACRO, __VA_ARGS__) #define DO_33(MACRO, ...) \ MACRO(33, __VA_ARGS__) \ DO_32(MACRO, __VA_ARGS__) #define DO_34(MACRO, ...) \ MACRO(34, __VA_ARGS__) \ DO_33(MACRO, __VA_ARGS__) #define DO_35(MACRO, ...) \ MACRO(35, __VA_ARGS__) \ DO_34(MACRO, __VA_ARGS__) #define DO_36(MACRO, ...) \ MACRO(36, __VA_ARGS__) \ DO_35(MACRO, __VA_ARGS__) #define DO_37(MACRO, ...) \ MACRO(37, __VA_ARGS__) \ DO_36(MACRO, __VA_ARGS__) #define DO_38(MACRO, ...) \ MACRO(38, __VA_ARGS__) \ DO_37(MACRO, __VA_ARGS__) #define DO_39(MACRO, ...) \ MACRO(39, __VA_ARGS__) \ DO_38(MACRO, __VA_ARGS__) #define DO_40(MACRO, ...) \ MACRO(40, __VA_ARGS__) \ DO_39(MACRO, __VA_ARGS__) #define DO_41(MACRO, ...) \ MACRO(41, __VA_ARGS__) \ DO_40(MACRO, __VA_ARGS__) #define DO_42(MACRO, ...) \ MACRO(42, __VA_ARGS__) \ DO_41(MACRO, __VA_ARGS__) #define DO_43(MACRO, ...) \ MACRO(43, __VA_ARGS__) \ DO_42(MACRO, __VA_ARGS__) #define DO_44(MACRO, ...) \ MACRO(44, __VA_ARGS__) \ DO_43(MACRO, __VA_ARGS__) #define DO_45(MACRO, ...) \ MACRO(45, __VA_ARGS__) \ DO_44(MACRO, __VA_ARGS__) #define DO_46(MACRO, ...) \ MACRO(46, __VA_ARGS__) \ DO_45(MACRO, __VA_ARGS__) #define DO_47(MACRO, ...) \ MACRO(47, __VA_ARGS__) \ DO_46(MACRO, __VA_ARGS__) #define DO_48(MACRO, ...) \ MACRO(48, __VA_ARGS__) \ DO_47(MACRO, __VA_ARGS__) #define DO_49(MACRO, ...) \ MACRO(49, __VA_ARGS__) \ DO_48(MACRO, __VA_ARGS__) #define DO_50(MACRO, ...) \ MACRO(50, __VA_ARGS__) \ DO_49(MACRO, __VA_ARGS__) #define DO_51(MACRO, ...) \ MACRO(51, __VA_ARGS__) \ DO_50(MACRO, __VA_ARGS__) #define DO_52(MACRO, ...) \ MACRO(52, __VA_ARGS__) \ DO_51(MACRO, __VA_ARGS__) #define DO_53(MACRO, ...) \ MACRO(53, __VA_ARGS__) \ DO_52(MACRO, __VA_ARGS__) #define DO_54(MACRO, ...) \ MACRO(54, __VA_ARGS__) \ DO_53(MACRO, __VA_ARGS__) #define DO_55(MACRO, ...) \ MACRO(55, __VA_ARGS__) \ DO_54(MACRO, __VA_ARGS__) #define DO_56(MACRO, ...) \ MACRO(56, __VA_ARGS__) \ DO_55(MACRO, __VA_ARGS__) #define DO_57(MACRO, ...) \ MACRO(57, __VA_ARGS__) \ DO_56(MACRO, __VA_ARGS__) #define DO_58(MACRO, ...) \ MACRO(58, __VA_ARGS__) \ DO_57(MACRO, __VA_ARGS__) #define DO_59(MACRO, ...) \ MACRO(59, __VA_ARGS__) \ DO_58(MACRO, __VA_ARGS__) #define DO_60(MACRO, ...) \ MACRO(60, __VA_ARGS__) \ DO_59(MACRO, __VA_ARGS__) #define DO_61(MACRO, ...) \ MACRO(61, __VA_ARGS__) \ DO_60(MACRO, __VA_ARGS__) #define DO_62(MACRO, ...) \ MACRO(62, __VA_ARGS__) \ DO_61(MACRO, __VA_ARGS__) #define DO_63(MACRO, ...) \ MACRO(63, __VA_ARGS__) \ DO_62(MACRO, __VA_ARGS__) #define DO_64(MACRO, ...) \ MACRO(64, __VA_ARGS__) \ DO_63(MACRO, __VA_ARGS__) #define DO_65(MACRO, ...) \ MACRO(65, __VA_ARGS__) \ DO_64(MACRO, __VA_ARGS__) #define DO_66(MACRO, ...) \ MACRO(66, __VA_ARGS__) \ DO_65(MACRO, __VA_ARGS__) #define DO_67(MACRO, ...) \ MACRO(67, __VA_ARGS__) \ DO_66(MACRO, __VA_ARGS__) #define DO_68(MACRO, ...) \ MACRO(68, __VA_ARGS__) \ DO_67(MACRO, __VA_ARGS__) #define DO_69(MACRO, ...) \ MACRO(69, __VA_ARGS__) \ DO_68(MACRO, __VA_ARGS__) #define DO_70(MACRO, ...) \ MACRO(70, __VA_ARGS__) \ DO_69(MACRO, __VA_ARGS__) #define DO_71(MACRO, ...) \ MACRO(71, __VA_ARGS__) \ DO_70(MACRO, __VA_ARGS__) #define DO_72(MACRO, ...) \ MACRO(72, __VA_ARGS__) \ DO_71(MACRO, __VA_ARGS__) #define DO_73(MACRO, ...) \ MACRO(73, __VA_ARGS__) \ DO_72(MACRO, __VA_ARGS__) #define DO_74(MACRO, ...) \ MACRO(74, __VA_ARGS__) \ DO_73(MACRO, __VA_ARGS__) #define DO_75(MACRO, ...) \ MACRO(75, __VA_ARGS__) \ DO_74(MACRO, __VA_ARGS__) #define DO_76(MACRO, ...) \ MACRO(76, __VA_ARGS__) \ DO_75(MACRO, __VA_ARGS__) #define DO_77(MACRO, ...) \ MACRO(77, __VA_ARGS__) \ DO_76(MACRO, __VA_ARGS__) #define DO_78(MACRO, ...) \ MACRO(78, __VA_ARGS__) \ DO_77(MACRO, __VA_ARGS__) #define DO_79(MACRO, ...) \ MACRO(79, __VA_ARGS__) \ DO_78(MACRO, __VA_ARGS__) #define DO_80(MACRO, ...) \ MACRO(80, __VA_ARGS__) \ DO_79(MACRO, __VA_ARGS__) #define DO_81(MACRO, ...) \ MACRO(81, __VA_ARGS__) \ DO_80(MACRO, __VA_ARGS__) #define DO_82(MACRO, ...) \ MACRO(82, __VA_ARGS__) \ DO_81(MACRO, __VA_ARGS__) #define DO_83(MACRO, ...) \ MACRO(83, __VA_ARGS__) \ DO_82(MACRO, __VA_ARGS__) #define DO_84(MACRO, ...) \ MACRO(84, __VA_ARGS__) \ DO_83(MACRO, __VA_ARGS__) #define DO_85(MACRO, ...) \ MACRO(85, __VA_ARGS__) \ DO_84(MACRO, __VA_ARGS__) #define DO_86(MACRO, ...) \ MACRO(86, __VA_ARGS__) \ DO_85(MACRO, __VA_ARGS__) #define DO_87(MACRO, ...) \ MACRO(87, __VA_ARGS__) \ DO_86(MACRO, __VA_ARGS__) #define DO_88(MACRO, ...) \ MACRO(88, __VA_ARGS__) \ DO_87(MACRO, __VA_ARGS__) #define DO_89(MACRO, ...) \ MACRO(89, __VA_ARGS__) \ DO_88(MACRO, __VA_ARGS__) #define DO_90(MACRO, ...) \ MACRO(90, __VA_ARGS__) \ DO_89(MACRO, __VA_ARGS__) #define DO_91(MACRO, ...) \ MACRO(91, __VA_ARGS__) \ DO_90(MACRO, __VA_ARGS__) #define DO_92(MACRO, ...) \ MACRO(92, __VA_ARGS__) \ DO_91(MACRO, __VA_ARGS__) #define DO_93(MACRO, ...) \ MACRO(93, __VA_ARGS__) \ DO_92(MACRO, __VA_ARGS__) #define DO_94(MACRO, ...) \ MACRO(94, __VA_ARGS__) \ DO_93(MACRO, __VA_ARGS__) #define DO_95(MACRO, ...) \ MACRO(95, __VA_ARGS__) \ DO_94(MACRO, __VA_ARGS__) #define DO_96(MACRO, ...) \ MACRO(96, __VA_ARGS__) \ DO_95(MACRO, __VA_ARGS__) #define DO_97(MACRO, ...) \ MACRO(97, __VA_ARGS__) \ DO_96(MACRO, __VA_ARGS__) #define DO_98(MACRO, ...) \ MACRO(98, __VA_ARGS__) \ DO_97(MACRO, __VA_ARGS__) #define DO_99(MACRO, ...) \ MACRO(99, __VA_ARGS__) \ DO_98(MACRO, __VA_ARGS__) #define DO_100(MACRO, ...) \ MACRO(100, __VA_ARGS__) \ DO_99(MACRO, __VA_ARGS__) #define DO_101(MACRO, ...) \ MACRO(101, __VA_ARGS__) \ DO_100(MACRO, __VA_ARGS__) #define DO_102(MACRO, ...) \ MACRO(102, __VA_ARGS__) \ DO_101(MACRO, __VA_ARGS__) #define DO_103(MACRO, ...) \ MACRO(103, __VA_ARGS__) \ DO_102(MACRO, __VA_ARGS__) #define DO_104(MACRO, ...) \ MACRO(104, __VA_ARGS__) \ DO_103(MACRO, __VA_ARGS__) #define DO_105(MACRO, ...) \ MACRO(105, __VA_ARGS__) \ DO_104(MACRO, __VA_ARGS__) #define DO_106(MACRO, ...) \ MACRO(106, __VA_ARGS__) \ DO_105(MACRO, __VA_ARGS__) #define DO_107(MACRO, ...) \ MACRO(107, __VA_ARGS__) \ DO_106(MACRO, __VA_ARGS__) #define DO_108(MACRO, ...) \ MACRO(108, __VA_ARGS__) \ DO_107(MACRO, __VA_ARGS__) #define DO_109(MACRO, ...) \ MACRO(109, __VA_ARGS__) \ DO_108(MACRO, __VA_ARGS__) #define DO_110(MACRO, ...) \ MACRO(110, __VA_ARGS__) \ DO_109(MACRO, __VA_ARGS__) #define DO_111(MACRO, ...) \ MACRO(111, __VA_ARGS__) \ DO_110(MACRO, __VA_ARGS__) #define DO_112(MACRO, ...) \ MACRO(112, __VA_ARGS__) \ DO_111(MACRO, __VA_ARGS__) #define DO_113(MACRO, ...) \ MACRO(113, __VA_ARGS__) \ DO_112(MACRO, __VA_ARGS__) #define DO_114(MACRO, ...) \ MACRO(114, __VA_ARGS__) \ DO_113(MACRO, __VA_ARGS__) #define DO_115(MACRO, ...) \ MACRO(115, __VA_ARGS__) \ DO_114(MACRO, __VA_ARGS__) #define DO_116(MACRO, ...) \ MACRO(116, __VA_ARGS__) \ DO_115(MACRO, __VA_ARGS__) #define DO_117(MACRO, ...) \ MACRO(117, __VA_ARGS__) \ DO_116(MACRO, __VA_ARGS__) #define DO_118(MACRO, ...) \ MACRO(118, __VA_ARGS__) \ DO_117(MACRO, __VA_ARGS__) #define DO_119(MACRO, ...) \ MACRO(119, __VA_ARGS__) \ DO_118(MACRO, __VA_ARGS__) #define DO_120(MACRO, ...) \ MACRO(120, __VA_ARGS__) \ DO_119(MACRO, __VA_ARGS__) #define DO_121(MACRO, ...) \ MACRO(121, __VA_ARGS__) \ DO_120(MACRO, __VA_ARGS__) #define DO_122(MACRO, ...) \ MACRO(122, __VA_ARGS__) \ DO_121(MACRO, __VA_ARGS__) #define DO_123(MACRO, ...) \ MACRO(123, __VA_ARGS__) \ DO_122(MACRO, __VA_ARGS__) #define DO_124(MACRO, ...) \ MACRO(124, __VA_ARGS__) \ DO_123(MACRO, __VA_ARGS__) #define DO_125(MACRO, ...) \ MACRO(125, __VA_ARGS__) \ DO_124(MACRO, __VA_ARGS__) #define DO_126(MACRO, ...) \ MACRO(126, __VA_ARGS__) \ DO_125(MACRO, __VA_ARGS__) #define DO_127(MACRO, ...) \ MACRO(127, __VA_ARGS__) \ DO_126(MACRO, __VA_ARGS__) #define DO_128(MACRO, ...) \ MACRO(128, __VA_ARGS__) \ DO_127(MACRO, __VA_ARGS__) #define DO_129(MACRO, ...) \ MACRO(129, __VA_ARGS__) \ DO_128(MACRO, __VA_ARGS__) #define DO_130(MACRO, ...) \ MACRO(130, __VA_ARGS__) \ DO_129(MACRO, __VA_ARGS__) #define DO_131(MACRO, ...) \ MACRO(131, __VA_ARGS__) \ DO_130(MACRO, __VA_ARGS__) #define DO_132(MACRO, ...) \ MACRO(132, __VA_ARGS__) \ DO_131(MACRO, __VA_ARGS__) #define DO_133(MACRO, ...) \ MACRO(133, __VA_ARGS__) \ DO_132(MACRO, __VA_ARGS__) #define DO_134(MACRO, ...) \ MACRO(134, __VA_ARGS__) \ DO_133(MACRO, __VA_ARGS__) #define DO_135(MACRO, ...) \ MACRO(135, __VA_ARGS__) \ DO_134(MACRO, __VA_ARGS__) #define DO_136(MACRO, ...) \ MACRO(136, __VA_ARGS__) \ DO_135(MACRO, __VA_ARGS__) #define DO_137(MACRO, ...) \ MACRO(137, __VA_ARGS__) \ DO_136(MACRO, __VA_ARGS__) #define DO_138(MACRO, ...) \ MACRO(138, __VA_ARGS__) \ DO_137(MACRO, __VA_ARGS__) #define DO_139(MACRO, ...) \ MACRO(139, __VA_ARGS__) \ DO_138(MACRO, __VA_ARGS__) #define DO_140(MACRO, ...) \ MACRO(140, __VA_ARGS__) \ DO_139(MACRO, __VA_ARGS__) #define DO_141(MACRO, ...) \ MACRO(141, __VA_ARGS__) \ DO_140(MACRO, __VA_ARGS__) #define DO_142(MACRO, ...) \ MACRO(142, __VA_ARGS__) \ DO_141(MACRO, __VA_ARGS__) #define DO_143(MACRO, ...) \ MACRO(143, __VA_ARGS__) \ DO_142(MACRO, __VA_ARGS__) #define DO_144(MACRO, ...) \ MACRO(144, __VA_ARGS__) \ DO_143(MACRO, __VA_ARGS__) #define DO_145(MACRO, ...) \ MACRO(145, __VA_ARGS__) \ DO_144(MACRO, __VA_ARGS__) #define DO_146(MACRO, ...) \ MACRO(146, __VA_ARGS__) \ DO_145(MACRO, __VA_ARGS__) #define DO_147(MACRO, ...) \ MACRO(147, __VA_ARGS__) \ DO_146(MACRO, __VA_ARGS__) #define DO_148(MACRO, ...) \ MACRO(148, __VA_ARGS__) \ DO_147(MACRO, __VA_ARGS__) #define DO_149(MACRO, ...) \ MACRO(149, __VA_ARGS__) \ DO_148(MACRO, __VA_ARGS__) #define DO_150(MACRO, ...) \ MACRO(150, __VA_ARGS__) \ DO_149(MACRO, __VA_ARGS__) #define DO_151(MACRO, ...) \ MACRO(151, __VA_ARGS__) \ DO_150(MACRO, __VA_ARGS__) #define DO_152(MACRO, ...) \ MACRO(152, __VA_ARGS__) \ DO_151(MACRO, __VA_ARGS__) #define DO_153(MACRO, ...) \ MACRO(153, __VA_ARGS__) \ DO_152(MACRO, __VA_ARGS__) #define DO_154(MACRO, ...) \ MACRO(154, __VA_ARGS__) \ DO_153(MACRO, __VA_ARGS__) #define DO_155(MACRO, ...) \ MACRO(155, __VA_ARGS__) \ DO_154(MACRO, __VA_ARGS__) #define DO_156(MACRO, ...) \ MACRO(156, __VA_ARGS__) \ DO_155(MACRO, __VA_ARGS__) #define DO_157(MACRO, ...) \ MACRO(157, __VA_ARGS__) \ DO_156(MACRO, __VA_ARGS__) #define DO_158(MACRO, ...) \ MACRO(158, __VA_ARGS__) \ DO_157(MACRO, __VA_ARGS__) #define DO_159(MACRO, ...) \ MACRO(159, __VA_ARGS__) \ DO_158(MACRO, __VA_ARGS__) #define DO_160(MACRO, ...) \ MACRO(160, __VA_ARGS__) \ DO_159(MACRO, __VA_ARGS__) #define DO_161(MACRO, ...) \ MACRO(161, __VA_ARGS__) \ DO_160(MACRO, __VA_ARGS__) #define DO_162(MACRO, ...) \ MACRO(162, __VA_ARGS__) \ DO_161(MACRO, __VA_ARGS__) #define DO_163(MACRO, ...) \ MACRO(163, __VA_ARGS__) \ DO_162(MACRO, __VA_ARGS__) #define DO_164(MACRO, ...) \ MACRO(164, __VA_ARGS__) \ DO_163(MACRO, __VA_ARGS__) #define DO_165(MACRO, ...) \ MACRO(165, __VA_ARGS__) \ DO_164(MACRO, __VA_ARGS__) #define DO_166(MACRO, ...) \ MACRO(166, __VA_ARGS__) \ DO_165(MACRO, __VA_ARGS__) #define DO_167(MACRO, ...) \ MACRO(167, __VA_ARGS__) \ DO_166(MACRO, __VA_ARGS__) #define DO_168(MACRO, ...) \ MACRO(168, __VA_ARGS__) \ DO_167(MACRO, __VA_ARGS__) #define DO_169(MACRO, ...) \ MACRO(169, __VA_ARGS__) \ DO_168(MACRO, __VA_ARGS__) #define DO_170(MACRO, ...) \ MACRO(170, __VA_ARGS__) \ DO_169(MACRO, __VA_ARGS__) #define DO_171(MACRO, ...) \ MACRO(171, __VA_ARGS__) \ DO_170(MACRO, __VA_ARGS__) #define DO_172(MACRO, ...) \ MACRO(172, __VA_ARGS__) \ DO_171(MACRO, __VA_ARGS__) #define DO_173(MACRO, ...) \ MACRO(173, __VA_ARGS__) \ DO_172(MACRO, __VA_ARGS__) #define DO_174(MACRO, ...) \ MACRO(174, __VA_ARGS__) \ DO_173(MACRO, __VA_ARGS__) #define DO_175(MACRO, ...) \ MACRO(175, __VA_ARGS__) \ DO_174(MACRO, __VA_ARGS__) #define DO_176(MACRO, ...) \ MACRO(176, __VA_ARGS__) \ DO_175(MACRO, __VA_ARGS__) #define DO_177(MACRO, ...) \ MACRO(177, __VA_ARGS__) \ DO_176(MACRO, __VA_ARGS__) #define DO_178(MACRO, ...) \ MACRO(178, __VA_ARGS__) \ DO_177(MACRO, __VA_ARGS__) #define DO_179(MACRO, ...) \ MACRO(179, __VA_ARGS__) \ DO_178(MACRO, __VA_ARGS__) #define DO_180(MACRO, ...) \ MACRO(180, __VA_ARGS__) \ DO_179(MACRO, __VA_ARGS__) #define DO_181(MACRO, ...) \ MACRO(181, __VA_ARGS__) \ DO_180(MACRO, __VA_ARGS__) #define DO_182(MACRO, ...) \ MACRO(182, __VA_ARGS__) \ DO_181(MACRO, __VA_ARGS__) #define DO_183(MACRO, ...) \ MACRO(183, __VA_ARGS__) \ DO_182(MACRO, __VA_ARGS__) #define DO_184(MACRO, ...) \ MACRO(184, __VA_ARGS__) \ DO_183(MACRO, __VA_ARGS__) #define DO_185(MACRO, ...) \ MACRO(185, __VA_ARGS__) \ DO_184(MACRO, __VA_ARGS__) #define DO_186(MACRO, ...) \ MACRO(186, __VA_ARGS__) \ DO_185(MACRO, __VA_ARGS__) #define DO_187(MACRO, ...) \ MACRO(187, __VA_ARGS__) \ DO_186(MACRO, __VA_ARGS__) #define DO_188(MACRO, ...) \ MACRO(188, __VA_ARGS__) \ DO_187(MACRO, __VA_ARGS__) #define DO_189(MACRO, ...) \ MACRO(189, __VA_ARGS__) \ DO_188(MACRO, __VA_ARGS__) #define DO_190(MACRO, ...) \ MACRO(190, __VA_ARGS__) \ DO_189(MACRO, __VA_ARGS__) #define DO_191(MACRO, ...) \ MACRO(191, __VA_ARGS__) \ DO_190(MACRO, __VA_ARGS__) #define DO_192(MACRO, ...) \ MACRO(192, __VA_ARGS__) \ DO_191(MACRO, __VA_ARGS__) #define DO_193(MACRO, ...) \ MACRO(193, __VA_ARGS__) \ DO_192(MACRO, __VA_ARGS__) #define DO_194(MACRO, ...) \ MACRO(194, __VA_ARGS__) \ DO_193(MACRO, __VA_ARGS__) #define DO_195(MACRO, ...) \ MACRO(195, __VA_ARGS__) \ DO_194(MACRO, __VA_ARGS__) #define DO_196(MACRO, ...) \ MACRO(196, __VA_ARGS__) \ DO_195(MACRO, __VA_ARGS__) #define DO_197(MACRO, ...) \ MACRO(197, __VA_ARGS__) \ DO_196(MACRO, __VA_ARGS__) #define DO_198(MACRO, ...) \ MACRO(198, __VA_ARGS__) \ DO_197(MACRO, __VA_ARGS__) #define DO_199(MACRO, ...) \ MACRO(199, __VA_ARGS__) \ DO_198(MACRO, __VA_ARGS__) #define DO_200(MACRO, ...) \ MACRO(200, __VA_ARGS__) \ DO_199(MACRO, __VA_ARGS__) #define DO_201(MACRO, ...) \ MACRO(201, __VA_ARGS__) \ DO_200(MACRO, __VA_ARGS__) #define DO_202(MACRO, ...) \ MACRO(202, __VA_ARGS__) \ DO_201(MACRO, __VA_ARGS__) #define DO_203(MACRO, ...) \ MACRO(203, __VA_ARGS__) \ DO_202(MACRO, __VA_ARGS__) #define DO_204(MACRO, ...) \ MACRO(204, __VA_ARGS__) \ DO_203(MACRO, __VA_ARGS__) #define DO_205(MACRO, ...) \ MACRO(205, __VA_ARGS__) \ DO_204(MACRO, __VA_ARGS__) #define DO_206(MACRO, ...) \ MACRO(206, __VA_ARGS__) \ DO_205(MACRO, __VA_ARGS__) #define DO_207(MACRO, ...) \ MACRO(207, __VA_ARGS__) \ DO_206(MACRO, __VA_ARGS__) #define DO_208(MACRO, ...) \ MACRO(208, __VA_ARGS__) \ DO_207(MACRO, __VA_ARGS__) #define DO_209(MACRO, ...) \ MACRO(209, __VA_ARGS__) \ DO_208(MACRO, __VA_ARGS__) #define DO_210(MACRO, ...) \ MACRO(210, __VA_ARGS__) \ DO_209(MACRO, __VA_ARGS__) #define DO_211(MACRO, ...) \ MACRO(211, __VA_ARGS__) \ DO_210(MACRO, __VA_ARGS__) #define DO_212(MACRO, ...) \ MACRO(212, __VA_ARGS__) \ DO_211(MACRO, __VA_ARGS__) #define DO_213(MACRO, ...) \ MACRO(213, __VA_ARGS__) \ DO_212(MACRO, __VA_ARGS__) #define DO_214(MACRO, ...) \ MACRO(214, __VA_ARGS__) \ DO_213(MACRO, __VA_ARGS__) #define DO_215(MACRO, ...) \ MACRO(215, __VA_ARGS__) \ DO_214(MACRO, __VA_ARGS__) #define DO_216(MACRO, ...) \ MACRO(216, __VA_ARGS__) \ DO_215(MACRO, __VA_ARGS__) #define DO_217(MACRO, ...) \ MACRO(217, __VA_ARGS__) \ DO_216(MACRO, __VA_ARGS__) #define DO_218(MACRO, ...) \ MACRO(218, __VA_ARGS__) \ DO_217(MACRO, __VA_ARGS__) #define DO_219(MACRO, ...) \ MACRO(219, __VA_ARGS__) \ DO_218(MACRO, __VA_ARGS__) #define DO_220(MACRO, ...) \ MACRO(220, __VA_ARGS__) \ DO_219(MACRO, __VA_ARGS__) #define DO_221(MACRO, ...) \ MACRO(221, __VA_ARGS__) \ DO_220(MACRO, __VA_ARGS__) #define DO_222(MACRO, ...) \ MACRO(222, __VA_ARGS__) \ DO_221(MACRO, __VA_ARGS__) #define DO_223(MACRO, ...) \ MACRO(223, __VA_ARGS__) \ DO_222(MACRO, __VA_ARGS__) #define DO_224(MACRO, ...) \ MACRO(224, __VA_ARGS__) \ DO_223(MACRO, __VA_ARGS__) #define DO_225(MACRO, ...) \ MACRO(225, __VA_ARGS__) \ DO_224(MACRO, __VA_ARGS__) #define DO_226(MACRO, ...) \ MACRO(226, __VA_ARGS__) \ DO_225(MACRO, __VA_ARGS__) #define DO_227(MACRO, ...) \ MACRO(227, __VA_ARGS__) \ DO_226(MACRO, __VA_ARGS__) #define DO_228(MACRO, ...) \ MACRO(228, __VA_ARGS__) \ DO_227(MACRO, __VA_ARGS__) #define DO_229(MACRO, ...) \ MACRO(229, __VA_ARGS__) \ DO_228(MACRO, __VA_ARGS__) #define DO_230(MACRO, ...) \ MACRO(230, __VA_ARGS__) \ DO_229(MACRO, __VA_ARGS__) #define DO_231(MACRO, ...) \ MACRO(231, __VA_ARGS__) \ DO_230(MACRO, __VA_ARGS__) #define DO_232(MACRO, ...) \ MACRO(232, __VA_ARGS__) \ DO_231(MACRO, __VA_ARGS__) #define DO_233(MACRO, ...) \ MACRO(233, __VA_ARGS__) \ DO_232(MACRO, __VA_ARGS__) #define DO_234(MACRO, ...) \ MACRO(234, __VA_ARGS__) \ DO_233(MACRO, __VA_ARGS__) #define DO_235(MACRO, ...) \ MACRO(235, __VA_ARGS__) \ DO_234(MACRO, __VA_ARGS__) #define DO_236(MACRO, ...) \ MACRO(236, __VA_ARGS__) \ DO_235(MACRO, __VA_ARGS__) #define DO_237(MACRO, ...) \ MACRO(237, __VA_ARGS__) \ DO_236(MACRO, __VA_ARGS__) #define DO_238(MACRO, ...) \ MACRO(238, __VA_ARGS__) \ DO_237(MACRO, __VA_ARGS__) #define DO_239(MACRO, ...) \ MACRO(239, __VA_ARGS__) \ DO_238(MACRO, __VA_ARGS__) #define DO_240(MACRO, ...) \ MACRO(240, __VA_ARGS__) \ DO_239(MACRO, __VA_ARGS__) #define DO_241(MACRO, ...) \ MACRO(241, __VA_ARGS__) \ DO_240(MACRO, __VA_ARGS__) #define DO_242(MACRO, ...) \ MACRO(242, __VA_ARGS__) \ DO_241(MACRO, __VA_ARGS__) #define DO_243(MACRO, ...) \ MACRO(243, __VA_ARGS__) \ DO_242(MACRO, __VA_ARGS__) #define DO_244(MACRO, ...) \ MACRO(244, __VA_ARGS__) \ DO_243(MACRO, __VA_ARGS__) #define DO_245(MACRO, ...) \ MACRO(245, __VA_ARGS__) \ DO_244(MACRO, __VA_ARGS__) #define DO_246(MACRO, ...) \ MACRO(246, __VA_ARGS__) \ DO_245(MACRO, __VA_ARGS__) #define DO_247(MACRO, ...) \ MACRO(247, __VA_ARGS__) \ DO_246(MACRO, __VA_ARGS__) #define DO_248(MACRO, ...) \ MACRO(248, __VA_ARGS__) \ DO_247(MACRO, __VA_ARGS__) #define DO_249(MACRO, ...) \ MACRO(249, __VA_ARGS__) \ DO_248(MACRO, __VA_ARGS__) #define DO_250(MACRO, ...) \ MACRO(250, __VA_ARGS__) \ DO_249(MACRO, __VA_ARGS__) #define DO_251(MACRO, ...) \ MACRO(251, __VA_ARGS__) \ DO_250(MACRO, __VA_ARGS__) #define DO_252(MACRO, ...) \ MACRO(252, __VA_ARGS__) \ DO_251(MACRO, __VA_ARGS__) #define DO_253(MACRO, ...) \ MACRO(253, __VA_ARGS__) \ DO_252(MACRO, __VA_ARGS__) #define DO_254(MACRO, ...) \ MACRO(254, __VA_ARGS__) \ DO_253(MACRO, __VA_ARGS__) #define DO_255(MACRO, ...) \ MACRO(255, __VA_ARGS__) \ DO_254(MACRO, __VA_ARGS__) #define DO_256(MACRO, ...) \ MACRO(256, __VA_ARGS__) \ DO_255(MACRO, __VA_ARGS__) #define DO_257(MACRO, ...) \ MACRO(257, __VA_ARGS__) \ DO_256(MACRO, __VA_ARGS__) #define DO_258(MACRO, ...) \ MACRO(258, __VA_ARGS__) \ DO_257(MACRO, __VA_ARGS__) #define DO_259(MACRO, ...) \ MACRO(259, __VA_ARGS__) \ DO_258(MACRO, __VA_ARGS__) #define DO_260(MACRO, ...) \ MACRO(260, __VA_ARGS__) \ DO_259(MACRO, __VA_ARGS__) #define DO_261(MACRO, ...) \ MACRO(261, __VA_ARGS__) \ DO_260(MACRO, __VA_ARGS__) #define DO_262(MACRO, ...) \ MACRO(262, __VA_ARGS__) \ DO_261(MACRO, __VA_ARGS__) #define DO_263(MACRO, ...) \ MACRO(263, __VA_ARGS__) \ DO_262(MACRO, __VA_ARGS__) #define DO_264(MACRO, ...) \ MACRO(264, __VA_ARGS__) \ DO_263(MACRO, __VA_ARGS__) #define DO_265(MACRO, ...) \ MACRO(265, __VA_ARGS__) \ DO_264(MACRO, __VA_ARGS__) #define DO_266(MACRO, ...) \ MACRO(266, __VA_ARGS__) \ DO_265(MACRO, __VA_ARGS__) #define DO_267(MACRO, ...) \ MACRO(267, __VA_ARGS__) \ DO_266(MACRO, __VA_ARGS__) #define DO_268(MACRO, ...) \ MACRO(268, __VA_ARGS__) \ DO_267(MACRO, __VA_ARGS__) #define DO_269(MACRO, ...) \ MACRO(269, __VA_ARGS__) \ DO_268(MACRO, __VA_ARGS__) #define DO_270(MACRO, ...) \ MACRO(270, __VA_ARGS__) \ DO_269(MACRO, __VA_ARGS__) #define DO_271(MACRO, ...) \ MACRO(271, __VA_ARGS__) \ DO_270(MACRO, __VA_ARGS__) #define DO_272(MACRO, ...) \ MACRO(272, __VA_ARGS__) \ DO_271(MACRO, __VA_ARGS__) #define DO_273(MACRO, ...) \ MACRO(273, __VA_ARGS__) \ DO_272(MACRO, __VA_ARGS__) #define DO_274(MACRO, ...) \ MACRO(274, __VA_ARGS__) \ DO_273(MACRO, __VA_ARGS__) #define DO_275(MACRO, ...) \ MACRO(275, __VA_ARGS__) \ DO_274(MACRO, __VA_ARGS__) #define DO_276(MACRO, ...) \ MACRO(276, __VA_ARGS__) \ DO_275(MACRO, __VA_ARGS__) #define DO_277(MACRO, ...) \ MACRO(277, __VA_ARGS__) \ DO_276(MACRO, __VA_ARGS__) #define DO_278(MACRO, ...) \ MACRO(278, __VA_ARGS__) \ DO_277(MACRO, __VA_ARGS__) #define DO_279(MACRO, ...) \ MACRO(279, __VA_ARGS__) \ DO_278(MACRO, __VA_ARGS__) #define DO_280(MACRO, ...) \ MACRO(280, __VA_ARGS__) \ DO_279(MACRO, __VA_ARGS__) #define DO_281(MACRO, ...) \ MACRO(281, __VA_ARGS__) \ DO_280(MACRO, __VA_ARGS__) #define DO_282(MACRO, ...) \ MACRO(282, __VA_ARGS__) \ DO_281(MACRO, __VA_ARGS__) #define DO_283(MACRO, ...) \ MACRO(283, __VA_ARGS__) \ DO_282(MACRO, __VA_ARGS__) #define DO_284(MACRO, ...) \ MACRO(284, __VA_ARGS__) \ DO_283(MACRO, __VA_ARGS__) #define DO_285(MACRO, ...) \ MACRO(285, __VA_ARGS__) \ DO_284(MACRO, __VA_ARGS__) #define DO_286(MACRO, ...) \ MACRO(286, __VA_ARGS__) \ DO_285(MACRO, __VA_ARGS__) #define DO_287(MACRO, ...) \ MACRO(287, __VA_ARGS__) \ DO_286(MACRO, __VA_ARGS__) #define DO_288(MACRO, ...) \ MACRO(288, __VA_ARGS__) \ DO_287(MACRO, __VA_ARGS__) #define DO_289(MACRO, ...) \ MACRO(289, __VA_ARGS__) \ DO_288(MACRO, __VA_ARGS__) #define DO_290(MACRO, ...) \ MACRO(290, __VA_ARGS__) \ DO_289(MACRO, __VA_ARGS__) #define DO_291(MACRO, ...) \ MACRO(291, __VA_ARGS__) \ DO_290(MACRO, __VA_ARGS__) #define DO_292(MACRO, ...) \ MACRO(292, __VA_ARGS__) \ DO_291(MACRO, __VA_ARGS__) #define DO_293(MACRO, ...) \ MACRO(293, __VA_ARGS__) \ DO_292(MACRO, __VA_ARGS__) #define DO_294(MACRO, ...) \ MACRO(294, __VA_ARGS__) \ DO_293(MACRO, __VA_ARGS__) #define DO_295(MACRO, ...) \ MACRO(295, __VA_ARGS__) \ DO_294(MACRO, __VA_ARGS__) #define DO_296(MACRO, ...) \ MACRO(296, __VA_ARGS__) \ DO_295(MACRO, __VA_ARGS__) #define DO_297(MACRO, ...) \ MACRO(297, __VA_ARGS__) \ DO_296(MACRO, __VA_ARGS__) #define DO_298(MACRO, ...) \ MACRO(298, __VA_ARGS__) \ DO_297(MACRO, __VA_ARGS__) #define DO_299(MACRO, ...) \ MACRO(299, __VA_ARGS__) \ DO_298(MACRO, __VA_ARGS__) #define DO_300(MACRO, ...) \ MACRO(300, __VA_ARGS__) \ DO_299(MACRO, __VA_ARGS__) #define DO_301(MACRO, ...) \ MACRO(301, __VA_ARGS__) \ DO_300(MACRO, __VA_ARGS__) #define DO_302(MACRO, ...) \ MACRO(302, __VA_ARGS__) \ DO_301(MACRO, __VA_ARGS__) #define DO_303(MACRO, ...) \ MACRO(303, __VA_ARGS__) \ DO_302(MACRO, __VA_ARGS__) #define DO_304(MACRO, ...) \ MACRO(304, __VA_ARGS__) \ DO_303(MACRO, __VA_ARGS__) #define DO_305(MACRO, ...) \ MACRO(305, __VA_ARGS__) \ DO_304(MACRO, __VA_ARGS__) #define DO_306(MACRO, ...) \ MACRO(306, __VA_ARGS__) \ DO_305(MACRO, __VA_ARGS__) #define DO_307(MACRO, ...) \ MACRO(307, __VA_ARGS__) \ DO_306(MACRO, __VA_ARGS__) #define DO_308(MACRO, ...) \ MACRO(308, __VA_ARGS__) \ DO_307(MACRO, __VA_ARGS__) #define DO_309(MACRO, ...) \ MACRO(309, __VA_ARGS__) \ DO_308(MACRO, __VA_ARGS__) #define DO_310(MACRO, ...) \ MACRO(310, __VA_ARGS__) \ DO_309(MACRO, __VA_ARGS__) #define DO_311(MACRO, ...) \ MACRO(311, __VA_ARGS__) \ DO_310(MACRO, __VA_ARGS__) #define DO_312(MACRO, ...) \ MACRO(312, __VA_ARGS__) \ DO_311(MACRO, __VA_ARGS__) #define DO_313(MACRO, ...) \ MACRO(313, __VA_ARGS__) \ DO_312(MACRO, __VA_ARGS__) #define DO_314(MACRO, ...) \ MACRO(314, __VA_ARGS__) \ DO_313(MACRO, __VA_ARGS__) #define DO_315(MACRO, ...) \ MACRO(315, __VA_ARGS__) \ DO_314(MACRO, __VA_ARGS__) #define DO_316(MACRO, ...) \ MACRO(316, __VA_ARGS__) \ DO_315(MACRO, __VA_ARGS__) #define DO_317(MACRO, ...) \ MACRO(317, __VA_ARGS__) \ DO_316(MACRO, __VA_ARGS__) #define DO_318(MACRO, ...) \ MACRO(318, __VA_ARGS__) \ DO_317(MACRO, __VA_ARGS__) #define DO_319(MACRO, ...) \ MACRO(319, __VA_ARGS__) \ DO_318(MACRO, __VA_ARGS__) #define DO_320(MACRO, ...) \ MACRO(320, __VA_ARGS__) \ DO_319(MACRO, __VA_ARGS__) #define DO_321(MACRO, ...) \ MACRO(321, __VA_ARGS__) \ DO_320(MACRO, __VA_ARGS__) #define DO_322(MACRO, ...) \ MACRO(322, __VA_ARGS__) \ DO_321(MACRO, __VA_ARGS__) #define DO_323(MACRO, ...) \ MACRO(323, __VA_ARGS__) \ DO_322(MACRO, __VA_ARGS__) #define DO_324(MACRO, ...) \ MACRO(324, __VA_ARGS__) \ DO_323(MACRO, __VA_ARGS__) #define DO_325(MACRO, ...) \ MACRO(325, __VA_ARGS__) \ DO_324(MACRO, __VA_ARGS__) #define DO_326(MACRO, ...) \ MACRO(326, __VA_ARGS__) \ DO_325(MACRO, __VA_ARGS__) #define DO_327(MACRO, ...) \ MACRO(327, __VA_ARGS__) \ DO_326(MACRO, __VA_ARGS__) #define DO_328(MACRO, ...) \ MACRO(328, __VA_ARGS__) \ DO_327(MACRO, __VA_ARGS__) #define DO_329(MACRO, ...) \ MACRO(329, __VA_ARGS__) \ DO_328(MACRO, __VA_ARGS__) #define DO_330(MACRO, ...) \ MACRO(330, __VA_ARGS__) \ DO_329(MACRO, __VA_ARGS__) #define DO_331(MACRO, ...) \ MACRO(331, __VA_ARGS__) \ DO_330(MACRO, __VA_ARGS__) #define DO_332(MACRO, ...) \ MACRO(332, __VA_ARGS__) \ DO_331(MACRO, __VA_ARGS__) #define DO_333(MACRO, ...) \ MACRO(333, __VA_ARGS__) \ DO_332(MACRO, __VA_ARGS__) #define DO_334(MACRO, ...) \ MACRO(334, __VA_ARGS__) \ DO_333(MACRO, __VA_ARGS__) #define DO_335(MACRO, ...) \ MACRO(335, __VA_ARGS__) \ DO_334(MACRO, __VA_ARGS__) #define DO_336(MACRO, ...) \ MACRO(336, __VA_ARGS__) \ DO_335(MACRO, __VA_ARGS__) #define DO_337(MACRO, ...) \ MACRO(337, __VA_ARGS__) \ DO_336(MACRO, __VA_ARGS__) #define DO_338(MACRO, ...) \ MACRO(338, __VA_ARGS__) \ DO_337(MACRO, __VA_ARGS__) #define DO_339(MACRO, ...) \ MACRO(339, __VA_ARGS__) \ DO_338(MACRO, __VA_ARGS__) #define DO_340(MACRO, ...) \ MACRO(340, __VA_ARGS__) \ DO_339(MACRO, __VA_ARGS__) #define DO_341(MACRO, ...) \ MACRO(341, __VA_ARGS__) \ DO_340(MACRO, __VA_ARGS__) #define DO_342(MACRO, ...) \ MACRO(342, __VA_ARGS__) \ DO_341(MACRO, __VA_ARGS__) #define DO_343(MACRO, ...) \ MACRO(343, __VA_ARGS__) \ DO_342(MACRO, __VA_ARGS__) #define DO_344(MACRO, ...) \ MACRO(344, __VA_ARGS__) \ DO_343(MACRO, __VA_ARGS__) #define DO_345(MACRO, ...) \ MACRO(345, __VA_ARGS__) \ DO_344(MACRO, __VA_ARGS__) #define DO_346(MACRO, ...) \ MACRO(346, __VA_ARGS__) \ DO_345(MACRO, __VA_ARGS__) #define DO_347(MACRO, ...) \ MACRO(347, __VA_ARGS__) \ DO_346(MACRO, __VA_ARGS__) #define DO_348(MACRO, ...) \ MACRO(348, __VA_ARGS__) \ DO_347(MACRO, __VA_ARGS__) #define DO_349(MACRO, ...) \ MACRO(349, __VA_ARGS__) \ DO_348(MACRO, __VA_ARGS__) #define DO_350(MACRO, ...) \ MACRO(350, __VA_ARGS__) \ DO_349(MACRO, __VA_ARGS__) #define DO_351(MACRO, ...) \ MACRO(351, __VA_ARGS__) \ DO_350(MACRO, __VA_ARGS__) #define DO_352(MACRO, ...) \ MACRO(352, __VA_ARGS__) \ DO_351(MACRO, __VA_ARGS__) #define DO_353(MACRO, ...) \ MACRO(353, __VA_ARGS__) \ DO_352(MACRO, __VA_ARGS__) #define DO_354(MACRO, ...) \ MACRO(354, __VA_ARGS__) \ DO_353(MACRO, __VA_ARGS__) #define DO_355(MACRO, ...) \ MACRO(355, __VA_ARGS__) \ DO_354(MACRO, __VA_ARGS__) #define DO_356(MACRO, ...) \ MACRO(356, __VA_ARGS__) \ DO_355(MACRO, __VA_ARGS__) #define DO_357(MACRO, ...) \ MACRO(357, __VA_ARGS__) \ DO_356(MACRO, __VA_ARGS__) #define DO_358(MACRO, ...) \ MACRO(358, __VA_ARGS__) \ DO_357(MACRO, __VA_ARGS__) #define DO_359(MACRO, ...) \ MACRO(359, __VA_ARGS__) \ DO_358(MACRO, __VA_ARGS__) #define DO_360(MACRO, ...) \ MACRO(360, __VA_ARGS__) \ DO_359(MACRO, __VA_ARGS__) #define DO_361(MACRO, ...) \ MACRO(361, __VA_ARGS__) \ DO_360(MACRO, __VA_ARGS__) #define DO_362(MACRO, ...) \ MACRO(362, __VA_ARGS__) \ DO_361(MACRO, __VA_ARGS__) #define DO_363(MACRO, ...) \ MACRO(363, __VA_ARGS__) \ DO_362(MACRO, __VA_ARGS__) #define DO_364(MACRO, ...) \ MACRO(364, __VA_ARGS__) \ DO_363(MACRO, __VA_ARGS__) #define DO_365(MACRO, ...) \ MACRO(365, __VA_ARGS__) \ DO_364(MACRO, __VA_ARGS__) #define DO_366(MACRO, ...) \ MACRO(366, __VA_ARGS__) \ DO_365(MACRO, __VA_ARGS__) #define DO_367(MACRO, ...) \ MACRO(367, __VA_ARGS__) \ DO_366(MACRO, __VA_ARGS__) #define DO_368(MACRO, ...) \ MACRO(368, __VA_ARGS__) \ DO_367(MACRO, __VA_ARGS__) #define DO_369(MACRO, ...) \ MACRO(369, __VA_ARGS__) \ DO_368(MACRO, __VA_ARGS__) #define DO_370(MACRO, ...) \ MACRO(370, __VA_ARGS__) \ DO_369(MACRO, __VA_ARGS__) #define DO_371(MACRO, ...) \ MACRO(371, __VA_ARGS__) \ DO_370(MACRO, __VA_ARGS__) #define DO_372(MACRO, ...) \ MACRO(372, __VA_ARGS__) \ DO_371(MACRO, __VA_ARGS__) #define DO_373(MACRO, ...) \ MACRO(373, __VA_ARGS__) \ DO_372(MACRO, __VA_ARGS__) #define DO_374(MACRO, ...) \ MACRO(374, __VA_ARGS__) \ DO_373(MACRO, __VA_ARGS__) #define DO_375(MACRO, ...) \ MACRO(375, __VA_ARGS__) \ DO_374(MACRO, __VA_ARGS__) #define DO_376(MACRO, ...) \ MACRO(376, __VA_ARGS__) \ DO_375(MACRO, __VA_ARGS__) #define DO_377(MACRO, ...) \ MACRO(377, __VA_ARGS__) \ DO_376(MACRO, __VA_ARGS__) #define DO_378(MACRO, ...) \ MACRO(378, __VA_ARGS__) \ DO_377(MACRO, __VA_ARGS__) #define DO_379(MACRO, ...) \ MACRO(379, __VA_ARGS__) \ DO_378(MACRO, __VA_ARGS__) #define DO_380(MACRO, ...) \ MACRO(380, __VA_ARGS__) \ DO_379(MACRO, __VA_ARGS__) #define DO_381(MACRO, ...) \ MACRO(381, __VA_ARGS__) \ DO_380(MACRO, __VA_ARGS__) #define DO_382(MACRO, ...) \ MACRO(382, __VA_ARGS__) \ DO_381(MACRO, __VA_ARGS__) #define DO_383(MACRO, ...) \ MACRO(383, __VA_ARGS__) \ DO_382(MACRO, __VA_ARGS__) #define DO_384(MACRO, ...) \ MACRO(384, __VA_ARGS__) \ DO_383(MACRO, __VA_ARGS__) #define DO_385(MACRO, ...) \ MACRO(385, __VA_ARGS__) \ DO_384(MACRO, __VA_ARGS__) #define DO_386(MACRO, ...) \ MACRO(386, __VA_ARGS__) \ DO_385(MACRO, __VA_ARGS__) #define DO_387(MACRO, ...) \ MACRO(387, __VA_ARGS__) \ DO_386(MACRO, __VA_ARGS__) #define DO_388(MACRO, ...) \ MACRO(388, __VA_ARGS__) \ DO_387(MACRO, __VA_ARGS__) #define DO_389(MACRO, ...) \ MACRO(389, __VA_ARGS__) \ DO_388(MACRO, __VA_ARGS__) #define DO_390(MACRO, ...) \ MACRO(390, __VA_ARGS__) \ DO_389(MACRO, __VA_ARGS__) #define DO_391(MACRO, ...) \ MACRO(391, __VA_ARGS__) \ DO_390(MACRO, __VA_ARGS__) #define DO_392(MACRO, ...) \ MACRO(392, __VA_ARGS__) \ DO_391(MACRO, __VA_ARGS__) #define DO_393(MACRO, ...) \ MACRO(393, __VA_ARGS__) \ DO_392(MACRO, __VA_ARGS__) #define DO_394(MACRO, ...) \ MACRO(394, __VA_ARGS__) \ DO_393(MACRO, __VA_ARGS__) #define DO_395(MACRO, ...) \ MACRO(395, __VA_ARGS__) \ DO_394(MACRO, __VA_ARGS__) #define DO_396(MACRO, ...) \ MACRO(396, __VA_ARGS__) \ DO_395(MACRO, __VA_ARGS__) #define DO_397(MACRO, ...) \ MACRO(397, __VA_ARGS__) \ DO_396(MACRO, __VA_ARGS__) #define DO_398(MACRO, ...) \ MACRO(398, __VA_ARGS__) \ DO_397(MACRO, __VA_ARGS__) #define DO_399(MACRO, ...) \ MACRO(399, __VA_ARGS__) \ DO_398(MACRO, __VA_ARGS__) #define DO_400(MACRO, ...) \ MACRO(400, __VA_ARGS__) \ DO_399(MACRO, __VA_ARGS__) #define DO_401(MACRO, ...) \ MACRO(401, __VA_ARGS__) \ DO_400(MACRO, __VA_ARGS__) #define DO_402(MACRO, ...) \ MACRO(402, __VA_ARGS__) \ DO_401(MACRO, __VA_ARGS__) #define DO_403(MACRO, ...) \ MACRO(403, __VA_ARGS__) \ DO_402(MACRO, __VA_ARGS__) #define DO_404(MACRO, ...) \ MACRO(404, __VA_ARGS__) \ DO_403(MACRO, __VA_ARGS__) #define DO_405(MACRO, ...) \ MACRO(405, __VA_ARGS__) \ DO_404(MACRO, __VA_ARGS__) #define DO_406(MACRO, ...) \ MACRO(406, __VA_ARGS__) \ DO_405(MACRO, __VA_ARGS__) #define DO_407(MACRO, ...) \ MACRO(407, __VA_ARGS__) \ DO_406(MACRO, __VA_ARGS__) #define DO_408(MACRO, ...) \ MACRO(408, __VA_ARGS__) \ DO_407(MACRO, __VA_ARGS__) #define DO_409(MACRO, ...) \ MACRO(409, __VA_ARGS__) \ DO_408(MACRO, __VA_ARGS__) #define DO_410(MACRO, ...) \ MACRO(410, __VA_ARGS__) \ DO_409(MACRO, __VA_ARGS__) #define DO_411(MACRO, ...) \ MACRO(411, __VA_ARGS__) \ DO_410(MACRO, __VA_ARGS__) #define DO_412(MACRO, ...) \ MACRO(412, __VA_ARGS__) \ DO_411(MACRO, __VA_ARGS__) #define DO_413(MACRO, ...) \ MACRO(413, __VA_ARGS__) \ DO_412(MACRO, __VA_ARGS__) #define DO_414(MACRO, ...) \ MACRO(414, __VA_ARGS__) \ DO_413(MACRO, __VA_ARGS__) #define DO_415(MACRO, ...) \ MACRO(415, __VA_ARGS__) \ DO_414(MACRO, __VA_ARGS__) #define DO_416(MACRO, ...) \ MACRO(416, __VA_ARGS__) \ DO_415(MACRO, __VA_ARGS__) #define DO_417(MACRO, ...) \ MACRO(417, __VA_ARGS__) \ DO_416(MACRO, __VA_ARGS__) #define DO_418(MACRO, ...) \ MACRO(418, __VA_ARGS__) \ DO_417(MACRO, __VA_ARGS__) #define DO_419(MACRO, ...) \ MACRO(419, __VA_ARGS__) \ DO_418(MACRO, __VA_ARGS__) #define DO_420(MACRO, ...) \ MACRO(420, __VA_ARGS__) \ DO_419(MACRO, __VA_ARGS__) #define DO_421(MACRO, ...) \ MACRO(421, __VA_ARGS__) \ DO_420(MACRO, __VA_ARGS__) #define DO_422(MACRO, ...) \ MACRO(422, __VA_ARGS__) \ DO_421(MACRO, __VA_ARGS__) #define DO_423(MACRO, ...) \ MACRO(423, __VA_ARGS__) \ DO_422(MACRO, __VA_ARGS__) #define DO_424(MACRO, ...) \ MACRO(424, __VA_ARGS__) \ DO_423(MACRO, __VA_ARGS__) #define DO_425(MACRO, ...) \ MACRO(425, __VA_ARGS__) \ DO_424(MACRO, __VA_ARGS__) #define DO_426(MACRO, ...) \ MACRO(426, __VA_ARGS__) \ DO_425(MACRO, __VA_ARGS__) #define DO_427(MACRO, ...) \ MACRO(427, __VA_ARGS__) \ DO_426(MACRO, __VA_ARGS__) #define DO_428(MACRO, ...) \ MACRO(428, __VA_ARGS__) \ DO_427(MACRO, __VA_ARGS__) #define DO_429(MACRO, ...) \ MACRO(429, __VA_ARGS__) \ DO_428(MACRO, __VA_ARGS__) #define DO_430(MACRO, ...) \ MACRO(430, __VA_ARGS__) \ DO_429(MACRO, __VA_ARGS__) #define DO_431(MACRO, ...) \ MACRO(431, __VA_ARGS__) \ DO_430(MACRO, __VA_ARGS__) #define DO_432(MACRO, ...) \ MACRO(432, __VA_ARGS__) \ DO_431(MACRO, __VA_ARGS__) #define DO_433(MACRO, ...) \ MACRO(433, __VA_ARGS__) \ DO_432(MACRO, __VA_ARGS__) #define DO_434(MACRO, ...) \ MACRO(434, __VA_ARGS__) \ DO_433(MACRO, __VA_ARGS__) #define DO_435(MACRO, ...) \ MACRO(435, __VA_ARGS__) \ DO_434(MACRO, __VA_ARGS__) #define DO_436(MACRO, ...) \ MACRO(436, __VA_ARGS__) \ DO_435(MACRO, __VA_ARGS__) #define DO_437(MACRO, ...) \ MACRO(437, __VA_ARGS__) \ DO_436(MACRO, __VA_ARGS__) #define DO_438(MACRO, ...) \ MACRO(438, __VA_ARGS__) \ DO_437(MACRO, __VA_ARGS__) #define DO_439(MACRO, ...) \ MACRO(439, __VA_ARGS__) \ DO_438(MACRO, __VA_ARGS__) #define DO_440(MACRO, ...) \ MACRO(440, __VA_ARGS__) \ DO_439(MACRO, __VA_ARGS__) #define DO_441(MACRO, ...) \ MACRO(441, __VA_ARGS__) \ DO_440(MACRO, __VA_ARGS__) #define DO_442(MACRO, ...) \ MACRO(442, __VA_ARGS__) \ DO_441(MACRO, __VA_ARGS__) #define DO_443(MACRO, ...) \ MACRO(443, __VA_ARGS__) \ DO_442(MACRO, __VA_ARGS__) #define DO_444(MACRO, ...) \ MACRO(444, __VA_ARGS__) \ DO_443(MACRO, __VA_ARGS__) #define DO_445(MACRO, ...) \ MACRO(445, __VA_ARGS__) \ DO_444(MACRO, __VA_ARGS__) #define DO_446(MACRO, ...) \ MACRO(446, __VA_ARGS__) \ DO_445(MACRO, __VA_ARGS__) #define DO_447(MACRO, ...) \ MACRO(447, __VA_ARGS__) \ DO_446(MACRO, __VA_ARGS__) #define DO_448(MACRO, ...) \ MACRO(448, __VA_ARGS__) \ DO_447(MACRO, __VA_ARGS__) #define DO_449(MACRO, ...) \ MACRO(449, __VA_ARGS__) \ DO_448(MACRO, __VA_ARGS__) #define DO_450(MACRO, ...) \ MACRO(450, __VA_ARGS__) \ DO_449(MACRO, __VA_ARGS__) #define DO_451(MACRO, ...) \ MACRO(451, __VA_ARGS__) \ DO_450(MACRO, __VA_ARGS__) #define DO_452(MACRO, ...) \ MACRO(452, __VA_ARGS__) \ DO_451(MACRO, __VA_ARGS__) #define DO_453(MACRO, ...) \ MACRO(453, __VA_ARGS__) \ DO_452(MACRO, __VA_ARGS__) #define DO_454(MACRO, ...) \ MACRO(454, __VA_ARGS__) \ DO_453(MACRO, __VA_ARGS__) #define DO_455(MACRO, ...) \ MACRO(455, __VA_ARGS__) \ DO_454(MACRO, __VA_ARGS__) #define DO_456(MACRO, ...) \ MACRO(456, __VA_ARGS__) \ DO_455(MACRO, __VA_ARGS__) #define DO_457(MACRO, ...) \ MACRO(457, __VA_ARGS__) \ DO_456(MACRO, __VA_ARGS__) #define DO_458(MACRO, ...) \ MACRO(458, __VA_ARGS__) \ DO_457(MACRO, __VA_ARGS__) #define DO_459(MACRO, ...) \ MACRO(459, __VA_ARGS__) \ DO_458(MACRO, __VA_ARGS__) #define DO_460(MACRO, ...) \ MACRO(460, __VA_ARGS__) \ DO_459(MACRO, __VA_ARGS__) #define DO_461(MACRO, ...) \ MACRO(461, __VA_ARGS__) \ DO_460(MACRO, __VA_ARGS__) #define DO_462(MACRO, ...) \ MACRO(462, __VA_ARGS__) \ DO_461(MACRO, __VA_ARGS__) #define DO_463(MACRO, ...) \ MACRO(463, __VA_ARGS__) \ DO_462(MACRO, __VA_ARGS__) #define DO_464(MACRO, ...) \ MACRO(464, __VA_ARGS__) \ DO_463(MACRO, __VA_ARGS__) #define DO_465(MACRO, ...) \ MACRO(465, __VA_ARGS__) \ DO_464(MACRO, __VA_ARGS__) #define DO_466(MACRO, ...) \ MACRO(466, __VA_ARGS__) \ DO_465(MACRO, __VA_ARGS__) #define DO_467(MACRO, ...) \ MACRO(467, __VA_ARGS__) \ DO_466(MACRO, __VA_ARGS__) #define DO_468(MACRO, ...) \ MACRO(468, __VA_ARGS__) \ DO_467(MACRO, __VA_ARGS__) #define DO_469(MACRO, ...) \ MACRO(469, __VA_ARGS__) \ DO_468(MACRO, __VA_ARGS__) #define DO_470(MACRO, ...) \ MACRO(470, __VA_ARGS__) \ DO_469(MACRO, __VA_ARGS__) #define DO_471(MACRO, ...) \ MACRO(471, __VA_ARGS__) \ DO_470(MACRO, __VA_ARGS__) #define DO_472(MACRO, ...) \ MACRO(472, __VA_ARGS__) \ DO_471(MACRO, __VA_ARGS__) #define DO_473(MACRO, ...) \ MACRO(473, __VA_ARGS__) \ DO_472(MACRO, __VA_ARGS__) #define DO_474(MACRO, ...) \ MACRO(474, __VA_ARGS__) \ DO_473(MACRO, __VA_ARGS__) #define DO_475(MACRO, ...) \ MACRO(475, __VA_ARGS__) \ DO_474(MACRO, __VA_ARGS__) #define DO_476(MACRO, ...) \ MACRO(476, __VA_ARGS__) \ DO_475(MACRO, __VA_ARGS__) #define DO_477(MACRO, ...) \ MACRO(477, __VA_ARGS__) \ DO_476(MACRO, __VA_ARGS__) #define DO_478(MACRO, ...) \ MACRO(478, __VA_ARGS__) \ DO_477(MACRO, __VA_ARGS__) #define DO_479(MACRO, ...) \ MACRO(479, __VA_ARGS__) \ DO_478(MACRO, __VA_ARGS__) #define DO_480(MACRO, ...) \ MACRO(480, __VA_ARGS__) \ DO_479(MACRO, __VA_ARGS__) #define DO_481(MACRO, ...) \ MACRO(481, __VA_ARGS__) \ DO_480(MACRO, __VA_ARGS__) #define DO_482(MACRO, ...) \ MACRO(482, __VA_ARGS__) \ DO_481(MACRO, __VA_ARGS__) #define DO_483(MACRO, ...) \ MACRO(483, __VA_ARGS__) \ DO_482(MACRO, __VA_ARGS__) #define DO_484(MACRO, ...) \ MACRO(484, __VA_ARGS__) \ DO_483(MACRO, __VA_ARGS__) #define DO_485(MACRO, ...) \ MACRO(485, __VA_ARGS__) \ DO_484(MACRO, __VA_ARGS__) #define DO_486(MACRO, ...) \ MACRO(486, __VA_ARGS__) \ DO_485(MACRO, __VA_ARGS__) #define DO_487(MACRO, ...) \ MACRO(487, __VA_ARGS__) \ DO_486(MACRO, __VA_ARGS__) #define DO_488(MACRO, ...) \ MACRO(488, __VA_ARGS__) \ DO_487(MACRO, __VA_ARGS__) #define DO_489(MACRO, ...) \ MACRO(489, __VA_ARGS__) \ DO_488(MACRO, __VA_ARGS__) #define DO_490(MACRO, ...) \ MACRO(490, __VA_ARGS__) \ DO_489(MACRO, __VA_ARGS__) #define DO_491(MACRO, ...) \ MACRO(491, __VA_ARGS__) \ DO_490(MACRO, __VA_ARGS__) #define DO_492(MACRO, ...) \ MACRO(492, __VA_ARGS__) \ DO_491(MACRO, __VA_ARGS__) #define DO_493(MACRO, ...) \ MACRO(493, __VA_ARGS__) \ DO_492(MACRO, __VA_ARGS__) #define DO_494(MACRO, ...) \ MACRO(494, __VA_ARGS__) \ DO_493(MACRO, __VA_ARGS__) #define DO_495(MACRO, ...) \ MACRO(495, __VA_ARGS__) \ DO_494(MACRO, __VA_ARGS__) #define DO_496(MACRO, ...) \ MACRO(496, __VA_ARGS__) \ DO_495(MACRO, __VA_ARGS__) #define DO_497(MACRO, ...) \ MACRO(497, __VA_ARGS__) \ DO_496(MACRO, __VA_ARGS__) #define DO_498(MACRO, ...) \ MACRO(498, __VA_ARGS__) \ DO_497(MACRO, __VA_ARGS__) #define DO_499(MACRO, ...) \ MACRO(499, __VA_ARGS__) \ DO_498(MACRO, __VA_ARGS__) #define DO_500(MACRO, ...) \ MACRO(500, __VA_ARGS__) \ DO_499(MACRO, __VA_ARGS__) #define DO_501(MACRO, ...) \ MACRO(501, __VA_ARGS__) \ DO_500(MACRO, __VA_ARGS__) #define DO_502(MACRO, ...) \ MACRO(502, __VA_ARGS__) \ DO_501(MACRO, __VA_ARGS__) #define DO_503(MACRO, ...) \ MACRO(503, __VA_ARGS__) \ DO_502(MACRO, __VA_ARGS__) #define DO_504(MACRO, ...) \ MACRO(504, __VA_ARGS__) \ DO_503(MACRO, __VA_ARGS__) #define DO_505(MACRO, ...) \ MACRO(505, __VA_ARGS__) \ DO_504(MACRO, __VA_ARGS__) #define DO_506(MACRO, ...) \ MACRO(506, __VA_ARGS__) \ DO_505(MACRO, __VA_ARGS__) #define DO_507(MACRO, ...) \ MACRO(507, __VA_ARGS__) \ DO_506(MACRO, __VA_ARGS__) #define DO_508(MACRO, ...) \ MACRO(508, __VA_ARGS__) \ DO_507(MACRO, __VA_ARGS__) #define DO_509(MACRO, ...) \ MACRO(509, __VA_ARGS__) \ DO_508(MACRO, __VA_ARGS__) #define DO_510(MACRO, ...) \ MACRO(510, __VA_ARGS__) \ DO_509(MACRO, __VA_ARGS__) #define DO_511(MACRO, ...) \ MACRO(511, __VA_ARGS__) \ DO_510(MACRO, __VA_ARGS__) #define DO_512(MACRO, ...) \ MACRO(512, __VA_ARGS__) \ DO_511(MACRO, __VA_ARGS__) #define DO_513(MACRO, ...) \ MACRO(513, __VA_ARGS__) \ DO_512(MACRO, __VA_ARGS__) #define DO_514(MACRO, ...) \ MACRO(514, __VA_ARGS__) \ DO_513(MACRO, __VA_ARGS__) #define DO_515(MACRO, ...) \ MACRO(515, __VA_ARGS__) \ DO_514(MACRO, __VA_ARGS__) #define DO_516(MACRO, ...) \ MACRO(516, __VA_ARGS__) \ DO_515(MACRO, __VA_ARGS__) #define DO_517(MACRO, ...) \ MACRO(517, __VA_ARGS__) \ DO_516(MACRO, __VA_ARGS__) #define DO_518(MACRO, ...) \ MACRO(518, __VA_ARGS__) \ DO_517(MACRO, __VA_ARGS__) #define DO_519(MACRO, ...) \ MACRO(519, __VA_ARGS__) \ DO_518(MACRO, __VA_ARGS__) #define DO_520(MACRO, ...) \ MACRO(520, __VA_ARGS__) \ DO_519(MACRO, __VA_ARGS__) #define DO_521(MACRO, ...) \ MACRO(521, __VA_ARGS__) \ DO_520(MACRO, __VA_ARGS__) #define DO_522(MACRO, ...) \ MACRO(522, __VA_ARGS__) \ DO_521(MACRO, __VA_ARGS__) #define DO_523(MACRO, ...) \ MACRO(523, __VA_ARGS__) \ DO_522(MACRO, __VA_ARGS__) #define DO_524(MACRO, ...) \ MACRO(524, __VA_ARGS__) \ DO_523(MACRO, __VA_ARGS__) #define DO_525(MACRO, ...) \ MACRO(525, __VA_ARGS__) \ DO_524(MACRO, __VA_ARGS__) #define DO_526(MACRO, ...) \ MACRO(526, __VA_ARGS__) \ DO_525(MACRO, __VA_ARGS__) #define DO_527(MACRO, ...) \ MACRO(527, __VA_ARGS__) \ DO_526(MACRO, __VA_ARGS__) #define DO_528(MACRO, ...) \ MACRO(528, __VA_ARGS__) \ DO_527(MACRO, __VA_ARGS__) #define DO_529(MACRO, ...) \ MACRO(529, __VA_ARGS__) \ DO_528(MACRO, __VA_ARGS__) #define DO_530(MACRO, ...) \ MACRO(530, __VA_ARGS__) \ DO_529(MACRO, __VA_ARGS__) #define DO_531(MACRO, ...) \ MACRO(531, __VA_ARGS__) \ DO_530(MACRO, __VA_ARGS__) #define DO_532(MACRO, ...) \ MACRO(532, __VA_ARGS__) \ DO_531(MACRO, __VA_ARGS__) #define DO_533(MACRO, ...) \ MACRO(533, __VA_ARGS__) \ DO_532(MACRO, __VA_ARGS__) #define DO_534(MACRO, ...) \ MACRO(534, __VA_ARGS__) \ DO_533(MACRO, __VA_ARGS__) #define DO_535(MACRO, ...) \ MACRO(535, __VA_ARGS__) \ DO_534(MACRO, __VA_ARGS__) #define DO_536(MACRO, ...) \ MACRO(536, __VA_ARGS__) \ DO_535(MACRO, __VA_ARGS__) #define DO_537(MACRO, ...) \ MACRO(537, __VA_ARGS__) \ DO_536(MACRO, __VA_ARGS__) #define DO_538(MACRO, ...) \ MACRO(538, __VA_ARGS__) \ DO_537(MACRO, __VA_ARGS__) #define DO_539(MACRO, ...) \ MACRO(539, __VA_ARGS__) \ DO_538(MACRO, __VA_ARGS__) #define DO_540(MACRO, ...) \ MACRO(540, __VA_ARGS__) \ DO_539(MACRO, __VA_ARGS__) #define DO_541(MACRO, ...) \ MACRO(541, __VA_ARGS__) \ DO_540(MACRO, __VA_ARGS__) #define DO_542(MACRO, ...) \ MACRO(542, __VA_ARGS__) \ DO_541(MACRO, __VA_ARGS__) #define DO_543(MACRO, ...) \ MACRO(543, __VA_ARGS__) \ DO_542(MACRO, __VA_ARGS__) #define DO_544(MACRO, ...) \ MACRO(544, __VA_ARGS__) \ DO_543(MACRO, __VA_ARGS__) #define DO_545(MACRO, ...) \ MACRO(545, __VA_ARGS__) \ DO_544(MACRO, __VA_ARGS__) #define DO_546(MACRO, ...) \ MACRO(546, __VA_ARGS__) \ DO_545(MACRO, __VA_ARGS__) #define DO_547(MACRO, ...) \ MACRO(547, __VA_ARGS__) \ DO_546(MACRO, __VA_ARGS__) #define DO_548(MACRO, ...) \ MACRO(548, __VA_ARGS__) \ DO_547(MACRO, __VA_ARGS__) #define DO_549(MACRO, ...) \ MACRO(549, __VA_ARGS__) \ DO_548(MACRO, __VA_ARGS__) #define DO_550(MACRO, ...) \ MACRO(550, __VA_ARGS__) \ DO_549(MACRO, __VA_ARGS__) #define DO_551(MACRO, ...) \ MACRO(551, __VA_ARGS__) \ DO_550(MACRO, __VA_ARGS__) #define DO_552(MACRO, ...) \ MACRO(552, __VA_ARGS__) \ DO_551(MACRO, __VA_ARGS__) #define DO_553(MACRO, ...) \ MACRO(553, __VA_ARGS__) \ DO_552(MACRO, __VA_ARGS__) #define DO_554(MACRO, ...) \ MACRO(554, __VA_ARGS__) \ DO_553(MACRO, __VA_ARGS__) #define DO_555(MACRO, ...) \ MACRO(555, __VA_ARGS__) \ DO_554(MACRO, __VA_ARGS__) #define DO_556(MACRO, ...) \ MACRO(556, __VA_ARGS__) \ DO_555(MACRO, __VA_ARGS__) #define DO_557(MACRO, ...) \ MACRO(557, __VA_ARGS__) \ DO_556(MACRO, __VA_ARGS__) #define DO_558(MACRO, ...) \ MACRO(558, __VA_ARGS__) \ DO_557(MACRO, __VA_ARGS__) #define DO_559(MACRO, ...) \ MACRO(559, __VA_ARGS__) \ DO_558(MACRO, __VA_ARGS__) #define DO_560(MACRO, ...) \ MACRO(560, __VA_ARGS__) \ DO_559(MACRO, __VA_ARGS__) #define DO_561(MACRO, ...) \ MACRO(561, __VA_ARGS__) \ DO_560(MACRO, __VA_ARGS__) #define DO_562(MACRO, ...) \ MACRO(562, __VA_ARGS__) \ DO_561(MACRO, __VA_ARGS__) #define DO_563(MACRO, ...) \ MACRO(563, __VA_ARGS__) \ DO_562(MACRO, __VA_ARGS__) #define DO_564(MACRO, ...) \ MACRO(564, __VA_ARGS__) \ DO_563(MACRO, __VA_ARGS__) #define DO_565(MACRO, ...) \ MACRO(565, __VA_ARGS__) \ DO_564(MACRO, __VA_ARGS__) #define DO_566(MACRO, ...) \ MACRO(566, __VA_ARGS__) \ DO_565(MACRO, __VA_ARGS__) #define DO_567(MACRO, ...) \ MACRO(567, __VA_ARGS__) \ DO_566(MACRO, __VA_ARGS__) #define DO_568(MACRO, ...) \ MACRO(568, __VA_ARGS__) \ DO_567(MACRO, __VA_ARGS__) #define DO_569(MACRO, ...) \ MACRO(569, __VA_ARGS__) \ DO_568(MACRO, __VA_ARGS__) #define DO_570(MACRO, ...) \ MACRO(570, __VA_ARGS__) \ DO_569(MACRO, __VA_ARGS__) #define DO_571(MACRO, ...) \ MACRO(571, __VA_ARGS__) \ DO_570(MACRO, __VA_ARGS__) #define DO_572(MACRO, ...) \ MACRO(572, __VA_ARGS__) \ DO_571(MACRO, __VA_ARGS__) #define DO_573(MACRO, ...) \ MACRO(573, __VA_ARGS__) \ DO_572(MACRO, __VA_ARGS__) #define DO_574(MACRO, ...) \ MACRO(574, __VA_ARGS__) \ DO_573(MACRO, __VA_ARGS__) #define DO_575(MACRO, ...) \ MACRO(575, __VA_ARGS__) \ DO_574(MACRO, __VA_ARGS__) #define DO_576(MACRO, ...) \ MACRO(576, __VA_ARGS__) \ DO_575(MACRO, __VA_ARGS__) #define DO_577(MACRO, ...) \ MACRO(577, __VA_ARGS__) \ DO_576(MACRO, __VA_ARGS__) #define DO_578(MACRO, ...) \ MACRO(578, __VA_ARGS__) \ DO_577(MACRO, __VA_ARGS__) #define DO_579(MACRO, ...) \ MACRO(579, __VA_ARGS__) \ DO_578(MACRO, __VA_ARGS__) #define DO_580(MACRO, ...) \ MACRO(580, __VA_ARGS__) \ DO_579(MACRO, __VA_ARGS__) #define DO_581(MACRO, ...) \ MACRO(581, __VA_ARGS__) \ DO_580(MACRO, __VA_ARGS__) #define DO_582(MACRO, ...) \ MACRO(582, __VA_ARGS__) \ DO_581(MACRO, __VA_ARGS__) #define DO_583(MACRO, ...) \ MACRO(583, __VA_ARGS__) \ DO_582(MACRO, __VA_ARGS__) #define DO_584(MACRO, ...) \ MACRO(584, __VA_ARGS__) \ DO_583(MACRO, __VA_ARGS__) #define DO_585(MACRO, ...) \ MACRO(585, __VA_ARGS__) \ DO_584(MACRO, __VA_ARGS__) #define DO_586(MACRO, ...) \ MACRO(586, __VA_ARGS__) \ DO_585(MACRO, __VA_ARGS__) #define DO_587(MACRO, ...) \ MACRO(587, __VA_ARGS__) \ DO_586(MACRO, __VA_ARGS__) #define DO_588(MACRO, ...) \ MACRO(588, __VA_ARGS__) \ DO_587(MACRO, __VA_ARGS__) #define DO_589(MACRO, ...) \ MACRO(589, __VA_ARGS__) \ DO_588(MACRO, __VA_ARGS__) #define DO_590(MACRO, ...) \ MACRO(590, __VA_ARGS__) \ DO_589(MACRO, __VA_ARGS__) #define DO_591(MACRO, ...) \ MACRO(591, __VA_ARGS__) \ DO_590(MACRO, __VA_ARGS__) #define DO_592(MACRO, ...) \ MACRO(592, __VA_ARGS__) \ DO_591(MACRO, __VA_ARGS__) #define DO_593(MACRO, ...) \ MACRO(593, __VA_ARGS__) \ DO_592(MACRO, __VA_ARGS__) #define DO_594(MACRO, ...) \ MACRO(594, __VA_ARGS__) \ DO_593(MACRO, __VA_ARGS__) #define DO_595(MACRO, ...) \ MACRO(595, __VA_ARGS__) \ DO_594(MACRO, __VA_ARGS__) #define DO_596(MACRO, ...) \ MACRO(596, __VA_ARGS__) \ DO_595(MACRO, __VA_ARGS__) #define DO_597(MACRO, ...) \ MACRO(597, __VA_ARGS__) \ DO_596(MACRO, __VA_ARGS__) #define DO_598(MACRO, ...) \ MACRO(598, __VA_ARGS__) \ DO_597(MACRO, __VA_ARGS__) #define DO_599(MACRO, ...) \ MACRO(599, __VA_ARGS__) \ DO_598(MACRO, __VA_ARGS__) #define DO_600(MACRO, ...) \ MACRO(600, __VA_ARGS__) \ DO_599(MACRO, __VA_ARGS__) #define DO_601(MACRO, ...) \ MACRO(601, __VA_ARGS__) \ DO_600(MACRO, __VA_ARGS__) #define DO_602(MACRO, ...) \ MACRO(602, __VA_ARGS__) \ DO_601(MACRO, __VA_ARGS__) #define DO_603(MACRO, ...) \ MACRO(603, __VA_ARGS__) \ DO_602(MACRO, __VA_ARGS__) #define DO_604(MACRO, ...) \ MACRO(604, __VA_ARGS__) \ DO_603(MACRO, __VA_ARGS__) #define DO_605(MACRO, ...) \ MACRO(605, __VA_ARGS__) \ DO_604(MACRO, __VA_ARGS__) #define DO_606(MACRO, ...) \ MACRO(606, __VA_ARGS__) \ DO_605(MACRO, __VA_ARGS__) #define DO_607(MACRO, ...) \ MACRO(607, __VA_ARGS__) \ DO_606(MACRO, __VA_ARGS__) #define DO_608(MACRO, ...) \ MACRO(608, __VA_ARGS__) \ DO_607(MACRO, __VA_ARGS__) #define DO_609(MACRO, ...) \ MACRO(609, __VA_ARGS__) \ DO_608(MACRO, __VA_ARGS__) #define DO_610(MACRO, ...) \ MACRO(610, __VA_ARGS__) \ DO_609(MACRO, __VA_ARGS__) #define DO_611(MACRO, ...) \ MACRO(611, __VA_ARGS__) \ DO_610(MACRO, __VA_ARGS__) #define DO_612(MACRO, ...) \ MACRO(612, __VA_ARGS__) \ DO_611(MACRO, __VA_ARGS__) #define DO_613(MACRO, ...) \ MACRO(613, __VA_ARGS__) \ DO_612(MACRO, __VA_ARGS__) #define DO_614(MACRO, ...) \ MACRO(614, __VA_ARGS__) \ DO_613(MACRO, __VA_ARGS__) #define DO_615(MACRO, ...) \ MACRO(615, __VA_ARGS__) \ DO_614(MACRO, __VA_ARGS__) #define DO_616(MACRO, ...) \ MACRO(616, __VA_ARGS__) \ DO_615(MACRO, __VA_ARGS__) #define DO_617(MACRO, ...) \ MACRO(617, __VA_ARGS__) \ DO_616(MACRO, __VA_ARGS__) #define DO_618(MACRO, ...) \ MACRO(618, __VA_ARGS__) \ DO_617(MACRO, __VA_ARGS__) #define DO_619(MACRO, ...) \ MACRO(619, __VA_ARGS__) \ DO_618(MACRO, __VA_ARGS__) #define DO_620(MACRO, ...) \ MACRO(620, __VA_ARGS__) \ DO_619(MACRO, __VA_ARGS__) #define DO_621(MACRO, ...) \ MACRO(621, __VA_ARGS__) \ DO_620(MACRO, __VA_ARGS__) #define DO_622(MACRO, ...) \ MACRO(622, __VA_ARGS__) \ DO_621(MACRO, __VA_ARGS__) #define DO_623(MACRO, ...) \ MACRO(623, __VA_ARGS__) \ DO_622(MACRO, __VA_ARGS__) #define DO_624(MACRO, ...) \ MACRO(624, __VA_ARGS__) \ DO_623(MACRO, __VA_ARGS__) #define DO_625(MACRO, ...) \ MACRO(625, __VA_ARGS__) \ DO_624(MACRO, __VA_ARGS__) #define DO_626(MACRO, ...) \ MACRO(626, __VA_ARGS__) \ DO_625(MACRO, __VA_ARGS__) #define DO_627(MACRO, ...) \ MACRO(627, __VA_ARGS__) \ DO_626(MACRO, __VA_ARGS__) #define DO_628(MACRO, ...) \ MACRO(628, __VA_ARGS__) \ DO_627(MACRO, __VA_ARGS__) #define DO_629(MACRO, ...) \ MACRO(629, __VA_ARGS__) \ DO_628(MACRO, __VA_ARGS__) #define DO_630(MACRO, ...) \ MACRO(630, __VA_ARGS__) \ DO_629(MACRO, __VA_ARGS__) #define DO_631(MACRO, ...) \ MACRO(631, __VA_ARGS__) \ DO_630(MACRO, __VA_ARGS__) #define DO_632(MACRO, ...) \ MACRO(632, __VA_ARGS__) \ DO_631(MACRO, __VA_ARGS__) #define DO_633(MACRO, ...) \ MACRO(633, __VA_ARGS__) \ DO_632(MACRO, __VA_ARGS__) #define DO_634(MACRO, ...) \ MACRO(634, __VA_ARGS__) \ DO_633(MACRO, __VA_ARGS__) #define DO_635(MACRO, ...) \ MACRO(635, __VA_ARGS__) \ DO_634(MACRO, __VA_ARGS__) #define DO_636(MACRO, ...) \ MACRO(636, __VA_ARGS__) \ DO_635(MACRO, __VA_ARGS__) #define DO_637(MACRO, ...) \ MACRO(637, __VA_ARGS__) \ DO_636(MACRO, __VA_ARGS__) #define DO_638(MACRO, ...) \ MACRO(638, __VA_ARGS__) \ DO_637(MACRO, __VA_ARGS__) #define DO_639(MACRO, ...) \ MACRO(639, __VA_ARGS__) \ DO_638(MACRO, __VA_ARGS__) #define DO_640(MACRO, ...) \ MACRO(640, __VA_ARGS__) \ DO_639(MACRO, __VA_ARGS__) #define DO_641(MACRO, ...) \ MACRO(641, __VA_ARGS__) \ DO_640(MACRO, __VA_ARGS__) #define DO_642(MACRO, ...) \ MACRO(642, __VA_ARGS__) \ DO_641(MACRO, __VA_ARGS__) #define DO_643(MACRO, ...) \ MACRO(643, __VA_ARGS__) \ DO_642(MACRO, __VA_ARGS__) #define DO_644(MACRO, ...) \ MACRO(644, __VA_ARGS__) \ DO_643(MACRO, __VA_ARGS__) #define DO_645(MACRO, ...) \ MACRO(645, __VA_ARGS__) \ DO_644(MACRO, __VA_ARGS__) #define DO_646(MACRO, ...) \ MACRO(646, __VA_ARGS__) \ DO_645(MACRO, __VA_ARGS__) #define DO_647(MACRO, ...) \ MACRO(647, __VA_ARGS__) \ DO_646(MACRO, __VA_ARGS__) #define DO_648(MACRO, ...) \ MACRO(648, __VA_ARGS__) \ DO_647(MACRO, __VA_ARGS__) #define DO_649(MACRO, ...) \ MACRO(649, __VA_ARGS__) \ DO_648(MACRO, __VA_ARGS__) #define DO_650(MACRO, ...) \ MACRO(650, __VA_ARGS__) \ DO_649(MACRO, __VA_ARGS__) #define DO_651(MACRO, ...) \ MACRO(651, __VA_ARGS__) \ DO_650(MACRO, __VA_ARGS__) #define DO_652(MACRO, ...) \ MACRO(652, __VA_ARGS__) \ DO_651(MACRO, __VA_ARGS__) #define DO_653(MACRO, ...) \ MACRO(653, __VA_ARGS__) \ DO_652(MACRO, __VA_ARGS__) #define DO_654(MACRO, ...) \ MACRO(654, __VA_ARGS__) \ DO_653(MACRO, __VA_ARGS__) #define DO_655(MACRO, ...) \ MACRO(655, __VA_ARGS__) \ DO_654(MACRO, __VA_ARGS__) #define DO_656(MACRO, ...) \ MACRO(656, __VA_ARGS__) \ DO_655(MACRO, __VA_ARGS__) #define DO_657(MACRO, ...) \ MACRO(657, __VA_ARGS__) \ DO_656(MACRO, __VA_ARGS__) #define DO_658(MACRO, ...) \ MACRO(658, __VA_ARGS__) \ DO_657(MACRO, __VA_ARGS__) #define DO_659(MACRO, ...) \ MACRO(659, __VA_ARGS__) \ DO_658(MACRO, __VA_ARGS__) #define DO_660(MACRO, ...) \ MACRO(660, __VA_ARGS__) \ DO_659(MACRO, __VA_ARGS__) #define DO_661(MACRO, ...) \ MACRO(661, __VA_ARGS__) \ DO_660(MACRO, __VA_ARGS__) #define DO_662(MACRO, ...) \ MACRO(662, __VA_ARGS__) \ DO_661(MACRO, __VA_ARGS__) #define DO_663(MACRO, ...) \ MACRO(663, __VA_ARGS__) \ DO_662(MACRO, __VA_ARGS__) #define DO_664(MACRO, ...) \ MACRO(664, __VA_ARGS__) \ DO_663(MACRO, __VA_ARGS__) #define DO_665(MACRO, ...) \ MACRO(665, __VA_ARGS__) \ DO_664(MACRO, __VA_ARGS__) #define DO_666(MACRO, ...) \ MACRO(666, __VA_ARGS__) \ DO_665(MACRO, __VA_ARGS__) #define DO_667(MACRO, ...) \ MACRO(667, __VA_ARGS__) \ DO_666(MACRO, __VA_ARGS__) #define DO_668(MACRO, ...) \ MACRO(668, __VA_ARGS__) \ DO_667(MACRO, __VA_ARGS__) #define DO_669(MACRO, ...) \ MACRO(669, __VA_ARGS__) \ DO_668(MACRO, __VA_ARGS__) #define DO_670(MACRO, ...) \ MACRO(670, __VA_ARGS__) \ DO_669(MACRO, __VA_ARGS__) #define DO_671(MACRO, ...) \ MACRO(671, __VA_ARGS__) \ DO_670(MACRO, __VA_ARGS__) #define DO_672(MACRO, ...) \ MACRO(672, __VA_ARGS__) \ DO_671(MACRO, __VA_ARGS__) #define DO_673(MACRO, ...) \ MACRO(673, __VA_ARGS__) \ DO_672(MACRO, __VA_ARGS__) #define DO_674(MACRO, ...) \ MACRO(674, __VA_ARGS__) \ DO_673(MACRO, __VA_ARGS__) #define DO_675(MACRO, ...) \ MACRO(675, __VA_ARGS__) \ DO_674(MACRO, __VA_ARGS__) #define DO_676(MACRO, ...) \ MACRO(676, __VA_ARGS__) \ DO_675(MACRO, __VA_ARGS__) #define DO_677(MACRO, ...) \ MACRO(677, __VA_ARGS__) \ DO_676(MACRO, __VA_ARGS__) #define DO_678(MACRO, ...) \ MACRO(678, __VA_ARGS__) \ DO_677(MACRO, __VA_ARGS__) #define DO_679(MACRO, ...) \ MACRO(679, __VA_ARGS__) \ DO_678(MACRO, __VA_ARGS__) #define DO_680(MACRO, ...) \ MACRO(680, __VA_ARGS__) \ DO_679(MACRO, __VA_ARGS__) #define DO_681(MACRO, ...) \ MACRO(681, __VA_ARGS__) \ DO_680(MACRO, __VA_ARGS__) #define DO_682(MACRO, ...) \ MACRO(682, __VA_ARGS__) \ DO_681(MACRO, __VA_ARGS__) #define DO_683(MACRO, ...) \ MACRO(683, __VA_ARGS__) \ DO_682(MACRO, __VA_ARGS__) #define DO_684(MACRO, ...) \ MACRO(684, __VA_ARGS__) \ DO_683(MACRO, __VA_ARGS__) #define DO_685(MACRO, ...) \ MACRO(685, __VA_ARGS__) \ DO_684(MACRO, __VA_ARGS__) #define DO_686(MACRO, ...) \ MACRO(686, __VA_ARGS__) \ DO_685(MACRO, __VA_ARGS__) #define DO_687(MACRO, ...) \ MACRO(687, __VA_ARGS__) \ DO_686(MACRO, __VA_ARGS__) #define DO_688(MACRO, ...) \ MACRO(688, __VA_ARGS__) \ DO_687(MACRO, __VA_ARGS__) #define DO_689(MACRO, ...) \ MACRO(689, __VA_ARGS__) \ DO_688(MACRO, __VA_ARGS__) #define DO_690(MACRO, ...) \ MACRO(690, __VA_ARGS__) \ DO_689(MACRO, __VA_ARGS__) #define DO_691(MACRO, ...) \ MACRO(691, __VA_ARGS__) \ DO_690(MACRO, __VA_ARGS__) #define DO_692(MACRO, ...) \ MACRO(692, __VA_ARGS__) \ DO_691(MACRO, __VA_ARGS__) #define DO_693(MACRO, ...) \ MACRO(693, __VA_ARGS__) \ DO_692(MACRO, __VA_ARGS__) #define DO_694(MACRO, ...) \ MACRO(694, __VA_ARGS__) \ DO_693(MACRO, __VA_ARGS__) #define DO_695(MACRO, ...) \ MACRO(695, __VA_ARGS__) \ DO_694(MACRO, __VA_ARGS__) #define DO_696(MACRO, ...) \ MACRO(696, __VA_ARGS__) \ DO_695(MACRO, __VA_ARGS__) #define DO_697(MACRO, ...) \ MACRO(697, __VA_ARGS__) \ DO_696(MACRO, __VA_ARGS__) #define DO_698(MACRO, ...) \ MACRO(698, __VA_ARGS__) \ DO_697(MACRO, __VA_ARGS__) #define DO_699(MACRO, ...) \ MACRO(699, __VA_ARGS__) \ DO_698(MACRO, __VA_ARGS__) #define DO_700(MACRO, ...) \ MACRO(700, __VA_ARGS__) \ DO_699(MACRO, __VA_ARGS__) #define DO_701(MACRO, ...) \ MACRO(701, __VA_ARGS__) \ DO_700(MACRO, __VA_ARGS__) #define DO_702(MACRO, ...) \ MACRO(702, __VA_ARGS__) \ DO_701(MACRO, __VA_ARGS__) #define DO_703(MACRO, ...) \ MACRO(703, __VA_ARGS__) \ DO_702(MACRO, __VA_ARGS__) #define DO_704(MACRO, ...) \ MACRO(704, __VA_ARGS__) \ DO_703(MACRO, __VA_ARGS__) #define DO_705(MACRO, ...) \ MACRO(705, __VA_ARGS__) \ DO_704(MACRO, __VA_ARGS__) #define DO_706(MACRO, ...) \ MACRO(706, __VA_ARGS__) \ DO_705(MACRO, __VA_ARGS__) #define DO_707(MACRO, ...) \ MACRO(707, __VA_ARGS__) \ DO_706(MACRO, __VA_ARGS__) #define DO_708(MACRO, ...) \ MACRO(708, __VA_ARGS__) \ DO_707(MACRO, __VA_ARGS__) #define DO_709(MACRO, ...) \ MACRO(709, __VA_ARGS__) \ DO_708(MACRO, __VA_ARGS__) #define DO_710(MACRO, ...) \ MACRO(710, __VA_ARGS__) \ DO_709(MACRO, __VA_ARGS__) #define DO_711(MACRO, ...) \ MACRO(711, __VA_ARGS__) \ DO_710(MACRO, __VA_ARGS__) #define DO_712(MACRO, ...) \ MACRO(712, __VA_ARGS__) \ DO_711(MACRO, __VA_ARGS__) #define DO_713(MACRO, ...) \ MACRO(713, __VA_ARGS__) \ DO_712(MACRO, __VA_ARGS__) #define DO_714(MACRO, ...) \ MACRO(714, __VA_ARGS__) \ DO_713(MACRO, __VA_ARGS__) #define DO_715(MACRO, ...) \ MACRO(715, __VA_ARGS__) \ DO_714(MACRO, __VA_ARGS__) #define DO_716(MACRO, ...) \ MACRO(716, __VA_ARGS__) \ DO_715(MACRO, __VA_ARGS__) #define DO_717(MACRO, ...) \ MACRO(717, __VA_ARGS__) \ DO_716(MACRO, __VA_ARGS__) #define DO_718(MACRO, ...) \ MACRO(718, __VA_ARGS__) \ DO_717(MACRO, __VA_ARGS__) #define DO_719(MACRO, ...) \ MACRO(719, __VA_ARGS__) \ DO_718(MACRO, __VA_ARGS__) #define DO_720(MACRO, ...) \ MACRO(720, __VA_ARGS__) \ DO_719(MACRO, __VA_ARGS__) #define DO_721(MACRO, ...) \ MACRO(721, __VA_ARGS__) \ DO_720(MACRO, __VA_ARGS__) #define DO_722(MACRO, ...) \ MACRO(722, __VA_ARGS__) \ DO_721(MACRO, __VA_ARGS__) #define DO_723(MACRO, ...) \ MACRO(723, __VA_ARGS__) \ DO_722(MACRO, __VA_ARGS__) #define DO_724(MACRO, ...) \ MACRO(724, __VA_ARGS__) \ DO_723(MACRO, __VA_ARGS__) #define DO_725(MACRO, ...) \ MACRO(725, __VA_ARGS__) \ DO_724(MACRO, __VA_ARGS__) #define DO_726(MACRO, ...) \ MACRO(726, __VA_ARGS__) \ DO_725(MACRO, __VA_ARGS__) #define DO_727(MACRO, ...) \ MACRO(727, __VA_ARGS__) \ DO_726(MACRO, __VA_ARGS__) #define DO_728(MACRO, ...) \ MACRO(728, __VA_ARGS__) \ DO_727(MACRO, __VA_ARGS__) #define DO_729(MACRO, ...) \ MACRO(729, __VA_ARGS__) \ DO_728(MACRO, __VA_ARGS__) #define DO_730(MACRO, ...) \ MACRO(730, __VA_ARGS__) \ DO_729(MACRO, __VA_ARGS__) #define DO_731(MACRO, ...) \ MACRO(731, __VA_ARGS__) \ DO_730(MACRO, __VA_ARGS__) #define DO_732(MACRO, ...) \ MACRO(732, __VA_ARGS__) \ DO_731(MACRO, __VA_ARGS__) #define DO_733(MACRO, ...) \ MACRO(733, __VA_ARGS__) \ DO_732(MACRO, __VA_ARGS__) #define DO_734(MACRO, ...) \ MACRO(734, __VA_ARGS__) \ DO_733(MACRO, __VA_ARGS__) #define DO_735(MACRO, ...) \ MACRO(735, __VA_ARGS__) \ DO_734(MACRO, __VA_ARGS__) #define DO_736(MACRO, ...) \ MACRO(736, __VA_ARGS__) \ DO_735(MACRO, __VA_ARGS__) #define DO_737(MACRO, ...) \ MACRO(737, __VA_ARGS__) \ DO_736(MACRO, __VA_ARGS__) #define DO_738(MACRO, ...) \ MACRO(738, __VA_ARGS__) \ DO_737(MACRO, __VA_ARGS__) #define DO_739(MACRO, ...) \ MACRO(739, __VA_ARGS__) \ DO_738(MACRO, __VA_ARGS__) #define DO_740(MACRO, ...) \ MACRO(740, __VA_ARGS__) \ DO_739(MACRO, __VA_ARGS__) #define DO_741(MACRO, ...) \ MACRO(741, __VA_ARGS__) \ DO_740(MACRO, __VA_ARGS__) #define DO_742(MACRO, ...) \ MACRO(742, __VA_ARGS__) \ DO_741(MACRO, __VA_ARGS__) #define DO_743(MACRO, ...) \ MACRO(743, __VA_ARGS__) \ DO_742(MACRO, __VA_ARGS__) #define DO_744(MACRO, ...) \ MACRO(744, __VA_ARGS__) \ DO_743(MACRO, __VA_ARGS__) #define DO_745(MACRO, ...) \ MACRO(745, __VA_ARGS__) \ DO_744(MACRO, __VA_ARGS__) #define DO_746(MACRO, ...) \ MACRO(746, __VA_ARGS__) \ DO_745(MACRO, __VA_ARGS__) #define DO_747(MACRO, ...) \ MACRO(747, __VA_ARGS__) \ DO_746(MACRO, __VA_ARGS__) #define DO_748(MACRO, ...) \ MACRO(748, __VA_ARGS__) \ DO_747(MACRO, __VA_ARGS__) #define DO_749(MACRO, ...) \ MACRO(749, __VA_ARGS__) \ DO_748(MACRO, __VA_ARGS__) #define DO_750(MACRO, ...) \ MACRO(750, __VA_ARGS__) \ DO_749(MACRO, __VA_ARGS__) #define DO_751(MACRO, ...) \ MACRO(751, __VA_ARGS__) \ DO_750(MACRO, __VA_ARGS__) #define DO_752(MACRO, ...) \ MACRO(752, __VA_ARGS__) \ DO_751(MACRO, __VA_ARGS__) #define DO_753(MACRO, ...) \ MACRO(753, __VA_ARGS__) \ DO_752(MACRO, __VA_ARGS__) #define DO_754(MACRO, ...) \ MACRO(754, __VA_ARGS__) \ DO_753(MACRO, __VA_ARGS__) #define DO_755(MACRO, ...) \ MACRO(755, __VA_ARGS__) \ DO_754(MACRO, __VA_ARGS__) #define DO_756(MACRO, ...) \ MACRO(756, __VA_ARGS__) \ DO_755(MACRO, __VA_ARGS__) #define DO_757(MACRO, ...) \ MACRO(757, __VA_ARGS__) \ DO_756(MACRO, __VA_ARGS__) #define DO_758(MACRO, ...) \ MACRO(758, __VA_ARGS__) \ DO_757(MACRO, __VA_ARGS__) #define DO_759(MACRO, ...) \ MACRO(759, __VA_ARGS__) \ DO_758(MACRO, __VA_ARGS__) #define DO_760(MACRO, ...) \ MACRO(760, __VA_ARGS__) \ DO_759(MACRO, __VA_ARGS__) #define DO_761(MACRO, ...) \ MACRO(761, __VA_ARGS__) \ DO_760(MACRO, __VA_ARGS__) #define DO_762(MACRO, ...) \ MACRO(762, __VA_ARGS__) \ DO_761(MACRO, __VA_ARGS__) #define DO_763(MACRO, ...) \ MACRO(763, __VA_ARGS__) \ DO_762(MACRO, __VA_ARGS__) #define DO_764(MACRO, ...) \ MACRO(764, __VA_ARGS__) \ DO_763(MACRO, __VA_ARGS__) #define DO_765(MACRO, ...) \ MACRO(765, __VA_ARGS__) \ DO_764(MACRO, __VA_ARGS__) #define DO_766(MACRO, ...) \ MACRO(766, __VA_ARGS__) \ DO_765(MACRO, __VA_ARGS__) #define DO_767(MACRO, ...) \ MACRO(767, __VA_ARGS__) \ DO_766(MACRO, __VA_ARGS__) #define DO_768(MACRO, ...) \ MACRO(768, __VA_ARGS__) \ DO_767(MACRO, __VA_ARGS__) #define DO_769(MACRO, ...) \ MACRO(769, __VA_ARGS__) \ DO_768(MACRO, __VA_ARGS__) #define DO_770(MACRO, ...) \ MACRO(770, __VA_ARGS__) \ DO_769(MACRO, __VA_ARGS__) #define DO_771(MACRO, ...) \ MACRO(771, __VA_ARGS__) \ DO_770(MACRO, __VA_ARGS__) #define DO_772(MACRO, ...) \ MACRO(772, __VA_ARGS__) \ DO_771(MACRO, __VA_ARGS__) #define DO_773(MACRO, ...) \ MACRO(773, __VA_ARGS__) \ DO_772(MACRO, __VA_ARGS__) #define DO_774(MACRO, ...) \ MACRO(774, __VA_ARGS__) \ DO_773(MACRO, __VA_ARGS__) #define DO_775(MACRO, ...) \ MACRO(775, __VA_ARGS__) \ DO_774(MACRO, __VA_ARGS__) #define DO_776(MACRO, ...) \ MACRO(776, __VA_ARGS__) \ DO_775(MACRO, __VA_ARGS__) #define DO_777(MACRO, ...) \ MACRO(777, __VA_ARGS__) \ DO_776(MACRO, __VA_ARGS__) #define DO_778(MACRO, ...) \ MACRO(778, __VA_ARGS__) \ DO_777(MACRO, __VA_ARGS__) #define DO_779(MACRO, ...) \ MACRO(779, __VA_ARGS__) \ DO_778(MACRO, __VA_ARGS__) #define DO_780(MACRO, ...) \ MACRO(780, __VA_ARGS__) \ DO_779(MACRO, __VA_ARGS__) #define DO_781(MACRO, ...) \ MACRO(781, __VA_ARGS__) \ DO_780(MACRO, __VA_ARGS__) #define DO_782(MACRO, ...) \ MACRO(782, __VA_ARGS__) \ DO_781(MACRO, __VA_ARGS__) #define DO_783(MACRO, ...) \ MACRO(783, __VA_ARGS__) \ DO_782(MACRO, __VA_ARGS__) #define DO_784(MACRO, ...) \ MACRO(784, __VA_ARGS__) \ DO_783(MACRO, __VA_ARGS__) #define DO_785(MACRO, ...) \ MACRO(785, __VA_ARGS__) \ DO_784(MACRO, __VA_ARGS__) #define DO_786(MACRO, ...) \ MACRO(786, __VA_ARGS__) \ DO_785(MACRO, __VA_ARGS__) #define DO_787(MACRO, ...) \ MACRO(787, __VA_ARGS__) \ DO_786(MACRO, __VA_ARGS__) #define DO_788(MACRO, ...) \ MACRO(788, __VA_ARGS__) \ DO_787(MACRO, __VA_ARGS__) #define DO_789(MACRO, ...) \ MACRO(789, __VA_ARGS__) \ DO_788(MACRO, __VA_ARGS__) #define DO_790(MACRO, ...) \ MACRO(790, __VA_ARGS__) \ DO_789(MACRO, __VA_ARGS__) #define DO_791(MACRO, ...) \ MACRO(791, __VA_ARGS__) \ DO_790(MACRO, __VA_ARGS__) #define DO_792(MACRO, ...) \ MACRO(792, __VA_ARGS__) \ DO_791(MACRO, __VA_ARGS__) #define DO_793(MACRO, ...) \ MACRO(793, __VA_ARGS__) \ DO_792(MACRO, __VA_ARGS__) #define DO_794(MACRO, ...) \ MACRO(794, __VA_ARGS__) \ DO_793(MACRO, __VA_ARGS__) #define DO_795(MACRO, ...) \ MACRO(795, __VA_ARGS__) \ DO_794(MACRO, __VA_ARGS__) #define DO_796(MACRO, ...) \ MACRO(796, __VA_ARGS__) \ DO_795(MACRO, __VA_ARGS__) #define DO_797(MACRO, ...) \ MACRO(797, __VA_ARGS__) \ DO_796(MACRO, __VA_ARGS__) #define DO_798(MACRO, ...) \ MACRO(798, __VA_ARGS__) \ DO_797(MACRO, __VA_ARGS__) #define DO_799(MACRO, ...) \ MACRO(799, __VA_ARGS__) \ DO_798(MACRO, __VA_ARGS__) #define DO_800(MACRO, ...) \ MACRO(800, __VA_ARGS__) \ DO_799(MACRO, __VA_ARGS__) #define DO_801(MACRO, ...) \ MACRO(801, __VA_ARGS__) \ DO_800(MACRO, __VA_ARGS__) #define DO_802(MACRO, ...) \ MACRO(802, __VA_ARGS__) \ DO_801(MACRO, __VA_ARGS__) #define DO_803(MACRO, ...) \ MACRO(803, __VA_ARGS__) \ DO_802(MACRO, __VA_ARGS__) #define DO_804(MACRO, ...) \ MACRO(804, __VA_ARGS__) \ DO_803(MACRO, __VA_ARGS__) #define DO_805(MACRO, ...) \ MACRO(805, __VA_ARGS__) \ DO_804(MACRO, __VA_ARGS__) #define DO_806(MACRO, ...) \ MACRO(806, __VA_ARGS__) \ DO_805(MACRO, __VA_ARGS__) #define DO_807(MACRO, ...) \ MACRO(807, __VA_ARGS__) \ DO_806(MACRO, __VA_ARGS__) #define DO_808(MACRO, ...) \ MACRO(808, __VA_ARGS__) \ DO_807(MACRO, __VA_ARGS__) #define DO_809(MACRO, ...) \ MACRO(809, __VA_ARGS__) \ DO_808(MACRO, __VA_ARGS__) #define DO_810(MACRO, ...) \ MACRO(810, __VA_ARGS__) \ DO_809(MACRO, __VA_ARGS__) #define DO_811(MACRO, ...) \ MACRO(811, __VA_ARGS__) \ DO_810(MACRO, __VA_ARGS__) #define DO_812(MACRO, ...) \ MACRO(812, __VA_ARGS__) \ DO_811(MACRO, __VA_ARGS__) #define DO_813(MACRO, ...) \ MACRO(813, __VA_ARGS__) \ DO_812(MACRO, __VA_ARGS__) #define DO_814(MACRO, ...) \ MACRO(814, __VA_ARGS__) \ DO_813(MACRO, __VA_ARGS__) #define DO_815(MACRO, ...) \ MACRO(815, __VA_ARGS__) \ DO_814(MACRO, __VA_ARGS__) #define DO_816(MACRO, ...) \ MACRO(816, __VA_ARGS__) \ DO_815(MACRO, __VA_ARGS__) #define DO_817(MACRO, ...) \ MACRO(817, __VA_ARGS__) \ DO_816(MACRO, __VA_ARGS__) #define DO_818(MACRO, ...) \ MACRO(818, __VA_ARGS__) \ DO_817(MACRO, __VA_ARGS__) #define DO_819(MACRO, ...) \ MACRO(819, __VA_ARGS__) \ DO_818(MACRO, __VA_ARGS__) #define DO_820(MACRO, ...) \ MACRO(820, __VA_ARGS__) \ DO_819(MACRO, __VA_ARGS__) #define DO_821(MACRO, ...) \ MACRO(821, __VA_ARGS__) \ DO_820(MACRO, __VA_ARGS__) #define DO_822(MACRO, ...) \ MACRO(822, __VA_ARGS__) \ DO_821(MACRO, __VA_ARGS__) #define DO_823(MACRO, ...) \ MACRO(823, __VA_ARGS__) \ DO_822(MACRO, __VA_ARGS__) #define DO_824(MACRO, ...) \ MACRO(824, __VA_ARGS__) \ DO_823(MACRO, __VA_ARGS__) #define DO_825(MACRO, ...) \ MACRO(825, __VA_ARGS__) \ DO_824(MACRO, __VA_ARGS__) #define DO_826(MACRO, ...) \ MACRO(826, __VA_ARGS__) \ DO_825(MACRO, __VA_ARGS__) #define DO_827(MACRO, ...) \ MACRO(827, __VA_ARGS__) \ DO_826(MACRO, __VA_ARGS__) #define DO_828(MACRO, ...) \ MACRO(828, __VA_ARGS__) \ DO_827(MACRO, __VA_ARGS__) #define DO_829(MACRO, ...) \ MACRO(829, __VA_ARGS__) \ DO_828(MACRO, __VA_ARGS__) #define DO_830(MACRO, ...) \ MACRO(830, __VA_ARGS__) \ DO_829(MACRO, __VA_ARGS__) #define DO_831(MACRO, ...) \ MACRO(831, __VA_ARGS__) \ DO_830(MACRO, __VA_ARGS__) #define DO_832(MACRO, ...) \ MACRO(832, __VA_ARGS__) \ DO_831(MACRO, __VA_ARGS__) #define DO_833(MACRO, ...) \ MACRO(833, __VA_ARGS__) \ DO_832(MACRO, __VA_ARGS__) #define DO_834(MACRO, ...) \ MACRO(834, __VA_ARGS__) \ DO_833(MACRO, __VA_ARGS__) #define DO_835(MACRO, ...) \ MACRO(835, __VA_ARGS__) \ DO_834(MACRO, __VA_ARGS__) #define DO_836(MACRO, ...) \ MACRO(836, __VA_ARGS__) \ DO_835(MACRO, __VA_ARGS__) #define DO_837(MACRO, ...) \ MACRO(837, __VA_ARGS__) \ DO_836(MACRO, __VA_ARGS__) #define DO_838(MACRO, ...) \ MACRO(838, __VA_ARGS__) \ DO_837(MACRO, __VA_ARGS__) #define DO_839(MACRO, ...) \ MACRO(839, __VA_ARGS__) \ DO_838(MACRO, __VA_ARGS__) #define DO_840(MACRO, ...) \ MACRO(840, __VA_ARGS__) \ DO_839(MACRO, __VA_ARGS__) #define DO_841(MACRO, ...) \ MACRO(841, __VA_ARGS__) \ DO_840(MACRO, __VA_ARGS__) #define DO_842(MACRO, ...) \ MACRO(842, __VA_ARGS__) \ DO_841(MACRO, __VA_ARGS__) #define DO_843(MACRO, ...) \ MACRO(843, __VA_ARGS__) \ DO_842(MACRO, __VA_ARGS__) #define DO_844(MACRO, ...) \ MACRO(844, __VA_ARGS__) \ DO_843(MACRO, __VA_ARGS__) #define DO_845(MACRO, ...) \ MACRO(845, __VA_ARGS__) \ DO_844(MACRO, __VA_ARGS__) #define DO_846(MACRO, ...) \ MACRO(846, __VA_ARGS__) \ DO_845(MACRO, __VA_ARGS__) #define DO_847(MACRO, ...) \ MACRO(847, __VA_ARGS__) \ DO_846(MACRO, __VA_ARGS__) #define DO_848(MACRO, ...) \ MACRO(848, __VA_ARGS__) \ DO_847(MACRO, __VA_ARGS__) #define DO_849(MACRO, ...) \ MACRO(849, __VA_ARGS__) \ DO_848(MACRO, __VA_ARGS__) #define DO_850(MACRO, ...) \ MACRO(850, __VA_ARGS__) \ DO_849(MACRO, __VA_ARGS__) #define DO_851(MACRO, ...) \ MACRO(851, __VA_ARGS__) \ DO_850(MACRO, __VA_ARGS__) #define DO_852(MACRO, ...) \ MACRO(852, __VA_ARGS__) \ DO_851(MACRO, __VA_ARGS__) #define DO_853(MACRO, ...) \ MACRO(853, __VA_ARGS__) \ DO_852(MACRO, __VA_ARGS__) #define DO_854(MACRO, ...) \ MACRO(854, __VA_ARGS__) \ DO_853(MACRO, __VA_ARGS__) #define DO_855(MACRO, ...) \ MACRO(855, __VA_ARGS__) \ DO_854(MACRO, __VA_ARGS__) #define DO_856(MACRO, ...) \ MACRO(856, __VA_ARGS__) \ DO_855(MACRO, __VA_ARGS__) #define DO_857(MACRO, ...) \ MACRO(857, __VA_ARGS__) \ DO_856(MACRO, __VA_ARGS__) #define DO_858(MACRO, ...) \ MACRO(858, __VA_ARGS__) \ DO_857(MACRO, __VA_ARGS__) #define DO_859(MACRO, ...) \ MACRO(859, __VA_ARGS__) \ DO_858(MACRO, __VA_ARGS__) #define DO_860(MACRO, ...) \ MACRO(860, __VA_ARGS__) \ DO_859(MACRO, __VA_ARGS__) #define DO_861(MACRO, ...) \ MACRO(861, __VA_ARGS__) \ DO_860(MACRO, __VA_ARGS__) #define DO_862(MACRO, ...) \ MACRO(862, __VA_ARGS__) \ DO_861(MACRO, __VA_ARGS__) #define DO_863(MACRO, ...) \ MACRO(863, __VA_ARGS__) \ DO_862(MACRO, __VA_ARGS__) #define DO_864(MACRO, ...) \ MACRO(864, __VA_ARGS__) \ DO_863(MACRO, __VA_ARGS__) #define DO_865(MACRO, ...) \ MACRO(865, __VA_ARGS__) \ DO_864(MACRO, __VA_ARGS__) #define DO_866(MACRO, ...) \ MACRO(866, __VA_ARGS__) \ DO_865(MACRO, __VA_ARGS__) #define DO_867(MACRO, ...) \ MACRO(867, __VA_ARGS__) \ DO_866(MACRO, __VA_ARGS__) #define DO_868(MACRO, ...) \ MACRO(868, __VA_ARGS__) \ DO_867(MACRO, __VA_ARGS__) #define DO_869(MACRO, ...) \ MACRO(869, __VA_ARGS__) \ DO_868(MACRO, __VA_ARGS__) #define DO_870(MACRO, ...) \ MACRO(870, __VA_ARGS__) \ DO_869(MACRO, __VA_ARGS__) #define DO_871(MACRO, ...) \ MACRO(871, __VA_ARGS__) \ DO_870(MACRO, __VA_ARGS__) #define DO_872(MACRO, ...) \ MACRO(872, __VA_ARGS__) \ DO_871(MACRO, __VA_ARGS__) #define DO_873(MACRO, ...) \ MACRO(873, __VA_ARGS__) \ DO_872(MACRO, __VA_ARGS__) #define DO_874(MACRO, ...) \ MACRO(874, __VA_ARGS__) \ DO_873(MACRO, __VA_ARGS__) #define DO_875(MACRO, ...) \ MACRO(875, __VA_ARGS__) \ DO_874(MACRO, __VA_ARGS__) #define DO_876(MACRO, ...) \ MACRO(876, __VA_ARGS__) \ DO_875(MACRO, __VA_ARGS__) #define DO_877(MACRO, ...) \ MACRO(877, __VA_ARGS__) \ DO_876(MACRO, __VA_ARGS__) #define DO_878(MACRO, ...) \ MACRO(878, __VA_ARGS__) \ DO_877(MACRO, __VA_ARGS__) #define DO_879(MACRO, ...) \ MACRO(879, __VA_ARGS__) \ DO_878(MACRO, __VA_ARGS__) #define DO_880(MACRO, ...) \ MACRO(880, __VA_ARGS__) \ DO_879(MACRO, __VA_ARGS__) #define DO_881(MACRO, ...) \ MACRO(881, __VA_ARGS__) \ DO_880(MACRO, __VA_ARGS__) #define DO_882(MACRO, ...) \ MACRO(882, __VA_ARGS__) \ DO_881(MACRO, __VA_ARGS__) #define DO_883(MACRO, ...) \ MACRO(883, __VA_ARGS__) \ DO_882(MACRO, __VA_ARGS__) #define DO_884(MACRO, ...) \ MACRO(884, __VA_ARGS__) \ DO_883(MACRO, __VA_ARGS__) #define DO_885(MACRO, ...) \ MACRO(885, __VA_ARGS__) \ DO_884(MACRO, __VA_ARGS__) #define DO_886(MACRO, ...) \ MACRO(886, __VA_ARGS__) \ DO_885(MACRO, __VA_ARGS__) #define DO_887(MACRO, ...) \ MACRO(887, __VA_ARGS__) \ DO_886(MACRO, __VA_ARGS__) #define DO_888(MACRO, ...) \ MACRO(888, __VA_ARGS__) \ DO_887(MACRO, __VA_ARGS__) #define DO_889(MACRO, ...) \ MACRO(889, __VA_ARGS__) \ DO_888(MACRO, __VA_ARGS__) #define DO_890(MACRO, ...) \ MACRO(890, __VA_ARGS__) \ DO_889(MACRO, __VA_ARGS__) #define DO_891(MACRO, ...) \ MACRO(891, __VA_ARGS__) \ DO_890(MACRO, __VA_ARGS__) #define DO_892(MACRO, ...) \ MACRO(892, __VA_ARGS__) \ DO_891(MACRO, __VA_ARGS__) #define DO_893(MACRO, ...) \ MACRO(893, __VA_ARGS__) \ DO_892(MACRO, __VA_ARGS__) #define DO_894(MACRO, ...) \ MACRO(894, __VA_ARGS__) \ DO_893(MACRO, __VA_ARGS__) #define DO_895(MACRO, ...) \ MACRO(895, __VA_ARGS__) \ DO_894(MACRO, __VA_ARGS__) #define DO_896(MACRO, ...) \ MACRO(896, __VA_ARGS__) \ DO_895(MACRO, __VA_ARGS__) #define DO_897(MACRO, ...) \ MACRO(897, __VA_ARGS__) \ DO_896(MACRO, __VA_ARGS__) #define DO_898(MACRO, ...) \ MACRO(898, __VA_ARGS__) \ DO_897(MACRO, __VA_ARGS__) #define DO_899(MACRO, ...) \ MACRO(899, __VA_ARGS__) \ DO_898(MACRO, __VA_ARGS__) #define DO_900(MACRO, ...) \ MACRO(900, __VA_ARGS__) \ DO_899(MACRO, __VA_ARGS__) #define DO_901(MACRO, ...) \ MACRO(901, __VA_ARGS__) \ DO_900(MACRO, __VA_ARGS__) #define DO_902(MACRO, ...) \ MACRO(902, __VA_ARGS__) \ DO_901(MACRO, __VA_ARGS__) #define DO_903(MACRO, ...) \ MACRO(903, __VA_ARGS__) \ DO_902(MACRO, __VA_ARGS__) #define DO_904(MACRO, ...) \ MACRO(904, __VA_ARGS__) \ DO_903(MACRO, __VA_ARGS__) #define DO_905(MACRO, ...) \ MACRO(905, __VA_ARGS__) \ DO_904(MACRO, __VA_ARGS__) #define DO_906(MACRO, ...) \ MACRO(906, __VA_ARGS__) \ DO_905(MACRO, __VA_ARGS__) #define DO_907(MACRO, ...) \ MACRO(907, __VA_ARGS__) \ DO_906(MACRO, __VA_ARGS__) #define DO_908(MACRO, ...) \ MACRO(908, __VA_ARGS__) \ DO_907(MACRO, __VA_ARGS__) #define DO_909(MACRO, ...) \ MACRO(909, __VA_ARGS__) \ DO_908(MACRO, __VA_ARGS__) #define DO_910(MACRO, ...) \ MACRO(910, __VA_ARGS__) \ DO_909(MACRO, __VA_ARGS__) #define DO_911(MACRO, ...) \ MACRO(911, __VA_ARGS__) \ DO_910(MACRO, __VA_ARGS__) #define DO_912(MACRO, ...) \ MACRO(912, __VA_ARGS__) \ DO_911(MACRO, __VA_ARGS__) #define DO_913(MACRO, ...) \ MACRO(913, __VA_ARGS__) \ DO_912(MACRO, __VA_ARGS__) #define DO_914(MACRO, ...) \ MACRO(914, __VA_ARGS__) \ DO_913(MACRO, __VA_ARGS__) #define DO_915(MACRO, ...) \ MACRO(915, __VA_ARGS__) \ DO_914(MACRO, __VA_ARGS__) #define DO_916(MACRO, ...) \ MACRO(916, __VA_ARGS__) \ DO_915(MACRO, __VA_ARGS__) #define DO_917(MACRO, ...) \ MACRO(917, __VA_ARGS__) \ DO_916(MACRO, __VA_ARGS__) #define DO_918(MACRO, ...) \ MACRO(918, __VA_ARGS__) \ DO_917(MACRO, __VA_ARGS__) #define DO_919(MACRO, ...) \ MACRO(919, __VA_ARGS__) \ DO_918(MACRO, __VA_ARGS__) #define DO_920(MACRO, ...) \ MACRO(920, __VA_ARGS__) \ DO_919(MACRO, __VA_ARGS__) #define DO_921(MACRO, ...) \ MACRO(921, __VA_ARGS__) \ DO_920(MACRO, __VA_ARGS__) #define DO_922(MACRO, ...) \ MACRO(922, __VA_ARGS__) \ DO_921(MACRO, __VA_ARGS__) #define DO_923(MACRO, ...) \ MACRO(923, __VA_ARGS__) \ DO_922(MACRO, __VA_ARGS__) #define DO_924(MACRO, ...) \ MACRO(924, __VA_ARGS__) \ DO_923(MACRO, __VA_ARGS__) #define DO_925(MACRO, ...) \ MACRO(925, __VA_ARGS__) \ DO_924(MACRO, __VA_ARGS__) #define DO_926(MACRO, ...) \ MACRO(926, __VA_ARGS__) \ DO_925(MACRO, __VA_ARGS__) #define DO_927(MACRO, ...) \ MACRO(927, __VA_ARGS__) \ DO_926(MACRO, __VA_ARGS__) #define DO_928(MACRO, ...) \ MACRO(928, __VA_ARGS__) \ DO_927(MACRO, __VA_ARGS__) #define DO_929(MACRO, ...) \ MACRO(929, __VA_ARGS__) \ DO_928(MACRO, __VA_ARGS__) #define DO_930(MACRO, ...) \ MACRO(930, __VA_ARGS__) \ DO_929(MACRO, __VA_ARGS__) #define DO_931(MACRO, ...) \ MACRO(931, __VA_ARGS__) \ DO_930(MACRO, __VA_ARGS__) #define DO_932(MACRO, ...) \ MACRO(932, __VA_ARGS__) \ DO_931(MACRO, __VA_ARGS__) #define DO_933(MACRO, ...) \ MACRO(933, __VA_ARGS__) \ DO_932(MACRO, __VA_ARGS__) #define DO_934(MACRO, ...) \ MACRO(934, __VA_ARGS__) \ DO_933(MACRO, __VA_ARGS__) #define DO_935(MACRO, ...) \ MACRO(935, __VA_ARGS__) \ DO_934(MACRO, __VA_ARGS__) #define DO_936(MACRO, ...) \ MACRO(936, __VA_ARGS__) \ DO_935(MACRO, __VA_ARGS__) #define DO_937(MACRO, ...) \ MACRO(937, __VA_ARGS__) \ DO_936(MACRO, __VA_ARGS__) #define DO_938(MACRO, ...) \ MACRO(938, __VA_ARGS__) \ DO_937(MACRO, __VA_ARGS__) #define DO_939(MACRO, ...) \ MACRO(939, __VA_ARGS__) \ DO_938(MACRO, __VA_ARGS__) #define DO_940(MACRO, ...) \ MACRO(940, __VA_ARGS__) \ DO_939(MACRO, __VA_ARGS__) #define DO_941(MACRO, ...) \ MACRO(941, __VA_ARGS__) \ DO_940(MACRO, __VA_ARGS__) #define DO_942(MACRO, ...) \ MACRO(942, __VA_ARGS__) \ DO_941(MACRO, __VA_ARGS__) #define DO_943(MACRO, ...) \ MACRO(943, __VA_ARGS__) \ DO_942(MACRO, __VA_ARGS__) #define DO_944(MACRO, ...) \ MACRO(944, __VA_ARGS__) \ DO_943(MACRO, __VA_ARGS__) #define DO_945(MACRO, ...) \ MACRO(945, __VA_ARGS__) \ DO_944(MACRO, __VA_ARGS__) #define DO_946(MACRO, ...) \ MACRO(946, __VA_ARGS__) \ DO_945(MACRO, __VA_ARGS__) #define DO_947(MACRO, ...) \ MACRO(947, __VA_ARGS__) \ DO_946(MACRO, __VA_ARGS__) #define DO_948(MACRO, ...) \ MACRO(948, __VA_ARGS__) \ DO_947(MACRO, __VA_ARGS__) #define DO_949(MACRO, ...) \ MACRO(949, __VA_ARGS__) \ DO_948(MACRO, __VA_ARGS__) #define DO_950(MACRO, ...) \ MACRO(950, __VA_ARGS__) \ DO_949(MACRO, __VA_ARGS__) #define DO_951(MACRO, ...) \ MACRO(951, __VA_ARGS__) \ DO_950(MACRO, __VA_ARGS__) #define DO_952(MACRO, ...) \ MACRO(952, __VA_ARGS__) \ DO_951(MACRO, __VA_ARGS__) #define DO_953(MACRO, ...) \ MACRO(953, __VA_ARGS__) \ DO_952(MACRO, __VA_ARGS__) #define DO_954(MACRO, ...) \ MACRO(954, __VA_ARGS__) \ DO_953(MACRO, __VA_ARGS__) #define DO_955(MACRO, ...) \ MACRO(955, __VA_ARGS__) \ DO_954(MACRO, __VA_ARGS__) #define DO_956(MACRO, ...) \ MACRO(956, __VA_ARGS__) \ DO_955(MACRO, __VA_ARGS__) #define DO_957(MACRO, ...) \ MACRO(957, __VA_ARGS__) \ DO_956(MACRO, __VA_ARGS__) #define DO_958(MACRO, ...) \ MACRO(958, __VA_ARGS__) \ DO_957(MACRO, __VA_ARGS__) #define DO_959(MACRO, ...) \ MACRO(959, __VA_ARGS__) \ DO_958(MACRO, __VA_ARGS__) #define DO_960(MACRO, ...) \ MACRO(960, __VA_ARGS__) \ DO_959(MACRO, __VA_ARGS__) #define DO_961(MACRO, ...) \ MACRO(961, __VA_ARGS__) \ DO_960(MACRO, __VA_ARGS__) #define DO_962(MACRO, ...) \ MACRO(962, __VA_ARGS__) \ DO_961(MACRO, __VA_ARGS__) #define DO_963(MACRO, ...) \ MACRO(963, __VA_ARGS__) \ DO_962(MACRO, __VA_ARGS__) #define DO_964(MACRO, ...) \ MACRO(964, __VA_ARGS__) \ DO_963(MACRO, __VA_ARGS__) #define DO_965(MACRO, ...) \ MACRO(965, __VA_ARGS__) \ DO_964(MACRO, __VA_ARGS__) #define DO_966(MACRO, ...) \ MACRO(966, __VA_ARGS__) \ DO_965(MACRO, __VA_ARGS__) #define DO_967(MACRO, ...) \ MACRO(967, __VA_ARGS__) \ DO_966(MACRO, __VA_ARGS__) #define DO_968(MACRO, ...) \ MACRO(968, __VA_ARGS__) \ DO_967(MACRO, __VA_ARGS__) #define DO_969(MACRO, ...) \ MACRO(969, __VA_ARGS__) \ DO_968(MACRO, __VA_ARGS__) #define DO_970(MACRO, ...) \ MACRO(970, __VA_ARGS__) \ DO_969(MACRO, __VA_ARGS__) #define DO_971(MACRO, ...) \ MACRO(971, __VA_ARGS__) \ DO_970(MACRO, __VA_ARGS__) #define DO_972(MACRO, ...) \ MACRO(972, __VA_ARGS__) \ DO_971(MACRO, __VA_ARGS__) #define DO_973(MACRO, ...) \ MACRO(973, __VA_ARGS__) \ DO_972(MACRO, __VA_ARGS__) #define DO_974(MACRO, ...) \ MACRO(974, __VA_ARGS__) \ DO_973(MACRO, __VA_ARGS__) #define DO_975(MACRO, ...) \ MACRO(975, __VA_ARGS__) \ DO_974(MACRO, __VA_ARGS__) #define DO_976(MACRO, ...) \ MACRO(976, __VA_ARGS__) \ DO_975(MACRO, __VA_ARGS__) #define DO_977(MACRO, ...) \ MACRO(977, __VA_ARGS__) \ DO_976(MACRO, __VA_ARGS__) #define DO_978(MACRO, ...) \ MACRO(978, __VA_ARGS__) \ DO_977(MACRO, __VA_ARGS__) #define DO_979(MACRO, ...) \ MACRO(979, __VA_ARGS__) \ DO_978(MACRO, __VA_ARGS__) #define DO_980(MACRO, ...) \ MACRO(980, __VA_ARGS__) \ DO_979(MACRO, __VA_ARGS__) #define DO_981(MACRO, ...) \ MACRO(981, __VA_ARGS__) \ DO_980(MACRO, __VA_ARGS__) #define DO_982(MACRO, ...) \ MACRO(982, __VA_ARGS__) \ DO_981(MACRO, __VA_ARGS__) #define DO_983(MACRO, ...) \ MACRO(983, __VA_ARGS__) \ DO_982(MACRO, __VA_ARGS__) #define DO_984(MACRO, ...) \ MACRO(984, __VA_ARGS__) \ DO_983(MACRO, __VA_ARGS__) #define DO_985(MACRO, ...) \ MACRO(985, __VA_ARGS__) \ DO_984(MACRO, __VA_ARGS__) #define DO_986(MACRO, ...) \ MACRO(986, __VA_ARGS__) \ DO_985(MACRO, __VA_ARGS__) #define DO_987(MACRO, ...) \ MACRO(987, __VA_ARGS__) \ DO_986(MACRO, __VA_ARGS__) #define DO_988(MACRO, ...) \ MACRO(988, __VA_ARGS__) \ DO_987(MACRO, __VA_ARGS__) #define DO_989(MACRO, ...) \ MACRO(989, __VA_ARGS__) \ DO_988(MACRO, __VA_ARGS__) #define DO_990(MACRO, ...) \ MACRO(990, __VA_ARGS__) \ DO_989(MACRO, __VA_ARGS__) #define DO_991(MACRO, ...) \ MACRO(991, __VA_ARGS__) \ DO_990(MACRO, __VA_ARGS__) #define DO_992(MACRO, ...) \ MACRO(992, __VA_ARGS__) \ DO_991(MACRO, __VA_ARGS__) #define DO_993(MACRO, ...) \ MACRO(993, __VA_ARGS__) \ DO_992(MACRO, __VA_ARGS__) #define DO_994(MACRO, ...) \ MACRO(994, __VA_ARGS__) \ DO_993(MACRO, __VA_ARGS__) #define DO_995(MACRO, ...) \ MACRO(995, __VA_ARGS__) \ DO_994(MACRO, __VA_ARGS__) #define DO_996(MACRO, ...) \ MACRO(996, __VA_ARGS__) \ DO_995(MACRO, __VA_ARGS__) #define DO_997(MACRO, ...) \ MACRO(997, __VA_ARGS__) \ DO_996(MACRO, __VA_ARGS__) #define DO_998(MACRO, ...) \ MACRO(998, __VA_ARGS__) \ DO_997(MACRO, __VA_ARGS__) #define DO_999(MACRO, ...) \ MACRO(999, __VA_ARGS__) \ DO_998(MACRO, __VA_ARGS__) #define DO_1000(MACRO, ...) \ MACRO(1000, __VA_ARGS__) \ DO_999(MACRO, __VA_ARGS__) #define DO_1001(MACRO, ...) \ MACRO(1001, __VA_ARGS__) \ DO_1000(MACRO, __VA_ARGS__) #define DO_1002(MACRO, ...) \ MACRO(1002, __VA_ARGS__) \ DO_1001(MACRO, __VA_ARGS__) #define DO_1003(MACRO, ...) \ MACRO(1003, __VA_ARGS__) \ DO_1002(MACRO, __VA_ARGS__) #define DO_1004(MACRO, ...) \ MACRO(1004, __VA_ARGS__) \ DO_1003(MACRO, __VA_ARGS__) #define DO_1005(MACRO, ...) \ MACRO(1005, __VA_ARGS__) \ DO_1004(MACRO, __VA_ARGS__) #define DO_1006(MACRO, ...) \ MACRO(1006, __VA_ARGS__) \ DO_1005(MACRO, __VA_ARGS__) #define DO_1007(MACRO, ...) \ MACRO(1007, __VA_ARGS__) \ DO_1006(MACRO, __VA_ARGS__) #define DO_1008(MACRO, ...) \ MACRO(1008, __VA_ARGS__) \ DO_1007(MACRO, __VA_ARGS__) #define DO_1009(MACRO, ...) \ MACRO(1009, __VA_ARGS__) \ DO_1008(MACRO, __VA_ARGS__) #define DO_1010(MACRO, ...) \ MACRO(1010, __VA_ARGS__) \ DO_1009(MACRO, __VA_ARGS__) #define DO_1011(MACRO, ...) \ MACRO(1011, __VA_ARGS__) \ DO_1010(MACRO, __VA_ARGS__) #define DO_1012(MACRO, ...) \ MACRO(1012, __VA_ARGS__) \ DO_1011(MACRO, __VA_ARGS__) #define DO_1013(MACRO, ...) \ MACRO(1013, __VA_ARGS__) \ DO_1012(MACRO, __VA_ARGS__) #define DO_1014(MACRO, ...) \ MACRO(1014, __VA_ARGS__) \ DO_1013(MACRO, __VA_ARGS__) #define DO_1015(MACRO, ...) \ MACRO(1015, __VA_ARGS__) \ DO_1014(MACRO, __VA_ARGS__) #define DO_1016(MACRO, ...) \ MACRO(1016, __VA_ARGS__) \ DO_1015(MACRO, __VA_ARGS__) #define DO_1017(MACRO, ...) \ MACRO(1017, __VA_ARGS__) \ DO_1016(MACRO, __VA_ARGS__) #define DO_1018(MACRO, ...) \ MACRO(1018, __VA_ARGS__) \ DO_1017(MACRO, __VA_ARGS__) #define DO_1019(MACRO, ...) \ MACRO(1019, __VA_ARGS__) \ DO_1018(MACRO, __VA_ARGS__) #define DO_1020(MACRO, ...) \ MACRO(1020, __VA_ARGS__) \ DO_1019(MACRO, __VA_ARGS__) #define DO_1021(MACRO, ...) \ MACRO(1021, __VA_ARGS__) \ DO_1020(MACRO, __VA_ARGS__) #define DO_1022(MACRO, ...) \ MACRO(1022, __VA_ARGS__) \ DO_1021(MACRO, __VA_ARGS__) #define DO_1023(MACRO, ...) \ MACRO(1023, __VA_ARGS__) \ DO_1022(MACRO, __VA_ARGS__) #define DO_1024(MACRO, ...) \ MACRO(1024, __VA_ARGS__) \ DO_1023(MACRO, __VA_ARGS__) #define DO(TIMES, MACRO, ...) C2(DO_, TIMES)(MACRO, __VA_ARGS__) /* we need some sort of macro that does: IF(0, "true", "false") => "false" IF(1, "true", "false") => "true" IF(X, "true", "false") => "true" */ #define INTERNALIF(x) INTERNALIF##x #define INTERNALIF0 #define ISZERO(x) COUNT_ARG(INTERNALIF(x)) #define IF(condition, trueBranch, falseBranch) C2(IF,ISZERO(condition))(trueBranch, falseBranch) #define IF0(trueBranch, falseBranch) falseBranch #define IF1(trueBranch, falseBranch) trueBranch #define DEFINE_ENUMERATION_CONSTANT(x) x, /*DEFINE_ENUM goes to header*/ #define DEFINE_ENUM(enumName, ...) typedef enum C2(enumName, _TAG) { FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT, __VA_ARGS__)} enumName; \ extern const char* C2(enumName,Strings)(enumName value); \ extern int C2(enumName, _FromString)(const char* enumAsString, enumName* destination); #define DEFINE_ENUMERATION_CONSTANT_AS_WIDESTRING(x) C2(L, TOSTRING(x)) , #define DEFINE_ENUMERATION_CONSTANT_AS_STRING(x) TOSTRING(x) , /*DEFINE_ENUM_STRINGS goes to .c*/ #define DEFINE_ENUM_STRINGS(enumName, ...) const char* C2(enumName, StringStorage)[COUNT_ARG(__VA_ARGS__)] = {FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__)}; \ const char* C2(enumName,Strings)(enumName value) \ { \ if((int)value<0 || (int)value>=COUNT_ARG(__VA_ARGS__)) \ { \ /*this is an error case*/ \ return NULL; \ } \ else \ { \ return C2(enumName, StringStorage)[value]; \ } \ } \ int C2(enumName, _FromString)(const char* enumAsString, enumName* destination) \ { \ if( \ (enumAsString==NULL) || (destination==NULL) \ ) \ { \ return __FAILURE__; \ } \ else \ { \ size_t i; \ for(i=0;i=COUNT_ARG(__VA_ARGS__)) \ { \ /*this is an error case*/ \ return NULL; \ } \ else \ { \ return C2(enumName, StringStorage)[value]; \ } \ } #define ENUM_TO_STRING(enumName, enumValue) C2(enumName, Strings)(enumValue) #define STRING_TO_ENUM(stringValue, enumName, addressOfEnumVariable) C2(enumName, _FromString)(stringValue, addressOfEnumVariable) #define DEFINE_MICROMOCK_ENUM_TO_STRING(type, ...) MICROMOCK_ENUM_TO_STRING(type, FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT_AS_WIDESTRING, __VA_ARGS__)); #define EMPTY() #define MACRO_UTILS_DELAY(id) id EMPTY LPAREN ) #endif /*MACRO_UTILS_H*/ umock_c.h000066400000000000000000000140351362133436400352200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCK_C_H #define UMOCK_C_H #ifdef __cplusplus extern "C" { #include #else #include #endif #include "macro_utils.h" #include "umockcallrecorder.h" /* Define UMOCK_STATIC to static to make mocks private to compilation unit */ #ifndef UMOCK_STATIC #define UMOCK_STATIC #endif #define UMOCK_C_ERROR_CODE_VALUES \ UMOCK_C_ARG_INDEX_OUT_OF_RANGE, \ UMOCK_C_MALLOC_ERROR, \ UMOCK_C_INVALID_ARGUMENT_BUFFER, \ UMOCK_C_COMPARE_CALL_ERROR, \ UMOCK_C_RESET_CALLS_ERROR, \ UMOCK_C_CAPTURE_RETURN_ALREADY_USED, \ UMOCK_C_NULL_ARGUMENT, \ UMOCK_C_INVALID_PAIRED_CALLS, \ UMOCK_C_REGISTER_TYPE_FAILED, \ UMOCK_C_ERROR DEFINE_ENUM(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) /* This is the type for the error callback by which umock_c shall indicate errors to the user */ typedef void(*ON_UMOCK_C_ERROR)(UMOCK_C_ERROR_CODE error_code); #define IGNORED_PTR_ARG (NULL) #define IGNORED_NUM_ARG (0) #define REGISTER_GLOBAL_MOCK_HOOK(mock_function, mock_hook_function) \ C2(set_global_mock_hook_,mock_function)(mock_hook_function); #define REGISTER_GLOBAL_MOCK_RETURN(mock_function, return_value) \ C2(set_global_mock_return_,mock_function)(return_value); #define REGISTER_GLOBAL_MOCK_FAIL_RETURN(mock_function, fail_return_value) \ C2(set_global_mock_fail_return_,mock_function)(fail_return_value); #define REGISTER_GLOBAL_MOCK_RETURNS(mock_function, return_value, fail_return_value) \ C2(set_global_mock_returns_,mock_function)(return_value, fail_return_value); /* Codes_SRS_UMOCK_C_LIB_01_013: [STRICT_EXPECTED_CALL shall record that a certain call is expected.] */ #define STRICT_EXPECTED_CALL(call) \ C2(get_auto_ignore_args_function_, call)(C2(umock_c_strict_expected_,call), #call) #define EXPECTED_CALL(call) \ C2(umock_c_expected_,call) #define DECLARE_UMOCK_POINTER_TYPE_FOR_TYPE(value_type, alias) \ char* C3(stringify_func_,alias,ptr)(const value_type** value) \ { \ char temp_buffer[32]; \ char* result; \ size_t length = sprintf(temp_buffer, "%p", (void*)*value); \ if (length < 0) \ { \ result = NULL; \ } \ else \ { \ result = (char*)malloc(length + 1); \ if (result != NULL) \ { \ (void)memcpy(result, temp_buffer, length + 1); \ } \ } \ return result; \ } \ int C3(are_equal_func_,alias,ptr)(const value_type** left, const value_type** right) \ { \ return *left == *right; \ } \ int C3(copy_func_,alias,ptr)(value_type** destination, const value_type** source) \ { \ *destination = (value_type*)*source; \ return 0; \ } \ void C3(free_func_,alias,ptr)(value_type** value) \ { \ (void)value; \ } \ extern void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code); extern int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error); extern void umock_c_deinit(void); extern void umock_c_reset_all_calls(void); extern const char* umock_c_get_actual_calls(void); extern const char* umock_c_get_expected_calls(void); extern UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void); extern int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE umockc_call_recorder); /* Codes_SRS_UMOCK_C_LIB_01_065: [REGISTER_UMOCK_VALUE_TYPE shall register the type identified by value_type to be usable by umock_c for argument and return types and instruct umock_c which functions to use for getting the stringify, are_equal, copy and free.]*/ /* Codes_SRS_UMOCK_C_LIB_01_197: [ If REGISTER_UMOCK_VALUE_TYPE fails, the on_error callback shall be called with UMOCK_C_REGISTER_TYPE_FAILED. ]*/ #define REGISTER_UMOCK_VALUE_TYPE_ALL(value_type, stringify_func, are_equal_func, copy_func, free_func) \ { \ char* stringify_func(const value_type* value); \ int are_equal_func(const value_type* left, const value_type* right); \ int copy_func(value_type* destination, const value_type* source); \ void free_func(value_type* value); \ if (umocktypes_register_type(TOSTRING(value_type), (UMOCKTYPE_STRINGIFY_FUNC)stringify_func, (UMOCKTYPE_ARE_EQUAL_FUNC)are_equal_func, (UMOCKTYPE_COPY_FUNC)copy_func, (UMOCKTYPE_FREE_FUNC)free_func) != 0) \ { \ umock_c_indicate_error(UMOCK_C_REGISTER_TYPE_FAILED); \ } \ } /* Codes_SRS_UMOCK_C_LIB_01_066: [If only the value_type is specified in the macro invocation then the stringify, are_equal, copy and free function names shall be automatically derived from the type as: umockvalue_stringify_value_type, umockvalue_are_equal_value_type, umockvalue_copy_value_type, umockvalue_free_value_type.]*/ #define REGISTER_UMOCK_VALUE_TYPE_ONLY_TYPE(value_type) \ REGISTER_UMOCK_VALUE_TYPE_ALL (value_type, C2(umock_stringify_,value_type), C2(umock_are_equal_,value_type), C2(umock_copy_,value_type), C2(umock_free_,value_type)) #if _MSC_VER #define REGISTER_UMOCK_VALUE_TYPE(...) \ IF(DIV2(COUNT_ARG(__VA_ARGS__)), REGISTER_UMOCK_VALUE_TYPE_ALL, REGISTER_UMOCK_VALUE_TYPE_ONLY_TYPE) LPAREN __VA_ARGS__) #else #define REGISTER_UMOCK_VALUE_TYPE(...) \ IF(DIV2(COUNT_ARG(__VA_ARGS__)), REGISTER_UMOCK_VALUE_TYPE_ALL, REGISTER_UMOCK_VALUE_TYPE_ONLY_TYPE) (__VA_ARGS__) #endif /* Codes_SRS_UMOCK_C_LIB_01_149: [ REGISTER_UMOCK_ALIAS_TYPE registers a new alias type for another type. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_198: [ If REGISTER_UMOCK_ALIAS_TYPE fails, the on_error callback shall be called with UMOCK_C_REGISTER_TYPE_FAILED. ]*/ #define REGISTER_UMOCK_ALIAS_TYPE(value_type, is_value_type) \ if (umocktypes_register_alias_type(TOSTRING(value_type), TOSTRING(is_value_type)) != 0) \ { \ umock_c_indicate_error(UMOCK_C_REGISTER_TYPE_FAILED); \ } \ #define UMOCK_TYPE(value_type) \ (const char*)(const void*)(const value_type*)(const void*)TOSTRING(value_type) #include "umock_c_internal.h" #include "umock_c_prod.h" #ifdef __cplusplus } #endif #endif /* UMOCK_C_H */ umock_c_internal.h000066400000000000000000002336601362133436400371230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCK_C_INTERNAL_H #define UMOCK_C_INTERNAL_H #ifdef __cplusplus #include extern "C" { #else #include #endif #include #include "macro_utils.h" #include "umocktypes.h" #include "umockcall.h" #include "umockcallrecorder.h" #include "umock_c.h" #include "umock_log.h" #include "umockalloc.h" #include "umockcallpairs.h" #include "umockstring.h" #include "umockautoignoreargs.h" extern void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code); extern UMOCKCALL_HANDLE umock_c_get_last_expected_call(void); extern int umock_c_add_expected_call(UMOCKCALL_HANDLE mock_call); extern int umock_c_add_actual_call(UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); typedef struct ARG_BUFFER_TAG { void* bytes; size_t length; } ARG_BUFFER; typedef int(*TRACK_CREATE_FUNC_TYPE)(PAIRED_HANDLES* paired_handles, const void* handle, const char* handle_type, size_t handle_type_size); typedef int(*TRACK_DESTROY_FUNC_TYPE)(PAIRED_HANDLES* paired_handles, const void* handle); #define MOCK_ENABLED 0 #define MOCK_DISABLED 1 #define ARG_IS_IGNORED -1 #define ARG_IS_NOT_IGNORED 0 #define FAIL_RETURN_VALUE_SET -1 #define FAIL_RETURN_VALUE_NOT_SET 0 #define RETURN_VALUE_SET -1 #define RETURN_VALUE_NOT_SET 0 #define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) #define GET_USED_ARGUMENT_TYPE(mock_call, arg_name, arg_type) \ mock_call->C2(override_argument_type_,arg_name) != NULL ? mock_call->C2(override_argument_type_,arg_name) : #arg_type #define COPY_ARG_TO_MOCK_STRUCT(arg_type, arg_name) umocktypes_copy(#arg_type, (void*)&mock_call_data->arg_name, (void*)&arg_name); #define DECLARE_MOCK_CALL_STRUCT_STACK(arg_type, arg_name) arg_type arg_name; #define MARK_ARG_AS_NOT_IGNORED(arg_type, arg_name) mock_call_data->C2(is_ignored_, arg_name) = ARG_IS_NOT_IGNORED; #define CLEAR_VALIDATE_ARG_VALUE(arg_type, arg_name) mock_call_data->C2(validate_arg_value_pointer_, arg_name) = NULL; #define CLEAR_OVERRIDE_ARGUMENT_TYPE(arg_type, arg_name) mock_call_data->C2(override_argument_type_, arg_name) = NULL; #define MARK_ARG_AS_IGNORED(arg_type, arg_name) mock_call_data->C2(is_ignored_, arg_name) = ARG_IS_IGNORED; #define CLEAR_OUT_ARG_BUFFERS(count, arg_type, arg_name) \ C2(mock_call_data->out_arg_buffer_,arg_name).bytes = NULL; \ mock_call_data->out_arg_buffers[COUNT_OF(mock_call_data->out_arg_buffers) - DIV2(count)] = &C2(mock_call_data->out_arg_buffer_,arg_name); #define CLEAR_VALIDATE_ARG_BUFFERS(count, arg_type, arg_name) mock_call_data->validate_arg_buffers[COUNT_OF(mock_call_data->validate_arg_buffers) - DIV2(count)].bytes = NULL; #define FREE_ARG_VALUE(count, arg_type, arg_name) umocktypes_free(GET_USED_ARGUMENT_TYPE(typed_mock_call_data, arg_name, arg_type), (void*)&typed_mock_call_data->arg_name); #define FREE_OUT_ARG_BUFFERS(count, arg_type, arg_name) umockalloc_free(typed_mock_call_data->out_arg_buffers[COUNT_OF(typed_mock_call_data->out_arg_buffers) - DIV2(count)]->bytes); #define FREE_VALIDATE_ARG_BUFFERS(count, arg_type, arg_name) umockalloc_free(typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].bytes); #define FREE_OVERRIDE_ARGUMENT_TYPE(count, arg_type, arg_name) umockalloc_free(typed_mock_call_data->C2(override_argument_type_, arg_name)); #define COPY_IGNORE_ARG(arg_type, arg_name) \ result->C2(is_ignored_, arg_name) = typed_mock_call_data->C2(is_ignored_, arg_name); #define COPY_VALIDATE_ARG_VALUE(arg_type, arg_name) \ result->C2(validate_arg_value_pointer_, arg_name) = typed_mock_call_data->C2(validate_arg_value_pointer_, arg_name); #define COPY_OVERRIDE_ARGUMENT_TYPE(arg_type, arg_name) \ result->C2(override_argument_type_, arg_name) = (typed_mock_call_data->C2(override_argument_type_, arg_name) == NULL) ? NULL : umockstring_clone(typed_mock_call_data->C2(override_argument_type_, arg_name)); #define COPY_ARG_VALUE(arg_type, arg_name) umocktypes_copy(GET_USED_ARGUMENT_TYPE(typed_mock_call_data, arg_name, arg_type), (void*)&result->arg_name, (void*)&typed_mock_call_data->arg_name); #define COPY_OUT_ARG_BUFFERS(count, arg_type, arg_name) \ result->out_arg_buffers[COUNT_OF(result->out_arg_buffers) - DIV2(count)] = &result->C2(out_arg_buffer_,arg_name); \ result->out_arg_buffers[COUNT_OF(result->out_arg_buffers) - DIV2(count)]->length = typed_mock_call_data->out_arg_buffers[COUNT_OF(typed_mock_call_data->out_arg_buffers) - DIV2(count)]->length; \ if (typed_mock_call_data->out_arg_buffers[COUNT_OF(typed_mock_call_data->out_arg_buffers) - DIV2(count)]->bytes != NULL) \ { \ result->out_arg_buffers[COUNT_OF(result->out_arg_buffers) - DIV2(count)]->bytes = umockalloc_malloc(typed_mock_call_data->out_arg_buffers[COUNT_OF(typed_mock_call_data->out_arg_buffers) - DIV2(count)]->length); \ (void)memcpy(result->out_arg_buffers[COUNT_OF(result->out_arg_buffers) - DIV2(count)]->bytes, typed_mock_call_data->out_arg_buffers[COUNT_OF(typed_mock_call_data->out_arg_buffers) - DIV2(count)]->bytes, typed_mock_call_data->out_arg_buffers[COUNT_OF(typed_mock_call_data->out_arg_buffers) - DIV2(count)]->length); \ } \ else \ { \ result->out_arg_buffers[COUNT_OF(result->out_arg_buffers) - DIV2(count)]->bytes = NULL; \ } #define COPY_VALIDATE_ARG_BUFFERS(count, arg_type, arg_name) \ result->validate_arg_buffers[COUNT_OF(result->validate_arg_buffers) - DIV2(count)].length = typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].length; \ if (typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].bytes != NULL) \ { \ result->validate_arg_buffers[COUNT_OF(result->validate_arg_buffers) - DIV2(count)].bytes = umockalloc_malloc(typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].length); \ (void)memcpy(result->validate_arg_buffers[COUNT_OF(result->validate_arg_buffers) - DIV2(count)].bytes, typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].bytes, typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].length); \ } \ else \ { \ result->validate_arg_buffers[COUNT_OF(result->validate_arg_buffers) - DIV2(count)].bytes = NULL; \ } #define ONLY_FIRST_ARG(arg0type, arg0name, ...) arg0name #define FILL_ARG_IN_METADATA(arg_type, arg_name) { TOSTRING(arg_type), TOSTRING(arg_name) }, #define ARG_IN_SIGNATURE(count, arg_type, arg_name) arg_type arg_name IFCOMMA(count) #define ARG_NAME_ONLY_IN_CALL(count, arg_type, arg_name) arg_name IFCOMMA(count) #define ONLY_FIRST_ARG_NAME_IN_CALL(count, arg_type, arg_name) count #define ARG_ASSIGN_IN_ARRAY(arg_type, arg_name) arg_name_local #define DECLARE_VALIDATE_ARG_VALUE(arg_type, arg_name) void* C2(validate_arg_value_pointer_,arg_name); #define DECLARE_IGNORE_FLAG_FOR_ARG(arg_type, arg_name) int C2(is_ignored_,arg_name) : 1; #define DECLARE_OVERRIDE_ARGUMENT_TYPE_FOR_ARG(arg_type, arg_name) char* C2(override_argument_type_,arg_name); #define DECLARE_OUT_ARG_BUFFER_FOR_ARG(arg_type, arg_name) ARG_BUFFER C2(out_arg_buffer_,arg_name); #define COPY_IGNORE_ARG_BY_NAME_TO_MODIFIER(name, arg_type, arg_name) C2(mock_call_modifier->IgnoreArgument_,arg_name) = C4(ignore_argument_func_,name,_,arg_name); #define COPY_VALIDATE_ARG_BY_NAME_TO_MODIFIER(name, arg_type, arg_name) C2(mock_call_modifier->ValidateArgument_,arg_name) = C4(validate_argument_func_,name,_,arg_name); #define COPY_COPY_OUT_ARGUMENT_BUFFER_BY_NAME_TO_MODIFIER(name, arg_type, arg_name) C2(mock_call_modifier->CopyOutArgumentBuffer_,arg_name) = C4(copy_out_argument_buffer_func_,name,_,arg_name); #define COPY_VALIDATE_ARGUMENT_VALUE_BY_NAME_TO_MODIFIER(name, arg_type, arg_name) C2(mock_call_modifier->ValidateArgumentValue_,arg_name) = C4(validate_argument_value_func_,name,_,arg_name); #define COPY_VALIDATE_ARGUMENT_VALUE_AS_TYPE_BY_NAME_TO_MODIFIER(name, arg_type, arg_name) C3(mock_call_modifier->ValidateArgumentValue_,arg_name,_AsType) = C4(validate_argument_value_as_type_func_,name,_,arg_name); #define COPY_OUT_ARG_VALUE_FROM_MATCHED_CALL(count, arg_type, arg_name) \ if (matched_call_data->out_arg_buffers[COUNT_OF(matched_call_data->out_arg_buffers) - DIV2(count)]->bytes != NULL) \ { \ (void)memcpy(*((void**)(&arg_name)), matched_call_data->out_arg_buffers[COUNT_OF(matched_call_data->out_arg_buffers) - DIV2(count)]->bytes, matched_call_data->out_arg_buffers[COUNT_OF(matched_call_data->out_arg_buffers) - DIV2(count)]->length); \ } \ #define STRINGIFY_ARGS_DECLARE_RESULT_VAR(count, arg_type, arg_name) \ char* C2(arg_name,_stringified) \ = (C2(typed_mock_call_data->validate_arg_value_pointer_, arg_name) != NULL) ? \ umocktypes_stringify(TOSTRING(arg_type), (void*)C2(typed_mock_call_data->validate_arg_value_pointer_, arg_name)) : \ ((typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->out_arg_buffers) - DIV2(count)].bytes != NULL) ? \ umockc_stringify_buffer(typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].bytes, typed_mock_call_data->validate_arg_buffers[COUNT_OF(typed_mock_call_data->validate_arg_buffers) - DIV2(count)].length) : \ umocktypes_stringify(TOSTRING(arg_type), (void*)&typed_mock_call_data->arg_name)); #define STRINGIFY_ARGS_CHECK_ARG_STRINGIFY_SUCCESS(arg_type, arg_name) if (C2(arg_name,_stringified) == NULL) is_error = 1; #define STRINGIFY_ARGS_DECLARE_ARG_STRING_LENGTH(arg_type, arg_name) size_t C2(arg_name,_stringified_length) = strlen(C2(arg_name,_stringified)); #define STRINGIFY_ARGS_COUNT_LENGTH(arg_type, arg_name) args_string_length += C2(arg_name,_stringified_length); #define STRINGIFY_ARGS_FREE_STRINGIFIED_ARG(arg_type, arg_name) umockalloc_free(C2(arg_name,_stringified)); #define STRINGIFY_ARGS_COPY_ARG_STRING(arg_type, arg_name) \ if (arg_index > 0) \ { \ result[current_pos] = ','; \ current_pos++; \ } \ (void)memcpy(result + current_pos, C2(arg_name,_stringified), C2(arg_name,_stringified_length) + 1); \ current_pos += C2(arg_name, _stringified_length); \ arg_index++; /* Codes_SRS_UMOCK_C_LIB_01_096: [If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument.]*/ #define ARE_EQUAL_FOR_ARG(count, arg_type, arg_name) \ if (result && \ (((typed_left->validate_arg_buffers[COUNT_OF(typed_left->validate_arg_buffers) - DIV2(count)].bytes != NULL) && (memcmp(*((void**)&typed_right->arg_name), typed_left->validate_arg_buffers[COUNT_OF(typed_left->validate_arg_buffers) - DIV2(count)].bytes, typed_left->validate_arg_buffers[COUNT_OF(typed_left->validate_arg_buffers) - DIV2(count)].length) != 0)) \ || ((typed_right->validate_arg_buffers[COUNT_OF(typed_right->validate_arg_buffers) - DIV2(count)].bytes != NULL) && (memcmp(*((void**)&typed_left->arg_name), typed_right->validate_arg_buffers[COUNT_OF(typed_right->validate_arg_buffers) - DIV2(count)].bytes, typed_right->validate_arg_buffers[COUNT_OF(typed_right->validate_arg_buffers) - DIV2(count)].length) != 0))) \ ) \ { \ result = 0; \ } \ if ((result == 1) && (C2(typed_left->is_ignored_, arg_name) == ARG_IS_NOT_IGNORED) \ && (C2(typed_right->is_ignored_, arg_name) == ARG_IS_NOT_IGNORED)) \ { \ void* left_value; \ void* right_value; \ if (C2(typed_left->validate_arg_value_pointer_, arg_name) != NULL) \ { \ left_value = (void*)C2(typed_left->validate_arg_value_pointer_, arg_name); \ } \ else \ { \ left_value = (void*)&typed_left->arg_name; \ } \ if (C2(typed_right->validate_arg_value_pointer_, arg_name) != NULL) \ { \ right_value = (void*)C2(typed_right->validate_arg_value_pointer_, arg_name); \ } \ else \ { \ right_value = (void*)&typed_right->arg_name; \ } \ result = umocktypes_are_equal(GET_USED_ARGUMENT_TYPE(typed_left, arg_name, arg_type), left_value, right_value); \ } #define DECLARE_MOCK_CALL_MODIFIER(name, ...) \ C2(mock_call_modifier_,name) mock_call_modifier; \ C2(fill_mock_call_modifier_,name)(&mock_call_modifier); #define DECLARE_IGNORE_ARGUMENT_FUNCTION_PROTOTYPE(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(ignore_argument_func_,name,_,arg_name)(void); #define DECLARE_VALIDATE_ARGUMENT_FUNCTION_PROTOTYPE(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(validate_argument_func_,name,_,arg_name)(void); #define DECLARE_COPY_OUT_ARGUMENT_BUFFER_FUNCTION_PROTOTYPE(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(copy_out_argument_buffer_func_,name,_,arg_name)(const void* bytes, size_t length); #define DECLARE_VALIDATE_ARGUMENT_VALUE_FUNCTION_PROTOTYPE(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(validate_argument_value_func_,name,_,arg_name)(arg_type* arg_value); #define DECLARE_VALIDATE_ARGUMENT_VALUE_AS_TYPE_FUNCTION_PROTOTYPE(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(validate_argument_value_as_type_func_,name,_,arg_name)(const char* type_name); #define IGNORE_ARGUMENT_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ C4(ignore_argument_func_type_,name,_,arg_name) C2(IgnoreArgument_,arg_name); #define VALIDATE_ARGUMENT_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ C4(validate_argument_func_type_,name,_,arg_name) C2(ValidateArgument_,arg_name); #define COPY_OUT_ARGUMENT_BUFFER_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ C4(copy_out_argument_buffer_func_type_,name,_,arg_name) C2(CopyOutArgumentBuffer_,arg_name); #define VALIDATE_ARGUMENT_VALUE_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ C4(validate_argument_value_func_type_,name,_,arg_name) C2(ValidateArgumentValue_,arg_name); #define VALIDATE_ARGUMENT_VALUE_AS_TYPE_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ C4(validate_argument_value_as_type_func_type_,name,_,arg_name) C3(ValidateArgumentValue_,arg_name,_AsType); #define ARG_RELATED_FUNCTIONS_IN_MODIFIERS(name, arg_type, arg_name) \ IGNORE_ARGUMENT_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ VALIDATE_ARGUMENT_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ COPY_OUT_ARGUMENT_BUFFER_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ VALIDATE_ARGUMENT_VALUE_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ VALIDATE_ARGUMENT_VALUE_AS_TYPE_FUNCTION_IN_MODIFIERS(name, arg_type, arg_name) \ #define DECLARE_IGNORE_ARGUMENT_FUNCTION_TYPE(name, arg_type, arg_name) \ typedef struct C2(_mock_call_modifier_,name) (*C4(ignore_argument_func_type_,name,_,arg_name))(void); #define DECLARE_VALIDATE_ARGUMENT_FUNCTION_TYPE(name, arg_type, arg_name) \ typedef struct C2(_mock_call_modifier_,name) (*C4(validate_argument_func_type_,name,_,arg_name))(void); #define DECLARE_COPY_OUT_ARGUMENT_BUFFER_FUNCTION_TYPE(name, arg_type, arg_name) \ typedef struct C2(_mock_call_modifier_,name) (*C4(copy_out_argument_buffer_func_type_,name,_,arg_name))(const void* bytes, size_t length); #define DECLARE_VALIDATE_ARGUMENT_VALUE_FUNCTION_TYPE(name, arg_type, arg_name) \ typedef struct C2(_mock_call_modifier_,name) (*C4(validate_argument_value_func_type_,name,_,arg_name))(arg_type* arg_value); #define DECLARE_VALIDATE_ARGUMENT_AS_TYPE_VALUE_FUNCTION_TYPE(name, arg_type, arg_name) \ typedef struct C2(_mock_call_modifier_,name) (*C4(validate_argument_value_as_type_func_type_,name,_,arg_name))(const char* type_name); #define DECLARE_ARG_RELATED_FUNCTIONS(name, arg_type, arg_name) \ DECLARE_IGNORE_ARGUMENT_FUNCTION_TYPE(name, arg_type, arg_name) \ DECLARE_VALIDATE_ARGUMENT_FUNCTION_TYPE(name, arg_type, arg_name) \ DECLARE_COPY_OUT_ARGUMENT_BUFFER_FUNCTION_TYPE(name, arg_type, arg_name) \ DECLARE_VALIDATE_ARGUMENT_VALUE_FUNCTION_TYPE(name, arg_type, arg_name) \ DECLARE_VALIDATE_ARGUMENT_AS_TYPE_VALUE_FUNCTION_TYPE(name, arg_type, arg_name) #define IGNORE_ARGUMENT_FUNCTION_IN_ARRAY(name, arg_type, arg_name) \ &C4(ignore_argument_func_,name,_,arg_name), #define VALIDATE_ARGUMENT_FUNCTION_IN_ARRAY(name, arg_type, arg_name) \ &C4(validate_argument_func_,name,_,arg_name), /* These 2 macros are used to check if a type is "void" or not */ #define TEST_void 0 #define IS_NOT_VOID(x) \ IF(C2(TEST_,x), 1, 0) /* Codes_SRS_UMOCK_C_LIB_01_076: [The IgnoreAllArguments call modifier shall record that for that specific call all arguments will be ignored for that specific call.] */ #define IMPLEMENT_IGNORE_ALL_ARGUMENTS_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(ignore_all_arguments_func_,name)(void) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ IF(COUNT_ARG(__VA_ARGS__), FOR_EACH_2(MARK_ARG_AS_IGNORED, __VA_ARGS__),) \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_077: [The ValidateAllArguments call modifier shall record that for that specific call all arguments will be validated.] */ #define IMPLEMENT_VALIDATE_ALL_ARGUMENTS_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(validate_all_arguments_func_,name)(void) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("ValidateAllArguments called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ IF(COUNT_ARG(__VA_ARGS__), FOR_EACH_2(MARK_ARG_AS_NOT_IGNORED, __VA_ARGS__), ) \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_078: [The IgnoreArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be ignored for that specific call.] */ #define IMPLEMENT_IGNORE_ARGUMENT_BY_NAME_FUNCTION(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(ignore_argument_func_,name,_,arg_name)(void) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("IgnoreArgument_%s called without having an expected call.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ C2(mock_call_data->is_ignored_,arg_name) = ARG_IS_IGNORED; \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_079: [The ValidateArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be validated for that specific call.]*/ #define IMPLEMENT_VALIDATE_ARGUMENT_BY_NAME_FUNCTION(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(validate_argument_func_,name,_,arg_name)(void) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("ValidateArgument_%s called without having an expected call.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ C2(mock_call_data->is_ignored_,arg_name) = ARG_IS_NOT_IGNORED; \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_080: [The IgnoreArgument call modifier shall record that the indexth argument will be ignored for that specific call.]*/ /* Codes_SRS_UMOCK_C_LIB_01_081: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.] */ #define IMPLEMENT_IGNORE_ARGUMENT_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(ignore_argument_func_,name)(size_t arg_index) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("IgnoreArgument called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ IF(COUNT_ARG(__VA_ARGS__), \ if ((arg_index < 1) || (arg_index > (sizeof(C2(ignore_one_argument_array_,name)) / sizeof(C2(ignore_one_argument_array_,name)[0])))) \ { \ UMOCK_LOG("Bad argument index in call to IgnoreArgument %zu.", arg_index); \ umock_c_indicate_error(UMOCK_C_ARG_INDEX_OUT_OF_RANGE); \ } \ else \ { \ C2(ignore_one_argument_array_,name)[arg_index - 1](); \ }, \ ) \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_082: [The ValidateArgument call modifier shall record that the indexth argument will be validated for that specific call.]*/ /* Codes_SRS_UMOCK_C_LIB_01_083: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ #define IMPLEMENT_VALIDATE_ARGUMENT_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(validate_argument_func_,name)(size_t arg_index) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("ValidateArgument called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ IF(COUNT_ARG(__VA_ARGS__), \ if ((arg_index < 1) || (arg_index > (sizeof(C2(validate_one_argument_array_,name)) / sizeof(C2(validate_one_argument_array_,name)[0])))) \ { \ UMOCK_LOG("Bad argument index in call to ValidateArgument %zu.", arg_index); \ umock_c_indicate_error(UMOCK_C_ARG_INDEX_OUT_OF_RANGE); \ } \ else \ { \ C2(validate_one_argument_array_,name)[arg_index - 1](); \ }, \ ) \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_084: [The SetReturn call modifier shall record that when an actual call is matched with the specific expected call, it shall return the result value to the code under test.] */ #define IMPLEMENT_SET_RETURN_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(set_return_func_,name)(return_type return_value) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("SetReturn called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ mock_call_data->return_value_set = RETURN_VALUE_SET; \ if (umocktypes_copy(#return_type, (void*)&mock_call_data->return_value, (void*)&return_value) != 0) \ { \ UMOCK_LOG("Could not copy return value of type %s.", TOSTRING(return_type)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ } \ return mock_call_modifier; \ } /* Codes_SRS_UMOCK_C_LIB_01_085: [The SetFailReturn call modifier shall record a fail return value.]*/ #define IMPLEMENT_SET_FAIL_RETURN_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(set_fail_return_func_,name)(return_type return_value) \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("SetFailReturn called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ mock_call_data->fail_return_value_set = FAIL_RETURN_VALUE_SET; \ if (umocktypes_copy(#return_type, (void*)&mock_call_data->fail_return_value, (void*)&return_value) != 0) \ { \ UMOCK_LOG("Could not copy fail return value of type %s.", TOSTRING(return_type)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ } \ return mock_call_modifier; \ } /* Codes_SRS_UMOCK_C_LIB_01_116: [ The argument targetted by CopyOutArgument shall also be marked as ignored. ] */ /* Codes_SRS_UMOCK_C_LIB_01_088: [The memory shall be copied.]*/ /* Codes_SRS_UMOCK_C_LIB_01_091: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ /* Codes_SRS_UMOCK_C_LIB_01_117: [ If any memory allocation error occurs, umock_c shall raise an error with the code UMOCK_C_MALLOC_ERROR. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_118: [ If any other error occurs, umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_092: [If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER.] */ /* Codes_SRS_UMOCK_C_LIB_01_089: [The buffers for previous CopyOutArgumentBuffer calls shall be freed.]*/ /* Codes_SRS_UMOCK_C_LIB_01_133: [ If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. ]*/ #define IMPLEMENT_COPY_OUT_ARGUMENT_BUFFER_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_, name) C2(copy_out_argument_buffer_func_, name)(size_t index, const void* bytes, size_t length) \ { \ DECLARE_MOCK_CALL_MODIFIER(name) \ if ((index < 1) || (index > DIV2(COUNT_ARG(__VA_ARGS__)))) \ { \ UMOCK_LOG("Bad argument index in CopyOutArgumentBuffer: %zu.", index); \ umock_c_indicate_error(UMOCK_C_ARG_INDEX_OUT_OF_RANGE); \ } \ else if ((bytes == NULL) || (length == 0)) \ { \ UMOCK_LOG("Bad arguments to CopyOutArgumentBuffer: bytes = %p, length = %zu.", bytes, length); \ umock_c_indicate_error(UMOCK_C_INVALID_ARGUMENT_BUFFER); \ } \ else \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("CopyOutArgumentBuffer called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ ARG_BUFFER* arg_buffer = mock_call_data->out_arg_buffers[index - 1]; \ umockalloc_free(arg_buffer->bytes); \ arg_buffer->bytes = umockalloc_malloc(length); \ if (arg_buffer->bytes == NULL) \ { \ UMOCK_LOG("Could not allocate memory for out argument buffers."); \ umock_c_indicate_error(UMOCK_C_MALLOC_ERROR); \ } \ else \ { \ (void)memcpy(arg_buffer->bytes, bytes, length); \ arg_buffer->length = length; \ mock_call_modifier.IgnoreArgument(index); \ } \ } \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_154: [ The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. ] */ /* Codes_SRS_UMOCK_C_LIB_01_163: [ The buffers for previous CopyOutArgumentBuffer calls shall be freed. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_156: [ If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_155: [ The memory shall be copied. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_158: [ If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. ] */ #define IMPLEMENT_COPY_OUT_ARGUMENT_BUFFER_BY_NAME_FUNCTION(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(copy_out_argument_buffer_func_,name,_,arg_name)(const void* bytes, size_t length) \ { \ DECLARE_MOCK_CALL_MODIFIER(name) \ if ((bytes == NULL) || (length == 0)) \ { \ UMOCK_LOG("Bad arguments to CopyOutArgumentBuffer: bytes = %p, length = %zu.", bytes, length); \ umock_c_indicate_error(UMOCK_C_INVALID_ARGUMENT_BUFFER); \ } \ else \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("CopyOutArgumentBuffer called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ ARG_BUFFER* arg_buffer = &C2(mock_call_data->out_arg_buffer_, arg_name); \ umockalloc_free(arg_buffer->bytes); \ arg_buffer->bytes = umockalloc_malloc(length); \ if (arg_buffer->bytes == NULL) \ { \ UMOCK_LOG("Could not allocate memory for out argument buffers."); \ umock_c_indicate_error(UMOCK_C_MALLOC_ERROR); \ } \ else \ { \ (void)memcpy(arg_buffer->bytes, bytes, length); \ arg_buffer->length = length; \ C2(mock_call_modifier.IgnoreArgument_, arg_name)(); \ } \ } \ } \ return mock_call_modifier; \ } \ #define IMPLEMENT_COPY_OUT_ARGUMENT_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(copy_out_argument_func_,name)(size_t arg_index, void* value) \ { \ DECLARE_MOCK_CALL_MODIFIER(name) \ (void)value; \ (void)arg_index; \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_095: [The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function.] */ /* Codes_SRS_UMOCK_C_LIB_01_097: [ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument.]*/ /* Codes_SRS_UMOCK_C_LIB_01_099: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ /* Codes_SRS_UMOCK_C_LIB_01_100: [If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER.] */ /* Codes_SRS_UMOCK_C_LIB_01_131: [ The memory pointed by bytes shall be copied. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_132: [ If several calls to ValidateArgumentBuffer are made, only the last buffer shall be kept. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_130: [ The buffers for previous ValidateArgumentBuffer calls shall be freed. ]*/ #define IMPLEMENT_VALIDATE_ARGUMENT_BUFFER_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(validate_argument_buffer_func_,name)(size_t index, const void* bytes, size_t length) \ { \ DECLARE_MOCK_CALL_MODIFIER(name) \ if ((index < 1) || (index > DIV2(COUNT_ARG(__VA_ARGS__)))) \ { \ UMOCK_LOG("Bad argument index in ValidateArgumentBuffer: %zu.", index); \ umock_c_indicate_error(UMOCK_C_ARG_INDEX_OUT_OF_RANGE); \ } \ else if ((bytes == NULL) || (length == 0)) \ { \ UMOCK_LOG("Bad arguments to ValidateArgumentBuffer: bytes = %p, length = %zu.", bytes, length); \ umock_c_indicate_error(UMOCK_C_INVALID_ARGUMENT_BUFFER); \ } \ else \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("ValidateArgumentBuffer called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ umockalloc_free(mock_call_data->validate_arg_buffers[index - 1].bytes); \ mock_call_data->validate_arg_buffers[index - 1].bytes = umockalloc_malloc(length); \ if (mock_call_data->validate_arg_buffers[index - 1].bytes == NULL) \ { \ UMOCK_LOG("Could not allocate memory for validating argument buffers."); \ umock_c_indicate_error(UMOCK_C_MALLOC_ERROR); \ } \ else \ { \ (void)memcpy(mock_call_data->validate_arg_buffers[index - 1].bytes, bytes, length); \ mock_call_data->validate_arg_buffers[index - 1].length = length; \ mock_call_modifier.IgnoreArgument(index); \ } \ } \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_101: [The IgnoreAllCalls call modifier shall record that all calls matching the expected call shall be ignored. If no matching call occurs no missing call shall be reported.]*/ /* Codes_SRS_UMOCK_C_LIB_01_208: [ If no matching call occurs no missing call shall be reported. ]*/ #define IMPLEMENT_IGNORE_ALL_CALLS_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(ignore_all_calls_func_,name)(void) \ { \ UMOCKCALL_HANDLE last_expected_call = umock_c_get_last_expected_call(); \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (last_expected_call == NULL) \ { \ UMOCK_LOG("Cannot get last expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(last_expected_call); \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("ValidateArgumentBuffer called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ if (umockcall_set_ignore_all_calls(last_expected_call, 1) != 0) \ { \ UMOCK_LOG("Cannot set the ignore_all_calls value on the last expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ } \ } \ return mock_call_modifier; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_179: [ The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_180: [ If CaptureReturn is called multiple times for the same call, an error shall be indicated with the code UMOCK_C_CAPTURE_RETURN_ALREADY_USED. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_182: [ If captured_return_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. ]*/ #define IMPLEMENT_CAPTURE_RETURN_FUNCTION(return_type, name, ...) \ static C2(mock_call_modifier_,name) C2(capture_return_func_,name)(return_type* captured_return_value) \ { \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (captured_return_value == NULL) \ { \ UMOCK_LOG("NULL captured_return_value."); \ umock_c_indicate_error(UMOCK_C_NULL_ARGUMENT); \ } \ else \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("CaptureReturn called without having an expected call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ if (mock_call_data->captured_return_value != NULL) \ { \ UMOCK_LOG("CaptureReturn called multiple times."); \ umock_c_indicate_error(UMOCK_C_CAPTURE_RETURN_ALREADY_USED); \ } \ else \ { \ mock_call_data->captured_return_value = captured_return_value; \ } \ } \ } \ return mock_call_modifier; \ } /* Codes_SRS_UMOCK_C_LIB_01_183: [ The ValidateArgumentValue_{arg_name} shall validate that the value of an argument matches the value pointed by arg_value. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_184: [ If arg_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_185: [ The ValidateArgumentValue_{arg_name} modifier shall inhibit comparing with any value passed directly as an argument in the expected call. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_186: [ The ValidateArgumentValue_{arg_name} shall implicitly do a ValidateArgument for the arg_name argument, making sure the argument is not ignored. ]*/ #define IMPLEMENT_VALIDATE_ARGUMENT_VALUE_BY_NAME_FUNCTION(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(validate_argument_value_func_,name,_,arg_name)(arg_type* arg_value) \ { \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (arg_value == NULL) \ { \ UMOCK_LOG("NULL argument to ValidateArgumentValue_%s.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_NULL_ARGUMENT); \ } \ else \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("ValidateArgumentValue_%s called without having an expected call.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ mock_call_data->C2(is_ignored_, arg_name) = ARG_IS_NOT_IGNORED; \ mock_call_data->C2(validate_arg_value_pointer_, arg_name) = (void*)arg_value; \ } \ } \ return mock_call_modifier; \ } /* Codes_SRS_UMOCK_C_LIB_01_199: [ `ValidateArgumentValue_{arg_name}_AsType` shall ensure that validation of the argument `arg_name` is done as if the argument is of type `type_name`. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_200: [ If `type_name` is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_202: [ If storing the argument value as the new type fails, umock_c shall raise an error with the code UMOCK_C_COPY_ARGUMENT_ERROR. ]*/ #define IMPLEMENT_VALIDATE_ARGUMENT_VALUE_AS_TYPE_BY_NAME_FUNCTION(name, arg_type, arg_name) \ static C2(mock_call_modifier_,name) C4(validate_argument_value_as_type_func_,name,_,arg_name)(const char* type_name) \ { \ DECLARE_MOCK_CALL_MODIFIER(name) \ if (type_name == NULL) \ { \ UMOCK_LOG("NULL argument to ValidateArgumentValue_%s_AsType.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_NULL_ARGUMENT); \ } \ else \ { \ C2(mock_call_, name)* mock_call_data = (C2(mock_call_, name)*)umockcall_get_call_data(umock_c_get_last_expected_call()); \ if (mock_call_data == NULL) \ { \ UMOCK_LOG("ValidateArgumentValue_%s called without having an expected call.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ char* cloned_type_name = umockstring_clone(type_name); \ if (cloned_type_name == NULL) \ { \ umockalloc_free(cloned_type_name); \ UMOCK_LOG("Cannot allocate memory to copy type_name in ValidateArgumentValue_%s_AsType for type name %s.", TOSTRING(arg_name), type_name); \ umock_c_indicate_error(UMOCK_C_MALLOC_ERROR); \ } \ else \ { \ void* temp = umockalloc_malloc(sizeof(arg_type)); \ if (temp == NULL) \ { \ umockalloc_free(cloned_type_name); \ UMOCK_LOG("Cannot allocate memory for the temporary argument value in ValidateArgumentValue_%s.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ if (umocktypes_copy(GET_USED_ARGUMENT_TYPE(mock_call_data, arg_name, arg_type), (void*)temp, (void*)&mock_call_data->arg_name) != 0) \ { \ umockalloc_free(cloned_type_name); \ UMOCK_LOG("Cannot copy argument in ValidateArgumentValue_%s.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ umocktypes_free(GET_USED_ARGUMENT_TYPE(mock_call_data, arg_name, arg_type), (void*)&mock_call_data->arg_name); \ if (umocktypes_copy(type_name, (void*)&mock_call_data->arg_name, (void*)temp) != 0) \ { \ umockalloc_free(cloned_type_name); \ UMOCK_LOG("Cannot copy argument as new type in ValidateArgumentValue_%s.", TOSTRING(arg_name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ umocktypes_free(GET_USED_ARGUMENT_TYPE(mock_call_data, arg_name, arg_type), (void*)temp); \ umockalloc_free(mock_call_data->C2(override_argument_type_, arg_name)); \ mock_call_data->C2(override_argument_type_, arg_name) = cloned_type_name; \ } \ } \ umockalloc_free(temp); \ } \ } \ } \ } \ return mock_call_modifier; \ } #define IMPLEMENT_MOCK_FUNCTION(function_prefix, args_ignored, return_type, name, ...) \ C2(mock_call_modifier_,name) UMOCK_STATIC C2(function_prefix,name)(IF(COUNT_ARG(__VA_ARGS__),,void) FOR_EACH_2_COUNTED(ARG_IN_SIGNATURE, __VA_ARGS__)) \ { \ UMOCKCALL_HANDLE mock_call; \ C2(mock_call_,name)* mock_call_data = (C2(mock_call_,name)*)umockalloc_malloc(sizeof(C2(mock_call_,name))); \ DECLARE_MOCK_CALL_MODIFIER(name) \ FOR_EACH_2(COPY_ARG_TO_MOCK_STRUCT, __VA_ARGS__) \ IF(args_ignored, FOR_EACH_2(MARK_ARG_AS_IGNORED, __VA_ARGS__), FOR_EACH_2(MARK_ARG_AS_NOT_IGNORED, __VA_ARGS__)) \ FOR_EACH_2_COUNTED(CLEAR_OUT_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2_COUNTED(CLEAR_VALIDATE_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2(CLEAR_VALIDATE_ARG_VALUE, __VA_ARGS__) \ FOR_EACH_2(CLEAR_OVERRIDE_ARGUMENT_TYPE, __VA_ARGS__) \ IF(IS_NOT_VOID(return_type), \ mock_call_data->return_value_set = RETURN_VALUE_NOT_SET; \ mock_call_data->captured_return_value = NULL; \ mock_call_data->fail_return_value_set = FAIL_RETURN_VALUE_NOT_SET; \ ,) \ mock_call = umockcall_create(#name, mock_call_data, C2(mock_call_data_copy_func_,name), C2(mock_call_data_free_func_,name), C2(mock_call_data_stringify_,name), C2(mock_call_data_are_equal_,name)); \ if (mock_call == NULL) \ { \ UMOCK_LOG("Failed creating mock call."); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ (void)umock_c_add_expected_call(mock_call); \ } \ return mock_call_modifier; \ } \ #define IMPLEMENT_STRICT_EXPECTED_MOCK(return_type, name, ...) \ IMPLEMENT_MOCK_FUNCTION(umock_c_strict_expected_, 0, return_type, name, __VA_ARGS__) #define IMPLEMENT_EXPECTED_MOCK(return_type, name, ...) \ IMPLEMENT_MOCK_FUNCTION(umock_c_expected_, 1, return_type, name, __VA_ARGS__) /* Codes_SRS_UMOCK_C_LIB_01_104: [The REGISTER_GLOBAL_MOCK_HOOK shall register a mock hook to be called every time the mocked function is called by production code.]*/ /* Codes_SRS_UMOCK_C_LIB_01_107: [If there are multiple invocations of REGISTER_GLOBAL_MOCK_HOOK, the last one shall take effect over the previous ones.] */ /* Codes_SRS_UMOCK_C_LIB_01_134: [ REGISTER_GLOBAL_MOCK_HOOK called with a NULL hook unregisters a previously registered hook. ]*/ #define IMPLEMENT_REGISTER_GLOBAL_MOCK_HOOK(return_type, name, ...) \ UMOCK_STATIC void C2(set_global_mock_hook_,name)(C2(mock_hook_func_type_, name) mock_return_hook) \ { \ C2(mock_hook_,name) = mock_return_hook; \ } \ /* Codes_SRS_UMOCK_C_LIB_01_108: [The REGISTER_GLOBAL_MOCK_RETURN shall register a return value to always be returned by a mock function.]*/ /* Codes_SRS_UMOCK_C_LIB_01_109: [If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURN, the last one shall take effect over the previous ones.]*/ /* Codes_SRS_UMOCK_C_LIB_01_141: [ If any error occurs during REGISTER_GLOBAL_MOCK_RETURN, umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ #define IMPLEMENT_REGISTER_GLOBAL_MOCK_RETURN(return_type, name, ...) \ IF(IS_NOT_VOID(return_type), UMOCK_STATIC void C2(set_global_mock_return_, name)(return_type return_value) \ { \ C2(mock_call_default_result_,name) = return_value; \ }, ) \ /* Codes_SRS_UMOCK_C_LIB_01_111: [The REGISTER_GLOBAL_MOCK_FAIL_RETURN shall register a fail return value to be returned by a mock function when marked as failed in the expected calls.]*/ /* Codes_SRS_UMOCK_C_LIB_01_112: [If there are multiple invocations of REGISTER_GLOBAL_FAIL_MOCK_RETURN, the last one shall take effect over the previous ones.]*/ /* Codes_SRS_UMOCK_C_LIB_01_142: [ If any error occurs during REGISTER_GLOBAL_MOCK_FAIL_RETURN, umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ #define IMPLEMENT_REGISTER_GLOBAL_MOCK_FAIL_RETURN(return_type, name, ...) \ IF(IS_NOT_VOID(return_type), UMOCK_STATIC void C2(set_global_mock_fail_return_, name)(return_type fail_return_value) \ { \ C2(mock_call_fail_result_,name) = fail_return_value; \ }, ) \ /* Codes_SRS_UMOCK_C_LIB_01_113: [The REGISTER_GLOBAL_MOCK_RETURNS shall register both a success and a fail return value associated with a mock function.]*/ /* Codes_SRS_UMOCK_C_LIB_01_114: [If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURNS, the last one shall take effect over the previous ones.]*/ /* Codes_SRS_UMOCK_C_LIB_01_143: [ If any error occurs during REGISTER_GLOBAL_MOCK_RETURNS, umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ #define IMPLEMENT_REGISTER_GLOBAL_MOCK_RETURNS(return_type, name, ...) \ IF(IS_NOT_VOID(return_type), UMOCK_STATIC void C2(set_global_mock_returns_, name)(return_type return_value, return_type fail_return_value) \ { \ C2(mock_call_default_result_,name) = return_value; \ C2(mock_call_fail_result_,name) = fail_return_value; \ }, ) \ #define DECLARE_VALIDATE_ONE_ARGUMENT_FUNC_TYPE(name) \ typedef struct C2(_mock_call_modifier_, name) (*C2(validate_one_argument_func_type_, name))(void); #define COPY_RETURN_VALUE(return_type, name) \ result = C2(mock_call_default_result_, name); typedef struct MOCK_CALL_ARG_METADATA_TAG { const char* type; const char* name; } MOCK_CALL_ARG_METADATA; typedef struct MOCK_CALL_METADATA_TAG { const char* return_type; const char* name; size_t arg_count; const MOCK_CALL_ARG_METADATA* args; } MOCK_CALL_METADATA; #define UNUSED_ARG(arg_type, arg_name) \ (void)arg_name; /* Codes_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_206: [ `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_207: [ `IGNORED_NUM_ARG` shall be defined to 0 so that it can be used for numeric type arguments. ]*/ #define AUTO_IGNORE_ARG(arg_type, arg_name) \ if (umockautoignoreargs_is_call_argument_ignored(call_as_string, arg_index++, &is_ignored) != 0) \ { \ UMOCK_LOG("Failed parsing argument %s value from the call.", TOSTRING(arg_name)); \ } \ else \ { \ if (is_ignored) \ { \ result.C2(IgnoreArgument_, arg_name)(); \ } \ } \ /* Codes_SRS_UMOCK_C_LIB_01_004: [If ENABLE_MOCKS is defined, MOCKABLE_FUNCTION shall generate the declaration of the function and code for the mocked function, thus allowing setting up of expectations in test functions.] */ /* Codes_SRS_UMOCK_C_LIB_01_014: [For each argument the argument value shall be stored for later comparison with actual calls.] */ /* Codes_SRS_UMOCK_C_LIB_01_017: [No arguments shall be saved by default, unless other modifiers state it.]*/ /* Codes_SRS_UMOCK_C_LIB_01_074: [When an expected call is recorded a call modifier interface in the form of a structure containing function pointers shall be returned to the caller.] */ /* Codes_SRS_UMOCK_C_LIB_01_075: [The last modifier in a chain overrides previous modifiers if any collision occurs.]*/ /* Codes_SRS_UMOCK_C_LIB_01_127: [ IgnoreAllArguments shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_126: [ ValidateAllArguments shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_125: [ IgnoreArgument_{arg_name} shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_124: [ ValidateArgument_{arg_name} shall only be available for mock functions that have arguments. **]*/ /* Codes_SRS_UMOCK_C_LIB_01_123: [ IgnoreArgument shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_122: [ ValidateArgument shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_121: [ SetReturn shall only be available if the return type is not void. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_120: [ SetFailReturn shall only be available if the return type is not void. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_119: [ CopyOutArgumentBuffer shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_128: [ CopyOutArgument shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_129: [ ValidateArgumentBuffer shall only be available for mock functions that have arguments. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_105: [The hook\92s result shall be returned by the mock to the production code.]*/ /* Codes_SRS_UMOCK_C_LIB_01_106: [The signature for the hook shall be assumed to have exactly the same arguments and return as the mocked function.]*/ /* Codes_SRS_UMOCK_C_LIB_01_135: [ All parameters passed to the mock shall be passed down to the mock hook. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_148: [ If call comparison fails an error shall be indicated by calling the error callback with UMOCK_C_COMPARE_CALL_ERROR. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_136: [ When multiple return values are set for a mock function by using different means (such as SetReturn), the following order shall be in effect: ]*/ /* Codes_SRS_UMOCK_C_LIB_01_137: [ - If a return value has been specified for an expected call then that value shall be returned. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_138: [ - If a global mock hook has been specified then it shall be called and its result returned. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_139: [ - If a global return value has been specified then it shall be returned. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_140: [ - Otherwise the value of a static variable of the same type as the return type shall be returned. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_188: [ The create call shall have a non-void return type. ]*/ #define MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK_NO_CODE(return_type, name, ...) \ typedef return_type (*C2(mock_hook_func_type_, name))(IF(COUNT_ARG(__VA_ARGS__),,void) FOR_EACH_2_COUNTED(ARG_IN_SIGNATURE, __VA_ARGS__)); \ static C2(mock_hook_func_type_,name) C2(mock_hook_,name) = NULL; \ static TRACK_CREATE_FUNC_TYPE C2(track_create_destroy_pair_malloc_,name) = NULL; \ static TRACK_DESTROY_FUNC_TYPE C2(track_create_destroy_pair_free_,name) = NULL; \ static PAIRED_HANDLES C2(paired_handles_,name); \ static PAIRED_HANDLES* C2(used_paired_handles_,name) = NULL; \ static const MOCK_CALL_ARG_METADATA C2(mock_call_args_metadata_,name)[IF(COUNT_ARG(__VA_ARGS__), DIV2(COUNT_ARG(__VA_ARGS__)), 1)] \ = { IF(COUNT_ARG(__VA_ARGS__),,NULL) FOR_EACH_2(FILL_ARG_IN_METADATA, __VA_ARGS__) }; \ static const MOCK_CALL_METADATA C2(mock_call_metadata_,name) = { TOSTRING(return_type), TOSTRING(name), DIV2(COUNT_ARG(__VA_ARGS__)), \ C2(mock_call_args_metadata_,name) }; \ struct C2(_mock_call_modifier_,name); \ IF(IS_NOT_VOID(return_type),typedef struct C2(_mock_call_modifier_,name) (*C2(set_return_func_type_,name))(return_type return_value); \ typedef struct C2(_mock_call_modifier_,name) (*C2(set_fail_return_func_type_,name))(return_type return_value); \ typedef struct C2(_mock_call_modifier_,name) (*C2(capture_return_func_type_,name))(return_type* captured_return_value);,) \ typedef struct C2(_mock_call_modifier_,name) (*C2(ignore_all_calls_func_type_,name))(void); \ IF(COUNT_ARG(__VA_ARGS__),typedef struct C2(_mock_call_modifier_,name) (*C2(ignore_all_arguments_func_type_,name))(void); \ typedef struct C2(_mock_call_modifier_,name) (*C2(validate_all_arguments_func_type_,name))(void); \ typedef struct C2(_mock_call_modifier_,name) (*C2(copy_out_argument_func_type_,name))(size_t arg_index, void* value); \ typedef struct C2(_mock_call_modifier_,name) (*C2(ignore_argument_func_type_,name))(size_t arg_index); \ typedef struct C2(_mock_call_modifier_,name) (*C2(validate_argument_func_type_,name))(size_t arg_index); \ typedef struct C2(_mock_call_modifier_,name) (*C2(validate_argument_buffer_func_type_,name))(size_t index, const void* bytes, size_t length); \ typedef struct C2(_mock_call_modifier_,name) (*C2(copy_out_argument_buffer_func_type_,name))(size_t index, const void* bytes, size_t length); \ FOR_EACH_2_KEEP_1(DECLARE_ARG_RELATED_FUNCTIONS, name, __VA_ARGS__),) \ typedef struct C2(_mock_call_modifier_,name) \ { \ C2(ignore_all_calls_func_type_,name) IgnoreAllCalls; \ IF(IS_NOT_VOID(return_type),C2(set_return_func_type_,name) SetReturn; \ C2(set_fail_return_func_type_,name) SetFailReturn; \ C2(capture_return_func_type_,name) CaptureReturn;,) \ IF(COUNT_ARG(__VA_ARGS__),C2(ignore_all_arguments_func_type_,name) IgnoreAllArguments; \ C2(validate_all_arguments_func_type_,name) ValidateAllArguments; \ C2(copy_out_argument_func_type_,name) CopyOutArgument; \ C2(ignore_argument_func_type_,name) IgnoreArgument; \ C2(validate_argument_func_type_,name) ValidateArgument; \ C2(validate_argument_buffer_func_type_,name) ValidateArgumentBuffer; \ C2(copy_out_argument_buffer_func_type_,name) CopyOutArgumentBuffer; \ FOR_EACH_2_KEEP_1(ARG_RELATED_FUNCTIONS_IN_MODIFIERS, name, __VA_ARGS__),) \ } C2(mock_call_modifier_,name); \ static C2(mock_call_modifier_,name) C2(ignore_all_calls_func_,name)(void); \ IF(IS_NOT_VOID(return_type),static C2(mock_call_modifier_,name) C2(set_return_func_,name)(return_type return_value); \ static C2(mock_call_modifier_,name) C2(set_fail_return_func_,name)(return_type return_value); \ static C2(mock_call_modifier_,name) C2(capture_return_func_,name)(return_type* captured_return_value);,) \ IF(COUNT_ARG(__VA_ARGS__),static C2(mock_call_modifier_,name) C2(ignore_all_arguments_func_,name)(void); \ static C2(mock_call_modifier_,name) C2(validate_all_arguments_func_,name)(void); \ static C2(mock_call_modifier_,name) C2(copy_out_argument_func_,name)(size_t arg_index, void* value); \ static C2(mock_call_modifier_,name) C2(ignore_argument_func_,name)(size_t arg_index); \ static C2(mock_call_modifier_,name) C2(validate_argument_func_,name)(size_t arg_index); \ static C2(mock_call_modifier_,name) C2(validate_argument_buffer_func_,name)(size_t index, const void* bytes, size_t length); \ static C2(mock_call_modifier_,name) C2(copy_out_argument_buffer_func_,name)(size_t index, const void* bytes, size_t length); \ FOR_EACH_2_KEEP_1(DECLARE_IGNORE_ARGUMENT_FUNCTION_PROTOTYPE, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(DECLARE_VALIDATE_ARGUMENT_FUNCTION_PROTOTYPE, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(DECLARE_COPY_OUT_ARGUMENT_BUFFER_FUNCTION_PROTOTYPE, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(DECLARE_VALIDATE_ARGUMENT_VALUE_FUNCTION_PROTOTYPE, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(DECLARE_VALIDATE_ARGUMENT_VALUE_AS_TYPE_FUNCTION_PROTOTYPE, name, __VA_ARGS__) \ typedef struct C2(_mock_call_modifier_,name) (*C2(ignore_one_argument_func_type_,name))(void);,) \ IF(COUNT_ARG(__VA_ARGS__), static const C2(ignore_one_argument_func_type_,name) C2(ignore_one_argument_array_,name)[] = \ {,) \ FOR_EACH_2_KEEP_1(IGNORE_ARGUMENT_FUNCTION_IN_ARRAY, name, __VA_ARGS__) \ IF(COUNT_ARG(__VA_ARGS__), }; \ DECLARE_VALIDATE_ONE_ARGUMENT_FUNC_TYPE(name) \ static const C2(validate_one_argument_func_type_,name) C2(validate_one_argument_array_,name)[] = \ {,) \ FOR_EACH_2_KEEP_1(VALIDATE_ARGUMENT_FUNCTION_IN_ARRAY, name, __VA_ARGS__) \ IF(COUNT_ARG(__VA_ARGS__),};,) \ static void C2(fill_mock_call_modifier_,name)(C2(mock_call_modifier_,name)* mock_call_modifier) \ { \ IF(IS_NOT_VOID(return_type),mock_call_modifier->SetReturn = C2(set_return_func_,name); \ mock_call_modifier->SetFailReturn = C2(set_fail_return_func_,name); \ mock_call_modifier->CaptureReturn = C2(capture_return_func_,name);,) \ IF(COUNT_ARG(__VA_ARGS__),mock_call_modifier->IgnoreAllArguments = C2(ignore_all_arguments_func_,name); \ mock_call_modifier->ValidateAllArguments = C2(validate_all_arguments_func_,name); \ mock_call_modifier->CopyOutArgument = C2(copy_out_argument_func_,name); \ mock_call_modifier->IgnoreArgument = C2(ignore_argument_func_,name); \ mock_call_modifier->ValidateArgument = C2(validate_argument_func_,name); \ mock_call_modifier->ValidateArgumentBuffer = C2(validate_argument_buffer_func_,name); \ mock_call_modifier->CopyOutArgumentBuffer = C2(copy_out_argument_buffer_func_,name); \ FOR_EACH_2_KEEP_1(COPY_IGNORE_ARG_BY_NAME_TO_MODIFIER, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(COPY_VALIDATE_ARG_BY_NAME_TO_MODIFIER, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(COPY_COPY_OUT_ARGUMENT_BUFFER_BY_NAME_TO_MODIFIER, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(COPY_VALIDATE_ARGUMENT_VALUE_BY_NAME_TO_MODIFIER, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(COPY_VALIDATE_ARGUMENT_VALUE_AS_TYPE_BY_NAME_TO_MODIFIER, name, __VA_ARGS__),) \ mock_call_modifier->IgnoreAllCalls = C2(ignore_all_calls_func_,name); \ } \ typedef struct C2(_mock_call_,name) \ { \ IF(IS_NOT_VOID(return_type),return_type return_value; \ return_type fail_return_value; \ return_type* captured_return_value;,) \ IF(COUNT_ARG(__VA_ARGS__), FOR_EACH_2(DECLARE_MOCK_CALL_STRUCT_STACK, __VA_ARGS__) \ FOR_EACH_2(DECLARE_OUT_ARG_BUFFER_FOR_ARG, __VA_ARGS__) \ ARG_BUFFER* out_arg_buffers[IF(COUNT_ARG(__VA_ARGS__), DIV2(COUNT_ARG(__VA_ARGS__)),1)]; \ ARG_BUFFER validate_arg_buffers[IF(COUNT_ARG(__VA_ARGS__), DIV2(COUNT_ARG(__VA_ARGS__)),1)]; \ FOR_EACH_2(DECLARE_VALIDATE_ARG_VALUE, __VA_ARGS__) \ FOR_EACH_2(DECLARE_IGNORE_FLAG_FOR_ARG, __VA_ARGS__) \ FOR_EACH_2(DECLARE_OVERRIDE_ARGUMENT_TYPE_FOR_ARG, __VA_ARGS__),) \ IF(IS_NOT_VOID(return_type),int fail_return_value_set : 1; \ int return_value_set : 1;,) \ IF(COUNT_ARG(__VA_ARGS__), , IF(IS_NOT_VOID(return_type),, int dummy : 1;)) \ } C2(mock_call_,name); \ typedef C2(mock_call_modifier_,name) (*C3(auto_ignore_args_function_,name,_type))(C2(mock_call_modifier_,name) call_modifier, const char* call_as_string); \ C2(mock_call_modifier_,name) UMOCK_STATIC C2(auto_ignore_args_function_,name)(C2(mock_call_modifier_,name) call_modifier, const char* call_as_string) \ { \ C2(mock_call_modifier_,name) result = call_modifier; \ IF(COUNT_ARG(__VA_ARGS__), \ int is_ignored; \ int arg_index = 1; ,) \ (void)call_as_string; \ FOR_EACH_2(AUTO_IGNORE_ARG, __VA_ARGS__) \ return result; \ } \ C3(auto_ignore_args_function_,name,_type) UMOCK_STATIC C2(get_auto_ignore_args_function_,name)(IF(COUNT_ARG(__VA_ARGS__),,void) FOR_EACH_2_COUNTED(ARG_IN_SIGNATURE, __VA_ARGS__)) \ { \ FOR_EACH_2(UNUSED_ARG, __VA_ARGS__) \ return C2(auto_ignore_args_function_,name); \ } \ UMOCK_STATIC char* C2(mock_call_data_stringify_,name)(void* mock_call_data) \ { \ char* result; \ IF(COUNT_ARG(__VA_ARGS__), C2(mock_call_,name)* typed_mock_call_data = (C2(mock_call_,name)*)mock_call_data;,) \ int is_error = 0; \ size_t args_string_length = 0; \ FOR_EACH_2_COUNTED(STRINGIFY_ARGS_DECLARE_RESULT_VAR, __VA_ARGS__) \ IF(COUNT_ARG(__VA_ARGS__),,(void)mock_call_data;) \ FOR_EACH_2(STRINGIFY_ARGS_CHECK_ARG_STRINGIFY_SUCCESS, __VA_ARGS__) \ (void)mock_call_data; \ if (is_error != 0) \ { \ result = NULL; \ } \ else \ { \ FOR_EACH_2(STRINGIFY_ARGS_DECLARE_ARG_STRING_LENGTH, __VA_ARGS__) \ FOR_EACH_2(STRINGIFY_ARGS_COUNT_LENGTH, __VA_ARGS__) \ IF(COUNT_ARG(__VA_ARGS__), args_string_length += COUNT_ARG(__VA_ARGS__) - 1;,) \ result = (char*)umockalloc_malloc(args_string_length + 1); \ if (result != NULL) \ { \ if (args_string_length == 0) \ { \ result[0] = '\0'; \ } \ else \ { \ IF(COUNT_ARG(__VA_ARGS__), \ size_t current_pos = 0; \ size_t arg_index = 0; \ FOR_EACH_2(STRINGIFY_ARGS_COPY_ARG_STRING, __VA_ARGS__), ) \ } \ } \ } \ FOR_EACH_2(STRINGIFY_ARGS_FREE_STRINGIFIED_ARG, __VA_ARGS__) \ return result; \ } \ UMOCK_STATIC int C2(mock_call_data_are_equal_,name)(void* left, void* right) \ { \ int result; \ if (left == right) \ { \ result = 1; \ } \ else if ((left == NULL) || (right == NULL)) \ { \ result = 0; \ } \ else \ { \ result = 1; \ IF(COUNT_ARG(__VA_ARGS__), \ { \ C2(mock_call_,name)* typed_left = (C2(mock_call_,name)*)left; \ C2(mock_call_,name)* typed_right = (C2(mock_call_,name)*)right; \ FOR_EACH_2_COUNTED(ARE_EQUAL_FOR_ARG, __VA_ARGS__) \ }, ) \ } \ return result; \ } \ UMOCK_STATIC void C2(mock_call_data_free_func_,name)(void* mock_call_data) \ { \ C2(mock_call_,name)* typed_mock_call_data = (C2(mock_call_,name)*)mock_call_data; \ FOR_EACH_2_COUNTED(FREE_ARG_VALUE, __VA_ARGS__) \ FOR_EACH_2_COUNTED(FREE_OUT_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2_COUNTED(FREE_VALIDATE_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2_COUNTED(FREE_OVERRIDE_ARGUMENT_TYPE, __VA_ARGS__) \ IF(IS_NOT_VOID(return_type),if (typed_mock_call_data->return_value_set == RETURN_VALUE_SET) \ { \ umocktypes_free(TOSTRING(return_type), (void*)&typed_mock_call_data->return_value); \ } \ if (typed_mock_call_data->fail_return_value_set == FAIL_RETURN_VALUE_SET) \ { \ umocktypes_free(TOSTRING(return_type), (void*)&typed_mock_call_data->fail_return_value); \ },) \ umockalloc_free(typed_mock_call_data); \ } \ UMOCK_STATIC void* C2(mock_call_data_copy_func_,name)(void* mock_call_data) \ { \ C2(mock_call_,name)* result = (C2(mock_call_,name)*)umockalloc_malloc(sizeof(C2(mock_call_,name))); \ IF(COUNT_ARG(__VA_ARGS__), C2(mock_call_,name)* typed_mock_call_data = (C2(mock_call_,name)*)mock_call_data;,) \ IF(IS_NOT_VOID(return_type), C2(mock_call_,name)* typed_mock_call_data_result = (C2(mock_call_,name)*)mock_call_data;,) \ (void)mock_call_data; \ FOR_EACH_2(COPY_IGNORE_ARG, __VA_ARGS__) \ FOR_EACH_2(COPY_ARG_VALUE, __VA_ARGS__) \ FOR_EACH_2_COUNTED(COPY_OUT_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2_COUNTED(COPY_VALIDATE_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2(COPY_VALIDATE_ARG_VALUE, __VA_ARGS__) \ FOR_EACH_2(COPY_OVERRIDE_ARGUMENT_TYPE, __VA_ARGS__) \ IF(IS_NOT_VOID(return_type), \ result->return_value_set = typed_mock_call_data_result->return_value_set; \ result->fail_return_value_set = typed_mock_call_data_result->fail_return_value_set; \ if (typed_mock_call_data_result->return_value_set == RETURN_VALUE_SET) \ { \ umocktypes_copy(TOSTRING(return_type), (void*)&result->return_value, (void*)&typed_mock_call_data_result->return_value); \ } \ result->captured_return_value = typed_mock_call_data_result->captured_return_value; \ if (typed_mock_call_data_result->fail_return_value_set == FAIL_RETURN_VALUE_SET) \ { \ umocktypes_copy(TOSTRING(return_type), (void*)&result->fail_return_value, (void*)&typed_mock_call_data_result->fail_return_value); \ },) \ return result; \ } \ IF(IS_NOT_VOID(return_type),static return_type C2(mock_call_default_result_,name); \ static return_type C2(mock_call_fail_result_,name); \ IMPLEMENT_SET_RETURN_FUNCTION(return_type, name, __VA_ARGS__) \ IMPLEMENT_SET_FAIL_RETURN_FUNCTION(return_type, name, __VA_ARGS__) \ IMPLEMENT_CAPTURE_RETURN_FUNCTION(return_type, name, __VA_ARGS__),) \ IF(COUNT_ARG(__VA_ARGS__),IMPLEMENT_IGNORE_ALL_ARGUMENTS_FUNCTION(return_type, name, __VA_ARGS__) \ IMPLEMENT_VALIDATE_ALL_ARGUMENTS_FUNCTION(return_type, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(IMPLEMENT_IGNORE_ARGUMENT_BY_NAME_FUNCTION, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(IMPLEMENT_VALIDATE_ARGUMENT_BY_NAME_FUNCTION, name, __VA_ARGS__) \ IMPLEMENT_IGNORE_ARGUMENT_FUNCTION(return_type, name, __VA_ARGS__) \ IMPLEMENT_VALIDATE_ARGUMENT_FUNCTION(return_type, name, __VA_ARGS__) \ IMPLEMENT_COPY_OUT_ARGUMENT_BUFFER_FUNCTION(return_type, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(IMPLEMENT_COPY_OUT_ARGUMENT_BUFFER_BY_NAME_FUNCTION, name, __VA_ARGS__) \ IMPLEMENT_COPY_OUT_ARGUMENT_FUNCTION(return_type, name, __VA_ARGS__) \ IMPLEMENT_VALIDATE_ARGUMENT_BUFFER_FUNCTION(return_type, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(IMPLEMENT_VALIDATE_ARGUMENT_VALUE_BY_NAME_FUNCTION, name, __VA_ARGS__) \ FOR_EACH_2_KEEP_1(IMPLEMENT_VALIDATE_ARGUMENT_VALUE_AS_TYPE_BY_NAME_FUNCTION, name, __VA_ARGS__),) \ IMPLEMENT_IGNORE_ALL_CALLS_FUNCTION(return_type, name, __VA_ARGS__) \ IMPLEMENT_REGISTER_GLOBAL_MOCK_HOOK(return_type, name, __VA_ARGS__) \ IMPLEMENT_REGISTER_GLOBAL_MOCK_RETURN(return_type, name, __VA_ARGS__) \ IMPLEMENT_REGISTER_GLOBAL_MOCK_FAIL_RETURN(return_type, name, __VA_ARGS__) \ IMPLEMENT_REGISTER_GLOBAL_MOCK_RETURNS(return_type, name, __VA_ARGS__) \ IMPLEMENT_STRICT_EXPECTED_MOCK(return_type, name, __VA_ARGS__) \ IMPLEMENT_EXPECTED_MOCK(return_type, name, __VA_ARGS__) \ /* Codes_SRS_UMOCK_C_LIB_01_193: [ When a destroy_call happens the memory block associated with the argument passed to it shall be freed. ] */ /* Codes_SRS_UMOCK_C_LIB_01_195: [ If any error occurs during the destroy_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_194: [ If the first argument passed to destroy_call is not found in the list of tracked handles (returned by create_call) then umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. ]*/ #define MOCKABLE_FUNCTION_BODY_WITHOUT_RETURN(modifiers, return_type, name, ...) \ UMOCK_STATIC return_type modifiers name(IF(COUNT_ARG(__VA_ARGS__),,void) FOR_EACH_2_COUNTED(ARG_IN_SIGNATURE, __VA_ARGS__)) \ { \ UMOCKCALL_HANDLE mock_call; \ UMOCKCALL_HANDLE matched_call; \ IF(IS_NOT_VOID(return_type), \ unsigned int result_value_set = 0; \ unsigned int fail_result_value_set = 0; \ void* captured_return_value = NULL;,) \ IF(IS_NOT_VOID(return_type),TRACK_CREATE_FUNC_TYPE track_create_destroy_pair_malloc_local = C2(track_create_destroy_pair_malloc_,name); \ PAIRED_HANDLES* used_paired_handles_local = C2(used_paired_handles_,name); \ const char* return_type_string = TOSTRING(return_type);,) \ IF(IS_NOT_VOID(return_type),return_type result = C2(mock_call_default_result_,name);,) \ C2(mock_call_,name)* matched_call_data; \ C2(mock_call_,name)* mock_call_data = (C2(mock_call_,name)*)umockalloc_malloc(sizeof(C2(mock_call_,name))); \ FOR_EACH_2(COPY_ARG_TO_MOCK_STRUCT, __VA_ARGS__) \ FOR_EACH_2(MARK_ARG_AS_NOT_IGNORED, __VA_ARGS__) \ FOR_EACH_2_COUNTED(CLEAR_OUT_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2_COUNTED(CLEAR_VALIDATE_ARG_BUFFERS, __VA_ARGS__) \ FOR_EACH_2(CLEAR_VALIDATE_ARG_VALUE, __VA_ARGS__) \ FOR_EACH_2(CLEAR_OVERRIDE_ARGUMENT_TYPE, __VA_ARGS__) \ IF(IS_NOT_VOID(return_type),mock_call_data->return_value_set = RETURN_VALUE_NOT_SET; \ mock_call_data->captured_return_value = NULL; \ mock_call_data->fail_return_value_set = FAIL_RETURN_VALUE_NOT_SET;,) \ mock_call = umockcall_create(#name, mock_call_data, C2(mock_call_data_copy_func_,name), C2(mock_call_data_free_func_,name), C2(mock_call_data_stringify_,name), C2(mock_call_data_are_equal_,name)); \ if (mock_call == NULL) \ { \ IF(IS_NOT_VOID(return_type),COPY_RETURN_VALUE(return_type, name),) \ UMOCK_LOG("Could not create a mock call in the actual call for %s.", TOSTRING(name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ else \ { \ if (umock_c_add_actual_call(mock_call, &matched_call) != 0) \ { \ umockcall_destroy(mock_call); \ UMOCK_LOG("Could not add an actual call for %s.", TOSTRING(name)); \ umock_c_indicate_error(UMOCK_C_COMPARE_CALL_ERROR); \ } \ if (matched_call != NULL) \ { \ matched_call_data = (C2(mock_call_,name)*)umockcall_get_call_data(matched_call); \ IF(IS_NOT_VOID(return_type),if (matched_call_data != NULL) \ { \ captured_return_value = (void*)matched_call_data->captured_return_value; \ if (umockcall_get_fail_call(matched_call)) \ { \ if (matched_call_data->fail_return_value_set == FAIL_RETURN_VALUE_SET) \ { \ result = matched_call_data->fail_return_value; \ } \ else \ { \ result = C2(mock_call_fail_result_, name); \ } \ result_value_set = 1; \ fail_result_value_set = 1; \ } \ else if (matched_call_data->return_value_set == RETURN_VALUE_SET) \ { \ result = matched_call_data->return_value; \ result_value_set = 1; \ } \ else \ { \ if (C2(mock_hook_, name) != NULL) \ { \ IF(IS_NOT_VOID(return_type),result =,) C2(mock_hook_, name)(FOR_EACH_2_COUNTED(ARG_NAME_ONLY_IN_CALL, __VA_ARGS__)); \ IF(IS_NOT_VOID(return_type),result_value_set = 1;,) \ } \ } \ }, \ if (C2(mock_hook_, name) != NULL) \ { \ C2(mock_hook_, name)(FOR_EACH_2_COUNTED(ARG_NAME_ONLY_IN_CALL, __VA_ARGS__)); \ } \ ) \ IF(COUNT_ARG(__VA_ARGS__), FOR_EACH_2_COUNTED(COPY_OUT_ARG_VALUE_FROM_MATCHED_CALL, __VA_ARGS__),) \ } \ else \ { \ if (C2(mock_hook_, name) != NULL) \ { \ IF(IS_NOT_VOID(return_type),result =,) C2(mock_hook_, name)(FOR_EACH_2_COUNTED(ARG_NAME_ONLY_IN_CALL, __VA_ARGS__)); \ IF(IS_NOT_VOID(return_type),result_value_set = 1;,) \ } \ } \ } \ IF(COUNT_ARG(__VA_ARGS__), if (C2(track_create_destroy_pair_free_, name) != NULL) \ { \ if (C2(track_create_destroy_pair_free_, name)(C2(used_paired_handles_, name), (void*)&ONLY_FIRST_ARG(__VA_ARGS__, 1)) != 0) \ { \ UMOCK_LOG("Could not track the destroy call for %s.", TOSTRING(name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ },) \ { /* Codes_SRS_UMOCK_C_LIB_01_188: [ The create call shall have a non-void return type. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_191: [ At each create_call a memory block shall be allocated so that it can be reported as a leak by any memory checker. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_192: [ If any error occurs during the create_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_204: [ Tracking of paired calls shall not be done if the actual call to the `create_call` is using the `SetFailReturn` call modifier. ]*/ #define MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK(modifiers, return_type, name, ...) \ MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK_NO_CODE(return_type, name, __VA_ARGS__) \ MOCKABLE_FUNCTION_BODY_WITHOUT_RETURN(modifiers, return_type, name, __VA_ARGS__) \ IF(IS_NOT_VOID(return_type), \ if (result_value_set == 0) \ { \ COPY_RETURN_VALUE(return_type, name) \ }; \ if (captured_return_value != NULL) \ { \ (void)memcpy(captured_return_value, (void*)&result, sizeof(result)); \ } \ if ((track_create_destroy_pair_malloc_local != NULL) && (fail_result_value_set == 0)) \ { \ if (track_create_destroy_pair_malloc_local(used_paired_handles_local, (const void*)&result, return_type_string, sizeof(result)) != 0) \ { \ UMOCK_LOG("Could not track the create call for %s.", TOSTRING(name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ } \ return result;,) \ } \ } \ /* Codes_SRS_UMOCK_C_LIB_01_150: [ MOCK_FUNCTION_WITH_CODE shall define a mock function and allow the user to embed code between this define and a MOCK_FUNCTION_END call. ]*/ #define MOCK_FUNCTION_WITH_CODE(modifiers, return_type, name, ...) \ MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK_NO_CODE(return_type, name, __VA_ARGS__) \ MOCKABLE_FUNCTION_BODY_WITHOUT_RETURN(modifiers, return_type, name, __VA_ARGS__) \ /* Codes_SRS_UMOCK_C_LIB_01_188: [ The create call shall have a non-void return type. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_191: [ At each create_call a memory block shall be allocated so that it can be reported as a leak by any memory checker. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_192: [ If any error occurs during the create_call related then umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_204: [ Tracking of paired calls shall not be done if the actual call to the `create_call` is using the `SetFailReturn` call modifier. ]*/ #define MOCK_FUNCTION_END(...) \ IF(COUNT_ARG(__VA_ARGS__), if (result_value_set == 0) \ { \ result = __VA_ARGS__; \ }; \ if (captured_return_value != NULL) \ { \ (void)memcpy(captured_return_value, (void*)&result, sizeof(result)); \ } \ if ((track_create_destroy_pair_malloc_local != NULL) && (fail_result_value_set == 0)) \ { \ if (track_create_destroy_pair_malloc_local(used_paired_handles_local, (const void*)&result, return_type_string, sizeof(result)) != 0) \ { \ UMOCK_LOG("Could not track the create call for %s.", TOSTRING(name)); \ umock_c_indicate_error(UMOCK_C_ERROR); \ } \ } \ return result;,) \ } \ } /* Codes_SRS_UMOCK_C_LIB_01_187: [ REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS shall register with umock two calls that are expected to be paired. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_190: [ If create_call or destroy_call do not obey these rules, at the time of calling REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_189: [ The destroy call shall take as argument at least one argument. The type of the first argument shall be of the same type as the return type for the create_call. ]*/ #define REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(create_call, destroy_call) \ if ((strcmp(C2(mock_call_metadata_,create_call).return_type, "void") == 0) || \ (C2(mock_call_metadata_,destroy_call).arg_count == 0) || \ (strcmp(C2(mock_call_metadata_,create_call).return_type, C2(mock_call_metadata_, destroy_call).args[0].type) != 0)) \ { \ umock_c_indicate_error(UMOCK_C_INVALID_PAIRED_CALLS); \ } \ else \ { \ C2(track_create_destroy_pair_malloc_, create_call) = umockcallpairs_track_create_paired_call; \ C2(track_create_destroy_pair_free_, destroy_call) = umockcallpairs_track_destroy_paired_call; \ C2(used_paired_handles_, create_call) = &C2(paired_handles_, create_call); \ C2(used_paired_handles_, destroy_call) = &C2(paired_handles_, create_call); \ } #ifdef __cplusplus } #endif #endif /* UMOCK_C_INTERNAL_H */ umock_c_negative_tests.h000066400000000000000000000013011362133436400403140ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCK_C_NEGATIVE_TESTS_H #define UMOCK_C_NEGATIVE_TESTS_H #ifdef __cplusplus #include extern "C" { #else #include #endif extern int umock_c_negative_tests_init(void); extern void umock_c_negative_tests_deinit(void); extern void umock_c_negative_tests_snapshot(void); extern void umock_c_negative_tests_reset(void); extern void umock_c_negative_tests_fail_call(size_t index); extern size_t umock_c_negative_tests_call_count(void); #ifdef __cplusplus } #endif #endif /* UMOCK_C_NEGATIVE_TESTS_H */ umock_c_prod.h000066400000000000000000000042721362133436400362460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #undef MOCKABLE_FUNCTION /* This header is meant to be included by production code headers, so that the MOCKABLE_FUNCTION gets enabled. */ /* If you are porting to a new platform and do not want to build the tests, but only the production code, simply make sure that this file is in the include path (either by copying it to your inc folder or by adjusting the include paths). */ #ifdef ENABLE_MOCKS #ifdef ENABLE_MOCK_FILTERING #define ENABLE_MOCK_FILTERING_SWITCH 1 #else #define ENABLE_MOCK_FILTERING_SWITCH 0 #endif #include "macro_utils.h" #define UMOCK_C_PROD_ARG_IN_SIGNATURE(count, arg_type, arg_name) arg_type arg_name IFCOMMA(count) #define MOCKABLE_FUNCTION_DISABLED(modifiers, result, function, ...) \ result modifiers function(IF(COUNT_ARG(__VA_ARGS__), , void) FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)); /* Codes_SRS_UMOCK_C_LIB_01_001: [MOCKABLE_FUNCTION shall be used to wrap function definition allowing the user to declare a function that can be mocked.]*/ #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ IF(ENABLE_MOCK_FILTERING_SWITCH,IF(C2(please_mock_, function),MOCKABLE_FUNCTION_DISABLED,MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK), MOCKABLE_FUNCTION_UMOCK_INTERNAL_WITH_MOCK) (modifiers, result, function, __VA_ARGS__) #include "umock_c.h" #else #include "macro_utils.h" #define UMOCK_C_PROD_ARG_IN_SIGNATURE(count, arg_type, arg_name) arg_type arg_name IFCOMMA(count) /* Codes_SRS_UMOCK_C_LIB_01_002: [The macro shall generate a function signature in case ENABLE_MOCKS is not defined.] */ /* Codes_SRS_UMOCK_C_LIB_01_005: [**If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function.] */ /* Codes_SRS_UMOCK_C_LIB_01_001: [MOCKABLE_FUNCTION shall be used to wrap function definition allowing the user to declare a function that can be mocked.]*/ #define MOCKABLE_FUNCTION(modifiers, result, function, ...) \ result modifiers function(IF(COUNT_ARG(__VA_ARGS__),,void) FOR_EACH_2_COUNTED(UMOCK_C_PROD_ARG_IN_SIGNATURE, __VA_ARGS__)); #endif umock_log.h000066400000000000000000000005171362133436400355570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCK_LOG_H #define UMOCK_LOG_H #ifdef __cplusplus extern "C" { #endif void UMOCK_LOG(const char* format, ...); #ifdef __cplusplus } #endif #endif /* UMOCK_LOG_H */ umockalloc.h000066400000000000000000000010471362133436400357300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKALLOC_H #define UMOCKALLOC_H #ifdef __cplusplus extern "C" { #include #else #include #endif extern void* umockalloc_malloc(size_t size); extern void* umockalloc_realloc(void* ptr, size_t size); extern void umockalloc_free(void* ptr); extern char* umockc_stringify_buffer(const void* bytes, size_t length); #ifdef __cplusplus } #endif #endif /* UMOCKALLOC_H */ umockautoignoreargs.h000066400000000000000000000007471362133436400376750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKAUTOIGNOREARGS_H #define UMOCKAUTOIGNOREARGS_H #ifdef __cplusplus extern "C" { #include #else #include #endif extern int umockautoignoreargs_is_call_argument_ignored(const char* call, size_t argument_index, int* is_argument_ignored); #ifdef __cplusplus } #endif #endif /* UMOCKAUTOIGNOREARGS_H */ umockcall.h000066400000000000000000000031551362133436400355530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKCALL_H #define UMOCKCALL_H #ifdef __cplusplus #include extern "C" { #else #include #endif typedef struct UMOCKCALL_TAG* UMOCKCALL_HANDLE; typedef void*(*UMOCKCALL_DATA_COPY_FUNC)(void* umockcall_data); typedef void(*UMOCKCALL_DATA_FREE_FUNC)(void* umockcall_data); typedef char*(*UMOCKCALL_DATA_STRINGIFY_FUNC)(void* umockcall_data); typedef int(*UMOCKCALL_DATA_ARE_EQUAL_FUNC)(void* left, void* right); extern UMOCKCALL_HANDLE umockcall_create(const char* function_name, void* umockcall_data, UMOCKCALL_DATA_COPY_FUNC umockcall_data_copy, UMOCKCALL_DATA_FREE_FUNC umockcall_data_free, UMOCKCALL_DATA_STRINGIFY_FUNC umockcall_data_stringify, UMOCKCALL_DATA_ARE_EQUAL_FUNC umockcall_data_are_equal); extern void umockcall_destroy(UMOCKCALL_HANDLE umockcall); extern int umockcall_are_equal(UMOCKCALL_HANDLE left, UMOCKCALL_HANDLE right); extern char* umockcall_stringify(UMOCKCALL_HANDLE umockcall); extern void* umockcall_get_call_data(UMOCKCALL_HANDLE umockcall); extern UMOCKCALL_HANDLE umockcall_clone(UMOCKCALL_HANDLE umockcall); extern int umockcall_set_fail_call(UMOCKCALL_HANDLE umockcall, int fail_call); extern int umockcall_get_fail_call(UMOCKCALL_HANDLE umockcall); extern int umockcall_set_ignore_all_calls(UMOCKCALL_HANDLE umockcall, int ignore_all_calls); extern int umockcall_get_ignore_all_calls(UMOCKCALL_HANDLE umockcall); #ifdef __cplusplus } #endif #endif /* UMOCKCALL_H */ umockcallpairs.h000066400000000000000000000014751362133436400366150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKCALLPAIRS_H #define UMOCKCALLPAIRS_H #ifdef __cplusplus #include extern "C" { #else #include #endif typedef struct PAIRED_HANDLE_TAG { void* handle_value; char* handle_type; } PAIRED_HANDLE; typedef struct PAIRED_HANDLES_TAG { PAIRED_HANDLE* paired_handles; size_t paired_handle_count; } PAIRED_HANDLES; extern int umockcallpairs_track_create_paired_call(PAIRED_HANDLES* paired_handles, const void* handle, const char* handle_type, size_t handle_type_size); extern int umockcallpairs_track_destroy_paired_call(PAIRED_HANDLES* paired_handles, const void* handle); #ifdef __cplusplus } #endif #endif /* UMOCKCALLPAIRS_H */ umockcallrecorder.h000066400000000000000000000031141362133436400372740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKCALLRECORDER_H #define UMOCKCALLRECORDER_H #include "umockcall.h" #ifdef __cplusplus extern "C" { #endif typedef struct UMOCKCALLRECORDER_TAG* UMOCKCALLRECORDER_HANDLE; extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void); extern void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call); extern int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call); extern const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder); extern int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count); extern int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index); #ifdef __cplusplus } #endif #endif /* UMOCKCALLRECORDER_H */ umockstring.h000066400000000000000000000005321362133436400361420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKSTRING_H #define UMOCKSTRING_H #ifdef __cplusplus extern "C" { #endif extern char* umockstring_clone(const char* source); #ifdef __cplusplus } #endif #endif /* UMOCKSTRING_H */ umocktypename.h000066400000000000000000000005511362133436400364570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKTYPENAME_H #define UMOCKTYPENAME_H #ifdef __cplusplus extern "C" { #endif extern char* umocktypename_normalize(const char* type_name); #ifdef __cplusplus } #endif #endif /* UMOCKTYPENAME_H */ umocktypes.h000066400000000000000000000112231362133436400357770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKTYPES_H #define UMOCKTYPES_H #ifdef __cplusplus #include extern "C" { #else #include #endif #include "umockalloc.h" typedef char*(*UMOCKTYPE_STRINGIFY_FUNC)(const void* value); typedef int(*UMOCKTYPE_COPY_FUNC)(void* destination, const void* source); typedef void(*UMOCKTYPE_FREE_FUNC)(void* value); typedef int(*UMOCKTYPE_ARE_EQUAL_FUNC)(const void* left, const void* right); extern int umocktypes_init(void); extern void umocktypes_deinit(void); extern int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func); extern int umocktypes_register_alias_type(const char* type, const char* alias_type); extern char* umocktypes_stringify(const char* type, const void* value); extern int umocktypes_are_equal(const char* type, const void* left, const void* right); extern int umocktypes_copy(const char* type, void* destination, const void* source); extern void umocktypes_free(const char* type, void* value); /* This is a convenience macro that allows registering a type by simply specifying the name and a function_postfix*/ #define REGISTER_TYPE(type, function_postfix) \ umocktypes_register_type(TOSTRING(type), (UMOCKTYPE_STRINGIFY_FUNC)C2(umocktypes_stringify_, function_postfix), \ (UMOCKTYPE_ARE_EQUAL_FUNC)C2(umocktypes_are_equal_,function_postfix), \ (UMOCKTYPE_COPY_FUNC)C2(umocktypes_copy_,function_postfix), \ (UMOCKTYPE_FREE_FUNC)C2(umocktypes_free_,function_postfix)) /* Codes_SRS_UMOCK_C_LIB_01_181: [ If a value that is not part of the enum is used, it shall be treated as an int value. ]*/ #define IMPLEMENT_UMOCK_C_ENUM_STRINGIFY(type, ...) \ UMOCK_STATIC char* C2(umocktypes_stringify_,type)(const type* value) \ { \ char* result; \ static const char *C2(enum_name,_strings)[]= \ { \ FOR_EACH_1(DEFINE_ENUMERATION_CONSTANT_AS_STRING, __VA_ARGS__) \ }; \ if (value == NULL) \ { \ result = NULL; \ } \ else \ { \ if ((int)*value < (int)(sizeof(C2(enum_name,_strings)) / sizeof(C2(enum_name,_strings)[0]))) \ { \ size_t length = strlen(C2(enum_name_, strings)[*value]); \ if (length == 0) \ { \ result = NULL; \ } \ else \ { \ result = (char*)umockalloc_malloc(length + 1); \ if (result != NULL) \ { \ (void)memcpy(result, C2(enum_name_, strings)[*value], length + 1); \ } \ } \ } \ else \ { \ result = (char*)umockalloc_malloc(64); \ if (result != NULL) \ { \ (void)sprintf(result, "%d", (int)*value); \ } \ } \ } \ return result; \ } #define IMPLEMENT_UMOCK_C_ENUM_ARE_EQUAL(type) \ UMOCK_STATIC int C2(umocktypes_are_equal_,type)(const type* left, const type* right) \ { \ int result; \ if ((left == NULL) || (right == NULL)) \ { \ result = -1; \ } \ else \ { \ result = ((*left) == (*right)) ? 1 : 0; \ } \ return result; \ } #define IMPLEMENT_UMOCK_C_ENUM_COPY(type) \ UMOCK_STATIC int C2(umocktypes_copy_,type)(type* destination, const type* source) \ { \ int result; \ if ((destination == NULL) || \ (source == NULL)) \ { \ result = __LINE__; \ } \ else \ { \ *destination = *source; \ result = 0; \ } \ return result; \ } #define IMPLEMENT_UMOCK_C_ENUM_FREE(type) \ UMOCK_STATIC void C2(umocktypes_free_,type)(type* value) \ { \ (void)value; \ } /* Codes_SRS_UMOCK_C_LIB_01_179: [ IMPLEMENT_UMOCK_C_ENUM_TYPE shall implement umock_c handlers for an enum type. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_180: [ The variable arguments are a list making up the enum values. ]*/ #define IMPLEMENT_UMOCK_C_ENUM_TYPE(type, ...) \ IMPLEMENT_UMOCK_C_ENUM_STRINGIFY(type, __VA_ARGS__) \ IMPLEMENT_UMOCK_C_ENUM_ARE_EQUAL(type) \ IMPLEMENT_UMOCK_C_ENUM_COPY(type) \ IMPLEMENT_UMOCK_C_ENUM_FREE(type) #ifdef __cplusplus } #endif #endif /* UMOCKTYPES_H */ umocktypes_bool.h000066400000000000000000000012601362133436400370120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKTYPES_BOOL_H #define UMOCKTYPES_BOOL_H #include "macro_utils.h" #ifdef __cplusplus extern "C" { #else #include #endif extern int umocktypes_bool_register_types(void); extern char* umocktypes_stringify_bool(const bool* value); \ extern int umocktypes_are_equal_bool(const bool* left, const bool* right); \ extern int umocktypes_copy_bool(bool* destination, const bool* source); \ extern void umocktypes_free_bool(bool* value); #ifdef __cplusplus } #endif #endif /* UMOCKTYPES_BOOL_H */ umocktypes_c.h000066400000000000000000000025221362133436400363030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKTYPES_C_H #define UMOCKTYPES_C_H #include "macro_utils.h" #ifdef __cplusplus extern "C" { #endif extern int umocktypes_c_register_types(void); #define UMOCKTYPES_HANDLERS(type, function_postfix) \ extern char* C2(umocktypes_stringify_,function_postfix)(type* value); \ extern int C2(umocktypes_are_equal_, function_postfix)(type* left, type* right); \ extern int C2(umocktypes_copy_, function_postfix)(type* destination, type* source); \ extern void C2(umocktypes_free_, function_postfix)(type* value); UMOCKTYPES_HANDLERS(char, char) UMOCKTYPES_HANDLERS(unsigned char, unsignedchar) UMOCKTYPES_HANDLERS(short, short) UMOCKTYPES_HANDLERS(unsigned short, unsignedshort) UMOCKTYPES_HANDLERS(int, int) UMOCKTYPES_HANDLERS(unsigned int, unsignedint) UMOCKTYPES_HANDLERS(long, long) UMOCKTYPES_HANDLERS(unsigned long, unsignedlong) UMOCKTYPES_HANDLERS(long long, longlong) UMOCKTYPES_HANDLERS(unsigned long long, unsignedlonglong) UMOCKTYPES_HANDLERS(float, float) UMOCKTYPES_HANDLERS(double, double) UMOCKTYPES_HANDLERS(long double, longdouble) UMOCKTYPES_HANDLERS(size_t, size_t) UMOCKTYPES_HANDLERS(void*, void_ptr) #ifdef __cplusplus } #endif #endif /* UMOCKTYPES_C_H */ umocktypes_charptr.h000066400000000000000000000022571362133436400375310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKTYPES_CHARPTR_H #define UMOCKTYPES_CHARPTR_H #ifdef __cplusplus extern "C" { #endif /* Codes_SRS_UMOCK_C_LIB_01_067: [char\* and const char\* shall be supported out of the box through a separate header, umockvalue_charptr.h.]*/ /* Codes_SRS_UMOCK_C_LIB_01_069: [The signature shall be: ...*/ extern int umocktypes_charptr_register_types(void); extern char* umocktypes_stringify_charptr(const char** value); extern int umocktypes_are_equal_charptr(const char** left, const char** right); extern int umocktypes_copy_charptr(char** destination, const char** source); extern void umocktypes_free_charptr(char** value); extern char* umocktypes_stringify_const_charptr(const char** value); extern int umocktypes_are_equal_const_charptr(const char** left, const char** right); extern int umocktypes_copy_const_charptr(const char** destination, const char** source); extern void umocktypes_free_const_charptr(const char** value); #ifdef __cplusplus } #endif #endif /* UMOCKTYPES_CHARPTR_H */ umocktypes_stdint.h000066400000000000000000000022421362133436400373650ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/inc// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef UMOCKTYPES_STDINT_H #define UMOCKTYPES_STDINT_H #include "macro_utils.h" #ifdef __cplusplus #include extern "C" { #else #include #endif extern int umocktypes_stdint_register_types(void); #define UMOCKTYPES_STDINT_HANDLERS(type, function_postfix) \ extern char* C2(umocktypes_stringify_,function_postfix)(type* value); \ extern int C2(umocktypes_are_equal_, function_postfix)(type* left, type* right); \ extern int C2(umocktypes_copy_, function_postfix)(type* destination, type* source); \ extern void C2(umocktypes_free_, function_postfix)(type* value); UMOCKTYPES_STDINT_HANDLERS(uint8_t, uint8_t) UMOCKTYPES_STDINT_HANDLERS(int8_t, int8_t) UMOCKTYPES_STDINT_HANDLERS(uint16_t, uint16_t) UMOCKTYPES_STDINT_HANDLERS(int16_t, int16_t) UMOCKTYPES_STDINT_HANDLERS(uint32_t, uint32_t) UMOCKTYPES_STDINT_HANDLERS(int32_t, int32_t) UMOCKTYPES_STDINT_HANDLERS(uint64_t, uint64_t) UMOCKTYPES_STDINT_HANDLERS(int64_t, int64_t) #ifdef __cplusplus } #endif #endif /* UMOCKTYPES_STDINT_H */ jenkins/000077500000000000000000000000001362133436400343145ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-clinux_c_gcc44.sh000066400000000000000000000007441362133436400373020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) log_dir=$build_root build_folder=$build_root"/cmake" rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON -Drun_unittests:bool=ON -Drun_int_tests:bool=ON make --jobs=$(nproc) popd osx_c.sh000066400000000000000000000010441362133436400357620ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) build_folder=$build_root"/cmake" CORES=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_unittests:bool=ON -Drun_int_tests:bool=ON cmake --build . -- --jobs=$CORES ctest -C "debug" -V popd ubuntu_clang.sh000066400000000000000000000010071362133436400373340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/jenkins#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. # set -e script_dir=$(cd "$(dirname "$0")" && pwd) build_root=$(cd "${script_dir}/.." && pwd) log_dir=$build_root build_folder=$build_root"/cmake" rm -r -f $build_folder mkdir -p $build_folder pushd $build_folder cmake .. -Drun_valgrind:BOOL=ON -Drun_unittests:bool=ON -Drun_int_tests:bool=ON cmake --build . -- --jobs=$(nproc) ctest -C "debug" -V popd :windows_c.cmd000066400000000000000000000031321362133436400367740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. setlocal set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi rmdir /s /q %build-root%\cmake mkdir %build-root%\cmake if errorlevel 1 goto :eof set build-platform=Win32 :args-loop if "%1" equ "" goto args-done if "%1" equ "--platform" goto arg-build-platform call :usage && exit /b 1 :arg-build-platform shift if "%1" equ "" call :usage && exit /b 1 set build-platform=%1 if %build-platform% == x64 ( set CMAKE_DIR=shared-util_x64 ) else if %build-platform% == arm ( set CMAKE_DIR=shared-util_arm ) goto args-continue :args-continue shift goto args-loop :args-done cd %build-root%\cmake if %build-platform% == Win32 ( echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=ON if errorlevel 1 goto :eof ) else if %build-platform% == ARM ( echo ***Running CMAKE for ARM*** cmake %build-root% -G "Visual Studio 14 ARM" -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=ON if errorlevel 1 goto :eof ) else ( echo ***Running CMAKE for Win64*** cmake %build-root% -G "Visual Studio 14 Win64" -Drun_unittests:bool=ON -Drun_int_tests:bool=ON -Duse_cppunittest:bool=ON if errorlevel 1 goto :eof ) msbuild /m umock_c.sln /p:Configuration=Release if errorlevel 1 goto :eof msbuild /m umock_c.sln /p:Configuration=Debug if errorlevel 1 goto :eof ctest -C "Debug" -V if errorlevel 1 goto :eof cd %build-root%windows_vs2008_c.cmd000066400000000000000000000034321362133436400400210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi @echo off set repo_root=%build-root%\.. rem // resolve to fully qualified path for %%i in ("%repo_root%") do set repo_root=%%~fi echo Build Root: %build-root% echo Repo Root: %repo_root% set CMAKE_DIR=umockc_win32 rem ----------------------------------------------------------------------------- rem -- build with CMAKE and run tests rem ----------------------------------------------------------------------------- echo CMAKE Output Path: %build-root%\cmake\%CMAKE_DIR% if EXIST %build-root%\cmake\%CMAKE_DIR% ( rmdir /s/q %build-root%\cmake\%CMAKE_DIR% rem no error checking ) echo %build-root%\cmake\%CMAKE_DIR% mkdir %build-root%\cmake\%CMAKE_DIR% rem no error checking pushd %build-root%\cmake\%CMAKE_DIR% echo ***Running CMAKE for Win32*** cmake %build-root% -Drun_unittests:BOOL=ON if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! call :_run-msbuild "Build" umock_c.sln if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ctest -C "debug" -V if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! popd goto :eof rem ----------------------------------------------------------------------------- rem -- subroutines rem ----------------------------------------------------------------------------- :_run-msbuild rem // optionally override configuration|platform setlocal EnableExtensions set build-target= if "%~1" neq "Build" set "build-target=/t:%~1" msbuild /m %build-target% "/p:Configuration=Debug;Platform=Win32" %2 if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof echo done windowsce_c.cmd000066400000000000000000000024571362133436400373150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/jenkins@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion set build-root=%~dp0.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi rem ----------------------------------------------------------------------------- rem -- build solution with CMake rem ----------------------------------------------------------------------------- rmdir /s/q "%USERPROFILE%\cmake_ce8" rem no error checking mkdir "%USERPROFILE%\cmake_ce8" rem no error checking pushd "%USERPROFILE%\cmake_ce8" rem if you plan to use a different SDK you need to change SDKNAME to the name of your SDK. Ensure that this is also changed in the sample solutions iothub_client_sample_http, simplesample_http and remote_monitoring set SDKNAME=TORADEX_CE800 set PROCESSOR=arm cmake -Drun_unittests:bool=ON -Duse_cppunittests:bool=OFF -DWINCE=TRUE -DCMAKE_SYSTEM_NAME=WindowsCE -DCMAKE_SYSTEM_VERSION=8.0 -DCMAKE_SYSTEM_PROCESSOR=%PROCESSOR% -DCMAKE_GENERATOR_TOOLSET=CE800 -DCMAKE_GENERATOR_PLATFORM=%SDKNAME% %build-root% if not %errorlevel%==0 exit /b %errorlevel% msbuild "%USERPROFILE%\cmake_ce8\umock_c.sln if not %errorlevel%==0 exit /b %errorlevel% cd %build-root% readme.md000066400000000000000000000042541362133436400344370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-cThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. # umock_c umock_c is a C mocking library. ## Setup ### Build - Clone umock_c by: ``` git clone --recursive https://github.com/Azure/umock-c.git ``` - Create a cmake folder under the root of umock-c - Switch to the cmake folder and run ``` cmake .. ``` If you would like to use installed (by CMake) versions of packages already on your machine: ``` cmake -Duse_installed=ON ../ ``` - Build the code for your platform (msbuild for Windows, make for Linux, etc.) by executing in the cmake folder: ``` cmake --build . ``` ### To install umock_c: ``` cmake -Duse_installed=ON ../ ``` On Linux: ``` sudo make install ``` On Windows: ``` msbuild /m INSTALL.vcxproj ``` _This requires that ctest and testrunnerswitcher are both installed (through CMake) on your machine._ ### Building tests In order to build the tests use the *run_unittests* cmake option: ``` cmake .. -Drun_unittests:bool=ON ``` ## Example Ever wanted to write something like this in C as a test? ```c TEST_FUNCTION(my_first_test) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(44) .IgnoreAllArguments(); // act int result = function_under_test(); // assert ASSERT_ARE_EQUAL(int, 44, result); ASSERT_ARE_EQUAL(char_ptr, umock_c_get_expected_calls(), umock_c_get_actual_calls()); } ``` umock_c has way more features than this simple example! ## Dependencies - umock_c uses ctest as test runner (https://github.com/Azure/azure-ctest.git). ctest is a C test runner that can be run on many platforms as it does not make use of compiler/platform specific code and thus it is easily portable. - umock_c uses cmake (https://cmake.org/) to generate build files. - umock_c uses testrunnerswitcher to allow switching between ctest and CppUnitTest for Windows. ## Documentation Complete documentation is available [here](doc/umock_c.md). azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src/000077500000000000000000000000001362133436400335215ustar00rootroot00000000000000umock_c.c000066400000000000000000000264411362133436400352350ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "umock_c.h" #include "umockcall.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "umockcallrecorder.h" #include "umock_log.h" typedef enum UMOCK_C_STATE_TAG { UMOCK_C_STATE_NOT_INITIALIZED, UMOCK_C_STATE_INITIALIZED } UMOCK_C_STATE; static ON_UMOCK_C_ERROR on_umock_c_error_function; static UMOCK_C_STATE umock_c_state = UMOCK_C_STATE_NOT_INITIALIZED; static UMOCKCALLRECORDER_HANDLE umock_call_recorder = NULL; int umock_c_init(ON_UMOCK_C_ERROR on_umock_c_error) { int result; if (umock_c_state != UMOCK_C_STATE_NOT_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_007: [ umock_c_init when umock is already initialized shall fail and return a non-zero value. ]*/ UMOCK_LOG("umock_c: umock_c already initialized."); result = __LINE__; } else { /* Codes_SRS_UMOCK_C_LIB_01_144: [ Out of the box umock_c shall support the following types through the header umocktypes_c.h: ]*/ /* Codes_SRS_UMOCK_C_LIB_01_028: [**char**] */ /* Codes_SRS_UMOCK_C_LIB_01_029 : [**unsigned char**] */ /* Codes_SRS_UMOCK_C_LIB_01_030 : [**short**] */ /* Codes_SRS_UMOCK_C_LIB_01_031 : [**unsigned short**] */ /* Codes_SRS_UMOCK_C_LIB_01_032 : [**int**] */ /* Codes_SRS_UMOCK_C_LIB_01_033 : [**unsigned int**] */ /* Codes_SRS_UMOCK_C_LIB_01_034 : [**long**] */ /* Codes_SRS_UMOCK_C_LIB_01_035 : [**unsigned long**] */ /* Codes_SRS_UMOCK_C_LIB_01_036 : [**long long**] */ /* Codes_SRS_UMOCK_C_LIB_01_037 : [**unsigned long long**] */ /* Codes_SRS_UMOCK_C_LIB_01_038 : [**float**] */ /* Codes_SRS_UMOCK_C_LIB_01_039 : [**double**] */ /* Codes_SRS_UMOCK_C_LIB_01_040 : [**long double**] */ /* Codes_SRS_UMOCK_C_LIB_01_041 : [**size_t**] */ /* Codes_SRS_UMOCK_C_LIB_01_151: [ void\* ]*/ /* Codes_SRS_UMOCK_C_LIB_01_152: [ const void\* ]*/ /* Codes_SRS_UMOCK_C_01_023: [ umock_c_init shall initialize the umock types by calling umocktypes_init. ]*/ if ((umocktypes_init() != 0) || /* Codes_SRS_UMOCK_C_01_002: [ umock_c_init shall register the C naive types by calling umocktypes_c_register_types. ]*/ (umocktypes_c_register_types() != 0)) { /* Codes_SRS_UMOCK_C_01_005: [ If any of the calls fails, umock_c_init shall fail and return a non-zero value. ]*/ UMOCK_LOG("umock_c: Could not register standard C types with umock_c."); result = __LINE__; } else { /* Codes_SRS_UMOCK_C_01_003: [ umock_c_init shall create a call recorder by calling umockcallrecorder_create. ]*/ umock_call_recorder = umockcallrecorder_create(); if (umock_call_recorder == NULL) { /* Codes_SRS_UMOCK_C_01_005: [ If any of the calls fails, umock_c_init shall fail and return a non-zero value. ]*/ UMOCK_LOG("umock_c: Could not create the call recorder."); result = __LINE__; } else { /* Codes_SRS_UMOCK_C_01_024: [ on_umock_c_error shall be optional. ]*/ /* Codes_SRS_UMOCK_C_01_006: [ The on_umock_c_error callback shall be stored to be used for later error callbacks. ]*/ on_umock_c_error_function = on_umock_c_error; /* Codes_SRS_UMOCK_C_01_001: [umock_c_init shall initialize the umock library.] */ umock_c_state = UMOCK_C_STATE_INITIALIZED; /* Codes_SRS_UMOCK_C_01_004: [ On success, umock_c_init shall return 0. ]*/ result = 0; } } } return result; } void umock_c_deinit(void) { /* Codes_SRS_UMOCK_C_LIB_01_012: [If umock_c was not initialized, umock_c_deinit shall do nothing.] */ /* Codes_SRS_UMOCK_C_01_010: [ If the module is not initialized, umock_c_deinit shall do nothing. ] */ if (umock_c_state == UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_009: [ umock_c_deinit shall free the call recorder created in umock_c_init. ]*/ umockcallrecorder_destroy(umock_call_recorder); umock_c_state = UMOCK_C_STATE_NOT_INITIALIZED; /* Codes_SRS_UMOCK_C_01_008: [ umock_c_deinit shall deinitialize the umock types by calling umocktypes_deinit. ]*/ umocktypes_deinit(); } } void umock_c_reset_all_calls(void) { /* Codes_SRS_UMOCK_C_01_012: [ If the module is not initialized, umock_c_reset_all_calls shall do nothing. ]*/ if (umock_c_state == UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_011: [ umock_c_reset_all_calls shall reset all calls by calling umockcallrecorder_reset_all_calls on the call recorder created in umock_c_init. ]*/ if (umockcallrecorder_reset_all_calls(umock_call_recorder) != 0) { /* Codes_SRS_UMOCK_C_01_025: [ If the underlying umockcallrecorder_reset_all_calls fails, the on_umock_c_error callback shall be triggered with UMOCK_C_RESET_CALLS_ERROR. ]*/ umock_c_indicate_error(UMOCK_C_RESET_CALLS_ERROR); } } } int umock_c_add_expected_call(UMOCKCALL_HANDLE mock_call) { int result; if (umock_c_state != UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_020: [ If the module is not initialized, umock_c_add_expected_call shall return a non-zero value. ]*/ UMOCK_LOG("umock_c: Cannot add an expected call, umock_c not initialized."); result = __LINE__; } else { /* Codes_SRS_UMOCK_C_01_019: [ umock_c_add_expected_call shall add an expected call by calling umockcallrecorder_add_expected_call on the call recorder created in umock_c_init. ]*/ result = umockcallrecorder_add_expected_call(umock_call_recorder, mock_call); } return result; } int umock_c_add_actual_call(UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call) { int result; if (umock_c_state != UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_022: [ If the module is not initialized, umock_c_add_actual_call shall return a non-zero value. ]*/ UMOCK_LOG("umock_c: Cannot add an actual call, umock_c not initialized."); result = __LINE__; } else { /* Codes_SRS_UMOCK_C_01_021: [ umock_c_add_actual_call shall add an actual call by calling umockcallrecorder_add_actual_call on the call recorder created in umock_c_init. ]*/ result = umockcallrecorder_add_actual_call(umock_call_recorder, mock_call, matched_call); } return result; } const char* umock_c_get_expected_calls(void) { const char* result; if (umock_c_state != UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_016: [ If the module is not initialized, umock_c_get_expected_calls shall return NULL. ]*/ UMOCK_LOG("umock_c: Cannot get the expected calls, umock_c not initialized."); result = NULL; } else { /* Codes_SRS_UMOCK_C_01_015: [ umock_c_get_expected_calls shall return the string for the recorded expected calls by calling umockcallrecorder_get_expected_calls on the call recorder created in umock_c_init. ]*/ result = umockcallrecorder_get_expected_calls(umock_call_recorder); } return result; } const char* umock_c_get_actual_calls(void) { const char* result; if (umock_c_state != UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_014: [ If the module is not initialized, umock_c_get_actual_calls shall return NULL. ]*/ UMOCK_LOG("umock_c: Cannot get the actual calls, umock_c not initialized."); result = NULL; } else { /* Codes_SRS_UMOCK_C_01_013: [ umock_c_get_actual_calls shall return the string for the recorded actual calls by calling umockcallrecorder_get_actual_calls on the call recorder created in umock_c_init. ]*/ result = umockcallrecorder_get_actual_calls(umock_call_recorder); } return result; } UMOCKCALL_HANDLE umock_c_get_last_expected_call(void) { UMOCKCALL_HANDLE result; if (umock_c_state != UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_018: [ If the module is not initialized, umock_c_get_last_expected_call shall return NULL. ]*/ UMOCK_LOG("umock_c: Cannot get the last expected call, umock_c not initialized."); result = NULL; } else { /* Codes_SRS_UMOCK_C_01_017: [ umock_c_get_last_expected_call shall return the last expected call by calling umockcallrecorder_get_last_expected_call on the call recorder created in umock_c_init. ]*/ result = umockcallrecorder_get_last_expected_call(umock_call_recorder); } return result; } void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code) { if (on_umock_c_error_function != NULL) { on_umock_c_error_function(error_code); } } UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void) { UMOCKCALLRECORDER_HANDLE result; if (umock_c_state != UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_027: [ If the module is not initialized, umock_c_get_call_recorder shall return NULL. ]*/ UMOCK_LOG("umock_c_get_call_recorder: Cannot get the call recorder, umock_c not initialized."); result = NULL; } else { /* Codes_SRS_UMOCK_C_01_026: [ umock_c_get_call_recorder shall return the handle to the currently used call recorder. ]*/ result = umock_call_recorder; } return result; } int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE call_recorder) { int result; if (umock_c_state != UMOCK_C_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_01_033: [ If the module is not initialized, umock_c_set_call_recorder shall return a non-zero value. ]*/ UMOCK_LOG("umock_c_set_call_recorder: Cannot set the call recorder, umock_c not initialized."); result = __LINE__; } else if (call_recorder == NULL) { /* Codes_SRS_UMOCK_C_01_030: [ If call_recorder is NULL, umock_c_set_call_recorder shall return a non-zero value. ]*/ UMOCK_LOG("umock_c_set_call_recorder: NULL call_recorder."); result = __LINE__; } else { UMOCKCALLRECORDER_HANDLE new_call_recorder; /* Codes_SRS_UMOCK_C_01_028: [ umock_c_set_call_recorder shall replace the currently used call recorder with the one identified by the call_recorder argument. ]*/ /* Codes_SRS_UMOCK_C_01_031: [ umock_c_set_call_recorder shall make a copy of call_recorder by calling umockcallrecorder_clone and use the copy for future actions. ]*/ new_call_recorder = umockcallrecorder_clone(call_recorder); if (new_call_recorder == NULL) { /* Codes_SRS_UMOCK_C_01_032: [ If umockcallrecorder_clone fails, umock_c_set_call_recorder shall return a non-zero value. ]*/ UMOCK_LOG("umock_c_set_call_recorder: Failed cloning call recorder."); result = __LINE__; } else { /* Codes_SRS_UMOCK_C_01_034: [ The previously used call recorder shall be destroyed by calling umockcallrecorder_destroy. ]*/ umockcallrecorder_destroy(umock_call_recorder); umock_call_recorder = new_call_recorder; /* Codes_SRS_UMOCK_C_01_029: [ On success, umock_c_set_call_recorder shall return 0. ]*/ result = 0; } } return result; } umock_c_negative_tests.c000066400000000000000000000253001362133436400403320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "umock_c_negative_tests.h" #include "umock_c.h" #include "umockcall.h" #include "umockcallrecorder.h" #include "umock_log.h" static UMOCKCALLRECORDER_HANDLE snapshot_call_recorder; typedef enum UMOCK_C_NEGATIVE_TESTS_STATE_TAG { UMOCK_C_NEGATIVE_TESTS_STATE_NOT_INITIALIZED, UMOCK_C_NEGATIVE_TESTS_STATE_INITIALIZED } UMOCK_C_NEGATIVE_TESTS_STATE; static UMOCK_C_NEGATIVE_TESTS_STATE umock_c_negative_tests_state = UMOCK_C_NEGATIVE_TESTS_STATE_NOT_INITIALIZED; int umock_c_negative_tests_init(void) { int result; if (umock_c_negative_tests_state != UMOCK_C_NEGATIVE_TESTS_STATE_NOT_INITIALIZED) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_005: [ If the module has already been initialized, umock_c_negative_tests_init shall return a non-zero value. ]*/ UMOCK_LOG("umock_c_negative_tests_init: Already initialized."); result = __LINE__; } else { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_004: [ On success, umock_c_negative_tests_init shall return 0. ]*/ umock_c_negative_tests_state = UMOCK_C_NEGATIVE_TESTS_STATE_INITIALIZED; result = 0; } return result; } void umock_c_negative_tests_deinit(void) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_003: [ If the module was not previously initialized, umock_c_negative_tests_deinit shall do nothing. ]*/ if (umock_c_negative_tests_state == UMOCK_C_NEGATIVE_TESTS_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_002: [ umock_c_negative_tests_deinit shall free all resources associated with the negative tests module. ]*/ if (snapshot_call_recorder != NULL) { umockcallrecorder_destroy(snapshot_call_recorder); snapshot_call_recorder = NULL; } umock_c_negative_tests_state = UMOCK_C_NEGATIVE_TESTS_STATE_NOT_INITIALIZED; } } /* Codes_SRS_UMOCK_C_LIB_01_167: [ umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). ]*/ /* Codes_SRS_UMOCK_C_LIB_01_168: [ If umock_c_negative_tests_snapshot is called without the module being initialized, it shall do nothing. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_169: [ All errors shall be reported by calling the umock_c on error function. ]*/ /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_006: [ umock_c_negative_tests_snapshot shall make a copy of the current call recorder for umock_c with all its recorded calls. ]*/ void umock_c_negative_tests_snapshot(void) { if (umock_c_negative_tests_state != UMOCK_C_NEGATIVE_TESTS_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_015: [ If the module was not previously initialized, umock_c_negative_tests_snapshot shall do nothing. ]*/ UMOCK_LOG("umock_c_negative_tests_snapshot: Not initialized."); } else { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_007: [ The current call recorder shall be obtained by calling umock_c_get_call_recorder. ]*/ UMOCKCALLRECORDER_HANDLE current_call_recorder = umock_c_get_call_recorder(); if (current_call_recorder == NULL) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_009: [ If getting the call recorder fails, umock_c_negative_tests_snapshot shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ UMOCK_LOG("umock_c_negative_tests_snapshot: Error getting the current call recorder."); umock_c_indicate_error(UMOCK_C_ERROR); } else { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_008: [ The copy of the recorder shall be made by calling umockcallrecorder_clone. ]*/ UMOCKCALLRECORDER_HANDLE new_call_recorder = umockcallrecorder_clone(current_call_recorder); if (new_call_recorder == NULL) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_010: [ If copying the call recorder fails, umock_c_negative_tests_snapshot shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ UMOCK_LOG("umock_c_negative_tests_snapshot: Error cloning the call recorder."); umock_c_indicate_error(UMOCK_C_ERROR); } else { if (snapshot_call_recorder != NULL) { umockcallrecorder_destroy(snapshot_call_recorder); } snapshot_call_recorder = new_call_recorder; } } } } /* Codes_SRS_UMOCK_C_LIB_01_170: [ umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_171: [ If umock_c_negative_tests_reset is called without the module being initialized, it shall do nothing. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_172: [ All errors shall be reported by calling the umock_c on error function. ]*/ void umock_c_negative_tests_reset(void) { if (umock_c_negative_tests_state != UMOCK_C_NEGATIVE_TESTS_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_016: [ If the module was not previously initialized, umock_c_negative_tests_reset shall do nothing. ]*/ UMOCK_LOG("umock_c_negative_tests_reset: Not initialized."); } else { if (snapshot_call_recorder == NULL) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_012: [ If no call has been made to umock_c_negative_tests_snapshot, umock_c_negative_tests_reset shall indicate a failure via the umock error callback with error code UMOCK_C_ERROR. ]*/ UMOCK_LOG("umock_c_negative_tests_reset: No snapshot was done, use umock_c_negative_tests_snapshot."); umock_c_indicate_error(UMOCK_C_ERROR); } else { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_011: [ umock_c_negative_tests_reset shall reset the call recorder used by umock_c to the call recorder stored in umock_c_negative_tests_reset. ]*/ /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_013: [ The reset shall be done by calling umock_c_set_call_recorder and passing the call recorder stored in umock_c_negative_tests_reset as argument. ]*/ if (umock_c_set_call_recorder(snapshot_call_recorder) != 0) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_014: [ If umock_c_set_call_recorder fails, umock_c_negative_tests_reset shall indicate a failure via the umock error callback with error code UMOCK_C_ERROR. ]*/ UMOCK_LOG("umock_c_negative_tests_reset: Failed setting the call recorder to the snapshot one."); umock_c_indicate_error(UMOCK_C_ERROR); } } } } /* Codes_SRS_UMOCK_C_LIB_01_173: [ umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_174: [ If umock_c_negative_tests_fail_call is called without the module being initialized, it shall do nothing. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_175: [ All errors shall be reported by calling the umock_c on error function. ]*/ void umock_c_negative_tests_fail_call(size_t index) { if (umock_c_negative_tests_state != UMOCK_C_NEGATIVE_TESTS_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_020: [ If the module was not previously initialized, umock_c_negative_tests_fail_call shall do nothing. ]*/ UMOCK_LOG("umock_c_negative_tests_fail_call: Not initialized."); } else { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_017: [ umock_c_negative_tests_fail_call shall call umockcallrecorder_fail_call on the currently used call recorder used by umock_c. ]*/ /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_018: [ The currently used recorder shall be obtained by calling umock_c_get_call_recorder. ]*/ UMOCKCALLRECORDER_HANDLE call_recorder = umock_c_get_call_recorder(); if (call_recorder == NULL) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_019: [ If umock_c_get_call_recorder fails, umock_c_negative_tests_fail_call shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ UMOCK_LOG("umock_c_negative_tests_fail_call: Cannot get call recorder."); umock_c_indicate_error(UMOCK_C_ERROR); } else { if (umockcallrecorder_fail_call(call_recorder, index) != 0) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_025: [ If failing the call by calling umockcallrecorder_fail_call fails, umock_c_negative_tests_fail_call shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ UMOCK_LOG("umock_c_negative_tests_fail_call: Cannot get call recorder."); umock_c_indicate_error(UMOCK_C_ERROR); } } } } /* Codes_SRS_UMOCK_C_LIB_01_176: [ umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_177: [ If umock_c_negative_tests_fail_call is called without the module being initialized, it shall return 0. ]*/ /* Codes_SRS_UMOCK_C_LIB_01_178: [ All errors shall be reported by calling the umock_c on error function. ]*/ size_t umock_c_negative_tests_call_count(void) { size_t result; if (umock_c_negative_tests_state != UMOCK_C_NEGATIVE_TESTS_STATE_INITIALIZED) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_024: [ If the module was not previously initialized, umock_c_negative_tests_call_count shall return 0. ]*/ UMOCK_LOG("umock_c_negative_tests_call_count: Not initialized."); result = 0; } else { if (snapshot_call_recorder == NULL) { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_022: [ If no call has been made to umock_c_negative_tests_snapshot, umock_c_negative_tests_fail_call shall return 0 and indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ UMOCK_LOG("umock_c_negative_tests_call_count: No snapshot, use umock_c_negative_tests_snapshot."); umock_c_indicate_error(UMOCK_C_ERROR); result = 0; } else { /* Codes_SRS_UMOCK_C_NEGATIVE_TESTS_01_021: [ umock_c_negative_tests_call_count shall return the count of expected calls for the current snapshot call recorder by calling umockcallrecorder_get_expected_call_count. ]*/ if (umockcallrecorder_get_expected_call_count(snapshot_call_recorder, &result) != 0) { UMOCK_LOG("umock_c_negative_tests_call_count: Getting the expected call count from the recorder failed."); umock_c_indicate_error(UMOCK_C_ERROR); result = 0; } } } return result; } umock_log.c000066400000000000000000000007141362133436400355670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "umock_log.h" #include "umock_c_internal.h" void UMOCK_LOG(const char* format, ...) { va_list params; va_start(params, format); (void)vprintf(format, params); va_end(params); printf("\r\n"); umock_c_indicate_error(UMOCK_C_ERROR); } umockalloc.c000066400000000000000000000034051362133436400357410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "umockalloc.h" void* umockalloc_malloc(size_t size) { /* Codes_SRS_UMOCKALLOC_01_001: [ umockalloc_malloc shall call malloc, while passing the size argument to malloc. ] */ /* Codes_SRS_UMOCKALLOC_01_002: [ umockalloc_malloc shall return the result of malloc. ]*/ return malloc(size); } void* umockalloc_realloc(void* ptr, size_t size) { /* Codes_SRS_UMOCKALLOC_01_003: [ umockalloc_realloc shall call realloc, while passing the ptr and size arguments to realloc. ] */ /* Codes_SRS_UMOCKALLOC_01_004: [ umockalloc_realloc shall return the result of realloc. ]*/ return realloc(ptr, size); } void umockalloc_free(void* ptr) { /* Codes_SRS_UMOCKALLOC_01_005: [ umockalloc_free shall call free, while passing the ptr argument to free. ]*/ free(ptr); } char* umockc_stringify_buffer(const void* bytes, size_t length) { size_t string_length = 2 + (4 * length); char* result; if (length > 1) { string_length += length - 1; } result = (char*)umockalloc_malloc(string_length + 1); if (result != NULL) { size_t i; result[0] = '['; for (i = 0; i < length; i++) { if (sprintf(result + 1 + (i * 5), "0x%02X ", ((const unsigned char*)bytes)[i]) < 0) { break; } } if (i < length) { umockalloc_free(result); result = NULL; } else { result[string_length - 1] = ']'; result[string_length] = '\0'; } } return result; } umockautoignoreargs.c000066400000000000000000000206561362133436400377070ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "umockalloc.h" #include "umockautoignoreargs.h" #include "umock_log.h" static const char ignore_ptr_arg_string[] = "IGNORED_PTR_ARG"; static const char ignore_num_arg_string[] = "IGNORED_NUM_ARG"; #define PARSER_STACK_DEPTH 256 /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_001: [ `umockautoignoreargs_is_call_argument_ignored` shall determine whether argument `argument_index` shall be ignored or not. ]*/ int umockautoignoreargs_is_call_argument_ignored(const char* call, size_t argument_index, int* is_argument_ignored) { int result; if ((call == NULL) || (is_argument_ignored == NULL)) { /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_002: [ If `call` or `is_argument_ignored` is NULL, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. ]*/ result = __LINE__; } else { const char* cur_pos = strchr(call, '('); if (cur_pos == NULL) { /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_004: [ If `umockautoignoreargs_is_call_argument_ignored` fails parsing the `call` argument it shall fail and return a non-zero value. ]*/ result = __LINE__; } else { size_t argument_count = 1; unsigned char argument_found = 0; /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_009: [ If the number of arguments parsed from `call` is less than `argument_index`, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. ]*/ cur_pos++; while (*cur_pos != '\0') { /* clear out all spaces */ while ((*cur_pos != '\0') && isspace(*cur_pos)) { cur_pos++; } if (*cur_pos != '\0') { if (*cur_pos == ')') { /* no more args and we did not get to the arg we wanted */ /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_009: [ If the number of arguments parsed from `call` is less than `argument_index`, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. ]*/ result = __LINE__; break; } else { if (argument_count == argument_index) { /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_006: [ If the argument value is `IGNORED_PTR_ARG` then `is_argument_ignored` shall be set to 1. ]*/ if ((strncmp(cur_pos, ignore_ptr_arg_string, sizeof(ignore_ptr_arg_string) - 1) == 0) || /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_007: [ If the argument value is `IGNORED_NUM_ARG` then `is_argument_ignored` shall be set to 1. ]*/ (strncmp(cur_pos, ignore_num_arg_string, sizeof(ignore_num_arg_string) - 1) == 0)) { /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_005: [ If `umockautoignoreargs_is_call_argument_ignored` was able to parse the `argument_index`th argument it shall succeed and return 0, while writing whether the argument is ignored in the `is_argument_ignored` output argument. ]*/ *is_argument_ignored = 1; } else { /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_008: [ If the argument value is any other value then `is_argument_ignored` shall be set to 0. ]*/ /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_005: [ If `umockautoignoreargs_is_call_argument_ignored` was able to parse the `argument_index`th argument it shall succeed and return 0, while writing whether the argument is ignored in the `is_argument_ignored` output argument. ]*/ *is_argument_ignored = 0; } argument_found = 1; break; } else { unsigned char parser_stack[PARSER_STACK_DEPTH]; size_t parser_stack_index = 0; int parse_error = 0; /* Codes_SRS_UMOCKAUTOIGNOREARGS_01_003: [ `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). ]*/ while ((*cur_pos != '\0') && ((*cur_pos != ',') || (parser_stack_index > 0))) { if (*cur_pos == '(') { if (parser_stack_index == PARSER_STACK_DEPTH) { /* error*/ parse_error = 1; break; } else { parser_stack[parser_stack_index] = 1; parser_stack_index++; } } if (*cur_pos == ')') { if (parser_stack_index == 0) { /* error*/ parse_error = 1; break; } else { if (parser_stack[parser_stack_index - 1] == 1) { parser_stack_index--; } } } if (*cur_pos == '{') { if (parser_stack_index == PARSER_STACK_DEPTH) { /* error*/ parse_error = 1; break; } else { parser_stack[parser_stack_index] = 2; parser_stack_index++; } } if (*cur_pos == '}') { if (parser_stack_index == 0) { /* error*/ parse_error = 1; break; } else { if (parser_stack[parser_stack_index - 1] == 2) { parser_stack_index--; } } } cur_pos++; } if ((*cur_pos == '\0') || parse_error) { break; } else { argument_count++; cur_pos++; } } } } } if (argument_found) { result = 0; } else { result = __LINE__; } } } return result; } umockcall.c000066400000000000000000000377341362133436400355760ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "umockcall.h" #include "umockalloc.h" #include "umock_log.h" typedef struct UMOCKCALL_TAG { char* function_name; void* umockcall_data; UMOCKCALL_DATA_COPY_FUNC umockcall_data_copy; UMOCKCALL_DATA_FREE_FUNC umockcall_data_free; UMOCKCALL_DATA_STRINGIFY_FUNC umockcall_data_stringify; UMOCKCALL_DATA_ARE_EQUAL_FUNC umockcall_data_are_equal; unsigned int fail_call : 1; unsigned int ignore_all_calls : 1; } UMOCKCALL; UMOCKCALL_HANDLE umockcall_create(const char* function_name, void* umockcall_data, UMOCKCALL_DATA_COPY_FUNC umockcall_data_copy, UMOCKCALL_DATA_FREE_FUNC umockcall_data_free, UMOCKCALL_DATA_STRINGIFY_FUNC umockcall_data_stringify, UMOCKCALL_DATA_ARE_EQUAL_FUNC umockcall_data_are_equal) { UMOCKCALL* result; if ((function_name == NULL) || (umockcall_data == NULL) || (umockcall_data_copy == NULL) || (umockcall_data_free == NULL) || (umockcall_data_stringify == NULL) || (umockcall_data_are_equal == NULL)) { /* Codes_SRS_UMOCKCALL_01_003: [ If any of the arguments are NULL, umockcall_create shall fail and return NULL. ] */ UMOCK_LOG("umockcall: Cannot create call, invalid arguments: function_name = %p, umockcall_data = %p, umockcall_data_free = %p, umockcall_data_stringify = %p, umockcall_data_are_equal = %p.", function_name, umockcall_data, umockcall_data_free, umockcall_data_stringify, umockcall_data_are_equal); result = NULL; } else { /* Codes_SRS_UMOCKCALL_01_001: [ umockcall_create shall create a new instance of a umock call and on success it shall return a non-NULL handle to it. ] */ result = (UMOCKCALL*)umockalloc_malloc(sizeof(UMOCKCALL)); /* Codes_SRS_UMOCKCALL_01_002: [ If allocating memory for the umock call instance fails, umockcall_create shall return NULL. ] */ if (result != NULL) { size_t function_name_length = strlen(function_name); result->function_name = (char*)umockalloc_malloc(function_name_length + 1); if (result->function_name == NULL) { /* Codes_SRS_UMOCKCALL_01_002: [ If allocating memory for the umock call instance fails, umockcall_create shall return NULL. ] */ UMOCK_LOG("umockcall: Cannot allocate memory for the call function name."); umockalloc_free(result); result = NULL; } else { (void)memcpy(result->function_name, function_name, function_name_length + 1); result->umockcall_data = umockcall_data; result->umockcall_data_copy = umockcall_data_copy; result->umockcall_data_free = umockcall_data_free; result->umockcall_data_stringify = umockcall_data_stringify; result->umockcall_data_are_equal = umockcall_data_are_equal; result->fail_call = 0; result->ignore_all_calls = 0; } } } return result; } void umockcall_destroy(UMOCKCALL_HANDLE umockcall) { /* Codes_SRS_UMOCKCALL_01_005: [ If the umockcall argument is NULL then umockcall_destroy shall do nothing. ]*/ if (umockcall != NULL) { /* Codes_SRS_UMOCKCALL_01_004: [ umockcall_destroy shall free a previously allocated umock call instance. ] */ umockcall->umockcall_data_free(umockcall->umockcall_data); umockalloc_free(umockcall->function_name); umockalloc_free(umockcall); } } /* Codes_SRS_UMOCKCALL_01_006: [ umockcall_are_equal shall compare the two mock calls and return whether they are equal or not. ] */ int umockcall_are_equal(UMOCKCALL_HANDLE left, UMOCKCALL_HANDLE right) { int result; if (left == right) { /* Codes_SRS_UMOCKCALL_01_024: [ If both left and right pointers are equal, umockcall_are_equal shall return 1. ] */ result = 1; } else if ((left == NULL) || (right == NULL)) { /* Codes_SRS_UMOCKCALL_01_015: [ If only one of the left or right arguments are NULL, umockcall_are_equal shall return 0. ] */ result = 0; } else { if (left->umockcall_data_are_equal != right->umockcall_data_are_equal) { /* Codes_SRS_UMOCKCALL_01_014: [ If the two calls have different are_equal functions that have been passed to umockcall_create then the calls shall be considered different and 0 shall be returned. ] */ result = 0; } else if (strcmp(left->function_name, right->function_name) != 0) { /* Codes_SRS_UMOCKCALL_01_025: [ If the function name does not match for the 2 calls, umockcall_are_equal shall return 0. ]*/ result = 0; } else { /* Codes_SRS_UMOCKCALL_01_026: [ The call data shall be evaluated by calling the umockcall_data_are_equal function passed in umockcall_create while passing as arguments the umockcall_data associated with each call handle. ]*/ switch (left->umockcall_data_are_equal(left->umockcall_data, right->umockcall_data)) { default: /* Codes_SRS_UMOCKCALL_01_029: [ If the underlying umockcall_data_are_equal fails (returns anything else than 0 or 1), then umockcall_are_equal shall fail and return -1. ] */ UMOCK_LOG("umockcall: comparing call data failed."); result = -1; break; case 1: /* Codes_SRS_UMOCKCALL_01_027: [ If the underlying umockcall_data_are_equal returns 1, then umockcall_are_equal shall return 1. ]*/ result = 1; break; case 0: /* Codes_SRS_UMOCKCALL_01_028: [ If the underlying umockcall_data_are_equal returns 0, then umockcall_are_equal shall return 0. ]*/ result = 0; break; } } } return result; } char* umockcall_stringify(UMOCKCALL_HANDLE umockcall) { char* result; if (umockcall == NULL) { /* Codes_SRS_UMOCKCALL_01_020: [ If the underlying umockcall_data_stringify call fails, umockcall_stringify shall fail and return NULL. ]*/ UMOCK_LOG("umockcall: NULL umockcall in stringify."); result = NULL; } else { /* Codes_SRS_UMOCKCALL_01_019: [ To obtain the arguments string, umockcall_stringify shall call the umockcall_data_stringify function passed to umockcall_create and pass to it the umockcall_data pointer (also given in umockcall_create). ]*/ char* stringified_args = umockcall->umockcall_data_stringify(umockcall->umockcall_data); if (stringified_args == NULL) { /* Codes_SRS_UMOCKCALL_01_020: [ If the underlying umockcall_data_stringify call fails, umockcall_stringify shall fail and return NULL. ]*/ UMOCK_LOG("umockcall: umockcall data stringify failed."); result = NULL; } else { /* Codes_SRS_UMOCKCALL_01_016: [ umockcall_stringify shall return a string representation of the mock call in the form \[function_name(arguments)\]. ] */ size_t function_name_length = strlen(umockcall->function_name); size_t stringified_args_length = strlen(stringified_args); /* 4 because () and [] */ size_t call_length = function_name_length + stringified_args_length + 4; /* Codes_SRS_UMOCKCALL_01_018: [ The returned string shall be a newly allocated string and it is to be freed by the caller. ]*/ result = (char*)umockalloc_malloc(call_length + 1); /* Codes_SRS_UMOCKCALL_01_021: [ If not enough memory can be allocated for the string to be returned, umockcall_stringify shall fail and return NULL. ]*/ if (result != NULL) { result[0] = '['; (void)memcpy(&result[1], umockcall->function_name, function_name_length); result[function_name_length + 1] = '('; (void)memcpy(&result[function_name_length + 2], stringified_args, stringified_args_length); result[function_name_length + stringified_args_length + 2] = ')'; result[function_name_length + stringified_args_length + 3] = ']'; result[function_name_length + stringified_args_length + 4] = '\0'; } /* Codes_SRS_UMOCKCALL_01_030: [ umockcall_stringify shall free the string obtained from umockcall_data_stringify. ]*/ umockalloc_free(stringified_args); } } return result; } void* umockcall_get_call_data(UMOCKCALL_HANDLE umockcall) { void* umockcall_data; if (umockcall == NULL) { UMOCK_LOG("umockcall: NULL umockcall in getting call data."); umockcall_data = NULL; } else { umockcall_data = umockcall->umockcall_data; } return umockcall_data; } /* Codes_SRS_UMOCKCALL_01_031: [ umockcall_clone shall clone a umock call and on success it shall return a handle to the newly cloned call. ] */ UMOCKCALL_HANDLE umockcall_clone(UMOCKCALL_HANDLE umockcall) { UMOCKCALL_HANDLE result; if (umockcall == NULL) { /* Codes_SRS_UMOCKCALL_01_032: [ If umockcall is NULL, umockcall_clone shall return NULL. ]*/ UMOCK_LOG("umockcall_clone: NULL umockcall in getting call data."); result = NULL; } else { result = (UMOCKCALL*)umockalloc_malloc(sizeof(UMOCKCALL)); if (result == NULL) { /* Codes_SRS_UMOCKCALL_01_043: [ If allocating memory for the new umock call fails, umockcall_clone shall return NULL. ]*/ UMOCK_LOG("umockcall_clone: Failed allocating memory for new copied call."); } else { size_t function_name_length = strlen(umockcall->function_name); result->function_name = (char*)umockalloc_malloc(function_name_length + 1); if (result->function_name == NULL) { /* Codes_SRS_UMOCKCALL_01_036: [ If allocating memory for the function name fails, umockcall_clone shall return NULL. ]*/ UMOCK_LOG("umockcall_clone: Failed allocating memory for new copied call function name."); umockalloc_free(result); result = NULL; } else { /* Codes_SRS_UMOCKCALL_01_035: [ umockcall_clone shall copy also the function name. ]*/ (void)memcpy(result->function_name, umockcall->function_name, function_name_length + 1); /* Codes_SRS_UMOCKCALL_01_033: [ The call data shall be cloned by calling the umockcall_data_copy function passed in umockcall_create and passing as argument the umockcall_data value passed in umockcall_create. ]*/ result->umockcall_data = umockcall->umockcall_data_copy(umockcall->umockcall_data); if (result->umockcall_data == NULL) { /* Codes_SRS_UMOCKCALL_01_034: [ If umockcall_data_copy fails then umockcall_clone shall return NULL. ]*/ UMOCK_LOG("umockcall_clone: Failed copying call data."); umockalloc_free(result->function_name); umockalloc_free(result); result = NULL; } else { /* Codes_SRS_UMOCKCALL_01_037: [ umockcall_clone shall also copy all the functions passed to umockcall_create (umockcall_data_copy, umockcall_data_free, umockcall_data_are_equal, umockcall_data_stringify). ]*/ result->umockcall_data_are_equal = umockcall->umockcall_data_are_equal; result->umockcall_data_copy = umockcall->umockcall_data_copy; result->umockcall_data_free = umockcall->umockcall_data_free; result->umockcall_data_stringify = umockcall->umockcall_data_stringify; result->ignore_all_calls = umockcall->ignore_all_calls; result->fail_call = umockcall->fail_call; } } } } return result; } int umockcall_set_fail_call(UMOCKCALL_HANDLE umockcall, int fail_call) { int result; if (umockcall == NULL) { /* Codes_SRS_UMOCKCALL_01_039: [ If umockcall is NULL, umockcall_set_fail_call shall return a non-zero value. ]*/ UMOCK_LOG("umockcall_set_fail_call: NULL umockcall."); result = __LINE__; } else { switch (fail_call) { default: UMOCK_LOG("umockcall_set_fail_call: Invalid fail_call value: %d.", fail_call); result = __LINE__; break; case 0: /* Codes_SRS_UMOCKCALL_01_038: [ umockcall_set_fail_call shall store the fail_call value, associating it with the umockcall call instance. ]*/ umockcall->fail_call = 0; /* Codes_SRS_UMOCKCALL_01_044: [ On success umockcall_set_fail_call shall return 0. ]*/ result = 0; break; case 1: /* Codes_SRS_UMOCKCALL_01_038: [ umockcall_set_fail_call shall store the fail_call value, associating it with the umockcall call instance. ]*/ umockcall->fail_call = 1; /* Codes_SRS_UMOCKCALL_01_044: [ On success umockcall_set_fail_call shall return 0. ]*/ result = 0; break; } } return result; } int umockcall_get_fail_call(UMOCKCALL_HANDLE umockcall) { int result; if (umockcall == NULL) { /* Codes_SRS_UMOCKCALL_01_042: [ If umockcall is NULL, umockcall_get_fail_call shall return -1. ]*/ UMOCK_LOG("NULL umokcall argument."); result = -1; } else { /* Codes_SRS_UMOCKCALL_01_041: [ umockcall_get_fail_call shall retrieve the fail_call value, associated with the umockcall call instance. ]*/ result = umockcall->fail_call ? 1 : 0; } return result; } int umockcall_set_ignore_all_calls(UMOCKCALL_HANDLE umockcall, int ignore_all_calls) { int result; if (umockcall == NULL) { /* Codes_SRS_UMOCKCALL_01_047: [ If umockcall is NULL, umockcall_set_ignore_all_calls shall return a non-zero value. ]*/ UMOCK_LOG("umockcall_set_fail_call: NULL umockcall."); result = __LINE__; } else { switch (ignore_all_calls) { default: /* Codes_SRS_UMOCKCALL_01_048: [ If a value different than 0 and 1 is passed as ignore_all_calls, umockcall_set_ignore_all_calls shall return a non-zero value. ]*/ UMOCK_LOG("umockcall_set_fail_call: Invalid ignore_all_calls value: %d.", ignore_all_calls); result = __LINE__; break; case 0: /* Codes_SRS_UMOCKCALL_01_045: [ umockcall_set_ignore_all_calls shall store the ignore_all_calls value, associating it with the umockcall call instance. ]*/ umockcall->ignore_all_calls = 0; /* Codes_SRS_UMOCKCALL_01_046: [ On success umockcall_set_ignore_all_calls shall return 0. ]*/ result = 0; break; case 1: /* Codes_SRS_UMOCKCALL_01_045: [ umockcall_set_ignore_all_calls shall store the ignore_all_calls value, associating it with the umockcall call instance. ]*/ umockcall->ignore_all_calls = 1; /* Codes_SRS_UMOCKCALL_01_046: [ On success umockcall_set_ignore_all_calls shall return 0. ]*/ result = 0; break; } } return result; } int umockcall_get_ignore_all_calls(UMOCKCALL_HANDLE umockcall) { int result; if (umockcall == NULL) { /* Codes_SRS_UMOCKCALL_01_050: [ If umockcall is NULL, umockcall_get_ignore_all_calls shall return -1. ]*/ UMOCK_LOG("NULL umokcall argument."); result = -1; } else { /* Codes_SRS_UMOCKCALL_01_049: [ umockcall_get_ignore_all_calls shall retrieve the ignore_all_calls value, associated with the umockcall call instance. ]*/ result = umockcall->ignore_all_calls ? 1 : 0; } return result; } umockcallpairs.c000066400000000000000000000215601362133436400366230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "umockcallpairs.h" #include "umockalloc.h" #include "umock_log.h" #include "umocktypes.h" int umockcallpairs_track_create_paired_call(PAIRED_HANDLES* paired_handles, const void* handle, const char* handle_type, size_t handle_type_size) { PAIRED_HANDLE* new_paired_handles; int result; if ((paired_handles == NULL) || (handle == NULL) || (handle_type == NULL)) { /* Codes_SRS_UMOCKCALLPAIRS_01_004: [ If any of the arguments paired_handles, handle or handle_type is NULL, umockcallpairs_track_create_paired_call shallfail and return a non-zero value. ]*/ result = __LINE__; UMOCK_LOG("umock_track_create_destroy_paired_calls_malloc: NULL paired_handles"); } else { /* Codes_SRS_UMOCKCALLPAIRS_01_001: [ umockcallpairs_track_create_paired_call shall add a new entry to the PAIRED_HANDLES array and on success it shall return 0. ]*/ new_paired_handles = (PAIRED_HANDLE*)umockalloc_realloc(paired_handles->paired_handles, sizeof(PAIRED_HANDLE) * (paired_handles->paired_handle_count + 1)); if (new_paired_handles == NULL) { result = __LINE__; UMOCK_LOG("umock_track_create_destroy_paired_calls_malloc: Allocation failed"); } else { paired_handles->paired_handle_count++; paired_handles->paired_handles = new_paired_handles; /* Codes_SRS_UMOCKCALLPAIRS_01_003: [ umockcallpairs_track_create_paired_call shall allocate a memory block and store a pointer to it in the memory field of the new entry. ]*/ paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_value = umockalloc_malloc(handle_type_size); if (paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_value == NULL) { /* Codes_SRS_UMOCKCALLPAIRS_01_005: [ If allocating memory fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. ]*/ paired_handles->paired_handle_count--; if (paired_handles->paired_handle_count == 0) { umockalloc_free(paired_handles->paired_handles); paired_handles->paired_handles = NULL; } result = __LINE__; UMOCK_LOG("umock_track_create_destroy_paired_calls_malloc: Failed allocating memory for handle value for create"); } else { size_t handle_type_length = strlen(handle_type); paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_type = (char*)umockalloc_malloc(handle_type_length + 1); if (paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_type == NULL) { /* Codes_SRS_UMOCKCALLPAIRS_01_005: [ If allocating memory fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. ]*/ umockalloc_free(paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_value); paired_handles->paired_handle_count--; if (paired_handles->paired_handle_count == 0) { umockalloc_free(paired_handles->paired_handles); paired_handles->paired_handles = NULL; } result = __LINE__; UMOCK_LOG("umock_track_create_destroy_paired_calls_malloc: Failed allocating memory for handle type for create"); } else { (void)memcpy(paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_type, handle_type, handle_type_length + 1); /* Codes_SRS_UMOCKCALLPAIRS_01_002: [ umockcallpairs_track_create_paired_call shall copy the handle_value to the handle_value member of the new entry. ] */ /* Codes_SRS_UMOCKCALLPAIRS_01_006: [ The handle value shall be copied by using umocktypes_copy. ]*/ if (umocktypes_copy(handle_type, paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_value, handle) != 0) { /* Codes_SRS_UMOCKCALLPAIRS_01_007: [ If umocktypes_copy fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. ]*/ umockalloc_free(paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_type); umockalloc_free(paired_handles->paired_handles[paired_handles->paired_handle_count - 1].handle_value); paired_handles->paired_handle_count--; if (paired_handles->paired_handle_count == 0) { umockalloc_free(paired_handles->paired_handles); paired_handles->paired_handles = NULL; } result = __LINE__; UMOCK_LOG("umock_track_create_destroy_paired_calls_malloc: Failed copying handle"); } else { result = 0; } } } } } return result; } int umockcallpairs_track_destroy_paired_call(PAIRED_HANDLES* paired_handles, const void* handle) { size_t i; int result; if ((paired_handles == NULL) || (handle == NULL)) { /* Codes_SRS_UMOCKCALLPAIRS_01_010: [ If any of the arguments is NULL, umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. ]*/ result = __LINE__; UMOCK_LOG("umock_track_create_destroy_paired_calls_free: are_equal failed"); } else { unsigned char is_error = 0; /* Codes_SRS_UMOCKCALLPAIRS_01_008: [ umockcallpairs_track_destroy_paired_call shall remove from the paired handles array pointed by the paired_handles field the entry that is associated with the handle passed in the handle argument. ]*/ for (i = 0; i < paired_handles->paired_handle_count; i++) { /* Codes_SRS_UMOCKCALLPAIRS_01_013: [ When looking up which entry to remove, the comparison of the handle values shall be done by calling umocktypes_are_equal. ]*/ int are_equal_result = umocktypes_are_equal(paired_handles->paired_handles[i].handle_type, paired_handles->paired_handles[i].handle_value, handle); if (are_equal_result < 0) { /* Codes_SRS_UMOCKCALLPAIRS_01_014: [ If umocktypes_are_equal fails, umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. ]*/ result = __LINE__; is_error = 1; UMOCK_LOG("umock_track_create_destroy_paired_calls_free: are_equal failed"); break; } else { if (are_equal_result == 1) { break; } } } if (i == paired_handles->paired_handle_count) { result = __LINE__; UMOCK_LOG("umock_track_create_destroy_paired_calls_free: could not find handle"); } else { if (!is_error) { /* Codes_SRS_UMOCKCALLPAIRS_01_011: [ umockcallpairs_track_destroy_paired_call shall free the memory pointed by the memory field in the PAIRED_HANDLES array entry associated with handle. ]*/ umocktypes_free(paired_handles->paired_handles[i].handle_type, paired_handles->paired_handles[i].handle_value); umockalloc_free(paired_handles->paired_handles[i].handle_type); umockalloc_free(paired_handles->paired_handles[i].handle_value); (void)memmove(&paired_handles->paired_handles[i], &paired_handles->paired_handles[i + 1], sizeof(PAIRED_HANDLE) * (paired_handles->paired_handle_count - 1)); paired_handles->paired_handle_count--; if (paired_handles->paired_handle_count == 0) { /* Codes_SRS_UMOCKCALLPAIRS_01_012: [ If the array paired handles array is empty after removing the entry, the paired_handles field shall be freed and set to NULL. ]*/ umockalloc_free(paired_handles->paired_handles); paired_handles->paired_handles = NULL; } /* Codes_SRS_UMOCKCALLPAIRS_01_009: [ On success umockcallpairs_track_destroy_paired_call shall return 0. ]*/ result = 0; } else { result = __LINE__; } } } return result; } umockcallrecorder.c000066400000000000000000000704761362133436400373240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "umockcallrecorder.h" #include "umockcall.h" #include "umocktypes.h" #include "umockalloc.h" #include "umock_log.h" typedef struct UMOCK_EXPECTED_CALL_TAG { UMOCKCALL_HANDLE umockcall; unsigned int is_matched : 1; } UMOCK_EXPECTED_CALL; typedef struct UMOCKCALLRECORDER_TAG { size_t expected_call_count; UMOCK_EXPECTED_CALL* expected_calls; size_t actual_call_count; UMOCKCALL_HANDLE* actual_calls; char* expected_calls_string; char* actual_calls_string; } UMOCKCALLRECORDER; UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void) { UMOCKCALLRECORDER_HANDLE result; /* Codes_SRS_UMOCKCALLRECORDER_01_001: [ umockcallrecorder_create shall create a new instance of a call recorder and return a non-NULL handle to it on success. ]*/ result = (UMOCKCALLRECORDER_HANDLE)umockalloc_malloc(sizeof(UMOCKCALLRECORDER)); /* Codes_SRS_UMOCKCALLRECORDER_01_002: [ If allocating memory for the call recorder fails, umockcallrecorder_create shall return NULL. ]*/ if (result != NULL) { result->expected_call_count = 0; result->expected_calls = NULL; result->expected_calls_string = NULL; result->actual_call_count = 0; result->actual_calls = NULL; result->actual_calls_string = NULL; } return result; } void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { /* Codes_SRS_UMOCKCALLRECORDER_01_004: [ If umock_call_recorder is NULL, umockcallrecorder_destroy shall do nothing. ]*/ if (umock_call_recorder != NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_003: [ umockcallrecorder_destroy shall free the resources associated with a the call recorder identified by the umock_call_recorder argument. ]*/ (void)umockcallrecorder_reset_all_calls(umock_call_recorder); umockalloc_free(umock_call_recorder->actual_calls_string); umockalloc_free(umock_call_recorder->expected_calls_string); umockalloc_free(umock_call_recorder); } } int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { int result; if (umock_call_recorder == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_007: [ If umock_call_recorder is NULL, umockcallrecorder_reset_all_calls shall fail and return a non-zero value. ]*/ UMOCK_LOG("umockcallrecorder: Reset all calls failed: NULL umock_call_recorder."); result = __LINE__; } else { /* Codes_SRS_UMOCKCALLRECORDER_01_005: [ umockcallrecorder_reset_all_calls shall free all the expected and actual calls for the call recorder identified by umock_call_recorder. ]*/ if (umock_call_recorder->expected_calls != NULL) { size_t i; for (i = 0; i < umock_call_recorder->expected_call_count; i++) { umockcall_destroy(umock_call_recorder->expected_calls[i].umockcall); } umockalloc_free(umock_call_recorder->expected_calls); umock_call_recorder->expected_calls = NULL; } umock_call_recorder->expected_call_count = 0; if (umock_call_recorder->actual_calls != NULL) { size_t i; for (i = 0; i < umock_call_recorder->actual_call_count; i++) { umockcall_destroy(umock_call_recorder->actual_calls[i]); } umockalloc_free(umock_call_recorder->actual_calls); umock_call_recorder->actual_calls = NULL; } umock_call_recorder->actual_call_count = 0; /* Codes_SRS_UMOCKCALLRECORDER_01_006: [ On success umockcallrecorder_reset_all_calls shall return 0. ]*/ result = 0; } return result; } int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call) { int result; if ((umock_call_recorder == NULL) || (mock_call == NULL)) { /* Codes_SRS_UMOCKCALLRECORDER_01_012: [ If any of the arguments is NULL, umockcallrecorder_add_expected_call shall fail and return a non-zero value. ]*/ UMOCK_LOG("umockcallrecorder: Bad arguments in add expected call: umock_call_recorder = %p, mock_call = %p.", umock_call_recorder, mock_call); result = __LINE__; } else { UMOCK_EXPECTED_CALL* new_expected_calls = (UMOCK_EXPECTED_CALL*)umockalloc_realloc(umock_call_recorder->expected_calls, sizeof(UMOCK_EXPECTED_CALL) * (umock_call_recorder->expected_call_count + 1)); if (new_expected_calls == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_013: [ If allocating memory for the expected calls fails, umockcallrecorder_add_expected_call shall fail and return a non-zero value. ] */ UMOCK_LOG("umockcallrecorder: Cannot allocate memory in add expected call."); result = __LINE__; } else { /* Codes_SRS_UMOCKCALLRECORDER_01_008: [ umockcallrecorder_add_expected_call shall add the mock_call call to the expected call list maintained by the call recorder identified by umock_call_recorder. ]*/ umock_call_recorder->expected_calls = new_expected_calls; umock_call_recorder->expected_calls[umock_call_recorder->expected_call_count].umockcall = mock_call; umock_call_recorder->expected_calls[umock_call_recorder->expected_call_count++].is_matched = 0; /* Codes_SRS_UMOCKCALLRECORDER_01_009: [ On success umockcallrecorder_add_expected_call shall return 0. ]*/ result = 0; } } return result; } int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call) { int result; if ((umock_call_recorder == NULL) || (mock_call == NULL) || (matched_call == NULL)) { /* Codes_SRS_UMOCKCALLRECORDER_01_019: [ If any of the arguments is NULL, umockcallrecorder_add_actual_call shall fail and return a non-zero value. ]*/ UMOCK_LOG("umockcallrecorder: Bad arguments in add actual call: umock_call_recorder = %p, mock_call = %p, matched_call = %p.", umock_call_recorder, mock_call, matched_call); result = __LINE__; } else { size_t i; unsigned int is_error = 0; *matched_call = NULL; /* Codes_SRS_UMOCK_C_LIB_01_115: [ umock_c shall compare calls in order. ]*/ for (i = 0; i < umock_call_recorder->expected_call_count; i++) { int ignore_all_calls = umockcall_get_ignore_all_calls(umock_call_recorder->expected_calls[i].umockcall); if (ignore_all_calls < 0) { /* Codes_SRS_UMOCKCALLRECORDER_01_058: [ If getting `ignore_all_calls` by calling `umockcall_get_ignore_all_calls` fails, `umockcallrecorder_add_actual_call` shall fail and return a non-zero value. ]*/ UMOCK_LOG("umockcallrecorder: Cannot get the ignore_all_calls flag."); is_error = 1; break; } else { if ((umock_call_recorder->expected_calls[i].is_matched == 0) || /* Codes_SRS_UMOCKCALLRECORDER_01_057: [ If any expected call has `ignore_all_calls` set and the actual call is equal to it when comparing the 2 calls, then the call shall be considered matched and not added to the actual calls list. ]*/ (ignore_all_calls > 0)) { /* Codes_SRS_UMOCKCALLRECORDER_01_017: [ Comparing the calls shall be done by calling umockcall_are_equal. ]*/ int are_equal_result = umockcall_are_equal(umock_call_recorder->expected_calls[i].umockcall, mock_call); if (are_equal_result == 1) { /* Codes_SRS_UMOCKCALLRECORDER_01_016: [ If the call matches one of the expected calls, a handle to the matched call shall be filled into the matched_call argument. ]*/ *matched_call = umock_call_recorder->expected_calls[i].umockcall; break; } /* Codes_SRS_UMOCKCALLRECORDER_01_021: [ If umockcall_are_equal fails, umockcallrecorder_add_actual_call shall fail and return a non-zero value. ]*/ else if (are_equal_result != 0) { is_error = 1; break; } else { if (ignore_all_calls == 0) { i = umock_call_recorder->expected_call_count; break; } } } } } if ((umock_call_recorder->actual_call_count == 0) && (i < umock_call_recorder->expected_call_count)) { umock_call_recorder->expected_calls[i].is_matched = 1; } else { i = umock_call_recorder->expected_call_count; } if (is_error) { UMOCK_LOG("umockcallrecorder: Error in finding a matched call."); result = __LINE__; } else { if (i == umock_call_recorder->expected_call_count) { /* an unexpected call */ /* Codes_SRS_UMOCKCALLRECORDER_01_014: [ umockcallrecorder_add_actual_call shall check whether the call mock_call matches any of the expected calls maintained by umock_call_recorder. ]*/ UMOCKCALL_HANDLE* new_actual_calls = (UMOCKCALL_HANDLE*)umockalloc_realloc(umock_call_recorder->actual_calls, sizeof(UMOCKCALL_HANDLE) * (umock_call_recorder->actual_call_count + 1)); if (new_actual_calls == NULL) { UMOCK_LOG("umockcallrecorder: Cannot allocate memory for actual calls."); result = __LINE__; } else { umock_call_recorder->actual_calls = new_actual_calls; umock_call_recorder->actual_calls[umock_call_recorder->actual_call_count++] = mock_call; /* Codes_SRS_UMOCKCALLRECORDER_01_018: [ When no error is encountered, umockcallrecorder_add_actual_call shall return 0. ]*/ result = 0; } } else { umockcall_destroy(mock_call); /* Codes_SRS_UMOCKCALLRECORDER_01_018: [ When no error is encountered, umockcallrecorder_add_actual_call shall return 0. ]*/ result = 0; } } } return result; } const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { const char* result; if (umock_call_recorder == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_029: [ If the umock_call_recorder is NULL, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ UMOCK_LOG("umockcallrecorder: NULL umock_call_recorder in get expected calls."); result = NULL; } else { size_t i; char* new_expected_calls_string; size_t current_length = 0; for (i = 0; i < umock_call_recorder->expected_call_count; i++) { /* Codes_SRS_UMOCKCALLRECORDER_01_055: [ Getting the `ignore_all_calls` property shall be done by calling `umockcall_get_ignore_all_calls`. ]*/ int ignore_all_calls = umockcall_get_ignore_all_calls(umock_call_recorder->expected_calls[i].umockcall); if (ignore_all_calls < 0) { UMOCK_LOG("umockcallrecorder: Cannot get the ignore_all_calls flag."); break; } else { if ((umock_call_recorder->expected_calls[i].is_matched == 0) && /* Codes_SRS_UMOCKCALLRECORDER_01_054: [ Calls that have the `ignore_all_calls` property set shall not be reported in the expected call list. ]*/ (ignore_all_calls == 0)) { /* Codes_SRS_UMOCKCALLRECORDER_01_028: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ char* stringified_call = umockcall_stringify(umock_call_recorder->expected_calls[i].umockcall); if (stringified_call == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_030: [ If umockcall_stringify fails, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ break; } else { size_t stringified_call_length = strlen(stringified_call); new_expected_calls_string = (char*)umockalloc_realloc(umock_call_recorder->expected_calls_string, current_length + stringified_call_length + 1); if (new_expected_calls_string == NULL) { umockalloc_free(stringified_call); /* Codes_SRS_UMOCKCALLRECORDER_01_031: [ If allocating memory for the resulting string fails, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ break; } else { umock_call_recorder->expected_calls_string = new_expected_calls_string; (void)memcpy(umock_call_recorder->expected_calls_string + current_length, stringified_call, stringified_call_length + 1); current_length += stringified_call_length; } umockalloc_free(stringified_call); } } } } if (i < umock_call_recorder->expected_call_count) { result = NULL; } else { if (current_length == 0) { new_expected_calls_string = (char*)umockalloc_realloc(umock_call_recorder->expected_calls_string, 1); if (new_expected_calls_string == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_031: [ If allocating memory for the resulting string fails, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ UMOCK_LOG("umockcallrecorder: Cannot allocate memory for expected calls."); result = NULL; } else { umock_call_recorder->expected_calls_string = new_expected_calls_string; umock_call_recorder->expected_calls_string[0] = '\0'; /* Codes_SRS_UMOCKCALLRECORDER_01_027: [ umockcallrecorder_get_expected_calls shall return a pointer to the string representation of all the expected calls. ]*/ result = umock_call_recorder->expected_calls_string; } } else { /* Codes_SRS_UMOCKCALLRECORDER_01_027: [ umockcallrecorder_get_expected_calls shall return a pointer to the string representation of all the expected calls. ]*/ result = umock_call_recorder->expected_calls_string; } } } return result; } const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { const char* result; if (umock_call_recorder == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_024: [ If the umock_call_recorder is NULL, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ UMOCK_LOG("umockcallrecorder: NULL umock_call_recorder in get actual calls."); result = NULL; } else { size_t i; char* new_actual_calls_string; if (umock_call_recorder->actual_call_count == 0) { new_actual_calls_string = (char*)umockalloc_realloc(umock_call_recorder->actual_calls_string, 1); if (new_actual_calls_string == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_026: [ If allocating memory for the resulting string fails, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ UMOCK_LOG("umockcallrecorder: Cannot allocate memory for actual calls."); result = NULL; } else { umock_call_recorder->actual_calls_string = new_actual_calls_string; umock_call_recorder->actual_calls_string[0] = '\0'; /* Codes_SRS_UMOCKCALLRECORDER_01_022: [ umockcallrecorder_get_actual_calls shall return a pointer to the string representation of all the actual calls. ]*/ result = umock_call_recorder->actual_calls_string; } } else { size_t current_length = 0; for (i = 0; i < umock_call_recorder->actual_call_count; i++) { /* Codes_SRS_UMOCKCALLRECORDER_01_023: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ char* stringified_call = umockcall_stringify(umock_call_recorder->actual_calls[i]); if (stringified_call == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_025: [ If umockcall_stringify fails, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ break; } else { size_t stringified_call_length = strlen(stringified_call); new_actual_calls_string = (char*)umockalloc_realloc(umock_call_recorder->actual_calls_string, current_length + stringified_call_length + 1); if (new_actual_calls_string == NULL) { umockalloc_free(stringified_call); /* Codes_SRS_UMOCKCALLRECORDER_01_026: [ If allocating memory for the resulting string fails, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ break; } else { umock_call_recorder->actual_calls_string = new_actual_calls_string; (void)memcpy(umock_call_recorder->actual_calls_string + current_length, stringified_call, stringified_call_length + 1); current_length += stringified_call_length; } umockalloc_free(stringified_call); } } if (i < umock_call_recorder->actual_call_count) { result = NULL; } else { /* Codes_SRS_UMOCKCALLRECORDER_01_022: [ umockcallrecorder_get_actual_calls shall return a pointer to the string representation of all the actual calls. ]*/ result = umock_call_recorder->actual_calls_string; } } } return result; } UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { UMOCKCALL_HANDLE result; if (umock_call_recorder == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_033: [ If umock_call_recorder is NULL, umockcallrecorder_get_last_expected_call shall fail and return NULL. ]*/ UMOCK_LOG("umockcallrecorder: NULL umock_call_recorder in get last expected calls."); result = NULL; } else { if (umock_call_recorder->expected_call_count == 0) { /* Codes_SRS_UMOCKCALLRECORDER_01_034: [ If no expected call has been recorded for umock_call_recorder then umockcallrecorder_get_last_expected_call shall fail and return NULL. ]*/ UMOCK_LOG("umockcallrecorder: No expected calls recorded."); result = NULL; } else { /* Codes_SRS_UMOCKCALLRECORDER_01_032: [ umockcallrecorder_get_last_expected_call shall return the last expected call for the umock_call_recorder call recorder. ]*/ result = umock_call_recorder->expected_calls[umock_call_recorder->expected_call_count - 1].umockcall; } } return result; } /* Codes_SRS_UMOCKCALLRECORDER_01_035: [ umockcallrecorder_clone shall clone a call recorder and return a handle to the newly cloned call recorder. ]*/ UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { UMOCKCALLRECORDER_HANDLE result; if (umock_call_recorder == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_036: [ If the umock_call_recorder argument is NULL, umockcallrecorder_clone shall fail and return NULL. ]*/ UMOCK_LOG("umockcallrecorder_clone: NULL umock_call_recorder."); result = NULL; } else { /* Codes_SRS_UMOCKCALLRECORDER_01_037: [ If allocating memory for the new umock call recorder instance fails, umockcallrecorder_clone shall fail and return NULL. ]*/ result = umockcallrecorder_create(); if (result != NULL) { size_t i; result->expected_calls = (UMOCK_EXPECTED_CALL*)umockalloc_malloc(sizeof(UMOCK_EXPECTED_CALL) * umock_call_recorder->expected_call_count); if (result->expected_calls == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_052: [ If allocating memory for the expected calls fails, umockcallrecorder_clone shall fail and return NULL. ]*/ umockcallrecorder_destroy(result); result = NULL; UMOCK_LOG("umockcallrecorder: clone call recorder failed - cannot allocate expected_calls."); } else { for (i = 0; i < umock_call_recorder->expected_call_count; i++) { result->expected_calls[i].umockcall = NULL; } /* Codes_SRS_UMOCKCALLRECORDER_01_038: [ umockcallrecorder_clone shall clone all the expected calls. ]*/ for (i = 0; i < umock_call_recorder->expected_call_count; i++) { result->expected_calls[i].is_matched = umock_call_recorder->expected_calls[i].is_matched; /* Codes_SRS_UMOCKCALLRECORDER_01_039: [ Each expected call shall be cloned by calling umockcall_clone. ]*/ result->expected_calls[i].umockcall = umockcall_clone(umock_call_recorder->expected_calls[i].umockcall); if (result->expected_calls[i].umockcall == NULL) { break; } } if (i < umock_call_recorder->expected_call_count) { size_t j; /* Codes_SRS_UMOCKCALLRECORDER_01_040: [ If cloning an expected call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ for (j = 0; j < i; j++) { umockcall_destroy(result->expected_calls[j].umockcall); result->expected_calls[j].umockcall = NULL; } umockcallrecorder_destroy(result); result = NULL; UMOCK_LOG("umockcallrecorder: clone call recorder failed - cannot clone all expected calls."); } else { result->expected_call_count = umock_call_recorder->expected_call_count; result->actual_calls = (UMOCKCALL_HANDLE*)umockalloc_malloc(sizeof(UMOCKCALL_HANDLE) * umock_call_recorder->actual_call_count); if (result->actual_calls == NULL) { /* Codes_SRS_UMOCKCALLRECORDER_01_053: [ If allocating memory for the actual calls fails, umockcallrecorder_clone shall fail and return NULL. ]*/ umockcallrecorder_destroy(result); result = NULL; UMOCK_LOG("umockcallrecorder: clone call recorder failed - cannot allocate expected_calls."); } else { for (i = 0; i < umock_call_recorder->actual_call_count; i++) { result->actual_calls[i] = NULL; } /* Codes_SRS_UMOCKCALLRECORDER_01_041: [ umockcallrecorder_clone shall clone all the actual calls. ]*/ for (i = 0; i < umock_call_recorder->actual_call_count; i++) { /* Codes_SRS_UMOCKCALLRECORDER_01_042: [ Each actual call shall be cloned by calling umockcall_clone. ]*/ result->actual_calls[i] = umockcall_clone(umock_call_recorder->actual_calls[i]); if (result->actual_calls[i] == NULL) { break; } } if (i < umock_call_recorder->actual_call_count) { size_t j; /* Codes_SRS_UMOCKCALLRECORDER_01_043: [ If cloning an actual call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ for (j = 0; j < i; j++) { umockcall_destroy(result->actual_calls[j]); result->actual_calls[j] = NULL; } umockcallrecorder_destroy(result); result = NULL; UMOCK_LOG("umockcallrecorder: clone call recorder failed - cannot clone all actual calls."); } else { result->actual_call_count = umock_call_recorder->actual_call_count; } } } } } } return result; } int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count) { int result; if ((umock_call_recorder == NULL) || (expected_call_count == NULL)) { /* Codes_SRS_UMOCKCALLRECORDER_01_046: [ If any of the arguments is NULL, umockcallrecorder_get_expected_call_count shall return a non-zero value. ]*/ result = __LINE__; UMOCK_LOG("umockcallrecorder_get_expected_call_count: Invalid arguments, umock_call_recorder = %p, expected_call_count = %p", umock_call_recorder, expected_call_count); } else { /* Codes_SRS_UMOCKCALLRECORDER_01_044: [ umockcallrecorder_get_expected_call_count shall return in the expected_call_count argument the number of expected calls associated with the call recorder. ]*/ *expected_call_count = umock_call_recorder->expected_call_count; /* Codes_SRS_UMOCKCALLRECORDER_01_045: [ On success umockcallrecorder_get_expected_call_count shall return 0. ]*/ result = 0; } return result; } int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index) { int result; /* Codes_SRS_UMOCKCALLRECORDER_01_049: [ If umock_call_recorder is NULL, umockcallrecorder_fail_call shall return a non-zero value. ]*/ if ((umock_call_recorder == NULL) || /* Codes_SRS_UMOCKCALLRECORDER_01_050: [ If index is invalid, umockcallrecorder_fail_call shall return a non-zero value. ]*/ (index >= umock_call_recorder->expected_call_count)) { result = __LINE__; UMOCK_LOG("umockcallrecorder_fail_call: NULL Invalid arguments, umock_call_recorder = %p, index = %zu", umock_call_recorder, index); } else { /* Codes_SRS_UMOCKCALLRECORDER_01_047: [ umockcallrecorder_fail_call shall mark an expected call as to be failed by calling umockcall_set_fail_call with a 1 value for fail_call. ]*/ if (umockcall_set_fail_call(umock_call_recorder->expected_calls[index].umockcall, 1) != 0) { /* Codes_SRS_UMOCKCALLRECORDER_01_051: [ If umockcall_set_fail_call fails, umockcallrecorder_fail_call shall return a non-zero value. ]*/ result = __LINE__; UMOCK_LOG("umockcallrecorder_fail_call: umockcall_set_fail_call failed."); } else { /* Codes_SRS_UMOCKCALLRECORDER_01_048: [ On success, umockcallrecorder_fail_call shall return 0. ]*/ result = 0; } } return result; } umockstring.c000066400000000000000000000027501362133436400361570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "umockalloc.h" #include "umockstring.h" #include "umock_log.h" char* umockstring_clone(const char* source) { char* result; if (source == NULL) { /* Codes_UMOCK_STRING_01_005: [ If `umockstring_clone` is called with a NULL `source`, it shall return NULL. ]*/ UMOCK_LOG("umockstring_clone called with NULL source"); result = NULL; } else { size_t string_length = strlen(source); /* Codes_UMOCK_STRING_01_001: [ `umockstring_clone` shall allocate memory for the cloned string (including the NULL terminator). ]*/ /* Codes_UMOCK_STRING_01_003: [ On success `umockstring_clone` shall return a pointer to the newly allocated memory containing the copy of the string. ]*/ result = (char*)umockalloc_malloc(string_length + 1); if (result == NULL) { /* Codes_UMOCK_STRING_01_004: [ If allocating the memory fails, `umockstring_clone` shall return NULL. ]*/ UMOCK_LOG("Error allocating memory for string clone"); } else { /* Codes_UMOCK_STRING_01_002: [ `umockstring_clone` shall copy the string to the newly allocated memory (including the NULL terminator). ]*/ (void)memcpy(result, source, string_length + 1); } } return result; } umocktypename.c000066400000000000000000000116611362133436400364740ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include "umocktypename.h" #include "umockalloc.h" #include "umock_log.h" char* umocktypename_normalize(const char* type_name) { char* result; if (type_name == NULL) { /* Codes_SRS_UMOCKTYPENAME_01_005: [ If typename is NULL, then umocktypename_normalize shall fail and return NULL. ]*/ UMOCK_LOG("umocktypename: NULL type_name."); result = NULL; } else { size_t length = 0; size_t pos = 0; size_t last_pos; /* we first compute how much space we need for the normalized version ... */ while (type_name[pos] != '\0') { last_pos = pos; /* find all the spaces first */ while ((type_name[pos] != '\0') && (isspace(type_name[pos]))) { pos++; } /* we got a bunch of spaces, figure out whether we need to add any spaces to the normalized type name or not */ /* Codes_SRS_UMOCKTYPENAME_01_002: [ umocktypename_normalize shall remove all spaces at the beginning of the typename. ]*/ /* Codes_SRS_UMOCKTYPENAME_01_003: [ umocktypename_normalize shall remove all spaces at the end of the typename. ] */ /* Codes_SRS_UMOCKTYPENAME_01_006: [ No space shall exist between any other token and a star. ]*/ if ((last_pos == 0) || (type_name[pos] == '\0') || (type_name[last_pos - 1] == '*') || (type_name[pos] == '*')) { /* do not add any spaces */ } else { /* add one space */ /* Codes_SRS_UMOCKTYPENAME_01_004: [ umocktypename_normalize shall remove all extra spaces (more than 1 space) between elements that are part of the typename. ]*/ length ++; } /* found something that is a non-space character, add to the normalized type name */ while ((type_name[pos] != '\0') && (!isspace(type_name[pos]))) { pos++; length++; } } if (length == 0) { /* Codes_SRS_UMOCKTYPENAME_01_007: [ If the length of the normalized typename is 0, umocktypename_normalize shall return NULL. ]*/ UMOCK_LOG("umocktypename: 0 length for the normalized type name."); result = NULL; } else { /* ... then we allocate*/ /* Codes_SRS_UMOCKTYPENAME_01_001: [ umocktypename_normalize shall return a char\* with a newly allocated string that contains the normalized typename. ]*/ result = (char*)umockalloc_malloc(length + 1); /* Codes_SRS_UMOCKTYPENAME_01_008: [ If allocating memory fails, umocktypename_normalize shall fail and return NULL. ]*/ if (result != NULL) { pos = 0; length = 0; (void)last_pos; while (type_name[pos] != '\0') { last_pos = pos; /* find all the spaces first */ while ((type_name[pos] != '\0') && (isspace(type_name[pos]))) { pos++; } /* we got a bunch of spaces, figure out whether we need to add any spaces to the normalized type name or not */ /* Codes_SRS_UMOCKTYPENAME_01_002: [ umocktypename_normalize shall remove all spaces at the beginning of the typename. ]*/ /* Codes_SRS_UMOCKTYPENAME_01_003: [ umocktypename_normalize shall remove all spaces at the end of the typename. ] */ /* Codes_SRS_UMOCKTYPENAME_01_006: [ No space shall exist between any other token and a star. ]*/ if ((last_pos == 0) || (type_name[pos] == '\0') || (type_name[last_pos - 1] == '*') || (type_name[pos] == '*')) { /* do not add any spaces */ } else { /* add one space */ /* Codes_SRS_UMOCKTYPENAME_01_004: [ umocktypename_normalize shall remove all extra spaces (more than 1 space) between elements that are part of the typename. ]*/ result[length++] = ' '; } /* found something that is a non-space character, add to the normalized type name */ while ((type_name[pos] != '\0') && (!isspace(type_name[pos]))) { result[length++] = type_name[pos++]; } } result[length] = '\0'; } } } return result; } umocktypes.c000066400000000000000000000574201362133436400360210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "umocktypes.h" #include "umocktypename.h" #include "umockalloc.h" #include "umock_log.h" typedef struct UMOCK_VALUE_TYPE_HANDLERS_TAG { char* type; UMOCKTYPE_STRINGIFY_FUNC stringify_func; UMOCKTYPE_COPY_FUNC copy_func; UMOCKTYPE_FREE_FUNC free_func; UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func; } UMOCK_VALUE_TYPE_HANDLERS; typedef enum UMOCKTYPES_STATE_TAG { UMOCKTYPES_STATE_NOT_INITIALIZED, UMOCKTYPES_STATE_INITIALIZED } UMOCKTYPES_STATE; static UMOCK_VALUE_TYPE_HANDLERS* type_handlers = NULL; static size_t type_handler_count = 0; static UMOCKTYPES_STATE umocktypes_state = UMOCKTYPES_STATE_NOT_INITIALIZED; static UMOCK_VALUE_TYPE_HANDLERS* get_value_type_handlers(const char* type_name) { UMOCK_VALUE_TYPE_HANDLERS* result; size_t i; for (i = 0; i < type_handler_count; i++) { if (strcmp(type_handlers[i].type, type_name) == 0) { break; } } if (i < type_handler_count) { result = &type_handlers[i]; } else { result = NULL; } return result; } /* Codes_SRS_UMOCKTYPES_01_001: [ umocktypes_init shall initialize the umocktypes module. ] */ int umocktypes_init(void) { int result; if (umocktypes_state == UMOCKTYPES_STATE_INITIALIZED) { /* Codes_SRS_UMOCKTYPES_01_004: [ umocktypes_init after another umocktypes_init without deinitializing the module shall fail and return a non-zero value. ]*/ UMOCK_LOG("umock_c already initialized.\r\n"); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_01_002: [ After initialization the list of registered type shall be empty. ] */ type_handlers = NULL; type_handler_count = 0; umocktypes_state = UMOCKTYPES_STATE_INITIALIZED; /* Codes_SRS_UMOCKTYPES_01_003: [ On success umocktypes_init shall return 0. ]*/ result = 0; } return result; } void umocktypes_deinit(void) { /* Codes_SRS_UMOCKTYPES_01_006: [ If the module was not initialized, umocktypes_deinit shall do nothing. ]*/ if (umocktypes_state == UMOCKTYPES_STATE_INITIALIZED) { size_t i; /* Codes_SRS_UMOCKTYPES_01_005: [ umocktypes_deinit shall free all resources associated with the registered types and shall leave the module in a state where another init is possible. ]*/ for (i = 0; i < type_handler_count; i++) { umockalloc_free(type_handlers[i].type); } umockalloc_free(type_handlers); type_handlers = NULL; type_handler_count = 0; /* Codes_SRS_UMOCKTYPES_01_040: [ An umocktypes_init call after deinit shall succeed provided all underlying calls succeed. ]*/ umocktypes_state = UMOCKTYPES_STATE_NOT_INITIALIZED; } } int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func) { int result; if ((type == NULL) || (stringify_func == NULL) || (are_equal_func == NULL) || (copy_func == NULL) || (free_func == NULL)) { /* Codes_SRS_UMOCKTYPES_01_009: [ If any of the arguments is NULL, umocktypes_register_type shall fail and return a non-zero value. ]*/ UMOCK_LOG("Invalid arguments when registering umock_c type: type = %p, stringify_func = %p, are_equal_func = %p, copy_func = %p, free_func = %p.\r\n", type, stringify_func, are_equal_func, copy_func, free_func); result = __LINE__; } /* Codes_SRS_UMOCKTYPES_01_050: [ If umocktypes_register_type is called when the module is not initialized, umocktypes_register_type shall fail and return a non zero value. ]*/ else if (umocktypes_state != UMOCKTYPES_STATE_INITIALIZED) { UMOCK_LOG("Could not register type, umock_c not initialized.\r\n"); result = __LINE__; } else { char* normalized_type = umocktypename_normalize(type); if (normalized_type == NULL) { /* Codes_SRS_UMOCKTYPES_01_045: [ If normalizing the typename fails, umocktypes_register_type shall fail and return a non-zero value. ]*/ UMOCK_LOG("Normalizing type %s failed.\r\n", type); result = __LINE__; } else { UMOCK_VALUE_TYPE_HANDLERS* type_handler = get_value_type_handlers(normalized_type); if (type_handler != NULL) { umockalloc_free(normalized_type); if ((stringify_func != type_handler->stringify_func) || (are_equal_func != type_handler->are_equal_func) || (copy_func != type_handler->copy_func) || (free_func != type_handler->free_func)) { /* Codes_SRS_UMOCKTYPES_01_011: [ If the type has already been registered but at least one of the function pointers is different, umocktypes_register_type shall fail and return a non-zero value. ]*/ UMOCK_LOG("Could not register type, type %s already registered with different handlers.\r\n", type); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_01_010: [ If the type has already been registered with the same function pointers then umocktypes_register_type shall succeed and return 0. ]*/ result = 0; } } else { UMOCK_VALUE_TYPE_HANDLERS* new_type_handlers = (UMOCK_VALUE_TYPE_HANDLERS*)umockalloc_realloc(type_handlers, sizeof(UMOCK_VALUE_TYPE_HANDLERS) * (type_handler_count + 1)); if (new_type_handlers == NULL) { /* Codes_SRS_UMOCKTYPES_01_012: [ If an error occurs allocating memory for the newly registered type, umocktypes_register_type shall fail and return a non-zero value. ]*/ umockalloc_free(normalized_type); UMOCK_LOG("Could not register type, failed allocating memory for types.\r\n"); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_01_007: [ umocktypes_register_type shall register an interface made out of the stringify, are equal, copy and free functions for the type identified by the argument type. ] */ type_handlers = new_type_handlers; type_handlers[type_handler_count].type = normalized_type; type_handlers[type_handler_count].stringify_func = stringify_func; type_handlers[type_handler_count].copy_func = copy_func; type_handlers[type_handler_count].free_func = free_func; type_handlers[type_handler_count].are_equal_func = are_equal_func; type_handler_count++; /* Codes_SRS_UMOCKTYPES_01_008: [ On success umocktypes_register_type shall return 0. ]*/ result = 0; } } } } return result; } /* Codes_SRS_UMOCKTYPES_01_053: [ umocktypes_register_alias_type shall register a new alias type for the type "is_type". ]*/ int umocktypes_register_alias_type(const char* type, const char* is_type) { int result; /* Codes_SRS_UMOCKTYPES_01_055: [ If any of the arguments is NULL, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ if ((type == NULL) || (is_type == NULL)) { UMOCK_LOG("Could not register alias type, bad arguments: type = %p, is_type = %p.\r\n", type, is_type); result = __LINE__; } else if (umocktypes_state != UMOCKTYPES_STATE_INITIALIZED) { UMOCK_LOG("Could not register alias type, umock_c_types not initialized.\r\n"); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_01_058: [ Before looking it up, is_type shall be normalized by using umocktypename_normalize. ] */ char* normalized_is_type = umocktypename_normalize(is_type); if (normalized_is_type == NULL) { /* Codes_SRS_UMOCKTYPES_01_060: [ If umocktypename_normalize fails, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ UMOCK_LOG("Could not register alias type, normalizing type %s failed.\r\n", is_type); result = __LINE__; } else { UMOCK_VALUE_TYPE_HANDLERS* new_type_handlers = (UMOCK_VALUE_TYPE_HANDLERS*)umockalloc_realloc(type_handlers, sizeof(UMOCK_VALUE_TYPE_HANDLERS) * (type_handler_count + 1)); if (new_type_handlers == NULL) { UMOCK_LOG("Could not register alias type, failed allocating memory.\r\n"); result = __LINE__; } else { UMOCK_VALUE_TYPE_HANDLERS* value_type_handlers; type_handlers = new_type_handlers; value_type_handlers = get_value_type_handlers(normalized_is_type); if (value_type_handlers == NULL) { /* Codes_SRS_UMOCKTYPES_01_057: [ If is_type was not already registered, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ UMOCK_LOG("Could not register alias type, type %s was not previously registered.\r\n", normalized_is_type); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_01_059: [ Before adding it as alias, type shall be normalized by using umocktypename_normalize. ]*/ char* normalized_type = umocktypename_normalize(type); if (normalized_type == NULL) { /* Codes_SRS_UMOCKTYPES_01_060: [ If umocktypename_normalize fails, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ UMOCK_LOG("Could not register alias type, normalizing type %s failed.\r\n", type); result = __LINE__; } else { if (strcmp(normalized_type, normalized_is_type) == 0) { umockalloc_free(normalized_type); /* Codes_SRS_UMOCKTYPES_01_062: [ If type and is_type are the same, umocktypes_register_alias_type shall succeed and return 0. ]*/ result = 0; } else { type_handlers[type_handler_count].type = normalized_type; type_handlers[type_handler_count].stringify_func = value_type_handlers->stringify_func; type_handlers[type_handler_count].copy_func = value_type_handlers->copy_func; type_handlers[type_handler_count].free_func = value_type_handlers->free_func; type_handlers[type_handler_count].are_equal_func = value_type_handlers->are_equal_func; type_handler_count++; /* Codes_SRS_UMOCKTYPES_01_054: [ On success, umocktypes_register_alias_type shall return 0. ]*/ result = 0; } } } } umockalloc_free(normalized_is_type); } } return result; } /* Codes_SRS_UMOCKTYPES_01_013: [ umocktypes_stringify shall return a char\* with the string representation of the value argument. ]*/ char* umocktypes_stringify(const char* type, const void* value) { char* result; if ((type == NULL) || (value == NULL)) { /* Codes_SRS_UMOCKTYPES_01_016: [ If any of the arguments is NULL, umocktypes_stringify shall fail and return NULL. ]*/ UMOCK_LOG("Could not stringify type, bad arguments: type = %p, value = %p.\r\n", type, value); result = NULL; } /* Codes_SRS_UMOCKTYPES_01_049: [ If umocktypes_stringify is called when the module is not initialized, umocktypes_stringify shall return NULL. ]*/ else if (umocktypes_state != UMOCKTYPES_STATE_INITIALIZED) { UMOCK_LOG("Could not stringify type, umock_c_types not initialized.\r\n"); result = NULL; } else { /* Codes_SRS_UMOCKTYPES_01_035: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ char* normalized_type = umocktypename_normalize(type); if (normalized_type == NULL) { /* Codes_SRS_UMOCKTYPES_01_044: [ If normalizing the typename fails, umocktypes_stringify shall fail and return NULL. ]*/ UMOCK_LOG("Could not stringify type, normalizing type %s failed.\r\n", type); result = NULL; } else { size_t normalized_type_length = strlen(normalized_type); UMOCK_VALUE_TYPE_HANDLERS* value_type_handlers = get_value_type_handlers(normalized_type); /* Codes_SRS_UMOCK_C_LIB_01_153: [ If no custom handler has beed registered for a pointer type, it shall be trated as void*. ] */ if ((value_type_handlers == NULL) && (normalized_type[normalized_type_length - 1] == '*')) { /* Codes_SRS_UMOCKTYPES_01_063: [ If type is a pointer type and type was not registered then umocktypes_stringify shall execute as if type is void*. ]*/ value_type_handlers = get_value_type_handlers("void*"); } if (value_type_handlers == NULL) { /* Codes_SRS_UMOCKTYPES_01_017: [ If type can not be found in the registered types list maintained by the module, umocktypes_stringify shall fail and return NULL. ]*/ UMOCK_LOG("Could not stringify type, type %s not registered.\r\n", normalized_type); result = NULL; } else { /* Codes_SRS_UMOCKTYPES_01_014: [ The string representation shall be obtained by calling the stringify function registered for the type identified by the argument type. ]*/ /* Codes_SRS_UMOCKTYPES_01_015: [ On success umocktypes_stringify shall return the char\* produced by the underlying stringify function for type (passed in umocktypes_register_type). ]*/ result = value_type_handlers->stringify_func(value); } umockalloc_free(normalized_type); } } return result; } /* Codes_SRS_UMOCKTYPES_01_018: [ umocktypes_are_equal shall evaluate whether 2 values are equal. ]*/ int umocktypes_are_equal(const char* type, const void* left, const void* right) { int result; if ((type == NULL) || (left == NULL) || (right == NULL)) { /* Codes_SRS_UMOCKTYPES_01_023: [ If any of the arguments is NULL, umocktypes_are_equal shall fail and return -1. ]*/ UMOCK_LOG("Could not compare values for type, bad arguments: type = %p, left = %p, right = %p.\r\n", type, left, right); result = -1; } else if(umocktypes_state != UMOCKTYPES_STATE_INITIALIZED) { /* Codes_SRS_UMOCKTYPES_01_046: [ If umocktypes_are_equal is called when the module is not initialized, umocktypes_are_equal shall return -1. ] */ UMOCK_LOG("Could not compare values for type, umock_c_types not initialized.\r\n"); result = -1; } else { /* Codes_SRS_UMOCKTYPES_01_036: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ char* normalized_type = umocktypename_normalize(type); if (normalized_type == NULL) { /* Codes_SRS_UMOCKTYPES_01_043: [ If normalizing the typename fails, umocktypes_are_equal shall fail and return -1. ]*/ UMOCK_LOG("Could not compare values for type, normalizing type %s failed.\r\n", type); result = -1; } else { size_t normalized_type_length = strlen(normalized_type); UMOCK_VALUE_TYPE_HANDLERS* value_type_handlers = get_value_type_handlers(normalized_type); /* Codes_SRS_UMOCK_C_LIB_01_153: [ If no custom handler has beed registered for a pointer type, it shall be trated as void*. ] */ if ((value_type_handlers == NULL) && (normalized_type[normalized_type_length - 1] == '*')) { /* Codes_SRS_UMOCKTYPES_01_064: [ If type is a pointer type and type was not registered then umocktypes_are_equal shall execute as if type is void*. ]*/ value_type_handlers = get_value_type_handlers("void*"); } if (value_type_handlers == NULL) { /* Codes_SRS_UMOCKTYPES_01_024: [ If type can not be found in the registered types list maintained by the module, umocktypes_are_equal shall fail and return -1. ]*/ UMOCK_LOG("Could not compare values for type, type %s not registered.\r\n", normalized_type); result = -1; } else { /* Codes_SRS_UMOCKTYPES_01_051: [ If the pointer values for left and right are equal, umocktypes_are_equal shall return 1 without calling the underlying are_equal function. ]*/ if (left == right) { result = 1; } else { /* Codes_SRS_UMOCKTYPES_01_019: [ umocktypes_are_equal shall call the underlying are_equal function for the type identified by the argument type (passed in umocktypes_register_type). ] */ switch (value_type_handlers->are_equal_func(left, right)) { default: /* Codes_SRS_UMOCKTYPES_01_020: [ If the underlying are_equal function fails,, umocktypes_are_equal shall fail and return -1. ] */ UMOCK_LOG("Underlying compare failed for type %s.\r\n", normalized_type); result = -1; break; case 1: /* Codes_SRS_UMOCKTYPES_01_021: [ If the underlying are_equal function indicates the types are equal, umocktypes_are_equal shall return 1. ]*/ result = 1; break; case 0: /* Codes_SRS_UMOCKTYPES_01_022: [ If the underlying are_equal function indicates the types are not equal, umocktypes_are_equal shall return 0. ]*/ result = 0; break; } } } umockalloc_free(normalized_type); } } return result; } /* Codes_SRS_UMOCKTYPES_01_025: [ umocktypes_copy shall copy the value of the source into the destination argument. ]*/ int umocktypes_copy(const char* type, void* destination, const void* source) { int result; if ((type == NULL) || (destination == NULL) || (source == NULL)) { /* Codes_SRS_UMOCKTYPES_01_027: [ If any of the arguments is NULL, umocktypes_copy shall return -1. ]*/ UMOCK_LOG("Could not copy type, bad arguments: type = %p, destination = %p, source = %p.\r\n", type, destination, source); result = -1; } else if (umocktypes_state != UMOCKTYPES_STATE_INITIALIZED) { /* Codes_SRS_UMOCKTYPES_01_047: [ If umocktypes_copy is called when the module is not initialized, umocktypes_copy shall fail and return a non zero value. ]*/ UMOCK_LOG("Could not copy type, umock_c_types not initialized.\r\n"); result = -1; } else { /* Codes_SRS_UMOCKTYPES_01_037: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ char* normalized_type = umocktypename_normalize(type); if (normalized_type == NULL) { /* Codes_SRS_UMOCKTYPES_01_042: [ If normalizing the typename fails, umocktypes_copy shall fail and return a non-zero value. ]*/ UMOCK_LOG("Could not copy type, normalizing type %s failed.\r\n", type); result = -1; } else { size_t normalized_type_length = strlen(normalized_type); UMOCK_VALUE_TYPE_HANDLERS* value_type_handlers = get_value_type_handlers(normalized_type); /* Codes_SRS_UMOCK_C_LIB_01_153: [ If no custom handler has beed registered for a pointer type, it shall be trated as void*. ] */ if ((value_type_handlers == NULL) && (normalized_type[normalized_type_length - 1] == '*')) { /* Codes_SRS_UMOCKTYPES_01_065: [ If type is a pointer type and type was not registered then umocktypes_copy shall execute as if type is void*. ]*/ value_type_handlers = get_value_type_handlers("void*"); } if (value_type_handlers == NULL) { /* Codes_SRS_UMOCKTYPES_01_029: [ If type can not be found in the registered types list maintained by the module, umocktypes_copy shall fail and return -1. ]*/ UMOCK_LOG("Could not copy type, type %s not registered.\r\n", normalized_type); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_01_026: [ The copy shall be done by calling the underlying copy function (passed in umocktypes_register_type) for the type identified by the type argument. ]*/ /* Codes_SRS_UMOCKTYPES_01_052: [ On success, umocktypes_copy shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_01_028: [ If the underlying copy fails, umocktypes_copy shall return -1. ]*/ result = value_type_handlers->copy_func(destination, source); } umockalloc_free(normalized_type); } } return result; } /* Codes_SRS_UMOCKTYPES_01_030: [ umocktypes_free shall free a value previously allocated with umocktypes_copy. ]*/ void umocktypes_free(const char* type, void* value) { /* Codes_SRS_UMOCKTYPES_01_031: [ If any of the arguments is NULL, umocktypes_free shall do nothing. ]*/ if ((type != NULL) && (value != NULL) && /* Codes_SRS_UMOCKTYPES_01_048: [ If umocktypes_free is called when the module is not initialized, umocktypes_free shall do nothing. ]*/ (umocktypes_state == UMOCKTYPES_STATE_INITIALIZED)) { /* Codes_SRS_UMOCKTYPES_01_038: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ char* normalized_type = umocktypename_normalize(type); /* Codes_SRS_UMOCKTYPES_01_032: [ If type can not be found in the registered types list maintained by the module, umocktypes_free shall do nothing. ]*/ if (normalized_type != NULL) { size_t normalized_type_length = strlen(normalized_type); UMOCK_VALUE_TYPE_HANDLERS* value_type_handlers = get_value_type_handlers(normalized_type); /* Codes_SRS_UMOCK_C_LIB_01_153: [ If no custom handler has beed registered for a pointer type, it shall be trated as void*. ] */ if ((value_type_handlers == NULL) && (normalized_type[normalized_type_length - 1] == '*')) { /* Codes_SRS_UMOCKTYPES_01_066: [ If type is a pointer type and type was not registered then umocktypes_free shall execute as if type is void*. ]*/ value_type_handlers = get_value_type_handlers("void*"); } if (value_type_handlers != NULL) { /* Codes_SRS_UMOCKTYPES_01_033: [ The free shall be done by calling the underlying free function (passed in umocktypes_register_type) for the type identified by the type argument. ]*/ value_type_handlers->free_func(value); } umockalloc_free(normalized_type); } } } umocktypes_bool.c000066400000000000000000000102751362133436400370310ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "macro_utils.h" #include "umocktypes.h" #include "umock_c.h" #include "umockalloc.h" #include "umocktypes_bool.h" /* Codes_SRS_UMOCKTYPES_BOOL_01_002: [ umocktypes_stringify_bool shall return the string representation of value. ]*/ char* umocktypes_stringify_bool(const bool* value) { char* result; /* Codes_SRS_UMOCKTYPES_BOOL_01_003: [ If value is NULL, umocktypes_stringify_bool shall return NULL. ]*/ if (value == NULL) { UMOCK_LOG("umocktypes_stringify_bool: NULL value."); result = NULL; } else { const char* stringified_bool = *value ? "true" : "false"; size_t length = strlen(stringified_bool); /* Codes_SRS_UMOCKTYPES_BOOL_01_004: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_bool shall return NULL. ]*/ result = (char*)umockalloc_malloc(length + 1); if (result == NULL) { UMOCK_LOG("umocktypes_stringify_bool: Cannot allocate memory for result."); } else { (void)memcpy(result, stringified_bool, length + 1); } } return result; } /* Codes_SRS_UMOCKTYPES_BOOL_01_006: [ umocktypes_are_equal_bool shall compare the 2 chars pointed to by left and right. ]*/ int umocktypes_are_equal_bool(const bool* left, const bool* right) { int result; if ((left == NULL) || (right == NULL)) { /* Codes_SRS_UMOCKTYPES_BOOL_01_007: [ If any of the arguments is NULL, umocktypes_are_equal_bool shall return -1. ]*/ UMOCK_LOG("umocktypes_are_equal_bool: Bad arguments:left = %p, right = %p.", left, right); result = -1; } else { /* Codes_SRS_UMOCKTYPES_BOOL_01_009: [ If the values pointed to by left and right are different, umocktypes_are_equal_bool shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_BOOL_01_008: [ If the values pointed to by left and right are equal, umocktypes_are_equal_bool shall return 1. ]*/ result = ((*left) == (*right)) ? 1 : 0; } return result; } /* Codes_SRS_UMOCKTYPES_BOOL_01_010: [ umocktypes_copy_bool shall copy the bool value from source to destination. ]*/ int umocktypes_copy_bool(bool* destination, const bool* source) { int result; if ((destination == NULL) || (source == NULL)) { /* Codes_SRS_UMOCKTYPES_BOOL_01_012: [ If source or destination are NULL, umocktypes_copy_bool shall return a non-zero value. ]*/ UMOCK_LOG("umocktypes_copy_bool: Bad arguments:destination = %p, source = %p.", destination, source); result = __LINE__; } else { *destination = *source; /* Codes_SRS_UMOCKTYPES_BOOL_01_011: [ On success umocktypes_copy_bool shall return 0. ]*/ result = 0; } return result; } /* Codes_SRS_UMOCKTYPES_BOOL_01_013: [ umocktypes_free_bool shall do nothing. ]*/ void umocktypes_free_bool(bool* value) { (void)value; } int umocktypes_bool_register_types(void) { int result; /* Codes_SRS_UMOCKTYPES_BOOL_01_001: [ umocktypes_bool_register_types shall register support for all the types in the module. ]*/ if ((umocktypes_register_type("bool", (UMOCKTYPE_STRINGIFY_FUNC)umocktypes_stringify_bool, (UMOCKTYPE_ARE_EQUAL_FUNC)umocktypes_are_equal_bool, (UMOCKTYPE_COPY_FUNC)umocktypes_copy_bool, (UMOCKTYPE_FREE_FUNC)umocktypes_free_bool) != 0) || (umocktypes_register_type("_Bool", (UMOCKTYPE_STRINGIFY_FUNC)umocktypes_stringify_bool, (UMOCKTYPE_ARE_EQUAL_FUNC)umocktypes_are_equal_bool, (UMOCKTYPE_COPY_FUNC)umocktypes_copy_bool, (UMOCKTYPE_FREE_FUNC)umocktypes_free_bool) != 0)) { /* Codes_SRS_UMOCKTYPES_BOOL_01_015: [ If registering any of the types fails, umocktypes_bool_register_types shall fail and return a non-zero value. ]*/ UMOCK_LOG("umocktypes_bool_register_types: Cannot register types."); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_BOOL_01_014: [ On success, umocktypes_bool_register_types shall return 0. ]*/ result = 0; } return result; } umocktypes_c.c000066400000000000000000000651131362133436400363210ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include "macro_utils.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "umockalloc.h" #include "umock_log.h" #ifdef _MSC_VER #define snprintf _snprintf #endif #ifdef MAX_UMOCK_TYPE_STRINGIFY_SIZE #define IMPLEMENT_STRINGIFY(type, function_postfix, printf_specifier) \ char* C2(umocktypes_stringify_,function_postfix)(type* value) \ { \ char* result; \ if (value == NULL) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_stringify_,function_postfix)) ": NULL value."); \ result = NULL; \ } \ else \ { \ char temp_buffer[MAX_UMOCK_TYPE_STRINGIFY_SIZE]; \ size_t length = snprintf(temp_buffer, MAX_UMOCK_TYPE_STRINGIFY_SIZE, printf_specifier, *value); \ result = (char*)umockalloc_malloc(length + 1); \ if (result == NULL) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_stringify_,function_postfix)) ": Cannot allocate memory for result string."); \ } \ else \ { \ (void)snprintf(result, length + 1, printf_specifier, *value); \ } \ } \ return result; \ } #else /* MAX_STRINGIFY_SIZE */ #define IMPLEMENT_STRINGIFY(type, function_postfix, printf_specifier) \ char* C2(umocktypes_stringify_,function_postfix)(type* value) \ { \ char* result; \ if (value == NULL) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_stringify_,function_postfix)) ": NULL value."); \ result = NULL; \ } \ else \ { \ size_t length = snprintf(NULL, 0, printf_specifier, *value); \ result = (char*)umockalloc_malloc(length + 1); \ if (result == NULL) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_stringify_,function_postfix)) ": Cannot allocate memory for result string."); \ } \ else \ { \ (void)snprintf(result, length + 1, printf_specifier, *value); \ } \ } \ return result; \ } #endif /* MAX_STRINGIFY_SIZE */ #define IMPLEMENT_ARE_EQUAL(type, function_postfix) \ int C2(umocktypes_are_equal_,function_postfix)(type* left, type* right) \ { \ int result; \ if ((left == NULL) || (right == NULL)) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_are_equal_,function_postfix)) ": Bad arguments: left = %p, right = %p", left, right); \ result = -1; \ } \ else \ { \ result = ((*left) == (*right)) ? 1 : 0; \ } \ return result; \ } #define IMPLEMENT_COPY(type, function_postfix) \ int C2(umocktypes_copy_,function_postfix)(type* destination, type* source) \ { \ int result; \ if ((destination == NULL) || \ (source == NULL)) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_are_equal_,function_postfix)) ": Bad arguments: destination = %p, source = %p", destination, source); \ result = __LINE__; \ } \ else \ { \ *destination = *source; \ result = 0; \ } \ return result; \ } #define IMPLEMENT_FREE(type, function_postfix) \ void C2(umocktypes_free_,function_postfix)(type* value) \ { \ (void)value; \ } #define IMPLEMENT_TYPE_HANDLERS(type, function_postfix, printf_specifier) \ IMPLEMENT_STRINGIFY(type, function_postfix, printf_specifier) \ IMPLEMENT_ARE_EQUAL(type, function_postfix) \ IMPLEMENT_COPY(type, function_postfix) \ IMPLEMENT_FREE(type, function_postfix) /* Codes_SRS_UMOCKTYPES_C_01_002: [ umocktypes_stringify_char shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_003: [ If value is NULL, umocktypes_stringify_char shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_005: [ If any other error occurs when creating the string representation, umocktypes_stringify_char shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_004: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_char shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_006: [ umocktypes_are_equal_char shall compare the 2 chars pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_007: [ If any of the arguments is NULL, umocktypes_are_equal_char shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_008: [ If the values pointed to by left and right are equal, umocktypes_are_equal_char shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_009: [ If the values pointed to by left and right are different, umocktypes_are_equal_char shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_010: [ umocktypes_copy_char shall copy the char value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_012: [ If source or destination are NULL, umocktypes_copy_char shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_011: [ On success umocktypes_copy_char shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_013: [ umocktypes_free_char shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(char, char, "%d") /* Codes_SRS_UMOCKTYPES_C_01_014: [ umocktypes_stringify_unsignedchar shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_015: [ If value is NULL, umocktypes_stringify_unsignedchar shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_017: [ If any other error occurs when creating the string representation, umocktypes_stringify_unsignedchar shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_016: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedchar shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_018: [ umocktypes_are_equal_unsignedchar shall compare the 2 unsigned chars pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_019: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedchar shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_020: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedchar shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_021: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedchar shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_022: [ umocktypes_copy_unsignedchar shall copy the unsigned char value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_024: [ If source or destination are NULL, umocktypes_copy_unsignedchar shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_023: [ On success umocktypes_copy_unsignedchar shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_025: [ umocktypes_free_unsignedchar shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(unsigned char, unsignedchar, "%u") /* Codes_SRS_UMOCKTYPES_C_01_026: [ umocktypes_stringify_short shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_027: [ If value is NULL, umocktypes_stringify_short shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_029: [ If any other error occurs when creating the string representation, umocktypes_stringify_short shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_028: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_short shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_030: [ umocktypes_are_equal_short shall compare the 2 shorts pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_031: [ If any of the arguments is NULL, umocktypes_are_equal_short shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_032: [ If the values pointed to by left and right are equal, umocktypes_are_equal_short shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_033: [ If the values pointed to by left and right are different, umocktypes_are_equal_short shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_034: [ umocktypes_copy_short shall copy the short value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_036: [ If source or destination are NULL, umocktypes_copy_short shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_035: [ On success umocktypes_copy_short shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_037: [ umocktypes_free_short shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(short, short, "%hd") /* Codes_SRS_UMOCKTYPES_C_01_038: [ umocktypes_stringify_unsignedshort shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_039: [ If value is NULL, umocktypes_stringify_unsignedshort shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_041: [ If any other error occurs when creating the string representation, umocktypes_stringify_unsignedshort shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_040: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedshort shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_042: [ umocktypes_are_equal_unsignedshort shall compare the 2 unsigned shorts pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_043: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedshort shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_044: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedshort shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_045: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedshort shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_046: [ umocktypes_copy_unsignedshort shall copy the unsigned short value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_048: [ If source or destination are NULL, umocktypes_copy_unsignedshort shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_047: [ On success umocktypes_copy_unsignedshort shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_049: [ umocktypes_free_unsignedshort shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(unsigned short, unsignedshort, "%hu") /* Codes_SRS_UMOCKTYPES_C_01_050: [ umocktypes_stringify_int shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_051: [ If value is NULL, umocktypes_stringify_int shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_053: [ If any other error occurs when creating the string representation, umocktypes_stringify_int shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_052: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_054: [ umocktypes_are_equal_int shall compare the 2 ints pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_055: [ If any of the arguments is NULL, umocktypes_are_equal_int shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_056: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_057: [ If the values pointed to by left and right are different, umocktypes_are_equal_int shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_058: [ umocktypes_copy_int shall copy the int value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_060: [ If source or destination are NULL, umocktypes_copy_int shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_059: [ On success umocktypes_copy_int shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_061: [ umocktypes_free_int shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(int, int, "%d") /* Codes_SRS_UMOCKTYPES_C_01_062: [ umocktypes_stringify_unsignedint shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_063: [ If value is NULL, umocktypes_stringify_unsignedint shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_065: [ If any other error occurs when creating the string representation, umocktypes_stringify_unsignedint shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_064: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedint shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_066: [ umocktypes_are_equal_unsignedint shall compare the 2 unsigned ints pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_067: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedint shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_068: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedint shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_069: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedint shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_070: [ umocktypes_copy_unsignedint shall copy the unsigned int value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_072: [ If source or destination are NULL, umocktypes_copy_unsignedint shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_071: [ On success umocktypes_copy_unsignedint shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_073: [ umocktypes_free_unsignedint shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(unsigned int, unsignedint, "%u") /* Codes_SRS_UMOCKTYPES_C_01_074: [ umocktypes_stringify_long shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_075: [ If value is NULL, umocktypes_stringify_long shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_077: [ If any other error occurs when creating the string representation, umocktypes_stringify_long shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_076: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_long shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_078: [ umocktypes_are_equal_long shall compare the 2 longs pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_079: [ If any of the arguments is NULL, umocktypes_are_equal_long shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_080: [ If the values pointed to by left and right are equal, umocktypes_are_equal_long shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_081: [ If the values pointed to by left and right are different, umocktypes_are_equal_long shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_082: [ umocktypes_copy_long shall copy the long value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_084: [ If source or destination are NULL, umocktypes_copy_long shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_083: [ On success umocktypes_copy_long shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_085: [ umocktypes_free_long shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(long, long, "%ld") /* Codes_SRS_UMOCKTYPES_C_01_086: [ umocktypes_stringify_unsignedlong shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_087: [ If value is NULL, umocktypes_stringify_unsignedlong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_089: [ If any other error occurs when creating the string representation, umocktypes_stringify_unsignedlong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_088: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedlong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_090: [ umocktypes_are_equal_unsignedlong shall compare the 2 unsigned longs pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_091: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedlong shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_092: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedlong shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_093: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedlong shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_094: [ umocktypes_copy_unsignedlong shall copy the unsigned long value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_096: [ If source or destination are NULL, umocktypes_copy_unsignedlong shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_095: [ On success umocktypes_copy_unsignedlong shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_097: [ umocktypes_free_unsignedlong shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(unsigned long, unsignedlong, "%lu") /* Codes_SRS_UMOCKTYPES_C_01_098: [ umocktypes_stringify_longlong shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_099: [ If value is NULL, umocktypes_stringify_longlong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_101: [ If any other error occurs when creating the string representation, umocktypes_stringify_longlong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_100: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_longlong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_102: [ umocktypes_are_equal_longlong shall compare the 2 long longs pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_103: [ If any of the arguments is NULL, umocktypes_are_equal_longlong shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_104: [ If the values pointed to by left and right are equal, umocktypes_are_equal_longlong shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_105: [ If the values pointed to by left and right are different, umocktypes_are_equal_longlong shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_106: [ umocktypes_copy_longlong shall copy the long long value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_108: [ If source or destination are NULL, umocktypes_copy_longlong shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_107: [ On success umocktypes_copy_longlong shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_109: [ umocktypes_free_longlong shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(long long, longlong, "%lld") /* Codes_SRS_UMOCKTYPES_C_01_110: [ umocktypes_stringify_unsignedlonglong shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_111: [ If value is NULL, umocktypes_stringify_unsignedlonglong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_113: [ If any other error occurs when creating the string representation, umocktypes_stringify_unsignedlonglong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_112: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedlonglong shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_114: [ umocktypes_are_equal_unsignedlonglong shall compare the 2 unsigned long longs pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_115: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedlonglong shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_116: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedlonglong shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_117: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedlonglong shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_118: [ umocktypes_copy_unsignedlonglong shall copy the unsigned long long value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_120: [ If source or destination are NULL, umocktypes_copy_unsignedlonglong shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_119: [ On success umocktypes_copy_unsignedlonglong shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_121: [ umocktypes_free_unsignedlonglong shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(unsigned long long, unsignedlonglong, "%llu") /* Codes_SRS_UMOCKTYPES_C_01_122: [ umocktypes_stringify_float shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_123: [ If value is NULL, umocktypes_stringify_float shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_125: [ If any other error occurs when creating the string representation, umocktypes_stringify_float shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_124: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_float shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_126: [ umocktypes_are_equal_float shall compare the 2 floats pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_127: [ If any of the arguments is NULL, umocktypes_are_equal_float shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_128: [ If the values pointed to by left and right are equal, umocktypes_are_equal_float shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_129: [ If the values pointed to by left and right are different, umocktypes_are_equal_float shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_130: [ umocktypes_copy_float shall copy the float value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_132: [ If source or destination are NULL, umocktypes_copy_float shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_131: [ On success umocktypes_copy_float shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_133: [ umocktypes_free_float shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(float, float, "%f") /* Codes_SRS_UMOCKTYPES_C_01_134: [ umocktypes_stringify_double shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_135: [ If value is NULL, umocktypes_stringify_double shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_137: [ If any other error occurs when creating the string representation, umocktypes_stringify_double shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_136: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_double shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_138: [ umocktypes_are_equal_double shall compare the 2 doubles pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_139: [ If any of the arguments is NULL, umocktypes_are_equal_double shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_140: [ If the values pointed to by left and right are equal, umocktypes_are_equal_double shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_141: [ If the values pointed to by left and right are different, umocktypes_are_equal_double shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_142: [ umocktypes_copy_double shall copy the double value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_144: [ If source or destination are NULL, umocktypes_copy_double shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_143: [ On success umocktypes_copy_double shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_145: [ umocktypes_free_double shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(double, double, "%f") /* Codes_SRS_UMOCKTYPES_C_01_146: [ umocktypes_stringify_longdouble shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_147: [ If value is NULL, umocktypes_stringify_longdouble shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_149: [ If any other error occurs when creating the string representation, umocktypes_stringify_longdouble shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_148: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_longdouble shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_150: [ umocktypes_are_equal_longdouble shall compare the 2 long doubles pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_151: [ If any of the arguments is NULL, umocktypes_are_equal_longdouble shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_152: [ If the values pointed to by left and right are equal, umocktypes_are_equal_longdouble shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_153: [ If the values pointed to by left and right are different, umocktypes_are_equal_longdouble shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_154: [ umocktypes_copy_longdouble shall copy the long double value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_156: [ If source or destination are NULL, umocktypes_copy_longdouble shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_155: [ On success umocktypes_copy_longdouble shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_157: [ umocktypes_free_longdouble shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(long double, longdouble, "%Lf") /* Codes_SRS_UMOCKTYPES_C_01_158: [ umocktypes_stringify_size_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_159: [ If value is NULL, umocktypes_stringify_size_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_161: [ If any other error occurs when creating the string representation, umocktypes_stringify_size_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_160: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_size_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_162: [ umocktypes_are_equal_size_t shall compare the 2 size_ts pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_163: [ If any of the arguments is NULL, umocktypes_are_equal_size_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_164: [ If the values pointed to by left and right are equal, umocktypes_are_equal_size_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_165: [ If the values pointed to by left and right are different, umocktypes_are_equal_size_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_166: [ umocktypes_copy_size_t shall copy the size_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_168: [ If source or destination are NULL, umocktypes_copy_size_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_167: [ On success umocktypes_copy_size_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_C_01_169: [ umocktypes_free_size_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(size_t, size_t, "%zu") IMPLEMENT_TYPE_HANDLERS(void*, void_ptr, "%p") int umocktypes_c_register_types(void) { int result; /* Codes_SRS_UMOCKTYPES_C_01_001: [ umocktypes_c_register_types shall register support for all the types in the module. ]*/ if ((REGISTER_TYPE(char, char) != 0) || (REGISTER_TYPE(unsigned char, unsignedchar) != 0) || (REGISTER_TYPE(short, short) != 0) || (REGISTER_TYPE(unsigned short, unsignedshort) != 0) || (REGISTER_TYPE(int, int) != 0) || (REGISTER_TYPE(unsigned int, unsignedint) != 0) || (REGISTER_TYPE(long, long) != 0) || (REGISTER_TYPE(unsigned long, unsignedlong) != 0) || (REGISTER_TYPE(long long, longlong) != 0) || (REGISTER_TYPE(unsigned long long, unsignedlonglong) != 0) || (REGISTER_TYPE(float, float) != 0) || (REGISTER_TYPE(double, double) != 0) || (REGISTER_TYPE(long double, longdouble) != 0) || (REGISTER_TYPE(size_t, size_t) != 0) || (REGISTER_TYPE(void*, void_ptr) != 0) || (REGISTER_TYPE(const void*, void_ptr) != 0)) { /* Codes_SRS_UMOCKTYPES_C_01_171: [ If registering any of the types fails, umocktypes_c_register_types shall fail and return a non-zero value. ]*/ UMOCK_LOG("umocktypes_c_register_types: Failed registering types."); \ result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_C_01_170: [ On success, umocktypes_c_register_types shall return 0. ]*/ result = 0; } return result; } umocktypes_charptr.c000066400000000000000000000270711362133436400375430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include "umocktypes.h" #include "macro_utils.h" #include "umocktypes_charptr.h" #include "umockalloc.h" #include "umock_log.h" char* umocktypes_stringify_charptr(const char** value) { char* result; if (value == NULL) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_004: [ If value is NULL, umocktypes_stringify_charptr shall return NULL. ]*/ UMOCK_LOG("umocktypes_stringify_charptr: NULL value."); result = NULL; } else { if (*value == NULL) { result = (char*)umockalloc_malloc(sizeof("NULL") + 1); if (result != NULL) { (void)memcpy(result, "NULL", sizeof("NULL") + 1); } } else { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_002: [ umocktypes_stringify_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). ] */ size_t length = strlen(*value); result = (char*)umockalloc_malloc(length + 3); /* Codes_SRS_UMOCKTYPES_CHARPTR_01_003: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_charptr shall return NULL. ]*/ if (result == NULL) { UMOCK_LOG("umocktypes_stringify_charptr: Cannot allocate memory for result."); } else { result[0] = '\"'; (void)memcpy(result + 1, *value, length); result[length + 1] = '\"'; result[length + 2] = '\0'; } } } return result; } /* Codes_SRS_UMOCKTYPES_CHARPTR_01_005: [ umocktypes_are_equal_charptr shall compare the 2 strings pointed to by left and right. ] */ int umocktypes_are_equal_charptr(const char** left, const char** right) { int result; if ((left == NULL) || (right == NULL)) { /* Codes_SRS_UMOCKTYPES_CHARPTR_20_001: [ If any of the arguments is NULL, umocktypes_are_equal_charptr shall return -1. ]*/ UMOCK_LOG("umocktypes_are_equal_charptr: Bad arguments:left = %p, right = %p.", left, right); result = -1; } else if (*left == *right) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_007: [ If left and right are equal, umocktypes_are_equal_charptr shall return 1. ]*/ result = 1; } else if ((*left == NULL) || (*right == NULL)) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_008: [ If only one of the left and right argument is NULL, umocktypes_are_equal_charptr shall return 0. ] */ result = 0; } else { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_009: [ If the string pointed to by left is equal to the string pointed to by right, umocktypes_are_equal_charptr shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_010: [ If the string pointed to by left is different than the string pointed to by right, umocktypes_are_equal_charptr shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_006: [ The comparison shall be case sensitive. ]*/ result = (strcmp(*left, *right) == 0) ? 1 : 0; } return result; } int umocktypes_copy_charptr(char** destination, const char** source) { int result; /* Codes_SRS_UMOCKTYPES_CHARPTR_01_013: [ If source or destination are NULL, umocktypes_copy_charptr shall return a non-zero value. ]*/ if ((destination == NULL) || (source == NULL)) { UMOCK_LOG("umocktypes_copy_charptr: Bad arguments: destination = %p, source = %p.", destination, source); result = __LINE__; } else { if (*source == NULL) { *destination = NULL; result = 0; } else { size_t source_length = strlen(*source); /* Codes_SRS_UMOCKTYPES_CHARPTR_01_012: [ The number of bytes allocated shall accomodate the string pointed to by source. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_011: [ umocktypes_copy_charptr shall allocate a new sequence of chars by using umockalloc_malloc. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_015: [ The newly allocated string shall be returned in the destination argument. ]*/ *destination = (char*)umockalloc_malloc(source_length + 1); if (*destination == NULL) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_036: [ If allocating the memory for the new string fails, umocktypes_copy_charptr shall fail and return a non-zero value. ]*/ UMOCK_LOG("umocktypes_copy_charptr: Failed allocating memory for the destination string."); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_014: [ umocktypes_copy_charptr shall copy the string pointed to by source to the newly allocated memory. ]*/ (void)memcpy(*destination, *source, source_length + 1); /* Codes_SRS_UMOCKTYPES_CHARPTR_01_016: [ On success umocktypes_copy_charptr shall return 0. ]*/ result = 0; } } } return result; } void umocktypes_free_charptr(char** value) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_018: [ If value is NULL, umocktypes_free_charptr shall do nothing. ] */ if (value != NULL) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_017: [ umocktypes_free_charptr shall free the string pointed to by value. ]*/ umockalloc_free(*value); } } char* umocktypes_stringify_const_charptr(const char** value) { char* result; if (value == NULL) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_020: [ If value is NULL, umocktypes_stringify_const_charptr shall return NULL. ]*/ UMOCK_LOG("umocktypes_stringify_const_charptr: NULL value."); result = NULL; } else { if (*value == NULL) { result = (char*)umockalloc_malloc(sizeof("NULL") + 1); if (result == NULL) { UMOCK_LOG("umocktypes_stringify_const_charptr: Cannot allocate memoryfor result string."); } else { (void)memcpy(result, "NULL", sizeof("NULL") + 1); } } else { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_019: [ umocktypes_stringify_const_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). ] */ size_t length = strlen(*value); result = (char*)umockalloc_malloc(length + 3); /* Codes_SRS_UMOCKTYPES_CHARPTR_01_021: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_const_charptr shall return NULL. ]*/ if (result != NULL) { result[0] = '\"'; (void)memcpy(result + 1, *value, length); result[length + 1] = '\"'; result[length + 2] = '\0'; } } } return result; } /* Codes_SRS_UMOCKTYPES_CHARPTR_01_022: [ umocktypes_are_equal_const_charptr shall compare the 2 strings pointed to by left and right. ] */ int umocktypes_are_equal_const_charptr(const char** left, const char** right) { int result; /* Codes_SRS_UMOCKTYPES_CHARPTR_01_024: [ If left and right are equal, umocktypes_are_equal_const_charptr shall return 1. ]*/ if (left == right) { result = 1; } else if ((left == NULL) || (right == NULL)) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_025: [ If only one of the left and right argument is NULL, umocktypes_are_equal_const_charptr shall return 0. ] */ result = 0; } else { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_026: [ If the string pointed to by left is equal to the string pointed to by right, umocktypes_are_equal_const_charptr shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_027: [ If the string pointed to by left is different than the string pointed to by right, umocktypes_are_equal_const_charptr shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_023: [ The comparison shall be case sensitive. ]*/ if (*left == *right) { result = 1; } else { if ((*left == NULL) || (*right == NULL)) { result = 0; } else { result = (strcmp(*left, *right) == 0) ? 1 : 0; } } } return result; } int umocktypes_copy_const_charptr(const char** destination, const char** source) { int result; /* Codes_SRS_UMOCKTYPES_CHARPTR_01_033: [ If source or destination are NULL, umocktypes_copy_const_charptr shall return a non-zero value. ]*/ if ((destination == NULL) || (source == NULL)) { UMOCK_LOG("umocktypes_copy_const_charptr: Bad arguments: destination = %p, source = %p.", destination, source); result = __LINE__; } else { if (*source == NULL) { *destination = NULL; result = 0; } else { size_t source_length = strlen(*source); /* Codes_SRS_UMOCKTYPES_CHARPTR_01_029: [ The number of bytes allocated shall accomodate the string pointed to by source. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_028: [ umocktypes_copy_const_charptr shall allocate a new sequence of chars by using umockalloc_malloc. ]*/ /* Codes_SRS_UMOCKTYPES_CHARPTR_01_031: [ The newly allocated string shall be returned in the destination argument. ]*/ *destination = (char*)umockalloc_malloc(source_length + 1); if (*destination == NULL) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_037: [ If allocating the memory for the new string fails, umocktypes_copy_const_charptr shall fail and return a non-zero value. ]*/ UMOCK_LOG("umocktypes_copy_const_charptr: Cannot allocate memory for destination string."); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_030: [ umocktypes_copy_const_charptr shall copy the string pointed to by source to the newly allocated memory. ]*/ (void)memcpy((void*)*destination, *source, source_length + 1); /* Codes_SRS_UMOCKTYPES_CHARPTR_01_032: [ On success umocktypes_copy_const_charptr shall return 0. ]*/ result = 0; } } } return result; } void umocktypes_free_const_charptr(const char** value) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_035: [ If value is NULL, umocktypes_free_const_charptr shall do nothing. ] */ if (value != NULL) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_034: [ umocktypes_free_const_charptr shall free the string pointed to by value. ]*/ umockalloc_free((void*)*value); } } int umocktypes_charptr_register_types(void) { int result; /* Codes_SRS_UMOCKTYPES_CHARPTR_01_001: [ umocktypes_charptr_register_types shall register support for the types char\* and const char\* by using the REGISTER_UMOCK_VALUE_TYPE macro provided by umockc. ]*/ if ((REGISTER_TYPE(char*, charptr) != 0) || (REGISTER_TYPE(const char*, const_charptr) != 0)) { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_039: [ If registering any of the types fails, umocktypes_charptr_register_types shall fail and return a non-zero value. ]*/ UMOCK_LOG("umocktypes_charptr_register_types: Cannot register types."); result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_CHARPTR_01_038: [ On success, umocktypes_charptr_register_types shall return 0. ]*/ result = 0; } return result; } umocktypes_stdint.c000066400000000000000000000406041362133436400374020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/src// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include #include #include #include #include "macro_utils.h" #include "umocktypes.h" #include "umocktypes_stdint.h" #include "umockalloc.h" #include "umock_log.h" #define IMPLEMENT_STRINGIFY(type, function_postfix, printf_specifier) \ char* C2(umocktypes_stringify_,function_postfix)(type* value) \ { \ char* result; \ if (value == NULL) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_stringify_,function_postfix)) ": NULL value."); \ result = NULL; \ } \ else \ { \ char temp_buffer[32]; \ size_t length = sprintf(temp_buffer, printf_specifier, *value); \ result = (char*)umockalloc_malloc(length + 1); \ if (result == NULL) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_stringify_,function_postfix)) ": Cannot allocate memory for result string."); \ } \ else \ { \ (void)memcpy(result, temp_buffer, length + 1); \ } \ } \ return result; \ } #define IMPLEMENT_ARE_EQUAL(type, function_postfix) \ int C2(umocktypes_are_equal_,function_postfix)(type* left, type* right) \ { \ int result; \ if ((left == NULL) || (right == NULL)) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_are_equal_,function_postfix)) ": Bad arguments: left = %p, right = %p", left, right); \ result = -1; \ } \ else \ { \ result = ((*left) == (*right)) ? 1 : 0; \ } \ return result; \ } #define IMPLEMENT_COPY(type, function_postfix) \ int C2(umocktypes_copy_,function_postfix)(type* destination, type* source) \ { \ int result; \ if ((destination == NULL) || \ (source == NULL)) \ { \ UMOCK_LOG(TOSTRING(C2(umocktypes_are_equal_,function_postfix)) ": Bad arguments: destination = %p, source = %p", destination, source); \ result = __LINE__; \ } \ else \ { \ *destination = *source; \ result = 0; \ } \ return result; \ } #define IMPLEMENT_FREE(type, function_postfix) \ void C2(umocktypes_free_,function_postfix)(type* value) \ { \ (void)value; \ } #define IMPLEMENT_TYPE_HANDLERS(type, function_postfix, printf_specifier) \ IMPLEMENT_STRINGIFY(type, function_postfix, printf_specifier) \ IMPLEMENT_ARE_EQUAL(type, function_postfix) \ IMPLEMENT_COPY(type, function_postfix) \ IMPLEMENT_FREE(type, function_postfix) /* Codes_SRS_UMOCKTYPES_STDINT_01_004: [ umocktypes_stringify_uint8_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_005: [ If value is NULL, umocktypes_stringify_uint8_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_006: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint8_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_007: [ If any other error occurs when creating the string representation, umocktypes_stringify_uint8_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_008: [ umocktypes_are_equal_uint8_t shall compare the 2 uint8_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_009: [ If any of the arguments is NULL, umocktypes_are_equal_uint8_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_010: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint8_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_011: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint8_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_012: [ umocktypes_copy_uint8_t shall copy the uint8_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_013: [ On success umocktypes_copy_uint8_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_014: [ If source or destination are NULL, umocktypes_copy_uint8_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_015: [ umocktypes_free_uint8_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(uint8_t, uint8_t, "%"PRIu8) /* Codes_SRS_UMOCKTYPES_STDINT_01_016: [ umocktypes_stringify_int8_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_017: [ If value is NULL, umocktypes_stringify_int8_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_018: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int8_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_019: [ If any other error occurs when creating the string representation, umocktypes_stringify_int8_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_020: [ umocktypes_are_equal_int8_t shall compare the 2 int8_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_021: [ If any of the arguments is NULL, umocktypes_are_equal_int8_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_022: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int8_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_023: [ If the values pointed to by left and right are different, umocktypes_are_equal_int8_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_024: [ umocktypes_copy_int8_t shall copy the int8_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_025: [ On success umocktypes_copy_int8_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_026: [ If source or destination are NULL, umocktypes_copy_int8_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_027: [ umocktypes_free_int8_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(int8_t, int8_t, "%"PRId8) /* Codes_SRS_UMOCKTYPES_STDINT_01_028: [ umocktypes_stringify_uint16_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_029: [ If value is NULL, umocktypes_stringify_uint16_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_030: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint16_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_031: [ If any other error occurs when creating the string representation, umocktypes_stringify_uint16_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_032: [ umocktypes_are_equal_uint16_t shall compare the 2 uint16_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_033: [ If any of the arguments is NULL, umocktypes_are_equal_uint16_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_034: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint16_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_035: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint16_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_036: [ umocktypes_copy_uint16_t shall copy the uint16_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_037: [ On success umocktypes_copy_uint16_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_038: [ If source or destination are NULL, umocktypes_copy_uint16_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_039: [ umocktypes_free_uint16_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(uint16_t, uint16_t, "%"PRIu16) /* Codes_SRS_UMOCKTYPES_STDINT_01_040: [ umocktypes_stringify_int16_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_041: [ If value is NULL, umocktypes_stringify_int16_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_042: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int16_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_043: [ If any other error occurs when creating the string representation, umocktypes_stringify_int16_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_044: [ umocktypes_are_equal_int16_t shall compare the 2 int16_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_045: [ If any of the arguments is NULL, umocktypes_are_equal_int16_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_046: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int16_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_047: [ If the values pointed to by left and right are different, umocktypes_are_equal_int16_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_048: [ umocktypes_copy_int16_t shall copy the int16_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_049: [ On success umocktypes_copy_int16_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_050: [ If source or destination are NULL, umocktypes_copy_int16_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_051: [ umocktypes_free_int16_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(int16_t, int16_t, "%"PRId16) /* Codes_SRS_UMOCKTYPES_STDINT_01_052: [ umocktypes_stringify_uint32_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_053: [ If value is NULL, umocktypes_stringify_uint32_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_054: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint32_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_055: [ If any other error occurs when creating the string representation, umocktypes_stringify_uint32_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_056: [ umocktypes_are_equal_uint32_t shall compare the 2 uint32_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_057: [ If any of the arguments is NULL, umocktypes_are_equal_uint32_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_058: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint32_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_059: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint32_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_060: [ umocktypes_copy_uint32_t shall copy the uint32_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_061: [ On success umocktypes_copy_uint32_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_062: [ If source or destination are NULL, umocktypes_copy_uint32_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_063: [ umocktypes_free_uint32_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(uint32_t, uint32_t, "%"PRIu32) /* Codes_SRS_UMOCKTYPES_STDINT_01_064: [ umocktypes_stringify_int32_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_065: [ If value is NULL, umocktypes_stringify_int32_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_066: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int32_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_067: [ If any other error occurs when creating the string representation, umocktypes_stringify_int32_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_068: [ umocktypes_are_equal_int32_t shall compare the 2 int32_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_069: [ If any of the arguments is NULL, umocktypes_are_equal_int32_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_070: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int32_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_071: [ If the values pointed to by left and right are different, umocktypes_are_equal_int32_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_072: [ umocktypes_copy_int32_t shall copy the int32_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_073: [ On success umocktypes_copy_int32_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_074: [ If source or destination are NULL, umocktypes_copy_int32_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_075: [ umocktypes_free_int32_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(int32_t, int32_t, "%"PRId32) /* Codes_SRS_UMOCKTYPES_STDINT_01_076: [ umocktypes_stringify_uint64_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_077: [ If value is NULL, umocktypes_stringify_uint64_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_078: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint64_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_079: [ If any other error occurs when creating the string representation, umocktypes_stringify_uint64_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_080: [ umocktypes_are_equal_uint64_t shall compare the 2 uint64_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_081: [ If any of the arguments is NULL, umocktypes_are_equal_uint64_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_082: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint64_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_083: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint64_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_084: [ umocktypes_copy_uint64_t shall copy the uint64_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_085: [ On success umocktypes_copy_uint64_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_086: [ If source or destination are NULL, umocktypes_copy_uint64_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_087: [ umocktypes_free_uint64_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(uint64_t, uint64_t, "%"PRIu64) /* Codes_SRS_UMOCKTYPES_STDINT_01_088: [ umocktypes_stringify_int64_t shall return the string representation of value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_089: [ If value is NULL, umocktypes_stringify_int64_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_090: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int64_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_091: [ If any other error occurs when creating the string representation, umocktypes_stringify_int64_t shall return NULL. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_092: [ umocktypes_are_equal_int64_t shall compare the 2 int64_t values pointed to by left and right. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_093: [ If any of the arguments is NULL, umocktypes_are_equal_int64_t shall return -1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_094: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int64_t shall return 1. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_095: [ If the values pointed to by left and right are different, umocktypes_are_equal_int64_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_096: [ umocktypes_copy_int64_t shall copy the int64_t value from source to destination. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_097: [ On success umocktypes_copy_int64_t shall return 0. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_098: [ If source or destination are NULL, umocktypes_copy_int64_t shall return a non-zero value. ]*/ /* Codes_SRS_UMOCKTYPES_STDINT_01_099: [ umocktypes_free_int64_t shall do nothing. ]*/ IMPLEMENT_TYPE_HANDLERS(int64_t, int64_t, "%"PRId64) int umocktypes_stdint_register_types(void) { int result; /* Codes_SRS_UMOCKTYPES_STDINT_01_001: [ umocktypes_stdint_register_types shall register support for all the types in the module. ]*/ if ((REGISTER_TYPE(uint8_t, uint8_t) != 0) || (REGISTER_TYPE(int8_t, int8_t) != 0) || (REGISTER_TYPE(uint16_t, uint16_t) != 0) || (REGISTER_TYPE(int16_t, int16_t) != 0) || (REGISTER_TYPE(uint32_t, uint32_t) != 0) || (REGISTER_TYPE(int32_t, int32_t) != 0) || (REGISTER_TYPE(uint64_t, uint64_t) != 0) || (REGISTER_TYPE(int64_t, int64_t) != 0)) { /* Codes_SRS_UMOCKTYPES_STDINT_01_171: [ If registering any of the types fails, umocktypes_stdint_register_types shall fail and return a non-zero value. ]*/ UMOCK_LOG("umocktypes_stdint_register_types: Failed registering types."); \ result = __LINE__; } else { /* Codes_SRS_UMOCKTYPES_STDINT_01_170: [ On success, umocktypes_stdint_register_types shall return 0. ]*/ result = 0; } return result; } tests/000077500000000000000000000000001362133436400340155ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-cCMakeLists.txt000066400000000000000000000020741362133436400365600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) add_subdirectory(umockalloc_ut) add_subdirectory(umockstring_ut) add_subdirectory(umockautoignoreargs_ut) add_subdirectory(umockcall_ut) add_subdirectory(umockcallpairs_ut) add_subdirectory(umockcallrecorder_ut) add_subdirectory(umock_c_ut) add_subdirectory(umock_c_wout_init_ut) add_subdirectory(umocktypename_ut) add_subdirectory(umocktypes_ut) add_subdirectory(umocktypes_c_fixed_buffer_ut) add_subdirectory(umocktypes_wout_init_ut) add_subdirectory(umocktypes_bool_ut) add_subdirectory(umocktypes_c_ut) add_subdirectory(umocktypes_charptr_ut) add_subdirectory(umocktypes_stdint_ut) add_subdirectory(umock_c_negt_noini_ut) add_subdirectory(umock_c_negt_ut) add_subdirectory(umock_c_int) add_subdirectory(umock_c_mock_filters_int) add_subdirectory(umock_c_negt_int) add_subdirectory(umock_c_gen_func_decl_int) add_subdirectory(umock_c_malloc_hook_int) add_subdirectory(umock_c_ptrarg_leak_int) umock_c_gen_func_decl_int/000077500000000000000000000000001362133436400411425ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000012351362133436400437030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_gen_func_decl_int#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_gen_func_decl_int) set(${theseTestsName}_test_files umock_c_gen_func_decl_int.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ../../src/umockalloc.c ../../src/umockautoignoreargs.c ../../src/umockcall.c ../../src/umockcallrecorder.c ../../src/umocktypes.c ../../src/umocktypes_charptr.c ../../src/umocktypes_c.c ../../src/umocktypename.c ../../src/umock_log.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005451362133436400422360ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_gen_func_decl_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_generate_function_declaration_integrationtests, failedTestCount); return failedTestCount; } umock_c_gen_func_decl_int.c000066400000000000000000000060501362133436400464340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_gen_func_decl_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" MOCKABLE_FUNCTION(, int, test_generate_signature, int, a, double, b, char*, s); MOCKABLE_FUNCTION(, void, test_generate_signature_void_return, int, a); MOCKABLE_FUNCTION(, void, test_generate_signature_no_args); int test_generate_signature(int a, double b, char* s) { (void)a; (void)b; (void)s; return 42; } void test_generate_signature_void_return(int a) { (void)a; } void test_generate_signature_no_args(void) { } static TEST_MUTEX_HANDLE test_mutex_generate_funcs; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umock_c_generate_function_declaration_integrationtests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex_generate_funcs = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex_generate_funcs); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex_generate_funcs); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int acquire_Result = TEST_MUTEX_ACQUIRE(test_mutex_generate_funcs); ASSERT_ARE_EQUAL(int, 0, acquire_Result); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex_generate_funcs); } /* Tests_SRS_UMOCK_C_LIB_01_002: [The macro shall generate a function signature in case ENABLE_MOCKS is not defined.] */ /* Tests_SRS_UMOCK_C_LIB_01_005: [**If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function.] */ TEST_FUNCTION(when_ENABLE_MOCKS_is_not_on_MOCKABLE_FUNCTION_generates_a_standard_function_declaration) { // arrange // act int result = test_generate_signature(1, 0.42, "42"); // assert ASSERT_ARE_EQUAL(int, 42, result); } /* Tests_SRS_UMOCK_C_LIB_01_002: [The macro shall generate a function signature in case ENABLE_MOCKS is not defined.] */ /* Tests_SRS_UMOCK_C_LIB_01_005: [**If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function.] */ TEST_FUNCTION(when_ENABLE_MOCKS_is_not_on_MOCKABLE_FUNCTION_generates_a_standard_function_declaration_with_void_return) { // arrange // act test_generate_signature_void_return(1); // assert // no explicit assert } /* Tests_SRS_UMOCK_C_LIB_01_002: [The macro shall generate a function signature in case ENABLE_MOCKS is not defined.] */ /* Tests_SRS_UMOCK_C_LIB_01_005: [**If ENABLE_MOCKS is not defined, MOCKABLE_FUNCTION shall only generate a declaration for the function.] */ TEST_FUNCTION(when_ENABLE_MOCKS_is_not_on_MOCKABLE_FUNCTION_generates_a_standard_function_declaration_with_no_args_and_void_return) { // arrange // act test_generate_signature_no_args(); // assert // no explicit assert } END_TEST_SUITE(umock_c_generate_function_declaration_integrationtests) umock_c_int/000077500000000000000000000000001362133436400363075ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000013061362133436400410470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_int#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_int) set(${theseTestsName}_test_files umock_c_int.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ../../src/umockalloc.c ../../src/umockstring.c ../../src/umockautoignoreargs.c ../../src/umockcall.c ../../src/umockcallrecorder.c ../../src/umocktypes.c ../../src/umocktypes_charptr.c ../../src/umocktypes_c.c ../../src/umocktypename.c ../../src/umockcallpairs.c ../../src/umock_log.c ) set(${theseTestsName}_h_files test_dependency.h ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005071362133436400374010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_integrationtests, failedTestCount); return failedTestCount; } test_dependency.h000066400000000000000000000074261362133436400416460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TEST_DEPENDENCY_H #define TEST_DEPENDENCY_H #include "umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif typedef struct TEST_STRUCT_TAG { int x; } TEST_STRUCT; typedef struct TEST_STRUCT_WITH_2_MEMBERS_TAG { int x; int y; } TEST_STRUCT_WITH_2_MEMBERS; typedef struct TEST_STRUCT_COPY_FAILS_TAG { int x; } TEST_STRUCT_COPY_FAILS; typedef struct TEST_STRUCT_NOT_REGISTERED { int x; } TEST_STRUCT_NOT_REGISTERED; typedef unsigned char ARRAY_TYPE[16]; /* Tests_SRS_UMOCK_C_LIB_01_001: [MOCKABLE_FUNCTION shall be used to wrap function definition allowing the user to declare a function that can be mocked.]*/ /* Tests_SRS_UMOCK_C_LIB_01_004: [If ENABLE_MOCKS is defined, MOCKABLE_FUNCTION shall generate the declaration of the function and code for the mocked function, thus allowing setting up of expectations in test functions.] */ MOCKABLE_FUNCTION(, int, test_dependency_no_args); MOCKABLE_FUNCTION(, int, test_dependency_1_arg, int, a); MOCKABLE_FUNCTION(, int, test_dependency_2_args, int, a, int, b); MOCKABLE_FUNCTION(, int, test_dependency_struct_arg, TEST_STRUCT, s); MOCKABLE_FUNCTION(, int, test_dependency_struct_with_2_members, TEST_STRUCT_WITH_2_MEMBERS, s, int, a); MOCKABLE_FUNCTION(, int, test_dependency_char_star_arg, char*, s); MOCKABLE_FUNCTION(, int, test_dependency_1_out_arg, int*, a); MOCKABLE_FUNCTION(, int, test_dependency_2_out_args, int*, a, int*, b); MOCKABLE_FUNCTION(, void, test_dependency_void_return); MOCKABLE_FUNCTION(, int*, test_dependency_int_ptr_return); MOCKABLE_FUNCTION(, void, test_dependency_buffer_arg, unsigned char*, a); MOCKABLE_FUNCTION(, int, test_dependency_global_mock_return_test); MOCKABLE_FUNCTION(, TEST_STRUCT_COPY_FAILS, test_dependency_global_mock_return_copy_fails); MOCKABLE_FUNCTION(, void, test_dependency_type_with_space, char *,s); MOCKABLE_FUNCTION(, void, test_dependency_all_types, char, char_arg, unsigned char, unsignedchar_arg, short, short_arg, unsigned short, unsignedshort_arg, int, int_arg, unsigned int, unsignedint_arg, long, long_arg, unsigned long, unsignedlong_arg, long long, longlong_arg, unsigned long long, unsignedlonglong_arg, float, float_arg, double, double_arg, long double, longdouble_arg, size_t, size_t_arg, void*, void_ptr_arg, const void*, const_void_ptr_arg); MOCKABLE_FUNCTION(, void, test_dependency_type_not_registered, TEST_STRUCT_NOT_REGISTERED, a); MOCKABLE_FUNCTION(, int, test_dependency_with_global_mock_hook); MOCKABLE_FUNCTION(, int, test_dependency_with_global_return); MOCKABLE_FUNCTION(, int, test_dependency_returning_int); MOCKABLE_FUNCTION(, char*, test_mock_function_returning_string); MOCKABLE_FUNCTION(, char*, test_mock_function_returning_string_with_macro); MOCKABLE_FUNCTION(, void, test_dependency_with_void_ptr, void*, argument); MOCKABLE_FUNCTION(, void, test_dependency_with_const_void_ptr, const void*, argument); MOCKABLE_FUNCTION(, void, test_dependency_with_array_arg, ARRAY_TYPE, argument); MOCKABLE_FUNCTION(, void, test_dependency_with_volatile_arg, volatile int, argument); MOCKABLE_FUNCTION(, void, test_dependency_with_volatile_pointer_arg, int volatile*, argument); MOCKABLE_FUNCTION(, volatile void*, test_dependency_with_volatile_pptr_return); typedef enum TEST_ENUM_TAG { TEST_ENUM_VALUE_1, TEST_ENUM_VALUE_2 } TEST_ENUM; MOCKABLE_FUNCTION(, void, test_mock_function_with_enum_type, TEST_ENUM, enum_type); #ifdef __cplusplus } #endif #endif /* TEST_DEPENDENCY_H */ umock_c_int.c000066400000000000000000003243441362133436400407570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" /* Tested by unit tests for umock_c: Tests_SRS_UMOCK_C_LIB_01_006: [umock_c_init shall initialize umock_c.] Tests_SRS_UMOCK_C_LIB_01_007: [umock_c_init called if already initialized shall fail and return a non-zero value.] Tests_SRS_UMOCK_C_LIB_01_008: [umock_c_init shall initialize the umock supported types (C native types).] Tests_SRS_UMOCK_C_LIB_01_009: [on_umock_c_error can be NULL.] Tests_SRS_UMOCK_C_LIB_01_010: [If on_umock_c_error is non-NULL it shall be saved for later use (to be invoked whenever an umock_c error needs to be signaled to the user).] Tests_SRS_UMOCK_C_LIB_01_011: [umock_c_deinit shall free all umock_c used resources.] Tests_SRS_UMOCK_C_LIB_01_012: [If umock_c was not initialized, umock_c_deinit shall do nothing.] */ /* Tested by unittests of umocktypes and umocktypename: Tests_SRS_UMOCK_C_LIB_01_145: [ Since umock_c needs to maintain a list of registered types, the following rules shall be applied: ] Tests_SRS_UMOCK_C_LIB_01_146: [ Each type shall be normalized to a form where all extra spaces are removed. ] Tests_SRS_UMOCK_C_LIB_01_147: [ Type names are case sensitive. ] */ /* Tested by unittests of umockcallpairs: Tests_SRS_UMOCK_C_LIB_01_194: [ If the first argument passed to destroy_call is not found in the list of tracked handles (returned by create_call) then umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. ] */ #include "umock_c.h" #define ENABLE_MOCKS #include "test_dependency.h" /* Tests_SRS_UMOCK_C_LIB_01_067: [char\* and const char\* shall be supported out of the box through a separate header, umockvalue_charptr.h.]*/ #include "umocktypes_charptr.h" typedef struct test_on_umock_c_error_CALL_TAG { UMOCK_C_ERROR_CODE error_code; } test_on_umock_c_error_CALL; static test_on_umock_c_error_CALL* test_on_umock_c_error_calls; static size_t test_on_umock_c_error_call_count; DECLARE_UMOCK_POINTER_TYPE_FOR_TYPE(int, int); DECLARE_UMOCK_POINTER_TYPE_FOR_TYPE(unsigned char, unsignedchar); TEST_DEFINE_ENUM_TYPE(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES); static void test_on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { test_on_umock_c_error_CALL* new_calls = (test_on_umock_c_error_CALL*)realloc(test_on_umock_c_error_calls, sizeof(test_on_umock_c_error_CALL) * (test_on_umock_c_error_call_count + 1)); if (new_calls != NULL) { test_on_umock_c_error_calls = new_calls; test_on_umock_c_error_calls[test_on_umock_c_error_call_count].error_code = error_code; test_on_umock_c_error_call_count++; } } static int my_hook_test_dependency_with_global_mock_hook(void) { return 43; } static int my_hook_result; static int my_hook_test_dependency_no_args(void) { return my_hook_result++; } static int my_hook_test_dependency_no_args_2(void) { return 0x21; } static int arg_a; static int arg_b; static int my_hook_test_dependency_2_args(int a, int b) { arg_a = a; arg_b = b; return 0; } static unsigned int test_dependency_void_return_called = 0; static void my_hook_test_dependency_void_return(void) { test_dependency_void_return_called = 1; } char* stringify_func_TEST_STRUCT_COPY_FAILS(const TEST_STRUCT_COPY_FAILS* value) { char* result = (char*)malloc(1); (void)value; result[0] = '\0'; return result; } int are_equal_func_TEST_STRUCT_COPY_FAILS(const TEST_STRUCT_COPY_FAILS* left, const TEST_STRUCT_COPY_FAILS* right) { (void)left; (void)right; return 1; } int copy_func_TEST_STRUCT_COPY_FAILS(TEST_STRUCT_COPY_FAILS* destination, const TEST_STRUCT_COPY_FAILS* source) { (void)source; (void)destination; return 0; } void free_func_TEST_STRUCT_COPY_FAILS(TEST_STRUCT_COPY_FAILS* value) { (void)value; } char* umocktypes_stringify_TEST_STRUCT_WITH_2_MEMBERS(const TEST_STRUCT_WITH_2_MEMBERS* value) { char* result = (char*)malloc(1); (void)value; result[0] = '\0'; return result; } int umocktypes_are_equal_TEST_STRUCT_WITH_2_MEMBERS(const TEST_STRUCT_WITH_2_MEMBERS* left, const TEST_STRUCT_WITH_2_MEMBERS* right) { (void)left; (void)right; return 1; } int umocktypes_copy_TEST_STRUCT_WITH_2_MEMBERS(TEST_STRUCT_WITH_2_MEMBERS* destination, const TEST_STRUCT_WITH_2_MEMBERS* source) { (void)source; (void)destination; return 0; } void umocktypes_free_TEST_STRUCT_WITH_2_MEMBERS(TEST_STRUCT_WITH_2_MEMBERS* value) { (void)value; } typedef void* SOME_OTHER_TYPE; char* umock_stringify_SOME_OTHER_TYPE(const SOME_OTHER_TYPE* value) { char* result = (char*)malloc(1); (void)value; result[0] = '\0'; return result; } int umock_are_equal_SOME_OTHER_TYPE(const SOME_OTHER_TYPE* left, const SOME_OTHER_TYPE* right) { (void)left; (void)right; return 1; } int umock_copy_SOME_OTHER_TYPE(SOME_OTHER_TYPE* destination, const SOME_OTHER_TYPE* source) { (void)source; (void)destination; return 0; } void umock_free_SOME_OTHER_TYPE(SOME_OTHER_TYPE* value) { (void)value; } typedef struct MY_STRUCT_TAG { int x; } MY_STRUCT; char* umocktypes_stringify_MY_STRUCT_ptr(const MY_STRUCT** value) { char* result = (char*)malloc(1); (void)value; result[0] = '\0'; return result; } int umocktypes_are_equal_MY_STRUCT_ptr(const MY_STRUCT** left, const MY_STRUCT** right) { int result; if ((*left)->x == (*right)->x) { result = 1; } else { result = 0; } return result; } int umocktypes_copy_MY_STRUCT_ptr(MY_STRUCT** destination, const MY_STRUCT** source) { int result; *destination = (MY_STRUCT*)malloc(sizeof(MY_STRUCT)); if (*destination == NULL) { result = __LINE__; } else { (*destination)->x = (*source)->x; result = 0; } return result; } void umocktypes_free_MY_STRUCT_ptr(MY_STRUCT** value) { free(*value); } char* umocktypes_stringify_ARRAY_TYPE(const ARRAY_TYPE* value) { char* result = (char*)malloc(1); (void)value; result[0] = '\0'; return result; } int umocktypes_are_equal_ARRAY_TYPE(const ARRAY_TYPE* left, const ARRAY_TYPE* right) { int result; if (memcmp(*((ARRAY_TYPE**)left), *((ARRAY_TYPE**)right), 16) == 0) { result = 1; } else { result = 0; } return result; } int umocktypes_copy_ARRAY_TYPE(ARRAY_TYPE* destination, const ARRAY_TYPE* source) { (void)memcpy(*destination, *source, 16); return 0; } void umocktypes_free_ARRAY_TYPE(ARRAY_TYPE* value) { (void)value; } MOCK_FUNCTION_WITH_CODE(, void, another_test_function, SOME_OTHER_TYPE, a); MOCK_FUNCTION_END() static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; MOCK_FUNCTION_WITH_CODE(, void, test_mock_function_with_code_1_arg, int, a); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, char*, test_mock_function_returning_string_with_code); MOCK_FUNCTION_END("a") typedef int funkytype; /* Tests_SRS_UMOCK_C_LIB_01_150: [ MOCK_FUNCTION_WITH_CODE shall define a mock function and allow the user to embed code between this define and a MOCK_FUNCTION_END call. ]*/ MOCK_FUNCTION_WITH_CODE(, funkytype, test_mock_function_with_funkytype, funkytype, x); MOCK_FUNCTION_END(42) static unsigned char*** result_value = (unsigned char***)0x4242; MOCK_FUNCTION_WITH_CODE(, unsigned char***, test_mock_function_with_unregistered_ptr_type, unsigned char***, x); MOCK_FUNCTION_END(result_value) IMPLEMENT_UMOCK_C_ENUM_TYPE(TEST_ENUM, TEST_ENUM_VALUE_1, TEST_ENUM_VALUE_2) static int test_return_value = 42; MOCK_FUNCTION_WITH_CODE(, int, test_dependency_for_capture_return) MOCK_FUNCTION_END(test_return_value) MOCK_FUNCTION_WITH_CODE(, int, test_dependency_for_capture_return_with_arg, int, a) MOCK_FUNCTION_END(test_return_value) typedef void* SOME_HANDLE; static const SOME_HANDLE test_handle = (SOME_HANDLE)0x4242; typedef struct SOME_STRUCT_TAG { unsigned char a; } SOME_STRUCT; SOME_STRUCT test_struct = { 42 }; MOCK_FUNCTION_WITH_CODE(, SOME_HANDLE, some_create, int, a); MOCK_FUNCTION_END(test_handle) MOCK_FUNCTION_WITH_CODE(, void, some_destroy, SOME_HANDLE, h); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, some_create_void_return, int, a); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, some_destroy_void_return, SOME_HANDLE, h); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, SOME_HANDLE, some_create_no_args, int, a); MOCK_FUNCTION_END(test_handle) MOCK_FUNCTION_WITH_CODE(, void, some_destroy_no_args); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, SOME_HANDLE, some_create_arg_different, int, a); MOCK_FUNCTION_END(test_handle) MOCK_FUNCTION_WITH_CODE(, void, some_destroy_arg_different, int, a); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, SOME_STRUCT, some_create_with_struct, int, a); MOCK_FUNCTION_END(test_struct) MOCK_FUNCTION_WITH_CODE(, void, some_destroy_with_struct, SOME_STRUCT, s); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, mock_function_with_code_with_volatile_arg, volatile int, a); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, void, mock_function_with_code_with_volatile_pointer_arg, int volatile*, a); MOCK_FUNCTION_END() MOCK_FUNCTION_WITH_CODE(, volatile void*, mock_function_with_code_with_volatile_ptr_return); MOCK_FUNCTION_END(NULL) BEGIN_TEST_SUITE(umock_c_integrationtests) TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); result = umock_c_init(test_on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); /* Tests_SRS_UMOCK_C_LIB_01_069: [The signature shall be: ...*/ /* Tests_SRS_UMOCK_C_LIB_01_070: [umockvalue_charptr_register_types shall return 0 on success and non-zero on failure.]*/ result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); /* Tests_SRS_UMOCK_C_LIB_01_065: [REGISTER_UMOCK_VALUE_TYPE shall register the type identified by value_type to be usable by umock_c for argument and return types and instruct umock_c which functions to use for getting the stringify, are_equal, copy and free.]*/ REGISTER_UMOCK_VALUE_TYPE(int*, stringify_func_intptr, are_equal_func_intptr, copy_func_intptr, free_func_intptr); REGISTER_UMOCK_VALUE_TYPE(unsigned char*, stringify_func_unsignedcharptr, are_equal_func_unsignedcharptr, copy_func_unsignedcharptr, free_func_unsignedcharptr); REGISTER_UMOCK_VALUE_TYPE(TEST_STRUCT_COPY_FAILS, stringify_func_TEST_STRUCT_COPY_FAILS, are_equal_func_TEST_STRUCT_COPY_FAILS, copy_func_TEST_STRUCT_COPY_FAILS, free_func_TEST_STRUCT_COPY_FAILS); /* Tests_SRS_UMOCK_C_LIB_01_066: [If only the value_type is specified in the macro invocation then the stringify, are_equal, copy and free function names shall be automatically derived from the type as: umockvalue_stringify_value_type, umockvalue_are_equal_value_type, umockvalue_copy_value_type, umockvalue_free_value_type.]*/ REGISTER_UMOCK_VALUE_TYPE(SOME_OTHER_TYPE); REGISTER_UMOCK_ALIAS_TYPE(SOME_HANDLE, void*); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); test_on_umock_c_error_calls = NULL; test_on_umock_c_error_call_count = 0; test_return_value = 42; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { umock_c_reset_all_calls(); REGISTER_GLOBAL_MOCK_HOOK(test_dependency_no_args, NULL); free(test_on_umock_c_error_calls); test_on_umock_c_error_calls = NULL; test_on_umock_c_error_call_count = 0; TEST_MUTEX_RELEASE(test_mutex); } /* STRICT_EXPECTED_CALL */ /* Tests_SRS_UMOCK_C_LIB_01_013: [STRICT_EXPECTED_CALL shall record that a certain call is expected.] */ /* Tests_SRS_UMOCK_C_LIB_01_015: [The call argument shall be the complete function invocation.]*/ TEST_FUNCTION(STRICT_EXPECTED_CALL_without_an_actual_call_yields_a_missing_call) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_no_args()); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_no_args()]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_013: [STRICT_EXPECTED_CALL shall record that a certain call is expected.] */ TEST_FUNCTION(two_STRICT_EXPECTED_CALL_without_an_actual_call_yields_2_missing_calls) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_no_args()); STRICT_EXPECTED_CALL(test_dependency_no_args()); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_no_args()][test_dependency_no_args()]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_014: [For each argument the argument value shall be stored for later comparison with actual calls.] */ TEST_FUNCTION(a_STRICT_EXPECTED_CALL_with_one_argument_without_an_actual_call_yields_1_missing_call) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_1_arg(42)); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_1_arg(42)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_014: [For each argument the argument value shall be stored for later comparison with actual calls.] */ TEST_FUNCTION(a_STRICT_EXPECTED_CALL_matched_with_an_actual_call_yields_no_differences_for_const_void_ptr) { // arrange STRICT_EXPECTED_CALL(test_dependency_with_const_void_ptr((void*)0x4242)); // act test_dependency_with_const_void_ptr((void*)0x4242); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_014: [For each argument the argument value shall be stored for later comparison with actual calls.] */ TEST_FUNCTION(a_STRICT_EXPECTED_CALL_matched_with_an_actual_call_yields_no_differences_for_array_arg) { // arrange ARRAY_TYPE x = { 0 }; REGISTER_TYPE(ARRAY_TYPE, ARRAY_TYPE); STRICT_EXPECTED_CALL(test_dependency_with_array_arg(x)); // act test_dependency_with_array_arg(x); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_014: [For each argument the argument value shall be stored for later comparison with actual calls.] */ TEST_FUNCTION(a_STRICT_EXPECTED_CALL_with_2_arguments_without_an_actual_call_yields_1_missing_call) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_013: [STRICT_EXPECTED_CALL shall record that a certain call is expected.] */ TEST_FUNCTION(two_different_STRICT_EXPECTED_CALL_instances_without_an_actual_call_yields_2_missing_calls) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_no_args()); STRICT_EXPECTED_CALL(test_dependency_1_arg(42)); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_no_args()][test_dependency_1_arg(42)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_115: [ umock_c shall compare calls in order. ]*/ TEST_FUNCTION(two_different_STRICT_EXPECTED_CALL_instances_without_an_actual_call_yields_2_missing_calls_with_order_preserved) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_1_arg(42)); STRICT_EXPECTED_CALL(test_dependency_no_args()); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_1_arg(42)][test_dependency_no_args()]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_115: [ umock_c shall compare calls in order. ]*/ TEST_FUNCTION(inverted_order_for_calls_is_detected_as_mismatch) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)); STRICT_EXPECTED_CALL(test_dependency_no_args()); // act test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_1_arg(42)][test_dependency_no_args()]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_no_args()]", umock_c_get_actual_calls()); } /* EXPECTED_CALL */ /* Tests_SRS_UMOCK_C_LIB_01_016: [EXPECTED_CALL shall record that a certain call is expected.] */ /* Tests_SRS_UMOCK_C_LIB_01_018: [The call argument shall be the complete function invocation.] */ TEST_FUNCTION(EXPECTED_CALL_without_an_actual_call_yields_a_missing_call) { // arrange // act EXPECTED_CALL(test_dependency_no_args()); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_no_args()]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_016: [EXPECTED_CALL shall record that a certain call is expected.] */ TEST_FUNCTION(two_EXPECTED_CALL_without_an_actual_call_yields_2_missing_calls) { // arrange // act EXPECTED_CALL(test_dependency_no_args()); EXPECTED_CALL(test_dependency_no_args()); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_no_args()][test_dependency_no_args()]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_017: [No arguments shall be saved by default, unless other modifiers state it.] */ TEST_FUNCTION(an_EXPECTED_CALL_with_one_argument_without_an_actual_call_yields_1_missing_call) { // arrange // act EXPECTED_CALL(test_dependency_1_arg(42)); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_1_arg(42)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_017: [No arguments shall be saved by default, unless other modifiers state it.] */ TEST_FUNCTION(an_EXPECTED_CALL_with_2_arguments_without_an_actual_call_yields_1_missing_call) { // arrange // act EXPECTED_CALL(test_dependency_2_args(42, 43)); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_016: [EXPECTED_CALL shall record that a certain call is expected.] */ TEST_FUNCTION(two_different_EXPECTED_CALL_instances_without_an_actual_call_yields_2_missing_calls) { // arrange // act EXPECTED_CALL(test_dependency_no_args()); EXPECTED_CALL(test_dependency_1_arg(42)); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_no_args()][test_dependency_1_arg(42)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_115: [ umock_c shall compare calls in order. ]*/ TEST_FUNCTION(two_different_EXPECTED_CALL_instances_without_an_actual_call_yields_2_missing_calls_with_order_preserved) { // arrange // act EXPECTED_CALL(test_dependency_1_arg(42)); EXPECTED_CALL(test_dependency_no_args()); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_1_arg(42)][test_dependency_no_args()]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_017: [No arguments shall be saved by default, unless other modifiers state it.]*/ TEST_FUNCTION(EXPECTED_CALL_does_not_compare_arguments) { // arrange // act EXPECTED_CALL(test_dependency_1_arg(42)); test_dependency_1_arg(43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_017: [No arguments shall be saved by default, unless other modifiers state it.]*/ TEST_FUNCTION(EXPECTED_CALL_with_2_args_does_not_compare_arguments) { // arrange // act EXPECTED_CALL(test_dependency_2_args(42, 43)); test_dependency_2_args(43, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Call modifiers */ /* Tests_SRS_UMOCK_C_LIB_01_074: [When an expected call is recorded a call modifier interface in the form of a structure containing function pointers shall be returned to the caller.] */ TEST_FUNCTION(STRICT_EXPECTED_CALL_allows_call_modifiers) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateAllArguments(); test_dependency_2_args(42, 43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Chaining modifiers */ /* Tests_SRS_UMOCK_C_LIB_01_075: [The last modifier in a chain overrides previous modifiers if any collision occurs.]*/ TEST_FUNCTION(STRICT_EXPECTED_CALL_with_ignore_all_arguments_and_then_validate_all_args_still_validates_args) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .IgnoreAllArguments() .ValidateAllArguments(); test_dependency_2_args(43, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(43,44)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_075: [The last modifier in a chain overrides previous modifiers if any collision occurs.]*/ TEST_FUNCTION(EXPECTED_CALL_with_validate_all_arguments_and_then_ignore_all_args_still_ignores_args) { // arrange // act EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateAllArguments() .IgnoreAllArguments(); test_dependency_2_args(43, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_075: [The last modifier in a chain overrides previous modifiers if any collision occurs.]*/ TEST_FUNCTION(STRICT_EXPECTED_CALL_with_ignore_validate_ignore_all_arguments_ignores_args) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .IgnoreAllArguments() .ValidateAllArguments() .IgnoreAllArguments(); test_dependency_2_args(43, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_075: [The last modifier in a chain overrides previous modifiers if any collision occurs.]*/ TEST_FUNCTION(STRICT_EXPECTED_CALL_with_validate_ignore_validate_all_arguments_validates_args) { // arrange // act EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateAllArguments() .IgnoreAllArguments() .ValidateAllArguments(); test_dependency_2_args(43, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(43,44)]", umock_c_get_actual_calls()); } /* IgnoreAllArguments */ /* Tests_SRS_UMOCK_C_LIB_01_076: [The IgnoreAllArguments call modifier shall record that for that specific call all arguments will be ignored for that specific call.] */ TEST_FUNCTION(IgnoreAllArguments_ignores_args_on_a_STRICT_EXPECTED_CALL) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .IgnoreAllArguments(); test_dependency_2_args(43, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* ValidateAllArguments */ /* Tests_SRS_UMOCK_C_LIB_01_077: [The ValidateAllArguments call modifier shall record that for that specific call all arguments will be validated.] */ TEST_FUNCTION(ValidateAllArguments_validates_all_args_on_an_EXPECTED_CALL) { // arrange // act EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateAllArguments(); test_dependency_2_args(43, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(43,44)]", umock_c_get_actual_calls()); } /* IgnoreArgument_{arg_name} */ /* Tests_SRS_UMOCK_C_LIB_01_078: [The IgnoreArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be ignored for that specific call.] */ TEST_FUNCTION(IgnoreArgument_by_name_ignores_only_that_argument_on_a_STRICT_EXPECTED_CALL) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .IgnoreArgument_a(); test_dependency_2_args(41, 43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_078: [The IgnoreArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be ignored for that specific call.] */ TEST_FUNCTION(IgnoreArgument_by_name_with_second_argument_ignores_only_that_argument_on_a_STRICT_EXPECTED_CALL) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .IgnoreArgument_b(); // act test_dependency_2_args(42, 42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* ValidateArgument_{arg_name} */ /* Tests_SRS_UMOCK_C_LIB_01_079: [The ValidateArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_name_validates_only_that_argument_on_an_EXPECTED_CALL) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateArgument_a(); // act test_dependency_2_args(42, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_079: [The ValidateArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_name_validates_only_that_argument_on_an_EXPECTED_CALL_and_args_are_different) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateArgument_a(); // act test_dependency_2_args(41, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(41,44)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_079: [The ValidateArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_name_2nd_arg_validates_only_that_argument_on_an_EXPECTED_CALL) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateArgument_b(); // act test_dependency_2_args(41, 43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_079: [The ValidateArgument_{arg_name} call modifier shall record that the argument identified by arg_name will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_name_2nd_arg_validates_only_that_argument_on_an_EXPECTED_CALL_and_args_are_different) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateArgument_b(); // act test_dependency_2_args(42, 44); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,44)]", umock_c_get_actual_calls()); } /* IgnoreArgument */ /* Tests_SRS_UMOCK_C_LIB_01_080: [The IgnoreArgument call modifier shall record that the indexth argument will be ignored for that specific call.]*/ TEST_FUNCTION(IgnoreArgument_by_index_for_first_arg_ignores_the_first_argument) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .IgnoreArgument(1); // act test_dependency_2_args(41, 43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_080: [The IgnoreArgument call modifier shall record that the indexth argument will be ignored for that specific call.]*/ TEST_FUNCTION(IgnoreArgument_by_index_for_second_arg_ignores_the_second_argument) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(41, 42)) .IgnoreArgument(2); // act test_dependency_2_args(41, 43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_080: [The IgnoreArgument call modifier shall record that the indexth argument will be ignored for that specific call.]*/ TEST_FUNCTION(IgnoreArgument_by_index_for_first_arg_ignores_only_the_first_argument) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(42, 43)) .IgnoreArgument(1); // act test_dependency_2_args(42, 42); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,42)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_080: [The IgnoreArgument call modifier shall record that the indexth argument will be ignored for that specific call.]*/ TEST_FUNCTION(IgnoreArgument_by_index_for_second_arg_ignores_only_the_second_argument) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(41, 42)) .IgnoreArgument(2); // act test_dependency_2_args(42, 42); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(41,42)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,42)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_081: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.] */ TEST_FUNCTION(IgnoreArgument_by_index_with_index_0_triggers_the_on_error_callback) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(41, 42)) .IgnoreArgument(0); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_081: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.] */ TEST_FUNCTION(IgnoreArgument_by_index_with_index_greater_than_arg_count_triggers_the_on_error_callback) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_2_args(41, 42)) .IgnoreArgument(3); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* ValidateArgument */ /* Tests_SRS_UMOCK_C_LIB_01_082: [The ValidateArgument call modifier shall record that the indexth argument will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_index_for_first_arg_ignores_the_first_argument) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateArgument(1); // act test_dependency_2_args(41, 43); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(41,43)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_082: [The ValidateArgument call modifier shall record that the indexth argument will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_index_for_second_arg_validates_the_second_argument) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 42)) .ValidateArgument(2); // act test_dependency_2_args(42, 43); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,42)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_2_args(42,43)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_082: [The ValidateArgument call modifier shall record that the indexth argument will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_index_for_first_arg_validates_only_the_first_argument) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 43)) .ValidateArgument(1); // act test_dependency_2_args(42, 42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_082: [The ValidateArgument call modifier shall record that the indexth argument will be validated for that specific call.]*/ TEST_FUNCTION(ValidateArgument_by_index_for_second_arg_validates_only_the_second_argument) { // arrange EXPECTED_CALL(test_dependency_2_args(42, 42)) .ValidateArgument(2); // act test_dependency_2_args(43, 42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_083: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ TEST_FUNCTION(ValidateArgument_by_index_with_0_index_triggers_the_on_error_callback) { // arrange // act EXPECTED_CALL(test_dependency_2_args(42, 42)) .ValidateArgument(0); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_083: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ TEST_FUNCTION(ValidateArgument_by_index_with_index_greater_than_arg_count_triggers_the_on_error_callback) { // arrange // act EXPECTED_CALL(test_dependency_2_args(42, 42)) .ValidateArgument(3); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* SetReturn */ /* Tests_SRS_UMOCK_C_LIB_01_084: [The SetReturn call modifier shall record that when an actual call is matched with the specific expected call, it shall return the result value to the code under test.] */ TEST_FUNCTION(SetReturn_sets_the_return_value_for_a_strict_expected_call) { // arrange STRICT_EXPECTED_CALL(test_dependency_no_args()) .SetReturn(42); // act int result = test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(int, 42, result); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_084: [The SetReturn call modifier shall record that when an actual call is matched with the specific expected call, it shall return the result value to the code under test.] */ TEST_FUNCTION(SetReturn_sets_the_return_value_for_an_expected_call) { // arrange EXPECTED_CALL(test_dependency_no_args()) .SetReturn(42); // act int result = test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(int, 42, result); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_084: [The SetReturn call modifier shall record that when an actual call is matched with the specific expected call, it shall return the result value to the code under test.] */ TEST_FUNCTION(SetReturn_sets_the_return_value_only_for_a_matched_call) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(42); // act int result = test_dependency_1_arg(41); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCK_C_LIB_01_084: [The SetReturn call modifier shall record that when an actual call is matched with the specific expected call, it shall return the result value to the code under test.] */ TEST_FUNCTION(SetReturn_sets_independent_return_values_for_each_call) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(142); STRICT_EXPECTED_CALL(test_dependency_1_arg(43)) .SetReturn(143); // act int result1 = test_dependency_1_arg(42); int result2 = test_dependency_1_arg(43); // assert ASSERT_ARE_EQUAL(int, 142, result1); ASSERT_ARE_EQUAL(int, 143, result2); } /* CopyOutArgumentBuffer */ /* Tests_SRS_UMOCK_C_LIB_01_087: [The CopyOutArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_116: [ The argument targetted by CopyOutArgument shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_copies_bytes_to_the_out_argument_for_a_strict_expected_call) { // arrange int injected_int = 0x42; STRICT_EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, injected_int, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_087: [The CopyOutArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_116: [ The argument targetted by CopyOutArgument shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_copies_bytes_to_the_out_argument_for_an_expected_call) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, injected_int, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_087: [The CopyOutArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_116: [ The argument targetted by CopyOutArgument shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_only_copies_bytes_to_the_out_argument_that_was_specified) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_2_out_args(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)); int actual_int_1 = 0; int actual_int_2 = 0; // act (void)test_dependency_2_out_args(&actual_int_1, &actual_int_2); // assert ASSERT_ARE_EQUAL(int, injected_int, actual_int_1); ASSERT_ARE_EQUAL(int, 0, actual_int_2); } /* Tests_SRS_UMOCK_C_LIB_01_087: [The CopyOutArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_116: [ The argument targetted by CopyOutArgument shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_only_copies_bytes_to_the_second_out_argument) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_2_out_args(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(2, &injected_int, sizeof(injected_int)); int actual_int_1 = 0; int actual_int_2 = 0; // act (void)test_dependency_2_out_args(&actual_int_1, &actual_int_2); // assert ASSERT_ARE_EQUAL(int, 0, actual_int_1); ASSERT_ARE_EQUAL(int, injected_int, actual_int_2); } /* Tests_SRS_UMOCK_C_LIB_01_088: [The memory shall be copied.]*/ TEST_FUNCTION(CopyOutArgumentBuffer_copies_the_memory_for_later_use) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)); int actual_int = 0; injected_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, 0x42, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_089: [The buffers for previous CopyOutArgumentBuffer calls shall be freed.]*/ /* Tests_SRS_UMOCK_C_LIB_01_133: [ If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. ]*/ TEST_FUNCTION(CopyOutArgumentBuffer_frees_allocated_buffers_for_previous_CopyOutArgumentBuffer) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, 0x42, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_091: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ TEST_FUNCTION(CopyOutArgumentBuffer_with_0_index_triggers_the_error_callback) { // arrange int injected_int = 0x42; // act EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(0, &injected_int, sizeof(injected_int)); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_091: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ TEST_FUNCTION(CopyOutArgumentBuffer_with_index_higher_than_count_of_args_triggers_the_error_callback) { // arrange int injected_int = 0x42; // act EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(2, &injected_int, sizeof(injected_int)); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_092: [If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER.] */ TEST_FUNCTION(CopyOutArgumentBuffer_with_NULL_bytes_triggers_the_error_callback) { // arrange // act EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, NULL, sizeof(int)); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); // TFS661968ASSERT_ARE_EQUAL(int, (int)UMOCK_C_INVALID_ARGUMENT_BUFFER, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_092: [If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER.] */ TEST_FUNCTION(CopyOutArgumentBuffer_with_0_length_triggers_the_error_callback) { // arrange int injected_int = 0x42; // act EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, &injected_int, 0); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_INVALID_ARGUMENT_BUFFER, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_087: [The CopyOutArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_116: [ The argument targetted by CopyOutArgument shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_when_an_error_occurs_preserves_the_previous_state) { // arrange int injected_int = 0x42; int injected_int_2 = 0x43; EXPECTED_CALL(test_dependency_2_out_args(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(2, &injected_int, sizeof(injected_int)) .CopyOutArgumentBuffer(0, &injected_int_2, sizeof(injected_int_2)); int actual_int_1 = 0; int actual_int_2 = 0; // act (void)test_dependency_2_out_args(&actual_int_1, &actual_int_2); // assert ASSERT_ARE_EQUAL(int, 0, actual_int_1); ASSERT_ARE_EQUAL(int, injected_int, actual_int_2); } /* CopyOutArgumentBuffer_{arg_name} */ /* Tests_SRS_UMOCK_C_LIB_01_154: [ The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. ] */ /* Tests_SRS_UMOCK_C_LIB_01_159: [ The argument targetted by CopyOutArgumentBuffer_{arg_name} shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_copies_bytes_to_the_out_argument_for_a_strict_expected_call) { // arrange int injected_int = 0x42; STRICT_EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(&injected_int, sizeof(injected_int)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, injected_int, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_154: [ The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. ] */ /* Tests_SRS_UMOCK_C_LIB_01_159: [ The argument targetted by CopyOutArgumentBuffer_{arg_name} shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_copies_bytes_to_the_out_argument_for_an_expected_call) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(&injected_int, sizeof(injected_int)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, injected_int, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_154: [ The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. ] */ /* Tests_SRS_UMOCK_C_LIB_01_159: [ The argument targetted by CopyOutArgumentBuffer_{arg_name} shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_only_copies_bytes_to_the_out_argument_that_was_specified) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_2_out_args(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(&injected_int, sizeof(injected_int)); int actual_int_1 = 0; int actual_int_2 = 0; // act (void)test_dependency_2_out_args(&actual_int_1, &actual_int_2); // assert ASSERT_ARE_EQUAL(int, injected_int, actual_int_1); ASSERT_ARE_EQUAL(int, 0, actual_int_2); } /* Tests_SRS_UMOCK_C_LIB_01_154: [ The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. ] */ /* Tests_SRS_UMOCK_C_LIB_01_159: [ The argument targetted by CopyOutArgumentBuffer_{arg_name} shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_only_copies_bytes_to_the_second_out_argument) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_2_out_args(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_b(&injected_int, sizeof(injected_int)); int actual_int_1 = 0; int actual_int_2 = 0; // act (void)test_dependency_2_out_args(&actual_int_1, &actual_int_2); // assert ASSERT_ARE_EQUAL(int, 0, actual_int_1); ASSERT_ARE_EQUAL(int, injected_int, actual_int_2); } /* Tests_SRS_UMOCK_C_LIB_01_155: [ The memory shall be copied. ]*/ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_copies_the_memory_for_later_use) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(&injected_int, sizeof(injected_int)); int actual_int = 0; injected_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, 0x42, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_163: [ The buffers for previous CopyOutArgumentBuffer calls shall be freed. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_156: [ If several calls to CopyOutArgumentBuffer are made, only the last buffer shall be kept. ]*/ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_frees_allocated_buffers_for_previous_CopyOutArgumentBuffer) { // arrange int injected_int = 0x42; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(&injected_int, sizeof(injected_int)) .CopyOutArgumentBuffer_a(&injected_int, sizeof(injected_int)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, 0x42, actual_int); } /* Tests_SRS_UMOCK_C_LIB_01_158: [ If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_with_NULL_bytes_triggers_the_error_callback) { // arrange // act EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(NULL, sizeof(int)); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_INVALID_ARGUMENT_BUFFER, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_158: [ If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_with_0_length_triggers_the_error_callback) { // arrange int injected_int = 0x42; // act EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(&injected_int, 0); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_INVALID_ARGUMENT_BUFFER, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_154: [ The CopyOutArgumentBuffer_{arg_name} call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later injected as an out argument when the code under test calls the mock function. ] */ /* Tests_SRS_UMOCK_C_LIB_01_159: [ The argument targetted by CopyOutArgumentBuffer_{arg_name} shall also be marked as ignored. ] */ TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_when_an_error_occurs_preserves_the_previous_state) { // arrange int injected_int = 0x42; int injected_int_2 = 0x43; EXPECTED_CALL(test_dependency_2_out_args(IGNORED_PTR_ARG, IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_b(&injected_int, sizeof(injected_int)) .CopyOutArgumentBuffer(0, &injected_int_2, sizeof(injected_int_2)); int actual_int_1 = 0; int actual_int_2 = 0; // act (void)test_dependency_2_out_args(&actual_int_1, &actual_int_2); // assert ASSERT_ARE_EQUAL(int, 0, actual_int_1); ASSERT_ARE_EQUAL(int, injected_int, actual_int_2); } TEST_FUNCTION(CopyOutArgumentBuffer_arg_name_overrides_the_buffer_for_CopyOutArgumentBuffer) { // arrange int injected_int = 0x42; int injected_int_2 = 0x43; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)) .CopyOutArgumentBuffer_a(&injected_int_2, sizeof(injected_int_2)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, injected_int_2, actual_int); } TEST_FUNCTION(CopyOutArgumentBuffer_overrides_the_buffer_for_CopyOutArgumentBuffer_arg_name) { // arrange int injected_int = 0x42; int injected_int_2 = 0x43; EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .CopyOutArgumentBuffer_a(&injected_int_2, sizeof(injected_int_2)) .CopyOutArgumentBuffer(1, &injected_int, sizeof(injected_int)); int actual_int = 0; // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(int, injected_int, actual_int); } /* ValidateArgumentBuffer */ /* Tests_SRS_UMOCK_C_LIB_01_095: [The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_096: [If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument.]*/ /* Tests_SRS_UMOCK_C_LIB_01_097: [ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument.]*/ TEST_FUNCTION(ValidateArgumentBuffer_checks_the_argument_buffer) { // arrange int expected_int = 0x42; int actual_int = 0x42; STRICT_EXPECTED_CALL(test_dependency_1_out_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, &expected_int, sizeof(expected_int)); // act (void)test_dependency_1_out_arg(&actual_int); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_095: [The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_096: [If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument.]*/ /* Tests_SRS_UMOCK_C_LIB_01_097: [ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument.]*/ TEST_FUNCTION(ValidateArgumentBuffer_checks_the_argument_buffer_and_mismatch_is_detected_when_content_does_not_match) { // arrange unsigned char expected_buffer[] = { 0x42 }; unsigned char actual_buffer[] = { 0x43 }; char actual_string[64]; STRICT_EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expected_buffer, sizeof(expected_buffer)); // act test_dependency_buffer_arg(actual_buffer); // assert (void)sprintf(actual_string, "[test_dependency_buffer_arg(%p)]", actual_buffer); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_buffer_arg([0x42])]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, actual_string, umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_095: [The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_096: [If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument.]*/ /* Tests_SRS_UMOCK_C_LIB_01_097: [ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument.]*/ TEST_FUNCTION(ValidateArgumentBuffer_checks_the_argument_buffer_and_mismatch_is_detected_when_content_does_not_match_for_expected_call) { // arrange unsigned char expected_buffer[] = { 0x42 }; unsigned char actual_buffer[] = { 0x43 }; char actual_string[64]; EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expected_buffer, sizeof(expected_buffer)); // act test_dependency_buffer_arg(actual_buffer); // assert (void)sprintf(actual_string, "[test_dependency_buffer_arg(%p)]", actual_buffer); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_buffer_arg([0x42])]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, actual_string, umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_099: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ TEST_FUNCTION(ValidateArgumentBuffer_with_0_index_triggers_an_error) { // arrange unsigned char expected_buffer[] = { 0x42 }; unsigned char actual_buffer[] = { 0x43 }; EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(0, expected_buffer, sizeof(expected_buffer)); // act test_dependency_buffer_arg(actual_buffer); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_099: [If the index is out of range umock_c shall raise an error with the code UMOCK_C_ARG_INDEX_OUT_OF_RANGE.]*/ TEST_FUNCTION(ValidateArgumentBuffer_with_index_higher_than_the_Arg_count_triggers_an_error) { // arrange unsigned char expected_buffer[] = { 0x42 }; unsigned char actual_buffer[] = { 0x43 }; EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(2, expected_buffer, sizeof(expected_buffer)); // act test_dependency_buffer_arg(actual_buffer); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_ARG_INDEX_OUT_OF_RANGE, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_100: [If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER.] */ TEST_FUNCTION(ValidateArgumentBuffer_with_NULL_buffer_triggers_the_error_callback) { // arrange // act EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, NULL, 1); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_INVALID_ARGUMENT_BUFFER, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_100: [If bytes is NULL or length is 0, umock_c shall raise an error with the code UMOCK_C_INVALID_ARGUMENT_BUFFER.] */ TEST_FUNCTION(ValidateArgumentBuffer_with_0_length_triggers_the_error_callback) { // arrange unsigned char expected_buffer[] = { 0x42 }; // act EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expected_buffer, 0); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_INVALID_ARGUMENT_BUFFER, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_095: [The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_096: [If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument.]*/ /* Tests_SRS_UMOCK_C_LIB_01_097: [ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument.]*/ TEST_FUNCTION(ValidateArgumentBuffer_with_2_bytes_and_first_byte_different_checks_the_content) { // arrange unsigned char expected_buffer[] = { 0x42, 0x41 }; unsigned char actual_buffer[] = { 0x43, 0x41 }; char actual_string[64]; EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expected_buffer, sizeof(expected_buffer)); // act test_dependency_buffer_arg(actual_buffer); // assert (void)sprintf(actual_string, "[test_dependency_buffer_arg(%p)]", actual_buffer); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_buffer_arg([0x42 0x41])]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, actual_string, umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_095: [The ValidateArgumentBuffer call modifier shall copy the memory pointed to by bytes and being length bytes so that it is later compared against a pointer type argument when the code under test calls the mock function.] */ /* Tests_SRS_UMOCK_C_LIB_01_096: [If the content of the code under test buffer and the buffer supplied to ValidateArgumentBuffer does not match then this should be treated as a mismatch in argument comparison for that argument.]*/ /* Tests_SRS_UMOCK_C_LIB_01_097: [ValidateArgumentBuffer shall implicitly perform an IgnoreArgument on the indexth argument.]*/ TEST_FUNCTION(ValidateArgumentBuffer_with_2_bytes_and_second_byte_different_checks_the_content) { // arrange unsigned char expected_buffer[] = { 0x42, 0x41 }; unsigned char actual_buffer[] = { 0x42, 0x42 }; char actual_string[64]; EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expected_buffer, sizeof(expected_buffer)); // act test_dependency_buffer_arg(actual_buffer); // assert (void)sprintf(actual_string, "[test_dependency_buffer_arg(%p)]", actual_buffer); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_buffer_arg([0x42 0x41])]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, actual_string, umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_131: [ The memory pointed by bytes shall be copied. ]*/ TEST_FUNCTION(ValidateArgumentBuffer_copies_the_bytes_to_compare) { // arrange unsigned char expected_buffer[] = { 0x42 }; unsigned char actual_buffer[] = { 0x42 }; EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expected_buffer, sizeof(expected_buffer)); expected_buffer[0] = 0x43; // act test_dependency_buffer_arg(actual_buffer); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_132: [ If several calls to ValidateArgumentBuffer are made, only the last buffer shall be kept. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_130: [ The buffers for previous ValidateArgumentBuffer calls shall be freed. ]*/ TEST_FUNCTION(When_ValidateArgumentBuffer_is_called_twice_the_last_buffer_is_used) { // arrange unsigned char expected_buffer1[] = { 0x43 }; unsigned char expected_buffer2[] = { 0x42 }; unsigned char actual_buffer[] = { 0x42 }; EXPECTED_CALL(test_dependency_buffer_arg(IGNORED_PTR_ARG)) .ValidateArgumentBuffer(1, expected_buffer1, sizeof(expected_buffer1)) .ValidateArgumentBuffer(1, expected_buffer2, sizeof(expected_buffer2)); // act test_dependency_buffer_arg(actual_buffer); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* REGISTER_GLOBAL_MOCK_HOOK */ /* Tests_SRS_UMOCK_C_LIB_01_104: [The REGISTER_GLOBAL_MOCK_HOOK shall register a mock hook to be called every time the mocked function is called by production code.]*/ /* Tests_SRS_UMOCK_C_LIB_01_105: [The hook's result shall be returned by the mock to the production code.]*/ /* Tests_SRS_UMOCK_C_LIB_01_106: [The signature for the hook shall be assumed to have exactly the same arguments and return as the mocked function.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_HOOK_registers_a_hook_for_the_mock) { // arrange REGISTER_GLOBAL_MOCK_HOOK(test_dependency_no_args, my_hook_test_dependency_no_args); my_hook_result = 0x42; // act int result = test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(int, 0x42, result); } /* Tests_SRS_UMOCK_C_LIB_01_104: [The REGISTER_GLOBAL_MOCK_HOOK shall register a mock hook to be called every time the mocked function is called by production code.]*/ /* Tests_SRS_UMOCK_C_LIB_01_105: [The hook's result shall be returned by the mock to the production code.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_HOOK_registers_a_hook_for_the_mock_that_returns_2_different_values) { // arrange REGISTER_GLOBAL_MOCK_HOOK(test_dependency_no_args, my_hook_test_dependency_no_args); my_hook_result = 0x42; // act int call1_result = test_dependency_no_args(); int call2_result = test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(int, 0x42, call1_result); ASSERT_ARE_EQUAL(int, 0x43, call2_result); } /* Tests_SRS_UMOCK_C_LIB_01_107: [If there are multiple invocations of REGISTER_GLOBAL_MOCK_HOOK, the last one shall take effect over the previous ones.] */ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_HOOK_twice_makes_the_last_hook_stick) { // arrange REGISTER_GLOBAL_MOCK_HOOK(test_dependency_no_args, my_hook_test_dependency_no_args); REGISTER_GLOBAL_MOCK_HOOK(test_dependency_no_args, my_hook_test_dependency_no_args_2); my_hook_result = 0x42; // act int result = test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(int, 0x21, result); } /* Tests_SRS_UMOCK_C_LIB_01_134: [ REGISTER_GLOBAL_MOCK_HOOK called with a NULL hook unregisters a previously registered hook. ]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_HOOK_with_NULL_unregisters_a_previously_registered_hook) { // arrange REGISTER_GLOBAL_MOCK_HOOK(test_dependency_no_args, my_hook_test_dependency_no_args); REGISTER_GLOBAL_MOCK_HOOK(test_dependency_no_args, NULL); // act int result = test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCK_C_LIB_01_135: [ All parameters passed to the mock shall be passed down to the mock hook. ]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_HOOK_the_args_of_the_mock_get_passed_to_the_hook) { // arrange REGISTER_GLOBAL_MOCK_HOOK(test_dependency_2_args, my_hook_test_dependency_2_args); // act (void)test_dependency_2_args(0x42, 0x43); // assert ASSERT_ARE_EQUAL(int, 0x42, arg_a); ASSERT_ARE_EQUAL(int, 0x43, arg_b); } /* Tests_SRS_UMOCK_C_LIB_01_104: [The REGISTER_GLOBAL_MOCK_HOOK shall register a mock hook to be called every time the mocked function is called by production code.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_HOOK_with_a_function_that_returns_void_works) { // arrange REGISTER_GLOBAL_MOCK_HOOK(test_dependency_void_return, my_hook_test_dependency_void_return); // act test_dependency_void_return(); // assert ASSERT_ARE_EQUAL(int, 1, test_dependency_void_return_called); } /* REGISTER_GLOBAL_MOCK_RETURN */ /* Tests_SRS_UMOCK_C_LIB_01_108: [The REGISTER_GLOBAL_MOCK_RETURN shall register a return value to always be returned by a mock function.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_RETURN_makes_a_subsequent_call_to_the_mock_return_the_value) { // arrange REGISTER_GLOBAL_MOCK_RETURN(test_dependency_global_mock_return_test, 0x45); // act int result = test_dependency_global_mock_return_test(); // assert ASSERT_ARE_EQUAL(int, 0x45, result); } /* Tests_SRS_UMOCK_C_LIB_01_109: [If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURN, the last one shall take effect over the previous ones.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_RETURN_twice_only_makes_the_second_call_stick) { // arrange REGISTER_GLOBAL_MOCK_RETURN(test_dependency_global_mock_return_test, 0x45); REGISTER_GLOBAL_MOCK_RETURN(test_dependency_global_mock_return_test, 0x46); // act int result = test_dependency_global_mock_return_test(); // assert ASSERT_ARE_EQUAL(int, 0x46, result); } /* REGISTER_GLOBAL_MOCK_FAIL_RETURN */ /* Tests_SRS_UMOCK_C_LIB_01_111: [The REGISTER_GLOBAL_MOCK_FAIL_RETURN shall register a fail return value to be returned by a mock function when marked as failed in the expected calls.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_FAIL_RETURN_is_possible_and_does_not_affect_the_return_value) { // arrange REGISTER_GLOBAL_MOCK_RETURN(test_dependency_global_mock_return_test, 0x42); REGISTER_GLOBAL_MOCK_FAIL_RETURN(test_dependency_global_mock_return_test, 0x45); // act int result = test_dependency_global_mock_return_test(); // assert ASSERT_ARE_EQUAL(int, 0x42, result); } /* Tests_SRS_UMOCK_C_LIB_01_112: [If there are multiple invocations of REGISTER_GLOBAL_FAIL_MOCK_RETURN, the last one shall take effect over the previous ones.]*/ TEST_FUNCTION(Multiple_REGISTER_GLOBAL_MOCK_FAIL_RETURN_calls_are_possible) { // arrange REGISTER_GLOBAL_MOCK_RETURN(test_dependency_global_mock_return_test, 0x42); REGISTER_GLOBAL_MOCK_FAIL_RETURN(test_dependency_global_mock_return_test, 0x45); REGISTER_GLOBAL_MOCK_FAIL_RETURN(test_dependency_global_mock_return_test, 0x46); // act int result = test_dependency_global_mock_return_test(); // assert ASSERT_ARE_EQUAL(int, 0x42, result); } /* Tests_SRS_UMOCK_C_LIB_01_142: [ If any error occurs during REGISTER_GLOBAL_MOCK_FAIL_RETURN, umock_c shall raise an error with the code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(When_copy_fails_in_REGISTER_GLOBAL_MOCK_FAIL_RETURN_then_on_error_is_triggered) { // arrange REGISTER_GLOBAL_MOCK_RETURN(test_dependency_global_mock_return_test, 0x42); REGISTER_GLOBAL_MOCK_FAIL_RETURN(test_dependency_global_mock_return_test, 0x45); // act int result = test_dependency_global_mock_return_test(); // assert ASSERT_ARE_EQUAL(int, 0x42, result); } /* REGISTER_GLOBAL_MOCK_RETURNS */ /* Tests_SRS_UMOCK_C_LIB_01_113: [The REGISTER_GLOBAL_MOCK_RETURNS shall register both a success and a fail return value associated with a mock function.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_RETURNS_registers_the_return_value) { // arrange REGISTER_GLOBAL_MOCK_RETURNS(test_dependency_global_mock_return_test, 0xAA, 0x43); // act int result = test_dependency_global_mock_return_test(); // assert ASSERT_ARE_EQUAL(int, 0xAA, result); } /* Tests_SRS_UMOCK_C_LIB_01_114: [If there are multiple invocations of REGISTER_GLOBAL_MOCK_RETURNS, the last one shall take effect over the previous ones.]*/ TEST_FUNCTION(REGISTER_GLOBAL_MOCK_RETURNS_twice_makes_only_the_last_call_stick) { // arrange REGISTER_GLOBAL_MOCK_RETURNS(test_dependency_global_mock_return_test, 0xAA, 0x43); REGISTER_GLOBAL_MOCK_RETURNS(test_dependency_global_mock_return_test, 0xAB, 0x44); // act int result = test_dependency_global_mock_return_test(); // assert ASSERT_ARE_EQUAL(int, 0xAB, result); } /* Type names */ /* Tests_SRS_UMOCK_C_LIB_01_145: [ Since umock_c needs to maintain a list of registered types, the following rules shall be applied: ]*/ /* Tests_SRS_UMOCK_C_LIB_01_146: [ Each type shall be normalized to a form where all extra spaces are removed. ]*/ TEST_FUNCTION(spaces_are_stripped_from_typenames) { // arrange STRICT_EXPECTED_CALL(test_dependency_type_with_space("b")); // act test_dependency_type_with_space("b"); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Supported types */ /* Tests_SRS_UMOCK_C_LIB_01_144: [ Out of the box umock_c shall support the following types through the header umocktypes_c.h: ]*/ /* Tests_SRS_UMOCK_C_LIB_01_028: [**char**] */ /* Tests_SRS_UMOCK_C_LIB_01_029 : [**unsigned char**] */ /* Tests_SRS_UMOCK_C_LIB_01_030 : [**short**] */ /* Tests_SRS_UMOCK_C_LIB_01_031 : [**unsigned short**] */ /* Tests_SRS_UMOCK_C_LIB_01_032 : [**int**] */ /* Tests_SRS_UMOCK_C_LIB_01_033 : [**unsigned int**] */ /* Tests_SRS_UMOCK_C_LIB_01_034 : [**long**] */ /* Tests_SRS_UMOCK_C_LIB_01_035 : [**unsigned long**] */ /* Tests_SRS_UMOCK_C_LIB_01_036 : [**long long**] */ /* Tests_SRS_UMOCK_C_LIB_01_037 : [**unsigned long long**] */ /* Tests_SRS_UMOCK_C_LIB_01_038 : [**float**] */ /* Tests_SRS_UMOCK_C_LIB_01_039 : [**double**] */ /* Tests_SRS_UMOCK_C_LIB_01_040 : [**long double**] */ /* Tests_SRS_UMOCK_C_LIB_01_041 : [**size_t**] */ /* Tests_SRS_UMOCK_C_LIB_01_151: [ void\* ]*/ /* Tests_SRS_UMOCK_C_LIB_01_152: [ const void\* ]*/ TEST_FUNCTION(native_c_types_are_supported) { // arrange STRICT_EXPECTED_CALL(test_dependency_all_types(-42, 42, /* char */ -43, 43, /* short */ -44, 44, /* int */ -45, 45, /* long */ -46, 46, /* long long */ -42.42f, /* float */ 4242.42, /* double */ 4242.42, /* long double */ 0x42, /* size_t*/ (void*)0x42, /* void* */ (const void*)0x42 /* const void* */ )); // act test_dependency_all_types(-42, 42, /* char */ -43, 43, /* short */ -44, 44, /* int */ -45, 45, /* long */ -46, 46, /* long long */ -42.42f, /* float */ 4242.42, /* double */ 4242.42, /* long double */ 0x42, /* size_t*/ (void*)0x42, /* void* */ (const void*)0x42 /* const void* */ ); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(size_t, 0, test_on_umock_c_error_call_count); } /* Tests_SRS_UMOCK_C_LIB_01_148: [ If call comparison fails an error shall be indicated by calling the error callback with UMOCK_C_COMPARE_CALL_ERROR. ]*/ TEST_FUNCTION(when_a_type_is_not_supported_an_error_is_triggered) { TEST_STRUCT_NOT_REGISTERED a = { 0 }; // arrange STRICT_EXPECTED_CALL(test_dependency_type_not_registered(a)); // act test_dependency_type_not_registered(a); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); } /* Call comparison rules */ /* Tests_SRS_UMOCK_C_LIB_01_136: [ When multiple return values are set for a mock function by using different means (such as SetReturn), the following order shall be in effect: ]*/ /* Tests_SRS_UMOCK_C_LIB_01_137: [ - If a return value has been specified for an expected call then that value shall be returned. ]*/ TEST_FUNCTION(when_the_return_value_is_given_by_SetReturn_then_it_is_returned) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .SetReturn(42); // act int result = test_dependency_1_arg(42); // assert ASSERT_ARE_EQUAL(int, 42, result); } /* Tests_SRS_UMOCK_C_LIB_01_136: [ When multiple return values are set for a mock function by using different means (such as SetReturn), the following order shall be in effect: ]*/ /* Tests_SRS_UMOCK_C_LIB_01_137: [ - If a return value has been specified for an expected call then that value shall be returned. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_138: [ - If a global mock hook has been specified then it shall be called and its result returned. ]*/ TEST_FUNCTION(when_the_return_value_is_given_by_SetReturn_for_a_function_with_a_global_return_hook_the_SetReturn_value_is_returned) { REGISTER_GLOBAL_MOCK_HOOK(test_dependency_with_global_mock_hook, my_hook_test_dependency_with_global_mock_hook); // arrange STRICT_EXPECTED_CALL(test_dependency_with_global_mock_hook()) .SetReturn(42); // act int result = test_dependency_with_global_mock_hook(); // assert ASSERT_ARE_EQUAL(int, 42, result); } /* Tests_SRS_UMOCK_C_LIB_01_136: [ When multiple return values are set for a mock function by using different means (such as SetReturn), the following order shall be in effect: ]*/ /* Tests_SRS_UMOCK_C_LIB_01_137: [ - If a return value has been specified for an expected call then that value shall be returned. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_138: [ - If a global mock hook has been specified then it shall be called and its result returned. ]*/ TEST_FUNCTION(when_the_return_value_is_not_given_by_SetReturn_for_a_function_with_a_global_return_hook_the_mock_hook_return_value_is_returned) { REGISTER_GLOBAL_MOCK_HOOK(test_dependency_with_global_mock_hook, my_hook_test_dependency_with_global_mock_hook); // arrange STRICT_EXPECTED_CALL(test_dependency_with_global_mock_hook()); // act int result = test_dependency_with_global_mock_hook(); // assert ASSERT_ARE_EQUAL(int, 43, result); } /* Tests_SRS_UMOCK_C_LIB_01_139: [ - If a global return value has been specified then it shall be returned. ]*/ TEST_FUNCTION(when_the_return_value_is_given_by_SetReturn_for_a_function_with_a_global_return_hook_and_global_return_the_SetReturn_value_is_returned) { REGISTER_GLOBAL_MOCK_HOOK(test_dependency_with_global_mock_hook, my_hook_test_dependency_with_global_mock_hook); REGISTER_GLOBAL_MOCK_RETURN(test_dependency_with_global_mock_hook, 44); // arrange STRICT_EXPECTED_CALL(test_dependency_with_global_mock_hook()) .SetReturn(42); // act int result = test_dependency_with_global_mock_hook(); // assert ASSERT_ARE_EQUAL(int, 42, result); } /* Tests_SRS_UMOCK_C_LIB_01_139: [ - If a global return value has been specified then it shall be returned. ]*/ TEST_FUNCTION(when_the_return_value_is_not_given_by_SetReturn_for_a_function_with_a_global_return_hook_and_global_return_the_global_mock_hook_value_is_returned) { REGISTER_GLOBAL_MOCK_HOOK(test_dependency_with_global_mock_hook, my_hook_test_dependency_with_global_mock_hook); REGISTER_GLOBAL_MOCK_RETURN(test_dependency_with_global_mock_hook, 44); // arrange STRICT_EXPECTED_CALL(test_dependency_with_global_mock_hook()); // act int result = test_dependency_with_global_mock_hook(); // assert ASSERT_ARE_EQUAL(int, 43, result); } /* Tests_SRS_UMOCK_C_LIB_01_139: [ - If a global return value has been specified then it shall be returned. ]*/ TEST_FUNCTION(when_the_return_value_is_specified_only_by_global_return_that_global_return_value_is_returned) { REGISTER_GLOBAL_MOCK_RETURN(test_dependency_with_global_return, 44); // arrange STRICT_EXPECTED_CALL(test_dependency_with_global_return()); // act int result = test_dependency_with_global_return(); // assert ASSERT_ARE_EQUAL(int, 44, result); } /* Tests_SRS_UMOCK_C_LIB_01_140: [ - Otherwise the value of a static variable of the same type as the return type shall be returned. ]*/ TEST_FUNCTION(when_no_return_value_is_specified_for_a_function_returning_int_0_is_returned) { // arrange STRICT_EXPECTED_CALL(test_dependency_returning_int()); // act int result = test_dependency_returning_int(); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* MOCK_FUNCTION_WITH_CODE tests */ TEST_FUNCTION(a_strict_expected_Call_mock_function_with_code_validates_args) { // arrange STRICT_EXPECTED_CALL(test_mock_function_with_code_1_arg(42)); // act test_mock_function_with_code_1_arg(42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } TEST_FUNCTION(an_expected_call_for_a_mock_function_with_code_ignores_args) { // arrange EXPECTED_CALL(test_mock_function_with_code_1_arg(0)); // act test_mock_function_with_code_1_arg(42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } TEST_FUNCTION(the_value_for_a_function_that_returns_a_char_ptr_is_freed) { // arrange EXPECTED_CALL(test_mock_function_returning_string()) .SetReturn("a"); // act const char* result = test_mock_function_returning_string(); // assert ASSERT_ARE_EQUAL(char_ptr, "a", result); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } TEST_FUNCTION(the_value_for_a_function_that_returns_a_char_ptr_is_freed_when_no_matched_return) { // arrange // act const char* result = test_mock_function_returning_string(); // assert ASSERT_IS_NULL(result); } TEST_FUNCTION(the_value_for_a_function_that_returns_a_char_ptr_with_a_default_is_freed_when_no_matched_return) { // arrange // act const char* result = test_mock_function_returning_string_with_code(); // assert ASSERT_ARE_EQUAL(char_ptr, "a", result); } TEST_FUNCTION(the_value_for_a_function_that_returns_a_char_ptr_set_by_macro_is_freed) { // arrange REGISTER_GLOBAL_MOCK_RETURN(test_mock_function_returning_string_with_macro, "a"); // act const char* result = test_mock_function_returning_string_with_macro(); // assert ASSERT_ARE_EQUAL(char_ptr, "a", result); } /* REGISTER_UMOCK_ALIAS_TYPE */ /* Tests SRS_UMOCK_C_LIB_01_149: [ REGISTER_UMOCK_ALIAS_TYPE registers a new alias type for another type. ]*/ TEST_FUNCTION(registering_an_alias_type_works) { // arrange REGISTER_UMOCK_ALIAS_TYPE(funkytype, int); STRICT_EXPECTED_CALL(test_mock_function_with_funkytype(42)) .SetReturn(42); // act funkytype result = test_mock_function_with_funkytype(42); // assert ASSERT_ARE_EQUAL(int, 42, (int)result); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_153: [ If no custom handler has beed registered for a pointer type, it shall be trated as void*. ] */ TEST_FUNCTION(when_an_unregistered_pointer_type_is_used_it_defaults_to_void_ptr) { // arrange REGISTER_UMOCK_ALIAS_TYPE(funkytype, int); STRICT_EXPECTED_CALL(test_mock_function_with_unregistered_ptr_type((unsigned char***)0x42)) .SetReturn((unsigned char***)0x42); // act unsigned char*** result = test_mock_function_with_unregistered_ptr_type((unsigned char***)0x42); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x42, result); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_179: [ IMPLEMENT_UMOCK_C_ENUM_TYPE shall implement umock_c handlers for an enum type. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_180: [ The variable arguments are a list making up the enum values. ]*/ TEST_FUNCTION(matching_with_an_enum_type_works) { // arrange REGISTER_TYPE(TEST_ENUM, TEST_ENUM); STRICT_EXPECTED_CALL(test_mock_function_with_enum_type(TEST_ENUM_VALUE_1)); // act test_mock_function_with_enum_type(TEST_ENUM_VALUE_2); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_mock_function_with_enum_type(TEST_ENUM_VALUE_1)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_mock_function_with_enum_type(TEST_ENUM_VALUE_2)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_179: [ IMPLEMENT_UMOCK_C_ENUM_TYPE shall implement umock_c handlers for an enum type. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_181: [ If a value that is not part of the enum is used, it shall be treated as an int value. ]*/ TEST_FUNCTION(when_the_enum_value_is_not_within_the_enum_the_int_value_is_filled_in) { // arrange REGISTER_TYPE(TEST_ENUM, TEST_ENUM); STRICT_EXPECTED_CALL(test_mock_function_with_enum_type((TEST_ENUM)(TEST_ENUM_VALUE_1+2))); // act test_mock_function_with_enum_type(TEST_ENUM_VALUE_2); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_mock_function_with_enum_type(2)]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_mock_function_with_enum_type(TEST_ENUM_VALUE_2)]", umock_c_get_actual_calls()); } /* CaptureReturn */ /* Tests_SRS_UMOCK_C_LIB_01_179: [ The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. ]*/ TEST_FUNCTION(capture_return_captures_the_return_value) { // arrange int captured_return; STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .CaptureReturn(&captured_return); // act test_dependency_for_capture_return(); // assert ASSERT_ARE_EQUAL(int, 42, captured_return); } /* Tests_SRS_UMOCK_C_LIB_01_180: [ If CaptureReturn is called multiple times for the same call, an error shall be indicated with the code UMOCK_C_CAPTURE_RETURN_ALREADY_USED. ]*/ TEST_FUNCTION(capture_return_twice_captures_the_return_value_in_the_pointer_indicated_by_the_second_call) { // arrange int captured_return_1; int captured_return_2; STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .CaptureReturn(&captured_return_1) .CaptureReturn(&captured_return_2); // act test_dependency_for_capture_return(); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_CAPTURE_RETURN_ALREADY_USED, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_182: [ If captured_return_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. ]*/ TEST_FUNCTION(capture_return_with_NULL_argument_indicates_an_error) { // arrange STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .CaptureReturn(NULL); // act test_dependency_for_capture_return(); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_NULL_ARGUMENT, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_179: [ The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. ]*/ TEST_FUNCTION(capture_return_when_no_actual_call_does_not_capture_anything) { // arrange int captured_return = 0; STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .CaptureReturn(&captured_return); // act // assert ASSERT_ARE_EQUAL(int, 0, captured_return); } /* Tests_SRS_UMOCK_C_LIB_01_179: [ The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. ]*/ TEST_FUNCTION(capture_return_when_no_matching_actual_call_does_not_capture_anything) { // arrange int captured_return = 0; STRICT_EXPECTED_CALL(test_dependency_for_capture_return_with_arg(42)) .CaptureReturn(&captured_return); // act test_dependency_for_capture_return_with_arg(41); // assert ASSERT_ARE_EQUAL(int, 0, captured_return); } /* Tests_SRS_UMOCK_C_LIB_01_179: [ The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. ]*/ TEST_FUNCTION(capture_return_takes_into_account_a_set_return_call) { // arrange int captured_return = 0; STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .SetReturn(42) .CaptureReturn(&captured_return); // act test_dependency_for_capture_return(); // assert ASSERT_ARE_EQUAL(int, 42, captured_return); } /* Tests_SRS_UMOCK_C_LIB_01_179: [ The CaptureReturn call modifier shall copy the return value that is being returned to the code under test when an actual call is matched with the expected call. ]*/ TEST_FUNCTION(capture_return_captures_the_return_value_different_value) { // arrange int captured_return = 0; STRICT_EXPECTED_CALL(test_dependency_for_capture_return()) .CaptureReturn(&captured_return); test_return_value = 45; // act test_dependency_for_capture_return(); // assert ASSERT_ARE_EQUAL(int, 45, captured_return); } /* ValidateArgumentValue_{arg_name} */ /* Tests_SRS_UMOCK_C_LIB_01_183: [ The ValidateArgumentValue_{arg_name} shall validate that the value of an argument matches the value pointed by arg_value. ]*/ TEST_FUNCTION(validate_argument_value_validates_the_value_pointed_by_arg_value) { // arrange int arg_value = 0; STRICT_EXPECTED_CALL(test_dependency_1_arg(0)) .ValidateArgumentValue_a(&arg_value); arg_value = 42; // act (void)test_dependency_1_arg(42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_183: [ The ValidateArgumentValue_{arg_name} shall validate that the value of an argument matches the value pointed by arg_value. ]*/ TEST_FUNCTION(validate_argument_value_validates_the_value_pointed_by_arg_value_for_a_char_star) { // arrange char* arg_value = "42"; STRICT_EXPECTED_CALL(test_dependency_char_star_arg(NULL)) .ValidateArgumentValue_s(&arg_value); arg_value = "43"; // act (void)test_dependency_char_star_arg("43"); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_184: [ If arg_value is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. ]*/ TEST_FUNCTION(validate_argument_value_with_NULL_value_triggers_an_error) { // arrange // act STRICT_EXPECTED_CALL(test_dependency_char_star_arg(NULL)) .ValidateArgumentValue_s(NULL); // assert //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_NULL_ARGUMENT, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_185: [ The ValidateArgumentValue_{arg_name} modifier shall inhibit comparing with any value passed directly as an argument in the expected call. ]*/ TEST_FUNCTION(validate_argument_value_overrides_existing_arg_value) { // arrange char* arg_value = "42"; STRICT_EXPECTED_CALL(test_dependency_char_star_arg("42")) .ValidateArgumentValue_s(&arg_value); arg_value = "43"; // act (void)test_dependency_char_star_arg("43"); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_186: [ The ValidateArgumentValue_{arg_name} shall implicitly do a ValidateArgument for the arg_name argument, making sure the argument is not ignored. ]*/ TEST_FUNCTION(validate_argument_value_shall_implicitly_validate_the_argument) { // arrange char* arg_value = "42"; STRICT_EXPECTED_CALL(test_dependency_char_star_arg("42")) .IgnoreArgument_s() .ValidateArgumentValue_s(&arg_value); arg_value = "41"; // act (void)test_dependency_char_star_arg("43"); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_char_star_arg(\"41\")]", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_char_star_arg(\"43\")]", umock_c_get_actual_calls()); } /* pair calls */ /* Tests_SRS_UMOCK_C_LIB_01_187: [ REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS shall register with umock two calls that are expected to be paired. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_188: [ The create call shall have a non-void return type. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_191: [ At each create_call a memory block shall be allocated so that it can be reported as a leak by any memory checker. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_193: [ When a destroy_call happens the memory block associated with the argument passed to it shall be freed. ] */ TEST_FUNCTION(paired_calls_are_checked_and_no_leak_happens) { // arrange REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create, some_destroy); // act SOME_HANDLE h = some_create(42); some_destroy(h); // assert // no explicit assert } /* Tests_SRS_UMOCK_C_LIB_01_190: [ If create_call or destroy_call do not obey these rules, at the time of calling REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS umock_c shall raise an error with the code UMOCK_C_INVALID_PAIRED_CALLS. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_188: [ The create call shall have a non-void return type. ]*/ TEST_FUNCTION(when_registering_paired_calls_for_a_create_with_void_return_an_error_is_fired) { // arrange // act REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create_void_return, some_destroy_void_return); // assert ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_INVALID_PAIRED_CALLS, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_189: [ The destroy call shall take as argument at least one argument. The type of the first argument shall be of the same type as the return type for the create_call. ]*/ TEST_FUNCTION(when_registering_paired_calls_for_a_destroy_with_no_args_an_error_is_fired) { // arrange // act REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create_no_args, some_destroy_no_args); // assert ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_INVALID_PAIRED_CALLS, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_189: [ The destroy call shall take as argument at least one argument. The type of the first argument shall be of the same type as the return type for the create_call. ]*/ TEST_FUNCTION(when_registering_paired_calls_for_a_destroy_with_different_arg_type_an_error_is_fired) { // arrange // act REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create_arg_different, some_destroy_arg_different); // assert ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_INVALID_PAIRED_CALLS, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_196: [ The type used for the return of create_call and first argument of destroy_call shall be allowed to be any type registered with umock. ]*/ TEST_FUNCTION(paired_calls_are_checked_with_a_struct_as_instance_type) { // arrange REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create_with_struct, some_destroy_with_struct); // act SOME_STRUCT s = some_create_with_struct(42); some_destroy_with_struct(s); // assert // no explicit assert } /* Tests_SRS_UMOCK_C_LIB_01_066: [If only the value_type is specified in the macro invocation then the stringify, are_equal, copy and free function names shall be automatically derived from the type as: umockvalue_stringify_value_type, umockvalue_are_equal_value_type, umockvalue_copy_value_type, umockvalue_free_value_type.]*/ TEST_FUNCTION(using_a_type_registered_with_a_register_call_only_with_the_first_arg_succeeds) { // arrange STRICT_EXPECTED_CALL(another_test_function((void*)0x4242)); // act another_test_function((void*)0x4242); // assert ASSERT_ARE_EQUAL(size_t, 0, test_on_umock_c_error_call_count); } /* ValidateArgumentValue_{arg_name}_AsType */ /* Tests_SRS_UMOCK_C_LIB_01_199: [ `ValidateArgumentValue_{arg_name}_AsType` shall ensure that validation of the argument `arg_name` is done as if the argument is of type `type_name`. ]*/ TEST_FUNCTION(validate_argument_value_as_type_validates_the_value_pointed_by_arg_value_int) { // arrange MY_STRUCT expected_arg_value = { 42 }; MY_STRUCT actual_arg_value = { 42 }; REGISTER_TYPE(MY_STRUCT*, MY_STRUCT_ptr); STRICT_EXPECTED_CALL(test_dependency_with_void_ptr(&expected_arg_value)) .ValidateArgumentValue_argument_AsType(UMOCK_TYPE(MY_STRUCT*)); // act (void)test_dependency_with_void_ptr(&actual_arg_value); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_200: [ If `type_name` is NULL, umock_c shall raise an error with the code UMOCK_C_NULL_ARGUMENT. ]*/ TEST_FUNCTION(ValidateArgumentValue_argument_AsType_with_NULL_yields_an_error) { // arrange MY_STRUCT expected_arg_value = { 42 }; REGISTER_TYPE(MY_STRUCT*, MY_STRUCT_ptr); // act STRICT_EXPECTED_CALL(test_dependency_with_void_ptr(&expected_arg_value)) .ValidateArgumentValue_argument_AsType(NULL); // assert ASSERT_ARE_NOT_EQUAL(size_t, 0, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); //TFS661968 ASSERT_ARE_EQUAL(int, (int)UMOCK_C_NULL_ARGUMENT, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_LIB_01_199: [ `ValidateArgumentValue_{arg_name}_AsType` shall ensure that validation of the argument `arg_name` is done as if the argument is of type `type_name`. ]*/ TEST_FUNCTION(validate_argument_value_as_type_2_times_with_same_type_does_not_leak) { // arrange MY_STRUCT expected_arg_value = { 42 }; MY_STRUCT actual_arg_value = { 42 }; REGISTER_TYPE(MY_STRUCT*, MY_STRUCT_ptr); STRICT_EXPECTED_CALL(test_dependency_with_void_ptr(&expected_arg_value)) .ValidateArgumentValue_argument_AsType(UMOCK_TYPE(MY_STRUCT*)) .ValidateArgumentValue_argument_AsType(UMOCK_TYPE(MY_STRUCT*)); // act (void)test_dependency_with_void_ptr(&actual_arg_value); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_203: [ If `ValidateArgumentValue_{arg_name}_AsType` is used multiple times on the same argument, the last call shall apply. ]*/ TEST_FUNCTION(validate_argument_value_as_type_2_times_makes_the_last_call_stick) { // arrange MY_STRUCT expected_arg_value = { 42 }; MY_STRUCT actual_arg_value = { 42 }; REGISTER_TYPE(MY_STRUCT*, MY_STRUCT_ptr); STRICT_EXPECTED_CALL(test_dependency_with_void_ptr(&expected_arg_value)) .ValidateArgumentValue_argument_AsType(UMOCK_TYPE(int*)) .ValidateArgumentValue_argument_AsType(UMOCK_TYPE(MY_STRUCT*)); // act (void)test_dependency_with_void_ptr(&actual_arg_value); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_207: [ `IGNORED_NUM_ARG` shall be defined to 0 so that it can be used for numeric type arguments. ]*/ TEST_FUNCTION(auto_ignore_ignores_a_numeric_argument) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(IGNORED_NUM_ARG)); // act (void)test_dependency_1_arg(42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_206: [ `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. ]*/ TEST_FUNCTION(auto_ignore_ignores_a_pointer_argument) { // arrange STRICT_EXPECTED_CALL(test_dependency_char_star_arg(IGNORED_PTR_ARG)); // act (void)test_dependency_char_star_arg("cucu"); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_207: [ `IGNORED_NUM_ARG` shall be defined to 0 so that it can be used for numeric type arguments. ]*/ TEST_FUNCTION(auto_ignore_ignores_a_2nd_numeric_argument) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(1, IGNORED_NUM_ARG)); // act (void)test_dependency_2_args(1, 42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_206: [ `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. ]*/ TEST_FUNCTION(auto_ignore_ignores_a_2nd_pointer_argument) { // arrange int a = 42; int b = 43; STRICT_EXPECTED_CALL(test_dependency_2_out_args(IGNORED_PTR_ARG, IGNORED_PTR_ARG)); // act (void)test_dependency_2_out_args(&a, &b); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } #define test(a,b) 42 /* Tests_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_206: [ `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. ]*/ TEST_FUNCTION(auto_ignore_when_first_arg_is_a_macro_succeeds_for_2nd_arg) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(test(1,2), IGNORED_NUM_ARG)); // act (void)test_dependency_2_args(42, 1); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_206: [ `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. ]*/ TEST_FUNCTION(auto_ignore_when_first_arg_is_a_nested_macro_succeeds_for_2nd_arg) { // arrange STRICT_EXPECTED_CALL(test_dependency_2_args(test(test(1, 2), 4), IGNORED_NUM_ARG)); // act (void)test_dependency_2_args(42, 1); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_205: [ If `IGNORED_PTR_ARG` or `IGNORED_NUM_ARG` is used as an argument value with `STRICT_EXPECTED_CALL`, the argument shall be automatically ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_206: [ `IGNORED_PTR_ARG` shall be defined as NULL so that it can be used for pointer type arguments. ]*/ TEST_FUNCTION(auto_ignore_when_first_arg_is_a_struct_succeeds_for_2nd_arg) { #ifdef _MSC_VER #ifdef __cplusplus // arrange STRICT_EXPECTED_CALL(test_dependency_struct_with_2_members({ 2, 3 }, IGNORED_NUM_ARG)); // act (void)test_dependency_struct_with_2_members({ 2, 3 }, 1); #else // arrange STRICT_EXPECTED_CALL(test_dependency_struct_with_2_members((struct TEST_STRUCT_WITH_2_MEMBERS_TAG) { 2, 3 }, IGNORED_NUM_ARG)); // act (void)test_dependency_struct_with_2_members((struct TEST_STRUCT_WITH_2_MEMBERS_TAG) { 2, 3 }, 1); #endif #else // arrange STRICT_EXPECTED_CALL(test_dependency_struct_with_2_members((struct TEST_STRUCT_WITH_2_MEMBERS_TAG) { 2, 3 }, IGNORED_NUM_ARG)); // act (void)test_dependency_struct_with_2_members((struct TEST_STRUCT_WITH_2_MEMBERS_TAG) { 2, 3 }, 1); #endif // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_101: [The IgnoreAllCalls call modifier shall record that all calls matching the expected call shall be ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_208: [ If no matching call occurs no missing call shall be reported. ]*/ TEST_FUNCTION(IgnoreAllCalls_does_not_record_an_expected_call) { // arrange STRICT_EXPECTED_CALL(test_dependency_no_args()) .IgnoreAllCalls(); // act // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_101: [The IgnoreAllCalls call modifier shall record that all calls matching the expected call shall be ignored. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_208: [ If no matching call occurs no missing call shall be reported. ]*/ TEST_FUNCTION(IgnoreAllCalls_ignores_the_call) { // arrange STRICT_EXPECTED_CALL(test_dependency_no_args()) .IgnoreAllCalls(); // act test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_102: [If multiple matching actual calls occur no unexpected calls shall be reported.]*/ TEST_FUNCTION(IgnoreAllCalls_ignores_2_calls) { // arrange STRICT_EXPECTED_CALL(test_dependency_no_args()) .IgnoreAllCalls(); test_dependency_no_args(); // act test_dependency_no_args(); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_102: [If multiple matching actual calls occur no unexpected calls shall be reported.]*/ /* Tests_SRS_UMOCK_C_LIB_01_103: [The call matching shall be done taking into account arguments and call modifiers referring to arguments.]*/ TEST_FUNCTION(IgnoreAllCalls_ignores_2_calls_with_matching_1_arg) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .IgnoreAllCalls(); test_dependency_1_arg(42); // act test_dependency_1_arg(42); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_102: [If multiple matching actual calls occur no unexpected calls shall be reported.]*/ /* Tests_SRS_UMOCK_C_LIB_01_103: [The call matching shall be done taking into account arguments and call modifiers referring to arguments.]*/ TEST_FUNCTION(IgnoreAllCalls_ignores_only_calls_with_matching_args) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .IgnoreAllCalls(); test_dependency_1_arg(42); // act test_dependency_1_arg(43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_1_arg(43)]", umock_c_get_actual_calls()); } /* Tests_SRS_UMOCK_C_LIB_01_102: [If multiple matching actual calls occur no unexpected calls shall be reported.]*/ /* Tests_SRS_UMOCK_C_LIB_01_103: [The call matching shall be done taking into account arguments and call modifiers referring to arguments.]*/ TEST_FUNCTION(IgnoreAllCalls_ignores_only_calls_with_matching_args_2) { // arrange STRICT_EXPECTED_CALL(test_dependency_1_arg(42)) .IgnoreAllCalls(); STRICT_EXPECTED_CALL(test_dependency_1_arg(43)); // act test_dependency_1_arg(42); test_dependency_1_arg(43); test_dependency_1_arg(42); test_dependency_1_arg(43); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_expected_calls()); ASSERT_ARE_EQUAL(char_ptr, "[test_dependency_1_arg(43)]", umock_c_get_actual_calls()); } END_TEST_SUITE(umock_c_integrationtests) umock_c_malloc_hook_int/000077500000000000000000000000001362133436400406565ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000012611362133436400434160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_malloc_hook_int#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_malloc_hook_int) set(${theseTestsName}_test_files umock_c_malloc_hook_int.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ../../src/umockalloc.c ../../src/umockcall.c ../../src/umockcallrecorder.c ../../src/umocktypes.c ../../src/umocktypes_charptr.c ../../src/umocktypes_c.c ../../src/umocktypename.c ../../src/umock_log.c ../../src/umockstring.c ../../src/umockautoignoreargs.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005231362133436400417460ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_malloc_hook_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_malloc_hook_integrationtests, failedTestCount); return failedTestCount; } umock_c_malloc_hook_int.c000066400000000000000000000050561362133436400456710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_malloc_hook_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #endif #include "testrunnerswitcher.h" static size_t my_malloc_count; void* my_malloc(size_t size) { my_malloc_count++; return malloc(size); } static size_t my_realloc_count; void* my_realloc(void* ptr, size_t size) { my_realloc_count++; return realloc(ptr, size); } static size_t my_free_count; void my_free(void* ptr) { my_free_count++; free(ptr); } #define malloc my_malloc #define realloc my_realloc #define free my_free #define ENABLE_MOCKS #include "umock_c.h" #include "umocktypes_charptr.h" #include "macro_utils.h" DEFINE_ENUM_STRINGS(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static void test_on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { char temp_str[256]; (void)snprintf(temp_str, sizeof(temp_str), "umock_c reported error :%s", ENUM_TO_STRING(UMOCK_C_ERROR_CODE, error_code)); ASSERT_FAIL(temp_str); } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; MOCK_FUNCTION_WITH_CODE(, int, function1, int, a) MOCK_FUNCTION_END(42) BEGIN_TEST_SUITE(umock_c_malloc_hook_integrationtests) TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); result = umock_c_init(test_on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); umock_c_reset_all_calls(); my_malloc_count = 0; my_realloc_count = 0; my_free_count = 0; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex); } TEST_FUNCTION(when_malloc_is_hooked_no_calls_are_made_to_it) { // arrange STRICT_EXPECTED_CALL(function1(42)); // act function1(42); // assert ASSERT_ARE_EQUAL(size_t, 0, my_malloc_count); ASSERT_ARE_EQUAL(size_t, 0, my_realloc_count); ASSERT_ARE_EQUAL(size_t, 0, my_free_count); } END_TEST_SUITE(umock_c_malloc_hook_integrationtests) umock_c_mock_filters_int/000077500000000000000000000000001362133436400410505ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000013401362133436400436060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_mock_filters_int#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_mock_filters_int) set(${theseTestsName}_test_files umock_c_mock_filters_int.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ../../src/umockalloc.c ../../src/umockstring.c ../../src/umockautoignoreargs.c ../../src/umockcall.c ../../src/umockcallrecorder.c ../../src/umocktypes.c ../../src/umocktypes_charptr.c ../../src/umocktypes_c.c ../../src/umocktypename.c ../../src/umockcallpairs.c ../../src/umock_log.c ) set(${theseTestsName}_h_files test_dependency.h ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005151362133436400421410ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_mock_filters_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_mock_filters_int_tests, failedTestCount); return failedTestCount; } test_dependency.h000066400000000000000000000006571362133436400444060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_mock_filters_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TEST_DEPENDENCY_H #define TEST_DEPENDENCY_H #include "umock_c_prod.h" #ifdef __cplusplus extern "C" { #endif MOCKABLE_FUNCTION(, int, the_mocked_one); MOCKABLE_FUNCTION(, int, do_not_actually_mock); #ifdef __cplusplus } #endif #endif /* TEST_DEPENDENCY_H */ umock_c_mock_filters_int.c000066400000000000000000000034701362133436400462530ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_mock_filters_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #define ENABLE_MOCKS // this enables mock filtering whicle being backward compatible #define ENABLE_MOCK_FILTERING // you have to be nice to the framework, so you have to say "please_mock_{function_name}" #define please_mock_the_mocked_one MOCK_ENABLED #include "test_dependency.h" static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; static void test_on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { (void)error_code; ASSERT_FAIL("umock error"); } BEGIN_TEST_SUITE(umock_c_mock_filters_int_tests) TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); result = umock_c_init(test_on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex); } int do_not_actually_mock(void) { return 0x42; } TEST_FUNCTION(call_the_not_mocked_function) { // arrange int result; // act result = do_not_actually_mock(); // assert ASSERT_ARE_EQUAL(char_ptr, "", umock_c_get_actual_calls()); ASSERT_ARE_EQUAL(int, 0x42, result); } END_TEST_SUITE(umock_c_mock_filters_int_tests) umock_c_negt_int/000077500000000000000000000000001362133436400373245ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000014461362133436400420710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_int#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_negative_tests_int) set(${theseTestsName}_test_files umock_c_negt_int_tests.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ../../src/umockalloc.c ../../src/umockcall.c ../../src/umockcallpairs.c ../../src/umockcallrecorder.c ../../src/umocktypes.c ../../src/umocktypes_charptr.c ../../src/umocktypes_c.c ../../src/umocktypename.c ../../src/umock_c_negative_tests.c ../../src/umock_log.c ../../src/umockstring.c ../../src/umockautoignoreargs.c ) set(${theseTestsName}_h_files ../../inc/umock_c_negative_tests.h test_dependency.h ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005261362133436400404170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_negative_tests_integrationtests, failedTestCount); return failedTestCount; } test_dependency.h000066400000000000000000000013751362133436400426600ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifndef TEST_DEPENDENCY_H #define TEST_DEPENDENCY_H #include "umock_c_prod.h" #ifdef __cplusplus #include extern "C" { #else #include #endif typedef void* SOME_OTHER_HANDLE; MOCKABLE_FUNCTION(, int, function_1); MOCKABLE_FUNCTION(, int, function_2); MOCKABLE_FUNCTION(, void, function_3_void_return); MOCKABLE_FUNCTION(, void*, function_3_void_ptr_return, void*, a); MOCKABLE_FUNCTION(, SOME_OTHER_HANDLE, some_other_create, int, a); MOCKABLE_FUNCTION(, void, some_other_destroy, SOME_OTHER_HANDLE, h); #ifdef __cplusplus } #endif #endif /* TEST_DEPENDENCY_H */ umock_c_negt_int_tests.c000066400000000000000000000342121362133436400442230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umock_c.h" #include "umock_c_negative_tests.h" #define ENABLE_MOCKS #include "test_dependency.h" #include "umocktypes_charptr.h" static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; static void test_on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { (void)error_code; } int function_under_test_1_call(void) { int result; if (function_1() != 0) { result = __LINE__; } else { result = 0; } return result; } int function_under_test_2_calls(void) { int result; if (function_1() != 0) { result = __LINE__; } else { if (function_2() != 0) { result = __LINE__; } else { result = 0; } } return result; } int function_under_test_1_call_dep_void_return(void) { function_3_void_return(); return 0; } int function_under_test_3_call_dep_void_ptr_return(void) { int result; if (function_3_void_ptr_return((void*)0x42) == NULL) { result = __LINE__; } else { result = 0; } return result; } MOCK_FUNCTION_WITH_CODE(, void*, function_4_void_ptr_return_non_NULL, void*, a) void* my_result = (void*)0x42; MOCK_FUNCTION_END(my_result) typedef void* SOME_HANDLE; static const SOME_HANDLE test_handle = (SOME_HANDLE)0x4242; MOCK_FUNCTION_WITH_CODE(, SOME_HANDLE, some_create, int, a); MOCK_FUNCTION_END(test_handle) MOCK_FUNCTION_WITH_CODE(, void, some_destroy, SOME_HANDLE, h); MOCK_FUNCTION_END() int function_under_test_4_call_dep_void_ptr_return_non_NULL(void) { int result; if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { if (function_4_void_ptr_return_non_NULL((void*)0x42) == NULL) { result = __LINE__; } else { result = 0; } } } } } } } } } return result; } BEGIN_TEST_SUITE(umock_c_negative_tests_integrationtests) TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); result = umock_c_init(test_on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); REGISTER_UMOCK_ALIAS_TYPE(SOME_HANDLE, void*); REGISTER_UMOCK_ALIAS_TYPE(SOME_OTHER_HANDLE, void*); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, result); result = umock_c_negative_tests_init(); ASSERT_ARE_EQUAL(int, 0, result); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { umock_c_negative_tests_deinit(); umock_c_reset_all_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* Tests_SRS_UMOCK_C_LIB_01_167: [ umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). ]*/ /* Tests_SRS_UMOCK_C_LIB_01_170: [ umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_173: [ umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_176: [ umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. ]*/ TEST_FUNCTION(negative_tests_with_one_call) { size_t i; STRICT_EXPECTED_CALL(function_1()) .SetReturn(0).SetFailReturn(1); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test_1_call(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_NOT_EQUAL_WITH_MSG(int, 0, result, temp_str); } } /* Tests_SRS_UMOCK_C_LIB_01_167: [ umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). ]*/ /* Tests_SRS_UMOCK_C_LIB_01_170: [ umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_173: [ umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_176: [ umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. ]*/ TEST_FUNCTION(negative_tests_with_2_calls) { size_t i; STRICT_EXPECTED_CALL(function_1()) .SetReturn(0).SetFailReturn(1); STRICT_EXPECTED_CALL(function_2()) .SetReturn(0).SetFailReturn(1); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test_2_calls(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_NOT_EQUAL_WITH_MSG(int, 0, result, temp_str); } } /* Tests_SRS_UMOCK_C_LIB_01_167: [ umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). ]*/ /* Tests_SRS_UMOCK_C_LIB_01_170: [ umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_173: [ umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_176: [ umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. ]*/ TEST_FUNCTION(negative_tests_with_1_call_with_void_return_dependency) { size_t i; STRICT_EXPECTED_CALL(function_3_void_return()); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test_1_call_dep_void_return(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_EQUAL_WITH_MSG(int, 0, result, temp_str); } } /* Tests_SRS_UMOCK_C_LIB_01_167: [ umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). ]*/ /* Tests_SRS_UMOCK_C_LIB_01_170: [ umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_173: [ umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_176: [ umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. ]*/ TEST_FUNCTION(negative_tests_with_1_call_with_void_ptr_return_dependency) { size_t i; STRICT_EXPECTED_CALL(function_3_void_ptr_return(IGNORED_PTR_ARG)) .SetReturn((void*)0x42).SetFailReturn(NULL).IgnoreArgument_a(); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test_3_call_dep_void_ptr_return(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_NOT_EQUAL_WITH_MSG(int, 0, result, temp_str); } } /* Tests_SRS_UMOCK_C_LIB_01_167: [ umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). ]*/ /* Tests_SRS_UMOCK_C_LIB_01_170: [ umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_173: [ umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_176: [ umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. ]*/ TEST_FUNCTION(negative_tests_with_1_call_with_ignored_arguments_takes_the_ignoreargument_flags_into_account) { size_t i; STRICT_EXPECTED_CALL(function_4_void_ptr_return_non_NULL(IGNORED_PTR_ARG)) .SetFailReturn(NULL).IgnoreArgument(1); umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test_4_call_dep_void_ptr_return_non_NULL(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_NOT_EQUAL_WITH_MSG(int, 0, result, temp_str); } } /* Tests_SRS_UMOCK_C_LIB_01_167: [ umock_c_negative_tests_snapshot shall take a snapshot of the current setup of expected calls (a.k.a happy path). ]*/ /* Tests_SRS_UMOCK_C_LIB_01_170: [ umock_c_negative_tests_reset shall bring umock_c expected and actual calls to the state recorded when umock_c_negative_tests_snapshot was called. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_173: [ umock_c_negative_tests_fail_call shall instruct the negative tests module to fail a specific call. ]*/ /* Tests_SRS_UMOCK_C_LIB_01_176: [ umock_c_negative_tests_call_count shall provide the number of expected calls, so that the test code can iterate through all negative cases. ]*/ TEST_FUNCTION(negative_tests_with_9_calls_works) { size_t i; for (i = 0; i < 9; i++) { STRICT_EXPECTED_CALL(function_4_void_ptr_return_non_NULL(IGNORED_PTR_ARG)) .SetFailReturn(NULL).IgnoreArgument(1); } umock_c_negative_tests_snapshot(); for (i = 0; i < umock_c_negative_tests_call_count(); i++) { // arrange char temp_str[128]; int result; umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(i); // act result = function_under_test_4_call_dep_void_ptr_return_non_NULL(); // assert sprintf(temp_str, "On failed call %zu", i + 1); ASSERT_ARE_NOT_EQUAL_WITH_MSG(int, 0, result, temp_str); } } /* Tests_SRS_UMOCK_C_LIB_01_204: [ Tracking of paired calls shall not be done if the actual call to the `create_call` is using the `SetFailReturn` call modifier. ]*/ TEST_FUNCTION(SetFailReturn_suppresses_paired_calls_tracking) { REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_create, some_destroy); STRICT_EXPECTED_CALL(some_create(42)) .SetFailReturn(NULL); umock_c_negative_tests_snapshot(); umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(0); // act (void)some_create(42); // assert // no explicit assert, no leak expected } /* Tests_SRS_UMOCK_C_LIB_01_204: [ Tracking of paired calls shall not be done if the actual call to the `create_call` is using the `SetFailReturn` call modifier. ]*/ TEST_FUNCTION(SetFailReturn_suppresses_paired_calls_tracking_for_mockable_functions) { REGISTER_UMOCKC_PAIRED_CREATE_DESTROY_CALLS(some_other_create, some_other_destroy); STRICT_EXPECTED_CALL(some_other_create(42)) .SetFailReturn(NULL); umock_c_negative_tests_snapshot(); umock_c_negative_tests_reset(); umock_c_negative_tests_fail_call(0); // act (void)some_other_create(42); // assert // no explicit assert, no leak expected } END_TEST_SUITE(umock_c_negative_tests_integrationtests) umock_c_negt_noini_ut/000077500000000000000000000000001362133436400403565ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006371362133436400431240ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_noini_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_negt_noint_tests) set(${theseTestsName}_test_files umock_c_negt_noint_tests.c ) set(${theseTestsName}_c_files ../../src/umock_c_negative_tests.c ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005271362133436400414520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_noini_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_negative_tests_no_init_unittests, failedTestCount); return failedTestCount; } umock_c_negt_noint_tests.c000066400000000000000000000272311362133436400456150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_noini_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockcallrecorder.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "umock_c.h" #include "umock_c_negative_tests.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } static UMOCKCALLRECORDER_HANDLE test_call_recorder = (UMOCKCALLRECORDER_HANDLE)0x4244; static UMOCKCALLRECORDER_HANDLE test_cloned_call_recorder = (UMOCKCALLRECORDER_HANDLE)0x4245; static size_t umock_c_get_call_recorder_call_count; static UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder_call_result; typedef struct umockcallrecorder_clone_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_clone_CALL; static umockcallrecorder_clone_CALL* umockcallrecorder_clone_calls; static size_t umockcallrecorder_clone_call_count; static UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone_call_result; typedef struct umockcallrecorder_get_expected_call_count_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; size_t* expected_call_count; } umockcallrecorder_get_expected_call_count_CALL; static umockcallrecorder_get_expected_call_count_CALL* umockcallrecorder_get_expected_call_count_calls; static size_t umockcallrecorder_get_expected_call_count_call_count; static int umockcallrecorder_get_expected_call_count_call_result; typedef struct umockcallrecorder_fail_call_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; size_t index; } umockcallrecorder_fail_call_CALL; static umockcallrecorder_fail_call_CALL* umockcallrecorder_fail_call_calls; static size_t umockcallrecorder_fail_call_call_count; static int umockcallrecorder_fail_call_call_result; typedef struct umock_c_set_call_recorder_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umock_c_set_call_recorder_CALL; static umock_c_set_call_recorder_CALL* umock_c_set_call_recorder_calls; static size_t umock_c_set_call_recorder_call_count; static int umock_c_set_call_recorder_call_result; typedef struct umockcallrecorder_destroy_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_destroy_CALL; static umockcallrecorder_destroy_CALL* umockcallrecorder_destroy_calls; static size_t umockcallrecorder_destroy_call_count; typedef struct umock_c_indicate_error_CALL_TAG { UMOCK_C_ERROR_CODE error_code; } umock_c_indicate_error_CALL; static umock_c_indicate_error_CALL* umock_c_indicate_error_calls; static size_t umock_c_indicate_error_call_count; UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void) { umock_c_get_call_recorder_call_count++; return umock_c_get_call_recorder_call_result; } UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_clone_CALL* new_calls = (umockcallrecorder_clone_CALL*)realloc(umockcallrecorder_clone_calls, sizeof(umockcallrecorder_clone_CALL) * (umockcallrecorder_clone_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_clone_calls = new_calls; umockcallrecorder_clone_calls[umockcallrecorder_clone_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_clone_call_count++; } return umockcallrecorder_clone_call_result; } int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count) { umockcallrecorder_get_expected_call_count_CALL* new_calls = (umockcallrecorder_get_expected_call_count_CALL*)realloc(umockcallrecorder_get_expected_call_count_calls, sizeof(umockcallrecorder_get_expected_call_count_CALL) * (umockcallrecorder_get_expected_call_count_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_get_expected_call_count_calls = new_calls; umockcallrecorder_get_expected_call_count_calls[umockcallrecorder_get_expected_call_count_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_get_expected_call_count_calls[umockcallrecorder_get_expected_call_count_call_count].expected_call_count = expected_call_count; umockcallrecorder_get_expected_call_count_call_count++; } return umockcallrecorder_get_expected_call_count_call_result; } int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index) { umockcallrecorder_fail_call_CALL* new_calls = (umockcallrecorder_fail_call_CALL*)realloc(umockcallrecorder_fail_call_calls, sizeof(umockcallrecorder_fail_call_CALL) * (umockcallrecorder_fail_call_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_fail_call_calls = new_calls; umockcallrecorder_fail_call_calls[umockcallrecorder_fail_call_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_fail_call_calls[umockcallrecorder_fail_call_call_count].index = index; umockcallrecorder_fail_call_call_count++; } return umockcallrecorder_fail_call_call_result; } int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE call_recorder) { umock_c_set_call_recorder_CALL* new_calls = (umock_c_set_call_recorder_CALL*)realloc(umock_c_set_call_recorder_calls, sizeof(umock_c_set_call_recorder_CALL) * (umock_c_set_call_recorder_call_count + 1)); if (new_calls != NULL) { umock_c_set_call_recorder_calls = new_calls; umock_c_set_call_recorder_calls[umock_c_set_call_recorder_call_count].umock_call_recorder = call_recorder; umock_c_set_call_recorder_call_count++; } return umock_c_set_call_recorder_call_result; } void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_destroy_CALL* new_calls = (umockcallrecorder_destroy_CALL*)realloc(umockcallrecorder_destroy_calls, sizeof(umockcallrecorder_destroy_CALL) * (umockcallrecorder_destroy_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_destroy_calls = new_calls; umockcallrecorder_destroy_calls[umockcallrecorder_destroy_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_destroy_call_count++; } } void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code) { umock_c_indicate_error_CALL* new_calls = (umock_c_indicate_error_CALL*)realloc(umock_c_indicate_error_calls, sizeof(umock_c_indicate_error_CALL) * (umock_c_indicate_error_call_count + 1)); if (new_calls != NULL) { umock_c_indicate_error_calls = new_calls; umock_c_indicate_error_calls[umock_c_indicate_error_call_count].error_code = error_code; umock_c_indicate_error_call_count++; } } void reset_all_calls(void) { umock_c_get_call_recorder_call_count = 0; umock_c_get_call_recorder_call_result = test_call_recorder; if (umockcallrecorder_clone_calls != NULL) { free(umockcallrecorder_clone_calls); } umockcallrecorder_clone_calls = NULL; umockcallrecorder_clone_call_count = 0; umockcallrecorder_clone_call_result = test_call_recorder; if (umockcallrecorder_get_expected_call_count_calls != NULL) { free(umockcallrecorder_get_expected_call_count_calls); } umockcallrecorder_get_expected_call_count_calls = NULL; umockcallrecorder_get_expected_call_count_call_count = 0; umockcallrecorder_get_expected_call_count_call_result = 0; if (umockcallrecorder_fail_call_calls != NULL) { free(umockcallrecorder_fail_call_calls); } umockcallrecorder_fail_call_calls = NULL; umockcallrecorder_fail_call_call_count = 0; umockcallrecorder_fail_call_call_result = 0; if (umock_c_set_call_recorder_calls != NULL) { free(umock_c_set_call_recorder_calls); } umock_c_set_call_recorder_calls = NULL; umock_c_set_call_recorder_call_count = 0; umock_c_set_call_recorder_call_result = 0; if (umockcallrecorder_destroy_calls != NULL) { free(umockcallrecorder_destroy_calls); } umockcallrecorder_destroy_calls = NULL; umockcallrecorder_destroy_call_count = 0; if (umock_c_indicate_error_calls != NULL) { free(umock_c_indicate_error_calls); } umock_c_indicate_error_calls = NULL; umock_c_indicate_error_call_count = 0; } void* umockalloc_malloc(size_t size) { return malloc(size); } void umockalloc_free(void* ptr) { free(ptr); } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE g_dllByDll; BEGIN_TEST_SUITE(umock_c_negative_tests_no_init_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); reset_all_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_all_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* umock_c_negative_tests_deinit */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_003: [ If the module was not previously initialized, umock_c_negative_tests_deinit shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_deinit_when_not_initialized_does_not_free_anything) { // arrange // act umock_c_negative_tests_deinit(); // assert ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } /* umock_c_negative_tests_snapshot */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_015: [ If the module was not previously initialized, umock_c_negative_tests_snapshot shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_snapshot_when_not_initialized_does_nothing) { // arrange // act umock_c_negative_tests_snapshot(); // assert ASSERT_ARE_EQUAL(size_t, 0, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* umock_c_negative_tests_reset */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_016: [ If the module was not previously initialized, umock_c_negative_tests_reset shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_reset_when_not_initialized_does_nothing) { // arrange // act umock_c_negative_tests_reset(); // assert ASSERT_ARE_EQUAL(size_t, 0, umock_c_set_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* umock_c_negative_tests_fail_call */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_020: [ If the module was not previously initialized, umock_c_negative_tests_fail_call shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_fail_call_when_not_initialized_does_nothing) { // arrange // act umock_c_negative_tests_fail_call(0); // assert ASSERT_ARE_EQUAL(size_t, 0, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_fail_call_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* umock_c_negative_tests_call_count */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_024: [ If the module was not previously initialized, umock_c_negative_tests_call_count shall return 0. ]*/ TEST_FUNCTION(umock_c_negative_tests_call_count_when_the_module_is_not_initialized_returns_0) { // arrange // act size_t result = umock_c_negative_tests_call_count(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_expected_call_count_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } END_TEST_SUITE(umock_c_negative_tests_no_init_unittests) umock_c_negt_ut/000077500000000000000000000000001362133436400371625ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006411362133436400417230ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_negative_tests_ut) set(${theseTestsName}_test_files umock_c_negative_tests_ut.c ) set(${theseTestsName}_c_files ../../src/umock_c_negative_tests.c ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005171362133436400402550ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_negative_tests_unittests, failedTestCount); return failedTestCount; } umock_c_negative_tests_ut.c000066400000000000000000000630051362133436400445660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_negt_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockcallrecorder.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "umock_c.h" #include "umock_c_negative_tests.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } TEST_DEFINE_ENUM_TYPE(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR_CODE_VALUES) static UMOCKCALLRECORDER_HANDLE test_call_recorder = (UMOCKCALLRECORDER_HANDLE)0x4244; static UMOCKCALLRECORDER_HANDLE test_cloned_call_recorder = (UMOCKCALLRECORDER_HANDLE)0x4245; static size_t umock_c_get_call_recorder_call_count; static UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder_call_result; typedef struct umockcallrecorder_clone_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_clone_CALL; static umockcallrecorder_clone_CALL* umockcallrecorder_clone_calls; static size_t umockcallrecorder_clone_call_count; static UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone_call_result; typedef struct umockcallrecorder_get_expected_call_count_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; size_t* expected_call_count; } umockcallrecorder_get_expected_call_count_CALL; static umockcallrecorder_get_expected_call_count_CALL* umockcallrecorder_get_expected_call_count_calls; static size_t umockcallrecorder_get_expected_call_count_call_count; static int umockcallrecorder_get_expected_call_count_call_result; typedef struct umockcallrecorder_fail_call_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; size_t index; } umockcallrecorder_fail_call_CALL; static umockcallrecorder_fail_call_CALL* umockcallrecorder_fail_call_calls; static size_t umockcallrecorder_fail_call_call_count; static int umockcallrecorder_fail_call_call_result; typedef struct umock_c_set_call_recorder_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umock_c_set_call_recorder_CALL; static umock_c_set_call_recorder_CALL* umock_c_set_call_recorder_calls; static size_t umock_c_set_call_recorder_call_count; static int umock_c_set_call_recorder_call_result; typedef struct umockcallrecorder_destroy_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_destroy_CALL; static umockcallrecorder_destroy_CALL* umockcallrecorder_destroy_calls; static size_t umockcallrecorder_destroy_call_count; typedef struct umock_c_indicate_error_CALL_TAG { UMOCK_C_ERROR_CODE error_code; } umock_c_indicate_error_CALL; static umock_c_indicate_error_CALL* umock_c_indicate_error_calls; static size_t umock_c_indicate_error_call_count; UMOCKCALLRECORDER_HANDLE umock_c_get_call_recorder(void) { umock_c_get_call_recorder_call_count++; return umock_c_get_call_recorder_call_result; } UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_clone_CALL* new_calls = (umockcallrecorder_clone_CALL*)realloc(umockcallrecorder_clone_calls, sizeof(umockcallrecorder_clone_CALL) * (umockcallrecorder_clone_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_clone_calls = new_calls; umockcallrecorder_clone_calls[umockcallrecorder_clone_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_clone_call_count++; } return umockcallrecorder_clone_call_result; } int umockcallrecorder_get_expected_call_count(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t* expected_call_count) { umockcallrecorder_get_expected_call_count_CALL* new_calls = (umockcallrecorder_get_expected_call_count_CALL*)realloc(umockcallrecorder_get_expected_call_count_calls, sizeof(umockcallrecorder_get_expected_call_count_CALL) * (umockcallrecorder_get_expected_call_count_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_get_expected_call_count_calls = new_calls; umockcallrecorder_get_expected_call_count_calls[umockcallrecorder_get_expected_call_count_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_get_expected_call_count_calls[umockcallrecorder_get_expected_call_count_call_count].expected_call_count = expected_call_count; umockcallrecorder_get_expected_call_count_call_count++; *expected_call_count = 42; } return umockcallrecorder_get_expected_call_count_call_result; } int umockcallrecorder_fail_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, size_t index) { umockcallrecorder_fail_call_CALL* new_calls = (umockcallrecorder_fail_call_CALL*)realloc(umockcallrecorder_fail_call_calls, sizeof(umockcallrecorder_fail_call_CALL) * (umockcallrecorder_fail_call_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_fail_call_calls = new_calls; umockcallrecorder_fail_call_calls[umockcallrecorder_fail_call_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_fail_call_calls[umockcallrecorder_fail_call_call_count].index = index; umockcallrecorder_fail_call_call_count++; } return umockcallrecorder_fail_call_call_result; } int umock_c_set_call_recorder(UMOCKCALLRECORDER_HANDLE call_recorder) { umock_c_set_call_recorder_CALL* new_calls = (umock_c_set_call_recorder_CALL*)realloc(umock_c_set_call_recorder_calls, sizeof(umock_c_set_call_recorder_CALL) * (umock_c_set_call_recorder_call_count + 1)); if (new_calls != NULL) { umock_c_set_call_recorder_calls = new_calls; umock_c_set_call_recorder_calls[umock_c_set_call_recorder_call_count].umock_call_recorder = call_recorder; umock_c_set_call_recorder_call_count++; } return umock_c_set_call_recorder_call_result; } void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_destroy_CALL* new_calls = (umockcallrecorder_destroy_CALL*)realloc(umockcallrecorder_destroy_calls, sizeof(umockcallrecorder_destroy_CALL) * (umockcallrecorder_destroy_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_destroy_calls = new_calls; umockcallrecorder_destroy_calls[umockcallrecorder_destroy_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_destroy_call_count++; } } void umock_c_indicate_error(UMOCK_C_ERROR_CODE error_code) { umock_c_indicate_error_CALL* new_calls = (umock_c_indicate_error_CALL*)realloc(umock_c_indicate_error_calls, sizeof(umock_c_indicate_error_CALL) * (umock_c_indicate_error_call_count + 1)); if (new_calls != NULL) { umock_c_indicate_error_calls = new_calls; umock_c_indicate_error_calls[umock_c_indicate_error_call_count].error_code = error_code; umock_c_indicate_error_call_count++; } } void reset_all_calls(void) { umock_c_get_call_recorder_call_count = 0; umock_c_get_call_recorder_call_result = test_call_recorder; if (umockcallrecorder_clone_calls != NULL) { free(umockcallrecorder_clone_calls); } umockcallrecorder_clone_calls = NULL; umockcallrecorder_clone_call_count = 0; umockcallrecorder_clone_call_result = test_call_recorder; if (umockcallrecorder_get_expected_call_count_calls != NULL) { free(umockcallrecorder_get_expected_call_count_calls); } umockcallrecorder_get_expected_call_count_calls = NULL; umockcallrecorder_get_expected_call_count_call_count = 0; umockcallrecorder_get_expected_call_count_call_result = 0; if (umockcallrecorder_fail_call_calls != NULL) { free(umockcallrecorder_fail_call_calls); } umockcallrecorder_fail_call_calls = NULL; umockcallrecorder_fail_call_call_count = 0; umockcallrecorder_fail_call_call_result = 0; if (umock_c_set_call_recorder_calls != NULL) { free(umock_c_set_call_recorder_calls); } umock_c_set_call_recorder_calls = NULL; umock_c_set_call_recorder_call_count = 0; umock_c_set_call_recorder_call_result = 0; if (umockcallrecorder_destroy_calls != NULL) { free(umockcallrecorder_destroy_calls); } umockcallrecorder_destroy_calls = NULL; umockcallrecorder_destroy_call_count = 0; if (umock_c_indicate_error_calls != NULL) { free(umock_c_indicate_error_calls); } umock_c_indicate_error_calls = NULL; umock_c_indicate_error_call_count = 0; } void* umockalloc_malloc(size_t size) { return malloc(size); } void umockalloc_free(void* ptr) { free(ptr); } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE g_dllByDll; BEGIN_TEST_SUITE(umock_c_negative_tests_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); reset_all_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { umock_c_negative_tests_deinit(); reset_all_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* umock_c_negative_tests_init */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_001: [ umock_c_negative_tests_init shall initialize the umock_c negative tests library.] */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_004: [ On success, umock_c_negative_tests_init shall return 0. ]*/ TEST_FUNCTION(umock_c_negative_tests_init_succeeds) { // arrange // act int result = umock_c_negative_tests_init(); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_005: [ If the module has already been initialized, umock_c_negative_tests_init shall return a non-zero value. ]*/ TEST_FUNCTION(umock_c_negative_tests_init_after_init_fails) { // arrange int result; (void)umock_c_negative_tests_init(); // act result = umock_c_negative_tests_init(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umock_c_negative_tests_deinit */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_002: [ umock_c_negative_tests_deinit shall free all resources associated with the negative tests module. ]*/ TEST_FUNCTION(umock_c_negative_tests_deinit_with_no_snapshot_does_not_free_anything) { // arrange (void)umock_c_negative_tests_init(); // act umock_c_negative_tests_deinit(); // assert ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_002: [ umock_c_negative_tests_deinit shall free all resources associated with the negative tests module. ]*/ TEST_FUNCTION(umock_c_negative_tests_deinit_with_a_snapshot_frees_the_snapshot) { // arrange (void)umock_c_negative_tests_init(); umock_c_negative_tests_snapshot(); reset_all_calls(); // act umock_c_negative_tests_deinit(); // assert ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_destroy_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_destroy_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_003: [ If the module was not previously initialized, umock_c_negative_tests_deinit shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_deinit_when_not_initialized_does_not_free_anything) { // arrange (void)umock_c_negative_tests_init(); umock_c_negative_tests_snapshot(); umock_c_negative_tests_deinit(); reset_all_calls(); // act umock_c_negative_tests_deinit(); // assert ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } /* umock_c_negative_tests_snapshot */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_006: [ umock_c_negative_tests_snapshot shall make a copy of the current call recorder for umock_c with all its recorded calls. ]*/ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_007: [ The current call recorder shall be obtained by calling umock_c_get_call_recorder. ]*/ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_008: [ The copy of the recorder shall be made by calling umockcallrecorder_clone. ]*/ TEST_FUNCTION(umock_c_negative_tests_snapshot_makes_a_copy_of_the_recorder) { // arrange (void)umock_c_negative_tests_init(); reset_all_calls(); // act umock_c_negative_tests_snapshot(); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_clone_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_009: [ If getting the call recorder fails, umock_c_negative_tests_snapshot shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(when_getting_the_recorder_fails_umock_c_negative_tests_snapshot_indicates_an_error) { // arrange (void)umock_c_negative_tests_init(); reset_all_calls(); umock_c_get_call_recorder_call_result = NULL; // act umock_c_negative_tests_snapshot(); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_010: [ If copying the call recorder fails, umock_c_negative_tests_snapshot shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(when_cloning_the_recorder_fails_umock_c_negative_tests_snapshot_indicates_an_error) { // arrange (void)umock_c_negative_tests_init(); reset_all_calls(); umockcallrecorder_clone_call_result = NULL; // act umock_c_negative_tests_snapshot(); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_015: [ If the module was not previously initialized, umock_c_negative_tests_snapshot shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_snapshot_when_not_initialized_does_nothing) { // arrange // act umock_c_negative_tests_snapshot(); // assert ASSERT_ARE_EQUAL(size_t, 0, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* umock_c_negative_tests_reset */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_011: [ umock_c_negative_tests_reset shall reset the call recorder used by umock_c to the call recorder stored in umock_c_negative_tests_reset. ]*/ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_013: [ The reset shall be done by calling umock_c_set_call_recorder and passing the call recorder stored in umock_c_negative_tests_reset as argument. ]*/ TEST_FUNCTION(umock_c_negative_tests_reset_sets_the_call_recorder_to_be_the_stored_one) { // arrange (void)umock_c_negative_tests_init(); umockcallrecorder_clone_call_result = test_cloned_call_recorder; umock_c_negative_tests_snapshot(); reset_all_calls(); // act umock_c_negative_tests_reset(); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_set_call_recorder_call_count); ASSERT_ARE_EQUAL(void_ptr, test_cloned_call_recorder, umock_c_set_call_recorder_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_012: [ If no call has been made to umock_c_negative_tests_snapshot, umock_c_negative_tests_reset shall indicate a failure via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(when_no_snapshot_was_done_umock_c_negative_tests_reset_indicates_an_error) { // arrange (void)umock_c_negative_tests_init(); // act umock_c_negative_tests_reset(); // assert ASSERT_ARE_EQUAL(size_t, 0, umock_c_set_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_014: [ If umock_c_set_call_recorder fails, umock_c_negative_tests_reset shall indicate a failure via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(when_setting_the_call_recorder_fails_umock_c_negative_tests_reset_indicates_an_error) { // arrange (void)umock_c_negative_tests_init(); umockcallrecorder_clone_call_result = test_cloned_call_recorder; umock_c_negative_tests_snapshot(); reset_all_calls(); umock_c_set_call_recorder_call_result = 1; // act umock_c_negative_tests_reset(); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_set_call_recorder_call_count); ASSERT_ARE_EQUAL(void_ptr, test_cloned_call_recorder, umock_c_set_call_recorder_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_016: [ If the module was not previously initialized, umock_c_negative_tests_reset shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_reset_when_not_initialized_does_nothing) { // arrange // act umock_c_negative_tests_reset(); // assert ASSERT_ARE_EQUAL(size_t, 0, umock_c_set_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* umock_c_negative_tests_fail_call */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_017: [ umock_c_negative_tests_fail_call shall call umockcallrecorder_fail_call on the currently used call recorder used by umock_c. ]*/ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_018: [ The currently used recorder shall be obtained by calling umock_c_get_call_recorder. ]*/ TEST_FUNCTION(umock_c_negative_tests_fail_call_calls_the_call_recorder_fail_call) { // arrange (void)umock_c_negative_tests_init(); umockcallrecorder_clone_call_result = test_cloned_call_recorder; umock_c_negative_tests_snapshot(); reset_all_calls(); // act umock_c_negative_tests_fail_call(0); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_fail_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_fail_call_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_fail_call_calls[0].index); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_017: [ umock_c_negative_tests_fail_call shall call umockcallrecorder_fail_call on the currently used call recorder used by umock_c. ]*/ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_018: [ The currently used recorder shall be obtained by calling umock_c_get_call_recorder. ]*/ TEST_FUNCTION(umock_c_negative_tests_fail_call_calls_the_call_recorder_fail_call_2) { // arrange (void)umock_c_negative_tests_init(); umockcallrecorder_clone_call_result = test_cloned_call_recorder; umock_c_negative_tests_snapshot(); reset_all_calls(); // act umock_c_negative_tests_fail_call(42); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_fail_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_fail_call_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 42, umockcallrecorder_fail_call_calls[0].index); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_019: [ If umock_c_get_call_recorder fails, umock_c_negative_tests_fail_call shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(when_getting_the_call_recorder_fails_umock_c_negative_tests_fail_call_indicates_an_error) { // arrange (void)umock_c_negative_tests_init(); umockcallrecorder_clone_call_result = test_cloned_call_recorder; umock_c_negative_tests_snapshot(); reset_all_calls(); umock_c_get_call_recorder_call_result = NULL; // act umock_c_negative_tests_fail_call(0); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_fail_call_call_count); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_025: [ If failing the call by calling umockcallrecorder_fail_call fails, umock_c_negative_tests_fail_call shall indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(when_failing_the_call_fails_umock_c_negative_tests_fail_call_indicates_an_error) { // arrange (void)umock_c_negative_tests_init(); umockcallrecorder_clone_call_result = test_cloned_call_recorder; umock_c_negative_tests_snapshot(); reset_all_calls(); umockcallrecorder_fail_call_call_result = __LINE__; // act umock_c_negative_tests_fail_call(0); // assert ASSERT_ARE_EQUAL(size_t, 1, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_fail_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_fail_call_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_fail_call_calls[0].index); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_020: [ If the module was not previously initialized, umock_c_negative_tests_fail_call shall do nothing. ]*/ TEST_FUNCTION(umock_c_negative_tests_fail_call_when_not_initialized_does_nothing) { // arrange // act umock_c_negative_tests_fail_call(0); // assert ASSERT_ARE_EQUAL(size_t, 0, umock_c_get_call_recorder_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_fail_call_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* umock_c_negative_tests_call_count */ /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_021: [ umock_c_negative_tests_call_count shall return the count of expected calls for the current snapshot call recorder by calling umockcallrecorder_get_expected_call_count. ]*/ TEST_FUNCTION(umock_c_negative_tests_call_count_gets_the_expected_call_count_from_the_current_recorder) { // arrange size_t result; (void)umock_c_negative_tests_init(); umock_c_negative_tests_snapshot(); reset_all_calls(); // act result = umock_c_negative_tests_call_count(); // assert ASSERT_ARE_EQUAL(size_t, 42, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_expected_call_count_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_expected_call_count_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_022: [ If no call has been made to umock_c_negative_tests_snapshot, umock_c_negative_tests_fail_call shall return 0 and indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(umock_c_negative_tests_call_count_when_no_snapshot_was_done_indicates_an_error) { // arrange size_t result; (void)umock_c_negative_tests_init(); reset_all_calls(); // act result = umock_c_negative_tests_call_count(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_expected_call_count_call_count); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_023: [ If umockcallrecorder_get_expected_call_count fails, umock_c_negative_tests_fail_call shall return 0 and indicate the error via the umock error callback with error code UMOCK_C_ERROR. ]*/ TEST_FUNCTION(when_umockcallrecorder_get_expected_call_count_fails_umock_c_negative_tests_call_count_indicates_an_error) { // arrange size_t result; (void)umock_c_negative_tests_init(); umock_c_negative_tests_snapshot(); reset_all_calls(); umockcallrecorder_get_expected_call_count_call_result = __LINE__; // act result = umock_c_negative_tests_call_count(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_expected_call_count_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_expected_call_count_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 1, umock_c_indicate_error_call_count); ASSERT_ARE_EQUAL(UMOCK_C_ERROR_CODE, UMOCK_C_ERROR, umock_c_indicate_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_NEGATIVE_TESTS_01_024: [ If the module was not previously initialized, umock_c_negative_tests_call_count shall return 0. ]*/ TEST_FUNCTION(umock_c_negative_tests_call_count_when_the_module_is_not_initialized_returns_0) { // arrange // act size_t result = umock_c_negative_tests_call_count(); // assert ASSERT_ARE_EQUAL(size_t, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_expected_call_count_call_count); ASSERT_ARE_EQUAL(size_t, 0, umock_c_indicate_error_call_count); } END_TEST_SUITE(umock_c_negative_tests_unittests) umock_c_ptrarg_leak_int/000077500000000000000000000000001362133436400406625ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000012611362133436400434220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_ptrarg_leak_int#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_ptrarg_leak_int) set(${theseTestsName}_test_files umock_c_ptrarg_leak_int.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ../../src/umockalloc.c ../../src/umockcall.c ../../src/umockcallrecorder.c ../../src/umocktypes.c ../../src/umocktypes_charptr.c ../../src/umocktypes_c.c ../../src/umocktypename.c ../../src/umock_log.c ../../src/umockstring.c ../../src/umockautoignoreargs.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005231362133436400417520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_ptrarg_leak_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_ptrarg_leak_integrationtests, failedTestCount); return failedTestCount; } umock_c_ptrarg_leak_int.c000066400000000000000000000034071362133436400456770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_ptrarg_leak_int// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #define ENABLE_MOCKS #include "umock_c.h" #include "umocktypes_charptr.h" MOCKABLE_FUNCTION(, int, a_char_star_arg_function, char*, x); static void test_on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { (void)error_code; ASSERT_FAIL("umock_c reported error"); } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umock_c_ptrarg_leak_integrationtests) TEST_SUITE_INITIALIZE(suite_init) { int result; TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); result = umock_c_init(test_on_umock_c_error); ASSERT_ARE_EQUAL(int, 0, result); result = umocktypes_charptr_register_types(); ASSERT_ARE_EQUAL(int, 0, result); } TEST_SUITE_CLEANUP(suite_cleanup) { umock_c_deinit(); TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); umock_c_reset_all_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex); } TEST_FUNCTION(a_matched_call_with_pointer_type_argument_does_not_leak) { // arrange EXPECTED_CALL(a_char_star_arg_function("a")); (void)a_char_star_arg_function("a"); // act umock_c_deinit(); // assert // no leaks expected } END_TEST_SUITE(umock_c_ptrarg_leak_integrationtests) umock_c_ut/000077500000000000000000000000001362133436400361455ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000005641362133436400407120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_ut) set(${theseTestsName}_test_files umock_c_ut.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005001362133436400372300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_unittests, failedTestCount); return failedTestCount; } umock_c_ut.c000066400000000000000000001061531362133436400404470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockcallrecorder.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "umock_c.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } static UMOCKCALL_HANDLE test_expected_call = (UMOCKCALL_HANDLE)0x4242; static UMOCKCALL_HANDLE test_actual_call = (UMOCKCALL_HANDLE)0x4243; static UMOCKCALLRECORDER_HANDLE test_call_recorder = (UMOCKCALLRECORDER_HANDLE)0x4244; static UMOCKCALLRECORDER_HANDLE test_cloned_call_recorder = (UMOCKCALLRECORDER_HANDLE)0x4245; static size_t umocktypes_init_call_count; static int umocktypes_init_call_result; static size_t umocktypes_c_register_types_call_count; static int umocktypes_c_register_types_call_result; static size_t umockcallrecorder_create_call_count; static UMOCKCALLRECORDER_HANDLE umockcallrecorder_create_call_result; static size_t umocktypes_deinit_call_count; typedef struct umockcallrecorder_destroy_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_destroy_CALL; static umockcallrecorder_destroy_CALL* umockcallrecorder_destroy_calls; static size_t umockcallrecorder_destroy_call_count; typedef struct umockcallrecorder_reset_all_calls_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_reset_all_calls_CALL; static umockcallrecorder_reset_all_calls_CALL* umockcallrecorder_reset_all_calls_calls; static size_t umockcallrecorder_reset_all_calls_call_count; static int umockcallrecorder_reset_all_calls_call_result; typedef struct umockcallrecorder_get_actual_calls_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_get_actual_calls_CALL; static umockcallrecorder_get_actual_calls_CALL* umockcallrecorder_get_actual_calls_calls; static size_t umockcallrecorder_get_actual_calls_call_count; static const char* umockcallrecorder_get_actual_calls_call_result; typedef struct umockcallrecorder_get_expected_calls_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_get_expected_calls_CALL; static umockcallrecorder_get_expected_calls_CALL* umockcallrecorder_get_expected_calls_calls; static size_t umockcallrecorder_get_expected_calls_call_count; static const char* umockcallrecorder_get_expected_calls_call_result; typedef struct umockcallrecorder_get_last_expected_call_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_get_last_expected_call_CALL; static umockcallrecorder_get_last_expected_call_CALL* umockcallrecorder_get_last_expected_call_calls; static size_t umockcallrecorder_get_last_expected_call_call_count; static UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call_call_result; typedef struct umockcallrecorder_add_expected_call_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; UMOCKCALL_HANDLE mock_call; } umockcallrecorder_add_expected_call_CALL; static umockcallrecorder_add_expected_call_CALL* umockcallrecorder_add_expected_call_calls; static size_t umockcallrecorder_add_expected_call_call_count; static int umockcallrecorder_add_expected_call_call_result; typedef struct umockcallrecorder_add_actual_call_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; UMOCKCALL_HANDLE mock_call; UMOCKCALL_HANDLE* matched_call; } umockcallrecorder_add_actual_call_CALL; static umockcallrecorder_add_actual_call_CALL* umockcallrecorder_add_actual_call_calls; static size_t umockcallrecorder_add_actual_call_call_count; static int umockcallrecorder_add_actual_call_call_result; typedef struct umockcallrecorder_clone_CALL_TAG { UMOCKCALLRECORDER_HANDLE umock_call_recorder; } umockcallrecorder_clone_CALL; static umockcallrecorder_clone_CALL* umockcallrecorder_clone_calls; static size_t umockcallrecorder_clone_call_count; static UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone_call_result; UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void) { umockcallrecorder_create_call_count++; return umockcallrecorder_create_call_result; } void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_destroy_CALL* new_calls = (umockcallrecorder_destroy_CALL*)realloc(umockcallrecorder_destroy_calls, sizeof(umockcallrecorder_destroy_CALL) * (umockcallrecorder_destroy_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_destroy_calls = new_calls; umockcallrecorder_destroy_calls[umockcallrecorder_destroy_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_destroy_call_count++; } } int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_reset_all_calls_CALL* new_calls = (umockcallrecorder_reset_all_calls_CALL*)realloc(umockcallrecorder_reset_all_calls_calls, sizeof(umockcallrecorder_reset_all_calls_CALL) * (umockcallrecorder_reset_all_calls_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_reset_all_calls_calls = new_calls; umockcallrecorder_reset_all_calls_calls[umockcallrecorder_reset_all_calls_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_reset_all_calls_call_count++; } return umockcallrecorder_reset_all_calls_call_result; } int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call) { umockcallrecorder_add_expected_call_CALL* new_calls = (umockcallrecorder_add_expected_call_CALL*)realloc(umockcallrecorder_add_expected_call_calls, sizeof(umockcallrecorder_add_expected_call_CALL) * (umockcallrecorder_add_expected_call_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_add_expected_call_calls = new_calls; umockcallrecorder_add_expected_call_calls[umockcallrecorder_add_expected_call_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_add_expected_call_calls[umockcallrecorder_add_expected_call_call_count].mock_call = mock_call; umockcallrecorder_add_expected_call_call_count++; } return umockcallrecorder_add_expected_call_call_result; } int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call) { umockcallrecorder_add_actual_call_CALL* new_calls = (umockcallrecorder_add_actual_call_CALL*)realloc(umockcallrecorder_add_actual_call_calls, sizeof(umockcallrecorder_add_actual_call_CALL) * (umockcallrecorder_add_actual_call_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_add_actual_call_calls = new_calls; umockcallrecorder_add_actual_call_calls[umockcallrecorder_add_actual_call_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_add_actual_call_calls[umockcallrecorder_add_actual_call_call_count].mock_call = mock_call; umockcallrecorder_add_actual_call_calls[umockcallrecorder_add_actual_call_call_count].matched_call = matched_call; umockcallrecorder_add_actual_call_call_count++; } return umockcallrecorder_add_actual_call_call_result; } UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_clone_CALL* new_calls = (umockcallrecorder_clone_CALL*)realloc(umockcallrecorder_clone_calls, sizeof(umockcallrecorder_clone_CALL) * (umockcallrecorder_clone_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_clone_calls = new_calls; umockcallrecorder_clone_calls[umockcallrecorder_clone_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_clone_call_count++; } return umockcallrecorder_clone_call_result; } const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_get_actual_calls_CALL* new_calls = (umockcallrecorder_get_actual_calls_CALL*)realloc(umockcallrecorder_get_actual_calls_calls, sizeof(umockcallrecorder_get_actual_calls_CALL) * (umockcallrecorder_get_actual_calls_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_get_actual_calls_calls = new_calls; umockcallrecorder_get_actual_calls_calls[umockcallrecorder_get_actual_calls_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_get_actual_calls_call_count++; } return umockcallrecorder_get_actual_calls_call_result; } const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_get_expected_calls_CALL* new_calls = (umockcallrecorder_get_expected_calls_CALL*)realloc(umockcallrecorder_get_expected_calls_calls, sizeof(umockcallrecorder_get_expected_calls_CALL) * (umockcallrecorder_get_expected_calls_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_get_expected_calls_calls = new_calls; umockcallrecorder_get_expected_calls_calls[umockcallrecorder_get_expected_calls_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_get_expected_calls_call_count++; } return umockcallrecorder_get_expected_calls_call_result; } UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { umockcallrecorder_get_last_expected_call_CALL* new_calls = (umockcallrecorder_get_last_expected_call_CALL*)realloc(umockcallrecorder_get_last_expected_call_calls, sizeof(umockcallrecorder_get_last_expected_call_CALL) * (umockcallrecorder_get_last_expected_call_call_count + 1)); if (new_calls != NULL) { umockcallrecorder_get_last_expected_call_calls = new_calls; umockcallrecorder_get_last_expected_call_calls[umockcallrecorder_get_last_expected_call_call_count].umock_call_recorder = umock_call_recorder; umockcallrecorder_get_last_expected_call_call_count++; } return umockcallrecorder_get_last_expected_call_call_result; } int umocktypes_init(void) { umocktypes_init_call_count++; return umocktypes_init_call_result; } void umocktypes_deinit(void) { umocktypes_deinit_call_count++; } int umocktypes_c_register_types(void) { umocktypes_c_register_types_call_count++; return umocktypes_c_register_types_call_result; } typedef struct test_on_umock_c_error_CALL_TAG { UMOCK_C_ERROR_CODE error_code; } test_on_umock_c_error_CALL; static test_on_umock_c_error_CALL* test_on_umock_c_error_calls; static size_t test_on_umock_c_error_call_count; static void test_on_umock_c_error(UMOCK_C_ERROR_CODE error_code) { test_on_umock_c_error_CALL* new_calls = (test_on_umock_c_error_CALL*)realloc(test_on_umock_c_error_calls, sizeof(test_on_umock_c_error_CALL) * (test_on_umock_c_error_call_count + 1)); if (new_calls != NULL) { test_on_umock_c_error_calls = new_calls; test_on_umock_c_error_calls[test_on_umock_c_error_call_count].error_code = error_code; test_on_umock_c_error_call_count++; } } void reset_all_calls(void) { umocktypes_init_call_count = 0; umocktypes_init_call_result = 0; umocktypes_c_register_types_call_count = 0; umocktypes_c_register_types_call_result = 0; umockcallrecorder_create_call_count = 0; umockcallrecorder_create_call_result = test_call_recorder; umocktypes_deinit_call_count = 0; if (umockcallrecorder_destroy_calls != NULL) { free(umockcallrecorder_destroy_calls); } umockcallrecorder_destroy_calls = NULL; umockcallrecorder_destroy_call_count = 0; if (umockcallrecorder_reset_all_calls_calls != NULL) { free(umockcallrecorder_reset_all_calls_calls); } umockcallrecorder_reset_all_calls_calls = NULL; umockcallrecorder_reset_all_calls_call_count = 0; umockcallrecorder_reset_all_calls_call_result = 0; if (umockcallrecorder_get_actual_calls_calls != NULL) { free(umockcallrecorder_get_actual_calls_calls); } umockcallrecorder_get_actual_calls_calls = NULL; umockcallrecorder_get_actual_calls_call_count = 0; umockcallrecorder_get_actual_calls_call_result = NULL; if (umockcallrecorder_get_expected_calls_calls != NULL) { free(umockcallrecorder_get_expected_calls_calls); } umockcallrecorder_get_expected_calls_calls = NULL; umockcallrecorder_get_expected_calls_call_count = 0; umockcallrecorder_get_expected_calls_call_result = NULL; if (umockcallrecorder_get_last_expected_call_calls != NULL) { free(umockcallrecorder_get_last_expected_call_calls); } umockcallrecorder_get_last_expected_call_calls = NULL; umockcallrecorder_get_last_expected_call_call_count = 0; umockcallrecorder_get_last_expected_call_call_result = NULL; if (umockcallrecorder_add_expected_call_calls != NULL) { free(umockcallrecorder_add_expected_call_calls); } umockcallrecorder_add_expected_call_calls = NULL; umockcallrecorder_add_expected_call_call_count = 0; umockcallrecorder_add_expected_call_call_result = 0; if (umockcallrecorder_add_actual_call_calls != NULL) { free(umockcallrecorder_add_actual_call_calls); } umockcallrecorder_add_actual_call_calls = NULL; umockcallrecorder_add_actual_call_call_count = 0; umockcallrecorder_add_actual_call_call_result = 0; if (umockcallrecorder_clone_calls != NULL) { free(umockcallrecorder_clone_calls); } umockcallrecorder_clone_calls = NULL; umockcallrecorder_clone_call_count = 0; umockcallrecorder_clone_call_result = test_cloned_call_recorder; if (test_on_umock_c_error_calls != NULL) { free(test_on_umock_c_error_calls); } test_on_umock_c_error_calls = NULL; test_on_umock_c_error_call_count = 0; } void* umockalloc_malloc(size_t size) { return malloc(size); } void umockalloc_free(void* ptr) { free(ptr); } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE g_dllByDll; BEGIN_TEST_SUITE(umock_c_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(g_dllByDll); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(g_dllByDll); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); umock_c_deinit(); reset_all_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_all_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* umock_deinit */ /* Tests_SRS_UMOCK_C_01_001: [umock_c_init shall initialize the umock library.] */ /* Tests_SRS_UMOCK_C_01_023: [ umock_c_init shall initialize the umock types by calling umocktypes_init. ]*/ /* Tests_SRS_UMOCK_C_01_004: [ On success, umock_c_init shall return 0. ]*/ /* Tests_SRS_UMOCK_C_01_002: [ umock_c_init shall register the C naive types by calling umocktypes_c_register_types. ]*/ /* Tests_SRS_UMOCK_C_01_003: [ umock_c_init shall create a call recorder by calling umockcallrecorder_create. ]*/ /* Tests_SRS_UMOCK_C_01_006: [ The on_umock_c_error callback shall be stored to be used for later error callbacks. ]*/ TEST_FUNCTION(when_all_calls_succeed_umock_c_init_succeeds) { // arrange // act int result = umock_c_init(test_on_umock_c_error); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_init_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_c_register_types_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_create_call_count); } /* Tests_SRS_UMOCK_C_01_005: [ If any of the calls fails, umock_c_init shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_umocktypes_init_fails_then_umock_c_init_fails) { // arrange int result; umocktypes_init_call_result = 1; // act result = umock_c_init(test_on_umock_c_error); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_init_call_count); ASSERT_ARE_EQUAL(size_t, 0, umocktypes_c_register_types_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_create_call_count); } /* Tests_SRS_UMOCK_C_01_005: [ If any of the calls fails, umock_c_init shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_umocktypes_c_register_types_fails_then_umock_c_init_fails) { // arrange int result; umocktypes_c_register_types_call_result = 1; // act result = umock_c_init(test_on_umock_c_error); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_init_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_c_register_types_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_create_call_count); } /* Tests_SRS_UMOCK_C_01_005: [ If any of the calls fails, umock_c_init shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_creating_the_call_recorder_fails_then_umock_c_init_fails) { // arrange int result; umockcallrecorder_create_call_result = NULL; // act result = umock_c_init(test_on_umock_c_error); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_init_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_c_register_types_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_create_call_count); } /* Tests_SRS_UMOCK_C_01_007: [ umock_c_init when umock is already initialized shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umock_c_init_when_already_initialized_fails) { // arrange int result; umock_c_init(test_on_umock_c_error); // act result = umock_c_init(test_on_umock_c_error); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCK_C_01_024: [ on_umock_c_error shall be optional. ]*/ TEST_FUNCTION(umock_c_init_with_NULL_callback_succeeds) { // arrange // act int result = umock_c_init(NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_init_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_c_register_types_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_create_call_count); } /* umock_c_deinit */ /* Tests_SRS_UMOCK_C_01_008: [ umock_c_deinit shall deinitialize the umock types by calling umocktypes_deinit. ]*/ /* Tests_SRS_UMOCK_C_01_009: [ umock_c_deinit shall free the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_deinit_deinitializes_types_and_destroys_call_recorder) { // arrange (void)umock_c_init(NULL); // act umock_c_deinit(); // assert ASSERT_ARE_EQUAL(size_t, 1, umocktypes_deinit_call_count); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_destroy_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_destroy_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_008: [ umock_c_deinit shall deinitialize the umock types by calling umocktypes_deinit. ]*/ /* Tests_SRS_UMOCK_C_01_009: [ umock_c_deinit shall free the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_deinit_when_not_initialized_does_nothing) { // arrange (void)umock_c_init(NULL); umock_c_deinit(); reset_all_calls(); // act umock_c_deinit(); // assert ASSERT_ARE_EQUAL(size_t, 0, umocktypes_deinit_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } /* umock_c_reset_all_calls */ /* Tests_SRS_UMOCK_C_01_011: [ umock_c_reset_all_calls shall reset all calls by calling umockcallrecorder_reset_all_calls on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_reset_all_calls_calls_the_call_recorder_reset_all_calls) { // arrange (void)umock_c_init(NULL); // act umock_c_reset_all_calls(); // assert ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_reset_all_calls_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_reset_all_calls_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_025: [ If the underlying umockcallrecorder_reset_all_calls fails, the on_umock_c_error callback shall be triggered with UMOCK_C_RESET_CALLS_ERROR. ]*/ TEST_FUNCTION(when_the_underlying_call_recorder_reset_all_calls_fails_then_umock_c_reset_all_calls_triggers_the_on_error_callback) { // arrange (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_reset_all_calls_call_result = 1; // act umock_c_reset_all_calls(); // assert ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_reset_all_calls_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_reset_all_calls_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 1, test_on_umock_c_error_call_count); ASSERT_ARE_EQUAL(int, (int)UMOCK_C_RESET_CALLS_ERROR, test_on_umock_c_error_calls[0].error_code); } /* Tests_SRS_UMOCK_C_01_012: [ If the module is not initialized, umock_c_reset_all_calls shall do nothing. ]*/ TEST_FUNCTION(umock_c_reset_all_calls_when_the_module_is_not_initialized_does_nothing) { // arrange // act umock_c_reset_all_calls(); // assert ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_reset_all_calls_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_on_umock_c_error_call_count); } /* umock_c_get_actual_calls */ /* Tests_SRS_UMOCK_C_01_013: [ umock_c_get_actual_calls shall return the string for the recorded actual calls by calling umockcallrecorder_get_actual_calls on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_get_actual_calls_calls_the_underlying_call_recorder_get_actual_calls) { // arrange const char* result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_get_actual_calls_call_result = "[a()]"; // act result = umock_c_get_actual_calls(); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()]", result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_actual_calls_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_actual_calls_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_013: [ umock_c_get_actual_calls shall return the string for the recorded actual calls by calling umockcallrecorder_get_actual_calls on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(when_the_underlying_call_recorder_get_actual_calls_fails_then_umock_c_get_actual_calls_returns_NULL) { // arrange const char* result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_get_actual_calls_call_result = NULL; // act result = umock_c_get_actual_calls(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_actual_calls_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_actual_calls_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_014: [ If the module is not initialized, umock_c_get_actual_calls shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_actual_calls_when_the_module_is_not_initialized_fails) { // arrange // act const char* result = umock_c_get_actual_calls(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_actual_calls_call_count); } /* umock_c_get_expected_calls */ /* Tests_SRS_UMOCK_C_01_015: [ umock_c_get_expected_calls shall return the string for the recorded expected calls by calling umockcallrecorder_get_expected_calls on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_get_expected_calls_calls_the_underlying_call_recorder_get_expected_calls) { // arrange const char* result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_get_expected_calls_call_result = "[a()]"; // act result = umock_c_get_expected_calls(); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()]", result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_expected_calls_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_expected_calls_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_015: [ umock_c_get_expected_calls shall return the string for the recorded expected calls by calling umockcallrecorder_get_expected_calls on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(when_the_underlying_call_recorder_get_expected_calls_fails_then_umock_c_get_expected_calls_returns_NULL) { // arrange const char* result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_get_expected_calls_call_result = NULL; // act result = umock_c_get_expected_calls(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_expected_calls_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_expected_calls_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_016: [ If the module is not initialized, umock_c_get_expected_calls shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_expected_calls_when_the_module_is_not_initialized_fails) { // arrange // act const char* result = umock_c_get_expected_calls(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_expected_calls_call_count); } /* umock_c_get_last_expected_call */ /* Tests_SRS_UMOCK_C_01_017: [ umock_c_get_last_expected_call shall return the last expected call by calling umockcallrecorder_get_last_expected_call on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_get_last_expected_call_calls_the_underlying_call_recorder_get_last_expected_call) { // arrange UMOCKCALL_HANDLE result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_get_last_expected_call_call_result = test_expected_call; // act result = umock_c_get_last_expected_call(); // assert ASSERT_ARE_EQUAL(void_ptr, test_expected_call, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_last_expected_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_last_expected_call_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_017: [ umock_c_get_last_expected_call shall return the last expected call by calling umockcallrecorder_get_last_expected_call on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(when_the_underlying_call_recorder_get_last_expected_call_fails_then_umock_c_get_last_expected_call_returns_NULL) { // arrange UMOCKCALL_HANDLE result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_get_last_expected_call_call_result = NULL; // act result = umock_c_get_last_expected_call(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_get_last_expected_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_get_last_expected_call_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_018: [ If the module is not initialized, umock_c_get_last_expected_call shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_last_expected_call_when_the_module_is_not_initialized_fails) { // arrange // act UMOCKCALL_HANDLE result = umock_c_get_last_expected_call(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_last_expected_call_call_count); } /* umock_c_add_expected_call */ /* Tests_SRS_UMOCK_C_01_019: [ umock_c_add_expected_call shall add an expected call by calling umockcallrecorder_add_expected_call on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_add_expected_call_calls_the_underlying_call_recorder_add_expected_call) { // arrange int result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_add_expected_call_call_result = 0; // act result = umock_c_add_expected_call(test_expected_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_add_expected_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_add_expected_call_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(void_ptr, test_expected_call, umockcallrecorder_add_expected_call_calls[0].mock_call); } /* Tests_SRS_UMOCK_C_01_019: [ umock_c_add_expected_call shall add an expected call by calling umockcallrecorder_add_expected_call on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(when_the_underlying_call_recorder_add_expected_call_fails_then_umock_c_add_expected_call_returns_NULL) { // arrange int result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_add_expected_call_call_result = 1; // act result = umock_c_add_expected_call(test_expected_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_add_expected_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_add_expected_call_calls[0].umock_call_recorder); } /* Tests_SRS_UMOCK_C_01_020: [ If the module is not initialized, umock_c_add_expected_call shall return a non-zero value. ]*/ TEST_FUNCTION(umock_c_add_expected_call_when_the_module_is_not_initialized_fails) { // arrange // act int result = umock_c_add_expected_call(test_expected_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_add_expected_call_call_count); } /* umock_c_add_actual_call */ /* Tests_SRS_UMOCK_C_01_021: [ umock_c_add_actual_call shall add an actual call by calling umockcallrecorder_add_actual_call on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(umock_c_add_actual_call_calls_the_underlying_call_recorder_add_actual_call) { // arrange int result; UMOCKCALL_HANDLE matched_call; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_add_actual_call_call_result = 0; // act result = umock_c_add_actual_call(test_actual_call, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_add_actual_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_add_actual_call_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(void_ptr, test_actual_call, umockcallrecorder_add_actual_call_calls[0].mock_call); ASSERT_ARE_EQUAL(void_ptr, &matched_call, umockcallrecorder_add_actual_call_calls[0].matched_call); } /* Tests_SRS_UMOCK_C_01_021: [ umock_c_add_actual_call shall add an actual call by calling umockcallrecorder_add_actual_call on the call recorder created in umock_c_init. ]*/ TEST_FUNCTION(when_the_underlying_call_recorder_add_actual_call_fails_then_umock_c_add_actual_call_returns_NULL) { // arrange int result; UMOCKCALL_HANDLE matched_call; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_add_actual_call_call_result = 1; // act result = umock_c_add_actual_call(test_actual_call, &matched_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_add_actual_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_add_actual_call_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(void_ptr, test_actual_call, umockcallrecorder_add_actual_call_calls[0].mock_call); ASSERT_ARE_EQUAL(void_ptr, &matched_call, umockcallrecorder_add_actual_call_calls[0].matched_call); } /* Tests_SRS_UMOCK_C_01_022: [** If the module is not initialized, umock_c_add_actual_call shall return a non-zero value. ]*/ TEST_FUNCTION(umock_c_add_actual_call_when_the_module_is_not_initialized_fails) { // arrange UMOCKCALL_HANDLE matched_call; // act int result = umock_c_add_actual_call(test_actual_call, &matched_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_add_actual_call_call_count); } /* umock_c_get_call_recorder */ /* Tests_SRS_UMOCK_C_01_026: [ umock_c_get_call_recorder shall return the handle to the currently used call recorder. ]*/ TEST_FUNCTION(umock_c_get_call_recorder_returns_a_non_NULL_call_recorder) { // arrange UMOCKCALLRECORDER_HANDLE result; (void)umock_c_init(test_on_umock_c_error); // act result = umock_c_get_call_recorder(); // assert ASSERT_IS_NOT_NULL(result); } /* Tests_SRS_UMOCK_C_01_027: [ If the module is not initialized, umock_c_get_call_recorder shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_call_recorder_when_not_initialized_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; (void)umock_c_init(test_on_umock_c_error); umock_c_deinit(); // act result = umock_c_get_call_recorder(); // assert ASSERT_IS_NULL(result); } /* umock_c_set_call_recorder */ /* Tests_SRS_UMOCK_C_01_028: [ umock_c_set_call_recorder shall replace the currently used call recorder with the one identified by the call_recorder argument. ]*/ /* Tests_SRS_UMOCK_C_01_029: [ On success, umock_c_set_call_recorder shall return 0. ]*/ /* Tests_SRS_UMOCK_C_01_031: [ umock_c_set_call_recorder shall make a copy of call_recorder by calling umockcallrecorder_clone and use the copy for future actions. ]*/ /* Tests_SRS_UMOCK_C_01_034: [ The previously used call recorder shall be destroyed by calling umockcallrecorder_destroy. ]*/ TEST_FUNCTION(umock_c_set_call_recorder_replaces_the_recorder) { // arrange int result; (void)umock_c_init(test_on_umock_c_error); // act result = umock_c_set_call_recorder(test_call_recorder); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_clone_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_destroy_call_count); } /* Tests_SRS_UMOCK_C_01_030: [ If call_recorder is NULL, umock_c_set_call_recorder shall return a non-zero value. ]*/ TEST_FUNCTION(umock_c_set_call_recorder_with_NULL_call_recorder_fails) { // arrange int result; (void)umock_c_init(test_on_umock_c_error); // act result = umock_c_set_call_recorder(NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } /* Tests_SRS_UMOCK_C_01_032: [ If umockcallrecorder_clone fails, umock_c_set_call_recorder shall return a non-zero value. ]*/ TEST_FUNCTION(when_cloning_the_call_recorder_fails_umock_c_set_call_recorder_fails) { // arrange int result; (void)umock_c_init(test_on_umock_c_error); umockcallrecorder_clone_call_result = NULL; // act result = umock_c_set_call_recorder(test_call_recorder); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_call_recorder, umockcallrecorder_clone_calls[0].umock_call_recorder); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } /* Tests_SRS_UMOCK_C_01_033: [ If the module is not initialized, umock_c_set_call_recorder shall return a non-zero value. ]*/ TEST_FUNCTION(when_the_module_is_not_initialize_umock_c_set_call_recorder_fails) { // arrange int result; (void)umock_c_init(test_on_umock_c_error); umock_c_deinit(); reset_all_calls(); // act result = umock_c_set_call_recorder(test_call_recorder); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } END_TEST_SUITE(umock_c_unittests) umock_c_wout_init_ut/000077500000000000000000000000001362133436400402465ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006101362133436400430030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_wout_init_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umock_c_wout_init_ut) set(${theseTestsName}_test_files umock_c_wout_init_ut.c ) set(${theseTestsName}_c_files ../../src/umock_c.c ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005151362133436400413370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_wout_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umock_c_without_init_unittests, failedTestCount); return failedTestCount; } umock_c_wout_init_ut.c000066400000000000000000000200721362133436400446440ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umock_c_wout_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockcallrecorder.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "umock_c.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } static UMOCKCALL_HANDLE test_expected_call = (UMOCKCALL_HANDLE)0x4242; static UMOCKCALL_HANDLE test_actual_call = (UMOCKCALL_HANDLE)0x4243; static UMOCKCALLRECORDER_HANDLE test_call_recorder = (UMOCKCALLRECORDER_HANDLE)0x4244; static size_t umocktypes_deinit_call_count; static size_t umockcallrecorder_destroy_call_count; static size_t umockcallrecorder_reset_all_calls_call_count; static size_t umockcallrecorder_get_actual_calls_call_count; static size_t umockcallrecorder_get_expected_calls_call_count; static size_t umockcallrecorder_clone_call_count; static size_t umock_c_get_last_expected_call_call_count; static size_t umock_c_add_expected_call_call_count; static size_t umock_c_add_actual_call_call_count; UMOCKCALLRECORDER_HANDLE umockcallrecorder_create(void) { return NULL; } void umockcallrecorder_destroy(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { (void)umock_call_recorder; umockcallrecorder_destroy_call_count++; } int umockcallrecorder_reset_all_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { (void)umock_call_recorder; umockcallrecorder_reset_all_calls_call_count++; return 0; } int umockcallrecorder_add_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call) { (void)umock_call_recorder; (void)mock_call; umock_c_add_expected_call_call_count++; return 0; } int umockcallrecorder_add_actual_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder, UMOCKCALL_HANDLE mock_call, UMOCKCALL_HANDLE* matched_call) { (void)umock_call_recorder; (void)mock_call; (void)matched_call; umock_c_add_actual_call_call_count++; return 0; } UMOCKCALLRECORDER_HANDLE umockcallrecorder_clone(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { (void)umock_call_recorder; umockcallrecorder_clone_call_count++; return NULL; } const char* umockcallrecorder_get_actual_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { (void)umock_call_recorder; umockcallrecorder_get_actual_calls_call_count++; return NULL; } const char* umockcallrecorder_get_expected_calls(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { (void)umock_call_recorder; umockcallrecorder_get_expected_calls_call_count++; return NULL; } UMOCKCALL_HANDLE umockcallrecorder_get_last_expected_call(UMOCKCALLRECORDER_HANDLE umock_call_recorder) { (void)umock_call_recorder; umock_c_get_last_expected_call_call_count++; return NULL; } int umocktypes_init(void) { return 0; } void umocktypes_deinit(void) { umocktypes_deinit_call_count++; } int umocktypes_c_register_types(void) { return 0; } void* umockalloc_malloc(size_t size) { return malloc(size); } void umockalloc_free(void* ptr) { free(ptr); } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umock_c_without_init_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); umocktypes_deinit_call_count = 0; umockcallrecorder_destroy_call_count = 0; umockcallrecorder_reset_all_calls_call_count = 0; umockcallrecorder_get_actual_calls_call_count = 0; umockcallrecorder_get_expected_calls_call_count = 0; umock_c_get_last_expected_call_call_count = 0; umock_c_add_expected_call_call_count = 0; umock_c_add_actual_call_call_count = 0; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex); } /* umock_c_deinit */ /* Tests_SRS_UMOCK_C_01_010: [ If the module is not initialized, umock_c_deinit shall do nothing. ] */ TEST_FUNCTION(umock_c_deinit_when_not_initialized_does_nothing) { // arrange // act umock_c_deinit(); // assert ASSERT_ARE_EQUAL(size_t, 0, umocktypes_deinit_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } /* umock_c_reset_all_calls */ /* Tests_SRS_UMOCK_C_01_012: [ If the module is not initialized, umock_c_reset_all_calls shall do nothing. ]*/ TEST_FUNCTION(umock_c_reset_all_calls_when_not_initialized_does_nothing) { // arrange // act umock_c_reset_all_calls(); // assert ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_reset_all_calls_call_count); } /* umock_c_get_actual_calls */ /* Tests_SRS_UMOCK_C_01_014: [ If the module is not initialized, umock_c_get_actual_calls shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_actual_calls_when_not_initialized_does_nothing) { // arrange // act const char* result = umock_c_get_actual_calls(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_actual_calls_call_count); } /* umock_c_get_expected_calls */ /* Tests_SRS_UMOCK_C_01_016: [ If the module is not initialized, umock_c_get_expected_calls shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_expected_calls_when_not_initialized_does_nothing) { // arrange // act const char* result = umock_c_get_expected_calls(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_get_expected_calls_call_count); } /* umock_c_get_last_expected_call */ /* Tests_SRS_UMOCK_C_01_018: [ If the module is not initialized, umock_c_get_last_expected_call shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_last_expected_call_when_not_initialized_does_nothing) { // arrange // act UMOCKCALL_HANDLE result = umock_c_get_last_expected_call(); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umock_c_get_last_expected_call_call_count); } /* umock_c_add_expected_call */ /* Tests_SRS_UMOCK_C_01_020: [ If the module is not initialized, umock_c_add_expected_call shall return a non-zero value. ]*/ TEST_FUNCTION(umock_c_add_expected_call_when_not_initialized_does_nothing) { // arrange // act int result = umock_c_add_expected_call(test_expected_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umock_c_add_expected_call_call_count); } /* umock_c_add_actual_call */ /* Tests_SRS_UMOCK_C_01_022: [ If the module is not initialized, umock_c_add_actual_call shall return a non-zero value. ]*/ TEST_FUNCTION(umock_c_add_actual_call_when_not_initialized_does_nothing) { // arrange UMOCKCALL_HANDLE matched_call; // act int result = umock_c_add_actual_call(test_actual_call, &matched_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umock_c_add_actual_call_call_count); } /* umock_c_get_call_recorder */ /* Tests_SRS_UMOCK_C_01_027: [ If the module is not initialized, umock_c_get_call_recorder shall return NULL. ]*/ TEST_FUNCTION(umock_c_get_call_recorder_when_not_initialized_fails) { // arrange // act UMOCKCALLRECORDER_HANDLE result = umock_c_get_call_recorder(); // assert ASSERT_IS_NULL(result); } /* umock_c_set_call_recorder */ /* Tests_SRS_UMOCK_C_01_033: [ If the module is not initialized, umock_c_set_call_recorder shall return a non-zero value. ]*/ TEST_FUNCTION(when_the_module_is_not_initialize_umock_c_set_call_recorder_fails) { // arrange // act int result = umock_c_set_call_recorder(test_call_recorder); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_clone_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcallrecorder_destroy_call_count); } END_TEST_SUITE(umock_c_without_init_unittests) umockalloc_ut/000077500000000000000000000000001362133436400366565ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006331362133436400414200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockalloc_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umockalloc_ut) set(${theseTestsName}_test_files umockalloc_ut.c ) set(${theseTestsName}_c_files umockalloc_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005031362133436400377440ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockalloc_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umockalloc_unittests, failedTestCount); return failedTestCount; } umockalloc_mocked.c000066400000000000000000000011441362133436400424750ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockalloc_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include #include extern void* mock_malloc(size_t size); extern void* mock_calloc(size_t nmemb, size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define malloc(size) mock_malloc(size) #define calloc(nmemb, size) mock_calloc(nmemb, size) #define realloc(ptr, size) mock_realloc(ptr, size) #define free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umockalloc.c" umockalloc_ut.c000066400000000000000000000211541362133436400416660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockalloc_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockalloc.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct test_malloc_CALL_TAG { size_t size; } test_malloc_CALL; static test_malloc_CALL* test_malloc_calls; static size_t test_malloc_call_count; static void* test_malloc_expected_result; typedef struct test_realloc_CALL_TAG { size_t size; void* ptr; } test_realloc_CALL; static test_realloc_CALL* test_realloc_calls; static size_t test_realloc_call_count; static void* test_realloc_expected_result; typedef struct test_free_CALL_TAG { void* ptr; } test_free_CALL; static test_free_CALL* test_free_calls; static size_t test_free_call_count; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { test_malloc_CALL* new_calls = (test_malloc_CALL*)realloc(test_malloc_calls, sizeof(test_malloc_CALL) * (test_malloc_call_count + 1)); if (new_calls != NULL) { test_malloc_calls = new_calls; test_malloc_calls[test_malloc_call_count].size = size; test_malloc_call_count++; } return test_malloc_expected_result; } void* mock_realloc(void* ptr, size_t size) { test_realloc_CALL* new_calls = (test_realloc_CALL*)realloc(test_realloc_calls, sizeof(test_realloc_CALL) * (test_realloc_call_count + 1)); if (new_calls != NULL) { test_realloc_calls = new_calls; test_realloc_calls[test_realloc_call_count].ptr = ptr; test_realloc_calls[test_realloc_call_count].size = size; test_realloc_call_count++; } return test_realloc_expected_result; } void mock_free(void* ptr) { test_free_CALL* new_calls = (test_free_CALL*)realloc(test_free_calls, sizeof(test_free_CALL) * (test_free_call_count + 1)); if (new_calls != NULL) { test_free_calls = new_calls; test_free_calls[test_free_call_count].ptr = ptr; test_free_call_count++; } } #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umockalloc_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); test_free_calls = NULL; test_free_call_count = 0; test_malloc_calls = NULL; test_malloc_call_count = 0; test_malloc_expected_result = (void*)0x4242; test_realloc_calls = NULL; test_realloc_call_count = 0; test_realloc_expected_result = (void*)0x4243; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { free(test_malloc_calls); test_malloc_calls = NULL; test_malloc_call_count = 0; free(test_realloc_calls); test_realloc_calls = NULL; test_realloc_call_count = 0; free(test_free_calls); test_free_calls = NULL; test_free_call_count = 0; TEST_MUTEX_RELEASE(test_mutex); } /* umockalloc_malloc */ /* Tests_SRS_UMOCKALLOC_01_001: [ umockalloc_malloc shall call malloc, while passing the size argument to malloc. ] */ /* Tests_SRS_UMOCKALLOC_01_002: [ umockalloc_malloc shall return the result of malloc. ]*/ TEST_FUNCTION(umockalloc_malloc_calls_malloc) { // arrange void* result; test_malloc_expected_result = (void*)0x4242; // act result = umockalloc_malloc(42); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, result); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_call_count); ASSERT_ARE_EQUAL(size_t, 42, test_malloc_calls[0].size); } /* Tests_SRS_UMOCKALLOC_01_001: [ umockalloc_malloc shall call malloc, while passing the size argument to malloc. ] */ /* Tests_SRS_UMOCKALLOC_01_002: [ umockalloc_malloc shall return the result of malloc. ]*/ TEST_FUNCTION(umockalloc_malloc_calls_malloc_other_value) { // arrange void* result; test_malloc_expected_result = (void*)0x5252; // act result = umockalloc_malloc(43); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x5252, result); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_call_count); ASSERT_ARE_EQUAL(size_t, 43, test_malloc_calls[0].size); } /* Tests_SRS_UMOCKALLOC_01_001: [ umockalloc_malloc shall call malloc, while passing the size argument to malloc. ] */ TEST_FUNCTION(when_malloc_returns_NULL_umockalloc_malloc_returns_NULL) { // arrange void* result; test_malloc_expected_result = NULL; // act result = umockalloc_malloc(43); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_call_count); ASSERT_ARE_EQUAL(size_t, 43, test_malloc_calls[0].size); } /* umockalloc_realloc */ /* Tests_SRS_UMOCKALLOC_01_003: [ umockalloc_realloc shall call realloc, while passing the ptr and size arguments to realloc. ] */ /* Tests_SRS_UMOCKALLOC_01_004: [ umockalloc_realloc shall return the result of realloc. ]*/ TEST_FUNCTION(umockalloc_realloc_calls_realloc) { // arrange void* result; test_realloc_expected_result = (void*)0x4242; // act result = umockalloc_realloc((void*)0x2222, 42); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, result); ASSERT_ARE_EQUAL(size_t, 1, test_realloc_call_count); ASSERT_ARE_EQUAL(size_t, 42, test_realloc_calls[0].size); ASSERT_ARE_EQUAL(void_ptr, (void*)0x2222, test_realloc_calls[0].ptr); } /* Tests_SRS_UMOCKALLOC_01_003: [ umockalloc_realloc shall call realloc, while passing the ptr and size arguments to realloc. ] */ /* Tests_SRS_UMOCKALLOC_01_004: [ umockalloc_realloc shall return the result of realloc. ]*/ TEST_FUNCTION(umockalloc_realloc_calls_realloc_other_value) { // arrange void* result; test_realloc_expected_result = (void*)0x5252; // act result = umockalloc_realloc((void*)0x3232, 43); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x5252, result); ASSERT_ARE_EQUAL(size_t, 1, test_realloc_call_count); ASSERT_ARE_EQUAL(size_t, 43, test_realloc_calls[0].size); ASSERT_ARE_EQUAL(void_ptr, (void*)0x3232, test_realloc_calls[0].ptr); } /* Tests_SRS_UMOCKALLOC_01_003: [ umockalloc_realloc shall call realloc, while passing the ptr and size arguments to realloc. ] */ /* Tests_SRS_UMOCKALLOC_01_004: [ umockalloc_realloc shall return the result of realloc. ]*/ TEST_FUNCTION(when_realloc_returns_NULL_umockalloc_realloc_returns_NULL) { // arrange void* result; test_realloc_expected_result = NULL; // act result = umockalloc_realloc((void*)0x3232, 43); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, test_realloc_call_count); ASSERT_ARE_EQUAL(size_t, 43, test_realloc_calls[0].size); ASSERT_ARE_EQUAL(void_ptr, (void*)0x3232, test_realloc_calls[0].ptr); } /* Tests_SRS_UMOCKALLOC_01_003: [ umockalloc_realloc shall call realloc, while passing the ptr and size arguments to realloc. ] */ /* Tests_SRS_UMOCKALLOC_01_004: [ umockalloc_realloc shall return the result of realloc. ]*/ TEST_FUNCTION(umockalloc_realloc_with_NULL_and_0_size_calls_the_underlying_realloc) { // arrange void* result; test_realloc_expected_result = (void*)0x4242; // act result = umockalloc_realloc(NULL, 0); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, result); ASSERT_ARE_EQUAL(size_t, 1, test_realloc_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_realloc_calls[0].size); ASSERT_ARE_EQUAL(void_ptr, NULL, test_realloc_calls[0].ptr); } /* umockalloc_free */ /* Tests_SRS_UMOCKALLOC_01_005: [ umockalloc_free shall call free, while passing the ptr argument to free. ]*/ TEST_FUNCTION(umockalloc_free_calls_free) { // arrange // act umockalloc_free((void*)0x4242); // assert ASSERT_ARE_EQUAL(size_t, 1, test_free_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, test_free_calls[0].ptr); } /* Tests_SRS_UMOCKALLOC_01_005: [ umockalloc_free shall call free, while passing the ptr argument to free. ]*/ TEST_FUNCTION(umockalloc_free_with_NULL_calls_free_with_NULL) { // arrange // act umockalloc_free(NULL); // assert ASSERT_ARE_EQUAL(size_t, 1, test_free_call_count); ASSERT_ARE_EQUAL(void_ptr, NULL, test_free_calls[0].ptr); } END_TEST_SUITE(umockalloc_unittests) umockautoignoreargs_ut/000077500000000000000000000000001362133436400406155ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006711362133436400433610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockautoignoreargs_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umockautoignoreargs_ut) set(${theseTestsName}_test_files umockautoignoreargs_ut.c ) set(${theseTestsName}_c_files ../../src/umockautoignoreargs.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005141362133436400417050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockautoignoreargs_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umockautoignoreargs_unittests, failedTestCount); return failedTestCount; } umockautoignoreargs_ut.c000066400000000000000000000260001362133436400455570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockautoignoreargs_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockautoignoreargs.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct test_malloc_CALL_TAG { size_t size; } test_malloc_CALL; static test_malloc_CALL* test_malloc_calls; static size_t test_malloc_call_count; static size_t when_shall_malloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; test_malloc_CALL* new_calls = (test_malloc_CALL*)realloc(test_malloc_calls, sizeof(test_malloc_CALL) * (test_malloc_call_count + 1)); if (new_calls != NULL) { test_malloc_calls = new_calls; test_malloc_calls[test_malloc_call_count].size = size; test_malloc_call_count++; } if (when_shall_malloc_fail == test_malloc_call_count) { result = NULL; } else { result = malloc(size); } return result; } #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umockautoignoreargs_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); when_shall_malloc_fail = 0; test_malloc_calls = NULL; test_malloc_call_count = 0; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { free(test_malloc_calls); test_malloc_calls = NULL; test_malloc_call_count = 0; TEST_MUTEX_RELEASE(test_mutex); } /* umockautoignoreargs_is_call_argument_ignored */ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_002: [ If `call` or `is_argument_ignored` is NULL, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_with_NULL_call_fails) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored(NULL, 1, &is_ignored); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_002: [ If `call` or `is_argument_ignored` is NULL, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_with_NULL_is_argument_ignored_argument_fails) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored(NULL, 1, &is_ignored); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_004: [ If `umockautoignoreargs_is_call_argument_ignored` fails parsing the `call` argument it shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_when_no_lparen_is_found_fails) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a", 1, &is_ignored); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_009: [ If the number of arguments parsed from `call` is less than `argument_index`, `umockautoignoreargs_is_call_argument_ignored` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_arg_1_when_no_args_in_call_fails) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a()", 1, &is_ignored); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_006: [ If the argument value is `IGNORED_PTR_ARG` then `is_argument_ignored` shall be set to 1. ]*/ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_001: [ `umockautoignoreargs_is_call_argument_ignored` shall determine whether argument `argument_index` shall be ignored or not. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_arg_1_when_1_IGNORED_PTR_ARG) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(IGNORED_PTR_ARG)", 1, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_007: [ If the argument value is `IGNORED_NUM_ARG` then `is_argument_ignored` shall be set to 1. ]*/ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_001: [ `umockautoignoreargs_is_call_argument_ignored` shall determine whether argument `argument_index` shall be ignored or not. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_arg_1_when_1_IGNORED_NUM_ARG) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(IGNORED_NUM_ARG)", 1, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_006: [ If the argument value is `IGNORED_PTR_ARG` then `is_argument_ignored` shall be set to 1. ]*/ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_001: [ `umockautoignoreargs_is_call_argument_ignored` shall determine whether argument `argument_index` shall be ignored or not. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_arg_2_with_IGNORED_PTR_ARG) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(0, IGNORED_PTR_ARG)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_007: [ If the argument value is `IGNORED_NUM_ARG` then `is_argument_ignored` shall be set to 1. ]*/ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_001: [ `umockautoignoreargs_is_call_argument_ignored` shall determine whether argument `argument_index` shall be ignored or not. ]*/ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_005: [ If `umockautoignoreargs_is_call_argument_ignored` was able to parse the `argument_index`th argument it shall succeed and return 0, while writing whether the argument is ignored in the `is_argument_ignored` output argument. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_arg_2_with_IGNORED_NUM_ARG) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(\"a\", IGNORED_NUM_ARG)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_008: [ If the argument value is any other value then `is_argument_ignored` shall be set to 0. ]*/ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_001: [ `umockautoignoreargs_is_call_argument_ignored` shall determine whether argument `argument_index` shall be ignored or not. ]*/ /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_005: [ If `umockautoignoreargs_is_call_argument_ignored` was able to parse the `argument_index`th argument it shall succeed and return 0, while writing whether the argument is ignored in the `is_argument_ignored` output argument. ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_arg_2_no_match) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(\"a\", xx)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 0, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_003: [ `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_with_a_space_before_lparen_succeeds) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a (\"a\", IGNORED_PTR_ARG)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_003: [ `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_with_a_space_after_lparen_succeeds) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a( \"a\", IGNORED_PTR_ARG)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_003: [ `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_with_a_space_before_comma_succeeds) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(\"a\" , IGNORED_PTR_ARG)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_003: [ `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_with_a_space_before_right_paren_succeeds) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(\"a\", IGNORED_PTR_ARG )", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_003: [ `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_2nd_arg_when_first_argument_is_a_function_call) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a(b(1,2), IGNORED_PTR_ARG)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } /* Tests_SRS_UMOCKAUTOIGNOREARGS_01_003: [ `umockautoignoreargs_is_call_argument_ignored` shall parse the `call` string as a function call: function_name(arg1, arg2, ...). ]*/ TEST_FUNCTION(umockautoignoreargs_is_call_argument_ignored_for_2nd_arg_when_first_argument_has_a_structre) { // arrange int result; int is_ignored; // act result = umockautoignoreargs_is_call_argument_ignored("a({1,2}, IGNORED_PTR_ARG)", 2, &is_ignored); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, is_ignored); } END_TEST_SUITE(umockautoignoreargs_unittests) umockcall_ut/000077500000000000000000000000001362133436400364775ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006301362133436400412360ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcall_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umockcall_ut) set(${theseTestsName}_test_files umockcall_ut.c ) set(${theseTestsName}_c_files umockcall_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005021362133436400375640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcall_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umockcall_unittests, failedTestCount); return failedTestCount; } umockcall_mocked.c000066400000000000000000000010061362133436400421340ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcall_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umockcall.c" umockcall_ut.c000066400000000000000000001244361362133436400413370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcall_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockcall.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct test_mock_call_data_copy_CALL_TAG { void* umockcall_data; } test_mock_call_data_copy_CALL; static test_mock_call_data_copy_CALL* test_mock_call_data_copy_calls; static size_t test_mock_call_data_copy_call_count; static void* test_mock_call_data_copy_expected_result; typedef struct test_mock_call_data_free_CALL_TAG { void* umockcall_data; } test_mock_call_data_free_CALL; static test_mock_call_data_free_CALL* test_mock_call_data_free_calls; static size_t test_mock_call_data_free_call_count; typedef struct test_mock_call_data_are_equal_CALL_TAG { void* left; void* right; } test_mock_call_data_are_equal_CALL; static test_mock_call_data_are_equal_CALL* test_mock_call_data_are_equal_calls; static size_t test_mock_call_data_are_equal_call_count; static int test_mock_call_data_are_equal_expected_result; typedef struct test_mock_call_data_stringify_CALL_TAG { void* umockcall_data; } test_mock_call_data_stringify_CALL; static test_mock_call_data_stringify_CALL* test_mock_call_data_stringify_calls; static size_t test_mock_call_data_stringify_call_count; static char* test_mock_call_data_stringify_expected_result = NULL; void* test_mock_call_data_copy(void* umockcall_data) { test_mock_call_data_copy_CALL* new_calls = (test_mock_call_data_copy_CALL*)realloc(test_mock_call_data_copy_calls, sizeof(test_mock_call_data_copy_CALL) * (test_mock_call_data_copy_call_count + 1)); if (new_calls != NULL) { test_mock_call_data_copy_calls = new_calls; test_mock_call_data_copy_calls[test_mock_call_data_copy_call_count].umockcall_data = umockcall_data; test_mock_call_data_copy_call_count++; } return test_mock_call_data_copy_expected_result; } void test_mock_call_data_free(void* umockcall_data) { test_mock_call_data_free_CALL* new_calls = (test_mock_call_data_free_CALL*)realloc(test_mock_call_data_free_calls, sizeof(test_mock_call_data_free_CALL) * (test_mock_call_data_free_call_count + 1)); if (new_calls != NULL) { test_mock_call_data_free_calls = new_calls; test_mock_call_data_free_calls[test_mock_call_data_free_call_count].umockcall_data = umockcall_data; test_mock_call_data_free_call_count ++; } } char* test_mock_call_data_stringify(void* umockcall_data) { test_mock_call_data_stringify_CALL* new_calls = (test_mock_call_data_stringify_CALL*)realloc(test_mock_call_data_stringify_calls, sizeof(test_mock_call_data_stringify_CALL) * (test_mock_call_data_stringify_call_count + 1)); if (new_calls != NULL) { test_mock_call_data_stringify_calls = new_calls; test_mock_call_data_stringify_calls[test_mock_call_data_stringify_call_count].umockcall_data = umockcall_data; test_mock_call_data_stringify_call_count++; } return test_mock_call_data_stringify_expected_result; } int test_mock_call_data_are_equal(void* left, void* right) { test_mock_call_data_are_equal_CALL* new_calls = (test_mock_call_data_are_equal_CALL*)realloc(test_mock_call_data_are_equal_calls, sizeof(test_mock_call_data_are_equal_CALL) * (test_mock_call_data_are_equal_call_count + 1)); if (new_calls != NULL) { test_mock_call_data_are_equal_calls = new_calls; test_mock_call_data_are_equal_calls[test_mock_call_data_are_equal_call_count].left = left; test_mock_call_data_are_equal_calls[test_mock_call_data_are_equal_call_count].right = right; test_mock_call_data_are_equal_call_count++; } return test_mock_call_data_are_equal_expected_result; } int another_test_mock_call_data_are_equal(void* left, void* right) { (void)left; (void)right; return 1; } static size_t malloc_call_count; static size_t realloc_call_count; static size_t free_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free_call_count++; free(ptr); } #ifdef __cplusplus } #endif void reset_malloc_calls(void) { malloc_call_count = 0; when_shall_malloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; free_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umockcall_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); test_mock_call_data_free_calls = NULL; test_mock_call_data_free_call_count = 0; test_mock_call_data_are_equal_calls = NULL; test_mock_call_data_are_equal_call_count = 0; test_mock_call_data_are_equal_expected_result = 1; test_mock_call_data_copy_calls = NULL; test_mock_call_data_copy_call_count = 0; test_mock_call_data_stringify_calls = NULL; test_mock_call_data_stringify_call_count = 0; test_mock_call_data_stringify_expected_result = NULL; reset_malloc_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { free(test_mock_call_data_copy_calls); test_mock_call_data_copy_calls = NULL; test_mock_call_data_copy_call_count = 0; free(test_mock_call_data_free_calls); test_mock_call_data_free_calls = NULL; test_mock_call_data_free_call_count = 0; free(test_mock_call_data_are_equal_calls); test_mock_call_data_are_equal_calls = NULL; test_mock_call_data_are_equal_call_count = 0; free(test_mock_call_data_stringify_calls); test_mock_call_data_stringify_calls = NULL; test_mock_call_data_stringify_call_count = 0; TEST_MUTEX_RELEASE(test_mutex); } /* umockcall_create */ /* Tests_SRS_UMOCKCALL_01_001: [ umockcall_create shall create a new instance of a umock call and on success it shall return a non-NULL handle to it. ] */ TEST_FUNCTION(umockcall_create_with_proper_args_succeeds) { // arrange // act UMOCKCALL_HANDLE result = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // assert ASSERT_IS_NOT_NULL(result); // cleanup umockcall_destroy(result); } /* Tests_SRS_UMOCKCALL_01_003: [ If any of the arguments are NULL, umockcall_create shall fail and return NULL. ] */ TEST_FUNCTION(umockcall_create_with_NULL_function_name_fails) { // arrange // act UMOCKCALL_HANDLE result = umockcall_create(NULL, (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_003: [ If any of the arguments are NULL, umockcall_create shall fail and return NULL. ] */ TEST_FUNCTION(umockcall_create_with_NULL_call_data_fails) { // arrange // act UMOCKCALL_HANDLE result = umockcall_create("test_function", NULL, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_003: [ If any of the arguments are NULL, umockcall_create shall fail and return NULL. ] */ TEST_FUNCTION(umockcall_create_with_NULL_call_data_copy_function_fails) { // arrange // act UMOCKCALL_HANDLE result = umockcall_create("test_function", (void*)0x4242, NULL, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_003: [ If any of the arguments are NULL, umockcall_create shall fail and return NULL. ] */ TEST_FUNCTION(umockcall_create_with_NULL_call_data_free_function_fails) { // arrange // act UMOCKCALL_HANDLE result = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, NULL, test_mock_call_data_stringify, test_mock_call_data_are_equal); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_003: [ If any of the arguments are NULL, umockcall_create shall fail and return NULL. ] */ TEST_FUNCTION(umockcall_create_with_NULL_call_data_stringify_function_fails) { // arrange // act UMOCKCALL_HANDLE result = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, NULL, test_mock_call_data_are_equal); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_003: [ If any of the arguments are NULL, umockcall_create shall fail and return NULL. ] */ TEST_FUNCTION(umockcall_create_with_NULL_call_data_are_equal_function_fails) { // arrange // act UMOCKCALL_HANDLE result = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_002: [ If allocating memory for the umock call instance fails, umockcall_create shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_call_fails_then_umockcall_create_fails) { // arrange UMOCKCALL_HANDLE result; when_shall_malloc_fail = 1; // act result = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_002: [ If allocating memory for the umock call instance fails, umockcall_create shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_function_name_fails_then_umockcall_create_fails) { // arrange UMOCKCALL_HANDLE result; when_shall_malloc_fail = 2; // act result = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // assert ASSERT_IS_NULL(result); } /* umockcall_destroy */ /* Tests_SRS_UMOCKCALL_01_004: [ umockcall_destroy shall free a previously allocated umock call instance. ] */ TEST_FUNCTION(umockcall_destroy_frees_call_data) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); reset_malloc_calls(); // act umockcall_destroy(call); // assert ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_free_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, test_mock_call_data_free_calls[0].umockcall_data); ASSERT_ARE_EQUAL(size_t, 2, free_call_count); } /* Tests_SRS_UMOCKCALL_01_005: [ If the umockcall argument is NULL then umockcall_destroy shall do nothing. ]*/ TEST_FUNCTION(umockcall_destroy_with_NULL_argument_does_nothing) { // arrange // act umockcall_destroy(NULL); // assert ASSERT_ARE_EQUAL(size_t, 0, test_mock_call_data_free_call_count); ASSERT_ARE_EQUAL(size_t, 0, free_call_count); } /* umockcall_are_equal */ /* Tests_SRS_UMOCKCALL_01_006: [ umockcall_are_equal shall compare the two mock calls and return whether they are equal or not. ] */ /* Tests_SRS_UMOCKCALL_01_024: [ If both left and right pointers are equal, umockcall_are_equal shall return 1. ] */ TEST_FUNCTION(umockcall_are_equal_with_the_same_call_for_both_args_returns_1) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act int result = umockcall_are_equal(call, call); // assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(size_t, 0, test_mock_call_data_are_equal_call_count); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_006: [ umockcall_are_equal shall compare the two mock calls and return whether they are equal or not. ] */ /* Tests_SRS_UMOCKCALL_01_027: [ If the underlying umockcall_data_are_equal returns 1, then umockcall_are_equal shall return 1. ]*/ TEST_FUNCTION(umockcall_are_equal_with_2_equal_calls_returns_1) { // arrange UMOCKCALL_HANDLE call1 = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); UMOCKCALL_HANDLE call2 = umockcall_create("test_function", (void*)0x4243, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act int result = umockcall_are_equal(call1, call2); // assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, test_mock_call_data_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4243, test_mock_call_data_are_equal_calls[0].right); // cleanup umockcall_destroy(call1); umockcall_destroy(call2); } /* Tests_SRS_UMOCKCALL_01_024: [ If both left and right pointers are equal, umockcall_are_equal shall return 1. ] */ TEST_FUNCTION(when_left_and_right_are_NULL_umockcall_are_equal_returns_1) { // arrange // act int result = umockcall_are_equal(NULL, NULL); // assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(size_t, 0, test_mock_call_data_are_equal_call_count); } /* Tests_SRS_UMOCKCALL_01_015: [ If only one of the left or right arguments are NULL, umockcall_are_equal shall return 0. ] */ TEST_FUNCTION(when_only_left_is_NULL_umockcall_are_equal_returns_0) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act int result = umockcall_are_equal(NULL, call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, test_mock_call_data_are_equal_call_count); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_015: [ If only one of the left or right arguments are NULL, umockcall_are_equal shall return 0. ] */ TEST_FUNCTION(when_only_right_is_NULL_umockcall_are_equal_returns_0) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act int result = umockcall_are_equal(call, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, test_mock_call_data_are_equal_call_count); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_025: [ If the function name does not match for the 2 calls, umockcall_are_equal shall return 0. ]*/ TEST_FUNCTION(when_the_function_name_does_not_match_then_umockcall_are_equal_returns_0) { // arrange int result; UMOCKCALL_HANDLE call1 = umockcall_create("test_function_1", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); UMOCKCALL_HANDLE call2 = umockcall_create("test_function_2", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_are_equal_expected_result = -1; // act result = umockcall_are_equal(call1, call2); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, test_mock_call_data_are_equal_call_count); // cleanup umockcall_destroy(call1); umockcall_destroy(call2); } /* Tests_SRS_UMOCKCALL_01_026: [ The call data shall be evaluated by calling the umockcall_data_are_equal function passed in umockcall_create while passing as arguments the umockcall_data associated with each call handle. ]*/ /* Tests_SRS_UMOCKCALL_01_028: [ If the underlying umockcall_data_are_equal returns 0, then umockcall_are_equal shall return 0. ]*/ TEST_FUNCTION(when_the_underlying_are_equal_returns_0_umockcall_are_equal_returns_0) { // arrange int result; UMOCKCALL_HANDLE call1 = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); UMOCKCALL_HANDLE call2 = umockcall_create("test_function", (void*)0x4243, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_are_equal_expected_result = 0; // act result = umockcall_are_equal(call1, call2); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, test_mock_call_data_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4243, test_mock_call_data_are_equal_calls[0].right); // cleanup umockcall_destroy(call1); umockcall_destroy(call2); } /* Tests_SRS_UMOCKCALL_01_029: [ If the underlying umockcall_data_are_equal fails (returns anything else than 0 or 1), then umockcall_are_equal shall fail and return -1. ] */ TEST_FUNCTION(when_the_underlying_are_equal_returns_minus_1_umockcall_are_equal_returns_minus_1) { // arrange int result; UMOCKCALL_HANDLE call1 = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); UMOCKCALL_HANDLE call2 = umockcall_create("test_function", (void*)0x4243, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_are_equal_expected_result = -1; // act result = umockcall_are_equal(call1, call2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, test_mock_call_data_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4243, test_mock_call_data_are_equal_calls[0].right); // cleanup umockcall_destroy(call1); umockcall_destroy(call2); } /* Tests_SRS_UMOCKCALL_01_029: [ If the underlying umockcall_data_are_equal fails (returns anything else than 0 or 1), then umockcall_are_equal shall fail and return -1. ] */ TEST_FUNCTION(when_the_underlying_are_equal_returns_2_umockcall_are_equal_returns_minus_1) { // arrange int result; UMOCKCALL_HANDLE call1 = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); UMOCKCALL_HANDLE call2 = umockcall_create("test_function", (void*)0x4243, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_are_equal_expected_result = 2; // act result = umockcall_are_equal(call1, call2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, test_mock_call_data_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4243, test_mock_call_data_are_equal_calls[0].right); // cleanup umockcall_destroy(call1); umockcall_destroy(call2); } /* Tests_SRS_UMOCKCALL_01_014: [ If the two calls have different are_equal functions that have been passed to umockcall_create then the calls shall be considered different and 0 shall be returned. ] */ TEST_FUNCTION(when_the_are_equal_function_pointers_are_different_umockcall_are_equal_returns_0) { // arrange int result; UMOCKCALL_HANDLE call1 = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); UMOCKCALL_HANDLE call2 = umockcall_create("test_function", (void*)0x4243, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, another_test_mock_call_data_are_equal); test_mock_call_data_are_equal_expected_result = 2; // act result = umockcall_are_equal(call1, call2); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, test_mock_call_data_are_equal_call_count); // cleanup umockcall_destroy(call1); umockcall_destroy(call2); } /* umockcall_stringify */ /* Tests_SRS_UMOCKCALL_01_016: [ umockcall_stringify shall return a string representation of the mock call in the form \[function_name(arguments)\]. ] */ /* Tests_SRS_UMOCKCALL_01_018: [ The returned string shall be a newly allocated string and it is to be freed by the caller. ]*/ /* Tests_SRS_UMOCKCALL_01_019: [ To obtain the arguments string, umockcall_stringify shall call the umockcall_data_stringify function passed to umockcall_create and pass to it the umockcall_data pointer (also given in umockcall_create). ]*/ TEST_FUNCTION(umockcall_stringify_calls_the_underlying_stringify_function_and_returns_the_strinfigied_call) { // arrange char* result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_stringify_expected_result = (char*)malloc(1); test_mock_call_data_stringify_expected_result[0] = '\0'; // act result = umockcall_stringify(call); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_function()]", result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_stringify_call_count); // cleanup free(result); umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_016: [ umockcall_stringify shall return a string representation of the mock call in the form \[function_name(arguments)\]. ] */ /* Tests_SRS_UMOCKCALL_01_018: [ The returned string shall be a newly allocated string and it is to be freed by the caller. ]*/ /* Tests_SRS_UMOCKCALL_01_019: [ To obtain the arguments string, umockcall_stringify shall call the umockcall_data_stringify function passed to umockcall_create and pass to it the umockcall_data pointer (also given in umockcall_create). ]*/ TEST_FUNCTION(umockcall_stringify_uses_the_stringified_args_as_obtained_from_the_underlying_stringify_function) { // arrange char* result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_stringify_expected_result = (char*)malloc(strlen("45") + 1); (void)strcpy(test_mock_call_data_stringify_expected_result, "45"); // act result = umockcall_stringify(call); // assert ASSERT_ARE_EQUAL(char_ptr, "[test_function(45)]", result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_stringify_call_count); // cleanup free(result); umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_017: [ If the umockcall argument is NULL, umockcall_stringify shall return NULL. ] */ TEST_FUNCTION(umockcall_stringify_with_NULL_fails_and_returns_NULL) { // arrange // act char* result = umockcall_stringify(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_020: [ If the underlying umockcall_data_stringify call fails, umockcall_stringify shall fail and return NULL. ]*/ TEST_FUNCTION(when_the_underlying_stringify_fails_then_umockcall_stringify_calls_fails) { // arrange char* result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_stringify_expected_result = NULL; // act result = umockcall_stringify(call); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_stringify_call_count); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_021: [ If not enough memory can be allocated for the string to be returned, umockcall_stringify shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_then_umockcall_stringify_fails) { // arrange char* result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_stringify_expected_result = (char*)malloc(strlen("45") + 1); reset_malloc_calls(); when_shall_malloc_fail = 1; // act result = umockcall_stringify(call); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_stringify_call_count); ASSERT_ARE_EQUAL(size_t, 1, free_call_count); // cleanup umockcall_destroy(call); } /* umockcall_get_call_data */ /* Tests_SRS_UMOCKCALL_01_022: [ umockcall_get_call_data shall return the associated umock call data that was passed to umockcall_create. ]*/ TEST_FUNCTION(umockcall_get_call_data_returns_the_call_data_pointer) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act void* result = umockcall_get_call_data(call); // assert ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_022: [ umockcall_get_call_data shall return the associated umock call data that was passed to umockcall_create. ]*/ TEST_FUNCTION(umockcall_get_call_data_with_NULL_returns_NULL) { // arrange // act void* result = umockcall_get_call_data(NULL); // assert ASSERT_IS_NULL(result); } /* umockcall_clone */ /* Tests_SRS_UMOCKCALL_01_031: [ umockcall_clone shall clone a umock call and on success it shall return a handle to the newly cloned call. ] */ /* Tests_SRS_UMOCKCALL_01_033: [ The call data shall be cloned by calling the umockcall_data_copy function passed in umockcall_create and passing as argument the umockcall_data value passed in umockcall_create. ]*/ /* Tests_SRS_UMOCKCALL_01_035: [ umockcall_clone shall copy also the function name. ]*/ /* Tests_SRS_UMOCKCALL_01_037: [ umockcall_clone shall also copy all the functions passed to umockcall_create (umockcall_data_copy, umockcall_data_free, umockcall_data_are_equal, umockcall_data_stringify). ]*/ TEST_FUNCTION(umockcall_clone_clones_the_call) { // arrange UMOCKCALL_HANDLE result; char* stringified; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_copy_expected_result = (void*)0x4243; // act result = umockcall_clone(call); // assert ASSERT_IS_NOT_NULL(result); test_mock_call_data_stringify_expected_result = (char*)calloc(1, 1); stringified = umockcall_stringify(result); ASSERT_ARE_EQUAL(char_ptr, "[test_function()]", stringified); // cleanup free(stringified); umockcall_destroy(call); umockcall_destroy(result); } /* Tests_SRS_UMOCKCALL_01_032: [ If umockcall is NULL, umockcall_clone shall return NULL. ]*/ TEST_FUNCTION(umockcall_clone_with_NULL_handle_returns_NULL) { // arrange UMOCKCALL_HANDLE result; test_mock_call_data_copy_expected_result = (void*)0x4243; // act result = umockcall_clone(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALL_01_043: [ If allocating memory for the new umock call fails, umockcall_clone shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umockcall_clone_fails) { // arrange UMOCKCALL_HANDLE result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); reset_malloc_calls(); when_shall_malloc_fail = 1; // act result = umockcall_clone(call); // assert ASSERT_IS_NULL(result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_034: [ If umockcall_data_copy fails then umockcall_clone shall return NULL. ]*/ TEST_FUNCTION(when_umockcall_data_copy_fails_then_umockcall_clone_clones_the_call) { // arrange UMOCKCALL_HANDLE result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_copy_expected_result = NULL; // act result = umockcall_clone(call); // assert ASSERT_IS_NULL(result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_036: [ If allocating memory for the function name fails, umockcall_clone shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_function_name_fails_umockcall_clone_fails) { // arrange UMOCKCALL_HANDLE result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); reset_malloc_calls(); when_shall_malloc_fail = 2; // act result = umockcall_clone(call); // assert ASSERT_IS_NULL(result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_037: [ umockcall_clone shall also copy all the functions passed to umockcall_create (umockcall_data_copy, umockcall_data_free, umockcall_data_are_equal, umockcall_data_stringify). ]*/ TEST_FUNCTION(umockcall_are_equal_on_2_clones_calls_succeeds) { // arrange UMOCKCALL_HANDLE result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_copy_expected_result = (void*)0x4243; // act result = umockcall_clone(call); // assert ASSERT_IS_NOT_NULL(result); test_mock_call_data_are_equal_expected_result = 1; ASSERT_ARE_EQUAL(int, 1, umockcall_are_equal(result, call)); // cleanup umockcall_destroy(call); umockcall_destroy(result); } /* Tests_SRS_UMOCKCALL_01_037: [ umockcall_clone shall also copy all the functions passed to umockcall_create (umockcall_data_copy, umockcall_data_free, umockcall_data_are_equal, umockcall_data_stringify). ]*/ TEST_FUNCTION(umockcall_clone_on_a_cloned_call_succeeds) { // arrange UMOCKCALL_HANDLE result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); UMOCKCALL_HANDLE call2; test_mock_call_data_copy_expected_result = (void*)0x4243; call2 = umockcall_clone(call); test_mock_call_data_copy_expected_result = (void*)0x4244; // act result = umockcall_clone(call2); // assert ASSERT_IS_NOT_NULL(result); // cleanup umockcall_destroy(call); umockcall_destroy(call2); umockcall_destroy(result); } /* Tests_SRS_UMOCKCALL_01_037: [ umockcall_clone shall also copy all the functions passed to umockcall_create (umockcall_data_copy, umockcall_data_free, umockcall_data_are_equal, umockcall_data_stringify). ]*/ TEST_FUNCTION(freeing_a_cloned_call_succeeds) { // arrange UMOCKCALL_HANDLE cloned_call; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); test_mock_call_data_copy_expected_result = (void*)0x4243; cloned_call = umockcall_clone(call); // act umockcall_destroy(cloned_call); // assert ASSERT_ARE_EQUAL(size_t, 1, test_mock_call_data_free_call_count); // cleanup umockcall_destroy(call); } /* umockcall_set_fail_call */ /* Tests_SRS_UMOCKCALL_01_038: [ umockcall_set_fail_call shall store the fail_call value, associating it with the umockcall call instance. ]*/ /* Tests_SRS_UMOCKCALL_01_044: [ On success umockcall_set_fail_call shall return 0. ]*/ TEST_FUNCTION(umockcall_set_fail_call_sets_the_fail_call_property) { // arrange int result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act result = umockcall_set_fail_call(call, 1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, umockcall_get_fail_call(call)); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_039: [ If umockcall is NULL, umockcall_set_fail_call shall return a non-zero value. ]*/ TEST_FUNCTION(umockcall_set_fail_call_with_NULL_fails) { // arrange // act int result = umockcall_set_fail_call(NULL, 1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKCALL_01_040: [ If a value different than 0 and 1 is passed as fail_call, umockcall_set_fail_call shall return a non-zero value. ]*/ TEST_FUNCTION(umockcall_set_fail_call_with_an_invalid_fail_call_value_fails) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act int result = umockcall_set_fail_call(call, 2); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcall_destroy(call); } /* umockcall_get_fail_call */ /* Tests_SRS_UMOCKCALL_01_041: [ umockcall_get_fail_call shall retrieve the fail_call value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_fail_call_retrieves_0) { // arrange int result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_fail_call(call, 0); // act result = umockcall_get_fail_call(call); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_041: [ umockcall_get_fail_call shall retrieve the fail_call value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_fail_call_retrieves_1) { // arrange int result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_fail_call(call, 1); // act result = umockcall_get_fail_call(call); // assert ASSERT_ARE_EQUAL(int, 1, result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_042: [ If umockcall is NULL, umockcall_get_fail_call shall return -1. ]*/ TEST_FUNCTION(umockcall_get_fail_call_with_NULL_call_fails) { // arrange // act int result = umockcall_get_fail_call(NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKCALL_01_041: [ umockcall_get_fail_call shall retrieve the fail_call value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_fail_call_on_a_cloned_call_retrieves_1) { // arrange int result; UMOCKCALL_HANDLE cloned_call; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_fail_call(call, 1); test_mock_call_data_copy_expected_result = (void*)0x4243; cloned_call = umockcall_clone(call); // act result = umockcall_get_fail_call(cloned_call); // assert ASSERT_ARE_EQUAL(int, 1, result); // cleanup umockcall_destroy(call); umockcall_destroy(cloned_call); } /* Tests_SRS_UMOCKCALL_01_041: [ umockcall_get_fail_call shall retrieve the fail_call value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_fail_call_on_a_cloned_call_retrieves_0) { // arrange int result; UMOCKCALL_HANDLE cloned_call; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_fail_call(call, 0); test_mock_call_data_copy_expected_result = (void*)0x4243; cloned_call = umockcall_clone(call); // act result = umockcall_get_fail_call(cloned_call); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup umockcall_destroy(call); umockcall_destroy(cloned_call); } /* umockcall_set_ignore_all_calls */ /* Tests_SRS_UMOCKCALL_01_045: [ umockcall_set_ignore_all_calls shall store the ignore_all_calls value, associating it with the umockcall call instance. ]*/ /* Tests_SRS_UMOCKCALL_01_046: [ On success umockcall_set_ignore_all_calls shall return 0. ]*/ TEST_FUNCTION(umockcall_set_ignore_all_calls_sets_the_ignore_all_calls_property) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act int result = umockcall_set_ignore_all_calls(call, 1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 1, umockcall_get_ignore_all_calls(call)); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_047: [ If umockcall is NULL, umockcall_set_ignore_all_calls shall return a non-zero value. ]*/ TEST_FUNCTION(umockcall_set_ignore_all_calls_with_NULL_fails) { // arrange // act int result = umockcall_set_ignore_all_calls(NULL, 1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKCALL_01_048: [ If a value different than 0 and 1 is passed as ignore_all_calls, umockcall_set_ignore_all_calls shall return a non-zero value. ]*/ TEST_FUNCTION(umockcall_set_ignore_all_calls_with_an_invalid_ignore_all_calls_value_fails) { // arrange UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); // act int result = umockcall_set_ignore_all_calls(call, 2); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcall_destroy(call); } /* umockcall_get_ignore_all_calls */ /* Tests_SRS_UMOCKCALL_01_049: [ umockcall_get_ignore_all_calls shall retrieve the ignore_all_calls value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_ignore_all_calls_retrieves_0) { // arrange int result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_ignore_all_calls(call, 0); // act result = umockcall_get_ignore_all_calls(call); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_049: [ umockcall_get_ignore_all_calls shall retrieve the ignore_all_calls value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_ignore_all_calls_retrieves_1) { // arrange int result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_ignore_all_calls(call, 1); // act result = umockcall_get_ignore_all_calls(call); // assert ASSERT_ARE_EQUAL(int, 1, result); // cleanup umockcall_destroy(call); } /* Tests_SRS_UMOCKCALL_01_050: [ If umockcall is NULL, umockcall_get_ignore_all_calls shall return -1. ]*/ TEST_FUNCTION(umockcall_get_ignore_all_calls_with_NULL_call_fails) { // arrange // act int result = umockcall_get_ignore_all_calls(NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKCALL_01_041: [ umockcall_get_fail_call shall retrieve the fail_call value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_ignore_all_calls_on_a_cloned_call_retrieves_1) { // arrange UMOCKCALL_HANDLE cloned_call; int result; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_ignore_all_calls(call, 1); test_mock_call_data_copy_expected_result = (void*)0x4243; cloned_call = umockcall_clone(call); // act result = umockcall_get_ignore_all_calls(cloned_call); // assert ASSERT_ARE_EQUAL(int, 1, result); // cleanup umockcall_destroy(call); umockcall_destroy(cloned_call); } /* Tests_SRS_UMOCKCALL_01_049: [ umockcall_get_ignore_all_calls shall retrieve the ignore_all_calls value, associated with the umockcall call instance. ]*/ TEST_FUNCTION(umockcall_get_ignore_all_calls_on_a_cloned_call_retrieves_0) { // arrange int result; UMOCKCALL_HANDLE cloned_call; UMOCKCALL_HANDLE call = umockcall_create("test_function", (void*)0x4242, test_mock_call_data_copy, test_mock_call_data_free, test_mock_call_data_stringify, test_mock_call_data_are_equal); (void)umockcall_set_fail_call(call, 0); test_mock_call_data_copy_expected_result = (void*)0x4243; cloned_call = umockcall_clone(call); // act result = umockcall_get_fail_call(cloned_call); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup umockcall_destroy(call); umockcall_destroy(cloned_call); } END_TEST_SUITE(umockcall_unittests) umockcallpairs_ut/000077500000000000000000000000001362133436400375365ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006471362133436400423050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallpairs_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umockcallpairs_ut) set(${theseTestsName}_test_files umockcallpairs_ut.c ) set(${theseTestsName}_c_files umockcallpairs_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005071362133436400406300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallpairs_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umockcallpairs_unittests, failedTestCount); return failedTestCount; } umockcallpairs_mocked.c000066400000000000000000000010131362133436400442300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallpairs_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umockcallpairs.c" umockcallpairs_ut.c000066400000000000000000000601241362133436400434260ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallpairs_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockcallpairs.h" #include "umockcall.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct umocktypes_are_equal_CALL_TAG { char* type; const void* left; const void* right; } umocktypes_are_equal_CALL; static umocktypes_are_equal_CALL* umocktypes_are_equal_calls; static size_t umocktypes_are_equal_call_count; static size_t when_shall_umocktypes_are_equal_call_fail; static int umocktypes_are_equal_call_result; static int umocktypes_are_equal_fail_call_result; typedef struct umocktypes_copy_CALL_TAG { char* type; void* destination; const void* source; } umocktypes_copy_CALL; static umocktypes_copy_CALL* umocktypes_copy_calls; static size_t umocktypes_copy_call_count; static size_t when_shall_umocktypes_copy_call_fail; static int umocktypes_copy_call_result; static int umocktypes_copy_fail_call_result; typedef struct umocktypes_free_CALL_TAG { char* type; const void* value; } umocktypes_free_CALL; static umocktypes_free_CALL* umocktypes_free_calls; static size_t umocktypes_free_call_count; #ifdef __cplusplus extern "C" { #endif int umocktypes_are_equal(const char* type, const void* left, const void* right) { int result; umocktypes_are_equal_CALL* new_calls = (umocktypes_are_equal_CALL*)realloc(umocktypes_are_equal_calls, sizeof(umocktypes_are_equal_CALL) * (umocktypes_are_equal_call_count + 1)); if (new_calls != NULL) { size_t typename_length = strlen(type); umocktypes_are_equal_calls = new_calls; umocktypes_are_equal_calls[umocktypes_are_equal_call_count].type = (char*)malloc(typename_length + 1); (void)memcpy(umocktypes_are_equal_calls[umocktypes_are_equal_call_count].type, type, typename_length + 1); umocktypes_are_equal_calls[umocktypes_are_equal_call_count].left = left; umocktypes_are_equal_calls[umocktypes_are_equal_call_count].right = right; umocktypes_are_equal_call_count++; } if (when_shall_umocktypes_are_equal_call_fail == umocktypes_are_equal_call_count) { result = umocktypes_are_equal_fail_call_result; } else { result = umocktypes_are_equal_call_result; } return result; } int umocktypes_copy(const char* type, void* destination, const void* source) { int result; umocktypes_copy_CALL* new_calls = (umocktypes_copy_CALL*)realloc(umocktypes_copy_calls, sizeof(umocktypes_copy_CALL) * (umocktypes_copy_call_count + 1)); if (new_calls != NULL) { size_t typename_length = strlen(type); umocktypes_copy_calls = new_calls; umocktypes_copy_calls[umocktypes_copy_call_count].type = (char*)malloc(typename_length + 1); (void)memcpy(umocktypes_copy_calls[umocktypes_copy_call_count].type, type, typename_length + 1); umocktypes_copy_calls[umocktypes_copy_call_count].destination = destination; umocktypes_copy_calls[umocktypes_copy_call_count].source = source; umocktypes_copy_call_count++; } if (when_shall_umocktypes_copy_call_fail == umocktypes_copy_call_count) { result = umocktypes_copy_fail_call_result; } else { result = umocktypes_copy_call_result; } return result; } void umocktypes_free(const char* type, const void* value) { umocktypes_free_CALL* new_calls = (umocktypes_free_CALL*)realloc(umocktypes_free_calls, sizeof(umocktypes_free_CALL) * (umocktypes_free_call_count + 1)); if (new_calls != NULL) { size_t typename_length = strlen(type); umocktypes_free_calls = new_calls; umocktypes_free_calls[umocktypes_free_call_count].type = (char*)malloc(typename_length + 1); (void)memcpy(umocktypes_free_calls[umocktypes_free_call_count].type, type, typename_length + 1); umocktypes_free_calls[umocktypes_free_call_count].value = value; umocktypes_free_call_count++; } } void reset_umocktypes_are_equal_calls(void) { if (umocktypes_are_equal_calls != NULL) { size_t i; for (i = 0; i < umocktypes_are_equal_call_count; i++) { free(umocktypes_are_equal_calls[i].type); } free(umocktypes_are_equal_calls); umocktypes_are_equal_calls = NULL; } umocktypes_are_equal_call_count = 0; when_shall_umocktypes_are_equal_call_fail = 0; } void reset_umocktypes_copy_calls(void) { if (umocktypes_copy_calls != NULL) { size_t i; for (i = 0; i < umocktypes_copy_call_count; i++) { free(umocktypes_copy_calls[i].type); } free(umocktypes_copy_calls); umocktypes_copy_calls = NULL; } umocktypes_copy_call_count = 0; when_shall_umocktypes_copy_call_fail = 0; } void reset_umocktypes_free_calls(void) { if (umocktypes_free_calls != NULL) { size_t i; for (i = 0; i < umocktypes_free_call_count; i++) { free(umocktypes_free_calls[i].type); } free(umocktypes_free_calls); umocktypes_free_calls = NULL; } umocktypes_free_call_count = 0; } static size_t malloc_call_count; static size_t realloc_call_count; static size_t free_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_realloc_fail; void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free_call_count++; free(ptr); } #ifdef __cplusplus } #endif void reset_malloc_calls(void) { malloc_call_count = 0; when_shall_malloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; free_call_count = 0; } static void reset_all_calls(void) { reset_malloc_calls(); reset_umocktypes_are_equal_calls(); reset_umocktypes_copy_calls(); reset_umocktypes_free_calls(); } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umockcallpairs_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); reset_all_calls(); umocktypes_copy_call_result = 0; umocktypes_are_equal_call_result = 1; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex); reset_all_calls(); } /* umockcallpairs_track_create_paired_call */ /* Tests_SRS_UMOCKCALLPAIRS_01_001: [ umockcallpairs_track_create_paired_call shall add a new entry to the PAIRED_HANDLES array and on success it shall return 0. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_002: [ umockcallpairs_track_create_paired_call shall copy the handle_value to the handle_value member of the new entry. ] */ /* Tests_SRS_UMOCKCALLPAIRS_01_003: [ umockcallpairs_track_create_paired_call shall allocate a memory block and store a pointer to it in the memory field of the new entry. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_006: [ The handle value shall be copied by using umocktypes_copy. ]*/ TEST_FUNCTION(umockcallpairs_track_create_paired_call_succeeds) { // arrange PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; // act int result = umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, malloc_call_count); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_copy_call_count); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_copy_calls[0].type); ASSERT_ARE_EQUAL(void_ptr, &handle, umocktypes_copy_calls[0].source); // cleanup free(paired_handles.paired_handles[0].handle_type); free(paired_handles.paired_handles[0].handle_value); free(paired_handles.paired_handles); } /* Tests_SRS_UMOCKCALLPAIRS_01_004: [ If any of the arguments paired_handles, handle or handle_type is NULL, umockcallpairs_track_create_paired_call shallfail and return a non-zero value. ]*/ TEST_FUNCTION(when_paired_handles_is_NULL_umockcallpairs_track_create_paired_call_fails) { // arrange void* handle = (void*)0x4242; // act int result = umockcallpairs_track_create_paired_call(NULL, &handle, "void*", sizeof(handle)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, malloc_call_count); ASSERT_ARE_EQUAL(size_t, 0, realloc_call_count); } /* Tests_SRS_UMOCKCALLPAIRS_01_004: [ If any of the arguments paired_handles, handle or handle_type is NULL, umockcallpairs_track_create_paired_call shallfail and return a non-zero value. ]*/ TEST_FUNCTION(when_handle_is_NULL_umockcallpairs_track_create_paired_call_fails) { // arrange PAIRED_HANDLES paired_handles = { NULL, 0 }; // act int result = umockcallpairs_track_create_paired_call(&paired_handles, NULL, "void*", sizeof(void*)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, malloc_call_count); ASSERT_ARE_EQUAL(size_t, 0, realloc_call_count); } /* Tests_SRS_UMOCKCALLPAIRS_01_004: [ If any of the arguments paired_handles, handle or handle_type is NULL, umockcallpairs_track_create_paired_call shallfail and return a non-zero value. ]*/ TEST_FUNCTION(when_handle_type_is_NULL_umockcallpairs_track_create_paired_call_fails) { // arrange PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; // act int result = umockcallpairs_track_create_paired_call(&paired_handles, &handle, NULL, sizeof(handle)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, malloc_call_count); ASSERT_ARE_EQUAL(size_t, 0, realloc_call_count); } /* Tests_SRS_UMOCKCALLPAIRS_01_005: [ If allocating memory fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_reallocating_the_entire_paired_handles_array_fails_umockcallpairs_track_create_paired_call_fails) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; when_shall_realloc_fail = 1; // act result = umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); ASSERT_ARE_EQUAL(size_t, 0, malloc_call_count); } /* Tests_SRS_UMOCKCALLPAIRS_01_005: [ If allocating memory fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_the_handle_value_memory_block_fails_umockcallpairs_track_create_paired_call_fails) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; when_shall_malloc_fail = 1; // act result = umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, malloc_call_count); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); ASSERT_ARE_EQUAL(size_t, 1, free_call_count); } /* Tests_SRS_UMOCKCALLPAIRS_01_005: [ If allocating memory fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_the_handle_type_block_fails_umockcallpairs_track_create_paired_call_fails) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; when_shall_malloc_fail = 2; // act result = umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, malloc_call_count); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); ASSERT_ARE_EQUAL(size_t, 2, free_call_count); } /* Tests_SRS_UMOCKCALLPAIRS_01_007: [ If umocktypes_copy fails, umockcallpairs_track_create_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_copying_the_handle_fails_umockcallpairs_track_create_paired_call_fails) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; when_shall_umocktypes_copy_call_fail = 1; umocktypes_copy_fail_call_result = -1; // act result = umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); ASSERT_ARE_EQUAL(size_t, 3, free_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_copy_call_count); ASSERT_ARE_EQUAL(size_t, 2, malloc_call_count); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_copy_calls[0].type); ASSERT_ARE_EQUAL(void_ptr, &handle, umocktypes_copy_calls[0].source); } TEST_FUNCTION(when_realloc_fails_a_subsequent_create_and_destroy_succeeds) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; void* copied_handle; when_shall_realloc_fail = 1; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); reset_all_calls(); when_shall_realloc_fail = 0; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); copied_handle = umocktypes_copy_calls[0].destination; reset_all_calls(); // act result = umockcallpairs_track_destroy_paired_call(&paired_handles, &handle); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 3, free_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_are_equal_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_free_call_count); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_free_calls[0].type); ASSERT_ARE_EQUAL(void_ptr, copied_handle, umocktypes_free_calls[0].value); } /* umockcallpairs_track_destroy_paired_call */ /* Tests_SRS_UMOCKCALLPAIRS_01_008: [ umockcallpairs_track_destroy_paired_call shall remove from the paired handles array pointed by the paired_handles field the entry that is associated with the handle passed in the handle argument. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_009: [ On success umockcallpairs_track_destroy_paired_call shall return 0. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_011: [ umockcallpairs_track_destroy_paired_call shall free the memory pointed by the memory field in the PAIRED_HANDLES array entry associated with handle. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_012: [ If the array paired handles array is empty after removing the entry, the paired_handles field shall be freed and set to NULL. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_013: [ When looking up which entry to remove, the comparison of the handle values shall be done by calling umocktypes_are_equal. ]*/ TEST_FUNCTION(umockcallpairs_track_destroy_paired_call_removes_a_tracked_handle) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; void* copied_handle; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); copied_handle = umocktypes_copy_calls[0].destination; reset_all_calls(); // act result = umockcallpairs_track_destroy_paired_call(&paired_handles, &handle); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 3, free_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_are_equal_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_free_call_count); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_free_calls[0].type); ASSERT_ARE_EQUAL(void_ptr, copied_handle, umocktypes_free_calls[0].value); } /* Tests_SRS_UMOCKCALLPAIRS_01_008: [ umockcallpairs_track_destroy_paired_call shall remove from the paired handles array pointed by the paired_handles field the entry that is associated with the handle passed in the handle argument. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_009: [ On success umockcallpairs_track_destroy_paired_call shall return 0. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_011: [ umockcallpairs_track_destroy_paired_call shall free the memory pointed by the memory field in the PAIRED_HANDLES array entry associated with handle. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_012: [ If the array paired handles array is empty after removing the entry, the paired_handles field shall be freed and set to NULL. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_013: [ When looking up which entry to remove, the comparison of the handle values shall be done by calling umocktypes_are_equal. ]*/ TEST_FUNCTION(umockcallpairs_track_destroy_paired_call_with_2_creates_removes_the_tracked_handle) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle1 = (void*)0x4242; void* handle2 = (void*)0x4243; void* first_copied_handle; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle1, "void*", sizeof(handle1)); (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle2, "void*", sizeof(handle2)); first_copied_handle = umocktypes_copy_calls[0].destination; reset_all_calls(); // act result = umockcallpairs_track_destroy_paired_call(&paired_handles, &handle1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, free_call_count); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_are_equal_call_count); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_are_equal_calls[0].type); ASSERT_ARE_EQUAL(void_ptr, first_copied_handle, umocktypes_are_equal_calls[0].left); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_free_call_count); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_free_calls[0].type); // cleanup free(paired_handles.paired_handles[0].handle_type); free(paired_handles.paired_handles[0].handle_value); free(paired_handles.paired_handles); } /* Tests_SRS_UMOCKCALLPAIRS_01_008: [ umockcallpairs_track_destroy_paired_call shall remove from the paired handles array pointed by the paired_handles field the entry that is associated with the handle passed in the handle argument. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_009: [ On success umockcallpairs_track_destroy_paired_call shall return 0. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_011: [ umockcallpairs_track_destroy_paired_call shall free the memory pointed by the memory field in the PAIRED_HANDLES array entry associated with handle. ]*/ /* Tests_SRS_UMOCKCALLPAIRS_01_013: [ When looking up which entry to remove, the comparison of the handle values shall be done by calling umocktypes_are_equal. ]*/ TEST_FUNCTION(when_the_handle_is_found_at_the_second_index_umockcallpairs_track_destroy_paired_call_succeeds) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle1 = (void*)0x4242; void* handle2 = (void*)0x4243; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle1, "void*", sizeof(handle1)); (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle2, "void*", sizeof(handle2)); reset_all_calls(); when_shall_umocktypes_are_equal_call_fail = 1; umocktypes_are_equal_fail_call_result = 0; // act result = umockcallpairs_track_destroy_paired_call(&paired_handles, &handle2); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypes_free_call_count); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_free_calls[0].type); // cleanup free(paired_handles.paired_handles[0].handle_type); free(paired_handles.paired_handles[0].handle_value); free(paired_handles.paired_handles); } /* Tests_SRS_UMOCKCALLPAIRS_01_010: [ If any of the arguments is NULL, umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallpairs_track_destroy_paired_call_with_NULL_paired_handles_fails) { // arrange void* handle = (void*)0x4242; // act int result = umockcallpairs_track_destroy_paired_call(NULL, &handle); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, free_call_count); ASSERT_ARE_EQUAL(size_t, 0, umocktypes_are_equal_call_count); ASSERT_ARE_EQUAL(size_t, 0, umocktypes_free_call_count); } /* Tests_SRS_UMOCKCALLPAIRS_01_010: [ If any of the arguments is NULL, umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallpairs_track_destroy_paired_call_with_NULL_handle_fails) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); reset_all_calls(); // act result = umockcallpairs_track_destroy_paired_call(&paired_handles, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, free_call_count); ASSERT_ARE_EQUAL(size_t, 0, umocktypes_are_equal_call_count); ASSERT_ARE_EQUAL(size_t, 0, umocktypes_free_call_count); // cleanup free(paired_handles.paired_handles[0].handle_type); free(paired_handles.paired_handles[0].handle_value); free(paired_handles.paired_handles); } /* Tests_SRS_UMOCKCALLPAIRS_01_014: [ If umocktypes_are_equal fails, umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_are_equal_fails_umockcallpairs_track_destroy_paired_call_fails) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle = (void*)0x4242; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle, "void*", sizeof(handle)); reset_all_calls(); when_shall_umocktypes_are_equal_call_fail = 1; umocktypes_are_equal_fail_call_result = -1; // act result = umockcallpairs_track_destroy_paired_call(&paired_handles, &handle); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup free(paired_handles.paired_handles[0].handle_type); free(paired_handles.paired_handles[0].handle_value); free(paired_handles.paired_handles); } /* Tests_SRS_UMOCKCALLPAIRS_01_015: [ If the handle is not found in the array then umockcallpairs_track_destroy_paired_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_the_handle_is_not_found_umockcallpairs_track_destroy_paired_call_fails) { // arrange int result; PAIRED_HANDLES paired_handles = { NULL, 0 }; void* handle1 = (void*)0x4242; void* handle2 = (void*)0x4243; (void)umockcallpairs_track_create_paired_call(&paired_handles, &handle1, "void*", sizeof(handle2)); reset_all_calls(); when_shall_umocktypes_are_equal_call_fail = 1; umocktypes_are_equal_fail_call_result = 0; // act result = umockcallpairs_track_destroy_paired_call(&paired_handles, &handle2); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup free(paired_handles.paired_handles[0].handle_type); free(paired_handles.paired_handles[0].handle_value); free(paired_handles.paired_handles); } END_TEST_SUITE(umockcallpairs_unittests) umockcallrecorder_ut/000077500000000000000000000000001362133436400402255ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006601362133436400427670ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallrecorder_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umockcallrecorder_ut) set(${theseTestsName}_test_files umockcallrecorder_ut.c ) set(${theseTestsName}_c_files umockcallrecorder_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005121362133436400413130ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallrecorder_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umockcallrecorder_unittests, failedTestCount); return failedTestCount; } umockcallrecorder_mocked.c000066400000000000000000000010161362133436400454110ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallrecorder_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umockcallrecorder.c" umockcallrecorder_ut.c000066400000000000000000002176121362133436400446120ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockcallrecorder_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockcallrecorder.h" #include "umockcall.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } static UMOCKCALL_HANDLE test_expected_umockcall_1 = (UMOCKCALL_HANDLE)0x4242; static UMOCKCALL_HANDLE test_expected_umockcall_2 = (UMOCKCALL_HANDLE)0x4243; static UMOCKCALL_HANDLE test_actual_umockcall_1 = (UMOCKCALL_HANDLE)0x4244; static UMOCKCALL_HANDLE test_actual_umockcall_2 = (UMOCKCALL_HANDLE)0x4245; typedef struct umockcall_get_ignore_all_calls_CALL_TAG { UMOCKCALL_HANDLE call; } umockcall_get_ignore_all_calls_CALL; static umockcall_get_ignore_all_calls_CALL* umockcall_get_ignore_all_calls_calls; static size_t umockcall_get_ignore_all_calls_call_count; static int umockcall_get_ignore_all_calls_call_result; typedef struct umockcall_are_equal_CALL_TAG { UMOCKCALL_HANDLE left; UMOCKCALL_HANDLE right; } umockcall_are_equal_CALL; static umockcall_are_equal_CALL* umockcall_are_equal_calls; static size_t umockcall_are_equal_call_count; static int umockcall_are_equal_call_result; typedef struct umockcall_clone_CALL_TAG { UMOCKCALL_HANDLE umockcall; } umockcall_clone_CALL; static umockcall_clone_CALL* umockcall_clone_calls; static size_t umockcall_clone_call_count; static size_t when_shall_umockcall_clone_fail; static UMOCKCALL_HANDLE umockcall_clone_call_result; typedef struct umockcall_set_fail_call_CALL_TAG { UMOCKCALL_HANDLE umockcall; int fail_call; } umockcall_set_fail_call_CALL; static umockcall_set_fail_call_CALL* umockcall_set_fail_call_calls; static size_t umockcall_set_fail_call_call_count; static int umockcall_set_fail_call_call_result; typedef struct umockcall_get_fail_call_CALL_TAG { UMOCKCALL_HANDLE umockcall; } umockcall_get_fail_call_CALL; static umockcall_get_fail_call_CALL* umockcall_get_fail_call_calls; static size_t umockcall_get_fail_call_call_count; static int umockcall_get_fail_call_call_result; typedef struct umockcall_destroy_CALL_TAG { UMOCKCALL_HANDLE umockcall; } umockcall_destroy_CALL; static umockcall_destroy_CALL* umockcall_destroy_calls; static size_t umockcall_destroy_call_count; static int umockcall_destroy_call_result; typedef struct umockcall_stringify_CALL_TAG { UMOCKCALL_HANDLE umockcall; } umockcall_stringify_CALL; static umockcall_stringify_CALL* umockcall_stringify_calls; static size_t umockcall_stringify_call_count; static char* umockcall_stringify_call_result; int umockcall_get_ignore_all_calls(UMOCKCALL_HANDLE call) { umockcall_get_ignore_all_calls_CALL* new_calls = (umockcall_get_ignore_all_calls_CALL*)realloc(umockcall_get_ignore_all_calls_calls, sizeof(umockcall_get_ignore_all_calls_CALL) * (umockcall_get_ignore_all_calls_call_count + 1)); if (new_calls != NULL) { umockcall_get_ignore_all_calls_calls = new_calls; umockcall_get_ignore_all_calls_calls[umockcall_get_ignore_all_calls_call_count].call = call; umockcall_get_ignore_all_calls_call_count++; } return umockcall_get_ignore_all_calls_call_result; } int umockcall_are_equal(UMOCKCALL_HANDLE left, UMOCKCALL_HANDLE right) { umockcall_are_equal_CALL* new_calls = (umockcall_are_equal_CALL*)realloc(umockcall_are_equal_calls, sizeof(umockcall_are_equal_CALL) * (umockcall_are_equal_call_count + 1)); if (new_calls != NULL) { umockcall_are_equal_calls = new_calls; umockcall_are_equal_calls[umockcall_are_equal_call_count].left = left; umockcall_are_equal_calls[umockcall_are_equal_call_count].right = right; umockcall_are_equal_call_count++; } return umockcall_are_equal_call_result; } void umockcall_destroy(UMOCKCALL_HANDLE umockcall) { umockcall_destroy_CALL* new_calls = (umockcall_destroy_CALL*)realloc(umockcall_destroy_calls, sizeof(umockcall_destroy_CALL) * (umockcall_destroy_call_count + 1)); if (new_calls != NULL) { umockcall_destroy_calls = new_calls; umockcall_destroy_calls[umockcall_destroy_call_count].umockcall = umockcall; umockcall_destroy_call_count++; } } UMOCKCALL_HANDLE umockcall_clone(UMOCKCALL_HANDLE umockcall) { UMOCKCALL_HANDLE result; umockcall_clone_CALL* new_calls = (umockcall_clone_CALL*)realloc(umockcall_clone_calls, sizeof(umockcall_clone_CALL) * (umockcall_clone_call_count + 1)); if (new_calls != NULL) { umockcall_clone_calls = new_calls; umockcall_clone_calls[umockcall_clone_call_count].umockcall = umockcall; umockcall_clone_call_count++; } if ((when_shall_umockcall_clone_fail > 0) && (when_shall_umockcall_clone_fail == umockcall_clone_call_count)) { result = NULL; } else { result = umockcall_clone_call_result; } return result; } int umockcall_set_fail_call(UMOCKCALL_HANDLE umockcall, int fail_call) { umockcall_set_fail_call_CALL* new_calls = (umockcall_set_fail_call_CALL*)realloc(umockcall_set_fail_call_calls, sizeof(umockcall_set_fail_call_CALL) * (umockcall_set_fail_call_call_count + 1)); if (new_calls != NULL) { umockcall_set_fail_call_calls = new_calls; umockcall_set_fail_call_calls[umockcall_set_fail_call_call_count].umockcall = umockcall; umockcall_set_fail_call_calls[umockcall_set_fail_call_call_count].fail_call = fail_call; umockcall_set_fail_call_call_count++; } return umockcall_set_fail_call_call_result; } int umockcall_get_fail_call(UMOCKCALL_HANDLE umockcall) { umockcall_get_fail_call_CALL* new_calls = (umockcall_get_fail_call_CALL*)realloc(umockcall_get_fail_call_calls, sizeof(umockcall_get_fail_call_CALL) * (umockcall_get_fail_call_call_count + 1)); if (new_calls != NULL) { umockcall_get_fail_call_calls = new_calls; umockcall_get_fail_call_calls[umockcall_get_fail_call_call_count].umockcall = umockcall; umockcall_get_fail_call_call_count++; } return umockcall_get_fail_call_call_result; } char* umockcall_stringify(UMOCKCALL_HANDLE umockcall) { char* result; umockcall_stringify_CALL* new_calls = (umockcall_stringify_CALL*)realloc(umockcall_stringify_calls, sizeof(umockcall_stringify_CALL) * (umockcall_stringify_call_count + 1)); if (new_calls != NULL) { umockcall_stringify_calls = new_calls; umockcall_stringify_calls[umockcall_stringify_call_count].umockcall = umockcall; umockcall_stringify_call_count++; } if (umockcall_stringify_call_result == NULL) { result = NULL; } else { result = (char*)malloc(strlen(umockcall_stringify_call_result) + 1); if (result != NULL) { (void)strcpy(result, umockcall_stringify_call_result); } } return result; } void reset_umockcall_get_ignore_all_calls_calls(void) { if (umockcall_get_ignore_all_calls_calls != NULL) { free(umockcall_get_ignore_all_calls_calls); umockcall_get_ignore_all_calls_calls = NULL; } umockcall_get_ignore_all_calls_call_count = 0; } void reset_umockcall_are_equal_calls(void) { if (umockcall_are_equal_calls != NULL) { free(umockcall_are_equal_calls); umockcall_are_equal_calls = NULL; } umockcall_are_equal_call_count = 0; } void reset_umockcall_destroy_calls(void) { if (umockcall_destroy_calls != NULL) { free(umockcall_destroy_calls); umockcall_destroy_calls = NULL; } umockcall_destroy_call_count = 0; } void reset_umockcall_stringify_calls(void) { if (umockcall_stringify_calls != NULL) { free(umockcall_stringify_calls); umockcall_stringify_calls = NULL; } umockcall_stringify_call_count = 0; } void reset_umockcall_clone_calls(void) { if (umockcall_clone_calls != NULL) { free(umockcall_clone_calls); umockcall_clone_calls = NULL; } when_shall_umockcall_clone_fail = 0; umockcall_clone_call_count = 0; } void reset_umockcall_set_fail_call_calls(void) { if (umockcall_set_fail_call_calls != NULL) { free(umockcall_set_fail_call_calls); umockcall_set_fail_call_calls = NULL; } umockcall_set_fail_call_call_result = 0; umockcall_set_fail_call_call_count = 0; } static size_t malloc_call_count; static size_t realloc_call_count; static size_t free_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free_call_count++; free(ptr); } #ifdef __cplusplus } #endif void reset_malloc_calls(void) { malloc_call_count = 0; when_shall_malloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; free_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umockcallrecorder_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); umockcall_are_equal_call_result = 1; umockcall_get_ignore_all_calls_call_result = 0; reset_umockcall_get_ignore_all_calls_calls(); reset_umockcall_are_equal_calls(); reset_umockcall_destroy_calls(); reset_umockcall_stringify_calls(); reset_umockcall_clone_calls(); reset_umockcall_set_fail_call_calls(); reset_malloc_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex); } /* umockcallrecorder_create */ /* Tests_SRS_UMOCKCALLRECORDER_01_001: [ umockcallrecorder_create shall create a new instance of a call recorder and return a non-NULL handle to it on success. ]*/ TEST_FUNCTION(umockcallrecorder_create_succeeds) { // arrange // act UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // assert ASSERT_IS_NOT_NULL(call_recorder); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_002: [ If allocating memory for the call recorder fails, umockcallrecorder_create shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_then_umockcallrecorder_create_fails) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder; when_shall_malloc_fail = 1; // act call_recorder = umockcallrecorder_create(); // assert ASSERT_IS_NULL(call_recorder); } /* umockcallrecorder_destroy */ /* Tests_SRS_UMOCKCALLRECORDER_01_003: [ umockcallrecorder_destroy shall free the resources associated with a the call recorder identified by the umock_call_recorder argument. ]*/ TEST_FUNCTION(umockcallrecorder_destroy_frees_the_call_recorder_resources) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act umockcallrecorder_destroy(call_recorder); // assert ASSERT_IS_NOT_NULL(call_recorder); ASSERT_ARE_EQUAL(size_t, 3, free_call_count); } /* Tests_SRS_UMOCKCALLRECORDER_01_004: [ If umock_call_recorder is NULL, umockcallrecorder_destroy shall do nothing. ]*/ TEST_FUNCTION(umockcallrecorder_destroy_with_NULL_does_nothing) { // arrange // act umockcallrecorder_destroy(NULL); // assert ASSERT_ARE_EQUAL(size_t, 0, free_call_count); } /* Tests_SRS_UMOCKCALLRECORDER_01_003: [ umockcallrecorder_destroy shall free the resources associated with a the call recorder identified by the umock_call_recorder argument. ]*/ TEST_FUNCTION(umockcallrecorder_destroy_with_one_expected_call_frees_the_call_recorder_resources) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_are_equal_call_result = 0; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // act umockcallrecorder_destroy(call_recorder); // assert ASSERT_IS_NOT_NULL(call_recorder); /* 5 = 1 for actual calls, 1 for expected calls, 2 for the strings and one for the call recorder structure */ ASSERT_ARE_EQUAL(size_t, 5, free_call_count); ASSERT_ARE_EQUAL(size_t, 3, umockcall_destroy_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)test_expected_umockcall_1, umockcall_destroy_calls[0].umockcall); ASSERT_ARE_EQUAL(void_ptr, (void*)test_expected_umockcall_2, umockcall_destroy_calls[1].umockcall); ASSERT_ARE_EQUAL(void_ptr, (void*)test_actual_umockcall_1, umockcall_destroy_calls[2].umockcall); } /* umockcallrecorder_reset_all_calls */ /* Tests_SRS_UMOCKCALLRECORDER_01_005: [ umockcallrecorder_reset_all_calls shall free all the expected and actual calls for the call recorder identified by umock_call_recorder. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_006: [ On success umockcallrecorder_reset_all_calls shall return 0. ]*/ TEST_FUNCTION(umockcallrecorder_reset_all_calls_frees_all_existing_expected_and_actual_calls) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_are_equal_call_result = 0; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // act result = umockcallrecorder_reset_all_calls(call_recorder); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, free_call_count); ASSERT_ARE_EQUAL(size_t, 3, umockcall_destroy_call_count); ASSERT_ARE_EQUAL(void_ptr, (void*)test_expected_umockcall_1, umockcall_destroy_calls[0].umockcall); ASSERT_ARE_EQUAL(void_ptr, (void*)test_expected_umockcall_2, umockcall_destroy_calls[1].umockcall); ASSERT_ARE_EQUAL(void_ptr, (void*)test_actual_umockcall_1, umockcall_destroy_calls[2].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_007: [ If umock_call_recorder is NULL, umockcallrecorder_reset_all_calls shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_reset_all_calls_with_NULL_call_recorder_fails) { // arrange // act int result = umockcallrecorder_reset_all_calls(NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, free_call_count); ASSERT_ARE_EQUAL(size_t, 0, umockcall_destroy_call_count); } /* umockcallrecorder_add_expected_call */ /* Tests_SRS_UMOCKCALLRECORDER_01_008: [ umockcallrecorder_add_expected_call shall add the mock_call call to the expected call list maintained by the call recorder identified by umock_call_recorder. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_009: [ On success umockcallrecorder_add_expected_call shall return 0. ]*/ TEST_FUNCTION(umockcallrecorder_add_expected_call_adds_an_expected_call) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act int result = umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_012: [ If any of the arguments is NULL, umockcallrecorder_add_expected_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_add_expected_call_with_NULL_call_recorder_fails) { // arrange // act int result = umockcallrecorder_add_expected_call(NULL, test_expected_umockcall_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKCALLRECORDER_01_012: [ If any of the arguments is NULL, umockcallrecorder_add_expected_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_add_expected_call_with_NULL_mock_call_fails) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act int result = umockcallrecorder_add_expected_call(call_recorder, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_013: [ If allocating memory for the expected calls fails, umockcallrecorder_add_expected_call shall fail and return a non-zero value. ] */ TEST_FUNCTION(when_allocating_memory_fails_umockcallrecorder_add_expected_call_fails) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); reset_malloc_calls(); when_shall_realloc_fail = 1; // act result = umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* umockcallrecorder_add_actual_call */ /* Tests_SRS_UMOCKCALLRECORDER_01_014: [ umockcallrecorder_add_actual_call shall check whether the call mock_call matches any of the expected calls maintained by umock_call_recorder. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_018: [ When no error is encountered, umockcallrecorder_add_actual_call shall return 0. ]*/ TEST_FUNCTION(umockcallrecorder_add_actual_call_without_any_expected_calls_succeeds) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; // act int result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_IS_NULL(matched_call); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_014: [ umockcallrecorder_add_actual_call shall check whether the call mock_call matches any of the expected calls maintained by umock_call_recorder. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_018: [ When no error is encountered, umockcallrecorder_add_actual_call shall return 0. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_017: [ Comparing the calls shall be done by calling umockcall_are_equal. ]*/ TEST_FUNCTION(umockcallrecorder_add_actual_call_with_a_call_that_does_not_match_succeeds) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); umockcall_are_equal_call_result = 0; // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_actual_umockcall_1, umockcall_are_equal_calls[0].right); ASSERT_ARE_EQUAL(size_t, 0, free_call_count); ASSERT_IS_NULL(matched_call); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_019: [ If any of the arguments is NULL, umockcallrecorder_add_actual_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_add_actual_call_with_NULL_call_recorder_fails) { // arrange UMOCKCALL_HANDLE matched_call; // act int result = umockcallrecorder_add_actual_call(NULL, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKCALLRECORDER_01_019: [ If any of the arguments is NULL, umockcallrecorder_add_actual_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_add_actual_call_with_NULL_actual_call_fails) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; // act int result = umockcallrecorder_add_actual_call(call_recorder, NULL, &matched_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_019: [ If any of the arguments is NULL, umockcallrecorder_add_actual_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_add_actual_call_with_NULL_matched_call_fails) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act int result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_020: [ If allocating memory for the actual calls fails, umockcallrecorder_add_actual_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_actual_calls_fails_umockcallrecorder_add_actual_call_fails) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; reset_malloc_calls(); when_shall_realloc_fail = 1; // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_021: [ If umockcall_are_equal fails, umockcallrecorder_add_actual_call shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_umockcall_are_equal_fails_then_umockcallrecorder_add_actual_call_fails) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); umockcall_are_equal_call_result = -1; // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_actual_umockcall_1, umockcall_are_equal_calls[0].right); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_016: [ If the call matches one of the expected calls, a handle to the matched call shall be filled into the matched_call argument. ]*/ TEST_FUNCTION(when_the_actual_call_matches_the_expected_call_then_the_matched_call_is_returned) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); umockcall_are_equal_call_result = 1; // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_actual_umockcall_1, umockcall_are_equal_calls[0].right); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, matched_call); ASSERT_ARE_EQUAL(size_t, 1, umockcall_destroy_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_016: [ If the call matches one of the expected calls, a handle to the matched call shall be filled into the matched_call argument. ]*/ TEST_FUNCTION(when_the_actual_call_matches_the_1st_of_2_expected_call_then_the_matched_call_is_returned) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); umockcall_are_equal_call_result = 1; // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_are_equal_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_actual_umockcall_1, umockcall_are_equal_calls[0].right); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, matched_call); ASSERT_ARE_EQUAL(size_t, 1, umockcall_destroy_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_016: [ If the call matches one of the expected calls, a handle to the matched call shall be filled into the matched_call argument. ]*/ TEST_FUNCTION(when_the_actual_call_matches_the_2nd_of_2_expected_call_then_the_matched_call_is_returned) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); umockcall_are_equal_call_result = 1; umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_umockcall_are_equal_calls(); reset_umockcall_destroy_calls(); umockcall_are_equal_call_result = 1; // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_2, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL_WITH_MSG(size_t, 1, umockcall_are_equal_call_count, "Incorrect umock_are_equal call count"); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, umockcall_are_equal_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_actual_umockcall_2, umockcall_are_equal_calls[0].right); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, matched_call); ASSERT_ARE_EQUAL(size_t, 1, umockcall_destroy_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_014: [ umockcallrecorder_add_actual_call shall check whether the call mock_call matches any of the expected calls maintained by umock_call_recorder. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_018: [ When no error is encountered, umockcallrecorder_add_actual_call shall return 0. ]*/ TEST_FUNCTION(two_actual_calls_can_be_added) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_2, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_014: [ umockcallrecorder_add_actual_call shall check whether the call mock_call matches any of the expected calls maintained by umock_call_recorder. ]*/ TEST_FUNCTION(only_the_first_expected_call_is_checked_for_match) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_are_equal_call_result = 0; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); // act result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_IS_NULL(matched_call); ASSERT_ARE_EQUAL(size_t, 1, umockcall_are_equal_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_014: [ umockcallrecorder_add_actual_call shall check whether the call mock_call matches any of the expected calls maintained by umock_call_recorder. ]*/ TEST_FUNCTION(if_matching_fails_subsequent_actual_calls_are_not_matched) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 0; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); umockcall_are_equal_call_result = 1; (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_2, &matched_call); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()][a()]", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_057: [ If any expected call has `ignore_all_calls` set and the actual call is equal to it when comparing the 2 calls, then the call shall be considered matched and not added to the actual calls list. ]*/ TEST_FUNCTION(if_expected_call_has_ignore_all_calls_the_actual_call_is_not_recorded) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 1; umockcall_get_ignore_all_calls_call_result = 1; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_057: [ If any expected call has `ignore_all_calls` set and the actual call is equal to it when comparing the 2 calls, then the call shall be considered matched and not added to the actual calls list. ]*/ TEST_FUNCTION(if_expected_call_has_ignore_all_calls_2_actual_calls_are_not_recorded) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 1; umockcall_get_ignore_all_calls_call_result = 1; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_058: [ If getting `ignore_all_calls` by calling `umockcall_get_ignore_all_calls` fails, `umockcallrecorder_add_actual_call` shall fail and return a non-zero value. ]*/ TEST_FUNCTION(if_expected_call_has_ignore_all_calls_and_umockcall_get_ignore_all_calls_fails_then_umockcallrecorder_get_actual_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; int add_call_result; umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 1; umockcall_get_ignore_all_calls_call_result = -1; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); add_call_result = umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_NOT_EQUAL(int, 0, add_call_result); ASSERT_ARE_EQUAL(char_ptr, "", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* umockcallrecorder_get_actual_calls */ /* Tests_SRS_UMOCKCALLRECORDER_01_022: [ umockcallrecorder_get_actual_calls shall return a pointer to the string representation of all the actual calls. ]*/ TEST_FUNCTION(umockcallrecorder_get_actual_calls_with_no_calls_returns_an_empty_string) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act const char* result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_022: [ umockcallrecorder_get_actual_calls shall return a pointer to the string representation of all the actual calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_023: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ TEST_FUNCTION(umockcallrecorder_get_actual_calls_with_1_call_returns_one_stringified_call) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()]", result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_022: [ umockcallrecorder_get_actual_calls shall return a pointer to the string representation of all the actual calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_023: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ TEST_FUNCTION(umockcallrecorder_get_actual_calls_with_2_calls_returns_the_stringified_calls) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()][a()]", result); ASSERT_ARE_EQUAL(size_t, 2, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_025: [ If umockcall_stringify fails, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ TEST_FUNCTION(when_stringifying_one_call_fails_then_umockcallrecorder_get_actual_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = NULL; (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_IS_NULL(result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_024: [ If the umock_call_recorder is NULL, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ TEST_FUNCTION(umockcallrecorder_get_actual_calls_with_NULL_call_recorder_fails) { // arrange // act const char* result = umockcallrecorder_get_actual_calls(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_026: [ If allocating memory for the resulting string fails, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_resulting_string_for_no_calls_fails_then_umockcallrecorder_get_actual_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); reset_malloc_calls(); when_shall_realloc_fail = 1; // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_026: [ If allocating memory for the resulting string fails, umockcallrecorder_get_actual_calls shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_resulting_string_fails_then_umockcallrecorder_get_actual_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); when_shall_realloc_fail = 1; // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_022: [ umockcallrecorder_get_actual_calls shall return a pointer to the string representation of all the actual calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_023: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ TEST_FUNCTION(umockcallrecorder_get_actual_calls_when_the_actual_call_does_not_match_the_expected_should_return_the_actual_call) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 0; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); // act result = umockcallrecorder_get_actual_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()]", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* umockcallrecorder_get_expected_calls */ /* Tests_SRS_UMOCKCALLRECORDER_01_027: [ umockcallrecorder_get_expected_calls shall return a pointer to the string representation of all the expected calls. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_calls_with_no_calls_returns_an_empty_string) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act const char* result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_027: [ umockcallrecorder_get_expected_calls shall return a pointer to the string representation of all the expected calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_028: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_calls_with_1_call_returns_one_stringified_call) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); umockcall_stringify_call_result = "[a()]"; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_malloc_calls(); // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()]", result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_027: [ umockcallrecorder_get_expected_calls shall return a pointer to the string representation of all the expected calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_028: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_calls_with_2_calls_returns_the_stringified_calls) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); umockcall_stringify_call_result = "[a()]"; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_malloc_calls(); // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()][a()]", result); ASSERT_ARE_EQUAL(size_t, 2, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_030: [ If umockcall_stringify fails, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ TEST_FUNCTION(when_stringifying_one_call_fails_then_umockcallrecorder_get_expected_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); umockcall_stringify_call_result = NULL; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_IS_NULL(result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_029: [ If the umock_call_recorder is NULL, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_calls_with_NULL_call_recorder_fails) { // arrange // act const char* result = umockcallrecorder_get_expected_calls(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_031: [ If allocating memory for the resulting string fails, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_resulting_string__for_no_calls_fails_then_umockcallrecorder_get_expected_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); reset_malloc_calls(); when_shall_realloc_fail = 1; // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_031: [ If allocating memory for the resulting string fails, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_the_resulting_string_fails_then_umockcallrecorder_get_expected_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); umockcall_stringify_call_result = "[a()]"; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_malloc_calls(); when_shall_realloc_fail = 1; // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, realloc_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_031: [ If allocating memory for the resulting string fails, umockcallrecorder_get_expected_calls shall fail and return NULL. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_calls_with_a_matched_expected_call_yields_no_calls_in_the_string) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_are_equal_call_result = 1; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_027: [ umockcallrecorder_get_expected_calls shall return a pointer to the string representation of all the expected calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_028: [ The string for each call shall be obtained by calling umockcall_stringify. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_calls_when_the_actual_call_does_not_match_the_expected_should_return_the_expected_call) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 0; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_actual_call(call_recorder, test_actual_umockcall_1, &matched_call); reset_malloc_calls(); // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "[a()]", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_054: [ Calls that have the `ignore_all_calls` property set shall not be reported in the expected call list. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_055: [ Getting the `ignore_all_calls` property shall be done by calling `umockcall_get_ignore_all_calls`. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_calls_with_1_expectd_call_with_ignore_all_calls_set_returns_an_empty_string) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 0; umockcall_get_ignore_all_calls_call_result = 1; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_malloc_calls(); // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_ARE_EQUAL(char_ptr, "", result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_056: [ If `umockcall_get_ignore_all_calls` returns a negative value then `umockcallrecorder_get_expected_calls` shall fail and return NULL. ]*/ TEST_FUNCTION(when_getting_the_ignore_all_cals_fails_umockcallrecorder_get_expected_calls_fails) { // arrange const char* result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); umockcall_stringify_call_result = "[a()]"; umockcall_are_equal_call_result = 0; umockcall_get_ignore_all_calls_call_result = -1; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_malloc_calls(); // act result = umockcallrecorder_get_expected_calls(call_recorder); // assert ASSERT_IS_NULL(result); // cleanup umockcallrecorder_destroy(call_recorder); } /* umockcallrecorder_get_last_expected_call */ /* Tests_SRS_UMOCKCALLRECORDER_01_034: [ If no expected call has been recorded for umock_call_recorder then umockcallrecorder_get_last_expected_call shall fail and return NULL. ]*/ TEST_FUNCTION(umockcallrecorder_get_last_expected_call_without_any_expected_calls_returns_NULL) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act UMOCKCALL_HANDLE result = umockcallrecorder_get_last_expected_call(call_recorder); // assert ASSERT_IS_NULL(result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_033: [ If umock_call_recorder is NULL, umockcallrecorder_get_last_expected_call shall fail and return NULL. ]*/ TEST_FUNCTION(umockcallrecorder_get_last_expected_call_with_NULL_call_recorder_fails) { // arrange // act UMOCKCALL_HANDLE result = umockcallrecorder_get_last_expected_call(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_032: [ umockcallrecorder_get_last_expected_call shall return the last expected call for the umock_call_recorder call recorder. ]*/ TEST_FUNCTION(umockcallrecorder_get_last_expected_call_with_1_expected_call_returns_the_last_expected_call) { // arrange UMOCKCALL_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); // act result = umockcallrecorder_get_last_expected_call(call_recorder); // assert ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_032: [ umockcallrecorder_get_last_expected_call shall return the last expected call for the umock_call_recorder call recorder. ]*/ TEST_FUNCTION(umockcallrecorder_get_last_expected_call_with_2_expected_calls_returns_the_last_expected_call) { // arrange UMOCKCALL_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); // act result = umockcallrecorder_get_last_expected_call(call_recorder); // assert ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* umockcallrecorder_clone */ /* Tests_SRS_UMOCKCALLRECORDER_01_035: [ umockcallrecorder_clone shall clone a call recorder and return a handle to the newly cloned call recorder. ]*/ TEST_FUNCTION(umockcallrecorder_clone_on_a_recorder_with_no_calls_succeeds) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act UMOCKCALLRECORDER_HANDLE result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NOT_NULL(result); // cleanup umockcallrecorder_destroy(call_recorder); umockcallrecorder_destroy(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_036: [ If the umock_call_recorder argument is NULL, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(umockcallrecorder_clone_with_NULL_returns_NULL) { // arrange // act UMOCKCALLRECORDER_HANDLE result = umockcallrecorder_clone(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_037: [ If allocating memory for the new umock call recorder instance fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_call_recorder_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); reset_malloc_calls(); when_shall_malloc_fail = 1; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_038: [ umockcallrecorder_clone shall clone all the expected calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_039: [ Each expected call shall be cloned by calling umockcall_clone. ]*/ TEST_FUNCTION(umockcallrecorder_clone_with_one_expected_call_clones_the_expected_call) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_umockcall_clone_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); umockcallrecorder_destroy(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_038: [ umockcallrecorder_clone shall clone all the expected calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_039: [ Each expected call shall be cloned by calling umockcall_clone. ]*/ TEST_FUNCTION(umockcallrecorder_clone_with_2_expected_calls_clones_the_expected_call) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); reset_umockcall_clone_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 2, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, umockcall_clone_calls[1].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); umockcallrecorder_destroy(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_040: [ If cloning an expected call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_cloning_the_expected_call_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_umockcall_clone_calls(); umockcall_clone_call_result = NULL; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_040: [ If cloning an expected call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_cloning_the_1st_out_of_2_expected_calls_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_umockcall_clone_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; when_shall_umockcall_clone_fail = 1; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); ASSERT_ARE_EQUAL(size_t, 0, umockcall_destroy_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_040: [ If cloning an expected call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_cloning_the_2nd_out_of_2_expected_calls_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); reset_umockcall_clone_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; when_shall_umockcall_clone_fail = 2; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 2, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, umockcall_clone_calls[1].umockcall); ASSERT_ARE_EQUAL(size_t, 1, umockcall_destroy_call_count); ASSERT_ARE_EQUAL(void_ptr, (UMOCKCALL_HANDLE)0x4245, umockcall_destroy_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_052: [ If allocating memory for the expected calls fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_expected_calls_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); reset_umockcall_clone_calls(); reset_malloc_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; when_shall_malloc_fail = 2; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umockcall_clone_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_041: [ umockcallrecorder_clone shall clone all the actual calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_042: [ Each actual call shall be cloned by calling umockcall_clone. ]*/ TEST_FUNCTION(umockcallrecorder_clone_with_one_actual_call_succeeds) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_1, &matched_call); reset_umockcall_clone_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); umockcallrecorder_destroy(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_041: [ umockcallrecorder_clone shall clone all the actual calls. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_042: [ Each actual call shall be cloned by calling umockcall_clone. ]*/ TEST_FUNCTION(umockcallrecorder_clone_with_2_actual_calls_succeeds) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_1, &matched_call); (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_2, &matched_call); reset_umockcall_clone_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NOT_NULL(result); ASSERT_ARE_EQUAL(size_t, 2, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, umockcall_clone_calls[1].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); umockcallrecorder_destroy(result); } /* Tests_SRS_UMOCKCALLRECORDER_01_043: [ If cloning an actual call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_cloning_actual_call_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_1, &matched_call); reset_umockcall_clone_calls(); umockcall_clone_call_result = NULL; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_043: [ If cloning an actual call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_cloning_the_1st_of_2_actual_calls_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_1, &matched_call); (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_2, &matched_call); reset_umockcall_clone_calls(); umockcall_clone_call_result = NULL; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_043: [ If cloning an actual call fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_cloning_the_2nd_of_2_actual_calls_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_1, &matched_call); (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_2, &matched_call); reset_umockcall_clone_calls(); when_shall_umockcall_clone_fail = 2; umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 2, umockcall_clone_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_clone_calls[0].umockcall); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, umockcall_clone_calls[1].umockcall); ASSERT_ARE_EQUAL(size_t, 1, umockcall_destroy_call_count); ASSERT_ARE_EQUAL(void_ptr, (UMOCKCALL_HANDLE)0x4245, umockcall_destroy_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_053: [ If allocating memory for the actual calls fails, umockcallrecorder_clone shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_for_actual_calls_fails_umockcallrecorder_clone_fails) { // arrange UMOCKCALLRECORDER_HANDLE result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); UMOCKCALL_HANDLE matched_call; (void)umockcallrecorder_add_actual_call(call_recorder, test_expected_umockcall_1, &matched_call); reset_umockcall_clone_calls(); reset_malloc_calls(); umockcall_clone_call_result = (UMOCKCALL_HANDLE)0x4245; when_shall_malloc_fail = 2; // act result = umockcallrecorder_clone(call_recorder); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, umockcall_clone_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* umockcallrecorder_get_expected_call_count */ /* Tests_SRS_UMOCKCALLRECORDER_01_044: [ umockcallrecorder_get_expected_call_count shall return in the expected_call_count argument the number of expected calls associated with the call recorder. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_045: [ On success umockcallrecorder_get_expected_call_count shall return 0. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_call_count_when_no_expected_calls_are_there_yields_0) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); size_t expected_call_count; // act result = umockcallrecorder_get_expected_call_count(call_recorder, &expected_call_count); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, expected_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_044: [ umockcallrecorder_get_expected_call_count shall return in the expected_call_count argument the number of expected calls associated with the call recorder. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_045: [ On success umockcallrecorder_get_expected_call_count shall return 0. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_call_count_when_2_expected_calls_are_there_yields_2) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); size_t expected_call_count; (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); // act result = umockcallrecorder_get_expected_call_count(call_recorder, &expected_call_count); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, expected_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_046: [ If any of the arguments is NULL, umockcallrecorder_get_expected_call_count shall return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_call_with_NULL_call_recorder_fails) { // arrange size_t expected_call_count; // act int result = umockcallrecorder_get_expected_call_count(NULL, &expected_call_count); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKCALLRECORDER_01_046: [ If any of the arguments is NULL, umockcallrecorder_get_expected_call_count shall return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_get_expected_call_with_NULL_expected_call_count_fails) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act int result = umockcallrecorder_get_expected_call_count(call_recorder, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); // cleanup umockcallrecorder_destroy(call_recorder); } /* umockcallrecorder_fail_call */ /* Tests_SRS_UMOCKCALLRECORDER_01_047: [ umockcallrecorder_fail_call shall mark an expected call as to be failed by calling umockcall_set_fail_call with a 1 value for fail_call. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_048: [ On success, umockcallrecorder_fail_call shall return 0. ]*/ TEST_FUNCTION(umockcallrecorder_fail_call_sets_fail_call_to_1_for_the_first_call) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); // act result = umockcallrecorder_fail_call(call_recorder, 0); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_set_fail_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_set_fail_call_calls[0].umockcall); ASSERT_ARE_EQUAL(int, 1, umockcall_set_fail_call_calls[0].fail_call); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_047: [ umockcallrecorder_fail_call shall mark an expected call as to be failed by calling umockcall_set_fail_call with a 1 value for fail_call. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_048: [ On success, umockcallrecorder_fail_call shall return 0. ]*/ TEST_FUNCTION(umockcallrecorder_fail_call_sets_fail_call_to_1_for_the_second_call) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); // act result = umockcallrecorder_fail_call(call_recorder, 1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_set_fail_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, umockcall_set_fail_call_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_047: [ umockcallrecorder_fail_call shall mark an expected call as to be failed by calling umockcall_set_fail_call with a 1 value for fail_call. ]*/ /* Tests_SRS_UMOCKCALLRECORDER_01_048: [ On success, umockcallrecorder_fail_call shall return 0. ]*/ TEST_FUNCTION(two_umockcallrecorder_fail_call_calls_succeed) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_2); umockcallrecorder_fail_call(call_recorder, 0); // act result = umockcallrecorder_fail_call(call_recorder, 1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, umockcall_set_fail_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_set_fail_call_calls[0].umockcall); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_2, umockcall_set_fail_call_calls[1].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_049: [ If umock_call_recorder is NULL, umockcallrecorder_fail_call shall return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_fail_call_with_NULL_call_recorder_fails) { // arrange // act int result = umockcallrecorder_fail_call(NULL, 0); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKCALLRECORDER_01_050: [ If index is invalid, umockcallrecorder_fail_call shall return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_fail_call_with_index_too_high_fails) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); // act result = umockcallrecorder_fail_call(call_recorder, 1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcall_set_fail_call_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_050: [ If index is invalid, umockcallrecorder_fail_call shall return a non-zero value. ]*/ TEST_FUNCTION(umockcallrecorder_fail_call_with_0_index_when_no_calls_fails) { // arrange UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); // act int result = umockcallrecorder_fail_call(call_recorder, 0); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umockcall_set_fail_call_call_count); // cleanup umockcallrecorder_destroy(call_recorder); } /* Tests_SRS_UMOCKCALLRECORDER_01_051: [ If umockcall_set_fail_call fails, umockcallrecorder_fail_call shall return a non-zero value. ]*/ TEST_FUNCTION(when_umockcall_set_fail_call_fails_then_umockcallrecorder_fail_call_fails) { // arrange int result; UMOCKCALLRECORDER_HANDLE call_recorder = umockcallrecorder_create(); (void)umockcallrecorder_add_expected_call(call_recorder, test_expected_umockcall_1); umockcall_set_fail_call_call_result = 1; // act result = umockcallrecorder_fail_call(call_recorder, 0); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umockcall_set_fail_call_call_count); ASSERT_ARE_EQUAL(void_ptr, test_expected_umockcall_1, umockcall_set_fail_call_calls[0].umockcall); // cleanup umockcallrecorder_destroy(call_recorder); } END_TEST_SUITE(umockcallrecorder_unittests) umockstring_ut/000077500000000000000000000000001362133436400370725ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006361362133436400416370ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockstring_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umockstring_ut) set(${theseTestsName}_test_files umockstring_ut.c ) set(${theseTestsName}_c_files umockstring_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005041362133436400401610ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockstring_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umockstring_unittests, failedTestCount); return failedTestCount; } umockstring_mocked.c000066400000000000000000000006271362133436400431320ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockstring_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umockstring.c" umockstring_ut.c000066400000000000000000000127131362133436400423170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umockstring_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umockstring.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct test_malloc_CALL_TAG { size_t size; } test_malloc_CALL; static test_malloc_CALL* test_malloc_calls; static size_t test_malloc_call_count; static size_t when_shall_malloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; test_malloc_CALL* new_calls = (test_malloc_CALL*)realloc(test_malloc_calls, sizeof(test_malloc_CALL) * (test_malloc_call_count + 1)); if (new_calls != NULL) { test_malloc_calls = new_calls; test_malloc_calls[test_malloc_call_count].size = size; test_malloc_call_count++; } if (when_shall_malloc_fail == test_malloc_call_count) { result = NULL; } else { result = malloc(size); } return result; } #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umockstring_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); when_shall_malloc_fail = 0; test_malloc_calls = NULL; test_malloc_call_count = 0; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { free(test_malloc_calls); test_malloc_calls = NULL; test_malloc_call_count = 0; TEST_MUTEX_RELEASE(test_mutex); } /* umockstring_clone */ /* Tests_UMOCK_STRING_01_001: [ `umockstring_clone` shall allocate memory for the cloned string (including the NULL terminator). ]*/ /* Tests_UMOCK_STRING_01_002: [ `umockstring_clone` shall copy the string to the newly allocated memory (including the NULL terminator). ]*/ /* Tests_UMOCK_STRING_01_003: [ On success `umockstring_clone` shall return a pointer to the newly allocated memory containing the copy of the string. ]*/ TEST_FUNCTION(umockstring_clone_with_an_empty_string_succeeds) { // arrange char* result; // act result = umockstring_clone(""); // assert ASSERT_ARE_EQUAL(char_ptr, "", result); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_call_count); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_calls[0].size); // cleanup free(result); } /* Tests_UMOCK_STRING_01_001: [ `umockstring_clone` shall allocate memory for the cloned string (including the NULL terminator). ]*/ /* Tests_UMOCK_STRING_01_002: [ `umockstring_clone` shall copy the string to the newly allocated memory (including the NULL terminator). ]*/ /* Tests_UMOCK_STRING_01_003: [ On success `umockstring_clone` shall return a pointer to the newly allocated memory containing the copy of the string. ]*/ TEST_FUNCTION(umockstring_clone_with_a_one_char_string_succeeds) { // arrange char* result; // act result = umockstring_clone("a"); // assert ASSERT_ARE_EQUAL(char_ptr, "a", result); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_call_count); ASSERT_ARE_EQUAL(size_t, 2, test_malloc_calls[0].size); // cleanup free(result); } /* Tests_UMOCK_STRING_01_001: [ `umockstring_clone` shall allocate memory for the cloned string (including the NULL terminator). ]*/ /* Tests_UMOCK_STRING_01_002: [ `umockstring_clone` shall copy the string to the newly allocated memory (including the NULL terminator). ]*/ /* Tests_UMOCK_STRING_01_003: [ On success `umockstring_clone` shall return a pointer to the newly allocated memory containing the copy of the string. ]*/ TEST_FUNCTION(umockstring_clone_with_a_longer_string_succeeds) { // arrange char* result; // act result = umockstring_clone("Management takes the code out of you"); // assert ASSERT_ARE_EQUAL(char_ptr, "Management takes the code out of you", result); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_call_count); ASSERT_ARE_EQUAL(size_t, strlen("Management takes the code out of you") + 1, test_malloc_calls[0].size); // cleanup free(result); } /* Tests_UMOCK_STRING_01_004: [ If allocating the memory fails, `umockstring_clone` shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umockstring_clone_fails) { // arrange char* result; when_shall_malloc_fail = 1; // act result = umockstring_clone("Management takes the code out of you"); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, test_malloc_call_count); ASSERT_ARE_EQUAL(size_t, strlen("Management takes the code out of you") + 1, test_malloc_calls[0].size); } /* Tests_UMOCK_STRING_01_005: [ If `umockstring_clone` is called with a NULL `source`, it shall return NULL. ]*/ TEST_FUNCTION(umockstring_clone_called_with_NULL_fails) { // arrange char* result; // act result = umockstring_clone(NULL); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 0, test_malloc_call_count); } END_TEST_SUITE(umockstring_unittests) umocktypename_ut/000077500000000000000000000000001362133436400374065ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006441362133436400421520ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypename_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypename_ut) set(${theseTestsName}_test_files umocktypename_ut.c ) set(${theseTestsName}_c_files umocktypename_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005061362133436400404770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypename_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umocktypename_unittests, failedTestCount); return failedTestCount; } umocktypename_mocked.c000066400000000000000000000010121362133436400437470ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypename_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umocktypename.c" umocktypename_ut.c000066400000000000000000000156541362133436400431560ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypename_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umocktypename.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } static size_t malloc_call_count; static size_t realloc_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free(ptr); } #ifdef __cplusplus } #endif static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umocktypename_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); malloc_call_count = 0; when_shall_malloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { TEST_MUTEX_RELEASE(test_mutex); } /* umocktypename_normalize */ /* Tests_SRS_UMOCKTYPENAME_01_001: [ umocktypename_normalize shall return a char\* with a newly allocated string that contains the normalized typename. ]*/ TEST_FUNCTION(umocktypename_normalize_returns_the_same_string_when_already_normalized) { // arrange // act char* result = umocktypename_normalize("char"); // assert ASSERT_ARE_EQUAL(char_ptr, "char", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_005: [ If typename is NULL, then umocktypename_normalize shall fail and return NULL. ]*/ TEST_FUNCTION(umocktypename_normalize_with_NULL_returns_NULL) { // arrange // act char* result = umocktypename_normalize(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPENAME_01_004: [ umocktypename_normalize shall remove all extra spaces (more than 1 space) between elements that are part of the typename. ]*/ TEST_FUNCTION(umocktypename_normalize_removes_1_extra_space_between_2_words) { // arrange // act char* result = umocktypename_normalize("const char"); // assert ASSERT_ARE_EQUAL(char_ptr, "const char", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_004: [ umocktypename_normalize shall remove all extra spaces (more than 1 space) between elements that are part of the typename. ]*/ TEST_FUNCTION(umocktypename_normalize_removes_2_extra_spaces_between_2_words) { // arrange // act char* result = umocktypename_normalize("const char"); // assert ASSERT_ARE_EQUAL(char_ptr, "const char", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_006: [ No space shall exist between any other token and a star. ]*/ TEST_FUNCTION(umocktypename_normalize_removes_the_space_before_a_star) { // arrange // act char* result = umocktypename_normalize("char *"); // assert ASSERT_ARE_EQUAL(char_ptr, "char*", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_006: [ No space shall exist between any other token and a star. ]*/ TEST_FUNCTION(umocktypename_normalize_removes_the_space_after_a_star) { // arrange // act char* result = umocktypename_normalize("char* const"); // assert ASSERT_ARE_EQUAL(char_ptr, "char*const", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_002: [** umocktypename_normalize shall remove all spaces at the beginning of the typename. ] ]*/ TEST_FUNCTION(umocktypename_normalize_removes_1_space_at_the_beginning) { // arrange // act char* result = umocktypename_normalize(" char"); // assert ASSERT_ARE_EQUAL(char_ptr, "char", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_002: [** umocktypename_normalize shall remove all spaces at the beginning of the typename. ] ]*/ TEST_FUNCTION(umocktypename_normalize_removes_2_spaces_at_the_beginning) { // arrange // act char* result = umocktypename_normalize(" char"); // assert ASSERT_ARE_EQUAL(char_ptr, "char", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_007: [ If the length of the normalized typename is 0, umocktypename_normalize shall return NULL. ]*/ TEST_FUNCTION(umocktypename_normalize_for_a_zero_length_normalized_typename_returns_NULL) { // arrange // act char* result = umocktypename_normalize(" "); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPENAME_01_003: [ umocktypename_normalize shall remove all spaces at the end of the typename. ] */ TEST_FUNCTION(umocktypename_normalize_removes_1_space_at_the_end) { // arrange // act char* result = umocktypename_normalize("char "); // assert ASSERT_ARE_EQUAL(char_ptr, "char", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_003: [ umocktypename_normalize shall remove all spaces at the end of the typename. ] */ TEST_FUNCTION(umocktypename_normalize_removes_2_spaces_at_the_end) { // arrange // act char* result = umocktypename_normalize("char "); // assert ASSERT_ARE_EQUAL(char_ptr, "char", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_001: [ umocktypename_normalize shall return a char\* with a newly allocated string that contains the normalized typename. ]*/ TEST_FUNCTION(umocktypename_normalize_succeeds_with_a_type_that_ends_in_star) { // arrange // act char* result = umocktypename_normalize("char*"); // assert ASSERT_ARE_EQUAL(char_ptr, "char*", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPENAME_01_008: [ If allocating memory fails, umocktypename_normalize shall fail and return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_Fails_umocktypename_normalize_fails) { // arrange char* result; when_shall_malloc_fail = 1; // act result = umocktypename_normalize("char*"); // assert ASSERT_IS_NULL(result); } END_TEST_SUITE(umocktypename_unittests) umocktypes_bool_ut/000077500000000000000000000000001362133436400377435ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006521362133436400425060ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_bool_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypes_bool_ut) set(${theseTestsName}_test_files umocktypes_bool_ut.c ) set(${theseTestsName}_c_files umocktypes_bool_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005101362133436400410270ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_bool_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umocktypes_bool_unittests, failedTestCount); return failedTestCount; } umocktypes_bool_mocked.c000066400000000000000000000010141362133436400446430ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_bool_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umocktypes_bool.c" umocktypes_bool_ut.c000066400000000000000000000270631362133436400440450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_bool_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #endif #include "testrunnerswitcher.h" #include "umocktypes.h" #include "umocktypes_bool.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct umocktypes_register_type_CALL_TAG { char* type; UMOCKTYPE_STRINGIFY_FUNC stringify_func; UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func; UMOCKTYPE_COPY_FUNC copy_func; UMOCKTYPE_FREE_FUNC free_func; } umocktypes_register_type_CALL; static umocktypes_register_type_CALL* umocktypes_register_type_calls; static size_t umocktypes_register_type_call_count; static size_t when_shall_umocktypes_register_typecall_fail; static int umocktypes_register_type_call_result; static int umocktypes_register_type_fail_call_result; int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func) { int result; umocktypes_register_type_CALL* new_calls = (umocktypes_register_type_CALL*)realloc(umocktypes_register_type_calls, sizeof(umocktypes_register_type_CALL) * (umocktypes_register_type_call_count + 1)); if (new_calls != NULL) { size_t typename_length = strlen(type); umocktypes_register_type_calls = new_calls; umocktypes_register_type_calls[umocktypes_register_type_call_count].type = (char*)malloc(typename_length + 1); (void)memcpy(umocktypes_register_type_calls[umocktypes_register_type_call_count].type, type, typename_length + 1); umocktypes_register_type_calls[umocktypes_register_type_call_count].stringify_func = stringify_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].are_equal_func = are_equal_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].copy_func = copy_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].free_func = free_func; umocktypes_register_type_call_count++; } if (when_shall_umocktypes_register_typecall_fail == umocktypes_register_type_call_count) { result = umocktypes_register_type_fail_call_result; } else { result = umocktypes_register_type_call_result; } return result; } void reset_umocktypes_register_type_calls(void) { if (umocktypes_register_type_calls != NULL) { size_t i; for (i = 0; i < umocktypes_register_type_call_count; i++) { free(umocktypes_register_type_calls[i].type); } free(umocktypes_register_type_calls); umocktypes_register_type_calls = NULL; } umocktypes_register_type_call_count = 0; } static size_t malloc_call_count; static size_t calloc_call_count; static size_t realloc_call_count; static size_t free_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_calloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_calloc(size_t nmemb, size_t size) { void* result; calloc_call_count++; if (calloc_call_count == when_shall_calloc_fail) { result = NULL; } else { result = calloc(nmemb, size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free_call_count++; free(ptr); } #ifdef __cplusplus } #endif void reset_malloc_calls(void) { malloc_call_count = 0; when_shall_malloc_fail = 0; calloc_call_count = 0; when_shall_calloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; free_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umocktypes_bool_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); reset_malloc_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_umocktypes_register_type_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* umocktypes_stringify_bool */ /* Tests_SRS_UMOCKTYPES_BOOL_01_002: [ umocktypes_stringify_bool shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_bool_with_false) { // arrange bool input = false; // act char* result = umocktypes_stringify_bool(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "false", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_BOOL_01_002: [ umocktypes_stringify_bool shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_bool_with_true) { // arrange bool input = true; // act char* result = umocktypes_stringify_bool(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "true", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_BOOL_01_003: [ If value is NULL, umocktypes_stringify_bool shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_bool_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_bool(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_BOOL_01_004: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_bool shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_bool_fails) { // arrange char* result; bool input = false; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_bool(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_bool */ /* Tests_SRS_UMOCKTYPES_BOOL_01_006: [ umocktypes_are_equal_bool shall compare the 2 chars pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_BOOL_01_008: [ If the values pointed to by left and right are equal, umocktypes_are_equal_bool shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_bool_with_2_equal_values_returns_1) { // arrange bool left = false; bool right = false; // act int result = umocktypes_are_equal_bool(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_BOOL_01_009: [ If the values pointed to by left and right are different, umocktypes_are_equal_bool shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_bool_with_2_different_values_returns_0) { // arrange bool left = false; bool right = true; // act int result = umocktypes_are_equal_bool(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_BOOL_01_007: [ If any of the arguments is NULL, umocktypes_are_equal_bool shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_bool_with_NULL_left_fails) { // arrange bool right = true; // act int result = umocktypes_are_equal_bool(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_BOOL_01_007: [ If any of the arguments is NULL, umocktypes_are_equal_bool shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_bool_with_NULL_right_fails) { // arrange bool left = false; // act int result = umocktypes_are_equal_bool(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_bool */ /* Tests_SRS_UMOCKTYPES_BOOL_01_010: [ umocktypes_copy_bool shall copy the bool value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_BOOL_01_011: [ On success umocktypes_copy_bool shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_bool_succeeds) { // arrange bool destination = false; bool source = true; // act int result = umocktypes_copy_bool(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_IS_TRUE(destination); } /* Tests_SRS_UMOCKTYPES_BOOL_01_012: [ If source or destination are NULL, umocktypes_copy_bool shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_bool_with_NULL_destination_fails) { // arrange bool source = false; // act int result = umocktypes_copy_bool(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_BOOL_01_012: [ If source or destination are NULL, umocktypes_copy_bool shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_bool_with_NULL_source_fails) { // arrange bool destination = false; // act int result = umocktypes_copy_bool(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_bool */ /* Tests_SRS_UMOCKTYPES_BOOL_01_013: [ umocktypes_free_bool shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_bool_does_nothing) { // arrange bool value = false; // act umocktypes_free_bool(&value); // assert // no explicit assert } /* umocktypes_bool_register_types */ /* Tests_SRS_UMOCKTYPES_BOOL_01_001: [ umocktypes_bool_register_types shall register support for all the types in the module. ]*/ /* Tests_SRS_UMOCKTYPES_BOOL_01_014: [ On success, umocktypes_bool_register_types shall return 0. ]*/ TEST_FUNCTION(umocktypes_bool_register_types_registers_all_types) { // arrange size_t i; int result; umocktypes_register_type_fail_call_result = 0; // act result = umocktypes_bool_register_types(); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, umocktypes_register_type_call_count); ASSERT_ARE_EQUAL(char_ptr, "bool", umocktypes_register_type_calls[0].type); ASSERT_ARE_EQUAL(char_ptr, "_Bool", umocktypes_register_type_calls[1].type); for (i = 0; i < 2; i++) { ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].stringify_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].are_equal_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].copy_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].free_func); } } /* Tests_SRS_UMOCKTYPES_BOOL_01_015: [ If registering any of the types fails, umocktypes_bool_register_types shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_the_underlying_register_fails_umocktypes_bool_register_types_fails) { size_t i; for (i = 0; i < 2; i++) { // arrange int result; reset_umocktypes_register_type_calls(); umocktypes_register_type_fail_call_result = 1; when_shall_umocktypes_register_typecall_fail = i + 1; // act result = umocktypes_bool_register_types(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, i + 1, umocktypes_register_type_call_count); } } END_TEST_SUITE(umocktypes_bool_unittests) umocktypes_c_fixed_buffer_ut/000077500000000000000000000000001362133436400417425ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000011261362133436400445020ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_c_fixed_buffer_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypes_c_fixed_buffer_ut) add_definitions(-DMAX_UMOCK_TYPE_STRINGIFY_SIZE=128) add_definitions(-DTHIS_TEST_SUITE_NAME=umocktypes_c_fixed_buffer_unittests) set(${theseTestsName}_test_files ../umocktypes_c_ut/umocktypes_c_ut.c ) set(${theseTestsName}_c_files ../umocktypes_c_ut/umocktypes_c_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005031362133436400430300ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_c_fixed_buffer_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(THIS_TEST_SUITE_NAME, failedTestCount); return failedTestCount; } umocktypes_c_ut/000077500000000000000000000000001362133436400372325ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000010501362133436400417660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_c_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypes_c_ut) # The code in this unit test is shared by umocktypes_c_fixed_buffer_ut add_definitions(-DTHIS_TEST_SUITE_NAME=umocktypes_c_unittests) set(${theseTestsName}_test_files umocktypes_c_ut.c ) set(${theseTestsName}_c_files umocktypes_c_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005051362133436400403220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_c_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umocktypes_c_unittests, failedTestCount); return failedTestCount; } umocktypes_c_mocked.c000066400000000000000000000010111362133436400434160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_c_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umocktypes_c.c" umocktypes_c_ut.c000066400000000000000000002511411362133436400426170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_c_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #include #else #include #include #include #include #endif #include "testrunnerswitcher.h" #include "umocktypes.h" #include "umocktypes_c.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct umocktypes_register_type_CALL_TAG { char* type; UMOCKTYPE_STRINGIFY_FUNC stringify_func; UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func; UMOCKTYPE_COPY_FUNC copy_func; UMOCKTYPE_FREE_FUNC free_func; } umocktypes_register_type_CALL; static umocktypes_register_type_CALL* umocktypes_register_type_calls; static size_t umocktypes_register_type_call_count; static size_t when_shall_umocktypes_register_typecall_fail; static int umocktypes_register_type_call_result; static int umocktypes_register_type_fail_call_result; int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func) { int result; umocktypes_register_type_CALL* new_calls = (umocktypes_register_type_CALL*)realloc(umocktypes_register_type_calls, sizeof(umocktypes_register_type_CALL) * (umocktypes_register_type_call_count + 1)); if (new_calls != NULL) { size_t typename_length = strlen(type); umocktypes_register_type_calls = new_calls; umocktypes_register_type_calls[umocktypes_register_type_call_count].type = (char*)malloc(typename_length + 1); (void)memcpy(umocktypes_register_type_calls[umocktypes_register_type_call_count].type, type, typename_length + 1); umocktypes_register_type_calls[umocktypes_register_type_call_count].stringify_func = stringify_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].are_equal_func = are_equal_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].copy_func = copy_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].free_func = free_func; umocktypes_register_type_call_count++; } if (when_shall_umocktypes_register_typecall_fail == umocktypes_register_type_call_count) { result = umocktypes_register_type_fail_call_result; } else { result = umocktypes_register_type_call_result; } return result; } void reset_umocktypes_register_type_calls(void) { if (umocktypes_register_type_calls != NULL) { size_t i; for (i = 0; i < umocktypes_register_type_call_count; i++) { free(umocktypes_register_type_calls[i].type); } free(umocktypes_register_type_calls); umocktypes_register_type_calls = NULL; } umocktypes_register_type_call_count = 0; } static size_t malloc_call_count; static size_t calloc_call_count; static size_t realloc_call_count; static size_t free_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_calloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_calloc(size_t nmemb, size_t size) { void* result; calloc_call_count++; if (calloc_call_count == when_shall_calloc_fail) { result = NULL; } else { result = calloc(nmemb, size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free_call_count++; free(ptr); } #ifdef __cplusplus } #endif void reset_malloc_calls(void) { malloc_call_count = 0; when_shall_malloc_fail = 0; calloc_call_count = 0; when_shall_calloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; free_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(THIS_TEST_SUITE_NAME) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); reset_malloc_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_umocktypes_register_type_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* umocktypes_stringify_char */ /* Tests_SRS_UMOCKTYPES_C_01_002: [ umocktypes_stringify_char shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_char_with_0_value) { // arrange char input = 0; // act char* result = umocktypes_stringify_char(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_002: [ umocktypes_stringify_char shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_char_with_min_value) { // arrange char input = CHAR_MIN; char expected_string[32]; // act char* result = umocktypes_stringify_char(&input); // assert (void)sprintf(expected_string, "%d", (int)CHAR_MIN); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_002: [ umocktypes_stringify_char shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_char_with_max_value) { // arrange char input = CHAR_MAX; char expected_string[32]; // act char* result = umocktypes_stringify_char(&input); // assert (void)sprintf(expected_string, "%d", (int)CHAR_MAX); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_003: [ If value is NULL, umocktypes_stringify_char shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_char_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_char(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_004: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_char shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_char_fails) { // arrange char input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_char(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_char */ /* Tests_SRS_UMOCKTYPES_C_01_006: [ umocktypes_are_equal_char shall compare the 2 chars pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_008: [ If the values pointed to by left and right are equal, umocktypes_are_equal_char shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_char_with_2_equal_values_returns_1) { // arrange char left = 0x42; char right = 0x42; // act int result = umocktypes_are_equal_char(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_009: [ If the values pointed to by left and right are different, umocktypes_are_equal_char shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_char_with_2_different_values_returns_0) { // arrange char left = 0x42; char right = 0x43; // act int result = umocktypes_are_equal_char(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_007: [ If any of the arguments is NULL, umocktypes_are_equal_char shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_char_with_NULL_left_fails) { // arrange char right = 0x43; // act int result = umocktypes_are_equal_char(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_007: [ If any of the arguments is NULL, umocktypes_are_equal_char shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_char_with_NULL_right_fails) { // arrange char left = 0x42; // act int result = umocktypes_are_equal_char(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_char */ /* Tests_SRS_UMOCKTYPES_C_01_010: [ umocktypes_copy_char shall copy the char value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_011: [ On success umocktypes_copy_char shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_char_succeeds) { // arrange char destination = 0; char source = 0x42; // act int result = umocktypes_copy_char(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char, 0x42, destination); } /* Tests_SRS_UMOCKTYPES_C_01_012: [ If source or destination are NULL, umocktypes_copy_char shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_char_with_NULL_destination_fails) { // arrange char source = 0x42; // act int result = umocktypes_copy_char(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_012: [ If source or destination are NULL, umocktypes_copy_char shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_char_with_NULL_source_fails) { // arrange char destination = 0; // act int result = umocktypes_copy_char(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_char */ /* Tests_SRS_UMOCKTYPES_C_01_013: [ umocktypes_free_char shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_char_does_nothing) { // arrange char value = 0; // act umocktypes_free_char(&value); // assert // no explicit assert } /* umocktypes_stringify_unsignedchar */ /* Tests_SRS_UMOCKTYPES_C_01_014: [ umocktypes_stringify_unsignedchar shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedchar_with_0_value) { // arrange unsigned char input = 0; // act char* result = umocktypes_stringify_unsignedchar(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_014: [ umocktypes_stringify_unsignedchar shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedchar_with_positive_value) { // arrange unsigned char input = 255; // act char* result = umocktypes_stringify_unsignedchar(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "255", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_015: [ If value is NULL, umocktypes_stringify_unsignedchar shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedchar_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_unsignedchar(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_016: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedchar shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_unsignedchar_fails) { // arrange unsigned char input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_unsignedchar(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_unsignedchar */ /* Tests_SRS_UMOCKTYPES_C_01_018: [ umocktypes_are_equal_unsignedchar shall compare the 2 unsigned chars pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_020: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedchar shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedchar_with_2_equal_values_returns_1) { // arrange unsigned char left = 0x42; unsigned char right = 0x42; // act int result = umocktypes_are_equal_unsignedchar(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_021: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedchar shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedchar_with_2_different_values_returns_0) { // arrange unsigned char left = 0x42; unsigned char right = 0x43; // act int result = umocktypes_are_equal_unsignedchar(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_019: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedchar shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedchar_with_NULL_left_fails) { // arrange unsigned char right = 0x43; // act int result = umocktypes_are_equal_unsignedchar(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_019: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedchar shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedchar_with_NULL_right_fails) { // arrange unsigned char left = 0x42; // act int result = umocktypes_are_equal_unsignedchar(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_unsignedchar */ /* Tests_SRS_UMOCKTYPES_C_01_022: [ umocktypes_copy_unsignedchar shall copy the unsigned char value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_023: [ On success umocktypes_copy_unsignedchar shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedchar_succeeds) { // arrange unsigned char destination = 0; unsigned char source = 0x42; // act int result = umocktypes_copy_unsignedchar(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(uint8_t, 0x42, destination); } /* Tests_SRS_UMOCKTYPES_C_01_024: [ If source or destination are NULL, umocktypes_copy_unsignedchar shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedchar_with_NULL_destination_fails) { // arrange unsigned char source = 0x42; // act int result = umocktypes_copy_unsignedchar(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_024: [ If source or destination are NULL, umocktypes_copy_unsignedchar shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedchar_with_NULL_source_fails) { // arrange unsigned char destination = 0; // act int result = umocktypes_copy_unsignedchar(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_unsignedchar */ /* Tests_SRS_UMOCKTYPES_C_01_025: [ umocktypes_free_unsignedchar shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_unsignedchar_does_nothing) { // arrange unsigned char value = 0; // act umocktypes_free_unsignedchar(&value); // assert // no explicit assert } /* umocktypes_stringify_short */ /* Tests_SRS_UMOCKTYPES_C_01_026: [ umocktypes_stringify_short shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_short_with_0_value) { // arrange short input = 0; // act char* result = umocktypes_stringify_short(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_026: [ umocktypes_stringify_short shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_short_with_negative_value) { // arrange short input = -127-1; // act char* result = umocktypes_stringify_short(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-128", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_026: [ umocktypes_stringify_short shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_short_with_positive_value) { // arrange short input = 127; // act char* result = umocktypes_stringify_short(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_027: [ If value is NULL, umocktypes_stringify_short shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_short_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_short(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_028: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_short shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_short_fails) { // arrange short input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_short(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_short */ /* Tests_SRS_UMOCKTYPES_C_01_030: [ umocktypes_are_equal_short shall compare the 2 shorts poshorted to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_032: [ If the values poshorted to by left and right are equal, umocktypes_are_equal_short shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_short_with_2_equal_values_returns_1) { // arrange short left = 0x42; short right = 0x42; // act int result = umocktypes_are_equal_short(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_033: [ If the values poshorted to by left and right are different, umocktypes_are_equal_short shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_short_with_2_different_values_returns_0) { // arrange short left = 0x42; short right = 0x43; // act int result = umocktypes_are_equal_short(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_031: [ If any of the arguments is NULL, umocktypes_are_equal_short shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_short_with_NULL_left_fails) { // arrange short right = 0x43; // act int result = umocktypes_are_equal_short(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_031: [ If any of the arguments is NULL, umocktypes_are_equal_short shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_short_with_NULL_right_fails) { // arrange short left = 0x42; // act int result = umocktypes_are_equal_short(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_short */ /* Tests_SRS_UMOCKTYPES_C_01_034: [ umocktypes_copy_short shall copy the short value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_035: [ On success umocktypes_copy_short shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_short_succeeds) { // arrange short destination = 0; short source = 0x42; // act int result = umocktypes_copy_short(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(short, 0x42, destination); } /* Tests_SRS_UMOCKTYPES_C_01_036: [ If source or destination are NULL, umocktypes_copy_short shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_short_with_NULL_destination_fails) { // arrange short source = 0x42; // act int result = umocktypes_copy_short(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_036: [ If source or destination are NULL, umocktypes_copy_short shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_short_with_NULL_source_fails) { // arrange short destination = 0; // act int result = umocktypes_copy_short(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_short */ /* Tests_SRS_UMOCKTYPES_C_01_037: [ umocktypes_free_short shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_short_does_nothing) { // arrange short value = 0; // act umocktypes_free_short(&value); // assert // no explicit assert } /* umocktypes_stringify_unsignedshort */ /* Tests_SRS_UMOCKTYPES_C_01_038: [ umocktypes_stringify_unsignedshort shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedshort_with_0_value) { // arrange unsigned short input = 0; // act char* result = umocktypes_stringify_unsignedshort(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_038: [ umocktypes_stringify_unsignedshort shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedshort_with_positive_value) { // arrange unsigned short input = 255; // act char* result = umocktypes_stringify_unsignedshort(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "255", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_039: [ If value is NULL, umocktypes_stringify_unsignedshort shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedshort_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_unsignedshort(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_040: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedshort shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_unsignedshort_fails) { // arrange unsigned short input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_unsignedshort(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_unsignedshort */ /* Tests_SRS_UMOCKTYPES_C_01_042: [ umocktypes_are_equal_unsignedshort shall compare the 2 unsigned shorts pounsigned shorted to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_044: [ If the values pounsigned shorted to by left and right are equal, umocktypes_are_equal_unsignedshort shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedshort_with_2_equal_values_returns_1) { // arrange unsigned short left = 0x42; unsigned short right = 0x42; // act int result = umocktypes_are_equal_unsignedshort(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_045: [ If the values pounsigned shorted to by left and right are different, umocktypes_are_equal_unsignedshort shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedshort_with_2_different_values_returns_0) { // arrange unsigned short left = 0x42; unsigned short right = 0x43; // act int result = umocktypes_are_equal_unsignedshort(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_043: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedshort shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedshort_with_NULL_left_fails) { // arrange unsigned short right = 0x43; // act int result = umocktypes_are_equal_unsignedshort(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_043: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedshort shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedshort_with_NULL_right_fails) { // arrange unsigned short left = 0x42; // act int result = umocktypes_are_equal_unsignedshort(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_unsignedshort */ /* Tests_SRS_UMOCKTYPES_C_01_046: [ umocktypes_copy_unsignedshort shall copy the unsigned short value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_047: [ On success umocktypes_copy_unsignedshort shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedshort_succeeds) { // arrange unsigned short destination = 0; unsigned short source = 0x42; // act int result = umocktypes_copy_unsignedshort(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 0x42, (int)destination); } /* Tests_SRS_UMOCKTYPES_C_01_048: [ If source or destination are NULL, umocktypes_copy_unsignedshort shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedshort_with_NULL_destination_fails) { // arrange unsigned short source = 0x42; // act int result = umocktypes_copy_unsignedshort(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_048: [ If source or destination are NULL, umocktypes_copy_unsignedshort shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedshort_with_NULL_source_fails) { // arrange unsigned short destination = 0; // act int result = umocktypes_copy_unsignedshort(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_unsignedshort */ /* Tests_SRS_UMOCKTYPES_C_01_049: [ umocktypes_free_unsignedshort shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_unsignedshort_does_nothing) { // arrange unsigned short value = 0; // act umocktypes_free_unsignedshort(&value); // assert // no explicit assert } /* umocktypes_stringify_int */ /* Tests_SRS_UMOCKTYPES_C_01_050: [ umocktypes_stringify_int shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int_with_0_value) { // arrange int input = 0; // act char* result = umocktypes_stringify_int(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_050: [ umocktypes_stringify_int shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int_with_negative_value) { // arrange int input = -127-1; // act char* result = umocktypes_stringify_int(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-128", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_050: [ umocktypes_stringify_int shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int_with_positive_value) { // arrange int input = 127; // act char* result = umocktypes_stringify_int(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_051: [ If value is NULL, umocktypes_stringify_int shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_int_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_int(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_052: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_int_fails) { // arrange int input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_int(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_int */ /* Tests_SRS_UMOCKTYPES_C_01_054: [ umocktypes_are_equal_int shall compare the 2 ints pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_056: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int_with_2_equal_values_returns_1) { // arrange int left = 0x42; int right = 0x42; // act int result = umocktypes_are_equal_int(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_057: [ If the values pointed to by left and right are different, umocktypes_are_equal_int shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_int_with_2_different_values_returns_0) { // arrange int left = 0x42; int right = 0x43; // act int result = umocktypes_are_equal_int(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_055: [ If any of the arguments is NULL, umocktypes_are_equal_int shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int_with_NULL_left_fails) { // arrange int right = 0x43; // act int result = umocktypes_are_equal_int(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_055: [ If any of the arguments is NULL, umocktypes_are_equal_int shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int_with_NULL_right_fails) { // arrange int left = 0x42; // act int result = umocktypes_are_equal_int(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_int */ /* Tests_SRS_UMOCKTYPES_C_01_058: [ umocktypes_copy_int shall copy the int value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_059: [ On success umocktypes_copy_int shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_int_succeeds) { // arrange int destination = 0; int source = 0x42; // act int result = umocktypes_copy_int(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int, 0x42, (int)destination); } /* Tests_SRS_UMOCKTYPES_C_01_060: [ If source or destination are NULL, umocktypes_copy_int shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int_with_NULL_destination_fails) { // arrange int source = 0x42; // act int result = umocktypes_copy_int(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_060: [ If source or destination are NULL, umocktypes_copy_int shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int_with_NULL_source_fails) { // arrange int destination = 0; // act int result = umocktypes_copy_int(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_int */ /* Tests_SRS_UMOCKTYPES_C_01_061: [ umocktypes_free_int shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_int_does_nothing) { // arrange int value = 0; // act umocktypes_free_int(&value); // assert // no explicit assert } /* umocktypes_stringify_unsignedint */ /* Tests_SRS_UMOCKTYPES_C_01_062: [ umocktypes_stringify_unsignedint shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedint_with_0_value) { // arrange unsigned int input = 0; // act char* result = umocktypes_stringify_unsignedint(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_062: [ umocktypes_stringify_unsignedint shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedint_with_positive_value) { // arrange unsigned int input = 127; // act char* result = umocktypes_stringify_unsignedint(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_063: [ If value is NULL, umocktypes_stringify_unsignedint shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedint_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_unsignedint(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_064: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedint shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_unsignedint_fails) { // arrange unsigned int input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_unsignedint(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_unsignedint */ /* Tests_SRS_UMOCKTYPES_C_01_066: [ umocktypes_are_equal_unsignedint shall compare the 2 unsigned ints pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_068: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedint shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedint_with_2_equal_values_returns_1) { // arrange unsigned int left = 0x42; unsigned int right = 0x42; // act int result = umocktypes_are_equal_unsignedint(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_069: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedint shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedint_with_2_different_values_returns_0) { // arrange unsigned int left = 0x42; unsigned int right = 0x43; // act int result = umocktypes_are_equal_unsignedint(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_067: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedint shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedint_with_NULL_left_fails) { // arrange unsigned int right = 0x43; // act int result = umocktypes_are_equal_unsignedint(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_067: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedint shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedint_with_NULL_right_fails) { // arrange unsigned int left = 0x42; // act int result = umocktypes_are_equal_unsignedint(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_unsignedint */ /* Tests_SRS_UMOCKTYPES_C_01_070: [ umocktypes_copy_unsignedint shall copy the unsigned int value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_071: [ On success umocktypes_copy_unsignedint shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedint_succeeds) { // arrange unsigned int destination = 0; unsigned int source = 0x42; // act int result = umocktypes_copy_unsignedint(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (unsigned int)destination); } /* Tests_SRS_UMOCKTYPES_C_01_072: [ If source or destination are NULL, umocktypes_copy_unsignedint shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedint_with_NULL_destination_fails) { // arrange unsigned int source = 0x42; // act int result = umocktypes_copy_unsignedint(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_072: [ If source or destination are NULL, umocktypes_copy_unsignedint shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedint_with_NULL_source_fails) { // arrange unsigned int destination = 0; // act int result = umocktypes_copy_unsignedint(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_unsignedint */ /* Tests_SRS_UMOCKTYPES_C_01_073: [ umocktypes_free_unsignedint shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_unsignedint_does_nothing) { // arrange unsigned int value = 0; // act umocktypes_free_unsignedint(&value); // assert // no explicit assert } /* umocktypes_stringify_long */ /* Tests_SRS_UMOCKTYPES_C_01_074: [ umocktypes_stringify_long shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_long_with_0_value) { // arrange long input = 0; // act char* result = umocktypes_stringify_long(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_074: [ umocktypes_stringify_long shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_long_with_negative_value) { // arrange long input = -127 - 1; // act char* result = umocktypes_stringify_long(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-128", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_074: [ umocktypes_stringify_long shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_long_with_positive_value) { // arrange long input = 127; // act char* result = umocktypes_stringify_long(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_075: [ If value is NULL, umocktypes_stringify_long shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_long_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_long(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_076: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_long shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_long_fails) { // arrange long input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_long(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_long */ /* Tests_SRS_UMOCKTYPES_C_01_078: [ umocktypes_are_equal_long shall compare the 2 longs pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_080: [ If the values pointed to by left and right are equal, umocktypes_are_equal_long shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_long_with_2_equal_values_returns_1) { // arrange long left = 0x42; long right = 0x42; // act int result = umocktypes_are_equal_long(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_081: [ If the values pointed to by left and right are different, umocktypes_are_equal_long shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_long_with_2_different_values_returns_0) { // arrange long left = 0x42; long right = 0x43; // act int result = umocktypes_are_equal_long(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_079: [ If any of the arguments is NULL, umocktypes_are_equal_long shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_long_with_NULL_left_fails) { // arrange long right = 0x43; // act int result = umocktypes_are_equal_long(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_079: [ If any of the arguments is NULL, umocktypes_are_equal_long shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_long_with_NULL_right_fails) { // arrange long left = 0x42; // act int result = umocktypes_are_equal_long(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_long */ /* Tests_SRS_UMOCKTYPES_C_01_082: [ umocktypes_copy_long shall copy the long value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_083: [ On success umocktypes_copy_long shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_long_succeeds) { // arrange long destination = 0; long source = 0x42; // act int result = umocktypes_copy_long(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_084: [ If source or destination are NULL, umocktypes_copy_long shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_long_with_NULL_destination_fails) { // arrange long source = 0x42; // act int result = umocktypes_copy_long(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_084: [ If source or destination are NULL, umocktypes_copy_long shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_long_with_NULL_source_fails) { // arrange long destination = 0; // act int result = umocktypes_copy_long(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_long */ /* Tests_SRS_UMOCKTYPES_C_01_085: [ umocktypes_free_long shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_long_does_nothing) { // arrange long value = 0; // act umocktypes_free_long(&value); // assert // no explicit assert } /* umocktypes_stringify_unsignedlong */ /* Tests_SRS_UMOCKTYPES_C_01_086: [ umocktypes_stringify_unsignedlong shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedlong_with_0_value) { // arrange unsigned long input = 0; // act char* result = umocktypes_stringify_unsignedlong(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_086: [ umocktypes_stringify_unsignedlong shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedlong_with_positive_value) { // arrange unsigned long input = 127; // act char* result = umocktypes_stringify_unsignedlong(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_087: [ If value is NULL, umocktypes_stringify_unsignedlong shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedlong_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_unsignedlong(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_088: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedlong shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_unsignedlong_fails) { // arrange unsigned long input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_unsignedlong(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_unsignedlong */ /* Tests_SRS_UMOCKTYPES_C_01_090: [ umocktypes_are_equal_unsignedlong shall compare the 2 unsigned longs pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_092: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedlong shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlong_with_2_equal_values_returns_1) { // arrange unsigned long left = 0x42; unsigned long right = 0x42; // act int result = umocktypes_are_equal_unsignedlong(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_093: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedlong shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlong_with_2_different_values_returns_0) { // arrange unsigned long left = 0x42; unsigned long right = 0x43; // act int result = umocktypes_are_equal_unsignedlong(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_091: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedlong shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlong_with_NULL_left_fails) { // arrange unsigned long right = 0x43; // act int result = umocktypes_are_equal_unsignedlong(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_091: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedlong shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlong_with_NULL_right_fails) { // arrange unsigned long left = 0x42; // act int result = umocktypes_are_equal_unsignedlong(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_unsignedlong */ /* Tests_SRS_UMOCKTYPES_C_01_094: [ umocktypes_copy_unsignedlong shall copy the unsigned long value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_095: [ On success umocktypes_copy_unsignedlong shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedlong_succeeds) { // arrange unsigned long destination = 0; unsigned long source = 0x42; // act int result = umocktypes_copy_unsignedlong(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_096: [ If source or destination are NULL, umocktypes_copy_unsignedlong shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedlong_with_NULL_destination_fails) { // arrange unsigned long source = 0x42; // act int result = umocktypes_copy_unsignedlong(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_096: [ If source or destination are NULL, umocktypes_copy_unsignedlong shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedlong_with_NULL_source_fails) { // arrange unsigned long destination = 0; // act int result = umocktypes_copy_unsignedlong(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_unsignedlong */ /* Tests_SRS_UMOCKTYPES_C_01_097: [ umocktypes_free_unsignedlong shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_unsignedlong_does_nothing) { // arrange unsigned long value = 0; // act umocktypes_free_unsignedlong(&value); // assert // no explicit assert } /* umocktypes_stringify_longlong */ /* Tests_SRS_UMOCKTYPES_C_01_098: [ umocktypes_stringify_longlong shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_longlong_with_0_value) { // arrange long long input = 0; // act char* result = umocktypes_stringify_longlong(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_098: [ umocktypes_stringify_longlong shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_longlong_with_negative_value) { // arrange long long input = -127 - 1; // act char* result = umocktypes_stringify_longlong(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-128", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_098: [ umocktypes_stringify_longlong shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_longlong_with_positive_value) { // arrange long long input = 127; // act char* result = umocktypes_stringify_longlong(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_099: [ If value is NULL, umocktypes_stringify_longlong shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_longlong_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_longlong(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_100: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_longlong shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_longlong_fails) { // arrange long long input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_longlong(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_longlong */ /* Tests_SRS_UMOCKTYPES_C_01_102: [ umocktypes_are_equal_longlong shall compare the 2 long longs pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_104: [ If the values pointed to by left and right are equal, umocktypes_are_equal_longlong shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_longlong_with_2_equal_values_returns_1) { // arrange long long left = 0x42; long long right = 0x42; // act int result = umocktypes_are_equal_longlong(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_105: [ If the values pointed to by left and right are different, umocktypes_are_equal_longlong shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_longlong_with_2_different_values_returns_0) { // arrange long long left = 0x42; long long right = 0x43; // act int result = umocktypes_are_equal_longlong(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_103: [ If any of the arguments is NULL, umocktypes_are_equal_longlong shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_longlong_with_NULL_left_fails) { // arrange long long right = 0x43; // act int result = umocktypes_are_equal_longlong(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_103: [ If any of the arguments is NULL, umocktypes_are_equal_longlong shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_longlong_with_NULL_right_fails) { // arrange long long left = 0x42; // act int result = umocktypes_are_equal_longlong(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_longlong */ /* Tests_SRS_UMOCKTYPES_C_01_106: [ umocktypes_copy_longlong shall copy the long long value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_107: [ On success umocktypes_copy_longlong shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_longlong_succeeds) { // arrange long long destination = 0; long long source = 0x42; // act int result = umocktypes_copy_longlong(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_108: [ If source or destination are NULL, umocktypes_copy_longlong shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_longlong_with_NULL_destination_fails) { // arrange long long source = 0x42; // act int result = umocktypes_copy_longlong(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_108: [ If source or destination are NULL, umocktypes_copy_longlong shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_longlong_with_NULL_source_fails) { // arrange long long destination = 0; // act int result = umocktypes_copy_longlong(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_longlong */ /* Tests_SRS_UMOCKTYPES_C_01_109: [ umocktypes_free_longlong shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_longlong_does_nothing) { // arrange long long value = 0; // act umocktypes_free_longlong(&value); // assert // no explicit assert } /* umocktypes_stringify_unsignedlonglong */ /* Tests_SRS_UMOCKTYPES_C_01_110: [ umocktypes_stringify_unsignedlonglong shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedlonglong_with_0_value) { // arrange unsigned long long input = 0; // act char* result = umocktypes_stringify_unsignedlonglong(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_110: [ umocktypes_stringify_unsignedlonglong shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedlonglong_with_positive_value) { // arrange unsigned long long input = 127; // act char* result = umocktypes_stringify_unsignedlonglong(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_111: [ If value is NULL, umocktypes_stringify_unsignedlonglong shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_unsignedlonglong_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_unsignedlonglong(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_112: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_unsignedlonglong shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_unsignedlonglong_fails) { // arrange unsigned long long input = 127; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_unsignedlonglong(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_unsignedlonglong */ /* Tests_SRS_UMOCKTYPES_C_01_114: [ umocktypes_are_equal_unsignedlonglong shall compare the 2 unsigned long longs pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_116: [ If the values pointed to by left and right are equal, umocktypes_are_equal_unsignedlonglong shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlonglong_with_2_equal_values_returns_1) { // arrange unsigned long long left = 0x42; unsigned long long right = 0x42; // act int result = umocktypes_are_equal_unsignedlonglong(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_117: [ If the values pointed to by left and right are different, umocktypes_are_equal_unsignedlonglong shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlonglong_with_2_different_values_returns_0) { // arrange unsigned long long left = 0x42; unsigned long long right = 0x43; // act int result = umocktypes_are_equal_unsignedlonglong(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_115: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedlonglong shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlonglong_with_NULL_left_fails) { // arrange unsigned long long right = 0x43; // act int result = umocktypes_are_equal_unsignedlonglong(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_115: [ If any of the arguments is NULL, umocktypes_are_equal_unsignedlonglong shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_unsignedlonglong_with_NULL_right_fails) { // arrange unsigned long long left = 0x42; // act int result = umocktypes_are_equal_unsignedlonglong(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_unsignedlonglong */ /* Tests_SRS_UMOCKTYPES_C_01_118: [ umocktypes_copy_unsignedlonglong shall copy the unsigned long long value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_119: [ On success umocktypes_copy_unsignedlonglong shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedlonglong_succeeds) { // arrange unsigned long long destination = 0; unsigned long long source = 0x42; // act int result = umocktypes_copy_unsignedlonglong(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_120: [ If source or destination are NULL, umocktypes_copy_unsignedlonglong shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedlonglong_with_NULL_destination_fails) { // arrange unsigned long long source = 0x42; // act int result = umocktypes_copy_unsignedlonglong(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_120: [ If source or destination are NULL, umocktypes_copy_unsignedlonglong shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_unsignedlonglong_with_NULL_source_fails) { // arrange unsigned long long destination = 0; // act int result = umocktypes_copy_unsignedlonglong(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_unsignedlonglong */ /* Tests_SRS_UMOCKTYPES_C_01_121: [ umocktypes_free_unsignedlonglong shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_unsignedlonglong_does_nothing) { // arrange unsigned long long value = 0; // act umocktypes_free_unsignedlonglong(&value); // assert // no explicit assert } /* umocktypes_stringify_float */ /* Tests_SRS_UMOCKTYPES_C_01_122: [ umocktypes_stringify_float shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_float_with_0_0_value) { // arrange float input = 0.0f; char expected_string[32]; // act char* result = umocktypes_stringify_float(&input); // assert (void)sprintf(expected_string, "%f", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_122: [ umocktypes_stringify_float shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_float_with_negative_value) { // arrange float input = -1.42f; char expected_string[32]; // act char* result = umocktypes_stringify_float(&input); // assert (void)sprintf(expected_string, "%f", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_122: [ umocktypes_stringify_float shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_float_with_positive_value) { // arrange float input = 2.42f; char expected_string[32]; // act char* result = umocktypes_stringify_float(&input); // assert (void)sprintf(expected_string, "%f", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_123: [ If value is NULL, umocktypes_stringify_float shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_float_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_float(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_124: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_float shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_float_fails) { // arrange float input = 0.42f; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_float(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_float */ /* Tests_SRS_UMOCKTYPES_C_01_126: [ umocktypes_are_equal_float shall compare the 2 floats pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_128: [ If the values pointed to by left and right are equal, umocktypes_are_equal_float shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_float_with_2_equal_values_returns_1) { // arrange float left = 0x42; float right = 0x42; // act int result = umocktypes_are_equal_float(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_129: [ If the values pointed to by left and right are different, umocktypes_are_equal_float shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_float_with_2_different_values_returns_0) { // arrange float left = 0x42; float right = 0x43; // act int result = umocktypes_are_equal_float(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_127: [ If any of the arguments is NULL, umocktypes_are_equal_float shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_float_with_NULL_left_fails) { // arrange float right = 0x43; // act int result = umocktypes_are_equal_float(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_127: [ If any of the arguments is NULL, umocktypes_are_equal_float shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_float_with_NULL_right_fails) { // arrange float left = 0x42; // act int result = umocktypes_are_equal_float(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_float */ /* Tests_SRS_UMOCKTYPES_C_01_130: [ umocktypes_copy_float shall copy the float value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_131: [ On success umocktypes_copy_float shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_float_succeeds) { // arrange float destination = 0; float source = 0x42; // act int result = umocktypes_copy_float(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_132: [ If source or destination are NULL, umocktypes_copy_float shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_float_with_NULL_destination_fails) { // arrange float source = 0x42; // act int result = umocktypes_copy_float(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_132: [ If source or destination are NULL, umocktypes_copy_float shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_float_with_NULL_source_fails) { // arrange float destination = 0; // act int result = umocktypes_copy_float(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_float */ /* Tests_SRS_UMOCKTYPES_C_01_133: [ umocktypes_free_float shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_float_does_nothing) { // arrange float value = 0; // act umocktypes_free_float(&value); // assert // no explicit assert } /* umocktypes_stringify_double */ /* Tests_SRS_UMOCKTYPES_C_01_134: [ umocktypes_stringify_double shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_double_with_0_0_value) { // arrange double input = 0.0; char expected_string[32]; // act char* result = umocktypes_stringify_double(&input); // assert (void)sprintf(expected_string, "%f", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_134: [ umocktypes_stringify_double shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_double_with_negative_value) { // arrange double input = -1.42; char expected_string[32]; // act char* result = umocktypes_stringify_double(&input); // assert (void)sprintf(expected_string, "%f", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_134: [ umocktypes_stringify_double shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_double_with_positive_value) { // arrange double input = 2.42; char expected_string[32]; // act char* result = umocktypes_stringify_double(&input); // assert (void)sprintf(expected_string, "%f", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_135: [ If value is NULL, umocktypes_stringify_double shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_double_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_double(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_136: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_double shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_double_fails) { // arrange double input = 0.42; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_double(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_double */ /* Tests_SRS_UMOCKTYPES_C_01_138: [ umocktypes_are_equal_double shall compare the 2 doubles pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_140: [ If the values pointed to by left and right are equal, umocktypes_are_equal_double shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_double_with_2_equal_values_returns_1) { // arrange double left = 0x42; double right = 0x42; // act int result = umocktypes_are_equal_double(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_141: [ If the values pointed to by left and right are different, umocktypes_are_equal_double shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_double_with_2_different_values_returns_0) { // arrange double left = 0x42; double right = 0x43; // act int result = umocktypes_are_equal_double(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_139: [ If any of the arguments is NULL, umocktypes_are_equal_double shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_double_with_NULL_left_fails) { // arrange double right = 0x43; // act int result = umocktypes_are_equal_double(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_139: [ If any of the arguments is NULL, umocktypes_are_equal_double shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_double_with_NULL_right_fails) { // arrange double left = 0x42; // act int result = umocktypes_are_equal_double(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_double */ /* Tests_SRS_UMOCKTYPES_C_01_142: [ umocktypes_copy_double shall copy the double value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_143: [ On success umocktypes_copy_double shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_double_succeeds) { // arrange double destination = 0; double source = 0x42; // act int result = umocktypes_copy_double(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_144: [ If source or destination are NULL, umocktypes_copy_double shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_double_with_NULL_destination_fails) { // arrange double source = 0x42; // act int result = umocktypes_copy_double(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_144: [ If source or destination are NULL, umocktypes_copy_double shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_double_with_NULL_source_fails) { // arrange double destination = 0; // act int result = umocktypes_copy_double(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_double */ /* Tests_SRS_UMOCKTYPES_C_01_145: [ umocktypes_free_double shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_double_does_nothing) { // arrange double value = 0; // act umocktypes_free_double(&value); // assert // no explicit assert } /* umocktypes_stringify_longdouble */ /* Tests_SRS_UMOCKTYPES_C_01_146: [ umocktypes_stringify_longdouble shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_longdouble_with_0_0_value) { // arrange long double input = 0.0; char expected_string[32]; // act char* result = umocktypes_stringify_longdouble(&input); // assert (void)sprintf(expected_string, "%Lf", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_146: [ umocktypes_stringify_longdouble shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_longdouble_with_negative_value) { // arrange long double input = -1.42; char expected_string[32]; // act char* result = umocktypes_stringify_longdouble(&input); // assert (void)sprintf(expected_string, "%Lf", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_146: [ umocktypes_stringify_longdouble shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_longdouble_with_positive_value) { // arrange long double input = 2.42; char expected_string[32]; // act char* result = umocktypes_stringify_longdouble(&input); // assert (void)sprintf(expected_string, "%Lf", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_147: [ If value is NULL, umocktypes_stringify_longdouble shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_longdouble_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_longdouble(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_148: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_longdouble shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_longdouble_fails) { // arrange long double input = 0.42; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_longdouble(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_longdouble */ /* Tests_SRS_UMOCKTYPES_C_01_150: [ umocktypes_are_equal_longdouble shall compare the 2 long doubles pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_152: [ If the values pointed to by left and right are equal, umocktypes_are_equal_longdouble shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_longdouble_with_2_equal_values_returns_1) { // arrange long double left = 0x42; long double right = 0x42; // act int result = umocktypes_are_equal_longdouble(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_153: [ If the values pointed to by left and right are different, umocktypes_are_equal_longdouble shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_longdouble_with_2_different_values_returns_0) { // arrange long double left = 0x42; long double right = 0x43; // act int result = umocktypes_are_equal_longdouble(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_151: [ If any of the arguments is NULL, umocktypes_are_equal_longdouble shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_longdouble_with_NULL_left_fails) { // arrange long double right = 0x43; // act int result = umocktypes_are_equal_longdouble(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_151: [ If any of the arguments is NULL, umocktypes_are_equal_longdouble shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_longdouble_with_NULL_right_fails) { // arrange long double left = 0x42; // act int result = umocktypes_are_equal_longdouble(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_longdouble */ /* Tests_SRS_UMOCKTYPES_C_01_154: [ umocktypes_copy_longdouble shall copy the long double value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_155: [ On success umocktypes_copy_longdouble shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_longdouble_succeeds) { // arrange long double destination = 0; long double source = 0x42; // act int result = umocktypes_copy_longdouble(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_156: [ If source or destination are NULL, umocktypes_copy_longdouble shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_longdouble_with_NULL_destination_fails) { // arrange long double source = 0x42; // act int result = umocktypes_copy_longdouble(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_156: [ If source or destination are NULL, umocktypes_copy_longdouble shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_longdouble_with_NULL_source_fails) { // arrange long double destination = 0; // act int result = umocktypes_copy_longdouble(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_longdouble */ /* Tests_SRS_UMOCKTYPES_C_01_157: [ umocktypes_free_longdouble shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_longdouble_does_nothing) { // arrange long double value = 0; // act umocktypes_free_longdouble(&value); // assert // no explicit assert } /* umocktypes_stringify_size_t */ /* Tests_SRS_UMOCKTYPES_C_01_158: [ umocktypes_stringify_size_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_size_t_with_0_0_value) { // arrange size_t input = 0; char expected_string[32]; // act char* result = umocktypes_stringify_size_t(&input); // assert (void)sprintf(expected_string, "%zu", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_158: [ umocktypes_stringify_size_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_size_t_with_max_value) { // arrange size_t input = (size_t)-1; char expected_string[32]; // act char* result = umocktypes_stringify_size_t(&input); // assert (void)sprintf(expected_string, "%zu", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_159: [ If value is NULL, umocktypes_stringify_size_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_size_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_size_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_160: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_size_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_size_t_fails) { // arrange size_t input = 42; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_size_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_size_t */ /* Tests_SRS_UMOCKTYPES_C_01_162: [ umocktypes_are_equal_size_t shall compare the 2 size_ts pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_164: [ If the values pointed to by left and right are equal, umocktypes_are_equal_size_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_size_t_with_2_equal_values_returns_1) { // arrange size_t left = 0x42; size_t right = 0x42; // act int result = umocktypes_are_equal_size_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_165: [ If the values pointed to by left and right are different, umocktypes_are_equal_size_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_size_t_with_2_different_values_returns_0) { // arrange size_t left = 0x42; size_t right = 0x43; // act int result = umocktypes_are_equal_size_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_163: [ If any of the arguments is NULL, umocktypes_are_equal_size_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_size_t_with_NULL_left_fails) { // arrange size_t right = 0x43; // act int result = umocktypes_are_equal_size_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_163: [ If any of the arguments is NULL, umocktypes_are_equal_size_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_size_t_with_NULL_right_fails) { // arrange size_t left = 0x42; // act int result = umocktypes_are_equal_size_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_size_t */ /* Tests_SRS_UMOCKTYPES_C_01_166: [ umocktypes_copy_size_t shall copy the size_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_167: [ On success umocktypes_copy_size_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_size_t_succeeds) { // arrange size_t destination = 0; size_t source = 0x42; // act int result = umocktypes_copy_size_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(long, 0x42, (long)destination); } /* Tests_SRS_UMOCKTYPES_C_01_168: [ If source or destination are NULL, umocktypes_copy_size_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_size_t_with_NULL_destination_fails) { // arrange size_t source = 0x42; // act int result = umocktypes_copy_size_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_168: [ If source or destination are NULL, umocktypes_copy_size_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_size_t_with_NULL_source_fails) { // arrange size_t destination = 0; // act int result = umocktypes_copy_size_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_size_t */ /* Tests_SRS_UMOCKTYPES_C_01_169: [ umocktypes_free_size_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_size_t_does_nothing) { // arrange size_t value = 0; // act umocktypes_free_size_t(&value); // assert // no explicit assert } /* umocktypes_stringify_void_ptr */ /* Tests_SRS_UMOCKTYPES_C_01_170: [ umocktypes_stringify_void_ptr shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_void_ptr_with_NULL_value) { // arrange void* input = NULL; char expected_string[32]; // act char* result = umocktypes_stringify_void_ptr(&input); // assert (void)sprintf(expected_string, "%p", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_170: [ umocktypes_stringify_void_ptr shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_void_ptr_with_a_pointer) { // arrange void* input = (void*)0x4242; char expected_string[32]; // act char* result = umocktypes_stringify_void_ptr(&input); // assert (void)sprintf(expected_string, "%p", input); ASSERT_ARE_EQUAL(char_ptr, expected_string, result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_C_01_171: [ If value is NULL, umocktypes_stringify_void_ptr shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_void_ptr_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_void_ptr(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_C_01_172: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_void_ptr shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_void_ptr_fails) { // arrange void* input = (void*)0x4242; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_void_ptr(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_void_ptr */ /* Tests_SRS_UMOCKTYPES_C_01_174: [ umocktypes_are_equal_void_ptr shall compare the 2 void_ptrs pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_176: [ If the values pointed to by left and right are equal, umocktypes_are_equal_void_ptr shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_void_ptr_with_2_equal_values_returns_1) { // arrange void* left = (void*)0x4242; void* right = (void*)0x4242; // act int result = umocktypes_are_equal_void_ptr(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_C_01_177: [ If the values pointed to by left and right are different, umocktypes_are_equal_void_ptr shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_void_ptr_with_2_different_values_returns_0) { // arrange void* left = (void*)0x4242; void* right = (void*)0x4243; // act int result = umocktypes_are_equal_void_ptr(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_175: [ If any of the arguments is NULL, umocktypes_are_equal_void_ptr shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_void_ptr_with_NULL_left_fails) { // arrange void* right = (void*)0x4243; // act int result = umocktypes_are_equal_void_ptr(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_C_01_175: [ If any of the arguments is NULL, umocktypes_are_equal_void_ptr shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_void_ptr_with_NULL_right_fails) { // arrange void* left = (void*)0x4242; // act int result = umocktypes_are_equal_void_ptr(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_void_ptr */ /* Tests_SRS_UMOCKTYPES_C_01_178: [ umocktypes_copy_void_ptr shall copy the void_ptr value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_179: [ On success umocktypes_copy_void_ptr shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_void_ptr_succeeds) { // arrange void* destination = NULL; void* source = (void*)0x4242; // act int result = umocktypes_copy_void_ptr(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(void_ptr, (void*)0x4242, destination); } /* Tests_SRS_UMOCKTYPES_C_01_180: [ If source or destination are NULL, umocktypes_copy_void_ptr shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_void_ptr_with_NULL_destination_fails) { // arrange void* source = (void*)0x4242; // act int result = umocktypes_copy_void_ptr(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_C_01_180: [ If source or destination are NULL, umocktypes_copy_void_ptr shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_void_ptr_with_NULL_source_fails) { // arrange void* destination = NULL; // act int result = umocktypes_copy_void_ptr(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_void_ptr */ /* Tests_SRS_UMOCKTYPES_C_01_181: [ umocktypes_free_void_ptr shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_void_ptr_does_nothing) { // arrange void* value = NULL; // act umocktypes_free_void_ptr(&value); // assert // no explicit assert } /* umocktypes_c_register_types */ /* Tests_SRS_UMOCKTYPES_C_01_001: [ umocktypes_c_register_types shall register support for all the types in the module. ]*/ /* Tests_SRS_UMOCKTYPES_C_01_170: [ On success, umocktypes_c_register_types shall return 0. ]*/ TEST_FUNCTION(umocktypes_c_register_types_registers_all_types) { // arrange size_t i; int result; umocktypes_register_type_fail_call_result = 0; // act result = umocktypes_c_register_types(); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 16, umocktypes_register_type_call_count); ASSERT_ARE_EQUAL(char_ptr, "char", umocktypes_register_type_calls[0].type); ASSERT_ARE_EQUAL(char_ptr, "unsigned char", umocktypes_register_type_calls[1].type); ASSERT_ARE_EQUAL(char_ptr, "short", umocktypes_register_type_calls[2].type); ASSERT_ARE_EQUAL(char_ptr, "unsigned short", umocktypes_register_type_calls[3].type); ASSERT_ARE_EQUAL(char_ptr, "int", umocktypes_register_type_calls[4].type); ASSERT_ARE_EQUAL(char_ptr, "unsigned int", umocktypes_register_type_calls[5].type); ASSERT_ARE_EQUAL(char_ptr, "long", umocktypes_register_type_calls[6].type); ASSERT_ARE_EQUAL(char_ptr, "unsigned long", umocktypes_register_type_calls[7].type); ASSERT_ARE_EQUAL(char_ptr, "long long", umocktypes_register_type_calls[8].type); ASSERT_ARE_EQUAL(char_ptr, "unsigned long long", umocktypes_register_type_calls[9].type); ASSERT_ARE_EQUAL(char_ptr, "float", umocktypes_register_type_calls[10].type); ASSERT_ARE_EQUAL(char_ptr, "double", umocktypes_register_type_calls[11].type); ASSERT_ARE_EQUAL(char_ptr, "long double", umocktypes_register_type_calls[12].type); ASSERT_ARE_EQUAL(char_ptr, "size_t", umocktypes_register_type_calls[13].type); ASSERT_ARE_EQUAL(char_ptr, "void*", umocktypes_register_type_calls[14].type); ASSERT_ARE_EQUAL(char_ptr, "const void*", umocktypes_register_type_calls[15].type); for (i = 0; i < 16; i++) { ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].stringify_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].are_equal_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].copy_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].free_func); } } /* Tests_SRS_UMOCKTYPES_C_01_171: [ If registering any of the types fails, umocktypes_c_register_types shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_the_underlying_register_fails_umocktypes_c_register_types_fails) { size_t i; for (i = 0; i < 14; i++) { // arrange int result; reset_umocktypes_register_type_calls(); umocktypes_register_type_fail_call_result = 1; when_shall_umocktypes_register_typecall_fail = i + 1; // act result = umocktypes_c_register_types(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, i + 1, umocktypes_register_type_call_count); } } END_TEST_SUITE(THIS_TEST_SUITE_NAME) umocktypes_charptr_ut/000077500000000000000000000000001362133436400404535ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006631362133436400432200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_charptr_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypes_charptr_ut) set(${theseTestsName}_test_files umocktypes_charptr_ut.c ) set(${theseTestsName}_c_files umocktypes_charptr_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005131362133436400415420ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_charptr_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umocktypes_charptr_unittests, failedTestCount); return failedTestCount; } umocktypes_charptr_mocked.c000066400000000000000000000010171362133436400460660ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_charptr_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umocktypes_charptr.c" umocktypes_charptr_ut.c000066400000000000000000000660301362133436400452620ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_charptr_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umocktypes.h" #include "umocktypes_charptr.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct umocktypes_register_type_CALL_TAG { char* type; UMOCKTYPE_STRINGIFY_FUNC stringify_func; UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func; UMOCKTYPE_COPY_FUNC copy_func; UMOCKTYPE_FREE_FUNC free_func; } umocktypes_register_type_CALL; static umocktypes_register_type_CALL* umocktypes_register_type_calls; static size_t umocktypes_register_type_call_count; static size_t when_shall_umocktypes_register_typecall_fail; static int umocktypes_register_type_call_result; static int umocktypes_register_type_fail_call_result; int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func) { int result; umocktypes_register_type_CALL* new_calls = (umocktypes_register_type_CALL*)realloc(umocktypes_register_type_calls, sizeof(umocktypes_register_type_CALL) * (umocktypes_register_type_call_count + 1)); if (new_calls != NULL) { size_t typename_length = strlen(type); umocktypes_register_type_calls = new_calls; umocktypes_register_type_calls[umocktypes_register_type_call_count].type = (char*)malloc(typename_length + 1); (void)memcpy(umocktypes_register_type_calls[umocktypes_register_type_call_count].type, type, typename_length + 1); umocktypes_register_type_calls[umocktypes_register_type_call_count].stringify_func = stringify_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].are_equal_func = are_equal_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].copy_func = copy_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].free_func = free_func; umocktypes_register_type_call_count++; } if (when_shall_umocktypes_register_typecall_fail == umocktypes_register_type_call_count) { result = umocktypes_register_type_fail_call_result; } else { result = umocktypes_register_type_call_result; } return result; } void reset_umocktypes_register_type_calls(void) { if (umocktypes_register_type_calls != NULL) { size_t i; for (i = 0; i < umocktypes_register_type_call_count; i++) { free(umocktypes_register_type_calls[i].type); } free(umocktypes_register_type_calls); umocktypes_register_type_calls = NULL; } umocktypes_register_type_call_count = 0; } static size_t malloc_call_count; static size_t calloc_call_count; static size_t realloc_call_count; static size_t free_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_calloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_calloc(size_t nmemb, size_t size) { void* result; calloc_call_count++; if (calloc_call_count == when_shall_calloc_fail) { result = NULL; } else { result = calloc(nmemb, size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free_call_count++; free(ptr); } #ifdef __cplusplus } #endif void reset_malloc_calls(void) { malloc_call_count = 0; when_shall_malloc_fail = 0; calloc_call_count = 0; when_shall_calloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; free_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umocktypes_charptr_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); reset_malloc_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_umocktypes_register_type_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* umocktypes_stringify_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_002: [ umocktypes_stringify_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). ] */ TEST_FUNCTION(umocktypes_stringify_charptr_with_an_empty_string_returns_2_quotes) { // arrange const char* input = ""; // act char* result = umocktypes_stringify_charptr(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "\"\"", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_002: [ umocktypes_stringify_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). ] */ TEST_FUNCTION(umocktypes_stringify_charptr_with_a_non_empty_string_returns_the_string_surrounded_by_quotes) { // arrange const char* input = "test42"; // act char* result = umocktypes_stringify_charptr(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "\"test42\"", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_004: [ If value is NULL, umocktypes_stringify_charptr shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_charptr_with_NULL_argument_returns_NULL) { // arrange // act char* result = umocktypes_stringify_charptr(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_003: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_charptr shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_then_umocktypes_stringify_charptr_fails) { // arrange char* input = "test"; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_charptr((const char**)&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_005: [ umocktypes_are_equal_charptr shall compare the 2 strings pointed to by left and right. ] */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_007: [ If left and right are equal, umocktypes_are_equal_charptr shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptr_with_same_pointer_returns_1) { // arrange const char* input = "test42"; // act int result = umocktypes_are_equal_charptr(&input, &input); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_20_001: [ If any of the arguments is NULL, umocktypes_are_equal_charptr shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptrptr_both_NULL_pointer_returns_error) { // arrange // act int result = umocktypes_are_equal_charptr(NULL, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_20_001: [ If any of the arguments is NULL, umocktypes_are_equal_charptr shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptr_with_leftptrptr_NULL_returns_error) { // arrange const char* input = "test42"; // act int result = umocktypes_are_equal_charptr(NULL, &input); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_20_001: [ If any of the arguments is NULL, umocktypes_are_equal_charptr shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptr_with_rightptrptr_NULL_returns_error) { // arrange const char* input = "test42"; // act int result = umocktypes_are_equal_charptr(&input, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_007: [ If left and right are equal, umocktypes_are_equal_charptr shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptr_with_same_NULL_pointer_returns_1) { // arrange const char* input1 = NULL; const char* input2 = NULL; // act int result = umocktypes_are_equal_charptr(&input1, &input2); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_008: [ If only one of the left and right argument is NULL, umocktypes_are_equal_charptr shall return 0. ] */ TEST_FUNCTION(umocktypes_are_equal_charptr_with_left_NULL_returns_0) { // arrange const char* input1 = NULL; const char* input2 = "test42"; // act int result = umocktypes_are_equal_charptr(&input1, &input2); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_008: [ If only one of the left and right argument is NULL, umocktypes_are_equal_charptr shall return 0. ] */ TEST_FUNCTION(umocktypes_are_equal_charptr_with_right_NULL_returns_0) { // arrange const char* input1 = "test42"; const char* input2 = NULL; // act int result = umocktypes_are_equal_charptr(&input1, &input2); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_009: [ If the string pointed to by left is equal to the string pointed to by right, umocktypes_are_equal_charptr shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptr_with_string_being_the_same_returns_1) { // arrange char* input1 = (char*)malloc(7); char* input2 = (char*)malloc(7); int result; (void)strcpy(input1, "test42"); (void)strcpy(input2, "test42"); // act result = umocktypes_are_equal_charptr((const char**)&input1, (const char**)&input2); // assert ASSERT_ARE_EQUAL(int, 1, result); // cleanup free(input1); free(input2); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_010: [ If the string pointed to by left is different than the string pointed to by right, umocktypes_are_equal_charptr shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptr_with_string_being_different_returns_0) { // arrange char* input1 = (char*)malloc(7); char* input2 = (char*)malloc(7); int result; (void)strcpy(input1, "test42"); (void)strcpy(input2, "test43"); // act result = umocktypes_are_equal_charptr((const char**)&input1, (const char**)&input2); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup free(input1); free(input2); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_006: [ The comparison shall be case sensitive. ]*/ TEST_FUNCTION(umocktypes_are_equal_charptr_with_string_being_different_in_case_returns_0) { // arrange char* input1 = (char*)malloc(5); char* input2 = (char*)malloc(5); int result; (void)strcpy(input1, "Test"); (void)strcpy(input2, "test"); // act result = umocktypes_are_equal_charptr((const char**)&input1, (const char**)&input2); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup free(input1); free(input2); } /* umocktypes_copy_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_011: [ umocktypes_copy_charptr shall allocate a new sequence of chars by using umockalloc_malloc. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_012: [ The number of bytes allocated shall accomodate the string pointed to by source. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_016: [ On success umocktypes_copy_charptr shall return 0. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_014: [ umocktypes_copy_charptr shall copy the string pointed to by source to the newly allocated memory. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_015: [ The newly allocated string shall be returned in the destination argument. ]*/ TEST_FUNCTION(umocktypes_copy_charptr_copies_an_empty_string) { // arrange const char* source = ""; char* destination; // act int result = umocktypes_copy_charptr(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", destination); // cleanup free(destination); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_011: [ umocktypes_copy_charptr shall allocate a new sequence of chars by using umockalloc_malloc. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_012: [ The number of bytes allocated shall accomodate the string pointed to by source. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_016: [ On success umocktypes_copy_charptr shall return 0. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_014: [ umocktypes_copy_charptr shall copy the string pointed to by source to the newly allocated memory. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_015: [ The newly allocated string shall be returned in the destination argument. ]*/ TEST_FUNCTION(umocktypes_copy_charptr_copies_a_string) { // arrange const char* source = "test42"; char* destination; // act int result = umocktypes_copy_charptr(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "test42", destination); // cleanup free(destination); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_013: [ If source or destination are NULL, umocktypes_copy_charptr shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_charptr_with_NULL_destination_fails) { // arrange const char* source = "42"; // act int result = umocktypes_copy_charptr(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_013: [ If source or destination are NULL, umocktypes_copy_charptr shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_charptr_with_NULL_source_fails) { // arrange char* destination; // act int result = umocktypes_copy_charptr(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_036: [ If allocating the memory for the new string fails, umocktypes_copy_charptr shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_copy_charptr_fails) { // arrange char* destination; const char* source = "b"; int result; when_shall_malloc_fail = 1; // act result = umocktypes_copy_charptr(&destination, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_017: [ umocktypes_free_charptr shall free the string pointed to by value. ]*/ TEST_FUNCTION(umocktypes_free_charptr_frees_the_string) { // arrange const char* source = "test42"; char* destination; (void)umocktypes_copy_charptr(&destination, &source); // act umocktypes_free_charptr(&destination); // assert ASSERT_ARE_EQUAL(size_t, 1, free_call_count); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_018: [ If value is NULL, umocktypes_free_charptr shall do nothing. ] */ TEST_FUNCTION(umocktypes_free_charptr_with_NULL_does_nothing) { // arrange // act umocktypes_free_charptr(NULL); // assert ASSERT_ARE_EQUAL(size_t, 0, free_call_count); } /* umocktypes_stringify_const_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_019: [ umocktypes_stringify_const_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). ] */ TEST_FUNCTION(umocktypes_stringify_const_charptr_with_an_empty_string_returns_2_quotes) { // arrange const char* input = ""; // act char* result = umocktypes_stringify_const_charptr(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "\"\"", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_019: [ umocktypes_stringify_const_charptr shall return a string containing the string representation of value, enclosed by quotes ("value"). ] */ TEST_FUNCTION(umocktypes_stringify_const_charptr_with_a_non_empty_string_returns_the_string_surrounded_by_quotes) { // arrange const char* input = "test42"; // act char* result = umocktypes_stringify_const_charptr(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "\"test42\"", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_020: [ If value is NULL, umocktypes_stringify_const_charptr shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_const_charptr_with_NULL_argument_returns_NULL) { // arrange // act char* result = umocktypes_stringify_const_charptr(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_021: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_const_charptr shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_then_umocktypes_stringify_const_charptr_fails) { // arrange const char* input = "test"; char* result; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_const_charptr(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_const_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_022: [ umocktypes_are_equal_const_charptr shall compare the 2 strings pointed to by left and right. ] */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_024: [ If left and right are equal, umocktypes_are_equal_const_charptr shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_const_charptr_with_same_pointer_returns_1) { // arrange const char* input = "test42"; // act int result = umocktypes_are_equal_const_charptr(&input, &input); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_022: [ umocktypes_are_equal_const_charptr shall compare the 2 strings pointed to by left and right. ] */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_024: [ If left and right are equal, umocktypes_are_equal_const_charptr shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_const_charptr_with_same_NULL_pointer_returns_1) { // arrange // act int result = umocktypes_are_equal_const_charptr(NULL, NULL); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_025: [ If only one of the left and right argument is NULL, umocktypes_are_equal_const_charptr shall return 0. ] */ TEST_FUNCTION(umocktypes_are_equal_const_charptr_with_left_NULL_returns_0) { // arrange const char* input = "test42"; // act int result = umocktypes_are_equal_const_charptr(NULL, &input); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_025: [ If only one of the left and right argument is NULL, umocktypes_are_equal_const_charptr shall return 0. ] */ TEST_FUNCTION(umocktypes_are_equal_const_charptr_with_right_NULL_returns_0) { // arrange const char* input = "test42"; // act int result = umocktypes_are_equal_const_charptr(&input, NULL); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_026: [ If the string pointed to by left is equal to the string pointed to by right, umocktypes_are_equal_const_charptr shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_const_charptr_with_string_being_the_same_returns_1) { // arrange char* input1 = (char*)malloc(7); char* input2 = (char*)malloc(7); int result; (void)strcpy(input1, "test42"); (void)strcpy(input2, "test42"); // act result = umocktypes_are_equal_const_charptr((const char**)&input1, (const char**)&input2); // assert ASSERT_ARE_EQUAL(int, 1, result); // cleanup free(input1); free(input2); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_027: [ If the string pointed to by left is different than the string pointed to by right, umocktypes_are_equal_const_charptr shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_const_charptr_with_string_being_different_returns_0) { // arrange char* input1 = (char*)malloc(7); char* input2 = (char*)malloc(7); int result; (void)strcpy(input1, "test42"); (void)strcpy(input2, "test43"); // act result = umocktypes_are_equal_const_charptr((const char**)&input1, (const char**)&input2); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup free(input1); free(input2); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_023: [ The comparison shall be case sensitive. ]*/ TEST_FUNCTION(umocktypes_are_equal_const_charptr_with_string_being_different_in_case_returns_0) { // arrange char* input1 = (char*)malloc(5); char* input2 = (char*)malloc(5); int result; (void)strcpy(input1, "Test"); (void)strcpy(input2, "test"); // act result = umocktypes_are_equal_const_charptr((const char**)&input1, (const char**)&input2); // assert ASSERT_ARE_EQUAL(int, 0, result); // cleanup free(input1); free(input2); } /* umocktypes_copy_const_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_028: [ umocktypes_copy_const_charptr shall allocate a new sequence of chars by using umockalloc_malloc. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_029: [ The number of bytes allocated shall accomodate the string pointed to by source. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_032: [ On success umocktypes_copy_const_charptr shall return 0. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_030: [ umocktypes_copy_const_charptr shall copy the string pointed to by source to the newly allocated memory. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_031: [ The newly allocated string shall be returned in the destination argument. ]*/ TEST_FUNCTION(umocktypes_copy_const_charptr_copies_an_empty_string) { // arrange const char* source = ""; const char* destination; // act int result = umocktypes_copy_const_charptr(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "", destination); // cleanup free((void*)destination); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_028: [ umocktypes_copy_const_charptr shall allocate a new sequence of chars by using umockalloc_malloc. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_029: [ The number of bytes allocated shall accomodate the string pointed to by source. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_032: [ On success umocktypes_copy_const_charptr shall return 0. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_030: [ umocktypes_copy_const_charptr shall copy the string pointed to by source to the newly allocated memory. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_031: [ The newly allocated string shall be returned in the destination argument. ]*/ TEST_FUNCTION(umocktypes_copy_const_charptr_copies_a_string) { // arrange const char* source = "test42"; const char* destination; // act int result = umocktypes_copy_const_charptr(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(char_ptr, "test42", destination); // cleanup free((void*)destination); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_033: [ If source or destination are NULL, umocktypes_copy_const_charptr shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_const_charptr_with_NULL_destination_fails) { // arrange const char* source = "42"; // act int result = umocktypes_copy_const_charptr(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_033: [ If source or destination are NULL, umocktypes_copy_const_charptr shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_const_charptr_with_NULL_source_fails) { // arrange const char* destination; // act int result = umocktypes_copy_const_charptr(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_037: [ If allocating the memory for the new string fails, umocktypes_copy_const_charptr shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_copy_const_charptr_fails) { // arrange const char* destination; const char* source = "b"; int result; when_shall_malloc_fail = 1; // act result = umocktypes_copy_const_charptr(&destination, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_const_charptr */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_034: [ umocktypes_free_const_charptr shall free the string pointed to by value. ]*/ TEST_FUNCTION(umocktypes_free_const_charptr_frees_the_string) { // arrange const char* source = "test42"; const char* destination; (void)umocktypes_copy_const_charptr(&destination, &source); // act umocktypes_free_const_charptr(&destination); // assert ASSERT_ARE_EQUAL(size_t, 1, free_call_count); } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_035: [ If value is NULL, umocktypes_free_const_charptr shall do nothing. ] */ TEST_FUNCTION(umocktypes_free_const_charptr_with_NULL_does_nothing) { // arrange // act umocktypes_free_const_charptr(NULL); // assert ASSERT_ARE_EQUAL(size_t, 0, free_call_count); } /* umocktypes_charptr_register_types */ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_001: [ umocktypes_charptr_register_types shall register support for the types char\* and const char\* by using the REGISTER_UMOCK_VALUE_TYPE macro provided by umockc. ]*/ /* Tests_SRS_UMOCKTYPES_CHARPTR_01_038: [ On success, umocktypes_charptr_register_types shall return 0. ]*/ TEST_FUNCTION(umocktypes_charptr_register_types_registers_all_types) { // arrange size_t i; int result; when_shall_umocktypes_register_typecall_fail = 0; umocktypes_register_type_call_result = 0; // act result = umocktypes_charptr_register_types(); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, umocktypes_register_type_call_count); ASSERT_ARE_EQUAL(char_ptr, "char*", umocktypes_register_type_calls[0].type); ASSERT_ARE_EQUAL(char_ptr, "const char*", umocktypes_register_type_calls[1].type); for (i = 0; i < 2; i++) { ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].stringify_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].are_equal_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].copy_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].free_func); } } /* Tests_SRS_UMOCKTYPES_CHARPTR_01_039: [ If registering any of the types fails, umocktypes_charptr_register_types shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_the_underlying_register_fails_umocktypes_charptr_register_types_fails) { size_t i; for (i = 0; i < 2; i++) { // arrange int result; reset_umocktypes_register_type_calls(); umocktypes_register_type_fail_call_result = 1; when_shall_umocktypes_register_typecall_fail = i + 1; // act result = umocktypes_charptr_register_types(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, i + 1, umocktypes_register_type_call_count); } } END_TEST_SUITE(umocktypes_charptr_unittests) umocktypes_stdint_ut/000077500000000000000000000000001362133436400403155ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006601362133436400430570ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_stdint_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypes_stdint_ut) set(${theseTestsName}_test_files umocktypes_stdint_ut.c ) set(${theseTestsName}_c_files umocktypes_stdint_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005121362133436400414030ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_stdint_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umocktypes_stdint_unittests, failedTestCount); return failedTestCount; } umocktypes_stdint_mocked.c000066400000000000000000000010161362133436400455710ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_stdint_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umocktypes_stdint.c" umocktypes_stdint_ut.c000066400000000000000000001341461362133436400447720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_stdint_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #endif #include "testrunnerswitcher.h" #include "umocktypes.h" #include "umocktypes_stdint.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct umocktypes_register_type_CALL_TAG { char* type; UMOCKTYPE_STRINGIFY_FUNC stringify_func; UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func; UMOCKTYPE_COPY_FUNC copy_func; UMOCKTYPE_FREE_FUNC free_func; } umocktypes_register_type_CALL; static umocktypes_register_type_CALL* umocktypes_register_type_calls; static size_t umocktypes_register_type_call_count; static size_t when_shall_umocktypes_register_typecall_fail; static int umocktypes_register_type_call_result; static int umocktypes_register_type_fail_call_result; int umocktypes_register_type(const char* type, UMOCKTYPE_STRINGIFY_FUNC stringify_func, UMOCKTYPE_ARE_EQUAL_FUNC are_equal_func, UMOCKTYPE_COPY_FUNC copy_func, UMOCKTYPE_FREE_FUNC free_func) { int result; umocktypes_register_type_CALL* new_calls = (umocktypes_register_type_CALL*)realloc(umocktypes_register_type_calls, sizeof(umocktypes_register_type_CALL) * (umocktypes_register_type_call_count + 1)); if (new_calls != NULL) { size_t typename_length = strlen(type); umocktypes_register_type_calls = new_calls; umocktypes_register_type_calls[umocktypes_register_type_call_count].type = (char*)malloc(typename_length + 1); (void)memcpy(umocktypes_register_type_calls[umocktypes_register_type_call_count].type, type, typename_length + 1); umocktypes_register_type_calls[umocktypes_register_type_call_count].stringify_func = stringify_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].are_equal_func = are_equal_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].copy_func = copy_func; umocktypes_register_type_calls[umocktypes_register_type_call_count].free_func = free_func; umocktypes_register_type_call_count++; } if (when_shall_umocktypes_register_typecall_fail == umocktypes_register_type_call_count) { result = umocktypes_register_type_fail_call_result; } else { result = umocktypes_register_type_call_result; } return result; } void reset_umocktypes_register_type_calls(void) { if (umocktypes_register_type_calls != NULL) { size_t i; for (i = 0; i < umocktypes_register_type_call_count; i++) { free(umocktypes_register_type_calls[i].type); } free(umocktypes_register_type_calls); umocktypes_register_type_calls = NULL; } umocktypes_register_type_call_count = 0; } static size_t malloc_call_count; static size_t calloc_call_count; static size_t realloc_call_count; static size_t free_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_calloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_calloc(size_t nmemb, size_t size) { void* result; calloc_call_count++; if (calloc_call_count == when_shall_calloc_fail) { result = NULL; } else { result = calloc(nmemb, size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free_call_count++; free(ptr); } #ifdef __cplusplus } #endif void reset_malloc_calls(void) { malloc_call_count = 0; when_shall_malloc_fail = 0; calloc_call_count = 0; when_shall_calloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; free_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umocktypes_stdint_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); reset_malloc_calls(); } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_umocktypes_register_type_calls(); TEST_MUTEX_RELEASE(test_mutex); } /* umocktypes_stdint_register_types */ /* Tests_SRS_UMOCKTYPES_STDINT_01_001: [ umocktypes_stdint_register_types shall register support for all the types in the module. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_002: [ On success, umocktypes_stdint_register_types shall return 0. ]*/ TEST_FUNCTION(umocktypes_stdint_register_types_registers_all_types) { // arrange size_t i; int result; umocktypes_register_type_fail_call_result = 0; // act result = umocktypes_stdint_register_types(); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 8, umocktypes_register_type_call_count); ASSERT_ARE_EQUAL(char_ptr, "uint8_t", umocktypes_register_type_calls[0].type); ASSERT_ARE_EQUAL(char_ptr, "int8_t", umocktypes_register_type_calls[1].type); ASSERT_ARE_EQUAL(char_ptr, "uint16_t", umocktypes_register_type_calls[2].type); ASSERT_ARE_EQUAL(char_ptr, "int16_t", umocktypes_register_type_calls[3].type); ASSERT_ARE_EQUAL(char_ptr, "uint32_t", umocktypes_register_type_calls[4].type); ASSERT_ARE_EQUAL(char_ptr, "int32_t", umocktypes_register_type_calls[5].type); ASSERT_ARE_EQUAL(char_ptr, "uint64_t", umocktypes_register_type_calls[6].type); ASSERT_ARE_EQUAL(char_ptr, "int64_t", umocktypes_register_type_calls[7].type); for (i = 0; i < 8; i++) { ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].stringify_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].are_equal_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].copy_func); ASSERT_IS_NOT_NULL(umocktypes_register_type_calls[i].free_func); } } /* Tests_SRS_UMOCKTYPES_STDINT_01_003: [ If registering any of the types fails, umocktypes_stdint_register_types shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_the_underlying_register_fails_umocktypes_stdint_register_types_fails) { size_t i; for (i = 0; i < 1; i++) { // arrange int result; reset_umocktypes_register_type_calls(); umocktypes_register_type_fail_call_result = 1; when_shall_umocktypes_register_typecall_fail = i + 1; // act result = umocktypes_stdint_register_types(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, i + 1, umocktypes_register_type_call_count); } } /* umocktypes_stringify_uint8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_004: [ umocktypes_stringify_uint8_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint8_t_with_0_value) { // arrange uint8_t input = 0; // act char* result = umocktypes_stringify_uint8_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_004: [ umocktypes_stringify_uint8_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint8_t_with_positive_value) { // arrange uint8_t input = 255; // act char* result = umocktypes_stringify_uint8_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "255", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_005: [ If value is NULL, umocktypes_stringify_uint8_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_uint8_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_uint8_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_006: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint8_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_uint8_t_fails) { // arrange char* result; uint8_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_uint8_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_uint8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_008: [ umocktypes_are_equal_uint8_t shall compare the 2 uint8_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_010: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint8_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint8_t_with_2_equal_values_returns_1) { // arrange uint8_t left = 0x42; uint8_t right = 0x42; // act int result = umocktypes_are_equal_uint8_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_011: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint8_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint8_t_with_2_different_values_returns_0) { // arrange uint8_t left = 0x42; uint8_t right = 0x43; // act int result = umocktypes_are_equal_uint8_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_009: [ If any of the arguments is NULL, umocktypes_are_equal_uint8_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint8_t_with_NULL_left_fails) { // arrange uint8_t right = 0x43; // act int result = umocktypes_are_equal_uint8_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_009: [ If any of the arguments is NULL, umocktypes_are_equal_uint8_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint8_t_with_NULL_right_fails) { // arrange uint8_t left = 0x42; // act int result = umocktypes_are_equal_uint8_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_uint8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_012: [ umocktypes_copy_uint8_t shall copy the uint8_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_013: [ On success umocktypes_copy_uint8_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_uint8_t_succeeds) { // arrange uint8_t destination = 0; uint8_t source = 0x42; // act int result = umocktypes_copy_uint8_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(uint8_t, source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_014: [ If source or destination are NULL, umocktypes_copy_uint8_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint8_t_with_NULL_destination_fails) { // arrange uint8_t source = 0x42; // act int result = umocktypes_copy_uint8_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_014: [ If source or destination are NULL, umocktypes_copy_uint8_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint8_t_with_NULL_source_fails) { // arrange uint8_t destination = 0; // act int result = umocktypes_copy_uint8_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_uint8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_015: [ umocktypes_free_uint8_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_uint8_t_does_nothing) { // arrange uint8_t value = 0; // act umocktypes_free_uint8_t(&value); // assert // no explicit assert } /* umocktypes_stringify_int8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_016: [ umocktypes_stringify_int8_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int8_t_with_minus_128_value) { // arrange int8_t input = -128; // act char* result = umocktypes_stringify_int8_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-128", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_016: [ umocktypes_stringify_int8_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int8_t_with_127_value) { // arrange int8_t input = 127; // act char* result = umocktypes_stringify_int8_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "127", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_017: [ If value is NULL, umocktypes_stringify_int8_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_int8_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_int8_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_018: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int8_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_int8_t_fails) { // arrange char* result; int8_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_int8_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_int8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_020: [ umocktypes_are_equal_int8_t shall compare the 2 int8_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_022: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int8_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int8_t_with_2_equal_values_returns_1) { // arrange int8_t left = 0x42; int8_t right = 0x42; // act int result = umocktypes_are_equal_int8_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_023: [ If the values pointed to by left and right are different, umocktypes_are_equal_int8_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_int8_t_with_2_different_values_returns_0) { // arrange int8_t left = 0x42; int8_t right = 0x43; // act int result = umocktypes_are_equal_int8_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_021: [ If any of the arguments is NULL, umocktypes_are_equal_int8_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int8_t_with_NULL_left_fails) { // arrange int8_t right = 0x43; // act int result = umocktypes_are_equal_int8_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_021: [ If any of the arguments is NULL, umocktypes_are_equal_int8_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int8_t_with_NULL_right_fails) { // arrange int8_t left = 0x42; // act int result = umocktypes_are_equal_int8_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_int8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_024: [ umocktypes_copy_int8_t shall copy the int8_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_025: [ On success umocktypes_copy_int8_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_int8_t_succeeds) { // arrange int8_t destination = 0; int8_t source = 0x42; // act int result = umocktypes_copy_int8_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int8_t, source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_026: [ If source or destination are NULL, umocktypes_copy_int8_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int8_t_with_NULL_destination_fails) { // arrange int8_t source = 0x42; // act int result = umocktypes_copy_int8_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_026: [ If source or destination are NULL, umocktypes_copy_int8_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int8_t_with_NULL_source_fails) { // arrange int8_t destination = 0; // act int result = umocktypes_copy_int8_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_int8_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_027: [ umocktypes_free_int8_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_int8_t_does_nothing) { // arrange int8_t value = 0; // act umocktypes_free_int8_t(&value); // assert // no explicit assert } /* umocktypes_stringify_uint16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_028: [ umocktypes_stringify_uint16_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint16_t_with_0_value) { // arrange uint16_t input = 0; // act char* result = umocktypes_stringify_uint16_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_028: [ umocktypes_stringify_uint16_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint16_t_with_65535_value) { // arrange uint16_t input = 65535; // act char* result = umocktypes_stringify_uint16_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "65535", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_029: [ If value is NULL, umocktypes_stringify_uint16_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_uint16_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_uint16_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_030: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint16_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_uint16_t_fails) { // arrange char* result; uint16_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_uint16_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_uint16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_032: [ umocktypes_are_equal_uint16_t shall compare the 2 uint16_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_034: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint16_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint16_t_with_2_equal_values_returns_1) { // arrange uint16_t left = 0x42; uint16_t right = 0x42; // act int result = umocktypes_are_equal_uint16_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_035: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint16_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint16_t_with_2_different_values_returns_0) { // arrange uint16_t left = 0x42; uint16_t right = 0x43; // act int result = umocktypes_are_equal_uint16_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_033: [ If any of the arguments is NULL, umocktypes_are_equal_uint16_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint16_t_with_NULL_left_fails) { // arrange uint16_t right = 0x43; // act int result = umocktypes_are_equal_uint16_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_033: [ If any of the arguments is NULL, umocktypes_are_equal_uint16_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint16_t_with_NULL_right_fails) { // arrange uint16_t left = 0x42; // act int result = umocktypes_are_equal_uint16_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_uint16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_036: [ umocktypes_copy_uint16_t shall copy the uint16_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_037: [ On success umocktypes_copy_uint16_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_uint16_t_succeeds) { // arrange uint16_t destination = 0; uint16_t source = 0x42; // act int result = umocktypes_copy_uint16_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(uint32_t, (uint32_t)source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_038: [ If source or destination are NULL, umocktypes_copy_uint16_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint16_t_with_NULL_destination_fails) { // arrange uint16_t source = 0x42; // act int result = umocktypes_copy_uint16_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_038: [ If source or destination are NULL, umocktypes_copy_uint16_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint16_t_with_NULL_source_fails) { // arrange uint16_t destination = 0; // act int result = umocktypes_copy_uint16_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_uint16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_039: [ umocktypes_free_uint16_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_uint16_t_does_nothing) { // arrange uint16_t value = 0; // act umocktypes_free_uint16_t(&value); // assert // no explicit assert } /* umocktypes_stringify_int16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_040: [ umocktypes_stringify_int16_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int16_t_with_minus_32768_value) { // arrange int16_t input = -32768; // act char* result = umocktypes_stringify_int16_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-32768", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_040: [ umocktypes_stringify_int16_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int16_t_with_32767_value) { // arrange int16_t input = 32767; // act char* result = umocktypes_stringify_int16_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "32767", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_041: [ If value is NULL, umocktypes_stringify_int16_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_int16_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_int16_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_042: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int16_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_int16_t_fails) { // arrange char* result; int16_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_int16_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_int16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_044: [ umocktypes_are_equal_int16_t shall compare the 2 int16_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_046: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int16_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int16_t_with_2_equal_values_returns_1) { // arrange int16_t left = 0x42; int16_t right = 0x42; // act int result = umocktypes_are_equal_int16_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_047: [ If the values pointed to by left and right are different, umocktypes_are_equal_int16_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_int16_t_with_2_different_values_returns_0) { // arrange int16_t left = 0x42; int16_t right = 0x43; // act int result = umocktypes_are_equal_int16_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_045: [ If any of the arguments is NULL, umocktypes_are_equal_int16_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int16_t_with_NULL_left_fails) { // arrange int16_t right = 0x43; // act int result = umocktypes_are_equal_int16_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_045: [ If any of the arguments is NULL, umocktypes_are_equal_int16_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int16_t_with_NULL_right_fails) { // arrange int16_t left = 0x42; // act int result = umocktypes_are_equal_int16_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_int16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_048: [ umocktypes_copy_int16_t shall copy the int16_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_049: [ On success umocktypes_copy_int16_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_int16_t_succeeds) { // arrange int16_t destination = 0; int16_t source = 0x42; // act int result = umocktypes_copy_int16_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int16_t, source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_050: [ If source or destination are NULL, umocktypes_copy_int16_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int16_t_with_NULL_destination_fails) { // arrange int16_t source = 0x42; // act int result = umocktypes_copy_int16_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_050: [ If source or destination are NULL, umocktypes_copy_int16_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int16_t_with_NULL_source_fails) { // arrange int16_t destination = 0; // act int result = umocktypes_copy_int16_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_int16_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_051: [ umocktypes_free_int16_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_int16_t_does_nothing) { // arrange int16_t value = 0; // act umocktypes_free_int16_t(&value); // assert // no explicit assert } /* umocktypes_stringify_uint32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_052: [ umocktypes_stringify_uint32_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint32_t_with_0_value) { // arrange uint32_t input = 0; // act char* result = umocktypes_stringify_uint32_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_052: [ umocktypes_stringify_uint32_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint32_t_with_32_bit_max_value) { // arrange uint32_t input = UINT32_MAX; // act char* result = umocktypes_stringify_uint32_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "4294967295", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_053: [ If value is NULL, umocktypes_stringify_uint32_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_uint32_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_uint32_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_054: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint32_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_uint32_t_fails) { // arrange char* result; uint32_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_uint32_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_uint32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_056: [ umocktypes_are_equal_uint32_t shall compare the 2 uint32_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_058: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint32_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint32_t_with_2_equal_values_returns_1) { // arrange uint32_t left = 0x42; uint32_t right = 0x42; // act int result = umocktypes_are_equal_uint32_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_059: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint32_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint32_t_with_2_different_values_returns_0) { // arrange uint32_t left = 0x42; uint32_t right = 0x43; // act int result = umocktypes_are_equal_uint32_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_057: [ If any of the arguments is NULL, umocktypes_are_equal_uint32_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint32_t_with_NULL_left_fails) { // arrange uint32_t right = 0x43; // act int result = umocktypes_are_equal_uint32_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_057: [ If any of the arguments is NULL, umocktypes_are_equal_uint32_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint32_t_with_NULL_right_fails) { // arrange uint32_t left = 0x42; // act int result = umocktypes_are_equal_uint32_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_uint32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_060: [ umocktypes_copy_uint32_t shall copy the uint32_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_061: [ On success umocktypes_copy_uint32_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_uint32_t_succeeds) { // arrange uint32_t destination = 0; uint32_t source = 0x42; // act int result = umocktypes_copy_uint32_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(uint32_t, source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_062: [ If source or destination are NULL, umocktypes_copy_uint32_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint32_t_with_NULL_destination_fails) { // arrange uint32_t source = 0x42; // act int result = umocktypes_copy_uint32_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_062: [ If source or destination are NULL, umocktypes_copy_uint32_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint32_t_with_NULL_source_fails) { // arrange uint32_t destination = 0; // act int result = umocktypes_copy_uint32_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_uint32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_063: [ umocktypes_free_uint32_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_uint32_t_does_nothing) { // arrange uint32_t value = 0; // act umocktypes_free_uint32_t(&value); // assert // no explicit assert } /* umocktypes_stringify_int32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_064: [ umocktypes_stringify_int32_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int32_t_with_min_value) { // arrange int32_t input = INT32_MIN; // act char* result = umocktypes_stringify_int32_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-2147483648", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_064: [ umocktypes_stringify_int32_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int32_t_with_max_value) { // arrange int32_t input = INT32_MAX; // act char* result = umocktypes_stringify_int32_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "2147483647", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_065: [ If value is NULL, umocktypes_stringify_int32_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_int32_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_int32_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_066: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int32_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_int32_t_fails) { // arrange char* result; int32_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_int32_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_int32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_068: [ umocktypes_are_equal_int32_t shall compare the 2 int32_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_070: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int32_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int32_t_with_2_equal_values_returns_1) { // arrange int32_t left = 0x42; int32_t right = 0x42; // act int result = umocktypes_are_equal_int32_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_071: [ If the values pointed to by left and right are different, umocktypes_are_equal_int32_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_int32_t_with_2_different_values_returns_0) { // arrange int32_t left = 0x42; int32_t right = 0x43; // act int result = umocktypes_are_equal_int32_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_069: [ If any of the arguments is NULL, umocktypes_are_equal_int32_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int32_t_with_NULL_left_fails) { // arrange int32_t right = 0x43; // act int result = umocktypes_are_equal_int32_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_069: [ If any of the arguments is NULL, umocktypes_are_equal_int32_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int32_t_with_NULL_right_fails) { // arrange int32_t left = 0x42; // act int result = umocktypes_are_equal_int32_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_int32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_072: [ umocktypes_copy_int32_t shall copy the int32_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_073: [ On success umocktypes_copy_int32_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_int32_t_succeeds) { // arrange int32_t destination = 0; int32_t source = 0x42; // act int result = umocktypes_copy_int32_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(int32_t, source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_074: [ If source or destination are NULL, umocktypes_copy_int32_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int32_t_with_NULL_destination_fails) { // arrange int32_t source = 0x42; // act int result = umocktypes_copy_int32_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_074: [ If source or destination are NULL, umocktypes_copy_int32_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int32_t_with_NULL_source_fails) { // arrange int32_t destination = 0; // act int result = umocktypes_copy_int32_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_int32_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_075: [ umocktypes_free_int32_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_int32_t_does_nothing) { // arrange int32_t value = 0; // act umocktypes_free_int32_t(&value); // assert // no explicit assert } /* umocktypes_stringify_uint64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_076: [ umocktypes_stringify_uint64_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint64_t_with_min_value) { // arrange uint64_t input = 0; // act char* result = umocktypes_stringify_uint64_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "0", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_076: [ umocktypes_stringify_uint64_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_uint64_t_with_max_value) { // arrange uint64_t input = UINT64_MAX; // act char* result = umocktypes_stringify_uint64_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "18446744073709551615", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_077: [ If value is NULL, umocktypes_stringify_uint64_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_uint64_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_uint64_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_078: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_uint64_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_uint64_t_fails) { // arrange char* result; uint64_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_uint64_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_uint64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_080: [ umocktypes_are_equal_uint64_t shall compare the 2 uint64_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_082: [ If the values pointed to by left and right are equal, umocktypes_are_equal_uint64_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint64_t_with_2_equal_values_returns_1) { // arrange uint64_t left = 0x42; uint64_t right = 0x42; // act int result = umocktypes_are_equal_uint64_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_083: [ If the values pointed to by left and right are different, umocktypes_are_equal_uint64_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint64_t_with_2_different_values_returns_0) { // arrange uint64_t left = 0x42; uint64_t right = 0x43; // act int result = umocktypes_are_equal_uint64_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_081: [ If any of the arguments is NULL, umocktypes_are_equal_uint64_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint64_t_with_NULL_left_fails) { // arrange uint64_t right = 0x43; // act int result = umocktypes_are_equal_uint64_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_081: [ If any of the arguments is NULL, umocktypes_are_equal_uint64_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_uint64_t_with_NULL_right_fails) { // arrange uint64_t left = 0x42; // act int result = umocktypes_are_equal_uint64_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_uint64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_084: [ umocktypes_copy_uint64_t shall copy the uint64_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_085: [ On success umocktypes_copy_uint64_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_uint64_t_succeeds) { // arrange uint64_t destination = 0; uint64_t source = 0x42; // act int result = umocktypes_copy_uint64_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(uint64_t, source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_086: [ If source or destination are NULL, umocktypes_copy_uint64_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint64_t_with_NULL_destination_fails) { // arrange uint64_t source = 0x42; // act int result = umocktypes_copy_uint64_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_086: [ If source or destination are NULL, umocktypes_copy_uint64_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_uint64_t_with_NULL_source_fails) { // arrange uint64_t destination = 0; // act int result = umocktypes_copy_uint64_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_uint64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_087: [ umocktypes_free_uint64_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_uint64_t_does_nothing) { // arrange uint64_t value = 0; // act umocktypes_free_uint64_t(&value); // assert // no explicit assert } /* umocktypes_stringify_int64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_088: [ umocktypes_stringify_int64_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int64_t_with_min_value) { // arrange int64_t input = INT64_MIN; // act char* result = umocktypes_stringify_int64_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "-9223372036854775808", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_088: [ umocktypes_stringify_int64_t shall return the string representation of value. ]*/ TEST_FUNCTION(umocktypes_stringify_int64_t_with_max_value) { // arrange int64_t input = INT64_MAX; // act char* result = umocktypes_stringify_int64_t(&input); // assert ASSERT_ARE_EQUAL(char_ptr, "9223372036854775807", result); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_089: [ If value is NULL, umocktypes_stringify_int64_t shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_int64_t_with_NULL_fails) { // arrange // act char* result = umocktypes_stringify_int64_t(NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_090: [ If allocating a new string to hold the string representation fails, umocktypes_stringify_int64_t shall return NULL. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_stringify_int64_t_fails) { // arrange char* result; int64_t input = 127; when_shall_malloc_fail = 1; // act result = umocktypes_stringify_int64_t(&input); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal_int64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_092: [ umocktypes_are_equal_int64_t shall compare the 2 int64_t values pointed to by left and right. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_094: [ If the values pointed to by left and right are equal, umocktypes_are_equal_int64_t shall return 1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int64_t_with_2_equal_values_returns_1) { // arrange int64_t left = 0x42; int64_t right = 0x42; // act int result = umocktypes_are_equal_int64_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_095: [ If the values pointed to by left and right are different, umocktypes_are_equal_int64_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_int64_t_with_2_different_values_returns_0) { // arrange int64_t left = 0x42; int64_t right = 0x43; // act int result = umocktypes_are_equal_int64_t(&left, &right); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_093: [ If any of the arguments is NULL, umocktypes_are_equal_int64_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int64_t_with_NULL_left_fails) { // arrange int64_t right = 0x43; // act int result = umocktypes_are_equal_int64_t(NULL, &right); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_093: [ If any of the arguments is NULL, umocktypes_are_equal_int64_t shall return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_int64_t_with_NULL_right_fails) { // arrange int64_t left = 0x42; // act int result = umocktypes_are_equal_int64_t(&left, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* umocktypes_copy_int64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_096: [ umocktypes_copy_int64_t shall copy the int64_t value from source to destination. ]*/ /* Tests_SRS_UMOCKTYPES_STDINT_01_097: [ On success umocktypes_copy_int64_t shall return 0. ]*/ TEST_FUNCTION(umocktypes_copy_int64_t_succeeds) { // arrange int64_t destination = 0; int64_t source = 0x42; // act int result = umocktypes_copy_int64_t(&destination, &source); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(uint64_t, source, destination); } /* Tests_SRS_UMOCKTYPES_STDINT_01_098: [ If source or destination are NULL, umocktypes_copy_int64_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int64_t_with_NULL_destination_fails) { // arrange int64_t source = 0x42; // act int result = umocktypes_copy_int64_t(NULL, &source); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_STDINT_01_098: [ If source or destination are NULL, umocktypes_copy_int64_t shall return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_copy_int64_t_with_NULL_source_fails) { // arrange int64_t destination = 0; // act int result = umocktypes_copy_int64_t(&destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_free_int64_t */ /* Tests_SRS_UMOCKTYPES_STDINT_01_099: [ umocktypes_free_int64_t shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_int64_t_does_nothing) { // arrange int64_t value = 0; // act umocktypes_free_int64_t(&value); // assert // no explicit assert } END_TEST_SUITE(umocktypes_stdint_unittests) umocktypes_ut/000077500000000000000000000000001362133436400367305ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006331362133436400414720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypes_ut) set(${theseTestsName}_test_files umocktypes_ut.c ) set(${theseTestsName}_c_files umocktypes_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005031362133436400400160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umocktypes_unittests, failedTestCount); return failedTestCount; } umocktypes_mocked.c000066400000000000000000000010071362133436400426170ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umocktypes.c" umocktypes_ut.c000066400000000000000000002031311362133436400420070ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #include #else #include #include #include #endif #include "testrunnerswitcher.h" #include "umocktypes.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct umocktypename_normalize_CALL_TAG { char* type_name; } umocktypename_normalize_CALL; #define umocktypename_normalize_max_calls 5 static umocktypename_normalize_CALL* umocktypename_normalize_calls; static size_t umocktypename_normalize_call_count; static const char* umocktypename_normalize_call_result[umocktypename_normalize_max_calls]; typedef struct test_stringify_func_testtype_CALL_TAG { const void* value; } test_stringify_func_testtype_CALL; static test_stringify_func_testtype_CALL* test_stringify_func_testtype_calls; static size_t test_stringify_func_testtype_call_count; static const char* test_stringify_func_testtype_call_result; typedef struct test_are_equal_func_testtype_CALL_TAG { const void* left; const void* right; } test_are_equal_func_testtype_CALL; static test_are_equal_func_testtype_CALL* test_are_equal_func_testtype_calls; static size_t test_are_equal_func_testtype_call_count; static int test_are_equal_func_testtype_call_result; typedef struct test_copy_func_testtype_CALL_TAG { const void* destination; const void* source; } test_copy_func_testtype_CALL; static test_copy_func_testtype_CALL* test_copy_func_testtype_calls; static size_t test_copy_func_testtype_call_count; static int test_copy_func_testtype_call_result; typedef struct test_free_func_testtype_CALL_TAG { void* value; } test_free_func_testtype_CALL; static test_free_func_testtype_CALL* test_free_func_testtype_calls; static size_t test_free_func_testtype_call_count; static size_t malloc_call_count; static size_t calloc_call_count; static size_t realloc_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_calloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_calloc(size_t nmemb, size_t size) { void* result; calloc_call_count++; if (calloc_call_count == when_shall_calloc_fail) { result = NULL; } else { result = calloc(nmemb, size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free(ptr); } char* umocktypename_normalize(const char* type_name) { char* result; umocktypename_normalize_CALL* new_calls = (umocktypename_normalize_CALL*)realloc(umocktypename_normalize_calls, sizeof(umocktypename_normalize_CALL) * (umocktypename_normalize_call_count + 1)); if (new_calls != NULL) { size_t type_name_length = strlen(type_name); umocktypename_normalize_calls = new_calls; umocktypename_normalize_calls[umocktypename_normalize_call_count].type_name = (char*)malloc(type_name_length + 1); (void)memcpy(umocktypename_normalize_calls[umocktypename_normalize_call_count].type_name, type_name, type_name_length + 1); umocktypename_normalize_call_count++; } if (umocktypename_normalize_call_result[umocktypename_normalize_call_count - 1] != NULL) { size_t result_length = strlen(umocktypename_normalize_call_result[umocktypename_normalize_call_count - 1]); result = (char*)malloc(result_length + 1); (void)memcpy(result, umocktypename_normalize_call_result[umocktypename_normalize_call_count - 1], result_length + 1); } else { result = NULL; } return result; } #ifdef __cplusplus } #endif static char* test_stringify_func_testtype(const void* value) { char* result; test_stringify_func_testtype_CALL* new_calls = (test_stringify_func_testtype_CALL*)realloc(test_stringify_func_testtype_calls, sizeof(test_stringify_func_testtype_CALL) * (test_stringify_func_testtype_call_count + 1)); if (new_calls != NULL) { test_stringify_func_testtype_calls = new_calls; test_stringify_func_testtype_calls[test_stringify_func_testtype_call_count].value = value; test_stringify_func_testtype_call_count++; } if (test_stringify_func_testtype_call_result != NULL) { size_t result_length = strlen(test_stringify_func_testtype_call_result); result = (char*)malloc(result_length + 1); (void)memcpy(result, test_stringify_func_testtype_call_result, result_length + 1); } else { result = NULL; } return result; } static int test_copy_func_testtype(void* destination, const void* source) { test_copy_func_testtype_CALL* new_calls = (test_copy_func_testtype_CALL*)realloc(test_copy_func_testtype_calls, sizeof(test_copy_func_testtype_CALL) * (test_copy_func_testtype_call_count + 1)); if (new_calls != NULL) { test_copy_func_testtype_calls = new_calls; test_copy_func_testtype_calls[test_copy_func_testtype_call_count].destination = destination; test_copy_func_testtype_calls[test_copy_func_testtype_call_count].source = source; test_copy_func_testtype_call_count++; } return test_copy_func_testtype_call_result; } void test_free_func_testtype(void* value) { test_free_func_testtype_CALL* new_calls = (test_free_func_testtype_CALL*)realloc(test_free_func_testtype_calls, sizeof(test_free_func_testtype_CALL) * (test_free_func_testtype_call_count + 1)); if (new_calls != NULL) { test_free_func_testtype_calls = new_calls; test_free_func_testtype_calls[test_free_func_testtype_call_count].value = value; test_free_func_testtype_call_count++; } } int test_are_equal_func_testtype(const void* left, const void* right) { test_are_equal_func_testtype_CALL* new_calls = (test_are_equal_func_testtype_CALL*)realloc(test_are_equal_func_testtype_calls, sizeof(test_are_equal_func_testtype_CALL) * (test_are_equal_func_testtype_call_count + 1)); if (new_calls != NULL) { test_are_equal_func_testtype_calls = new_calls; test_are_equal_func_testtype_calls[test_are_equal_func_testtype_call_count].left = left; test_are_equal_func_testtype_calls[test_are_equal_func_testtype_call_count].right = right; test_are_equal_func_testtype_call_count++; } return test_are_equal_func_testtype_call_result; } static char* test_stringify_func_testtype_2(const void* value) { (void)value; return NULL; } static int test_copy_func_testtype_2(void* destination, const void* source) { (void)destination; (void)source; return 0; } void test_free_func_testtype_2(void* value) { (void)value; } int test_are_equal_func_testtype_2(const void* left, const void* right) { (void)left; (void)right; return 0; } static void* test_value_1 = (void*)0x4242; static void* test_value_2 = (void*)0x4243; void reset_umocktypename_normalize_calls(void) { if (umocktypename_normalize_calls != NULL) { size_t i; for (i = 0; i < umocktypename_normalize_call_count; i++) { free(umocktypename_normalize_calls[i].type_name); } free(umocktypename_normalize_calls); umocktypename_normalize_calls = NULL; } umocktypename_normalize_call_count = 0; } void reset_test_stringify_testtype_calls(void) { if (test_stringify_func_testtype_calls != NULL) { free(test_stringify_func_testtype_calls); test_stringify_func_testtype_calls = NULL; } test_stringify_func_testtype_call_count = 0; } void reset_test_are_equal_testtype_calls(void) { if (test_are_equal_func_testtype_calls != NULL) { free(test_are_equal_func_testtype_calls); test_are_equal_func_testtype_calls = NULL; } test_are_equal_func_testtype_call_count = 0; } void reset_test_copy_testtype_calls(void) { if (test_copy_func_testtype_calls != NULL) { free(test_copy_func_testtype_calls); test_copy_func_testtype_calls = NULL; } test_copy_func_testtype_call_count = 0; } void reset_test_free_testtype_calls(void) { if (test_free_func_testtype_calls != NULL) { free(test_free_func_testtype_calls); test_free_func_testtype_calls = NULL; } test_free_func_testtype_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umocktypes_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { size_t i; int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); umocktypename_normalize_calls = NULL; umocktypename_normalize_call_count = 0; for (i = 0; i < umocktypename_normalize_max_calls; i++) { umocktypename_normalize_call_result[i] = NULL; } test_stringify_func_testtype_calls = NULL; test_stringify_func_testtype_call_count = 0; test_stringify_func_testtype_call_result = NULL; test_are_equal_func_testtype_calls = NULL; test_are_equal_func_testtype_call_count = 0; test_are_equal_func_testtype_call_result = 1; test_copy_func_testtype_calls = NULL; test_copy_func_testtype_call_count = 0; test_copy_func_testtype_call_result = 1; test_free_func_testtype_calls = NULL; test_free_func_testtype_call_count = 0; malloc_call_count = 0; when_shall_malloc_fail = 0; calloc_call_count = 0; when_shall_calloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_umocktypename_normalize_calls(); reset_test_stringify_testtype_calls(); reset_test_are_equal_testtype_calls(); reset_test_copy_testtype_calls(); reset_test_free_testtype_calls(); umocktypes_deinit(); TEST_MUTEX_RELEASE(test_mutex); } /* umocktypes_init */ /* Tests_SRS_UMOCKTYPES_01_001: [ umocktypes_init shall initialize the umocktypes module. ] */ /* Tests_SRS_UMOCKTYPES_01_003: [ On success umocktypes_init shall return 0. ]*/ TEST_FUNCTION(umocktypes_init_initializes_the_module) { // arrange // act int result = umocktypes_init(); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_01_002: [ After initialization the list of registered type shall be empty. ] */ TEST_FUNCTION(after_umocktypes_init_no_type_shall_be_registered) { // arrange int result; (void)umocktypes_init(); (void)umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); umocktypes_deinit(); (void)umocktypes_init(); // act result = umocktypes_are_equal("testtype", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); } /* Tests_SRS_UMOCKTYPES_01_004: [ umocktypes_init after another umocktypes_init without deinitializing the module shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_init_after_umocktypes_init_fails) { // arrange int result; (void)umocktypes_init(); // act result = umocktypes_init(); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_deinit */ /* Tests_SRS_UMOCKTYPES_01_005: [ umocktypes_deinit shall free all resources associated with the registered types and shall leave the module in a state where another init is possible. ]*/ TEST_FUNCTION(umocktypes_deinit_after_umocktypes_init_deinitializes_the_module) { // arrange (void)umocktypes_init(); (void)umocktypes_register_type("testtype1", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); (void)umocktypes_register_type("testtype2", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // act umocktypes_deinit(); // assert // no explicit assert } /* Tests_SRS_UMOCKTYPES_01_005: [ umocktypes_deinit shall free all resources associated with the registered types and shall leave the module in a state where another init is possible. ]*/ TEST_FUNCTION(umocktypes_deinit_after_umocktypes_init_when_no_types_registered_deinitializes_the_module) { // arrange (void)umocktypes_init(); // act umocktypes_deinit(); // assert // no explicit assert } /* Tests_SRS_UMOCKTYPES_01_040: [ An umocktypes_init call after deinit shall succeed provided all underlying calls succeed. ]*/ TEST_FUNCTION(umocktypes_init_after_umocktypes_deinit_succeeds) { // arrange int result; (void)umocktypes_init(); (void)umocktypes_register_type("testtype1", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); (void)umocktypes_register_type("testtype2", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); umocktypes_deinit(); // act result = umocktypes_init(); // assert ASSERT_ARE_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_01_006: [ If the module was not initialized, umocktypes_deinit shall do nothing. ]*/ TEST_FUNCTION(umocktypes_deinit_if_the_module_was_not_initialized_shall_do_nothing) { // arrange // act umocktypes_deinit(); // assert // no explicit assert } /* umocktypes_register_type */ /* Tests_SRS_UMOCKTYPES_01_007: [ umocktypes_register_type shall register an interface made out of the stringify, are equal, copy and free functions for the type identified by the argument type. ] */ /* Tests_SRS_UMOCKTYPES_01_008: [ On success umocktypes_register_type shall return 0. ]*/ /* Tests_SRS_UMOCKTYPES_01_034: [ Before registering, the type string shall be normalized. ] */ TEST_FUNCTION(umocktypes_register_type_when_module_is_initialized_succeeds) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "testtype"; // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "testtype", umocktypename_normalize_calls[0].type_name); } /* Tests_SRS_UMOCKTYPES_01_009: [ If any of the arguments is NULL, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_with_NULL_type_fails) { // arrange int result; (void)umocktypes_init(); // act result = umocktypes_register_type(NULL, test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_009: [ If any of the arguments is NULL, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_with_NULL_stringify_function_fails) { // arrange int result; (void)umocktypes_init(); // act result = umocktypes_register_type("testtype", NULL, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_009: [ If any of the arguments is NULL, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_with_NULL_are_equal_function_fails) { // arrange int result; (void)umocktypes_init(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, NULL, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_009: [ If any of the arguments is NULL, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_with_NULL_copy_function_fails) { // arrange int result; (void)umocktypes_init(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, NULL, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_009: [ If any of the arguments is NULL, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_with_NULL_free_function_fails) { // arrange int result; (void)umocktypes_init(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_010: [ If the type has already been registered with the same function pointers then umocktypes_register_type shall succeed and return 0. ]*/ TEST_FUNCTION(umocktypes_register_type_2_times_on_the_same_type_with_the_same_functions_succeeds) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "testtype"; (void)umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "testtype", umocktypename_normalize_calls[0].type_name); } /* Tests_SRS_UMOCKTYPES_01_011: [ If the type has already been registered but at least one of the function pointers is different, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_2_times_on_the_same_type_with_different_stringify_function_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "testtype"; (void)umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype_2, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "testtype", umocktypename_normalize_calls[0].type_name); } /* Tests_SRS_UMOCKTYPES_01_011: [ If the type has already been registered but at least one of the function pointers is different, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_2_times_on_the_same_type_with_different_are_equal_function_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "testtype"; (void)umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype_2, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "testtype", umocktypename_normalize_calls[0].type_name); } /* Tests_SRS_UMOCKTYPES_01_011: [ If the type has already been registered but at least one of the function pointers is different, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_2_times_on_the_same_type_with_different_copy_function_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "testtype"; (void)umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype_2, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "testtype", umocktypename_normalize_calls[0].type_name); } /* Tests_SRS_UMOCKTYPES_01_011: [ If the type has already been registered but at least one of the function pointers is different, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_2_times_on_the_same_type_with_different_free_function_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "testtype"; (void)umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act result = umocktypes_register_type("testtype", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype_2); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "testtype", umocktypename_normalize_calls[0].type_name); } /* Tests_SRS_UMOCKTYPES_01_045: [ If normalizing the typename fails, umocktypes_register_type shall fail and return a non-zero value. ] */ TEST_FUNCTION(when_normalizing_the_type_fails_umocktypes_register_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = NULL; // act result = umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); } /* Tests_SRS_UMOCKTYPES_01_050: [ If umocktypes_register_type is called when the module is not initialized, umocktypes_register_type shall fail and return a non zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_when_the_module_is_not_initialized_fails) { // arrange int result; umocktypename_normalize_call_result[0] = "char*"; // act result = umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_01_012: [ If an error occurs allocating memory for the newly registered type, umocktypes_register_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_allocating_memory_fails_umocktypes_register_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; when_shall_realloc_fail = 1; // act result = umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_register_alias_type */ /* Tests_SRS_UMOCKTYPES_01_053: [ umocktypes_register_alias_type shall register a new alias type for the type "is_type". ]*/ /* Tests_SRS_UMOCKTYPES_01_054: [ On success, umocktypes_register_alias_type shall return 0. ]*/ /* Tests_SRS_UMOCKTYPES_01_058: [ Before looking it up, is_type shall be normalized by using umocktypename_normalize. ] */ /* Tests_SRS_UMOCKTYPES_01_059: [ Before adding it as alias, type shall be normalized by using umocktypename_normalize. ]*/ TEST_FUNCTION(umocktypes_register_alias_type_registers_an_alias_type) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; umocktypes_register_type("char*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); umocktypename_normalize_call_result[1] = "char*"; umocktypename_normalize_call_result[2] = "PSTR"; // act result = umocktypes_register_alias_type("PSTR", "char*"); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 3, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_055: [ If any of the arguments is NULL, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_type_is_NULL_umocktypes_register_alias_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; umocktypes_register_type("char*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // act result = umocktypes_register_alias_type(NULL, "char*"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_01_055: [ If any of the arguments is NULL, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_is_type_is_NULL_umocktypes_register_alias_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; umocktypes_register_type("char*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // act result = umocktypes_register_alias_type("PSTR", NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* Tests_SRS_UMOCKTYPES_01_057: [ If is_type was not already registered, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_is_type_was_not_registered_umocktypes_register_alias_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; // act result = umocktypes_register_alias_type("PSTR", "char*"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_060: [ If umocktypename_normalize fails, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_umocktypename_normalize_fails_for_is_type_then_umocktypes_register_alias_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; umocktypes_register_type("char*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); umocktypename_normalize_call_result[1] = NULL; // act result = umocktypes_register_alias_type("PSTR", "char*"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 2, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_060: [ If umocktypename_normalize fails, umocktypes_register_alias_type shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_umocktypename_normalize_fails_for_type_then_umocktypes_register_alias_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; umocktypes_register_type("char*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); umocktypename_normalize_call_result[1] = "char*"; umocktypename_normalize_call_result[2] = NULL; // act result = umocktypes_register_alias_type("PSTR", "char*"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 3, umocktypename_normalize_call_count); } /* Tests_SRS_UMOCKTYPES_01_061: [ If umocktypes_register_alias_type is called when the module is not initialized, umocktypes_register_type shall fail and return a non zero value. ] */ TEST_FUNCTION(umocktypes_register_alias_when_module_is_not_initialized_fails) { // arrange // act int result = umocktypes_register_alias_type("PSTR", "char*"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); } /* umocktypes_stringify */ /* Tests_SRS_UMOCKTYPES_01_013: [ umocktypes_stringify shall return a char\* with the string representation of the value argument. ]*/ /* Tests_SRS_UMOCKTYPES_01_014: [ The string representation shall be obtained by calling the stringify function registered for the type identified by the argument type. ]*/ /* Tests_SRS_UMOCKTYPES_01_015: [ On success umocktypes_stringify shall return the char\* produced by the underlying stringify function for type (passed in umocktypes_register_type). ]*/ /* Tests_SRS_UMOCKTYPES_01_035: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ TEST_FUNCTION(umocktypes_stringify_calls_the_underlying_stringify) { // arrange char* result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; test_stringify_func_testtype_call_result = "blahblah"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act result = umocktypes_stringify("char *", test_value_1); // assert ASSERT_ARE_EQUAL(char_ptr, "blahblah", result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_stringify_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_stringify_func_testtype_calls[0].value); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_01_016: [ If any of the arguments is NULL, umocktypes_stringify shall fail and return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_with_NULL_value_fails) { // arrange char* result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act result = umocktypes_stringify("char *", NULL); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_01_016: [ If any of the arguments is NULL, umocktypes_stringify shall fail and return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_with_NULL_type_fails) { // arrange char* result; (void)umocktypes_init(); // act result = umocktypes_stringify(NULL, test_value_1); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_01_017: [ If type can not be found in the registered types list maintained by the module, umocktypes_stringify shall fail and return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_with_a_type_that_is_not_registered_fails) { // arrange char* result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char*"; // act result = umocktypes_stringify("const char *", test_value_1); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_01_044: [ If normalizing the typename fails, umocktypes_stringify shall fail and return NULL. ]*/ TEST_FUNCTION(when_normalizing_the_type_fails_umocktypes_stringify_fails) { // arrange char* result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = NULL; // act result = umocktypes_stringify("char *", test_value_1); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_01_049: [ If umocktypes_stringify is called when the module is not initialized, umocktypes_stringify shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_when_the_module_is_not_initialized_fails) { // arrange char* result; umocktypename_normalize_call_result[0] = "char*"; test_stringify_func_testtype_call_result = "blahblah"; // act result = umocktypes_stringify("char *", test_value_1); // assert ASSERT_IS_NULL(result); } /* Tests_SRS_UMOCKTYPES_01_063: [ If type is a pointer type and type was not registered then umocktypes_stringify shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_stringify_with_an_unregistered_pointer_type_defaults_to_void_ptr) { // arrange char* result; umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "char*"; test_stringify_func_testtype_call_result = "blahblah"; // act result = umocktypes_stringify("char *", test_value_1); // assert ASSERT_ARE_EQUAL(char_ptr, "blahblah", result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_stringify_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_stringify_func_testtype_calls[0].value); // cleanup free(result); } /* Tests_SRS_UMOCKTYPES_01_063: [ If type is a pointer type and type was not registered then umocktypes_stringify shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_stringify_with_an_unregistered_non_pointer_type_fails) { // arrange char* result; umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "char"; test_stringify_func_testtype_call_result = "blahblah"; // act result = umocktypes_stringify("char", test_value_1); // assert ASSERT_IS_NULL(result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_stringify_func_testtype_call_count); } /* umocktypes_are_equal */ /* Tests_SRS_UMOCKTYPES_01_018: [ umocktypes_are_equal shall evaluate whether 2 values are equal. ]*/ /* Tests_SRS_UMOCKTYPES_01_019: [ umocktypes_are_equal shall call the underlying are_equal function for the type identified by the argument type (passed in umocktypes_register_type). ] */ /* Tests_SRS_UMOCKTYPES_01_021: [ If the underlying are_equal function indicates the types are equal, umocktypes_are_equal shall return 1. ]*/ /* Tests_SRS_UMOCKTYPES_01_036: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_2_equal_values_returns_1) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = 1; // act result = umocktypes_are_equal("char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_are_equal_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_are_equal_func_testtype_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_value_2, test_are_equal_func_testtype_calls[0].right); } /* Tests_SRS_UMOCKTYPES_01_018: [ umocktypes_are_equal shall evaluate whether 2 values are equal. ]*/ /* Tests_SRS_UMOCKTYPES_01_019: [ umocktypes_are_equal shall call the underlying are_equal function for the type identified by the argument type (passed in umocktypes_register_type). ] */ /* Tests_SRS_UMOCKTYPES_01_022: [ If the underlying are_equal function indicates the types are not equal, umocktypes_are_equal shall return 0. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_2_different_values_returns_0) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal("char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_are_equal_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_are_equal_func_testtype_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_value_2, test_are_equal_func_testtype_calls[0].right); } /* Tests_SRS_UMOCKTYPES_01_023: [ If any of the arguments is NULL, umocktypes_are_equal shall fail and return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_NULL_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal(NULL, test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_023: [ If any of the arguments is NULL, umocktypes_are_equal shall fail and return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_NULL_left_argument_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal("char *", NULL, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_023: [ If any of the arguments is NULL, umocktypes_are_equal shall fail and return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_NULL_right_argument_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal("char *", test_value_1, NULL); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_024: [ If type can not be found in the registered types list maintained by the module, umocktypes_are_equal shall fail and return -1. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_a_not_registered_type_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char*"; test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal("const char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_043: [ If normalizing the typename fails, umocktypes_are_equal shall fail and return -1. ]*/ TEST_FUNCTION(when_normalizing_the_typename_fails_umocktypes_are_equal_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = NULL; test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal("const char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_046: [ If umocktypes_are_equal is called when the module is not initialized, umocktypes_are_equal shall return -1. ] */ TEST_FUNCTION(umocktypes_are_equal_when_the_module_is_not_initialized_fails) { // arrange int result; umocktypename_normalize_call_result[0] = "char*"; test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal("char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_020: [ If the underlying are_equal function fails,, umocktypes_are_equal shall fail and return -1. ] */ TEST_FUNCTION(when_the_underlying_are_equal_call_fails_with_minus_1_umocktypes_are_equal_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = -1; // act result = umocktypes_are_equal("char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_are_equal_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_are_equal_func_testtype_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_value_2, test_are_equal_func_testtype_calls[0].right); } /* Tests_SRS_UMOCKTYPES_01_020: [ If the underlying are_equal function fails,, umocktypes_are_equal shall fail and return -1. ] */ TEST_FUNCTION(when_the_underlying_are_equal_call_fails_with_2_umocktypes_are_equal_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = 2; // act result = umocktypes_are_equal("char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_are_equal_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_are_equal_func_testtype_calls[0].left); ASSERT_ARE_EQUAL(void_ptr, test_value_2, test_are_equal_func_testtype_calls[0].right); } /* Tests_SRS_UMOCKTYPES_01_051: [ If the pointer values for left and right are equal, umocktypes_are_equal shall return 1 without calling the underlying are_equal function. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_2_equal_pointers_returns_1) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_are_equal_func_testtype_call_result = 1; // act result = umocktypes_are_equal("char *", test_value_1, test_value_1); // assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_064: [ If type is a pointer type and type was not registered then umocktypes_are_equal shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_a_pointer_type_that_was_not_registered_defaults_to_void_ptr) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "char*"; test_are_equal_func_testtype_call_result = 1; // act result = umocktypes_are_equal("char *", test_value_1, test_value_1); // assert ASSERT_ARE_EQUAL(int, 1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_064: [ If type is a pointer type and type was not registered then umocktypes_are_equal shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_are_equal_with_a_non_pointer_type_that_was_not_registered_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "char"; test_are_equal_func_testtype_call_result = 1; // act result = umocktypes_are_equal("char", test_value_1, test_value_1); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* umocktypes_copy */ /* Tests_SRS_UMOCKTYPES_01_025: [ umocktypes_copy shall copy the value of the source into the destination argument. ]*/ /* Tests_SRS_UMOCKTYPES_01_026: [ The copy shall be done by calling the underlying copy function (passed in umocktypes_register_type) for the type identified by the type argument. ]*/ /* Tests_SRS_UMOCKTYPES_01_052: [ On success, umocktypes_copy shall return 0. ]*/ /* Tests_SRS_UMOCKTYPES_01_037: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ TEST_FUNCTION(umocktypes_copy_calls_the_underlying_copy_function) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("char *", destination, test_value_1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_copy_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, destination, test_copy_func_testtype_calls[0].destination); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_copy_func_testtype_calls[0].source); } /* Tests_SRS_UMOCKTYPES_01_027: [ If any of the arguments is NULL, umocktypes_copy shall return -1. ]*/ TEST_FUNCTION(umocktypes_copy_with_NULL_type_fails) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy(NULL, destination, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_027: [ If any of the arguments is NULL, umocktypes_copy shall return -1. ]*/ TEST_FUNCTION(umocktypes_copy_with_NULL_destination_fails) { // arrange int result; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("char *", NULL, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_027: [ If any of the arguments is NULL, umocktypes_copy shall return -1. ]*/ TEST_FUNCTION(umocktypes_copy_with_NULL_source_fails) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("char *", destination, NULL); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_028: [ If the underlying copy fails, umocktypes_copy shall return -1. ]*/ TEST_FUNCTION(when_the_underlying_copy_fails_then_umocktypes_copy_fails) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); test_copy_func_testtype_call_result = -1; // act result = umocktypes_copy("char *", destination, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_copy_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, destination, test_copy_func_testtype_calls[0].destination); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_copy_func_testtype_calls[0].source); } /* Tests_SRS_UMOCKTYPES_01_029: [ If type can not be found in the registered types list maintained by the module, umocktypes_copy shall fail and return -1. ]*/ TEST_FUNCTION(when_the_type_is_not_found_in_the_registered_types_list_umocktypes_copy_fails) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char*"; test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("const char *", destination, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_042: [ If normalizing the typename fails, umocktypes_copy shall fail and return a non-zero value. ]*/ TEST_FUNCTION(when_normalizing_the_type_fails_then_umocktypes_copy_fails) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = NULL; test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("const char *", destination, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_047: [ If umocktypes_copy is called when the module is not initialized, umocktypes_copy shall fail and return a non zero value. ]*/ TEST_FUNCTION(when_the_module_is_not_initialized_then_umocktypes_copy_fails) { // arrange int result; void* destination = (void*)0x4245; umocktypename_normalize_call_result[0] = NULL; test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("const char *", destination, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_065: [ If type is a pointer type and type was not registered then umocktypes_copy shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_copy_with_a_pointer_type_that_was_not_registered_defaults_to_void_ptr) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char*"; test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("const char *", destination, test_value_1); // assert ASSERT_ARE_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_copy_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, destination, test_copy_func_testtype_calls[0].destination); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_copy_func_testtype_calls[0].source); } /* Tests_SRS_UMOCKTYPES_01_065: [ If type is a pointer type and type was not registered then umocktypes_copy shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_copy_with_a_non_pointer_type_that_was_not_registered_fails) { // arrange int result; void* destination = (void*)0x4245; (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char"; test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("const char", destination, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* umocktypes_free */ /* Tests_SRS_UMOCKTYPES_01_030: [ umocktypes_free shall free a value previously allocated with umocktypes_copy. ]*/ /* Tests_SRS_UMOCKTYPES_01_033: [ The free shall be done by calling the underlying free function (passed in umocktypes_register_type) for the type identified by the type argument. ]*/ /* Tests_SRS_UMOCKTYPES_01_038: [ Before looking it up, the type string shall be normalized by calling umocktypename_normalize. ]*/ TEST_FUNCTION(umocktypes_free_calls_the_underlying_free_function) { // arrange (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act umocktypes_free("char *", test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_free_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_free_func_testtype_calls[0].value); } /* Tests_SRS_UMOCKTYPES_01_031: [ If any of the arguments is NULL, umocktypes_free shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_with_NULL_type_fails) { // arrange (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act umocktypes_free(NULL, test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_free_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_031: [ If any of the arguments is NULL, umocktypes_free shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_with_NULL_value_fails) { // arrange (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); // act umocktypes_free("char *", NULL); // assert ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_free_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_032: [ If type can not be found in the registered types list maintained by the module, umocktypes_free shall do nothing. ]*/ TEST_FUNCTION(when_the_type_is_not_found_in_the_registered_type_list_umocktypes_free_fails) { // arrange (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char*"; // act umocktypes_free("const char *", test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_free_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_041: [ If normalizing the typename fails, umocktypes_free shall do nothing. ]*/ TEST_FUNCTION(when_normalizing_the_type_fails_then_umocktypes_free_does_not_free_anything) { // arrange (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "char*"; (void)umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = NULL; // act umocktypes_free("const char *", test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_free_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_048: [ If umocktypes_free is called when the module is not initialized, umocktypes_free shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_when_the_module_is_not_initialized_does_not_free_anything) { // arrange umocktypename_normalize_call_result[0] = "char *"; // act umocktypes_free("char *", test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_free_func_testtype_call_count); } /* Tests_SRS_UMOCKTYPES_01_066: [ If type is a pointer type and type was not registered then umocktypes_free shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_free_with_a_pointer_type_that_is_not_registered_defaults_to_void_ptr) { // arrange (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char*"; // act umocktypes_free("const char *", test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char *", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 1, test_free_func_testtype_call_count); ASSERT_ARE_EQUAL(void_ptr, test_value_1, test_free_func_testtype_calls[0].value); } /* Tests_SRS_UMOCKTYPES_01_066: [ If type is a pointer type and type was not registered then umocktypes_free shall execute as if type is void*. ]*/ TEST_FUNCTION(umocktypes_free_with_a_non_pointer_type_that_is_not_registered_does_not_free_anything) { // arrange (void)umocktypes_init(); umocktypename_normalize_call_result[0] = "void*"; (void)umocktypes_register_type("void*", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); reset_umocktypename_normalize_calls(); umocktypename_normalize_call_result[0] = "const char"; // act umocktypes_free("const char", test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 1, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(char_ptr, "const char", umocktypename_normalize_calls[0].type_name); ASSERT_ARE_EQUAL(size_t, 0, test_free_func_testtype_call_count); } END_TEST_SUITE(umocktypes_unittests) umocktypes_wout_init_ut/000077500000000000000000000000001362133436400410315ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/testsCMakeLists.txt000066400000000000000000000006571362133436400436010ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_wout_init_ut#Copyright (c) Microsoft. All rights reserved. #Licensed under the MIT license. See LICENSE file in the project root for full license information. cmake_minimum_required(VERSION 2.8.11) set(theseTestsName umocktypes_wout_init_ut) set(${theseTestsName}_test_files umocktypes_wout_init_ut.c ) set(${theseTestsName}_c_files umocktypes_mocked.c ) set(${theseTestsName}_h_files ) umockc_build_test_artifacts(${theseTestsName} ON) main.c000066400000000000000000000005201362133436400421160ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_wout_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "testrunnerswitcher.h" int main(void) { size_t failedTestCount = 0; RUN_TEST_SUITE(umocktypes_without_init_unittests, failedTestCount); return failedTestCount; } umocktypes_mocked.c000066400000000000000000000010071362133436400447200ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_wout_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include extern void* mock_malloc(size_t size); extern void* mock_realloc(void* ptr, size_t size); extern void mock_free(void* ptr); #define umockalloc_malloc(size) mock_malloc(size) #define umockalloc_realloc(ptr, size) mock_realloc(ptr, size) #define umockalloc_free(ptr) mock_free(ptr) /* include code under test */ #include "../../src/umocktypes.c" umocktypes_wout_init_ut.c000066400000000000000000000335171362133436400462220ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tests/umocktypes_wout_init_ut// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #ifdef __cplusplus #include #include #else #include #include #endif #include "testrunnerswitcher.h" #include "umocktypes.h" #include "umock_log.h" void UMOCK_LOG(const char* format, ...) { (void)format; } typedef struct umocktypename_normalize_CALL_TAG { char* type_name; } umocktypename_normalize_CALL; static umocktypename_normalize_CALL* umocktypename_normalize_calls; static size_t umocktypename_normalize_call_count; static const char* umocktypename_normalize_call_result; typedef struct test_stringify_func_testtype_CALL_TAG { const void* value; } test_stringify_func_testtype_CALL; static test_stringify_func_testtype_CALL* test_stringify_func_testtype_calls; static size_t test_stringify_func_testtype_call_count; static const char* test_stringify_func_testtype_call_result; typedef struct test_are_equal_func_testtype_CALL_TAG { const void* left; const void* right; } test_are_equal_func_testtype_CALL; static test_are_equal_func_testtype_CALL* test_are_equal_func_testtype_calls; static size_t test_are_equal_func_testtype_call_count; static int test_are_equal_func_testtype_call_result; typedef struct test_copy_func_testtype_CALL_TAG { const void* destination; const void* source; } test_copy_func_testtype_CALL; static test_copy_func_testtype_CALL* test_copy_func_testtype_calls; static size_t test_copy_func_testtype_call_count; static int test_copy_func_testtype_call_result; typedef struct test_free_func_testtype_CALL_TAG { void* value; } test_free_func_testtype_CALL; static test_free_func_testtype_CALL* test_free_func_testtype_calls; static size_t test_free_func_testtype_call_count; static size_t malloc_call_count; static size_t calloc_call_count; static size_t realloc_call_count; static size_t when_shall_malloc_fail; static size_t when_shall_calloc_fail; static size_t when_shall_realloc_fail; #ifdef __cplusplus extern "C" { #endif void* mock_malloc(size_t size) { void* result; malloc_call_count++; if (malloc_call_count == when_shall_malloc_fail) { result = NULL; } else { result = malloc(size); } return result; } void* mock_calloc(size_t nmemb, size_t size) { void* result; calloc_call_count++; if (calloc_call_count == when_shall_calloc_fail) { result = NULL; } else { result = calloc(nmemb, size); } return result; } void* mock_realloc(void* ptr, size_t size) { void* result; realloc_call_count++; if (realloc_call_count == when_shall_realloc_fail) { result = NULL; } else { result = realloc(ptr, size); } return result; } void mock_free(void* ptr) { free(ptr); } char* umocktypename_normalize(const char* type_name) { char* result; umocktypename_normalize_CALL* new_calls = (umocktypename_normalize_CALL*)realloc(umocktypename_normalize_calls, sizeof(umocktypename_normalize_CALL) * (umocktypename_normalize_call_count + 1)); if (new_calls != NULL) { size_t type_name_length = strlen(type_name); umocktypename_normalize_calls = new_calls; umocktypename_normalize_calls[umocktypename_normalize_call_count].type_name = (char*)malloc(type_name_length + 1); (void)memcpy(umocktypename_normalize_calls[umocktypename_normalize_call_count].type_name, type_name, type_name_length + 1); umocktypename_normalize_call_count++; } if (umocktypename_normalize_call_result != NULL) { size_t result_length = strlen(umocktypename_normalize_call_result); result = (char*)malloc(result_length + 1); (void)memcpy(result, umocktypename_normalize_call_result, result_length + 1); } else { result = NULL; } return result; } #ifdef __cplusplus } #endif static char* test_stringify_func_testtype(const void* value) { char* result; test_stringify_func_testtype_CALL* new_calls = (test_stringify_func_testtype_CALL*)realloc(test_stringify_func_testtype_calls, sizeof(test_stringify_func_testtype_CALL) * (test_stringify_func_testtype_call_count + 1)); if (new_calls != NULL) { test_stringify_func_testtype_calls = new_calls; test_stringify_func_testtype_calls[test_stringify_func_testtype_call_count].value = value; test_stringify_func_testtype_call_count++; } if (test_stringify_func_testtype_call_result != NULL) { size_t result_length = strlen(test_stringify_func_testtype_call_result); result = (char*)malloc(result_length + 1); (void)memcpy(result, test_stringify_func_testtype_call_result, result_length + 1); } else { result = NULL; } return result; } static int test_copy_func_testtype(void* destination, const void* source) { test_copy_func_testtype_CALL* new_calls = (test_copy_func_testtype_CALL*)realloc(test_copy_func_testtype_calls, sizeof(test_copy_func_testtype_CALL) * (test_copy_func_testtype_call_count + 1)); if (new_calls != NULL) { test_copy_func_testtype_calls = new_calls; test_copy_func_testtype_calls[test_copy_func_testtype_call_count].destination = destination; test_copy_func_testtype_calls[test_copy_func_testtype_call_count].source = source; test_copy_func_testtype_call_count++; } return test_copy_func_testtype_call_result; } void test_free_func_testtype(void* value) { test_free_func_testtype_CALL* new_calls = (test_free_func_testtype_CALL*)realloc(test_free_func_testtype_calls, sizeof(test_free_func_testtype_CALL) * (test_free_func_testtype_call_count + 1)); if (new_calls != NULL) { test_free_func_testtype_calls = new_calls; test_free_func_testtype_calls[test_free_func_testtype_call_count].value = value; test_free_func_testtype_call_count++; } } int test_are_equal_func_testtype(const void* left, const void* right) { test_are_equal_func_testtype_CALL* new_calls = (test_are_equal_func_testtype_CALL*)realloc(test_are_equal_func_testtype_calls, sizeof(test_are_equal_func_testtype_CALL) * (test_are_equal_func_testtype_call_count + 1)); if (new_calls != NULL) { test_are_equal_func_testtype_calls = new_calls; test_are_equal_func_testtype_calls[test_are_equal_func_testtype_call_count].left = left; test_are_equal_func_testtype_calls[test_are_equal_func_testtype_call_count].right = right; test_are_equal_func_testtype_call_count++; } return test_are_equal_func_testtype_call_result; } static void* test_value_1 = (void*)0x4242; static void* test_value_2 = (void*)0x4243; void reset_umocktypename_normalize_calls(void) { if (umocktypename_normalize_calls != NULL) { size_t i; for (i = 0; i < umocktypename_normalize_call_count; i++) { free(umocktypename_normalize_calls[i].type_name); } free(umocktypename_normalize_calls); umocktypename_normalize_calls = NULL; } umocktypename_normalize_call_count = 0; } void reset_test_stringify_testtype_calls(void) { if (test_stringify_func_testtype_calls != NULL) { free(test_stringify_func_testtype_calls); test_stringify_func_testtype_calls = NULL; } test_stringify_func_testtype_call_count = 0; } void reset_test_are_equal_testtype_calls(void) { if (test_are_equal_func_testtype_calls != NULL) { free(test_are_equal_func_testtype_calls); test_are_equal_func_testtype_calls = NULL; } test_are_equal_func_testtype_call_count = 0; } void reset_test_copy_testtype_calls(void) { if (test_copy_func_testtype_calls != NULL) { free(test_copy_func_testtype_calls); test_copy_func_testtype_calls = NULL; } test_copy_func_testtype_call_count = 0; } void reset_test_free_testtype_calls(void) { if (test_free_func_testtype_calls != NULL) { free(test_free_func_testtype_calls); test_free_func_testtype_calls = NULL; } test_free_func_testtype_call_count = 0; } static TEST_MUTEX_HANDLE test_mutex; static TEST_MUTEX_HANDLE global_mutex; BEGIN_TEST_SUITE(umocktypes_without_init_unittests) TEST_SUITE_INITIALIZE(suite_init) { TEST_INITIALIZE_MEMORY_DEBUG(global_mutex); test_mutex = TEST_MUTEX_CREATE(); ASSERT_IS_NOT_NULL(test_mutex); } TEST_SUITE_CLEANUP(suite_cleanup) { TEST_MUTEX_DESTROY(test_mutex); TEST_DEINITIALIZE_MEMORY_DEBUG(global_mutex); } TEST_FUNCTION_INITIALIZE(test_function_init) { int mutex_acquire_result = TEST_MUTEX_ACQUIRE(test_mutex); ASSERT_ARE_EQUAL(int, 0, mutex_acquire_result); umocktypename_normalize_calls = NULL; umocktypename_normalize_call_count = 0; umocktypename_normalize_call_result = NULL; test_stringify_func_testtype_calls = NULL; test_stringify_func_testtype_call_count = 0; test_stringify_func_testtype_call_result = NULL; test_are_equal_func_testtype_calls = NULL; test_are_equal_func_testtype_call_count = 0; test_are_equal_func_testtype_call_result = 1; test_copy_func_testtype_calls = NULL; test_copy_func_testtype_call_count = 0; test_copy_func_testtype_call_result = 1; test_free_func_testtype_calls = NULL; test_free_func_testtype_call_count = 0; malloc_call_count = 0; when_shall_malloc_fail = 0; calloc_call_count = 0; when_shall_calloc_fail = 0; realloc_call_count = 0; when_shall_realloc_fail = 0; } TEST_FUNCTION_CLEANUP(test_function_cleanup) { reset_umocktypename_normalize_calls(); reset_test_stringify_testtype_calls(); reset_test_are_equal_testtype_calls(); reset_test_copy_testtype_calls(); reset_test_free_testtype_calls(); umocktypes_deinit(); TEST_MUTEX_RELEASE(test_mutex); } /* umocktypes_deinit */ /* Tests_SRS_UMOCKTYPES_01_006: [ If the module was not initialized, umocktypes_deinit shall do nothing. ]*/ TEST_FUNCTION(umocktypes_deinit_if_the_module_was_not_initialized_shall_do_nothing) { // arrange // act umocktypes_deinit(); // assert // no explicit assert } /* umocktypes_register_type */ /* Tests_SRS_UMOCKTYPES_01_050: [ If umocktypes_register_type is called when the module is not initialized, umocktypes_register_type shall fail and return a non zero value. ]*/ TEST_FUNCTION(umocktypes_register_type_when_the_module_is_not_initialized_fails) { // arrange int result; umocktypename_normalize_call_result = "char*"; // act result = umocktypes_register_type("char *", test_stringify_func_testtype, test_are_equal_func_testtype, test_copy_func_testtype, test_free_func_testtype); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); } /* umocktypes_register_alias_type */ /* Tests_SRS_UMOCKTYPES_01_061: [ If umocktypes_register_alias_type is called when the module is not initialized, umocktypes_register_type shall fail and return a non zero value. ] */ TEST_FUNCTION(umocktypes_register_alias_when_module_is_not_initialized_fails) { // arrange // act int result = umocktypes_register_alias_type("PSTR", "char*"); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); } /* umocktypes_stringify */ /* Tests_SRS_UMOCKTYPES_01_049: [ If umocktypes_stringify is called when the module is not initialized, umocktypes_stringify shall return NULL. ]*/ TEST_FUNCTION(umocktypes_stringify_when_the_module_is_not_initialized_fails) { // arrange char* result; umocktypename_normalize_call_result = "char*"; test_stringify_func_testtype_call_result = "blahblah"; // act result = umocktypes_stringify("char *", test_value_1); // assert ASSERT_IS_NULL(result); } /* umocktypes_are_equal */ /* Tests_SRS_UMOCKTYPES_01_046: [ If umocktypes_are_equal is called when the module is not initialized, umocktypes_are_equal shall return -1. ] */ TEST_FUNCTION(umocktypes_are_equal_when_the_module_is_not_initialized_fails) { // arrange int result; umocktypename_normalize_call_result = "char*"; test_are_equal_func_testtype_call_result = 0; // act result = umocktypes_are_equal("char *", test_value_1, test_value_2); // assert ASSERT_ARE_EQUAL(int, -1, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_are_equal_func_testtype_call_count); } /* umocktypes_copy */ /* Tests_SRS_UMOCKTYPES_01_047: [ If umocktypes_copy is called when the module is not initialized, umocktypes_copy shall fail and return a non zero value. ]*/ TEST_FUNCTION(when_the_module_is_not_initialized_then_umocktypes_copy_fails) { // arrange int result; void* destination = (void*)0x4245; umocktypename_normalize_call_result = NULL; test_copy_func_testtype_call_result = 0; // act result = umocktypes_copy("const char *", destination, test_value_1); // assert ASSERT_ARE_NOT_EQUAL(int, 0, result); ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_copy_func_testtype_call_count); } /* umocktypes_free */ /* Tests_SRS_UMOCKTYPES_01_048: [ If umocktypes_free is called when the module is not initialized, umocktypes_free shall do nothing. ]*/ TEST_FUNCTION(umocktypes_free_when_the_module_is_not_initialized_does_not_free_anything) { // arrange umocktypename_normalize_call_result = "char *"; // act umocktypes_free("char *", test_value_1); // assert ASSERT_ARE_EQUAL(size_t, 0, umocktypename_normalize_call_count); ASSERT_ARE_EQUAL(size_t, 0, test_free_func_testtype_call_count); } END_TEST_SUITE(umocktypes_without_init_unittests) tools/000077500000000000000000000000001362133436400340135ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-ckick_jenkins.cmd000066400000000000000000000106511362133436400371450ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/umock-c/tools@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set build-root=%current-path%\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM check that we have a valid argument if "%1" equ "" ( set jenkins_job=_integrate-into-develop ) else if /i "%1" equ "c" ( set jenkins_job=_integrate-into-develop-c-and-wrappers ) else if /i "%1" equ "csharp" ( set jenkins_job=_integrate-into-develop-csharp ) else if /i "%1" equ "java" ( set jenkins_job=_integrate-into-develop-java ) else if /i "%1" equ "node" ( set jenkins_job=_integrate-into-develop-node ) else ( echo Usage: echo kick_jenkins echo or echo "kick_jenkins c | csharp | java | node" exit /b 1 ) REM check that we have java handy call :checkExists java if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! REM check that jenkins-cli.jar is in the repository's tools folder if not exist %build-root%\tools\jenkins-cli.jar ( echo jenkins-cli does not exist echo Downloading from repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar powershell -Command "Invoke-WebRequest http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar -OutFile %build-root%\tools\jenkins-cli.jar" if not !ERRORLEVEL!==0 ( echo Failed downloading jenkins-cli.jar echo Use the following link to manually download it into the tools folder of your repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar exit /b 1 ) ) REM find current branch for /f "usebackq tokens=*" %%i in (`git symbolic-ref -q HEAD`) do set "current_branch_ref=%%i" if defined current_branch_ref set "current_branch=%current_branch_ref:refs/heads/=%" REM handle detached HEAD if not defined current_branch ( echo You're not on any branch! Aborting... goto :eof ) REM Must be on a topic branch when running this script set __exit=1 if not "%current_branch%"=="master" if not "%current_branch%"=="develop" set __exit=0 if %__exit%==1 ( echo You cannot call this script from 'develop' or 'master'. Change to a topic branch first. Aborting... goto :eof ) REM find tracking branch for /f "usebackq tokens=*" %%i in (`git rev-parse --symbolic-full-name --abbrev-ref @{u}`) do set "tracking_branch=%%i" if not defined tracking_branch ( echo Branch ^'%current_branch%^' is not tracking a remote branch! First try ^'git branch -u ^/^^' to set tracking info. Aborting... goto :eof ) for /f "usebackq tokens=*" %%i in (`git config branch.%current_branch%.remote`) do set "remote=%%i" if not defined remote ( REM should never happen... echo Cannot isolate remote name for tracking branch ^'%tracking_branch%^'! Aborting... goto :eof ) REM get the tracking branch name only e.g., origin/topic -> topic for /f "usebackq tokens=*" %%i in (`call echo %%tracking_branch:%remote%/^=%%`) do set "tracking_name=%%i" REM find repo url for /f "usebackq tokens=*" %%i in (`git ls-remote --heads --get-url %remote%`) do set "repo_url=%%i" if not defined repo_url ( echo Cannot find the remote repository URL! Aborting... goto :eof ) echo **************************************************************** echo commit_id: %current_branch% echo repo_url: %repo_url% echo remote: %remote% echo trackingN: %tracking_name% echo jenkinJob: %jenkins_job% echo **************************************************************** REM kick off the build! java -jar "%build-root%"\tools\jenkins-cli.jar -s http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/ build %jenkins_job% -p COMMIT_ID=%tracking_name% -p AZURE_REPO=%repo_url% -p BRANCH_TO_MERGE_TO=develop -s -v rem ----------------------------------------------------------------------------- rem -- done rem ----------------------------------------------------------------------------- goto :eof rem ----------------------------------------------------------------------------- rem -- helper subroutines rem ----------------------------------------------------------------------------- :checkExists where %~1 >nul 2>nul if not !ERRORLEVEL!==0 ( echo "%~1" not found. Please make sure that "%~1" is installed and available in the path. exit /b !ERRORLEVEL! ) goto :eof azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/thirdpartynotice.txt000066400000000000000000000707671362133436400335120ustar00rootroot00000000000000Third Party Notices for Azure IoT SDKs project This project incorporates material from the project(s) listed below (collectively, "Third Party Code"). Microsoft Corporation is not the original author of the Third Party Code. The original copyright notice and license, under which Microsoft Corporation received such Third Party Code, are set out below. This Third Party Code is licensed to you under their original license terms set forth below. Microsoft Corporation reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. 1. WolfSSL, obtained from https://www.wolfssl.com/wolfSSL/Home.html GNU GENERAL PUBLIC LICENSE Version 2, June 1991 ============================================================ Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. ========================================================= Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 2. OpenSSL, obtained from https://github.com/openssl/openssl.git LICENSE ISSUES ============== The OpenSSL toolkit stays under a dual license, i.e. both the conditions of the OpenSSL License and the original SSLeay license apply to the toolkit. See below for the actual license texts. Actually both licenses are BSD-style Open Source licenses. In case of any license issues related to OpenSSL please contact openssl-core@openssl.org. OpenSSL License --------------- /* ==================================================================== * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. All advertising materials mentioning features or use of this * software must display the following acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to * endorse or promote products derived from this software without * prior written permission. For written permission, please contact * openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" * nor may "OpenSSL" appear in their names without prior written * permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by the OpenSSL Project * for use in the OpenSSL Toolkit (http://www.openssl.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * ==================================================================== * * This product includes cryptographic software written by Eric Young * (eay@cryptsoft.com). This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * */ Original SSLeay License ----------------------- /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. * * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to. The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code. The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). * * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * "This product includes cryptographic software written by * Eric Young (eay@cryptsoft.com)" * The word 'cryptographic' can be left out if the rouines from the library * being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from * the apps directory (application code) you must include an acknowledgement: * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" * * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed. i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */ 3. Espressif OpenSSL, obtained from https://github.com/espressif/ESP8266_RTOS_SDK/blob/master/include/openssl/openssl/ssl.h This project is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Microsoft product. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. Espressif-ESP8266_RTOS_SDK-openssl-openssl-ssl.h Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD Provided for Informational Purposes Only Apache 2.0 License Licensed under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. 4. Espressif common, obtained from https://github.com/espressif/ESP8266_RTOS_SDK/blob/master/include/espressif/esp_common.h This project is based on or incorporates material from the projects listed below (Third Party OSS). The original copyright notice and the license under which Microsoft received such Third Party OSS, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party OSS to you under the licensing terms for the Microsoft product or service. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. Espressif-ESP8266_RTOS_SDK-espressif-esp_common.h Copyright (c) 2015   Provided for Informational Purposes Only   MIT License   Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:   The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 5. lwip, obtained from http://www.nongnu.org/lwip/2_0_x/index.html This project is based on or incorporates material from the projects listed below (collectively, “Third Party Codeâ€). Microsoft is not the original author of the Third Party Code. The original copyright notice and the license under which Microsoft received such Third Party Code, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft, not the third party, licenses the Third Party Code to you under the terms set forth in the EULA for the Microsoft Product. Microsoft reserves all rights not expressly granted under this agreement, whether by implication, estoppel or otherwise. Provided for Informational Purposes Only lwip /* * Copyright (c) 2001-2004 Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels * */ BSD License All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6. ESP32 sample main file, obtained from https://github.com/ustccw/AzureESP32 Content from the sample main file at https://github.com/ustccw/AzureESP32/blob/master/main/azure_main.c is copied into https://github.com/Azure/azure-c-shared-utility/blob/master/build_all/esp32/proj/main/azure_main.c for use in ESP32 samples. /* Public Domain */ azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/000077500000000000000000000000001362133436400304745ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembed/000077500000000000000000000000001362133436400327545ustar00rootroot00000000000000Properties/000077500000000000000000000000001362133436400350315ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembedAssemblyInfo.cs000066400000000000000000000025661362133436400377640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembed/Propertiesusing System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("compilembed")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("compilembed")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("670ca3f7-0944-407f-9509-da01f83d1888")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] build.cmd000066400000000000000000000014351362133436400344640ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembed@setlocal EnableExtensions EnableDelayedExpansion @echo off set "current-path=%~dp0" set build-clean=0 if "%2" neq "" call :usage && exit /b 1 if "%1" equ "" goto args-done if "%1" equ "-c" goto arg-build-clean if "%1" equ "--clean" goto arg-build-clean call :usage && exit /b 1 :arg-build-clean set build-clean=1 :args-done set "msbuild-args=/m "/p:Configuration=Release;Platform=Any CPU" "%current-path%\compilembed.sln"" if %build-clean%==1 ( msbuild /t:Clean %msbuild-args% if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! ) msbuild %msbuild-args% if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! goto :eof :usage echo Build compilembed.exe. Usage: echo build.cmd [options] echo options: echo -c, --clean delete artifacts from previous build before building goto :eof compilembed.csproj000066400000000000000000000051231362133436400364000ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembed Debug AnyCPU {0382AFC1-D8D7-4DCD-8309-6B2379FE6E8D} Exe Properties compilembed compilembed v4.0 512 AnyCPU true full false bin\Debug\ DEBUG;TRACE prompt 4 AnyCPU pdbonly true bin\Release\ TRACE prompt 4 compilembed.sln000066400000000000000000000017061362133436400356770ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembed Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "compilembed", "compilembed.csproj", "{0382AFC1-D8D7-4DCD-8309-6B2379FE6E8D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0382AFC1-D8D7-4DCD-8309-6B2379FE6E8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0382AFC1-D8D7-4DCD-8309-6B2379FE6E8D}.Debug|Any CPU.Build.0 = Debug|Any CPU {0382AFC1-D8D7-4DCD-8309-6B2379FE6E8D}.Release|Any CPU.ActiveCfg = Release|Any CPU {0382AFC1-D8D7-4DCD-8309-6B2379FE6E8D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal mbedonlinecompile.cs000066400000000000000000000222441362133436400367150ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembedusing System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using System.Web; using System.Web.Script.Serialization; namespace compilembed { public class CompileMessage { public string action { get; set; } public string severity { get; set; } public string type { get; set; } public double percent { get; set; } public object file { get; set; } public string line { get; set; } public string text { get; set; } public string message { get; set; } } public class CompileResultData { public bool task_complete { get; set; } public string task_status { get; set; } public string task_id { get; set; } public CompileMessage[] new_messages { get; set; } public bool compilation_success { get; set; } public string binary { get; set; } public string program { get; set; } } public class CompileResult { public CompileResultData data { get; set; } } public class CompileStartResponse { public int code { get; set; } public string[] errors { get; set; } public CompileResult result { get; set; } } public class MBEDOnlineCompile { private string authInfo = string.Empty; private string taskId = string.Empty; private CompileStartResponse lastResponse = null; public MBEDOnlineCompile(string userName, string password) { authInfo = userName + ":" + password; authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo)); } static string StringOrArrayToString(object item) { string result; if (item is string) { result = (string)item; } else if (item is object[]) { result = "[" + String.Join(", ", (object[])item) + "]"; } else if (item != null) { result = item.GetType().ToString(); } else { result = null; } return result; } public void StartCompile(string platform, string program = null, string repo = null, bool clean = false) { int retryCount = 5; while (true) { try { WebRequest request = WebRequest.Create("https://os.mbed.com/api/v2/tasks/compiler/start/"); request.Headers["Authorization"] = "Basic " + authInfo; request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; string requestPayload = string.Format("platform={0}&clean={1}", platform, clean ? "True" : "False"); if (!string.IsNullOrEmpty(program)) { requestPayload += string.Format("&program={0}", program); } if (!string.IsNullOrEmpty(repo)) { requestPayload += string.Format("&repo={0}", repo); } byte[] encodedPayload = Encoding.UTF8.GetBytes(requestPayload); request.GetRequestStream().Write(encodedPayload, 0, Encoding.UTF8.GetBytes(requestPayload).Length); WebResponse response = request.GetResponse(); CompileStartResponse compileResponse = new JavaScriptSerializer().Deserialize(new StreamReader(response.GetResponseStream()).ReadToEnd()); taskId = compileResponse.result.data.task_id; lastResponse = compileResponse; break; } catch (WebException webException) { retryCount--; System.Console.WriteLine("Error sending request :{0}, retries left: {1}", webException.Message, retryCount); if (retryCount == 0) { throw webException; } } } } public bool PollStatus(ICollection messages, out bool failed) { string requestURL = string.Format("https://os.mbed.com/api/v2/tasks/compiler/output/{0}", HttpUtility.UrlEncode(taskId)); bool complete = false; failed = true; CompileStartResponse compileResponse; int retryCount = 5; while (true) { try { WebRequest request = WebRequest.Create(requestURL); request.Headers["Authorization"] = "Basic " + authInfo; request.Method = "GET"; // 30s should be enough request.Timeout = 30000; WebResponse response = request.GetResponse(); string jsonResponse = new StreamReader(response.GetResponseStream()).ReadToEnd(); compileResponse = new JavaScriptSerializer().Deserialize(jsonResponse); lastResponse = compileResponse; foreach (CompileMessage msg in compileResponse.result.data.new_messages) { if (msg.type == "cc") { messages.Add(string.Format("{0}: {1}: {2}: {3}", msg.severity, StringOrArrayToString(msg.file), msg.line, msg.message)); messages.Add(string.Format("{0}", msg.text)); } else if (msg.type == "progress") { messages.Add(string.Format("{0}: {1} ({2:F} %)", msg.action, StringOrArrayToString(msg.file), msg.percent)); } else if (msg.type == "tool_error") { messages.Add(string.Format("{0}: {1}", msg.type, msg.message)); } } failed = !compileResponse.result.data.compilation_success; if (failed && compileResponse.result.data.task_complete) { messages.Add(string.Format("Raw response: {0}", jsonResponse)); } complete = compileResponse.result.data.task_complete; break; } catch (WebException webException) { retryCount--; System.Console.WriteLine("Error sending request :{0}, retries left: {1}", webException.Message, retryCount); if (retryCount == 0) { throw webException; } } } if (retryCount < 0) { complete = true; } return complete; } public void DownloadBin(string downloadPath) { if (lastResponse == null || lastResponse.result == null || lastResponse.result.data == null || String.IsNullOrWhiteSpace(lastResponse.result.data.program) || String.IsNullOrWhiteSpace(lastResponse.result.data.binary)) { return; } if (File.Exists(downloadPath)) { File.Delete(downloadPath); } string requestQuery = string.Format("binary={0}&program={1}&repomode={2}&task_id={3}", lastResponse.result.data.binary, lastResponse.result.data.program, "True", taskId); string requestUrl = String.Format("{0}?{1}", "https://os.mbed.com/api/v2/tasks/compiler/bin/", requestQuery); int retryCount = 5; while (true) { try { WebRequest request = WebRequest.Create(requestUrl); request.Headers["Authorization"] = "Basic " + authInfo; request.Method = "GET"; WebResponse response = request.GetResponse(); BinaryReader br = new BinaryReader(response.GetResponseStream()); FileStream fs = new FileStream(downloadPath, FileMode.CreateNew); int bytesRead = 0; byte[] buffer = new byte[256]; while ((bytesRead = br.Read(buffer, 0, buffer.Length)) > 0) { fs.Write(buffer, 0, bytesRead); } fs.Close(); br.Close(); break; } catch (WebException webException) { retryCount--; System.Console.WriteLine("Error sending request :{0}, retries left: {1}", webException.Message, retryCount); if (retryCount == 0) { throw webException; } } } } } } program.cs000066400000000000000000000111061362133436400346720ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/compilembedusing System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace compilembed { // Reference: // https://os.mbed.com/handbook/Compile-API class Program { private const string userNameOption = "-un"; private const string passwordOption = "-pwd"; private const string repoOption = "-r"; private const string platformOption = "-plat"; private const string downloadOutputLocationOption = "-o"; static void Main(string[] args) { MBEDOnlineCompile onlineCompile; string userName = string.Empty; string password = string.Empty; string repo = string.Empty; string platform = string.Empty; string downloadOutputPath = string.Empty; for (int i = 0; i < args.Length; i++) { if (args[i] == userNameOption) { i++; if (i < args.Length) { userName = args[i]; } } if (args[i] == passwordOption) { i++; if (i < args.Length) { password = args[i]; } } if (args[i] == repoOption) { i++; if (i < args.Length) { repo = args[i]; } } if (args[i] == platformOption) { i++; if (i < args.Length) { platform = args[i]; } } if (args[i] == downloadOutputLocationOption) { i++; if (i < args.Length) { downloadOutputPath = args[i]; } } } if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(repo) || string.IsNullOrEmpty(platform)) { System.Console.WriteLine("Usage:"); System.Console.WriteLine(string.Format("-{0:10} UserName to be used to access the MBED online compiler", userNameOption)); System.Console.WriteLine(string.Format("-{0:10} Password to be used to access the MBED online compiler", passwordOption)); System.Console.WriteLine(string.Format("-{0:10} Repo to be compiled", repoOption)); System.Console.WriteLine(string.Format("-{0:10} Platform to be compiled", platformOption)); System.Console.WriteLine(string.Format("-{0:10} Path where the compiled binary should be saved on (If not provided, file is not downloaded).", downloadOutputPath)); Environment.ExitCode = 2; } else { onlineCompile = new MBEDOnlineCompile(userName, password); System.Console.WriteLine("Starting compile ..."); onlineCompile.StartCompile(platform, null, repo); ICollection messages = new List(); bool failed = false; while (!onlineCompile.PollStatus(messages, out failed)) { foreach (string msg in messages) { System.Console.WriteLine(msg); } messages.Clear(); } if (failed) { System.Console.WriteLine("Compile FAILED!"); Environment.ExitCode = 1; } else { if (!String.IsNullOrWhiteSpace(downloadOutputPath)) { Console.WriteLine("Downloading compiled binary into '{0}' ...", downloadOutputPath); try { onlineCompile.DownloadBin(downloadOutputPath); } catch (Exception ex) { Console.WriteLine("Failed downloading binary file: {0}", ex.ToString()); } } System.Console.WriteLine("Done."); } } } } } azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/kick_jenkins.cmd000066400000000000000000000102421362133436400336220ustar00rootroot00000000000000@REM Copyright (c) Microsoft. All rights reserved. @REM Licensed under the MIT license. See LICENSE file in the project root for full license information. @setlocal EnableExtensions EnableDelayedExpansion @echo off set current-path=%~dp0 rem // remove trailing slash set current-path=%current-path:~0,-1% set build-root=%current-path%\.. rem // resolve to fully qualified path for %%i in ("%build-root%") do set build-root=%%~fi REM check that we have a valid argument if "%1" equ "" ( set jenkins_job=_integrate-into-develop ) else if /i "%1" equ "c" ( set jenkins_job=_integrate-into-develop-c-and-wrappers ) else ( echo Usage: echo kick_jenkins echo or echo kick_jenkins c exit /b 1 ) REM check that we have java handy call :checkExists java if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL! REM check that jenkins-cli.jar is in the repository's tools folder if not exist %build-root%\tools\jenkins-cli.jar ( echo jenkins-cli does not exist echo Downloading from repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar powershell -Command "Invoke-WebRequest http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar -OutFile %build-root%\tools\jenkins-cli.jar" if not !ERRORLEVEL!==0 ( echo Failed downloading jenkins-cli.jar echo Use the following link to manually download it into the tools folder of your repository: echo http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/jnlpJars/jenkins-cli.jar exit /b 1 ) ) REM find current branch for /f "usebackq tokens=*" %%i in (`git symbolic-ref -q HEAD`) do set "current_branch_ref=%%i" if defined current_branch_ref set "current_branch=%current_branch_ref:refs/heads/=%" REM handle detached HEAD if not defined current_branch ( echo You're not on any branch! Aborting... goto :eof ) REM Must be on a topic branch when running this script set __exit=1 if not "%current_branch%"=="master" if not "%current_branch%"=="develop" set __exit=0 if %__exit%==1 ( echo You cannot call this script from 'develop' or 'master'. Change to a topic branch first. Aborting... goto :eof ) REM find tracking branch for /f "usebackq tokens=*" %%i in (`git rev-parse --symbolic-full-name --abbrev-ref @{u}`) do set "tracking_branch=%%i" if not defined tracking_branch ( echo Branch ^'%current_branch%^' is not tracking a remote branch! First try ^'git branch -u ^/^^' to set tracking info. Aborting... goto :eof ) for /f "usebackq tokens=*" %%i in (`git config branch.%current_branch%.remote`) do set "remote=%%i" if not defined remote ( REM should never happen... echo Cannot isolate remote name for tracking branch ^'%tracking_branch%^'! Aborting... goto :eof ) REM get the tracking branch name only e.g., origin/topic -> topic for /f "usebackq tokens=*" %%i in (`call echo %%tracking_branch:%remote%/^=%%`) do set "tracking_name=%%i" REM find repo url for /f "usebackq tokens=*" %%i in (`git ls-remote --heads --get-url %remote%`) do set "repo_url=%%i" if not defined repo_url ( echo Cannot find the remote repository URL! Aborting... goto :eof ) echo **************************************************************** echo commit_id: %current_branch% echo repo_url: %repo_url% echo remote: %remote% echo trackingN: %tracking_name% echo jenkinJob: %jenkins_job% echo **************************************************************** REM kick off the build! java -jar "%build-root%"\tools\jenkins-cli.jar -s http://azure-iot-sdks-ci.westus.cloudapp.azure.com:8080/ build %jenkins_job% -p COMMIT_ID=%tracking_name% -p AZURE_REPO=%repo_url% -p BRANCH_TO_MERGE_TO=develop -s -v rem ----------------------------------------------------------------------------- rem -- done rem ----------------------------------------------------------------------------- goto :eof rem ----------------------------------------------------------------------------- rem -- helper subroutines rem ----------------------------------------------------------------------------- :checkExists where %~1 >nul 2>nul if not !ERRORLEVEL!==0 ( echo "%~1" not found. Please make sure that "%~1" is installed and available in the path. exit /b !ERRORLEVEL! ) goto :eof macro_utils_h_generator/000077500000000000000000000000001362133436400353135ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/toolsmacro_utils.cs000066400000000000000000001573661362133436400402050ustar00rootroot00000000000000azure-uamqp-python-1.2.6/src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tools/macro_utils_h_generator// ------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version: 14.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ namespace macro_utils_h_generator { using System.Linq; using System.Text; using System.Collections.Generic; using System; ///

/// Class to produce the template output /// #line 1 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "14.0.0.0")] public partial class macro_utils : macro_utilsBase { #line hidden /// /// Create the template output /// public virtual string TransformText() { this.Write("// Copyright (c) Microsoft. All rights reserved.\r\n// Licensed under the MIT licen" + "se. See LICENSE file in the project root for full license information.\r\n\r\n/*THIS" + " FILE IS GENERATED*/\r\n/*DO NOT EDIT BY HAND!!!*/\r\n/*instead edit macro_utils.tt " + "*/\r\n"); #line 13 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" /*CHANGE BELOW 2 VARIABLES TO GET MORE / LESS */ #line default #line hidden #line 14 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" int nArithmetic=1024; #line default #line hidden #line 15 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" int nMacroParameters=124;/*127 parameters in one macro definition in C99 in chapter 5.2.4.1 Translation limits*/ #line default #line hidden this.Write(@" #ifndef MACRO_UTILS_H #define MACRO_UTILS_H #include #include ""azure_c_shared_utility/optimize_size.h"" /*""pointer or NULL"" macro - because when printf-ing arguments NULL is not valid for %p or %s (section 7.1.4 of C11 standard) */ #define P_OR_NULL(p) (((p)!=NULL)?(p):""NULL"") #define TOSTRING_(x) #x #define TOSTRING(x) TOSTRING_(x) #define IFCOMMA(N) C2(IFCOMMA_, N) #define IFCOMMA_0 #define IFCOMMA_2 "); #line 32 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=4;i<=nMacroParameters;i+=2) #line default #line hidden #line 33 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" { #line default #line hidden this.Write("#define IFCOMMA_"); #line 34 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i)); #line default #line hidden this.Write(" ,\r\n"); #line 35 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write("\r\n#define IFCOMMA_NOFIRST(N) C2(IFCOMMA_NOFIRST, N)\r\n#define IFCOMMA_NOFIRST1 \r\n"); #line 39 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=2;i<=nMacroParameters;i++) #line default #line hidden #line 40 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" { #line default #line hidden this.Write("#define IFCOMMA_NOFIRST"); #line 41 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i)); #line default #line hidden this.Write(" ,\r\n"); #line 42 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write("\r\n#define DEC(x) C2(DEC,x)\r\n"); #line 45 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nArithmetic;i>=1;i--) #line default #line hidden #line 46 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" { #line default #line hidden this.Write("#define DEC"); #line 47 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i)); #line default #line hidden this.Write(" "); #line 47 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i-1)); #line default #line hidden this.Write("\r\n"); #line 48 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write("\r\n#define INC(x) C2(INC,x)\r\n"); #line 51 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nArithmetic;i>=0;i--) #line default #line hidden #line 52 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" { #line default #line hidden this.Write("#define INC"); #line 53 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i)); #line default #line hidden this.Write(" "); #line 53 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i+1)); #line default #line hidden this.Write("\r\n"); #line 54 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write("\r\n#define DIV2(x) C2(DIV2_,x)\r\n\r\n"); #line 58 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nArithmetic;i>=0;i--) #line default #line hidden #line 59 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" { #line default #line hidden this.Write("#define DIV2_"); #line 60 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i)); #line default #line hidden this.Write(" "); #line 60 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i/2)); #line default #line hidden this.Write("\r\n"); #line 61 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write("\r\n#define THE_NTH_ARG("); #line 63 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=1;i<=nMacroParameters;i++) #line default #line hidden #line 64 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" { #line default #line hidden this.Write("P"); #line 64 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i)); #line default #line hidden this.Write(", "); #line 64 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write(" ... ) P"); #line 64 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(nMacroParameters)); #line default #line hidden this.Write("\r\n\r\n#define _TRIGGER_PARENTHESIS_(...) ,\r\n\r\n#define LPAREN (\r\n\r\n#ifdef _MSC_VER\r\n" + "#define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, \\\r\n"); #line 72 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nMacroParameters-1;i>=1;i--){ #line default #line hidden #line 72 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i.ToString()+((i>1)?", ":""))); #line default #line hidden #line 72 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write(")\r\n#define MORE_THAN_1_ARG(...) THE_NTH_ARG LPAREN __VA_ARGS__, "); #line 73 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nMacroParameters-2;i>=1;i--){ #line default #line hidden #line 73 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(1)); #line default #line hidden this.Write(","); #line 73 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write("0)\r\n#else\r\n#define COUNT_1_OR_MORE_ARG(...) THE_NTH_ARG (__VA_ARGS__, \\\r\n"); #line 76 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nMacroParameters-1;i>=1;i--){ #line default #line hidden #line 76 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i.ToString()+((i>1)?", ":""))); #line default #line hidden #line 76 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write(")\r\n#define MORE_THAN_1_ARG(...) THE_NTH_ARG(__VA_ARGS__, "); #line 77 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nMacroParameters-2;i>=1;i--){ #line default #line hidden #line 77 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(1)); #line default #line hidden this.Write(","); #line 77 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" } #line default #line hidden this.Write(@" 0) #endif #define COUNT_ARG(...) C2(COUNT_ARG_, ISEMPTY(__VA_ARGS__))(__VA_ARGS__) #define COUNT_ARG_1(...) 0 #define COUNT_ARG_0(...) C1(COUNT_1_OR_MORE_ARG(__VA_ARGS__)) #define ISEMPTY(...) C5(DISPTACH_EMPTY_, MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__ ()), MORE_THAN_1_ARG(__VA_ARGS__), MORE_THAN_1_ARG(__VA_ARGS__ ()), MORE_THAN_1_ARG(_TRIGGER_PARENTHESIS_ __VA_ARGS__)) #define DISPTACH_EMPTY_1000 1 #define DISPTACH_EMPTY_0000 0 #define DISPTACH_EMPTY_1100 0 #define DISPTACH_EMPTY_1111 0 #define DISPTACH_EMPTY_1001 0 #define DISPTACH_EMPTY_1010 0 #define C2_(x,y) x##y #define C2(x,y) C2_(x,y) #define C3(x,y,z) C2(x, C2(y,z)) #define C4(x,y,z, u) C2(C2(x,y), C2(z,u)) #define C5(x,y,z,u, v) C2(C4(x,y, z, u), v) #define C1_(x) x #define C1(x) C1_(x) #define C2STRING(x,y) x y #define C3STRING(x,y,z) x y z #define C4STRING(x,y,z,u) x y z u #define C5STRING(x,y,z,u,v) x y z u v "); #line 116 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var i=nMacroParameters;i>=2;i--) #line default #line hidden #line 117 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" { #line default #line hidden this.Write("#define FOR_EACH_1_"); #line 118 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(i)); #line default #line hidden this.Write("(X, "); #line 118 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" for(var j=1;j<=i;j++){ #line default #line hidden this.Write("P"); #line 118 "D:\azure-c-shared-utility\tools\macro_utils_h_generator\macro_utils.tt" this.Write(this.ToStringHelper.ToStringWithCulture(j.ToString()+((j